PageSourceSearch

https://www.purpleair.com/_expo/static/js/web/AppEntry-fa5f3e4250bcc7c6c47e79cab351c3fc.js

js purpleair.com collected 2026-09-24 08:39:03 UTC 3,764,697 bytes, 1,214 lines download raw bytes

1__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}var u=t(r(d[0])),e=t(r(d[1]));(0,u.default)(e.default)},0,[1,96]);
2__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}}),r(d[0]);var e,t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e};function o(e){let t=e;if(n.default.registerComponent('main',()=>t),'undefined'!=typeof window){const e=document.getElementById('root');n.default.runApplication('main',{rootTag:e,hydrate:globalThis.__EXPO_ROUTER_HYDRATE__})}}r(d[2])},1,[2,18,95]);
3__d(function(g,r,i,a,m,e,d){"use strict";r(d[0]),r(d[1]),r(d[2])},2,[3,8,17]);
4__d(function(g,r,i,a,m,e,d){"use strict";r(d[0])},3,[4]);
5__d(function(g,r,i,a,m,e,d){"use strict";r(d[0]),Object.defineProperty(globalThis,'__ExpoImportMetaRegistry',{value:r(d[1]).ImportMetaRegistry,enumerable:!1,writable:!0})},4,[5,6]);
6__d(function(g,r,i,a,m,e,d){},5,[]);
7__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ImportMetaRegistry",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n={get url(){return(0,t.getBundleUrl)()}}},6,[7]);
8__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getBundleUrl=function(){let n=null;n='undefined'==typeof window?'file://'+__filename:document.currentScript?.src;if(null==n)return null;const t=new URL(n);return`${t.protocol}//${t.host}${t.pathname}`}},7,[]);
9__d(function(g,r,i,a,m,e,d){"use strict";var _=r(d[0]);g[`${g.__METRO_GLOBAL_PREFIX__??''}__loadBundleAsync`]=(0,_.buildAsyncRequire)()},8,[9]);
10__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildAsyncRequire=function(){const t=new Map;return async function(c){if(t.has(c))return t.get(c);const u=(0,n.loadBundleAsync)(c).catch(n=>{throw t.delete(c),n});return t.set(c,u),u}};var n=r(d[0])},9,[10]);
11__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.loadBundleAsync=async function(t){const u=(0,n.buildUrlForBundle)(t);return(0,c.fetchThenEvalAsync)(u)};var n=r(d[0]),c=r(d[1])},10,[11,13]);
12__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.buildUrlForBundle=function(e){if(/^https?:\/\//.test(e))return e;const{url:t}=(0,u.default)();return t?new URL(e,t).toString():`//${e.replace(/^\/+/,'')}`};var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e}},11,[12]);
13__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=()=>'undefined'==typeof window?{bundleLoadedFromServer:!0,fullBundleUrl:'',url:''}:{bundleLoadedFromServer:!0,get fullBundleUrl(){if(document?.currentScript&&'src'in document.currentScript)return document.currentScript.src;const t=new URL(location.href);return t.searchParams.set('platform','web'),t.toString()},url:location.origin+location.pathname}},12,[]);
14__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fetchThenEvalAsync=function(o,{scriptType:c,nonce:s,crossOrigin:u}={}){if('undefined'==typeof window)return r(d[0]).fetchThenEvalAsync(o);return new Promise((p,l)=>{const f=document.createElement('script');c&&(f.type=c),s&&f.setAttribute('nonce',s),f.src=o,u&&0!==f.src.indexOf(window.location.origin+'/')&&(f.crossOrigin=u),f.onload=()=>{f.parentNode&&f.parentNode.removeChild(f),p()};const y=new t;f.onerror=n=>{let t;t='string'==typeof n?{type:'error',target:{src:t}}:n;const c=t&&('load'===t.type?'missing':t.type),s=t?.target?.src;y.message='Loading module '+o+' failed.\n('+c+': '+s+')',y.type=c,y.request=s,f.parentNode&&f.parentNode.removeChild(f),l(y)},f.src===n?p():document.head.appendChild(f)})};const n='undefined'!=typeof document&&document.currentScript&&'src'in document.currentScript&&document.currentScript.src||null;class t extends Error{name='AsyncRequireError'}},13,[14]);
15__d(function(g,r,i,a,m,e,d){"use strict";
15Object.defineProperty(e,'__esModule',{value:!0}),e.fetchThenEvalAsync=fetchThenEvalAsync;var _errors=r(d[0]),_fetchAsync=r(d[1]);function fetchThenEvalAsync(url){return(0,_fetchAsync.fetchAsync)(url).then(({body:body,status:status,headers:headers})=>{if(null!=headers?.has?.('Content-Type')&&headers.get('Content-Type').includes('application/json'))throw new Error(JSON.parse(body).message||`Unknown error fetching '${url}'`);if(200===status)return eval(body);throw new Error(`Failed to load split bundle from URL: ${url}\n${body}`)})}},14,[15,16]);
16__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MetroServerError",{enumerable:!0,get:function(){return t}});class t extends Error{code='METRO_SERVER_ERROR';constructor(t,o){super(t.message),this.name='MetroServerError',this.url=o;for(const o in t)this[o]=t[o]}}},15,[]);
17__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fetchAsync=async function(t){const s=await fetch(t,{method:'GET',headers:{'expo-platform':'web'}});return{body:await s.text(),status:s.status,headers:s.headers}}},16,[]);
18__d(function(g,r,i,a,m,e,d){},17,[]);
19__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});t(r(d[0]));var e,n=t(r(d[1])),o=t(r(d[2])),p=r(d[3]),s=t(p),u={},l={},c=t=>t();class f{static getAppKeys(){return Object.keys(l)}static getApplication(t,e){return(0,n.default)(l[t]&&l[t].getApplication,"Application "+t+" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent."),l[t].getApplication(e)}static registerComponent(t,n){return l[t]={getApplication:t=>(0,p.getApplication)(c(n),t?t.initialProps:u,e&&e(t)),run:t=>(0,s.default)(c(n),e&&e(t),t.callback,{hydrate:t.hydrate||!1,initialProps:t.initialProps||u,mode:t.mode||'concurrent',rootTag:t.rootTag})},t}static registerConfig(t){t.forEach(t=>{var e=t.appKey,o=t.component,p=t.run;p?f.registerRunnable(e,p):((0,n.default)(o,'No component provider passed in'),f.registerComponent(e,o))})}static registerRunnable(t,e){return l[t]={run:e},t}static runApplication(t,e){return(0,n.default)(l[t]&&l[t].run,"Application \""+t+"\" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent."),l[t].run(e)}static setComponentProviderInstrumentationHook(t){c=t}static setWrapperComponentProvider(t){e=t}static unmountApplicationComponentAtRootTag(t){(0,o.default)(t)}}},18,[19,24,25,26]);
20__d(function(g,_r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=_r(d[0]),r=(e=t)&&e.__esModule?e:{default:e};function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach(function(t){(0,r.default)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}},19,[20]);
21__d(function(g,_r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=_r(d[0]),r=(e=t)&&e.__esModule?e:{default:e};function u(e,t,u){return(t=(0,r.default)(t))in e?Object.defineProperty(e,t,{value:u,enumerable:!0,configurable:!0,writable:!0}):e[t]=u,e}},20,[21]);
22__d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(r(d[0])),u=e(r(d[1]));function n(e){var n=(0,u.default)(e,"string");return"symbol"==(0,t.default)(n)?n:n+""}},21,[22,23]);
23__d(function(g,r,i,a,m,e,d){"use strict";function t(o){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(o)}
23Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},22,[]);
24__d(function(g,_r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return i}});var e,t=_r(d[0]),r=(e=t)&&e.__esModule?e:{default:e};function i(e,t){if("object"!=(0,r.default)(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var u=i.call(e,t||"default");if("object"!=(0,r.default)(u))return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},23,[22]);
25__d(function(g,r,i,a,m,e,d){'use strict';m.exports=function(n,o){for(var t=arguments.length,f=new Array(t>2?t-2:0),s=2;s<t;s++)f[s-2]=arguments[s];if(!n){var l;if(void 0===o)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=0;(l=new Error(o.replace(/%s/g,function(){return String(f[u++])}))).name='Invariant Violation'}throw l.framesToPop=1,l}}},24,[]);
26__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return t.unmount(),!0}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},25,[]);
27__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}}),_e.getApplication=function(e,l,u){return{element:c.default.createElement(n.default,{WrapperComponent:u,rootTag:{}},c.default.createElement(e,l)),getStyleElement:e=>{var n=f.default.getSheet();return c.default.createElement("style",(0,t.default)({},e,{dangerouslySetInnerHTML:{__html:n.textContent},id:n.id}))}}};var t=e(r(d[0])),n=e(r(d[1])),l=e(r(d[2])),u=r(d[3]),o=e(u),f=e(r(d[4])),c=e(r(d[5]));function p(e,t,f,p){var s=p.hydrate,_=p.initialProps,y=p.rootTag,E=s?u.hydrate:o.default;return(0,l.default)(y,'Expect to have a valid rootTag, instead got ',y),E(c.default.createElement(n.default,{WrapperComponent:t,ref:f,rootTag:y},c.default.createElement(e,_)),y)}},26,[27,28,24,29,42,34]);
28__d(function(g,_r,i,a,m,_e,d){"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},e.apply(null,arguments)}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return e}})},27,[]);
29__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=function({children:t}){return t}},28,[]);
30__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}}),e.hydrate=function(u,o){return(0,n.createSheet)(o),(0,t.hydrateRoot)(o,u)};var t=r(d[0]),n=r(d[1]);function u(u,o){(0,n.createSheet)(o);var c=(0,t.createRoot)(o);return c.render(u),c}},29,[30,38]);
31__d(function(g,r,i,a,m,e,d){'use strict';!(function _(){if('undefined'!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&'function'==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(_){console.error(_)}})(),m.exports=r(d[0])},30,[31]);
32__d(function(e,n,t,r,l,a,o){
33/**
34   * @license React
35   * react-dom-client.production.js
36   *
37   * Copyright (c) Meta Platforms, Inc. and affiliates.
38   *
39   * This source code is licensed under the MIT license found in the
40   * LICENSE file in the root directory of this source tree.
41   */
42"use strict";var u=n(o[0]),i=n(o[1]),s=n(o[2]);function c(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var t=2;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function d(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do{!!(4098&(n=e).flags)&&(t=n.return),e=n.return}while(e)}return 3===n.tag?t:null}function p(e){if(13===e.tag){var n=e.memoizedState;if(null===n&&(null!==(e=e.alternate)&&(n=e.memoizedState)),null!==n)return n.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(c(188))}function h(e){var n=e.alternate;if(!n){if(null===(n=d(e)))throw Error(c(188));return n!==e?null:e}for(var t=e,r=n;;){var l=t.return;if(null===l)break;var a=l.alternate;if(null===a){if(null!==(r=l.return)){t=r;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===t)return m(l),e;if(a===r)return m(l),n;a=a.sibling}throw Error(c(188))}if(t.return!==r.return)t=l,r=a;else{for(var o=!1,u=l.child;u;){if(u===t){o=!0,t=l,r=a;break}if(u===r){o=!0,r=l,t=a;break}u=u.sibling}if(!o){for(u=a.child;u;){if(u===t){o=!0,t=a,r=l;break}if(u===r){o=!0,r=a,t=l;break}u=u.sibling}if(!o)throw Error(c(189))}}if(t.alternate!==r)throw Error(c(190))}if(3!==t.tag)throw Error(c(188));return t.stateNode.current===t?e:n}function g(e){var n=e.tag;if(5===n||26===n||27===n||6===n)return e;for(e=e.child;null!==e;){if(null!==(n=g(e)))return n;e=e.sibling}return null}var v=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),z=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),_=Symbol.for("react.lazy");Symbol.for("react.scope");var F=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var D=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var M=Symbol.iterator;function O(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=M&&e[M]||e["@@iterator"])?e:null}var A=Symbol.for("react.client.reference");function R(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===A?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case w:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case N:return"Suspense";case L:return"SuspenseList";case F:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case k:return"Portal";case z:return(e.displayName||"Context")+".Provider";case C:return(e._context.displayName||"Context")+".Consumer";case P:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case T:return null!==(n=e.displayName||null)?n:R(e.type)||"Memo";case _:n=e._payload,e=e._init;try{return R(e(n))}catch(e){}}return null}var I=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},H=[],Q=-1;function $(e){return{current:e}}function B(e){0>Q||(e.current=H[Q],H[Q]=null,Q--)}function W(e,n){Q++,H[Q]=e.current,e.current=n}var q=$(null),K=$(null),Y=$(null),X=$(null);function G(e,n){switch(W(Y,n),W(K,e),W(q,null),n.nodeType){case 9:case 11:e=(e
vendor: 5,110 bytes, line 42
42=n.documentElement)&&(e=e.namespaceURI)?xf(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)e=Cf(n=xf(n),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(q),W(q,e)}function Z(){B(q),B(K),B(Y)}function J(e){null!==e.memoizedState&&W(X,e);var n=q.current,t=Cf(n,e.type);n!==t&&(W(K,e),W(q,t))}function ee(e){K.current===e&&(B(q),B(K)),X.current===e&&(B(X),wd._currentValue=V)}var ne=Object.prototype.hasOwnProperty,te=u.unstable_scheduleCallback,re=u.unstable_cancelCallback,le=u.unstable_shouldYield,ae=u.unstable_requestPaint,oe=u.unstable_now,ue=u.unstable_getCurrentPriorityLevel,ie=u.unstable_ImmediatePriority,se=u.unstable_UserBlockingPriority,ce=u.unstable_NormalPriority,fe=u.unstable_LowPriority,de=u.unstable_IdlePriority,pe=u.log,me=u.unstable_setDisableYieldValue,he=null,ge=null;function ve(e){if("function"==typeof pe&&me(e),ge&&"function"==typeof ge.setStrictMode)try{ge.setStrictMode(he,e)}catch(e){}}var ye=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(be(e)/ke|0)|0},be=Math.log,ke=Math.LN2;var we=256,Se=4194304;function Ee(e){var n=42&e;if(0!==n)return n;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 4194048&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function xe(e,n,t){var r=e.pendingLanes;if(0===r)return 0;var l=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var u=134217727&r;return 0!==u?0!==(r=u&~a)?l=Ee(r):0!==(o&=u)?l=Ee(o):t||0!==(t=u&~e)&&(l=Ee(t)):0!==(u=r&~a)?l=Ee(u):0!==o?l=Ee(o):t||0!==(t=r&~e)&&(l=Ee(t)),0===l?0:0!==n&&n!==l&&0===(n&a)&&((a=l&-l)>=(t=n&-n)||32===a&&4194048&t)?n:l}function Ce(e,n){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function ze(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+5e3;default:return-1}}function Pe(){var e=we;return!(4194048&(we<<=1))&&(we=256),e}function Ne(){var e=Se;return!(62914560&(Se<<=1))&&(Se=4194304),e}function Le(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function Te(e,n){e.pendingLanes|=n,268435456!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _e(e,n,t,r,l,a){var o=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var u=e.entanglements,i=e.expirationTimes,s=e.hiddenUpdates;for(t=o&~t;0<t;){var c=31-ye(t),f=1<<c;u[c]=0,i[c]=-1;var d=s[c];if(null!==d)for(s[c]=null,c=0;c<d.length;c++){var p=d[c];null!==p&&(p.lane&=-536870913)}t&=~f}0!==r&&Fe(e,r,0),0!==a&&0===l&&0!==e.tag&&(e.suspendedLanes|=a&~(o&~n))}function Fe(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-ye(n);e.entangledLanes|=n,e.entanglements[r]=1073741824|e.entanglements[r]|4194090&t}function De(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-ye(t),l=1<<r;l&n|e[r]&n&&(e[r]|=n),t&=~l}}function Me(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 Oe(e){return 2<(e&=-e)?8<e?134217727&e?32:268435456:8:2}function Ae(){var e=j.p;return 0!==e?e:void 0===(e=window.event)?32:Ad(e.type)}function Re(e,n){var t=j.p;try{return j.p=e,n()}finally{j.p=t}}var Ie=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Ie,je="__reactProps$"+Ie,Ve="__reactContainer$"+Ie,He="__reactEvents$"+Ie,Qe="__reactListeners$"+Ie,$e="__reactHandles$"+Ie,Be="__reactResources$"+Ie,We="__reactMarker$"+Ie;function qe(e){delete e[Ue],delete e[je],delete e[He],delete e[Qe],delete e[$e]}function Ke(e){var n=e[Ue];if(n)return n;for(var t=e.parentNode;t;){if(n=t[Ve]||t[Ue]){if(t=n.alternate,null!==n.child||null!==t&&null!==t.child)for(e=Qf(e);null!==e;){if(t=e[Ue])return t;e=Qf(e)}return n}t=(e=t).parentNode}return null}function Ye(e){if(e=e[Ue]||e[Ve]){var n=e.tag;if(5===n||6===n||13===n||26===n||27===n||3===n)return e}return null}function Xe(e){var n=e.tag;if(5===n||26===n||27===n||6===n)return e.stateNode;throw Error(c(33))}function Ge(e){var n=e[Be];return n||(n=e[Be]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ze(e){e[We]=!0}var Je=new Set,en={};function nn(e,n){tn(e,n),tn(e+"Capture",n)}function tn(e,n){for(en[e]=n,e=0;e<n.length;e++)Je.add(n[e])}var rn,ln,an=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
42037D\\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]*$"),on={},un={};function sn(e,n,t){if(l=n,ne.call(un,l)||!ne.call(on,l)&&(an.test(l)?un[l]=!0:(on[l]=!0,0)))if(null===t)e.removeAttribute(n);else{switch(typeof t){case"undefined":case"function":case"symbol":return void e.removeAttribute(n);case"boolean":var r=n.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(n)}e.setAttribute(n,""+t)}var l}function cn(e,n,t){if(null===t)e.removeAttribute(n);else{switch(typeof t){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttribute(n,""+t)}}function fn(e,n,t,r){if(null===r)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttributeNS(n,t,""+r)}}function dn(e){if(void 0===rn)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);rn=n&&n[1]||"",ln=-1<e.stack.indexOf("\n    at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+rn+e+ln}var pn=!1;function mn(e,n){if(!e||pn)return"";pn=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(n){var t=function(){throw Error()};if(Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}(t=e())&&"function"==typeof t.catch&&t.catch(function(){})}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),o=a[0],u=a[1];if(o&&u){var i=o.split("\n"),s=u.split("\n");for(l=r=0;r<i.length&&!i[r].includes("DetermineComponentFrameRoot");)r++;for(;l<s.length&&!s[l].includes("DetermineComponentFrameRoot");)l++;if(r===i.length||l===s.length)for(r=i.length-1,l=s.length-1;1<=r&&0<=l&&i[r]!==s[l];)l--;for(;1<=r&&0<=l;r--,l--)if(i[r]!==s[l]){if(1!==r||1!==l)do{if(r--,0>--l||i[r]!==s[l]){var c="\n"+i[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}}while(1<=r&&0<=l);break}}}finally{pn=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?dn(t):""}function hn(e){switch(e.tag){case 26:case 27:case 5:return dn(e.type);case 16:return dn("Lazy");case 13:return dn("Suspense");case 19:return dn("SuspenseList");case 0:case 15:return mn(e.type,!1);case 11:return mn(e.type.render,!1);case 1:return mn(e.type,!0);case 31:return dn("Activity");default:return""}}function gn(e){try{var n="";do{n+=hn(e),e=e.return}while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function vn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function yn(e){var n=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===n||"radio"===n)}function bn(e){var n=yn(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&void 0!==t&&"function"==typeof t.get&&"function"==typeof t.set){var l=t.get,a=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function kn(e){e._valueTracker||(e._valueTracker=bn(e))}function wn(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=yn(e)?e.checked?"true":"false":e.value),(e=r)!==t&&(n.setValue(e),!0)}function Sn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(n){return e.body}}var En=/[\n"\\]/g;function xn(e){return e.replace(En,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Cn(e,n,t,r,l,a,o,u){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=n?"number"===o?(0===n&&""===e.value||e.value!=n)&&(e.value=""+vn(n)):e.value!==""+vn(n)&&(e.value=""+vn(n)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=n?Pn(e,o,vn(n)):null!=t?Pn(e,o,vn(t)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=u&&"function"!=typeof u&&"symbol"!=typeof u&&"boolean"!=typeof u?e.name=""+vn(u):e.removeAttribute("name")}function zn(e,n,t,r,l,a,o,u){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=n||null!=t){if(("submit"===a||"reset"===a)&&null==n)return;t=null!=t?""+vn(t):"",n=null!=n?""+vn(n):t,u||n===e.value||(e.value=n),e.defaultValue=n}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=u?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function Pn(e,n,t){"number"===n&&Sn(e.ownerDocument)===e||e.defaultValue===""+t||(e.defaultValue=""+t)}function Nn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l<t.length;l++)n["$"+t[l]]=!0;for(t=0;t<e.length;t++)l=n.hasOwnProperty("$"+e[t].value),e[t].selected!==l&&(e[t].selected=l),l&&r&&(e[t].defaultSelected=!0)}else{for(t=""+vn(t),n=null,l=0;l<e.length;l++){if(e[l].value===t)return e[l].selected=!0,void(r&&(e[l].defaultSelected=!0));null!==n||e[l].disabled||(n=e[l])}null!==n&&(n.selected=!0)}}function Ln(e,n,t){null==n||((n=""+vn(n))!==e.value&&(e.value=n),null!=t)?e.defaultValue=null!=t?""+vn(t):"":e.defaultValue!==n&&(e.defaultValue=n)}function Tn(e,n,t,r){if(null==n){if(null!=r){if(null!=t)throw Error(c(92));if(I(r)){if(1<r.length)throw Error(c(93));r=r[0]}t=r}null==t&&(t=""),n=t}t=vn(n),e.defaultValue=t,(r=e.textContent)===t&&""!==r&&null!==r&&(e.value=r)}function _n(e,n){if(n){var t=e.firstChild;
vendor: 4,144 bytes, line 42
42if(t&&t===e.lastChild&&3===t.nodeType)return void(t.nodeValue=n)}e.textContent=n}var Fn=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 Dn(e,n,t){var r=0===n.indexOf("--");null==t||"boolean"==typeof t||""===t?r?e.setProperty(n,""):"float"===n?e.cssFloat="":e[n]="":r?e.setProperty(n,t):"number"!=typeof t||0===t||Fn.has(n)?"float"===n?e.cssFloat=t:e[n]=(""+t).trim():e[n]=t+"px"}function Mn(e,n,t){if(null!=n&&"object"!=typeof n)throw Error(c(62));if(e=e.style,null!=t){for(var r in t)!t.hasOwnProperty(r)||null!=n&&n.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in n)r=n[l],n.hasOwnProperty(l)&&t[l]!==r&&Dn(e,l,r)}else for(var a in n)n.hasOwnProperty(a)&&Dn(e,a,n[a])}function On(e){if(-1===e.indexOf("-"))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 An=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
42-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"]]),Rn=/^[\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 In(e){return Rn.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Un=null;function jn(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Vn=null,Hn=null;function Qn(e){var n=Ye(e);if(n&&(e=n.stateNode)){var t=e[je]||null;e:switch(e=n.stateNode,n.type){case"input":if(Cn(e,t.value,t.defaultValue,t.defaultValue,t.checked,t.defaultChecked,t.type,t.name),n=t.name,"radio"===t.type&&null!=n){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll('input[name="'+xn(""+n)+'"][type="radio"]'),n=0;n<t.length;n++){var r=t[n];if(r!==e&&r.form===e.form){var l=r[je]||null;if(!l)throw Error(c(90));Cn(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(n=0;n<t.length;n++)(r=t[n]).form===e.form&&wn(r)}break e;case"textarea":Ln(e,t.value,t.defaultValue);break e;case"select":null!=(n=t.value)&&Nn(e,!!t.multiple,n,!1)}}}var $n=!1;function Bn(e,n,t){if($n)return e(n,t);$n=!0;try{return e(n)}finally{if($n=!1,(null!==Vn||null!==Hn)&&(rc(),Vn&&(n=Vn,e=Hn,Hn=Vn=null,Qn(n),e)))for(n=0;n<e.length;n++)Qn(e[n])}}function Wn(e,n){var t=e.stateNode;if(null===t)return null;var r=t[je]||null;if(null===r)return null;t=r[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(t&&"function"!=typeof t)throw Error(c(231,n,typeof t));return t}var qn=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Kn=!1;if(qn)try{var Yn={};Object.defineProperty(Yn,"passive",{get:function(){Kn=!0}}),window.addEventListener("test",Yn,Yn),window.removeEventListener("test",Yn,Yn)}catch(e){Kn=!1}var Xn=null,Gn=null,Zn=null;function Jn(){if(Zn)return Zn;var e,n,t=Gn,r=t.length,l="value"in Xn?Xn.value:Xn.textContent,a=l.length;for(e=0;e<r&&t[e]===l[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===l[a-n];n++);return Zn=l.slice(e,1<n?1-n:void 0)}function et(e){var n=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===n&&(e=13):e=n,10===e&&(e=13),32<=e||13===e?e:0}function nt(){return!0}function tt(){return!1}function rt(e){function n(n,t,r,l,a){for(var o in this._reactName=n,this._targetInst=r,this.type=t,this.nativeEvent=l,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(null!=l.defaultPrevented?l.defaultPrevented:!1===l.returnValue)?nt:tt,this.isPropagationStopped=tt,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nt)},persist:function(){},isPersistent:nt}),n}var lt,at,ot,ut={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},it=rt(ut),st=v({},ut,{view:0,detail:0}),ct=rt(st),ft=v({},st,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:St,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 4,957 bytes, line 42
42Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ot&&(ot&&"mousemove"===e.type?(lt=e.screenX-ot.screenX,at=e.screenY-ot.screenY):at=lt=0,ot=e),lt)},movementY:function(e){return"movementY"in e?e.movementY:at}}),dt=rt(ft),pt=rt(v({},ft,{dataTransfer:0})),mt=rt(v({},st,{relatedTarget:0})),ht=rt(v({},ut,{animationName:0,elapsedTime:0,pseudoElement:0})),gt=rt(v({},ut,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),vt=rt(v({},ut,{data:0})),yt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bt={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"},kt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wt(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):!!(e=kt[e])&&!!n[e]}function St(){return wt}var Et=rt(v({},st,{key:function(e){if(e.key){var n=yt[e.key]||e.key;if("Unidentified"!==n)return n}return"keypress"===e.type?13===(e=et(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?bt[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:St,charCode:function(e){return"keypress"===e.type?et(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?et(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),xt=rt(v({},ft,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Ct=rt(v({},st,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:St})),zt=rt(v({},ut,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pt=rt(v({},ft,{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})),Nt=rt(v({},ut,{newState:0,oldState:0})),Lt=[9,13,27,32],Tt=qn&&"CompositionEvent"in window,_t=null;qn&&"documentMode"in document&&(_t=document.documentMode);var Ft=qn&&"TextEvent"in window&&!_t,Dt=qn&&(!Tt||_t&&8<_t&&11>=_t),Mt=String.fromCharCode(32),Ot=!1;function At(e,n){switch(e){case"keyup":return-1!==Lt.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rt(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var It=!1;function Ut(e,n){switch(e){case"compositionend":return Rt(n);case"keypress":return 32!==n.which?null:(Ot=!0,Mt);case"textInput":return(e=n.data)===Mt&&Ot?null:e;default:return null}}function jt(e,n){if(It)return"compositionend"===e||!Tt&&At(e,n)?(e=Jn(),Zn=Gn=Xn=null,It=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Dt&&"ko"!==n.locale?null:n.data}}var Vt={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 Ht(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!Vt[e.type]:"textarea"===n}function Qt(e,n,t,r){Vn?Hn?Hn.push(r):Hn=[r]:Vn=r,0<(n=sf(n,"onChange")).length&&(t=new it("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var $t=null,Bt=null;function Wt(e){ef(e,0)}function qt(e){if(wn(Xe(e)))return e}function Kt(e,n){if("change"===e)return n}var Yt=!1;if(qn){var Xt;if(qn){var Gt="oninput"in document;if(!Gt){var Zt=document.createElement("div");Zt.setAttribute("oninput","return;"),Gt="function"==typeof Zt.oninput}Xt=Gt}else Xt=!1;Yt=Xt&&(!document.documentMode||9<document.documentMode)}function Jt(){$t&&($t.detachEvent("onpropertychange",er),Bt=$t=null)}function er(e){if("value"===e.propertyName&&qt(Bt)){var n=[];Qt(n,Bt,e,jn(e)),Bn(Wt,n)}}function nr(e,n,t){"focusin"===e?(Jt(),Bt=t,($t=n).attachEvent("onpropertychange",er)):"focusout"===e&&Jt()}function tr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qt(Bt)}function rr(e,n){if("click"===e)return qt(n)}function lr(e,n){if("input"===e||"change"===e)return qt(n)}var ar="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n};function or(e,n){if(ar(e,n))return!0;
vendor: 4,877 bytes, line 42
42if("object"!=typeof e||null===e||"object"!=typeof n||null===n)return!1;var t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(r=0;r<t.length;r++){var l=t[r];if(!ne.call(n,l)||!ar(e[l],n[l]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ir(e,n){var t,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(t=e+r.textContent.length,e<=n&&t>=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function sr(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?sr(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}function cr(e){for(var n=Sn((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(e){t=!1}if(!t)break;n=Sn((e=n.contentWindow).document)}return n}function fr(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var dr=qn&&"documentMode"in document&&11>=document.documentMode,pr=null,mr=null,hr=null,gr=!1;function vr(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;gr||null==pr||pr!==Sn(r)||("selectionStart"in(r=pr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},hr&&or(hr,r)||(hr=r,0<(r=sf(mr,"onSelect")).length&&(n=new it("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=pr)))}function yr(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var br={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionrun:yr("Transition","TransitionRun"),transitionstart:yr("Transition","TransitionStart"),transitioncancel:yr("Transition","TransitionCancel"),transitionend:yr("Transition","TransitionEnd")},kr={},wr={};function Sr(e){if(kr[e])return kr[e];if(!br[e])return e;var n,t=br[e];for(n in t)if(t.hasOwnProperty(n)&&n in wr)return kr[e]=t[n];return e}qn&&(wr=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);var Er=Sr("animationend"),xr=Sr("animationiteration"),Cr=Sr("animationstart"),zr=Sr("transitionrun"),Pr=Sr("transitionstart"),Nr=Sr("transitioncancel"),Lr=Sr("transitionend"),Tr=new Map,_r="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(" ");function Fr(e,n){Tr.set(e,n),nn(n,[e])}_r.push("scrollEnd");var Dr=new WeakMap;function Mr(e,n){if("object"==typeof e&&null!==e){var t=Dr.get(e);return void 0!==t?t:(n={value:e,source:n,stack:gn(n)},Dr.set(e,n),n)}return{value:e,source:n,stack:gn(n)}}var Or=[],Ar=0,Rr=0;function Ir(){for(var e=Ar,n=Rr=Ar=0;n<e;){var t=Or[n];Or[n++]=null;var r=Or[n];Or[n++]=null;var l=Or[n];Or[n++]=null;var a=Or[n];if(Or[n++]=null,null!==r&&null!==l){var o=r.pending;null===o?l.next=l:(l.next=o.next,o.next=l),r.pending=l}0!==a&&Hr(t,l,a)}}function Ur(e,n,t,r){Or[Ar++]=e,Or[Ar++]=n,Or[Ar++]=t,Or[Ar++]=r,Rr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function jr(e,n,t,r){return Ur(e,n,t,r),Qr(e)}function Vr(e,n){return Ur(e,null,null,n),Qr(e)}function Hr(e,n,t){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t);for(var l=!1,a=e.return;null!==a;)a.childLanes|=t,null!==(r=a.alternate)&&(r.childLanes|=t),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(l=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,l&&null!==n&&(l=31-ye(t),null===(r=(e=a.hiddenUpdates)[l])?e[l]=[n]:r.push(n),n.lane=536870912|t),a):null}function Qr(e){if(50<Ks)throw Ks=0,Ys=null,Error(c(185));for(var n=e.return;null!==n;)n=(e=n).return;return 3===e.tag?e.stateNode:null}var $r={};function Br(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 3,919 bytes, line 42
42ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(e,n,t,r){return new Br(e,n,t,r)}function qr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Kr(e,n){var t=e.alternate;return null===t?((t=Wr(e.tag,n,e.key,e.mode)).elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=65011712&e.flags,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t.refCleanup=e.refCleanup,t}function Yr(e,n){e.flags&=65011714;var t=e.alternate;return null===t?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,e.type=t.type,n=t.dependencies,e.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Xr(e,n,t,r,l,a){var o=0;if(r=e,"function"==typeof e)qr(e)&&(o=1);else if("string"==typeof e)o=fd(e,t,q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case F:return(e=Wr(31,t,n,l)).elementType=F,e.lanes=a,e;case w:return Gr(t.children,l,a,n);case S:o=8,l|=24;break;case E:return(e=Wr(12,t,n,2|l)).elementType=E,e.lanes=a,e;case N:return(e=Wr(13,t,n,l)).elementType=N,e.lanes=a,e;case L:return(e=Wr(19,t,n,l)).elementType=L,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:case z:o=10;break e;case C:o=9;break e;case P:o=11;break e;case T:o=14;break e;case _:o=16,r=null;break e}o=29,t=Error(c(130,null===e?"null":typeof e,"")),r=null}return(n=Wr(o,t,n,l)).elementType=e,n.type=r,n.lanes=a,n}function Gr(e,n,t,r){return(e=Wr(7,e,r,n)).lanes=t,e}function Zr(e,n,t){return(e=Wr(6,e,null,n)).lanes=t,e}function Jr(e,n,t){return(n=Wr(4,null!==e.children?e.children:[],e.key,n)).lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var el=[],nl=0,tl=null,rl=0,ll=[],al=0,ol=null,ul=1,il="";function sl(e,n){el[nl++]=rl,el[nl++]=tl,tl=e,rl=n}function cl(e,n,t){ll[al++]=ul,ll[al++]=il,ll[al++]=ol,ol=e;var r=ul;e=il;var l=32-ye(r)-1;r&=~(1<<l),t+=1;var a=32-ye(n)+l;if(30<a){var o=l-l%5;a=(r&(1<<o)-1).toString(32),r>>=o,l-=o,ul=1<<32-ye(n)+l|t<<l|r,il=a+e}else ul=1<<a|t<<l|r,il=e}function fl(e){null!==e.return&&(sl(e,1),cl(e,1,0))}function dl(e){for(;e===tl;)tl=el[--nl],el[nl]=null,rl=el[--nl],el[nl]=null;for(;e===ol;)ol=ll[--al],ll[al]=null,il=ll[--al],ll[al]=null,ul=ll[--al],ll[al]=null}var pl=null,ml=null,hl=!1,gl=null,vl=!1,yl=Error(c(519));function bl(e){throw Cl(Mr(Error(c(418,"")),e)),yl}function kl(e){var n=e.stateNode,t=e.type,r=e.memoizedProps;switch(n[Ue]=e,n[je]=r,t){case"dialog":nf("cancel",n),nf("close",n);break;case"iframe":case"object":case"embed":nf("load",n);break;case"video":case"audio":for(t=0;t<Zc.length;t++)nf(Zc[t],n);break;case"source":nf("error",n);break;case"img":case"image":case"link":nf("error",n),nf("load",n);break;case"details":nf("toggle",n);break;case"input":nf("invalid",n),zn(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),kn(n);break;case"select":nf("invalid",n);break;case"textarea":nf("invalid",n),Tn(n,r.value,r.defaultValue,r.children),kn(n)}"string"!=typeof(t=r.children)&&"number"!=typeof t&&"bigint"!=typeof t||n.textContent===""+t||!0===r.
vendor: 7,776 bytes, line 42
42suppressHydrationWarning||hf(n.textContent,t)?(null!=r.popover&&(nf("beforetoggle",n),nf("toggle",n)),null!=r.onScroll&&nf("scroll",n),null!=r.onScrollEnd&&nf("scrollend",n),null!=r.onClick&&(n.onclick=gf),n=!0):n=!1,n||bl(e)}function wl(e){for(pl=e.return;pl;)switch(pl.tag){case 5:case 13:return void(vl=!1);case 27:case 3:return void(vl=!0);default:pl=pl.return}}function Sl(e){if(e!==pl)return!1;if(!hl)return wl(e),hl=!0,!1;var n,t=e.tag;if((n=3!==t&&27!==t)&&((n=5===t)&&(n=!("form"!==(n=e.type)&&"button"!==n)||zf(e.type,e.memoizedProps)),n=!n),n&&ml&&bl(e),wl(e),13===t){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(c(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType)if("/$"===(n=e.data)){if(0===t){ml=Vf(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++;e=e.nextSibling}ml=null}}else 27===t?(t=ml,Mf(e.type)?(e=Hf,Hf=null,ml=e):ml=t):ml=pl?Vf(e.stateNode.nextSibling):null;return!0}function El(){ml=pl=null,hl=!1}function xl(){var e=gl;return null!==e&&(null===Os?Os=e:Os.push.apply(Os,e),gl=null),e}function Cl(e){null===gl?gl=[e]:gl.push(e)}var zl=$(null),Pl=null,Nl=null;function Ll(e,n,t){W(zl,n._currentValue),n._currentValue=t}function Tl(e){e._currentValue=zl.current,B(zl)}function _l(e,n,t){for(;null!==e;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,null!==r&&(r.childLanes|=n)):null!==r&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function Fl(e,n,t,r){var l=e.child;for(null!==l&&(l.return=e);null!==l;){var a=l.dependencies;if(null!==a){var o=l.child;a=a.firstContext;e:for(;null!==a;){var u=a;a=l;for(var i=0;i<n.length;i++)if(u.context===n[i]){a.lanes|=t,null!==(u=a.alternate)&&(u.lanes|=t),_l(a.return,t,e),r||(o=null);break e}a=u.next}}else if(18===l.tag){if(null===(o=l.return))throw Error(c(341));o.lanes|=t,null!==(a=o.alternate)&&(a.lanes|=t),_l(o,t,e),o=null}else o=l.child;if(null!==o)o.return=l;else for(o=l;null!==o;){if(o===e){o=null;break}if(null!==(l=o.sibling)){l.return=o.return,o=l;break}o=o.return}l=o}}function Dl(e,n,t,r){e=null;for(var l=n,a=!1;null!==l;){if(!a)if(524288&l.flags)a=!0;else if(262144&l.flags)break;if(10===l.tag){var o=l.alternate;if(null===o)throw Error(c(387));if(null!==(o=o.memoizedProps)){var u=l.type;ar(l.pendingProps.value,o.value)||(null!==e?e.push(u):e=[u])}}else if(l===X.current){if(null===(o=l.alternate))throw Error(c(387));o.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(null!==e?e.push(wd):e=[wd])}l=l.return}null!==e&&Fl(n,e,t,r),n.flags|=262144}function Ml(e){for(e=e.firstContext;null!==e;){if(!ar(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ol(e){Pl=e,Nl=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Al(e){return Il(Pl,e)}function Rl(e,n){return null===Pl&&Ol(e),Il(e,n)}function Il(e,n){var t=n._currentValue;if(n={context:n,memoizedValue:t,next:null},null===Nl){if(null===e)throw Error(c(308));Nl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Nl=Nl.next=n;return t}var Ul="undefined"!=typeof AbortController?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(n,t){e.push(t)}};this.abort=function(){n.aborted=!0,e.forEach(function(e){return e()})}},jl=u.unstable_scheduleCallback,Vl=u.unstable_NormalPriority,Hl={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ql(){return{controller:new Ul,data:new Map,refCount:0}}function $l(e){e.refCount--,0===e.refCount&&jl(Vl,function(){e.controller.abort()})}var Bl=null,Wl=0,ql=0,Kl=null;function Yl(e,n){if(null===Bl){var t=Bl=[];Wl=0,ql=Wc(),Kl={status:"pending",value:void 0,then:function(e){t.push(e)}}}return Wl++,n.then(Xl,Xl),n}function Xl(){if(0===--Wl&&null!==Bl){null!==Kl&&(Kl.status="fulfilled");var e=Bl;Bl=null,ql=0,Kl=null;for(var n=0;n<e.length;n++)(0,e[n])()}}var Gl=U.S;U.S=function(e,n){"object"==typeof n&&null!==n&&"function"==typeof n.then&&Yl(0,n),null!==Gl&&Gl(e,n)};var Zl=$(null);function Jl(){var e=Zl.current;return null!==e?e:bs.pooledCache}function ea(e,n){W(Zl,null===n?Zl.current:n.pool)}function na(){var e=Jl();return null===e?null:{parent:Hl._currentValue,pool:e}}var ta=Error(c(460)),ra=Error(c(474)),la=Error(c(542)),aa={then:function(){}};function oa(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ua(){}function ia(e,n,t){switch(void 0===(t=e[t])?e.push(n):t!==n&&(n.then(ua,ua),n=t),n.status){case"fulfilled":return n.value;case"rejected":throw fa(e=n.reason),e;default:if("string"==typeof n.status)n.then(ua,ua);else{if(null!==(e=bs)&&100<e.shellSuspendCounter)throw Error(c(482));(e=n).status="pending",e.then(function(e){if("pending"===n.status){var t=n;t.status="fulfilled",t.value=e}},function(e){if("pending"===n.status){var t=n;t.status="rejected",t.reason=e}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw fa(e=n.reason),e}throw sa=n,ta}}var sa=null;function ca(){if(null===sa)throw Error(c(459));var e=sa;return sa=null,e}function fa(e){if(e===ta||e===la)throw Error(c(483))}var da=!1;function pa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ma(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ga(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&ys){var l=r.pending;return null===l?n.next=n:(n.next=l.next,l.next=n),r.pending=n,n=Qr(e),Hr(e,null,t),n}return Ur(e,r,n,t),Qr(e)}function va(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,4194048&t)){var r=n.lanes;t|=r&=e.pendingLanes,n.lanes=t,De(e,t)}}function ya(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var l=null,a=null;if(null!==(t=t.firstBaseUpdate)){do{var o={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};null===a?l=a=o:a=a.next=o,t=t.next}while(null!==t);null===a?l=a=n:a=a.next=n}else l=a=n;return t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=t)}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}var ba=!1;function ka(){if(ba){if(null!==Kl)throw Kl}}function wa(e,n,t,r){ba=!1;var l=e.updateQueue;da=!1;var a=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(null!==u){l.shared.pending=null;var i=u,s=i.next;i.next=null,null===o?a=s:o.next=s,o=i;var c=e.alternate;null!==c&&((u=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===u?c.firstBaseUpdate=s:u.next=s,c.lastBaseUpdate=i))}if(null!==a){var f=l.baseState;for(o=0,c=s=i=null,u=a;;){var d=-536870913&u.lane,p=d!==u.lane;if(p?(ws&d)===d:(r&d)===d){0!==d&&d===ql&&(ba=!0),null!==c&&(c=c.next={lane:0,tag:u.tag,payload:u.payload,callback:null,next:null});e:{var m=e,h=u;d=n;var g=t;switch(h.tag){case 1:if("function"==typeof(m=h.payload)){f=m.call(g,f,d);break e}f=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(d="function"==typeof(m=h.payload)?m.call(g,f,d):m))break e;f=v({},f,d);break e;case 2:da=!0}}null!==(d=u.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=l.callbacks)?l.callbacks=[d]:p.push(d))}else p={lane:d,tag:u.tag,payload:u.payload,callback:u.callback,next:null},null===c?(s=c=p,i=f):c=c.next=p,o|=d;if(null===(u=u.next)){if(null===(u=l.shared.pending))break;u=(p=u).next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}null===c&&(i=f),l.baseState=i,l.firstBaseUpdate=s,l.lastBaseUpdate=c,null===a&&(l.shared.lanes=0),Ls|=o,e.lanes=o,e.memoizedState=f}}function Sa(e,n){if("function"!=typeof e)throw Error(c(191,e));e.call(n)}function Ea(e,n){var t=e.callbacks;
vendor: 3,847 bytes, line 42
42if(null!==t)for(e.callbacks=null,e=0;e<t.length;e++)Sa(t[e],n)}var xa=$(null),Ca=$(0);function za(e,n){W(Ca,e=Ps),W(xa,n),Ps=e|n.baseLanes}function Pa(){W(Ca,Ps),W(xa,xa.current)}function Na(){Ps=Ca.current,B(xa),B(Ca)}var La=0,Ta=null,_a=null,Fa=null,Da=!1,Ma=!1,Oa=!1,Aa=0,Ra=0,Ia=null,Ua=0;function ja(){throw Error(c(321))}function Va(e,n){if(null===n)return!1;for(var t=0;t<n.length&&t<e.length;t++)if(!ar(e[t],n[t]))return!1;return!0}function Ha(e,n,t,r,l,a){return La=a,Ta=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=null===e||null===e.memoizedState?lu:au,Oa=!1,a=t(r,l),Oa=!1,Ma&&(a=$a(n,t,r,l)),Qa(e),a}function Qa(e){U.H=ru;var n=null!==_a&&null!==_a.next;if(La=0,Fa=_a=Ta=null,Da=!1,Ra=0,Ia=null,n)throw Error(c(300));null===e||ju||null!==(e=e.dependencies)&&Ml(e)&&(ju=!0)}function $a(e,n,t,r){Ta=e;var l=0;do{if(Ma&&(Ia=null),Ra=0,Ma=!1,25<=l)throw Error(c(301));if(l+=1,Fa=_a=null,null!=e.updateQueue){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,null!=a.memoCache&&(a.memoCache.index=0)}U.H=ou,a=n(t,r)}while(Ma);return a}function Ba(){var e=U.H,n=e.useState()[0];return n="function"==typeof n.then?Ga(n):n,e=e.useState()[0],(null!==_a?_a.memoizedState:null)!==e&&(Ta.flags|=1024),n}function Wa(){var e=0!==Aa;return Aa=0,e}function qa(e,n,t){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~t}function Ka(e){if(Da){for(e=e.memoizedState;null!==e;){var n=e.queue;null!==n&&(n.pending=null),e=e.next}Da=!1}La=0,Fa=_a=Ta=null,Ma=!1,Ra=Aa=0,Ia=null}function Ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Fa?Ta.memoizedState=Fa=e:Fa=Fa.next=e,Fa}function Xa(){if(null===_a){var e=Ta.alternate;e=null!==e?e.memoizedState:null}else e=_a.next;var n=null===Fa?Ta.memoizedState:Fa.next;if(null!==n)Fa=n,_a=e;else{if(null===e){if(null===Ta.alternate)throw Error(c(467));throw Error(c(310))}e={memoizedState:(_a=e).memoizedState,baseState:_a.baseState,baseQueue:_a.baseQueue,queue:_a.queue,next:null},null===Fa?Ta.memoizedState=Fa=e:Fa=Fa.next=e}return Fa}function Ga(e){var n=Ra;return Ra+=1,null===Ia&&(Ia=[]),e=ia(Ia,e,n),n=Ta,null===(null===Fa?n.memoizedState:Fa.next)&&(n=n.alternate,U.H=null===n||null===n.memoizedState?lu:au),e}function Za(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return Ga(e);if(e.$$typeof===z)return Al(e)}throw Error(c(438,String(e)))}function Ja(e){var n=null,t=Ta.updateQueue;if(null!==t&&(n=t.memoCache),null==n){var r=Ta.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(n={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==n&&(n={data:[],index:0}),null===t&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Ta.updateQueue=t),t.memoCache=n,void 0===(t=n.data[n.index]))for(t=n.data[n.index]=Array(e),r=0;r<e;r++)t[r]=D;return n.index++,t}function eo(e,n){return"function"==typeof n?n(e):n}function no(e){return to(Xa(),_a,e)}function to(e,n,t){var r=e.queue;if(null===r)throw Error(c(311));r.lastRenderedReducer=t;var l=e.baseQueue,a=r.pending;if(null!==a){if(null!==l){var o=l.next;l.next=a.next,a.next=o}n.baseQueue=l=a,r.pending=null}if(a=e.baseState,null===l)e.memoizedState=a;else{var u=o=null,i=null,s=n=l.next,f=!1;do{var d=-536870913&s.lane;if(d!==s.lane?(ws&d)===d:(La&d)===d){var p=s.revertLane;if(0===p)null!==i&&(i=i.next={lane:0,revertLane:0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),d===ql&&(f=!0);else{if((La&p)===p){s=s.next,p===ql&&(f=!0);continue}d={lane:0,revertLane:s.revertLane,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},null===i?(u=i=d,o=a):i=i.next=d,Ta.lanes|=p,Ls|=p}d=s.action,Oa&&t(a,d),a=s.hasEagerState?s.eagerState:t(a,d)}else p={lane:d,revertLane:s.revertLane,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}
vendor: 5,133 bytes, line 42
42,null===i?(u=i=p,o=a):i=i.next=p,Ta.lanes|=d,Ls|=d;s=s.next}while(null!==s&&s!==n);if(null===i?o=a:i.next=u,!ar(a,e.memoizedState)&&(ju=!0,f&&null!==(t=Kl)))throw t;e.memoizedState=a,e.baseState=o,e.baseQueue=i,r.lastRenderedState=a}return null===l&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ro(e){var n=Xa(),t=n.queue;if(null===t)throw Error(c(311));t.lastRenderedReducer=e;var r=t.dispatch,l=t.pending,a=n.memoizedState;if(null!==l){t.pending=null;var o=l=l.next;do{a=e(a,o.action),o=o.next}while(o!==l);ar(a,n.memoizedState)||(ju=!0),n.memoizedState=a,null===n.baseQueue&&(n.baseState=a),t.lastRenderedState=a}return[a,r]}function lo(e,n,t){var r=Ta,l=Xa(),a=hl;if(a){if(void 0===t)throw Error(c(407));t=t()}else t=n();var o=!ar((_a||l).memoizedState,t);if(o&&(l.memoizedState=t,ju=!0),l=l.queue,Lo(2048,8,uo.bind(null,r,l,e),[e]),l.getSnapshot!==n||o||null!==Fa&&1&Fa.memoizedState.tag){if(r.flags|=2048,Co(9,zo(),oo.bind(null,r,l,t,n),null),null===bs)throw Error(c(349));a||124&La||ao(r,n,t)}return t}function ao(e,n,t){e.flags|=16384,e={getSnapshot:n,value:t},null===(n=Ta.updateQueue)?(n={lastEffect:null,events:null,stores:null,memoCache:null},Ta.updateQueue=n,n.stores=[e]):null===(t=n.stores)?n.stores=[e]:t.push(e)}function oo(e,n,t,r){n.value=t,n.getSnapshot=r,io(n)&&so(e)}function uo(e,n,t){return t(function(){io(n)&&so(e)})}function io(e){var n=e.getSnapshot;e=e.value;try{var t=n();return!ar(e,t)}catch(e){return!0}}function so(e){var n=Vr(e,2);null!==n&&Zs(n,e,2)}function co(e){var n=Ya();if("function"==typeof e){var t=e;if(e=t(),Oa){ve(!0);try{t()}finally{ve(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:e},n}function fo(e,n,t,r){return e.baseState=t,to(e,_a,"function"==typeof r?r:eo)}function po(e,n,t,r,l){if(eu(e))throw Error(c(485));if(null!==(e=n.action)){var a={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};null!==U.T?t(!0):a.isTransition=!1,r(a),null===(t=n.pending)?(a.next=n.pending=a,mo(n,a)):(a.next=t.next,n.pending=t.next=a)}}function mo(e,n){var t=n.action,r=n.payload,l=e.state;if(n.isTransition){var a=U.T,o={};U.T=o;try{var u=t(l,r),i=U.S;null!==i&&i(o,u),ho(e,n,u)}catch(t){vo(e,n,t)}finally{U.T=a}}else try{ho(e,n,a=t(l,r))}catch(t){vo(e,n,t)}}function ho(e,n,t){null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(function(t){go(e,n,t)},function(t){return vo(e,n,t)}):go(e,n,t)}function go(e,n,t){n.status="fulfilled",n.value=t,yo(n),e.state=t,null!==(n=e.pending)&&((t=n.next)===n?e.pending=null:(t=t.next,n.next=t,mo(e,t)))}function vo(e,n,t){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{n.status="rejected",n.reason=t,yo(n),n=n.next}while(n!==r)}e.action=null}function yo(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function bo(e,n){return n}function ko(e,n){if(hl){var t=bs.formState;if(null!==t){e:{var r=Ta;if(hl){if(ml){n:{for(var l=ml,a=vl;8!==l.nodeType;){if(!a){l=null;break n}if(null===(l=Vf(l.nextSibling))){l=null;break n}}l="F!"===(a=l.data)||"F"===a?l:null}if(l){ml=Vf(l.nextSibling),r="F!"===l.data;break e}}bl(r)}r=!1}r&&(n=t[0])}}return(t=Ya()).memoizedState=t.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bo,lastRenderedState:n},t.queue=r,t=Go.bind(null,Ta,r),r.dispatch=t,r=co(!1),a=Jo.bind(null,Ta,!1,r.queue),l={state:n,dispatch:null,action:e,pending:null},(r=Ya()).queue=l,t=po.bind(null,Ta,l,a,t),l.dispatch=t,r.memoizedState=e,[n,t,!1]}function wo(e){return So(Xa(),_a,e)}function So(e,n,t){if(n=to(e,n,bo)[0],e=no(eo)[0],"object"==typeof n&&null!==n&&"function"==typeof n.then)try{var r=Ga(n)}catch(e){if(e===ta)throw la;throw e}else r=n;var l=(n=Xa()).queue,a=l.dispatch;return t!==n.memoizedState&&(Ta.flags|=2048,Co(9,zo(),Eo.bind(null,l,t),null)),[r,a,e]}function Eo(e,n){e.action=n}function xo(e){var n=Xa(),t=_a;if(null!==t)return So(n,t,e);Xa(),n=n.memoizedState;var r=(t=Xa()).queue.dispatch;return t.memoizedState=e,[n,r,!1]}function Co(e,n,t,r){return e={tag:e,create:t,deps:r,inst:n,next:null},null===(n=Ta.updateQueue)&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Ta.updateQueue=n),null===(t=n.lastEffect)?n.lastEffect=e.next=e:(r=t.next,t.next=e,e.next=r,n.lastEffect=e),e}function zo(){return{destroy:void 0,resource:void 0}}function Po(){return Xa().memoizedState}function No(e,n,t,r){var l=Ya();r=void 0===r?null:r,Ta.flags|=e,l.memoizedState=Co(1|n,{destroy:void 0,resource:void 0},t,r)}function Lo(e,n,t,r){var l=Xa();r=void 0===r?null:r;var a=l.memoizedState.inst;null!==_a&&null!==r&&Va(r,_a.memoizedState.deps)?l.memoizedState=Co(n,a,t,r):(Ta.flags|=e,l.memoizedState=Co(1|n,a,t,r))}function To(e,n){No(8390656,8,e,n)}function _o(e,n){Lo(2048,8,e,n)}function Fo(e,n){return Lo(4,2,e,n)}function Do(e,n){return Lo(4,4,e,n)}function Mo(e,n){if("function"==typeof n){e=e();var t=n(e);return function(){"function"==typeof t?t():n(null)}}if(null!=n)return e=e(),n.current=e,function(){n.current=null}}function Oo(e,n,t){t=null!=t?t.concat([e]):null,Lo(4,4,Mo.bind(null,n,e),t)}function Ao(){}
vendor: 28,267 bytes, line 42
42function Ro(e,n){var t=Xa();n=void 0===n?null:n;var r=t.memoizedState;return null!==n&&Va(n,r[1])?r[0]:(t.memoizedState=[e,n],e)}function Io(e,n){var t=Xa();n=void 0===n?null:n;var r=t.memoizedState;if(null!==n&&Va(n,r[1]))return r[0];if(r=e(),Oa){ve(!0);try{e()}finally{ve(!1)}}return t.memoizedState=[r,n],r}function Uo(e,n,t){return void 0===t||1073741824&La?e.memoizedState=n:(e.memoizedState=t,e=Gs(),Ta.lanes|=e,Ls|=e,t)}function jo(e,n,t,r){return ar(t,n)?t:null!==xa.current?(e=Uo(e,t,r),ar(e,n)||(ju=!0),e):42&La?(e=Gs(),Ta.lanes|=e,Ls|=e,n):(ju=!0,e.memoizedState=t)}function Vo(e,n,t,r,l){var a=j.p;j.p=0!==a&&8>a?a:8;var o,u,i,s=U.T,c={};U.T=c,Jo(e,!1,n,t);try{var f=l(),d=U.S;if(null!==d&&d(c,f),null!==f&&"object"==typeof f&&"function"==typeof f.then)Zo(e,n,(o=r,u=[],i={status:"pending",value:null,reason:null,then:function(e){u.push(e)}},f.then(function(){i.status="fulfilled",i.value=o;for(var e=0;e<u.length;e++)(0,u[e])(o)},function(e){for(i.status="rejected",i.reason=e,e=0;e<u.length;e++)(0,u[e])(void 0)}),i),Xs());else Zo(e,n,r,Xs())}catch(t){Zo(e,n,{then:function(){},status:"rejected",reason:t},Xs())}finally{j.p=a,U.T=s}}function Ho(){}function Qo(e,n,t,r){if(5!==e.tag)throw Error(c(476));var l=$o(e).queue;Vo(e,l,n,V,null===t?Ho:function(){return Bo(e),t(r)})}function $o(e){var n=e.memoizedState;if(null!==n)return n;var t={};return(n={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:V},next:null}).next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:t},next:null},e.memoizedState=n,null!==(e=e.alternate)&&(e.memoizedState=n),n}function Bo(e){Zo(e,$o(e).next.queue,{},Xs())}function Wo(){return Al(wd)}function qo(){return Xa().memoizedState}function Ko(){return Xa().memoizedState}function Yo(e){for(var n=e.return;null!==n;){switch(n.tag){case 24:case 3:var t=Xs(),r=ga(n,e=ha(t),t);return null!==r&&(Zs(r,n,t),va(r,n,t)),n={cache:Ql()},void(e.payload=n)}n=n.return}}function Xo(e,n,t){var r=Xs();t={lane:r,revertLane:0,action:t,hasEagerState:!1,eagerState:null,next:null},eu(e)?nu(n,t):null!==(t=jr(e,n,t,r))&&(Zs(t,e,r),tu(t,n,r))}function Go(e,n,t){Zo(e,n,t,Xs())}function Zo(e,n,t,r){var l={lane:r,revertLane:0,action:t,hasEagerState:!1,eagerState:null,next:null};if(eu(e))nu(n,l);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=n.lastRenderedReducer))try{var o=n.lastRenderedState,u=a(o,t);if(l.hasEagerState=!0,l.eagerState=u,ar(u,o))return Ur(e,n,l,0),null===bs&&Ir(),!1}catch(e){}if(null!==(t=jr(e,n,l,r)))return Zs(t,e,r),tu(t,n,r),!0}return!1}function Jo(e,n,t,r){if(r={lane:2,revertLane:Wc(),action:r,hasEagerState:!1,eagerState:null,next:null},eu(e)){if(n)throw Error(c(479))}else null!==(n=jr(e,t,r,2))&&Zs(n,e,2)}function eu(e){var n=e.alternate;return e===Ta||null!==n&&n===Ta}function nu(e,n){Ma=Da=!0;var t=e.pending;null===t?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function tu(e,n,t){if(4194048&t){var r=n.lanes;t|=r&=e.pendingLanes,n.lanes=t,De(e,t)}}var ru={readContext:Al,use:Za,useCallback:ja,useContext:ja,useEffect:ja,useImperativeHandle:ja,useLayoutEffect:ja,useInsertionEffect:ja,useMemo:ja,useReducer:ja,useRef:ja,useState:ja,useDebugValue:ja,useDeferredValue:ja,useTransition:ja,useSyncExternalStore:ja,useId:ja,useHostTransitionStatus:ja,useFormState:ja,useActionState:ja,useOptimistic:ja,useMemoCache:ja,useCacheRefresh:ja},lu={readContext:Al,use:Za,useCallback:function(e,n){return Ya().memoizedState=[e,void 0===n?null:n],e},useContext:Al,useEffect:To,useImperativeHandle:function(e,n,t){t=null!=t?t.concat([e]):null,No(4194308,4,Mo.bind(null,n,e),t)},useLayoutEffect:function(e,n){return No(4194308,4,e,n)},useInsertionEffect:function(e,n){No(4,2,e,n)},useMemo:function(e,n){var t=Ya();n=void 0===n?null:n;var r=e();if(Oa){ve(!0);try{e()}finally{ve(!1)}}return t.memoizedState=[r,n],r},useReducer:function(e,n,t){var r=Ya();if(void 0!==t){var l=t(n);if(Oa){ve(!0);try{t(n)}finally{ve(!1)}}}else l=n;return r.memoizedState=r.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},r.queue=e,e=e.dispatch=Xo.bind(null,Ta,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ya().memoizedState=e},useState:function(e){var n=(e=co(e)).queue,t=Go.bind(null,Ta,n);return n.dispatch=t,[e.memoizedState,t]},useDebugValue:Ao,useDeferredValue:function(e,n){return Uo(Ya(),e,n)},useTransition:function(){var e=co(!1);return e=Vo.bind(null,Ta,e.queue,!0,!1),Ya().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,t){var r=Ta,l=Ya();if(hl){if(void 0===t)throw Error(c(407));t=t()}else{if(t=n(),null===bs)throw Error(c(349));124&ws||ao(r,n,t)}l.memoizedState=t;var a={value:t,getSnapshot:n};return l.queue=a,To(uo.bind(null,r,a,e),[e]),r.flags|=2048,Co(9,{destroy:void 0,resource:void 0},oo.bind(null,r,a,t,n),null),t},useId:function(){var e=Ya(),n=bs.identifierPrefix;if(hl){var t=il;n="\xab"+n+"R"+(t=(ul&~(1<<32-ye(ul)-1)).toString(32)+t),0<(t=Aa++)&&(n+="H"+t.toString(32)),n+="\xbb"}else n="\xab"+n+"r"+(t=Ua++).toString(32)+"\xbb";return e.memoizedState=n},useHostTransitionStatus:Wo,useFormState:ko,useActionState:ko,useOptimistic:function(e){var n=Ya();n.memoizedState=n.baseState=e;var t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=t,n=Jo.bind(null,Ta,!0,t),t.dispatch=n,[e,n]},useMemoCache:Ja,useCacheRefresh:function(){return Ya().memoizedState=Yo.bind(null,Ta)}},au={readContext:Al,use:Za,useCallback:Ro,useContext:Al,useEffect:_o,useImperativeHandle:Oo,useInsertionEffect:Fo,useLayoutEffect:Do,useMemo:Io,useReducer:no,useRef:Po,useState:function(){return no(eo)},useDebugValue:Ao,useDeferredValue:function(e,n){return jo(Xa(),_a.memoizedState,e,n)},useTransition:function(){var e=no(eo)[0],n=Xa().memoizedState;return["boolean"==typeof e?e:Ga(e),n]},useSyncExternalStore:lo,useId:qo,useHostTransitionStatus:Wo,useFormState:wo,useActionState:wo,useOptimistic:function(e,n){return fo(Xa(),0,e,n)},useMemoCache:Ja,useCacheRefresh:Ko},ou={readContext:Al,use:Za,useCallback:Ro,useContext:Al,useEffect:_o,useImperativeHandle:Oo,useInsertionEffect:Fo,useLayoutEffect:Do,useMemo:Io,useReducer:ro,useRef:Po,useState:function(){return ro(eo)},useDebugValue:Ao,useDeferredValue:function(e,n){var t=Xa();return null===_a?Uo(t,e,n):jo(t,_a.memoizedState,e,n)},useTransition:function(){var e=ro(eo)[0],n=Xa().memoizedState;return["boolean"==typeof e?e:Ga(e),n]},useSyncExternalStore:lo,useId:qo,useHostTransitionStatus:Wo,useFormState:xo,useActionState:xo,useOptimistic:function(e,n){var t=Xa();return null!==_a?fo(t,0,e,n):(t.baseState=e,[e,t.queue.dispatch])},useMemoCache:Ja,useCacheRefresh:Ko},uu=null,iu=0;function su(e){var n=iu;return iu+=1,null===uu&&(uu=[]),ia(uu,e,n)}function cu(e,n){n=n.props.ref,e.ref=void 0!==n?n:null}function fu(e,n){if(n.$$typeof===y)throw Error(c(525));throw e=Object.prototype.toString.call(n),Error(c(31,"[object Object]"===e?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function du(e){return(0,e._init)(e._payload)}function pu(e){function n(n,t){if(e){var r=n.deletions;null===r?(n.deletions=[t],n.flags|=16):r.push(t)}}function t(t,r){if(!e)return null;for(;null!==r;)n(t,r),r=r.sibling;return null}function r(e){for(var n=new Map;null!==e;)null!==e.key?n.set(e.key,e):n.set(e.index,e),e=e.sibling;return n}function l(e,n){return(e=Kr(e,n)).index=0,e.sibling=null,e}function a(n,t,r){return n.index=r,e?null!==(r=n.alternate)?(r=r.index)<t?(n.flags|=67108866,t):r:(n.flags|=67108866,t):(n.flags|=1048576,t)}function o(n){return e&&null===n.alternate&&(n.flags|=67108866),n}function u(e,n,t,r){return null===n||6!==n.tag?((n=Zr(t,e.mode,r)).return=e,n):((n=l(n,t)).return=e,n)}function i(e,n,t,r){var a=t.type;return a===w?f(e,n,t.props.children,r,t.key):null!==n&&(n.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===_&&du(a)===n.type)?(cu(n=l(n,t.props),t),n.return=e,n):(cu(n=Xr(t.type,t.key,t.props,null,e.mode,r),t),n.return=e,n)}function s(e,n,t,r){return null===n||4!==n.tag||n.stateNode.containerInfo!==t.containerInfo||n.stateNode.implementation!==t.implementation?((n=Jr(t,e.mode,r)).return=e,n):((n=l(n,t.children||[])).return=e,n)}function f(e,n,t,r,a){return null===n||7!==n.tag?((n=Gr(t,e.mode,r,a)).return=e,n):((n=l(n,t)).return=e,n)}function d(e,n,t){if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return(n=Zr(""+n,e.mode,t)).return=e,n;if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return cu(t=Xr(n.type,n.key,n.props,null,e.mode,t),n),t.return=e,t;case k:return(n=Jr(n,e.mode,t)).return=e,n;case _:return d(e,n=(0,n._init)(n._payload),t)}if(I(n)||O(n))return(n=Gr(n,e.mode,t,null)).return=e,n;if("function"==typeof n.then)return d(e,su(n),t);if(n.$$typeof===z)return d(e,Rl(e,n),t);fu(e,n)}return null}function p(e,n,t,r){var l=null!==n?n.key:null;if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return null!==l?null:u(e,n,""+t,r);if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return t.key===l?i(e,n,t,r):null;case k:return t.key===l?s(e,n,t,r):null;case _:return p(e,n,t=(l=t._init)(t._payload),r)}if(I(t)||O(t))return null!==l?null:f(e,n,t,r,null);if("function"==typeof t.then)return p(e,n,su(t),r);if(t.$$typeof===z)return p(e,n,Rl(e,t),r);fu(e,t)}return null}function m(e,n,t,r,l){if("string"==typeof r&&""!==r||"number"==typeof r||"bigint"==typeof r)return u(n,e=e.get(t)||null,""+r,l);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return i(n,e=e.get(null===r.key?t:r.key)||null,r,l);case k:return s(n,e=e.get(null===r.key?t:r.key)||null,r,l);case _:return m(e,n,t,r=(0,r._init)(r._payload),l)}if(I(r)||O(r))return f(n,e=e.get(t)||null,r,l,null);if("function"==typeof r.then)return m(e,n,t,su(r),l);if(r.$$typeof===z)return m(e,n,t,Rl(n,r),l);fu(n,r)}return null}function h(l,o,u,i){for(var s=null,c=null,f=o,h=o=0,g=null;null!==f&&h<u.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var v=p(l,f,u[h],i);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&n(l,f),o=a(v,o,h),null===c?s=v:c.sibling=v,c=v,f=g}if(h===u.length)return t(l,f),hl&&sl(l,h),s;if(null===f){for(;h<u.length;h++)null!==(f=d(l,u[h],i))&&(o=a(f,o,h),null===c?s=f:c.sibling=f,c=f);return hl&&sl(l,h),s}for(f=r(f);h<u.length;h++)null!==(g=m(f,l,h,u[h],i))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),o=a(g,o,h),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach(function(e){return n(l,e)}),hl&&sl(l,h),s}function g(l,o,u,i){if(null==u)throw Error(c(151));for(var s=null,f=null,h=o,g=o=0,v=null,y=u.next();null!==h&&!y.done;g++,y=u.next()){h.index>g?(v=h,h=null):v=h.sibling;var b=p(l,h,y.value,i);if(null===b){null===h&&(h=v);break}e&&h&&null===b.alternate&&n(l,h),o=a(b,o,g),null===f?s=b:f.sibling=b,f=b,h=v}if(y.done)return t(l,h),hl&&sl(l,g),s;if(null===h){for(;!y.done;g++,y=u.next())null!==(y=d(l,y.value,i))&&(o=a(y,o,g),null===f?s=y:f.sibling=y,f=y);return hl&&sl(l,g),s}for(h=r(h);!y.done;g++,y=u.next())null!==(y=m(h,l,g,y.value,i))&&(e&&null!==y.alternate&&h.delete(null===y.key?g:y.key),o=a(y,o,g),null===f?s=y:f.sibling=y,f=y);return e&&h.forEach(function(e){return n(l,e)}),hl&&sl(l,g),s}function v(e,r,a,u){if("object"==typeof a&&null!==a&&a.type===w&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case b:e:{for(var i=a.key;null!==r;){if(r.key===i){if((i=a.type)===w){if(7===r.tag){t(e,r.sibling),(u=l(r,a.props.children)).return=e,e=u;break e}}else if(r.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===_&&du(i)===r.type){t(e,r.sibling),cu(u=l(r,a.props),a),u.return=e,e=u;break e}t(e,r);break}n(e,r),r=r.sibling}a.type===w?((u=Gr(a.props.children,e.mode,u,a.key)).return=e,e=u):(cu(u=Xr(a.type,a.key,a.props,null,e.mode,u),a),u.return=e,e=u)}return o(e);case k:e:{for(i=a.key;null!==r;){if(r.key===i){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){t(e,r.sibling),(u=l(r,a.children||[])).return=e,e=u;break e}t(e,r);break}n(e,r),r=r.sibling}(u=Jr(a,e.mode,u)).return=e,e=u}return o(e);case _:return v(e,r,a=(i=a._init)(a._payload),u)}if(I(a))return h(e,r,a,u);if(O(a)){if("function"!=typeof(i=O(a)))throw Error(c(150));return g(e,r,a=i.call(a),u)}if("function"==typeof a.then)return v(e,r,su(a),u);if(a.$$typeof===z)return v(e,r,Rl(e,a),u);fu(e,a)}return"string"==typeof a&&""!==a||"number"==typeof a||"bigint"==typeof a?(a=""+a,null!==r&&6===r.tag?(t(e,r.sibling),(u=l(r,a)).return=e,e=u):(t(e,r),(u=Zr(a,e.mode,u)).return=e,e=u),o(e)):t(e,r)}return function(e,n,t,r){try{iu=0;var l=v(e,n,t,r);return uu=null,l}catch(n){if(n===ta||n===la)throw n;var a=Wr(29,n,null,e.mode);return a.lanes=r,a.return=e,a}}}var mu=pu(!0),hu=pu(!1),gu=$(null),vu=null;function yu(e){var n=e.alternate;W(Su,1&Su.current),W(gu,e),null===vu&&(null===n||null!==xa.current||null!==n.memoizedState)&&(vu=e)}function bu(e){if(22===e.tag){if(W(Su,Su.current),W(gu,e),null===vu){var n=e.alternate;null!==n&&null!==n.memoizedState&&(vu=e)}}else ku()}function ku(){W(Su,Su.current),W(gu,gu.current)}function wu(e){B(gu),vu===e&&(vu=null),B(Su)}var Su=$(0);function Eu(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||"$?"===t.data||Uf(t)))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(128&n.flags)return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function xu(e,n,t,r){t=null==(t=t(r,n=e.memoizedState))?n:v({},n,t),e.memoizedState=t,0===e.lanes&&(e.updateQueue.baseState=t)}var Cu={enqueueSetState:function(e,n,t){e=e._reactInternals;var r=Xs(),l=ha(r);l.payload=n,null!=t&&(l.callback=t),null!==(n=ga(e,l,r))&&(Zs(n,e,r),va(n,e,r))},enqueueReplaceState:function(e,n,t){e=e._reactInternals;var r=Xs(),l=ha(r);l.tag=1,l.payload=n,null!=t&&(l.callback=t),null!==(n=ga(e,l,r))&&(Zs(n,e,r),va(n,e,r))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var t=Xs(),r=ha(t);r.tag=2,null!=n&&(r.callback=n),null!==(n=ga(e,r,t))&&(Zs(n,e,t),va(n,e,t))}};function zu(e,n,t,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!n.prototype||!n.prototype.isPureReactComponent||(!or(t,r)||!or(l,a))}function Pu(e,n,t,r){e=n.state,"function"==typeof n.componentWillReceiveProps&&n.componentWillReceiveProps(t,r),"function"==typeof n.UNSAFE_componentWillReceiveProps&&n.UNSAFE_componentWillReceiveProps(t,r),n.state!==e&&Cu.enqueueReplaceState(n,n.state,null)}function Nu(e,n){var t=n;if("ref"in n)for(var r in t={},n)"ref"!==r&&(t[r]=n[r]);if(e=e.defaultProps)for(var l in t===n&&(t=v({},t)),e)void 0===t[l]&&(t[l]=e[l]);return t}var Lu="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function Tu(e){Lu(e)}function _u(e){console.error(e)}function Fu(e){Lu(e)}function Du(e,n){try{(0,e.onUncaughtError)(n.value,{componentStack:n.stack})}catch(e){setTimeout(function(){throw e})}}function Mu(e,n,t){try{(0,e.onCaughtError)(t.value,{componentStack:t.stack,errorBoundary:1===n.tag?n.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ou(e,n,t){return(t=ha(t)).tag=3,t.payload={element:null},t.callback=function(){Du(e,n)},t}function Au(e){return(e=ha(e)).tag=3,e}function Ru(e,n,t,r){var l=t.type.getDerivedStateFromError;if("function"==typeof l){var a=r.value;e.payload=function(){return l(a)},e.callback=function(){Mu(n,t,r)}}var o=t.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){Mu(n,t,r),"function"!=typeof l&&(null===js?js=new Set([this]):js.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}function Iu(e,n,t,r,l){if(t.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(n=t.alternate)&&Dl(n,t,l,!0),null!==(t=gu.current)){switch(t.tag){case 13:return null===vu?sc():null===t.alternate&&0===Ns&&(Ns=3),t.flags&=-257,t.flags|=65536,t.lanes=l,r===aa?t.flags|=16384:(null===(n=t.updateQueue)?t.updateQueue=new Set([r]):n.add(r),Nc(e,r,l)),!1;case 22:return t.flags|=65536,r===aa?t.flags|=16384:(null===(n=t.updateQueue)?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},t.updateQueue=n):null===(t=n.retryQueue)?n.retryQueue=new Set([r]):t.add(r),Nc(e,r,l)),!1}throw Error(c(435,t.tag))}return Nc(e,r,l),sc(),!1}if(hl)return null!==(n=gu.current)?(!(65536&n.flags)&&(n.flags|=256),n.flags|=65536,n.lanes=l,r!==yl&&Cl(Mr(e=Error(c(422),{cause:r}),t))):(r!==yl&&Cl(Mr(n=Error(c(423),{cause:r}),t)),(e=e.current.alternate).flags|=65536,l&=-l,e.lanes|=l,r=Mr(r,t),ya(e,l=Ou(e.stateNode,r,l)),4!==Ns&&(Ns=2)),!1;var a=Error(c(520),{cause:r});if(a=Mr(a,t),null===Ms?Ms=[a]:Ms.push(a),4!==Ns&&(Ns=2),null===n)return!0;r=Mr(r,t),t=n;do{switch(t.tag){case 3:return t.flags|=65536,e=l&-l,t.lanes|=e,ya(t,e=Ou(t.stateNode,r,e)),!1;case 1:if(n=t.type,a=t.stateNode,!(128&t.flags||"function"!=typeof n.getDerivedStateFromError&&(null===a||"function"!=typeof a.componentDidCatch||null!==js&&js.has(a))))return t.flags|=65536,l&=-l,t.lanes|=l,Ru(l=Au(l),e,t,r),ya(t,l),!1}t=t.return}while(null!==t);return!1}var Uu=Error(c(461)),ju=!1;function Vu(e,n,t,r){n.child=null===e?hu(n,null,t,r):mu(n,e.child,t,r)}function Hu(e,n,t,r,l){t=t.render;var a=n.ref;if("ref"in r){var o={};for(var u in r)"ref"!==u&&(o[u]=r[u])}else o=r;return Ol(n),r=Ha(e,n,t,o,a,l),u=Wa(),null===e||ju?(hl&&u&&fl(n),n.flags|=1,Vu(e,n,r,l),n.child):(qa(e,n,l),ii(e,n,l))}function Qu(e,n,t,r,l){if(null===e){var a=t.type;return"function"!=typeof a||qr(a)||void 0!==a.defaultProps||null!==t.compare?((e=Xr(t.type,null,r,n,n.mode,l)).ref=n.ref,e.return=n,n.child=e):(n.tag=15,n.type=a,$u(e,n,a,r,l))}if(a=e.child,!si(e,l)){var o=a.memoizedProps;if((t=null!==(t=t.compare)?t:or)(o,r)&&e.ref===n.ref)return ii(e,n,l)}return n.flags|=1,(e=Kr(a,r)).ref=n.ref,e.return=n,n.child=e}function $u(e,n,t,r,l){if(null!==e){var a=e.memoizedProps;if(or(a,r)&&e.ref===n.ref){if(ju=!1,n.pendingProps=r=a,!si(e,l))return n.lanes=e.lanes,ii(e,n,l);131072&e.flags&&(ju=!0)}}return Ku(e,n,t,r,l)}function Bu(e,n,t){var r=n.pendingProps,l=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode){if(128&n.flags){if(r=null!==a?a.baseLanes|t:t,null!==e){for(l=n.child=e.child,a=0;null!==l;)a=a|l.lanes|l.childLanes,l=l.sibling;n.childLanes=a&~r}else n.childLanes=0,n.child=null;return Wu(e,n,r,t)}if(!(536870912&t))return n.lanes=n.childLanes=536870912,Wu(e,n,null!==a?a.baseLanes|t:t,t);n.memoizedState={baseLanes:0,cachePool:null},null!==e&&ea(0,null!==a?a.cachePool:null),null!==a?za(n,a):Pa(),bu(n)}else null!==a?(ea(0,a.cachePool),za(n,a),ku(),n.memoizedState=null):(null!==e&&ea(0,null),Pa(),ku());return Vu(e,n,l,t),n.child}function Wu(e,n,t,r){var l=Jl();return l=null===l?null:{parent:Hl._currentValue,pool:l},n.memoizedState={baseLanes:t,cachePool:l},null!==e&&ea(0,null),Pa(),bu(n),null!==e&&Dl(e,n,r,!0),null}function qu(e,n){var t=n.ref;if(null===t)null!==e&&null!==e.ref&&(n.flags|=4194816);else{if("function"!=typeof t&&"object"!=typeof t)throw Error(c(284));null!==e&&e.ref===t||(n.flags|=4194816)}}function Ku(e,n,t,r,l){return Ol(n),t=Ha(e,n,t,r,void 0,l),r=Wa(),null===e||ju?(hl&&r&&fl(n),n.flags|=1,Vu(e,n,t,l),n.child):(qa(e,n,l),ii(e,n,l))}function Yu(e,n,t,r,l,a){return Ol(n),n.updateQueue=null,t=$a(n,r,t,l),Qa(e),r=Wa(),null===e||ju?(hl&&r&&fl(n),n.flags|=1,Vu(e,n,t,a),n.child):(qa(e,n,a),ii(e,n,a))}function Xu(e,n,t,r,l){if(Ol(n),null===n.stateNode){var a=$r,o=t.contextType;"object"==typeof o&&null!==o&&(a=Al(o)),a=new t(r,a),n.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Cu,n.stateNode=a,a._reactInternals=n,(a=n.stateNode).props=r,a.state=n.memoizedState,a.refs={},pa(n),o=t.contextType,a.context="object"==typeof o&&null!==o?Al(o):$r,a.state=n.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(xu(n,t,o,r),a.state=n.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&Cu.enqueueReplaceState(a,a.state,null),wa(n,r,a,l),ka(),a.state=n.memoizedState),"function"==typeof a.componentDidMount&&(n.flags|=4194308),r=!0}else if(null===e){a=n.stateNode;var u=n.memoizedProps,i=Nu(t,u);a.props=i;var s=a.context,c=t.contextType;o=$r,"object"==typeof c&&null!==c&&(o=Al(c));var f=t.getDerivedStateFromProps;c="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate,u=n.pendingProps!==u,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u||s!==o)&&Pu(n,a,r,o),da=!1;var d=n.memoizedState;a.state=d,wa(n,r,a,l),ka(),s=n.memoizedState,u||d!==s||da?("function"==typeof f&&(xu(n,t,f,r),s=n.memoizedState),(i=da||zu(n,t,i,r,d,s,o))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(n.flags|=4194308)):("function"==typeof a.componentDidMount&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=s),a.props=r,a.state=s,a.context=o,r=i):("function"==typeof a.componentDidMount&&(n.flags|=4194308),r=!1)}else{a=n.stateNode,ma(e,n),c=Nu(t,o=n.memoizedProps),a.props=c,f=n.pendingProps,d=a.context,s=t.contextType,i=$r,"object"==typeof s&&null!==s&&(i=Al(s)),(s="function"==typeof(u=t.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==f||d!==i)&&Pu(n,a,r,i),da=!1,d=n.memoizedState,a.state=d,wa(n,r,a,l),ka();var p=n.memoizedState;o!==f||d!==p||da||null!==e&&null!==e.dependencies&&Ml(e.dependencies)?("function"==typeof u&&(xu(n,t,u,r),p=n.memoizedState),(c=da||zu(n,t,c,r,d,p,i)||null!==e&&null!==e.dependencies&&Ml(e.dependencies))?(s||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,i),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,i)),"function"==typeof a.componentDidUpdate&&(n.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(n.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=p),a.props=r,a.state=p,a.context=i,r=c):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(n.flags|=1024),r=!1)}return a=r,qu(e,n),r=!!(128&n.flags),a||r?(a=n.stateNode,t=r&&"function"!=typeof t.getDerivedStateFromError?null:a.render(),n.flags|=1,null!==e&&r?(n.child=mu(n,e.child,null,l),n.child=mu(n,null,t,l)):Vu(e,n,t,l),n.memoizedState=a.state,e=n.child):e=ii(e,n,l),e}function Gu(e,n,t,r){return El(),n.flags|=256,Vu(e,n,t,r),n.child}var Zu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ju(e){return{baseLanes:e,cachePool:na()}}function ei(e,n,t){return e=null!==e?e.childLanes&~t:0,n&&(e|=Fs),e}function ni(e,n,t){var r,l=n.pendingProps,a=!1,o=!!(128&n.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&!!(2&Su.current)),r&&(a=!0,n.flags&=-129),r=!!(32&n.flags),n.flags&=-33,null===e){if(hl){if(a?yu(n):ku(),hl){var u,i=ml;if(u=i){e:{for(u=i,i=vl;8!==u.nodeType;){if(!i){i=null;break e}if(null===(u=Vf(u.nextSibling))){i=null;break e}}i=u}null!==i?(n.memoizedState={dehydrated:i,treeContext:null!==ol?{id:ul,overflow:il}:null,retryLane:536870912,hydrationErrors:null},(u=Wr(18,null,null,0)).stateNode=i,u.return=n,n.child=u,pl=n,ml=null,u=!0):u=!1}u||bl(n)}if(null!==(i=n.memoizedState)&&null!==(i=i.dehydrated))return Uf(i)?n.lanes=32:n.lanes=536870912,null;wu(n)}return i=l.children,l=l.fallback,a?(ku(),i=ri({mode:"hidden",children:i},a=n.mode),l=Gr(l,a,t,null),i.return=n,l.return=n,i.sibling=l,n.child=i,(a=n.child).memoizedState=Ju(t),a.childLanes=ei(e,r,t),n.memoizedState=Zu,l):(yu(n),ti(n,i))}if(null!==(u=e.memoizedState)&&null!==(i=u.dehydrated)){if(o)256&n.flags?(yu(n),n.flags&=-257,n=li(e,n,t)):null!==n.memoizedState?(ku(),n.child=e.child,n.flags|=128,n=null):(ku(),a=l.fallback,i=n.mode,l=ri({mode:"visible",children:l.children},i),(a=Gr(a,i,t,null)).flags|=2,l.return=n,a.return=n,l.sibling=a,n.child=l,mu(n,e.child,null,t),(l=n.child).memoizedState=Ju(t),l.childLanes=ei(e,r,t),n.memoizedState=Zu,n=a);else if(yu(n),Uf(i)){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;r=s,(l=Error(c(419))).stack="",l.digest=r,Cl({value:l,source:null,stack:null}),n=li(e,n,t)}else if(ju||Dl(e,n,t,!1),r=0!==(t&e.childLanes),ju||r){if(null!==(r=bs)&&(0!==(l=0!==((l=42&(l=t&-t)?1:Me(l))&(r.suspendedLanes|t))?0:l)&&l!==u.retryLane))throw u.retryLane=l,Vr(e,l),Zs(r,e,l),Uu;"$?"===i.data||sc(),n=li(e,n,t)}else"$?"===i.data?(n.flags|=192,n.child=e.child,n=null):(e=u.treeContext,ml=Vf(i.nextSibling),pl=n,hl=!0,gl=null,vl=!1,null!==e&&(ll[al++]=ul,ll[al++]=il,ll[al++]=ol,ul=e.id,il=e.overflow,ol=n),(n=ti(n,l.children)).flags|=4096);return n}return a?(ku(),a=l.fallback,i=n.mode,s=(u=e.child).sibling,(l=Kr(u,{mode:"hidden",children:l.children})).subtreeFlags=65011712&u.subtreeFlags,null!==s?a=Kr(s,a):(a=Gr(a,i,t,null)).flags|=2,a.return=n,l.return=n,l.sibling=a,n.child=l,l=a,a=n.child,null===(i=e.child.memoizedState)?i=Ju(t):(null!==(u=i.cachePool)?(s=Hl._currentValue,u=u.parent!==s?{parent:s,pool:s}:u):u=na(),i={baseLanes:i.baseLanes|t,cachePool:u}),a.memoizedState=i,a.childLanes=ei(e,r,t),n.memoizedState=Zu,l):(yu(n),e=(t=e.child).sibling,(t=Kr(t,{mode:"visible",children:l.children})).return=n,t.sibling=null,null!==e&&(null===(r=n.deletions)?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=t,n.memoizedState=null,t)}function ti(e,n){return(n=ri({mode:"visible",children:n},e.mode)).return=e,e.child=n}function ri(e,n){return(e=Wr(22,e,null,n)).lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function li(e,n,t){return mu(n,e.child,null,t),(e=ti(n,n.pendingProps.children)).flags|=2,n.memoizedState=null,e}function ai(e,n,t){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n),_l(e.return,n,t)}function oi(e,n,t,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(a.isBackwards=n,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=t,a.tailMode=l)}function ui(e,n,t){var r=n.pendingProps,l=r.revealOrder,a=r.tail;if(Vu(e,n,r.children,t),2&(r=Su.current))r=1&r|2,n.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=n.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ai(e,t,n);else if(19===e.tag)ai(e,t,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(W(Su,r),l){case"forwards":for(t=n.child,l=null;null!==t;)null!==(e=t.alternate)&&null===Eu(e)&&(l=t),t=t.sibling;null===(t=l)?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),oi(n,!1,l,t,a);break;case"backwards":for(t=null,l=n.child,n.child=null;null!==l;){if(null!==(e=l.alternate)&&null===Eu(e)){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}oi(n,!0,t,null,a);break;case"together":oi(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function ii(e,n,t){if(null!==e&&(n.dependencies=e.dependencies),Ls|
vendor: 7,665 bytes, line 42
42=n.lanes,0===(t&n.childLanes)){if(null===e)return null;if(Dl(e,n,t,!1),0===(t&n.childLanes))return null}if(null!==e&&n.child!==e.child)throw Error(c(153));if(null!==n.child){for(t=Kr(e=n.child,e.pendingProps),n.child=t,t.return=n;null!==e.sibling;)e=e.sibling,(t=t.sibling=Kr(e,e.pendingProps)).return=n;t.sibling=null}return n.child}function si(e,n){return 0!==(e.lanes&n)||!(null===(e=e.dependencies)||!Ml(e))}function ci(e,n,t){switch(n.tag){case 3:G(n,n.stateNode.containerInfo),Ll(0,Hl,e.memoizedState.cache),El();break;case 27:case 5:J(n);break;case 4:G(n,n.stateNode.containerInfo);break;case 10:Ll(0,n.type,n.memoizedProps.value);break;case 13:var r=n.memoizedState;if(null!==r)return null!==r.dehydrated?(yu(n),n.flags|=128,null):0!==(t&n.child.childLanes)?ni(e,n,t):(yu(n),null!==(e=ii(e,n,t))?e.sibling:null);yu(n);break;case 19:var l=!!(128&e.flags);if((r=0!==(t&n.childLanes))||(Dl(e,n,t,!1),r=0!==(t&n.childLanes)),l){if(r)return ui(e,n,t);n.flags|=128}if(null!==(l=n.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),W(Su,Su.current),r)break;return null;case 22:case 23:return n.lanes=0,Bu(e,n,t);case 24:Ll(0,Hl,e.memoizedState.cache)}return ii(e,n,t)}function fi(e,n,t){if(null!==e)if(e.memoizedProps!==n.pendingProps)ju=!0;else{if(!(si(e,t)||128&n.flags))return ju=!1,ci(e,n,t);ju=!!(131072&e.flags)}else ju=!1,hl&&1048576&n.flags&&cl(n,rl,n.index);switch(n.lanes=0,n.tag){case 16:e:{e=n.pendingProps;var r=n.elementType,l=r._init;if(r=l(r._payload),n.type=r,"function"!=typeof r){if(null!=r){if((l=r.$$typeof)===P){n.tag=11,n=Hu(null,n,r,e,t);break e}if(l===T){n.tag=14,n=Qu(null,n,r,e,t);break e}}throw n=R(r)||r,Error(c(306,n,""))}qr(r)?(e=Nu(r,e),n.tag=1,n=Xu(null,n,r,e,t)):(n.tag=0,n=Ku(null,n,r,e,t))}return n;case 0:return Ku(e,n,n.type,n.pendingProps,t);case 1:return Xu(e,n,r=n.type,l=Nu(r,n.pendingProps),t);case 3:e:{if(G(n,n.stateNode.containerInfo),null===e)throw Error(c(387));r=n.pendingProps;var a=n.memoizedState;l=a.element,ma(e,n),wa(n,r,null,t);var o=n.memoizedState;if(r=o.cache,Ll(0,Hl,r),r!==a.cache&&Fl(n,[Hl],t,!0),ka(),r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache},n.updateQueue.baseState=a,n.memoizedState=a,256&n.flags){n=Gu(e,n,r,t);break e}if(r!==l){Cl(l=Mr(Error(c(424)),n)),n=Gu(e,n,r,t);break e}if(9===(e=n.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(ml=Vf(e.firstChild),pl=n,hl=!0,gl=null,vl=!0,t=hu(n,null,r,t),n.child=t;t;)t.flags=-3&t.flags|4096,t=t.sibling}else{if(El(),r===l){n=ii(e,n,t);break e}Vu(e,n,r,t)}n=n.child}return n;case 26:return qu(e,n),null===e?(t=Zf(n.type,null,n.pendingProps,null))?n.memoizedState=t:hl||(t=n.type,e=n.pendingProps,(r=Ef(Y.current).createElement(t))[Ue]=n,r[je]=e,bf(r,t,e),Ze(r),n.stateNode=r):n.memoizedState=Zf(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return J(n),null===e&&hl&&(r=n.stateNode=$f(n.type,n.pendingProps,Y.current),pl=n,vl=!0,l=ml,Mf(n.type)?(Hf=l,ml=Vf(r.firstChild)):ml=l),Vu(e,n,n.pendingProps.children,t),qu(e,n),null===e&&(n.flags|=4194304),n.child;case 5:return null===e&&hl&&((l=r=ml)&&(null!==(r=Rf(r,n.type,n.pendingProps,vl))?(n.stateNode=r,pl=n,ml=Vf(r.firstChild),vl=!1,l=!0):l=!1),l||bl(n)),J(n),l=n.type,a=n.pendingProps,o=null!==e?e.memoizedProps:null,r=a.children,zf(l,a)?r=null:null!==o&&zf(l,o)&&(n.flags|=32),null!==n.memoizedState&&(l=Ha(e,n,Ba,null,null,t),wd._currentValue=l),qu(e,n),Vu(e,n,r,t),n.child;case 6:return null===e&&hl&&((e=t=ml)&&(null!==(t=If(t,n.pendingProps,vl))?(n.stateNode=t,pl=n,ml=null,e=!0):e=!1),e||bl(n)),null;case 13:return ni(e,n,t);case 4:return G(n,n.stateNode.containerInfo),r=n.pendingProps,null===e?n.child=mu(n,null,r,t):Vu(e,n,r,t),n.child;case 11:return Hu(e,n,n.type,n.pendingProps,t);case 7:return Vu(e,n,n.pendingProps,t),n.child;case 8:case 12:return Vu(e,n,n.pendingProps.children,t),n.child;case 10:return r=n.pendingProps,Ll(0,n.type,r.value),Vu(e,n,r.children,t),n.child;case 9:return l=n.type._context,r=n.pendingProps.children,Ol(n),r=r(l=Al(l)),n.flags|=1,Vu(e,n,r,t),n.child;case 14:return Qu(e,n,n.type,n.pendingProps,t);case 15:return $u(e,n,n.type,n.pendingProps,t);case 19:return ui(e,n,t);case 31:return r=n.pendingProps,t=n.mode,r={mode:r.mode,children:r.children},null===e?((t=ri(r,t)).ref=n.ref,n.child=t,t.return=n,n=t):((t=Kr(e.child,r)).ref=n.ref,n.child=t,t.return=n,n=t),n;case 22:return Bu(e,n,t);case 24:return Ol(n),r=Al(Hl),null===e?(null===(l=Jl())&&(l=bs,a=Ql(),l.pooledCache=a,a.refCount++,null!==a&&(l.pooledCacheLanes|=t),l=a),n.memoizedState={parent:r,cache:l},pa(n),Ll(0,Hl,l)):(0!==(e.lanes&t)&&(ma(e,n),wa(n,null,null,t),ka()),l=e.memoizedState,a=n.memoizedState,l.parent!==r?(l={parent:r,cache:r},n.memoizedState=l,0===n.lanes&&(n.memoizedState=n.updateQueue.baseState=l),Ll(0,Hl,r)):(r=a.cache,Ll(0,Hl,r),r!==l.cache&&Fl(n,[Hl],t,!0))),Vu(e,n,n.pendingProps.children,t),n.child;case 29:throw n.pendingProps}throw Error(c(156,n.tag))}function di(e){e.flags|=4}function pi(e,n){if("stylesheet"!==n.type||4&n.state.loading)e.flags&=-16777217;else if(e.flags|=16777216,!dd(n)){if(null!==(n=gu.current)&&((4194048&ws)===ws?null!==vu:(62914560&ws)!==ws&&!(536870912&ws)||n!==vu))throw sa=aa,ra;e.flags|=8192}}function mi(e,n){null!==n&&(e.flags|=4),16384&e.flags&&(n=22!==e.tag?Ne():536870912,e.lanes|=n,Ds|=n)}function hi(e,n){if(!hl)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;null!==n;)null!==n.alternate&&(t=n),n=n.sibling;null===t?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;null!==t;)null!==t.alternate&&(r=t),t=t.sibling;null===r?n||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function gi(e){var n=null!==e.alternate&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;null!==l;)t|=l.lanes|l.childLanes,r|=65011712&l.subtreeFlags,r|=65011712&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function vi(e,n,t){var r=n.pendingProps;switch(dl(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return gi(n),null;case 3:return t=n.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Tl(Hl),Z(),t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null),null!==e&&null!==e.child||(Sl(n)?di(n):null===e||e.memoizedState.isDehydrated&&!(256&n.flags)||(n.flags|=1024,xl())),gi(n),null;case 26:return t=n.memoizedState,null===e?(di(n),null!==t?(gi(n),pi(n,t)):(gi(n),n.flags&=-16777217)):t?t!==e.memoizedState?(di(n),gi(n),pi(n,t)):(gi(n),n.flags&=-16777217):(e.memoizedProps!==r&&di(n),gi(n),n.flags&=-16777217),null;case 27:ee(n),t=Y.current;var l=n.type;if(null!==e&&null!=n.stateNode)e.memoizedProps!==r&&di(n);else{if(!r){if(null===n.stateNode)throw Error(c(166));return gi(n),null}e=q.current,Sl(n)?kl(n):(e=$f(l,r,t),n.stateNode=e,di(n))}return gi(n),null;case 5:if(ee(n),t=n.type,null!==e&&null!=n.stateNode)e.memoizedProps!==r&&di(n);else{if(!r){if(null===n.stateNode)throw Error(c(166));return gi(n),null}if(e=q.current,Sl(n))kl(n);else{switch(l=Ef(Y.current),e){case 1:e=l.createElementNS("http://www.w3.org/2000/svg",t);break;case 2:e=l.createElementNS("http://www.w3.org/1998/Math/MathML",t);break;default:switch(t){case"svg":e=l.createElementNS("http://www.w3.org/2000/svg",t);break;case"math":e=l.createElementNS("http://www.w3.org/1998/Math/MathML",t);break;case"script":(e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}
vendor: 4,794 bytes, line 42
42):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(t,{is:r.is}):l.createElement(t)}}e[Ue]=n,e[je]=r;e:for(l=n.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===n)break e;for(;null===l.sibling;){if(null===l.return||l.return===n)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}n.stateNode=e;e:switch(bf(e,t,r),t){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&di(n)}}return gi(n),n.flags&=-16777217,null;case 6:if(e&&null!=n.stateNode)e.memoizedProps!==r&&di(n);else{if("string"!=typeof r&&null===n.stateNode)throw Error(c(166));if(e=Y.current,Sl(n)){if(e=n.stateNode,t=n.memoizedProps,r=null,null!==(l=pl))switch(l.tag){case 27:case 5:r=l.memoizedProps}e[Ue]=n,(e=!!(e.nodeValue===t||null!==r&&!0===r.suppressHydrationWarning||hf(e.nodeValue,t)))||bl(n)}else(e=Ef(e).createTextNode(r))[Ue]=n,n.stateNode=e}return gi(n),null;case 13:if(r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(l=Sl(n),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(c(318));if(!(l=null!==(l=n.memoizedState)?l.dehydrated:null))throw Error(c(317));l[Ue]=n}else El(),!(128&n.flags)&&(n.memoizedState=null),n.flags|=4;gi(n),l=!1}else l=xl(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return 256&n.flags?(wu(n),n):(wu(n),null)}if(wu(n),128&n.flags)return n.lanes=t,n;if(t=null!==r,e=null!==e&&null!==e.memoizedState,t){l=null,null!==(r=n.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool);var a=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)}return t!==e&&t&&(n.child.flags|=8192),mi(n,n.updateQueue),gi(n),null;case 4:return Z(),null===e&&lf(n.stateNode.containerInfo),gi(n),null;case 10:return Tl(n.type),gi(n),null;case 19:if(B(Su),null===(l=n.memoizedState))return gi(n),null;if(r=!!(128&n.flags),null===(a=l.rendering))if(r)hi(l,!1);else{if(0!==Ns||null!==e&&128&e.flags)for(e=n.child;null!==e;){if(null!==(a=Eu(e))){for(n.flags|=128,hi(l,!1),e=a.updateQueue,n.updateQueue=e,mi(n,e),n.subtreeFlags=0,e=t,t=n.child;null!==t;)Yr(t,e),t=t.sibling;return W(Su,1&Su.current|2),n.child}e=e.sibling}null!==l.tail&&oe()>Is&&(n.flags|=128,r=!0,hi(l,!1),n.lanes=4194304)}else{if(!r)if(null!==(e=Eu(a))){if(n.flags|=128,r=!0,e=e.updateQueue,n.updateQueue=e,mi(n,e),hi(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!hl)return gi(n),null}else 2*oe()-l.renderingStartTime>Is&&536870912!==t&&(n.flags|=128,r=!0,hi(l,!1),n.lanes=4194304);l.isBackwards?(a.sibling=n.child,n.child=a):(null!==(e=l.last)?e.sibling=a:n.child=a,l.last=a)}return null!==l.tail?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=oe(),n.sibling=null,e=Su.current,W(Su,r?1&e|2:1&e),n):(gi(n),null);case 22:case 23:return wu(n),Na(),r=null!==n.memoizedState,null!==e?null!==e.memoizedState!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?!!(536870912&t)&&!(128&n.flags)&&(gi(n),6&n.subtreeFlags&&(n.flags|=8192)):gi(n),null!==(t=n.updateQueue)&&mi(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),r=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(r=n.memoizedState.cachePool.pool),r!==t&&(n.flags|=2048),null!==e&&B(Zl),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),Tl(Hl),gi(n),null;case 25:case 30:return null}throw Error(c(156,n.tag))}function yi(e,n){switch(dl(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return Tl(Hl),Z(),65536&(e=n.flags)&&!(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return ee(n),null;case 13:if(wu(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(c(340));El()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return B(Su),null;case 4:return Z(),null;case 10:return Tl(n.type),null;case 22:case 23:return wu(n),Na(),null!==e&&B(Zl),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return Tl(Hl),null;default:return null}}function bi(e,n){switch(dl(n),n.tag){case 3:Tl(Hl),Z();break;case 26:case 27:case 5:ee(n);break;case 4:Z();break;case 13:wu(n);break;case 19:B(Su);break;case 10:Tl(n.type);break;case 22:case 23:wu(n),Na(),null!==e&&B(Zl);break;case 24:Tl(Hl)}}function ki(e,n){try{var t=n.updateQueue,r=null!==t?t.lastEffect:null;if(null!==r){var l=r.next;t=l;do{if((t.tag&e)===e){r=void 0;var a=t.create,o=t.inst;r=a(),o.destroy=r}
vendor: 13,516 bytes, line 42
42t=t.next}while(t!==l)}}catch(e){Pc(n,n.return,e)}}function wi(e,n,t){try{var r=n.updateQueue,l=null!==r?r.lastEffect:null;if(null!==l){var a=l.next;r=a;do{if((r.tag&e)===e){var o=r.inst,u=o.destroy;if(void 0!==u){o.destroy=void 0,l=n;var i=t,s=u;try{s()}catch(e){Pc(l,i,e)}}}r=r.next}while(r!==a)}}catch(e){Pc(n,n.return,e)}}function Si(e){var n=e.updateQueue;if(null!==n){var t=e.stateNode;try{Ea(n,t)}catch(n){Pc(e,e.return,n)}}}function Ei(e,n,t){t.props=Nu(e.type,e.memoizedProps),t.state=e.memoizedState;try{t.componentWillUnmount()}catch(t){Pc(e,n,t)}}function xi(e,n){try{var t=e.ref;if(null!==t){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof t?e.refCleanup=t(r):t.current=r}}catch(t){Pc(e,n,t)}}function Ci(e,n){var t=e.ref,r=e.refCleanup;if(null!==t)if("function"==typeof r)try{r()}catch(t){Pc(e,n,t)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof t)try{t(null)}catch(t){Pc(e,n,t)}else t.current=null}function zi(e){var n=e.type,t=e.memoizedProps,r=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":t.autoFocus&&r.focus();break e;case"img":t.src?r.src=t.src:t.srcSet&&(r.srcset=t.srcSet)}}catch(n){Pc(e,e.return,n)}}function Pi(e,n,t){try{var r=e.stateNode;kf(r,e.type,t,n),r[je]=n}catch(n){Pc(e,e.return,n)}}function Ni(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Mf(e.type)||4===e.tag}function Li(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Ni(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Mf(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Ti(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?(9===t.nodeType?t.body:"HTML"===t.nodeName?t.ownerDocument.body:t).insertBefore(e,n):((n=9===t.nodeType?t.body:"HTML"===t.nodeName?t.ownerDocument.body:t).appendChild(e),null!=(t=t._reactRootContainer)||null!==n.onclick||(n.onclick=gf));else if(4!==r&&(27===r&&Mf(e.type)&&(t=e.stateNode,n=null),null!==(e=e.child)))for(Ti(e,n,t),e=e.sibling;null!==e;)Ti(e,n,t),e=e.sibling}function _i(e,n,t){var r=e.tag;if(5===r||6===r)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(4!==r&&(27===r&&Mf(e.type)&&(t=e.stateNode),null!==(e=e.child)))for(_i(e,n,t),e=e.sibling;null!==e;)_i(e,n,t),e=e.sibling}function Fi(e){var n=e.stateNode,t=e.memoizedProps;try{for(var r=e.type,l=n.attributes;l.length;)n.removeAttributeNode(l[0]);bf(n,r,t),n[Ue]=e,n[je]=t}catch(n){Pc(e,e.return,n)}}var Di=!1,Mi=!1,Oi=!1,Ai="function"==typeof WeakSet?WeakSet:Set,Ri=null;function Ii(e,n){if(e=e.containerInfo,wf=Ld,fr(e=cr(e))){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(t=(t=e.ownerDocument)&&t.defaultView||window).getSelection&&t.getSelection();if(r&&0!==r.rangeCount){t=r.anchorNode;var l=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{t.nodeType,a.nodeType}catch(e){t=null;break e}var o=0,u=-1,i=-1,s=0,f=0,d=e,p=null;n:for(;;){for(var m;d!==t||0!==l&&3!==d.nodeType||(u=o+l),d!==a||0!==r&&3!==d.nodeType||(i=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(m=d.firstChild);)p=d,d=m;for(;;){if(d===e)break n;if(p===t&&++s===l&&(u=o),p===a&&++f===r&&(i=o),null!==(m=d.nextSibling))break;p=(d=p).parentNode}d=m}t=-1===u||-1===i?null:{start:u,end:i}}else t=null}t=t||{start:0,end:0}}else t=null;for(Sf={focusedElem:e,selectionRange:t},Ld=!1,Ri=n;null!==Ri;)if(e=(n=Ri).child,1024&n.subtreeFlags&&null!==e)e.return=n,Ri=e;else for(;null!==Ri;){switch(a=(n=Ri).alternate,e=n.flags,n.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(1024&e&&null!==a){e=void 0,t=n,l=a.memoizedProps,a=a.memoizedState,r=t.stateNode;try{var h=Nu(t.type,l,(t.elementType,t.type));e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Pc(t,t.return,e)}}break;case 3:if(1024&e)if(9===(t=(e=n.stateNode.containerInfo).nodeType))Af(e);else if(1===t)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Af(e);break;default:e.textContent=""}break;default:if(1024&e)throw Error(c(163))}if(null!==(e=n.sibling)){e.return=n.return,Ri=e;break}Ri=n.return}}function Ui(e,n,t){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ji(e,t),4&r&&ki(5,t);break;case 1:if(Ji(e,t),4&r)if(e=t.stateNode,null===n)try{e.componentDidMount()}catch(e){Pc(t,t.return,e)}else{var l=Nu(t.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(l,n,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Pc(t,t.return,e)}}64&r&&Si(t),512&r&&xi(t,t.return);break;case 3:if(Ji(e,t),64&r&&null!==(e=t.updateQueue)){if(n=null,null!==t.child)switch(t.child.tag){case 27:case 5:case 1:n=t.child.stateNode}try{Ea(e,n)}catch(e){Pc(t,t.return,e)}}break;case 27:null===n&&4&r&&Fi(t);case 26:case 5:Ji(e,t),null===n&&4&r&&zi(t),512&r&&xi(t,t.return);break;case 12:Ji(e,t);break;case 13:Ji(e,t),4&r&&Bi(e,t),64&r&&(null!==(e=t.memoizedState)&&(null!==(e=e.dehydrated)&&jf(e,t=_c.bind(null,t))));break;case 22:if(!(r=null!==t.memoizedState||Di)){n=null!==n&&null!==n.memoizedState||Mi,l=Di;var a=Mi;Di=r,(Mi=n)&&!a?ns(e,t,!!(8772&t.subtreeFlags)):Ji(e,t),Di=l,Mi=a}break;case 30:break;default:Ji(e,t)}}function ji(e){var n=e.alternate;null!==n&&(e.alternate=null,ji(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(n=e.stateNode)&&qe(n)),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 Vi=null,Hi=!1;function Qi(e,n,t){for(t=t.child;null!==t;)$i(e,n,t),t=t.sibling}function $i(e,n,t){if(ge&&"function"==typeof ge.onCommitFiberUnmount)try{ge.onCommitFiberUnmount(he,t)}catch(e){}switch(t.tag){case 26:Mi||Ci(t,n),Qi(e,n,t),t.memoizedState?t.memoizedState.count--:t.stateNode&&(t=t.stateNode).parentNode.removeChild(t);break;case 27:Mi||Ci(t,n);var r=Vi,l=Hi;Mf(t.type)&&(Vi=t.stateNode,Hi=!1),Qi(e,n,t),Bf(t.stateNode),Vi=r,Hi=l;break;case 5:Mi||Ci(t,n);case 6:if(r=Vi,l=Hi,Vi=null,Qi(e,n,t),Hi=l,null!==(Vi=r))if(Hi)try{(9===Vi.nodeType?Vi.body:"HTML"===Vi.nodeName?Vi.ownerDocument.body:Vi).removeChild(t.stateNode)}catch(e){Pc(t,n,e)}else try{Vi.removeChild(t.stateNode)}catch(e){Pc(t,n,e)}break;case 18:null!==Vi&&(Hi?(Of(9===(e=Vi).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,t.stateNode),np(e)):Of(Vi,t.stateNode));break;case 4:r=Vi,l=Hi,Vi=t.stateNode.containerInfo,Hi=!0,Qi(e,n,t),Vi=r,Hi=l;break;case 0:case 11:case 14:case 15:Mi||wi(2,t,n),Mi||wi(4,t,n),Qi(e,n,t);break;case 1:Mi||(Ci(t,n),"function"==typeof(r=t.stateNode).componentWillUnmount&&Ei(t,n,r)),Qi(e,n,t);break;case 21:Qi(e,n,t);break;case 22:Mi=(r=Mi)||null!==t.memoizedState,Qi(e,n,t),Mi=r;break;default:Qi(e,n,t)}}function Bi(e,n){if(null===n.memoizedState&&(null!==(e=n.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{np(e)}catch(e){Pc(n,n.return,e)}}function Wi(e){switch(e.tag){case 13:case 19:var n=e.stateNode;return null===n&&(n=e.stateNode=new Ai),n;case 22:return null===(n=(e=e.stateNode)._retryCache)&&(n=e._retryCache=new Ai),n;default:throw Error(c(435,e.tag))}}function qi(e,n){var t=Wi(e);n.forEach(function(n){var r=Fc.bind(null,e,n);t.has(n)||(t.add(n),n.then(r,r))})}function Ki(e,n){var t=n.deletions;if(null!==t)for(var r=0;r<t.length;r++){var l=t[r],a=e,o=n,u=o;e:for(;null!==u;){switch(u.tag){case 27:if(Mf(u.type)){Vi=u.stateNode,Hi=!1;break e}break;case 5:Vi=u.stateNode,Hi=!1;break e;case 3:case 4:Vi=u.stateNode.containerInfo,Hi=!0;break e}u=u.return}if(null===Vi)throw Error(c(160));$i(a,o,l),Vi=null,Hi=!1,null!==(a=l.alternate)&&(a.return=null),l.return=null}if(13878&n.subtreeFlags)for(n=n.child;null!==n;)Xi(n,e),n=n.sibling}var Yi=null;function Xi(e,n){var t=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ki(n,e),Gi(e),4&r&&(wi(3,e,e.return),ki(3,e),wi(5,e,e.return));break;case 1:Ki(n,e),Gi(e),512&r&&(Mi||null===t||Ci(t,t.return)),64&r&&Di&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(t=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===t?r:t.concat(r))));break;case 26:var l=Yi;if(Ki(n,e),Gi(e),512&r&&(Mi||null===t||Ci(t,t.return)),4&r){var a=null!==t?t.memoizedState:null;if(r=e.memoizedState,null===t)if(null===r)if(null===e.stateNode){e:{r=e.type,t=e.memoizedProps,l=l.ownerDocument||l;n:switch(r){case"title":(!(a=l.getElementsByTagName("title")[0])||a[We]||a[Ue]||"http://www.w3.org/2000/svg"===a.namespaceURI||a.hasAttribute("itemprop"))&&(a=l.createElement(r),l.head.insertBefore(a,l.querySelector("head > title"))),bf(a,r,t),a[Ue]=e,Ze(a),r=a;break e;case"link":var o=sd("link","href",l).get(r+(t.href||""));if(o)for(var u=0;u<o.length;u++)if((a=o[u]).getAttribute("href")===(null==t.href||""===t.href?null:t.href)&&a.getAttribute("rel")===(null==t.rel?null:t.rel)&&a.getAttribute("title")===(null==t.title?null:t.title)&&a.getAttribute("crossorigin")===(null==t.crossOrigin?null:t.crossOrigin)){o.splice(u,1);break n}bf(a=l.createElement(r),r,t),l.head.appendChild(a);break;case"meta":if(o=sd("meta","content",l).get(r+(t.content||"")))for(u=0;u<o.length;u++)if((a=o[u]).getAttribute("content")===(null==t.content?null:""+t.content)&&a.getAttribute("name")===(null==t.name?null:t.name)&&a.getAttribute("property")===(null==t.property?null:t.property)&&a.getAttribute("http-equiv")===(null==t.httpEquiv?null:t.httpEquiv)&&a.getAttribute("charset")===(null==t.charSet?null:t.charSet)){o.splice(u,1);break n}bf(a=l.createElement(r),r,t),l.head.appendChild(a);break;default:throw Error(c(468,r))}a[Ue]=e,Ze(a),r=a}e.stateNode=r}else cd(l,e.type,e.stateNode);else e.stateNode=ld(l,r,e.memoizedProps);else a!==r?(null===a?null!==t.stateNode&&(t=t.stateNode).parentNode.removeChild(t):a.count--,null===r?cd(l,e.type,e.stateNode):ld(l,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Pi(e,e.memoizedProps,t.memoizedProps)}break;case 27:Ki(n,e),Gi(e),512&r&&(Mi||null===t||Ci(t,t.return)),null!==t&&4&r&&Pi(e,e.memoizedProps,t.memoizedProps);break;case 5:if(Ki(n,e),Gi(e),512&r&&(Mi||null===t||Ci(t,t.return)),32&e.flags){l=e.stateNode;try{_n(l,"")}catch(n){Pc(e,e.return,n)}}4&r&&null!=e.stateNode&&Pi(e,l=e.memoizedProps,null!==t?t.memoizedProps:l),1024&r&&(Oi=!0);break;case 6:if(Ki(n,e),Gi(e),4&r){if(null===e.stateNode)throw Error(c(162));r=e.memoizedProps,t=e.stateNode;try{t.nodeValue=r}catch(n){Pc(e,e.return,n)}}break;case 3:if(id=null,l=Yi,Yi=Kf(n.containerInfo),Ki(n,e),Yi=l,Gi(e),4&r&&null!==t&&t.memoizedState.isDehydrated)try{np(n.containerInfo)}catch(n){Pc(e,e.return,n)}Oi&&(Oi=!1,Zi(e));break;case 4:r=Yi,Yi=Kf(e.stateNode.containerInfo),Ki(n,e),Gi(e),Yi=r;break;case 12:default:Ki(n,e),Gi(e);break;case 13:Ki(n,e),Gi(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==t&&null!==t.memoizedState)&&(Rs=oe()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,qi(e,r)));break;case 22:l=null!==e.memoizedState;var i=null!==t&&null!==t.memoizedState,s=Di,f=Mi;if(Di=s||l,Mi=f||i,Ki(n,e),Mi=f,Di=s,Gi(e),8192&r)e:for(n=e.stateNode,n._visibility=l?-2&n._visibility:1|n._visibility,l&&(null===t||i||Di||Mi||es(e)),t=null,n=e;;){if(5===n.tag||26===n.tag){if(null===t){i=t=n;try{if(a=i.stateNode,l)"function"==typeof(o=a.style).setProperty?o.setProperty("display","none","important"):o.display="none";else{u=i.stateNode;var d=i.memoizedProps.style,p=null!=d&&d.hasOwnProperty("display")?d.display:null;u.style.display=null==p||"boolean"==typeof p?"":(""+p).trim()}}catch(e){Pc(i,i.return,e)}}}else if(6===n.tag){if(null===t){i=n;try{i.stateNode.nodeValue=l?"":i.memoizedProps}catch(e){Pc(i,i.return,e)}}}else if((22!==n.tag&&23!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;null===n.sibling;){if(null===n.return||n.return===e)break e;t===n&&(t=null),n=n.return}t===n&&(t=null),n.sibling.return=n.return,n=n.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(t=r.retryQueue)&&(r.retryQueue=null,qi(e,t))));break;case 19:Ki(n,e),Gi(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,qi(e,r)));case 30:case 21:}}function Gi(e){var n=e.flags;if(2&n){try{for(var t,r=e.return;null!==r;){if(Ni(r)){t=r;break}r=r.return}if(null==t)throw Error(c(160));switch(t.tag){case 27:var l=t.stateNode;_i(e,Li(e),l);break;case 5:var a=t.stateNode;32&t.flags&&(_n(a,""),t.flags&=-33),_i(e,Li(e),a);break;case 3:case 4:var o=t.stateNode.containerInfo;Ti(e,Li(e),o);break;default:throw Error(c(161))}}catch(n){Pc(e,e.return,n)}e.flags&=-3}4096&n&&(e.flags&=-4097)}function Zi(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var n=e;Zi(n),5===n.tag&&1024&n.flags&&n.stateNode.reset(),e=e.sibling}}function Ji(e,n){if(8772&n.subtreeFlags)for(n=n.child;null!==n;)Ui(e,n.alternate,n),n=n.sibling}function es(e){for(e=e.child;null!==e;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:wi(4,n,n.return),es(n);break;case 1:Ci(n,n.return);var t=n.stateNode;"function"==typeof t.componentWillUnmount&&Ei(n,n.return,t),es(n);break;case 27:Bf(n.stateNode);case 26:case 5:Ci(n,n.return),es(n);break;case 22:null===n.memoizedState&&es(n);break;default:es(n)}e=e.sibling}}function ns(e,n,t){for(t=t&&!!(8772&n.subtreeFlags),n=n.child;null!==n;){var r=n.alternate,l=e,a=n,o=a.flags;switch(a.tag){case 0:case 11:case 15:ns(l,a,t),ki(4,a);break;case 1:if(ns(l,a,t),"function"==typeof(l=(r=a).stateNode).componentDidMount)try{l.componentDidMount()}catch(e){Pc(r,r.return,e)}if(null!==(l=(r=a).updateQueue)){var u=r.stateNode;try{var i=l.shared.hiddenCallbacks;
vendor: 7,800 bytes, line 42
42if(null!==i)for(l.shared.hiddenCallbacks=null,l=0;l<i.length;l++)Sa(i[l],u)}catch(e){Pc(r,r.return,e)}}t&&64&o&&Si(a),xi(a,a.return);break;case 27:Fi(a);case 26:case 5:ns(l,a,t),t&&null===r&&4&o&&zi(a),xi(a,a.return);break;case 12:ns(l,a,t);break;case 13:ns(l,a,t),t&&4&o&&Bi(l,a);break;case 22:null===a.memoizedState&&ns(l,a,t),xi(a,a.return);break;case 30:break;default:ns(l,a,t)}n=n.sibling}}function ts(e,n){var t=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),e=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(e=n.memoizedState.cachePool.pool),e!==t&&(null!=e&&e.refCount++,null!=t&&$l(t))}function rs(e,n){e=null,null!==n.alternate&&(e=n.alternate.memoizedState.cache),(n=n.memoizedState.cache)!==e&&(n.refCount++,null!=e&&$l(e))}function ls(e,n,t,r){if(10256&n.subtreeFlags)for(n=n.child;null!==n;)as(e,n,t,r),n=n.sibling}function as(e,n,t,r){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ls(e,n,t,r),2048&l&&ki(9,n);break;case 1:case 13:default:ls(e,n,t,r);break;case 3:ls(e,n,t,r),2048&l&&(e=null,null!==n.alternate&&(e=n.alternate.memoizedState.cache),(n=n.memoizedState.cache)!==e&&(n.refCount++,null!=e&&$l(e)));break;case 12:if(2048&l){ls(e,n,t,r),e=n.stateNode;try{var a=n.memoizedProps,o=a.id,u=a.onPostCommit;"function"==typeof u&&u(o,null===n.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){Pc(n,n.return,e)}}else ls(e,n,t,r);break;case 23:break;case 22:a=n.stateNode,o=n.alternate,null!==n.memoizedState?2&a._visibility?ls(e,n,t,r):us(e,n):2&a._visibility?ls(e,n,t,r):(a._visibility|=2,os(e,n,t,r,!!(10256&n.subtreeFlags))),2048&l&&ts(o,n);break;case 24:ls(e,n,t,r),2048&l&&rs(n.alternate,n)}}function os(e,n,t,r,l){for(l=l&&!!(10256&n.subtreeFlags),n=n.child;null!==n;){var a=e,o=n,u=t,i=r,s=o.flags;switch(o.tag){case 0:case 11:case 15:os(a,o,u,i,l),ki(8,o);break;case 23:break;case 22:var c=o.stateNode;null!==o.memoizedState?2&c._visibility?os(a,o,u,i,l):us(a,o):(c._visibility|=2,os(a,o,u,i,l)),l&&2048&s&&ts(o.alternate,o);break;case 24:os(a,o,u,i,l),l&&2048&s&&rs(o.alternate,o);break;default:os(a,o,u,i,l)}n=n.sibling}}function us(e,n){if(10256&n.subtreeFlags)for(n=n.child;null!==n;){var t=e,r=n,l=r.flags;switch(r.tag){case 22:us(t,r),2048&l&&ts(r.alternate,r);break;case 24:us(t,r),2048&l&&rs(r.alternate,r);break;default:us(t,r)}n=n.sibling}}var is=8192;function ss(e){if(e.subtreeFlags&is)for(e=e.child;null!==e;)cs(e),e=e.sibling}function cs(e){switch(e.tag){case 26:ss(e),e.flags&is&&null!==e.memoizedState&&hd(Yi,e.memoizedState,e.memoizedProps);break;case 5:default:ss(e);break;case 3:case 4:var n=Yi;Yi=Kf(e.stateNode.containerInfo),ss(e),Yi=n;break;case 22:null===e.memoizedState&&(null!==(n=e.alternate)&&null!==n.memoizedState?(n=is,is=16777216,ss(e),is=n):ss(e))}}function fs(e){var n=e.alternate;if(null!==n&&null!==(e=n.child)){n.child=null;do{n=e.sibling,e.sibling=null,e=n}while(null!==e)}}function ds(e){var n=e.deletions;if(16&e.flags){if(null!==n)for(var t=0;t<n.length;t++){var r=n[t];Ri=r,hs(r,e)}fs(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)ps(e),e=e.sibling}function ps(e){switch(e.tag){case 0:case 11:case 15:ds(e),2048&e.flags&&wi(9,e,e.return);break;case 3:case 12:default:ds(e);break;case 22:var n=e.stateNode;null!==e.memoizedState&&2&n._visibility&&(null===e.return||13!==e.return.tag)?(n._visibility&=-3,ms(e)):ds(e)}}function ms(e){var n=e.deletions;if(16&e.flags){if(null!==n)for(var t=0;t<n.length;t++){var r=n[t];Ri=r,hs(r,e)}fs(e)}for(e=e.child;null!==e;){switch((n=e).tag){case 0:case 11:case 15:wi(8,n,n.return),ms(n);break;case 22:2&(t=n.stateNode)._visibility&&(t._visibility&=-3,ms(n));break;default:ms(n)}e=e.sibling}}function hs(e,n){for(;null!==Ri;){var t=Ri;switch(t.tag){case 0:case 11:case 15:wi(8,t,n);break;case 23:case 22:if(null!==t.memoizedState&&null!==t.memoizedState.cachePool){var r=t.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:$l(t.memoizedState.cache)}if(null!==(r=t.child))r.return=t,Ri=r;else e:for(t=e;null!==Ri;){var l=(r=Ri).sibling,a=r.return;if(ji(r),r===t){Ri=null;break e}if(null!==l){l.return=a,Ri=l;break e}Ri=a}}}var gs={getCacheForType:function(e){var n=Al(Hl),t=n.data.get(e);return void 0===t&&(t=e(),n.data.set(e,t)),t}},vs="function"==typeof WeakMap?WeakMap:Map,ys=0,bs=null,ks=null,ws=0,Ss=0,Es=null,xs=!1,Cs=!1,zs=!1,Ps=0,Ns=0,Ls=0,Ts=0,_s=0,Fs=0,Ds=0,Ms=null,Os=null,As=!1,Rs=0,Is=1/0,Us=null,js=null,Vs=0,Hs=null,Qs=null,$s=0,Bs=0,Ws=null,qs=null,Ks=0,Ys=null;function Xs(){if(2&ys&&0!==ws)return ws&-ws;if(null!==U.T){return 0!==ql?ql:Wc()}return Ae()}function Gs(){0===Fs&&(Fs=536870912&ws&&!hl?536870912:Pe());var e=gu.current;return null!==e&&(e.flags|=32),Fs}function Zs(e,n,t){(e!==bs||2!==Ss&&9!==Ss)&&null===e.cancelPendingCommit||(ac(e,0),tc(e,ws,Fs,!1)),Te(e,t),2&ys&&e===bs||(e===bs&&(!(2&ys)&&(Ts|=t),4===Ns&&tc(e,ws,Fs,!1)),Uc(e))}function Js(e,n,t){if(6&ys)throw Error(c(327));for(var r=!t&&!(124&n)&&0===(n&e.expiredLanes)||Ce(e,n),l=r?dc(e,n):cc(e,n,!0),a=r;;){if(0===l){Cs&&!r&&tc(e,n,0,!1);break}if(t=e.current.alternate,!a||nc(t)){if(2===l){if(a=n,e.errorRecoveryDisabledLanes&a)var o=0;else o=0!==(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){n=o;e:{var u=e;l=Ms;var i=u.current.memoizedState.isDehydrated;if(i&&(ac(u,o).flags|=256),2!==(o=cc(u,o,!1))){if(zs&&!i){u.errorRecoveryDisabledLanes|=a,Ts|=a,l=4;break e}a=Os,Os=l,null!==a&&(null===Os?Os=a:Os.push.apply(Os,a))}l=o}if(a=!1,2!==l)continue}}if(1===l){ac(e,0),tc(e,n,0,!0);break}e:{switch(r=e,a=l){case 0:case 1:throw Error(c(345));case 4:if((4194048&n)!==n)break;case 6:tc(r,n,Fs,!xs);break e;case 2:Os=null;break;case 3:case 5:break;default:throw Error(c(329))}if((62914560&n)===n&&10<(l=Rs+300-oe())){if(tc(r,n,Fs,!xs),0!==xe(r,0,!0))break e;r.timeoutHandle=Lf(ec.bind(null,r,t,Os,Us,As,n,Fs,Ts,Ds,xs,a,2,-0,0),l)}else ec(r,t,Os,Us,As,n,Fs,Ts,Ds,xs,a,0,-0,0)}break}l=cc(e,n,!1),a=!1}Uc(e)}function ec(e,n,t,r,l,a,o,u,i,s,c,f,d,p){if(e.timeoutHandle=-1,(8192&(f=n.subtreeFlags)||!(16785408&~f))&&(pd={stylesheets:null,count:0,unsuspend:md},cs(n),null!==(f=gd())))return e.cancelPendingCommit=f(bc.bind(null,e,n,a,t,r,l,o,u,i,c,1,d,p)),void tc(e,a,o,!s);bc(e,n,a,t,r,l,o,u,i)}function nc(e){for(var n=e;;){var t=n.tag;if((0===t||11===t||15===t)&&16384&n.flags&&(null!==(t=n.updateQueue)&&null!==(t=t.stores)))for(var r=0;r<t.length;r++){var l=t[r],a=l.getSnapshot;l=l.value;try{if(!ar(a(),l))return!1}catch(e){return!1}}if(t=n.child,16384&n.subtreeFlags&&null!==t)t.return=n,n=t;else{if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function tc(e,n,t,r){n&=~_s,n&=~Ts,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var l=n;0<l;){var a=31-ye(l),o=1<<a;r[a]=-1,l&=~o}0!==t&&Fe(e,t,n)}function rc(){return!!(6&ys)||(jc(0,!1),!1)}function lc(){if(null!==ks){if(0===Ss)var e=ks.return;else Nl=Pl=null,Ka(e=ks),uu=null,iu=0,e=ks;for(;null!==e;)bi(e.alternate,e),e=e.return;ks=null}}function ac(e,n){var t=e.timeoutHandle;-1!==t&&(e.timeoutHandle=-1,Tf(t)),null!==(t=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,t()),lc(),bs=e,ks=t=Kr(e.current,null),ws=n,Ss=0,Es=null,xs=!1,Cs=Ce(e,n),zs=!1,Ds=Fs=_s=Ts=Ls=Ns=0,Os=Ms=null,As=!1,8&n&&(n|=32&n);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=n;0<r;){var l=31-ye(r),a=1<<l;n|=e[l],r&=~a}return Ps=n,Ir(),t}function oc(e,n){Ta=null,U.H=ru,n===ta||n===la?(n=ca(),Ss=3):n===ra?(n=ca(),Ss=4):Ss=n===Uu?8:null!==n&&"object"==typeof n&&"function"==typeof n.then?6:1,Es=n,null===ks&&(Ns=1,Du(e,Mr(n,e.current)))}function uc(){var e=U.H;return U.H=ru,null===e?ru:e}function ic(){var e=U.A;return U.A=gs,e}function sc(){Ns=4,xs||(4194048&ws)!==ws&&null!==gu.current||(Cs=!0),!(134217727&Ls)&&
vendor: 7,782 bytes, line 42
42!(134217727&Ts)||null===bs||tc(bs,ws,Fs,!1)}function cc(e,n,t){var r=ys;ys|=2;var l=uc(),a=ic();bs===e&&ws===n||(Us=null,ac(e,n)),n=!1;var o=Ns;e:for(;;)try{if(0!==Ss&&null!==ks){var u=ks,i=Es;switch(Ss){case 8:lc(),o=6;break e;case 3:case 2:case 9:case 6:null===gu.current&&(n=!0);var s=Ss;if(Ss=0,Es=null,gc(e,u,i,s),t&&Cs){o=0;break e}break;default:s=Ss,Ss=0,Es=null,gc(e,u,i,s)}}fc(),o=Ns;break}catch(n){oc(e,n)}return n&&e.shellSuspendCounter++,Nl=Pl=null,ys=r,U.H=l,U.A=a,null===ks&&(bs=null,ws=0,Ir()),o}function fc(){for(;null!==ks;)mc(ks)}function dc(e,n){var t=ys;ys|=2;var r=uc(),l=ic();bs!==e||ws!==n?(Us=null,Is=oe()+500,ac(e,n)):Cs=Ce(e,n);e:for(;;)try{if(0!==Ss&&null!==ks){n=ks;var a=Es;n:switch(Ss){case 1:Ss=0,Es=null,gc(e,n,a,1);break;case 2:case 9:if(oa(a)){Ss=0,Es=null,hc(n);break}n=function(){2!==Ss&&9!==Ss||bs!==e||(Ss=7),Uc(e)},a.then(n,n);break e;case 3:Ss=7;break e;case 4:Ss=5;break e;case 7:oa(a)?(Ss=0,Es=null,hc(n)):(Ss=0,Es=null,gc(e,n,a,7));break;case 5:var o=null;switch(ks.tag){case 26:o=ks.memoizedState;case 5:case 27:var u=ks;if(!o||dd(o)){Ss=0,Es=null;var i=u.sibling;if(null!==i)ks=i;else{var s=u.return;null!==s?(ks=s,vc(s)):ks=null}break n}}Ss=0,Es=null,gc(e,n,a,5);break;case 6:Ss=0,Es=null,gc(e,n,a,6);break;case 8:lc(),Ns=6;break e;default:throw Error(c(462))}}pc();break}catch(n){oc(e,n)}return Nl=Pl=null,U.H=r,U.A=l,ys=t,null!==ks?0:(bs=null,ws=0,Ir(),Ns)}function pc(){for(;null!==ks&&!le();)mc(ks)}function mc(e){var n=fi(e.alternate,e,Ps);e.memoizedProps=e.pendingProps,null===n?vc(e):ks=n}function hc(e){var n=e,t=n.alternate;switch(n.tag){case 15:case 0:n=Yu(t,n,n.pendingProps,n.type,void 0,ws);break;case 11:n=Yu(t,n,n.pendingProps,n.type.render,n.ref,ws);break;case 5:Ka(n);default:bi(t,n),n=fi(t,n=ks=Yr(n,Ps),Ps)}e.memoizedProps=e.pendingProps,null===n?vc(e):ks=n}function gc(e,n,t,r){Nl=Pl=null,Ka(n),uu=null,iu=0;var l=n.return;try{if(Iu(e,l,n,t,ws))return Ns=1,Du(e,Mr(t,e.current)),void(ks=null)}catch(n){if(null!==l)throw ks=l,n;return Ns=1,Du(e,Mr(t,e.current)),void(ks=null)}32768&n.flags?(hl||1===r?e=!0:Cs||536870912&ws?e=!1:(xs=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=gu.current)&&13===r.tag&&(r.flags|=16384))),yc(n,e)):vc(n)}function vc(e){var n=e;do{if(32768&n.flags)return void yc(n,xs);e=n.return;var t=vi(n.alternate,n,Ps);if(null!==t)return void(ks=t);if(null!==(n=n.sibling))return void(ks=n);ks=n=e}while(null!==n);0===Ns&&(Ns=5)}function yc(e,n){do{var t=yi(e.alternate,e);if(null!==t)return t.flags&=32767,void(ks=t);if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling))return void(ks=e);ks=e=t}while(null!==e);Ns=6,ks=null}function bc(e,n,t,r,l,a,o,u,i){e.cancelPendingCommit=null;do{xc()}while(0!==Vs);if(6&ys)throw Error(c(327));if(null!==n){if(n===e.current)throw Error(c(177));if(a=n.lanes|n.childLanes,_e(e,t,a|=Rr,o,u,i),e===bs&&(ks=bs=null,ws=0),Qs=n,Hs=e,$s=t,Bs=a,Ws=l,qs=r,10256&n.subtreeFlags||10256&n.flags?(e.callbackNode=null,e.callbackPriority=0,te(ce,function(){return Cc(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(13878&n.flags),13878&n.subtreeFlags||r){r=U.T,U.T=null,l=j.p,j.p=2,o=ys,ys|=4;try{Ii(e,n)}finally{ys=o,j.p=l,U.T=r}}Vs=1,kc(),wc(),Sc()}}function kc(){if(1===Vs){Vs=0;var e=Hs,n=Qs,t=!!(13878&n.flags);if(13878&n.subtreeFlags||t){t=U.T,U.T=null;var r=j.p;j.p=2;var l=ys;ys|=4;try{Xi(n,e);var a=Sf,o=cr(e.containerInfo),u=a.focusedElem,i=a.selectionRange;if(o!==u&&u&&u.ownerDocument&&sr(u.ownerDocument.documentElement,u)){if(null!==i&&fr(u)){var s=i.start,c=i.end;if(void 0===c&&(c=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(c,u.value.length);else{var f=u.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var p=d.getSelection(),m=u.textContent.length,h=Math.min(i.start,m),g=void 0===i.end?h:Math.min(i.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var v=ir(u,h),y=ir(u,g);if(v&&y&&(1!==p.rangeCount||p.anchorNode!==v.node||p.anchorOffset!==v.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var b=f.createRange();b.setStart(v.node,v.offset),p.removeAllRanges(),h>g?(p.addRange(b),p.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),p.addRange(b))}}}}for(f=[],p=u;p=p.parentNode;)1===p.nodeType&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof u.focus&&u.focus(),u=0;u<f.length;u++){var k=f[u];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}Ld=!!wf,Sf=wf=null}finally{ys=l,j.p=r,U.T=t}}e.current=n,Vs=2}}function wc(){if(2===Vs){Vs=0;var e=Hs,n=Qs,t=!!(8772&n.flags);if(8772&n.subtreeFlags||t){t=U.T,U.T=null;var r=j.p;j.p=2;var l=ys;ys|=4;try{Ui(e,n.alternate,n)}finally{ys=l,j.p=r,U.T=t}}Vs=3}}function Sc(){if(4===Vs||3===Vs){Vs=0,ae();var e=Hs,n=Qs,t=$s,r=qs;10256&n.subtreeFlags||10256&n.flags?Vs=5:(Vs=0,Qs=Hs=null,Ec(e,e.pendingLanes));var l=e.pendingLanes;if(0===l&&(js=null),Oe(t),n=n.stateNode,ge&&"function"==typeof ge.onCommitFiberRoot)try{ge.onCommitFiberRoot(he,n,void 0,!(128&~n.current.flags))}catch(e){}if(null!==r){n=U.T,l=j.p,j.p=2,U.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var u=r[o];a(u.value,{componentStack:u.stack})}}finally{U.T=n,j.p=l}}3&$s&&xc(),Uc(e),l=e.pendingLanes,4194090&t&&42&l?e===Ys?Ks++:(Ks=0,Ys=e):Ks=0,jc(0,!1)}}function Ec(e,n){0===(e.pooledCacheLanes&=n)&&(null!=(n=e.pooledCache)&&(e.pooledCache=null,$l(n)))}function xc(e){return kc(),wc(),Sc(),Cc()}function Cc(){if(5!==Vs)return!1;var e=Hs,n=Bs;Bs=0;var t=Oe($s),r=U.T,l=j.p;try{j.p=32>t?32:t,U.T=null,t=Ws,Ws=null;var a=Hs,o=$s;if(Vs=0,Qs=Hs=null,$s=0,6&ys)throw Error(c(331));var u=ys;if(ys|=4,ps(a.current),as(a,a.current,o,t),ys=u,jc(0,!1),ge&&"function"==typeof ge.onPostCommitFiberRoot)try{ge.onPostCommitFiberRoot(he,a)}catch(e){}return!0}finally{j.p=l,U.T=r,Ec(e,n)}}function zc(e,n,t){n=Mr(t,n),null!==(e=ga(e,n=Ou(e.stateNode,n,2),2))&&(Te(e,2),Uc(e))}function Pc(e,n,t){if(3===e.tag)zc(e,e,t);else for(;null!==n;){if(3===n.tag){zc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===js||!js.has(r))){e=Mr(t,e),null!==(r=ga(n,t=Au(2),2))&&(Ru(t,r,n,e),Te(r,2),Uc(r));break}}n=n.return}}function Nc(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new vs;var l=new Set;r.set(n,l)}else void 0===(l=r.get(n))&&(l=new Set,r.set(n,l));l.has(t)||(zs=!0,l.add(t),e=Lc.bind(null,e,n,t),n.then(e,e))}function Lc(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,bs===e&&(ws&t)===t&&(4===Ns||3===Ns&&(62914560&ws)===ws&&300>oe()-Rs?!(2&ys)&&ac(e,0):_s|=t,Ds===ws&&(Ds=0)),Uc(e)}function Tc(e,n){0===n&&(n=Ne()),null!==(e=Vr(e,n))&&(Te(e,n),Uc(e))}function _c(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),Tc(e,t)}function Fc(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(t=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(c(314))}null!==r&&r.delete(n),Tc(e,t)}var Dc=null,Mc=null,Oc=!1,Ac=!1,Rc=!1,Ic=0;function Uc(e){e!==Mc&&null===e.next&&(null===Mc?Dc=Mc=e:Mc=Mc.next=e),Ac=!0,Oc||(Oc=!0,Ff(function(){6&ys?te(ie,Vc):Hc()}))}function jc(e,n){if(!Rc&&Ac){Rc=!0;do{for(var t=!1,r=Dc;null!==r;){if(!n)if(0!==e){var l=r.pendingLanes;if(0===l)var a=0;else{var o=r.suspendedLanes,u=r.pingedLanes;a=(1<<31-ye(42|e)+1)-1,a=201326741&(a&=l&~(o&~u))?201326741&a|1:a?2|a:0}0!==a&&(t=!0,Bc(r,a))}else a=ws,!(3&(a=xe(r,r===bs?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Ce(r,a)||(t=!0,Bc(r,a));r=r.next}}while(t);Rc=!1}}function Vc(){Hc()}function Hc(){Ac=Oc=!1;var e=0;0!==Ic&&(Nf()&&(e=Ic),Ic=0);for(var n=oe(),t=null,r=Dc;null!==r;){var l=r.next,a=Qc(r,n);0===a?(r.next=null,null===t?Dc=l:t.next=l,null===l&&(Mc=t)):(t=r,(0!==e||3&a)&&(Ac=!0)),r
vendor: 4,987 bytes, line 42
42=l}jc(e,!1)}function Qc(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=-62914561&e.pendingLanes;0<a;){var o=31-ye(a),u=1<<o,i=l[o];-1===i?0!==(u&t)&&0===(u&r)||(l[o]=ze(u,n)):i<=n&&(e.expiredLanes|=u),a&=~u}if(t=ws,t=xe(e,e===(n=bs)?t:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===t||e===n&&(2===Ss||9===Ss)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&re(r),e.callbackNode=null,e.callbackPriority=0;if(!(3&t)||Ce(e,t)){if((n=t&-t)===e.callbackPriority)return n;switch(null!==r&&re(r),Oe(t)){case 2:case 8:t=se;break;case 32:default:t=ce;break;case 268435456:t=de}return r=$c.bind(null,e),t=te(t,r),e.callbackPriority=n,e.callbackNode=t,n}return null!==r&&null!==r&&re(r),e.callbackPriority=2,e.callbackNode=null,2}function $c(e,n){if(0!==Vs&&5!==Vs)return e.callbackNode=null,e.callbackPriority=0,null;var t=e.callbackNode;if(xc()&&e.callbackNode!==t)return null;var r=ws;return 0===(r=xe(e,e===bs?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Js(e,r,n),Qc(e,oe()),null!=e.callbackNode&&e.callbackNode===t?$c.bind(null,e):null)}function Bc(e,n){if(xc())return null;Js(e,n,!0)}function Wc(){return 0===Ic&&(Ic=Pe()),Ic}function qc(e){return null==e||"symbol"==typeof e||"boolean"==typeof e?null:"function"==typeof e?e:In(""+e)}function Kc(e,n){var t=n.ownerDocument.createElement("input");return t.name=n.name,t.value=n.value,e.id&&t.setAttribute("form",e.id),n.parentNode.insertBefore(t,n),e=new FormData(e),t.parentNode.removeChild(t),e}function Yc(e,n,t,r,l){if("submit"===n&&t&&t.stateNode===l){var a=qc((l[je]||null).action),o=r.submitter;o&&(null!==(n=(n=o[je]||null)?qc(n.formAction):o.getAttribute("formAction"))&&(a=n,o=null));var u=new it("action","action",null,r,l);e.push({event:u,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Ic){var e=o?Kc(l,o):new FormData(l);Qo(t,{pending:!0,data:e,method:l.method,action:a},null,e)}}else"function"==typeof a&&(u.preventDefault(),e=o?Kc(l,o):new FormData(l),Qo(t,{pending:!0,data:e,method:l.method,action:a},a,e))},currentTarget:l}]})}}for(var Xc=0;Xc<_r.length;Xc++){var Gc=_r[Xc];Fr(Gc.toLowerCase(),"on"+(Gc[0].toUpperCase()+Gc.slice(1)))}Fr(Er,"onAnimationEnd"),Fr(xr,"onAnimationIteration"),Fr(Cr,"onAnimationStart"),Fr("dblclick","onDoubleClick"),Fr("focusin","onFocus"),Fr("focusout","onBlur"),Fr(zr,"onTransitionRun"),Fr(Pr,"onTransitionStart"),Fr(Nr,"onTransitionCancel"),Fr(Lr,"onTransitionEnd"),tn("onMouseEnter",["mouseout","mouseover"]),tn("onMouseLeave",["mouseout","mouseover"]),tn("onPointerEnter",["pointerout","pointerover"]),tn("onPointerLeave",["pointerout","pointerover"]),nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zc="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(" "),Jc=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zc));function ef(e,n){n=!!(4&n);for(var t=0;t<e.length;t++){var r=e[t],l=r.event;r=r.listeners;e:{var a=void 0;if(n)for(var o=r.length-1;0<=o;o--){var u=r[o],i=u.instance,s=u.currentTarget;if(u=u.listener,i!==a&&l.isPropagationStopped())break e;a=u,l.currentTarget=s;try{a(l)}catch(e){Lu(e)}l.currentTarget=null,a=i}else for(o=0;o<r.length;o++){if(i=(u=r[o]).instance,s=u.currentTarget,u=u.listener,i!==a&&l.isPropagationStopped())break e;a=u,l.currentTarget=s;try{a(l)}catch(e){Lu(e)}l.currentTarget=null,a=i}}}}function nf(e,n){var t=n[He];void 0===t&&(t=n[He]=new Set);var r=e+"__bubble";t.has(r)||(af(n,e,2,!1),t.add(r))}function tf(e,n,t){var r=0;n&&(r|=4),af(t,e,r,n)}var rf="_reactListening"+Math.random().toString(36).slice(2);function lf(e){if(!e[rf]){e[rf]=!0,Je.forEach(function(n){"selectionchange"!==n&&(Jc.has(n)||tf(n,!1,e),tf(n,!0,e))});var n=9===e.nodeType?e:e.ownerDocument;null===n||n[rf]||(n[rf]=!0,tf("selectionchange",!1,n))}}function af(e,n,t,r){switch(Ad(n)){case 2:var l=Td;break;case 8:l=_d;break;default:l=Fd}t=l.bind(null,n,t,e),l=void 0,!Kn||"touchstart"!==n&&"touchmove"!==n&&"wheel"!==n||(l=!0),r?void 0!==l?e.addEventListener(n,t,{capture:!0,passive:l}):e.addEventListener(n,t,!0):void 0!==l?e.addEventListener(n,t,{passive:l}):e.addEventListener(n,t,!1)}function of(e,n,t,r,l){var a=r;if(!(1&n||2&n||null===r))e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var u=r.stateNode.containerInfo;
vendor: 7,673 bytes, line 42
42if(u===l)break;if(4===o)for(o=r.return;null!==o;){var i=o.tag;if((3===i||4===i)&&o.stateNode.containerInfo===l)return;o=o.return}for(;null!==u;){if(null===(o=Ke(u)))return;if(5===(i=o.tag)||6===i||26===i||27===i){r=a=o;continue e}u=u.parentNode}}r=r.return}Bn(function(){var r=a,l=jn(t),o=[];e:{var u=Tr.get(e);if(void 0!==u){var i=it,s=e;switch(e){case"keypress":if(0===et(t))break e;case"keydown":case"keyup":i=Et;break;case"focusin":s="focus",i=mt;break;case"focusout":s="blur",i=mt;break;case"beforeblur":case"afterblur":i=mt;break;case"click":if(2===t.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":i=dt;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":i=pt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":i=Ct;break;case Er:case xr:case Cr:i=ht;break;case Lr:i=zt;break;case"scroll":case"scrollend":i=ct;break;case"wheel":i=Pt;break;case"copy":case"cut":case"paste":i=gt;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":i=xt;break;case"toggle":case"beforetoggle":i=Nt}var c=!!(4&n),f=!c&&("scroll"===e||"scrollend"===e),p=c?null!==u?u+"Capture":null:u;c=[];for(var m,h=r;null!==h;){var g=h;if(m=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===m||null===p||null!=(g=Wn(h,p))&&c.push(uf(h,g,m)),f)break;h=h.return}0<c.length&&(u=new i(u,s,null,t,l),o.push({event:u,listeners:c}))}}if(!(7&n)){if(i="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||t===Un||!(s=t.relatedTarget||t.fromElement)||!Ke(s)&&!s[Ve])&&(i||u)&&(u=l.window===l?l:(u=l.ownerDocument)?u.defaultView||u.parentWindow:window,i?(i=r,null!==(s=(s=t.relatedTarget||t.toElement)?Ke(s):null)&&(f=d(s),c=s.tag,s!==f||5!==c&&27!==c&&6!==c)&&(s=null)):(i=null,s=r),i!==s)){if(c=dt,g="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=xt,g="onPointerLeave",p="onPointerEnter",h="pointer"),f=null==i?u:Xe(i),m=null==s?u:Xe(s),(u=new c(g,h+"leave",i,t,l)).target=f,u.relatedTarget=m,g=null,Ke(l)===r&&((c=new c(p,h+"enter",s,t,l)).target=m,c.relatedTarget=f,g=c),f=g,i&&s)e:{for(p=s,h=0,m=c=i;m;m=cf(m))h++;for(m=0,g=p;g;g=cf(g))m++;for(;0<h-m;)c=cf(c),h--;for(;0<m-h;)p=cf(p),m--;for(;h--;){if(c===p||null!==p&&c===p.alternate)break e;c=cf(c),p=cf(p)}c=null}else c=null;null!==i&&ff(o,u,i,c,!1),null!==s&&null!==f&&ff(o,f,s,c,!0)}if("select"===(i=(u=r?Xe(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===i&&"file"===u.type)var v=Kt;else if(Ht(u))if(Yt)v=lr;else{v=tr;var y=nr}else!(i=u.nodeName)||"input"!==i.toLowerCase()||"checkbox"!==u.type&&"radio"!==u.type?r&&On(r.elementType)&&(v=Kt):v=rr;switch(v&&(v=v(e,r))?Qt(o,v,t,l):(y&&y(e,u,r),"focusout"===e&&r&&"number"===u.type&&null!=r.memoizedProps.value&&Pn(u,"number",u.value)),y=r?Xe(r):window,e){case"focusin":(Ht(y)||"true"===y.contentEditable)&&(pr=y,mr=r,hr=null);break;case"focusout":hr=mr=pr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,vr(o,t,l);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":vr(o,t,l)}var b;if(Tt)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else It?At(e,t)&&(k="onCompositionEnd"):"keydown"===e&&229===t.keyCode&&(k="onCompositionStart");k&&(Dt&&"ko"!==t.locale&&(It||"onCompositionStart"!==k?"onCompositionEnd"===k&&It&&(b=Jn()):(Gn="value"in(Xn=l)?Xn.value:Xn.textContent,It=!0)),0<(y=sf(r,k)).length&&(k=new vt(k,e,null,t,l),o.push({event:k,listeners:y}),b?k.data=b:null!==(b=Rt(t))&&(k.data=b))),(b=Ft?Ut(e,t):jt(e,t))&&(0<(k=sf(r,"onBeforeInput")).length&&(y=new vt("onBeforeInput","beforeinput",null,t,l),o.push({event:y,listeners:k}),y.data=b)),Yc(o,e,r,t,l)}ef(o,n)})}function uf(e,n,t){return{instance:e,listener:n,currentTarget:t}}function sf(e,n){for(var t=n+"Capture",r=[];null!==e;){var l=e,a=l.stateNode;if(5!==(l=l.tag)&&26!==l&&27!==l||null===a||(null!=(l=Wn(e,t))&&r.unshift(uf(e,l,a)),null!=(l=Wn(e,n))&&r.push(uf(e,l,a))),3===e.tag)return r;e=e.return}return[]}function cf(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function ff(e,n,t,r,l){for(var a=n._reactName,o=[];null!==t&&t!==r;){var u=t,i=u.alternate,s=u.stateNode;if(u=u.tag,null!==i&&i===r)break;5!==u&&26!==u&&27!==u||null===s||(i=s,l?null!=(s=Wn(t,a))&&o.unshift(uf(t,s,i)):l||null!=(s=Wn(t,a))&&o.push(uf(t,s,i))),t=t.return}0!==o.length&&e.push({event:n,listeners:o})}var df=/\r\n?/g,pf=/\u0000|\uFFFD/g;function mf(e){return("string"==typeof e?e:""+e).replace(df,"\n").replace(pf,"")}function hf(e,n){return n=mf(n),mf(e)===n}function gf(){}function vf(e,n,t,r,l,a){switch(t){case"children":"string"==typeof r?"body"===n||"textarea"===n&&""===r||_n(e,r):("number"==typeof r||"bigint"==typeof r)&&"body"!==n&&_n(e,""+r);break;case"className":cn(e,"class",r);break;case"tabIndex":cn(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":cn(e,t,r);break;case"style":Mn(e,r,a);break;case"data":if("object"!==n){cn(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==n||"href"!==t)){e.removeAttribute(t);break}if(null==r||"function"==typeof r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(t);break}r=In(""+r),e.setAttribute(t,r);break;case"action":case"formAction":if("function"==typeof r){e.setAttribute(t,"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}if("function"==typeof a&&("formAction"===t?("input"!==n&&vf(e,n,"name",l.name,l,null),vf(e,n,"formEncType",l.formEncType,l,null),vf(e,n,"formMethod",l.formMethod,l,null),vf(e,n,"formTarget",l.formTarget,l,null)):(vf(e,n,"encType",l.encType,l,null),vf(e,n,"method",l.method,l,null),vf(e,n,"target",l.target,l,null))),null==r||"symbol"==typeof r||"boolean"==typeof r){e.removeAttribute(t);break}r=In(""+r),e.setAttribute(t,r);break;case"onClick":null!=r&&(e.onclick=gf);break;case"onScroll":null!=r&&nf("scroll",e);break;case"onScrollEnd":null!=r&&nf("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(c(61));if(null!=(t=r.__html)){if(null!=l.children)throw Error(c(60));e.innerHTML=t}}break;case"multiple":e.multiple=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"muted":e.muted=r&&"function"!=typeof r&&"symbol"!=typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"==typeof r||"boolean"==typeof r||"symbol"==typeof r){e.removeAttribute("xlink:href");break}t=In(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(t,""+r):e.removeAttribute(t);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"playsInl
42ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(t,""):e.removeAttribute(t);break;case"capture":case"download":!0===r?e.setAttribute(t,""):!1!==r&&null!=r&&"function"!=typeof r&&"symbol"!=typeof r?e.setAttribute(t,r):e.removeAttribute(t);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!=typeof r&&"symbol"!=typeof r&&!isNaN(r)&&1<=r?e.setAttribute(t,r):e.removeAttribute(t);break;case"rowSpan":case"start":null==r||"function"==typeof r||"symbol"==typeof r||isNaN(r)?e.removeAttribute(t):e.setAttribute(t,r);break;case"popover":nf("beforetoggle",e),nf("toggle",e),sn(e,"popover",r);break;case"xlinkActuate":fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":fn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":fn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":fn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":fn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":sn(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&sn(e,t=An.get(t)||t,r)}}function yf(e,n,t,r,l,a){switch(t){case"style":Mn(e,r,a);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!=typeof r||!("__html"in r))throw Error(c(61));if(null!=(t=r.__html)){if(null!=l.children)throw Error(c(60));e.innerHTML=t}}break;case"children":"string"==typeof r?_n(e,r):("number"==typeof r||"bigint"==typeof r)&&_n(e,""+r);break;case"onScroll":null!=r&&nf("scroll",e);break;case"onScrollEnd":null!=r&&nf("scrollend",e);break;case"onClick":null!=r&&(e.onclick=gf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:en.hasOwnProperty(t)||("o"!==t[0]||"n"!==t[1]||(l=t.endsWith("Capture"),n=t.slice(2,l?t.length-7:void 0),"function"==typeof(a=null!=(a=e[je]||null)?a[t]:null)&&e.removeEventListener(n,a,l),"function"!=typeof r)?t in e?e[t]=r:!0===r?e.setAttribute(t,""):sn(e,t,r):("function"!=typeof a&&null!==a&&(t in e?e[t]=null:e.hasAttribute(t)&&e.removeAttribute(t)),e.addEventListener(n,r,l)))}}function bf(e,n,t){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nf("error",e),nf("load",e);var r,l=!1,a=!1;for(r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)switch(r){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,n));default:vf(e,n,r,o,t,null)}}return a&&vf(e,n,"srcSet",t.srcSet,t,null),void(l&&vf(e,n,"src",t.src,t,null));case"input":nf("invalid",e);var u=r=o=a=null,i=null,s=null;for(l in t)if(t.hasOwnProperty(l)){var f=t[l];if(null!=f)switch(l){case"name":a=f;break;case"type":o=f;break;case"checked":i=f;break;case"defaultChecked":s=f;break;case"value":r=f;break;case"defaultValue":u=f;break;case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(c(137,n));break;default:vf(e,n,l,f,t,null)}}return zn(e,r,u,i,s,o,a,!1),void kn(e);case"select":for(a in nf("invalid",e),l=o=r=null,t)if(t.hasOwnProperty(a)&&null!=(u=t[a]))switch(a){case"value":r=u;break;case"defaultValue":o=u;break;case"multiple":l=u;default:vf(e,n,a,u,t,null)}return n=r,t=o,e.multiple=!!l,void(null!=n?Nn(e,!!l,n,!1):null!=t&&Nn(e,!!l,t,!0));case"textarea":for(o in nf("invalid",e),r=a=l=null,t)if(t.hasOwnProperty(o)&&null!=(u=t[o]))switch(o){case"value":l=u;break;case"defaultValue":a=u;break;case"children":r=u;break;case"dangerouslySetInnerHTML":if(null!=u)throw Error(c(91));break;default:vf(e,n,o,u,t,null)}return Tn(e,l,a,r),void kn(e);case"option":for(i in t)if(t.hasOwnProperty(i)&&null!=(l=t[i]))if("selected"===i)e.selected=l&&"function"!=typeof l&&"symbol"!=typeof l;else vf(e,n,i,l,t,null);return;case"dialog":nf("beforetoggle",e),nf("toggle",e),nf("cancel",e),nf("close",e);break;case"iframe":case"object":nf("load",e);break;case"video":case"audio":for(l=0;l<Zc.length;l++)nf(Zc[l],e);break;case"image":nf("error",e),nf("load",e);break;case"details":nf("toggle",e);break;case"embed":case"source":case"link":nf("error",e),nf("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(s in t)if(t.hasOwnProperty(s)&&null!=(l=t[s]))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,n));default:vf(e,n,s,l,t,null)}return;default:if(On(n)){for(f in t)t.hasOwnProperty(f)&&(void 0!==(l=t[f])&&yf(e,n,f,l,t,void 0));return}}for(u in t)t.hasOwnProperty(u)&&(null!=(l=t[u])&&vf(e,n,u,l,t,null))}function kf(e,n,t,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;
42case"input":var l=null,a=null,o=null,u=null,i=null,s=null,f=null;for(m in t){var d=t[m];if(t.hasOwnProperty(m)&&null!=d)switch(m){case"checked":case"value":break;case"defaultValue":i=d;default:r.hasOwnProperty(m)||vf(e,n,m,null,r,d)}}for(var p in r){var m=r[p];if(d=t[p],r.hasOwnProperty(p)&&(null!=m||null!=d))switch(p){case"type":a=m;break;case"name":l=m;break;case"checked":s=m;break;case"defaultChecked":f=m;break;case"value":o=m;break;case"defaultValue":u=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(c(137,n));break;default:m!==d&&vf(e,n,p,m,r,d)}}return void Cn(e,o,u,i,s,f,a,l);case"select":for(a in m=o=u=p=null,t)if(i=t[a],t.hasOwnProperty(a)&&null!=i)switch(a){case"value":break;case"multiple":m=i;default:r.hasOwnProperty(a)||vf(e,n,a,null,r,i)}for(l in r)if(a=r[l],i=t[l],r.hasOwnProperty(l)&&(null!=a||null!=i))switch(l){case"value":p=a;break;case"defaultValue":u=a;break;case"multiple":o=a;default:a!==i&&vf(e,n,l,a,r,i)}return n=u,t=o,r=m,void(null!=p?Nn(e,!!t,p,!1):!!r!=!!t&&(null!=n?Nn(e,!!t,n,!0):Nn(e,!!t,t?[]:"",!1)));case"textarea":for(u in m=p=null,t)if(l=t[u],t.hasOwnProperty(u)&&null!=l&&!r.hasOwnProperty(u))switch(u){case"value":case"children":break;default:vf(e,n,u,null,r,l)}for(o in r)if(l=r[o],a=t[o],r.hasOwnProperty(o)&&(null!=l||null!=a))switch(o){case"value":p=l;break;case"defaultValue":m=l;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(c(91));break;default:l!==a&&vf(e,n,o,l,r,a)}return void Ln(e,p,m);case"option":for(var h in t)if(p=t[h],t.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h))if("selected"===h)e.selected=!1;else vf(e,n,h,null,r,p);for(i in r)if(p=r[i],m=t[i],r.hasOwnProperty(i)&&p!==m&&(null!=p||null!=m))if("selected"===i)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else vf(e,n,i,p,r,m);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 g in t)p=t[g],t.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&vf(e,n,g,null,r,p);for(s in r)if(p=r[s],m=t[s],r.hasOwnProperty(s)&&p!==m&&(null!=p||null!=m))switch(s){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(c(137,n));break;default:vf(e,n,s,p,r,m)}return;default:if(On(n)){for(var v in t)p=t[v],t.hasOwnProperty(v)&&void 0!==p&&!r.hasOwnProperty(v)&&yf(e,n,v,void 0,r,p);for(f in r)p=r[f],m=t[f],!r.hasOwnProperty(f)||p===m||void 0===p&&void 0===m||yf(e,n,f,p,r,m);return}}for(var y in t)p=t[y],t.hasOwnProperty(y)&&null!=p&&!r.hasOwnProperty(y)&&vf(e,n,y,null,r,p);for(d in r)p=r[d],m=t[d],!r.hasOwnProperty(d)||p===m||null==p&&null==m||vf(e,n,d,p,r,m)}var wf=null,Sf=null;function Ef(e){return 9===e.nodeType?e:e.ownerDocument}function xf(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 Cf(e,n){if(0===e)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===n?0:e}function zf(e,n){return"textarea"===e||"noscript"===e||"string"==typeof n.children||"number"==typeof n.children||"bigint"==typeof n.children||"object"==typeof n.dangerouslySetInnerHTML&&null!==n.dangerouslySetInnerHTML&&null!=n.dangerouslySetInnerHTML.__html}var Pf=null;function Nf(){var e=window.event;return e&&"popstate"===e.type?e!==Pf&&(Pf=e,!0):(Pf=null,!1)}var Lf="function"==typeof setTimeout?setTimeout:void 0,Tf="function"==typeof clearTimeout?clearTimeout:void 0,_f="function"==typeof Promise?Promise:void 0,Ff="function"==typeof queueMicrotask?queueMicrotask:void 0!==_f?function(e){return _f.resolve(null).then(e).catch(Df)}:Lf;function Df(e){setTimeout(function(){throw e})}function Mf(e){return"head"===e}function Of(e,n){var t=n,r=0,l=0;do{var a=t.nextSibling;if(e.removeChild(t),a&&8===a.nodeType)if("/$"===(t=a.data)){if(0<r&&8>r){t=r;var o=e.ownerDocument;if(1&t&&Bf(o.documentElement),2&t&&Bf(o.body),4&t)for(Bf(t=o.head),o=t.firstChild;o;){var u=o.nextSibling,i=o.nodeName;o[We]||"SCRIPT"===i||"STYLE"===i||"LINK"===i&&"stylesheet"===o.rel.toLowerCase()||t.removeChild(o),o=u}}if(0===l)return e.removeChild(a),void np(n);l--}else"$"===t||"$?"===t||"$!"===t?l++:r=t.charCodeAt(0)-48;else r=0;t=a}while(t);np(n)}function Af(e){var n=e.firstChild;for(n&&10===n.nodeType&&(n=n.nextSibling);n;){var t=n;switch(n=n.nextSibling,t.nodeName){case"HTML":case"HEAD":case"BODY":Af(t),qe(t);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===t.rel.toLowerCase())continue}e.removeChild(t)}}function Rf(e,n,t,r){for(;1===e.nodeType;){var l=t;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&("INPUT"!==e.n
vendor: 8,716 bytes, line 42
42odeName||"hidden"!==e.type))break}else if(r){if(!e[We])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(a=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(a!==l.rel||e.getAttribute("href")!==(null==l.href||""===l.href?null:l.href)||e.getAttribute("crossorigin")!==(null==l.crossOrigin?null:l.crossOrigin)||e.getAttribute("title")!==(null==l.title?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((a=e.getAttribute("src"))!==(null==l.src?null:l.src)||e.getAttribute("type")!==(null==l.type?null:l.type)||e.getAttribute("crossorigin")!==(null==l.crossOrigin?null:l.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==n||"hidden"!==e.type)return e;var a=null==l.name?null:""+l.name;if("hidden"===l.type&&e.getAttribute("name")===a)return e}if(null===(e=Vf(e.nextSibling)))break}return null}function If(e,n,t){if(""===n)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Vf(e.nextSibling)))return null}return e}function Uf(e){return"$!"===e.data||"$?"===e.data&&"complete"===e.ownerDocument.readyState}function jf(e,n){var t=e.ownerDocument;if("$?"!==e.data||"complete"===t.readyState)n();else{var r=function(){n(),t.removeEventListener("DOMContentLoaded",r)};t.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Vf(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break;if(8===n){if("$"===(n=e.data)||"$!"===n||"$?"===n||"F!"===n||"F"===n)break;if("/$"===n)return null}}return e}var Hf=null;function Qf(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if("$"===t||"$!"===t||"$?"===t){if(0===n)return e;n--}else"/$"===t&&n++}e=e.previousSibling}return null}function $f(e,n,t){switch(n=Ef(t),e){case"html":if(!(e=n.documentElement))throw Error(c(452));return e;case"head":if(!(e=n.head))throw Error(c(453));return e;case"body":if(!(e=n.body))throw Error(c(454));return e;default:throw Error(c(451))}}function Bf(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);qe(e)}var Wf=new Map,qf=new Set;function Kf(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Yf=j.d;j.d={f:function(){var e=Yf.f(),n=rc();return e||n},r:function(e){var n=Ye(e);null!==n&&5===n.tag&&"form"===n.type?Bo(n):Yf.r(e)},D:function(e){Yf.D(e),Gf("dns-prefetch",e,null)},C:function(e,n){Yf.C(e,n),Gf("preconnect",e,n)},L:function(e,n,t){Yf.L(e,n,t);var r=Xf;if(r&&e&&n){var l='link[rel="preload"][as="'+xn(n)+'"]';"image"===n&&t&&t.imageSrcSet?(l+='[imagesrcset="'+xn(t.imageSrcSet)+'"]',"string"==typeof t.imageSizes&&(l+='[imagesizes="'+xn(t.imageSizes)+'"]')):l+='[href="'+xn(e)+'"]';var a=l;switch(n){case"style":a=Jf(e);break;case"script":a=td(e)}Wf.has(a)||(e=v({rel:"preload",href:"image"===n&&t&&t.imageSrcSet?void 0:e,as:n},t),Wf.set(a,e),null!==r.querySelector(l)||"style"===n&&r.querySelector(ed(a))||"script"===n&&r.querySelector(rd(a))||(bf(n=r.createElement("link"),"link",e),Ze(n),r.head.appendChild(n)))}},m:function(e,n){Yf.m(e,n);var t=Xf;if(t&&e){var r=n&&"string"==typeof n.as?n.as:"script",l='link[rel="modulepreload"][as="'+xn(r)+'"][href="'+xn(e)+'"]',a=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=td(e)}if(!Wf.has(a)&&(e=v({rel:"modulepreload",href:e},n),Wf.set(a,e),null===t.querySelector(l))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(rd(a)))return}bf(r=t.createElement("link"),"link",e),Ze(r),t.head.appendChild(r)}}},X:function(e,n){Yf.X(e,n);var t=Xf;if(t&&e){var r=Ge(t).hoistableScripts,l=td(e),a=r.get(l);a||((a=t.querySelector(rd(l)))||(e=v({src:e,async:!0},n),(n=Wf.get(l))&&ud(e,n),Ze(a=t.createElement("script")),bf(a,"link",e),t.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(l,a))}},S:function(e,n,t){Yf.S(e,n,t);var r=Xf;if(r&&e){var l=Ge(r).hoistableStyles,a=Jf(e);n=n||"default";var o=l.get(a);if(!o){var u={loading:0,preload:null};if(o=r.querySelector(ed(a)))u.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},t),(t=Wf.get(a))&&od(e,t);var i=o=r.createElement("link");Ze(i),bf(i,"link",e),i._p=new Promise(function(e,n){i.onload=e,i.onerror=n}),i.addEventListener("load",function(){u.loading|=1}),i.addEventListener("error",function(){u.loading|=2}),u.loading|=4,ad(o,n,r)}o={type:"stylesheet",instance:o,count:1,state:u},l.set(a,o)}}},M:function(e,n){Yf.M(e,n);var t=Xf;if(t&&e){var r=Ge(t).hoistableScripts,l=td(e),a=r.get(l);a||((a=t.querySelector(rd(l)))||(e=v({src:e,async:!0,type:"module"},n),(n=Wf.get(l))&&ud(e,n),Ze(a=t.createElement("script")),bf(a,"link",e),t.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(l,a))}}};var Xf="undefined"==typeof document?null:document;function Gf(e,n,t){var r=Xf;if(r&&"string"==typeof n&&n){var l=xn(n);l='link[rel="'+e+'"][href="'+l+'"]',"string"==typeof t&&(l+='[crossorigin="'+t+'"]'),qf.has(l)||(qf.add(l),e={rel:e,crossOrigin:t,href:n},null===r.querySelector(l)&&(bf(n=r.createElement("link"),"link",e),Ze(n),r.head.appendChild(n)))}}function Zf(e,n,t,r){var l,a,o,u,i=(i=Y.current)?Kf(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof t.precedence&&"string"==typeof t.href?(n=Jf(t.href),(r=(t=Ge(i).hoistableStyles).get(n))||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===t.rel&&"string"==typeof t.href&&"string"==typeof t.precedence){e=Jf(t.href);var s=Ge(i).hoistableStyles,f=s.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,f),(s=i.querySelector(ed(e)))&&!s._p&&(f.instance=s,f.state.loading=5),Wf.has(e)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},Wf.set(e,t),s||(l=i,a=e,o=t,u=f.state,l.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=l.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),bf(a,"link",o),Ze(a),l.head.appendChild(a))))),n&&null===r)throw Error(c(528,""));return f}if(n&&null!==r)throw Error(c(529,""));return null;case"script":return n=t.async,"string"==typeof(t=t.src)&&n&&"function"!=typeof n&&"symbol"!=typeof n?(n=td(t),(r=(t=Ge(i).hoistableScripts).get(n))||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Jf(e){return'href="'+xn(e)+'"'}function ed(e){return'link[rel="stylesheet"]['+e+"]"}function nd(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function td(e){return'[src="'+xn(e)+'"]'}function rd(e){return"script[async]"+e}function ld(e,n,t){if(n.count++,null===n.instance)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+xn(t.href)+'"]');if(r)return n.instance=r,Ze(r),r;var l=v({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return Ze(r=(e.ownerDocument||e).createElement("style")),bf(r,"style",l),ad(r,t.precedence,e),n.instance=r;case"stylesheet":l=Jf(t.href);var a=e.querySelector(ed(l));if(a)return n.state.loading|=4,n.instance=a,Ze(a),a;r=nd(t),(l=Wf.get(l))&&od(r,l),Ze(a=(e.ownerDocument||e).createElement("link"));var o=a;return o._p=new Promise(function(e,n){o.onload=e,o.onerror=n}),bf(a,"link",r),n.state.loading|=4,ad(a,t.precedence,e),n.instance=a;case"script":return a=td(t.src),(l=e.querySelector(rd(a)))?(n.instance=l,Ze(l),l):(r=t,(l=Wf.get(a))&&ud(r=v({},t),l),Ze(l=(e=e.ownerDocument||e).createElement("script")),bf(l,"link",r),e.head.appendChild(l),n.instance=l);case"void":return null;default:throw Error(c(443,n.type))}else"stylesheet"===n.type&&!(4&n.state.loading)&&(r=n.instance,n.state.loading|=4,ad(r,t.precedence,e));return n.instance}function ad(e,n,t){for(var r=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,a=l,o=0;o<r.length;o++){var u=r[o];if(u.dataset.precedence===n)a=u;else if(a!==l)break}a?a.parentNode.insertBefore(e,a.nextSibling):(n=9===t.nodeType?t.head:t).insertBefore(e,n.firstChild)}function od(e,n){null==e.crossOrigin&&(e.crossOrigin=n.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy),null==e.title&&(e.title=n.title)}
vendor: 18,141 bytes, lines 42-66
42function ud(e,n){null==e.crossOrigin&&(e.crossOrigin=n.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy),null==e.integrity&&(e.integrity=n.integrity)}var id=null;function sd(e,n,t){if(null===id){var r=new Map,l=id=new Map;l.set(t,r)}else(r=(l=id).get(t))||(r=new Map,l.set(t,r));if(r.has(e))return r;for(r.set(e,null),t=t.getElementsByTagName(e),l=0;l<t.length;l++){var a=t[l];if(!(a[We]||a[Ue]||"link"===e&&"stylesheet"===a.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==a.namespaceURI){var o=a.getAttribute(n)||"";o=e+o;var u=r.get(o);u?u.push(a):r.set(o,[a])}}return r}function cd(e,n,t){(e=e.ownerDocument||e).head.insertBefore(t,"title"===n?e.querySelector("head > title"):null)}function fd(e,n,t){if(1===t||null!=n.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!=typeof n.precedence||"string"!=typeof n.href||""===n.href)break;return!0;case"link":if("string"!=typeof n.rel||"string"!=typeof n.href||""===n.href||n.onLoad||n.onError)break;return"stylesheet"!==n.rel||(e=n.disabled,"string"==typeof n.precedence&&null==e);case"script":if(n.async&&"function"!=typeof n.async&&"symbol"!=typeof n.async&&!n.onLoad&&!n.onError&&n.src&&"string"==typeof n.src)return!0}return!1}function dd(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var pd=null;function md(){}function hd(e,n,t){if(null===pd)throw Error(c(475));var r=pd;if(!("stylesheet"!==n.type||"string"==typeof t.media&&!1===matchMedia(t.media).matches||4&n.state.loading)){if(null===n.instance){var l=Jf(t.href),a=e.querySelector(ed(l));if(a)return null!==(e=a._p)&&"object"==typeof e&&"function"==typeof e.then&&(r.count++,r=vd.bind(r),e.then(r,r)),n.state.loading|=4,n.instance=a,void Ze(a);a=e.ownerDocument||e,t=nd(t),(l=Wf.get(l))&&od(t,l),Ze(a=a.createElement("link"));var o=a;o._p=new Promise(function(e,n){o.onload=e,o.onerror=n}),bf(a,"link",t),n.instance=a}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(n,e),(e=n.state.preload)&&!(3&n.state.loading)&&(r.count++,n=vd.bind(r),e.addEventListener("load",n),e.addEventListener("error",n))}}function gd(){if(null===pd)throw Error(c(475));var e=pd;return e.stylesheets&&0===e.count&&bd(e,e.stylesheets),0<e.count?function(n){var t=setTimeout(function(){if(e.stylesheets&&bd(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(t)}}:null}function vd(){if(this.count--,0===this.count)if(this.stylesheets)bd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var yd=null;function bd(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,yd=new Map,n.forEach(kd,e),yd=null,vd.call(e))}function kd(e,n){if(!(4&n.state.loading)){var t=yd.get(e);if(t)var r=t.get(null);else{t=new Map,yd.set(e,t);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<l.length;a++){var o=l[a];"LINK"!==o.nodeName&&"not all"===o.getAttribute("media")||(t.set(o.dataset.precedence,o),r=o)}r&&t.set(null,r)}o=(l=n.instance).getAttribute("data-precedence"),(a=t.get(o)||r)===r&&t.set(null,l),t.set(o,l),this.count++,r=vd.bind(this),l.addEventListener("load",r),l.addEventListener("error",r),a?a.parentNode.insertBefore(l,a.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(l,e.firstChild),n.state.loading|=4}}var wd={$$typeof:z,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Sd(e,n,t,r,l,a,o,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=Le(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Le(0),this.hiddenUpdates=Le(null),this.identifierPrefix=r,this.onUncaughtError=l,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function Ed(e,n,t,r,l,a,o,u,i,s,c,f){return e=new Sd(e,n,t,o,u,i,s,f),n=1,!0===a&&(n|=24),a=Wr(3,null,null,n),e.current=a,a.stateNode=e,(n=Ql()).refCount++,e.pooledCache=n,n.refCount++,a.memoizedState={element:r,isDehydrated:t,cache:n},pa(a),e}function xd(e){return e?e=$r:$r}function Cd(e,n,t,r,l,a){l=xd(l),null===r.context?r.context=l:r.pendingContext=l,(r=ha(n)).payload={element:t},null!==(a=void 0===a?null:a)&&(r.callback=a),null!==(t=ga(e,r,n))&&(Zs(t,0,n),va(t,e,n))}function zd(e,n){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t<n?t:n}}function Pd(e,n){zd(e,n),(e=e.alternate)&&zd(e,n)}function Nd(e){if(13===e.tag){var n=Vr(e,67108864);null!==n&&Zs(n,0,67108864),Pd(e,67108864)}}var Ld=!0;function Td(e,n,t,r){var l=U.T;U.T=null;var a=j.p;try{j.p=2,Fd(e,n,t,r)}finally{j.p=a,U.T=l}}function _d(e,n,t,r){var l=U.T;U.T=null;var a=j.p;try{j.p=8,Fd(e,n,t,r)}finally{j.p=a,U.T=l}}function Fd(e,n,t,r){if(Ld){var l=Dd(r);if(null===l)of(e,n,r,Md,t),Bd(e,r);else if(qd(l,e,n,t,r))r.stopPropagation();else if(Bd(e,r),4&n&&-1<$d.indexOf(e)){for(;null!==l;){var a=Ye(l);if(null!==a)switch(a.tag){case 3:if((a=a.stateNode).current.memoizedState.isDehydrated){var o=Ee(a.pendingLanes);if(0!==o){var u=a;for(u.pendingLanes|=2,u.entangledLanes|=2;o;){var i=1<<31-ye(o);u.entanglements[1]|=i,o&=~i}Uc(a),!(6&ys)&&(Is=oe()+500,jc(0,!1))}}break;case 13:null!==(u=Vr(a,2))&&Zs(u,0,2),rc(),Pd(a,2)}if(null===(a=Dd(r))&&of(e,n,r,Md,t),a===l)break;l=a}null!==l&&r.stopPropagation()}else of(e,n,r,null,t)}}function Dd(e){return Od(e=jn(e))}var Md=null;function Od(e){if(Md=null,null!==(e=Ke(e))){var n=d(e);if(null===n)e=null;else{var t=n.tag;if(13===t){if(null!==(e=p(n)))return e;e=null}else if(3===t){if(n.stateNode.current.memoizedState.isDehydrated)return 3===n.tag?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Md=e,null}function Ad(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(ue()){case ie:return 2;case se:return 8;case ce:case fe:return 32;case de:return 268435456;default:return 32}default:return 32}}var Rd=!1,Id=null,Ud=null,jd=null,Vd=new Map,Hd=new Map,Qd=[],$d="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 Bd(e,n){switch(e){case"focusin":case"focusout":Id=null;break;case"dragenter":case"dragleave":Ud=null;break;case"mouseover":case"mouseout":jd=null;break;case"pointerover":case"pointerout":Vd.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hd.delete(n.pointerId)}}function Wd(e,n,t,r,l,a){return null===e||e.nativeEvent!==a?(e={blockedOn:n,domEventName:t,eventSystemFlags:r,nativeEvent:a,targetContainers:[l]},null!==n&&(null!==(n=Ye(n))&&Nd(n)),e):(e.eventSystemFlags|=r,n=e.targetContainers,null!==l&&-1===n.indexOf(l)&&n.push(l),e)}function qd(e,n,t,r,l){switch(n){case"focusin":return Id=Wd(Id,e,n,t,r,l),!0;case"dragenter":return Ud=Wd(Ud,e,n,t,r,l),!0;case"mouseover":return jd=Wd(jd,e,n,t,r,l),!0;case"pointerover":var a=l.pointerId;return Vd.set(a,Wd(Vd.get(a)||null,e,n,t,r,l)),!0;case"gotpointercapture":return a=l.pointerId,Hd.set(a,Wd(Hd.get(a)||null,e,n,t,r,l)),!0}return!1}function Kd(e){var n=Ke(e.target);if(null!==n){var t=d(n);if(null!==t)if(13===(n=t.tag)){if(null!==(n=p(t)))return e.blockedOn=n,void Re(e.priority,function(){if(13===t.tag){var e=Xs();e=Me(e);var n=Vr(t,e);null!==n&&Zs(n,0,e),Pd(t,e)}})}else if(3===n&&t.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===t.tag?t.stateNode.containerInfo:null)}e.blockedOn=null}function Yd(e){if(null!==e.blockedOn)return!1;for(var n=e.targetContainers;0<n.length;){var t=Dd(e.nativeEvent);if(null!==t)return null!==(n=Ye(t))&&Nd(n),e.blockedOn=t,!1;var r=new(t=e.nativeEvent).constructor(t.type,t);Un=r,t.target.dispatchEvent(r),Un=null,n.shift()}return!0}function Xd(e,n,t){Yd(e)&&t.delete(n)}function Gd(){Rd=!1,null!==Id&&Yd(Id)&&(Id=null),null!==Ud&&Yd(Ud)&&(Ud=null),null!==jd&&Yd(jd)&&(jd=null),Vd.forEach(Xd),Hd.forEach(Xd)}function Zd(e,n){e.blockedOn===n&&(e.blockedOn=null,Rd||(Rd=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Gd)))}var Jd=null;function ep(e){Jd!==e&&(Jd=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Jd===e&&(Jd=null);for(var n=0;n<e.length;n+=3){var t=e[n],r=e[n+1],l=e[n+2];if("function"!=typeof r){if(null===Od(r||t))continue;break}var a=Ye(t);null!==a&&(e.splice(n,3),n-=3,Qo(a,{pending:!0,data:l,method:t.method,action:r},r,l))}}))}function np(e){function n(n){return Zd(n,e)}null!==Id&&Zd(Id,e),null!==Ud&&Zd(Ud,e),null!==jd&&Zd(jd,e),Vd.forEach(n),Hd.forEach(n);for(var t=0;t<Qd.length;t++){var r=Qd[t];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Qd.length&&null===(t=Qd[0]).blockedOn;)Kd(t),null===t.blockedOn&&Qd.shift();if(null!=(t=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<t.length;r+=3){var l=t[r],a=t[r+1],o=l[je]||null;if("function"==typeof a)o||ep(t);else if(o){var u=null;if(a&&a.hasAttribute("formAction")){if(l=a,o=a[je]||null)u=o.formAction;else if(null!==Od(l))continue}else u=o.action;"function"==typeof u?t[r+1]=u:(t.splice(r,3),r-=3),ep(t)}}}function tp(e){this._internalRoot=e}function rp(e){this._internalRoot=e}rp.prototype.render=tp.prototype.render=function(e){var n=this._internalRoot;if(null===n)throw Error(c(409));Cd(n.current,Xs(),e,n,null,null)},rp.prototype.unmount=tp.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var n=e.containerInfo;Cd(e.current,2,null,e,null,null),rc(),n[Ve]=null}},rp.prototype.unstable_scheduleHydration=function(e){if(e){var n=Ae();e={blockedOn:null,target:e,priority:n};for(var t=0;t<Qd.length&&0!==n&&n<Qd[t].priority;t++);Qd.splice(t,0,e),0===t&&Kd(e)}};var lp=i.version;if("19.1.0"!==lp)throw Error(c(527,lp,"19.1.0"));j.findDOMNode=function(e){var n=e._reactInternals;if(void 0===n){if("function"==typeof e.render)throw Error(c(188));throw e=Object.keys(e).join(","),Error(c(268,e))}return e=null===(e=null!==(e=h(n))?g(e):null)?null:e.stateNode};var ap={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.1.0"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var op=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!op.isDisabled&&op.supportsFiber)try{he=op.inject(ap),ge=op}catch(e){}}a.createRoot=function(e,n){if(!f(e))throw Error(c(299));var t=!1,r="",l=Tu,a=_u,o=Fu;return null!=n&&(!0===n.unstable_strictMode&&(t=!0),void 0!==n.identifierPrefix&&(r=n.identifierPrefix),void 0!==n.onUncaughtError&&(l=n.onUncaughtError),void 0!==n.onCaughtError&&(a=n.onCaughtError),void 0!==n.onRecoverableError&&(o=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks),n=Ed(e,1,!1,null,0,t,r,l,a,o,0,null),e[Ve]=n.current,lf(e),new tp(n)},a.hydrateRoot=function(e,n,t){if(!f(e))throw Error(c(299));var r=!1,l="",a=Tu,o=_u,u=Fu,i=null;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(l=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(u=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks,void 0!==t.formState&&(i=t.formState)),(n=Ed(e,1,!0,n,0,r,l,a,o,u,0,i)).context=xd(null),t=n.current,(l=ha(r=Me(r=Xs()))).callback=null,ga(t,l,r),t=r,n.current.lanes=t,Te(n,t),Uc(n),e[Ve]=n.current,lf(e),new rp(n)},a.version="19.1.0"},31,[32,34,36]);
43__d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},32,[33]);
44__d(function(g,r,i,_a,m,e,d){
45/**
46   * @license React
47   * scheduler.production.js
48   *
49   * Copyright (c) Meta Platforms, Inc. and affiliates.
50   *
51   * This source code is licensed under the MIT license found in the
52   * LICENSE file in the root directory of this source tree.
53   */
54"use strict";function n(n,t){var a=n.length;n.push(t);e:for(;0<a;){var o=a-1>>>1,u=n[o];if(!(0<l(u,t)))break e;n[o]=t,n[a]=u,a=o}}function t(n){return 0===n.length?null:n[0]}function a(n){if(0===n.length)return null;var t=n[0],a=n.pop();if(a!==t){n[0]=a;e:for(var o=0,u=n.length,s=u>>>1;o<s;){var f=2*(o+1)-1,c=n[f],b=f+1,p=n[b];if(0>l(c,a))b<u&&0>l(p,c)?(n[o]=p,n[b]=a,o=b):(n[o]=c,n[f]=a,o=f);else{if(!(b<u&&0>l(p,a)))break e;n[o]=p,n[b]=a,o=b}}}return t}function l(n,t){var a=n.sortIndex-t.sortIndex;return 0!==a?a:n.id-t.id}if(e.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,s=u.now();e.unstable_now=function(){return u.now()-s}}var f=[],c=[],b=1,p=null,v=3,y=!1,_=!1,k=!1,w=!1,h="function"==typeof setTimeout?setTimeout:null,T="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function I(l){for(var o=t(c);null!==o;){if(null===o.callback)a(c);else{if(!(o.startTime<=l))break;a(c),o.sortIndex=o.expirationTime,n(f,o)}o=t(c)}}function P(n){if(k=!1,I(n),!_)if(null!==t(f))_=!0,L||(L=!0,C());else{var a=t(c);null!==a&&N(P,a.startTime-n)}}var C,L=!1,M=-1,j=5,F=-1;function R(){return!!w||!(e.unstable_now()-F<j)}function q(){if(w=!1,L){var n=e.unstable_now();F=n;var l=!0;try{e:{_=!1,k&&(k=!1,T(M),M=-1),y=!0;var o=v;try{n:{for(I(n),p=t(f);null!==p&&!(p.expirationTime>n&&R());){var u=p.callback;if("function"==typeof u){p.callback=null,v=p.priorityLevel;var s=u(p.expirationTime<=n);if(n=e.unstable_now(),"function"==typeof s){p.callback=s,I(n),l=!0;break n}p===t(f)&&a(f),I(n)}else a(f);p=t(f)}if(null!==p)l=!0;else{var b=t(c);null!==b&&N(P,b.startTime-n),l=!1}}break e}finally{p=null,v=o,y=!1}l=void 0}}finally{l?C():L=!1}}}if("function"==typeof x)C=function(){x(q)};else if("undefined"!=typeof MessageChannel){var B=new MessageChannel,D=B.port2;B.port1.onmessage=q,C=function(){D.postMessage(null)}}else C=function(){h(q,0)};function N(n,t){M=h(function(){n(e.unstable_now())},t)}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(n){n.callback=null},e.unstable_forceFrameRate=function(n){0>n||125<n?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<n?Math.floor(1e3/n):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(n){switch(v){case 1:case 2:case 3:var t=3;break;default:t=v}var a=v;v=t;try{return n()}finally{v=a}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(n,t){switch(n){case 1:case 2:case 3:case 4:case 5:break;default:n=3}var a=v;v=n;try{return t()}finally{v=a}},e.unstable_scheduleCallback=function(a,l,o){var u=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?u+o:u:o=u,a){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return a={id:b++,callback:l,priorityLevel:a,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>u?(a.sortIndex=o,n(c,a),null===t(f)&&a===t(c)&&(k?(T(M),M=-1):k=!0,N(P,o-u))):(a.sortIndex=s,n(f,a),_||y||(_=!0,L||(L=!0,C()))),a},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(n){var t=v;return function(){var a=v;v=t;try{return n.apply(this,arguments)}finally{v=a}}}},33,[]);
55__d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},34,[35]);
56__d(function(g,r,_i,a,m,e,d){
57/**
58   * @license React
59   * react.production.js
60   *
61   * Copyright (c) Meta Platforms, Inc. and affiliates.
62   *
63   * This source code is licensed under the MIT license found in the
64   * LICENSE file in the root directory of this source tree.
65   */
66"use strict";var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.iterator;var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function S(t,n,o){this.props=t,this.context=n,this.refs=b,this.updater=o||_}function E(){}function w(t,n,o){this.props=t,this.context=n,this.refs=b,this.updater=o||_}S.prototype.isReactComponent={},S.prototype.setState=function(t,n){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,n,"setState")},S.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},E.prototype=S.prototype;var R=w.prototype=new E;
vendor: 4,154 bytes, line 66
66R.constructor=w,v(R,S.prototype),R.isPureReactComponent=!0;var j=Array.isArray,H={H:null,A:null,T:null,S:null,V:null},k=Object.prototype.hasOwnProperty;function C(n,o,u,i,c,s){return u=s.ref,{$$typeof:t,type:n,key:o,ref:void 0!==u?u:null,props:s}}function $(n){return"object"==typeof n&&null!==n&&n.$$typeof===t}var T=/\/+/g;function O(t,n){return"object"==typeof t&&null!==t&&null!=t.key?(o=""+t.key,u={"=":"=0",":":"=2"},"$"+o.replace(/[=:]/g,function(t){return u[t]})):n.toString(36);var o,u}function x(){}function A(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch("string"==typeof t.status?t.then(x,x):(t.status="pending",t.then(function(n){"pending"===t.status&&(t.status="fulfilled",t.value=n)},function(n){"pending"===t.status&&(t.status="rejected",t.reason=n)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function I(o,u,i,c,s){var f=typeof o;"undefined"!==f&&"boolean"!==f||(o=null);var l,p,_=!1;if(null===o)_=!0;else switch(f){case"bigint":case"string":case"number":_=!0;break;case"object":switch(o.$$typeof){case t:case n:_=!0;break;case y:return I((_=o._init)(o._payload),u,i,c,s)}}if(_)return s=s(o),_=""===c?"."+O(o,0):c,j(s)?(i="",null!=_&&(i=_.replace(T,"$&/")+"/"),I(s,u,i,"",function(t){return t})):null!=s&&($(s)&&(l=s,p=i+(null==s.key||o&&o.key===s.key?"":(""+s.key).replace(T,"$&/")+"/")+_,s=C(l.type,p,void 0,0,0,l.props)),u.push(s)),1;_=0;var v,b=""===c?".":c+":";if(j(o))for(var S=0;S<o.length;S++)_+=I(c=o[S],u,i,f=b+O(c,S),s);else if("function"==typeof(S=null===(v=o)||"object"!=typeof v?null:"function"==typeof(v=h&&v[h]||v["@@iterator"])?v:null))for(o=S.call(o),S=0;!(c=o.next()).done;)_+=I(c=c.value,u,i,f=b+O(c,S++),s);else if("object"===f){if("function"==typeof o.then)return I(A(o),u,i,c,s);throw u=String(o),Error("Objects are not valid as a React child (found: "+("[object Object]"===u?"object with keys {"+Object.keys(o).join(", ")+"}":u)+"). If you meant to render a collection of children, use an array instead.")}return _}function P(t,n,o){if(null==t)return t;var u=[],i=0;return I(t,u,"","",function(t){return n.call(o,t,i++)}),u}function U(t){if(-1===t._status){var n=t._result;(n=n()).then(function(n){0!==t._status&&-1!==t._status||(t._status=1,t._result=n)},function(n){0!==t._status&&-1!==t._status||(t._status=2,t._result=n)}),-1===t._status&&(t._status=0,t._result=n)}if(1===t._status)return t._result.default;throw t._result}var N="function"==typeof reportError?reportError:function(t){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof t&&null!==t&&"string"==typeof t.message?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",t);console.error(t)};function M(){}e.Children={map:P,forEach:function(t,n,o){P(t,function(){n.apply(this,arguments)},o)},count:function(t){var n=0;return P(t,function(){n++}),n},toArray:function(t){return P(t,function(t){return t})||[]},only:function(t){if(!$(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},e.Component=S,e.Fragment=o,e.Profiler=i,e.PureComponent=w,e.StrictMode=u,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,e.__COMPILER_RUNTIME={__proto__:null,c:function(t){return H.H.useMemoCache(t)}},e.cache=function(t){return function(){return t.apply(null,arguments)}},e.cloneElement=function(t,n,o){if(null==t)throw Error("The argument must be a React element, but you passed "+t+".");var u=v({},t.props),i=t.key;if(null!=n)for(c in void 0!==n.ref&&void 0,void 0!==n.key&&(i=""+n.key),n)!k.call(n,c)||"key"===c||"__self"===c||"__source"===c||"ref"===c&&void 0===n.ref||(u[c]=n[c]);var c=arguments.length-2;if(1===c)u.children=o;else if(1<c){for(var s=Array(c),f=0;f<c;f++)s[f]=arguments[f+2];u.children=s}return C(t.type,i,void 0,0,0,u)},e.createContext=function(t){return(t={$$typeof:s,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}
vendor: 5,232 bytes, lines 66-78
66).Provider=t,t.Consumer={$$typeof:c,_context:t},t},e.createElement=function(t,n,o){var u,i={},c=null;if(null!=n)for(u in void 0!==n.key&&(c=""+n.key),n)k.call(n,u)&&"key"!==u&&"__self"!==u&&"__source"!==u&&(i[u]=n[u]);var s=arguments.length-2;if(1===s)i.children=o;else if(1<s){for(var f=Array(s),l=0;l<s;l++)f[l]=arguments[l+2];i.children=f}if(t&&t.defaultProps)for(u in s=t.defaultProps)void 0===i[u]&&(i[u]=s[u]);return C(t,c,void 0,0,0,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:f,render:t}},e.isValidElement=$,e.lazy=function(t){return{$$typeof:y,_payload:{_status:-1,_result:t},_init:U}},e.memo=function(t,n){return{$$typeof:p,type:t,compare:void 0===n?null:n}},e.startTransition=function(t){var n=H.T,o={};H.T=o;try{var u=t(),i=H.S;null!==i&&i(o,u),"object"==typeof u&&null!==u&&"function"==typeof u.then&&u.then(M,N)}catch(t){N(t)}finally{H.T=n}},e.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},e.use=function(t){return H.H.use(t)},e.useActionState=function(t,n,o){return H.H.useActionState(t,n,o)},e.useCallback=function(t,n){return H.H.useCallback(t,n)},e.useContext=function(t){return H.H.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t,n){return H.H.useDeferredValue(t,n)},e.useEffect=function(t,n,o){var u=H.H;if("function"==typeof o)throw Error("useEffect CRUD overload is not enabled in this build of React.");return u.useEffect(t,n)},e.useId=function(){return H.H.useId()},e.useImperativeHandle=function(t,n,o){return H.H.useImperativeHandle(t,n,o)},e.useInsertionEffect=function(t,n){return H.H.useInsertionEffect(t,n)},e.useLayoutEffect=function(t,n){return H.H.useLayoutEffect(t,n)},e.useMemo=function(t,n){return H.H.useMemo(t,n)},e.useOptimistic=function(t,n){return H.H.useOptimistic(t,n)},e.useReducer=function(t,n,o){return H.H.useReducer(t,n,o)},e.useRef=function(t){return H.H.useRef(t)},e.useState=function(t){return H.H.useState(t)},e.useSyncExternalStore=function(t,n,o){return H.H.useSyncExternalStore(t,n,o)},e.useTransition=function(){return H.H.useTransition()},e.version="19.1.0"},35,[]);
67__d(function(g,r,i,a,m,e,d){'use strict';!(function _(){if('undefined'!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&'function'==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(_){console.error(_)}})(),m.exports=r(d[0])},36,[37]);
68__d(function(g,r,_i,_a,m,e,d){
69/**
70   * @license React
71   * react-dom.production.js
72   *
73   * Copyright (c) Meta Platforms, Inc. and affiliates.
74   *
75   * This source code is licensed under the MIT license found in the
76   * LICENSE file in the root directory of this source tree.
77   */
78"use strict";var t=r(d[0]);function i(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)i+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(i(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function f(t,i,n){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==o?null:""+o,children:t,containerInfo:i,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(t,i){return"font"===t?"":"string"==typeof i?"use-credentials"===i?i:"":void 0}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(t,n){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!n||1!==n.nodeType&&9!==n.nodeType&&11!==n.nodeType)throw Error(i(299));return f(t,n,null,o)},e.flushSync=function(t){var i=c.T,n=o.p;try{if(c.T=null,o.p=2,t)return t()}finally{c.T=i,o.p=n,o.d.f()}},e.preconnect=function(t,i){"string"==typeof t&&(i?i="string"==typeof(i=i.crossOrigin)?"use-credentials"===i?i:"":void 0:i=null,o.d.C(t,i))},e.prefetchDNS=function(t){"string"==typeof t&&o.d.D(t)},e.preinit=function(t,i){if("string"==typeof t&&i&&"string"==typeof i.as){var n=i.as,s=y(n,i.crossOrigin),f="string"==typeof i.integrity?i.integrity:void 0,c="string"==typeof i.fetchPriority?i.fetchPriority:void 0;"style"===n?o.d.S(t,"string"==typeof i.precedence?i.precedence:void 0,{crossOrigin:s,integrity:f,fetchPriority:c}):"script"===n&&o.d.X(t,{crossOrigin:s,integrity:f,fetchPriority:c,nonce:"string"==typeof i.nonce?i.nonce:void 0})}},e.preinitModule=function(t,i){if("string"==typeof t)if("object"==typeof i&&null!==i){if(null==i.as||"script"===i.as){var n=y(i.as,i.crossOrigin);o.d.M(t,{crossOrigin:n,integrity:"string"==typeof i.integrity?i.integrity:void 0,nonce:"string"==typeof i.nonce?i.nonce:void 0})}}else null==i&&o.d.M(t)},e.preload=function(t,i){if("string"==typeof t&&"object"==typeof i&&null!==i&&"string"==typeof i.as){var n=i.as,s=y(n,i.crossOrigin);o.d.L(t,n,{crossOrigin:s,integrity:"string"==typeof i.integrity?i.integrity:void 0,nonce:"string"==typeof i.nonce?i.nonce:void 0,type:"string"==typeof i.type?i.type:void 0,fetchPriority:"string"==typeof i.fetchPriority?i.fetchPriority:void 0,referrerPolicy:"str
78ing"==typeof i.referrerPolicy?i.referrerPolicy:void 0,imageSrcSet:"string"==typeof i.imageSrcSet?i.imageSrcSet:void 0,imageSizes:"string"==typeof i.imageSizes?i.imageSizes:void 0,media:"string"==typeof i.media?i.media:void 0})}},e.preloadModule=function(t,i){if("string"==typeof t)if(i){var n=y(i.as,i.crossOrigin);o.d.m(t,{as:"string"==typeof i.as&&"script"!==i.as?i.as:void 0,crossOrigin:n,integrity:"string"==typeof i.integrity?i.integrity:void 0})}else o.d.m(t)},e.requestFormReset=function(t){o.d.r(t)},e.unstable_batchedUpdates=function(t,i){return t(i)},e.useFormState=function(t,i,n){return c.H.useFormState(t,i,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.1.0"},37,[34]);
79__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.createSheet=function(e,f){void 0===f&&(f=s);var h;if(t.default){var b=null!=e?e.getRootNode():document;if(0===l.length)h=(0,u.default)((0,n.default)(f)),c.forEach(e=>{h.insert(e,0)}),o.set(b,l.length),l.push(h);else{var p=o.get(b);if(null==p){var v=l[0],k=null!=v?v.getTextContent():'';h=(0,u.default)((0,n.default)(f,b,k)),o.set(b,l.length),l.push(h)}else h=l[p]}}else 0===l.length?(h=(0,u.default)((0,n.default)(f)),c.forEach(e=>{h.insert(e,0)}),l.push(h)):h=l[0];return{getTextContent:()=>h.getTextContent(),id:f,insert(e,t){l.forEach(n=>{n.insert(e,t)})}}};var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2])),s='react-native-stylesheet',o=new WeakMap,l=[],c=['html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}','body{margin:0;}','button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}','input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}']},38,[39,40,41]);
80__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var n=!('undefined'==typeof window||!window.document||!window.document.createElement)},39,[]);
81__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};function u(e,t,u){if(n.default){var l=null!=t?t:document,o=l.getElementById(e);if(null==o)if((o=document.createElement('style')).setAttribute('id',e),'string'==typeof u&&o.appendChild(document.createTextNode(u)),l instanceof ShadowRoot)l.insertBefore(o,l.firstChild);else{var f=l.head;f&&f.insertBefore(o,f.firstChild)}return o.sheet}return null}},40,[39]);
82__d(function(g,r,_i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return e}});var t=Array.prototype.slice;function e(e){var u,a={},c={};null!=e&&t.call(e.cssRules).forEach((t,e)=>{var n=t.cssText;if(n.indexOf('stylesheet-group')>-1)u=l(t),a[u]={start:e,rules:[n]};else{var s=i(n);null!=s&&(c[s]=!0,a[u].rules.push(n))}});function f(t,e,n){var u=s(a),l=u.indexOf(e)+1,i=u[l],c=null!=i&&null!=a[i].start?a[i].start:t.cssRules.length,f=o(t,n,c);if(f){null==a[e].start&&(a[e].start=c);for(var v=l;v<u.length;v+=1){var p=u[v],h=a[p].start||0;a[p].start=h+1}}return f}var v={getTextContent:()=>s(a).map(t=>{var e=a[t].rules,n=e.shift();return e.sort(),e.unshift(n),e.join('\n')}).join('\n'),insert(t,u){var l=Number(u);if(null==a[l]){var s=n(l);a[l]={start:null,rules:[s]},null!=e&&f(e,l,s)}var o=i(t);null!=o&&null==c[o]&&(c[o]=!0,a[l].rules.push(t),null!=e&&(f(e,l,t)||a[l].rules.pop()))}};return v}function n(t){return"[stylesheet-group=\""+t+"\"]{}"}var u=/["']/g;function l(t){return Number(t.selectorText.split(u)[1])}function s(t){return Object.keys(t).map(Number).sort((t,e)=>t>e?1:-1)}var a=/\s*([,])\s*/g;function i(t){var e=t.split('{')[0].trim();return''!==e?e.replace(a,'$1'):null}function o(t,e,n){try{return t.insertRule(e,n),!0}catch(t){return!1}}},41,[]);
83__d(function(g,r,_i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}
83Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return S}});var e=t(r(d[0])),n=t(r(d[1])),i=r(d[2]),o=r(d[3]),l=r(d[4]),u=r(d[5]),c=r(d[6]),f=(r(d[7]),t(r(d[8]))),s=["writingDirection"],_=new WeakMap,v=(0,o.createSheet)(),O={shadow:!0,textShadow:!0};function w(t,i){void 0===i&&(i={});var o=i,f=o.writingDirection,v=(0,n.default)(o,s),w='rtl'===f;return c.styleq.factory({transform(t){var n=_.get(t);return null!=n?(0,l.localizeStyle)(n,w):(0,u.preprocess)(t,(0,e.default)((0,e.default)({},O),v))}})(t)}function h(t){t.forEach(t=>{var e=t[0],n=t[1];null!=v&&e.forEach(t=>{v.insert(t,n)})})}function p(t,e){var n=(0,i.classic)(t,e),o=n[0];return h(n[1]),o}var b={position:'absolute',left:0,right:0,top:0,bottom:0},y=A({x:(0,e.default)({},b)}).x;function A(t){return Object.keys(t).forEach(e=>{var n,o,l,c,f=t[e];null!=f&&!0!==f.$$css&&(e.indexOf('$raw')>-1?n=p(f,e.split('$raw')[0]):(o=f,l=(0,i.atomic)((0,u.preprocess)(o,O)),c=l[0],h(l[1]),n=c),_.set(f,n))}),t}function E(t,e){void 0===e&&(e={});var n='rtl'===e.writingDirection,o=w(t,e);return Array.isArray(o)&&null!=o[1]&&(o[1]=(0,i.inline)(o[1],n)),o}E.absoluteFill=y,E.absoluteFillObject=b,E.create=A,E.compose=function(t,e){return[t,e]},E.flatten=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var i=e.flat(1/0),o={},l=0;l<i.length;l++){var u=i[l];null!=u&&'object'==typeof u&&Object.assign(o,u)}return o},E.getSheet=function(){return{id:v.id,textContent:v.getTextContent()}},E.hairlineWidth=1,f.default&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=E.flatten);var S=E},42,[19,43,44,38,84,86,88,89,39]);
84__d(function(g,_r,i,a,m,_e,d){"use strict";function e(e,n){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(-1!==n.indexOf(t))continue;r[t]=e[t]}return r}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return e}})},43,[]);
85__d(function(g,r,_i,a,m,_e,d){"use strict";function n(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.atomic=function(n){var e={$$css:!0},t=[];function i(n,e,i){var o,l=J(i,e),s=e+l,u=p.get(s);if(null!=u)o=u[0],t.push(u[1]);else{o=T('r',n,n!==e?s:l);var f=v[n]||h,c=[K(o,e,i),f];t.push(c),p.set(s,[o,c])}return o}return Object.keys(n).sort().forEach(t=>{var o=n[t];if(null!=o){var l;if(P.indexOf(t)>-1){var s=i(t,t,'left'),u=i(t,t,'right');'start'===o?l=[s,u]:'end'===o&&(l=[u,s])}var f=N[t];if(null!=f){var p=i(t,f,o),c=i(t,_[f],o);l=[p,c]}if('transitionProperty'===t){for(var b=Array.isArray(o)?o:[o],h=[],v=0;v<b.length;v++){var y=b[v];'string'==typeof y&&null!=N[y]&&h.push(v)}if(h.length>0){var S=[...b],E=[...b];h.forEach(n=>{var e=S[n];if('string'==typeof e){var o=N[e],s=_[o];S[n]=o,E[n]=s;var u=i(t,t,S),f=i(t,t,E);l=[u,f]}})}}null==l?l=i(t,t,o):e.$$css$localize=!0,e[t]=l}}),[e,t]},_e.classic=function(n,i){var o,l={$$css:!0},s=[],u=n.animationKeyframes,p=(0,t.default)(n,f),c=T('css',i,JSON.stringify(n)),h="."+c;if(null!=u){var v=V(u),y=v[0],S=v[1];o=y.join(','),s.push(...S)}var E=M((0,e.default)((0,e.default)({},p),{},{animationName:o}));return s.push(""+h+E),l[c]=c,[l,[[s,b]]]},_e.inline=function(n,e){var t=n||c,o={},l={},s=function(){var n=t[u],i=u,s=n;if(!Object.prototype.hasOwnProperty.call(t,u)||null==n)return"continue";P.indexOf(u)>-1&&('start'===n?s=e?'right':'left':'end'===n&&(s=e?'left':'right'));var f=N[u];if(null!=f&&(i=e?_[f]:f),'transitionProperty'===u){var p=Array.isArray(n)?n:[n];p.forEach((n,t)=>{if('string'==typeof n){var i=N[n];null!=i&&(p[t]=e?_[i]:i,s=p.join(' '))}})}o[i]||(l[i]=s),i===u&&(o[i]=!0)};for(var u in t)s();return(0,i.default)(l,!0)},_e.stringifyValueWithProperty=J;var e=n(r(d[0])),t=n(r(d[1])),i=n(r(d[2])),o=n(r(d[3])),l=n(r(d[4])),s=n(r(d[5])),u=n(r(d[6])),f=["animationKeyframes"],p=new Map,c={},b=1,h=3,v={borderColor:2,borderRadius:2,borderStyle:2,borderWidth:2,display:2,flex:2,inset:2,margin:2,overflow:2,overscrollBehavior:2,padding:2,insetBlock:2.1,insetInline:2.1,marginInline:2.1,marginBlock:2.1,paddingInline:2.1,paddingBlock:2.1,borderBlockStartColor:2.2,borderBlockStartStyle:2.2,borderBlockStartWidth:2.2,borderBlockEndColor:2.2,borderBlockEndStyle:2.2,borderBlockEndWidth:2.2,borderInlineStartColor:2.2,borderInlineStartStyle:2.2,borderInlineStartWidth:2.2,borderInlineEndColor:2.2,borderInlineEndStyle:2.2,borderInlineEndWidth:2.2,borderEndStartRadius:2.2,borderEndEndRadius:2.2,borderStartStartRadius:2.2,borderStartEndRadius:2.2,insetBlockEnd:2.2,insetBlockStart:2.2,insetInlineEnd:2.2,insetInlineStart:2.2,marginBlockStart:2.2,marginBlockEnd:2.2,marginInlineStart:2.2,marginInlineEnd:2.2,paddingBlockStart:2.2,paddingBlockEnd:2.2,paddingInlineStart:2.2,paddingInlineEnd:2.2},y='borderTopLeftRadius',S='borderTopRightRadius',E='borderBottomLeftRadius',I='borderBottomRightRadius',k='borderLeftColor',R='borderLeftStyle',B='borderLeftWidth',W='borderRightColor',j='borderRightStyle',C='borderRightWidth',O='right',w='marginLeft',A='marginRight',x='paddingLeft',L='paddingRight',$
85='left',_={[y]:S,[S]:y,[E]:I,[I]:E,[k]:W,[R]:j,[B]:C,[W]:k,[j]:R,[C]:B,[$]:O,[w]:A,[A]:w,[x]:L,[L]:x,[O]:$},N={borderStartStartRadius:y,borderStartEndRadius:S,borderEndStartRadius:E,borderEndEndRadius:I,borderInlineStartColor:k,borderInlineStartStyle:R,borderInlineStartWidth:B,borderInlineEndColor:W,borderInlineEndStyle:j,borderInlineEndWidth:C,insetInlineEnd:O,insetInlineStart:$,marginInlineStart:w,marginInlineEnd:A,paddingInlineStart:x,paddingInlineEnd:L},P=['clear','float','textAlign'];function J(n,e){var t=(0,s.default)(n,e);return'string'!=typeof t?JSON.stringify(t||''):t}function K(n,e,t){var i=[],o="."+n;switch(e){case'animationKeyframes':var l=V(t),s=l[0],u=l[1],f=M({animationName:s.join(',')});i.push(""+o+f,...u);break;case'placeholderTextColor':var p=M({color:t,opacity:1});i.push(o+"::-webkit-input-placeholder"+p,o+"::-moz-placeholder"+p,o+":-ms-input-placeholder"+p,o+"::placeholder"+p);break;case'pointerEvents':var c=t;if('auto'===t)c='auto!important';else if('none'===t){c='none!important';var b=M({pointerEvents:'none'});i.push(o+">* "+b)}else if('box-none'===t){c='none!important';var h=M({pointerEvents:'auto'});i.push(o+">* "+h)}else if('box-only'===t){c='auto!important';var v=M({pointerEvents:'none'});i.push(o+">* "+v)}var y=M({pointerEvents:c});i.push(""+o+y);break;case'scrollbarWidth':'none'===t&&i.push(o+"::-webkit-scrollbar{display:none}");var S=M({scrollbarWidth:t});i.push(""+o+S);break;default:var E=M({[e]:t});i.push(""+o+E)}return i}function M(n){var e=(0,u.default)((0,i.default)(n));return"{"+Object.keys(e).map(n=>{var t=e[n],i=(0,l.default)(n);return Array.isArray(t)?t.map(n=>i+":"+n).join(';'):i+":"+t}).sort().join(';')+";}"}function T(n,e,t){return n+"-"+(0,o.default)(e+t)}function z(n){var e=T('r','animation',JSON.stringify(n)),t='{'+Object.keys(n).map(e=>""+e+M(n[e])).join('')+'}',i=['-webkit-',''].map(n=>"@"+n+"keyframes "+e+t);return[e,i]}function V(n){if('number'==typeof n)throw new Error("Invalid CSS keyframes type: "+typeof n);var e=[],t=[];return(Array.isArray(n)?n:[n]).forEach(n=>{if('string'==typeof n)e.push(n);else{var i=z(n),o=i[0],l=i[1];e.push(o),t.push(...l)}}),[e,t]}},44,[19,43,45,52,53,46,54]);
86__d(function(g,r,_i,a,m,_e,d){"use strict";function o(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var e=o(r(d[0])),t=o(r(d[1])),i={},n=!t.default||null!=window.CSS&&null!=window.CSS.supports&&(window.CSS.supports('text-decoration-line','none')||window.CSS.supports('-webkit-text-decoration-line','none')),l='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif',b={borderColor:['borderTopColor','borderRightColor','borderBottomColor','borderLeftColor'],borderBlockColor:['borderTopColor','borderBottomColor'],borderInlineColor:['borderRightColor','borderLeftColor'],borderRadius:['borderTopLeftRadius','borderTopRightRadius','borderBottomRightRadius','borderBottomLeftRadius'],borderStyle:['borderTopStyle','borderRightStyle','borderBottomStyle','borderLeftStyle'],borderBlockStyle:['borderTopStyle','borderBottomStyle'],borderInlineStyle:['borderRightStyle','borderLeftStyle'],borderWidth:['borderTopWidth','borderRightWidth','borderBottomWidth','borderLeftWidth'],borderBlockWidth:['borderTopWidth','borderBottomWidth'],borderInlineWidth:['borderRightWidth','borderLeftWidth'],insetBlock:['top','bottom'],insetInline:['left','right'],marginBlock:['marginTop','marginBottom'],marginInline:['marginRight','marginLeft'],paddingBlock:['paddingTop','paddingBottom'],paddingInline:['paddingRight','paddingLeft'],overflow:['overflowX','overflowY'],overscrollBehavior:['overscrollBehaviorX','overscrollBehaviorY'],borderBlockStartColor:['borderTopColor'],borderBlockStartStyle:['borderTopStyle'],borderBlockStartWidth:['borderTopWidth'],borderBlockEndColor:['borderBottomColor'],borderBlockEndStyle:['borderBottomStyle'],borderBlockEndWidth:['borderBottomWidth'],borderEndStartRadius:['borderBottomLeftRadius'],borderEndEndRadius:['borderBottomRightRadius'],borderStartStartRadius:['borderTopLeftRadius'],borderStartEndRadius:['borderTopRightRadius'],insetBlockEnd:['bottom'],insetBlockStart:['top'],marginBlockStart:['marginTop'],marginBlockEnd:['marginBottom'],paddingBlockStart:['paddingTop'],paddingBlockEnd:['paddingBottom']},p=(o,t)=>{if(!o)return i;var p={},s=function(){var i=o[f];if(null==i)return"continue";if('backgroundClip'===f)'text'===i&&(p.backgroundClip=i,p.WebkitBackgroun
86dClip=i);else if('flex'===f)-1===i?(p.flexGrow=0,p.flexShrink=1,p.flexBasis='auto'):p.flex=i;else if('font'===f)p[f]=i.replace('System',l);else if('fontFamily'===f)if(i.indexOf('System')>-1){var s=i.split(/,\s*/);s[s.indexOf('System')]=l,p[f]=s.join(',')}else p[f]='monospace'===i?"monospace,monospace":i;else if('textDecorationLine'===f)n?p.textDecorationLine=i:p.textDecoration=i;else if('writingDirection'===f)p.direction=i;else{var c=(0,e.default)(o[f],f),u=b[f];t&&'inset'===f?(null==o.insetInline&&(p.left=c,p.right=c),null==o.insetBlock&&(p.top=c,p.bottom=c)):t&&'margin'===f?(null==o.marginInline&&(p.marginLeft=c,p.marginRight=c),null==o.marginBlock&&(p.marginTop=c,p.marginBottom=c)):t&&'padding'===f?(null==o.paddingInline&&(p.paddingLeft=c,p.paddingRight=c),null==o.paddingBlock&&(p.paddingTop=c,p.paddingBottom=c)):u?u.forEach((e,t)=>{null==o[e]&&(p[e]=c)}):p[f]=c}};for(var f in o)s();return p}},45,[46,39]);
87__d(function(g,r,i,a,m,_e,d){"use strict";function o(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e=o(r(d[0])),t=o(r(d[1])),l={backgroundColor:!0,borderColor:!0,borderTopColor:!0,borderRightColor:!0,borderBottomColor:!0,borderLeftColor:!0,color:!0,shadowColor:!0,textDecorationColor:!0,textShadowColor:!0};function u(o,u){var n=o;return null!=u&&e.default[u]||'number'!=typeof o?null!=u&&l[u]&&(n=(0,t.default)(o)):n=o+"px",n}},46,[47,48]);
88__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},o=['ms','Moz','O','Webkit'],l=(t,o)=>t+o.charAt(0).toUpperCase()+o.substring(1);Object.keys(t).forEach(n=>{o.forEach(o=>{t[l(o,n)]=t[n]})});var n=t},47,[]);
89__d(function(_g,_r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(_r(d[0])),u=e(_r(d[1])),n=function(e,n){if(void 0===n&&(n=1),null!=e){if('string'==typeof e&&(0,t.default)(e))return e;var r=(0,u.default)(e);if(null!=r)return"rgba("+(r>>16&255)+","+(r>>8&255)+","+(255&r)+","+((r>>24&255)/255*n).toFixed(2)+")"}}},48,[49,50]);
90__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=t=>'currentcolor'===t||'currentColor'===t||'inherit'===t||0===t.indexOf('var(')},49,[]);
91__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=e=>{if(null==e)return e;var t=(0,u.default)(e);return null!=t?t=(t<<24|t>>>8)>>>0:void 0}},50,[51]);
92__d(function(_g,_r,i,a,m,e,d){'use strict';function r(r,n,t){return t<0&&(t+=1),t>1&&(t-=1),t<.16666666666666666?r+6*(n-r)*t:t<.5?n:t<.6666666666666666?r+(n-r)*(.6666666666666666-t)*6:r}function n(n,t,s){const u=s<.5?s*(1+t):s+t-s*t,c=2*s-u,l=r(c,u,n+.3333333333333333),o=r(c,u,n),g=r(c,u,n-.3333333333333333);return Math.round(255*l)<<24|Math.round(255*o)<<16|Math.round(255*g)<<8}function t(n,t,s){if(t+s>=1){const r=Math.round(255*t/(t+s));return r<<24|r<<16|r<<8}const u=r(0,1,n+.3333333333333333)*(1-t-s)+t,c=r(0,1,n)*(1-t-s)+t,l=r(0,1,n-.3333333333333333)*(1-t-s)+t;return Math.round(255*u)<<24|Math.round(255*c)<<16|Math.round(255*l)<<8}const s='[-+]?\\d*\\.?\\d+',u="[-+]?\\d*\\.?\\d+%";function c(...r){return'\\(\\s*('+r.join(')\\s*,?\\s*(')+')\\s*\\)'}function l(...r){return'\\(\\s*('+r.slice(0,r.length-1).join(')\\s*,?\\s*(')+')\\s*/\\s*('+r[r.length-1]+')\\s*\\)'}function o(...r){return'\\(\\s*('+r.join(')\\s*,\\s*(')+')\\s*\\)'}let g;function h(){return void 0===g&&(g={rgb:new RegExp('rgb'+c(s,s,s)),rgba:new RegExp('rgba('+o(s,s,s,s)+'|'+l(s,s,s,s)+')'),hsl:new RegExp('hsl'+c(s,u,u)),hsla:new RegExp('hsla('+o(s,u,u,s)+'|'+l(s,u,u,s)+')'),hwb:new RegExp('hwb'+c(s,u,u)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/}),g}function b(r){const n=parseInt(r,10);return n<0?0:n>255?255:n}function p(r){return(parseFloat(r)%360+360)%360/360}function f(r){const n=parseFloat(r);return n<0?0:n>1?255:Math.round(255*n)}function y(r){const n=parseFloat(r);return n<0?0:n>100?1:n/100}function k(r){switch(r){case'transparent':return 0;case'aliceblue':return 4042850303;case'antiquewhite':return 4209760255;case'aqua':case'cyan':return 16777215;case'aquamarine':return 2147472639;case'azure':return 4043309055;case'beige':return 4126530815;case'bisque':return 4293182719;case'black':return 255;case'blanchedalmond':return 4293643775;case'blue':return 65535;case'blueviolet':return 2318131967;case'brown':return 2771004159;case'burlywood':return 3736635391;case'burntsienna':return 3934150143;case'cadetblue':return 1604231423;case'chartreuse':return 2147418367;case'chocolate':return 3530104575;case'coral':return 4286533887;case'cornflowerblue':return 1687547391;case'cornsilk':return 4294499583;case'crimson':return 3692313855;
92case'darkblue':return 35839;case'darkcyan':return 9145343;case'darkgoldenrod':return 3095792639;case'darkgray':case'darkgrey':return 2846468607;case'darkgreen':return 6553855;case'darkkhaki':return 3182914559;case'darkmagenta':return 2332068863;case'darkolivegreen':return 1433087999;case'darkorange':return 4287365375;case'darkorchid':return 2570243327;case'darkred':return 2332033279;case'darksalmon':return 3918953215;case'darkseagreen':return 2411499519;case'darkslateblue':return 1211993087;case'darkslategray':case'darkslategrey':return 793726975;case'darkturquoise':return 13554175;case'darkviolet':return 2483082239;case'deeppink':return 4279538687;case'deepskyblue':return 12582911;case'dimgray':case'dimgrey':return 1768516095;case'dodgerblue':return 512819199;case'firebrick':return 2988581631;case'floralwhite':return 4294635775;case'forestgreen':return 579543807;case'fuchsia':case'magenta':return 4278255615;case'gainsboro':return 3705462015;case'ghostwhite':return 4177068031;case'gold':return 4292280575;case'goldenrod':return 3668254975;case'gray':case'grey':return 2155905279;case'green':return 8388863;case'greenyellow':return 2919182335;case'honeydew':return 4043305215;case'hotpink':return 4285117695;case'indianred':return 3445382399;case'indigo':return 1258324735;case'ivory':return 4294963455;case'khaki':return 4041641215;case'lavender':return 3873897215;case'lavenderblush':return 4293981695;case'lawngreen':return 2096890111;case'lemonchiffon':return 4294626815;case'lightblue':return 2916673279;case'lightcoral':return 4034953471;case'lightcyan':return 3774873599;case'lightgoldenrodyellow':return 4210742015;case'lightgray':case'lightgrey':return 3553874943;case'lightgreen':return 2431553791;case'lightpink':return 4290167295;case'lightsalmon':return 4288707327;case'lightseagreen':return 548580095;case'lightskyblue':return 2278488831;case'lightslategray':case'lightslategrey':return 2005441023;case'lightsteelblue':return 2965692159;case'lightyellow':return 4294959359;case'lime':return 16711935;case'limegreen':return 852308735;case'linen':return 4210091775;case'maroon':return 2147483903;case'mediumaquamarine':return 1724754687;case'mediumblue':return 52735;case'mediumorchid':return 3126187007;case'mediumpurple':return 2473647103;case'mediumseagreen':return 1018393087;case'mediumslateblue':return 2070474495;case'mediumspringgreen':return 16423679;case'mediumturquoise':return 1221709055;case'mediumvioletred':return 3340076543;case'midnightblue':return 421097727;case'mintcream':return 4127193855;case'mistyrose':return 4293190143;case'moccasin':return 4293178879;case'navajowhite':return 4292783615;case'navy':return 33023;case'oldlace':return 4260751103;case'olive':return 2155872511;case'olivedrab':return 1804477439;case'orange':return 4289003775;case'orangered':return 4282712319;case'orchid':return 3664828159;case'palegoldenrod':return 4008225535;case'palegreen':return 2566625535;case'paleturquoise':return 2951671551;case'palevioletred':return 3681588223;case'papayawhip':return 4293907967;case'peachpuff':return 4292524543;case'peru':return 3448061951;case'pink':return 4290825215;case'plum':return 3718307327;case'powderblue':return 2967529215;case'purple':return 2147516671;case'rebeccapurple':return 1714657791;case'red':return 4278190335;case'rosybrown':return 3163525119;case'royalblue':return 1097458175;case'saddlebrown':return 2336560127;case'salmon':return 4202722047;case'sandybrown':return 4104413439;case'seagreen':return 780883967;case'seashell':return 4294307583;case'sienna':return 2689740287;case'silver':return 3233857791;case'skyblue':return 2278484991;case'slateblue':return 1784335871;case'slategray':case'slategrey':return 1887473919;case'snow':return 4294638335;case'springgreen':return 16744447;case'steelblue':return 1182971135;case'tan':return 3535047935;case'teal':return 8421631;case'thistle':return 3636451583;case'tomato':return 4284696575;case'turquoise':return 1088475391;case'violet':return 4001558271;case'wheat':return 4125012991;case'white':return 4294967295;case'whitesmoke':return 4126537215;case'yellow':return 4294902015;case'yellowgreen':return 2597139199}return null}m.exports=function(r){if('number'==typeof r)return r>>>0===r&&r>=0&&r<=4294967295?r:null;if('string'!=typeof r)return null;const s=h();let u;if(u=s.hex6.exec(r))return parseInt(u[1]+'ff',16)>>>0;const c=k(r);return null!=c?c:(u=s.rgb.exec(r))?(b(u[1])<<24|b(u[2])<<16|b(u[3])<<8|255)>>>0:(u=s.rgba.exec(r))?void 0!==u[6]?(b(u[6])<<24|b(u[7])<<16|b(u[8])<<8|f(u[9]))>>>0:(b(u[2])<<24|b(u[3])<<16|b(u[4])<<8|f(u[5]))>>>0:(u=s.hex3.exec(r))?parseInt(u[1]+u[1]+u[2]+u[2]+u[3]+u[3]+'ff',16)>>>0:(u=s.hex8.exec(r))?parseInt(u[1],16)>>>0:(u=s.hex4.exec(r))?parseInt(u[1]+u[1]+u[2]+u[2]+u[3]+u[3]+u[4]+u[4],16)>>>0:(u=s.hsl.exec(r))?(255|n(p(u[1]),y(u[2]),y(u[3])))>>>0:(u=s.hsla.exec(r))?void 0!==u[6]?(n(p(u[6]),y(u[7]),y(u[8]))|f(u[9]))>>>0:(n(p(u[2]),y(u[3]),y(u[4]))|f(u[5]))>>>0:(u=s.hwb.exec(r))?(255|t(p(u[1]),y(u[2]),y(u[3])))>>>0:null}},51,[]);
93__d(function(g,r,_i,a,m,e,d){"use strict";function t(t,c){for(var o,n=t.length,u=c^n,h=0;n>=4;)o=1540483477*(65535&(o=255&t.charCodeAt(h)|(255&t.charCodeAt(++h))<<8|(255&t.charCodeAt(++h))<<16|(255&t.charCodeAt(++h))<<24))+((1540483477*(o>>>16)&65535)<<16),u=1540483477*(65535&u)+((1540483477*(u>>>16)&65535)<<16)^(o=1540483477*(65535&(o^=o>>>24))+((1540483477*(o>>>16)&65535)<<16)),n-=4,++h;switch(n){case 3:u^=(255&t.charCodeAt(h+2))<<16;case 2:u^=(255&t.charCodeAt(h+1))<<8;case 1:u=1540483477*(65535&(u^=255&t.charCodeAt(h)))+((1540483477*(u>>>16)&65535)<<16)}return u=1540483477*(65535&(u^=u>>>13))+((1540483477*(u>>>16)&65535)<<16),(u^=u>>>15)>>>0}
93Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return c}});var c=c=>t(c,1).toString(36)},52,[]);
94__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return c}});var t=/[A-Z]/g,n=/^ms-/,u={};function o(t){return'-'+t.toLowerCase()}var c=function(c){if(c in u)return u[c];var f=c.replace(t,o);return u[c]=n.test(f)?'-'+f:f}},53,[]);
95__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(r(d[0])),u=e(r(d[1])),n=(0,t.default)(u.default)},54,[55,61]);
96__d(function(g,r,_i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(l){var i=l.prefixMap,o=l.plugins;return function l(s){for(var v in s){var c=s[v];if((0,n.default)(c))s[v]=l(c);else if(Array.isArray(c)){for(var _=[],p=0,y=c.length;p<y;++p){var M=(0,u.default)(o,v,c[p],s,i);(0,f.default)(_,M||c[p])}_.length>0&&(s[v]=_)}else{var h=(0,u.default)(o,v,c,s,i);h&&(s[v]=h),s=(0,t.default)(i,v,s)}}return s}};var t=l(r(d[0])),u=l(r(d[1])),f=l(r(d[2])),n=l(r(d[3]));function l(t){return t&&t.__esModule?t:{default:t}}},55,[56,58,59,60]);
97__d(function(g,r,_i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,u,n){var l=t[u];if(l&&n.hasOwnProperty(u))for(var o=(0,f.default)(u),_=0;_<l.length;++_){var i=l[_]+o;n[i]||(n[i]=n[u])}return n};var t,u=r(d[0]),f=(t=u)&&t.__esModule?t:{default:t}},56,[57]);
98__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}},57,[]);
99__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,n,u,f,i){for(var o=0,c=t.length;o<c;++o){var l=t[o](n,u,f,i);if(l)return l}}},58,[]);
100__d(function(g,r,_i,a,m,e,d){"use strict";function n(n,t){-1===n.indexOf(t)&&n.push(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,f){if(Array.isArray(f))for(var i=0,u=f.length;i<u;++i)n(t,f[i]);else n(t,f)}},59,[]);
101__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t instanceof Object&&!Array.isArray(t)}},60,[]);
102__d(function(g,r,i,a,_m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return k}});var t=e(r(d[0])),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),m=e(r(d[5])),u=['Webkit'],c=['Webkit','ms'],k={plugins:[t.default,o.default,n.default,l.default,s.default,m.default],prefixMap:{appearance:['Webkit','Moz','ms'],userSelect:['Webkit','Moz'],textEmphasisPosition:c,textEmphasis:c,textEmphasisStyle:c,textEmphasisColor:c,boxDecorationBreak:c,clipPath:u,maskImage:c,maskMode:c,maskRepeat:c,maskPosition:c,maskClip:c,maskOrigin:c,maskSize:c,maskComposite:c,mask:c,maskBorderSource:c,maskBorderMode:c,maskBorderSlice:c,maskBorderWidth:c,maskBorderOutset:c,maskBorderRepeat:c,maskBorder:c,maskType:c,textDecorationStyle:u,textDecorationSkip:u,textDecorationLine:u,textDecorationColor:u,filter:u,breakAfter:u,breakBefore:u,breakInside:u,columnCount:u,columnFill:u,columnGap:u,columnRule:u,columnRuleColor:u,columnRuleStyle:u,columnRuleWidth:u,columns:u,columnSpan:u,columnWidth:u,backdropFilter:u,hyphens:u,flowInto:u,flowFrom:u,regionFragment:u,textOrientation:u,tabSize:['Moz'],fontKerning:u,textSizeAdjust:u}}},61,[62,77,79,80,81,82]);
103__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(s,u){if('string'==typeof u&&!(0,t.isPrefixedValue)(u)&&-1!==u.indexOf('cross-fade('))return n.map(function(t){return u.replace(f,t+'cross-fade(')})};var t=r(d[0]),f=/cross-fade\(/g,n=['-webkit-','']},62,[63]);
104__d(function(g,r,i,a,m,_e,d){"use strict";
104function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"assignStyle",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(_e,"camelCaseProperty",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(_e,"cssifyDeclaration",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(_e,"cssifyObject",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(_e,"hyphenateProperty",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(_e,"isPrefixedProperty",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(_e,"isPrefixedValue",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(_e,"isUnitlessProperty",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(_e,"normalizeProperty",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(_e,"resolveArrayValue",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(_e,"unprefixProperty",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(_e,"unprefixValue",{enumerable:!0,get:function(){return s.default}});var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2])),f=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5])),c=e(r(d[6])),b=e(r(d[7])),y=e(r(d[8])),p=e(r(d[9])),P=e(r(d[10])),s=e(r(d[11]))},63,[64,65,66,69,67,70,71,72,73,75,74,76]);
105__d(function(g,r,_i,a,m,e,d){"use strict";function t(n){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(n)}function n(t){return f(t)||u(t)||i(t)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,n){if(t){if("string"==typeof t)return c(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(o):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?c(t,n):void 0}}function u(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function f(t){if(Array.isArray(t))return c(t)}function c(t,n){(null==n||n>t.length)&&(n=t.length);for(var o=0,i=new Array(n);o<n;o++)i[o]=t[o];return i}function y(t){return t.filter(function(n,o){return t.lastIndexOf(n)===o})}function l(o){for(var i=0,u=arguments.length<=1?0:arguments.length-1;i<u;++i){var f=i+1<1||arguments.length<=i+1?void 0:arguments[i+1];for(var c in f){var b=f[c],s=o[c];if(s&&b){if(Array.isArray(s)){o[c]=y(s.concat(b));continue}if(Array.isArray(b)){o[c]=y([s].concat(n(b)));continue}if('object'===t(b)){o[c]=l({},s,b);continue}}o[c]=b}}return o}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return l}})},64,[]);
106__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});var t=/-([a-z])/g,n=/^Ms/g,u={};function c(t){return t[1].toUpperCase()}function o(o){if(u.hasOwnProperty(o))return u[o];var f=o.replace(t,c).replace(n,'ms');return u[o]=f,f}},65,[]);
107__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};function n(e,t){return(0,u.default)(e)+':'+t}},66,[67]);
108__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};function n(e){return(0,u.default)(e)}},67,[68]);
109__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return c}});var t=/[A-Z]/g,n=/^ms-/,u={};function o(t){return'-'+t.toLowerCase()}var c=function(c){if(u.hasOwnProperty(c))return u[c];var f=c.replace(t,o);return u[c]=n.test(f)?'-'+f:f}},68,[]);
110__d(function(g,r,i,a,m,_e,d){"use strict";
110Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};function u(e){var t='';for(var u in e){var f=e[u];'string'!=typeof f&&'number'!=typeof f||(t&&(t+=';'),t+=(0,n.default)(u,f))}return t}},69,[66]);
111__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t=/^(Webkit|Moz|O|ms)/;function n(n){return t.test(n)}},70,[]);
112__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t=/-webkit-|-moz-|-ms-/;function n(n){return'string'==typeof n&&t.test(n)}},71,[]);
113__d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return b}});var e,t=r(d[0]),o=(e=t)&&e.__esModule?e:{default:e},i={borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},n=['animationIterationCount','boxFlex','boxFlexGroup','boxOrdinalGroup','columnCount','flex','flexGrow','flexPositive','flexShrink','flexNegative','flexOrder','gridColumn','gridColumnEnd','gridColumnStart','gridRow','gridRowEnd','gridRowStart','lineClamp','order'],l=['Webkit','ms','Moz','O'];function u(e,t){return e+t.charAt(0).toUpperCase()+t.slice(1)}for(var f=0,s=n.length;f<s;++f){var c=n[f];i[c]=!0;for(var p=0,h=l.length;p<h;++p)i[u(l[p],c)]=!0}for(var x in i)i[(0,o.default)(x)]=!0;function b(e){return i.hasOwnProperty(e)}},72,[67]);
114__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(r(d[0])),u=e(r(d[1]));function n(e){return(0,u.default)((0,t.default)(e))}},73,[65,74]);
115__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t=/^(ms|Webkit|Moz|O)/;function n(n){var u=n.replace(t,'');return u.charAt(0).toLowerCase()+u.slice(1)}},74,[]);
116__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};function n(e,t){return t.join(';'+(0,u.default)(e)+':')}},75,[67]);
117__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t=/(-ms-|-webkit-|-moz-|-o-)/g;function n(n){return'string'==typeof n?n.replace(t,''):n}},76,[]);
118__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,u){if('string'==typeof u&&!(0,n.default)(u)&&u.indexOf('image-set(')>-1)return f.map(function(t){return u.replace(/image-set\(/g,t+'image-set(')})};var t,u=r(d[0]),n=(t=u)&&t.__esModule?t:{default:t};var f=['-webkit-','']},77,[78]);
119__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n){return'string'==typeof n&&t.test(n)};var t=/-webkit-|-moz-|-ms-/},78,[]);
120__d(function(g,r,_i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(o,n,i){if(Object.prototype.hasOwnProperty.call(t,o))for(var l=t[o],b=0,B=l.length;b<B;++b)i[l[b]]=n};var t={marginBlockStart:['WebkitMarginBefore'],marginBlockEnd:['WebkitMarginAfter'],marginInlineStart:['WebkitMarginStart','MozMarginStart'],marginInlineEnd:['WebkitMarginEnd','MozMarginEnd'],paddingBlockStart:['WebkitPaddingBefore'],paddingBlockEnd:['WebkitPaddingAfter'],paddingInlineStart:['WebkitPaddingStart','MozPaddingStart'],paddingInlineEnd:['WebkitPaddingEnd','MozPaddingEnd'],borderBlockStart:['WebkitBorderBefore'],borderBlockStartColor:['WebkitBorderBeforeColor'],borderBlockStartStyle:['WebkitBorderBeforeStyle'],borderBlockStartWidth:['WebkitBorderBeforeWidth'],borderBlockEnd:['WebkitBorderAfter'],borderBlockEndColor:['WebkitBorderAfterColor'],borderBlockEndStyle:['WebkitBorderAfterStyle'],borderBlockEndWidth:['WebkitBorderAfterWidth'],borderInlineStart:['WebkitBorderStart','MozBorderStart'],borderInlineStartColor:['WebkitBorderStartColor','MozBorderStartColor'],borderInlineStartStyle:['WebkitBorderStartStyle','MozBorderStartStyle'],borderInlineStartWidth:['WebkitBorderStartWidth','MozBorderStartWidth'],borderInlineEnd:['WebkitBorderEnd','MozBorderEnd'],borderInlineEndColor:['WebkitBorderEndColor','MozBorderEndColor'],borderInlineEndStyle:['WebkitBorderEndStyle','MozBorderEndStyle'],borderInlineEndWidth:['WebkitBorderEndWidth','MozBorderEndWidth']}},79,[]);
121__d(function(g,r,i,a,m,e,d){'use strict';
121Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,c){if('position'===t&&'sticky'===c)return['-webkit-sticky','sticky']}},80,[]);
122__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(c,h){if(n.hasOwnProperty(c)&&o.hasOwnProperty(h))return t.map(function(t){return t+h})};var t=['-webkit-','-moz-',''],n={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},o={'min-content':!0,'max-content':!0,'fill-available':!0,'fit-content':!0,'contain-floats':!0}},81,[]);
123__d(function(g,r,_i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,i,o,u){if('string'==typeof i&&f.hasOwnProperty(t)){var l=s(i,u),p=l.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(t){return!/-moz-|-ms-/.test(t)}).join(',');if(t.indexOf('Webkit')>-1)return p;var v=l.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(t){return!/-webkit-|-ms-/.test(t)}).join(',');return t.indexOf('Moz')>-1?v:(o['Webkit'+(0,n.default)(t)]=p,o['Moz'+(0,n.default)(t)]=v,l)}};var t=o(r(d[0])),i=o(r(d[1])),n=o(r(d[2]));function o(t){return t&&t.__esModule?t:{default:t}}var f={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},u={Webkit:'-webkit-',Moz:'-moz-',ms:'-ms-'};function s(n,o){if((0,i.default)(n))return n;for(var f=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g),s=0,l=f.length;s<l;++s){var p=f[s],v=[p];for(var c in o){var b=(0,t.default)(c);if(p.indexOf(b)>-1&&'order'!==b)for(var k=o[c],z=0,M=k.length;z<M;++z)v.unshift(p.replace(b,u[k[z]]+b))}f[s]=v.join(',')}return f.join(',')}},82,[83,78,57]);
124__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,f.default)(t)};var t,u=r(d[0]),f=(t=u)&&t.__esModule?t:{default:t}},83,[68]);
125__d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},84,[85]);
126__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.localizeStyle=function(l,s){if(null!=l[t]){var c=s?1:0;if(n.has(l)){var f=n.get(l),o=f[c];return null==o&&(o=u(l,s),f[c]=o,n.set(l,f)),o}var v=u(l,s),y=new Array(2);return y[c]=v,n.set(l,y),v}return l};var n=new WeakMap,t='$$css$localize';function u(n,u){var l={};for(var s in n)if(s!==t){var c=n[s];Array.isArray(c)?l[s]=u?c[1]:c[0]:l[s]=c}return l}},85,[]);
127__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"createBoxShadowValue",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"createTextShadowValue",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"createBoxShadowArrayValue",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"createTransformValue",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"createTransformOriginValue",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"preprocess",{enumerable:!0,get:function(){return x}});var t=e(r(d[0])),n=e(r(d[1])),o=r(d[2]),l={},u={height:0,width:0},s=e=>{var o=e.shadowColor,l=e.shadowOffset,s=e.shadowOpacity,f=e.shadowRadius,h=l||u,S=h.height,c=h.width,b=(0,n.default)(c),w=(0,n.default)(S),p=(0,n.default)(f||0),y=(0,t.default)(o||'black',s);if(null!=y&&null!=b&&null!=w&&null!=p)return b+" "+w+" "+p+" "+y},f=e=>{var t=e.textShadowColor,o=e.textShadowOffset,l=e.textShadowRadius,s=o||u,f=s.height,h=s.width,S=l||0,c=(0,n.default)(h),b=(0,n.default)(f),w=(0,n.default)(S),p=(0,n.default)(t,'textShadowColor');if(p&&(0!==f||0!==h||0!==S)&&null!=c&&null!=b&&null!=w)return c+" "+b+" "+w+" "+p},h=e=>{if('string'==typeof e)return e;var o=(0,n.default)(e.offsetX)||0,l=(0,n.default)(e.offsetY)||0,u=(0,n.default)(e.blurRadius)||0,s=(0,n.default)(e.spreadDistance)||0,f=(0,t.default)(e.color)||'black';return""+(e.inset?'inset ':'')+o+" "+l+" "+u+" "+s+" "+f},S=e=>e.map(h).join(', '),c=e=>{var t=Object.keys(e)[0],o=e[t];return'matrix'===t||'matrix3d'===t?t+"("+o.join(',')+")":t+"("+(0,n.default)(o,t)+")"},b=e=>e.map(c).join(' '),w=e=>e.map(e=>(0,n.default)(e)).join(' '),p={borderBottomEndRadius:'borderEndEndRadius',borderBottomStartRadius:'borderEndStartRadius',borderTopEndRadius:'borderStartEndRadius',borderTopStartRadius:'borderStartStartRadius',borderEndColor:'borderInlineEndColor',borderEndStyle:'borderInlineEndStyle',borderEndWidth:'borderInlineEndWidth',borderStartColor:'borderInlineStartColor',borderStartStyle:'borderInlineStartStyle',borderStartWidth:'borderInlineStartWidth',end:'insetInlineEnd',marginEnd:'marginInlineEnd',marginHorizontal:'marginInline',marginStart:'marginInlineStart',marginVertical:'marginBlock',paddingEnd:'paddingInlineEnd',paddingHorizontal:'paddingInline',paddingStart:'paddingInlineStart',paddingVertical:'paddingBlock',start:'insetInlineStart'},y={elevation:!0,overlayColor:!0,resizeMode:!0,tintColor:!0},x=function(e,t){void 0===t&&(t={});var n=e||l,u={};
127if(t.shadow,null!=n.shadowColor||null!=n.shadowOffset||null!=n.shadowOpacity||null!=n.shadowRadius){(0,o.warnOnce)('shadowStyles',"\"shadow*\" style props are deprecated. Use \"boxShadow\".");var h=s(n);null!=h&&(u.boxShadow=h)}if(t.textShadow,null!=n.textShadowColor||null!=n.textShadowOffset||null!=n.textShadowRadius){(0,o.warnOnce)('textShadowStyles',"\"textShadow*\" style props are deprecated. Use \"textShadow\".");var c=f(n);if(null!=c&&null==u.textShadow){var x=n.textShadow,O=x?x+", "+c:c;u.textShadow=O}}for(var v in n)if(null==y[v]&&'shadowColor'!==v&&'shadowOffset'!==v&&'shadowOpacity'!==v&&'shadowRadius'!==v&&'textShadowColor'!==v&&'textShadowOffset'!==v&&'textShadowRadius'!==v){var E=n[v],R=p[v]||v,j=E;if(Object.prototype.hasOwnProperty.call(n,v)&&(R===v||null==n[R]))if('aspectRatio'===R&&'number'==typeof j)u[R]=j.toString();else if('boxShadow'===R){Array.isArray(j)&&(j=S(j));var I=u.boxShadow;u.boxShadow=I?j+", "+I:j}else'fontVariant'===R?(Array.isArray(j)&&j.length>0&&(j=j.join(' ')),u[R]=j):'textAlignVertical'===R?null==n.verticalAlign&&(u.verticalAlign='center'===j?'middle':j):'transform'===R?(Array.isArray(j)&&(j=b(j)),u.transform=j):'transformOrigin'===R?(Array.isArray(j)&&(j=w(j)),u.transformOrigin=j):u[R]=j}return u},O=x},86,[48,46,87]);
128__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.warnOnce=function(n,t){}},87,[]);
129__d(function(g,r,_i2,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.styleq=void 0;var l=new WeakMap;function n(n){var s,u,t;return null!=n&&(s=!0===n.disableCache,u=!0===n.disableMix,t=n.transform),function(){for(var n=[],i='',o=null,f=s?null:l,v=new Array(arguments.length),c=0;c<arguments.length;c++)v[c]=arguments[c];for(;v.length>0;){var p=v.pop();if(null!=p&&!1!==p)if(Array.isArray(p))for(var y=0;y<p.length;y++)v.push(p[y]);else{var h=null!=t?t(p):p;if(h.$$css){var b='';if(null!=f&&f.has(h)){var M=f.get(h);null!=M&&(b=M[0],n.push.apply(n,M[1]),f=M[2])}else{var $=[];for(var _ in h){var j=h[_];"$$css"!==_&&('string'==typeof j||null===j?n.includes(_)||(n.push(_),null!=f&&$.push(_),'string'==typeof j&&(b+=b?' '+j:j)):console.error("styleq: ".concat(_," typeof ").concat(String(j)," is not \"string\" or \"null\".")))}if(null!=f){var q=new WeakMap;f.set(h,[b,$,q]),f=q}}b&&(i=i?b+' '+i:b)}else if(u)null==o&&(o={}),o=Object.assign({},h,o);else{var w=null;for(var A in h){var O=h[A];void 0!==O&&(n.includes(A)||(null!=O&&(null==o&&(o={}),null==w&&(w={}),w[A]=O),n.push(A),f=null))}null!=w&&(o=Object.assign(w,o))}}}return[i,o]}}var s=n();e.styleq=s,s.factory=n},88,[]);
130__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.validate=function(e){for(var n in e){var u=n.trim(),c=e[u],f=!1;if(null!==c){if('string'==typeof c&&c.indexOf('!important')>-1)s("Invalid style declaration \""+u+":"+c+"\". Values cannot include \"!important\""),f=!0;else{var p='';'animation'===u||'animationName'===u?(p='Did you mean "animationKeyframes"?',f=!0):'direction'===u?(p='Did you mean "writingDirection"?',f=!0):t[u]?(p='Please use long-form properties.',f=!0):l[u]&&'string'==typeof c&&(0,o.default)(c).nodes.length>1&&(p="Value is \""+c+"\" but only single values are supported.",f=!0),''!==p&&s("Invalid style property of \""+u+"\". "+p)}f&&delete e[n]}}};var e,n=r(d[0]),o=(e=n)&&e.__esModule?e:{default:e},t={background:!0,borderBottom:!0,borderLeft:!0,borderRight:!0,borderTop:!0,font:!0,grid:!0,outline:!0,textDecoration:!0},l={flex:!0,margin:!0,padding:!0,borderColor:!0,borderRadius:!0,borderStyle:!0,borderWidth:!0,inset:!0,insetBlock:!0,insetInline:!0,marginBlock:!0,marginInline:!0,marginHorizontal:!0,marginVertical:!0,paddingBlock:!0,paddingInline:!0,paddingHorizontal:!0,paddingVertical:!0,overflow:!0,overscrollBehavior:!0,backgroundPosition:!0};function s(e){console.error(e)}},89,[90]);
131__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]),o=r(d[2]);function s(n){return this instanceof s?(this.nodes=t(n),this):new s(n)}s.prototype.toString=function(){return Array.isArray(this.nodes)?o(this.nodes):""},s.prototype.walk=function(t,o){return n(this.nodes,t,o),this},s.unit=r(d[3]),s.walk=n,s.stringify=o,m.exports=s},90,[91,92,93,94]);
132__d(function(g,r,i,a,m,e,d){var o="(".charCodeAt(0),n=")".charCodeAt(0),c="'".charCodeAt(0),t='"'.charCodeAt(0),s="\\".charCodeAt(0),u="/".charCodeAt(0),l=",".charCodeAt(0),h=":".charCodeAt(0),f="*".charCodeAt(0),p="u".charCodeAt(0),x="U".charCodeAt(0),A="+".charCodeAt(0),C=/^[a-f0-9?-]+$/i;m.exports=function(I){for(var v,E,y,w,O,b,_,q,U,$=[],j=I,k=0,z=j.charCodeAt(k),B=j.length,D=[{nodes:$}],F=0,G="",H="",J="";k<B;)if(z<=32){v=k;do{v+=1,z=j.charCodeAt(v)}while(z<=32);w=j.slice(k,v),y=$[$.length-1],z===n&&F?J=w:y&&"div"===y.type?(y.after=w,y.sourceEndIndex+=w.length):z===l||z===h||z===u&&j.charCo
132deAt(v+1)!==f&&(!U||U&&"function"===U.type&&"calc"!==U.value)?H=w:$.push({type:"space",sourceIndex:k,sourceEndIndex:v,value:w}),k=v}else if(z===c||z===t){v=k,w={type:"string",sourceIndex:k,quote:E=z===c?"'":'"'};do{if(O=!1,~(v=j.indexOf(E,v+1)))for(b=v;j.charCodeAt(b-1)===s;)b-=1,O=!O;else v=(j+=E).length-1,w.unclosed=!0}while(O);w.value=j.slice(k+1,v),w.sourceEndIndex=w.unclosed?v:v+1,$.push(w),k=v+1,z=j.charCodeAt(k)}else if(z===u&&j.charCodeAt(k+1)===f)w={type:"comment",sourceIndex:k,sourceEndIndex:(v=j.indexOf("*/",k))+2},-1===v&&(w.unclosed=!0,v=j.length,w.sourceEndIndex=v),w.value=j.slice(k+2,v),$.push(w),k=v+2,z=j.charCodeAt(k);else if(z!==u&&z!==f||!U||"function"!==U.type||"calc"!==U.value)if(z===u||z===l||z===h)w=j[k],$.push({type:"div",sourceIndex:k-H.length,sourceEndIndex:k+w.length,value:w,before:H,after:""}),H="",k+=1,z=j.charCodeAt(k);else if(o===z){v=k;do{v+=1,z=j.charCodeAt(v)}while(z<=32);if(q=k,w={type:"function",sourceIndex:k-G.length,value:G,before:j.slice(q+1,v)},k=v,"url"===G&&z!==c&&z!==t){v-=1;do{if(O=!1,~(v=j.indexOf(")",v+1)))for(b=v;j.charCodeAt(b-1)===s;)b-=1,O=!O;else v=(j+=")").length-1,w.unclosed=!0}while(O);_=v;do{_-=1,z=j.charCodeAt(_)}while(z<=32);q<_?(w.nodes=k!==_+1?[{type:"word",sourceIndex:k,sourceEndIndex:_+1,value:j.slice(k,_+1)}]:[],w.unclosed&&_+1!==v?(w.after="",w.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:v,value:j.slice(_+1,v)})):(w.after=j.slice(_+1,v),w.sourceEndIndex=v)):(w.after="",w.nodes=[]),k=v+1,w.sourceEndIndex=w.unclosed?v:k,z=j.charCodeAt(k),$.push(w)}else F+=1,w.after="",w.sourceEndIndex=k+1,$.push(w),D.push(w),$=w.nodes=[],U=w;G=""}else if(n===z&&F)k+=1,z=j.charCodeAt(k),U.after=J,U.sourceEndIndex+=J.length,J="",F-=1,D[D.length-1].sourceEndIndex=k,D.pop(),$=(U=D[F]).nodes;else{v=k;do{z===s&&(v+=1),v+=1,z=j.charCodeAt(v)}while(v<B&&!(z<=32||z===c||z===t||z===l||z===h||z===u||z===o||z===f&&U&&"function"===U.type&&"calc"===U.value||z===u&&"function"===U.type&&"calc"===U.value||z===n&&F));w=j.slice(k,v),o===z?G=w:p!==w.charCodeAt(0)&&x!==w.charCodeAt(0)||A!==w.charCodeAt(1)||!C.test(w.slice(2))?$.push({type:"word",sourceIndex:k,sourceEndIndex:v,value:w}):$.push({type:"unicode-range",sourceIndex:k,sourceEndIndex:v,value:w}),k=v}else w=j[k],$.push({type:"word",sourceIndex:k-H.length,sourceEndIndex:k+w.length,value:w}),k+=1,z=j.charCodeAt(k);for(k=D.length-1;k;k-=1)D[k].unclosed=!0,D[k].sourceEndIndex=j.length;return D[0].nodes}},91,[]);
133__d(function(g,r,_i,a,m,e,d){m.exports=function n(o,t,f){var i,s,c,u;for(i=0,s=o.length;i<s;i+=1)c=o[i],f||(u=t(c,i,o)),!1!==u&&"function"===c.type&&Array.isArray(c.nodes)&&n(c.nodes,t,f),f&&t(c,i,o)}},92,[]);
134__d(function(g,r,_i,a,m,e,d){function n(n,t){var u,f,i=n.type,s=n.value;return t&&void 0!==(f=t(n))?f:"word"===i||"space"===i?s:"string"===i?(u=n.quote||"")+s+(n.unclosed?"":u):"comment"===i?"/*"+s+(n.unclosed?"":"*/"):"div"===i?(n.before||"")+s+(n.after||""):Array.isArray(n.nodes)?(u=o(n.nodes,t),"function"!==i?u:s+"("+(n.before||"")+u+(n.after||"")+(n.unclosed?"":")")):s}function o(o,t){var u,f;if(Array.isArray(o)){for(u="",f=o.length-1;~f;f-=1)u=n(o[f],t)+u;return u}return n(o,t)}m.exports=o},93,[]);
135__d(function(g,r,i,a,m,e,d){var t="-".charCodeAt(0),o="+".charCodeAt(0),c=".".charCodeAt(0),h="e".charCodeAt(0),A="E".charCodeAt(0);function C(h){var A,C=h.charCodeAt(0);if(C===o||C===t){if((A=h.charCodeAt(1))>=48&&A<=57)return!0;var n=h.charCodeAt(2);return A===c&&n>=48&&n<=57}return C===c?(A=h.charCodeAt(1))>=48&&A<=57:C>=48&&C<=57}m.exports=function(n){var f,u,v,l=0,s=n.length;if(0===s||!C(n))return!1;for((f=n.charCodeAt(l))!==o&&f!==t||l++;l<s&&!((f=n.charCodeAt(l))<48||f>57);)l+=1;if(f=n.charCodeAt(l),u=n.charCodeAt(l+1),f===c&&u>=48&&u<=57)for(l+=2;l<s&&!((f=n.charCodeAt(l))<48||f>57);)l+=1;if(f=n.charCodeAt(l),u=n.charCodeAt(l+1),v=n.charCodeAt(l+2),(f===h||f===A)&&(u>=48&&u<=57||(u===o||u===t)&&v>=48&&v<=57))for(l+=u===o||u===t?3:2;l<s&&!((f=n.charCodeAt(l))<48||f>57);)l+=1;return{number:n.slice(0,l),unit:n.slice(l)}}},94,[]);
136__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t={OS:'web',select:t=>'web'in t?t.web:t.default,get isTesting(){return!1},get Version(){return'0.0.0'}}},95,[]);
137__d(function(g,r,i,a,m,_e,d){"use strict";
137function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return xr}});var n=r(d[0]),t=r(d[1]),s=r(d[2]),o=r(d[3]),c=e(r(d[4]));r(d[5]);var u=e(r(d[6])),l=r(d[7]),S=r(d[8]),y=r(d[9]),h=r(d[10]),p=r(d[11]),P=r(d[12]),A=r(d[13]),E=r(d[14]),C=r(d[15]),f=r(d[16]),v=r(d[17]),D=r(d[18]),R=r(d[19]),O=r(d[20]),I=r(d[21]),b=r(d[22]),w=r(d[23]),j=r(d[24]),N=r(d[25]),L=r(d[26]),T=r(d[27]),_=r(d[28]),x=r(d[29]),B=r(d[30]),k=r(d[31]),M=r(d[32]),U=r(d[33]),F=r(d[34]),W=r(d[35]),G=r(d[36]),Q=r(d[37]),H=r(d[38]),K=r(d[39]),V=r(d[40]),z=r(d[41]),J=r(d[42]),Y=r(d[43]),$=r(d[44]),q=r(d[45]),X=r(d[46]),Z=r(d[47]),ee=r(d[48]),re=r(d[49]),ne=r(d[50]),te=r(d[51]),ae=r(d[52]),ie=r(d[53]),se=r(d[54]),oe=r(d[55]),ce=r(d[56]),ue=r(d[57]),le=r(d[58]),de=r(d[59]),Se=r(d[60]),me=r(d[61]),ye=r(d[62]),he=r(d[63]),pe=r(d[64]),Pe=r(d[65]),Ae=r(d[66]),ge=r(d[67]),Ee=r(d[68]),Ce=r(d[69]),fe=r(d[70]),ve=r(d[71]),De=r(d[72]),Re=r(d[73]),Oe=r(d[74]),Ie=r(d[75]),be=r(d[76]),we=r(d[77]),je=r(d[78]),Ne=r(d[79]),Le=r(d[80]),Te=r(d[81]),xe=r(d[82]),Be=r(d[83]),ke=r(d[84]),Me=r(d[85]),Ue=r(d[86]),Fe=r(d[87]),We=r(d[88]),Ge=r(d[89]),Qe=r(d[90]),He=r(d[91]),Ke=r(d[92]),Ve=r(d[93]),ze=r(d[94]);function Je(e,t){const s=t,o=N.SCREEN_ERROR_POLICIES[e].errorPolicy;function c(n){const t=n.route;if('object'!=typeof t||null===t)return[e];const s=t,o='string'==typeof s.key?s.key:e;if(void 0===s.params)return[o];try{return[o,JSON.stringify(s.params)]}catch{return[o]}}const u=`screen:${e}`;return Object.assign(function(t){const l=(0,n.useBoundaryCrashStore)();if('root-only'===o.kind||'custom'===o.kind)return(0,ze.jsx)(s,Object.assign({},t));const S='recoverable-screen'===o.kind?[...o.resetKeys??[],...c(t)]:c(t),y='reset-with-cleanup'===o.resetPolicy.kind?{kind:'reset-with-cleanup',onReset:e=>{l.resetBoundaryCrash(e.boundaryId)}}:o.resetPolicy;return(0,ze.jsx)(P.ErrorBoundary,{boundaryId:u,title:o.title,description:o.description,resetPolicy:y,resetLabel:o.resetLabel??'Try Again',resetKeys:S,children:(0,ze.jsxs)(p.DevMenuActionProvider,{children:[(0,ze.jsx)(C.ScreenBoundaryDevTools,{boundaryId:u,screenName:e}),(0,ze.jsx)(s,Object.assign({},t))]})})},{purpleAirBoundaryWrapped:!0,purpleAirBoundaryId:u})}const Ye={flex:1,justifyContent:'center',alignItems:'center'};function $e(){return(0,ze.jsx)(u.default,{style:Ye,children:(0,ze.jsx)(c.default,{size:"large",color:O.COLORS.ACTION_PRIMARY})})}const qe={getItem:e=>window.sessionStorage.getItem(e),setItem:(e,n)=>{window.sessionStorage.setItem(e,n)},removeItem:e=>{window.sessionStorage.removeItem(e)},reload:()=>{Ke.logger.warn('Stale code-split chunk after a new deploy; reloading once to load the latest build.'),window.location.reload()}};function Xe(e,n){const t=()=>(0,j.loadChunkWithReload)(e,()=>(0,D.simulateChunkFailureIfArmed)(e,n),qe,(0,D.readChunkReloadMax)()),s=(0,o.lazy)(t);return function(e){return(0,ze.jsx)(o.Suspense,{fallback:(0,ze.jsx)($e,{}),children:(0,ze.jsx)(s,Object.assign({},e))})}}const Ze=Xe('Admin',async()=>({default:(await r(d[96])(d[95],d.paths)).AdminScreen})),er=Xe('OrderOutreach',async()=>({default:(await r(d[96])(d[97],d.paths)).OrderOutreachScreen})),rr=Xe('OrderOutreachNew',async()=>({default:(await r(d[96])(d[98],d.paths)).OrderOutreachNewScreen})),nr=Xe('OrderOutreachDetail',async()=>({default:(await r(d[96])(d[99],d.paths)).OrderOutreachDetailScreen})),tr=Xe('AdminSubscriptions',async()=>({default:(await r(d[96])(d[100],d.paths)).AdminSubscriptionsScreen})),ar=Xe('AdminSubscriptionDetail',async()=>({default:(await r(d[96])(d[101],d.paths)).AdminSubscriptionDetailScreen})),ir=Xe('AdminAuditLogs',async()=>({default:(await r(d[96])(d[102],d.paths)).AdminAuditLogsScreen})),sr=Xe('Flasher',async()=>({default:(await r(d[96])(d[103],d.paths)).FlasherScreen})),or=Xe('Status',async()=>({default:(await r(d[96])(d[104],d.paths)).StatusScreen})),cr=Xe('SensorManagement',async()=>({default:(await r(d[96])(d[105],d.paths)).SensorManagementScreen})),ur=Xe('ApiTokens',async()=>({default:(await r(d[96])(d[106],d.paths)).ApiTokensScreen})),lr=(0,s.createNativeStackNavigator)(),dr={headerShown:!1},Sr=(0,x.isRouteEnabledByUnreleasedCapabilities)('APIDocs',He.ENABLED_UNRELEASED_CAPABILITIES),mr=(0,x.isRouteEnabledByUnreleasedCapabilities)('SensorConfig',He.ENABLED_UNRELEASED_CAPABILITIES),yr=(0,x.isRouteEnabledByUnreleasedCapabilities)('Widgets',He.ENABLED_UNRELEASED_CAPABILITIES),hr=(0,k.isPreviewFeatureEnabled)(k.ENABLED_PREVIEW_FEATURES,'universal-map'),pr=(0,k.isPreviewFeatureEnabled)(k.ENABLED_PREVIEW_FEATURES,k.RESEARCH_HUB_PREVIEW_ID),Pr=(0,k.isPreviewFeatureEnabled)(k.ENABLED_PREVIEW_FEATURES,k.RESEARCH_QUICK_GUIDE_PREVIEW_ID),Ar=(0,A.loadEmailPreviewDevRoute)(),gr=(0,A.loadLocalTestingDevRoute)(),Er=(0,A.loadOrderOutreachScenariosDevRoute)(),Cr=(0,A.loadPwaManifestEvaluatorDevRoute)(),fr={Home:Je('Home',ue.HomeScreen),Login:Je('Login',de.LoginScreen),MyAccount:Je('MyAccount',Se.MyAccountScreen),Admin:Je('Admin',Ze),Flasher:Je('Flasher',sr),Status:Je('Status',or),Personal:Je('Personal',pe.PersonalScreen),Government:Je('Government',ce.GovernmentScreen),Education:Je('Education',ie.EducationScreen),Business:Je('Business',J.BusinessScreen),Broadcasters:Je
137('Broadcasters',z.BroadcastersScreen),About:Je('About',W.AboutScreen),AboutMap:Je('AboutMap',F.AboutMapScreen),Community:Je('Community',X.CommunityScreen),CommunityCategory:Je('CommunityCategory',$.CommunityCategoryScreen),CommunityTopic:Je('CommunityTopic',Z.CommunityTopicScreen),CommunityNewTopic:Je('CommunityNewTopic',q.CommunityNewTopicScreen),API:Je('API',Q.APIScreen),Blog:Je('Blog',V.BlogScreen),BlogArticle:Je('BlogArticle',K.BlogArticleScreen),Press:Je('Press',Ce.PressScreen),PressDiscovery:Je('PressDiscovery',Ee.PressDiscoveryScreen),PressDiscoveryDetail:Je('PressDiscoveryDetail',ge.PressDiscoveryDetailScreen),Science:Je('Science',Ee.PressDiscoveryScreen),Ecosystem:Je('Ecosystem',Ee.PressDiscoveryScreen),PressAdminDetail:Je('PressAdminDetail',Pe.PressAdminDetailScreen),PressAdmin:Je('PressAdmin',Ae.PressAdminScreen),ContentAdmin:Je('ContentAdmin',re.ContentAdminScreen),AdminSeo:Je('AdminSeo',G.AdminSeoScreen),OrderOutreach:Je('OrderOutreach',er),OrderOutreachNew:Je('OrderOutreachNew',rr),OrderOutreachDetail:Je('OrderOutreachDetail',nr),AdminSubscriptions:Je('AdminSubscriptions',tr),AdminSubscriptionDetail:Je('AdminSubscriptionDetail',ar),AdminAuditLogs:Je('AdminAuditLogs',ir),Contact:Je('Contact',ee.ContactScreen),FAQ:Je('FAQ',oe.FAQScreen),Search:Je('Search',we.SearchScreen),Papers:Je('Papers',ye.PapersScreen),ProjectsAndIntegrations:Je('ProjectsAndIntegrations',De.ProjectsAndIntegrationsScreen),DataUseCases:Je('DataUseCases',te.DataUseCasesScreen),ExploringAirQuality:Je('ExploringAirQuality',se.ExploringAirQualityScreen),TrustingPurpleAir:Je('TrustingPurpleAir',ke.TrustingPurpleAirScreen),WhoUsesPurpleAir:Je('WhoUsesPurpleAir',Ue.WhoUsesPurpleAirScreen),PrivacyPolicy:Je('PrivacyPolicy',fe.PrivacyPolicyScreen),DoNotSell:Je('DoNotSell',ae.DoNotSellScreen),TermsOfService:Je('TermsOfService',Be.TermsOfServiceScreen),RefundPolicy:Je('RefundPolicy',Ie.RefundPolicyScreen),ShippingPolicy:Je('ShippingPolicy',Ne.ShippingPolicyScreen),Credits:Je('Credits',ne.CreditsScreen),Attribution:Je('Attribution',H.AttributionScreen),License:Je('License',le.LicenseScreen),Warranty:Je('Warranty',Me.WarrantyScreen),PaymentMethods:Je('PaymentMethods',he.PaymentMethodsScreen),Purchasing:Je('Purchasing',Re.PurchasingScreen),Technology:Je('Technology',xe.TechnologyScreen),Recall:Je('Recall',Oe.RecallScreen),Register:Je('Register',be.RegisterScreen),Store:Je('Store',Te.StoreScreen),StoreCategory:Je('StoreCategory',Le.StoreCategoryScreen),Product:Je('Product',ve.ProductScreen),Cart:Je('Cart',Y.CartScreen),SensorManagement:Je('SensorManagement',cr),SensorUtility:Je('SensorUtility',je.SensorUtilityScreen),ApiTokens:Je('ApiTokens',ur),NotFound:Je('NotFound',me.NotFoundScreen)},vr=Object.assign({},Sr?{APIDocs:Je('APIDocs',Xe('APIDocs',async()=>({default:(await r(d[96])(d[107],d.paths)).APIDocsScreen})))}:{},mr?{SensorConfig:Je('SensorConfig',Xe('SensorConfig',async()=>({default:(await r(d[96])(d[108],d.paths)).SensorConfigScreen})))}:{},yr?{Widgets:Je('Widgets',Xe('Widgets',async()=>({default:(await r(d[96])(d[109],d.paths)).WidgetsScreen})))}:{},pr?{Research:Je('Research',Xe('Research',async()=>({default:(await r(d[96])(d[110],d.paths)).ResearchScreen})))}:{},Pr?{ResearchQuickGuide:Je('ResearchQuickGuide',Xe('ResearchQuickGuide',async()=>({default:(await r(d[96])(d[111],d.paths)).ResearchQuickGuideScreen})))}:{},hr?{Location:Je('Location',Xe('Location',async()=>({default:(await r(d[96])(d[112],d.paths)).LocationScreen}))),Map:Je('Map',Xe('Map',async()=>({default:(await r(d[96])(d[113],d.paths)).LiveMapScreen})))}:{},Ar?{DevEmailPreview:Je('DevEmailPreview',Ar.component)}:{},gr?{DevLocalTesting:Je('DevLocalTesting',gr.component)}:{},Er?{DevOrderOutreachScenarios:Je('DevOrderOutreachScenarios',Er.component)}:{},Cr?{DevPwaManifestEvaluator:Je('DevPwaManifestEvaluator',Cr.component)}:{}),Dr=Object.assign({},fr,vr),Rr=Object.entries(Dr).map(([e,n])=>({name:e,component:n})).map(({name:e,component:n})=>({name:e,component:(0,E.withRouteGuard)(n,(0,y.getRouteAccess)(e))})),Or=Rr.filter(({name:e})=>w.DESKTOP_SCREENS.has(e)),Ir=(0,Ve.isElectron)()?Or:Rr,br={researchHub:pr,researchQuickGuide:Pr,universalMap:hr,unreleasedApiDocs:Sr,unreleasedSensorConfig:mr,unreleasedWidgets:yr},wr=(0,_.getEnabledPrefixRoutes)(br),jr=(0,B.assembleWebLinkingScreens)(br,B.SCREEN_LINKING_OVERRIDES,Object.assign({},Ar?{DevEmailPreview:Ar.routePath}:{},gr?{DevLocalTesting:gr.routePath}:{},Er?{DevOrderOutreachScenarios:Er.routePath}:{},Cr?{DevPwaManifestEvaluator:Cr.routePath}:{})),Nr={prefixes:[window.location.origin],getStateFromPath:(0,B.createTableAwareGetStateFromPath)(wr),config:{screens:jr}},Lr={prefixes:[window.location.origin],config:{screens:(0,_.buildDesktopLinkingScreens)(w.DESKTOP_SCREENS,br,B.SCREEN_LINKING_OVERRIDES)}}
137,Tr=(0,Ve.isElectron)()?Lr:Nr;function _r(){const e=(0,Ve.isElectron)();return(0,ze.jsx)(lr.Navigator,Object.assign({},e?{initialRouteName:w.DESKTOP_INITIAL_SCREEN}:{},{children:Ir.map(({name:e,component:n})=>(0,ze.jsx)(lr.Screen,Object.assign({name:e,component:n,options:dr},null!=T.productScreenRouteGetId&&'Product'===e?{getId:T.productScreenRouteGetId}:{}),e))}))}function xr(){const e=(0,t.useNavigationContainerRef)(),s=(0,Fe.useAnalyticsPageTracker)(),[c,u]=(0,o.useState)({name:'Home'}),y=(0,o.useCallback)(()=>{const n=e.getCurrentRoute();if(null!=n){const e=n.params;u(null!=e?{name:n.name,params:e}:{name:n.name})}},[e]),p=(0,o.useCallback)(e=>{s(e),y()},[s,y]);(0,o.useEffect)(()=>{(0,U.syncRouteFavicons)(c.name)},[c.name]);const A=(0,ze.jsx)(P.ErrorBoundary,{resetPolicy:{kind:'unsafe-reset-without-cleanup',justification:'Reset remounts the full provider tree, which is the intended recovery path here.'},children:(0,ze.jsx)(l.SafeAreaProvider,{children:(0,ze.jsx)(f.ToastProvider,{children:(0,ze.jsx)(R.ClientConfigProvider,{children:(0,ze.jsx)(L.FeatureFlagProvider,{children:(0,ze.jsx)(S.AuthProvider,{children:(0,ze.jsxs)(b.CookieConsentProvider,{children:[(0,ze.jsx)(Fe.AnalyticsConsentSync,{}),(0,ze.jsx)(v.UpdateBanner,{}),(0,ze.jsx)(Qe.OrganizationProvider,{children:(0,ze.jsx)(Ge.CartProvider,{children:(0,ze.jsx)(We.ActiveStoreCategoryProvider,{children:(0,ze.jsxs)(t.NavigationContainer,{ref:e,linking:Tr,documentTitle:{enabled:!1},onStateChange:p,onReady:y,children:[(0,ze.jsx)(h.AppShell,Object.assign({currentRouteName:c.name},null!=c.params?{currentRouteParams:c.params}:{},{children:(0,ze.jsx)(_r,{})})),!(0,Ve.isElectron)()&&(0,ze.jsx)(I.CookieConsentBanner,{})]})})})})]})})})})})})});return M.IS_DEVELOPMENT_BUILD?(0,ze.jsx)(n.BoundaryCrashProvider,{children:A}):A}},96,{"0":97,"1":107,"2":261,"3":34,"4":410,"5":95,"6":276,"7":381,"8":411,"9":485,"10":486,"11":650,"12":651,"13":652,"14":653,"15":654,"16":496,"17":655,"18":659,"19":524,"20":490,"21":661,"22":588,"23":509,"24":660,"25":665,"26":607,"27":517,"28":666,"29":506,"30":668,"31":669,"32":508,"33":671,"34":673,"35":678,"36":679,"37":700,"38":703,"39":704,"40":708,"41":718,"42":719,"43":720,"44":724,"45":728,"46":731,"47":734,"48":743,"49":747,"50":873,"51":874,"52":875,"53":876,"54":877,"55":878,"56":880,"57":881,"58":884,"59":885,"60":960,"61":966,"62":972,"63":975,"64":977,"65":978,"66":987,"67":990,"68":991,"69":995,"70":996,"71":999,"72":1046,"73":1048,"74":1049,"75":1050,"76":1051,"77":1092,"78":511,"79":1093,"80":1094,"81":1096,"82":1098,"83":1099,"84":1100,"85":1101,"86":1102,"87":968,"88":616,"89":617,"90":962,"91":507,"92":469,"93":528,"94":104,"95":1104,"96":701,"97":1105,"98":1106,"99":1107,"100":1108,"101":1109,"102":1110,"103":1111,"104":1112,"105":1113,"106":1114,"107":1115,"108":1115,"109":1115,"110":1116,"111":1117,"112":1118,"113":1119,"paths":{"1104":"/_expo/static/js/web/AdminScreen-b97e9737aa1a15995fe3edcec2a690e3.js","1105":"/_expo/static/js/web/OrderOutreachScreen-b543d89a04529ea721ed06cfa9b9ffed.js","1106":"/_expo/static/js/web/OrderOutreachNewScreen-090019f3219368f7194b0e1010de874d.js","1107":"/_expo/static/js/web/OrderOutreachDetailScreen-0522c1a9ceff4e0d2ddbde9ed310da04.js","1108":"/_expo/static/js/web/AdminSubscriptionsScreen-c49d612aa8d27962c3c2ae719b7b5604.js","1109":"/_expo/static/js/web/AdminSubscriptionDetailScreen-775951501137448e26a113d599774479.js","1110":"/_expo/static/js/web/AdminAuditLogsScreen-86b7419f4173ab61ea3d31648d5b81bf.js","1111":"/_expo/static/js/web/FlasherScreen-5d9bf69a378ab94869740572489cbe05.js","1112":"/_expo/static/js/web/StatusScreen-27641fd6e5bd6b41272374e82fecc6f3.js","1113":"/_expo/static/js/web/SensorManagementScreen-713ddb6d73f750f0bb2eb5ee7676d2a3.js","1114":"/_expo/static/js/web/ApiTokensScreen-78dfcfe5b15a2e86ff23394e3e881b2b.js","1115":"/_expo/static/js/web/emptyUnreleasedScreenModule-511ed0e534e9d26ed8896ff99524277f.js","1116":"/_expo/static/js/web/ResearchScreen-08f26f430f3042d4ad29105699760655.js","1117":"/_expo/static/js/web/ResearchQuickGuideScreen-7b4b0464936c2f5ec7b8e853e56e45ec.js","1118":"/_expo/static/js/web/LocationScreen-7bf189db104d4e23168bcddacf2f95e7.js","1119":"/_expo/static/js/web/LiveMapScreen-c10776ae9a865611b27f4fb3f78f2f2c.js"}});
138__d(function(g,r,i,a,m,e,d){"use strict";
138Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"defineErrorRegistry",{enumerable:!0,get:function(){return n.defineErrorRegistry}}),Object.defineProperty(e,"BoundaryCrashProvider",{enumerable:!0,get:function(){return t.BoundaryCrashProvider}}),Object.defineProperty(e,"CrashOnRender",{enumerable:!0,get:function(){return t.CrashOnRender}}),Object.defineProperty(e,"CrashOnRenderFromStore",{enumerable:!0,get:function(){return t.CrashOnRenderFromStore}}),Object.defineProperty(e,"useAsyncBoundaryErrorTrigger",{enumerable:!0,get:function(){return t.useAsyncBoundaryErrorTrigger}}),Object.defineProperty(e,"useBoundaryCrashStore",{enumerable:!0,get:function(){return t.useBoundaryCrashStore}}),Object.defineProperty(e,"normalizeError",{enumerable:!0,get:function(){return o.normalizeError}}),Object.defineProperty(e,"PurpleAirErrorBoundary",{enumerable:!0,get:function(){return u.PurpleAirErrorBoundary}}),Object.defineProperty(e,"assertValidErrorPolicy",{enumerable:!0,get:function(){return c.assertValidErrorPolicy}}),Object.defineProperty(e,"assertValidResetPolicy",{enumerable:!0,get:function(){return c.assertValidResetPolicy}}),Object.defineProperty(e,"MIN_RESET_JUSTIFICATION_LENGTH",{enumerable:!0,get:function(){return c.MIN_RESET_JUSTIFICATION_LENGTH}}),Object.defineProperty(e,"useBoundaryEscalation",{enumerable:!0,get:function(){return s.useBoundaryEscalation}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),s=r(d[5])},97,[98,100,103,106,99,101]);
139__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.defineErrorRegistry=function(t){for(const[c,n]of Object.entries(t))(0,o.assertValidErrorPolicy)(n.errorPolicy,`error policy "${c}"`);return t};var o=r(d[0])},98,[99]);
140__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MIN_RESET_JUSTIFICATION_LENGTH",{enumerable:!0,get:function(){return t}}),e.assertValidResetPolicy=n,e.assertValidErrorPolicy=function(t,s){"standard-screen"!==t.kind&&"recoverable-screen"!==t.kind||n(t.resetPolicy,s)};const t=16;function n(n,s){if("unsafe-reset-without-cleanup"!==n.kind)return;const o=n.justification.trim();var c;if(c=o,!(Array.from(c).filter(t=>!/\s/u.test(t)).length>=t))throw new Error(`${s} uses unsafe-reset-without-cleanup, so justification must be at least ${t} non-whitespace characters.`)}},99,[]);
141__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.BoundaryCrashProvider=function({children:n}){const[u,c]=(0,s.useState)({}),[l,C]=(0,s.useState)({}),h=(0,s.useCallback)(s=>{c(n=>n[s]?n:Object.assign({},n,{[s]:!0}))},[]),y=(0,s.useCallback)(s=>{c(n=>n[s]?n:Object.assign({},n,{[s]:!0})),C(n=>n[s]?n:Object.assign({},n,{[s]:!0}))},[]),b=(0,s.useCallback)(s=>{c(n=>n[s]?Object.assign({},n,{[s]:!1}):n),C(n=>n[s]?Object.assign({},n,{[s]:!1}):n)},[]),B=(0,s.useCallback)(()=>{c({}),C({})},[]),k=(0,s.useMemo)(()=>({isBoundaryCrashRequested:s=>!0===u[s],isFallbackCrashRequested:s=>!0===l[s],requestBoundaryCrash:h,requestFallbackCrash:y,resetBoundaryCrash:b,resetAllBoundaryCrashes:B}),[u,l,h,y,b,B]);return(0,t.jsx)(o.Provider,{value:k,children:n})},e.useBoundaryCrashStore=c,e.CrashOnRender=l,e.CrashOnRenderFromStore=function({boundaryId:s}){const n=c();return(0,t.jsx)(l,{when:n.isBoundaryCrashRequested(s),message:`Crash test: ${s} boundary`})},e.useAsyncBoundaryErrorTrigger=function(){const{escalate:t}=(0,n.useBoundaryEscalation)();return{triggerAsyncBoundaryError:(0,s.useCallback)((s,n=0)=>{setTimeout(()=>{t(s)},n)},[t])}};var s=r(d[0]),n=r(d[1]),t=r(d[2]);const u={isBoundaryCrashRequested:()=>!1,isFallbackCrashRequested:()=>!1,requestBoundaryCrash:()=>{},requestFallbackCrash:()=>{},resetBoundaryCrash:()=>{},resetAllBoundaryCrashes:()=>{}},o=(0,s.createContext)(u);function c(){return(0,s.useContext)(o)}function l({when:s,message:n}){if(s)throw new Error(n);return null}},100,[34,101,104]);
142__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useBoundaryEscalation=function(){const{resetBoundary:s,showBoundary:t}=(0,n.useErrorBoundary)();return{escalate:(0,o.useCallback)(o=>{t((0,u.normalizeError)(o).error)},[t]),resetBoundary:s}};var o=r(d[0]),n=r(d[1]),u=r(d[2])},101,[34,102,103]);
143__d(function(_g,_r,_i,_a,_m,_e,d){"use strict";
143Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ErrorBoundary",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"ErrorBoundaryContext",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"getErrorMessage",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"useErrorBoundary",{enumerable:!0,get:function(){return i}}),Object.defineProperty(_e,"withErrorBoundary",{enumerable:!0,get:function(){return c}});var r=_r(d[0]);const e=(0,r.createContext)(null),t={didCatch:!1,error:null};class o extends r.Component{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=t}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(...r){const{error:e}=this.state;null!==e&&(this.props.onReset?.({args:r,reason:"imperative-api"}),this.setState(t))}componentDidCatch(r,e){this.props.onError?.(r,e)}componentDidUpdate(r,e){const{didCatch:o}=this.state,{resetKeys:s}=this.props;o&&null!==e.error&&n(r.resetKeys,s)&&(this.props.onReset?.({next:s,prev:r.resetKeys,reason:"keys"}),this.setState(t))}render(){const{children:t,fallbackRender:o,FallbackComponent:n,fallback:s}=this.props,{didCatch:a,error:i}=this.state;let u=t;if(a){const e={error:i,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof o)u=o(e);else if(n)u=(0,r.createElement)(n,e);else{if(void 0===s)throw i;u=s}}return(0,r.createElement)(e.Provider,{value:{didCatch:a,error:i,resetErrorBoundary:this.resetErrorBoundary}},u)}}function n(r=[],e=[]){return r.length!==e.length||r.some((r,t)=>!Object.is(r,e[t]))}function s(r){return null!==r&&"object"==typeof r&&"didCatch"in r&&"boolean"==typeof r.didCatch&&"error"in r&&"resetErrorBoundary"in r&&"function"==typeof r.resetErrorBoundary}function a(r){if(!s(r))throw new Error("ErrorBoundaryContext not found")}function i(){const t=(0,r.useContext)(e);a(t);const{error:o,resetErrorBoundary:n}=t,[s,i]=(0,r.useState)({error:null,hasError:!1}),u=(0,r.useMemo)(()=>({error:o,resetBoundary:()=>{n(),i({error:null,hasError:!1})},showBoundary:r=>i({error:r,hasError:!0})}),[o,n]);if(s.hasError)throw s.error;return u}function u(r){switch(typeof r){case"object":if(null!==r&&"message"in r&&"string"==typeof r.message)return r.message;break;case"string":return r}}function c(e,t){const n=(0,r.forwardRef)((n,s)=>(0,r.createElement)(o,t,(0,r.createElement)(e,Object.assign({},n,{ref:s})))),s=e.displayName||e.name||"Unknown";return n.displayName=`withErrorBoundary(${s})`,n}},102,[34]);
144__d(function(g,r,i,a,m,e,d){"use strict";function n(n){try{return JSON.stringify(n)}catch{return"[unserializable object]"}}function o(o){return o instanceof Error?`${o.name}: ${o.message}`:"string"==typeof o?o:"number"==typeof o||"boolean"==typeof o||"bigint"==typeof o?String(o):"symbol"==typeof o?void 0===o.description?"Symbol()":`Symbol(${o.description})`:"function"==typeof o?`[function ${o.name||"anonymous"}]`:null===o?"null":void 0===o?"undefined":n(o)}Object.defineProperty(e,'__esModule',{value:!0}),e.normalizeError=function(n){if(n instanceof Error)return{error:n,summary:`${n.name}: ${n.message}`};const t=o(n);return{error:new Error(t),summary:t}}},103,[]);
145__d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},104,[105]);
146__d(function(g,r,i,a,m,e,d){
147/**
148   * @license React
149   * react-jsx-runtime.production.js
150   *
151   * Copyright (c) Meta Platforms, Inc. and affiliates.
152   *
153   * This source code is licensed under the MIT license found in the
154   * LICENSE file in the root directory of this source tree.
155   */
156"use strict";var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(t,o,f){var l=null;if(void 0!==f&&(l=""+f),void 0!==o.key&&(l=""+o.key),"key"in o)for(var y in f={},o)"key"!==y&&(f[y]=o[y]);else f=o;return o=f.ref,{$$typeof:n,type:t,key:l,ref:void 0!==o?o:null,props:f}}e.Fragment=t,e.jsx=o,e.jsxs=o},105,[]);
157__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PurpleAirErrorBoundary=function({boundaryId:u,children:s,resetKeys:c,onError:b,onReset:y,fallbackRender:k}
157){const[,E]=(0,n.useState)(null),f=(0,n.useRef)(null),p=(0,n.useCallback)((n,o)=>{const l=(0,t.normalizeError)(n),s=o.componentStack??null;f.current=s,E(s),b?.({boundaryId:u,componentStack:s,normalizedError:l})},[u,b]),C=(0,n.useCallback)(n=>{f.current=null,E(null),y?.({boundaryId:u,reason:n.reason})},[u,y]),R=(0,n.useCallback)(()=>f.current,[]),S=(0,n.useCallback)(({error:n,resetErrorBoundary:o})=>{const l=(0,t.normalizeError)(n),s=R();return k({boundaryId:u,componentStack:s,getLatestComponentStack:R,normalizedError:l,resetBoundary:o})},[u,k,R]),j=Object.assign({onError:p,onReset:C,fallbackRender:S},void 0!==c?{resetKeys:[...c]}:{});return(0,l.jsx)(o.ErrorBoundary,Object.assign({},j,{children:s}))};var n=r(d[0]),o=r(d[1]),t=r(d[2]),l=r(d[3])},106,[34,102,103,104]);
158__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createStaticNavigation",{enumerable:!0,get:function(){return t.createStaticNavigation}}),Object.defineProperty(e,"Link",{enumerable:!0,get:function(){return n.Link}}),Object.defineProperty(e,"LinkingContext",{enumerable:!0,get:function(){return o.LinkingContext}}),Object.defineProperty(e,"LocaleDirContext",{enumerable:!0,get:function(){return u.LocaleDirContext}}),Object.defineProperty(e,"NavigationContainer",{enumerable:!0,get:function(){return c.NavigationContainer}}),Object.defineProperty(e,"ServerContainer",{enumerable:!0,get:function(){return f.ServerContainer}}),Object.defineProperty(e,"DarkTheme",{enumerable:!0,get:function(){return b.DarkTheme}}),Object.defineProperty(e,"DefaultTheme",{enumerable:!0,get:function(){return l.DefaultTheme}}),Object.defineProperty(e,"UNSTABLE_UnhandledLinkingContext",{enumerable:!0,get:function(){return y.UnhandledLinkingContext}}),Object.defineProperty(e,"useLinkBuilder",{enumerable:!0,get:function(){return O.useLinkBuilder}}),Object.defineProperty(e,"useLinkProps",{enumerable:!0,get:function(){return P.useLinkProps}}),Object.defineProperty(e,"useLinkTo",{enumerable:!0,get:function(){return j.useLinkTo}}),Object.defineProperty(e,"useLocale",{enumerable:!0,get:function(){return s.useLocale}}),Object.defineProperty(e,"useRoutePath",{enumerable:!0,get:function(){return L.useRoutePath}}),Object.defineProperty(e,"useScrollToTop",{enumerable:!0,get:function(){return k.useScrollToTop}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),f=r(d[5]),b=r(d[6]),l=r(d[7]),p=r(d[8]);Object.keys(p).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}})});var y=r(d[9]),O=r(d[10]),P=r(d[11]),j=r(d[12]),s=r(d[13]),L=r(d[14]),k=r(d[15]),h=r(d[16]);Object.keys(h).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return h[t]}})})},107,[108,221,210,211,208,253,254,212,255,214,256,252,257,258,259,260,110]);
159__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["linking"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.createStaticNavigation=function(n){const t=n.getComponent();function f(f,d){let{linking:b}=f,p=(0,o.default)(f,e);const h=u.useMemo(()=>{const e=(0,c.createPathConfigForStaticNavigation)(n,{initialRouteName:b?.config?.initialRouteName},'auto'===b?.enabled);if(e)return{path:b?.config?.path,initialRouteName:b?.config?.initialRouteName,screens:e}},[b?.enabled,b?.config?.path,b?.config?.initialRouteName]),k=u.useMemo(()=>{if(!b)return;const e='boolean'==typeof b.enabled?b.enabled:null!=h?.screens;return Object.assign({},b,{enabled:e,config:h})},[b,h]);if(!0===b?.enabled&&null==h?.screens)throw new Error("Linking is enabled but no linking configuration was found for the screens.\n\nTo solve this:\n- Specify a 'linking' property for the screens you want to link to.\n- Or set 'linking.enabled' to 'auto' to generate paths automatically.\n\nSee usage guide: https://reactnavigation.org/docs/static-configuration#linking");return(0,l.jsx)(s.NavigationContainer,Object.assign({},p,{ref:d,linking:k,children:(0,l.jsx)(t,{})}))}return u.forwardRef(f)};var n,t=r(_d[0]),o=(n=t)&&n.__esModule?n:{default:n}
159,c=r(_d[1]),u=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[2])),s=r(_d[3]),l=r(_d[4])},108,[109,110,34,208,104]);
160__d(function(g,_r,i,a,m,_e,d){m.exports=function(r,e){if(null==r)return{};var n={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(-1!==e.indexOf(t))continue;n[t]=r[t]}return n},m.exports.__esModule=!0,m.exports.default=m.exports},109,[]);
161__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"BaseNavigationContainer",{enumerable:!0,get:function(){return t.BaseNavigationContainer}}),Object.defineProperty(e,"createNavigationContainerRef",{enumerable:!0,get:function(){return n.createNavigationContainerRef}}),Object.defineProperty(e,"createNavigatorFactory",{enumerable:!0,get:function(){return o.createNavigatorFactory}}),Object.defineProperty(e,"CurrentRenderContext",{enumerable:!0,get:function(){return u.CurrentRenderContext}}),Object.defineProperty(e,"findFocusedRoute",{enumerable:!0,get:function(){return c.findFocusedRoute}}),Object.defineProperty(e,"getActionFromState",{enumerable:!0,get:function(){return f.getActionFromState}}),Object.defineProperty(e,"getFocusedRouteNameFromRoute",{enumerable:!0,get:function(){return b.getFocusedRouteNameFromRoute}}),Object.defineProperty(e,"getPathFromState",{enumerable:!0,get:function(){return P.getPathFromState}}),Object.defineProperty(e,"getStateFromPath",{enumerable:!0,get:function(){return v.getStateFromPath}}),Object.defineProperty(e,"NavigationContainerRefContext",{enumerable:!0,get:function(){return p.NavigationContainerRefContext}}),Object.defineProperty(e,"NavigationContext",{enumerable:!0,get:function(){return l.NavigationContext}}),Object.defineProperty(e,"NavigationHelpersContext",{enumerable:!0,get:function(){return y.NavigationHelpersContext}}),Object.defineProperty(e,"NavigationIndependentTree",{enumerable:!0,get:function(){return s.NavigationIndependentTree}}),Object.defineProperty(e,"NavigationMetaContext",{enumerable:!0,get:function(){return O.NavigationMetaContext}}),Object.defineProperty(e,"NavigationProvider",{enumerable:!0,get:function(){return j.NavigationProvider}}),Object.defineProperty(e,"NavigationRouteContext",{enumerable:!0,get:function(){return j.NavigationRouteContext}}),Object.defineProperty(e,"PreventRemoveContext",{enumerable:!0,get:function(){return N.PreventRemoveContext}}),Object.defineProperty(e,"PreventRemoveProvider",{enumerable:!0,get:function(){return C.PreventRemoveProvider}}),Object.defineProperty(e,"createComponentForStaticNavigation",{enumerable:!0,get:function(){return R.createComponentForStaticNavigationDeprecated}}),Object.defineProperty(e,"createPathConfigForStaticNavigation",{enumerable:!0,get:function(){return R.createPathConfigForStaticNavigation}}),Object.defineProperty(e,"ThemeContext",{enumerable:!0,get:function(){return F.ThemeContext}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return h.ThemeProvider}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return x.useTheme}}),Object.defineProperty(e,"useFocusEffect",{enumerable:!0,get:function(){return T.useFocusEffect}}),Object.defineProperty(e,"useIsFocused",{enumerable:!0,get:function(){return I.useIsFocused}}),Object.defineProperty(e,"useNavigation",{enumerable:!0,get:function(){return B.useNavigation}}),Object.defineProperty(e,"useNavigationBuilder",{enumerable:!0,get:function(){return E.useNavigationBuilder}}),Object.defineProperty(e,"useNavigationContainerRef",{enumerable:!0,get:function(){return _.useNavigationContainerRef}}),Object.defineProperty(e,"useNavigationIndependentTree",{enumerable:!0,get:function(){return M.useNavigationIndependentTree}}),Object.defineProperty(e,"useNavigationState",{enumerable:!0,get:function(){return k.useNavigationState}}),Object.defineProperty(e,"usePreventRemove",{enumerable:!0,get:function(){return w.usePreventRemove}}),Object.defineProperty(e,"usePreventRemoveContext",{enumerable:!0,get:function(){return A.usePreventRemoveContext}}),Object.defineProperty(e,"useRoute",{enumerable:!0,get:function(){return H.useRoute}}),Object.defineProperty(e,"useStateForPath",{enumerable:!0,get:function(){return D.useStateForPath}}),Object.defineProperty(e,"validatePathConfig",{enumerable:!0,get:function(){return q.validatePathConfig}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),f=r(d[5]),b=r(d[6]),P=r(d[7
161]),v=r(d[8]),p=r(d[9]),l=r(d[10]),y=r(d[11]),s=r(d[12]),O=r(d[13]),j=r(d[14]),N=r(d[15]),C=r(d[16]),R=r(d[17]),F=r(d[18]),h=r(d[19]),x=r(d[20]),S=r(d[21]);Object.keys(S).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return S[t]}})});var T=r(d[22]),I=r(d[23]),B=r(d[24]),E=r(d[25]),_=r(d[26]),M=r(d[27]),k=r(d[28]),w=r(d[29]),A=r(d[30]),H=r(d[31]),D=r(d[32]),q=r(d[33]),z=r(d[34]);Object.keys(z).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return z[t]}})})},110,[111,126,144,155,129,156,157,160,168,131,152,172,173,174,151,175,176,147,135,134,177,178,179,153,154,180,204,140,195,205,206,150,207,167,112]);
162__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["key","routeNames"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"BaseNavigationContainer",{enumerable:!0,get:function(){return S}});var n=t(r(_d[0])),o=r(_d[1]),s=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=t(r(_d[3])),c=(r(_d[4]),r(_d[5]),r(_d[6])),d=r(_d[7]),l=r(_d[8]),f=r(_d[9]),h=r(_d[10]),v=r(_d[11]),p=r(_d[12]),y=r(_d[13]),C=r(_d[14]),O=r(_d[15]),R=r(_d[16]),b=r(_d[17]),j=r(_d[18]),N=r(_d[19]),x=r(_d[20]),I=r(_d[21]),_=r(_d[22]);const k=t=>{if(void 0===t)return;const o=(0,n.default)(t,e);return Object.assign({},o,{stale:!0,routes:t.routes.map(e=>void 0===e.state?e:Object.assign({},e,{state:k(e.state)}))})},S=s.forwardRef(function({initialState:e,onStateChange:t,onReady:n,onUnhandledAction:S,navigationInChildEnabled:E=!1,theme:w,children:P},L){const A=s.useContext(y.NavigationStateContext),T=(0,N.useNavigationIndependentTree)();if(!A.isDefault&&!T)throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, wrap the container in 'NavigationIndependentTree' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.");const{state:D,getState:M,setState:U,scheduleUpdate:G,flushUpdates:K}=(0,I.useSyncState)(()=>k(null==e?void 0:e)),B=s.useRef(!0),F=s.useRef(void 0),Z=s.useCallback(()=>F.current,[]),H=s.useCallback(e=>{F.current=e},[]),{listeners:q,addListener:z}=(0,R.useChildListeners)(),{keyedListeners:J,addKeyedListener:Q}=(0,j.useKeyedChildListeners)(),V=(0,u.default)(e=>{null==q.focus[0]?console.error(c.NOT_INITIALIZED_ERROR):q.focus[0](t=>t.dispatch(e))}),W=(0,u.default)(()=>{if(null==q.focus[0])return!1;const{result:e,handled:t}=q.focus[0](e=>e.canGoBack());return!!t&&e}),X=(0,u.default)(e=>{const t=e?.key??J.getState.root?.().key;null==t?console.error(c.NOT_INITIALIZED_ERROR):q.focus[0](n=>n.dispatch(Object.assign({},o.CommonActions.reset(e),{target:t})))}),Y=(0,u.default)(()=>J.getState.root?.()),$=(0,u.default)(()=>{const e=Y();if(null==e)return;return(0,f.findFocusedRoute)(e)}),ee=(0,u.default)(()=>null!=q.focus[0]),te=(0,b.useEventEmitter)(),{addOptionsGetter:ne,getCurrentOptions:re}=(0,x.useOptionsGetters)({}),oe=s.useMemo(()=>Object.assign({},Object.keys(o.CommonActions).reduce((e,t)=>(e[t]=(...e)=>V(o.CommonActions[t](...e)),e),{}),te.create('root'),{dispatch:V,resetRoot:X,isFocused:()=>!0,canGoBack:W,getParent:()=>{},getState:M,getRootState:Y,getCurrentRoute:$,getCurrentOptions:re,isReady:ee,setOptions:()=>{throw new Error('Cannot call setOptions outside a screen')}}),[W,V,te,re,$,Y,M,ee,X]);s.useImperativeHandle(L,()=>oe,[oe]);const ae=(0,u.default)((e,t)=>{te.emit({type:'__unsafe_action__',data:{action:e,noop:t,stack:ue.current}})}),se=s.useRef(void 0),ie=(0,u.default)(e=>{se.current!==e&&(se.current=e,te.emit({type:'options',data:{options:e}}))}),ue=s.useRef(void 0),ce=s.useMemo(()=>({addListener:z,addKeyedListener:Q,onDispatchAction:ae,onOptionsChange:ie,scheduleUpdate:G,flushUpdates:K,stackRef:ue}
162),[z,Q,ae,ie,G,K]),de=s.useRef(!0),le=s.useCallback(()=>de.current,[]),fe=s.useMemo(()=>({state:D,getState:M,setState:U,getKey:Z,setKey:H,getIsInitial:le,addOptionsGetter:ne}),[D,M,U,Z,H,le,ne]),he=s.useRef(n),ve=s.useRef(t);s.useEffect(()=>{de.current=!1,ve.current=t,he.current=n});const pe=s.useRef(!1);s.useEffect(()=>{!pe.current&&ee()&&(pe.current=!0,he.current?.(),te.emit({type:'ready'}))},[D,ee,te]),s.useEffect(()=>{const e=Y();te.emit({type:'state',data:{state:D}}),!B.current&&ve.current&&ve.current(e),B.current=!1},[Y,te,D]);const ge=(0,u.default)(e=>{});return(0,_.jsx)(p.NavigationIndependentTreeContext.Provider,{value:!1,children:(0,_.jsx)(v.NavigationContainerRefContext.Provider,{value:oe,children:(0,_.jsx)(h.NavigationBuilderContext.Provider,{value:ce,children:(0,_.jsx)(y.NavigationStateContext.Provider,{value:fe,children:(0,_.jsx)(O.UnhandledActionContext.Provider,{value:S??ge,children:(0,_.jsx)(d.DeprecatedNavigationInChildContext.Provider,{value:E,children:(0,_.jsx)(l.EnsureSingleNavigator,{children:(0,_.jsx)(C.ThemeProvider,{value:w,children:P})})})})})})})})})},111,[109,112,34,122,124,125,126,127,128,129,130,131,132,133,134,136,137,138,139,140,141,142,104]);
163__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"BaseRouter",{enumerable:!0,get:function(){return t.BaseRouter}}),Object.defineProperty(_e,"DrawerActions",{enumerable:!0,get:function(){return n.DrawerActions}}),Object.defineProperty(_e,"DrawerRouter",{enumerable:!0,get:function(){return n.DrawerRouter}}),Object.defineProperty(_e,"StackActions",{enumerable:!0,get:function(){return o.StackActions}}),Object.defineProperty(_e,"StackRouter",{enumerable:!0,get:function(){return o.StackRouter}}),Object.defineProperty(_e,"TabActions",{enumerable:!0,get:function(){return u.TabActions}}),Object.defineProperty(_e,"TabRouter",{enumerable:!0,get:function(){return u.TabRouter}}),Object.defineProperty(_e,"CommonActions",{enumerable:!0,get:function(){return e}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3]),u=r(_d[4]),c=r(_d[5]);Object.keys(c).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return c[e]}})})},112,[113,114,116,119,117,121]);
164__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.goBack=function(){return{type:'GO_BACK'}},e.navigate=function(...t){if('string'==typeof t[0]){const[n,o,p]=t;return'boolean'==typeof p&&console.warn("Passing a boolean as the third argument to 'navigate' is deprecated. Pass '{ merge: true }' instead."),{type:'NAVIGATE',payload:{name:n,params:o,merge:'boolean'==typeof p?p:p?.merge,pop:p?.pop}}}{const n=t[0]||{};if(!('name'in n))throw new Error('You need to specify a name when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.');return{type:'NAVIGATE',payload:n}}},e.navigateDeprecated=function(...t){if('string'==typeof t[0])return{type:'NAVIGATE_DEPRECATED',payload:{name:t[0],params:t[1]}};{const n=t[0]||{};if(!('name'in n))throw new Error('You need to specify a name when calling navigateDeprecated with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigatelegacy for usage.');return{type:'NAVIGATE_DEPRECATED',payload:n}}},e.reset=function(t){return{type:'RESET',payload:t}},e.setParams=function(t){return{type:'SET_PARAMS',payload:{params:t}}},e.replaceParams=function(t){return{type:'REPLACE_PARAMS',payload:{params:t}}},e.preload=function(t,n){return{type:'PRELOAD',payload:{name:t,params:n}}}},113,[]);
165__d(function(g,_r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"BaseRouter",{enumerable:!0,get:function(){return s}});var t=_r(d[0]);const s={getStateForAction(s,n){switch(n.type){case'SET_PARAMS':case'REPLACE_PARAMS':{const t=n.source?s.routes.findIndex(t=>t.key===n.source):s.index;return-1===t?null:Object.assign({},s,{routes:s.routes.map((s,r)=>r===t?Object.assign({},s,{params:'REPLACE_PARAMS'===n.type?n.payload.params:Object.assign({},s.params,n.payload.params)}):s)})}case'RESET':{const r=n.payload;return 0===r.routes.length||r.routes.some(t=>!s.routeNames.includes(t.name))?null:!1===r.stale?s.routeNames.length!==r.routeNames.length||r.routeNames.some(t=>!s.routeNames.includes(t))?null:Object.assign({},r,{routes:r.routes.map(s=>s.key?s:Object.assign({},s,{key:`${s.name}
165-${(0,t.nanoid)()}`}))}):r}default:return null}},shouldActionChangeFocus:t=>'NAVIGATE'===t.type||'NAVIGATE_DEPRECATED'===t.type}},114,[115]);
166__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"nanoid",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"customAlphabet",{enumerable:!0,get:function(){return t}});let t=(t,n=21)=>(o=n)=>{let u='',l=0|o;for(;l--;)u+=t[Math.random()*t.length|0];return u},n=(t=21)=>{let n='',o=0|t;for(;o--;)n+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return n}},115,[]);
167__d(function(g,r,i,a,m,_e,d){"use strict";const e=["defaultStatus"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DrawerActions",{enumerable:!0,get:function(){return c}}),_e.DrawerRouter=function(t){let{defaultStatus:o="closed"}=t,l=(0,s.default)(t,e);const y=(0,u.TabRouter)(l),R=e=>Boolean(e.history?.some(e=>'drawer'===e.type)),A=e=>R(e)?e:Object.assign({},e,{history:[...e.history,{type:'drawer',status:'open'===o?'closed':'open'}]}),p=e=>R(e)?Object.assign({},e,{history:e.history.filter(e=>'drawer'!==e.type)}):e,E=e=>'open'===o?p(e):A(e),O=e=>'open'===o?A(e):p(e);return Object.assign({},y,{type:'drawer',getInitialState({routeNames:e,routeParamList:t,routeGetIdList:s}){const u=y.getInitialState({routeNames:e,routeParamList:t,routeGetIdList:s});return Object.assign({},u,{default:o,stale:!1,type:'drawer',key:`drawer-${(0,n.nanoid)()}`})},getRehydratedState(e,{routeNames:t,routeParamList:s,routeGetIdList:u}){if(!1===e.stale)return e;let c=y.getRehydratedState(e,{routeNames:t,routeParamList:s,routeGetIdList:u});return R(e)&&(c=p(c),c=A(c)),Object.assign({},c,{default:o,type:'drawer',key:`drawer-${(0,n.nanoid)()}`})},getStateForRouteFocus(e,t){const o=y.getStateForRouteFocus(e,t);return O(o)},getStateForAction(e,t,o){switch(t.type){case'OPEN_DRAWER':return E(e);case'CLOSE_DRAWER':return O(e);case'TOGGLE_DRAWER':return R(e)?p(e):A(e);case'JUMP_TO':case'NAVIGATE':case'NAVIGATE_DEPRECATED':{const s=y.getStateForAction(e,t,o);return null!=s&&s.index!==e.index?O(s):s}case'GO_BACK':return R(e)?p(e):y.getStateForAction(e,t,o);default:return y.getStateForAction(e,t,o)}},actionCreators:c})};var t,o=r(d[0]),s=(t=o)&&t.__esModule?t:{default:t},n=r(d[1]),u=r(d[2]);const c=Object.assign({},u.TabActions,{openDrawer:()=>({type:'OPEN_DRAWER'}),closeDrawer:()=>({type:'CLOSE_DRAWER'}),toggleDrawer:()=>({type:'TOGGLE_DRAWER'})})},116,[109,115,117]);
168__d(function(g,_r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TabActions",{enumerable:!0,get:function(){return n}}),e.TabRouter=function({initialRouteName:o,backBehavior:y="firstRoute"}){return Object.assign({},r.BaseRouter,{type:'tab',getInitialState({routeNames:r,routeParamList:s}){const n=void 0!==o&&r.includes(o)?r.indexOf(o):0,u=r.map(r=>({name:r,key:`${r}-${(0,t.nanoid)()}`,params:s[r]})),l=i(u,n,y,o);return{stale:!1,type:'tab',key:`tab-${(0,t.nanoid)()}`,index:n,routeNames:r,history:l,routes:u,preloadedRouteKeys:[]}},getRehydratedState(r,{routeNames:s,routeParamList:n}){const i=r;if(!1===i.stale)return i;const l=s.map(r=>{const s=i.routes.find(t=>t.name===r);return Object.assign({},s,{name:r,key:s&&s.name===r&&s.key?s.key:`${r}-${(0,t.nanoid)()}`,params:void 0!==n[r]?Object.assign({},n[r],s?s.params:void 0):s?s.params:void 0})}),p=Math.min(Math.max(s.indexOf(i.routes[i?.index??0]?.name),0),l.length-1),c=l.map(t=>t.key),f=i.history?.filter(t=>c.includes(t.key))??[];return u({stale:!1,type:'tab',key:`tab-${(0,t.nanoid)()}`,index:p,routeNames:s,history:f,routes:l,preloadedRouteKeys:i.preloadedRouteKeys?.filter(t=>c.includes(t))??[]},p,y,o)},getStateForRouteNamesChange(r,{routeNames:s,routeParamList:n,routeKeyChanges:u}){const l=s.map(s=>r.routes.find(t=>t.name===s&&!u.includes(t.name))||{name:s,key:`${s}-${(0,t.nanoid)()}`,params:n[s]}),p=Math.max(0,s.indexOf(r.routes[r.index].name));let c=r.history.filter(t=>'route'!==t.type||l.find(r=>r.key===t.key));return c.length||(c=i(l,p,y,o)),Object.assign({},r,{history:c,routeNames:s,routes:l,index:p})},getStateForRouteFocus(t,r){const s=t.routes.findIndex(t=>t.key===r);return-1===s||s===t.index?t:u(t,s,y,o)},getStateForAction(n,i,{routeParamList:l,routeGetIdList:p}){switch(i.type){case'JUMP_TO':case'NAVIGATE':case'NAVIGATE_DEPRECATED':{const r=n.routes.findIndex(t=>t.name===i.payload.name);if(-1===r)return null;const c=u(Object.assign({},n,{routes:n.routes.map(r=>{if(r.name!==i.payload.name)return r;const o=p[r.name],n=o?.({params:r.params}),u=o?.({params:i.payload.params}),y=n===u?r.key:`${r.name}
168-${(0,t.nanoid)()}`;let c;c='NAVIGATE'!==i.type&&'NAVIGATE_DEPRECATED'!==i.type||!i.payload.merge||n!==u?(0,s.createParamsFromAction)({action:i,routeParamList:l}):void 0!==i.payload.params||void 0!==l[r.name]?Object.assign({},l[r.name],r.params,i.payload.params):r.params;const f='NAVIGATE'===i.type&&null!=i.payload.path?i.payload.path:r.path;return c!==r.params||f!==r.path?Object.assign({},r,{key:y,path:f,params:c}):r})}),r,y,o);return Object.assign({},c,{preloadedRouteKeys:c.preloadedRouteKeys.filter(t=>t!==n.routes[c.index].key)})}case'SET_PARAMS':case'REPLACE_PARAMS':{const t=r.BaseRouter.getStateForAction(n,i);if(null!==t){const r=t.index;if(null!=r){const s=t.routes[r],o=n.history.findLastIndex(t=>t.key===s.key);let i=n.history;return-1!==o&&(i=[...n.history],i[o]=Object.assign({},i[o],{params:s.params})),Object.assign({},t,{history:i})}}return t}case'GO_BACK':{if(1===n.history.length)return null;const t=n.history[n.history.length-2],r=t?.key,s=n.routes.findLastIndex(t=>t.key===r);if(-1===s)return null;let o=n.routes;return'fullHistory'===y&&o[s].params!==t.params&&(o=[...n.routes],o[s]=Object.assign({},o[s],{params:t.params})),Object.assign({},n,{routes:o,preloadedRouteKeys:n.preloadedRouteKeys.filter(t=>t!==n.routes[s].key),history:n.history.slice(0,-1),index:s})}case'PRELOAD':{const r=n.routes.findIndex(t=>t.name===i.payload.name);if(-1===r)return null;const o=n.routes[r],u=p[o.name],y=u?.({params:o.params}),c=u?.({params:i.payload.params}),f=y===c?o.key:`${o.name}-${(0,t.nanoid)()}`,k=(0,s.createParamsFromAction)({action:i,routeParamList:l}),h=k!==o.params?Object.assign({},o,{key:f,params:k}):o;return Object.assign({},n,{preloadedRouteKeys:n.preloadedRouteKeys.filter(t=>t!==o.key).concat(h.key),routes:n.routes.map((t,s)=>s===r?h:t),history:f===o.key?n.history:n.history.filter(t=>t.key!==o.key)})}default:return r.BaseRouter.getStateForAction(n,i)}},actionCreators:n})};var t=_r(d[0]),r=_r(d[1]),s=_r(d[2]);const o='route',n={jumpTo:(t,r)=>({type:'JUMP_TO',payload:{name:t,params:r}})},i=(t,r,s,n)=>{const i=[{type:o,key:t[r].key}];let u;switch(s){case'order':for(let s=r;s>0;
168s--)i.unshift({type:o,key:t[s-1].key});break;case'firstRoute':0!==r&&i.unshift({type:o,key:t[0].key});break;case'initialRoute':u=t.findIndex(t=>t.name===n),u=-1===u?0:u,r!==u&&i.unshift({type:o,key:t[u].key})}return i},u=(t,r,s,n)=>{let u=t.history;if('history'===s||'fullHistory'===s){const n=t.routes[r];if('history'===s)u=u.filter(t=>'route'===t.type&&t.key!==n.key);else if('fullHistory'===s){const t=u.findLastIndex(t=>'route'===t.type);n.key===u[t]?.key&&(u=[...u.slice(0,t),...u.slice(t+1)])}u=u.concat({type:o,key:n.key,params:'fullHistory'===s?n.params:void 0})}else u=i(t.routes,r,s,n);return Object.assign({},t,{index:r,history:u})}},117,[115,114,118]);
169__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createParamsFromAction=function({action:t,routeParamList:n}){const{name:o,params:c}=t.payload;return void 0!==n[o]?Object.assign({},n[o],c):c}},118,[]);
170__d(function(g,_r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"StackActions",{enumerable:!0,get:function(){return n}}),e.StackRouter=function(i){const p=Object.assign({},o.BaseRouter,{type:'stack',getInitialState({routeNames:o,routeParamList:s}){const r=void 0!==i.initialRouteName&&o.includes(i.initialRouteName)?i.initialRouteName:o[0];return{stale:!1,type:'stack',key:`stack-${(0,t.nanoid)()}`,index:0,routeNames:o,preloadedRoutes:[],routes:[{key:`${r}-${(0,t.nanoid)()}`,name:r,params:s[r]}]}},getRehydratedState(o,{routeNames:s,routeParamList:r}){const n=o;if(!1===n.stale)return n;const p=n.routes.filter(t=>s.includes(t.name)).map(o=>Object.assign({},o,{key:o.key||`${o.name}-${(0,t.nanoid)()}`,params:void 0!==r[o.name]?Object.assign({},r[o.name],o.params):o.params})),u=n.preloadedRoutes?.filter(t=>s.includes(t.name)).map(o=>Object.assign({},o,{key:o.key||`${o.name}-${(0,t.nanoid)()}`,params:void 0!==r[o.name]?Object.assign({},r[o.name],o.params):o.params}))??[];if(0===p.length){const o=void 0!==i.initialRouteName?i.initialRouteName:s[0];p.push({key:`${o}-${(0,t.nanoid)()}`,name:o,params:r[o]})}return{stale:!1,type:'stack',key:`stack-${(0,t.nanoid)()}`,index:p.length-1,routeNames:s,routes:p,preloadedRoutes:u}},getStateForRouteNamesChange(o,{routeNames:s,routeParamList:r,routeKeyChanges:n}){const p=o.routes.filter(t=>s.includes(t.name)&&!n.includes(t.name));if(0===p.length){const o=void 0!==i.initialRouteName&&s.includes(i.initialRouteName)?i.initialRouteName:s[0];p.push({key:`${o}-${(0,t.nanoid)()}`,name:o,params:r[o]})}return Object.assign({},o,{routeNames:s,routes:p,index:Math.min(o.index,p.length-1)})},getStateForRouteFocus(t,o){const s=t.routes.findIndex(t=>t.key===o);return-1===s||s===t.index?t:Object.assign({},t,{index:s,routes:t.routes.slice(0,s+1)})},getStateForAction(n,i,u){const{routeParamList:l}=u;switch(i.type){case'REPLACE':{const t=i.target===n.key&&i.source?n.routes.findIndex(t=>t.key===i.source):n.index;if(-1===t)return null;if(!n.routeNames.includes(i.payload.name))return null;const o=u.routeGetIdList[i.payload.name],s=o?.({params:i.payload.params});let p=n.preloadedRoutes.find(t=>t.name===i.payload.name&&s===o?.({params:t.params}));return p||(p=(0,r.createRouteFromAction)({action:i,routeParamList:l})),Object.assign({},n,{routes:n.routes.map((o,s)=>s===t?p:o),preloadedRoutes:n.preloadedRoutes.filter(t=>t.key!==p.key)})}case'PUSH':case'NAVIGATE':{if(!n.routeNames.includes(i.payload.name))return null;const o=u.routeGetIdList[i.payload.name],r=o?.({params:i.payload.params});let p,c,y;if(void 0!==r)p=n.routes.findLast(t=>t.name===i.payload.name&&r===o?.({params:t.params}));else if('NAVIGATE'===i.type){const t=n.routes[n.index];i.payload.name===t.name?p=t:i.payload.pop&&(p=n.routes.findLast(t=>t.name===i.payload.name))}if(p||(p=n.preloadedRoutes.find(t=>t.name===i.payload.name&&r===o?.({params:t.params}))),c='NAVIGATE'===i.type&&i.payload.merge&&p?void 0!==i.payload.params||void 0!==l[i.payload.name]?Object.assign({},l[i.payload.name],p.params,i.payload.params):p.params:(0,s.createParamsFromAction)({action:i,routeParamList:l}),p)if('NAVIGATE'===i.type&&i.payload.pop){y=[];for(const t of n.routes){if(t.key===p.key){y.push(Object.assign({},p,{path:void 0!==i.payload.path?i.payload.path:p.path,params:c}));break}y.push(t)}}else y=n.routes.filter(t=>t.key!==p.key),y.push(Object.assign({},p,{path:'NAVIGATE'===i.type&&void 0!==i.payload.path?i.payload.path:p.path,params:c}));else y=[...n.routes,{key:`${i.payload.name}
170-${(0,t.nanoid)()}`,name:i.payload.name,path:'NAVIGATE'===i.type?i.payload.path:void 0,params:c}];return Object.assign({},n,{index:y.length-1,preloadedRoutes:n.preloadedRoutes.filter(t=>y[y.length-1].key!==t.key),routes:y})}case'NAVIGATE_DEPRECATED':{if(!n.routeNames.includes(i.payload.name))return null;if(n.preloadedRoutes.find(t=>t.name===i.payload.name&&p===o?.({params:t.params})))return null;let t=-1;const o=u.routeGetIdList[i.payload.name],p=o?.({params:i.payload.params});if(t=void 0!==p?n.routes.findIndex(t=>t.name===i.payload.name&&p===o?.({params:t.params})):n.routes[n.index].name===i.payload.name?n.index:n.routes.findLastIndex(t=>t.name===i.payload.name),-1===t){const t=[...n.routes,(0,r.createRouteFromAction)({action:i,routeParamList:l})];return Object.assign({},n,{routes:t,index:t.length-1})}const c=n.routes[t];let y;return y=i.payload.merge?void 0!==i.payload.params||void 0!==l[c.name]?Object.assign({},l[c.name],c.params,i.payload.params):c.params:(0,s.createParamsFromAction)({action:i,routeParamList:l}),Object.assign({},n,{index:t,routes:[...n.routes.slice(0,t),y!==c.params?Object.assign({},c,{params:y}):n.routes[t]]})}case'POP':{const t=i.target===n.key&&i.source?n.routes.findIndex(t=>t.key===i.source):n.index;if(t>0){const o=Math.max(t-i.payload.count+1,1),s=n.routes.slice(0,o).concat(n.routes.slice(t+1));return Object.assign({},n,{index:s.length-1,routes:s})}return null}case'POP_TO_TOP':return p.getStateForAction(n,{type:'POP',payload:{count:n.routes.length-1}},u);case'POP_TO':{const t=i.target===n.key&&i.source?n.routes.findLastIndex(t=>t.key===i.source):n.index;if(-1===t)return null;if(!n.routeNames.includes(i.payload.name))return null;let o=-1;const p=u.routeGetIdList[i.payload.name],c=p?.({params:i.payload.params});if(void 0!==c)o=n.routes.findIndex(t=>t.name===i.payload.name&&c===p?.({params:t.params}));else if(n.routes[t].name===i.payload.name)o=t;else for(let s=t;s>=0;s--)if(n.routes[s].name===i.payload.name){o=s;break}if(-1===o){let o=n.preloadedRoutes.find(t=>t.name===i.payload.name&&c===p?.({params:t.params}));o||(o=(0,r.createRouteFromAction)({action:i,routeParamList:l}));const s=n.routes.slice(0,t).concat(o);return Object.assign({},n,{index:s.length-1,routes:s,preloadedRoutes:n.preloadedRoutes.filter(t=>t.key!==o.key)})}const y=n.routes[o];let f;return f=i.payload.merge?void 0!==i.payload.params||void 0!==l[y.name]?Object.assign({},l[y.name],y.params,i.payload.params):y.params:(0,s.createParamsFromAction)({action:i,routeParamList:l}),Object.assign({},n,{index:o,routes:[...n.routes.slice(0,o),f!==y.params?Object.assign({},y,{params:f}):n.routes[o]]})}case'GO_BACK':return n.index>0?p.getStateForAction(n,{type:'POP',payload:{count:1},target:i.target,source:i.source},u):null;case'PRELOAD':{const t=u.routeGetIdList[i.payload.name],o=t?.({params:i.payload.params});let p;return void 0!==o&&(p=n.routes.find(s=>s.name===i.payload.name&&o===t?.({params:s.params}))),p?Object.assign({},n,{routes:n.routes.map(t=>t.key!==p?.key?t:Object.assign({},t,{params:(0,s.createParamsFromAction)({action:i,routeParamList:l})}))}):Object.assign({},n,{preloadedRoutes:n.preloadedRoutes.filter(s=>s.name!==i.payload.name||o!==t?.({params:s.params})).concat((0,r.createRouteFromAction)({action:i,routeParamList:l}))})}default:return o.BaseRouter.getStateForAction(n,i)}},actionCreators:n});return p};var t=_r(d[0]),o=_r(d[1]),s=_r(d[2]),r=_r(d[3]);const n={replace:(t,o)=>({type:'REPLACE',payload:{name:t,params:o}}),push:(t,o)=>({type:'PUSH',payload:{name:t,params:o}}),pop:(t=1)=>({type:'POP',payload:{count:t}}),popToTop:()=>({type:'POP_TO_TOP'}),popTo:(t,o,s)=>('boolean'==typeof s&&console.warn("Passing a boolean as the third argument to 'popTo' is deprecated. Pass '{ merge: true }' instead."),{type:'POP_TO',payload:{name:t,params:o,merge:'boolean'==typeof s?s:s?.merge}})}},119,[115,114,118,120]);
171__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createRouteFromAction=function({action:n,routeParamList:c}){const{name:u}=n.payload;return{key:`${u}-${(0,t.nanoid)()}`,name:u,params:(0,o.createParamsFromAction)({action:n,routeParamList:c})}};var t=r(d[0]),o=r(d[1])},120,[115,118]);
172__d(function(g,r,i,a,m,e,d){},121,[]);
173__d(function(g,r,i,a,m,_e,d){"use strict";
173Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},122,[123]);
174__d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]),n='undefined'!=typeof document||'undefined'!=typeof navigator&&'ReactNative'===navigator.product?t.useLayoutEffect:t.useEffect;m.exports=function(u){var f=t.useRef(u),c=t.useRef(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return f.current.apply(this,t)}).current;return n(function(){f.current=u}),c}},123,[34]);
175__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.checkDuplicateRouteNames=function(t){const n=[],s=(t,c)=>{c.routes.forEach(c=>{const o=t?`${t} > ${c.name}`:c.name;c.state?.routeNames?.forEach(t=>{t===c.name&&n.push([o,`${o} > ${c.name}`])}),c.state&&s(o,c.state)})};return s('',t),n}},124,[]);
176__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.checkSerializable=function(n){return t(n,new Set,[])};const t=(n,i,o)=>{if(null==n||'boolean'==typeof n||'number'==typeof n||'string'==typeof n)return{serializable:!0};if('[object Object]'!==Object.prototype.toString.call(n)&&!Array.isArray(n))return{serializable:!1,location:o,reason:'function'==typeof n?'Function':String(n)};if(i.has(n))return{serializable:!1,reason:'Circular reference',location:o};if(i.add(n),Array.isArray(n))for(let l=0;l<n.length;l++){const c=t(n[l],new Set(i),[...o,l]);if(!c.serializable)return c}else for(const l in n){const c=t(n[l],new Set(i),[...o,l]);if(!c.serializable)return c}return{serializable:!0}}},125,[]);
177__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NOT_INITIALIZED_ERROR",{enumerable:!0,get:function(){return n}}),e.createNavigationContainerRef=function(){const o=[...Object.keys(t.CommonActions),'addListener','removeListener','resetRoot','dispatch','isFocused','canGoBack','getRootState','getState','getParent','getCurrentRoute','getCurrentOptions'],s={},c=(t,n)=>{s[t]&&(s[t]=s[t].filter(t=>t!==n))};let u=null;return Object.assign({get current(){return u},set current(t){u=t,null!=t&&Object.entries(s).forEach(([n,o])=>{o.forEach(o=>{t.addListener(n,o)})})},isReady:()=>null!=u&&u.isReady()},o.reduce((t,o)=>(t[o]=(...t)=>{if(null!=u)return u[o](...t);switch(o){case'addListener':{const[n,o]=t;return s[n]=s[n]||[],s[n].push(o),()=>c(n,o)}case'removeListener':{const[n,o]=t;c(n,o);break}default:console.error(n)}},t),{}))};var t=r(d[0]);const n="The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details."},126,[112]);
178__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DeprecatedNavigationInChildContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(!1)},127,[34]);
179__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SingleNavigatorContext",{enumerable:!0,get:function(){return o}}),_e.EnsureSingleNavigator=function({children:u}){const c=e.useRef(void 0),s=e.useMemo(()=>({register(e){const t=c.current;if(void 0!==t&&e!==t)throw new Error(n);c.current=e},unregister(e){e===c.current&&(c.current=void 0)}}),[]);return(0,t.jsx)(o.Provider,{value:s,children:u})};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]);const n="Another navigator is already registered for this container. You likely have multiple navigators under a single \"NavigationContainer\" or \"Screen\". Make sure each navigator is under a separate \"Screen\" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.",o=e.createContext(void 0)},128,[34,104]);
180__d(function(g,r,i,a,m,e,d){"use strict";
180Object.defineProperty(e,'__esModule',{value:!0}),e.findFocusedRoute=function(t){let n=t;for(;null!=n?.routes[n.index??0].state;)n=n.routes[n.index??0].state;const u=n?.routes[n?.index??0];return u}},129,[]);
181__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationBuilderContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext({onDispatchAction:()=>{},onOptionsChange:()=>{},scheduleUpdate:()=>{throw new Error("Couldn't find a context for scheduling updates.")},flushUpdates:()=>{throw new Error("Couldn't find a context for flushing updates.")}})},130,[34]);
182__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationContainerRefContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},131,[34]);
183__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationIndependentTreeContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(!1)},132,[34]);
184__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationStateContext",{enumerable:!0,get:function(){return n}});var t=(function(t){if(t&&t.__esModule)return t;var e={};return t&&Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),e.default=t,e})(r(_d[0]));const e="Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.",n=t.createContext({isDefault:!0,get getKey(){throw new Error(e)},get setKey(){throw new Error(e)},get getState(){throw new Error(e)},get setState(){throw new Error(e)},get getIsInitial(){throw new Error(e)}})},133,[34]);
185__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ThemeProvider=function({value:u,children:o}){return(0,t.jsx)(n.ThemeContext.Provider,{value:u,children:o})},r(d[0]);var n=r(d[1]),t=r(d[2])},134,[34,135,104]);
186__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ThemeContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0);e.displayName='ThemeContext'},135,[34]);
187__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"UnhandledActionContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},136,[34]);
188__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useChildListeners=function(){const{current:t}=e.useRef({action:[],focus:[]}),n=e.useCallback((e,n)=>{t[e].push(n);let u=!1;return()=>{const c=t[e].indexOf(n);!u&&c>-1&&(u=!0,t[e].splice(c,1))}},[t]);return{listeners:t,addListener:n}};
188var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},137,[34]);
189__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useEventEmitter=function(t){const n=e.useRef(t);e.useEffect(()=>{n.current=t});const u=e.useRef(Object.create(null)),c=e.useCallback(e=>{const t=(t,n)=>{const c=u.current[t]?u.current[t][e]:void 0;if(!c)return;const o=c.indexOf(n);o>-1&&c.splice(o,1)};return{addListener:(n,c)=>{u.current[n]=u.current[n]||{},u.current[n][e]=u.current[n][e]||[],u.current[n][e].push(c);let o=!1;return()=>{o||(o=!0,t(n,c))}},removeListener:t}},[]),o=e.useCallback(({type:e,data:t,target:c,canPreventDefault:o})=>{const i=u.current[e]||{},s=void 0!==c?i[c]?.slice():[].concat(...Object.keys(i).map(e=>i[e])).filter((e,t,n)=>n.lastIndexOf(e)===t),f={get type(){return e}};if(void 0!==c&&Object.defineProperty(f,'target',{enumerable:!0,get:()=>c}),void 0!==t&&Object.defineProperty(f,'data',{enumerable:!0,get:()=>t}),o){let e=!1;Object.defineProperties(f,{defaultPrevented:{enumerable:!0,get:()=>e},preventDefault:{enumerable:!0,value(){e=!0}}})}return n.current?.(f),s?.forEach(e=>e(f)),f},[]);return e.useMemo(()=>({create:c,emit:o}),[c,o])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},138,[34]);
190__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useKeyedChildListeners=function(){const{current:t}=e.useRef(Object.assign(Object.create(null),{getState:{},beforeRemove:{}})),n=e.useCallback((e,n,u)=>(t[e][n]=u,()=>{t[e][n]=void 0}),[t]);return{keyedListeners:t,addKeyedListener:n}};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},139,[34]);
191__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigationIndependentTree=function(){return e.useContext(t.NavigationIndependentTreeContext)};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},140,[34,132]);
192__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useOptionsGetters=function({key:u,options:c,navigation:o}){const s=e.useRef(c),l=e.useRef({}),{onOptionsChange:f}=e.useContext(t.NavigationBuilderContext),{addOptionsGetter:d}=e.useContext(n.NavigationStateContext),O=e.useCallback(()=>{const e=o?.isFocused()??!0,t=Object.keys(l.current).length;e&&!t&&f(s.current??{})},[o,f]);e.useEffect(()=>(s.current=c,O(),o?.addListener('focus',O)),[o,c,O]);const b=e.useCallback(()=>{for(const e in l.current)if(e in l.current){const t=l.current[e]?.();if(null!==t)return t}return null},[]),p=e.useCallback(()=>{if(!(o?.isFocused()??!0))return null;const e=b();return null!==e?e:s.current},[o,b]);e.useEffect(()=>d?.(u,p),[p,d,u]);return{addOptionsGetter:e.useCallback((e,t)=>(l.current[e]=t,O(),()=>{delete l.current[e],O()}),[O]),getCurrentOptions:p}};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2])},141,[34,130,133]);
193__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useSyncState=function(e){const u=t.useRef(c(e)).current,s=t.useSyncExternalStore(u.subscribe,u.getState,u.getState);t.useDebugValue(s);const o=t.useRef([]),f=(0,n.default)(e=>{o.current.push(e)}),d=(0,n.default)(()=>{const e=o.current;o.current=[],0!==e.length&&u.batchUpdates(()=>{for(const t of e)t()})});return{state:s,getState:u.getState,setState:u.setState,scheduleUpdate:f,flushUpdates:d}};
193var e,t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(u){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(t,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}),t.default=e,t})(r(_d[0])),u=r(_d[1]),n=(e=u)&&e.__esModule?e:{default:e},s=r(_d[2]);const c=e=>{const t=[];let u,n=!1;let c=!1,o=!1;return{getState:()=>(n||(n=!0,u=(0,s.deepFreeze)(e())),u),setState:e=>{u=(0,s.deepFreeze)(e),o=!0,c||t.forEach(e=>e())},batchUpdates:e=>{c=!0,e(),c=!1,o&&(o=!1,t.forEach(e=>e()))},subscribe:e=>(t.push(e),()=>{const u=t.indexOf(e);u>-1&&t.splice(u,1)})}}},142,[34,122,143]);
194__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isPlainObject",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"deepFreeze",{enumerable:!0,get:function(){return n}});const t=t=>'object'==typeof t&&null!==t&&Object.getPrototypeOf(t)===Object.prototype,n=t=>t},143,[]);
195__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.createNavigatorFactory=function(c){const u=c.displayName??c.name??'Navigator';return function(f){if(null!=f){const p=(0,o.createComponentForStaticNavigation)({Navigator:c,Screen:n.Screen,Group:t.Group,config:f},u);return{config:f,with(t){const n=()=>e.createElement(t,{Navigator:p});return n.displayName=`${u}With`,{config:f,getComponent:()=>n}},getComponent:()=>p}}return{Navigator:c,Screen:n.Screen,Group:t.Group}}};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3])},144,[34,145,146,147]);
196__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Group=function(u){return null}},145,[]);
197__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Screen=function(n){return null}},146,[]);
198__d(function(g,r,i,_a,m,_e,_d){"use strict";const e=["screen","if"],n=["screens","groups"],t=["if"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.createComponentForStaticNavigation=function(e,s){const{Navigator:o,Group:a,Screen:p,config:u}=e,{screens:l,groups:h}=u,O=(0,c.default)(u,n);if(null==l&&null==h)throw new Error("Couldn't find a 'screens' or 'groups' property. Make sure to define your screens under a 'screens' property in the configuration.");const y=[];for(const e in u)'screens'===e&&l&&y.push(...d(p,l)),'groups'===e&&h&&y.push(...Object.entries(h).map(([e,n])=>{let{if:s}=n,o=(0,c.default)(n,t);const u=d(p,o.screens);return()=>{const n=u.map(e=>e());return null==s||s()?(0,f.jsx)(a,Object.assign({navigationKey:e},o,{children:n}),e):null}}));if(0===y.length)throw new Error("Couldn't find any screens in the 'screens' or 'groups' property. Make sure to define at least one screen in the configuration.");const j=e=>{const n=y.map(e=>e()),t='function'==typeof e.screenOptions||'function'==typeof O.screenOptions?n=>Object.assign({},'function'==typeof O.screenOptions?O.screenOptions(n):O.screenOptions,'function'==typeof e.screenOptions?e.screenOptions(n):e.screenOptions):Object.assign({},O.screenOptions,e.screenOptions),s='function'==typeof e.screenListeners||'function'==typeof O.screenListeners?n=>Object.assign({},'function'==typeof O.screenListeners?O.screenListeners(n):O.screenListeners,'function'==typeof e.screenListeners?e.screenListeners(n):e.screenListeners):Object.assign({},O.screenListeners,e.screenListeners);return(0,f.jsx)(o,Object.assign({},O,e,{screenOptions:t,screenListeners:s,children:n}))};return j.displayName=s,j},_e.createComponentForStaticNavigationDeprecated=function(e){return console.warn('`createComponentForStaticNavigation` is deprecated. Use `tree.getComponent()` instead.'),e.getComponent()},_e.createPathConfigForStaticNavigation=function(e,n,t){let s,o=!1;const c=(e,n,a)=>{const p=(e,n)=>Object.fromEntries(Object.entries(e).sort(([e],[t])=>e===n?-1:t===n?1:0).map(([e,p])=>{const u={};let f;'linking'in p&&('string'==typeof p.linking?u.path=p.linking:Object.assign(u,p.linking),'string'==typeof u.path&&(u.path=u.path.replace(/^\//,'').replace(/\/$/,'')));const l=a||null!=u.path&&''!==u.path;return'config'in p?f=c(p,void 0,l):'screen'in p&&'config'in p.screen&&(p.screen.config.screens||p.screen.config.groups)&&(f=c(p.screen,void 0,l)),f&&(u.screens=f),!t||u.screens||'linking'in p&&null==p.linking||(null!=u.path?a||(e===n&&null!=u.path?o=!0:''===u.path&&(s=void 0)):(a||null!=s||(s=u),u.path=e.replace(/([A-Z]+)/g,'-$1').replace(/^-/,'').toLowerCase())),[e,u]}).filter(([,e])=>Object.keys(e).length>0)),u={};for(const t in e.config)'screens'===t&&e.config.screens&&Object.assign(u,p(e.config.screens,n?.initialRouteName??e.config.initialRouteName)),'groups'===t&&e.config.groups&&Object.entries(e.config.groups).forEac
198h(([,t])=>{Object.assign(u,p(t.screens,n?.initialRouteName??e.config.initialRouteName))});if(0!==Object.keys(u).length)return u},a=c(e,n,!1);t&&s&&!o&&(s.path='');return a};var s,o=r(_d[0]),c=(s=o)&&s.__esModule?s:{default:s},a=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[1])),p=r(_d[2]),u=r(_d[3]),f=r(_d[4]);const l=a.memo(({component:e})=>{const n=(0,u.useRoute)();return a.createElement(e,{route:n})});l.displayName='Memo(Screen)';const d=(n,t)=>Object.entries(t).map(([t,s])=>{let o,u,d={},h=!1;if('screen'in s){const{screen:n,if:t}=s,a=(0,c.default)(s,e);u=t,d=a,(0,p.isValidElementType)(n)?o=n:'config'in n&&(h=!0,o=n.getComponent())}else(0,p.isValidElementType)(s)?o=s:'config'in s&&(h=!0,o=s.getComponent());if(null==o)throw new Error(`Couldn't find a 'screen' property for the screen '${t}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.`);const O=h?a.createElement(o,{}):(0,f.jsx)(l,{component:o});return()=>null==u||u()?(0,f.jsx)(n,Object.assign({name:t},d,{children:()=>O}),t):null})},147,[109,34,148,150,104]);
199__d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},148,[149]);
200__d(function(g,r,i,a,m,e,d){
201/**
202   * @license React
203   * react-is.production.js
204   *
205   * Copyright (c) Meta Platforms, Inc. and affiliates.
206   *
207   * This source code is licensed under the MIT license found in the
208   * LICENSE file in the root directory of this source tree.
209   */
210"use strict";var t=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),w=Symbol.for("react.client.reference");function v(w){if("object"==typeof w&&null!==w){var v=w.$$typeof;switch(v){case t:switch(w=w.type){case n:case f:case c:case y:case p:case b:return w;default:switch(w=w&&w.$$typeof){case u:case l:case $:case S:case s:return w;default:return v}}case o:return v}}}e.ContextConsumer=s,e.ContextProvider=u,e.Element=t,e.ForwardRef=l,e.Fragment=n,e.Lazy=$,e.Memo=S,e.Portal=o,e.Profiler=f,e.StrictMode=c,e.Suspense=y,e.SuspenseList=p,e.isContextConsumer=function(t){return v(t)===s},e.isContextProvider=function(t){return v(t)===u},e.isElement=function(o){return"object"==typeof o&&null!==o&&o.$$typeof===t},e.isForwardRef=function(t){return v(t)===l},e.isFragment=function(t){return v(t)===n},e.isLazy=function(t){return v(t)===$},e.isMemo=function(t){return v(t)===S},e.isPortal=function(t){return v(t)===o},e.isProfiler=function(t){return v(t)===f},e.isStrictMode=function(t){return v(t)===c},e.isSuspense=function(t){return v(t)===y},e.isSuspenseList=function(t){return v(t)===p},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===f||t===c||t===y||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===$||t.$$typeof===S||t.$$typeof===u||t.$$typeof===s||t.$$typeof===l||t.$$typeof===w||void 0!==t.getModuleId)},e.typeOf=v},149,[]);
211__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useRoute=function(){const n=e.useContext(t.NavigationRouteContext);if(void 0===n)throw new Error("Couldn't find a route object. Is your component inside a screen in a navigator?");return n};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},150,[34,151]);
212__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationRouteContext",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"NamedRouteContextListContext",{enumerable:!0,get:function(){return c}}),_e.NavigationProvider=function({route:c,navigation:d,children:s}){const v=e.useContext(n.IsFocusedContext),l=e.useContext(n.FocusedRouteKeyContext),f=!(null!=v&&!v)&&l===c.key;return(0,o.jsx)(u.Provider,{value:c,children:(0,o.jsx)(t.NavigationContext.Provider,{value:d,children:(0,o.jsx)(n.IsFocusedContext.Provider,{value:f,children:s})})})};
212var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3]);const u=e.createContext(void 0),c=e.createContext(void 0)},151,[34,152,153,104]);
213__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},152,[34]);
214__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"FocusedRouteKeyContext",{enumerable:!0,get:function(){return n}}),Object.defineProperty(_e,"IsFocusedContext",{enumerable:!0,get:function(){return o}}),_e.useIsFocused=function(){const n=e.useContext(o),u=(0,t.useNavigation)(),c=void 0!==n,s=e.useCallback(e=>{if(c)return()=>{};const t=u.addListener('focus',e),n=u.addListener('blur',e);return()=>{t(),n()}},[c,u]),d=e.useSyncExternalStore(s,u.isFocused,u.isFocused);return n??d};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]);const n=e.createContext(void 0),o=e.createContext(void 0)},153,[34,154]);
215__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigation=function(){const o=e.useContext(t.NavigationContainerRefContext),u=e.useContext(n.NavigationContext);if(void 0===u&&void 0===o)throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");return u??o};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2])},154,[34,131,152]);
216__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CurrentRenderContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},155,[34]);
217__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getActionFromState=function(n,s){const o=s?t(s):{},c=null!=n.index?n.routes.slice(0,n.index+1):n.routes;if(0===c.length)return;if(!(1===c.length&&void 0===c[0].key||2===c.length&&void 0===c[0].key&&c[0].name===o?.initialRouteName&&void 0===c[1].key))return{type:'RESET',payload:n};const l=n.routes[n.index??n.routes.length-1];let p=l?.state,u=o?.screens?.[l?.name],h=Object.assign({},l.params);const y=l?{name:l.name,path:l.path,params:h}:void 0;y&&u?.screens&&Object.keys(u.screens).length&&(y.pop=!0);for(;p;){if(0===p.routes.length)return;const t=null!=p.index?p.routes.slice(0,p.index+1):p.routes,n=t[t.length-1];if(Object.assign(h,{initial:void 0,screen:void 0,params:void 0,state:void 0}),1===t.length&&void 0===t[0].key)h.initial=!0,h.screen=n.name;else{if(2!==t.length||void 0!==t[0].key||t[0].name!==u?.initialRouteName||void 0!==t[1].key){h.state=p;break}h.initial=!1,h.screen=n.name}n.state?(h.params=Object.assign({},n.params),h.pop=!0,h=h.params):(h.path=n.path,h.params=n.params),p=n.state,u=u?.screens?.[n.name],u?.screens&&Object.keys(u.screens).length&&(h.pop=!0)}(y?.params.screen||y?.params.state)&&(y.pop=!0);if(!y)return;return{type:'NAVIGATE',payload:y}};const t=t=>'object'==typeof t&&null!=t?{initialRouteName:t.initialRouteName,screens:null!=t.screens?n(t.screens):void 0}:{},n=n=>Object.entries(n).reduce((n,[s,o])=>(n[s]=t(o),n),{})},156,[]);
218__d(function(g,r,i,a,m,e,d){"use strict";
218Object.defineProperty(e,'__esModule',{value:!0}),e.getFocusedRouteNameFromRoute=function(n){const o=n[t.CHILD_STATE]??n.state,s=n.params;return o?o.routes[o.index??('string'==typeof o.type&&'stack'!==o.type?0:o.routes.length-1)].name:'string'==typeof s?.screen?s.screen:void 0};var t=r(d[0])},157,[158]);
219__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["state"];Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CHILD_STATE",{enumerable:!0,get:function(){return s}}),_e.useRouteCache=function(t){const n=c.useMemo(()=>({current:new Map}),[]);return n.current=t.reduce((t,c)=>{const f=n.current.get(c.key),{state:l}=c,d=(0,u.default)(c,e);let b;return b=f&&(0,o.isRecordEqual)(f,d)?f:d,Object.defineProperty(b,s,{enumerable:!1,configurable:!0,value:l}),t.set(c.key,b),t},new Map),Array.from(n.current.values())};var t,n=r(_d[0]),u=(t=n)&&t.__esModule?t:{default:t},c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),o=r(_d[2]);const s=Symbol('CHILD_STATE')},158,[109,34,159]);
220__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isRecordEqual=function(t,n){if(t===n)return!0;const c=Object.keys(t),u=Object.keys(n);if(c.length!==u.length)return!1;return c.every(c=>Object.is(t[c],n[c]))}},159,[]);
221__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getPathFromState=function(t,o){if(null==t)throw Error(`Got '${String(t)}' for the navigation state. You must pass a valid state object.`);o&&(0,n.validatePathConfig)(o);const f=c(o);let p='/',u=t;const d={};for(;u;){let n,o,c='number'==typeof u.index?u.index:0,l=u.routes[c],h=f;const b=s(t),y=[];let j=!0;for(;l.name in h&&j;){if(n=h[l.name].parts,y.push(l.name),l.params){const e=h[l.name],t=Object.fromEntries(Object.entries(l.params).map(([t,n])=>{if(void 0===n){if(!e)return null;{const n=e.parts?.find(e=>e.param===t)?.optional;if(n)return null}}return[t,(e?.stringify?.[t]??String)(n)]}).filter(e=>null!=e));n?.length&&Object.assign(d,t),b===l&&(o=Object.assign({},t),n?.forEach(({param:e})=>{e&&o&&delete o[e]}))}if(h[l.name].screens&&void 0!==l.state){c='number'==typeof l.state.index?l.state.index:l.state.routes.length-1;const e=l.state.routes[c],t=h[l.name].screens;t&&e.name in t?(l=e,h=t):j=!1}else j=!1}if(void 0!==h[l.name]?p+=n?.map(({segment:e,param:t,optional:n})=>{if('*'===e)return l.name;if(t){const e=d[t];return void 0===e&&n?'':Array.from(String(e)).map(e=>/[^A-Za-z0-9\-._~!$&'()*+,;=:@]/g.test(e)?encodeURIComponent(e):e).join('')}return encodeURIComponent(e)}).join('/'):p+=encodeURIComponent(l.name),!o&&b.params&&(o=Object.fromEntries(Object.entries(b.params).map(([e,t])=>[e,String(t)]))),l.state)p+='/';else if(o){for(const e in o)'undefined'===o[e]&&delete o[e];const t=e.stringify(o,{sort:!1});t&&(p+=`?${t}`)}u=l.state}o?.path&&(p=`${o.path}/${p}`);p=p.replace(/\/+/g,'/'),p=p.length>1?p.replace(/\/$/,''):p,p.startsWith('/')||(p=`/${p}`);return p};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]);const s=e=>{const t='number'==typeof e.index?e.routes[e.index]:e.routes[e.routes.length-1];return t.state?s(t.state):t},o=new WeakMap,c=e=>{if(!e?.screens)return{};const t=o.get(e?.screens);if(t)return t;const n=p(e.screens);return o.set(e.screens,n),n};const f=(e,n)=>{if('string'==typeof e){const s=(0,t.getPatternParts)(e);return n?{parts:[...n,...s]}:{parts:s}}if(e.exact&&void 0===e.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");const s=!0!==e.exact?[...n||[],...e.path?(0,t.getPatternParts)(e.path):[]]:e.path?(0,t.getPatternParts)(e.path):void 0,o=e.screens?p(e.screens,s):void 0;return{parts:s,stringify:e.stringify,screens:o}},p=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,f(n,t)]))},160,[161,166,167]);
222__d(function(g,r,i,_a,m,e,d){'use strict';const t=r(d[0]),n=r(d[1]),a=r(d[2]),o=r(d[3]),s=Symbol('encodeFragmentIdentifier');function c(t){switch(t.arrayFormat){case'index':return n=>(a,o)=>{const s=a.length;return void 0===o||t.skipNull&&null===o||t.skipEmptyString&&''===o?a:null===o?[...a,[p(n,t),'[',s,']'].join('')]:[...a,[p(n,t),'[',p(s,t),']=',p(o,t)].join('')]};case'bracket':return n=>(a,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&''===o?a:null===o?[...a,[p(n,t),'[]'].join('')]:[...a,[p(n,t),'[]=',p(o,t)].join('')];case'colon-list-separator':return n=>(a,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&''===o?a:null===o?[...a,[p(n,t),':list='].join('')]:[...a,[p(n,t),':list=',p(o,t)].join('')];case'comma':case'separator':case'bracket-separator':{const n='bracket-separator'===t.arrayFormat?'[]=':'=';return a=>(o,s)=>void 0===s||t.skipNull&&null===s||t.skipEmptyString&&''===s?o:(s=null===s?'':s,0===o.length?[[p(a,t),n,p(s,t)].join('')]:[[o,p(s,t)].join(t.arrayFormatSeparator)])}default:return n=>(a,o)=>void 0===o||t.skipNull&&null===o||t.skipEmptyString&&''===o?a:null===o?[...a,p(n,t)]:[...a,[p(n,t),'=',p(o,t)].join('')]}}function l(t){let n;switch(t.arrayFormat){case'index':return(t,a,o)=>{n=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,''),n?(void 0===o[t]&&(o[t]={}),o[t][n[1]]=a):o[t]=a};case'bracket':return(t,a,o)=>{n=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,''),n?void 0!==o[t]?o[t]=[].concat(o[t],a):o[t]=[a]:o[t]=a};case'colon-list-separator':return(t,a,o)=>{n=/(:list)$/.exec(t),t=t.replace(/:list$/,''),n?void 0!==o[t]?o[t]=[].concat(o[t],a):o[t]=[a]:o[t]=a};case'comma':case'separator':return(n,a,o)=>{const s='string'==typeof a&&a.includes(t.arrayFormatSeparator),c='str
222ing'==typeof a&&!s&&f(a,t).includes(t.arrayFormatSeparator);a=c?f(a,t):a;const l=s||c?a.split(t.arrayFormatSeparator).map(n=>f(n,t)):null===a?a:f(a,t);o[n]=l};case'bracket-separator':return(n,a,o)=>{const s=/(\[\])$/.test(n);if(n=n.replace(/\[\]$/,''),!s)return void(o[n]=a?f(a,t):a);const c=null===a?[]:a.split(t.arrayFormatSeparator).map(n=>f(n,t));void 0!==o[n]?o[n]=[].concat(o[n],c):o[n]=c};default:return(t,n,a)=>{void 0!==a[t]?a[t]=[].concat(a[t],n):a[t]=n}}}function u(t){if('string'!=typeof t||1!==t.length)throw new TypeError('arrayFormatSeparator must be single character string')}function p(n,a){return a.encode?a.strict?t(n):encodeURIComponent(n):n}function f(t,a){return a.decode?n(t):t}function y(t){return Array.isArray(t)?t.sort():'object'==typeof t?y(Object.keys(t)).sort((t,n)=>Number(t)-Number(n)).map(n=>t[n]):t}function b(t){const n=t.indexOf('#');return-1!==n&&(t=t.slice(0,n)),t}function j(t){let n='';const a=t.indexOf('#');return-1!==a&&(n=t.slice(a)),n}function k(t){const n=(t=b(t)).indexOf('?');return-1===n?'':t.slice(n+1)}function F(t,n){return n.parseNumbers&&!Number.isNaN(Number(t))&&'string'==typeof t&&''!==t.trim()?t=Number(t):!n.parseBooleans||null===t||'true'!==t.toLowerCase()&&'false'!==t.toLowerCase()||(t='true'===t.toLowerCase()),t}function O(t,n){u((n=Object.assign({decode:!0,sort:!0,arrayFormat:'none',arrayFormatSeparator:',',parseNumbers:!1,parseBooleans:!1},n)).arrayFormatSeparator);const o=l(n),s=Object.create(null);if('string'!=typeof t)return s;if(!(t=t.trim().replace(/^[?#&]/,'')))return s;for(const c of t.split('&')){if(''===c)continue;let[t,l]=a(n.decode?c.replace(/\+/g,' '):c,'=');l=void 0===l?null:['comma','separator','bracket-separator'].includes(n.arrayFormat)?l:f(l,n),o(f(t,n),l,s)}for(const t of Object.keys(s)){const a=s[t];if('object'==typeof a&&null!==a)for(const t of Object.keys(a))a[t]=F(a[t],n);else s[t]=F(a,n)}return!1===n.sort?s:(!0===n.sort?Object.keys(s).sort():Object.keys(s).sort(n.sort)).reduce((t,n)=>{const a=s[n];return Boolean(a)&&'object'==typeof a&&!Array.isArray(a)?t[n]=y(a):t[n]=a,t},Object.create(null))}e.extract=k,e.parse=O,e.stringify=(t,n)=>{if(!t)return'';u((n=Object.assign({encode:!0,strict:!0,arrayFormat:'none',arrayFormatSeparator:','},n)).arrayFormatSeparator);const a=a=>n.skipNull&&null==t[a]||n.skipEmptyString&&''===t[a],o=c(n),s={};for(const n of Object.keys(t))a(n)||(s[n]=t[n]);const l=Object.keys(s);return!1!==n.sort&&l.sort(n.sort),l.map(a=>{const s=t[a];return void 0===s?'':null===s?p(a,n):Array.isArray(s)?0===s.length&&'bracket-separator'===n.arrayFormat?p(a,n)+'[]':s.reduce(o(a),[]).join('&'):p(a,n)+'='+p(s,n)}).filter(t=>t.length>0).join('&')},e.parseUrl=(t,n)=>{n=Object.assign({decode:!0},n);const[o,s]=a(t,'#');return Object.assign({url:o.split('?')[0]||'',query:O(k(t),n)},n&&n.parseFragmentIdentifier&&s?{fragmentIdentifier:f(s,n)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[s]:!0},n);const a=b(t.url).split('?')[0]||'',o=e.extract(t.url),c=e.parse(o,{sort:!1}),l=Object.assign(c,t.query);let u=e.stringify(l,n);u&&(u=`?${u}`);let f=j(t.url);return t.fragmentIdentifier&&(f=`#${n[s]?p(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${a}${u}${f}`},e.pick=(t,n,a)=>{a=Object.assign({parseFragmentIdentifier:!0,[s]:!1},a);const{url:c,query:l,fragmentIdentifier:u}=e.parseUrl(t,a);return e.stringifyUrl({url:c,query:o(l,n),fragmentIdentifier:u},a)},e.exclude=(t,n,a)=>{const o=Array.isArray(n)?t=>!n.includes(t):(t,a)=>!n(t,a);return e.pick(t,o,a)}},161,[162,163,164,165]);
223__d(function(g,r,i,a,m,e,d){'use strict';m.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)},162,[]);
224__d(function(g,r,_i,a,m,e,d){'use strict';var t=new RegExp("(%[a-f0-9]{2})|([^%]+?)",'gi'),n=new RegExp("(%[a-f0-9]{2})+",'gi');function o(t,n){try{return[decodeURIComponent(t.join(''))]}catch(t){}if(1===t.length)return t;n=n||1;var c=t.slice(0,n),p=t.slice(n);return Array.prototype.concat.call([],o(c),o(p))}function c(n){try{return decodeURIComponent(n)}catch(i){for(var c=n.match(t)||[],p=1;p<c.length;p++)c=(n=o(c,p).join('')).match(t)||[];return n}}function p(t){for(var o={'%FE%FF':'\ufffd\ufffd','%FF%FE':'\ufffd\ufffd'},p=n.exec(t);p;){try{o[p[0]]=decodeURIComponent(p[0])}catch(t){var i=c(p[0]);i!==p[0]&&(o[p[0]]=i)}p=n.exec(t)}o['%C2']='\ufffd';for(var f=Object.keys(o),u=0;u<f.length;u++){var y=f[u];t=t.replace(new RegExp(y,'g'),o[y])}return t}m.exports=function(t){if('string'!=typeof t)throw new TypeError('Expected `encodedURI` to be of type `string`, got `'+typeof t+'`');try{return t=t.replace(/\+/g,' '),decodeURIComponent(t)}catch(n){return p(t)}}},163,[]);
225__d(function(g,r,i,a,m,e,d){'use strict';m.exports=(t,n)=>{if('string'!=typeof t||'string'!=typeof n)throw new TypeError('Expected the arguments to be of type `string`');if(''===n)return[t];const s=t.indexOf(n);return-1===s?[t]:[t.slice(0,s),t.slice(s+n.length)]}},164,[]);
226__d(function(g,r,_i,a,m,e,d){'use strict';m.exports=function(t,n){for(var i={},s=Object.keys(t),c=Array.isArray(n),f=0;f<s.length;f++){var o=s[f],u=t[o];(c?-1!==n.indexOf(o):n(o,u,t))&&(i[o]=u)}return i}},165,[]);
227__d(function(g,r,_i,a,m,e,d){"use strict";
227Object.defineProperty(e,'__esModule',{value:!0}),e.getPatternParts=function(n){const t=[];let i={segment:''},o=!1,l=!1,p=0;for(let f=0;f<=n.length;f++){const s=n[f];if(null!=s&&(i.segment+=s),':'===s){if(':'===i.segment)l=!0;else if(!o)throw new Error(`Encountered ':' in the middle of a segment in path: ${n}`)}else if('('===s){if(!l)throw new Error(`Encountered '(' without preceding ':' in path: ${n}`);o?p++:o=!0}else if(')'===s){if(!l||!o)throw new Error(`Encountered ')' without preceding '(' in path: ${n}`);p?(p--,i.regex+=s):(o=!1,l=!1)}else if('?'===s){if(!i.param)throw new Error(`Encountered '?' without preceding ':' in path: ${n}`);l=!1,i.optional=!0}else if(null==s||'/'===s&&!o){if(l=!1,i.segment=i.segment.replace(/\/$/,''),''===i.segment)continue;if(i.param&&(i.param=i.param.replace(/^:/,'')),i.regex&&(i.regex=i.regex.replace(/^\(/,'').replace(/\)$/,'')),t.push(i),null==s)break;i={segment:''}}o&&(i.regex=i.regex||'',i.regex+=s),l&&!o&&(i.param=i.param||'',i.param+=s)}if(o)throw new Error(`Could not find closing ')' in path: ${n}`);const f=t.map(n=>n.param).filter(Boolean);for(const[t,i]of f.entries())if(f.indexOf(i)!==t)throw new Error(`Duplicate param name '${i}' found in path: ${n}`);return t}},166,[]);
228__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.validatePathConfig=function n(o,s=!0){const c=Object.assign({path:'string',initialRouteName:'string',screens:'object'},s?null:{alias:'array',exact:'boolean',stringify:'object',parse:'object'});if('object'!=typeof o||null===o)throw new Error(`Expected the configuration to be an object, but got ${JSON.stringify(o)}.`);const f=Object.fromEntries(Object.keys(o).map(t=>{if(!(t in c))return[t,'extraneous'];{const n=c[t],s=o[t];if(void 0!==s)if('array'===n){if(!Array.isArray(s))return[t,`expected 'Array', got '${typeof s}'`]}else if(typeof s!==n)return[t,`expected '${n}', got '${typeof s}'`]}return null}).filter(Boolean));if(Object.keys(f).length)throw new Error(`Found invalid properties in the configuration:\n${t(f)}\n\nYou can only specify the following properties:\n${t(c)}\n\nIf you want to specify configuration for screens, you need to specify them under a 'screens' property.\n\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`);if(s&&'path'in o&&'string'==typeof o.path&&o.path.includes(':'))throw new Error(`Found invalid path '${o.path}'. The 'path' in the top-level configuration cannot contain patterns for params.`);'screens'in o&&o.screens&&Object.entries(o.screens).forEach(([t,o])=>{'string'!=typeof o&&n(o,!1)})};const t=t=>Object.entries(t).map(([t,n])=>`- ${t} (${n})`).join('\n')},167,[]);
229__d(function(g,r,_i,_a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getStateFromPath=function(e,t){const{initialRoutes:n,configs:s}=l(t),a=t?.screens;let o=e.replace(/\/+/g,'/').replace(/^\//,'').replace(/\?.*$/,'');o=o.endsWith('/')?o:`${o}/`;const i=t?.path?.replace(/^\//,'');if(i){const e=i.endsWith('/')?i:`${i}/`;if(!o.startsWith(e))return;o=o.replace(e,'')}if(void 0===a){const t=o.split('/').filter(Boolean).map(e=>({name:decodeURIComponent(e)}));return t.length?$(e,t,n):void 0}if('/'===o){const t=s.find(e=>''===e.segments.join('/'));return t?$(e,t.routeNames.map(e=>({name:e})),n,s):void 0}let c,u;const{routes:p,remainingPath:f}=j(o,s);void 0!==p&&(u=$(e,p,n,s),o=f,c=u);if(null==u||null==c)return;return c};var e,t=r(_d[0]),n=(e=t)&&e.__esModule?e:{default:e},s=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),a=r(_d[2]),o=r(_d[3]),i=r(_d[4]),c=r(_d[5]),u=r(_d[6]);const p=new WeakMap;function l(e){if(!e)return f();const t=p.get(e);if(t)return t;const n=f(e);return p.set(e,n),n}function f(e){e&&(0,u.validatePathConfig)(e);const t=h(e),n=d(t,e?.screens);y(n);return{initialRoutes:t,configs:n,configWithRegexes:b(n)}}function h(e){const t=[];return e?.initialRouteName&&t.push({initialRouteName:e.initialRouteName,parentScreens:[]}),t}function d(e,t={}){return[].concat(...Object.keys(t).map(n=>v(n,t,e,[],[],[]))).sort((e,t)=>
229{if((0,c.isArrayEqual)(e.segments,t.segments))return t.routeNames.join('>').localeCompare(e.routeNames.join('>'));if((0,a.arrayStartsWith)(e.segments,t.segments))return-1;if((0,a.arrayStartsWith)(t.segments,e.segments))return 1;for(let n=0;n<Math.max(e.segments.length,t.segments.length);n++){if(null==e.segments[n])return 1;if(null==t.segments[n])return-1;const s='*'===e.segments[n],a='*'===t.segments[n],o=e.segments[n].startsWith(':'),i=t.segments[n].startsWith(':'),c=o&&e.segments[n].includes('('),u=i&&t.segments[n].includes('(');if(!(s&&a||c&&u)){if(s&&!a)return 1;if(a&&!s)return-1;if(o&&!i)return 1;if(i&&!o)return-1;if(c&&!u)return-1;if(u&&!c)return 1}}return e.segments.length-t.segments.length})}function y(e){e.reduce((e,t)=>{const n=t.segments.join('/');if(e[n]){const s=e[n].routeNames,a=t.routeNames;if(!(s.length>a.length?a.every((e,t)=>s[t]===e):s.every((e,t)=>a[t]===e)))throw new Error(`Found conflicting screens with the same pattern. The pattern '${n}' resolves to both '${s.join(' > ')}' and '${a.join(' > ')}'. Patterns must be unique and cannot resolve to more than one screen.`)}return Object.assign(e,{[n]:t})},{})}function b(e){return e.map(e=>Object.assign({},e,{regex:e.regex?new RegExp(e.regex.source+'$'):void 0}))}const j=(e,t)=>{let n,s=e;for(const e of t){if(!e.regex)continue;const o=s.match(e.regex);if(o){n=e.routeNames.map(n=>{const s=t.find(t=>t.screen===n&&(0,a.arrayStartsWith)(e.segments,t.segments)),i=s&&o.groups?Object.fromEntries(Object.entries(o.groups).map(([e,t])=>{const a=Number(e.replace('param_','')),o=s.params.find(e=>e.index===a);return o?.screen===n&&o?.name?[o.name,t]:null}).filter(e=>null!=e).map(([e,t])=>{if(null==t)return[e,void 0];const n=decodeURIComponent(t);return[e,s.parse?.[e]?s.parse[e](n):n]})):void 0;return i&&Object.keys(i).length?{name:n,params:i}:{name:n}}),s=s.replace(o[0],'');break}}return{routes:n,remainingPath:s}},v=(e,t,n,s,a,o)=>{const i=[];o.push(e),a.push(e);const c=t[e];if('string'==typeof c)s.push({screen:e,path:c}),i.push(x(e,[...o],[...s]));else if('object'==typeof c){if('string'==typeof c.path){if(c.exact&&null==c.path)throw new Error(`Screen '${e}' doesn't specify a 'path'. A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. \`path: ''\`.`);const t=[];if(c.alias)for(const n of c.alias)'string'==typeof n?t.push(x(e,[...o],[...s,{screen:e,path:n}],c.parse)):'object'==typeof n&&t.push(x(e,[...o],n.exact?[{screen:e,path:n.path}]:[...s,{screen:e,path:n.path}],n.parse));c.exact&&(s.length=0),s.push({screen:e,path:c.path}),i.push(x(e,[...o],[...s],c.parse)),i.push(...t)}if('string'!=typeof c&&'string'!=typeof c.path&&c.alias?.length)throw new Error(`Screen '${e}' doesn't specify a 'path'. A 'path' needs to be specified in order to use 'alias'.`);c.screens&&(c.initialRouteName&&n.push({initialRouteName:c.initialRouteName,parentScreens:a}),Object.keys(c.screens).forEach(e=>{const t=v(e,c.screens,n,[...s],[...a],o);i.push(...t)}))}return o.pop(),i},x=(e,t,s,a)=>{const o=[];for(const{screen:e,path:t}of s)o.push(...(0,i.getPatternParts)(t).map(t=>Object.assign({},t,{screen:e})));return{screen:e,regex:o.length?new RegExp(`^(${o.map((e,t)=>{if(e.param){return`(((?<param_${t}>${e.regex||'[^/]+'})\\/)${e.optional?'?':''})`}return`${'*'===e.segment?'.*':(0,n.default)(e.segment)}\\/`}).join('')})$`):void 0,segments:o.map(e=>e.segment),params:o.map((e,t)=>e.param?{index:t,screen:e.screen,name:e.param}:null).filter(e=>null!=e),routeNames:t,parse:a}},O=(e,t)=>{for(const n of t)if(e===n.routeNames[n.routeNames.length-1])return n.parse},N=(e,t,n)=>{for(const s of n)if(t.length===s.parentScreens.length){let n=!0;for(let e=0;e<t.length;e++)if(0!==t[e].localeCompare(s.parentScreens[e])){n=!1;break}if(n)return e!==s.initialRouteName?s.initialRouteName:void 0}},R=(e,t,n)=>n?e?{index:1,routes:[{name:e},t]}:{routes:[t]}:e?{index:1,routes:[{name:e},Object.assign({},t,{state:{routes:[]}})]}:{routes:[Object.assign({},t,{state:{routes:[]}})]},$=(e,t,n,s)=>{let a=t.shift();const i=[];let c=N(a.name,i,n);i.push(a.name);const u=R(c,a,0===t.length);if(t.length>0){let e=u;for(;a=t.shift();){c=N(a.name,i,n);const s=e.index||e.routes.length-1;e.routes[s].state=R(c,a,0===t.length),t.length>0&&(e=e.routes[s].state),i.push(a.name)}}a=(0,o.findFocusedRoute)(u),a.path=e.replace(/\/$/,'');const p=w(e,s?O(a.name,s):void 0);return p&&(a.params=Object.assign({},a.params,p)),u},w=(e,t)=>{const n=e.split('?')[1],a=s.parse(n);
229return t&&Object.keys(a).forEach(e=>{Object.hasOwnProperty.call(t,e)&&'string'==typeof a[e]&&(a[e]=t[e](a[e]))}),Object.keys(a).length?a:void 0}},168,[169,161,170,129,166,171,167]);
230__d(function(g,r,i,a,m,e,d){'use strict';m.exports=t=>{if('string'!=typeof t)throw new TypeError('Expected a string');return t.replace(/[|\\{}()[\]^$+*?.]/g,'\\$&').replace(/-/g,'\\x2d')}},169,[]);
231__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.arrayStartsWith=function(t,n){if(n.length>t.length)return!1;return n.every((n,u)=>n===t[u])}},170,[]);
232__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isArrayEqual=function(t,n){if(t===n)return!0;if(t.length!==n.length)return!1;return t.every((t,u)=>Object.is(t,n[u]))}},171,[]);
233__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationHelpersContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},172,[34]);
234__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.NavigationIndependentTree=function({children:l}){return(0,u.jsx)(o.NavigationRouteContext.Provider,{value:void 0,children:(0,u.jsx)(n.NavigationContext.Provider,{value:void 0,children:(0,u.jsx)(v.IsFocusedContext.Provider,{value:void 0,children:(0,u.jsx)(t.NavigationIndependentTreeContext.Provider,{value:!0,children:l})})})})},r(d[0]);var n=r(d[1]),t=r(d[2]),o=r(d[3]),v=r(d[4]),u=r(d[5])},173,[34,152,132,151,153,104]);
235__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationMetaContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},174,[34]);
236__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"PreventRemoveContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},175,[34]);
237__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.PreventRemoveProvider=function({children:e}){const[o]=n.useState(()=>(0,t.nanoid)()),[l,p]=n.useState(()=>new Map),y=n.useContext(v.NavigationHelpersContext),R=n.useContext(s.NavigationRouteContext),P=n.useContext(d.PreventRemoveContext),C=P?.setPreventRemove,x=(0,u.default)((e,t,n)=>{if(n&&(null==y||y?.getState().routes.every(e=>e.key!==t)))throw new Error(`Couldn't find a route with the key ${t}. Is your component inside NavigationContent?`);p(o=>{if(t===o.get(e)?.routeKey&&n===o.get(e)?.preventRemove)return o;const u=new Map(o);return n?u.set(e,{routeKey:t,preventRemove:n}):u.delete(e),u})}),_=[...l.values()].some(({preventRemove:e})=>e);n.useEffect(()=>{if(void 0!==R?.key&&void 0!==C)return C(o,R.key,_),()=>{C(o,R.key,!1)}},[o,_,R?.key,C]);const k=n.useMemo(()=>({setPreventRemove:x,preventedRoutes:f(l)}),[x,l]);return(0,c.jsx)(d.PreventRemoveContext.Provider,{value:k,children:e})};var e,t=r(_d[0]),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),o=r(_d[2]),u=(e=o)&&e.__esModule?e:{default:e},v=r(_d[3]),s=r(_d[4]),d=r(_d[5]),c=r(_d[6]);const f=e=>[...e.values()].reduce((e,{routeKey:t,preventRemove:n})=>(e[t]={preventRemove:e[t]?.preventRemove||n},e),{})},176,[115,34,122,172,151,175,104]);
238__d(function(g,r,i,a,m,_e,_d){"use strict";
238Object.defineProperty(_e,'__esModule',{value:!0}),_e.useTheme=function(){const n=e.useContext(t.ThemeContext);if(null==n)throw new Error("Couldn't find a theme. Is your component inside NavigationContainer or does it have a theme?");return n};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},177,[34,135]);
239__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PrivateValueStore",{enumerable:!0,get:function(){return t}});class t{}},178,[]);
240__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useFocusEffect=function(n){const o=(0,t.useNavigation)();if(void 0!==arguments[1]){const e="You passed a second argument to 'useFocusEffect', but it only accepts one argument. If you want to pass a dependency array, you can use 'React.useCallback':\n\nuseFocusEffect(\n  React.useCallback(() => {\n    // Your code here\n  }, [depA, depB])\n);\n\nSee usage guide: https://reactnavigation.org/docs/use-focus-effect";console.error(e)}e.useEffect(()=>{let e,t=!1;const c=()=>{const e=n();if(void 0===e||'function'==typeof e)return e};o.isFocused()&&(e=c(),t=!0);const u=o.addListener('focus',()=>{t||(void 0!==e&&e(),e=c(),t=!0)}),s=o.addListener('blur',()=>{void 0!==e&&e(),e=void 0,t=!1});return()=>{void 0!==e&&e(),u(),s()}},[n,o])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},179,[34,154]);
241__d(function(g,_r,_i,a,m,_e,_d){"use strict";const e=["children","layout","screenOptions","screenLayout","screenListeners","UNSTABLE_router"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigationBuilder=function(t,c){const S=(0,$.useRegisterNavigator)(),N=o.useContext(v.NavigationRouteContext),M=o.useContext(u.ConsumedParamsContext),V='object'==typeof N?.params&&null!=N.params&&M?.isConsumed(N.params),{children:q,layout:z,screenOptions:D,screenLayout:Q,screenListeners:W,UNSTABLE_router:X}=c,Y=(0,r.default)(c,e),Z=J(q),ee=(0,G.useLazyValue)(()=>{if(null!=Y.initialRouteName&&Z.every(e=>e.props.name!==Y.initialRouteName))throw new Error(`Couldn't find a screen named '${Y.initialRouteName}' to use as 'initialRouteName'.`);const e=t(Y);if(null!=X){const t=X(e);return Object.assign({},e,t)}return e}),te=Z.reduce((e,t)=>{if(t.props.name in e)throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${t.props.name}')`);return e[t.props.name]=t,e},{}),re=Z.map(e=>e.props.name),ae=re.reduce((e,t)=>(e[t]=te[t].keys.map(e=>e??'').join(':'),e),{}),ne=re.reduce((e,t)=>{const{initialParams:r}=te[t].props;return e[t]=r,e},{}),se=re.reduce((e,t)=>Object.assign(e,{[t]:te[t].props.getId}),{});if(!re.length)throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?");const oe=o.useCallback(e=>void 0===e.type||e.type===ee.type,[ee.type]),ie=o.useCallback(e=>void 0!==e&&!1===e.stale&&oe(e),[oe]),ue=o.useCallback(e=>e.routes.every(e=>!re.includes(e.name)),[re]),{state:pe,getState:ce,setState:de,setKey:le,getKey:me,getIsInitial:ye}=o.useContext(h.NavigationStateContext),fe=o.useRef(!1),ge=o.useRef(void 0),ve=(0,i.default)(e=>{fe.current?ge.current=e:de(e)}),[he,Le,Se,Ne]=o.useMemo(()=>{if(fe.current&&ge.current&&oe(ge.current)){return[void 0,ie(ge.current)?ge.current:ee.getRehydratedState(ge.current,{routeNames:re,routeParamList:ne,routeGetIdList:se}),!1,void 0]}const e=re.reduce((e,t)=>{const{initialParams:r}=te[t].props,n=null==N?.params?.state&&!1!==N?.params?.initial&&N?.params?.screen===t?N.params.params:void 0;return e[t]=void 0!==r||void 0!==n?Object.assign({},r,n):void 0,e},{});if(void 0!==pe&&oe(pe)||null!=N?.params?.state||'string'==typeof N?.params?.screen&&!1!==N?.params?.initial||V){const t=V?void 0:N?.params,r=(t?H(t):void 0)??pe,n=null==r?ee.getInitialState({routeNames:re,routeParamList:e,routeGetIdList:se}):ee.getRehydratedState(r,{routeNames:re,routeParamList:e,routeGetIdList:se});return null!=r&&'lastUnhandled'===c.UNSTABLE_routeNamesChangeBehavior&&ue(r)?[r,n,!0,t]:[void 0,n,!1,t]}return[void 0,ee.getInitialState({routeNames:re,routeParamList:e,routeGetIdList:se}),!0,void 0]},[pe,ee,oe]),Ce=o.useRef(ae);o.useEffect(()=>{Ce.current=ae});const Ee=Ce.current,[be,Re]=o.useState(he);'lastUnhandled'===c.UNSTABLE_routeNamesChangeBehavior&&he&&be!==he&&Re(he);let Oe=ie(pe)?pe:Le,je=Oe,Ae=!1;be?.routes.every(e=>re.includes(e.name))&&Oe?.routes.every(e=>!re.includes(e.name))?(Ae=!0,je=ee.getRehydratedState(be,{routeNames:re,routeParamList:ne,routeGetIdList:se})):(0,d.isArrayEqual)(Oe.routeNames,re)&&(0,l.isRecordEqual)(ae,Ee)||(je=ee.getStateForRouteNamesChange(Oe,{routeNames:re,routeParamList:ne,routeGetIdList:se,routeKeyChanges:Object.keys(ae).filter(e=>e in Ee&&ae[e]!==Ee[e])}));let Pe=N?.params===Ne;if(N?.params&&!Pe){let e;if('object'!=typeof N.params.state||null==N.params.state||V){if('string'==typeof N.params.screen&&(!1===N.params.initial&&Se||!V))if(Pe=!0,'lastUnhandled'!==c.UNSTABLE_routeNamesChangeBehavior||re.includes(N.params.screen))e=n.CommonActions.navigate({name:N.params.screen,params:N.params.params,path:N.params.path,merge:N.params.merge,pop:N.params.pop});else{const e=H(N.params);null==e||(0,s.default)(e,be)||Re(e)}}else Pe=!0,'lastUnhandled'===c.UNSTABLE_routeNamesChangeBehavior&&ue(N.params.state)?N.params.state!==be&&Re(N.params.state):e=n.CommonActions.reset(N.params.state);const t=e?ee.getStateForAction(je,e,{routeNames:re,routeParamList:ne,routeGetIdList:se}):null;je=null!==t?ee.getRehydratedState(t,{routeNames:re,routeParamList:ne,routeGetIdList:se}):je}const xe=M?.setConsumed;o.useEffect(()=>{xe&&Pe&&'object'==typeof N?.params&&null!=N.params&&xe(N.params)},[Pe,N?.params,xe]);const Ie=Oe!==je;(0,F.useScheduleUpdate)(()=>{Ie&&(ve(je),Ae&&Re(void 0))}),Oe=je,o.useEffect(()=>{ge.current=Oe});const we=o.useRef(null);o.useEffect(()=>(fe.current=!1,le(S),ye()||we.current===Oe||(ve(Oe),we.current=Oe),()=>{void 0!==ce()&&me()===S&&(de(void 0),fe.current=!0)}),[]);const Ge=o.useRef(Oe);Ge.current=Oe,(0,b.useClientLayoutEffect)(()=>{Ge.current=null});const ke=(0,i.default)(()=>{const e=ce();return(0,p.deepFreeze)(ie(e)?e:Le)}),Ke=(0,A.useEventEmitter)(e=>{const t=[];let r;if(e.target?(r=Oe.routes.find(t=>t.key===e.target),r?.name&&t.push(r.name)):(r=Oe.routes[Oe.index],t.push(...Object.keys(te).filter(e=>r?.name===e))),null==r)return;const n=ze[r.key].navigation;[].concat(...[W,...t.map(e=>{const{listeners:t}=te[e].props;return t})].map(t=>{const s='function'==typeof t?t({route:r,navigation:n}):t;return s?Object.keys(s).filter(t=>t===e.type).map(e=>s?.[e]):void 0})).filter((e,t,r)=>e&&r.lastIndexOf(e)===t).forEach(t=>t?.(e))});(0,x.useFocusEvents)({state:Oe,emitter:Ke}),o.useEffect(()=>{Ke.emit({type:'state',data:{state:Oe}})},[Ke,Oe]);const{listeners:Ue,addListener:Be}=(0,E.useChildListeners)(),{keyedListeners:$e,addKeyedListener:Fe}=(0,w.useKeyedChildListeners)(),Te=(0,U.useOnAction)({router:ee,getState:ke,setState:ve,key:N?.ke
241y,actionListeners:Ue.action,beforeRemoveListeners:$e.beforeRemove,routerConfigOptions:{routeNames:re,routeParamList:ne,routeGetIdList:se},emitter:Ke}),Me=(0,B.useOnRouteFocus)({router:ee,key:N?.key,getState:ke,setState:ve}),Ve=o.useContext(C.UnhandledActionContext),Je=(0,i.default)(e=>{if('lastUnhandled'===c.UNSTABLE_routeNamesChangeBehavior&&'NAVIGATE'===e.type&&null!=e.payload&&'name'in e.payload&&'string'==typeof e.payload.name&&!re.includes(e.payload.name)){const t={routes:[{name:e.payload.name,params:'params'in e.payload&&'object'==typeof e.payload.params&&null!==e.payload.params?e.payload.params:void 0,path:'path'in e.payload&&'string'==typeof e.payload.path?e.payload.path:void 0}]};Re(t)}Ve?.(e)}),He=(0,k.useNavigationHelpers)({id:c.id,onAction:Te,onUnhandledAction:Je,getState:ke,emitter:Ke,router:ee,stateRef:Ge});(0,P.useFocusedListenersChildrenAdapter)({navigation:He,focusedListeners:Ue.focus}),(0,_.useOnGetState)({getState:ke,getStateListeners:$e.getState});const{describe:qe,descriptors:ze}=(0,j.useDescriptors)({state:Oe,screens:te,navigation:He,screenOptions:D,screenLayout:Q,onAction:Te,getState:ke,setState:ve,onRouteFocus:Me,addListener:Be,addKeyedListener:Fe,router:ee,emitter:Ke});(0,O.useCurrentRender)({state:Oe,navigation:He,descriptors:ze});const De=(0,R.useComponent)(e=>{const t=null!=z?z({state:Oe,descriptors:ze,navigation:He,children:e}):e;return(0,T.jsx)(f.NavigationMetaContext.Provider,{value:void 0,children:(0,T.jsx)(y.NavigationHelpersContext.Provider,{value:He,children:(0,T.jsx)(K.NavigationStateListenerProvider,{state:Oe,children:(0,T.jsx)(I.FocusedRouteKeyContext.Provider,{value:Oe.routes[Oe.index].key,children:(0,T.jsx)(L.PreventRemoveProvider,{children:t})})})})})});return{state:Oe,navigation:He,describe:qe,descriptors:ze,NavigationContent:De}};var r=t(_r(_d[0])),n=_r(_d[1]),s=t(_r(_d[2])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t.default=e,t})(_r(_d[3])),i=(_r(_d[4]),t(_r(_d[5]))),u=_r(_d[6]),p=_r(_d[7]),c=_r(_d[8]),d=_r(_d[9]),l=_r(_d[10]),y=_r(_d[11]),f=_r(_d[12]),v=_r(_d[13]),h=_r(_d[14]),L=_r(_d[15]),S=_r(_d[16]),N=_r(_d[17]),C=_r(_d[18]),E=_r(_d[19]),b=_r(_d[20]),R=_r(_d[21]),O=_r(_d[22]),j=_r(_d[23]),A=_r(_d[24]),P=_r(_d[25]),x=_r(_d[26]),I=_r(_d[27]),w=_r(_d[28]),G=_r(_d[29]),k=_r(_d[30]),K=_r(_d[31]),U=_r(_d[32]),_=_r(_d[33]),B=_r(_d[34]),$=_r(_d[35]),F=_r(_d[36]),T=_r(_d[37]);N.PrivateValueStore;const M=e=>e.type===S.Screen,V=e=>e.type===o.Fragment||e.type===c.Group,J=(e,t,r,n)=>o.Children.toArray(e).reduce((e,s)=>{if(o.isValidElement(s)){if(M(s)){if('object'!=typeof s.props||null===s.props)throw new Error("Got an invalid element for screen.");if('string'!=typeof s.props.name||''===s.props.name)throw new Error(`Got an invalid name (${JSON.stringify(s.props.name)}) for the screen. It must be a non-empty string.`);if(void 0!==s.props.navigationKey&&('string'!=typeof s.props.navigationKey||''===s.props.navigationKey))throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(s.props.navigationKey)}) for the screen '${s.props.name}'. It must be a non-empty string or 'undefined'.`);return e.push({keys:[t,s.props.navigationKey],options:r,layout:n,props:s.props}),e}if(V(s)){if(void 0!==(i=s.props.navigationKey)&&('string'!=typeof i||''===i))throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(s.props.navigationKey)}) for the group. It must be a non-empty string or 'undefined'.`);return e.push(...J(s.props.children,s.props.navigationKey,s.type!==c.Group?r:null!=r?[...r,s.props.screenOptions]:[s.props.screenOptions],'function'==typeof s.props.screenLayout?s.props.screenLayout:n)),e}}var i;throw new Error(`A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found ${o.isValidElement(s)?`'${'string'==typeof s.type?s.type:s.type?.name}'${null!=s.props&&'object'==typeof s.props&&'name'in s.props&&s.props?.name?` for the screen '${s.props.name}'`:''}`:'object'==typeof s?JSON.stringify(s):`'${String(s)}'`}). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`)},[]),H=e=>null!=e?.state?e.state:'string'==typeof e?.screen&&!1!==e?.initial?{routes:[{name:e.screen,params:e.params,path:e.path}]}:void 0},180,[109,112,181,34,148,122,182,143,145,171,159,172,174,151,133,176,146,178,136,137,183,184,185,186,138,191,192,153,139,193,194,195,198,200,201,202,203,104]);
242__d(function(g,r,_i,_a,m,e,d){'use strict';m.exports=function t(n,o){if(n===o)return!0;
242if(n&&o&&'object'==typeof n&&'object'==typeof o){if(n.constructor!==o.constructor)return!1;var f,u,i;if(Array.isArray(n)){if((f=n.length)!=o.length)return!1;for(u=f;0!==u--;)if(!t(n[u],o[u]))return!1;return!0}if(n.constructor===RegExp)return n.source===o.source&&n.flags===o.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===o.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===o.toString();if((f=(i=Object.keys(n)).length)!==Object.keys(o).length)return!1;for(u=f;0!==u--;)if(!Object.prototype.hasOwnProperty.call(o,i[u]))return!1;for(u=f;0!==u--;){var c=i[u];if(!t(n[c],o[c]))return!1}return!0}return n!=n&&o!=o}},181,[]);
243__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ConsumedParamsContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},182,[34]);
244__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useClientLayoutEffect",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));const t='undefined'!=typeof document||'undefined'!=typeof navigator&&'ReactNative'===navigator.product?e.useLayoutEffect:e.useEffect},183,[34]);
245__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useComponent=function(u){const c=e.useRef(u);return c.current=u,e.useEffect(()=>{c.current=null}),e.useRef(({children:e})=>{const u=c.current;if(null===u)throw new Error('The returned component must be rendered in the same render phase as the hook.');return(0,n.jsx)(t,{render:u,children:e})}).current};var e=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),n=r(_d[1]);const t=({render:e,children:n})=>e(n)},184,[34,104]);
246__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useCurrentRender=function({state:n,navigation:o,descriptors:u}){const s=e.useContext(t.CurrentRenderContext);s&&o.isFocused()&&(s.options=u[n.routes[n.index].key].options)};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},185,[34,155]);
247__d(function(g,_r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useDescriptors=function({state:e,screens:t,navigation:f,screenOptions:v,screenLayout:y,onAction:h,getState:b,setState:k,addListener:O,addKeyedListener:j,onRouteFocus:C,router:S,emitter:x}){const _=o.useContext(u.ThemeContext),[w,P]=o.useState({}),{onDispatchAction:L,onOptionsChange:N,scheduleUpdate:R,flushUpdates:A,stackRef:D}=o.useContext(r.NavigationBuilderContext),M=o.useMemo(()=>({navigation:f,onAction:h,addListener:O,addKeyedListener:j,onRouteFocus:C,onDispatchAction:L,onOptionsChange:N,scheduleUpdate:R,flushUpdates:A,stackRef:D}),[f,h,O,j,C,L,N,R,A,D]),{base:U,navigations:B}=(0,c.useNavigationCache)({state:e,getState:b,navigation:f,setOptions:P,router:S,emitter:x}),E=(0,d.useRouteCache)(e.routes),F=(e,n,o)=>{const r=t[e.name],i=r.props;return[v,...r.options?r.options.filter(Boolean):[],i.options,o].reduce((t,o)=>Object.assign(t,'function'!=typeof o?o:o({route:e,navigation:n,theme:_})),{})},K=(e,o,u,c)=>{const d=t[e.name],f=d.props,v=f.layout??d.layout??y;let h=(0,p.jsx)(s.SceneView,{navigation:o,route:e,screen:f,routeState:c,getState:b,setState:k,options:u,clearOptions:()=>P(t=>{if(e.key in t){var o;return(0,n.default)(t,[o].map(l))}return t})});return null!=v&&(h=v({route:e,navigation:o,options:u,theme:_,children:h})),(0,p.jsx)(r.NavigationBuilderContext.Provider,{value:M,children:(0,p.jsx)(i.NavigationProvider,{route:e,navigation:o,children:h})},e.key)},T=E.reduce((t,n,o)=>{const r=B[n.key],i=F(n,r,w[n.key]),s=K(n,r,i,e.routes[o].state);return t[n.key]={route:n,navigation:r,render:()=>s,options:i},t},{});return{describe:(e,t)=>
247{if(!t){if(!(e.key in T))throw new Error(`Couldn't find a route with the key ${e.key}.`);return T[e.key]}const n=U,o=F(e,n,{}),r=K(e,n,o,void 0);return{route:e,navigation:n,render:()=>r,options:o}},descriptors:T}};var e,t=_r(_d[0]),n=(e=t)&&e.__esModule?e:{default:e},o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(_r(_d[1])),r=_r(_d[2]),i=_r(_d[3]),s=_r(_d[4]),u=_r(_d[5]),c=_r(_d[6]),d=_r(_d[7]),p=_r(_d[8]);function l(e){var t=f(e,"string");return"symbol"==typeof t?t:t+""}function f(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},186,[109,34,130,151,187,135,190,158,104]);
248__d(function(g,_r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.SceneView=function({screen:d,route:v,navigation:p,routeState:f,getState:k,setState:y,options:C,clearOptions:h}){const b=e.useRef(void 0),j=e.useCallback(()=>b.current,[]),{addOptionsGetter:O}=(0,c.useOptionsGetters)({key:v.key,options:C,navigation:p}),S=e.useCallback(e=>{b.current=e},[]),x=e.useCallback(()=>{const e=k().routes.find(e=>e.key===v.key);return e?e.state:void 0},[k,v.key]),P=e.useCallback(e=>{const t=k(),n=t.routes.map(t=>t.key===v.key&&t.state!==e?Object.assign({},t,{state:e}):t);(0,r.isArrayEqual)(t.routes,n)||y(Object.assign({},t,{routes:n}))},[k,v.key,y]),M=e.useRef(!0);e.useEffect(()=>{M.current=!1}),e.useEffect(()=>h,[]);const _=e.useCallback(()=>M.current,[]),E=e.useContext(s.NavigationFocusedRouteStateContext),[N,R]=e.useState(null),w=e.useMemo(()=>({isConsumed:e=>!!N&&N.has(e),setConsumed:e=>{R(t=>{if(t&&t.has(e))return t;const n=new WeakMap;return n.set(e,!0),n})}}),[N]),G=e.useMemo(()=>{const e={routes:[{key:v.key,name:v.name,params:v.params,path:v.path}]},t=n=>{const r=n?.routes[0];return r?{routes:[Object.assign({},r,{state:t(r.state)})]}:e};return t(E)},[E,v.key,v.name,v.params,v.path]),F=e.useMemo(()=>({state:f,getState:x,setState:P,getKey:j,setKey:S,getIsInitial:_,addOptionsGetter:O}),[f,x,P,j,S,_,O]),I=d.getComponent?d.getComponent():d.component;return(0,l.jsx)(t.ConsumedParamsContext.Provider,{value:w,children:(0,l.jsx)(o.NavigationStateContext.Provider,{value:F,children:(0,l.jsx)(s.NavigationFocusedRouteStateContext.Provider,{value:G,children:(0,l.jsx)(n.EnsureSingleNavigator,{children:(0,l.jsx)(u.StaticContainer,{name:d.name,render:I||d.children,navigation:p,route:v,children:void 0!==I?(0,l.jsx)(I,{navigation:p,route:v}):void 0!==d.children?d.children({navigation:p,route:v}):null})})})})})};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(_r(_d[0])),t=_r(_d[1]),n=_r(_d[2]),r=_r(_d[3]),s=_r(_d[4]),o=_r(_d[5]),u=_r(_d[6]),c=_r(_d[7]),l=_r(_d[8])},187,[34,182,128,171,188,133,189,141,104]);
249__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationFocusedRouteStateContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},188,[34]);
250__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"StaticContainer",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var c=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,c.get?c:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).memo(function(e){return e.children},(e,t)=>{const n=Object.keys(e),c=Object.keys(t);if(n.length!==c.length)return!1;for(const c of n)if('children'!==c&&e[c]!==t[c])return!1;return!0})},189,[34]);
251__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["emit"];
251Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigationCache=function({state:t,getState:n,navigation:d,setOptions:f,router:y,emitter:l}){const{stackRef:O}=c.useContext(u.NavigationBuilderContext),b=c.useMemo(()=>{const t=(0,s.default)(d,e),n=Object.assign({},y.actionCreators,o.CommonActions),c=()=>{throw new Error('Actions cannot be dispatched from a placeholder screen.')},u=Object.keys(n).reduce((e,t)=>(e[t]=c,e),{});return Object.assign({},t,u,{addListener:()=>()=>{},removeListener:()=>{},dispatch:c,getParent:e=>void 0!==e&&e===t.getId()?b:t.getParent(e),setOptions:()=>{throw new Error('Options cannot be set from a placeholder screen.')},isFocused:()=>!1})},[d,y.actionCreators]),p=c.useMemo(()=>({current:{}}),[b,n,d,f,l]);return p.current=t.routes.reduce((e,t)=>{const s=p.current[t.key];if(s)e[t.key]=s;else{const s=e=>{const s='function'==typeof e?e(n()):e;null!=s&&d.dispatch(Object.assign({source:t.key},s))},c=e=>{try{e()}finally{}},u=Object.assign({},y.actionCreators,o.CommonActions),O=Object.keys(u).reduce((e,t)=>(e[t]=(...e)=>c(()=>s(u[t](...e))),e),{});e[t.key]=Object.assign({},b,O,l.create(t.key),{dispatch:e=>c(()=>s(e)),getParent:n=>void 0!==n&&n===b.getId()?e[t.key]:b.getParent(n),setOptions:e=>{f(n=>Object.assign({},n,{[t.key]:Object.assign({},n[t.key],e)}))},isFocused:()=>{const e=b.getState();return e.routes[e.index].key===t.key&&(!d||d.isFocused())}})}return e},{}),{base:b,navigations:p.current}};var t,n=r(_d[0]),s=(t=n)&&t.__esModule?t:{default:t},o=r(_d[1]),c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=r(_d[3])},190,[109,112,34,130]);
252__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useFocusedListenersChildrenAdapter=function({navigation:n,focusedListeners:u}){const{addListener:s}=e.useContext(t.NavigationBuilderContext),o=e.useCallback(e=>{if(n.isFocused()){for(const t of u){const{handled:n,result:u}=t(e);if(n)return{handled:n,result:u}}return{handled:!0,result:e(n)}}return{handled:!1,result:null}},[u,n]);e.useEffect(()=>s?.('focus',o),[s,o])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},191,[34,130]);
253__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useFocusEvents=function({state:u,emitter:n}){const o=e.useContext(t.NavigationContext),c=e.useRef(void 0),s=u.routes[u.index].key;e.useEffect(()=>o?.addListener('focus',()=>{c.current=s,n.emit({type:'focus',target:s})}),[s,n,o]),e.useEffect(()=>o?.addListener('blur',()=>{c.current=void 0,n.emit({type:'blur',target:s})}),[s,n,o]),e.useEffect(()=>{const e=c.current;c.current=s,void 0!==e||o||n.emit({type:'focus',target:s}),e===s||o&&!o.isFocused()||void 0!==e&&(n.emit({type:'blur',target:e}),n.emit({type:'focus',target:s}))},[s,n,o])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(u){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(t,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},192,[34,152]);
254__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useLazyValue=function(t){const n=e.useRef(void 0);void 0===n.current&&(n.current=t());return n.current};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},193,[34]);
255__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigationHelpers=function({id:o,onAction:c,onUnhandledAction:u,getState:s,emitter:d,router:f,stateRef:l}){const b=t.useContext(n.NavigationContext);return t.useMemo(()=>{const t=e=>{const t='function'==typeof e?e(s()):e;c(t)||u?.(t)},n=Object.assign({},f.actionCreators,e.CommonActions),v=Object.keys(n).reduce((e,o)=>(e[o]=(...e)=>t(n[o](...e)),e),{}),O=Object.assign({},b,v,{dispatch:t,emit:d.emit,isFocused:b?b.isFocused:()=>!0,canGoBack:()=>{const t=s();return null!==f.getStateForAction(t,e.CommonActions.goBack(),{routeNames:t.routeNames,routeParamList:{},routeGetIdList:{}})||b?.canGoBack()||!1},getId:()=>o,getParent:e=>{if(void 0!==e){let t=O;for(;t&&e!==t.getId();)t=t.getParent();return t}return b},getState:()=>null!=l.current?l.current:s()});return O},[f,b,d.emit,s,c,u,o,l])};
255var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2]);r(_d[3]).PrivateValueStore},194,[112,34,152,178]);
256__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigationState=function(e){const n=t.useContext(s);if(null==n)throw new Error("Couldn't get the navigation state. Is your component inside a navigator?");return(0,o.useSyncExternalStoreWithSelector)(n.subscribe,n.getState,n.getState,e)},_e.NavigationStateListenerProvider=function({state:e,children:n}){const o=t.useRef([]),f=t.useRef(e),l=(0,u.default)(()=>f.current),d=(0,u.default)(e=>(o.current.push(e),()=>{o.current=o.current.filter(t=>t!==e)}));t.useLayoutEffect(()=>{f.current=e,o.current.forEach(e=>e())},[e]);const v=t.useMemo(()=>({getState:l,subscribe:d}),[l,d]);return(0,c.jsx)(s.Provider,{value:v,children:n})};var e,t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=r(_d[1]),u=(e=n)&&e.__esModule?e:{default:e},o=r(_d[2]),c=r(_d[3]);const s=t.createContext(void 0)},195,[34,122,196,104]);
257__d(function(g,r,i,a,m,e,d){'use strict';m.exports=r(d[0])},196,[197]);
258__d(function(g,r,i,a,m,e,d){
259/**
260   * @license React
261   * use-sync-external-store-with-selector.production.js
262   *
263   * Copyright (c) Meta Platforms, Inc. and affiliates.
264   *
265   * This source code is licensed under the MIT license found in the
266   * LICENSE file in the root directory of this source tree.
267   */
268"use strict";var u=r(d[0]);var n="function"==typeof Object.is?Object.is:function(u,n){return u===n&&(0!==u||1/u==1/n)||u!=u&&n!=n},t=u.useSyncExternalStore,l=u.useRef,c=u.useEffect,f=u.useMemo,o=u.useDebugValue;e.useSyncExternalStoreWithSelector=function(u,v,s,S,h){var V=l(null);if(null===V.current){var b={hasValue:!1,value:null};V.current=b}else b=V.current;V=f(function(){function u(u){if(!c){if(c=!0,t=u,u=S(u),void 0!==h&&b.hasValue){var f=b.value;if(h(f,u))return l=f}return l=u}if(f=l,n(t,u))return f;var o=S(u);return void 0!==h&&h(f,o)?(t=u,f):(t=u,l=o)}var t,l,c=!1,f=void 0===s?null:s;return[function(){return u(v())},null===f?void 0:function(){return u(f())}]},[v,s,S,h]);var y=t(u,V[0],V[1]);return c(function(){b.hasValue=!0,b.value=y},[y]),o(y),y}},197,[34]);
269__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useOnAction=function({router:i,getState:u,setState:s,key:c,actionListeners:f,beforeRemoveListeners:d,routerConfigOptions:l,emitter:v}){const{onAction:y,onRouteFocus:p,addListener:C,onDispatchAction:b}=e.useContext(n.NavigationBuilderContext),h=e.useContext(t.DeprecatedNavigationInChildContext),A=e.useRef(l);e.useEffect(()=>{A.current=l});const O=e.useCallback((e,t=new Set)=>{const n=u();if(t.has(n.key))return!1;if(t.add(n.key),'string'!=typeof e.target||e.target===n.key){let t=i.getStateForAction(n,e,A.current);if(t=null===t&&e.target===n.key?n:t,null!==t){if(b(e,n===t),n!==t){if((0,o.shouldPreventRemove)(v,d,n.routes,t.routes,e))return!0;s(t)}if(void 0!==p){i.shouldActionChangeFocus(e)&&void 0!==c&&p(c)}return!0}}if(void 0!==y&&y(e,t))return!0;if('string'==typeof e.target||'NAVIGATE_DEPRECATED'===e.type||h)for(let n=f.length-1;n>=0;n--){if((0,f[n])(e,t))return!0}return!1},[f,d,v,u,h,c,y,b,p,i,s]);return(0,o.useOnPreventRemove)({getState:u,emitter:v,beforeRemoveListeners:d}),e.useEffect(()=>C?.('action',O),[C,O]),O};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3])},198,[34,127,130,199]);
270__d(function(g,r,i,a,m,_e,_d){"use strict";
270Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"shouldPreventRemove",{enumerable:!0,get:function(){return u}}),_e.useOnPreventRemove=function({getState:o,emitter:c,beforeRemoveListeners:f}){const{addKeyedListener:s}=e.useContext(t.NavigationBuilderContext),d=e.useContext(n.NavigationRouteContext),v=d?.key;e.useEffect(()=>{if(v)return s?.('beforeRemove',v,e=>{const t=o();return u(c,f,t.routes,[],e)})},[s,f,c,o,v])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]);const o=Symbol('VISITED_ROUTE_KEYS'),u=(e,t,n,u,c)=>{const f=u.map(e=>e.key),s=n.filter(e=>!f.includes(e.key)).reverse(),d=c[o]??new Set,v=Object.assign({},c,{[o]:d});for(const n of s){if(d.has(n.key))continue;const o=t[n.key]?.(v);if(o)return!0;d.add(n.key);if(e.emit({type:'beforeRemove',target:n.key,data:{action:v},canPreventDefault:!0}).defaultPrevented)return!0}return!1}},199,[34,130,151]);
271__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useOnGetState=function({getState:s,getStateListeners:u}){const{addKeyedListener:c}=e.useContext(n.NavigationBuilderContext),f=e.useContext(o.NavigationRouteContext),d=f?f.key:'root',l=e.useCallback(()=>{const e=s(),n=e.routes.map(e=>{const t=u[e.key]?.();return e.state===t?e:Object.assign({},e,{state:t})});return(0,t.isArrayEqual)(e.routes,n)?e:Object.assign({},e,{routes:n})},[s,u]);e.useEffect(()=>c?.('getState',d,l),[c,l,d])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3])},200,[34,171,130,151]);
272__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useOnRouteFocus=function({router:o,getState:u,key:n,setState:c}){const{onRouteFocus:s}=e.useContext(t.NavigationBuilderContext);return e.useCallback(e=>{const t=u(),f=o.getStateForRouteFocus(t,e);f!==t&&c(f),void 0!==s&&void 0!==n&&s(n)},[u,s,o,c,n])};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var u=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},201,[34,130]);
273__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useRegisterNavigator=function(){const[o]=t.useState(()=>(0,e.nanoid)()),u=t.useContext(n.SingleNavigatorContext);if(void 0===u)throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\n\nThis can also happen if there are multiple copies of '@react-navigation' packages installed.");return t.useEffect(()=>{const{register:e,unregister:t}=u;return e(o),()=>t(o)},[u,o]),o};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2])},202,[115,34,128]);
274__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useScheduleUpdate=function(u){const{scheduleUpdate:o,flushUpdates:c}=e.useContext(t.NavigationBuilderContext);o(u),(0,n.useClientLayoutEffect)(c)};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2])},203,[34,130,183]);
275__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useNavigationContainerRef=function(){const n=e.useRef(null);null==n.current&&(n.current=(0,t.createNavigationContainerRef)());return n.current};
275var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},204,[34,126]);
276__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.usePreventRemove=function(e,u){const[d]=n.useState(()=>(0,t.nanoid)()),v=(0,f.useNavigation)(),{key:l}=(0,c.useRoute)(),{setPreventRemove:_}=(0,s.usePreventRemoveContext)();n.useEffect(()=>(_(d,l,e),()=>{_(d,l,!1)}),[_,d,l,e]);const b=(0,o.default)(t=>{e&&(t.preventDefault(),u({data:t.data}))});n.useEffect(()=>v?.addListener('beforeRemove',b),[v,b])};var e,t=r(_d[0]),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),u=r(_d[2]),o=(e=u)&&e.__esModule?e:{default:e},f=r(_d[3]),s=r(_d[4]),c=r(_d[5])},205,[115,34,122,154,206,150]);
277__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.usePreventRemoveContext=function(){const n=e.useContext(t.PreventRemoveContext);if(null==n)throw new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?");return n};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},206,[34,175]);
278__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useStateForPath=function(){return e.useContext(t.NavigationFocusedRouteStateContext)};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},207,[34,188]);
279__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["direction","theme","linking","fallback","documentTitle","onReady","onStateChange"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NavigationContainer",{enumerable:!0,get:function(){return j}});var n=t(r(_d[0])),o=r(_d[1]),l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=t(r(_d[3])),c=t(r(_d[4])),s=r(_d[5]),d=r(_d[6]),f=r(_d[7]),h=r(_d[8]),S=r(_d[9]),v=r(_d[10]),b=r(_d[11]),P=r(_d[12]),C=r(_d[13]);function O(t,O){let{direction:j=(u.default.getConstants().isRTL?'rtl':'ltr'),theme:T=f.DefaultTheme,linking:k,fallback:p=null,documentTitle:x,onReady:_,onStateChange:L}=t,R=(0,n.default)(t,e);const A=!!k&&!1!==k.enabled;k?.config&&(0,o.validatePathConfig)(k.config);const F=l.useRef(null);(0,S.useBackButton)(F),(0,v.useDocumentTitle)(F,x);const[y,D]=l.useState(),{getInitialState:E}=(0,b.useLinking)(F,Object.assign({enabled:A,prefixes:[]},k),D),I=l.useMemo(()=>({options:k}),[k]),M=l.useMemo(()=>({lastUnhandledLink:y,setLastUnhandledLink:D}),[y,D]),N=(0,c.default)(()=>{const e=F.current?.getCurrentRoute()?.path;D(t=>{if(t!==e)return t}),_?.()}),V=(0,c.default)(e=>{const t=F.current?.getCurrentRoute()?.path;D(e=>{if(e!==t)return e}),L?.(e)});l.useEffect(()=>{F.current&&REACT_NAVIGATION_DEVTOOLS.set(F.current,{get linking(){return Object.assign({},k,{enabled:A,prefixes:k?.prefixes??[],getStateFromPath:k?.getStateFromPath??o.getStateFromPath,getPathFromState:k?.getPathFromState??o.getPathFromState,getActionFromState:k?.getActionFromState??o.getActionFromState})}})});const[w,B]=(0,P.useThenable)(E);l.useImperativeHandle(O,()=>F.current);return null!=R.initialState||!A||w?(0,C.jsx)(d.LocaleDirContext.Provider,{value:j,children:(0,C.jsx)(h.UnhandledLinkingContext.Provider,{value:M,children:(0,C.jsx)(s.LinkingContext.Provider,{value:I,children:(0,C.jsx)(o.BaseNavigationContainer,Object.assign({},R,{theme:T,onReady:N,onStateChange:V,initialState:null==R.initialState?B:R.initialState,ref:F}))})})}):(0,C.jsx)(d.LocaleDirContext.Provider,{value:j,children:(0,C.jsx)(o.ThemeProvider,{value:T,children:p})})}globalThis.REACT_NAVIGATION_DEVTOOLS=new WeakMap;const j=l.forwardRef(O)},208,[109,110,34,209,122,210,211,212,214,215,216,217,220,104]);
280__d(function(g,r,i,a,m,e,d){"use strict";
280Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t={allowRTL(){},forceRTL(){},getConstants:()=>({isRTL:!1})}},209,[]);
281__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LinkingContext",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));const t=e.createContext({get options(){throw new Error("Couldn't find a LinkingContext context.")}});t.displayName='LinkingContext'},210,[34]);
282__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LocaleDirContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext('ltr');e.displayName='LocaleDirContext'},211,[34]);
283__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DefaultTheme",{enumerable:!0,get:function(){return t}});const t={dark:!1,colors:{primary:'rgb(0, 122, 255)',background:'rgb(242, 242, 242)',card:'rgb(255, 255, 255)',text:'rgb(28, 28, 30)',border:'rgb(216, 216, 216)',notification:'rgb(255, 59, 48)'},fonts:r(d[0]).fonts}},212,[213]);
284__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"fonts",{enumerable:!0,get:function(){return t}}),r(d[0]);const o='system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',t={regular:{fontFamily:o,fontWeight:'400'},medium:{fontFamily:o,fontWeight:'500'},bold:{fontFamily:o,fontWeight:'600'},heavy:{fontFamily:o,fontWeight:'700'}}},213,[95]);
285__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"UnhandledLinkingContext",{enumerable:!0,get:function(){return t}});var e=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0]));const n="Couldn't find an UnhandledLinkingContext context.",t=e.createContext({get lastUnhandledLink(){throw new Error(n)},get setLastUnhandledLink(){throw new Error(n)}});t.displayName='UnhandledLinkingContext'},214,[34]);
286__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useBackButton=function(t){}},215,[]);
287__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useDocumentTitle=function(t,{enabled:n=!0,formatter:u=(e,t)=>e?.title??t?.name}={}){e.useEffect(()=>{if(!n)return;const e=t.current;if(e){const t=u(e.getCurrentOptions(),e.getCurrentRoute());document.title=t}return e?.addListener('options',t=>{const n=u(t.data.options,e?.getCurrentRoute());document.title=n})})};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},216,[34]);
288__d(function(g,_r,i,_a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"series",{enumerable:!0,get:function(){return a}}),_e.useLinking=function(e,{enabled:r=!0,config:f,getStateFromPath:d=t.getStateFromPath,getPathFromState:l=t.getPathFromState,getActionFromState:h=t.getActionFromState},y){const p=(0,t.useNavigationIndependentTree)();o.useEffect(()=>{},[r,p]);const[v]=o.useState(s.createMemoryHistory),R=o.useRef(r),k=o.useRef(f),b=o.useRef(d),S=o.useRef(l),w=o.useRef(h);o.useEffect(()=>{R.current=r,k.current=f,b.current=d,S.current=l,w.current=h});const F=o.useCallback(t=>{const r=e.current,n=r?.getRootState();return t?.routes.some(e=>!n?.routeNames.includes(e.name))},[e]),P=o.useContext(c.ServerContext),x=o.useCallback(()=>{let e;if(R.current){const t=P?.location??('undefined'!=typeof window?window.location:void 0),r=t?t.pathname+t.search:void 0;r&&(e=b.current(r,k.current)),y(r)}const t={then:t=>
288Promise.resolve(t?t(e):e),catch:()=>t};return t},[]),_=o.useRef(void 0),j=o.useRef(void 0),O=o.useRef(void 0);return o.useEffect(()=>(_.current=v.index,v.listen(()=>{const t=e.current;if(!t||!r)return;const{location:n}=window,o=n.pathname+n.search,s=v.index,c=_.current??0;_.current=s,O.current=o;const u=v.get(s);if(u?.path===o&&u?.state)return void t.resetRoot(u.state);const a=b.current(o,k.current);if(a){if(y(o),F(a))return;if(s>c){const e=w.current(a,k.current);if(void 0!==e)try{t.dispatch(e)}catch(e){console.warn(`An error occurred when trying to handle the link '${o}': ${'object'==typeof e&&null!=e&&'message'in e?e.message:e}`)}else t.resetRoot(a)}else t.resetRoot(a)}else t.resetRoot(a)})),[r,v,y,e,F]),o.useEffect(()=>{if(!r)return;const o=(e,r)=>{let o;if(e?.path){const r=b.current(e.path,k.current);if(r){const s=(0,t.findFocusedRoute)(r);s&&s.name===e.name&&(0,n.default)(s.params,e.params)&&(o=e.path)}}null==o&&(o=S.current(r,k.current));const s=j.current?(0,t.findFocusedRoute)(j.current):void 0;return s&&e&&'key'in s&&'key'in e&&s.key===e.key&&(o+=location.hash),o};if(e.current){const r=e.current.getRootState();if(r){const e=(0,t.findFocusedRoute)(r),n=o(e,r);void 0===j.current&&(j.current=r),v.replace({path:n,state:r})}}return e.current?.addListener('state',a(async()=>{const n=e.current;if(!n||!r)return;const s=j.current,c=n.getRootState();if(!c)return;const a=O.current,f=(0,t.findFocusedRoute)(c),d=o(f,c);j.current=c,O.current=void 0;const[l,h]=u(s,c);if(l&&h&&d!==a){const e=(h.history?h.history.length:h.routes.length)-(l.history?l.history.length:l.routes.length);if(e>
2880)v.push({path:d,state:c});else if(e<0){const t=v.backIndex({path:d}),r=v.index;try{-1!==t&&t<r&&v.get(t)?await v.go(t-r):await v.go(e),v.replace({path:d,state:c})}catch(e){}}else v.replace({path:d,state:c})}else v.replace({path:d,state:c})}))},[r,v,e]),{getInitialState:x}};var e,t=_r(_d[0]),r=_r(_d[1]),n=(e=r)&&e.__esModule?e:{default:e},o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t.default=e,t})(_r(_d[2])),s=_r(_d[3]),c=_r(_d[4]);const u=(e,t)=>{if(void 0===e||void 0===t||e.key!==t.key)return[void 0,void 0];const r=e.history?e.history.length:e.routes.length,n=t.history?t.history.length:t.routes.length,o=e.routes[e.index],s=t.routes[t.index],c=o.state,a=s.state;return r!==n||o.key!==s.key||void 0===c||void 0===a||c.key!==a.key?[e,t]:u(c,a)},a=e=>{let t=Promise.resolve();return()=>{t=t.then(e)}}},217,[110,181,34,218,219]);
289__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createMemoryHistory=function(){let n=0,i=[];const o=[],s=()=>{o.forEach(t=>{const n=t.cb;t.cb=()=>n(!0)})};return{get index(){const t=window.history.state?.id;if(t){const n=i.findIndex(n=>n.id===t);return n>-1?n:0}return 0},get:t=>i[t],backIndex({path:t}){for(let o=n-1;o>=0;o--){if(i[o].path===t)return o}return-1},push({path:o,state:c}){s();const h=(0,t.nanoid)();i=i.slice(0,n+1),i.push({path:o,state:c,id:h}),n=i.length-1,window.history.pushState({id:h},'',o)},replace({path:o,state:c}){s();const h=window.history.state?.id??(0,t.nanoid)();let w=o;const p=w.includes('#')?'':location.hash;!i.length||i.findIndex(t=>t.id===h)<0?(w+=p,i=[{path:w,state:c,id:h}],n=0):(i[n].path===o&&(w+=p),i[n]={path:o,state:c,id:h}),window.history.replaceState({id:h},'',w)},go(t){s();const c=n+t,h=i.length-1;if(t<0&&!i[c]?(t=-n,n=0):t>0&&c>h?(t=h-n,n=h):n=c,0!==t)return new Promise((i,s)=>{const c=t=>{if(clearTimeout(h),t)return void s(new Error('History was changed during navigation.'));const{title:n}=window.document;window.document.title='',window.document.title=n,i()};o.push({ref:c,cb:c});const h=setTimeout(()=>{const t=o.findIndex(t=>t.ref===c);t>-1&&(o[t].cb(),o.splice(t,1)),n=this.index},100),w=()=>{n=this.index;const t=o.pop();window.removeEventListener('popstate',w),t?.cb()};window.addEventListener('popstate',w),window.history.go(t)})},listen(t){const i=()=>{n=this.index,o.length||t()};return window.addEventListener('popstate',i),()=>window.removeEventListener('popstate',i)}}};var t=r(d[0])},218,[115]);
290__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ServerContext",{enumerable:!0,get:function(){return e}});const e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).createContext(void 0)},219,[34]);
291__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useThenable=function(t){const[n]=e.useState(t);let u=[!1,void 0];n.then(e=>{u=[!0,e]});const[c,o]=e.useState(u),[f]=c;return e.useEffect(()=>{let e=!1;return f||(async()=>{let t;try{t=await n}finally{e||o([!0,t])}})(),()=>{e=!0}},[n,f]),c};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},220,[34]);
292__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["screen","params","action","href","style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Link=function(t){let{screen:f,params:l,action:d,href:p,style:y}=t,P=(0,n.default)(t,e);const{colors:_,fonts:b}=(0,s.useTheme)(),v=(0,u.useLinkProps)({screen:f,params:l,action:d,href:p});return o.createElement(c.default,Object.assign({},v,P,{onClick:e=>{'onPress'in P&&P.onPress?.(e),e.defaultPrevented||v.onPress(e)}},{style:[{color:_.primary},b.regular,y]}))};
292var n=t(r(_d[0])),s=r(_d[1]),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2]));r(_d[3]);var c=t(r(_d[4])),u=r(_d[5])},221,[109,110,34,95,222,252]);
293__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var o={};return e&&Object.keys(e).forEach(function(n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}),o.default=e,o}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return k}});var n=e(r(_d[0])),t=e(r(_d[1])),l=o(r(_d[2])),d=e(r(_d[3])),s=o(r(_d[4])),u=e(r(_d[5])),p=e(r(_d[6])),S=e(r(_d[7])),c=e(r(_d[8])),R=e(r(_d[9])),h=e(r(_d[10])),f=e(r(_d[11])),b=r(_d[12]),v=["hrefAttrs","numberOfLines","onClick","onLayout","onPress","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStart
293ShouldSetResponder","onStartShouldSetResponderCapture","selectable"],C=Object.assign({},s.defaultProps,s.accessibilityProps,s.clickProps,s.focusProps,s.keyboardProps,s.mouseProps,s.touchProps,s.styleProps,{href:!0,lang:!0,pointerEvents:!0}),x=e=>(0,u.default)(e,C),w=l.forwardRef((e,o)=>{var n=e.hrefAttrs,s=e.numberOfLines,u=e.onClick,h=e.onLayout,C=e.onPress,w=e.onMoveShouldSetResponder,y=e.onMoveShouldSetResponderCapture,k=e.onResponderEnd,M=e.onResponderGrant,O=e.onResponderMove,L=e.onResponderReject,_=e.onResponderRelease,j=e.onResponderStart,A=e.onResponderTerminate,T=e.onResponderTerminationRequest,E=e.onScrollShouldSetResponder,W=e.onScrollShouldSetResponderCapture,D=e.onSelectionChangeShouldSetResponder,$=e.onSelectionChangeShouldSetResponderCapture,q=e.onStartShouldSetResponder,G=e.onStartShouldSetResponderCapture,H=e.selectable,z=(0,t.default)(e,v),B=l.useContext(f.default),N=l.useRef(null),F=(0,b.useLocaleContext)().direction;(0,p.default)(N,h),(0,R.default)(N,{onMoveShouldSetResponder:w,onMoveShouldSetResponderCapture:y,onResponderEnd:k,onResponderGrant:M,onResponderMove:O,onResponderReject:L,onResponderRelease:_,onResponderStart:j,onResponderTerminate:A,onResponderTerminationRequest:T,onScrollShouldSetResponder:E,onScrollShouldSetResponderCapture:W,onSelectionChangeShouldSetResponder:D,onSelectionChangeShouldSetResponderCapture:$,onStartShouldSetResponder:q,onStartShouldSetResponderCapture:G});var I=l.useCallback(e=>{null!=u?u(e):null!=C&&(e.stopPropagation(),C(e))},[u,C]),J=B?'span':'div',K=null!=e.lang?(0,b.getLocaleDirection)(e.lang):null,Q=e.dir||K,U=Q||F,V=x(z);if(V.dir=Q,B||(V.dir=null!=Q?Q:'auto'),(u||C)&&(V.onClick=I),V.style=[null!=s&&s>1&&{WebkitLineClamp:s},!0===B?P.textHasAncestor$raw:P.text$raw,1===s&&P.textOneLine,null!=s&&s>1&&P.textMultiLine,e.style,!0===H&&P.selectable,!1===H&&P.notSelectable,C&&P.pressable],null!=e.href&&(J='a',null!=n)){var X=n.download,Y=n.rel,Z=n.target;null!=X&&(V.download=X),null!=Y&&(V.rel=Y),'string'==typeof Z&&(V.target='_'!==Z.charAt(0)?'_'+Z:Z)}var ee=(0,c.default)(V),oe=(0,S.default)(N,ee,o);V.ref=oe;var ne=(0,d.default)(J,V,{writingDirection:U});return B?ne:l.createElement(f.default.Provider,{value:!0},ne)});w.displayName='Text';var y={backgroundColor:'transparent',border:'0 solid black',boxSizing:'border-box',color:'black',display:'inline',font:'14px System',listStyle:'none',margin:0,padding:0,position:'relative',textAlign:'start',textDecoration:'none',whiteSpace:'pre-wrap',wordWrap:'break-word'},P=h.default.create({text$raw:y,textHasAncestor$raw:(0,n.default)((0,n.default)({},y),{},{color:'inherit',font:'inherit',textAlign:'inherit',whiteSpace:'inherit'}),textOneLine:{maxWidth:'100%',overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap',wordWrap:'normal'},textMultiLine:{display:'-webkit-box',maxWidth:'100%',overflow:'clip',textOverflow:'ellipsis',WebkitBoxOrient:'vertical'},notSelectable:{userSelect:'none'},selectable:{userSelect:'text'},pressable:{cursor:'pointer'}}),k=w},222,[19,43,34,223,231,232,233,240,242,244,42,251,229]);
294__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),n=e(r(d[1])),l=e(r(d[2])),u=r(d[3]),o=(e,o,c)=>{var f;e&&e.constructor===String&&(f=t.default.propsToAccessibilityComponent(o));var s=f||e,_=(0,n.default)(s,o,c),p=l.default.createElement(s,_);return _.dir?l.default.createElement(u.LocaleProvider,{children:p,direction:_.dir,locale:_.lang}):p}},223,[224,228,34,229]);
295__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(r(d[0])),u=e(r(d[1])),o=e(r(d[2])),n={isDisabled:t.default,propsToAccessibilityComponent:u.default,propsToAriaRole:o.default}},224,[225,226,227]);
296__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=t=>t.disabled||Array.isArray(t.accessibilityStates)&&t.accessibilityStates.indexOf('disabled')>-1},225,[]);
297__d(function(g,r,i,a,m,_e,d){"use strict";
297Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},o={article:'article',banner:'header',blockquote:'blockquote',button:'button',code:'code',complementary:'aside',contentinfo:'footer',deletion:'del',emphasis:'em',figure:'figure',insertion:'ins',form:'form',list:'ul',listitem:'li',main:'main',navigation:'nav',paragraph:'p',region:'section',strong:'strong'},l={},u=function(e){if(void 0===e&&(e=l),'label'===(e.role||e.accessibilityRole))return'label';var t=(0,n.default)(e);if(t){if('heading'===t){var u=e.accessibilityLevel||e['aria-level'];return null!=u?"h"+u:'h1'}return o[t]}}},226,[227]);
298__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var n={adjustable:'slider',button:'button',header:'heading',image:'img',imagebutton:null,keyboardkey:null,label:null,link:'link',none:'presentation',search:'search',summary:'region',text:null},t=t=>{var l=t.accessibilityRole,u=t.role||l;if(u){var o=n[u];if(null!==o)return o||u}}},227,[]);
299__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var l=e(r(d[0])),t=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),c=r(d[4]),u=["aria-activedescendant","accessibilityActiveDescendant","aria-atomic","accessibilityAtomic","aria-autocomplete","accessibilityAutoComplete","aria-busy","accessibilityBusy","aria-checked","accessibilityChecked","aria-colcount","accessibilityColumnCount","aria-colindex","accessibilityColumnIndex","aria-colspan","accessibilityColumnSpan","aria-controls","accessibilityControls","aria-current","accessibilityCurrent","aria-describedby","accessibilityDescribedBy","aria-details","accessibilityDetails","aria-disabled","accessibilityDisabled","aria-errormessage","accessibilityErrorMessage","aria-expanded","accessibilityExpanded","aria-flowto","accessibilityFlowTo","aria-haspopup","accessibilityHasPopup","aria-hidden","accessibilityHidden","aria-invalid","accessibilityInvalid","aria-keyshortcuts","accessibilityKeyShortcuts","aria-label","accessibilityLabel","aria-labelledby","accessibilityLabelledBy","aria-level","accessibilityLevel","aria-live","accessibilityLiveRegion","aria-modal","accessibilityModal","aria-multiline","accessibilityMultiline","aria-multiselectable","accessibilityMultiSelectable","aria-orientation","accessibilityOrientation","aria-owns","accessibilityOwns","aria-placeholder","accessibilityPlaceholder","aria-posinset","accessibilityPosInSet","aria-pressed","accessibilityPressed","aria-readonly","accessibilityReadOnly","aria-required","accessibilityRequired","role","accessibilityRole","aria-roledescription","accessibilityRoleDescription","aria-rowcount","accessibilityRowCount","aria-rowindex","accessibilityRowIndex","aria-rowspan","accessibilityRowSpan","aria-selected","accessibilitySelected","aria-setsize","accessibilitySetSize","aria-sort","accessibilitySort","aria-valuemax","accessibilityValueMax","aria-valuemin","accessibilityValueMin","aria-valuenow","accessibilityValueNow","aria-valuetext","accessibilityValueText","dataSet","focusable","id","nativeID","pointerEvents","style","tabIndex","testID"],o={},b=Object.prototype.hasOwnProperty,y=Array.isArray,v=/[A-Z]/g;function p(e){return'-'+e.toLowerCase()}function x(e){return e.replace(v,p)}function w(e){return y(e)?e.join(' '):e}var f=n.default.create({auto:{pointerEvents:'auto'},'box-none':{pointerEvents:'box-none'},'box-only':{pointerEvents:'box-only'},none:{pointerEvents:'none'}}),h=(e,y,v)=>{y||(y=o);var p=y,h=p['aria-activedescendant'],S=p.accessibilityActiveDescendant,C=p['aria-atomic'],I=p.accessibilityAtomic,R=p['aria-autocomplete'],D=p.accessibilityAutoComplete,M=p['aria-busy'],E=p.accessibilityBusy,O=p['aria-checked'],P=p.accessibilityChecked,k=p['aria-colcount'],A=p.accessibilityColumnCount,L=p['aria-colindex'],V=p.accessibilityColumnIndex,q=p['aria-colspan'],B=p.accessibilityColumnSpan,_=p['aria-controls'],z=p.accessibilityControl
299s,T=p['aria-current'],j=p.accessibilityCurrent,H=p['aria-describedby'],N=p.accessibilityDescribedBy,F=p['aria-details'],K=p.accessibilityDetails,U=p['aria-disabled'],Z=p.accessibilityDisabled,G=p['aria-errormessage'],J=p.accessibilityErrorMessage,Q=p['aria-expanded'],W=p.accessibilityExpanded,X=p['aria-flowto'],Y=p.accessibilityFlowTo,$=p['aria-haspopup'],aa=p.accessibilityHasPopup,ia=p['aria-hidden'],ea=p.accessibilityHidden,la=p['aria-invalid'],ra=p.accessibilityInvalid,ta=p['aria-keyshortcuts'],sa=p.accessibilityKeyShortcuts,na=p['aria-label'],ca=p.accessibilityLabel,ua=p['aria-labelledby'],oa=p.accessibilityLabelledBy,ba=p['aria-level'],da=p.accessibilityLevel,ya=p['aria-live'],va=p.accessibilityLiveRegion,pa=p['aria-modal'],xa=p.accessibilityModal,ma=p['aria-multiline'],wa=p.accessibilityMultiline,fa=p['aria-multiselectable'],ha=p.accessibilityMultiSelectable,Sa=p['aria-orientation'],Ca=p.accessibilityOrientation,Ia=p['aria-owns'],Ra=p.accessibilityOwns,Da=p['aria-placeholder'],Ma=p.accessibilityPlaceholder,Ea=p['aria-posinset'],Oa=p.accessibilityPosInSet,Pa=p['aria-pressed'],ga=p.accessibilityPressed,ka=p['aria-readonly'],Aa=p.accessibilityReadOnly,La=p['aria-required'],Va=p.accessibilityRequired,qa=(p.role,p.accessibilityRole,p['aria-roledescription']),Ba=p.accessibilityRoleDescription,_a=p['aria-rowcount'],za=p.accessibilityRowCount,Ta=p['aria-rowindex'],ja=p.accessibilityRowIndex,Ha=p['aria-rowspan'],Na=p.accessibilityRowSpan,Fa=p['aria-selected'],Ka=p.accessibilitySelected,Ua=p['aria-setsize'],Za=p.accessibilitySetSize,Ga=p['aria-sort'],Ja=p.accessibilitySort,Qa=p['aria-valuemax'],Wa=p.accessibilityValueMax,Xa=p['aria-valuemin'],Ya=p.accessibilityValueMin,$a=p['aria-valuenow'],ai=p.accessibilityValueNow,ii=p['aria-valuetext'],ei=p.accessibilityValueText,li=p.dataSet,ri=p.focusable,ti=p.id,si=p.nativeID,ni=p.pointerEvents,ci=p.style,ui=p.tabIndex,oi=p.testID,bi=(0,t.default)(p,u),di=U||Z,yi=s.default.propsToAriaRole(y),vi=null!=h?h:S;null!=vi&&(bi['aria-activedescendant']=vi);var pi=null!=C?h:I;null!=pi&&(bi['aria-atomic']=pi);var xi=null!=R?R:D;null!=xi&&(bi['aria-autocomplete']=xi);var mi=null!=M?M:E;null!=mi&&(bi['aria-busy']=mi);var wi=null!=O?O:P;null!=wi&&(bi['aria-checked']=wi);var fi=null!=k?k:A;null!=fi&&(bi['aria-colcount']=fi);var hi=null!=L?L:V;null!=hi&&(bi['aria-colindex']=hi);var Si=null!=q?q:B;null!=Si&&(bi['aria-colspan']=Si);
299var Ci=null!=_?_:z;null!=Ci&&(bi['aria-controls']=w(Ci));var Ii=null!=T?T:j;null!=Ii&&(bi['aria-current']=Ii);var Ri=null!=H?H:N;null!=Ri&&(bi['aria-describedby']=w(Ri));var Di=null!=F?F:K;null!=Di&&(bi['aria-details']=Di),!0===di&&(bi['aria-disabled']=!0,'button'!==e&&'form'!==e&&'input'!==e&&'select'!==e&&'textarea'!==e||(bi.disabled=!0));var Mi=null!=G?G:J;null!=Mi&&(bi['aria-errormessage']=Mi);var Ei=null!=Q?Q:W;null!=Ei&&(bi['aria-expanded']=Ei);var Oi=null!=X?X:Y;null!=Oi&&(bi['aria-flowto']=w(Oi));var Pi=null!=$?$:aa;null!=Pi&&(bi['aria-haspopup']=Pi);var gi=null!=ia?ia:ea;!0===gi&&(bi['aria-hidden']=gi);var ki=null!=la?la:ra;null!=ki&&(bi['aria-invalid']=ki);var Ai=null!=ta?ta:sa;null!=Ai&&(bi['aria-keyshortcuts']=w(Ai));var Li=null!=na?na:ca;null!=Li&&(bi['aria-label']=Li);var Vi=null!=ua?ua:oa;null!=Vi&&(bi['aria-labelledby']=w(Vi));var qi=null!=ba?ba:da;null!=qi&&(bi['aria-level']=qi);var Bi=null!=ya?ya:va;null!=Bi&&(bi['aria-live']='none'===Bi?'off':Bi);var _i=null!=pa?pa:xa;null!=_i&&(bi['aria-modal']=_i);var zi=null!=ma?ma:wa;null!=zi&&(bi['aria-multiline']=zi);var Ti=null!=fa?fa:ha;null!=Ti&&(bi['aria-multiselectable']=Ti);var ji=null!=Sa?Sa:Ca;null!=ji&&(bi['aria-orientation']=ji);var Hi=null!=Ia?Ia:Ra;null!=Hi&&(bi['aria-owns']=w(Hi));var Ni=null!=Da?Da:Ma;null!=Ni&&(bi['aria-placeholder']=Ni);var Fi=null!=Ea?Ea:Oa;null!=Fi&&(bi['aria-posinset']=Fi);var Ki=null!=Pa?Pa:ga;null!=Ki&&(bi['aria-pressed']=Ki);var Ui=null!=ka?ka:Aa;null!=Ui&&(bi['aria-readonly']=Ui,'input'!==e&&'select'!==e&&'textarea'!==e||(bi.readOnly=!0));var Zi=null!=La?La:Va;null!=Zi&&(bi['aria-required']=Zi,'input'!==e&&'select'!==e&&'textarea'!==e||(bi.required=Va)),null!=yi&&(bi.role='none'===yi?'presentation':yi);var Gi=null!=qa?qa:Ba;null!=Gi&&(bi['aria-roledescription']=Gi);var Ji=null!=_a?_a:za;null!=Ji&&(bi['aria-rowcount']=Ji);var Qi=null!=Ta?Ta:ja;null!=Qi&&(bi['aria-rowindex']=Qi);var Wi=null!=Ha?Ha:Na;null!=Wi&&(bi['aria-rowspan']=Wi);var Xi=null!=Fa?Fa:Ka;null!=Xi&&(bi['aria-selected']=Xi);var Yi=null!=Ua?Ua:Za;null!=Yi&&(bi['aria-setsize']=Yi);var $i=null!=Ga?Ga:Ja;null!=$i&&(bi['aria-sort']=$i);var ae=null!=Qa?Qa:Wa;null!=ae&&(bi['aria-valuemax']=ae);var ie=null!=Xa?Xa:Ya;null!=ie&&(bi['aria-valuemin']=ie);var ee=null!=$a?$a:ai;null!=ee&&(bi['aria-valuenow']=ee);var le=null!=ii?ii:ei;if(null!=le&&(bi['aria-valuetext']=le),null!=li)for(var re in li)if(b.call(li,re)){var te=x(re),se=li[re];null!=se&&(bi["data-"+te]=se)}0===ui||'0'===ui||-1===ui||'-1'===ui?bi.tabIndex=ui:(!1===ri&&(bi.tabIndex='-1'),'a'===e||'button'===e||'input'===e||'select'===e||'textarea'===e?!1!==ri&&!0!==Z||(bi.tabIndex='-1'):'button'===yi||'checkbox'===yi||'link'===yi||'radio'===yi||'textbox'===yi||'switch'===yi?!1!==ri&&(bi.tabIndex='0'):!0===ri&&(bi.tabIndex='0')),null!=ni&&(0,c.warnOnce)('pointerEvents',"props.pointerEvents is deprecated. Use style.pointerEvents");var ne=(0,n.default)([ci,ni&&f[ni]],(0,l.default)({writingDirection:'ltr'},v)),ce=ne[0],ue=ne[1];ce&&(bi.className=ce),ue&&(bi.style=ue);var oe=null!=ti?ti:si;return null!=oe&&(bi.id=oe),null!=oi&&(bi['data-testid']=oi),null==bi.type&&'button'===e&&(bi.type='button'),bi}},228,[19,43,224,42,87]);
300__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getLocaleDirection=u,_e.LocaleProvider=function(e){var t=e.direction,o=e.locale,l=e.children;return t||o?n.default.createElement(c.Provider,{children:l,value:{direction:o?u(o):t,locale:o}}):l},_e.useLocaleContext=function(){return(0,t.useContext)(c)};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[1]),l={direction:'ltr',locale:'en-US'},c=(0,t.createContext)(l);function u(e){return(0,o.isLocaleRTL)(e)?'rtl':'ltr'}},229,[34,230]);
301__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isLocaleRTL=function(s){var l=c.get(s);if(l)return l;var o=!1;if(Intl.Locale)try{var u=new Intl.Locale(s).maximize().script;o=t.has(u)}catch(t){var h=s.split('-')[0];o=n.has(h)}else{var v=s.split('-')[0];o=n.has(v)}return c.set(s,o),o};var t=new Set(['Arab','Syrc','Samr','Mand','Thaa','Mend','Nkoo','Adlm','Rohg','Hebr']),n=new Set(['ae','ar','arc','bcc','bqi','ckb','dv','fa','far','glk','he','iw','khw','ks','ku','mzn','nqo','pnb','ps','sd','ug','ur','yi']),c=new Map},230,[]);
302__d(function(g,r,i,a,m,e,d){"use strict";
302Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"defaultProps",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"accessibilityProps",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"clickProps",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"focusProps",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"keyboardProps",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"mouseProps",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"touchProps",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"styleProps",{enumerable:!0,get:function(){return b}});var t={children:!0,dataSet:!0,dir:!0,id:!0,ref:!0,suppressHydrationWarning:!0,tabIndex:!0,testID:!0,focusable:!0,nativeID:!0},c={'aria-activedescendant':!0,'aria-atomic':!0,'aria-autocomplete':!0,'aria-busy':!0,'aria-checked':!0,'aria-colcount':!0,'aria-colindex':!0,'aria-colspan':!0,'aria-controls':!0,'aria-current':!0,'aria-describedby':!0,'aria-details':!0,'aria-disabled':!0,'aria-errormessage':!0,'aria-expanded':!0,'aria-flowto':!0,'aria-haspopup':!0,'aria-hidden':!0,'aria-invalid':!0,'aria-keyshortcuts':!0,'aria-label':!0,'aria-labelledby':!0,'aria-level':!0,'aria-live':!0,'aria-modal'
302:!0,'aria-multiline':!0,'aria-multiselectable':!0,'aria-orientation':!0,'aria-owns':!0,'aria-placeholder':!0,'aria-posinset':!0,'aria-pressed':!0,'aria-readonly':!0,'aria-required':!0,inert:!0,role:!0,'aria-roledescription':!0,'aria-rowcount':!0,'aria-rowindex':!0,'aria-rowspan':!0,'aria-selected':!0,'aria-setsize':!0,'aria-sort':!0,'aria-valuemax':!0,'aria-valuemin':!0,'aria-valuenow':!0,'aria-valuetext':!0,accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0},o={onClick:!0,onAuxClick:!0,onContextMenu:!0,onGotPointerCapture:!0,onLostPointerCapture:!0,onPointerCancel:!0,onPointerDown:!0,onPointerEnter:!0,onPointerMove:!0,onPointerLeave:!0,onPointerOut:!0,onPointerOver:!0,onPointerUp:!0},s={onBlur:!0,onFocus:!0},n={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},l={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},u={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},b={style:!0}},231,[]);
303__d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){var u={};for(var o in t)t.hasOwnProperty(o)&&!0===n[o]&&(u[o]=t[o]);return u}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},232,[]);
304__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2])),l='__reactLayoutHandler',o=(u.default,null);function f(e,f){var v=(u.default&&void 0!==window.ResizeObserver&&null==o&&(o=new window.ResizeObserver(function(e){e.forEach(e=>{var t=e.target,u=t[l];'function'==typeof u&&n.default.measure(t,(t,n,l,o,f,v)=>{var c={nativeEvent:{layout:{x:t,y:n,width:l,height:o,left:f,top:v}},timeStamp:Date.now()};Object.defineProperty(c.nativeEvent,'target',{enumerable:!0,get:()=>e.target}),u(c)})})})),o);(0,t.default)(()=>{var t=e.current;null!=t&&(t[l]=f)},[e,f]),(0,t.default)(()=>{var t=e.current;return null!=t&&null!=v&&('function'==typeof t[l]?v.observe(t):v.unobserve(t)),()=>{null!=t&&null!=v&&v.unobserve(t)}},[e,v])}},233,[234,235,39]);
305__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var e,t=r(d[0]),u=r(d[1]),f=((e=u)&&e.__esModule?e:{default:e}).default?t.useLayoutEffect:t.useEffect},234,[34,39]);
306__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var t=e(r(d[0])),o=e(r(d[1])),s=e=>{var t=e.offsetHeight,o=e.offsetWidth,s=e.offsetLeft,n=e.offsetTop;for(e=e.offsetParent;e&&1===e.nodeType;)s+=e.offsetLeft+e.clientLeft-e.scrollLeft,n+=e.offsetTop+e.clientTop-e.scrollTop,e=e.offsetParent;return{width:o,height:t,top:n-=window.scrollY,left:s-=window.scrollX}},n=(e,t,o)=>{var n=t||e&&e.parentNode;e&&n&&setTimeout(()=>{if(e.isConnected&&n.isConnected){var t=s(n),l=s(e),f=l.height,u=l.left,c=l.top,b=l.width,p=u-t.left,h=c-t.top;o(p,h,b,f,u,c)}},0)},l={A:!0,BODY:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},f={blur(e){try{e.blur()}catch(e){}},focus(e){try{var t=e.nodeName;null==e.getAttribute('tabIndex')&&!0!==e.isContentEditable&&null==l[t]&&e.setAttribute('tabIndex','-1'),e.focus()}catch(e){}},measure(e,t){n(e,null,t)},measureInWindow(e,o){e&&setTimeout(()=>{var s=(0,t.default)(e),n=s.height,l=s.left,f=s.top,u=s.width;o(l,f,u,n)},0)},measureLayout(e,t,o,s){n(e,t,s)},updateView(e,t){for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var n=t[s];switch(s){case'style':(0,o.default)(e,n);break;case'class':case'className':e.setAttribute('class',n);break;case'text':case'value':e.value=n;break;default:e.setAttribute(s,n)}}},configureNextLayoutAnimation(e,t){t()}
306,setLayoutAnimationEnabledExperimental(){}}},235,[236,237]);
307__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=t=>{if(null!=t&&(1===t.nodeType&&'function'==typeof t.getBoundingClientRect))return t.getBoundingClientRect()}},236,[]);
308__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};var f=function(e,t){var f=e.style;for(var o in t)if(t.hasOwnProperty(o)){var u=0===o.indexOf('--'),l=(0,n.default)(o,t[o],u);'float'===o&&(o='cssFloat'),u?f.setProperty(o,l):f[o]=l}}},237,[238]);
309__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};var n=function(e,t,n){return null==t||'boolean'==typeof t||''===t?'':n||'number'!=typeof t||0===t||u.default.hasOwnProperty(e)&&u.default[e]?(''+t).trim():t+'px'}},238,[239]);
310__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},o=['ms','Moz','O','Webkit'],l=(t,o)=>t+o.charAt(0).toUpperCase()+o.substring(1);Object.keys(t).forEach(n=>{o.forEach(o=>{t[l(o,n)]=t[n]})});var n=t},239,[]);
311__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=r(_d[1]),u=(e=n)&&e.__esModule?e:{default:e};function o(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.useMemo(()=>(0,u.default)(...n),[...n])}},240,[34,241]);
312__d(function(g,r,i,a,m,e,d){"use strict";function n(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];return function(n){t.forEach(t=>{null!=t&&('function'!=typeof t?'object'!=typeof t?console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(t)):t.current=n:t(n))})}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}}),r(d[0])},241,[34]);
313__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var u=e(r(d[0])),t=e(r(d[1]));function n(e){e.pointerEvents,e.style;return(0,t.default)(()=>e=>{null!=e&&(e.measure=t=>u.default.measure(e,t),e.measureLayout=(t,n,l)=>u.default.measureLayout(e,t,l,n),e.measureInWindow=t=>u.default.measureInWindow(e,t))})}},242,[235,243]);
314__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t='function'==typeof Symbol&&'symbol'==typeof Symbol()?Symbol():Object.freeze({});function n(n){var u=e.useRef(t);return u.current===t&&(u.current=n()),u.current}},243,[34]);
315__d(function(g,r,i,a,m,_e,_d){"use strict";
315function e(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var n=e(r(_d[0])),t=e(r(_d[1])),u={},o=0;function l(e,l){void 0===l&&(l=u);var d,c,s=(d=()=>o++,null==(c=n.useRef(null)).current&&(c.current=d()),c.current),S=n.useRef(!1);n.useEffect(()=>(t.attachListeners(),()=>{t.removeNode(s)}),[s]),n.useEffect(()=>{var n=l,u=n.onMoveShouldSetResponder,o=n.onMoveShouldSetResponderCapture,d=n.onScrollShouldSetResponder,c=n.onScrollShouldSetResponderCapture,f=n.onSelectionChangeShouldSetResponder,p=n.onSelectionChangeShouldSetResponderCapture,h=n.onStartShouldSetResponder,R=n.onStartShouldSetResponderCapture,v=null!=u||null!=o||null!=d||null!=c||null!=f||null!=p||null!=h||null!=R,b=e.current;v?(t.addNode(s,b,l),S.current=!0):S.current&&(t.removeNode(s),S.current=!1)},[l,e,s]),n.useDebugValue({isResponder:e.current===t.getResponderNode()}),n.useDebugValue(l)}},244,[34,245]);
316__d(function(g,r,_i2,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.attachListeners=function(){s.default&&null==window.__reactResponderSystemActive&&(window.addEventListener('blur',P),E.forEach(e=>{document.addEventListener(e,P)}),_.forEach(e=>{document.addEventListener(e,P,!0)}),window.__reactResponderSystemActive=!0)},_e.addNode=function(e,n,t){(0,o.setResponderId)(n,e),f.set(e,t)},_e.removeNode=function(e){S.id===e&&M();f.has(e)&&f.delete(e)},_e.terminateResponder=M,_e.getResponderNode=function(){return S.node};var n=e(r(d[0])),t=r(d[1]),o=r(d[2]),i=r(d[3]),s=e(r(d[4])),l={},u=['onStartShouldSetResponderCapture','onStartShouldSetResponder',{bubbles:!0}],c=['onMoveShouldSetResponderCapture','onMoveShouldSetResponder',{bubbles:!0}],p={touchstart:u,mousedown:u,touchmove:c,mousemove:c,scroll:['onScrollShouldSetResponderCapture','onScrollShouldSetResponder',{bubbles:!1}]},h={id:null,idPath:null,node:null},f=new Map,v=!1,R=0,S={id:null,node:null,idPath:null},b=new i.ResponderTouchHistoryStore;function T(e){S=e}function C(e){var n=f.get(e);return null!=n?n:l}function P(e){var i=e.type,s=e.target;if('touchstart'===i&&(v=!0),('touchmove'===i||R>1)&&(v=!1),!('mousedown'===i&&v||'mousemove'===i&&v||'mousemove'===i&&R<1))if(v&&'mouseup'===i)0===R&&(v=!1);else{var l=(0,t.isStartish)(i)&&(0,o.isPrimaryPointerDown)(e),u=(0,t.isMoveish)(i),c=(0,t.isEndish)(i),p=(0,t.isScroll)(i),f=(0,t.isSelectionChange)(i),P=(0,n.default)(e,b);(l||u||c)&&(e.touches?R=e.touches.length:l?R=1:c&&(R=0),b.recordTouchTrack(i,P.nativeEvent));var _,E=(0,o.getResponderPaths)(e),M=!1;if(l||u||p&&R>0){var y=S.idPath,x=E.idPath;if(null!=y&&null!=x){var L=(0,o.getLowestCommonAncestor)(y,x);if(null!=L){var q=x.indexOf(L)+(L===S.id?1:0);E={idPath:x.slice(q),nodePath:E.nodePath.slice(q)}}else E=null}null!=E&&null!=(_=w(E,e,P))&&(N(P,_),M=!0)}if(null!=S.id&&null!=S.node){var j=S,A=j.id,G=j.node,O=C(A),k=O.onResponderStart,D=O.onResponderMove,H=O.onResponderEnd,I=O.onResponderRelease,V=O.onResponderTerminate,z=O.onResponderTerminationRequest;if(P.bubbles=!1,P.cancelable=!1,P.currentTarget=G,l)null!=k&&(P.dispatchConfig.registrationName='onResponderStart',k(P));else if(u)null!=D&&(P.dispatchConfig.registrationName='onResponderMove',D(P));else{var B=(0,t.isCancelish)(i)||'contextmenu'===i||'blur'===i&&s===window||'blur'===i&&s.contains(G)&&e.relatedTarget!==G||p&&0===R||p&&s.contains(G)&&s!==G||f&&(0,o.hasValidSelection)(e),F=c&&!B&&!(0,o.hasTargetTouches)(G,e.touches);if(c&&null!=H&&(P.dispatchConfig.registrationName='onResponderEnd',H(P)),F&&(null!=I&&(P.dispatchConfig.registrationName='onResponderRelease',I(P)),T(h)),B){var J=!0;'contextmenu'!==i&&'scroll'!==i&&'selectionchange'!==i||(M?J=!1:null!=z&&(P.dispatchConfig.registrationName='onResponderTerminationRequest',!1===z(P)&&(J=!1))),J&&(null!=V&&(P.dispatchConfig.registrationName='onResponderTerminate',V(P)),T(h),v=!1,R=0)}}}}}function w(e,n,t){var o=p[n.type];if(null!=o){for(var i=e.idPath,s=e.nodePath,l=o[0],u=o[1],c=o[2].bubbles,h=function(e,n,o){var s=C(e)[o];if(null!=s&&(t.currentTarget=n,!0===s(t)))return{id:e,node:n,idPath:i.slice(i.indexOf(e))}},f=i.length-1;f>=0;f--){var v=h(i[f],s[f],l);if(null!=v)return v;if(!0===t.isPropagationStopped())return}if(c)for(var R=0;R<i.length;R++){var S=h(i[R],s[R],u);if(null!=S)return S;if(!0===t.isPropagationStopped())return}else{var b=i[0],T=s[0];if(n.target===T)return h(b,T,u)}}}function N(e,n){var t=S,o=t.id,i=t.node,s=n.id,l=n.node,u=C(s),c=u.onResponderGrant,p=u.onResponderReject;if(e.bubbles=!1,e.cancelable=!1,e.currentTarget=l,null==o)null!=c&&(e.currentTarget=l,e.dispatchConfig.registrationName='onResponderGrant',c(e)),T(n);else{var h=C(o),f=h.onResponderTerminate,v=h.onResponderTerminationRequest,R=!0;null!=v&&(e.currentTarget=i,e.dispatchConfig.registrationName='onResponderTerminationRequest',!1===v(e)&&(R=!1)),R?(null!=f&&(e.currentTarget=i,e.dispatchConfig.registrationName='onResponderTerminate',f(e)),null!=c&&(e.currentTarget=l,e.dispatchConfig.registrationName='onResponderGrant',c(e)),T(n)):null!=p&&(e.currentTarget=l,e.dispatchConfig.registrationName='onResponderReject',p(e))}}var _=['blur','scroll'],E=['mousedown','mousemove','mouseup','dragstart','touchstart','touchmove','touchend','touchcancel','contextmenu','select','selectionchange'];
316function M(){var e=S,t=e.id,o=e.node;if(null!=t&&null!=o){var i=C(t).onResponderTerminate;if(null!=i){var s=(0,n.default)({},b);s.currentTarget=o,i(s)}T(h)}v=!1,R=0}},245,[246,247,248,250,39]);
317__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},u=()=>{},o={},c=[];function l(e){return e>20?e%20:e}function f(e,t){var f,p,s,v=!1,y=e.changedTouches,h=e.type,X=!0===e.metaKey,Y=!0===e.shiftKey,P=y&&y[0].force||0,b=l(y&&y[0].identifier||0),T=y&&y[0].clientX||e.clientX,K=y&&y[0].clientY||e.clientY,_=y&&y[0].pageX||e.pageX,D=y&&y[0].pageY||e.pageY,S='function'==typeof e.preventDefault?e.preventDefault.bind(e):u,j=e.timeStamp;function H(e){return Array.prototype.slice.call(e).map(e=>({force:e.force,identifier:l(e.identifier),get locationX(){return A(e.clientX)},get locationY(){return C(e.clientY)},pageX:e.pageX,pageY:e.pageY,target:e.target,timestamp:j}))}if(null!=y)p=H(y),s=H(e.touches);else{var M=[{force:P,identifier:b,get locationX(){return A(T)},get locationY(){return C(K)},pageX:_,pageY:D,target:e.target,timestamp:j}];p=M,s='mouseup'===h||'dragstart'===h?c:M}var O={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:o,eventPhase:e.eventPhase,isDefaultPrevented:()=>e.defaultPrevented,isPropagationStopped:()=>v,isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:X,shiftKey:Y,changedTouches:p,force:P,identifier:b,get locationX(){return A(T)},get locationY(){return C(K)},pageX:_,pageY:D,target:e.target,timestamp:j,touches:s,type:h},persist:u,preventDefault:S,stopPropagation(){v=!0},target:e.target,timeStamp:j,touchHistory:t.touchHistory};function A(e){if(f=f||(0,n.default)(O.currentTarget))return e-f.left}function C(e){if(f=f||(0,n.default)(O.currentTarget))return e-f.top}return O}},246,[236]);
318__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"BLUR",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"CONTEXT_MENU",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"FOCUS_OUT",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"MOUSE_DOWN",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"MOUSE_MOVE",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"MOUSE_UP",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"MOUSE_CANCEL",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"TOUCH_START",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"TOUCH_MOVE",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"TOUCH_END",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"TOUCH_CANCEL",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"SCROLL",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"SELECT",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"SELECTION_CHANGE",{enumerable:!0,get:function(){return P}}),e.isStartish=function(t){return t===b||t===o},e.isMoveish=function(t){return t===l||t===c},e.isEndish=function(t){return t===s||t===f||j(t)},e.isCancelish=j,e.isScroll=function(t){return t===p},e.isSelectionChange=function(t){return t===C||t===P};var t='blur',n='contextmenu',u='focusout',o='mousedown',c='mousemove',f='mouseup',O='dragstart',b='touchstart',l='touchmove',s='touchend',E='touchcancel',p='scroll',C='select',P='selectionchange';function j(t){return t===E||t===O}},247,[]);
319__d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.setResponderId=function(e,t){null!=e&&(e[o]=t)},_e.getResponderPaths=function(e){for(var t=[],n=[],o=u(e),l=0;l<o.length;l++){var i=o[l],s=c(i);null!=s&&(t.push(s),n.push(i))}return{idPath:t,nodePath:n}},_e.getLowestCommonAncestor=function(e,t){var n=e.length,o=t.length;if(0===n||0===o||e[n-1]!==t[o-1])return null;var u=e[0],l=0,c=t[0],i=0;n-o>0&&(u=e[l=n-o],n=o);o-n>0&&(c=t[i=o-n],o=n);var s=n;for(;s--;){if(u===c)return u;u=e[l++],c=t[i++]}return null},_e.hasTargetTouches=function(e,t){if(!t||0===t.length)return!1;for(var n=0;n<t.length;n++){var o=t[n].target;if(null!=o&&e.contains(o))return!0}return!1},_e.hasValidSelection=function(e){if('selectionchange'===e.type)return(0,n.default)();return'select'===e.type},_e.isPrimaryPointerDown=function(e){var t=e.altKey,n=e.button,o=e.buttons,u=e.ctrlKey,l=e.type,c='mousedown'===l&&(0===n||1===o),i='mousemove'===l&&1===o,s=!1===t&&!1===u;if('touchstart'===l||'touchmove'===l||c&&s||i&&s)return!0;return!1};
319var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},o='__reactResponderId';function u(e){return'selectionchange'===e.type?l(window.getSelection().anchorNode):null!=e.composedPath?e.composedPath():l(e.target)}function l(e){for(var t=[];null!=e&&e!==document.body;)t.push(e),e=e.parentNode;return t}function c(e){return null!=e?e[o]:null}},248,[249]);
320__d(function(g,r,i,a,m,e,d){"use strict";function n(){var n=window.getSelection(),o=n.toString(),t=n.anchorNode,u=n.focusNode,c=t&&t.nodeType===window.Node.TEXT_NODE||u&&u.nodeType===window.Node.TEXT_NODE;return o.length>=1&&'\n'!==o&&c}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}})},249,[]);
321__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ResponderTouchHistoryStore",{enumerable:!0,get:function(){return T}});var t=r(d[0]);function n(t){return t.timeStamp||t.timestamp}function i(t){return{touchActive:!0,startPageX:t.pageX,startPageY:t.pageY,startTimeStamp:n(t),currentPageX:t.pageX,currentPageY:t.pageY,currentTimeStamp:n(t),previousPageX:t.pageX,previousPageY:t.pageY,previousTimeStamp:n(t)}}function c(t,i){t.touchActive=!0,t.startPageX=i.pageX,t.startPageY=i.pageY,t.startTimeStamp=n(i),t.currentPageX=i.pageX,t.currentPageY=i.pageY,t.currentTimeStamp=n(i),t.previousPageX=i.pageX,t.previousPageY=i.pageY,t.previousTimeStamp=n(i)}function o(t){var n=t.identifier;return null==n&&console.error('Touch object is missing identifier.'),n}function u(t,u){var s=o(t),h=u.touchBank[s];h?c(h,t):u.touchBank[s]=i(t),u.mostRecentTimeStamp=n(t)}function s(t,i){var c=i.touchBank[o(t)];c?(c.touchActive=!0,c.previousPageX=c.currentPageX,c.previousPageY=c.currentPageY,c.previousTimeStamp=c.currentTimeStamp,c.currentPageX=t.pageX,c.currentPageY=t.pageY,c.currentTimeStamp=n(t),i.mostRecentTimeStamp=n(t)):console.warn('Cannot record touch move without a touch start.\n',"Touch Move: "+p(t)+"\n","Touch Bank: "+v(i))}function h(t,i){var c=i.touchBank[o(t)];c?(c.touchActive=!1,c.previousPageX=c.currentPageX,c.previousPageY=c.currentPageY,c.previousTimeStamp=c.currentTimeStamp,c.currentPageX=t.pageX,c.currentPageY=t.pageY,c.currentTimeStamp=n(t),i.mostRecentTimeStamp=n(t)):console.warn('Cannot record touch end without a touch start.\n',"Touch End: "+p(t)+"\n","Touch Bank: "+v(i))}function p(t){return JSON.stringify({identifier:t.identifier,pageX:t.pageX,pageY:t.pageY,timestamp:n(t)})}function v(t){var n=t.touchBank,i=JSON.stringify(n.slice(0,20));return n.length>20&&(i+=' (original size: '+n.length+')'),i}class T{constructor(){this._touchHistory={touchBank:[],numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0}}recordTouchTrack(n,i){var c=this._touchHistory;if((0,t.isMoveish)(n))i.changedTouches.forEach(t=>s(t,c));else if((0,t.isStartish)(n))i.changedTouches.forEach(t=>u(t,c)),c.numberActiveTouches=i.touches.length,1===c.numberActiveTouches&&(c.indexOfSingleActiveTouch=i.touches[0].identifier);else if((0,t.isEndish)(n)&&(i.changedTouches.forEach(t=>h(t,c)),c.numberActiveTouches=i.touches.length,1===c.numberActiveTouches))for(var o=c.touchBank,p=0;p<o.length;p++){var v=o[p];if(null!=v&&v.touchActive){c.indexOfSingleActiveTouch=p;break}}}get touchHistory(){return this._touchHistory}}},250,[247]);
322__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=(0,r(d[0]).createContext)(!1)},251,[34]);
323__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useLinkProps=function({screen:s,params:u,href:c,action:l}){const f=t.useContext(e.NavigationContainerRefContext),p=t.useContext(e.NavigationHelpersContext),{options:d}=t.useContext(n.LinkingContext),v=d?.getPathFromState??e.getPathFromState;return{href:c??(null!=s?v({routes:[{name:s,params:u,state:o(u)}]},d?.config):void 0),role:'link',onPress:e=>{let t=!1;if(e){const n='metaKey'in e&&e.metaKey||'altKey'in e&&e.altKey||'ctrlKey'in e&&e.ctrlKey||'shiftKey'in e&&e.shiftKey,o=!('button'in e)||null==e.button||0===e.button,s=!e.currentTarget||!('target'in e.currentTarget)||[void 0,null,'','self'].includes(e.currentTarget.target);!n&&o&&s&&(e.preventDefault?.(),t=!0)}else e?.preventDefault?.(),t=!0;if(t)if(l)if(p)p.dispatch(l);else{if(!f)throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");f.dispatch(l)}else p?.navigate(s,u)}}};
323var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1]));r(_d[2]);var n=r(_d[3]);const o=e=>e?.state?e.state:e?.screen?{routes:[{name:e.screen,params:e.params,state:e.screen?o(e.params):void 0}]}:void 0},252,[110,34,95,210]);
324__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ServerContainer",{enumerable:!0,get:function(){return c}});var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2]),o=r(_d[3]);const c=t.forwardRef(function({children:c,location:u},f){t.useEffect(()=>{console.error("'ServerContainer' should only be used on the server with 'react-dom/server' for SSR.")},[]);const s={};if(f){const e={getCurrentOptions:()=>s.options};'function'==typeof f?f(e):f.current=e}return(0,o.jsx)(n.ServerContext.Provider,{value:{location:u},children:(0,o.jsx)(e.CurrentRenderContext.Provider,{value:s,children:c})})})},253,[110,34,219,104]);
325__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DarkTheme",{enumerable:!0,get:function(){return t}});const t={dark:!0,colors:{primary:'rgb(10, 132, 255)',background:'rgb(1, 1, 1)',card:'rgb(18, 18, 18)',text:'rgb(229, 229, 231)',border:'rgb(39, 39, 41)',notification:'rgb(255, 69, 58)'},fonts:r(d[0]).fonts}},254,[213]);
326__d(function(g,r,i,a,m,e,d){},255,[]);
327__d(function(g,_r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useBuildHref=r,Object.defineProperty(_e,"useBuildAction",{enumerable:!0,get:function(){return o}}),_e.useLinkBuilder=function(){const t=r(),e=o();return{buildHref:t,buildAction:e}};var t=_r(_d[0]),e=(function(t){if(t&&t.__esModule)return t;var e={};return t&&Object.keys(t).forEach(function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}),e.default=t,e})(_r(_d[1])),n=_r(_d[2]);function r(){const r=e.useContext(t.NavigationHelpersContext),o=e.useContext(t.NavigationRouteContext),{options:u}=e.useContext(n.LinkingContext),s=(0,t.useStateForPath)(),c=u?.getPathFromState??t.getPathFromState;return e.useCallback((e,n)=>{if(!1===u?.enabled)return;const f=!!(r&&o?.key&&s)&&(o.key===(0,t.findFocusedRoute)(s)?.key&&r.getState().routes.some(t=>t.key===o.key)),l={routes:[{name:e,params:n}]},d=t=>{if(t){const e=t.routes[0];return f&&!e.state?l:{routes:[Object.assign({},e,{state:d(e.state)})]}}return l},b=d(s);return c(b,u?.config)},[u?.enabled,u?.config,o?.key,r,s,c])}const o=()=>{const{options:r}=e.useContext(n.LinkingContext),o=r?.getStateFromPath??t.getStateFromPath,u=r?.getActionFromState??t.getActionFromState;return e.useCallback(e=>{if(!e.startsWith('/'))throw new Error(`The href must start with '/' (${e}).`);const n=o(e,r?.config);if(n){return u(n,r?.config)??t.CommonActions.reset(n)}throw new Error('Failed to parse the href to a navigation state.')},[r?.config,o,u])}},256,[110,34,210]);
328__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useLinkTo=function(){const o=t.useContext(e.NavigationContainerRefContext),u=(0,n.useBuildAction)();return t.useCallback(e=>{if(void 0===o)throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");const t=u(e);o.dispatch(t)},[u,o])};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2])},257,[110,34,256]);
329__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useLocale=function(){const n=e.useContext(t.LocaleDirContext);if(void 0===n)throw new Error("Couldn't determine the text direction. Is your component inside NavigationContainer?");return{direction:n}};
329var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},258,[34,211]);
330__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useRoutePath=function(){const{options:o}=t.useContext(n.LinkingContext),u=(0,e.useStateForPath)();if(void 0===u)throw new Error("Couldn't find a state for the route object. Is your component inside a screen in a navigator?");const c=o?.getPathFromState??e.getPathFromState;return t.useMemo(()=>{if(!1===o?.enabled)return;return c(u,o?.config)},[o?.enabled,o?.config,u,c])};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),n=r(_d[2])},259,[110,34,210]);
331__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useScrollToTop=function(n){const c=t.useContext(e.NavigationContext),l=(0,e.useRoute)();if(void 0===c)throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");t.useEffect(()=>{const e=[];let t=c;for(;t;)'tab'===t.getState().type&&e.push(t),t=t.getParent();if(0===e.length)return;const s=e.map(t=>t.addListener('tabPress',t=>{const s=c.isFocused(),u=e.includes(c)||c.getState().routes[0].key===l.key;requestAnimationFrame(()=>{const e=o(n);s&&u&&e&&!t.defaultPrevented&&('scrollToTop'in e?e.scrollToTop():'scrollTo'in e?e.scrollTo({y:0,animated:!0}):'scrollToOffset'in e?e.scrollToOffset({offset:0,animated:!0}):'scrollResponderScrollTo'in e&&e.scrollResponderScrollTo({y:0,animated:!0}))})}));return()=>{s.forEach(e=>e())}},[c,n,l.key])};var e=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[1]));function o(e){return null==e.current?null:'scrollToTop'in e.current||'scrollTo'in e.current||'scrollToOffset'in e.current||'scrollResponderScrollTo'in e.current?e.current:'getScrollResponder'in e.current?e.current.getScrollResponder():'getNode'in e.current?e.current.getNode():e.current}},260,[110,34]);
332__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"createNativeStackNavigator",{enumerable:!0,get:function(){return t.createNativeStackNavigator}}),Object.defineProperty(e,"NativeStackView",{enumerable:!0,get:function(){return n.NativeStackView}}),Object.defineProperty(e,"useAnimatedHeaderHeight",{enumerable:!0,get:function(){return c.useAnimatedHeaderHeight}});var t=r(d[0]),n=r(d[1]),c=r(d[2])},261,[262,263,409]);
333__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["id","initialRouteName","UNSTABLE_routeNamesChangeBehavior","children","layout","screenListeners","screenOptions","screenLayout","UNSTABLE_router"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.createNativeStackNavigator=function(e){return(0,s.createNavigatorFactory)(l)(e)};var t,n=r(_d[0]),o=(t=n)&&t.__esModule?t:{default:t},s=r(_d[1]),c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=r(_d[3]),d=r(_d[4]);function l(t){let{id:n,initialRouteName:l,UNSTABLE_routeNamesChangeBehavior:N,children:v,layout:f,screenListeners:p,screenOptions:y,screenLayout:_,UNSTABLE_router:L}=t,h=(0,o.default)(t,e);const{state:b,describe:B,descriptors:O,navigation:S,NavigationContent:j}=(0,s.useNavigationBuilder)(s.StackRouter,{id:n,initialRouteName:l,UNSTABLE_routeNamesChangeBehavior:N,children:v,layout:f,screenListeners:p,screenOptions:y,screenLayout:_,UNSTABLE_router:L}),A=c.useContext(s.NavigationMetaContext);return c.useEffect(()=>{if(!A||!('type'in A)||'native-tabs'!==A.type)return S?.addListener?.('tabPress',e=>{const t=S.isFocused();requestAnimationFrame(()=>{b.index>
3330&&t&&!e.defaultPrevented&&S.dispatch(Object.assign({},s.StackActions.popToTop(),{target:b.key}))})})},[A,S,b.index,b.key]),(0,d.jsx)(j,{children:(0,d.jsx)(u.NativeStackView,Object.assign({},h,{state:b,navigation:S,descriptors:O,describe:B}))})}},262,[109,107,34,263,104]);
334__d(function(g,r,_i,a,m,_e,_d){"use strict";const e=["header","headerShown","headerBackIcon","headerBackImageSource","headerLeft","headerTransparent","headerBackTitle","presentation","contentStyle"],t=["label"],n=["tintColor","label"];function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NativeStackView=function({state:o,descriptors:c,describe:k}){const j=s.useContext(i.HeaderBackContext),{buildHref:x}=(0,l.useLinkBuilder)(),B=o.preloadedRoutes.reduce((e,t)=>(e[t.key]=e[t.key]||k(t,!0),e),{});return(0,p.jsx)(i.SafeAreaProviderCompat,{children:o.routes.concat(o.preloadedRoutes).map((l,s)=>{const k=o.index===s,C=o.routes[s-1]?.key,H=o.routes[s+1]?.key,S=C?c[C]:void 0,T=H?c[H]:void 0,{options:O,navigation:_,render:w}=c[l.key]??B[l.key],I=S?{title:(0,i.getHeaderTitle)(S.options,S.route.name),href:x(S.route.name,S.route.params)}:j,P=null!=I,{header:M,headerShown:L,headerBackIcon:V,headerBackImageSource:A,headerLeft:E,headerTransparent:R,headerBackTitle:z,presentation:D,contentStyle:F}=O,N=(0,d.default)(O,e),q=T?.options.presentation,G=void 0!==B[l.key]&&void 0===c[l.key];return(0,p.jsx)(i.Screen,{focused:k,route:l,navigation:_,headerShown:L,headerTransparent:R,header:void 0!==M?M({back:I,options:O,route:l,navigation:_}):(0,p.jsx)(i.Header,Object.assign({},N,{back:I,title:(0,i.getHeaderTitle)(O,l.name),headerLeft:'function'==typeof E?e=>{let{label:n}=e,o=(0,d.default)(e,t);return E(Object.assign({},o,{label:z??n}))}:void 0===E&&P?e=>{let{tintColor:t,label:o}=e,l=(0,d.default)(e,n);return(0,p.jsx)(i.HeaderBackButton,Object.assign({},l,{label:z??o,tintColor:t,backImage:void 0!==V||void 0!==A?()=>(0,p.jsx)(u.default,{source:V?.source??A,resizeMode:"contain",tintColor:t,style:y.backImage}):void 0,onPress:_.goBack}))}:E,headerTransparent:R})),style:[h.default.absoluteFill,{display:(k||null!=q&&b.includes(q))&&!G?'flex':'none'},null!=D&&b.includes(D)?{backgroundColor:'transparent'}:null],children:(0,p.jsx)(i.HeaderBackContext.Provider,{value:I,children:(0,p.jsx)(v,{children:(0,p.jsx)(f.default,{style:[y.contentContainer,F],children:w()})})})},l.key)})})};var d=o(r(_d[0])),i=r(_d[1]),l=r(_d[2]),s=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),c=o(r(_d[4])),u=o(r(_d[5])),h=o(r(_d[6])),f=o(r(_d[7])),k=r(_d[8]),p=r(_d[9]);const b=['transparentModal','containedTransparentModal'];const v=({children:e})=>{const t=(0,i.useHeaderHeight)(),[n]=s.useState(()=>new c.default.Value(t));return s.useEffect(()=>{n.setValue(t)},[n,t]),(0,p.jsx)(k.AnimatedHeaderHeightContext.Provider,{value:n,children:e})},y=h.default.create({contentContainer:{flex:1},backImage:{height:24,width:24,margin:3}})},263,[109,264,107,34,271,328,42,276,409,104]);
335__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Background",{enumerable:!0,get:function(){return f.Background}}),Object.defineProperty(_e,"Badge",{enumerable:!0,get:function(){return b.Badge}}),Object.defineProperty(_e,"Button",{enumerable:!0,get:function(){return l.Button}}),Object.defineProperty(_e,"getDefaultSidebarWidth",{enumerable:!0,get:function(){return P.getDefaultSidebarWidth}}),Object.defineProperty(_e,"getDefaultHeaderHeight",{enumerable:!0,get:function(){return p.getDefaultHeaderHeight}}),Object.defineProperty(_e,"getHeaderTitle",{enumerable:!0,get:function(){return y.getHeaderTitle}}),Object.defineProperty(_e,"Header",{enumerable:!0,get:function(){return O.Header}}),Object.defineProperty(_e,"HeaderBackButton",{enumerable:!0,get:function(){return j.HeaderBackButton}}),Object.defineProperty(_e,"HeaderBackContext",{enumerable:!0,get:function(){return H.HeaderBackContext}}
335),Object.defineProperty(_e,"HeaderBackground",{enumerable:!0,get:function(){return s.HeaderBackground}}),Object.defineProperty(_e,"HeaderButton",{enumerable:!0,get:function(){return B.HeaderButton}}),Object.defineProperty(_e,"HeaderHeightContext",{enumerable:!0,get:function(){return h.HeaderHeightContext}}),Object.defineProperty(_e,"HeaderShownContext",{enumerable:!0,get:function(){return S.HeaderShownContext}}),Object.defineProperty(_e,"HeaderTitle",{enumerable:!0,get:function(){return k.HeaderTitle}}),Object.defineProperty(_e,"useHeaderHeight",{enumerable:!0,get:function(){return x.useHeaderHeight}}),Object.defineProperty(_e,"getLabel",{enumerable:!0,get:function(){return C.getLabel}}),Object.defineProperty(_e,"Label",{enumerable:!0,get:function(){return v.Label}}),Object.defineProperty(_e,"Lazy",{enumerable:!0,get:function(){return L.Lazy}}),Object.defineProperty(_e,"MissingIcon",{enumerable:!0,get:function(){return T.MissingIcon}}),Object.defineProperty(_e,"PlatformPressable",{enumerable:!0,get:function(){return _.PlatformPressable}}),Object.defineProperty(_e,"ResourceSavingView",{enumerable:!0,get:function(){return w.ResourceSavingView}}),Object.defineProperty(_e,"SafeAreaProviderCompat",{enumerable:!0,get:function(){return z.SafeAreaProviderCompat}}),Object.defineProperty(_e,"Screen",{enumerable:!0,get:function(){return D.Screen}}),Object.defineProperty(_e,"Text",{enumerable:!0,get:function(){return M.Text}}),Object.defineProperty(_e,"useFrameSize",{enumerable:!0,get:function(){return A.useFrameSize}}),Object.defineProperty(_e,"Assets",{enumerable:!0,get:function(){return I}});var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2])),o=e(r(d[3])),c=e(r(d[4])),f=r(d[5]),b=r(d[6]),l=r(d[7]),P=r(d[8]),p=r(d[9]),y=r(d[10]),O=r(d[11]),j=r(d[12]),H=r(d[13]),s=r(d[14]),B=r(d[15]),h=r(d[16]),S=r(d[17]),k=r(d[18]),x=r(d[19]),C=r(d[20]),v=r(d[21]),L=r(d[22]),T=r(d[23]),_=r(d[24]),w=r(d[25]),z=r(d[26]),D=r(d[27]),M=r(d[28]),A=r(d[29]),F=r(d[30]);Object.keys(F).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return F[e]}})});const I=[t.default,n.default,c.default,o.default,u.default]},264,[265,266,267,268,269,270,358,367,377,378,379,380,388,398,392,390,399,395,397,400,401,402,403,404,368,405,406,407,376,387,408]);
336__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/node_modules/@react-navigation/elements/lib/module/assets/back-icon.35ba0eaec5a4f5ed12ca16fabeae451d.png",width:96,height:96}},265,[]);
337__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/node_modules/@react-navigation/elements/lib/module/assets/back-icon-mask.0a328cd9c1afd0afe8e3b1ec5165b1b4.png",width:50,height:85}},266,[]);
338__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/node_modules/@react-navigation/elements/lib/module/assets/clear-icon.c94f6478e7ae0cdd9f15de1fcb9e5e55.png",width:64,height:64}},267,[]);
339__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/node_modules/@react-navigation/elements/lib/module/assets/close-icon.808e1b1b9b53114ec2838071a7e6daa7.png",width:96,height:96}},268,[]);
340__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/node_modules/@react-navigation/elements/lib/module/assets/search-icon.286d67d3f74808a60a78d3ebf1a5fb57.png",width:96,height:96}},269,[]);
341__d(function(g,r,i,a,m,_e,d){"use strict";const e=["style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Background=function(t){let{style:l}=t,c=(0,u.default)(t,e);const{colors:f}=(0,n.useTheme)();return(0,s.jsx)(o.default.View,Object.assign({},c,{style:[{flex:1,backgroundColor:f.background},l]}))};var u=t(r(d[0])),n=r(d[1]);r(d[2]);var o=t(r(d[3])),s=r(d[4])},270,[109,107,34,271,104]);
342__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},271,[272]);
343__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var t=e(r(d[0])),u=e(r(d[1])),l=e(r(d[2])),f=e(r(d[3])),n=e(r(d[4])),o=e(r(d[5])),c=e(r(d[6])),s=e(r(d[7])),_=e(r(d[8])),b=e(r(d[9])),j=u.default.isTesting?_.default:b.default,p=(0,t.default)({FlatList:l.default,Image:f.default,ScrollView:n.default,SectionList:o.default,Text:c.default,View:s.default},j)},272,[19,95,273,327,332,333,337,338,339,340]);
344__d(function(g,r,i,a,m,_e,_d){"use strict";
344function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(_d[0])),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),u=e(r(_d[2])),f=e(r(_d[3])),o=n.forwardRef((e,f)=>n.createElement(u.default,(0,t.default)({scrollEventThrottle:1e-4},e,{ref:f}))),c=(0,f.default)(o)},273,[27,34,274,307]);
345__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},274,[275]);
346__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return w}});var t=e(r(_d[0])),s=e(r(_d[1])),n=e(r(_d[2])),l=e(r(_d[3])),o=e(r(_d[4])),u=e(r(_d[5]));r(_d[6]);var h=e(r(_d[7])),p=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t})(r(_d[8])),f=e(r(_d[9])),d=r(_d[10]),c=e(r(_d[11])),C=["numColumns","columnWrapperStyle","removeClippedSubviews","strictMode"];function b(e){return null!=e?e:1}function v(e){return'number'==typeof Object(e).length}class _ extends p.PureComponent{scrollToEnd(e){this._listRef&&this._listRef.scrollToEnd(e)}scrollToIndex(e){this._listRef&&this._listRef.scrollToIndex(e)}scrollToItem(e){this._listRef&&this._listRef.scrollToItem(e)}scrollToOffset(e){this._listRef&&this._listRef.scrollToOffset(e)}recordInteraction(){this._listRef&&this._listRef.recordInteraction()}flashScrollIndicators(){this._listRef&&this._listRef.flashScrollIndicators()}getScrollResponder(){if(this._listRef)return this._listRef.getScrollResponder()}getNativeScrollRef(){if(this._listRef)return this._listRef.getScrollRef()}getScrollableNode(){if(this._listRef)return this._listRef.getScrollableNode()}constructor(e){super(e),this._virtualizedListPairs=[],this._captureRef=e=>{this._listRef=e},this._getItem=(e,t)=>{var s=b(this.props.numColumns);if(s>1){for(var n=[],l=0;l<s;l++){var o=t*s+l;if(o<e.length){var u=e[o];n.push(u)}}return n}return e[t]},this._getItemCount=e=>{if(null!=e&&v(e)){var t=b(this.props.numColumns);return t>1?Math.ceil(e.length/t):e.length}return 0},this._keyExtractor=(e,t)=>{var s,n=b(this.props.numColumns),l=null!==(s=this.props.keyExtractor)&&void 0!==s?s:d.keyExtractor;return n>1?((0,h.default)(Array.isArray(e),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",n),e.map((e,s)=>l(e,t*n+s)).join(':')):l(e,t)},this._renderer=(e,t,s,n,o)=>{var u=b(n),f=s=>e?p.createElement(e,s):t?t(s):null,d=e=>{if(u>1){var t=e.item,n=e.index;return(0,h.default)(Array.isArray(t),'Expected array of items with numColumns > 1'),p.createElement(l.default,{style:[y.row,s]},t.map((t,s)=>{var l=f({item:t,index:n*u+s,separators:e.separators});return null!=l?p.createElement(p.Fragment,{key:s},l):null}))}return f(e)};return e?{ListItemComponent:d}:{renderItem:d}},this._memoizedRenderer=(0,c.default)(this._renderer),this._checkProps(this.props),this.props.viewabilityConfigCallbackPairs?this._virtualizedListPairs=this.props.viewabilityConfigCallbackPairs.map(e=>({viewabilityConfig:e.viewabilityConfig,onViewableItemsChanged:this._createOnViewableItemsChanged(e.onViewableItemsChanged)})):this.props.onViewableItemsChanged&&this._virtualizedListPairs.push({viewabilityConfig:this.props.viewabilityConfig,onViewableItemsChanged:this._createOnViewableItemsChanged(this.props.onViewableItemsChanged)})}componentDidUpdate(e){(0,h.default)(e.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),(0,h.default)(e.onViewableItemsChanged===this.props.onViewableItemsChanged,'Changing onViewableItemsChanged on the fly is not supported'),(0,h.default)(!(0,u.default)(e.viewabilityConfig,this.props.viewabilityConfig),'Changing viewabilityConfig on the fly is not supported'),(0,h.default)(e.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,'Changing viewabilityConfigCallbackPairs on the fly is not supported'),this._checkProps(this.props)}_checkProps(e){var t=e.getItem,s=e.getItemCount,n=e.horizontal,l=e.columnWrapperStyle,o=e.onViewableItemsChanged,u=e.viewabilityConfigCallbackPairs,p=b(this.props.numColumns);(0,h.default)(!t&&!s,'FlatList does not support custom data formats.'),p>1?(0,h.default)(!n,'numColumns does not support horizontal.'):(0,h.default)(!l,'columnWrapperStyle not supported for single column lists'),(0,h.default)(!(o&&u),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")}_pushMultiColumnViewable(e,t){var s,l=b(this.props.numColumns),o=null!==(s=this.props.keyExtractor)&&void 0!==s?s:d.keyExtractor;t.item.forEach((s,u)=>{(0,h.default)(null!=t.index,'Missing index!');var p=t.index*l+u;e.push((0,n.default)((0,n.default)({},t),{},{item:s,key:o(s,p),index:p}))})}_createOnViewableItemsChanged(e){return t=>{var s=b(this.props.numColumns);if(e)if(s>1){var n=[],l=[];
346t.viewableItems.forEach(e=>this._pushMultiColumnViewable(l,e)),t.changed.forEach(e=>this._pushMultiColumnViewable(n,e)),e({viewableItems:l,changed:n})}else e(t)}}render(){var e,n=this.props,l=n.numColumns,o=n.columnWrapperStyle,u=n.removeClippedSubviews,h=n.strictMode,d=void 0!==h&&h,c=(0,s.default)(n,C),b=d?this._memoizedRenderer:this._renderer;return p.createElement(f.default,(0,t.default)({},c,{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs,removeClippedSubviews:(e=u,null!=e&&e)},b(this.props.ListItemComponent,this.props.renderItem,o,l,this.props.extraData)))}}var y=o.default.create({row:{flexDirection:'row'}}),w=_},275,[27,43,19,276,42,277,95,24,34,278,304,306]);
347__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var o={};return e&&Object.keys(e).forEach(function(n){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}),o.default=e,o}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return M}});var n=e(r(_d[0])),t=o(r(_d[1])),d=e(r(_d[2])),l=o(r(_d[3])),s=e(r(_d[4])),u=e(r(_d[5])),p=e(r(_d[6])),S=e(r(_d[7])),R=e(r(_d[8])),c=e(r(_d[9])),h=e(r(_d[10])),f=r(_d[11]),v=["hrefAttrs","onLayout","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStart
347ShouldSetResponder","onStartShouldSetResponderCapture"],C=Object.assign({},l.defaultProps,l.accessibilityProps,l.clickProps,l.focusProps,l.keyboardProps,l.mouseProps,l.touchProps,l.styleProps,{href:!0,lang:!0,onScroll:!0,onWheel:!0,pointerEvents:!0}),y=e=>(0,s.default)(e,C),b=t.forwardRef((e,o)=>{var l=e.hrefAttrs,s=e.onLayout,c=e.onMoveShouldSetResponder,C=e.onMoveShouldSetResponderCapture,b=e.onResponderEnd,M=e.onResponderGrant,P=e.onResponderMove,w=e.onResponderReject,_=e.onResponderRelease,j=e.onResponderStart,O=e.onResponderTerminate,k=e.onResponderTerminationRequest,T=e.onScrollShouldSetResponder,D=e.onScrollShouldSetResponderCapture,E=e.onSelectionChangeShouldSetResponder,L=e.onSelectionChangeShouldSetResponderCapture,q=e.onStartShouldSetResponder,A=e.onStartShouldSetResponderCapture,G=(0,n.default)(e,v),z=t.useContext(h.default),I=t.useRef(null),W=(0,f.useLocaleContext)().direction;(0,u.default)(I,s),(0,R.default)(I,{onMoveShouldSetResponder:c,onMoveShouldSetResponderCapture:C,onResponderEnd:b,onResponderGrant:M,onResponderMove:P,onResponderReject:w,onResponderRelease:_,onResponderStart:j,onResponderTerminate:O,onResponderTerminationRequest:k,onScrollShouldSetResponder:T,onScrollShouldSetResponderCapture:D,onSelectionChangeShouldSetResponder:E,onSelectionChangeShouldSetResponderCapture:L,onStartShouldSetResponder:q,onStartShouldSetResponderCapture:A});var $='div',B=null!=e.lang?(0,f.getLocaleDirection)(e.lang):null,H=e.dir||B,N=H||W,V=y(G);if(V.dir=H,V.style=[x.view$raw,z&&x.inline,e.style],null!=e.href&&($='a',null!=l)){var F=l.download,J=l.rel,K=l.target;null!=F&&(V.download=F),null!=J&&(V.rel=J),'string'==typeof K&&(V.target='_'!==K.charAt(0)?'_'+K:K)}var Q=(0,S.default)(V),U=(0,p.default)(I,Q,o);return V.ref=U,(0,d.default)($,V,{writingDirection:N})});b.displayName='View';var x=c.default.create({view$raw:{alignContent:'flex-start',alignItems:'stretch',backgroundColor:'transparent',border:'0 solid black',boxSizing:'border-box',display:'flex',flexBasis:'auto',flexDirection:'column',flexShrink:0,listStyle:'none',margin:0,minHeight:0,minWidth:0,padding:0,position:'relative',textDecoration:'none',zIndex:0},inline:{display:'inline-flex'}}),M=b},276,[43,34,223,231,232,233,240,242,244,42,251,229]);
348__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=function t(n,f,u){if(void 0===u&&(u=-1),0===u)return!0;if(n===f)return!1;if('function'==typeof n&&'function'==typeof f)return!1;if('object'!=typeof n||null===n)return n!==f;if('object'!=typeof f||null===f)return!0;if(n.constructor!==f.constructor)return!0;if(Array.isArray(n)){var o=n.length;if(f.length!==o)return!0;for(var c=0;c<o;c++)if(t(n[c],f[c],u-1))return!0}else{for(var l in n)if(t(n[l],f[l],u-1))return!0;for(var v in f)if(void 0===n[v]&&void 0!==f[v])return!0}return!1}},277,[]);
349__d(function(g,_r,_i3,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return A}});var t=e(_r(_d[0])),s=e(_r(_d[1])),r=e(_r(_d[2])),i=e(_r(_d[3])),o=e(_r(_d[4])),l=e(_r(_d[5])),n=e(_r(_d[6])),h=e(_r(_d[7])),d=e(_r(_d[8])),c=e(_r(_d[9])),u=_r(_d[10]),p=e(_r(_d[11])),f=e(_r(_d[12])),_=e(_r(_d[13])),v=e(_r(_d[14])),y=e(_r(_d[15])),C=_r(_d[16]),L=_r(_d[17]),b=e(_r(_d[18])),S=e(_r(_d[19])),M=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t})(_r(_d[20])),I=!1,R='';function w(e){return null!=e&&e}function x(e){return null!=e?e:10}function E(e){return null!=e?e:2}function T(e){return null!=e?e:2}function F(e,t){return e*t/2}function V(e){return null!=e?e:21}function k(e,t){for(var s=e.length-1;s>=0;s--)if(t(e[s]))return e[s];return null}class O extends _.default{scrollToEnd(e){var t=!e||e.animated,s=this.props.getItemCount(this.props.data)-1;if(!(s<0)){var r=this.__getFrameMetricsApprox(s,this.props),i=Math.max(0,r.offset+r.length+this._footerLength-this._scrollMetrics.visibleLength);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(w(this.props.horizontal)?{x:i,animated:t}:{y:i,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))}}scrollToIndex(e){var t=this.props,s=t.data,r=t.horizontal,i=t.getItemCount,o=t.getItemLayout,l=t.onScrollToIndexFailed,n=e.animated,h=e.index,d=e.viewOffset,c=e.viewPosition;if((0,b.default)(h>=0,"scrollToIndex out of range: requested index "+h+" but minimum is 0"),(0,b.default)(i(s)>=1,"scrollToIndex out of range: item length "+i(s)+" but minimum is 1"),(0,b.default)(h<i(s),"scrollToIndex out of range: requested index "+h+" is out of 0 to "+(i(s)-1)),!o&&h>this._highestMeasuredFrameIndex)return(0,b.default)(!!l,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void l({averageItemLength:this._averageCellLength,highestMeasuredFrameIndex:this._highestMeasuredFrameIndex,index:h});var u=this.__getFrameMetricsApprox(Math.floor(h),this.props),p=Math.max(0,this._getOffsetApprox(h,this.props)-(c||0)*(this._scrollMetrics.visibleLength-u.length))-(d||0);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(r?{x:p,animated:n}:{y:p,animated:n}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))}scrollToItem(e){for(var t=e.item,s=this.props,i=s.data,o=s.getItem,l=(0,s.getItemCount)(i),n=0;n<l;n++)if(o(i,n)===t){this.scrollToIndex((0,r.default)((0,r.default)({},e),{},{index:n}));break}}scrollToOffset(e){var t=e.animated,s=e.offset;null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(w(this.props.horizontal)?{x:s,animated:t}:{y:s,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))}
349recordInteraction(){this._nestedChildLists.forEach(e=>{e.recordInteraction()}),this._viewabilityTuples.forEach(e=>{e.viewabilityHelper.recordInteraction()}),this._updateViewableItems(this.props,this.state.cellsAroundViewport)}flashScrollIndicators(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()}getScrollResponder(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()}getScrollableNode(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():this._scrollRef}getScrollRef(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef}_getCellKey(){var e;return(null==(e=this.context)?void 0:e.cellKey)||'rootList'}hasMore(){return this._hasMore}constructor(e){var t;if(super(e),this._getScrollMetrics=()=>this._scrollMetrics,this._getOutermostParentListRef=()=>this._isNestedWithSameOrientation()?this.context.getOutermostParentListRef():this,this._registerAsNestedChild=e=>{this._nestedChildLists.add(e.ref,e.cellKey),this._hasInteracted&&e.ref.recordInteraction()},this._unregisterAsNestedChild=e=>{this._nestedChildLists.remove(e.ref)},this._onUpdateSeparators=(e,t)=>{e.forEach(e=>{var s=null!=e&&this._cellRefs[e];s&&s.updateSeparatorProps(t)})},this._getSpacerKey=e=>e?'height':'width',this._averageCellLength=0,this._cellRefs={},this._frames={},this._footerLength=0,this._hasTriggeredInitialScrollToIndex=!1,this._hasInteracted=!1,this._hasMore=!1,this._hasWarned={},this._headerLength=0,this._hiPriInProgress=!1,this._highestMeasuredFrameIndex=0,this._indicesToKeys=new Map,this._lastFocusedCellKey=null,this._nestedChildLists=new p.default,this._offsetFromParentVirtualizedList=0,this._prevParentOffset=0,this._scrollMetrics={contentLength:0,dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0,zoomScale:1},this._scrollRef=null,this._sentStartForContentLength=0,this._sentEndForContentLength=0,this._totalCellLength=0,this._totalCellsMeasured=0,this._viewabilityTuples=[],this._captureScrollRef=e=>{this._scrollRef=e},this._defaultRenderScrollComponent=e=>{var t,r=e.onRefresh;return this._isNestedWithSameOrientation()?M.createElement(l.default,e):r?((0,b.default)('boolean'==typeof e.refreshing,'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(null!==(t=e.refreshing)&&void 0!==t?t:'undefined')+'`'),M.createElement(o.default,(0,s.default)({},e,{refreshControl:null==e.refreshControl?M.createElement(i.default,{refreshing:e.refreshing,onRefresh:r,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):M.createElement(o.default,e)},this._onCellLayout=(e,t,s)=>{var r=e.nativeEvent.layout,i={offset:this._selectOffset(r),length:this._selectLength(r),index:s,inLayout:!0},o=this._frames[t];o&&i.offset===o.offset&&i.length===o.length&&s===o.index?this._frames[t].inLayout=!0:(this._totalCellLength+=i.length-(o?o.length:0),this._totalCellsMeasured+=o?0:1,this._averageCellLength=this._totalCellLength/this._totalCellsMeasured,this._frames[t]=i,this._highestMeasuredFrameIndex=Math.max(this._highestMeasuredFrameIndex,s),this._scheduleCellsToRenderUpdate()),this._triggerRemeasureForChildListsInCell(t),this._computeBlankness(),this._updateViewableItems(this.props,this.state.cellsAroundViewport)},this._onCellUnmount=e=>{delete this._cellRefs[e];var t=this._frames[e];t&&(this._frames[e]=(0,r.default)((0,r.default)({},t),{},{inLayout:!1}))},this._onLayout=e=>{this._isNestedWithSameOrientation()?this.measureLayoutRelativeToContainingList():this._scrollMetrics.visibleLength=this._selectLength(e.nativeEvent.layout),this.props.onLayout&&this.props.onLayout(e),this._scheduleCellsToRenderUpdate(),this._maybeCallOnEdgeReached()},this._onLayoutEmpty=e=>{this.props.onLayout&&this.props.onLayout(e)},this._onLayoutFooter=e=>{this._triggerRemeasureForChildListsInCell(this._getFooterCellKey()),this._footerLength=this._selectLength(e.nativeEvent.layout)},this._onLayoutHeader=e=>{this._headerLength=this._selectLength(e.nativeEvent.layout)},this._onContentSizeChange=(e,t)=>
349{e>0&&t>0&&null!=this.props.initialScrollIndex&&this.props.initialScrollIndex>0&&!this._hasTriggeredInitialScrollToIndex&&(null==this.props.contentOffset&&(this.props.initialScrollIndex<this.props.getItemCount(this.props.data)?this.scrollToIndex({animated:!1,index:(0,S.default)(this.props.initialScrollIndex)}):this.scrollToEnd({animated:!1})),this._hasTriggeredInitialScrollToIndex=!0),this.props.onContentSizeChange&&this.props.onContentSizeChange(e,t),this._scrollMetrics.contentLength=this._selectLength({height:t,width:e}),this._scheduleCellsToRenderUpdate(),this._maybeCallOnEdgeReached()},this._convertParentScrollMetrics=e=>{var t=e.offset-this._offsetFromParentVirtualizedList,s=e.visibleLength,r=t-this._scrollMetrics.offset;return{visibleLength:s,contentLength:this._scrollMetrics.contentLength,offset:t,dOffset:r}},this._onScroll=e=>{this._nestedChildLists.forEach(t=>{t._onScroll(e)}),this.props.onScroll&&this.props.onScroll(e);var t=e.timeStamp,s=this._selectLength(e.nativeEvent.layoutMeasurement),r=this._selectLength(e.nativeEvent.contentSize),i=this._selectOffset(e.nativeEvent.contentOffset),o=i-this._scrollMetrics.offset;if(this._isNestedWithSameOrientation()){if(0===this._scrollMetrics.contentLength)return;var l=this._convertParentScrollMetrics({visibleLength:s,offset:i});s=l.visibleLength,r=l.contentLength,i=l.offset,o=l.dOffset}var n=this._scrollMetrics.timestamp?Math.max(1,t-this._scrollMetrics.timestamp):1,h=o/n;n>500&&this._scrollMetrics.dt>500&&r>5*s&&!this._hasWarned.perf&&((0,c.default)("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:n,prevDt:this._scrollMetrics.dt,contentLength:r}),this._hasWarned.perf=!0);var d=e.nativeEvent.zoomScale<0?1:e.nativeEvent.zoomScale;this._scrollMetrics={contentLength:r,dt:n,dOffset:o,offset:i,timestamp:t,velocity:h,visibleLength:s,zoomScale:d},this._updateViewableItems(this.props,this.state.cellsAroundViewport),this.props&&(this._maybeCallOnEdgeReached(),0!==h&&this._fillRateHelper.activate(),this._computeBlankness(),this._scheduleCellsToRenderUpdate())},this._onScrollBeginDrag=e=>{this._nestedChildLists.forEach(t=>{t._onScrollBeginDrag(e)}),this._viewabilityTuples.forEach(e=>{e.viewabilityHelper.recordInteraction()}),this._hasInteracted=!0,this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},this._onScrollEndDrag=e=>{this._nestedChildLists.forEach(t=>{t._onScrollEndDrag(e)});var t=e.nativeEvent.velocity;t&&(this._scrollMetrics.velocity=this._selectOffset(t)),this._computeBlankness(),this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},this._onMomentumScrollBegin=e=>{this._nestedChildLists.forEach(t=>{t._onMomentumScrollBegin(e)}),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},this._onMomentumScrollEnd=e=>{this._nestedChildLists.forEach(t=>{t._onMomentumScrollEnd(e)}),this._scrollMetrics.velocity=0,this._computeBlankness(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},this._updateCellsToRender=()=>{this._updateViewableItems(this.props,this.state.cellsAroundViewport),this.setState((e,t)=>{var s=this._adjustCellsAroundViewport(t,e.cellsAroundViewport),r=O._createRenderMask(t,s,this._getNonViewportRenderRegions(t));return s.first===e.cellsAroundViewport.first&&s.last===e.cellsAroundViewport.last&&r.equals(e.renderMask)?null:{cellsAroundViewport:s,renderMask:r}})},this._createViewToken=(e,t,s)=>{var r=s.data,i=(0,s.getItem)(r,e);return{index:e,item:i,key:this._keyExtractor(i,e,s),isViewable:t}},this._getOffsetApprox=(e,t)=>{if(Number.isInteger(e))return this.__getFrameMetricsApprox(e,t).offset;var s=this.__getFrameMetricsApprox(Math.floor(e),t),r=e-Math.floor(e);return s.offset+r*s.length},this.__getFrameMetricsApprox=(e,t)=>{var s=this._getFrameMetrics(e,t);if(s&&s.index===e)return s;var r=t.data,i=t.getItemCount,o=t.getItemLayout;return(0,b.default)(e>=0&&e<i(r),'Tried to get frame for out of range index '+e),(0,b.default)(!o,'Should not have to estimate frames when a measurement metrics function is provided'),{length:this._averageCellLength,offset:this._averageCellLength*e}},this._getFrameMetrics=(e,t)=>{var s=t.data,r=t.getItem,i=t.getItemCount,o=t.getItemLayout;(0,b.default)(e>=0&&e<i(s),'Tried to get frame for out of range index '+e);var l=r(s,e),n=this._frames[this._keyExtractor(l,e,t)];return n&&n.index===e||!o?n:o(s,e)},this._getNonViewportRenderRegions=e=>{if(!this._lastFocusedCellKey||!this._cellRefs[this._lastFocusedCellKey])return[];var t=this._cellRefs[this._lastFocusedCellKey].props.index,s=e.getItemCount(e.data);if(t>=s||this._keyExtractor(e.getItem(e.data,t),t,e)!==this._lastFocusedCellKey)return[];for(var r=t,i=0,o=r-1;o>=0&&i<this._scrollMetrics.visibleLength;o--)r--,i+=this.__getFrameMetricsApprox(o,e).length;for(var l=t,n=0,h=l+1;h<s&&n<this._scrollMetrics.visibleLength;h++)l++,n+=this.__getFrameMetricsApprox(h,e).length;return[{first:r,last:l}]},this._checkProps(e),this._fillRateHelper=new f.default(this._getFrameMetrics),this._updateCellsToRenderBatcher=new h.default(this._updateCellsToRender,null!==(t=this.props.updateCellsBatchingPerio
349d)&&void 0!==t?t:50),this.props.viewabilityConfigCallbackPairs)this._viewabilityTuples=this.props.viewabilityConfigCallbackPairs.map(e=>({viewabilityHelper:new v.default(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}));else{var n=this.props,d=n.onViewableItemsChanged,u=n.viewabilityConfig;d&&this._viewabilityTuples.push({viewabilityHelper:new v.default(u),onViewableItemsChanged:d})}var _=O._initialRenderRegion(e);this.state={cellsAroundViewport:_,renderMask:O._createRenderMask(e,_)},this.invertedWheelEventHandler=e=>{var t=this.props.horizontal?e.target.scrollLeft:e.target.scrollTop,s=this.props.horizontal?e.target.scrollWidth:e.target.scrollHeight,r=this.props.horizontal?e.target.clientWidth:e.target.clientHeight,i=s>r,o=this.props.horizontal?e.deltaX||e.wheelDeltaX:e.deltaY||e.wheelDeltaY,l=o;i&&(l=o<0?Math.min(o+t,0):Math.max(o-(s-r-t),0));var n=o-l;if(this.props.inverted&&this._scrollRef&&this._scrollRef.getScrollableNode){var h=this._scrollRef.getScrollableNode();if(this.props.horizontal){e.target.scrollLeft+=n;var d=h.scrollLeft-l;h.scrollLeft=this.props.getItemLayout?d:Math.min(d,this._totalCellLength)}else{e.target.scrollTop+=n;var c=h.scrollTop-l;h.scrollTop=this.props.getItemLayout?c:Math.min(c,this._totalCellLength)}e.preventDefault()}}}_checkProps(e){var t=e.onScroll,s=e.windowSize,r=e.getItemCount,i=e.data,o=e.initialScrollIndex;(0,b.default)(!t||!t.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),(0,b.default)(V(s)>0,'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.'),(0,b.default)(r,'VirtualizedList: The "getItemCount" prop must be provided');var l=r(i);null==o||this._hasTriggeredInitialScrollToIndex||!(o<0||l>0&&o>=l)||this._hasWarned.initialScrollIndex||(console.warn("initialScrollIndex \""+o+"\" is not valid (list has "+l+" items)"),this._hasWarned.initialScrollIndex=!0)}static _createRenderMask(e,t,s){var r=e.getItemCount(e.data);(0,b.default)(t.first>=0&&t.last>=t.first-1&&t.last<r,"Invalid cells around viewport \"["+t.first+", "+t.last+"]\" was passed to VirtualizedList._createRenderMask");var i=new u.CellRenderMask(r);if(r>0){for(var o=0,l=[t,...null!=s?s:[]];o<l.length;o++){var n=l[o];i.addCells(n)}if(null==e.initialScrollIndex||e.initialScrollIndex<=0){var h=O._initialRenderRegion(e);i.addCells(h)}var d=new Set(e.stickyHeaderIndices);O._ensureClosestStickyHeader(e,d,i,t.first)}return i}static _initialRenderRegion(e){var t,s,r=e.getItemCount(e.data),i=Math.max(0,Math.min(r-1,Math.floor(null!==(t=e.initialScrollIndex)&&void 0!==t?t:0)));return{first:i,last:Math.min(r,i+(null!=(s=e.initialNumToRender)?s:10))-1}}static _ensureClosestStickyHeader(e,t,s,r){for(var i=e.ListHeaderComponent?1:0,o=r-1;o>=0;o--)if(t.has(o+i)){s.addCells({first:o,last:o});break}}_adjustCellsAroundViewport(e,t){var s,r=e.data,i=e.getItemCount,o=T(e.onEndReachedThreshold),l=this._scrollMetrics,n=l.contentLength,h=l.offset,d=l.visibleLength,c=n-d-h;if(d<=0||n<=0)return t.last>=i(r)?O._constrainToItemCount(t,e):t;if(e.disableVirtualization){var u=c<o*d?x(e.maxToRenderPerBatch):0;s={first:0,last:Math.min(t.last+u,i(r)-1)}}else{if(e.initialScrollIndex&&!this._scrollMetrics.offset&&Math.abs(c)>=Number.EPSILON)return t.last>=i(r)?O._constrainToItemCount(t,e):t;s=(0,L.computeWindowedRenderLimits)(e,x(e.maxToRenderPerBatch),V(e.windowSize),t,this.__getFrameMetricsApprox,this._scrollMetrics),(0,b.default)(s.last<i(r),'computeWindowedRenderLimits() should return range in-bounds')}if(this._nestedChildLists.size()>0){var p=this._findFirstChildWithMore(s.first,s.last);s.last=null!=p?p:s.last}return s}_findFirstChildWithMore(e,t){for(var s=e;s<=t;s++){var r=this._indicesToKeys.get(s);if(null!=r&&this._nestedChildLists.anyInCell(r,e=>e.hasMore()))return s}return null}componentDidMount(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({ref:this,cellKey:this.context.cellKey}),this.setupWebWheelHandler()}componentWillUnmount(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({ref:this}),this._updateCellsToRenderBatcher.dispose({abort:!0}
349),this._viewabilityTuples.forEach(e=>{e.viewabilityHelper.dispose()}),this._fillRateHelper.deactivateAndFlush(),this.teardownWebWheelHandler()}setupWebWheelHandler(){this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode().addEventListener('wheel',this.invertedWheelEventHandler):setTimeout(()=>this.setupWebWheelHandler(),50)}teardownWebWheelHandler(){this._scrollRef&&this._scrollRef.getScrollableNode&&this._scrollRef.getScrollableNode().removeEventListener('wheel',this.invertedWheelEventHandler)}static getDerivedStateFromProps(e,t){if(e.getItemCount(e.data)===t.renderMask.numCells())return t;var s=O._constrainToItemCount(t.cellsAroundViewport,e);return{cellsAroundViewport:s,renderMask:O._createRenderMask(e,s)}}_pushCells(e,t,r,i,o,l){var n,h=this,d=this.props,c=d.CellRendererComponent,u=d.ItemSeparatorComponent,p=d.ListHeaderComponent,f=d.ListItemComponent,_=d.data,v=d.debug,C=d.getItem,L=d.getItemCount,b=d.getItemLayout,S=d.horizontal,I=d.renderItem,R=p?1:0,w=L(_)-1;o=Math.min(w,o);for(var x=function(){var i=C(_,E),o=h._keyExtractor(i,E,h.props);h._indicesToKeys.set(E,o),r.has(E+R)&&t.push(e.length);var d=null==b||v||h._fillRateHelper.enabled();e.push(M.createElement(y.default,(0,s.default)({CellRendererComponent:c,ItemSeparatorComponent:E<w?u:void 0,ListItemComponent:f,cellKey:o,horizontal:S,index:E,inversionStyle:l,item:i,key:o,prevCellKey:n,onUpdateSeparators:h._onUpdateSeparators,onCellFocusCapture:e=>h._onCellFocusCapture(o),onUnmount:h._onCellUnmount,ref:e=>{h._cellRefs[o]=e},renderItem:I},d&&{onCellLayout:h._onCellLayout}))),n=o},E=i;E<=o;E++)x()}static _constrainToItemCount(e,t){var s=t.getItemCount(t.data),r=Math.min(s-1,e.last),i=x(t.maxToRenderPerBatch);return{first:(0,d.default)(0,s-1-i,e.first),last:r}}_isNestedWithSameOrientation(){var e=this.context;return!(!e||!!e.horizontal!==w(this.props.horizontal))}_keyExtractor(e,t,s){if(null!=s.keyExtractor)return s.keyExtractor(e,t);var r=(0,L.keyExtractor)(e,t);return r===String(t)&&(I=!0,e.type&&e.type.displayName&&(R=e.type.displayName)),r}render(){this._checkProps(this.props);var e=this.props,s=e.ListEmptyComponent,i=e.ListFooterComponent,o=e.ListHeaderComponent,n=this.props,h=n.data,c=n.horizontal,u=this.props.inverted?w(this.props.horizontal)?z.horizontallyInverted:z.verticallyInverted:null,p=[],f=new Set(this.props.stickyHeaderIndices),_=[];if(o){f.has(0)&&_.push(0);var v=M.isValidElement(o)?o:M.createElement(o,null);p.push(M.createElement(C.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-header',key:"$header"},M.createElement(l.default,{onLayout:this._onLayoutHeader,style:[u,this.props.ListHeaderComponentStyle]},v)))}var y=this.props.getItemCount(h);if(0===y&&s){var L=M.isValidElement(s)?s:M.createElement(s,null);p.push(M.createElement(C.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-empty',key:"$empty"},M.cloneElement(L,{onLayout:e=>{this._onLayoutEmpty(e),L.props.onLayout&&L.props.onLayout(e)},style:[u,L.props.style]})))}if(y>0){I=!1,R='';for(var b,S=this._getSpacerKey(!c),x=this.state.renderMask.enumerateRegions(),E=k(x,e=>e.isSpacer),T=(0,t.default)(x);!(b=T()).done;){var F=b.value;if(F.isSpacer){if(this.props.disableVirtualization)continue;var V=F===E&&!this.props.getItemLayout?(0,d.default)(F.first-1,F.last,this._highestMeasuredFrameIndex):F.last,O=this.__getFrameMetricsApprox(F.first,this.props),A=this.__getFrameMetricsApprox(V,this.props),P=A.offset+A.length-O.offset;p.push(M.createElement(l.default,{key:"$spacer-"+F.first,style:{[S]:P}}))}else this._pushCells(p,_,f,F.first,F.last,u)}!this._hasWarned.keys&&I&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",R),this._hasWarned.keys=!0)}if(i){var N=M.isValidElement(i)?i:M.createElement(i,null);p.push(M.createElement(C.VirtualizedListCellContextProvider,{cellKey:this._getFooterCellKey(),key:"$footer"},M.createElement(l.default,{onLayout:this._onLayoutFooter,style:[u,this.props.ListFooterComponentStyle]},N)))}var W,H=(0,r.default)((0,r.default)({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:(W=this.props.scrollEventThrottle,null!=W?W:50),invertStickyHeaders:void 0!==this.props.invertStickyHeaders?this.props.invertStickyHeaders:this.props.inverted,stickyHeaderIndices:_,style:u?[u,this.props.style]:this.props.style});this._hasMore=this.state.cellsAroundViewport.last<y-1;var B=M.createElement(C.VirtualizedListContextProvider,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:w(this.props.horizontal),getOutermostParentListRef:this._getOutermostParentListRef,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild}}
349,M.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(H),{ref:this._captureScrollRef},p));return this.props.debug?M.createElement(l.default,{style:z.debug},B,this._renderDebugOverlay()):B}componentDidUpdate(e){var t=this.props,s=t.data,r=t.extraData;s===e.data&&r===e.extraData||this._viewabilityTuples.forEach(e=>{e.viewabilityHelper.resetViewableIndices()});var i=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),i&&(this._hiPriInProgress=!1)}_computeBlankness(){this._fillRateHelper.computeBlankness(this.props,this.state.cellsAroundViewport,this._scrollMetrics)}_onCellFocusCapture(e){this._lastFocusedCellKey=e,this._updateCellsToRender()}_triggerRemeasureForChildListsInCell(e){this._nestedChildLists.forEachInCell(e,e=>{e.measureLayoutRelativeToContainingList()})}measureLayoutRelativeToContainingList(){try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(e,t,s,r)=>{this._offsetFromParentVirtualizedList=this._selectOffset({x:e,y:t}),this._scrollMetrics.contentLength=this._selectLength({width:s,height:r});var i=this._convertParentScrollMetrics(this.context.getScrollMetrics());(this._scrollMetrics.visibleLength!==i.visibleLength||this._scrollMetrics.offset!==i.offset)&&(this._scrollMetrics.visibleLength=i.visibleLength,this._scrollMetrics.offset=i.offset,this._nestedChildLists.forEach(e=>{e.measureLayoutRelativeToContainingList()}))},e=>{console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")})}catch(e){console.warn('measureLayoutRelativeToContainingList threw an error',e.stack)}}_getFooterCellKey(){return this._getCellKey()+'-footer'}_renderDebugOverlay(){for(var e=this._scrollMetrics.visibleLength/(this._scrollMetrics.contentLength||1),t=[],s=this.props.getItemCount(this.props.data),r=0;r<s;r++){var i=this.__getFrameMetricsApprox(r,this.props);i.inLayout&&t.push(i)}var o=this.__getFrameMetricsApprox(this.state.cellsAroundViewport.first,this.props).offset,n=this.__getFrameMetricsApprox(this.state.cellsAroundViewport.last,this.props),h=n.offset+n.length-o,d=this._scrollMetrics.offset,c=this._scrollMetrics.visibleLength;return M.createElement(l.default,{style:[z.debugOverlayBase,z.debugOverlay]},t.map((t,s)=>M.createElement(l.default,{key:'f'+s,style:[z.debugOverlayBase,z.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]})),M.createElement(l.default,{style:[z.debugOverlayBase,z.debugOverlayFrameLast,{top:o*e,height:h*e}]}),M.createElement(l.default,{style:[z.debugOverlayBase,z.debugOverlayFrameVis,{top:d*e,height:c*e}]}))}_selectLength(e){return w(this.props.horizontal)?e.width:e.height}_selectOffset(e){return w(this.props.horizontal)?e.x:e.y}_maybeCallOnEdgeReached(){var e=this.props,t=e.data,s=e.getItemCount,r=e.onStartReached,i=e.onStartReachedThreshold,o=e.onEndReached,l=e.onEndReachedThreshold,n=e.initialScrollIndex,h=this._scrollMetrics,d=h.contentLength,c=h.visibleLength,u=h.offset,p=u,f=d-c-u;p<.001&&(p=0),f<.001&&(f=0);var _=p<=(null!=i?i*c:2),v=f<=(null!=l?l*c:2);o&&this.state.cellsAroundViewport.last===s(t)-1&&v&&this._scrollMetrics.contentLength!==this._sentEndForContentLength?(this._sentEndForContentLength=this._scrollMetrics.contentLength,o({distanceFromEnd:f})):null!=r&&0===this.state.cellsAroundViewport.first&&_&&this._scrollMetrics.contentLength!==this._sentStartForContentLength?n&&0===this._scrollMetrics.timestamp||(this._sentStartForContentLength=this._scrollMetrics.contentLength,r({distanceFromStart:p})):(this._sentStartForContentLength=_?this._sentStartForContentLength:0,this._sentEndForContentLength=v?this._sentEndForContentLength:0)}_scheduleCellsToRenderUpdate(){var e=this.state.cellsAroundViewport,t=e.first,s=e.last,r=this._scrollMetrics,i=r.offset,o=r.visibleLength,l=r.velocity,n=this.props.getItemCount(this.props.data),h=!1,d=E(this.props.onStartReachedThreshold),c=T(this.props.onEndReachedThreshold);if(t>0){var u=i-this.__getFrameMetricsApprox(t,this.props).offset;h=u<0||l<-2&&u<F(d,o)}if(!h&&s>=0&&s<n-1){var p=this.__getFrameMetricsApprox(s,this.props).offset-(i+o);h=p<0||l>2&&p<F(c,o)}if(h&&(this._averageCellLength||this.props.getItemLayout)&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()}
349_updateViewableItems(e,t){this._viewabilityTuples.forEach(s=>{s.viewabilityHelper.onUpdate(e,this._scrollMetrics.offset,this._scrollMetrics.visibleLength,this._getFrameMetrics,this._createViewToken,s.onViewableItemsChanged,t)})}}O.contextType=C.VirtualizedListContext;var z=n.default.create({verticallyInverted:{transform:'scaleY(-1)'},horizontallyInverted:{transform:'scaleX(-1)'},debug:{flex:1},debugOverlayBase:{position:'absolute',top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:'blue',borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:'orange'},debugOverlayFrameLast:{left:0,borderColor:'green',borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:'red',borderWidth:2}}),A=O},278,[279,27,19,282,283,276,42,290,295,296,297,298,299,300,301,302,303,304,24,305,34]);
350__d(function(g,_r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=_r(d[0]),r=(e=t)&&e.__esModule?e:{default:e};function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=(0,r.default)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},279,[280]);
351__d(function(g,_r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=_r(d[0]),r=(e=t)&&e.__esModule?e:{default:e};function n(e,t){if(e){if("string"==typeof e)return(0,r.default)(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.default)(e,t):void 0}}},280,[281]);
352__d(function(g,_r,i,_a,m,_e,d){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return e}})},281,[]);
353__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t=e(r(d[0])),o=e(r(d[1])),n=e(r(d[2])),l=["colors","enabled","onRefresh","progressBackgroundColor","progressViewOffset","refreshing","size","tintColor","title","titleColor"];var s=function(e){e.colors,e.enabled,e.onRefresh,e.progressBackgroundColor,e.progressViewOffset,e.refreshing,e.size,e.tintColor,e.title,e.titleColor;var s=(0,t.default)(e,l);return n.default.createElement(o.default,s)}},282,[43,276,34]);
354__d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return C}});var o=e(r(d[0])),l=e(r(d[1])),n=e(r(d[2])),t=e(r(d[3])),s=e(r(d[4])),i=e(r(d[5])),c=e(r(d[6]));r(d[7]);var h=e(r(d[8])),p=e(r(d[9])),u=e(r(d[10])),S=e(r(d[11])),R=e(r(d[12])),f=e(r(d[13])),y=e(r(d[14])),T=["contentContainerStyle","horizontal","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","forwardedRef","keyboardDismissMode","onScroll","centerContent"],b={};class v extends f.default.Component{constructor(){super(...arguments),this._scrollNodeRef=null,this._innerViewRef=null,this.isTouching=!1,this.lastMomentumScrollBeginTime=0,this.lastMomentumScrollEndTime=0,this.observedScrollSinceBecomingResponder=!1,this.becameResponderWhileAnimating=!1,this.scrollResponderHandleScrollShouldSetResponder=()=>this.isTouching,this.scrollResponderHandleStartShouldSetResponderCapture=e=>this.scrollResponderIsAnimating(),this.scrollResponderHandleTerminationRequest=()=>!this.observedScrollSinceBecomingResponder,this.scrollResponderHandleTouchEnd=e=>{var o=e.nativeEvent;this.isTouching=0!==o.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(e)},this.scrollResponderHandleResponderRelease=e=>{this.props.onResponderRelease&&this.props.onResponderRelease(e);var o=u.default.currentlyFocusedField();this.props.keyboardShouldPersistTaps||null==o||e.target===o||this.observedScrollSinceBecomingResponder||this.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),u.default.blurTextInput(o))},this.scrollResponderHandleScroll=e=>{this.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},this.scrollResponderHandleResponderGrant=e=>{this.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},this.scrollResponderHandleScrollBeginDrag=e=>{this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},this.scrollResponderHandleScrollEndDrag=e=>{this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},this.scrollResponderHandleMomentumScrollBegin=e=>{this.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},this.scrollResponderHandleMomentumScrollEnd=e=>{this.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},this.scrollResponderHandleTouchStart=e=>{this.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},this.scrollResponderHandleTouchMove=e=>{this.props.onTouchMove&&this.props.onTouchMove(e)},this.scrollResponderIsAnimating=()=>Date.now()-this.lastMomentumScrollEndTime<16||this.lastMomentumScrollEndTime<this.lastMomentumScrollBeginTime,this.scrollResponderScrollTo=(e,o,l)=>{if('number'==typeof e)console.warn('`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.');else{var n=e||b;e=n.x,o=n.y,l=n.animated}var t=this.getScrollableNode(),s=e||0,i=o||0;null!=t&&('function'==typeof t.scroll?t.scroll({top:i,left:s,behavior:l?'smooth':'auto'}):(t.scrollLeft=s,t.scrollTop=i))},this.scrollResponderZoomTo=(e,o)=>{(0,i.default)('zoomToRect is not implemented')},this.scrollResponderScrollNativeHandleToKeyboard=(e,o,l)=>{this.additionalScrollOffset=o||0,this.preventNegativeScrollOffset=!!l,S.default.measureLayout(e,this.getInnerViewNode(),this.scrollResponderTextInputFocusError,this.scrollResponderInputMeasureAndScrollToKeyboard)},this.scrollResponderInputMeasureAndScrollToKeyboard=(e,o,l,n)=>{var s=t.default.get('window').height;this.keyboardWillOpenTo&&(s=this.keyboardWillOpenTo.endCoordinates.screenY);var i=o-s+n+this.additionalScrollOffset;this.preventNegativeScrollOffset&&(i=Math.max(0,i)),this.scrollResponderScrollTo({x:0,y:i,animated:!0}),this.additionalOffset=0,this.preventNegativeScrollOffset=!1},this.scrollResponderKeyboardWillShow=e=>{this.keyboardWillOpenTo=e,this.props.onKeyboardWillShow&&this.props.onKeyboardWillShow(e)},this.scrollResponderKeyboardWillHide=e=>{this.keyboardWillOpenTo=null,this.props.onKeyboardWillHide&&this.props.onKeyboardWillHide(e)},this.scrollResponderKeyboardDidShow=e=>{e&&(this.keyboardWillOpenTo=e),this.props.onKeyboardDidShow&&this.props.onKeyboardDidShow(e)},this.scrollResponderKeyboardDidHide=e=>{this.keyboardWillOpenTo=null,this.props.onKeyboardDidHide&&this.props.onKeyboardDidHide(e)},this.flashScrollIndicators=()=>{this.scrollResponderFlashScrollIndicators()}
354,this.getScrollResponder=()=>this,this.getScrollableNode=()=>this._scrollNodeRef,this.getInnerViewRef=()=>this._innerViewRef,this.getInnerViewNode=()=>this._innerViewRef,this.getNativeScrollRef=()=>this._scrollNodeRef,this.scrollTo=(e,o,l)=>{if('number'==typeof e)console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.');else{var n=e||b;o=n.x,e=n.y,l=n.animated}this.scrollResponderScrollTo({x:o||0,y:e||0,animated:!1!==l})},this.scrollToEnd=e=>{var o=!1!==(e&&e.animated),l=this.props.horizontal,n=this.getScrollableNode(),t=l?n.scrollWidth:0,s=l?0:n.scrollHeight;this.scrollResponderScrollTo({x:t,y:s,animated:o})},this._handleContentOnLayout=e=>{var o=e.nativeEvent.layout,l=o.width,n=o.height;this.props.onContentSizeChange(l,n)},this._handleScroll=e=>{'on-drag'===this.props.keyboardDismissMode&&(0,s.default)(),this.scrollResponderHandleScroll(e)},this._setInnerViewRef=e=>{this._innerViewRef=e},this._setScrollNodeRef=e=>{this._scrollNodeRef=e,null!=e&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),(0,c.default)(this.props.forwardedRef)(e)}}scrollResponderHandleStartShouldSetResponder(){return!1}scrollResponderHandleResponderReject(){(0,y.default)(!1,"ScrollView doesn't take rejection well - scrolls anyway")}scrollResponderFlashScrollIndicators(){}scrollResponderTextInputFocusError(e){console.error('Error measuring text field: ',e)}render(){var e=this.props,t=e.contentContainerStyle,s=e.horizontal,c=e.onContentSizeChange,p=e.refreshControl,u=e.stickyHeaderIndices,S=e.pagingEnabled,y=(e.forwardedRef,e.keyboardDismissMode,e.onScroll,e.centerContent),b=(0,n.default)(e,T),v={};c&&(v={onLayout:this._handleContentOnLayout});var H=!s&&Array.isArray(u),E=H||S?f.default.Children.map(this.props.children,(e,o)=>{var l=H&&u.indexOf(o)>-1;return null!=e&&(l||S)?f.default.createElement(R.default,{style:[l&&w.stickyHeader,S&&w.pagingEnabledChild]},e):e}):this.props.children,C=f.default.createElement(R.default,(0,l.default)({},v,{children:E,collapsable:!1,ref:this._setInnerViewRef,style:[s&&w.contentContainerHorizontal,y&&w.c
354ontentContainerCenterContent,t]})),M=s?w.baseHorizontal:w.baseVertical,D=s?w.pagingEnabledHorizontal:w.pagingEnabledVertical,I=(0,o.default)((0,o.default)({},b),{},{style:[M,S&&D,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject}),N=h.default;(0,i.default)(void 0!==N,'ScrollViewClass must not be undefined');var x=f.default.createElement(N,(0,l.default)({},I,{ref:this._setScrollNodeRef}),C);return p?f.default.cloneElement(p,{style:I.style},x):x}}var H={flexGrow:1,flexShrink:1,transform:'translateZ(0)',WebkitOverflowScrolling:'touch'},w=p.default.create({baseVertical:(0,o.default)((0,o.default)({},H),{},{flexDirection:'column',overflowX:'hidden',overflowY:'auto'}),baseHorizontal:(0,o.default)((0,o.default)({},H),{},{flexDirection:'row',overflowX:'auto',overflowY:'hidden'}),contentContainerHorizontal:{flexDirection:'row'},contentContainerCenterContent:{justifyContent:'center',flexGrow:1},stickyHeader:{position:'sticky',top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:'x mandatory'},pagingEnabledVertical:{scrollSnapType:'y mandatory'},pagingEnabledChild:{scrollSnapAlign:'start'}}),E=f.default.forwardRef((e,o)=>f.default.createElement(v,(0,l.default)({},e,{forwardedRef:o})));E.displayName='ScrollView';var C=E},283,[19,27,43,284,285,24,241,95,287,42,286,235,276,34,288]);
355__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return w}});var t=e(r(d[0])),n=e(r(d[1])),s={window:{fontScale:1,height:0,scale:1,width:0},screen:{fontScale:1,height:0,scale:1,width:0}},o={},c=n.default;function l(){if(n.default){var e,t,o=window;if(o.visualViewport){var c=o.visualViewport;e=Math.round(c.height*c.scale),t=Math.round(c.width*c.scale)}else{var l=o.document.documentElement;e=l.clientHeight,t=l.clientWidth}s.window={fontScale:1,height:e,scale:o.devicePixelRatio||1,width:t},s.screen={fontScale:1,height:o.screen.height,scale:o.devicePixelRatio||1,width:o.screen.width}}}function u(){l(),Array.isArray(o.change)&&o.change.forEach(e=>e(s))}class w{static get(e){return c&&(c=!1,l()),(0,t.default)(s[e],"No dimension set for key "+e),s[e]}static set(e){e&&(n.default?(0,t.default)(!1,'Dimensions cannot be set in the browser'):(null!=e.screen&&(s.screen=e.screen),null!=e.window&&(s.window=e.window)))}static addEventListener(e,t){return o[e]=o[e]||[],o[e].push(t),{remove:()=>{this.removeEventListener(e,t)}}}static removeEventListener(e,t){Array.isArray(o[e])&&(o[e]=o[e].filter(e=>e!==t))}}n.default&&(window.visualViewport?window.visualViewport.addEventListener('resize',u,!1):window.addEventListener('resize',u,!1))},284,[24,39]);
356__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},l=()=>{u.default.blurTextInput(u.default.currentlyFocusedField())}},285,[286]);
357__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});
357var e,u=r(d[0]),t=(e=u)&&e.__esModule?e:{default:e},l={_currentlyFocusedNode:null,currentlyFocusedField(){return document.activeElement!==this._currentlyFocusedNode&&(this._currentlyFocusedNode=null),this._currentlyFocusedNode},focusTextInput(e){null!==e&&(this._currentlyFocusedNode=e,document.activeElement!==e&&t.default.focus(e))},blurTextInput(e){null!==e&&(this._currentlyFocusedNode=null,document.activeElement===e&&t.default.blur(e))}}},286,[235]);
358__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return v}});var t=e(r(_d[0])),o=e(r(_d[1])),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[2])),l=e(r(_d[3])),c=e(r(_d[4])),u=e(r(_d[5])),s=["onScroll","onTouchMove","onWheel","scrollEnabled","scrollEventThrottle","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","style"];function f(e){return{nativeEvent:{contentOffset:{get x(){return e.target.scrollLeft},get y(){return e.target.scrollTop}},contentSize:{get height(){return e.target.scrollHeight},get width(){return e.target.scrollWidth}},layoutMeasurement:{get height(){return e.target.offsetHeight},get width(){return e.target.offsetWidth}}},timeStamp:Date.now()}}var d=n.forwardRef((e,l)=>{var d=e.onScroll,v=e.onTouchMove,S=e.onWheel,b=e.scrollEnabled,w=void 0===b||b,T=e.scrollEventThrottle,p=void 0===T?0:T,y=e.showsHorizontalScrollIndicator,_=e.showsVerticalScrollIndicator,E=e.style,M=(0,o.default)(e,s),O=n.useRef({isScrolling:!1,scrollLastTick:0}),D=n.useRef(null),W=n.useRef(null);function j(e){return t=>{w&&e&&e(t)}}function P(e){O.current.isScrolling=!0,k(e)}function k(e){O.current.scrollLastTick=Date.now(),d&&d(f(e))}function H(e){O.current.isScrolling=!1,d&&d(f(e))}var I=!1===y||!1===_;return n.createElement(c.default,(0,t.default)({},M,{onScroll:function(e){var t,o,n;e.stopPropagation(),e.target===W.current&&(e.persist(),null!=D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{H(e)},100),O.current.isScrolling?(t=O.current.scrollLastTick,o=p,n=Date.now()-t,o>0&&n>=o&&k(e)):P(e))},onTouchMove:j(v),onWheel:j(S),ref:(0,u.default)(W,l),style:[E,!w&&h.scrollDisabled,I&&h.hideScrollbar]}))}),h=l.default.create({scrollDisabled:{overflowX:'hidden',overflowY:'hidden',touchAction:'none'},hideScrollbar:{scrollbarWidth:'none'}}),v=d},287,[27,43,34,42,276,240]);
359__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);m.exports=t},288,[289]);
360__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return function(){return t}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},m.exports=n},289,[]);
361__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var e,t=r(d[0]),l=(e=t)&&e.__esModule?e:{default:e};var s=class{constructor(e,t){this._delay=t,this._callback=e}dispose(e){void 0===e&&(e={abort:!1}),this._taskHandle&&(this._taskHandle.cancel(),e.abort||this._callback(),this._taskHandle=null)}schedule(){if(!this._taskHandle){var e=setTimeout(()=>{this._taskHandle=l.default.runAfterInteractions(()=>{this._taskHandle=null,this._callback()})},this._delay);this._taskHandle={cancel:()=>clearTimeout(e)}}}}},290,[291]);
362__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),c=new o.default,u={Events:{interactionStart:'interactionStart',interactionComplete:'interactionComplete'},runAfterInteractions(e){var t=[],n=new Promise(n=>{S(),e&&t.push(e),t.push({run:n,name:'resolve '+(e&&e.name||'?')}),h.enqueueTasks(t)});return{then:n.then.bind(n),done:n.then.bind(n),cancel:()=>{h.cancelTasks(t)}}},createInteractionHandle(){S();var e=++w;return f.add(e),e},clearInteractionHandle(e){(0,t.default)(!!e,'Must provide a handle to clear.'),S(),f.delete(e),v.add(e)},addListener:c.addListener.bind(c),setDeadline(e){b=e}},l=new Set,f=new Set,v=new Set,h=new n.default({onMoreTasks:S}),p=0,w=0,b=-1;function S(){p||(p=b>0?setTimeout(T):(0,s.default)(T))}function T(){p=0;var e=l.size;
362f.forEach(e=>l.add(e)),v.forEach(e=>l.delete(e));var t=l.size;if(0!==e&&0===t?c.emit(u.Events.interactionComplete):0===e&&0!==t&&c.emit(u.Events.interactionStart),0===t)for(var n=Date.now();h.hasTasksToProcess();)if(h.processNext(),b>0&&Date.now()-n>=b){S();break}f.clear(),v.clear()}var _=u},291,[24,292,293,294]);
363__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=e(r(d[0])),s=e(r(d[1]));var u=class{constructor(e){var t=e.onMoreTasks;this._onMoreTasks=t,this._queueStack=[{tasks:[],popable:!0}]}enqueue(e){this._getCurrentQueue().push(e)}enqueueTasks(e){e.forEach(e=>this.enqueue(e))}cancelTasks(e){this._queueStack=this._queueStack.map(s=>(0,t.default)((0,t.default)({},s),{},{tasks:s.tasks.filter(t=>-1===e.indexOf(t))})).filter((e,t)=>e.tasks.length>0||0===t)}hasTasksToProcess(){return this._getCurrentQueue().length>0}processNext(){var e=this._getCurrentQueue();if(e.length){var t=e.shift();try{'object'==typeof t&&t.gen?this._genPromise(t):'object'==typeof t&&t.run?t.run():((0,s.default)('function'==typeof t,'Expected Function, SimpleTask, or PromiseTask, but got:\n'+JSON.stringify(t,null,2)),t())}catch(e){throw e.message='TaskQueue: Error with task '+(t.name||'')+': '+e.message,e}}}_getCurrentQueue(){var e=this._queueStack.length-1,t=this._queueStack[e];return t.popable&&0===t.tasks.length&&e>0?(this._queueStack.pop(),this._getCurrentQueue()):t.tasks}_genPromise(e){var t=this._queueStack.push({tasks:[],popable:!1})-1,s=this._queueStack[t];e.gen().then(()=>{s.popable=!0,this.hasTasksToProcess()&&this._onMoreTasks()}).catch(t=>{setTimeout(()=>{throw t.message="TaskQueue: Error resolving Promise in task "+e.name+": "+t.message,t},0)})}}},292,[19,24]);
364__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});class t{constructor(){this._registry={}}addListener(t,s,l){var u=n(this._registry,t),o={context:l,listener:s,remove(){u.delete(o)}};return u.add(o),o}emit(t){var n=this._registry[t];if(null!=n){for(var s=arguments.length,l=new Array(s>1?s-1:0),u=1;u<s;u++)l[u-1]=arguments[u];for(var o=0,c=[...n];o<c.length;o++){var v=c[o];v.listener.apply(v.context,l)}}}removeAllListeners(t){null==t?this._registry={}:delete this._registry[t]}listenerCount(t){var n=this._registry[t];return null==n?0:n.size}}function n(t,n){var s=t[n];return null==s&&(s=new Set,t[n]=s),s}},293,[]);
365__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"cancelIdleCallback",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=((e=t)&&e.__esModule?e:{default:e}).default&&void 0!==window.requestIdleCallback,l=n?window.requestIdleCallback:function(e,t){return setTimeout(()=>{var t=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},u=n?window.cancelIdleCallback:function(e){clearTimeout(e)},o=l},294,[39]);
366__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=function(t,n,u){return n<t?t:n>u?u:n}},295,[]);
367__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=function(){return console.log(...arguments)}},296,[]);
368__d(function(g,r,_i,a,m,_e,d){"use strict";function s(s){return s&&s.__esModule?s:{default:s}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CellRenderMask",{enumerable:!0,get:function(){return i}});var e=s(r(d[0])),t=s(r(d[1]));class i{constructor(s){(0,t.default)(s>=0,'CellRenderMask must contain a non-negative number os cells'),this._numCells=s,this._regions=0===s?[]:[{first:0,last:s-1,isSpacer:!0}]}enumerateRegions(){return this._regions}addCells(s){if((0,t.default)(s.first>=0&&s.first<this._numCells&&s.last>=-1&&s.last<this._numCells&&s.last>
368=s.first-1,'CellRenderMask.addCells called with invalid cell range'),!(s.last<s.first)){var i=this._findRegion(s.first),l=i[0],n=i[1],f=this._findRegion(s.last),u=f[0],o=f[1];if(n!==o||l.isSpacer){var _=[],c=[],h=(0,e.default)((0,e.default)({},s),{},{isSpacer:!1});l.first<h.first&&(l.isSpacer?_.push({first:l.first,last:h.first-1,isSpacer:!0}):h.first=l.first),u.last>h.last&&(u.isSpacer?c.push({first:h.last+1,last:u.last,isSpacer:!0}):h.last=u.last);var p=[..._,h,...c],C=o-n+1;this._regions.splice(n,C,...p)}}}numCells(){return this._numCells}equals(s){return this._numCells===s._numCells&&this._regions.length===s._regions.length&&this._regions.every((e,t)=>e.first===s._regions[t].first&&e.last===s._regions[t].last&&e.isSpacer===s._regions[t].isSpacer)}_findRegion(s){for(var e=0,i=this._regions.length-1;e<=i;){var l=Math.floor((e+i)/2),n=this._regions[l];if(s>=n.first&&s<=n.last)return[n,l];s<n.first?i=l-1:s>n.last&&(e=l+1)}(0,t.default)(!1,"A region was not found containing cellIdx "+s)}}},297,[19,24]);
369__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var l=e(r(d[0])),t=e(r(d[1]));class n{constructor(){this._cellKeyToChildren=new Map,this._childrenToCellKey=new Map}add(e,l){var n;(0,t.default)(!this._childrenToCellKey.has(e),'Trying to add already present child list');var o=null!==(n=this._cellKeyToChildren.get(l))&&void 0!==n?n:new Set;o.add(e),this._cellKeyToChildren.set(l,o),this._childrenToCellKey.set(e,l)}remove(e){var l=this._childrenToCellKey.get(e);(0,t.default)(null!=l,'Trying to remove non-present child list'),this._childrenToCellKey.delete(e);var n=this._cellKeyToChildren.get(l);(0,t.default)(n,'_cellKeyToChildren should contain cellKey'),n.delete(e),0===n.size&&this._cellKeyToChildren.delete(l)}forEach(e){for(var t,n=(0,l.default)(this._cellKeyToChildren.values());!(t=n()).done;)for(var o,h=t.value,s=(0,l.default)(h);!(o=s()).done;){e(o.value)}}forEachInCell(e,t){for(var n,o,h=null!==(n=this._cellKeyToChildren.get(e))&&void 0!==n?n:[],s=(0,l.default)(h);!(o=s()).done;){t(o.value)}}anyInCell(e,t){for(var n,o,h=null!==(n=this._cellKeyToChildren.get(e))&&void 0!==n?n:[],s=(0,l.default)(h);!(o=s()).done;){if(t(o.value))return!0}return!1}size(){return this._childrenToCellKey.size}}},298,[279,24]);
370__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t,e=r(d[0]),s=(t=e)&&t.__esModule?t:{default:t};class n{constructor(){this.any_blank_count=0,this.any_blank_ms=0,this.any_blank_speed_sum=0,this.mostly_blank_count=0,this.mostly_blank_ms=0,this.pixels_blank=0,this.pixels_sampled=0,this.pixels_scrolled=0,this.total_time_spent=0,this.sample_count=0}}var l=[],_=10,h=null;var o=class{static addListener(t){return null===h&&console.warn('Call `FillRateHelper.setSampleRate` before `addListener`.'),l.push(t),{remove:()=>{l=l.filter(e=>t!==e)}}}static setSampleRate(t){h=t}static setMinSampleCount(t){_=t}constructor(t){this._anyBlankStartTime=null,this._enabled=!1,this._info=new n,this._mostlyBlankStartTime=null,this._samplesStartTime=null,this._getFrameMetrics=t,this._enabled=(h||0)>Math.random(),this._resetData()}activate(){this._enabled&&null==this._samplesStartTime&&(this._samplesStartTime=g.performance.now())}deactivateAndFlush(){if(this._enabled){var t=this._samplesStartTime;if(null!=t)if(this._info.sample_count<_)this._resetData();else{var e=g.performance.now()-t,n=(0,s.default)((0,s.default)({},this._info),{},{total_time_spent:e});l.forEach(t=>t(n)),this._resetData()}}}computeBlankness(t,e,s){if(!this._enabled||0===t.getItemCount(t.data)||e.last<e.first||null==this._samplesStartTime)return 0;var n=s.dOffset,l=s.offset,_=s.velocity,h=s.visibleLength;this._info.sample_count++,this._info.pixels_sampled+=Math.round(h),this._info.pixels_scrolled+=Math.round(Math.abs(n));var o=Math.round(1e3*Math.abs(_)),u=g.performance.now();null!=this._anyBlankStartTime&&(this._info.any_blank_ms+=u-this._anyBlankStartTime),this._anyBlankStartTime=null,null!=this._mostlyBlankStartTime&&(this._info.mostly_blank_ms+=u-this._mostlyBlankStartTime),this._mostlyBlankStartTime=null;for(var f=0,c=e.first,p=this._getFrameMetrics(c,t);c<=e.last&&(!p||!p.inLayout);)p=this._getFrameMetrics(c,t),c++;p&&c>0&&(f=Math.min(h,Math.max(0,p.offset-l)));for(var b=0,y=e.last,k=this._getFrameMetrics(y,t);y>=e.first&&(!k||!k.inLayout);)k=this._getFrameMetrics(y,t),y--;if(k&&y<t.getItemCount(t.data)-1){var S=k.offset+k.length;b=Math.min(h,Math.max(0,l+h-S))}
370var M=Math.round(f+b),v=M/h;return v>0?(this._anyBlankStartTime=u,this._info.any_blank_speed_sum+=o,this._info.any_blank_count++,this._info.pixels_blank+=M,v>.5&&(this._mostlyBlankStartTime=u,this._info.mostly_blank_count++)):(o<.01||Math.abs(n)<1)&&this.deactivateAndFlush(),v}enabled(){return this._enabled}_resetData(){this._anyBlankStartTime=null,this._info=new n,this._mostlyBlankStartTime=null,this._samplesStartTime=null}}},299,[19]);
371__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t,e=r(_d[0]),s=(t=e)&&t.__esModule?t:{default:t},n=(function(t){if(t&&t.__esModule)return t;var e={};return t&&Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),e.default=t,e})(r(_d[1]));class o extends n.PureComponent{constructor(t){super(t),this._inAsyncStateUpdate=!1,this._installSetStateHooks()}setState(t,e){'function'==typeof t?super.setState((e,s)=>{var n;this._inAsyncStateUpdate=!0;try{n=t(e,s)}catch(t){throw t}finally{this._inAsyncStateUpdate=!1}return n},e):super.setState(t,e)}_installSetStateHooks(){var t=this,e=this.props,n=this.state;Object.defineProperty(this,'props',{get:()=>((0,s.default)(!t._inAsyncStateUpdate,'"this.props" should not be accessed during state updates'),e),set(t){e=t}}),Object.defineProperty(this,'state',{get:()=>((0,s.default)(!t._inAsyncStateUpdate,'"this.state" should not be acceessed during state updates'),n),set(t){n=t}})}}},300,[24,34]);
372__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=e(r(d[0])),n=e(r(d[1])),s=e(r(d[2]));function l(e,t,n,s,l,u){if(h(n,s,l))return!0;var c=o(n,s,l);return 100*(e?c/l:c/u)>=t}function o(e,t,n){var s=Math.min(t,n)-Math.max(e,0);return Math.max(0,s)}function h(e,t,n){return e>=0&&t<=n&&t>e}var u=class{constructor(e){void 0===e&&(e={viewAreaCoveragePercentThreshold:0}),this._hasInteracted=!1,this._timers=new Set,this._viewableIndices=[],this._viewableItems=new Map,this._config=e}dispose(){this._timers.forEach(clearTimeout)}computeViewableItems(e,t,n,o,h){var u=e.getItemCount(e.data),c=this._config,f=c.itemVisiblePercentThreshold,v=c.viewAreaCoveragePercentThreshold,_=null!=v,w=_?v:f;(0,s.default)(null!=w&&null!=f!=(null!=v),'Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold');var b=[];if(0===u)return b;var I=-1,p=h||{first:0,last:u-1},y=p.first,T=p.last;if(T>=u)return console.warn('Invalid render range computing viewability '+JSON.stringify({renderRange:h,itemCount:u})),[];for(var M=y;M<=T;M++){var V=o(M,e);if(V){var C=V.offset-t,P=C+V.length;if(C<n&&P>0)I=M,l(_,w,C,P,n,V.length)&&b.push(M);else if(I>=0)break}}return b}onUpdate(e,t,n,s,l,o,h){var u=e.getItemCount(e.data);if((!this._config.waitForInteraction||this._hasInteracted)&&0!==u&&s(0,e)){var c=[];if(u&&(c=this.computeViewableItems(e,t,n,s,h)),this._viewableIndices.length!==c.length||!this._viewableIndices.every((e,t)=>e===c[t]))if(this._viewableIndices=c,this._config.minimumViewTime){var f=setTimeout(()=>{this._timers.delete(f),this._onUpdateSync(e,c,o,l)},this._config.minimumViewTime);this._timers.add(f)}else this._onUpdateSync(e,c,o,l)}}resetViewableIndices(){this._viewableIndices=[]}recordInteraction(){this._hasInteracted=!0}_onUpdateSync(e,s,l,o){s=s.filter(e=>this._viewableIndices.includes(e));for(var h,u=this._viewableItems,c=new Map(s.map(t=>{var n=o(t,!0,e);return[n.key,n]})),f=[],v=(0,n.default)(c);!(h=v()).done;){var _=h.value,w=_[0],b=_[1];u.has(w)||f.push(b)}for(var I,p=(0,n.default)(u);!(I=p()).done;){var y=I.value,T=y[0],M=y[1];c.has(T)||f.push((0,t.default)((0,t.default)({},M),{},{isViewable:!1}))}f.length>0&&(this._viewableItems=c,l({viewableItems:Array.from(c.values()),changed:f,viewabilityConfig:this._config}))}}},301,[19,279,24]);
373__d(function(g,r,i,a,m,_e,_d){"use strict";
373function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return d}});var t=e(r(_d[0])),o=e(r(_d[1])),s=e(r(_d[2])),n=e(r(_d[3])),l=r(_d[4]),p=e(r(_d[5])),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[6]));class d extends u.Component{constructor(){super(...arguments),this.state={separatorProps:{highlighted:!1,leadingItem:this.props.item}},this._separators={highlight:()=>{var e=this.props,t=e.cellKey,o=e.prevCellKey;this.props.onUpdateSeparators([t,o],{highlighted:!0})},unhighlight:()=>{var e=this.props,t=e.cellKey,o=e.prevCellKey;this.props.onUpdateSeparators([t,o],{highlighted:!1})},updateProps:(e,t)=>{var o=this.props,s=o.cellKey,n=o.prevCellKey;this.props.onUpdateSeparators(['leading'===e?n:s],t)}},this._onLayout=e=>{this.props.onCellLayout&&this.props.onCellLayout(e,this.props.cellKey,this.props.index)}}static getDerivedStateFromProps(e,t){return{separatorProps:(0,o.default)((0,o.default)({},t.separatorProps),{},{leadingItem:e.item})}}updateSeparatorProps(e){this.setState(t=>({separatorProps:(0,o.default)((0,o.default)({},t.separatorProps),e)}))}componentWillUnmount(){this.props.onUnmount(this.props.cellKey)}_renderElement(e,t,o,s){return e&&t&&console.warn("VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take precedence over renderItem."),t?u.createElement(t,{item:o,index:s,separators:this._separators}):e?e({item:o,index:s,separators:this._separators}):void(0,p.default)(!1,'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.')}render(){var e=this.props,o=e.CellRendererComponent,n=e.ItemSeparatorComponent,p=e.ListItemComponent,d=e.cellKey,h=e.horizontal,y=e.item,f=e.index,v=e.inversionStyle,C=e.onCellFocusCapture,_=e.onCellLayout,L=e.renderItem,P=this._renderElement(L,p,y,f),K=u.isValidElement(n)?n:n&&u.createElement(n,this.state.separatorProps),I=v?h?[c.rowReverse,v]:[c.columnReverse,v]:h?[c.row,v]:v,w=o?u.createElement(o,(0,t.default)({cellKey:d,index:f,item:y,style:I,onFocusCapture:C},_&&{onLayout:this._onLayout}),P,K):u.createElement(s.default,(0,t.default)({style:I,onFocusCapture:C},_&&{onLayout:this._onLayout}),P,K);return u.createElement(l.VirtualizedListCellContextProvider,{cellKey:this.props.cellKey},w)}}var c=n.default.create({row:{flexDirection:'row'},rowReverse:{flexDirection:'row-reverse'},columnReverse:{flexDirection:'column-reverse'}})},302,[27,19,276,42,303,24,34]);
374__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"VirtualizedListContext",{enumerable:!0,get:function(){return o}}),_e.VirtualizedListContextResetter=function(e){var t=e.children;return u.createElement(o.Provider,{value:null},t)},_e.VirtualizedListContextProvider=function(e){var t=e.children,l=e.value,s=(0,n.useMemo)(()=>({cellKey:null,getScrollMetrics:l.getScrollMetrics,horizontal:l.horizontal,getOutermostParentListRef:l.getOutermostParentListRef,registerAsNestedChild:l.registerAsNestedChild,unregisterAsNestedChild:l.unregisterAsNestedChild}),[l.getScrollMetrics,l.horizontal,l.getOutermostParentListRef,l.registerAsNestedChild,l.unregisterAsNestedChild]);return u.createElement(o.Provider,{value:s},t)},_e.VirtualizedListCellContextProvider=function(e){var t=e.cellKey,s=e.children,d=(0,n.useContext)(o),c=(0,n.useMemo)(()=>null==d?null:(0,l.default)((0,l.default)({},d),{},{cellKey:t}),[d,t]);return u.createElement(o.Provider,{value:c},s)};var e,t=r(_d[0]),l=(e=t)&&e.__esModule?e:{default:e},n=r(_d[1]),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(l){var n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:function(){return e[l]}})}),t.default=e,t})(n),o=u.createContext(null)},303,[19,34]);
375__d(function(g,r,i,a,m,e,d){'use strict';function t(t,n,f,o){void 0===o&&(o=1);for(var s=n.getItemCount(n.data),l=[],u=0;u<t.length;u++)for(var v=t[u],c=0,h=s-1;c<=h;){var M=c+(h-c>>>1),b=f(M,n),x=b.offset*o,y=(b.offset+b.length)*o;if(0===M&&v<x||0!==M&&v<=x)h=M-1;else{if(!(v>y)){l[u]=M;break}c=M+1}}return l}function n(t,n){return n.last-n.first+1-Math.max(0,1+Math.min(n.last,t.last)-Math.max(n.first,t.first))}
375Object.defineProperty(e,'__esModule',{value:!0}),e.elementsThatOverlapOffsets=t,e.newRangeCount=n,e.computeWindowedRenderLimits=function(f,o,s,l,u,v){var c=f.getItemCount(f.data);if(0===c)return{first:0,last:-1};var h=v.offset,M=v.velocity,b=v.visibleLength,x=v.zoomScale,y=void 0===x?1:x,w=Math.max(0,h),k=w+b,p=(s-1)*b,C=M>1?'after':M<-1?'before':'none',O=Math.max(0,w-.5*p),_=Math.max(0,k+.5*p);if(u(c-1,f).offset*y<O)return{first:Math.max(0,c-1-o),last:c-1};var j=t([O,w,k,_],f,u,y),L=j[0],S=j[1],E=j[2],I=j[3];L=null==L?0:L,S=null==S?Math.max(0,L):S,I=null==I?c-1:I,E=null==E?Math.min(I,S+o-1):E;var R={first:S,last:E},z=n(l,R);for(;!(S<=L&&E>=I);){var B=z>=o,F=S<=l.first||S>l.last,J=S>L&&(!B||!F),N=E>=l.last||E<l.first,P=E<I&&(!B||!N);if(B&&!J&&!P)break;!J||'after'===C&&P&&N||(F&&z++,S--),!P||'before'===C&&J&&F||(N&&z++,E++)}if(!(E>=S&&S>=0&&E<c&&S>=L&&E<=I&&S<=R.first&&E>=R.last))throw new Error('Bad window calculation '+JSON.stringify({first:S,last:E,itemCount:c,overscanFirst:L,overscanLast:I,visible:R}));return{first:S,last:E}},e.keyExtractor=function(t,n){if('object'==typeof t&&null!=(null==t?void 0:t.key))return t.key;if('object'==typeof t&&null!=(null==t?void 0:t.id))return t.id;return String(n)}},304,[]);
376__d(function(g,r,i,a,m,e,d){'use strict';function t(t,o){if(null!=t)return t;var n=new Error(void 0!==o?o:'Got unexpected '+t);throw n.framesToPop=1,n}m.exports=t,m.exports.default=t,Object.defineProperty(m.exports,'__esModule',{value:!0})},305,[]);
377__d(function(g,r,_i2,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return l}});var t=Number.isNaN||function(t){return'number'==typeof t&&t!=t};function n(n,u){return n===u||!(!t(n)||!t(u))}function u(t,u){if(t.length!==u.length)return!1;for(var l=0;l<t.length;l++)if(!n(t[l],u[l]))return!1;return!0}function l(t,n){void 0===n&&(n=u);var l=null;function i(){for(var u=[],i=0;i<arguments.length;i++)u[i]=arguments[i];if(l&&l.lastThis===this&&n(u,l.lastArgs))return l.lastResult;var s=t.apply(this,u);return l={lastResult:s,lastArgs:u,lastThis:this},s}return i.clear=function(){l=null},i}},306,[]);
378__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(_d[0])),u=e(r(_d[1])),n=e(r(_d[2])),f=e(r(_d[3]));r(_d[4]),r(_d[5]);var l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(u){var n=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(t,u,n.get?n:{enumerable:!0,get:function(){return e[u]}})}),t.default=e,t})(r(_d[6])),o=["style"];function c(e){return l.forwardRef((c,d)=>{var s=(0,n.default)(c),y=s[0],p=s[1],_=(0,f.default)(p,d),b=y.passthroughAnimatedPropExplicitValues,v=y.style,O=null!=b?b:{},j=O.style,P=(0,u.default)(O,o),h=[v,j];return l.createElement(e,(0,t.default)({},y,P,{style:h,ref:_}))})}},307,[27,43,308,326,42,276,34]);
379__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}});var t=e(r(d[0])),u=e(r(d[1])),n=r(d[2]),l=e(r(d[3])),c=e(r(d[4])),f=r(d[5]),o=e(r(d[6]));function _(e){var t=(0,f.useReducer)(e=>e+1,0)[1],c=(0,f.useRef)(null),o=(0,f.useMemo)(()=>new u.default(e,()=>null==c.current?void 0:c.current()),[e]);v(o);var _=(0,f.useCallback)(u=>{o.setNativeView(u),c.current=()=>{t()};var l=b(u),f=[];for(var _ in e){var s=e[_];s instanceof n.AnimatedEvent&&s.__isNative&&(s.__attach(l,_),f.push([_,s]))}return()=>{c.current=null;for(var e=0,t=f;e<t.length;e++){var u=t[e],n=u[0];u[1].__detach(l,n)}}},[e,o]),h=(0,l.default)(_);return[s(o),h]}function s(e){return(0,t.default)((0,t.default)({},e.__getValue()),{},{collapsable:!1})}function v(e){var t=(0,f.useRef)(null),u=(0,f.useRef)(!1);(0,f.useEffect)(()=>{c.default.API.flushQueue()}),(0,o.default)(()=>(u.current=!1,()=>{u.current=!0}),[]),(0,o.default)(()=>
379{if(e.__attach(),null!=t.current){var n=t.current;n.__restoreDefaultValues(),n.__detach(),t.current=null}return()=>{u.current?e.__detach():t.current=e}},[e])}function b(e){return'object'==typeof e&&'function'==typeof(null==e?void 0:e.getScrollableNode)?e.getScrollableNode():e}},308,[19,309,310,325,315,34,234]);
380__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var t=e(r(d[0])),_=r(d[1]),s=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5]));class u extends s.default{constructor(e,_){super(),e.style&&(e=(0,t.default)((0,t.default)({},e),{},{style:new n.default(e.style)})),this._props=e,this._callback=_}__getValue(){var e={};for(var t in this._props){var o=this._props[t];o instanceof s.default?(!o.__isNative||o instanceof n.default)&&(e[t]=o.__getValue()):o instanceof _.AnimatedEvent?e[t]=o.__getHandler():e[t]=o}return e}__getAnimatedValue(){var e={};for(var t in this._props){var _=this._props[t];_ instanceof s.default&&(e[t]=_.__getAnimatedValue())}return e}__attach(){for(var e in this._props){var t=this._props[e];t instanceof s.default&&t.__addChild(this)}}__detach(){for(var e in this.__isNative&&this._animatedView&&this.__disconnectAnimatedView(),this._animatedView=null,this._props){var t=this._props[e];t instanceof s.default&&t.__removeChild(this)}super.__detach()}update(){this._callback()}__makeNative(){if(!this.__isNative){for(var e in this.__isNative=!0,this._props){var t=this._props[e];t instanceof s.default&&t.__makeNative()}this._animatedView&&this.__connectAnimatedView()}}setNativeView(e){this._animatedView!==e&&(this._animatedView=e,this.__isNative&&this.__connectAnimatedView())}__connectAnimatedView(){(0,l.default)(this.__isNative,'Expected node to be marked as "native"');var e=this._animatedView;(0,l.default)(null!=e,'Unable to locate attached view in the native tree'),o.default.API.connectAnimatedNodeToView(this.__getNativeTag(),e)}__disconnectAnimatedView(){(0,l.default)(this.__isNative,'Expected node to be marked as "native"');var e=this._animatedView;(0,l.default)(null!=e,'Unable to locate attached view in the native tree'),o.default.API.disconnectAnimatedNodeFromView(this.__getNativeTag(),e)}__restoreDefaultValues(){this.__isNative&&o.default.API.restoreDefaultValues(this.__getNativeTag())}__getNativeConfig(){var e={};for(var t in this._props){var _=this._props[t];_ instanceof s.default&&(_.__makeNative(),e[t]=_.__getNativeTag())}return{type:'props',props:e}}}var h=u},309,[19,310,314,323,315,24]);
381__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.attachNativeEvent=v,Object.defineProperty(_e,"AnimatedEvent",{enumerable:!0,get:function(){return _}});var t=e(r(d[0])),n=r(d[1]),s=e(n),l=e(r(d[2]));function v(e,n,v){var _=[],o=(e,n)=>{if(e instanceof t.default)e.__makeNative(),_.push({nativeEventPath:n,animatedValueTag:e.__getNativeTag()});else if('object'==typeof e)for(var s in e)o(e[s],n.concat(s))};return(0,l.default)(v[0]&&v[0].nativeEvent,'Native driven events only support animated values contained inside `nativeEvent`.'),o(v[0].nativeEvent,[]),null!=e&&_.forEach(t=>{s.default.API.addAnimatedEventToView(e,n,t)}),{detach(){null!=e&&_.forEach(t=>{s.default.API.removeAnimatedEventFromView(e,n,t.animatedValueTag)})}}}class _{constructor(e,t){this._listeners=[],this._argMapping=e,null==t&&(console.warn('Animated.event now requires a second argument for options'),t={useNativeDriver:!1}),t.listener&&this.__addListener(t.listener),this._callListeners=this._callListeners.bind(this),this._attachedEvent=null,this.__isNative=(0,n.shouldUseNativeDriver)(t)}__addListener(e){this._listeners.push(e)}__removeListener(e){this._listeners=this._listeners.filter(t=>t!==e)}__attach(e,t){(0,l.default)(this.__isNative,'Only native driven events need to be attached.'),this._attachedEvent=v(e,t,this._argMapping)}__detach(e,t){(0,l.default)(this.__isNative,'Only native driven events need to be detached.'),this._attachedEvent&&this._attachedEvent.detach()}__getHandler(){var e=this;if(this.__isNative)return this._callListeners;return function(){for(var n=arguments.length,s=new Array(n),l=0;l<n;l++)s[l]=arguments[l];var v=(e,n,s)=>{if(e instanceof t.default)'number'==typeof n&&e.setValue(n);else if('object'==typeof e)for(var l in e)v(e[l],n[l],l)};e._argMapping.forEach((e,t)=>{v(e,s[t],'arg'+t)}),e._callListeners(...s)}}_callListeners(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];
381this._listeners.forEach(e=>e(...t))}}},310,[311,315,24]);
382__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var e=t(r(d[0])),s=t(r(d[1])),n=t(r(d[2])),_=t(r(d[3])).default.API;class u extends s.default{constructor(t,e){if(super(),'number'!=typeof t)throw new Error('AnimatedValue: Attempting to set value to undefined');this._startingValue=this._value=t,this._offset=0,this._animation=null,e&&e.useNativeDriver&&this.__makeNative()}__detach(){this.__isNative&&_.getValue(this.__getNativeTag(),t=>{this._value=t-this._offset}),this.stopAnimation(),super.__detach()}__getValue(){return this._value+this._offset}setValue(t){var e,s;this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t,!this.__isNative),this.__isNative&&(e=this.__getNativeTag().toString(),s=()=>_.setAnimatedNodeValue(this.__getNativeTag(),t),_.setWaitingForIdentifier(e),s(),_.unsetWaitingForIdentifier(e))}setOffset(t){this._offset=t,this.__isNative&&_.setAnimatedNodeOffset(this.__getNativeTag(),t)}flattenOffset(){this._value+=this._offset,this._offset=0,this.__isNative&&_.flattenAnimatedNodeOffset(this.__getNativeTag())}extractOffset(){this._offset+=this._value,this._value=0,this.__isNative&&_.extractAnimatedNodeOffset(this.__getNativeTag())}stopAnimation(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&(this.__isNative?_.getValue(this.__getNativeTag(),t):t(this.__getValue()))}resetAnimation(t){this.stopAnimation(t),this._value=this._startingValue,this.__isNative&&_.setAnimatedNodeValue(this.__getNativeTag(),this._startingValue)}__onAnimatedValueUpdateReceived(t){this._updateValue(t,!1)}interpolate(t){return new e.default(this,t)}animate(t,e){var s=null;t.__isInteraction&&(s=n.default.createInteractionHandle());var _=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,t=>{this._updateValue(t,!0)},t=>{this._animation=null,null!==s&&n.default.clearInteractionHandle(s),e&&e(t)},_,this)}stopTracking(){this._tracking&&this._tracking.__detach(),this._tracking=null}track(t){this.stopTracking(),this._tracking=t,this._tracking&&this._tracking.update()}_updateValue(t,e){if(void 0===t)throw new Error('AnimatedValue: Attempting to set value to undefined');var s,n;this._value=t,e&&(s=this,n=new Set,(function t(e){'function'==typeof e.update?n.add(e):e.__getChildren().forEac
382h(t)})(s),n.forEach(t=>t.update())),super.__callListeners(this.__getValue())}__getNativeConfig(){return{type:'value',value:this._value,offset:this._offset}}}var h=u},311,[312,313,291,315]);
383__d(function(_g,_r,_i,_a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return g}});var e=t(_r(d[0])),a=t(_r(d[1])),n=t(_r(d[2])),r=t(_r(d[3])),i=t(_r(d[4])),o=t=>t;function u(t){if(t.outputRange&&'string'==typeof t.outputRange[0])return _(t);var e=t.outputRange,a=t.inputRange,n=t.easing||o,i='extend';void 0!==t.extrapolateLeft?i=t.extrapolateLeft:void 0!==t.extrapolate&&(i=t.extrapolate);var u='extend';return void 0!==t.extrapolateRight?u=t.extrapolateRight:void 0!==t.extrapolate&&(u=t.extrapolate),t=>{(0,r.default)('number'==typeof t,'Cannot interpolation an input which is not a number');var o=s(t,a);return p(t,a[o],a[o+1],e[o],e[o+1],n,i,u)}}function p(t,e,a,n,r,i,o,u){var p=t;if(p<e){if('identity'===o)return p;'clamp'===o&&(p=e)}if(p>a){if('identity'===u)return p;'clamp'===u&&(p=a)}return n===r?n:e===a?t<=e?n:r:(e===-1/0?p=-p:a===1/0?p-=e:p=(p-e)/(a-e),p=i(p),n===-1/0?p=-p:r===1/0?p+=n:p=p*(r-n)+n,p)}function l(t){var e=(0,i.default)(t);return null===e||'number'!=typeof e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var f=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;function _(t){var a=t.outputRange;(0,r.default)(a.length>=2,'Bad output range'),h(a=a.map(l));var n=a[0].match(f).map(()=>[]);a.forEach(t=>{t.match(f).forEach((t,e)=>{n[e].push(+t)})});var i,o=a[0].match(f).map((a,r)=>u((0,e.default)((0,e.default)({},t),{},{outputRange:n[r]}))),p='string'==typeof(i=a[0])&&i.startsWith('rgb');return t=>{var e=0;return a[0].replace(f,()=>{var a=+o[e++](t);return p&&(a=e<4?Math.round(a):Math.round(1e3*a)/1e3),String(a)})}}function h(t){for(var e=t[0].replace(f,''),a=1;a<t.length;++a)(0,r.default)(e===t[a].replace(f,''),'invalid pattern '+t[0]+' and '+t[a])}function s(t,e){var a;for(a=1;a<e.length-1&&!(e[a]>=t);++a);return a-1}class c extends a.default{constructor(t,e){super(),this._parent=t,this._config=e,this._interpolation=u(e)}__makeNative(t){this._parent.__makeNative(t),super.__makeNative(t)}__getValue(){var t=this._parent.__getValue();return(0,r.default)('number'==typeof t,'Cannot interpolate an input which is not a number.'),this._interpolation(t)}interpolate(t){return new c(this,t)}__attach(){this._parent.__addChild(this)}__detach(){this._parent.__removeChild(this),super.__detach()}__transformDataType(t){return t.map(n.default.transformDataType)}__getNativeConfig(){return{inputRange:this._config.inputRange,outputRange:this.__transformDataType(this._config.outputRange),extrapolateLeft:this._config.extrapolateLeft||this._config.extrapolate||'extend',extrapolateRight:this._config.extrapolateRight||this._config.extrapolate||'extend',type:'interpolation'}}}c.__createInterpolation=u;var g=c},312,[19,313,315,24,51]);
384__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var t=e(r(d[0])),_=e(r(d[1])),s=e(r(d[2]));class n extends _.default{constructor(){super(),this._children=[]}__makeNative(e){if(!this.__isNative){this.__isNative=!0;for(var _,n=(0,t.default)(this._children);!(_=n()).done;){var l=_.value;l.__makeNative(e),s.default.API.connectAnimatedNodes(this.__getNativeTag(),l.__getNativeTag())}}super.__makeNative(e)}__addChild(e){0===this._children.length&&this.__attach(),this._children.push(e),this.__isNative&&(e.__makeNative(this.__getPlatformConfig()),s.default.API.connectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()))}__removeChild(e){var t=this._children.indexOf(e);-1!==t?(this.__isNative&&e.__isNative&&s.default.API.disconnectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()),this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")}__getChildren(){return this._children}__callListeners(e){if(super.__callListeners(e),!this.__isNative)for(var _,s=(0,t.default)(this._children);!(_=s()).done;){var n=_.value;n.__getValue&&n.__callListeners(n.__getValue())}}}var l=n},313,[279,314,315]);
385__d(function(g,r,i,a,m,_e,d){'use strict';
385function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),s=e(r(d[1])),n=t.default.API,_=1;var o=class{__attach(){}__detach(){this.__isNative&&null!=this.__nativeTag&&(t.default.API.dropAnimatedNode(this.__nativeTag),this.__nativeTag=void 0)}__getValue(){}__getAnimatedValue(){return this.__getValue()}__addChild(e){}__removeChild(e){}__getChildren(){return[]}constructor(){this._listeners={}}__makeNative(e){if(!this.__isNative)throw new Error('This node cannot be made a "native" animated node');this._platformConfig=e,this.hasListeners()&&this._startListeningToNativeValueUpdates()}addListener(e){var t=String(_++);return this._listeners[t]=e,this.__isNative&&this._startListeningToNativeValueUpdates(),t}removeListener(e){delete this._listeners[e],this.__isNative&&!this.hasListeners()&&this._stopListeningForNativeValueUpdates()}removeAllListeners(){this._listeners={},this.__isNative&&this._stopListeningForNativeValueUpdates()}hasListeners(){return!!Object.keys(this._listeners).length}_startListeningToNativeValueUpdates(){this.__nativeAnimatedValueListener&&!this.__shouldUpdateListenersForNewNativeTag||(this.__shouldUpdateListenersForNewNativeTag&&(this.__shouldUpdateListenersForNewNativeTag=!1,this._stopListeningForNativeValueUpdates()),n.startListeningToAnimatedNodeValue(this.__getNativeTag()),this.__nativeAnimatedValueListener=t.default.nativeEventEmitter.addListener('onAnimatedValueUpdate',e=>{e.tag===this.__getNativeTag()&&this.__onAnimatedValueUpdateReceived(e.value)}))}__onAnimatedValueUpdateReceived(e){this.__callListeners(e)}__callListeners(e){for(var t in this._listeners)this._listeners[t]({value:e})}_stopListeningForNativeValueUpdates(){this.__nativeAnimatedValueListener&&(this.__nativeAnimatedValueListener.remove(),this.__nativeAnimatedValueListener=null,n.stopListeningToAnimatedNodeValue(this.__getNativeTag()))}__getNativeTag(){var e;t.default.assertNativeAnimatedModule(),(0,s.default)(this.__isNative,'Attempt to get native tag from node not marked as "native"');var n=null!==(e=this.__nativeTag)&&void 0!==e?e:t.default.generateNewNodeTag();if(null==this.__nativeTag){this.__nativeTag=n;var _=this.__getNativeConfig();this._platformConfig&&(_.platformConfig=this._platformConfig),t.default.API.createAnimatedNode(n,_),this.__shouldUpdateListenersForNewNativeTag=!0}return n}__getNativeConfig(){throw new Error('This JS animated node type cannot be used as native animated node')}toJSON(){return this.__getValue()}__getPlatformConfig(){return this._platformConfig}__setPlatformConfig(e){this._platformConfig=e}}},314,[315,24]);
386__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"API",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"isSupportedColorStyleProp",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"isSupportedStyleProp",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"isSupportedTransformProp",{enumerable:!0,get:function(){return I}}),Object.defineProperty(_e,"isSupportedInterpolationParam",{enumerable:!0,get:function(){return D}}),Object.defineProperty(_e,"addWhitelistedStyleProp",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"addWhitelistedTransformProp",{enumerable:!0,get:function(){return q}}),Object.defineProperty(_e,"addWhitelistedInterpolationParam",{enumerable:!0,get:function(){return V}}),Object.defineProperty(_e,"validateStyles",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"validateTransform",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"validateInterpolation",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_e,"generateNewNodeTag",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"generateNewAnimationId",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"assertNativeAnimatedModule",{enumerable:!0,get:function(){return W}}),Object.defineProperty(_e,"shouldUseNativeDriver",{enumerable:!0,get:function(){return M}}),Object.defineProperty(_e,"transformDataType",{enumerable:!0,get:function(){return _}});var t=e(r(d[0])),n=e(r(d[1])),o=(e(r(d[2])),e(r(d[3])));r(d[4]);var u,l=e(r(d[5])),s=e(r(d[6])),f=(e(r(d[7])),n.default),p=1,c=1,v=new Set,b=!1,N=[],O=null,y=f,A={getValue:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.getValue,e,t)},setWaitingForIdentifier:function(e){v.add(e),b=!0,l.default.animatedShouldDebounceQueueFlush()&&O&&clearTimeout(O)},unsetWaitingForIdentifier:function(e){v.delete(e),0===v.size&&(b=!1,A.disableQueue())},disableQueue:function(){((0,s.default)(y,'Native animated module is not available'),l.default.animatedShouldDebounceQueueFlush())?(clearImmediate(O),O=setImmediate(A.flushQueue)):A.flushQueue()},flushQueue:function(){},queueOperation:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];b||0!==N.length?N.push(()=>e(...n)):e(...n)},createAnimatedNode:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.createAnimatedNode,e,t)},updateAnimatedNodeConfig:function(e,t){(0,s.default)(y,'Native animated module is not available')},startListeningToAnimatedNodeValue:function(e){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.startListeningToAnimatedNodeValue,e)},stopListeningToAnimatedNodeValue:function(e){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.stopListeningToAnimatedNodeValue,e)},connectAnimatedNodes:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.connectAnimatedNodes,e,t)},disconnectAnimatedNodes:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.disconnectAnimatedNodes,e,t)},startAnimatingNode:function(e,t,n,o){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.startAnimatingNode,e,t,n,o)},stopAnimation:function(e){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.stopAnimation,e)},setAnimatedNodeValue:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.setAnimatedNodeValue,e,t)},setAnimatedNodeOffset:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.setAnimatedNodeOffset,e,t)},flattenAnimatedNodeOffset:function(e){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.flattenAnimatedNodeOffset,e)},extractAnimatedNodeOffset:function(e){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.extractAnimatedNodeOffset,e)},connectAnimatedNodeToView:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.connectAnimatedNodeToView,e,t)},disconnectAnimatedNodeFromView:function(e,t){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.disconnectAnimatedNodeFromView,e,t)},restoreDefaultValues:function(e){(0,s.default)(y,'Native animated module is not available'),null!=y.restoreDefaultValues&&A.queueOperation(y.restoreDefaultValues,e)},dropAnimatedNode:function(e){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.dropAnimatedNode,e)},addAnimatedEventToView:function(e,t,n){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.addAnimatedEventToView,e,t,n)}
386,removeAnimatedEventFromView(e,t,n){(0,s.default)(y,'Native animated module is not available'),A.queueOperation(y.removeAnimatedEventFromView,e,t,n)}},P={backgroundColor:!0,borderBottomColor:!0,borderColor:!0,borderEndColor:!0,borderLeftColor:!0,borderRightColor:!0,borderStartColor:!0,borderTopColor:!0,color:!0,tintColor:!0},h=(0,t.default)((0,t.default)({},P),{},{borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderRadius:!0,borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,elevation:!0,opacity:!0,transform:!0,zIndex:!0,shadowOpacity:!0,shadowRadius:!0,scaleX:!0,scaleY:!0,translateX:!0,translateY:!0}),w={translateX:!0,translateY:!0,scale:!0,scaleX:!0,scaleY:!0,rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,perspective:!0},T={inputRange:!0,outputRange:!0,extrapolate:!0,extrapolateRight:!0,extrapolateLeft:!0};function S(e){h[e]=!0}function q(e){w[e]=!0}function V(e){T[e]=!0}function j(e){return P.hasOwnProperty(e)}function R(e){return h.hasOwnProperty(e)}function I(e){return w.hasOwnProperty(e)}function D(e){return T.hasOwnProperty(e)}function C(e){e.forEach(e=>{if(!I(e.property))throw new Error("Property '"+e.property+"' is not supported by native animated module")})}function E(e){for(var t in e)if(!R(t))throw new Error("Style property '"+t+"' is not supported by native animated module")}function F(e){for(var t in e)if(!D(t))throw new Error("Interpolation property '"+t+"' is not supported by native animated module")}function x(){return p++}function L(){return c++}function W(){(0,s.default)(f,'Native animated module is not available')}var Q=!1;function M(e){return null==e.useNativeDriver&&console.warn("Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`"),!0!==e.useNativeDriver||f?e.useNativeDriver||!1:(Q||(console.warn("Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `bundle exec pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md"),Q=!0),!1)}function _(e){return'string'!=typeof e?e:/deg$/.test(e)?(parseFloat(e)||0)*Math.PI/180:e}var k={API:A,isSupportedColorStyleProp:j,isSupportedStyleProp:R,isSupportedTransformProp:I,isSupportedInterpolationParam:D,addWhitelistedStyleProp:S,addWhitelistedTransformProp:q,addWhitelistedInterpolationParam:V,validateStyles:E,validateTransform:C,validateInterpolation:F,generateNewNodeTag:x,generateNewAnimationId:L,assertNativeAnimatedModule:W,shouldUseNativeDriver:M,transformDataType:_,get nativeEventEmitter(){return u||(u=new o.default(null)),u}}},315,[19,316,318,319,321,322,24,320]);
387__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return e}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).get('NativeAnimatedModule')},316,[317]);
388__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),_e.get=u,_e.getEnforcing=function(e){var n=null;return(0,t.default)(null!=n,"TurboModuleRegistry.getEnforcing(...): '"+e+"' could not be found. Verify that a module by this name is registered in the native binary."),n};var e,n=r(d[0]),t=(e=n)&&e.__esModule?e:{default:e};function u(e){return null}},317,[24]);
389__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return e}});var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])).get('NativeAnimatedTurboModule')},318,[317]);
390__d(function(g,r,i,a,m,_e,d){'use strict';
390function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}}),r(d[0]);var t=e(r(d[1])),n=e(r(d[2]));class l{constructor(e){}addListener(e,n,l){var u;null==(u=this._nativeModule)||u.addListener(e);var s=t.default.addListener(e,n,l);return{remove:()=>{var e;null!=s&&(null==(e=this._nativeModule)||e.removeListeners(1),s.remove(),s=null)}}}removeListener(e,n){var l;null==(l=this._nativeModule)||l.removeListeners(1),t.default.removeListener(e,n)}emit(e){for(var n=arguments.length,l=new Array(n>1?n-1:0),u=1;u<n;u++)l[u-1]=arguments[u];t.default.emit(e,...l)}removeAllListeners(e){var l;(0,n.default)(null!=e,'`NativeEventEmitter.removeAllListener()` requires a non-null argument.'),null==(l=this._nativeModule)||l.removeListeners(this.listenerCount(e)),t.default.removeAllListeners(e)}listenerCount(e){return t.default.listenerCount(e)}}},319,[95,320,24]);
391__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=new((e=t)&&e.__esModule?e:{default:e}).default},320,[293]);
392__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},321,[95]);
393__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t={isLayoutAnimationEnabled:()=>!0,shouldEmitW3CPointerEvents:()=>!1,shouldPressibilityUseW3CPointerEventsForHover:()=>!1,animatedShouldDebounceQueueFlush:()=>!1,animatedShouldUseSingleOp:()=>!1}},322,[]);
394__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var t=e(r(d[0])),s=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3])),_=e(r(d[4])).default.flatten;function u(e){var l=_(e),n={};for(var f in l){var y=l[f];'transform'===f&&Array.isArray(y)?n[f]=new s.default(y):y instanceof t.default?n[f]=y:y&&!Array.isArray(y)&&'object'==typeof y&&(n[f]=u(y))}return n}class f extends l.default{constructor(e){super(),this._inputStyle=e,this._style=u(e)}_walkStyleAndGetValues(e){var s={};for(var l in e){var n=e[l];n instanceof t.default?n.__isNative||(s[l]=n.__getValue()):n&&!Array.isArray(n)&&'object'==typeof n?s[l]=this._walkStyleAndGetValues(n):s[l]=n}return s}__getValue(){return[this._inputStyle,this._walkStyleAndGetValues(this._style)]}_walkStyleAndGetAnimatedValues(e){var s={};for(var l in e){var n=e[l];n instanceof t.default?s[l]=n.__getAnimatedValue():n&&!Array.isArray(n)&&'object'==typeof n&&(s[l]=this._walkStyleAndGetAnimatedValues(n))}return s}__getAnimatedValue(){return this._walkStyleAndGetAnimatedValues(this._style)}__attach(){for(var e in this._style){var s=this._style[e];s instanceof t.default&&s.__addChild(this)}}__detach(){for(var e in this._style){var s=this._style[e];s instanceof t.default&&s.__removeChild(this)}super.__detach()}__makeNative(){for(var e in this._style){var s=this._style[e];s instanceof t.default&&s.__makeNative()}super.__makeNative()}__getNativeConfig(){var e={};for(var s in this._style)if(this._style[s]instanceof t.default){var l=this._style[s];l.__makeNative(),e[s]=l.__getNativeTag()}return n.default.validateStyles(e),{type:'style',style:e}}}var y=f},323,[314,324,313,315,42]);
395__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e=t(r(d[0])),n=t(r(d[1])),s=t(r(d[2]));class f extends n.default{constructor(t){super(),this._transforms=t}
395__makeNative(){this._transforms.forEach(t=>{for(var n in t){var s=t[n];s instanceof e.default&&s.__makeNative()}}),super.__makeNative()}__getValue(){return this._transforms.map(t=>{var n={};for(var s in t){var f=t[s];f instanceof e.default?n[s]=f.__getValue():n[s]=f}return n})}__getAnimatedValue(){return this._transforms.map(t=>{var n={};for(var s in t){var f=t[s];f instanceof e.default?n[s]=f.__getAnimatedValue():n[s]=f}return n})}__attach(){this._transforms.forEach(t=>{for(var n in t){var s=t[n];s instanceof e.default&&s.__addChild(this)}})}__detach(){this._transforms.forEach(t=>{for(var n in t){var s=t[n];s instanceof e.default&&s.__removeChild(this)}}),super.__detach()}__getNativeConfig(){var t=[];return this._transforms.forEach(n=>{for(var f in n){var o=n[f];o instanceof e.default?t.push({type:'animated',property:f,nodeTag:o.__getNativeTag()}):t.push({type:'static',property:f,value:s.default.transformDataType(o)})}}),s.default.validateTransform(t),{type:'transform',transforms:t}}}var o=f},324,[314,313,315]);
396__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var t=r(d[0]);function u(u){var n=(0,t.useRef)(void 0);return(0,t.useCallback)(t=>{n.current&&(n.current(),n.current=void 0),null!=t&&(n.current=u(t))},[u])}},325,[34]);
397__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var n=r(d[0]);function t(){for(var t=arguments.length,u=new Array(t),f=0;f<t;f++)u[f]=arguments[f];return(0,n.useCallback)(n=>{for(var t=0,f=u;t<f.length;t++){var l=f[t];null!=l&&('function'==typeof l?l(n):l.current=n)}},[...u])}},326,[34]);
398__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}}),r(d[0]);var t=e(r(d[1])),u=(0,e(r(d[2])).default)(t.default)},327,[34,328,307]);
399__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return P}});var t=e(r(_d[0])),n=e(r(_d[1])),o=e(r(_d[2])),l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),u=e(r(_d[4])),d=r(_d[5]),s=r(_d[6]),c=e(r(_d[7])),f=e(r(_d[8])),h=e(r(_d[9])),p=e(r(_d[10])),b=e(r(_d[11])),y=r(_d[12]),v=["aria-label","accessibilityLabel","blurRadius","defaultSource","draggable","onError","onLayout","onLoad","onLoadEnd","onLoadStart","pointerEvents","source","style"],w='LOADED',E='LOADING',z=0,S=/^(data:image\/svg\+xml;utf8,)(.*)/;function k(e,t){return e&&null!=t?l.createElement("svg",{style:{position:'absolute',height:0,visibility:'hidden',width:0}},l.createElement("defs",null,l.createElement("filter",{id:"tint-"+t,suppressHydrationWarning:!0},l.createElement("feFlood",{floodColor:""+e,key:e}),l.createElement("feComposite",{in2:"SourceAlpha",operator:"in"})))):null}function I(e,t,n,o){var l=h.default.flatten(e),u=l.filter,d=l.resizeMode,c=l.shadowOffset,f=l.tintColor;l.resizeMode&&(0,y.warnOnce)('Image.style.resizeMode','Image: style.resizeMode is deprecated. Please use props.resizeMode.'),l.tintColor&&(0,y.warnOnce)('Image.style.tintColor','Image: style.tintColor is deprecated. Please use props.tintColor.');var p=[],b=null;if(u&&p.push(u),t&&p.push("blur("+t+"px)"),c){var v=(0,s.createBoxShadowValue)(l);v&&p.push("drop-shadow("+v+")")}return(o||f)&&null!=n&&p.push("url(#tint-"+n+")"),p.length>0&&(b=p.join(' ')),[d,b,f]}function C(e){if('number'==typeof e){var t=(0,d.getAssetByID)(e);return{height:t.height,width:t.width}}if(null!=e&&!Array.isArray(e)&&'object'==typeof e)return{height:e.height,width:e.width}}function O(e){var t=null;if('number'==typeof e){var n=(0,d.getAssetByID)(e);if(null==n)throw new Error("Image: asset with ID \""+e+"\" could not be found. Please check the image source or packager.");var o=n.scales[0];if(n.scales.length>1){var l=f.default.get();o=n.scales.reduce((e,t)=>
399Math.abs(t-l)<Math.abs(e-l)?t:e)}var u=1!==o?"@"+o+"x":'';t=n?n.httpServerLocation+"/"+n.name+u+"."+n.type:''}else'string'==typeof e?t=e:e&&'string'==typeof e.uri&&(t=e.uri);if(t){var s=t.match(S);if(s){var c=s[1],h=s[2];return""+c+encodeURIComponent(h)}}return t}var L=l.forwardRef((e,t)=>{var d=e['aria-label'],s=e.accessibilityLabel,f=e.blurRadius,h=e.defaultSource,y=e.draggable,S=e.onError,L=e.onLayout,M=e.onLoad,P=e.onLoadEnd,j=e.onLoadStart,D=e.pointerEvents,_=e.source,A=e.style,B=(0,o.default)(e,v),F=d||s,H=l.useState(()=>{var e=O(_);if(null!=e&&c.default.has(e))return w;return"IDLE"}),W=H[0],q=H[1],N=l.useState({}),$=N[0],G=N[1],U=l.useContext(p.default),V=l.useRef(null),J=l.useRef(z++),K=l.useRef(null),Q=W===w||W===E&&null==h,T=I(A,f,J.current,e.tintColor),X=T[0],Y=T[1],Z=T[2],ee=e.resizeMode||X||'cover',te=e.tintColor||Z,re=Q?_:h,ae=O(re),ne=C(re),oe=ae?"url(\""+ae+"\")":null,le=(function(){if(null!=V.current&&('center'===ee||'repeat'===ee)){var e=V.current,t=e.naturalHeight,n=e.naturalWidth,o=$.height,l=$.width;if(t&&n&&o&&l){var u=Math.min(1,l/n,o/t);return Math.ceil(u*n)+"px "+Math.ceil(u*t)+"px"}}})(),ue=ae?(0,u.default)('img',{alt:F||'',style:R.accessibilityImage$raw,draggable:y||!1,ref:V,src:ae}):null;var ie=O(_);return l.useEffect(()=>{function e(){null!=K.current&&(c.default.abort(K.current),K.current=null)}return e(),null!=ie&&(q(E),j&&j(),K.current=c.default.load(ie,function(e){q(w),M&&M(e),P&&P()},function(){q("ERRORED"),S&&S({nativeEvent:{error:"Failed to load resource "+ie}}),P&&P()})),e},[ie,K,q,S,M,P,j]),l.createElement(b.default,(0,n.default)({},B,{"aria-label":F,onLayout:function(e){if('center'===ee||'repeat'===ee||L){var t=e.nativeEvent.layout;L&&L(e),G(t)}},pointerEvents:D,ref:t,style:[R.root,U&&R.inline,ne,A,R.undo,{boxShadow:null}]}),l.createElement(b.default,{style:[R.image,x[ee],{backgroundImage:oe,filter:Y},null!=le&&{backgroundSize:le}],suppressHydrationWarning:!0}),ue,k(te,J.current))});L.displayName='Image';var M=L;M.getSize=function(e,t,n){c.default.getSize(e,t,n)},M.prefetch=function(e){return c.default.prefetch(e)},M.queryCache=function(e){return c.default.queryCache(e)};var R=h.default.create({root:{flexBasis:'auto',overflow:'hidden',zIndex:0},inline:{display:'inline-flex'},undo:{blurRadius:null,shadowColor:null,shadowOpacity:null,shadowOffset:null,shadowRadius:null,tintColor:null,overlayColor:null,resizeMode:null},image:(0,t.default)((0,t.default)({},h.default.absoluteFillObject),{},{backgroundColor:'transparent',backgroundPosition:'center',backgroundRepeat:'no-repeat',backgroundSize:'cover',height:'100%',width:'100%',zIndex:-1}),accessibilityImage$raw:(0,t.default)((0,t.default)({},h.default.absoluteFillObject),{},{height:'100%',opacity:0,width:'100%',zIndex:-1})}),x=h.default.create({center:{backgroundSize:'auto'},contain:{backgroundSize:'contain'},cover:{backgroundSize:'cover'},none:{backgroundPosition:'0',backgroundSize:'auto'},repeat:{backgroundPosition:'0',backgroundRepeat:'repeat',backgroundSize:'auto'},stretch:{backgroundSize:'100% 100%'}}),P=M},328,[19,27,43,34,223,329,86,330,331,42,251,276,87]);
400__d(function(g,r,i,a,m,e,d){const s=[];m.exports={registerAsset:t=>s.push(t),getAssetByID:t=>s[t-1]}},329,[]);
401__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"ImageUriCache",{enumerable:!0,get:function(){return t}});var e=/^data:/;class t{static has(n){var o=t._entries;return e.test(n)||Boolean(o[n])}static add(e){var n=t._entries,o=Date.now();n[e]?(n[e].lastUsedTimestamp=o,n[e].refCount+=1):n[e]={lastUsedTimestamp:o,refCount:1}}static remove(e){var n=t._entries;n[e]&&(n[e].refCount-=1),t._cleanUpIfNeeded()}static _cleanUpIfNeeded(){var e,n,o=t._entries,s=Object.keys(o);s.length+1>t._maximumEntries&&(s.forEach(t=>{var s=o[t];(!n||s.lastUsedTimestamp<n.lastUsedTimestamp)&&0===s.refCount&&(e=t,n=s)}),e&&delete o[e])}}t._maximumEntries=256,t._entries={};var n=0,o={},s={abort(e){var t=o[""+e];t&&(t.onerror=null,t.onload=null,t=null,delete o[""+e])},getSize(e,t,n){var l=!1,u=setInterval(f,16),c=s.load(e,f,function(){'function'==typeof n&&n();s.abort(c),clearInterval(u)});function f(){var e=o[""+c];
401if(e){var n=e.naturalHeight,f=e.naturalWidth;n&&f&&(t(f,n),l=!0)}l&&(s.abort(c),clearInterval(u))}},has:e=>t.has(e),load(e,t,s){n+=1;var l=new window.Image;return l.onerror=s,l.onload=e=>{var n=()=>t({nativeEvent:e});'function'==typeof l.decode?l.decode().then(n,n):setTimeout(n,0)},l.src=e,o[""+n]=l,n},prefetch:e=>new Promise((n,o)=>{s.load(e,()=>{t.add(e),t.remove(e),n()},o)}),queryCache(e){var n={};return e.forEach(e=>{t.has(e)&&(n[e]='disk/memory')}),Promise.resolve(n)}},l=s},330,[]);
402__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};class n{static get(){return u.default.get('window').scale}static getFontScale(){return u.default.get('window').fontScale||n.get()}static getPixelSizeForLayoutSize(e){return Math.round(e*n.get())}static roundToNearestPixel(e){var t=n.get();return Math.round(e*t)/t}}},331,[284]);
403__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(_d[0])),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),u=e(r(_d[2])),f=e(r(_d[3])),o=n.forwardRef((e,f)=>n.createElement(u.default,(0,t.default)({scrollEventThrottle:1e-4},e,{ref:f}))),c=(0,f.default)(o)},332,[27,34,283,307]);
404__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(_d[0])),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),u=e(r(_d[2])),f=e(r(_d[3])),o=n.forwardRef((e,f)=>n.createElement(u.default,(0,t.default)({scrollEventThrottle:1e-4},e,{ref:f}))),c=(0,f.default)(o)},333,[27,34,334,307]);
405__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},334,[335]);
406__d(function(g,r,i,a,m,_e,_d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var t=e(r(_d[0])),s=e(r(_d[1]));r(_d[2]);var n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t})(r(_d[3])),o=e(r(_d[4])),c=["stickySectionHeadersEnabled"];class l extends n.PureComponent{constructor(){super(...arguments),this._captureRef=e=>{this._wrapperListRef=e}}scrollToLocation(e){null!=this._wrapperListRef&&this._wrapperListRef.scrollToLocation(e)}recordInteraction(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.recordInteraction()}flashScrollIndicators(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.flashScrollIndicators()}getScrollResponder(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollResponder()}getScrollableNode(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollableNode()}render(){var e=this.props,l=e.stickySectionHeadersEnabled,f=(0,s.default)(e,c),p=null!=l&&l;return n.createElement(o.default,(0,t.default)({},f,{stickySectionHeadersEnabled:p,ref:this._captureRef,getItemCount:e=>e.length,getItem:(e,t)=>e[t]}))}}},335,[27,43,95,34,336]);
407__d(function(g,r,_i,a,m,_e,_d){"use strict";
407function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return S}});var t=e(r(_d[0])),i=e(r(_d[1])),n=e(r(_d[2])),o=e(r(_d[3])),s=e(r(_d[4])),l=e(r(_d[5])),d=r(_d[6]),p=e(r(_d[7])),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(i){var n=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return e[i]}})}),t.default=e,t})(r(_d[8])),c=["ItemSeparatorComponent","SectionSeparatorComponent","renderItem","renderSectionFooter","renderSectionHeader","sections","stickySectionHeadersEnabled"];class h extends u.PureComponent{constructor(){super(...arguments),this._keyExtractor=(e,t)=>{var i=this._subExtractor(t);return i&&i.key||String(t)},this._convertViewable=e=>{var t;(0,p.default)(null!=e.index,'Received a broken ViewToken');var i=this._subExtractor(e.index);if(!i)return null;var n=i.section.keyExtractor,s=this.props.keyExtractor||d.keyExtractor,l=null!=n?n(e.item,i.index):s(e.item,null!==(t=i.index)&&void 0!==t?t:0);return(0,o.default)((0,o.default)({},e),{},{index:i.index,key:l,section:i.section})},this._onViewableItemsChanged=e=>{var t=e.viewableItems,i=e.changed,n=this.props.onViewableItemsChanged;null!=n&&n({viewableItems:t.map(this._convertViewable,this).filter(Boolean),changed:i.map(this._convertViewable,this).filter(Boolean)})},this._renderItem=e=>t=>{var i=t.item,n=t.index,o=this._subExtractor(n);if(!o)return null;var s=o.index;if(null==s){var l=o.section;if(!0===o.header){var d=this.props.renderSectionHeader;return d?d({section:l}):null}var c=this.props.renderSectionFooter;return c?c({section:l}):null}var h=o.section.renderItem||this.props.renderItem,S=this._getSeparatorComponent(n,o,e);return(0,p.default)(h,'no renderItem!'),u.createElement(f,{SeparatorComponent:S,LeadingSeparatorComponent:0===s?this.props.SectionSeparatorComponent:void 0,cellKey:o.key,index:s,item:i,leadingItem:o.leadingItem,leadingSection:o.leadingSection,prevCellKey:(this._subExtractor(n-1)||{}).key,setSelfHighlightCallback:this._setUpdateHighlightFor,setSelfUpdatePropsCallback:this._setUpdatePropsFor,updateHighlightFor:this._updateHighlightFor,updatePropsFor:this._updatePropsFor,renderItem:h,section:o.section,trailingItem:o.trailingItem,trailingSection:o.trailingSection,inverted:!!this.props.inverted})},this._updatePropsFor=(e,t)=>{var i=this._updatePropsMap[e];null!=i&&i(t)},this._updateHighlightFor=(e,t)=>{var i=this._updateHighlightMap[e];null!=i&&i(t)},this._setUpdateHighlightFor=(e,t)=>{null!=t?this._updateHighlightMap[e]=t:delete this._updateHighlightFor[e]},this._setUpdatePropsFor=(e,t)=>{null!=t?this._updatePropsMap[e]=t:delete this._updatePropsMap[e]},this._updateHighlightMap={},this._updatePropsMap={},this._captureRef=e=>{this._listRef=e}}scrollToLocation(e){for(var t=e.itemIndex,i=0;i<e.sectionIndex;i++)t+=this.props.getItemCount(this.props.sections[i].data)+2;var n=e.viewOffset||0;if(null!=this._listRef){if(e.itemIndex>0&&this.props.stickySectionHeadersEnabled)n+=this._listRef.__getFrameMetricsApprox(t-e.itemIndex,this._listRef.props).length;var s=(0,o.default)((0,o.default)({},e),{},{viewOffset:n,index:t});this._listRef.scrollToIndex(s)}}getListRef(){return this._listRef}render(){for(var e,o=this.props,s=(o.ItemSeparatorComponent,o.SectionSeparatorComponent,o.renderItem,o.renderSectionFooter,o.renderSectionHeader,o.sections,o.stickySectionHeadersEnabled,(0,n.default)(o,c)),d=this.props.ListHeaderComponent?1:0,p=this.props.stickySectionHeadersEnabled?[]:void 0,h=0,f=(0,i.default)(this.props.sections);!(e=f()).done;){var S=e.value;null!=p&&p.push(h+d),h+=2,h+=this.props.getItemCount(S.data)}var _=this._renderItem(h);return u.createElement(l.default,(0,t.default)({},s,{keyExtractor:this._keyExtractor,stickyHeaderIndices:p,renderItem:_,data:this.props.sections,getItem:(e,t)=>this._getItem(this.props,e,t),getItemCount:()=>h,onViewableItemsChanged:this.props.onViewableItemsChanged?this._onViewableItemsChanged:void 0,ref:this._captureRef}))}_getItem(e,t,i){if(!t)return null;for(var n=i-1,o=0;o<t.length;o++){var s=t[o],l=s.data,d=e.getItemCount(l);
407if(-1===n||n===d)return s;if(n<d)return e.getItem(l,n);n-=d+2}return null}_subExtractor(e){for(var t=e,i=this.props,n=i.getItem,o=i.getItemCount,s=i.keyExtractor,l=i.sections,p=0;p<l.length;p++){var u=l[p],c=u.data,h=u.key||String(p);if(!((t-=1)>=o(c)+1))return-1===t?{section:u,key:h+':header',index:null,header:!0,trailingSection:l[p+1]}:t===o(c)?{section:u,key:h+':footer',index:null,header:!1,trailingSection:l[p+1]}:{section:u,key:h+':'+(u.keyExtractor||s||d.keyExtractor)(n(c,t),t),index:t,leadingItem:n(c,t-1),leadingSection:l[p-1],trailingItem:n(c,t+1),trailingSection:l[p+1]};t-=o(c)+1}}_getSeparatorComponent(e,t,i){if(!(t=t||this._subExtractor(e)))return null;var n=t.section.ItemSeparatorComponent||this.props.ItemSeparatorComponent,o=this.props.SectionSeparatorComponent,s=e===i-1,l=t.index===this.props.getItemCount(t.section.data)-1;return o&&l?o:!n||l||s?null:n}}function f(e){var i=e.LeadingSeparatorComponent,n=e.SeparatorComponent,l=e.cellKey,d=e.prevCellKey,p=e.setSelfHighlightCallback,c=e.updateHighlightFor,h=e.setSelfUpdatePropsCallback,f=e.updatePropsFor,S=e.item,_=e.index,I=e.section,v=e.inverted,x=u.useState(!1),C=x[0],b=x[1],y=u.useState(!1),k=y[0],E=y[1],H=u.useState({leadingItem:e.leadingItem,leadingSection:e.leadingSection,section:e.section,trailingItem:e.item,trailingSection:e.trailingSection}),P=H[0],F=H[1],w=u.useState({leadingItem:e.item,leadingSection:e.leadingSection,section:e.section,trailingItem:e.trailingItem,trailingSection:e.trailingSection}),M=w[0],R=w[1];u.useEffect(()=>(p(l,E),h(l,R),()=>{h(l,null),p(l,null)}),[l,p,R,h]);var V={highlight:()=>{b(!0),E(!0),null!=d&&c(d,!0)},unhighlight:()=>{b(!1),E(!1),null!=d&&c(d,!1)},updateProps:(e,t)=>{'leading'===e?null!=i?F((0,o.default)((0,o.default)({},P),t)):null!=d&&f(d,(0,o.default)((0,o.default)({},P),t)):'trailing'===e&&null!=n&&R((0,o.default)((0,o.default)({},M),t))}},O=e.renderItem({item:S,index:_,section:I,separators:V}),U=null!=i&&u.createElement(i,(0,t.default)({highlighted:C},P)),j=null!=n&&u.createElement(n,(0,t.default)({highlighted:k},M));return U||j?u.createElement(s.default,null,!1===v?U:j,O,!1===v?j:U):O}var S=h},336,[27,279,43,19,276,278,304,24,34]);
408__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}}),r(d[0]);var t=e(r(d[1])),u=(0,e(r(d[2])).default)(t.default)},337,[34,222,307]);
409__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}}),r(d[0]);var t=e(r(d[1])),u=(0,e(r(d[2])).default)(t.default)},338,[34,276,307]);
410__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var e=t(r(d[0])),n=r(d[1]),u=t(r(d[2])),l=t(r(d[3])),f=t(r(d[4])),o=t(r(d[5])),c=t(r(d[6])),s=t(r(d[7])),v=t(r(d[8])),p=!1;function E(t){return e=>{var n=null==e?e:function(){if(p)console.warn('Ignoring recursive animation callback when running mock animations');else{p=!0;try{e(...arguments)}finally{p=!1}}};t(n)}}var y={start:()=>{},stop:()=>{},reset:()=>{},_startNativeLoop:()=>{},_isUsingNativeDriver:()=>!1},_=t=>(0,e.default)((0,e.default)({},y),{},{start:E(e=>{t.forEach(t=>t.start()),null==e||e({finished:!0})})}),h={Value:o.default,ValueXY:c.default,Color:v.default,Interpolation:l.default,Node:f.default,decay:function(t,e){return y},timing:function(t,n){var u=t;return(0,e.default)((0,e.default)({},y),{},{start:E(t=>{u.setValue(n.toValue),null==t||t({finished:!0})})})},spring:function(t,n){var u=t;return(0,e.default)((0,e.default)({},y),{},{start:E(t=>{u.setValue(n.toValue),null==t||t({finished:!0})})})},add:u.default.add,subtract:u.default.subtract,divide:u.default.divide,multiply:u.default.multiply,modulo:u.default.modulo,diffClamp:u.default.diffClamp,delay:function(t){return y},sequence:function(t){return _(t)},parallel:function(t,e){return _(t)},stagger:function(t,e){return _(e)},loop:function(t,e){(void 0===e?{}:e).iterations;return y},event:u.default.event,createAnimatedComponent:s.default,attachNativeEvent:n.attachNativeEvent,forkEvent:u.default.forkEvent,unforkEvent:u.default.unforkEvent,Event:n.AnimatedEvent}},339,[19,310,340,312,314,311,348,307,353]);
411__d(function(_g,_r,_i,_a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}
411Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return k}});var n=t(_r(d[0])),e=_r(d[1]),i=t(_r(d[2])),r=t(_r(d[3])),a=t(_r(d[4])),o=t(_r(d[5])),u=t(_r(d[6])),f=t(_r(d[7])),s=t(_r(d[8]));_r(d[9]);var c=t(_r(d[10])),v=t(_r(d[11])),l=t(_r(d[12])),p=t(_r(d[13])),g=t(_r(d[14])),_=t(_r(d[15])),h=t(_r(d[16])),N=t(_r(d[17])),w=t(_r(d[18])),E=function(t,n){return t&&n.onComplete?function(){n.onComplete&&n.onComplete(...arguments),t&&t(...arguments)}:t||n.onComplete},A=function(t,e,i){if(t instanceof p.default){var r=(0,n.default)({},e),a=(0,n.default)({},e);for(var o in e){var u=e[o],f=u.x,s=u.y;void 0!==f&&void 0!==s&&(r[o]=f,a[o]=s)}var c=i(t.x,r),v=i(t.y,a);return y([c,v],{stopTogether:!1})}if(t instanceof w.default){var l=(0,n.default)({},e),g=(0,n.default)({},e),_=(0,n.default)({},e),h=(0,n.default)({},e);for(var N in e){var E=e[N],A=E.r,D=E.g,L=E.b,U=E.a;void 0!==A&&void 0!==D&&void 0!==L&&void 0!==U&&(l[N]=A,g[N]=D,_[N]=L,h[N]=U)}var k=i(t.r,l),C=i(t.g,g),V=i(t.b,_),b=i(t.a,h);return y([k,C,V,b],{stopTogether:!1})}return null},D=function t(e,i){var r=function(t,n,e){e=E(e,n);var i=t,r=n;i.stopTracking(),n.toValue instanceof s.default?i.track(new v.default(i,n.toValue,h.default,r,e)):i.animate(new h.default(r),e)};return A(e,i,t)||{start:function(t){r(e,i,t)},stop:function(){e.stopAnimation()},reset:function(){e.resetAnimation()},_startNativeLoop:function(t){var a=(0,n.default)((0,n.default)({},i),{},{iterations:t});r(e,a)},_isUsingNativeDriver:function(){return i.useNativeDriver||!1}}},L=function(t){var n=0;return{start:function(e){0===t.length?e&&e({finished:!0}):t[n].start(function i(r){if(r.finished){if(++n===t.length)return n=0,void(e&&e(r));t[n].start(i)}else e&&e(r)})},stop:function(){n<t.length&&t[n].stop()},reset:function(){t.forEach((t,e)=>{e<=n&&t.reset()}),n=0},_startNativeLoop:function(){throw new Error('Loops run using the native driver cannot contain Animated.sequence animations')},_isUsingNativeDriver:function(){return!1}}},y=function(t,n){var e=0,i={},r=!(n&&!1===n.stopTogether),a={start:function(n){e!==t.length?t.forEach((o,u)=>{var f=function(o){if(i[u]=!0,++e===t.length)return e=0,void(n&&n(o));!o.finished&&r&&a.stop()};o?o.start(f):f({finished:!0})}):n&&n({finished:!0})},stop:function(){t.forEach((t,n)=>{!i[n]&&t.stop(),i[n]=!0})},reset:function(){t.forEach((t,n)=>{t.reset(),i[n]=!1,e=0})},_startNativeLoop:function(){throw new Error('Loops run using the native driver cannot contain Animated.parallel animations')},_isUsingNativeDriver:function(){return!1}};return a},U=function(t){return D(new l.default(0),{toValue:0,delay:t,duration:0,useNativeDriver:!1})};var k={Value:l.default,ValueXY:p.default,Color:w.default,Interpolation:o.default,Node:s.default,decay:function t(e,i){var r=function(t,n,e){e=E(e,n);var i=t,r=n;i.stopTracking(),i.animate(new g.default(r),e)};return A(e,i,t)||{start:function(t){r(e,i,t)},stop:function(){e.stopAnimation()},reset:function(){e.resetAnimation()},_startNativeLoop:function(t){var a=(0,n.default)((0,n.default)({},i),{},{iterations:t});r(e,a)},_isUsingNativeDriver:function(){return i.useNativeDriver||!1}}},timing:D,spring:function t(e,i){var r=function(t,n,e){e=E(e,n);var i=t,r=n;i.stopTracking(),n.toValue instanceof s.default?i.track(new v.default(i,n.toValue,_.default,r,e)):i.animate(new _.default(r),e)};return A(e,i,t)||{start:function(t){r(e,i,t)},stop:function(){e.stopAnimation()},reset:function(){e.resetAnimation()},_startNativeLoop:function(t){var a=(0,n.default)((0,n.default)({},i),{},{iterations:t});r(e,a)},_isUsingNativeDriver:function(){return i.useNativeDriver||!1}}},add:function(t,n){return new i.default(t,n)},subtract:function(t,n){return new c.default(t,n)},divide:function(t,n){return new a.default(t,n)},multiply:function(t,n){return new f.default(t,n)},modulo:function(t,n){return new u.default(t,n)},diffClamp:function(t,n,e){return new r.default(t,n,e)},delay:U,sequence:L,parallel:y,stagger:function(t,n){return y(n.map((n,e)=>L([U(t*e),n])))},loop:function(t,n){var e=void 0===n?{}:n,i=e.iterations,r=void 0===i?-1:i,a=e.resetBeforeIteration,o=void 0===a||a,u=!1,f=0;return{start:function(n){t&&0!==r?t._isUsingNativeDriver()?t._startNativeLoop(r):(function e(i){void 0===i&&(i={finished:!0}),u||f===r||!1===i.finished?n&&n(i):(f++,o&&t.reset(),t.start(e))})():n&&n({finished:!0})},stop:function(){u=!0,t.stop()},reset:function(){f=0,u=!1,t.reset()},_startNativeLoop:function(){throw new Error('Loops run using the native driver cannot contain Animated.loop animations')},_isUsingNativeDriver:function(){return t._isUsingNativeDriver()}}},event:function(t,n){var i=new e.AnimatedEvent(t,n);return i.__isNative?i:i.__getHandler()},createAnimatedComponent:N.default,attachNativeEvent:e.attachNativeEvent,forkEvent:function(t,n){return t?t instanceof e.AnimatedEvent?(t.__addListener(n),t):function(){'function'==typeof t&&t(...arguments),n(...arguments)}:n},unforkEvent:function(t,n){t&&t instanceof e.AnimatedEvent&&t.__removeListener(n)},Event:e.AnimatedEvent}},340,[19,310,341,342,343,312,344,345,314,309,346,347,311,348,349,351,354,307,353]);
412__d(function(g,r,i,_a,m,_e,d){'use strict';
412function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t=e(r(d[0])),_=e(r(d[1])),a=e(r(d[2]));class u extends a.default{constructor(e,t){super(),this._a='number'==typeof e?new _.default(e):e,this._b='number'==typeof t?new _.default(t):t}__makeNative(e){this._a.__makeNative(e),this._b.__makeNative(e),super.__makeNative(e)}__getValue(){return this._a.__getValue()+this._b.__getValue()}interpolate(e){return new t.default(this,e)}__attach(){this._a.__addChild(this),this._b.__addChild(this)}__detach(){this._a.__removeChild(this),this._b.__removeChild(this),super.__detach()}__getNativeConfig(){return{type:'addition',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}var s=u},341,[312,311,313]);
413__d(function(g,r,i,_a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var e=t(r(d[0])),a=t(r(d[1]));class _ extends a.default{constructor(t,e,a){super(),this._a=t,this._min=e,this._max=a,this._value=this._lastValue=this._a.__getValue()}__makeNative(t){this._a.__makeNative(t),super.__makeNative(t)}interpolate(t){return new e.default(this,t)}__getValue(){var t=this._a.__getValue(),e=t-this._lastValue;return this._lastValue=t,this._value=Math.min(Math.max(this._value+e,this._min),this._max),this._value}__attach(){this._a.__addChild(this)}__detach(){this._a.__removeChild(this),super.__detach()}__getNativeConfig(){return{type:'diffclamp',input:this._a.__getNativeTag(),min:this._min,max:this._max}}}var s=_},342,[312,313]);
414__d(function(g,r,i,_a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),_=e(r(d[1])),a=e(r(d[2])),n=e(r(d[3]));class s extends n.default{constructor(e,t){super(),this._warnedAboutDivideByZero=!1,(0===t||t instanceof _.default&&0===t.__getValue())&&console.error('Detected potential division by zero in AnimatedDivision'),this._a='number'==typeof e?new a.default(e):e,this._b='number'==typeof t?new a.default(t):t}__makeNative(e){this._a.__makeNative(e),this._b.__makeNative(e),super.__makeNative(e)}__getValue(){var e=this._a.__getValue(),t=this._b.__getValue();return 0===t?(this._warnedAboutDivideByZero||(console.error('Detected division by zero in AnimatedDivision'),this._warnedAboutDivideByZero=!0),0):(this._warnedAboutDivideByZero=!1,e/t)}interpolate(e){return new t.default(this,e)}__attach(){this._a.__addChild(this),this._b.__addChild(this)}__detach(){this._a.__removeChild(this),this._b.__removeChild(this),super.__detach()}__getNativeConfig(){return{type:'division',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}var o=s},343,[312,314,311,313]);
415__d(function(g,r,i,_a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return a}});var t=e(r(d[0])),_=e(r(d[1]));class u extends _.default{constructor(e,t){super(),this._a=e,this._modulus=t}__makeNative(e){this._a.__makeNative(e),super.__makeNative(e)}__getValue(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus}interpolate(e){return new t.default(this,e)}__attach(){this._a.__addChild(this)}__detach(){this._a.__removeChild(this),super.__detach()}__getNativeConfig(){return{type:'modulus',input:this._a.__getNativeTag(),modulus:this._modulus}}}var a=u},344,[312,313]);
416__d(function(g,r,i,_a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t=e(r(d[0])),_=e(r(d[1])),a=e(r(d[2]));class u extends a.default{constructor(e,t){super(),this._a='number'==typeof e?new _.default(e):e,this._b='number'==typeof t?new _.default(t):t}__makeNative(e){this._a.__makeNative(e),this._b.__makeNative(e),super.__makeNative(e)}__getValue(){return this._a.__getValue()*this._b.__getValue()}interpolate(e){return new t.default(this,e)}__attach(){this._a.__addChild(this),this._b.__addChild(this)}__detach(){this._a.__removeChild(this),this._b.__removeChild(this),super.__detach()}__getNativeConfig(){return{type:'multiplication',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}var s=u},345,[312,311,313]);
417__d(function(g,r,i,_a,m,_e,d){'use strict';
417function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t=e(r(d[0])),_=e(r(d[1])),a=e(r(d[2]));class u extends a.default{constructor(e,t){super(),this._a='number'==typeof e?new _.default(e):e,this._b='number'==typeof t?new _.default(t):t}__makeNative(e){this._a.__makeNative(e),this._b.__makeNative(e),super.__makeNative(e)}__getValue(){return this._a.__getValue()-this._b.__getValue()}interpolate(e){return new t.default(this,e)}__attach(){this._a.__addChild(this),this._b.__addChild(this)}__detach(){this._a.__removeChild(this),this._b.__removeChild(this),super.__detach()}__getNativeConfig(){return{type:'subtraction',input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}}}var s=u},346,[312,311,313]);
418__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e=t(r(d[0]));r(d[1]);var _=t(r(d[2])),n=r(d[3]);class s extends _.default{constructor(t,e,_,s,u){super(),this._value=t,this._parent=e,this._animationClass=_,this._animationConfig=s,this._useNativeDriver=(0,n.shouldUseNativeDriver)(s),this._callback=u,this.__attach()}__makeNative(){this.__isNative=!0,this._parent.__makeNative(),super.__makeNative(),this._value.__makeNative()}__getValue(){return this._parent.__getValue()}__attach(){this._parent.__addChild(this),this._useNativeDriver&&this.__makeNative()}__detach(){this._parent.__removeChild(this),super.__detach()}update(){this._value.animate(new this._animationClass((0,e.default)((0,e.default)({},this._animationConfig),{},{toValue:this._animationConfig.toValue.__getValue()})),this._callback)}__getNativeConfig(){var t=new this._animationClass((0,e.default)((0,e.default)({},this._animationConfig),{},{toValue:void 0})).__getNativeAnimationConfig();return{type:'tracking',animationId:(0,n.generateNewAnimationId)(),animationConfig:t,toValue:this._parent.__getNativeTag(),value:this._value.__getNativeTag()}}}var u=s},347,[19,311,314,315]);
419__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e=t(r(d[0])),s=t(r(d[1])),n=t(r(d[2])),l=1;class f extends s.default{constructor(t){super();var s=t||{x:0,y:0};'number'==typeof s.x&&'number'==typeof s.y?(this.x=new e.default(s.x),this.y=new e.default(s.y)):((0,n.default)(s.x instanceof e.default&&s.y instanceof e.default,"AnimatedValueXY must be initialized with an object of numbers or AnimatedValues."),this.x=s.x,this.y=s.y),this._listeners={}}setValue(t){this.x.setValue(t.x),this.y.setValue(t.y)}setOffset(t){this.x.setOffset(t.x),this.y.setOffset(t.y)}flattenOffset(){this.x.flattenOffset(),this.y.flattenOffset()}extractOffset(){this.x.extractOffset(),this.y.extractOffset()}__getValue(){return{x:this.x.__getValue(),y:this.y.__getValue()}}resetAnimation(t){this.x.resetAnimation(),this.y.resetAnimation(),t&&t(this.__getValue())}stopAnimation(t){this.x.stopAnimation(),this.y.stopAnimation(),t&&t(this.__getValue())}addListener(t){var e=String(l++),s=e=>{e.value;t(this.__getValue())};return this._listeners[e]={x:this.x.addListener(s),y:this.y.addListener(s)},e}removeListener(t){this.x.removeListener(this._listeners[t].x),this.y.removeListener(this._listeners[t].y),delete this._listeners[t]}removeAllListeners(){this.x.removeAllListeners(),this.y.removeAllListeners(),this._listeners={}}getLayout(){return{left:this.x,top:this.y}}getTranslateTransform(){return[{translateX:this.x},{translateY:this.y}]}}var u=f},348,[311,313,24]);
420__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}});var t,e=r(d[0]),s=(t=e)&&t.__esModule?t:{default:t},n=r(d[1]);class o extends s.default{constructor(t){var e,s,o;super(),this._deceleration=null!==(e=t.deceleration)&&void 0!==e?e:.998,this._velocity=t.velocity,this._useNativeDriver=(0,n.shouldUseNativeDriver)(t),this.__isInteraction=null!==(s=t.isInteraction)&&void 0!==s?s:!this._useNativeDriver,this.__iterations=null!==(o=t.iterations)&&void 0!==o?o:1}__getNativeAnimationConfig(){return{type:'decay',deceleration:this._deceleration,velocity:this._velocity,iterations:this.__iterations}}start(t,e,s,n,o){this.__active=!0,this._lastValue=t,this._fromValue=t,this._onUpdate=e,this.__onEnd=s,this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(o):this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))}onUpdate(){var t=Date.now(),e=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(t-this._startTime)));this._onUpdate(e),Math.abs(this._lastValue-e)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=e,this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))))}stop(){super.stop(),this.__active=!1,g.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}var _=o},349,[350,315]);
421__d(function(g,r,i,a,m,_e,d){'use strict';
421Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}});var t,e=r(d[0]),n=(t=e)&&t.__esModule?t:{default:t},o=1;var _=class{start(t,e,n,o,_){}stop(){this.__nativeId&&n.default.API.stopAnimation(this.__nativeId)}__getNativeAnimationConfig(){throw new Error('This animation type cannot be offloaded to native')}__debouncedOnEnd(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)}__startNativeAnimation(t){var e=o+":startAnimation";o+=1,n.default.API.setWaitingForIdentifier(e);try{var _=this.__getNativeAnimationConfig();t.__makeNative(_.platformConfig),this.__nativeId=n.default.generateNewAnimationId(),n.default.API.startAnimatingNode(this.__nativeId,t.__getNativeTag(),_,this.__debouncedOnEnd.bind(this))}catch(t){throw t}finally{n.default.API.unsetWaitingForIdentifier(e)}}}},350,[315]);
422__d(function(g,r,i,a,_m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var s=t(r(d[0])),e=t(r(d[1])),n=t(r(d[2])),o=r(d[3]);r(d[4]);class h extends s.default{constructor(t){var s,h,l,_,f,u,m,v,c,p,V;if(super(),this._overshootClamping=null!==(s=t.overshootClamping)&&void 0!==s&&s,this._restDisplacementThreshold=null!==(h=t.restDisplacementThreshold)&&void 0!==h?h:.001,this._restSpeedThreshold=null!==(l=t.restSpeedThreshold)&&void 0!==l?l:.001,this._initialVelocity=null!==(_=t.velocity)&&void 0!==_?_:0,this._lastVelocity=null!==(f=t.velocity)&&void 0!==f?f:0,this._toValue=t.toValue,this._delay=null!==(u=t.delay)&&void 0!==u?u:0,this._useNativeDriver=(0,o.shouldUseNativeDriver)(t),this._platformConfig=t.platformConfig,this.__isInteraction=null!==(m=t.isInteraction)&&void 0!==m?m:!this._useNativeDriver,this.__iterations=null!==(v=t.iterations)&&void 0!==v?v:1,void 0!==t.stiffness||void 0!==t.damping||void 0!==t.mass)(0,n.default)(void 0===t.bounciness&&void 0===t.speed&&void 0===t.tension&&void 0===t.friction,'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one'),this._stiffness=null!==(c=t.stiffness)&&void 0!==c?c:100,this._damping=null!==(p=t.damping)&&void 0!==p?p:10,this._mass=null!==(V=t.mass)&&void 0!==V?V:1;else if(void 0!==t.bounciness||void 0!==t.speed){var T,y;(0,n.default)(void 0===t.tension&&void 0===t.friction&&void 0===t.stiffness&&void 0===t.damping&&void 0===t.mass,'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');var b=e.default.fromBouncinessAndSpeed(null!==(T=t.bounciness)&&void 0!==T?T:8,null!==(y=t.speed)&&void 0!==y?y:12);this._stiffness=b.stiffness,this._damping=b.damping,this._mass=1}else{var M,P,D=e.default.fromOrigamiTensionAndFriction(null!==(M=t.tension)&&void 0!==M?M:40,null!==(P=t.friction)&&void 0!==P?P:7);this._stiffness=D.stiffness,this._damping=D.damping,this._mass=1}(0,n.default)(this._stiffness>0,'Stiffness value must be greater than 0'),(0,n.default)(this._damping>0,'Damping value must be greater than 0'),(0,n.default)(this._mass>0,'Mass value must be greater than 0')}__getNativeAnimationConfig(){var t;return{type:'spring',overshootClamping:this._overshootClamping,restDisplacementThreshold:this._restDisplacementThreshold,restSpeedThreshold:this._restSpeedThreshold,stiffness:this._stiffness,damping:this._damping,mass:this._mass,initialVelocity:null!==(t=this._initialVelocity)&&void 0!==t?t:this._lastVelocity,toValue:this._toValue,iterations:this.__iterations,platformConfig:this._platformConfig}}start(t,s,e,n,o){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=s,this.__onEnd=e,this._lastTime=Date.now(),this._frameTime=0,n instanceof h){var l=n.getInternalState();this._lastPosition=l.lastPosition,this._lastVelocity=l.lastVelocity,this._initialVelocity=this._lastVelocity,this._lastTime=l.lastTime}var _=()=>{this._useNativeDriver?this.__startNativeAnimation(o):this.onUpdate()};this._delay?this._timeout=setTimeout(_,this._delay):_()}getInternalState(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}
422onUpdate(){var t=Date.now();t>this._lastTime+64&&(t=this._lastTime+64);var s=(t-this._lastTime)/1e3;this._frameTime+=s;var e=this._damping,n=this._mass,o=this._stiffness,h=-this._initialVelocity,l=e/(2*Math.sqrt(o*n)),_=Math.sqrt(o/n),f=_*Math.sqrt(1-l*l),u=this._toValue-this._startPosition,m=0,v=0,c=this._frameTime;if(l<1){var p=Math.exp(-l*_*c);m=this._toValue-p*((h+l*_*u)/f*Math.sin(f*c)+u*Math.cos(f*c)),v=l*_*p*(Math.sin(f*c)*(h+l*_*u)/f+u*Math.cos(f*c))-p*(Math.cos(f*c)*(h+l*_*u)-f*u*Math.sin(f*c))}else{var V=Math.exp(-_*c);m=this._toValue-V*(u+(h+_*u)*c),v=V*(h*(c*_-1)+c*u*(_*_))}if(this._lastTime=t,this._lastPosition=m,this._lastVelocity=v,this._onUpdate(m),this.__active){var T=!1;this._overshootClamping&&0!==this._stiffness&&(T=this._startPosition<this._toValue?m>this._toValue:m<this._toValue);var y=Math.abs(v)<=this._restSpeedThreshold,b=!0;if(0!==this._stiffness&&(b=Math.abs(this._toValue-m)<=this._restDisplacementThreshold),T||y&&b)return 0!==this._stiffness&&(this._lastPosition=this._toValue,this._lastVelocity=0,this._onUpdate(this._toValue)),void this.__debouncedOnEnd({finished:!0});this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))}}stop(){super.stop(),this.__active=!1,clearTimeout(this._timeout),g.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}var l=h},351,[350,352,24,315,353]);
423__d(function(g,r,i,a,m,e,d){'use strict';function n(n){return 3.62*(n-30)+194}function t(n){return 3*(n-8)+25}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var u={fromOrigamiTensionAndFriction:function(u,o){return{stiffness:n(u),damping:t(o)}},fromBouncinessAndSpeed:function(u,o){function f(n,t,u){return(n-t)/(u-t)}function c(n,t,u){return t+n*(u-t)}function s(n,t,u){return n*u+(1-n)*t}function p(n){return 44e-6*Math.pow(n,3)-.006*Math.pow(n,2)+.36*n+2}function M(n){return 45e-8*Math.pow(n,3)-332e-6*Math.pow(n,2)+.1078*n+5.84}var h=f(u/1.7,0,20);h=c(h,0,.8);var w,l,v,_,b=c(f(o/1.7,0,20),.5,200),O=(w=h,l=(v=b)<=18?(_=v,7e-4*Math.pow(_,3)-.031
423*Math.pow(_,2)+.64*_+1.28):v>18&&v<=44?p(v):M(v),s(2*w-w*w,l,.01));return{stiffness:n(b),damping:t(O)}}}},352,[]);
424__d(function(_g,_r,i,_a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var e=t(_r(d[0])),s=t(_r(d[1])),a=t(_r(d[2])),r=t(_r(d[3])).default.API,n={r:0,g:0,b:0,a:1},h=1;function l(t){if(null==t)return null;if(_(t))return t;var e=(0,a.default)(t);if(null==e)return null;if('object'==typeof e){if(null!=e)return e}else if('number'==typeof e){return{r:(4278190080&e)>>>24,g:(16711680&e)>>>16,b:(65280&e)>>>8,a:(255&e)/255}}return null}function _(t){return t&&'number'==typeof t.r&&'number'==typeof t.g&&'number'==typeof t.b&&'number'==typeof t.a}function o(t){return t&&t.r instanceof e.default&&t.g instanceof e.default&&t.b instanceof e.default&&t.a instanceof e.default}class f extends s.default{constructor(t,s){super(),this._listeners={};var a=null!=t?t:n;if(o(a)){var r=a;this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a}else{var h,f=null!==(h=l(a))&&void 0!==h?h:n,u=n;_(f)?u=f:this.nativeColor=f,this.r=new e.default(u.r),this.g=new e.default(u.g),this.b=new e.default(u.b),this.a=new e.default(u.a)}(this.nativeColor||s&&s.useNativeDriver)&&this.__makeNative()}setValue(t){var e,s=!1;if(this.__isNative){var a=this.__getNativeTag();r.setWaitingForIdentifier(a.toString())}var h=null!==(e=l(t))&&void 0!==e?e:n;if(_(h)){var o=h;this.r.setValue(o.r),this.g.setValue(o.g),this.b.setValue(o.b),this.a.setValue(o.a),null!=this.nativeColor&&(this.nativeColor=null,s=!0)}else{var f=h;this.nativeColor!==f&&(this.nativeColor=f,s=!0)}if(this.__isNative){var u=this.__getNativeTag();s&&r.updateAnimatedNodeConfig(u,this.__getNativeConfig()),r.unsetWaitingForIdentifier(u.toString())}}setOffset(t){this.r.setOffset(t.r),this.g.setOffset(t.g),this.b.setOffset(t.b),this.a.setOffset(t.a)}flattenOffset(){this.r.flattenOffset(),this.g.flattenOffset(),this.b.flattenOffset(),this.a.flattenOffset()}extractOffset(){this.r.extractOffset(),this.g.extractOffset(),this.b.extractOffset(),this.a.extractOffset()}addListener(t){var e=String(h++),s=e=>{e.value;t(this.__getValue())};return this._listeners[e]={r:this.r.addListener(s),g:this.g.addListener(s),b:this.b.addListener(s),a:this.a.addListener(s)},e}removeListener(t){this.r.removeListener(this._listeners[t].r),this.g.removeListener(this._listeners[t].g),this.b.removeListener(this._listeners[t].b),this.a.removeListener(this._listeners[t].a),delete this._listeners[t]}removeAllListeners(){this.r.removeAllListeners(),this.g.removeAllListeners(),this.b.removeAllListeners(),this.a.removeAllListeners(),this._listeners={}}stopAnimation(t){this.r.stopAnimation(),this.g.stopAnimation(),this.b.stopAnimation(),this.a.stopAnimation(),t&&t(this.__getValue())}resetAnimation(t){this.r.resetAnimation(),this.g.resetAnimation(),this.b.resetAnimation(),this.a.resetAnimation(),t&&t(this.__getValue())}__getValue(){return null!=this.nativeColor?this.nativeColor:"rgba("+this.r.__getValue()+", "+this.g.__getValue()+", "+this.b.__getValue()+", "+this.a.__getValue()+")"}__attach(){this.r.__addChild(this),this.g.__addChild(this),this.b.__addChild(this),this.a.__addChild(this),super.__attach()}__detach(){this.r.__removeChild(this),this.g.__removeChild(this),this.b.__removeChild(this),this.a.__removeChild(this),super.__detach()}__makeNative(t){this.r.__makeNative(t),this.g.__makeNative(t),this.b.__makeNative(t),this.a.__makeNative(t),super.__makeNative(t)}__getNativeConfig(){return{type:'color',r:this.r.__getNativeTag(),g:this.g.__getNativeTag(),b:this.b.__getNativeTag(),a:this.a.__getNativeTag(),nativeColor:this.nativeColor}}}},353,[311,313,51,315]);
425__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}}),r(d[0]),r(d[1]),r(d[2]);var e,s=t(r(d[3])),n=t(r(d[4])),o=r(d[5]);r(d[6]);class _ extends n.default{constructor(t){var n,_,h,u,l;super(),this._toValue=t.toValue,this._easing=null!==(n=t.easing)&&void 0!==n?n:(e||(e=s.default.inOut(s.default.ease)),e),this._duration=null!==(_=t.duration)&&void 0!==_?_:500,this._delay=null!==(h=t.delay)&&void 0!==h?h:0,this.__iterations=null!==(u=t.iterations)&&void 0!==u?u:1,this._useNativeDriver=(0,o.shouldUseNativeDriver)(t),this._platformConfig=t.platformConfig,this.__isInteraction=null!==(l=t.isInteraction)&&void 0!==l?l:!this._useNativeDriver}__getNativeAnimationConfig(){for(var t=[],e=Math.round(this._duration/16.666666666666668),s=0;s<e;s++)t.push(this._easing(s/e));return t.push(this._easing(1)),{type:'frames',frames:t,toValue:this._toValue,iterations:this.__iterations,platformConfig:this._platformConfig}}start(t,e,s,n,o){this.__active=!0,this._fromValue=t,this._onUpdate=e,this.__onEnd=s;var _=()=>{0!==this._duration||this._useNativeDriver?(this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(o):this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))):(this._onUpdate(this._toValue),this.__debouncedOnEnd({finished:!0}))};this._delay?this._timeout=setTimeout(_,this._delay):_()}onUpdate(){var t=Date.now();if(t>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((t-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)))}stop(){super.stop(),this.__active=!1,clearTimeout(this._timeout),g.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}var h=_},354,[311,348,312,355,350,315,353]);
426__d(function(g,r,i,a,m,_e,d){"use strict";
426Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},355,[356]);
427__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t,e,u=r(d[0]),c=(t=u)&&t.__esModule?t:{default:t};class n{static step0(t){return t>0?1:0}static step1(t){return t>=1?1:0}static linear(t){return t}static ease(t){return e||(e=n.bezier(.42,0,1,1)),e(t)}static quad(t){return t*t}static cubic(t){return t*t*t}static poly(t){return e=>Math.pow(e,t)}static sin(t){return 1-Math.cos(t*Math.PI/2)}static circle(t){return 1-Math.sqrt(1-t*t)}static exp(t){return Math.pow(2,10*(t-1))}static elastic(t){void 0===t&&(t=1);var e=t*Math.PI;return t=>1-Math.pow(Math.cos(t*Math.PI/2),3)*Math.cos(t*e)}static back(t){return void 0===t&&(t=1.70158),e=>e*e*((t+1)*e-t)}static bounce(t){if(t<.36363636363636365)return 7.5625*t*t;if(t<.7272727272727273){var e=t-.5454545454545454;return 7.5625*e*e+.75}if(t<.9090909090909091){var u=t-.8181818181818182;return 7.5625*u*u+.9375}var c=t-.9545454545454546;return 7.5625*c*c+.984375}static bezier(t,e,u,n){return(0,c.default)(t,e,u,n)}static in(t){return t}static out(t){return e=>1-t(1-e)}static inOut(t){return e=>e<.5?t(2*e)/2:1-t(2*(1-e))/2}}var s=n},356,[357]);
428__d(function(g,r,_i,a,m,e,d){
429/**
430   * BezierEasing - use bezier curve for transition easing function
431   * https://github.com/gre/bezier-easing
432   * @copyright 2014-2015 Gaëtan Renaudeau. MIT License.
433   */
434'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return h}});var n=4,t=.001,u=1e-7,o=10,f=11,i=.1,c='function'==typeof Float32Array;function v(n,t){return 1-3*t+3*n}function l(n,t){return 3*t-6*n}function b(n){return 3*n}
434function s(n,t,u){return((v(t,u)*n+l(t,u))*n+b(t))*n}function y(n,t,u){return 3*v(t,u)*n*n+2*l(t,u)*n+b(t)}function w(n,t,f,i,c){var v,l,b=0,y=t,w=f;do{(v=s(l=y+(w-y)/2,i,c)-n)>0?w=l:y=l}while(Math.abs(v)>u&&++b<o);return l}function _(t,u,o,f){for(var i=u,c=0;c<n;++c){var v=y(i,o,f);if(0===v)return i;i-=(s(i,o,f)-t)/v}return i}function h(n,u,o,v){if(!(n>=0&&n<=1&&o>=0&&o<=1))throw new Error('bezier x values must be in [0, 1] range');var l=c?new Float32Array(f):new Array(f);if(n!==u||o!==v)for(var b=0;b<f;++b)l[b]=s(b*i,n,o);function h(u){for(var f=0,c=1;10!==c&&l[c]<=u;++c)f+=i;--c;var v=f+(u-l[c])/(l[c+1]-l[c])*i,b=y(v,n,o);return b>=t?_(u,v,n,o):0===b?v:w(u,f,f+i,n,o)}return function(t){return n===u&&o===v?t:0===t?0:1===t?1:s(h(t),u,v)}}},357,[]);
435__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["children","style","visible","size"],t=["backgroundColor"];function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Badge=function(n){let{children:v,style:p,visible:y=!0,size:_=18}=n,O=(0,o.default)(n,e);const[j]=s.useState(()=>new c.default.Value(y?1:0)),[k,w]=s.useState(y),{colors:x,fonts:z}=(0,u.useTheme)();if(s.useEffect(()=>{if(k)return c.default.timing(j,{toValue:y?1:0,duration:150,useNativeDriver:b}).start(({finished:e})=>{e&&!y&&w(!1)}),()=>j.stopAnimation()},[j,k,y]),!k){if(!y)return null;w(!0)}const C=f.default.flatten(p)||{},{backgroundColor:M=x.notification}=C,S=(0,o.default)(C,t),P=(0,l.default)(M).isLight()?'black':'white',R=_/2,A=Math.floor(3*_/4);return(0,d.jsx)(c.default.Text,Object.assign({numberOfLines:1,style:[{transform:[{scale:j.interpolate({inputRange:[0,1],outputRange:[.5,1]})}],color:P,lineHeight:_-1,height:_,minWidth:_,opacity:j,backgroundColor:M,fontSize:A,borderRadius:R,borderCurve:'continuous'},z.regular,h.container,S]},O,{children:v}))};var o=n(r(_d[0])),u=r(_d[1]),l=n(r(_d[2])),s=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),c=n(r(_d[4]));r(_d[5]);var f=n(r(_d[6])),d=r(_d[7]);const b=!1;const h=f.default.create({container:{alignSelf:'flex-end',textAlign:'center',paddingHorizontal:4,overflow:'hidden'}})},358,[109,107,359,34,271,95,42,104]);
436__d(function(g,r,_i,_a,_m,e,d){const t=r(d[0]),o=r(d[1]),n=['keyword','gray','hex'],s={};for(const t of Object.keys(o))s[[...o[t].labels].sort().join('')]=t;const h={};function l(i,a){if(!(this instanceof l))return new l(i,a);if(a&&a in n&&(a=null),a&&!(a in o))throw new Error('Unknown model: '+a);let c,u;if(null==i)this.model='rgb',this.color=[0,0,0],this.valpha=1;else if(i instanceof l)this.model=i.model,this.color=[...i.color],this.valpha=i.valpha;else if('string'==typeof i){const n=t.get(i);if(null===n)throw new Error('Unable to parse color from string: '+i);this.model=n.model,u=o[this.model].channels,this.color=n.value.slice(0,u),this.valpha='number'==typeof n.value[u]?n.value[u]:1}else if(i.length>0){this.model=a||'rgb',u=o[this.model].channels;const t=Array.prototype.slice.call(i,0,u);this.color=p(t,u),this.valpha='number'==typeof i[u]?i[u]:1}else if('number'==typeof i)this.model='rgb',this.color=[i>>16&255,i>>8&255,255&i],this.valpha=1;else{this.valpha=1;const t=Object.keys(i);'alpha'in i&&(t.splice(t.indexOf('alpha'),1),this.valpha='number'==typeof i.alpha?i.alpha:0);const n=t.sort().join('');if(!(n in s))throw new Error('Unable to parse color from object: '+JSON.stringify(i));this.model=s[n];const{labels:h}=o[this.model],l=[];for(c=0;c<h.length;c++)l.push(i[h[c]]);this.color=p(l)}if(h[this.model])for(u=o[this.model].channels,c=0;c<u;c++){const t=h[this.model][c];t&&(this.color[c]=t(this.color[c]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}l.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(o){let n=this.model in t.to?this:this.rgb();n=n.round('number'==typeof o?o:1);const s=1===n.valpha?n.color:[...n.color,this.valpha];return t.to[n.model](s)}
436,percentString(o){const n=this.rgb().round('number'==typeof o?o:1),s=1===n.valpha?n.color:[...n.color,this.valpha];return t.to.rgb.percent(s)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:n}=o[this.model],{labels:s}=o[this.model];for(let o=0;o<n;o++)t[s[o]]=this.color[o];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new l([...this.color.map(a(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new l([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:c('rgb',0,u(255)),green:c('rgb',1,u(255)),blue:c('rgb',2,u(255)),hue:c(['hsl','hsv','hsl','hwb','hcg'],0,t=>(t%360+360)%360),saturationl:c('hsl',1,u(100)),lightness:c('hsl',2,u(100)),saturationv:c('hsv',1,u(100)),value:c('hsv',2,u(100)),chroma:c('hcg',1,u(100)),gray:c('hcg',2,u(100)),white:c('hwb',1,u(100)),wblack:c('hwb',2,u(100)),cyan:c('cmyk',0,u(100)),magenta:c('cmyk',1,u(100)),yellow:c('cmyk',2,u(100)),black:c('cmyk',3,u(100)),x:c('xyz',0,u(95.047)),y:c('xyz',1,u(100)),z:c('xyz',2,u(108.833)),l:c('lab',0,u(100)),a:c('lab',1),b:c('lab',2),keyword(t){return void 0!==t?new l(t):o[this.model].keyword(this.color)},hex(o){return void 0!==o?new l(o):t.to.hex(this.rgb().round().color)},hexa(o){if(void 0!==o)return new l(o);const n=this.rgb().round().color;let s=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===s.length&&(s='0'+s),t.to.hex(n)+s},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,o=[];for(const[n,s]of t.entries()){const t=s/255;o[n]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*o[0]+.7152*o[1]+.0722*o[2]},contrast(t){const o=this.luminosity(),n=t.luminosity();return o>n?(o+.05)/(n+.05):(n+.05)/(o+.05)},level(t){const o=this.contrast(t);return o>=7?'AAA':o>=4.5?'AA':''},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let o=0;o<3;o++)t.color[o]=255-t.color[o];return t},lighten(t){const o=this.hsl();return o.color[2]+=o.color[2]*t,o},darken(t){const o=this.hsl();return o.color[2]-=o.color[2]*t,o},saturate(t){const o=this.hsl();return o.color[1]+=o.color[1]*t,o},desaturate(t){const o=this.hsl();return o.color[1]-=o.color[1]*t,o},whiten(t){const o=this.hwb();return o.color[1]+=o.color[1]*t,o},blacken(t){const o=this.hwb();return o.color[2]+=o.color[2]*t,o},grayscale(){const t=this.rgb().color,o=.3*t[0]+.59*t[1]+.11*t[2];return l.rgb(o,o,o)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const o=this.hsl();let n=o.color[0];return n=(n+t)%360,n=n<0?360+n:n,o.color[0]=n,o},mix(t,o){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const n=t.rgb(),s=this.rgb(),h=void 0===o?.5:o,i=2*h-1,a=n.alpha()-s.alpha(),c=((i*a===-1?i:(i+a)/(1+i*a))+1)/2,u=1-c;return l.rgb(c*n.red()+u*s.red(),c*n.green()+u*s.green(),c*n.blue()+u*s.blue(),n.alpha()*h+s.alpha()*(1-h))}};for(const t of Object.keys(o)){if(n.includes(t))continue;const{channels:s}=o[t];l.prototype[t]=function(...n){return this.model===t?new l(this):n.length>0?new l(n,t):new l([...(s=o[this.model][t].raw(this.color),Array.isArray(s)?s:[s]),this.valpha],t);var s},l[t]=function(...o){let n=o[0];return'number'==typeof n&&(n=p(o,s)),new l(n,t)}}function i(t,o){return Number(t.toFixed(o))}function a(t){return function(o){return i(o,t)}}function c(t,o,n){t=Array.isArray(t)?t:[t];for(const s of t)(h[s]||(h[s]=[]))[o]=n;return t=t[0],function(s){let h;return void 0!==s?(n&&(s=n(s)),h=this[t](),h.color[o]=s,h):(h=this[t]().color[o],n&&(h=n(h)),h)}}function u(t){return function(o){return Math.max(0,Math.min(t,o))}}function p(t,o){for(let n=0;n<o;n++)'number'!=typeof t[n]&&(t[n]=0);return t}_m.exports=l},359,[360,364]);
437__d(function(_g,_r,_i,_a,m,e,d){var r=_r(d[0]),t=_r(d[1]),a=Object.hasOwnProperty,n=Object.create(null);
vendor: 5,567 bytes, lines 437-438
437for(var s in r)a.call(r,s)&&(n[r[s]]=s);var o=m.exports={to:{},get:{}};function l(r,t,a){return Math.min(Math.max(t,r),a)}function u(r){var t=Math.round(r).toString(16).toUpperCase();return t.length<2?'0'+t:t}o.get=function(r){var t,a;switch(r.substring(0,3).toLowerCase()){case'hsl':t=o.get.hsl(r),a='hsl';break;case'hwb':t=o.get.hwb(r),a='hwb';break;default:t=o.get.rgb(r),a='rgb'}return t?{model:a,value:t}:null},o.get.rgb=function(t){if(!t)return null;var n,s,o,u=[0,0,0,1];if(n=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(o=n[2],n=n[1],s=0;s<3;s++){var h=2*s;u[s]=parseInt(n.slice(h,h+2),16)}o&&(u[3]=parseInt(o,16)/255)}else if(n=t.match(/^#([a-f0-9]{3,4})$/i)){for(o=(n=n[1])[3],s=0;s<3;s++)u[s]=parseInt(n[s]+n[s],16);o&&(u[3]=parseInt(o+o,16)/255)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(s=0;s<3;s++)u[s]=parseInt(n[s+1],0);n[4]&&(n[5]?u[3]=.01*parseFloat(n[4]):u[3]=parseFloat(n[4]))}else{if(!(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(n=t.match(/^(\w+)$/))?'transparent'===n[1]?[0,0,0,0]:a.call(r,n[1])?((u=r[n[1]])[3]=1,u):null:null;for(s=0;s<3;s++)u[s]=Math.round(2.55*parseFloat(n[s+1]));n[4]&&(n[5]?u[3]=.01*parseFloat(n[4]):u[3]=parseFloat(n[4]))}for(s=0;s<3;s++)u[s]=l(u[s],0,255);return u[3]=l(u[3],0,1),u},o.get.hsl=function(r){if(!r)return null;var t=r.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var a=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(a)?1:a,0,1)]}return null},o.get.hwb=function(r){if(!r)return null;var t=r.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var a=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(a)?1:a,0,1)]}return null},o.to.hex=function(){var r=t(arguments);return'#'+u(r[0])+u(r[1])+u(r[2])+(r[3]<1?u(Math.round(255*r[3])):'')},o.to.rgb=function(){var r=t(arguments);return r.length<4||1===r[3]?'rgb('+Math.round(r[0])+', '+Math.round(r[1])+', '+Math.round(r[2])+')':'rgba('+Math.round(r[0])+', '+Math.round(r[1])+', '+Math.round(r[2])+', '+r[3]+')'},o.to.rgb.percent=function(){var r=t(arguments),a=Math.round(r[0]/255*100),n=Math.round(r[1]/255*100),s=Math.round(r[2]/255*100);return r.length<4||1===r[3]?'rgb('+a+'%, '+n+'%, '+s+'%)':'rgba('+a+'%, '+n+'%, '+s+'%, '+r[3]+')'},o.to.hsl=function(){var r=t(arguments);return r.length<4||1===r[3]?'hsl('+r[0]+', '+r[1]+'%, '+r[2]+'%)':'hsla('+r[0]+', '+r[1]+'%, '+r[2]+'%, '+r[3]+')'},o.to.hwb=function(){var r=t(arguments),a='';return r.length>=4&&1!==r[3]&&(a=', '+r[3]),'hwb('+r[0]+', '+r[1]+'%, '+r[2]+'%'+a+')'},o.to.keyword=function(r){return n[r.slice(0,3)]}},360,[361,362]);
438__d(function(g,r,i,a,m,e,d){'use strict';m.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
438ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},361,[]);
439__d(function(g,r,_i,a,m,e,d){'use strict';var t=r(d[0]),n=Array.prototype.concat,o=Array.prototype.slice,c=m.exports=function(c){for(var u=[],p=0,i=c.length;p<i;p++){var l=c[p];t(l)?u=n.call(u,o.call(l)):u.push(l)}return u};c.wrap=function(t){return function(){return t(c(arguments))}}},362,[363]);
440__d(function(g,r,i,a,m,e,d){m.exports=function(n){return!(!n||'string'==typeof n)&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&'String'!==n.constructor.name))}},363,[]);
441__d(function(g,r,_i,a,m,e,d){const n=r(d[0]),o=r(d[1]),t={};function c(n){const o=function(...o){const t=o[0];return null==t?t:(t.length>1&&(o=t),n(o))};return'conversion'in n&&(o.conversion=n.conversion),o}function s(n){const o=function(...o){const t=o[0];if(null==t)return t;t.length>1&&(o=t);const c=n(o);if('object'==typeof c)for(let n=c.length,o=0;o<n;o++)c[o]=Math.round(c[o]);return c};return'conversion'in n&&(o.conversion=n.conversion),o}Object.keys(n).forEach(i=>{t[i]={},Object.defineProperty(t[i],'channels',{value:n[i].channels}),Object.defineProperty(t[i],'labels',{value:n[i].labels});const l=o(i);Object.keys(l).forEach(n=>{const o=l[n];t[i][n]=s(o),t[i][n].raw=c(o)})}),m.exports=t},364,[365,366]);
442__d(function(_g,_r,_i,_a,_m,e,d){const n=_r(d[0]),t={};for(const r of Object.keys(n))t[n[r]]=r;const r={rgb:{channels:3,labels:'rgb'},hsl:{channels:3,labels:'hsl'},hsv:{channels:3,labels:'hsv'},hwb:{channels:3,labels:'hwb'},cmyk:{channels:4,labels:'cmyk'},xyz:{channels:3,labels:'xyz'},lab:{channels:3,labels:'lab'},lch:{channels:3,labels:'lch'},hex:{channels:1,labels:['hex']},keyword:{channels:1,labels:['keyword']},ansi16:{channels:1,labels:['ansi16']},ansi256:{channels:1,labels:['ansi256']},hcg:{channels:3,labels:['h','c','g']},apple:{channels:3,labels:['r16','g16','b16']},gray:{channels:1,labels:['gray']}};_m.exports=r;for(const n of Object.keys(r)){if(!('channels'in r[n]))throw new Error('missing channels property: '+n);if(!('labels'in r[n]))throw new Error('missing channel labels property: '+n);if(r[n].labels.length!==r[n].channels)throw new Error('channel and label counts mismatch: '+n);const{channels:t,labels:a}=r[n];delete r[n].channels,delete r[n].labels,Object.defineProperty(r[n],'channels',{value:t}),Object.defineProperty(r[n],'labels',{value:a})}function a(n,t){return(n[0]-t[0])**2+(n[1]-t[1])**2+(n[2]-t[2])**2}r.rgb.hsl=function(n){const t=n[0]/255,r=n[1]/255,a=n[2]/255,c=Math.min(t,r,a),s=Math.max(t,r,a),o=s-c;let l,h;s===c?l=0:t===s?l=(r-a)/o:r===s?l=2+(a-t)/o:a===s&&(l=4+(t-r)/o),l=Math.min(60*l,360),l<0&&(l+=360);const u=(c+s)/2;return h=s===c?0:u<=.5?o/(s+c):o/(2-s-c),[l,100*h,100*u]},r.rgb.hsv=function(n){let t,r,a,c,s;const o=n[0]/255,l=n[1]/255,h=n[2]/255,u=Math.max(o,l,h),i=u-Math.min(o,l,h),b=function(n){return(u-n)/6/i+.5};return 0===i?(c=0,s=0):(s=i/u,t=b(o),r=b(l),a=b(h),o===u?c=a-r:l===u?c=.3333333333333333+t-a:h===u&&(c=.6666666666666666+r-t),c<0?c+=1:c>1&&(c-=1)),[360*c,100*s,100*u]},r.rgb.hwb=function(n){const t=n[0],a=n[1];let c=n[2];const s=r.rgb.hsl(n)[0],o=.00392156862745098*Math.min(t,Math.min(a,c
442));return c=1-.00392156862745098*Math.max(t,Math.max(a,c)),[s,100*o,100*c]},r.rgb.cmyk=function(n){const t=n[0]/255,r=n[1]/255,a=n[2]/255,c=Math.min(1-t,1-r,1-a);return[100*((1-t-c)/(1-c)||0),100*((1-r-c)/(1-c)||0),100*((1-a-c)/(1-c)||0),100*c]},r.rgb.keyword=function(r){const c=t[r];if(c)return c;let s,o=1/0;for(const t of Object.keys(n)){const c=a(r,n[t]);c<o&&(o=c,s=t)}return s},r.keyword.rgb=function(t){return n[t]},r.rgb.xyz=function(n){let t=n[0]/255,r=n[1]/255,a=n[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;return[100*(.4124*t+.3576*r+.1805*a),100*(.2126*t+.7152*r+.0722*a),100*(.0193*t+.1192*r+.9505*a)]},r.rgb.lab=function(n){const t=r.rgb.xyz(n);let a=t[0],c=t[1],s=t[2];a/=95.047,c/=100,s/=108.883,a=a>.008856?a**.3333333333333333:7.787*a+.13793103448275862,c=c>.008856?c**.3333333333333333:7.787*c+.13793103448275862,s=s>.008856?s**.3333333333333333:7.787*s+.13793103448275862;return[116*c-16,500*(a-c),200*(c-s)]},r.hsl.rgb=function(n){const t=n[0]/360,r=n[1]/100,a=n[2]/100;let c,s,o;if(0===r)return o=255*a,[o,o,o];c=a<.5?a*(1+r):a+r-a*r;const l=2*a-c,h=[0,0,0];for(let n=0;n<3;n++)s=t+.3333333333333333*-(n-1),s<0&&s++,s>1&&s--,o=6*s<1?l+6*(c-l)*s:2*s<1?c:3*s<2?l+(c-l)*(.6666666666666666-s)*6:l,h[n]=255*o;return h},r.hsl.hsv=function(n){const t=n[0];let r=n[1]/100,a=n[2]/100,c=r;const s=Math.max(a,.01);a*=2,r*=a<=1?a:2-a,c*=s<=1?s:2-s;return[t,100*(0===a?2*c/(s+c):2*r/(a+r)),100*((a+r)/2)]},r.hsv.rgb=function(n){const t=n[0]/60,r=n[1]/100;let a=n[2]/100;const c=Math.floor(t)%6,s=t-Math.floor(t),o=255*a*(1-r),l=255*a*(1-r*s),h=255*a*(1-r*(1-s));switch(a*=255,c){case 0:return[a,h,o];case 1:return[l,a,o];
442case 2:return[o,a,h];case 3:return[o,l,a];case 4:return[h,o,a];case 5:return[a,o,l]}},r.hsv.hsl=function(n){const t=n[0],r=n[1]/100,a=n[2]/100,c=Math.max(a,.01);let s,o;o=(2-r)*a;const l=(2-r)*c;return s=r*c,s/=l<=1?l:2-l,s=s||0,o/=2,[t,100*s,100*o]},r.hwb.rgb=function(n){const t=n[0]/360;let r=n[1]/100,a=n[2]/100;const c=r+a;let s;c>1&&(r/=c,a/=c);const o=Math.floor(6*t),l=1-a;s=6*t-o,1&o&&(s=1-s);const h=r+s*(l-r);let u,i,b;switch(o){default:case 6:case 0:u=l,i=h,b=r;break;case 1:u=h,i=l,b=r;break;case 2:u=r,i=l,b=h;break;case 3:u=r,i=h,b=l;break;case 4:u=h,i=r,b=l;break;case 5:u=l,i=r,b=h}return[255*u,255*i,255*b]},r.cmyk.rgb=function(n){const t=n[0]/100,r=n[1]/100,a=n[2]/100,c=n[3]/100;return[255*(1-Math.min(1,t*(1-c)+c)),255*(1-Math.min(1,r*(1-c)+c)),255*(1-Math.min(1,a*(1-c)+c))]},r.xyz.rgb=function(n){const t=n[0]/100,r=n[1]/100,a=n[2]/100;let c,s,o;return c=3.2406*t+-1.5372*r+-.4986*a,s=-.9689*t+1.8758*r+.0415*a,o=.0557*t+-.204*r+1.057*a,c=c>.0031308?1.055*c**.4166666666666667-.055:12.92*c,s=s>.0031308?1.055*s**.4166666666666667-.055:12.92*s,o=o>.0031308?1.055*o**.4166666666666667-.055:12.92*o,c=Math.min(Math.max(0,c),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[255*c,255*s,255*o]},r.xyz.lab=function(n){let t=n[0],r=n[1],a=n[2];t/=95.047,r/=100,a/=108.883,t=t>.008856?t**.3333333333333333:7.787*t+.13793103448275862,r=r>.008856?r**.3333333333333333:7.787*r+.13793103448275862,a=a>.008856?a**.3333333333333333:7.787*a+.13793103448275862;return[116*r-16,500*(t-r),200*(r-a)]},r.lab.xyz=function(n){let t,r,a;r=(n[0]+16)/116,t=n[1]/500+r,a=r-n[2]/200;const c=r**3,s=t**3,o=a**3;return r=c>.008856?c:(r-.13793103448275862)/7.787,t=s>.008856?s:(t-.13793103448275862)/7.787,a=o>.008856?o:(a-.13793103448275862)/7.787,t*=95.047,r*=100,a*=108.883,[t,r,a]},r.lab.lch=function(n){const t=n[0],r=n[1],a=n[2];let c;c=360*Math.atan2(a,r)/2/Math.PI,c<0&&(c+=360);return[t,Math.sqrt(r*r+a*a),c]},r.lch.lab=function(n){const t=n[0],r=n[1],a=n[2]/360*2*Math.PI;return[t,r*Math.cos(a),r*Math.sin(a)]},r.rgb.ansi16=function(n,t=null){const[a,c,s]=n;let o=null===t?r.rgb.hsv(n)[2]:t;if(o=Math.round(o/50),0===o)return 30;let l=30+(Math.round(s/255)<<2|Math.round(c/255)<<1|Math.round(a/255));return 2===o&&(l+=60),l},r.hsv.ansi16=function(n){return r.rgb.ansi16(r.hsv.rgb(n),n[2])},r.rgb.ansi256=function(n){const t=n[0],r=n[1],a=n[2];if(t===r&&r===a)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(n){let t=n%10;if(0===t||7===t)return n>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(n>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},r.ansi256.rgb=function(n){if(n>=232){const t=10*(n-232)+8;return[t,t,t]}let t;n-=16;return[Math.floor(n/36)/5*255,Math.floor((t=n%36)/6)/5*255,t%6/5*255]},r.rgb.hex=function(n){const t=(((255&Math.round(n[0]))<<16)+((255&Math.round(n[1]))<<8)+(255&Math.round(n[2]))).toString(16).toUpperCase();return'000000'.substring(t.length)+t},r.hex.rgb=function(n){const t=n.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split('').map(n=>n+n).join(''));const a=parseInt(r,16);return[a>>16&255,a>>8&255,255&a]},r.rgb.hcg=function(n){const t=n[0]/255,r=n[1]/255,a=n[2]/255,c=Math.max(Math.max(t,r),a),s=Math.min(Math.min(t,r),a),o=c-s;let l,h;return l=o<1?s/(1-o):0,h=o<=0?0:c===t?(r-a)/o%6:c===r?2+(a-t)/o:4+(t-r)/o,h/=6,h%=1,[360*h,100*o,100*l]},r.hsl.hcg=function(n){const t=n[1]/100,r=n[2]/100,a=r<.5?2*t*r:2*t*(1-r);let c=0;return a<1&&(c=(r-.5*a)/(1-a)),[n[0],100*a,100*c]},r.hsv.hcg=function(n){const t=n[1]/100,r=n[2]/100,a=t*r;let c=0;return a<1&&(c=(r-a)/(1-a)),[n[0],100*a,100*c]},r.hcg.rgb=function(n){const t=n[0]/360,r=n[1]/100,a=n[2]/100;if(0===r)return[255*a,255*a,255*a];const c=[0,0,0],s=t%1*6,o=s%1,l=1-o;let h=0;switch(Math.floor(s)){case 0:c[0]=1,c[1]=o,c[2]=0;break;case 1:c[0]=l,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=o;break;case 3:c[0]=0,c[1]=l,c[2]=1;break;case 4:c[0]=o,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=l}return h=(1-r)*a,[255*(r*c[0]+h),255*(r*c[1]+h),255*(r*c[2]+h)]},r.hcg.hsv=function(n){const t=n[1]/100,r=t+n[2]/100*(1-t);let a=0;return r>0&&(a=t/r),[n[0],100*a,100*r]},r.hcg.hsl=function(n){const t=n[1]/100,r=n[2]/100*(1-t)+.5*t;let a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[n[0],100*a,100*r]},r.hcg.hwb=function(n){const t=n[1]/100,r=t+n[2]/100*(1-t);return[n[0],100*(r-t),100*(1-r)]},r.hwb.hcg=function(n){const t=n[1]/100,r=1-n[2]/100,a=r-t;let c=0;return a<1&&(c=(r-a)/(1-a)),[n[0],100*a,100*c]},r.apple.rgb=function(n){return[n[0]/65535*255,n[1]/65535*255,n[2]/65535*255]},r.rgb.apple=function(n){return[n[0]/255*65535,n[1]/255*65535,n[2]/255*65535]},r.gray.rgb=function(n){return[n[0]/100*255,n[0]/100*255,n[0]/100*255]},r.gray.hsl=function(n){return[0,0,n[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(n){return[0,100,n[0]]},r.gray.cmyk=function(n){return[0,0,0,n[0]]},r.gray.lab=function(n){return[n[0],0,0]},r.gray.hex=function(n){const t=255&Math.round(n[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return'000000'.substring(r.length)+r},r.rgb.gray=function(n){return[(n[0]+n[1]+n[2])/3/255*100]}},365,[361]);
443__d(function(g,r,_i,a,m,e,d){const n=r(d[0]);function t(){const t={}
443,c=Object.keys(n);for(let n=c.length,o=0;o<n;o++)t[c[o]]={distance:-1,parent:null};return t}function c(c){const o=t(),s=[c];for(o[c].distance=0;s.length;){const t=s.pop(),c=Object.keys(n[t]);for(let n=c.length,u=0;u<n;u++){const n=c[u],i=o[n];-1===i.distance&&(i.distance=o[t].distance+1,i.parent=t,s.unshift(n))}}return o}function o(n,t){return function(c){return t(n(c))}}function s(t,c){const s=[c[t].parent,t];let u=n[c[t].parent][t],i=c[t].parent;for(;c[i].parent;)s.unshift(c[i].parent),u=o(n[c[i].parent][i],u),i=c[i].parent;return u.conversion=s,u}m.exports=function(n){const t=c(n),o={},u=Object.keys(t);for(let n=u.length,c=0;c<n;c++){const n=u[c];null!==t[n].parent&&(o[n]=s(n,t))}return o}},366,[365]);
444__d(function(g,r,i,a,m,_e,d){"use strict";const e=["screen","params","action","href"],t=["variant","color","android_ripple","style","children"];function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Button=function(e){return'screen'in e||'action'in e?(0,p.jsx)(h,Object.assign({},e)):(0,p.jsx)(j,Object.assign({},e))};var s=n(r(d[0])),o=r(d[1]),c=n(r(d[2]));r(d[3]),r(d[4]);var l=n(r(d[5])),u=r(d[6]),f=r(d[7]),p=r(d[8]);const b=40;function h(t){let{screen:n,params:c,action:l,href:u}=t,f=(0,s.default)(t,e);const b=(0,o.useLinkProps)({screen:n,params:c,action:l,href:u});return(0,p.jsx)(j,Object.assign({},f,b))}function j(e){let{variant:n="tinted",color:l,android_ripple:h,style:j,children:_}=e,v=(0,s.default)(e,t);const{colors:y,fonts:O}=(0,o.useTheme)(),k=l??y.primary;let P,w;switch(n){case'plain':P='transparent',w=k;break;case'tinted':P=(0,c.default)(k).fade(.85).string(),w=k;break;case'filled':P=k,w=(0,c.default)(k).isDark()?'white':(0,c.default)(k).darken(.71).string()}return(0,p.jsx)(u.PlatformPressable,Object.assign({},v,{android_ripple:Object.assign({radius:b,color:(0,c.default)(w).fade(.85).string()},h),pressOpacity:1,hoverEffect:{color:w},style:[{backgroundColor:P},x.button,j],children:(0,p.jsx)(f.Text,{style:[{color:w},O.regular,x.text],children:_})}))}const x=l.default.create({button:{paddingHorizontal:24,paddingVertical:10,borderRadius:b,borderCurve:'continuous'},text:{fontSize:14,lineHeight:20,letterSpacing:.1,textAlign:'center'}})},367,[109,107,359,34,95,42,368,376,104]);
445__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["disabled","onPress","onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","hoverEffect","style","children"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"PlatformPressable",{enumerable:!0,get:function(){return v}});var n=t(r(_d[0])),o=r(_d[1]),s=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),l=t(r(_d[3])),c=t(r(_d[4])),u=(t(r(_d[5])),t(r(_d[6]))),d=r(_d[7]);const f=l.default.createAnimatedComponent(u.default);function y(t,u){let{disabled:y,onPress:v,onPressIn:p,onPressOut:b,android_ripple:h,pressColor:O,pressOpacity:_=.3,hoverEffect:j,style:K,children:x}=t,$=(0,n.default)(t,e);const{dark:k}=(0,o.useTheme)(),[w]=s.useState(()=>new l.default.Value(1)),T=(e,t)=>{l.default.timing(w,{toValue:e,duration:t,easing:c.default.inOut(c.default.quad),useNativeDriver:false}).start()};return(0,d.jsxs)(f,Object.assign({ref:u,accessible:!0,role:null!=$.href?'link':'button',onPress:y?void 0:e=>{if(null!==$.href){const t='metaKey'in e&&e.metaKey||'altKey'in e&&e.altKey||'ctrlKey'in e&&e.ctrlKey||'shiftKey'in e&&e.shiftKey,n=!('button'in e)||(null==e.button||0===e.button),o=!e.currentTarget||!('target'in e.currentTarget)||[void 0,null,'','self'].includes(e.currentTarget.target);!t&&n&&o&&(e.preventDefault(),v?.(e))}else v?.(e)},onPressIn:y?void 0:e=>{T(_,0),p?.(e)},onPressOut:y?void 0:e=>{T(1,200),b?.(e)},android_ripple:void 0,style:[{cursor:y?'auto':'pointer',opacity:y?1:w},K]},$,{children:[y?null:(0,d.jsx)(P,Object.assign({},j)),x]}))}const v=s.forwardRef(y);v.displayName='PlatformPressable';const p=String.raw,b="__react-navigation_elements_Pressable_hover",h=p`
446  .${b} {
447    position: absolute;
448    top: 0;
449    left: 0;
450    right: 0;
451    bottom: 0;
452    border-radius: inherit;
453    background-color: var(--overlay-color);
454    opacity: 0;
455    transition: opacity 0.15s;
456    pointer-events: none;
457  }
458
459  a:hover > .${b}, button:hover > .${b} {
460    opacity: var(--overlay-hover-opacity);
461  }
462
463  a:active > .${b}, button:active > .${b} {
464    opacity: var(--overlay-active-opacity);
465  }
466`,P=({color:e,hoverOpacity:t=.08,activeOpacity:n=.16})=>null==e?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{href:b,precedence:"elements",children:h}),(0,d.jsx)("div",{className:b,style:{'--overlay-color':e,'--overlay-hover-opacity':t,'--overlay-active-opacity':n}})]})},368,[109,107,34,271,355,95,369,104]);
467__d(function(g,r,i,a,m,_e,_d){"use strict";
467function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var n=e(r(_d[0])),t=e(r(_d[1])),o=r(_d[2]),s=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(o),l=e(r(_d[3])),u=e(r(_d[4])),d=e(r(_d[5])),c=e(r(_d[6])),f=e(r(_d[7])),v=["children","delayLongPress","delayPressIn","delayPressOut","disabled","onBlur","onContextMenu","onFocus","onHoverIn","onHoverOut","onKeyDown","onLongPress","onPress","onPressMove","onPressIn","onPressOut","style","tabIndex","testOnly_hovered","testOnly_pressed"];function P(e,c){var P=e.children,O=e.delayLongPress,p=e.delayPressIn,_=e.delayPressOut,M=e.disabled,C=e.onBlur,h=e.onContextMenu,I=e.onFocus,x=e.onHoverIn,E=e.onHoverOut,H=e.onKeyDown,w=e.onLongPress,L=e.onPress,j=e.onPressMove,k=e.onPressIn,D=e.onPressOut,K=e.style,S=e.tabIndex,B=e.testOnly_hovered,F=e.testOnly_pressed,R=(0,t.default)(e,v),A=y(!0===B),N=A[0],q=A[1],z=y(!1),G=z[0],J=z[1],Q=y(!0===F),T=Q[0],U=Q[1],V=(0,o.useRef)(null),W=(0,l.default)(c,V),X=(0,o.useMemo)(()=>({delayLongPress:O,delayPressStart:p,delayPressEnd:_,disabled:M,onLongPress:w,onPress:L,onPressChange:U,onPressStart:k,onPressMove:j,onPressEnd:D}),[O,p,_,M,w,L,k,j,D,U]),Y=(0,d.default)(V,X),Z=Y.onContextMenu,$=Y.onKeyDown;(0,u.default)(V,{contain:!0,disabled:M,onHoverChange:q,onHoverStart:x,onHoverEnd:E});var ee,ne={hovered:N,focused:G,pressed:T},te=s.useCallback(e=>{e.nativeEvent.target===V.current&&(J(!1),null!=C&&C(e))},[V,J,C]),oe=s.useCallback(e=>{e.nativeEvent.target===V.current&&(J(!0),null!=I&&I(e))},[V,J,I]),re=s.useCallback(e=>{null!=Z&&Z(e),null!=h&&h(e)},[h,Z]),se=s.useCallback(e=>{null!=$&&$(e),null!=H&&H(e)},[H,$]);return ee=void 0!==S?S:M?-1:0,s.createElement(f.default,(0,n.default)({},R,Y,{"aria-disabled":M,onBlur:te,onContextMenu:re,onFocus:oe,onKeyDown:se,ref:W,style:[M?b.disabled:b.active,'function'==typeof K?K(ne):K],tabIndex:ee}),'function'==typeof P?P(ne):P)}function y(e){var n=(0,o.useState)(!1);return[n[0]||e,n[1]]}var b=c.default.create({active:{cursor:'pointer',touchAction:'manipulation'},disabled:{pointerEvents:'box-none'}}),O=(0,o.memo)((0,o.forwardRef)(P));O.displayName='Pressable';var p=O},369,[27,43,34,240,370,374,42,276]);
468__d(function(g,r,i,a,m,_e,d){"use strict";function n(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return b}});var e=r(d[0]),t=n(r(d[1])),u=n(r(d[2])),l={},o={passive:!0},c='react-gui:hover:lock',f='react-gui:hover:unlock',v=()=>!('undefined'==typeof window||null==window.PointerEvent);function s(n,e,t){var u=document.createEvent('CustomEvent'),o=t||l,c=o.bubbles,f=void 0===c||c,v=o.cancelable,s=void 0===v||v,p=o.detail;u.initCustomEvent(e,f,s,p),n.dispatchEvent(u)}function p(n){var t=n.pointerType;return null!=t?t:(0,e.getModality)()}function b(n,e){var l=e.contain,b=e.disabled,h=e.onHoverStart,y=e.onHoverChange,E=e.onHoverUpdate,_=e.onHoverEnd,w=v(),H=(0,t.default)(w?'pointermove':'mousemove',o),C=(0,t.default)(w?'pointerenter':'mouseenter',o),M=(0,t.default)(w?'pointerleave':'mouseleave',o),P=(0,t.default)(c,o),j=(0,t.default)(f,o);(0,u.default)(()=>{var e=n.current;if(null!==e){var t=function(n){null!=_&&_(n),null!=y&&y(!1),H(e,null),M(e,null)},u=function(e){var u=n.current;null!=u&&'touch'!==p(e)&&(l&&s(u,f),t(e))},o=function(n){'touch'!==p(n)&&null!=E&&(null==n.x&&(n.x=n.clientX),null==n.y&&(n.y=n.clientY),E(n))},v=function(n){null!=h&&h(n),null!=y&&y(!0),null!=E&&H(e,b?null:o),M(e,b?null:u)};C(e,b?null:function(e){var u=n.current;if(null!=u&&'touch'!==p(e)){l&&s(u,c),v(e);P(u,b?null:function(n){n.target!==u&&t(e)}),j(u,b?null:function(n){n.target!==u&&v(e)})}})}},[C,H,M,P,j,l,b,h,y,E,_,n])}},370,[371,373,234]);
469__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getActiveModality=function(){return s},_e.getModality=function(){return l},_e.addModalityListener=function(e){return y.add(e),()=>{y.delete(e)}},_e.testOnly_resetActiveModality=function(){v=!1,s=f,l=f};
469var e,t,n,o=r(d[0]),u=r(d[1]),c=(e=u)&&e.__esModule?e:{default:e},s='keyboard',l='keyboard',v=!1,y=new Set,f='keyboard',p='mouse',E='touch',L='contextmenu',w='mousedown',h='mousemove',b='mouseup',M='pointerdown',_='pointermove',T='scroll',k='selectionchange',K='touchcancel',A='touchmove',O='touchstart',P={passive:!0},S={capture:!0,passive:!0};function j(){null==t&&null==n||(null!=t&&(l=t,t=null),null!=n&&(s=n,n=null),q())}function x(e){var t=e.type;if('undefined'!=typeof window&&null!=window.PointerEvent){if(t===M)return void(s!==e.pointerType&&(l=e.pointerType,s=e.pointerType,q()));if(t===_)return void(l!==e.pointerType&&(l=e.pointerType,q()))}else{if(v||(t===w&&s!==p&&(l=p,s=p,q()),t===h&&l!==p&&(l=p,q())),t===O)return v=!0,e.touches&&e.touches.length>1&&(v=!1),void(s!==E&&(l=E,s=E,q()));t!==L&&t!==b&&t!==k&&t!==T&&t!==K&&t!==A||(v=!1)}}function q(){var e={activeModality:s,modality:l};y.forEach(t=>{t(e)})}c.default&&((0,o.addEventListener)(window,'blur',function(){t=l,n=s,s=f,l=f,q(),v=!1},P),(0,o.addEventListener)(window,'focus',function(){j()},P),(0,o.addEventListener)(document,'keydown',function(e){e.metaKey||e.altKey||e.ctrlKey||l!==f&&(l=f,s=f,q())},S),(0,o.addEventListener)(document,'visibilitychange',function(){'hidden'!==document.visibilityState&&j()},S),(0,o.addEventListener)(document,M,x,S),(0,o.addEventListener)(document,_,x,S),(0,o.addEventListener)(document,L,x,S),(0,o.addEventListener)(document,w,x,S),(0,o.addEventListener)(document,h,x,S),(0,o.addEventListener)(document,b,x,S),(0,o.addEventListener)(document,K,x,S),(0,o.addEventListener)(document,A,x,S),(0,o.addEventListener)(document,O,x,S),(0,o.addEventListener)(document,k,x,S),(0,o.addEventListener)(document,T,x,S))},371,[372,39]);
470__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),_e.addEventListener=function(e,t,n,u){var o=s(u),l=e=>n(c(e));return e.addEventListener(t,l,o),function(){null!=e&&e.removeEventListener(t,l,o)}};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},u=()=>{};var o=(function(){var e=!1;if(n.default)try{var t={};Object.defineProperty(t,'passive',{get:()=>(e=!0,!1)}),window.addEventListener('test',null,t),window.removeEventListener('test',null,t)}catch(e){}return e})();function s(e){return null!=e&&(o?e:Boolean(e.capture))}function l(){return this.cancelBubble}function v(){return this.defaultPrevented}function c(e){return e.nativeEvent=e,e.persist=u,e.isDefaultPrevented=v,e.isPropagationStopped=l,e}},372,[39]);
471__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var t=r(d[0]),n=e(r(d[1])),u=e(r(d[2]));function l(e,l){var f=(0,u.default)(()=>new Map),c=(0,u.default)(()=>(n,u)=>{var c=f.get(n);null!=c&&c(),null==u&&(f.delete(n),u=()=>{});var o=(0,t.addEventListener)(n,e,u,l);return f.set(n,o),o});return(0,n.default)(()=>()=>{f.forEach(e=>{e()}),f.clear()},[f]),c}},373,[372,234,243]);
472__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var e,u=r(d[0]),t=(e=u)&&e.__esModule?e:{default:e},n=r(d[1]);function f(e,u){var f=(0,n.useRef)(null);null==f.current&&(f.current=new t.default(u));var l=f.current;return(0,n.useEffect)(()=>{l.configure(u)},[u,l]),(0,n.useEffect)(()=>()=>{l.reset()},[l]),(0,n.useDebugValue)(u),l.getEventHandlers()}},374,[375,34]);
473__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return N}});var t='DELAY',s='ERROR',n='LONG_PRESS_DETECTED',o='NOT_RESPONDER',l='RESPONDER_ACTIVE_LONG_PRESS_START',_='RESPONDER_ACTIVE_PRESS_START',E='RESPONDER_INACTIVE_PRESS_START',u='RESPONDER_RELEASE',h='RESPONDER_TERMINATED',c=Object.freeze({NOT_RESPONDER:{DELAY:s,RESPONDER_GRANT:E,RESPONDER_RELEASE:s,RESPONDER_TERMINATED:s,LONG_PRESS_DETECTED:s},RESPONDER_INACTIVE_PRESS_START:{DELAY:_,RESPONDER_GRANT:s,RESPONDER_RELEASE:o,RESPONDER_TERMINATED:o,LONG_PRESS_DETECTED:s},RESPONDER_ACTIVE_PRESS_START:{DELAY:s,RESPONDER_GRANT:s,RESPONDER_RELEASE:o,RESPONDER_TERMINATED:o,LONG_PRESS_DETECTED:l},RESPONDER_ACTIVE_LONG_PRESS_START:{DELAY:s,RESPONDER_GRANT:s,RESPONDER_RELEASE:o,RESPONDER_TERMINATED:o,LONG_PRESS_DETECTED:l},ERROR:{DELAY:o,RESPONDER_GRANT:E,RESPONDER_RELEASE:o,RESPONDER_TERMINATED:o,LONG_PRESS_DETECTED:o}}),R=t=>t.getAttribute('role'),T=t=>t.tagName.toLowerCase(),P=t=>t===_||t===l,S=t=>'button'===R(t),D=t=>t===E||t===_||t===l,v=t=>t===h||t===u,p=t=>{var s=t.key,n=t.target,o=' '===s||'Spacebar'===s,l='button'===T(n)||S(n);return'Enter'===s||o&&l};class N{constructor(t){this._eventHandlers=null,this._isPointerTouch=!1,this._longPressDelayTimeout=null,this._longPressDispatched=!1,this._pressDelayTimeout=null,this._pressOutDelayTimeout=null,this._touchState=o,this._responderElement=null,this.configure(t)}configure(t){this._config=t}reset(){this._cancelLongPressDelayTimeout(),this._cancelPressDelayTimeout(),this._cancelPressOutDelayTimeout()}getEventHandlers(){return null==this._eventHandlers&&(this._eventHandlers=this._createEventHandlers()),this._eventHandlers}_createEventHandlers(){var s=(s,n)=>{s.persist(),this._cancelPressOutDelayTimeout(),this._longPressDispatched=!1,this._selectionTerminated=!1,this._touchState=o,this._isPointerTouch='touchstart'===s.nativeEvent.type,this._receiveSignal("RESPONDER_GRANT",s);var l=O(this._config.delayPressStart,0,50);!1!==n&&l>0?this._pressDelayTimeout=setTimeout(()=>{this._receiveSignal(t,s)},l):this._receiveSignal(t,s);var _=O(this._config.delayLongPress,10,450);this._longPressDelayTimeout=setTimeout(()=>{this._handleLongPress(s)},_+l)},n=t=>{this._receiveSignal(u,t)},l=t=>{var s=this._config.onPress,_=t.target;if(this._touchState!==o&&p(t)){n(t),document.removeEventListener('keyup',l);var E=_.getAttribute('role'),u=T(_),h='link'===E||'a'===u||'button'===u||'input'===u||'select'===u||'textarea'===u,c=this._responderElement===_;null!=s&&!h&&c&&s(t),this._responderElement=null}};
473return{onStartShouldSetResponder:t=>{var s=this._config.disabled;return s&&S(t.currentTarget)&&t.stopPropagation(),null==s||!s},onKeyDown:t=>{var n=this._config.disabled,_=t.key,E=t.target;if(!n&&p(t)){this._touchState===o&&(s(t,!1),this._responderElement=E,document.addEventListener('keyup',l));var u=' '===_||'Spacebar'===_,h=R(E);u&&('button'===h||'menuitem'===h)&&'button'!==T(E)&&t.preventDefault(),t.stopPropagation()}},onResponderGrant:t=>s(t),onResponderMove:t=>{null!=this._config.onPressMove&&this._config.onPressMove(t);var s=f(t);if(null!=this._touchActivatePosition){var n=this._touchActivatePosition.pageX-s.pageX,o=this._touchActivatePosition.pageY-s.pageY;Math.hypot(n,o)>10&&this._cancelLongPressDelayTimeout()}},onResponderRelease:t=>n(t),onResponderTerminate:t=>{'selectionchange'===t.nativeEvent.type&&(this._selectionTerminated=!0),this._receiveSignal(h,t)},onResponderTerminationRequest:t=>{var s=this._config,n=s.cancelable,o=s.disabled,l=s.onLongPress;return!(!o&&null!=l&&this._isPointerTouch&&'contextmenu'===t.nativeEvent.type)&&(null==n||n)},onClick:t=>{var s=this._config,n=s.disabled,o=s.onPress;n?S(t.currentTarget)&&t.stopPropagation():(t.stopPropagation(),this._longPressDispatched||this._selectionTerminated?t.preventDefault():null!=o&&!1===t.altKey&&o(t))},onContextMenu:t=>{var s=this._config,n=s.disabled,o=s.onLongPress;n?S(t.currentTarget)&&t.stopPropagation():null!=o&&this._isPointerTouch&&!t.defaultPrevented&&(t.preventDefault(),t.stopPropagation())}}}_receiveSignal(t,n){var l=this._touchState,_=null;null!=c[l]&&(_=c[l][t]),this._touchState===o&&t===u||(null==_||_===s?console.error("PressResponder: Invalid signal "+t+" for state "+l+" on responder"):l!==_&&(this._performTransitionSideEffects(l,_,t,n),this._touchState=_))}_performTransitionSideEffects(t,s,o,_){if(v(o)&&(setTimeout(()=>{this._isPointerTouch=!1},0),this._touchActivatePosition=null,this._cancelLongPressDelayTimeout()),D(t)&&o===n){var E=this._config.onLongPress;null!=E&&null==_.nativeEvent.key&&(E(_),this._longPressDispatched=!0)}var h=P(t),c=P(s);if(!h&&c?this._activate(_):h&&!c&&this._deactivate(_),D(t)&&o===u){var R=this._config,T=R.onLongPress;if(null!=R.onPress)null!=T&&t===l||c||h||(this._activate(_),this._deactivate(_))}this._cancelPressDelayTimeout()}_activate(t){var s=this._config,n=s.onPressChange,o=s.onPressStart,l=f(t);this._touchActivatePosition={pageX:l.pageX,pageY:l.pageY},null!=o&&o(t),null!=n&&n(!0)}_deactivate(t){var s=this._config,n=s.onPressChange,o=s.onPressEnd;function l(){null!=o&&o(t),null!=n&&n(!1)}var _=O(this._config.delayPressEnd);_>0?this._pressOutDelayTimeout=setTimeout(()=>{l()},_):l()}_handleLongPress(t){this._touchState!==_&&this._touchState!==l||this._receiveSignal(n,t)}_cancelLongPressDelayTimeout(){null!=this._longPressDelayTimeout&&(clearTimeout(this._longPressDelayTimeout),this._longPressDelayTimeout=null)}_cancelPressDelayTimeout(){null!=this._pressDelayTimeout&&(clearTimeout(this._pressDelayTimeout),this._pressDelayTimeout=null)}_cancelPressOutDelayTimeout(){null!=this._pressOutDelayTimeout&&(clearTimeout(this._pressOutDelayTimeout),this._pressOutDelayTimeout=null)}}function O(t,s,n){return void 0===s&&(s=0),void 0===n&&(n=0),Math.max(s,null!=t?t:n)}function f(t){var s=t.nativeEvent,n=s.changedTouches,o=s.touches;return null!=o&&o.length>0?o[0]:null!=n&&n.length>0?n[0]:t.nativeEvent}},375,[]);
474__d(function(g,r,i,a,m,_e,d){"use strict";const e=["style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Text=function(t){let{style:o}=t,c=(0,s.default)(t,e);const{colors:f,fonts:_}=(0,u.useTheme)();return(0,n.jsx)(l.default,Object.assign({},c,{style:[{color:f.text},_.regular,o]}))};var s=t(r(d[0])),u=r(d[1]),l=t(r(d[2])),n=r(d[3])},376,[109,107,222,104]);
475__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getDefaultSidebarWidth",{enumerable:!0,get:function(){return t}});const t=({width:t})=>t-56<=360?t-56:360},377,[]);
476__d(function(g,r,i,a,m,_e,d){"use strict";
476function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.getDefaultHeaderHeight=function(e,t,u){let n;const o=u;e.width,e.height;return n=64,64+o};e(r(d[0])),e(r(d[1]))},378,[331,95]);
477__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getHeaderTitle=function(t,l){return'string'==typeof t.headerTitle?t.headerTitle:void 0!==t.title?t.title:l}},379,[]);
478__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["height","maxHeight","minHeight","backfaceVisibility","backgroundColor","borderBlockColor","borderBlockEndColor","borderBlockStartColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderCurve","borderEndColor","borderEndEndRadius","borderEndStartRadius","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartEndRadius","borderStartStartRadius","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","boxShadow","elevation","filter","mixBlendMode","opacity","shadowColor","shadowOffset","shadowOpacity","shadowRadius","transform","transformOrigin"];function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Header=function(o){const T=(0,u.useSafeAreaInsets)(),v=(0,f.useFrameSize)(e=>e,!0),{colors:j}=(0,d.useTheme)(),O=(0,d.useNavigation)(),W=l.useContext(x.HeaderShownContext),[H,L]=l.useState(!1),[M,V]=l.useState(void 0),{layout:_=v,modal:P=!1,back:D,title:F,headerTitle:I,headerTitleAlign:z="left",headerLeft:A=(D?e=>(0,w.jsx)(p.HeaderBackButton,Object.assign({},e)):void 0),headerSearchBarOptions:G,headerTransparent:N,headerTintColor:q,headerBackground:J,headerRight:K,headerTitleAllowFontScaling:Q,headerTitleStyle:U,headerLeftContainerStyle:X,headerRightContainerStyle:Y,headerTitleContainerStyle:Z,headerBackButtonDisplayMode:$="minimal",headerBackTitleStyle:ee,headerBackgroundContainerStyle:re,headerStyle:oe,headerShadowVisible:te,headerPressColor:de,headerPressOpacity:ae,headerStatusBarHeight:ie=(W?0:T.top)}=o,ne=(0,C.getDefaultHeaderHeight)(_,P,ie),le=b.default.flatten(oe||{}),{height:se=ne,maxHeight:be,minHeight:he,backfaceVisibility:ue,backgroundColor:ce,borderBlockColor:fe,borderBlockEndColor:ge,borderBlockStartColor:Ce,borderBottomColor:pe,borderBottomEndRadius:Re,borderBottomLeftRadius:Se,borderBottomRightRadius:me,borderBottomStartRadius:ye,borderBottomWidth:Be,borderColor:xe,borderCurve:Ee,borderEndColor:we,borderEndEndRadius:ke,borderEndStartRadius:Te,borderEndWidth:ve,borderLeftColor:je,borderLeftWidth:Oe,borderRadius:We,borderRightColor:He,borderRightWidth:Le,borderStartColor:Me,borderStartEndRadius:Ve,borderStartStartRadius:Pe,borderStartWidth:De,borderStyle:Fe,borderTopColor:Ie,borderTopEndRadius:ze,borderTopLeftRadius:Ae,borderTopRightRadius:Ge,borderTopStartRadius:Ne,borderTopWidth:qe,borderWidth:Je,boxShadow:Ke,elevation:Qe,filter:Ue,mixBlendMode:Xe,opacity:Ye,shadowColor:Ze,shadowOffset:$e,shadowOpacity:er,shadowRadius:rr,transform:or,transformOrigin:tr}=le,dr=((0,t.default)(le,e),{backfaceVisibility:ue,backgroundColor:ce,borderBlockColor:fe,borderBlockEndColor:ge,borderBlockStartColor:Ce,borderBottomColor:pe,borderBottomEndRadius:Re,borderBottomLeftRadius:Se,borderBottomRightRadius:me,borderBottomStartRadius:ye,borderBottomWidth:Be,borderColor:xe,borderCurve:Ee,borderEndColor:we,borderEndEndRadius:ke,borderEndStartRadius:Te,borderEndWidth:ve,borderLeftColor:je,borderLeftWidth:Oe,borderRadius:We,borderRightColor:He,borderRightWidth:Le,borderStartColor:Me,borderStartEndRadius:Ve,borderStartStartRadius:Pe,borderStartWidth:De,borderStyle:Fe,borderTopColor:Ie,borderTopEndRadius:ze,borderTopLeftRadius:Ae,borderTopRightRadius:Ge,borderTopStartRadius:Ne,borderTopWidth:qe,borderWidth:Je,boxShadow:Ke,elevation:Qe,filter:Ue,mixBlendMode:Xe,opacity:Ye,shadowColor:Ze,shadowOffset:$e,shadowOpacity:er,shadowRadius:rr,transform:or,transformOrigin:tr});for(const e in dr)void 0===dr[e]&&delete dr[e];const ar=Object.assign({},N&&{backgroundColor:'transparent'},(N||!1===te)&&Object.assign({borderBottomWidth:0},{boxShadow:'none'}),dr),ir=q??j.text,nr=A?A({tintColor:ir,pressColor:de,pressOpacity:ae,displayMode:$,titleLayout:M,screenLayout:_,canGoBack:Boolean(D),onPress:D?O.goBack:void 0,label:D?.title,labelStyle:ee,href:D?.href}):null,lr=K?K({tintColor:ir,pressColor:de,pressOpacity:ae,canGoBack:Boolean(D)}
478):null,sr='function'!=typeof I?e=>(0,w.jsx)(E.HeaderTitle,Object.assign({},e)):I;return(0,w.jsxs)(s.default.View,{pointerEvents:"box-none",style:[{height:se,minHeight:he,maxHeight:be,opacity:Ye,transform:or}],children:[(0,w.jsx)(s.default.View,{pointerEvents:"box-none",style:[b.default.absoluteFill,re],children:J?J({style:ar}):(0,w.jsx)(R.HeaderBackground,{pointerEvents:!N||'transparent'!==ar.backgroundColor&&0!==(0,n.default)(ar.backgroundColor).alpha()?'auto':'none',style:ar})}),(0,w.jsx)(h.default,{pointerEvents:"none",style:{height:ie}}),(0,w.jsxs)(h.default,{pointerEvents:"box-none",style:[k.content,null],children:[(0,w.jsx)(s.default.View,{pointerEvents:"box-none",style:[k.start,!H&&'center'===z&&k.expand,{marginStart:T.left},X],children:nr}),H?null:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s.default.View,{pointerEvents:"box-none",style:[k.title,{maxWidth:'center'===z?_.width-2*((nr?'minimal'!==$?80:32:16)+(lr||G?16:0)+Math.max(T.left,T.right)):_.width-((nr?52:16)+(lr||G?52:16)+T.left-T.right)},'left'===z&&nr?{marginStart:4}:{marginHorizontal:16},Z],children:sr({children:F,allowFontScaling:Q,tintColor:q,onLayout:e=>{const{height:o,width:t}=e.nativeEvent.layout;V(e=>e&&o===e.height&&t===e.width?e:{height:o,width:t})},style:U})}),(0,w.jsxs)(s.default.View,{pointerEvents:"box-none",style:[k.end,k.expand,{marginEnd:T.right},Y],children:[lr,G?(0,w.jsx)(S.HeaderButton,{tintColor:ir,pressColor:de,pressOpacity:ae,onPress:()=>{L(!0),G?.onOpen?.()},children:(0,w.jsx)(y.HeaderIcon,{source:c.default,tintColor:ir})}):null]})]}),H?(0,w.jsx)(B.HeaderSearchBar,Object.assign({},G,{visible:H,onClose:()=>{L(!1),G?.onClose?.()},tintColor:q,style:[!nr&&{marginStart:8}]})):null]})]})};var t=o(r(_d[0])),d=r(_d[1]),n=o(r(_d[2])),l=(function(e){if(e&&e.__esModule)return e;var o={};return e&&Object.keys(e).forEach(function(t){var d=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,d.get?d:{enumerable:!0,get:function(){return e[t]}})}),o.default=e,o})(r(_d[3])),s=o(r(_d[4]));r(_d[5]);var b=o(r(_d[6])),h=o(r(_d[7])),u=r(_d[8]),c=o(r(_d[9])),f=r(_d[10]),C=r(_d[11]),p=r(_d[12]),R=r(_d[13]),S=r(_d[14]),y=r(_d[15]),B=r(_d[16]),x=r(_d[17]),E=r(_d[18]),w=r(_d[19]);const k=b.default.create({content:{flex:1,flexDirection:'row',alignItems:'stretch'},large:{marginHorizontal:5},title:{justifyContent:'center'},start:{flexDirection:'row',alignItems:'center',justifyContent:'flex-start'},end:{flexDirection:'row',alignItems:'center',justifyContent:'flex-end'},expand:{flexGrow:1,flexBasis:0}})},380,[109,107,359,34,271,95,42,276,381,269,387,378,388,392,390,391,393,395,397,104]);
479__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})},381,[382,384,385,386]);
480__d(function(g,_r,i,a,m,_e,_d){"use strict";const e=["children","initialMetrics","initialSafeAreaInsets","style"],t=["onChange","style","children"];function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SafeAreaInsetsContext",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"SafeAreaFrameContext",{enumerable:!0,get:function(){return d}}),_e.SafeAreaProvider=function(t){let{children:n,initialMetrics:l,initialSafeAreaInsets:v,style:y}=t,b=(0,r.default)(t,e);const S=o.useContext(c),p=o.useContext(d),[w,C]=o.useState(l?.insets??v??S??null),[A,P]=o.useState(l?.frame??p??{x:0,y:0,width:u.default.get('window').width,height:u.default.get('window').height}),x=o.useCallback(e=>{const{nativeEvent:{frame:t,insets:n}}=e;P(e=>!t||t.height===e.height&&t.width===e.width&&t.x===e.x&&t.y===e.y?e:t),C(e=>e&&n.bottom===e.bottom&&n.left===e.left&&n.right===e.right&&n.top===e.top?e:n)},[]);return o.createElement(s.NativeSafeAreaProvider,f({style:[h.fill,y],onInsetsChange:x},b),null!=w?o.createElement(d.Provider,{value:A},o.createElement(c.Provider,{value:w},n)):null)},_e.SafeAreaListener=function(e){let{onChange:n,style:u,children:l}=e,c=(0,r.default)(e,t);return o.createElement(s.NativeSafeAreaProvider,f({},c,{style:[h.fill,u],onInsetsChange:e=>{n({insets:e.nativeEvent.insets,frame:e.nativeEvent.frame})}}),l)},_e.useSafeAreaInsets=y,_e.useSafeAreaFrame=function(){const e=o.useContext(d);if(null==e)throw new Error(v);return e}
480,_e.withSafeAreaInsets=function(e){return o.forwardRef((t,n)=>{const r=y();return o.createElement(e,f({},t,{insets:r,ref:n}))})},_e.useSafeArea=function(){return y()},Object.defineProperty(_e,"SafeAreaConsumer",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"SafeAreaContext",{enumerable:!0,get:function(){return S}});var r=n(_r(_d[0])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(_r(_d[1])),u=n(_r(_d[2])),l=n(_r(_d[3])),s=_r(_d[4]);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}const c=o.createContext(null),d=o.createContext(null);const h=l.default.create({fill:{flex:1}});const v='No safe area value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.';function y(){const e=o.useContext(c);if(null==e)throw new Error(v);return e}const b=c.Consumer,S=c},382,[109,34,284,42,383]);
481__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.NativeSafeAreaProvider=function({children:t,style:n,onInsetsChange:d}){return e.useEffect(()=>{if('undefined'==typeof document)return;const t=p();document.body.appendChild(t);const e=()=>{const{paddingTop:e,paddingBottom:n,paddingLeft:o,paddingRight:s}=window.getComputedStyle(t),u={top:e?parseInt(e,10):0,bottom:n?parseInt(n,10):0,left:o?parseInt(o,10):0,right:s?parseInt(s,10):0},c={x:0,y:0,width:document.documentElement.offsetWidth,height:document.documentElement.offsetHeight};d({nativeEvent:{insets:u,frame:c}})};return t.addEventListener(u(),e),e(),()=>{document.body.removeChild(t),t.removeEventListener(u(),e)}},[d]),e.createElement(o.default,{style:n},t)};var t,e=(function(t){if(t&&t.__esModule)return t;var e={};return t&&Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),e.default=t,e})(r(_d[0])),n=r(_d[1]),o=(t=n)&&t.__esModule?t:{default:t};const d={WebkitTransition:'webkitTransitionEnd',Transition:'transitionEnd',MozTransition:'transitionend',MSTransition:'msTransitionEnd',OTransition:'oTransitionEnd'};let s=null;function u(){if(null!=s)return s;const t=document.createElement('invalidtype');s=d.Transition;for(const e in d)if(void 0!==t.style[e]){s=d[e];break}return s}let c=null;function f(){if(null!==c)return c;const{CSS:t}=window;return c=t&&t.supports&&t.supports('top: constant(safe-area-inset-top)')?'constant':'env',c}function l(t){return`${f()}(safe-area-inset-${t})`}function p(){const t=document.createElement('div'),{style:e}=t;return e.position='fixed',e.left='0',e.top='0',e.width='0',e.height='0',e.zIndex='-1',e.overflow='hidden',e.visibility='hidden',e.transitionDuration='0.05s',e.transitionProperty='padding',e.transitionDelay='0s',e.paddingTop=l('top'),e.paddingBottom=l('bottom'),e.paddingLeft=l('left'),e.paddingRight=l('right'),t}},383,[34,276]);
482__d(function(g,_r,i,a,m,_e,_d){"use strict";const t=["style","mode","edges"];function e(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SafeAreaView",{enumerable:!0,get:function(){return s}});var r=e(_r(_d[0])),n=(function(t){if(t&&t.__esModule)return t;var e={};return t&&Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}),e.default=t,e})(_r(_d[1])),o=e(_r(_d[2])),d=e(_r(_d[3])),u=_r(_d[4]);function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f.apply(null,arguments)}const l={top:'additive',left:'additive',bottom:'additive',right:'additive'};function c(t,e,r){switch(r){case'maximum':return Math.max(e,t);case'additive':return e+t;default:return e}}const s=n.forwardRef((e,s)=>{let{style:p={},mode:b,edges:h}=e,v=(0,r.default)(e,t);const y=(0,u.useSafeAreaInsets)(),O=n.useMemo(()=>null==h?l:Array.isArray(h)?h.reduce((t,e)=>(t[e]='additive',t),{}):h,[h]),_=n.useMemo(()=>{const t=o.default.flatten(p);if('margin'===b){const{margin:e=0,marginVertical:r=e,marginHorizontal:n=e,marginTop:o=r,marginRight:d=n,marginBottom:u=r,marginLeft:f=n}=t,l={marginTop:c(y.top,o,O.top),marginRight:c(y.right,d,O.right),marginBottom:c(y.bottom,u,O.bottom),marginLeft:c(y.left,f,O.left)};return[p,l]}{const{padding:e=0,paddingVertical:r=e,paddingHorizontal:n=e,paddingTop:o=r,paddingRight:d=n,paddingBottom:u=r,paddingLeft:f=n}=t,l={paddingTop:c(y.top,o,O.top),paddingRight:c(y.right,d,O.right),paddingBottom:c(y.bottom,u,O.bottom),paddingLeft:c(y.left,f,O.left)};return[p,l]}},[O.bottom,O.left,O.right,O.top,y.bottom,y.left,y.right,y.top,b,p]);return n.createElement(d.default,f({style:_},v,{ref:s}))})},384,[109,34,42,276,382]);
483__d(function(g,r,i,a,m,e,d){"use strict";
483Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"initialWindowMetrics",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"initialWindowSafeAreaInsets",{enumerable:!0,get:function(){return t}});const n=null,t=null},385,[]);
484__d(function(g,r,i,a,m,e,d){},386,[]);
485__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useFrameSize=function(t,n){const u=e.useContext(s);if(null==u)throw new Error('useFrameSize must be used within a FrameSizeProvider');return(0,o.useSyncExternalStoreWithSelector)(n?u.subscribeThrottled:u.subscribe,u.getCurrent,u.getCurrent,t)},_e.FrameSizeProvider=function({initialFrame:t,render:n}){const o=e.useRef({width:t.width,height:t.height}),d=e.useRef(new Set),l=(0,u.default)(()=>o.current),f=(0,u.default)(e=>(d.current.add(e),()=>{d.current.delete(e)})),b=(0,u.default)(e=>{let t,n=!1,u=!1;const o=f(()=>{clearTimeout(t),n=!0,u?t=setTimeout(()=>{n&&(n=!1,e())},100):(u=!0,setTimeout(function(){u=!1},100),n=!1,e())});return()=>{o(),clearTimeout(t)}}),w=e.useMemo(()=>({getCurrent:l,subscribe:f,subscribeThrottled:b}),[f,b,l]),v=(0,u.default)(e=>{o.current.height===e.height&&o.current.width===e.width||(o.current={width:e.width,height:e.height},d.current.forEach(e=>e()))}),y=e.useRef(null);e.useEffect(()=>{},[v]);return(0,c.jsxs)(s.Provider,{value:w,children:[(0,c.jsx)(h,{onChange:v}),n({ref:y,onLayout:e=>{const{width:t,height:n}=e.nativeEvent.layout;v({width:t,height:n})}})]})};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));r(_d[1]);var t,n=r(_d[2]),u=(t=n)&&t.__esModule?t:{default:t},o=r(_d[3]),c=r(_d[4]);const s=e.createContext(void 0);function h({onChange:t}){const n=e.useRef(null);return e.useEffect(()=>{if(null==n.current)return;const e=n.current.getBoundingClientRect();t({width:e.width,height:e.height});const u=new ResizeObserver(e=>{const n=e[0];if(n){const{width:e,height:u}=n.contentRect;t({width:e,height:u})}});return u.observe(n.current),()=>{u.disconnect()}},[t]),(0,c.jsx)("div",{ref:n,style:{position:'absolute',left:0,right:0,top:0,bottom:0,pointerEvents:'none',visibility:'hidden'}})}},387,[34,95,122,196,104]);
486__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeaderBackButton=function({disabled:e,allowFontScaling:o,backImage:h,label:p,labelStyle:x,displayMode:L="minimal",onLabelLayout:j,onPress:O,pressColor:k,pressOpacity:w,screenLayout:C,tintColor:_,titleLayout:v,truncatedLabel:I="Back",accessibilityLabel:M=(p&&'Back'!==p?`${p}, back`:'Go back'),testID:S,style:W,href:B}){const{colors:D,fonts:E}=(0,t.useTheme)(),{direction:F}=(0,t.useLocale)(),[H,P]=n.useState(null),[N,T]=n.useState(null);return(0,f.jsx)(u.HeaderButton,{disabled:e,href:B,accessibilityLabel:M,testID:S,onPress:()=>{O&&requestAnimationFrame(()=>O())},pressColor:k,pressOpacity:w,style:[y.container,W],children:(0,f.jsxs)(n.Fragment,{children:[h?h({tintColor:_??D.text}):(0,f.jsx)(d.HeaderIcon,{source:c.default,tintColor:_,style:[y.icon,'minimal'!==L&&y.iconWithLabel]}),(()=>{if('minimal'===L)return null;const e=v&&C?(C.width-v.width)/2-(b+d.ICON_MARGIN):null,t='default'===L?p:I,n=e&&H&&N?e>H?t:e>N?I:null:t,c=[E.regular,y.label,x],u=[c,{position:'absolute',top:0,left:0,opacity:0}];return(0,f.jsxs)(s.default,{style:y.labelWrapper,children:[p&&'default'===L?(0,f.jsx)(l.default.Text,{style:u,numberOfLines:1,onLayout:e=>P(e.nativeEvent.layout.width),children:p}):null,I?(0,f.jsx)(l.default.Text,{style:u,numberOfLines:1,onLayout:e=>T(e.nativeEvent.layout.width),children:I}):null,n?(0,f.jsx)(l.default.Text,{accessible:!1,onLayout:j,style:[_?{color:_}:null,c],numberOfLines:1,allowFontScaling:!!o,children:n}):null]})})()]})})};var t=r(_d[0]),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),l=e(r(_d[2]));e(r(_d[3]));r(_d[4]);var o=e(r(_d[5])),s=e(r(_d[6])),c=e(r(_d[7])),u=(e(r(_d[8])),r(_d[9]),r(_d[10])),d=r(_d[11]),f=r(_d[12]);const b=24,y=o.default.create({container:Object.assign({paddingHorizontal:0,minWidth:o.default.hairlineWidth},{marginVertical:3,marginHorizontal:11}),label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:'row',alignItems:'flex-start',marginEnd:d.ICON_MARGIN},icon:{width:b,marginEnd:3},iconWithLabel:{},iconMaskContainer:{flex:1,flexDirection:'row',justifyContent:'center'},iconMaskFillerRect:{flex:1,backgroundColor:'#000'},iconMask:{height:21,width:13,marginStart:-14.5,marginVertical:12,alignSelf:'center'},flip:{transform:'scaleX(-1)'}})},388,[107,34,271,328,95,42,276,265,266,389,390,391,104]);
487__d(function(g,r,i,a,m,e,d){"use strict";
487Object.defineProperty(e,'__esModule',{value:!0}),e.MaskedView=function({children:n}){return n}},389,[]);
488__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"HeaderButton",{enumerable:!0,get:function(){return l}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=(e(r(_d[1])),e(r(_d[2]))),o=r(_d[3]),s=r(_d[4]);function d({disabled:e,onPress:t,pressColor:n,pressOpacity:d,accessibilityLabel:l,testID:f,style:b,href:p,children:y},_){return(0,s.jsx)(o.PlatformPressable,{ref:_,disabled:e,href:p,"aria-label":l,testID:f,onPress:t,pressColor:n,pressOpacity:d,android_ripple:u,style:[c.container,e&&c.disabled,b],hitSlop:{top:16,right:16,bottom:16,left:16},children:y})}const l=t.forwardRef(d);l.displayName='HeaderButton';const u={borderless:!0,foreground:!1,radius:20},c=n.default.create({container:{flexDirection:'row',alignItems:'center',paddingHorizontal:8,borderRadius:10,borderCurve:'continuous'},disabled:{opacity:.5}})},390,[34,95,42,368,104]);
489__d(function(g,r,i,a,m,_e,d){"use strict";const e=["source","style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeaderIcon=function(t){let{source:u,style:l}=t,f=(0,n.default)(t,e);const{colors:b}=(0,o.useTheme)(),{direction:y}=(0,o.useLocale)();return(0,s.jsx)(c.default,Object.assign({source:u,resizeMode:"contain",fadeDuration:0,tintColor:b.text,style:[_.icon,'rtl'===y&&_.flip,l]},f))},Object.defineProperty(_e,"ICON_SIZE",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"ICON_MARGIN",{enumerable:!0,get:function(){return f}});var n=t(r(d[0])),o=r(d[1]),c=t(r(d[2]));r(d[3]);var u=t(r(d[4])),s=r(d[5]);const l=24,f=3,_=u.default.create({icon:{width:l,height:l,margin:f},flip:{transform:'scaleX(-1)'}})},391,[109,107,328,95,42,104]);
490__d(function(g,r,i,a,m,_e,d){"use strict";const e=["style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeaderBackground=function(t){let{style:c}=t,f=(0,o.default)(t,e);const{colors:b,dark:_}=(0,n.useTheme)();return(0,l.jsx)(s.default.View,Object.assign({style:[u.container,Object.assign({backgroundColor:b.card,borderBottomColor:b.border},!1),c]},f))};var o=t(r(d[0])),n=r(d[1]);r(d[2]);var s=t(r(d[3]));r(d[4]);var c=t(r(d[5])),l=r(d[6]);const u=c.default.create({container:Object.assign({flex:1},{borderBottomWidth:c.default.hairlineWidth})})},392,[109,107,34,271,95,42,104]);
491__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["visible","inputType","autoFocus","autoCapitalize","placeholder","cancelButtonText","enterKeyHint","onChangeText","onClose","tintColor","style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"HeaderSearchBar",{enumerable:!0,get:function(){return S}});var n=t(r(_d[0])),o=r(_d[1]),l=t(r(_d[2])),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),c=t(r(_d[4]));t(r(_d[5]));r(_d[6]);var s=t(r(_d[7])),f=t(r(_d[8])),d=t(r(_d[9])),p=(t(r(_d[10])),t(r(_d[11]))),h=t(r(_d[12])),b=(r(_d[13]),r(_d[14]),r(_d[15])),y=r(_d[16]),C=r(_d[17]);const x={text:'text',number:'numeric',phone:'tel',email:'email'},v=!1;function j(t,s){let{visible:j,inputType:S,autoFocus:B=!0,autoCapitalize:H,placeholder:O="Search",cancelButtonText:_="Cancel",enterKeyHint:w="search",onChangeText:z,onClose:I,tintColor:k,style:E}=t,P=(0,n.default)(t,e);const D=(0,o.useNavigation)(),{dark:R,colors:V,fonts:M}=(0,o.useTheme)(),[N,F]=u.useState(''),[K,A]=u.useState(j),[L]=u.useState(()=>new c.default.Value(j?1:0)),[W]=u.useState(()=>new c.default.Value(0)),q=u.useRef(j),G=u.useRef(!1),J=u.useRef(null);u.useEffect(()=>{if(j!==q.current)return c.default.timing(L,{toValue:j?1:0,duration:100,useNativeDriver:v}).start(({finished:e})=>{e&&(A(j),q.current=j)}),()=>{L.stopAnimation()}},[j,L]);const Q=''!==N;u.useEffect(()=>{G.current!==Q&&c.default.timing(W,{toValue:Q?1:0,duration:100,useNativeDriver:v}).start(({finished:e})=>{e&&(G.current=Q)})},[W,Q]);const U=u.useCallback(()=>{J.current?.clear(),J.current?.focus(),F('')},[]),X=u.useCallback(()=>{U(),z?.({nativeEvent:{text:''}})},[U,z]),Y=u.useCallback(()=>{X(),I()},[X,I]);if(u.useEffect(()=>D?.addListener('blur',Y),[Y,D]),u.useImperativeHandle(s,()=>({focus:()=>{J.current?.focus()},blur:()=>{J.current?.blur()},setText:e=>{J.current?.setNativeProps({text:e}),F(e)},clearText:U,cancelSearch:Y}),[Y,U]),!j&&!K)return null;const Z=k??V.text;return(0,C.jsxs)(c.default.View,{pointerEvents:j?'auto':'none',"aria-live":"polite","aria-hidden":!j,style:[T.container,{opacity:L},E],children:[(0,C.jsxs)(d.default,{style:T.searchbarContainer,children:[(0,C.jsx)(y.HeaderIcon,{source:h.default,tintColor:Z,style:T.inputSearchIcon}),(0,C.jsx)(f.default,Object.assign({}
491,P,{ref:J,onChange:z,onChangeText:F,autoFocus:B,autoCapitalize:'systemDefault'===H?void 0:H,inputMode:x[S??'text'],enterKeyHint:w,placeholder:O,placeholderTextColor:(0,l.default)(Z).alpha(.5).string(),cursorColor:V.primary,selectionHandleColor:V.primary,selectionColor:(0,l.default)(V.primary).alpha(.3).string(),style:[M.regular,T.searchbar,{backgroundColor:'transparent',color:Z,borderBottomColor:(0,l.default)(Z).alpha(.2).string()}]})),null]}),(0,C.jsx)(b.HeaderButton,{onPress:()=>{N?X():I()},style:T.closeButton,children:(0,C.jsx)(y.HeaderIcon,{source:p.default,tintColor:Z})}),null]})}const T=s.default.create({container:{flex:1,flexDirection:'row',alignItems:'stretch'},inputSearchIcon:Object.assign({position:'absolute',opacity:.5,left:4,top:17},{}),closeButton:{position:'absolute',opacity:.5,right:8,top:17},clearButton:{position:'absolute',right:0,top:-7,bottom:0,justifyContent:'center',padding:8},clearIcon:{height:16,width:16,opacity:.5},cancelButton:{alignSelf:'center',top:-4},cancelText:{fontSize:17,marginHorizontal:12},searchbarContainer:{flex:1},searchbar:{flex:1,fontSize:18,paddingHorizontal:36,marginRight:8,marginTop:8,marginBottom:8,borderBottomWidth:1}}),S=u.forwardRef(j)},393,[109,107,359,34,271,328,95,42,394,276,267,268,269,368,376,390,391,104]);
492__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return w}});var n=e(r(_d[0])),o=t(r(_d[1])),l=e(r(_d[2])),u=t(r(_d[3])),d=t(r(_d[4])),c=t(r(_d[5])),s=t(r(_d[6])),p=t(r(_d[7])),h=t(r(_d[8])),v=r(_d[9]),f=t(r(_d[10])),S=t(r(_d[11])),R=(e,t)=>{var n=e.selectionEnd,o=e.selectionStart,l=t.start,u=t.end;return l!==o||u!==n},C=(e,t)=>{if(R(e,t)){var n=t.start,o=t.end;try{e.setSelectionRange(n,o||n)}catch(e){}}},y=Object.assign({},l.defaultProps,l.accessibilityProps,l.clickProps,l.focusProps,l.keyboardProps,l.mouseProps,l.touchProps,l.styleProps,{autoCapitalize:!0,autoComplete:!0,autoCorrect:!0,autoFocus:!0,defaultValue:!0,disabled:!0,lang:!0,maxLength:!0,onChange:!0,onScroll:!0,placeholder:!0,pointerEvents:!0,readOnly:!0,rows:!0,spellCheck:!0,value:!0,type:!0}),b=e=>(0,u.default)(e,y);function x(e){return e.isComposing||229===e.keyCode}var k=null,E=n.forwardRef((e,t)=>{var l,u,f=e.autoCapitalize,R=void 0===f?'sentences':f,y=e.autoComplete,E=e.autoCompleteType,w=e.autoCorrect,O=void 0===w||w,P=e.blurOnSubmit,M=e.caretHidden,F=e.clearTextOnFocus,_=e.dir,j=e.editable,z=e.enterKeyHint,D=e.inputMode,H=e.keyboardType,K=e.multiline,L=void 0!==K&&K,N=e.numberOfLines,q=e.onBlur,A=e.onChange,B=e.onChangeText,G=e.onContentSizeChange,I=e.onFocus,W=e.onKeyPress,$=e.onLayout,V=e.onMoveShouldSetResponder,J=e.onMoveShouldSetResponderCapture,Q=e.onResponderEnd,U=e.onResponderGrant,X=e.onResponderMove,Y=e.onResponderReject,Z=e.onResponderRelease,ee=e.onResponderStart,te=e.onResponderTerminate,ne=e.onResponderTerminationRequest,re=e.onScrollShouldSetResponder,oe=e.onScrollShouldSetResponderCapture,ae=e.onSelectionChange,le=e.onSelectionChangeShouldSetResponder,ue=e.onSelectionChangeShouldSetResponderCapture,de=e.onStartShouldSetResponder,ie=e.onStartShouldSetResponderCapture,ce=e.onSubmitEditing,se=e.placeholderTextColor,pe=e.readOnly,he=void 0!==pe&&pe,ve=e.returnKeyType,fe=e.rows,Se=e.secureTextEntry,Re=void 0!==Se&&Se,ge=e.selection,Ce=e.selectTextOnFocus,ye=e.showSoftInputOnFocus,me=e.spellCheck;if(null!=D)u=D,l='email'===D?'email':'tel'===D?'tel':'search'===D?'search':'url'===D?'url':'text';else if(null!=H)switch(H){case'email-address':l='email';break;case'number-pad':case'numeric':u='numeric';break;case'decimal-pad':u='decimal';break;case'phone-pad':l='tel';break;case'search':case'web-search':l='search';break;case'url':l='url';break;default:l='text'}Re&&(l='password');var be=n.useRef({height:null,width:null}),xe=n.useRef(null),ke=n.useRef(null),Ee=n.useRef(!1);n.useEffect(()=>{xe.current&&ke.current&&C(xe.current,ke.current),Ee.current=Re},[Re]);var Te=n.useCallback(e=>{if(L&&G&&null!=e){var t=e.scrollHeight,n=e.scrollWidth;t===be.current.height&&n===be.current.width||(be.current.height=t,be.current.width=n,G({nativeEvent:{contentSize:{height:be.current.height,width:be.current.width}}}))}},[L,G]),we=n.useMemo(()=>e=>{null!=e&&(e.clear=function(){null!=e&&(e.value='')},e.isFocused=function(){return null!=e&&S.default.currentlyFocusedField()===e},Te(e))},[Te]);(0,c.default)(()=>{var e=xe.current;null!=e&&null!=ge&&C(e,ge),document.activeElement===e&&(S.default._currentlyFocusedNode=e)},[xe,ge]);var Oe=L?'textarea':'input';(0,d.default)(xe,$),(0,h.default)(xe,{onMoveShouldSetResponder:V,onMoveShouldSetResponderCapture:J,onResponderEnd:Q,onResponderGrant:U,onResponderMove:X,onResponderReject:Y,onResponderRelease:Z,onResponderStart:ee,onResponderTerminate:te,onResponderTerminationRequest:ne,onScrollShouldSetResponder:re,onScrollShouldSetResponderCapture:oe,onSelectionChangeShouldSetResponder:le,onSelectionChangeShouldSetResponderCapture:ue,onStart
492ShouldSetResponder:de,onStartShouldSetResponderCapture:ie});var Pe=(0,v.useLocaleContext)().direction,Me=b(e);Me.autoCapitalize=R,Me.autoComplete=y||E||'on',Me.autoCorrect=O?'on':'off',Me.dir=void 0!==_?_:'auto',Me.enterKeyHint=z||ve,Me.inputMode=u,Me.onBlur=function(e){S.default._currentlyFocusedNode=null,q&&(e.nativeEvent.text=e.target.value,q(e))},Me.onChange=function(e){var t=e.target,n=t.value;e.nativeEvent.text=n,Te(t),A&&A(e),B&&B(n)},Me.onFocus=function(e){var t=e.target;I&&(e.nativeEvent.text=t.value,I(e)),null!=t&&(S.default._currentlyFocusedNode=t,F&&(t.value=''),Ce&&(null!=k&&clearTimeout(k),k=setTimeout(()=>{null!=t&&document.activeElement===t&&t.select()},0)))},Me.onKeyDown=function(e){var t=e.target;e.stopPropagation();var n=null==P?!L:P,o=e.nativeEvent,l=x(o);W&&W(e),'Enter'!==e.key||e.shiftKey||l||e.isDefaultPrevented()||(!P&&L||!ce||(e.preventDefault(),o.text=e.target.value,ce(e)),n&&null!=t&&setTimeout(()=>t.blur(),0))},Me.onSelect=function(e){try{var t=e.target,n={start:t.selectionStart,end:t.selectionEnd};ae&&(e.nativeEvent.selection=n,e.nativeEvent.text=e.target.value,ae(e)),Ee.current===Re&&(ke.current=n)}catch(e){}},Me.readOnly=!0===he||!1===j,Me.rows=L?null!=fe?fe:N:1,Me.spellCheck=null!=me?me:O,Me.style=[{'--placeholderTextColor':se},T.textinput$raw,T.placeholder,e.style,M&&T.caretHidden],Me.type=L?void 0:l,Me.virtualkeyboardpolicy=!1===ye?'manual':'auto';var Fe=(0,p.default)(Me),je=(0,s.default)(xe,Fe,we,t);Me.ref=je;var ze=null!=e.lang?(0,v.getLocaleDirection)(e.lang):null,De=e.dir||ze||Pe;return(0,o.default)(Oe,Me,{writingDirection:De})});E.displayName='TextInput',E.State=S.default;var T=f.default.create({textinput$raw:{MozAppearance:'textfield',WebkitAppearance:'none',backgroundColor:'transparent',border:'0 solid black',borderRadius:0,boxSizing:'border-box',font:'14px System',margin:0,padding:0,resize:'none'},placeholder:{placeholderTextColor:'var(--placeholderTextColor)'},caretHidden:{caretColor:'transparent'}}),w=E},394,[34,223,231,232,233,234,240,242,244,229,42,286]);
493__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HeaderShownContext",{enumerable:!0,get:function(){return t}});const t=(0,r(d[0]).getNamedContext)('HeaderShownContext',!1)},395,[396]);
494__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getNamedContext=function(n,o){let c=globalThis[t].get(n);if(c)return c;return c=e.createContext(o),c.displayName=n,globalThis[t].set(n,c),c};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));const t='__react_navigation__elements_contexts';globalThis[t]=globalThis[t]??new Map},396,[34]);
495__d(function(g,r,i,a,m,_e,d){"use strict";const e=["tintColor","style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeaderTitle=function(t){let{tintColor:s,style:f}=t,_=(0,l.default)(t,e);const{colors:v,fonts:y}=(0,o.useTheme)();return(0,u.jsx)(n.default.Text,Object.assign({role:"heading","aria-level":"1",numberOfLines:1},_,{style:[{color:void 0===s?v.text:s},y.medium,c.title,f]}))};var l=t(r(d[0])),o=r(d[1]),n=t(r(d[2]));r(d[3]);var s=t(r(d[4])),u=r(d[5]);const c=s.default.create({title:{fontSize:18}})},397,[109,107,271,95,42,104]);
496__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HeaderBackContext",{enumerable:!0,get:function(){return t}});const t=(0,r(d[0]).getNamedContext)('HeaderBackContext',void 0)},398,[396]);
497__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HeaderHeightContext",{enumerable:!0,get:function(){return t}});const t=(0,r(d[0]).getNamedContext)('HeaderHeightContext',void 0)},399,[396]);
498__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useHeaderHeight=function(){const n=e.useContext(t.HeaderHeight
498Context);if(void 0===n)throw new Error("Couldn't find the header height. Are you inside a screen in a navigator with a header?");return n};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1])},400,[34,399]);
499__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getLabel=function(t,l){return void 0!==t.label?t.label:void 0!==t.title?t.title:l}},401,[]);
500__d(function(g,r,i,a,m,_e,d){"use strict";const e=["tintColor","style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Label=function(t){let{tintColor:n,style:c}=t,f=(0,l.default)(t,e);return(0,u.jsx)(o.Text,Object.assign({numberOfLines:1},f,{style:[s.label,null!=n&&{color:n},c]}))};var l=t(r(d[0])),n=t(r(d[1])),o=r(d[2]),u=r(d[3]);const s=n.default.create({label:{textAlign:'center',backgroundColor:'transparent'}})},402,[109,42,376,104]);
501__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.Lazy=function({enabled:t,visible:n,children:u}){const[c,l]=e.useState(!!t&&n),f=!(t||n||c);if(e.useEffect(()=>{if(!1===f)return;const e=requestIdleCallback(()=>{l(!0)});return()=>cancelIdleCallback(e)},[f]),n&&!1===c)return l(!0),u;if(c)return u;return null};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]))},403,[34]);
502__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.MissingIcon=function({color:e,size:o,style:t}){return(0,c.jsx)(n.Text,{style:[s.icon,{color:e,fontSize:o},t],children:"\u23f7"})};var e,o=r(d[0]),t=(e=o)&&e.__esModule?e:{default:e},n=r(d[1]),c=r(d[2]);const s=t.default.create({icon:{backgroundColor:'transparent'}})}
502,404,[42,376,104]);
503__d(function(g,r,i,a,m,_e,d){"use strict";const e=["visible","children","style"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ResourceSavingView=function(t){let{visible:l,children:u,style:f}=t,v=(0,n.default)(t,e);return(0,c.jsx)(o.default,Object.assign({hidden:!l,style:[{display:l?'flex':'none'},s.container,f],pointerEvents:l?'auto':'none'},v,{children:u}))};var n=t(r(d[0]));r(d[1]),r(d[2]);var l=t(r(d[3])),o=t(r(d[4])),c=r(d[5]);const s=l.default.create({container:{flex:1,overflow:'hidden'},attached:{flex:1},detached:{flex:1,top:3e4}})},405,[109,34,95,42,276,104]);
504__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SafeAreaProviderCompat=y;var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=e(r(_d[1]));r(_d[2]);var o=e(r(_d[3])),u=e(r(_d[4])),c=r(_d[5]),f=r(_d[6]),s=r(_d[7]);const{width:d=0,height:l=0}=n.default.get('window'),h={frame:{x:0,y:0,width:d,height:l},insets:{top:0,left:0,right:0,bottom:0}};function y({children:e,style:n}){const o=t.useContext(c.SafeAreaInsetsContext);return(0,s.jsx)(f.FrameSizeProvider,{initialFrame:h.frame,render:({ref:t,onLayout:f})=>o?(0,s.jsx)(u.default,{ref:t,onLayout:f,style:[v.container,n],children:e}):(0,s.jsx)(c.SafeAreaProvider,{initialMetrics:h,style:n,onLayout:f,children:e})})}y.initialMetrics=h;const v=o.default.create({container:{flex:1}})},406,[34,284,95,42,276,381,387,104]);
505__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Screen=function(e){const o=(0,s.useSafeAreaInsets)(),y=n.useContext(f.HeaderShownContext),b=n.useContext(c.HeaderHeightContext),{focused:j,modal:p=!1,header:H,headerShown:S=!0,headerTransparent:_,headerStatusBarHeight:C=(y?0:o.top),navigation:P,route:O,children:w,style:E}=e,M=(0,h.useFrameSize)(e=>(0,d.getDefaultHeaderHeight)(e,p,C)),k=n.useRef(null),[z,B]=n.useState(M);return n.useLayoutEffect(()=>{k.current?.measure((e,t,n,o)=>{B(o)})},[O.name]),(0,x.jsxs)(l.Background,{"aria-hidden":!j,style:[v.container,E],collapsable:!1,children:[S?(0,x.jsx)(t.NavigationProvider,{route:O,navigation:P,children:(0,x.jsx)(u.default,{ref:k,pointerEvents:"box-none",onLayout:e=>{const{height:t}=e.nativeEvent.layout;B(t)},style:[v.header,_?v.absolute:null],children:H})}):null,(0,x.jsx)(u.default,{style:v.content,children:(0,x.jsx)(f.HeaderShownContext.Provider,{value:y||!1!==S,children:(0,x.jsx)(c.HeaderHeightContext.Provider,{value:S?z:b??0,children:w})})})]})};var t=r(_d[0]),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),o=e(r(_d[2])),u=e(r(_d[3])),s=r(_d[4]),l=r(_d[5]),d=r(_d[6]),c=r(_d[7]),f=r(_d[8]),h=r(_d[9]),x=r(_d[10]);const v=o.default.create({container:{flex:1},content:{flex:1},header:{zIndex:1},absolute:{position:'absolute',top:0,start:0,end:0}})},407,[107,34,42,276,381,270,378,399,395,387,104]);
506__d(function(g,r,i,a,m,e,d){},408,[]);
507__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AnimatedHeaderHeightContext",{enumerable:!0,get:function(){return t}}),_e.useAnimatedHeaderHeight=function(){const n=e.useContext(t);if(void 0===n)throw new Error("Couldn't find the header height. Are you inside a screen in a native stack navigator?");return n};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0]));const t=e.createContext(void 0)},409,[34]);
508__d(function(g,r,i,a,m,_e,_d){"use strict";
508function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var t=e(r(_d[0])),n=e(r(_d[1])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),l=e(r(_d[3])),d=e(r(_d[4])),s=["animating","color","hidesWhenStopped","size","style"],u=e=>o.createElement("circle",{cx:"16",cy:"16",fill:"none",r:"14",strokeWidth:"4",style:e}),c=o.forwardRef((e,l)=>{var c=e.animating,y=void 0===c||c,p=e.color,v=void 0===p?'#1976D2':p,b=e.hidesWhenStopped,_=void 0===b||b,w=e.size,P=void 0===w?'small':w,j=e.style,k=(0,n.default)(e,s),O=o.createElement("svg",{height:"100%",viewBox:"0 0 32 32",width:"100%"},u({stroke:v,opacity:.2}),u({stroke:v,strokeDasharray:80,strokeDashoffset:60}));return o.createElement(d.default,(0,t.default)({},k,{"aria-valuemax":1,"aria-valuemin":0,ref:l,role:"progressbar",style:[f.container,j]}),o.createElement(d.default,{children:O,style:['number'==typeof P?{height:P,width:P}:h[P],f.animation,!y&&f.animationPause,!y&&_&&f.hidesWhenStopped]}))});c.displayName='ActivityIndicator';var f=l.default.create({container:{alignItems:'center',justifyContent:'center'},hidesWhenStopped:{visibility:'hidden'},animation:{animationDuration:'0.75s',animationKeyframes:[{'0%':{transform:'rotate(0deg)'},'100%':{transform:'rotate(360deg)'}}],animationTimingFunction:'linear',animationIterationCount:'infinite'},animationPause:{animationPlayState:'paused'}}),h=l.default.create({small:{width:20,height:20},large:{width:36,height:36}}),y=c},410,[27,43,34,42,276]);
509__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AuthError",{enumerable:!0,get:function(){return N}}),_e.AuthProvider=function({children:e}){const[t,n]=(0,o.useState)(null),[c,h]=(0,o.useState)(!0),[O,N]=(0,o.useState)(null),v=(0,o.useRef)(!0),T=(0,o.useCallback)(()=>v.current,[]);(0,o.useEffect)(()=>(v.current=!0,(async()=>{try{const e=await(0,u.getSecureStorage)();T()&&N(e)}catch(e){S.logger.warn('Failed to initialize secure storage:',e),T()&&h(!1)}})(),()=>{v.current=!1}),[T]);const U=(0,o.useCallback)(async e=>{if(null!=O)try{await O.removeItem(u.STORAGE_KEYS.USER_DATA)}catch(t){S.logger.warn(`Failed to remove cached auth user data during ${e}:`,t)}},[O]),b=(0,o.useCallback)(async e=>{try{const t=await e.getItem(u.STORAGE_KEYS.USER_DATA);if(!T())return;if(null!=t&&''!==t){const e=_(t);null!=e&&n(e)}if(!T())return;const{role:o,email:l,pictureUrl:c}=await s.auth.session(),E=R(l,o,c);n(E),await e.setItem(u.STORAGE_KEYS.USER_DATA,JSON.stringify(E))}catch(t){if(S.logger.debug('checkAuth failed, clearing session',t),!T())return;try{await e.removeItem(u.STORAGE_KEYS.USER_DATA)}catch(e){S.logger.warn('Failed to remove cached auth user data during auth check:',e)}n(null)}finally{T()&&h(!1)}},[T]);(0,o.useEffect)(()=>{null!=O&&b(O)},[O,b]);const I=(0,o.useCallback)(async(e,t)=>{if(!O)throw new Error('Storage not initialized');try{const o=await s.auth.login({body:{email:e,password:t}}),{role:l,pictureUrl:c}=o,E=R(e,l,c);await O.setItem(u.STORAGE_KEYS.USER_DATA,JSON.stringify(E)),n(E)}catch(e){throw y(e)}},[O]),C=(0,o.useCallback)(async e=>{if(S.logger.debug('[AuthContext] loginWithGoogle() called, id_token length:',e.length),!O)throw new Error('Storage not initialized');try{S.logger.debug('[AuthContext] POST /api/v1/auth/google -- sending id_token to backend');const t=await s.auth.googleAuth({body:{idToken:e}});S.logger.debug('[AuthContext] Backend response data:',JSON.stringify({email:t.email,role:t.role,hasPictureUrl:null!=t.pictureUrl&&''!==t.pictureUrl}));const{role:o,email:l,pictureUrl:c}=t,E=R(l,o,c);await O.setItem(u.STORAGE_KEYS.USER_DATA,JSON.stringify(E)),n(E),S.logger.debug('[AuthContext] loginWithGoogle() success, user set:',l)}catch(e){const t=y(e);throw S.logger.error('[AuthContext] loginWithGoogle() failed:',t.code,t.message),t}},[O]),K=(0,o.useCallback)(async()=>{try{await s.auth.logout()}catch(e){S.logger.error('Logout API call failed:',(0,E.describeError)(e))}await U('logout'),n(null)},[U]),D=(0,o.useCallback)(async()=>{S.logger.warn('[AuthContext] Session expired -- forcing local logout'),await U('session expiry'),n(null)},[U]);(0,o.useEffect)(()=>(0,l.onSessionExpired)(()=>{D()}),[D]);const k=(0,o.useMemo)(()=>({user:t,isAuthenticated:null!=t,isLoading:c,isAdmin:null!=t&&f.has(t.role),isOwner:null!=t&&w.has(t.role),login:I,loginWithGoogle:C,logout:K}),[t,c,I,C,K]);return(0,A.jsx)(p.Provider,{value:k,children:e})},_e.useAuth=function(){const e=(0,o.useContext)(p);if(void 0===e)throw new Error('useAuth must be used within an AuthProvider');return e};
509var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[1]),l=r(d[2]),s=r(d[3]),u=r(d[4]),c=r(d[5]),E=r(d[6]),h=r(d[7]),S=r(d[8]),A=r(d[9]);const f=new Set(['ADMIN','OWNER','SUPER_OWNER']),w=new Set(['OWNER','SUPER_OWNER']),O=new Set(['USER','ADMIN','OWNER','SUPER_OWNER']);function R(e,t,n){const o={email:e,role:t},l=null==(s=n)||''===s?void 0:s;var s;return null!=l&&(o.pictureUrl=l),o}function _(e){let t;try{t=JSON.parse(e)}catch{return null}if('object'!=typeof t||null===t)return null;const n=(0,h.readOptionalString)(t,'email'),o=(0,h.readOptionalString)(t,'role');if(void 0===n||void 0===o||(l=o,!O.has(l)))return null;var l;return R(n,o,(0,h.readOptionalString)(t,'pictureUrl'))}class N extends Error{constructor(e,t){super(t),this.name='AuthError',this.code=e}}const p=(0,o.createContext)(void 0);function y(e){if(!n.default.isAxiosError(e)||!e.response)return new N('NETWORK_ERROR','Network error');const t=(0,c.parseApiErrorBody)(e.response.data),o=t?.error,l=e.response.status;return 403===l&&!0===o?.startsWith('CSRF_')?new N('CSRF_REJECTED',t?.message??'CSRF validation failed'):'TOKEN_REVOKED'===o?new N('TOKEN_REVOKED','Session has been revoked'):'TOKEN_EXPIRED'===o?new N('TOKEN_EXPIRED','Session expired'):'TOKEN_UNKNOWN'===o?new N('TOKEN_UNKNOWN','Invalid session'):'GOOGLE_EMAIL_UNVERIFIED'===o?new N('GOOGLE_EMAIL_UNVERIFIED','Email not verified with Google'):401===l?new N('INVALID_CREDENTIALS',t?.message??'Invalid credentials'):new N('UNKNOWN',t?.message??'An unexpected error occurred')}},411,[412,34,464,471,475,466,468,467,469,104]);
510__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(_e,"create",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"Axios",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"AxiosError",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"CanceledError",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"isCancel",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"CancelToken",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"VERSION",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"all",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"Cancel",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"isAxiosError",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"spread",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"toFormData",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"AxiosHeaders",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"HttpStatusCode",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"formToJSON",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"getAdapter",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"mergeConfig",{enumerable:!0,get:function(){return E}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};const{Axios:o,AxiosError:u,CanceledError:c,isCancel:f,CancelToken:b,VERSION:l,all:p,Cancel:s,isAxiosError:O,spread:j,toFormData:y,AxiosHeaders:P,HttpStatusCode:C,formToJSON:A,getAdapter:x,mergeConfig:E,create:S}=n.default},412,[413]);
511__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return b}});var t=e(r(d[0])),l=e(r(d[1])),u=e(r(d[2])),n=e(r(d[3])),f=e(r(d[4])),o=e(r(d[5])),s=e(r(d[6])),c=e(r(d[7])),p=e(r(d[8])),C=r(d[9]),O=e(r(d[10])),x=e(r(d[11])),y=e(r(d[12])),A=e(r(d[13])),E=e(r(d[14])),_=e(r(d[15])),w=e(r(d[16]));const S=(function e(f){const o=new u.default(f),s=(0,l.default)(u.default.prototype.request,o);return t.default.extend(s,u.default.prototype,o,{allOwnKeys:!0}),t.default.extend(s,o,null,{allOwnKeys:!0}),s.create=function(t){return e((0,n.default)(f,t))},s})(f.default);S.Axios=u.default,S.CanceledError=s.default,S.CancelToken=c.default,S.isCancel=p.default,S.VERSION=C.VERSION,S.toFormData=O.default,S.AxiosError=x.default,S.Cancel=S.CanceledError,S.all=function(e){return Promise.all(e)},S.spread=y.default,S.isAxiosError=A.default,S.mergeConfig=n.default,S.AxiosHeaders=E.default,S.formToJSON=e=>
511(0,o.default)(t.default.isHTMLForm(e)?new FormData(e):e),S.getAdapter=_.default.getAdapter,S.HttpStatusCode=w.default,S.default=S;var b=S},413,[414,415,416,453,428,437,439,460,438,458,419,420,461,462,421,440,463]);
512__d(function(g,r,_i,_a,_m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return Y}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:s,toStringTag:l}=Symbol,a=(c=Object.create(null),e=>{const t=o.call(e);return c[t]||(c[t]=t.slice(8,-1).toLowerCase())});var c;const u=e=>(e=e.toLowerCase(),t=>a(t)===e),f=e=>t=>typeof t===e,{isArray:p}=Array,y=f('undefined');function b(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const O=u('ArrayBuffer');const m=f('string'),h=f('function'),j=f('number'),w=e=>null!==e&&'object'==typeof e,_=e=>{if('object'!==a(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||s in e)},F=u('Date'),v=u('File'),P=u('Blob'),A=u('FileList');const S='undefined'!=typeof globalThis?globalThis:'undefined'!=typeof self?self:'undefined'!=typeof window?window:void 0!==g?g:{},B=void 0!==S.FormData?S.FormData:void 0,E=u('URLSearchParams'),[C,L,R,T]=['ReadableStream','Request','Response','Headers'].map(u);function x(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,i;if('object'!=typeof e&&(e=[e]),p(e))for(o=0,i=e.length;o<i;o++)t.call(null,e[o],o,e);else{if(b(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let l;for(o=0;o<s;o++)l=i[o],t.call(null,e[l],l,e)}}function M(e,t){if(b(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o,i=n.length;for(;i-- >0;)if(o=n[i],t===o.toLowerCase())return o;return null}const k='undefined'!=typeof globalThis?globalThis:'undefined'!=typeof self?self:'undefined'!=typeof window?window:g,D=e=>!y(e)&&e!==k;const N=(U='undefined'!=typeof Uint8Array&&i(Uint8Array),e=>U&&e instanceof U);var U;const I=u('HTMLFormElement'),q=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:H}=Object.prototype,K=u('RegExp'),V=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};x(n,(n,i)=>{let s;!1!==(s=t(n,i,e))&&(o[i]=s||n)}),Object.defineProperties(e,o)};const z=u('AsyncFunction'),J=(W='function'==typeof setImmediate,$=h(k.postMessage),W?setImmediate:$?(G=`axios@${Math.random()}`,Q=[],k.addEventListener('message',({source:e,data:t})=>{e===k&&t===G&&Q.length&&Q.shift()()},!1),e=>{Q.push(e),k.postMessage(G,'*')}):e=>setTimeout(e));var W,$,G,Q;const X='undefined'!=typeof queueMicrotask?queueMicrotask.bind(k):'undefined'!=typeof process&&process.nextTick||J;var Y={isArray:p,isArrayBuffer:O,isBuffer:b,isFormData:e=>{if(!e)return!1;if(B&&e instanceof B)return!0;const t=i(e);if(!t||t===Object.prototype)return!1;if(!h(e.append))return!1;const n=a(e);return'formdata'===n||'object'===n&&h(e.toString)&&'[object FormData]'===e.toString()},isArrayBufferView:function(e){let t;return t='undefined'!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&O(e.buffer),t},isString:m,isNumber:j,isBoolean:e=>!0===e||!1===e,isObject:w,isPlainObject:_,isEmptyObject:e=>{if(!w(e)||b(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:C,isRequest:L,isResponse:R,isHeaders:T,isUndefined:y,isDate:F,isFile:v,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:P,isRegExp:K,isFunction:h,isStream:e=>w(e)&&h(e.pipe),isURLSearchParams:E,isTypedArray:N,isFileList:A,forEach:x,merge:function e(...t){const{caseless:n,skipUndefined:o}=D(this)&&this||{},i={},s=(t,s)=>{if('__proto__'===s||'constructor'===s||'prototype'===s)return;const l=n&&'string'==typeof s&&M(i,s)||s,a=q(i,l)?i[l]:void 0;_(a)&&_(t)?i[l]=e(a,t):_(t)?i[l]=e({},t):p(t)?i[l]=t.slice():o&&y(t)||(i[l]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||b(n))continue;if(x(n,s),'object'!=typeof n||p(n))continue;const o=Object.getOwnPropertySymbols(n);for(let e=0;e<o.length;e++){const t=o[e];H.call(n,t)&&s(n[t],t)}}return i},extend:(e,t,o,{allOwnKeys:i}={})=>(x(t,(t,i)=>{o&&h(t)?Object.defineProperty(e,i,{__proto__:null,value:(0,n.default)(t,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,''),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,'constructor',{__proto__:null,value:e,writable:!0,enumerable:!1,
512configurable:!0}),Object.defineProperty(e,'super',{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let s,l,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)a=s[l],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:u,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!j(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[s]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:I,hasOwnProperty:q,hasOwnProp:q,reduceDescriptors:V,freezeMethods:e=>{V(e,(t,n)=>{if(h(e)&&['arguments','caller','callee'].includes(n))return!1;const o=e[n];h(o)&&(t.enumerable=!1,'writable'in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:M,global:k,isContextDefined:D,isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&'FormData'===e[l]&&e[s])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(w(e)){if(t.has(e))return;if(b(e))return e;if(!('toJSON'in e)){t.add(e);const o=p(e)?[]:{};return x(e,(e,t)=>{const i=n(e);!y(i)&&(o[t]=i)}),t.delete(e),o}}return e};return n(e)},isAsyncFn:z,isThenable:e=>e&&(w(e)||h(e))&&h(e.then)&&h(e.catch),setImmediate:J,asap:X,isIterable:e=>null!=e&&h(e[s])}},414,[415]);
513__d(function(g,r,i,a,m,e,d){'use strict';function t(t,n){return function(){return t.apply(n,arguments)}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},415,[]);
514__d(function(g,r,_i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var t=e(r(d[0])),n=e(r(d[1])),s=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),i=e(r(d[5])),u=e(r(d[6])),c=e(r(d[7])),f=e(r(d[8]));const h=u.default.validators;class p{constructor(e){this.defaults=e||{},this.interceptors={request:new s.default,response:new s.default}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack)return'';const e=t.stack.indexOf('\n');return-1===e?'':t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf('\n'),s=-1===t?-1:n.indexOf('\n',t+1),o=-1===s?'':n.slice(s+1);String(e.stack).endsWith(o)||(e.stack+='\n'+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,n){'string'==typeof e?(n=n||{}).url=e:n=e||{},n=(0,l.default)(this.defaults,n);const{transitional:s,paramsSerializer:i,headers:p}=n;void 0!==s&&u.default.assertOptions(s,{silentJSONParsing:h.transitional(h.boolean),forcedJSONParsing:h.transitional(h.boolean),clarifyTimeoutError:h.transitional(h.boolean),legacyInterceptorReqResOrdering:h.transitional(h.boolean),advertiseZstdAcceptEncoding:h.transitional(h.boolean)},!1),null!=i&&(t.default.isFunction(i)?n.paramsSerializer={serialize:i}:u.default.assertOptions(i,{encode:h.function,serialize:h.function},!0)),void 0!==n.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),u.default.assertOptions(n,{baseUrl:h.spelling('baseURL'),withXsrfToken:h.spelling('withXSRFToken')},!0),n.method=(n.method||this.defaults.method||'get').toLowerCase();let y=p&&t.default.merge(p.common,p[n.method]);p&&t.default.forEach(['delete','get','head','post','put','patch','query','common'],e=>{delete p[e]}),n.headers=c.default.concat(y,p);const b=[];let w=!0;this.interceptors.request.forEach(function(e){if('function'==typeof e.runWhen&&!1===e.runWhen(n))return;w=w&&e.synchronous;const t=n.transitional||f.default;t&&t.legacyInterceptorReqResOrdering?b.unshift(e.fulfilled,e.rejected):b.push(e.fulfilled,e.rejected)});const k=[];let q;this.interceptors.response.forEach(function(e){k.push(e.fulfilled,e.rejected)});let O,E=0;if(!w){const e=[o.default.bind(this),void 0];for(e.unshift(...b),e.push(...k),O=e.length,q=Promise.resolve(n);E<O;)q=q.then(e[E++],e[E++]);return q}O=b.length;let v=n;for(;E<O;){const e=b[E++],t=b[E++];try{v=e(v)}catch(e){t.call(this,e);break}}try{q=o.default.call(this,v)}catch(e){return Promise.reject(e)}for(E=0,O=k.length;E<O;)q=q.then(k[E++],k[E++]);return q}getUri(e){e=(0,l.default)(this.defaults,e);const t=(0,i.default)(e.baseURL,e.url,e.allowAbsoluteUrls);return(0,n.default)(t,e.params,e.paramsSerializer)}}t.default.forEach(['delete','get','head','options'],function(e){p.prototype[e]=function(t,n){return this.request((0,l.default)(n||{},{method:e,url:t,data:(n||{}).data}))}}),t.default.forEach(['post','put','patch','query'],function(e){function t(t){return function(n,s,o){return this.request((0,l.default)(o||{},{method:e,headers:t?{'Content-Type':'multipart/form-data'}:{},url:n,data:s}))}}p.prototype[e]=t(),'query'!==e&&(p.prototype[e+'Form']=t(!0))});var y=p},416,[414,417,425,426,453,450,459,421,429]);
515__d(function(g,r,i,a,m,_e,d){'use strict';
515function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}}),_e.encode=u;var n=e(r(d[0])),t=e(r(d[1]));function u(e){return encodeURIComponent(e).replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%20/g,'+')}function c(e,c,o){if(!c)return e;const l=o&&o.encode||u,f=n.default.isFunction(o)?{serialize:o}:o,s=f&&f.serialize;let p;if(p=s?s(c,f):n.default.isURLSearchParams(c)?c.toString():new t.default(c,f).toString(l),p){const n=e.indexOf('#');-1!==n&&(e=e.slice(0,n)),e+=(-1===e.indexOf('?')?'?':'&')+p}return e}},417,[414,418]);
516__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t,n=r(d[0]),e=(t=n)&&t.__esModule?t:{default:t};function u(t){const n={'!':'%21',"'":'%27','(':'%28',')':'%29','~':'%7E','%20':'+'};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(t){return n[t]})}function o(t,n){this._pairs=[],t&&(0,e.default)(t,this,n)}const c=o.prototype;c.append=function(t,n){this._pairs.push([t,n])},c.toString=function(t){const n=t?function(n){return t.call(this,n,u)}:u;return this._pairs.map(function(t){return n(t[0])+'='+n(t[1])},'').join('&')};var s=o},418,[419]);
517__d(function(g,r,_i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(d[0])),n=e(r(d[1])),i=e(r(d[2]));function u(e){return t.default.isPlainObject(e)||t.default.isArray(e)}function f(e){return t.default.endsWith(e,'[]')?e.slice(0,-2):e}function o(e,t,n){return e?e.concat(t).map(function(e,t){return e=f(e),!n&&t?'['+e+']':e}).join(n?'.':''):t}function l(e){return t.default.isArray(e)&&!e.some(u)}const s=t.default.toFlatObject(t.default,{},null,function(e){return/^is[A-Z]/.test(e)});var c=function(e,c,p){if(!t.default.isObject(e))throw new TypeError('target must be an object');c=c||new(i.default||FormData);const b=(p=t.default.toFlatObject(p,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,n){return!t.default.isUndefined(n[e])})).metaTokens,y=p.visitor||v,h=p.dots,j=p.indexes,w=p.Blob||'undefined'!=typeof Blob&&Blob,O=void 0===p.maxDepth?100:p.maxDepth,B=w&&t.default.isSpecCompliantForm(c);if(!t.default.isFunction(y))throw new TypeError('visitor must be a function');function E(e){if(null===e)return'';if(t.default.isDate(e))return e.toISOString();if(t.default.isBoolean(e))return e.toString();if(!B&&t.default.isBlob(e))throw new n.default('Blob is not supported. Use a Buffer instead.');return t.default.isArrayBuffer(e)||t.default.isTypedArray(e)?B&&'function'==typeof Blob?new Blob([e]):Buffer.from(e):e}function v(e,n,i){let s=e;if(t.default.isReactNative(c)&&t.default.isReactNativeBlob(e))return c.append(o(i,n,h),E(e)),!1;if(e&&!i&&'object'==typeof e)if(t.default.endsWith(n,'{}'))n=b?n:n.slice(0,-2),e=JSON.stringify(e);else if(t.default.isArray(e)&&l(e)||(t.default.isFileList(e)||t.default.endsWith(n,'[]'))&&(s=t.default.toArray(e)))return n=f(n),s.forEach(function(e,i){!t.default.isUndefined(e)&&null!==e&&c.append(!0===j?o([n],i,h):null===j?n:n+'[]',E(e))}),!1;return!!u(e)||(c.append(o(i,n,h),E(e)),!1)}const _=[],A=Object.assign(s,{defaultVisitor:v,convertValue:E,isVisitable:u});if(!t.default.isObject(e))throw new TypeError('data must be an object');return(function e(i,u,f=0){if(!t.default.isUndefined(i)){if(f>O)throw new n.default('Object is too deeply nested ('+f+' levels). Max depth: '+O,n.default.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==_.indexOf(i))throw new Error('Circular reference detected in '+u.join('.'));_.push(i),t.default.forEach(i,function(n,i){!0===(!(t.default.isUndefined(n)||null===n)&&y.call(c,n,t.default.isString(i)?i.trim():i,u,A))&&e(n,u?u.concat(i):[i],f+1)}),_.pop()}})(e),c}},419,[414,420,424]);
518__d(function(g,r,_i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return i}});var t=e(r(d[0])),s=e(r(d[1]));function E(e){if(t.default.hasOwnProp(e,'toJSON'))return!0;let s=Object.getPrototypeOf(e);for(;s&&s!==Object.prototype;){if(t.default.hasOwnProp(s,'toJSON'))return!0;s=Object.getPrototypeOf(s)}return!1}function n(e,n){const R=new Set(n.map(e=>String(e).toLowerCase())),i=[],o=e=>{if(null===e||'object'!=typeof e)return e;if(t.default.isBuffer(e))return e;if(-1!==i.indexOf(e))return;let n;if(e instanceof s.default&&(e=e.toJSON()),i.push(e),t.default.isArray(e))n=[],e.forEach((e,s)=>{const E=o(e);t.default.isUndefined(E)||(n[s]=E)});else{if(!t.default.isPlainObject(e)&&E(e))return i.pop(),e;n=Object.create(null);for(const[s,E]of Object.entries(e)){const e=R.has(s.toLowerCase())?"[REDACTED ****]":o(E);t.default.isUndefined(e)||(n[s]=e)}}return i.pop(),n};return o(e)}
518class R extends Error{static from(e,t,s,E,n,i){const o=new R(e.message,t||e.code,s,E,n);return o.cause=e,o.name=e.name,null!=e.status&&null==o.status&&(o.status=e.status),i&&Object.assign(o,i),o}constructor(e,t,s,E,n){super(e),Object.defineProperty(this,'message',{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name='AxiosError',this.isAxiosError=!0,t&&(this.code=t),s&&(this.config=s),E&&(this.request=E),n&&(this.response=n,this.status=n.status)}toJSON(){const e=this.config,s=e&&t.default.hasOwnProp(e,'redact')?e.redact:void 0,E=t.default.isArray(s)&&s.length>0?n(e,s):t.default.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:E,code:this.code,status:this.status}}}R.ERR_BAD_OPTION_VALUE='ERR_BAD_OPTION_VALUE',R.ERR_BAD_OPTION='ERR_BAD_OPTION',R.ECONNABORTED='ECONNABORTED',R.ETIMEDOUT='ETIMEDOUT',R.ECONNREFUSED='ECONNREFUSED',R.ERR_NETWORK='ERR_NETWORK',R.ERR_FR_TOO_MANY_REDIRECTS='ERR_FR_TOO_MANY_REDIRECTS',R.ERR_DEPRECATED='ERR_DEPRECATED',R.ERR_BAD_RESPONSE='ERR_BAD_RESPONSE',R.ERR_BAD_REQUEST='ERR_BAD_REQUEST',R.ERR_CANCELED='ERR_CANCELED',R.ERR_NOT_SUPPORT='ERR_NOT_SUPPORT',R.ERR_INVALID_URL='ERR_INVALID_URL',R.ERR_FORM_DATA_DEPTH_EXCEEDED='ERR_FORM_DATA_DEPTH_EXCEEDED';var i=R},420,[414,421]);
519__d(function(g,r,_i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var e=t(r(d[0])),n=t(r(d[1])),i=r(d[2]);const s=Symbol('internals');function o(t){return t&&String(t).trim().toLowerCase()}function c(t){return!1===t||null==t?t:e.default.isArray(t)?t.map(c):(0,i.sanitizeHeaderValue)(String(t))}function u(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}function l(t,n,i,s,o){return e.default.isFunction(s)?s.call(this,n,i):(o&&(n=i),e.default.isString(n)?e.default.isString(s)?-1!==n.indexOf(s):e.default.isRegExp(s)?s.test(n):void 0:void 0)}function f(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function h(t,n){const i=e.default.toCamelCase(' '+n);['get','set','has'].forEach(e=>{Object.defineProperty(t,e+i,{__proto__:null,value:function(t,i,s){return this[e].call(this,n,t,i,s)},configurable:!0})})}class p{constructor(t){t&&this.set(t)}set(t,i,s){const u=this;function l(t,n,i){const s=o(n);if(!s)return;const l=e.default.findKey(u,s);(!l||void 0===u[l]||!0===i||void 0===i&&!1!==u[l])&&(u[l||n]=c(t))}const f=(t,n)=>e.default.forEach(t,(t,e)=>l(t,e,n));if(e.default.isPlainObject(t)||t instanceof this.constructor)f(t,i);else if(e.default.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))f((0,n.default)(t),i);else if(e.default.isObject(t)&&e.default.isIterable(t)){let n,s,o={};for(const i of t){if(!e.default.isArray(i))throw new TypeError('Object iterator must return a key-value pair');o[s=i[0]]=(n=o[s])?e.default.isArray(n)?[...n,i[1]]:[n,i[1]]:i[1]}f(o,i)}else null!=t&&l(i,t,s);return this}get(t,n){if(t=o(t)){const i=e.default.findKey(this,t);if(i){const t=this[i];if(!n)return t;if(!0===n)return u(t);if(e.default.isFunction(n))return n.call(this,t,i);if(e.default.isRegExp(n))return n.exec(t);throw new TypeError('parser must be boolean|regexp|function')}}}has(t,n){if(t=o(t)){const i=e.default.findKey(this,t);return!(!i||void 0===this[i]||n&&!l(0,this[i],i,n))}return!1}delete(t,n){const i=this;let s=!1;function c(t){if(t=o(t)){const o=e.default.findKey(i,t);!o||n&&!l(0,i[o],o,n)||(delete i[o],s=!0)}}return e.default.isArray(t)?t.forEach(c):c(t),s}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const s=e[n];t&&!l(0,this[s],s,t,!0)||(delete this[s],i=!0)}return i}normalize(t){const n=this,i={};return e.default.forEach(this,(s,o)=>{const u=e.default.findKey(i,o);if(u)return n[u]=c(s),void delete n[o];const l=t?f(o):String(o).trim();l!==o&&delete n[o],n[l]=c(s),i[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return e.default.forEach(this,(i,s)=>{null!=i&&!1!==i&&(n[s]=t&&e.default.isArray(i)?i.join(', '):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+': '+e).join('\n')}getSetCookie(){return this.get('set-cookie')||[]}get[Symbol.toStringTag](){return'AxiosHeaders'}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(t=>n.set(t)),n}static accessor(t){const n=(this[s]=this[s]={accessors:{}}).accessors,i=this.prototype;function c(t){const e=o(t);n[e]||(h(i,t),n[e]=!0)}return e.default.isArray(t)?t.forEach(c):c(t),this}}p.accessor(['Content-Type','Content-Length','Accept','Accept-Encoding','User-Agent','Authorization']),e.default.reduceDescriptors(p.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}}),e.default.freezeMethods(p);var y=p},421,[414,422,423]);
520__d(function(g,r,_i,a,m,_e,d){'use strict';
520Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return i}});var e,t=r(d[0]);const o=((e=t)&&e.__esModule?e:{default:e}).default.toObjectSet(['age','authorization','content-length','content-type','etag','expires','from','host','if-modified-since','if-unmodified-since','last-modified','location','max-forwards','proxy-authorization','referer','retry-after','user-agent']);var i=e=>{const t={};let i,n,s;return e&&e.split('\n').forEach(function(e){s=e.indexOf(':'),i=e.substring(0,s).trim().toLowerCase(),n=e.substring(s+1).trim(),!i||t[i]&&o[i]||('set-cookie'===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+', '+n:n)}),t}},422,[414]);
521__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"sanitizeHeaderValue",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"sanitizeByteStringHeaderValue",{enumerable:!0,get:function(){return s}}),_e.toByteStringHeaderObject=function(e){const t=Object.create(null);return n.default.forEach(e.toJSON(),(e,n)=>{t[n]=s(e)}),t};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};function u(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}const c=new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+','g'),o=new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+','g');function f(e,t){return n.default.isArray(e)?e.map(e=>f(e,t)):u(String(e).replace(t,''))}const l=e=>f(e,c),s=e=>f(e,o)},423,[414]);
522__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=null},424,[]);
523__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return t}});var e,n=r(d[0]),s=(e=n)&&e.__esModule?e:{default:e};var t=class{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:!!s&&s.synchronous,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){s.default.forEach(this.handlers,function(n){null!==n&&e(n)})}}},425,[414]);
524__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var t=e(r(d[0])),n=e(r(d[1])),s=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),f=e(r(d[5]));function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o.default(null,e)}function p(e){u(e),e.headers=l.default.from(e.headers),e.data=t.default.call(e,e.transformRequest),-1!==['post','put','patch'].indexOf(e.method)&&e.headers.setContentType('application/x-www-form-urlencoded',!1);return f.default.getAdapter(e.adapter||s.default.adapter,e)(e).then(function(n){u(e),e.response=n;try{n.data=t.default.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=l.default.from(n.headers),n},function(s){if(!(0,n.default)(s)&&(u(e),s&&s.response)){e.response=s.response;try{s.response.data=t.default.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=l.default.from(s.response.headers)}return Promise.reject(s)})}},426,[427,438,428,439,421,440]);
525__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2]));function o(e,o){const f=this||n.default,l=o||f,c=u.default.from(l.headers);let s=l.data;return t.default.forEach(e,function(e){s=e.call(f,s,c.normalize(),o?o.status:void 0)}),c.normalize(),s}},427,[414,428,421]);
526__d(function(g,r,i,a,m,_e,d){'use strict';function t(t){return t&&t.__esModule?t:{default:t}}
526Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return S}});var e=t(r(d[0])),n=t(r(d[1])),s=t(r(d[2])),f=t(r(d[3])),o=t(r(d[4])),u=t(r(d[5])),l=t(r(d[6]));const c=(t,n)=>null!=t&&e.default.hasOwnProp(t,n)?t[n]:void 0;function p(t,n,s){if(e.default.isString(t))try{return(n||JSON.parse)(t),e.default.trim(t)}catch(t){if('SyntaxError'!==t.name)throw t}return(s||JSON.stringify)(t)}const h={transitional:s.default,adapter:['xhr','http','fetch'],transformRequest:[function(t,n){const s=n.getContentType()||'',u=s.indexOf('application/json')>-1,h=e.default.isObject(t);h&&e.default.isHTMLForm(t)&&(t=new FormData(t));if(e.default.isFormData(t))return u?JSON.stringify((0,l.default)(t)):t;if(e.default.isArrayBuffer(t)||e.default.isBuffer(t)||e.default.isStream(t)||e.default.isFile(t)||e.default.isBlob(t)||e.default.isReadableStream(t))return t;if(e.default.isArrayBufferView(t))return t.buffer;if(e.default.isURLSearchParams(t))return n.setContentType('application/x-www-form-urlencoded;charset=utf-8',!1),t.toString();let S;if(h){const n=c(this,'formSerializer');if(s.indexOf('application/x-www-form-urlencoded')>-1)return(0,o.default)(t,n).toString();if((S=e.default.isFileList(t))||s.indexOf('multipart/form-data')>-1){const e=c(this,'env'),s=e&&e.FormData;return(0,f.default)(S?{'files[]':t}:t,s&&new s,n)}}return h||u?(n.setContentType('application/json',!1),p(t)):t}],transformResponse:[function(t){const s=c(this,'transitional')||h.transitional,f=s&&s.forcedJSONParsing,o=c(this,'responseType'),u='json'===o;if(e.default.isResponse(t)||e.default.isReadableStream(t))return t;if(t&&e.default.isString(t)&&(f&&!o||u)){const e=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,c(this,'parseReviver'))}catch(t){if(e){if('SyntaxError'===t.name)throw n.default.from(t,n.default.ERR_BAD_RESPONSE,this,null,c(this,'response'));throw t}}}return t}],timeout:0,xsrfCookieName:'XSRF-TOKEN',xsrfHeaderName:'X-XSRF-TOKEN',maxContentLength:-1,maxBodyLength:-1,env:{FormData:u.default.classes.FormData,Blob:u.default.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:'application/json, text/plain, */*','Content-Type':void 0}}};e.default.forEach(['delete','get','head','post','put','patch','query'],t=>{h.headers[t]={}});var S=h},428,[414,420,429,419,430,431,437]);
527__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1}},429,[]);
528__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t=e(r(d[0])),u=e(r(d[1])),n=e(r(d[2]));function s(e,s){return(0,u.default)(e,new n.default.classes.URLSearchParams,Object.assign({visitor:function(e,u,s,f){return n.default.isNode&&t.default.isBuffer(e)?(this.append(u,e.toString('base64')),!1):f.defaultVisitor.apply(this,arguments)}},s))}},430,[414,419,431]);
529__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var e,t=r(_d[0]),n=(e=t)&&e.__esModule?e:{default:e},u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),c=Object.assign({},u,n.default)},431,[432,436]);
530__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),u=e(r(d[1])),l=e(r(d[2])),o={isBrowser:!0,classes:{URLSearchParams:t.default,FormData:u.default,Blob:l.default},protocols:['http','https','file','blob','url','data']}},432,[433,434,435]);
531__d(function(g,r,i,a,m,_e,d){'use strict';
531Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n='undefined'!=typeof URLSearchParams?URLSearchParams:u.default},433,[418]);
532__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t='undefined'!=typeof FormData?FormData:null},434,[]);
533__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t='undefined'!=typeof Blob?Blob:null},435,[]);
534__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"hasBrowserEnv",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"hasStandardBrowserWebWorkerEnv",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"hasStandardBrowserEnv",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"navigator",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"origin",{enumerable:!0,get:function(){return f}});const t='undefined'!=typeof window&&'undefined'!=typeof document,n='object'==typeof navigator&&navigator||void 0,o=t&&(!n||['ReactNative','NativeScript','NS'].indexOf(n.product)<0),c='undefined'!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&'function'==typeof self.importScripts,f=t&&window.location.href||'http://localhost'},436,[]);
535__d(function(g,r,_i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var t,e=r(d[0]),n=(t=e)&&t.__esModule?t:{default:t};function u(t){return n.default.matchAll(/\w+|\[(\w*)]/g,t).map(t=>'[]'===t[0]?'':t[1]||t[0])}function l(t){const e={},n=Object.keys(t);let u;const l=n.length;let f;for(u=0;u<l;u++)f=n[u],e[f]=t[f];return e}var f=function(t){function e(t,u,f,i){let o=t[i++];if('__proto__'===o)return!0;const c=Number.isFinite(+o),s=i>=t.length;if(o=!o&&n.default.isArray(f)?f.length:o,s)return n.default.hasOwnProp(f,o)?f[o]=n.default.isArray(f[o])?f[o].concat(u):[f[o],u]:f[o]=u,!c;n.default.hasOwnProp(f,o)&&n.default.isObject(f[o])||(f[o]=[]);
535return e(t,u,f[o],i)&&n.default.isArray(f[o])&&(f[o]=l(f[o])),!c}if(n.default.isFormData(t)&&n.default.isFunction(t.entries)){const l={};return n.default.forEachEntry(t,(t,n)=>{e(u(t),n,l,0)}),l}return null}},437,[414]);
536__d(function(g,r,i,a,m,e,d){'use strict';function t(t){return!(!t||!t.__CANCEL__)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},438,[]);
537__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};class n extends u.default{constructor(e,t,n){super(null==e?'canceled':e,u.default.ERR_CANCELED,t,n),this.name='CanceledError',this.__CANCEL__=!0}}var l=n},439,[420]);
538__d(function(g,r,_i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return d}});var t=e(r(_d[0])),n=e(r(_d[1])),o=e(r(_d[2])),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),i=e(r(_d[4]));const l={http:n.default,xhr:o.default,fetch:{get:u.getFetch}};t.default.forEach(l,(e,t)=>{if(e){try{Object.defineProperty(e,'name',{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,'adapterName',{__proto__:null,value:t})}});const c=e=>`- ${e}`,f=e=>t.default.isFunction(e)||null===e||!1===e;var d={getAdapter:function(e,n){e=t.default.isArray(e)?e:[e];const{length:o}=e;let u,d;const s={};for(let c=0;c<o;c++){let o;if(u=e[c],d=u,!f(u)&&(d=l[(o=String(u)).toLowerCase()],void 0===d))throw new i.default(`Unknown adapter '${o}'`);if(d&&(t.default.isFunction(d)||(d=d.get(n))))break;s[o||'#'+c]=d}if(!d){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?'is not supported by the environment':'is not available in the build'));let t=o?e.length>1?'since :\n'+e.map(c).join('\n'):' '+c(e[0]):'as no adapter specified';throw new i.default("There is no suitable adapter to dispatch the request "+t,'ERR_NOT_SUPPORT')}return d},adapters:l}},440,[414,424,441,454,420]);
539__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return R}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),u=e(r(d[4])),l=e(r(d[5])),f=e(r(d[6])),c=e(r(d[7])),p=r(d[8]),E=e(r(d[9])),T=r(d[10]);var R='undefined'!=typeof XMLHttpRequest&&function(e){return new Promise(function(R,b){const v=(0,E.default)(e);let w=v.data;const y=c.default.from(v.headers).normalize();let h,L,O,_,U,{responseType:C,onUploadProgress:H,onDownloadProgress:M}=v;function k(){_&&_(),U&&U(),v.cancelToken&&v.cancelToken.unsubscribe(h),v.signal&&v.signal.removeEventListener('abort',h)}let q=new XMLHttpRequest;function x(){if(!q)return;const t=c.default.from('getAllResponseHeaders'in q&&q.getAllResponseHeaders()),o={data:C&&'text'!==C&&'json'!==C?q.response:q.responseText,status:q.status,statusText:q.statusText,headers:t,config:e,request:q};(0,n.default)(function(e){R(e),k()},function(e){b(e),k()},o),q=null}q.open(v.method.toUpperCase(),v.url,!0),q.timeout=v.timeout,'onloadend'in q?q.onloadend=x:q.onreadystatechange=function(){q&&4===q.readyState&&(0!==q.status||q.responseURL&&q.responseURL.startsWith('file:'))&&setTimeout(x)},q.onabort=function(){q&&(b(new s.default('Request aborted',s.default.ECONNABORTED,e,q)),k(),q=null)},q.onerror=function(t){const n=t&&t.message?t.message:'Network Error',o=new s.default(n,s.default.ERR_NETWORK,e,q);o.event=t||null,b(o),k(),q=null},q.ontimeout=function(){let t=v.timeout?'timeout of '+v.timeout+'ms exceeded':'timeout exceeded';const n=v.transitional||o.default;v.timeoutErrorMessage&&(t=v.timeoutErrorMessage),b(new s.default(t,n.clarifyTimeoutError?s.default.ETIMEDOUT:s.default.ECONNABORTED,e,q)),k(),q=null},void 0===w&&y.setContentType(null),'setRequestHeader'in q&&t.default.forEach((0,T.toByteStringHeaderObject)(y),function(e,t){q.setRequestHeader(t,e)}),t.default.isUndefined(v.withCredentials)||(q.withCredentials=!!v.withCredentials),C&&'json'!==C&&(q.responseType=v.responseType),M&&([O,
539U]=(0,p.progressEventReducer)(M,!0),q.addEventListener('progress',O)),H&&q.upload&&([L,_]=(0,p.progressEventReducer)(H),q.upload.addEventListener('progress',L),q.upload.addEventListener('loadend',_)),(v.cancelToken||v.signal)&&(h=t=>{q&&(b(!t||t.type?new u.default(null,e,q):t),q.abort(),k(),q=null)},v.cancelToken&&v.cancelToken.subscribe(h),v.signal&&(v.signal.aborted?h():v.signal.addEventListener('abort',h)));const N=(0,l.default)(v.url);!N||f.default.protocols.includes(N)?q.send(w||null):b(new s.default('Unsupported protocol '+N+':',s.default.ERR_BAD_REQUEST,e))})}},441,[414,442,429,420,439,443,431,421,444,447,423]);
540__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t,e=r(d[0]),u=(t=e)&&t.__esModule?t:{default:t};function s(t,e,s){const n=s.config.validateStatus;s.status&&n&&!n(s.status)?e(new u.default('Request failed with status code '+s.status,s.status>=400&&s.status<500?u.default.ERR_BAD_REQUEST:u.default.ERR_BAD_RESPONSE,s.config,s.request,s)):t(s)}},442,[420]);
541__d(function(g,r,i,a,m,e,d){'use strict';function t(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||''}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},443,[]);
542__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"progressEventReducer",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"progressEventDecorator",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"asyncDecorator",{enumerable:!0,get:function(){return c}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2]));const l=(e,o,l=3)=>{let u=0;const c=(0,t.default)(50,250);return(0,n.default)(t=>{if(!t||'number'!=typeof t.loaded)return;const n=t.loaded,l=t.lengthComputable?t.total:void 0,s=null!=l?Math.min(n,l):n,f=Math.max(0,s-u),p=c(f);u=Math.max(u,s);e({loaded:s,total:l,progress:l?s/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-s)/p:void 0,event:t,lengthComputable:null!=l,[o?'download':'upload']:!0})},l)},u=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},c=e=>(...t)=>o.default.asap(()=>e(...t))},444,[445,446,414]);
543__d(function(g,r,_i,a,m,e,d){'use strict';Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=function(t,n){t=t||10;const o=new Array(t),u=new Array(t);let c,i=0,f=0;return n=void 0!==n?n:1e3,function(l){const s=Date.now(),v=u[f];c||(c=s),o[i]=l,u[i]=s;let y=f,_=0;for(;y!==i;)_+=o[y++],y%=t;if(i=(i+1)%t,i===f&&(f=(f+1)%t),s-c<n)return;const b=v&&s-v;return b?Math.round(1e3*_/b):void 0}}},445,[]);
544__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=function(t,n){let u,l,o=0,c=1e3/n;const f=(n,c=Date.now())=>{o=c,u=null,l&&(clearTimeout(l),l=null),t(...n)};return[(...t)=>{const n=Date.now(),s=n-o;s>=c?f(t,n):(u=t,l||(l=setTimeout(()=>{l=null,f(u)},c-s)))},()=>u&&f(u)]}},446,[]);
545__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return v}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),u=e(r(d[4])),l=e(r(d[5])),f=e(r(d[6])),c=e(r(d[7]));const h=['content-type','content-length'];function p(e,t,n){'content-only'===n?Object.entries(t).forEach(([t,n])=>{h.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}var v=function(e){const h=(0,l.default)({},e),v=e=>n.default.hasOwnProp(h,e)?h[e]:void 0,w=v('data');let b=v('withXSRFToken');const y=v('xsrfHeaderName'),C=v('xsrfCookieName');let S=v('headers');const _=v('auth'),F=v('baseURL'),B=v('allowAbsoluteUrls'),E=v('url');var H;if(h.headers=S=f.default.from(S),h.url=(0,c.default)((0,u.default)(F,E,B),v('params'),v('paramsSerializer')),_&&S.set('Authorization','Basic '+btoa((_.username||'')+':'+(_.password?(H=_.password,encodeURIComponent(H).replace(/%([0-9A-F]{2})/gi,(e,t)=>
545String.fromCharCode(parseInt(t,16)))):''))),n.default.isFormData(w)&&(t.default.hasStandardBrowserEnv||t.default.hasStandardBrowserWebWorkerEnv||n.default.isReactNative(w)?S.setContentType(void 0):n.default.isFunction(w.getHeaders)&&p(S,w.getHeaders(),v('formDataHeaderPolicy'))),t.default.hasStandardBrowserEnv){n.default.isFunction(b)&&(b=b(h));if(!0===b||null==b&&(0,o.default)(h.url)){const e=y&&C&&s.default.read(C);e&&S.set(y,e)}}return h}},447,[431,414,448,449,450,453,421,417]);
546__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t,o,n=r(d[0]),u=(e=n)&&e.__esModule?e:{default:e},l=u.default.hasStandardBrowserEnv?(t=new URL(u.default.origin),o=u.default.navigator&&/(msie|trident)/i.test(u.default.navigator.userAgent),e=>(e=new URL(e,u.default.origin),t.protocol===e.protocol&&t.host===e.host&&(o||t.port===e.port))):()=>!0},448,[431]);
547__d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(r(d[0])),n=e(r(d[1])).default.hasStandardBrowserEnv?{write(e,n,u,o,i,s,l){if('undefined'==typeof document)return;const c=[`${e}=${encodeURIComponent(n)}`];t.default.isNumber(u)&&c.push(`expires=${new Date(u).toUTCString()}`),t.default.isString(o)&&c.push(`path=${o}`),t.default.isString(i)&&c.push(`domain=${i}`),!0===s&&c.push('secure'),t.default.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join('; ')},read(e){if('undefined'==typeof document)return null;const t=document.cookie.split(';');for(let n=0;n<t.length;n++){const u=t[n].replace(/^\s+/,''),o=u.indexOf('=');if(-1!==o&&u.slice(0,o)===e)return decodeURIComponent(u.slice(o+1))}return null},remove(e){this.write(e,'',Date.now()-864e5,'/')}}:{write(){},read:()=>null,remove(){}}},449,[414,431]);
548__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t=e(r(d[0])),u=e(r(d[1]));function n(e,n,f){let l=!(0,t.default)(n);return e&&(l||!1===f)?(0,u.default)(e,n):n}},450,[451,452]);
549__d(function(g,r,i,a,m,e,d){'use strict';function t(t){return'string'==typeof t&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},451,[]);
550__d(function(g,r,i,a,m,e,d){'use strict';function t(t,n){return n?t.replace(/\/?\/$/,'')+'/'+n.replace(/^\/+/,''):t}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},452,[]);
551__d(function(g,r,i,_a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return a}});var t=e(r(d[0])),n=e(r(d[1]));const o=e=>e instanceof n.default?Object.assign({},e):e;function a(e,n){n=n||{};const a=Object.create(null);function s(e,n,o,a){return t.default.isPlainObject(e)&&t.default.isPlainObject(n)?t.default.merge.call({caseless:a},e,n):t.default.isPlainObject(n)?t.default.merge({},n):t.default.isArray(n)?n.slice():n}function u(e,n,o,a){return t.default.isUndefined(n)?t.default.isUndefined(e)?void 0:s(void 0,e,0,a):s(e,n,0,a)}function f(e,n){if(!t.default.isUndefined(n))return s(void 0,n)}function l(e,n){return t.default.isUndefined(n)?t.default.isUndefined(e)?void 0:s(void 0,e):s(void 0,n)}function c(o,a,u){return t.default.hasOwnProp(n,u)?s(o,a):t.default.hasOwnProp(e,u)?s(void 0,o):void 0}Object.defineProperty(a,'hasOwnProperty',{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const p={url:f,method:f,data:f,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:c,headers:(e,t,n)=>u(o(e),o(t),0,!0)};return t.default.forEach(Object.keys(Object.assign({}
551,e,n)),function(o){if('__proto__'===o||'constructor'===o||'prototype'===o)return;const s=t.default.hasOwnProp(p,o)?p[o]:u,f=s(t.default.hasOwnProp(e,o)?e[o]:void 0,t.default.hasOwnProp(n,o)?n[o]:void 0,o);t.default.isUndefined(f)&&s!==c||(a[o]=f)}),a}},453,[414,421]);
552__d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}}),Object.defineProperty(_e,"getFetch",{enumerable:!0,get:function(){return O}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),u=r(d[4]),i=e(r(d[5])),l=r(d[6]),f=e(r(d[7])),c=e(r(d[8])),h=e(r(d[9])),p=r(d[10]),y=r(d[11]);const{isFunction:b}=n.default,w=e=>{if(!n.default.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},R=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},E=e=>{const t=e.indexOf('://');let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes('@')||n.includes(':')},S=e=>{const S=void 0!==n.default.global&&null!==n.default.global?n.default.global:globalThis,{ReadableStream:x,TextEncoder:O}=S;e=n.default.merge.call({skipUndefined:!0},{Request:S.Request,Response:S.Response},e);const{fetch:_,Request:L,Response:T}=e,C=_?b(_):'function'==typeof fetch,P=b(L),v=b(T);if(!C)return!1;const B=C&&b(x),D=C&&('function'==typeof O?(N=new O,e=>N.encode(e)):async e=>new Uint8Array(await new L(e).arrayBuffer()));var N;const A=P&&B&&R(()=>{let e=!1;const n=new L(t.default.origin,{body:new x,method:'POST',get duplex(){return e=!0,'half'}}),o=n.headers.has('Content-Type');return null!=n.body&&n.body.cancel(),e&&!o}),U=v&&B&&R(()=>n.default.isReadableStream(new T('').body)),z={stream:U&&(e=>e.body)};C&&['text','arrayBuffer','blob','formData','stream'].forEach(e=>{!z[e]&&(z[e]=(t,n)=>{let s=t&&t[e];if(s)return s.call(t);throw new o.default(`Response type '${e}' is not supported`,o.default.ERR_NOT_SUPPORT,n)})});const F=async e=>{if(null==e)return 0;if(n.default.isBlob(e))return e.size;if(n.default.isSpecCompliantForm(e)){const n=new L(t.default.origin,{method:'POST',body:e});return(await n.arrayBuffer()).byteLength}return n.default.isArrayBufferView(e)||n.default.isArrayBuffer(e)?e.byteLength:(n.default.isURLSearchParams(e)&&(e+=''),n.default.isString(e)?(await D(e)).byteLength:void 0)},q=async(e,t)=>{const o=n.default.toFiniteNumber(e.getContentLength());return null==o?F(t):o};return async e=>{let{url:b,method:R,data:S,signal:x,cancelToken:C,timeout:v,onDownloadProgress:B,onUploadProgress:D,responseType:N,headers:F,withCredentials:j="same-origin",fetchOptions:k,maxContentLength:I,maxBodyLength:M}=(0,f.default)(e);const K=n.default.isNumber(I)&&I>-1,V=n.default.isNumber(M)&&M>-1;let W=_||fetch;N=N?(N+'').toLowerCase():'text';let H=(0,s.default)([x,C&&C.toAbortSignal()],v),Q=null;const $=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let G;try{let s;const f=(X='auth',n.default.hasOwnProp(e,X)?e[X]:void 0);if(f){const e=f.username||'';s={username:e,password:f.password||''}}if(E(b)){const e=new URL(b,t.default.origin);if(!s&&(e.username||e.password)){const t=w(e.username);s={username:t,password:w(e.password)}}(e.username||e.password)&&(e.username='',e.password='',b=e.href)}if(s&&(F.delete('authorization'),F.set('Authorization','Basic '+btoa((J=(s.username||'')+':'+(s.password||''),encodeURIComponent(J).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),K&&'string'==typeof b&&b.startsWith('data:')){if((0,h.default)(b)>I)throw new o.default('maxContentLength size of '+I+' exceeded',o.default.ERR_BAD_RESPONSE,e,Q)}if(V&&'get'!==R&&'head'!==R){const t=await q(F,S);if('number'==typeof t&&isFinite(t)&&t>M)throw new o.default('Request body larger than maxBodyLength limit',o.default.ERR_BAD_REQUEST,e,Q)}if(D&&A&&'get'!==R&&'head'!==R&&0!==(G=await q(F,S))){let e,t=new L(b,{method:'POST',body:S,duplex:'half'});if(n.default.isFormData(S)&&(e=t.headers.get('content-type'))&&F.setContentType(e),t.body){const[e,n]=(0,l.progressEventDecorator)(G,(0,l.progressEventReducer)((0,l.asyncDecorator)(D)));S=(0,u.trackStream)(t.body,65536,e,n)}}n.default.isString(j)||(j=j?'include':'omit');const x=P&&'credentials'in L.prototype;if(n.default.isFormData(S)){const e=F.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&F.delete('content-type')}F.set('User-Agent','axios/'+p.VERSION,!1);const _=Object.assign({},k,{signal:H,method:R.toUpperCase(),headers:(0,y.toByteStringHeaderObject)(
552F.normalize()),body:S,duplex:'half',credentials:x?j:void 0});Q=P&&new L(b,_);let C=await(P?W(Q,k):W(b,_));if(K){const t=n.default.toFiniteNumber(C.headers.get('content-length'));if(null!=t&&t>I)throw new o.default('maxContentLength size of '+I+' exceeded',o.default.ERR_BAD_RESPONSE,e,Q)}const v=U&&('stream'===N||'response'===N);if(U&&C.body&&(B||K||v&&$)){const t={};['status','statusText','headers'].forEach(e=>{t[e]=C[e]});const s=n.default.toFiniteNumber(C.headers.get('content-length')),[i,f]=B&&(0,l.progressEventDecorator)(s,(0,l.progressEventReducer)((0,l.asyncDecorator)(B),!0))||[];let c=0;const h=t=>{if(K&&(c=t,c>I))throw new o.default('maxContentLength size of '+I+' exceeded',o.default.ERR_BAD_RESPONSE,e,Q);i&&i(t)};C=new T((0,u.trackStream)(C.body,65536,h,()=>{f&&f(),$&&$()}),t)}N=N||'text';let Y=await z[n.default.findKey(z,N)||'text'](C,e);if(K&&!U&&!v){let t;if(null!=Y&&('number'==typeof Y.byteLength?t=Y.byteLength:'number'==typeof Y.size?t=Y.size:'string'==typeof Y&&(t='function'==typeof O?(new O).encode(Y).byteLength:Y.length)),'number'==typeof t&&t>I)throw new o.default('maxContentLength size of '+I+' exceeded',o.default.ERR_BAD_RESPONSE,e,Q)}return!v&&$&&$(),await new Promise((t,n)=>{(0,c.default)(t,n,{data:Y,headers:i.default.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:Q})})}catch(t){if($&&$(),H&&H.aborted&&H.reason instanceof o.default){const n=H.reason;throw n.config=e,Q&&(n.request=Q),t!==n&&(n.cause=t),n}if(t&&'TypeError'===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new o.default('Network Error',o.default.ERR_NETWORK,e,Q,t&&t.response),{cause:t.cause||t});throw o.default.from(t,t&&t.code,e,Q,t&&t.response)}var J,X}},x=new Map,O=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:s}=t,u=[o,s,n];let i,l,f=u.length,c=x;for(;f--;)i=u[f],l=c.get(i),void 0===l&&c.set(i,l=f?new Map:S(t)),c=l;return l};var _=O()},454,[431,414,420,455,456,421,444,447,442,457,458,423]);
553__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=e(r(d[0])),n=e(r(d[1])),o=e(r(d[2]));var u=(e,u)=>{if(e=e?e.filter(Boolean):[],!u&&!e.length)return;const s=new AbortController;let l=!1;const c=function(e){if(!l){l=!0,b();const o=e instanceof Error?e:this.reason;s.abort(o instanceof n.default?o:new t.default(o instanceof Error?o.message:o))}};let f=u&&setTimeout(()=>{f=null,c(new n.default(`timeout of ${u}ms exceeded`,n.default.ETIMEDOUT))},u);const b=()=>{e&&(f&&clearTimeout(f),f=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(c):e.removeEventListener('abort',c)}),e=null)};e.forEach(e=>e.addEventListener('abort',c));const{signal:E}=s;return E.unsubscribe=()=>
553o.default.asap(b),E}},455,[439,420,414]);
554__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"streamChunk",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e,"readBytes",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e,"trackStream",{enumerable:!0,get:function(){return c}});const e=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let c,o=0;for(;o<n;)c=o+t,yield e.slice(o,c),o=c},t=async function*(t,c){for await(const o of n(t))yield*e(o,c)},n=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},c=(e,n,c,o)=>{const l=t(e,n);let u,f=0,y=e=>{u||(u=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await l.next();if(t)return y(),void e.close();let o=n.byteLength;if(c){let e=f+=o;c(e)}e.enqueue(new Uint8Array(n))}catch(e){throw y(e),e}},cancel:e=>(y(e),l.return())},{highWaterMark:2})}},456,[]);
555__d(function(g,r,_i,_a,m,e,d){"use strict";function t(t){if(!t||'string'!=typeof t)return 0;if(!t.startsWith('data:'))return 0;const n=t.indexOf(',');if(n<0)return 0;const o=t.slice(5,n),f=t.slice(n+1);if(/;base64/i.test(o)){let t=f.length;const n=f.length;for(let o=0;o<n;o++)if(37===f.charCodeAt(o)&&o+2<n){const n=f.charCodeAt(o+1),c=f.charCodeAt(o+2);(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102)&&(c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102)&&(t-=2,o+=2)}let o=0,c=n-1;const i=t=>t>=2&&37===f.charCodeAt(t-2)&&51===f.charCodeAt(t-1)&&(68===f.charCodeAt(t)||100===f.charCodeAt(t));c>=0&&(61===f.charCodeAt(c)?(o++,c--):i(c)&&(o++,c-=3)),1===o&&c>=0&&(61===f.charCodeAt(c)||i(c))&&o++;const s=3*Math.floor(t/4)-(o||0);return s>0?s:0}if('undefined'!=typeof Buffer&&'function'==typeof Buffer.byteLength)return Buffer.byteLength(f,'utf8');let c=0;for(let t=0,n=f.length;t<n;t++){const o=f.charCodeAt(t);if(o<128)c+=1;else if(o<2048)c+=2;else if(o>=55296&&o<=56319&&t+1<n){const n=f.charCodeAt(t+1);n>=56320&&n<=57343?(c+=4,t++):c+=3}else c+=3}return c}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}})},457,[]);
556__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"VERSION",{enumerable:!0,get:function(){return t}});const t="1.17.0"},458,[]);
557__d(function(g,r,_i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e};const i={};['object','boolean','number','function','string','symbol'].forEach((e,t)=>{i[e]=function(n){return typeof n===e||'a'+(t<1?'n ':' ')+e}});const u={};i.transitional=function(e,n,i){function l(e,n){return'[Axios v'+t.VERSION+"] Transitional option '"+e+"'"+n+(i?'. '+i:'')}return(t,i,s)=>{if(!1===e)throw new o.default(l(i,' has been removed'+(n?' in '+n:'')),o.default.ERR_DEPRECATED);return n&&!u[i]&&(u[i]=!0,console.warn(l(i,' has been deprecated since v'+n+' and will be removed in the near future'))),!e||e(t,i,s)}},i.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var l={assertOptions:function(e,t,n){if('object'!=typeof e)throw new o.default('options must be an object',o.default.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let u=i.length;for(;u-- >0;){const l=i[u],s=Object.prototype.hasOwnProperty.call(t,l)?t[l]:void 0;if(s){const t=e[l],n=void 0===t||s(t,l,e);if(!0!==n)throw new o.default('option '+l+' must be '+n,o.default.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new o.default('Unknown option '+l,o.default.ERR_BAD_OPTION)}},validators:i}},459,[458,420]);
558__d(function(g,r,_i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return i}});var e,s=r(d[0]),t=(e=s)&&e.__esModule?e:{default:e};class n{constructor(e){if('function'!=typeof e)throw new TypeError('executor must be a function.');let s;this.promise=new Promise(function(e){s=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](e);n._listeners=null}),this.promise.then=e=>{let s;const t=new Promise(e=>{n.subscribe(e),s=e}).then(e);return t.cancel=function(){n.unsubscribe(s)},t},e(function(e,i,o){n.reason||(n.reason=new t.default(e,i,o),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
558subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);-1!==s&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=s=>{e.abort(s)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new n(function(s){e=s}),cancel:e}}}var i=n},460,[439]);
559__d(function(g,r,i,a,m,e,d){'use strict';function n(n){return function(t){return n.apply(null,t)}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}})},461,[]);
560__d(function(g,r,i,a,m,_e,d){'use strict';Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e};function n(e){return u.default.isObject(e)&&!0===e.isAxiosError}},462,[414]);
561__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
561alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(t).forEach(([o,n])=>{t[n]=o});var o=t},463,[]);
562__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getApiBaseUrl=function(){return f()},Object.defineProperty(_e,"api",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"publicApi",{enumerable:!0,get:function(){return A}}),_e.onSessionExpired=function(e){return C.onSessionExpired(e)},_e.isAxios404=b,_e.getOrNull=async function(e,t){try{return(await C.get(e,t)).data}catch(e){if(b(e))return null;throw e}};var e,t=r(d[0]),s=(e=t)&&e.__esModule?e:{default:e};r(d[1]);var n=r(d[2]),o=r(d[3]),u=r(d[4]),l=r(d[5]),c=r(d[6]);function p(e){return e instanceof Error?e:new Error('string'==typeof e?e:String(e))}function h(e){return'string'==typeof e?e:null==e?'':Array.isArray(e)?e.map(e=>'string'==typeof e?e:JSON.stringify(e)).join(', '):JSON.stringify(e)}function f(){return null!=window.electronBridge?.apiBaseUrl?window.electronBridge.apiBaseUrl:''!==n.UNIVERSAL_API_URL?n.UNIVERSAL_API_URL:''}const R=function(e,t){const{data:s,violation:n}=(0,c.parseJsonResponseBody)(e,'string'==typeof t['content-type']?t['content-type']:null);return null!=n&&l.logger.error('[ApiClient] Response contract violation on %s: %s',this.url??'(unknown url)',n),s};function y(e){return null!=e&&''!==e&&('/api/v1/auth/refresh'===e||'/api/v1/auth/login'===e||'/api/v1/auth/register'===e||'/api/v1/auth/session'===e)}function E(e,t){return 403===e&&('CSRF_HEADER_MISSING'===t||'CSRF_ORIGIN_REJECTED'===t||'CSRF_ORIGIN_MISSING'===t)}function w(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}const C=new class{isRefreshing=!1;pendingRequests=[];sessionExpiredCallback=null;onSessionExpired(e){return this.sessionExpiredCallback=e,()=>{this.sessionExpiredCallback===e&&(this.sessionExpiredCallback=null)}}constructor(){this.client=s.default.create({baseURL:f(),timeout:9e4,withCredentials:!0,headers:{'Content-Type':'application/json','X-Requested-With':'XMLHttpRequest'},transformResponse:[R]}),this.client.interceptors.request.use(e=>(!0===e.url?.startsWith('/api/v1/auth/')&&l.logger.debug('[ApiClient] >>> %s %s | headers: %s',e.method?.toUpperCase(),e.url,JSON.stringify({'Content-Type':h(e.headers['Content-Type']),'X-Requested-With':h(e.headers['X-Requested-With'])})),e)),this.client.interceptors.response.use(e=>(!0===e.config.url?.startsWith('/api/v1/auth/')&&l.logger.debug('[ApiClient] <<< %s %s | status: %d',e.config.method?.toUpperCase(),e.config.url,e.status),e),async e=>this.handleResponseError(e))}async handleResponseError(e){if(!s.default.isAxiosError(e)||null==e.config||null==e.response)throw l.logger.error('[ApiClient] Non-axios or no-response error:',(0,u.describeError)(e)),p(e);const t=e.config,n=e.response.status,c=(0,o.parseApiErrorBody)(e.response.data),h=c?.error;if(!0===t.url?.startsWith('/api/v1/auth/')){('/api/v1/auth/session'===t.url&&401===n?l.logger.debug:l.logger.error)('[ApiClient] <<< %s %s | error status: %d | errorCode: %s | message: %s',t.method?.toUpperCase(),t.url,n,h??'none',c?.message??'none')}if(E(n,h))throw l.logger.error('[ApiClient] CSRF rejection:',h,e.response.data),e;if(401!==n||!0===t.retry)throw e;if(y(t.url))throw e;if(this.isRefreshing)return new Promise((e,s)=>{this.pendingRequests.push({resolve:()=>{e(this.client(t))},reject:s})});t.retry=!0,this.isRefreshing=!0;try{if('success'===await this.attemptRefresh())return this.processPendingRequests(!0),await this.client(t);throw this.processPendingRequests(!1),this.sessionExpiredCallback?.(),e}catch(e){if(this.processPendingRequests(!1,e),e instanceof Error)throw e;throw p(e)}finally{this.isRefreshing=!1}}async attemptRefresh(){let e;for(let t=0;t<=3;t++)try{const e=await this.client.post('/api/v1/auth/refresh');return 204===e.status||e.status,'success'}catch(n){if(!s.default.isAxiosError(n)||!n.response)throw n;const o=n.response.status;if(503===o&&t<3){const s=Math.min(1e3*2**t,8e3);await w(s+500*Math.random()),e=n;continue}if(401===o)return'terminal';e=n;break}throw e}
562processPendingRequests(e,t){this.pendingRequests.forEach(s=>{e?s.resolve():s.reject(p(t??new Error('Token refresh failed')))}),this.pendingRequests=[]}get(e,t){return this.client.get(e,t)}post(e,t,s){return this.client.post(e,t,s)}put(e,t,s){return this.client.put(e,t,s)}delete(e,t){return this.client.delete(e,t)}patch(e,t,s){return this.client.patch(e,t,s)}},A=s.default.create({baseURL:f(),timeout:9e4});function b(e){return s.default.isAxiosError(e)&&404===e.response?.status}},464,[412,95,465,466,468,469,470]);
563__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UNIVERSAL_API_URL",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"MAPTILER_KEY",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"MAPTILER_NATIVE_KEY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"GOOGLE_CLIENT_ID",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"GOOGLE_IOS_CLIENT_ID",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"GOOGLE_ANDROID_CLIENT_ID",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"GA_MEASUREMENT_ID",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"SENSOR_UTILITY_URL",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"UNRELEASED_CAPABILITIES",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"BUILD_VERSION",{enumerable:!0,get:function(){return I}});const t='',n='',u='',c='',o='',f='',_='',b='',E='',I="e1356cf3"},465,[]);
564__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseApiErrorBody=function(o){if('object'!=typeof o||null===o)return;const n=(0,t.readOptionalString)(o,'error'),s=(0,t.readOptionalString)(o,'message'),u=(0,t.readOptionalNumber)(o,'status'),p=(0,t.readOptionalString)(o,'timestamp');if(void 0===n&&void 0===s&&void 0===u&&void 0===p)return;const v={};void 0!==n&&(v.error=n);void 0!==s&&(v.message=s);void 0!==u&&(v.status=u);void 0!==p&&(v.timestamp=p);return v};var t=r(d[0])},466,[467]);
565__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readOptionalString=function(t,n){if(!Object.hasOwn(t,n))return;const o=Reflect.get(t,n);return'string'==typeof o?o:void 0},e.readOptionalNumber=function(t,n){if(!Object.hasOwn(t,n))return;const o=Reflect.get(t,n);return'number'==typeof o&&Number.isFinite(o)?o:void 0},e.readOptionalBoolean=function(t,n){if(!Object.hasOwn(t,n))return;const o=Reflect.get(t,n);return'boolean'==typeof o?o:void 0}},467,[]);
566__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.readAxiosLikeResponse=o,_e.errorMessage=u,_e.describeError=function(t){const e=u(t,'Unknown error'),n=o(t)?.status;return void 0===n?e:`${e} (HTTP ${String(n)})`};var t,e=r(d[0]),n=(t=e)&&t.__esModule?t:{default:t},s=r(d[1]);function o(t){if(n.default.isAxiosError(t))return{status:t.response?.status,data:t.response?.data};if('object'==typeof t&&null!==t){const e=Reflect.get(t,'response');if('object'==typeof e&&null!==e){const t=Reflect.get(e,'data');return{status:(0,s.readOptionalNumber)(e,'status'),data:t}}}}function u(t,e){const n=o(t);if(null!=n?.data){const t=l(n.data);if(null!==t)return t}return t instanceof Error?t.message:e}function l(t){if('object'!=typeof t||null===t)return null;if(Object.hasOwn(t,'details')){const e=Reflect.get(t,'details');if('object'==typeof e&&null!==e){const t=Object.values(e).filter(t=>'string'==typeof t&&''!==t);if(t.length>0)return t.join('; ')}}const e=(0,s.readOptionalString)(t,'message');return void 0!==e&&''!==e?e:null}},468,[412,467]);
567__d(function(g,r,i,a,m,e,d){"use strict";function n(){}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"logger",{enumerable:!0,get:function(){return o}});const o={debug:n,info:n,warn:(...n)=>{console.warn(...n)},error:(...n)=>{console.error(...n)}}},469,[]);
568__d(function(g,r,i,a,m,e,d){"use strict";function t(t){const n=(t.split(';')[0]??'').trim().toLowerCase();return'application/json'===n||n.endsWith('+json')}
568Object.defineProperty(e,'__esModule',{value:!0}),e.parseJsonResponseBody=function(n,o){if('string'!=typeof n||''===n)return{data:n,violation:null};const s=o??'';if(t(s))try{return{data:JSON.parse(n),violation:null}}catch{return{data:n,violation:`Content-Type declares JSON ('${s}') but the body does not parse as JSON`}}try{JSON.parse(n)}catch{return{data:n,violation:null}}return{data:n,violation:`body parses as JSON but Content-Type declares '${''===s?'(none)':s}'; delivered as string`}}},470,[]);
569__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return n.account}}),Object.defineProperty(e,"admin",{enumerable:!0,get:function(){return n.admin}}),Object.defineProperty(e,"adminContent",{enumerable:!0,get:function(){return n.adminContent}}),Object.defineProperty(e,"adminPress",{enumerable:!0,get:function(){return n.adminPress}}),Object.defineProperty(e,"adminUsers",{enumerable:!0,get:function(){return n.adminUsers}}),Object.defineProperty(e,"auth",{enumerable:!0,get:function(){return n.auth}}),Object.defineProperty(e,"blog",{enumerable:!0,get:function(){return n.blog}}),Object.defineProperty(e,"community",{enumerable:!0,get:function(){return n.community}}),Object.defineProperty(e,"config",{enumerable:!0,get:function(){return n.config}}),Object.defineProperty(e,"contact",{enumerable:!0,get:function(){return n.contact}}),Object.defineProperty(e,"cookieconsent",{enumerable:!0,get:function(){return n.cookieconsent}}),Object.defineProperty(e,"cookieconsentJson",{enumerable:!0,get:function(){return n.cookieconsentJson}}),Object.defineProperty(e,"defaultApi",{enumerable:!0,get:function(){return n.defaultApi}}),Object.defineProperty(e,"firmware",{enumerable:!0,get:function(){return n.firmware}}),Object.defineProperty(e,"generatedApi",{enumerable:!0,get:function(){return n.generatedApi}}),Object.defineProperty(e,"health",{enumerable:!0,get:function(){return n.health}}),Object.defineProperty(e,"hello",{enumerable:!0,get:function(){return n.hello}}),Object.defineProperty(e,"map",{enumerable:!0,get:function(){return n.map}}),Object.defineProperty(e,"monitoredServices",{enumerable:!0,get:function(){return n.monitoredServices}}),Object.defineProperty(e,"organizations",{enumerable:!0,get:function(){return n.organizations}}),Object.defineProperty(e,"pages",{enumerable:!0,get:function(){return n.pages}}),Object.defineProperty(e,"press",{enumerable:!0,get:function(){return n.press}}),Object.defineProperty(e,"registration",{enumerable:!0,get:function(){return n.registration}}),Object.defineProperty(e,"search",{enumerable:!0,get:function(){return n.search}}),Object.defineProperty(e,"sensorCache",{enumerable:!0,get:function(){return n.sensorCache}}),Object.defineProperty(e,"sensorManagement",{enumerable:!0,get:function(){return n.sensorManagement}}),Object.defineProperty(e,"sensors",{enumerable:!0,get:function(){return n.sensors}}),Object.defineProperty(e,"seo",{enumerable:!0,get:function(){return n.seo}}),Object.defineProperty(e,"status",{enumerable:!0,get:function(){return n.status}}),Object.defineProperty(e,"store",{enumerable:!0,get:function(){return n.store}}),Object.defineProperty(e,"tokens",{enumerable:!0,get:function(){return n.tokens}}),Object.defineProperty(e,"cartLineQuantityConstraints",{enumerable:!0,get:function(){return t.cartLineQuantityConstraints}});var n=r(d[0]),t=r(d[1])},471,[472,474]);
570__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"account",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"admin",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"adminContent",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"adminPress",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"adminUsers",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"auth",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"blog",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"community",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"config",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"contact",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"cookieconsent",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"cookieconsentJson",{enumerable:!0,get:function(){return x}}),Object.defineProperty(e,"defaultApi",{enumerable:!0,get:function(){return G}}),Object.defineProperty(e,"firmware",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"health",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"hello",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"map",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"monitoredServices",{enumerable:!0,get:function(){return k}}),Object.defineProperty(e,"organizations",{enumerable:!0,get:function(){return w}}),Object.defineProperty(e,"pages",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"press",{enumerable:!0,get:function(){return j}}),Object.defineProperty(e,"registration",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"search",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"sensorCache",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"sensorManagement",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"sensors",{enumerable:!0,get:function(){return M}}),Object.defineProperty(e,"seo",{enumerable:!0,get:function(){return D}}),Object.defineProperty(e,"status",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"store",{enumerable:!0,get:function(){return F}}),Object.defineProperty(e,"tokens",{enumerable:!0,get:function(){return z}}),Object.defineProperty(e,"generatedApi",{enumerable:!0,get:function(){return U}});var t=r(d[0]);const n={avatar:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/account/avatar'},n)},o={backfillStatus:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/organizations/backfill-uuids/status'},n),backfillUuids:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/organizations/backfill-uuids'},n),catalog:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/billing-tables'},n),embed:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/widget-health/embed'},n),getDetails:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/shopify/fulfillments/{fulfillmentLineItemId}/details'},n),getPointPurchaseOverview:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/commerce/point-purchases/overview'},n),helloAdmin:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/hello'},n),list:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/billing-tables/{source}/{table}'},n),listDiscoursePages:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/discourse/pages'},n),listPointPurchaseActivity:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/commerce/point-purchases/activity'},n),listSensorAuditLog:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/audit-logs/sensors'},n),listShopPolicies:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/shopify/policies'},n),listWebhooks:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/shopify/webhooks'},n),orderOutreachCancelCampaign:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/cancel'},n),orderOutreachCreateCampaign:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns'},n),orderOutreachGetCampaign:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}'},n),orderOutreachGetCampaignProgress:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/progress'},n),orderOutreachGetCampaignRecipient:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/recipients/{recipientId}'},n),orderOutreachListCampaigns:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/order-outreach/campaigns'},n),orderOutreachPauseCampaign:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/pause'},n),orderOutreachReadiness:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/order-outreach/readiness'},n),orderOutreachResendUnknownRecipient:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/recipients/{recipientId}/resend-unknown'},n),orderOutreachResumeCampaign:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/resume'},n),orderOutreachRetryRecipient:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/recipients/{recipientId}/retry'},n),orderOutreachSearchOrders:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/orders/search'},n),orderOutreachSendCampaign:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/campaigns/{campaignId}/send'},n),orderOutreachSyntheticPreview:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/order-outreach/preview/synthetic'},n),subscriptionsAdminContractDetail:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/subscriptions/{contractId}'},n),subscriptionsAdminOverview:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/subscriptions'},n),subscriptionsAdminRenewalStepRuns:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/subscriptions/renewal-step-runs'}
570,n),subscriptionsAdminTriggerRenewal:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/subscriptions/renewal-step-runs/trigger'},n)},s={listPages:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/content/pages'},n),reloadContent:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/content/reload'},n)},p={approve:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/admin/press/{id}/approve'},n),archive:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/admin/press/{id}/archive'},n),getAdminMention:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/press/{id}'},n),getAuditLog:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/press/audit-log'},n),getDashboard:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/press/dashboard'},n),getQueue:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/press/queue'},n),getSettings:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/press/settings'},n),listAdminMentions:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/press/mentions'},n),regenerateSummary:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/press/{id}/regenerate-summary'},n),reject:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/admin/press/{id}/reject'},n),restore:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/admin/press/{id}/restore'},n),submitUrl:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/admin/press'},n),updateMention:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/admin/press/{id}'},n),updateSetting:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/admin/press/settings/{key}'},n)},c={getAssignableRoles:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/users/assignable-roles'},n),getUser:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/users/{id}'},n),listUsers:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/admin/users'},n),terminalDelete:async n=>(0,t.executeGeneratedOperation)({method:'delete',path:'/api/v1/admin/users/{id}'},n),updateEnabled:async n=>(0,t.executeGeneratedOperation)({method:'patch',path:'/api/v1/admin/users/{id}/enabled'},n),updateRole:async n=>(0,t.executeGeneratedOperation)({method:'patch',path:'/api/v1/admin/users/{id}/role'},n)},h={getOrigin:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/auth/origin'},n),googleAuth:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/auth/google'},n),login:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/auth/login'},n),logout:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/auth/logout'},n),refresh:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/auth/refresh'},n),register:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/auth/register'},n),session:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/auth/session'},n)},u={getPost:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/blog/posts/{slug}'},n),listPosts:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/blog/posts'},n)},y={createPost:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/community/posts'},n),createTopic:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/community/topics'},n),deletePost:async n=>(0,t.executeGeneratedOperation)({method:'delete',path:'/api/v1/community/posts/{postId}'},n),deleteTopic:async n=>(0,t.executeGeneratedOperation)({method:'delete',path:'/api/v1/community/topics/{topicId}'},n),editPost:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/community/posts/{postId}'},n),getCategories:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/categories'},n),getCategoryTopics:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/c/{slug}/{id}'},n),getCommunityPost:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/posts/{postId}'},n),getDiscoursePage:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/pages/{slug}'},n),getFaq:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/faq'},n),getLatestTopics:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/latest'},n),getTopic:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/t/{id}'},n),getTopicPosts:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/t/{id}/posts'},n),getTopTopics:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/top'},n),search:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/search'},n),toggleLike:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/community/posts/{postId}/like'},n),writeStatus:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/community/write-status'},n)},O={getClientConfig:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/config/client'},n)},v={submitContact:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/contact'},n)},l={getCurrentCookieConsent:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/cookieconsent/current'},n)},x={postCookieConsent:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/cookieconsent.json'},n)},G={blogChild:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/sitemap-blog.xml'},n),getCookieConsent:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/cookieconsent.json'},n),productsChild:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/sitemap-products.xml'},n),robotsTxt:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/robots.txt'},n),sitemapIndex:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/sitemap.xml'},n),staticChild:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/sitemap-static.xml'},n)},f={checkForUpdate:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/firmware/check'},n),downloadFirmware:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/firmware/download/{version}'},n),downloadFlasherFirmware:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/firmware/flasher/{filename}'},n),downloadLatest:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/firmware/download/latest'},n),getFirmwareInfo:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/firmware/info/{version}'},n),getFlasherManifest:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/firmware/manifest'},n),listFirmware:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/firmware/list'},n),uploadFirmware:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/firmware/upload'},n)},b={health:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/health'},n)},P={hello:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/hello'},n),user:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/hello/user'},n)},C={getLocationNested:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/map/location/{locationPath}'},n),getLocationRoot:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/map/location'},n),getSensorDetail:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/map/sensors/{sensorId}'},n),getSensorHistory:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/map/sensors/{sensorId}/history'},n),getSensors:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/map/sensors'},n)}
570,k={getAllServices:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/monitored-services/all'},n),getMonitoredServices:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/monitored-services'},n)},w={getMyOrganizations:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/organizations/mine'},n),resolveOrganization:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/organizations/resolve'},n)},I={getPage:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/pages/{slug}'},n),servePageImage:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/pages/images/**'},n)},j={getFeatured:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/press/featured'},n),getInsights:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/press/insights'},n),getMention:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/press/{id}'},n),getStats:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/press/stats'},n),listMentions:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/press'},n)},S={clearDraft:async n=>(0,t.executeGeneratedOperation)({method:'delete',path:'/api/v1/registration/draft'},n),loadDraft:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/registration/draft'},n),lookupSensor:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/registration/lookup'},n),resume:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/registration/resume'},n),saveDraft:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/registration/draft'},n),submit:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/registration/submit'},n),validateAssociation:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/registration/validate-association'},n)},A={federatedSearch:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/search'},n)},T={getCacheHealth:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/cache/health'},n)},R={archiveSensor:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/management/{sensorIndex}/archive'},n),exportAudit:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/management/export-audit'},n),getDetail:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/management/{sensorIndex}'},n),getPublicDetail:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/management/{sensorIndex}/public'},n),listMine:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/management/mine'},n),search:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/management/search'},n),update:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/management/update'},n)},M={announceSensor:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/{deviceId}/announce'},n),discoverSensors:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/discover'},n),findNearest:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/nearest'},n),getConfig:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/{deviceId}/config'},n),getSensor:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/{deviceId}'},n),getWifiConfig:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors/{deviceId}/wifi-config'},n),heartbeat:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/{deviceId}/heartbeat'},n),listSensors:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/sensors'},n),receiveTelemetry:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/{deviceId}/telemetry'},n),registerSensor:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/register'},n),reportError:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/{deviceId}/errors'},n),storeWifiConfig:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/sensors/{deviceId}/wifi-config'},n),updateConfig:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/sensors/{deviceId}/config'},n)},D={source:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/seo/source/{file}'},n),status:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/seo/status'},n)},L={getStatus:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/status'},n)},F={addCartLines:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/store/cart/lines'},n),createCart:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/store/cart'},n),getApiPointsTiers:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/api-points-tiers'},n),getCart:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/cart'},n),getCategories:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/categories'},n),getProductByHandle:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/products/{handle}'},n),getProductReviews:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/products/{handle}/reviews'},n),getProducts:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/products'},n),getShopPolicy:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/policies/{handle}'},n),getSubscriptionOffer:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/store/subscription-offer'},n),removeCartLines:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/store/cart/lines/remove'},n),submitProductReview:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/store/products/{handle}/reviews'},n),updateCartLines:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/store/cart/lines'},n)},z={createToken:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/tokens'},n),deleteToken:async n=>(0,t.executeGeneratedOperation)({method:'delete',path:'/api/v1/tokens/{id}'},n),getToken:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/tokens/{id}'},n),listAllTokens:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/tokens/all'},n),listMyTokens:async n=>(0,t.executeGeneratedOperation)({method:'get',path:'/api/v1/tokens'},n),revokeToken:async n=>(0,t.executeGeneratedOperation)({method:'post',path:'/api/v1/tokens/{id}/revoke'},n),updateToken:async n=>(0,t.executeGeneratedOperation)({method:'put',path:'/api/v1/tokens/{id}'},n)},U={account:n,admin:o,adminContent:s,adminPress:p,adminUsers:c,auth:h,blog:u,community:y,config:O,contact:v,cookieconsent:l,cookieconsentJson:x,defaultApi:G,firmware:f,health:b,hello:P,map:C,monitoredServices:k,organizations:w,pages:I,press:j,registration:S,search:A,sensorCache:T,sensorManagement:R,sensors:M,seo:D,status:L,store:F,tokens:z}},472,[473]);
571__d(function(g,r,i,a,m,e,d){"use strict";
571Object.defineProperty(e,'__esModule',{value:!0}),e.rawPathSegments=function(t){const o=t.replace(/^\/+/,'');return`${n}${o.split('/').map(t=>encodeURIComponent(t)).join('/')}`},e.executeGeneratedOperation=async function(t,n){const o=String(t.path),u=f(o),s=p(o,n?.path),h=c(n,o);switch(t.method){case'get':return l(await u.get(s,h));case'delete':return l(await u.delete(s,h));case'post':return l(await u.post(s,n?.body,h));case'put':return l(await u.put(s,n?.body,h));case'patch':return l(await u.patch(s,n?.body,h));default:{const n=t.method;throw new Error(`Unsupported HTTP method: ${String(n)}`)}}};var t=r(d[0]);const n='__purpleair_raw_path__:';function o(t){return'/api/v1/map'===t||t.startsWith('/api/v1/map/')}function u(t){return'string'==typeof t&&t.startsWith(n)}function s(t){if(null==t)throw new Error('Path parameters must not be null or undefined.');if(u(t))return t.slice(n.length);if('string'==typeof t||'number'==typeof t||'boolean'==typeof t)return encodeURIComponent(String(t));if(Array.isArray(t))return t.map(t=>s(t)).join(',');if('object'==typeof t)return Object.entries(t).map(([t,n])=>`${encodeURIComponent(t)},${s(n)}`).join(',');throw new Error(`Unsupported path parameter value: ${String(t)}`)}function p(t,n){return null==n?t:t.replace(/\{([^}]+)\}/g,(t,o)=>{const u=String(o);if(!(u in n))throw new Error(`Missing required path parameter: ${u}`);return s(n[u])})}function c(t,n){if(null==t)return o(n)?{responseType:'text'}:void 0;const u={};if(null!=t.query&&(u.params=t.query),null!=t.headers){const n=t.headers;null!=n&&(u.headers=n)}return null!=t.signal&&(u.signal=t.signal),null!=t.timeout&&(u.timeout=t.timeout),o(n)&&(u.responseType='text'),0===Object.keys(u).length?void 0:u}function l(t){if(204!==t.status&&205!==t.status)return t.data}function f(n){return o(n)?t.publicApi:t.api}},473,[464]);
572__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"cartLineQuantityConstraints",{enumerable:!0,get:function(){return t}});const t={maximum:999999,minimum:1}},474,[]);
573__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return t.STORAGE_KEYS}}),e.getSecureStorage=c,e.getStorageInfo=async function(){return(await c()).getStorageInfo()},e.isSecureStorageAvailable=async function(){return(await c()).isAvailable()},r(d[0]);var n=r(d[1]),t=r(d[2]);let u=null,l=null;async function c(){return null!==u?u:(null!==l||(l=(async()=>(u=new n.WebSecureStorage,u))()),l)}},475,[95,476,483]);
574__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"WebSecureStorage",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),s=(e=t)&&e.__esModule?e:{default:e};class n{keyPrefix='@purpleair/';prefixedKey(e){return`${this.keyPrefix}${e}`}async setItem(e,t){await s.default.setItem(this.prefixedKey(e),t)}async getItem(e){return s.default.getItem(this.prefixedKey(e))}async removeItem(e){await s.default.removeItem(this.prefixedKey(e))}async clear(){const e=(await s.default.getAllKeys()).filter(e=>e.startsWith(this.keyPrefix));await s.default.multiRemove(e)}async isAvailable(){try{const e=`${this.keyPrefix}__test__`;return await s.default.setItem(e,'test'),await s.default.removeItem(e),!0}catch{return!1}}getStorageInfo(){return{type:'async',isSecure:!1,notes:'Web storage uses localStorage. Only non-sensitive profile data is stored here.'}}}},476,[477]);
575__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"useAsyncStorage",{enumerable:!0,get:function(){return n.useAsyncStorage}}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]),o=u.default},477,[478,482]);
576__d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return i}});var e,t=r(d[0]);const o=((e=t)&&e.__esModule?e:{default:e}).default.bind({concatArrays:!0,ignoreUndefined:!0});function n(e,t){const n=window.localStorage.getItem(e);if(n){const l=JSON.parse(n),c=JSON.parse(t),s=JSON.stringify(o(l,c));window.localStorage.setItem(e,s)}else window.localStorage.setItem(e,t)}function l(e,t){return new Promise((o,n)=>{try{const n=e();t?.(null,n),o(n)}catch(e){t?.(e),n(e)}})}function c(e,t,o){return Promise.all(e).then(e=>{const n=o?.(e)??null;return t?.(null,n),Promise.resolve(n)},e=>(t?.(e),Promise.reject(e)))}const s={getItem:(e,t)=>
576l(()=>window.localStorage.getItem(e),t),setItem:(e,t,o)=>l(()=>window.localStorage.setItem(e,t),o),removeItem:(e,t)=>l(()=>window.localStorage.removeItem(e),t),mergeItem:(e,t,o)=>l(()=>n(e,t),o),clear:e=>l(()=>window.localStorage.clear(),e),getAllKeys:e=>l(()=>{const e=window.localStorage.length,t=[];for(let o=0;o<e;o+=1){const e=window.localStorage.key(o)||"";t.push(e)}return t},e),flushGetRequests:()=>{},multiGet:(e,t)=>c(e.map(e=>s.getItem(e)),t,t=>t.map((t,o)=>[e[o],t])),multiSet:(e,t)=>c(e.map(e=>s.setItem(e[0],e[1])),t),multiRemove:(e,t)=>c(e.map(e=>s.removeItem(e)),t),multiMerge:(e,t)=>c(e.map(e=>s.mergeItem(e[0],e[1])),t)};var i=s},478,[479]);
577__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},479,[480]);
578__d(function(g,r,i,a,m,e,d){'use strict';const t=r(d[0]),{hasOwnProperty:n}=Object.prototype,{propertyIsEnumerable:o}=Object,c=(t,n,o)=>Object.defineProperty(t,n,{value:o,writable:!0,enumerable:!0,configurable:!0}),s=this,f={concatArrays:!1,ignoreUndefined:!1},l=t=>{const c=[];for(const o in t)n.call(t,o)&&c.push(o);if(Object.getOwnPropertySymbols){const n=Object.getOwnPropertySymbols(t);for(const s of n)o.call(t,s)&&c.push(s)}return c};function u(n){return Array.isArray(n)?y(n):t(n)?p(n):n}function y(t){const n=t.slice(0,0);return l(t).forEach(o=>{c(n,o,u(t[o]))}),n}function p(t){const n=null===Object.getPrototypeOf(t)?Object.create(null):{};return l(t).forEach(o=>{c(n,o,u(t[o]))}),n}const b=(t,n,o,s)=>(o.forEach(o=>{void 0===n[o]&&s.ignoreUndefined||(o in t&&t[o]!==Object.getPrototypeOf(t)?c(t,o,h(t[o],n[o],s)):c(t,o,u(n[o])))}),t),O=(t,o,s)=>{let f=t.slice(0,0),y=0;return[t,o].forEach(o=>{const p=[];for(let s=0;s<o.length;s++)n.call(o,s)&&(p.push(String(s)),c(f,y++,o===t?o[s]:u(o[s])));f=b(f,o,l(o).filter(t=>!p.includes(t)),s)}),f};function h(n,o,c){return c.concatArrays&&Array.isArray(n)&&Array.isArray(o)?O(n,o,c):t(o)&&t(n)?b(n,o,l(o),c):u(o)}m.exports=function(...n){const o=h(u(f),this!==s&&this||{},f);let c={_:{}};for(const s of n)if(void 0!==s){if(!t(s))throw new TypeError('`'+s+'` is not an Option Object');c=h(c,{_:s},o)}return c._}},480,[481]);
579__d(function(g,r,i,a,m,e,d){'use strict';m.exports=t=>{if('[object Object]'!==Object.prototype.toString.call(t))return!1;const o=Object.getPrototypeOf(t);return null===o||o===Object.prototype}},481,[]);
580__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useAsyncStorage=function(e){return{getItem:(...t)=>u.default.getItem(e,...t),setItem:(...t)=>u.default.setItem(e,...t),mergeItem:(...t)=>u.default.mergeItem(e,...t),removeItem:(...t)=>u.default.removeItem(e,...t)}};var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e}},482,[478]);
581__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return t.STORAGE_KEYS}});var t=r(d[0])},483,[484]);
582__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"STORAGE_KEYS",{enumerable:!0,get:function(){return _}});const _={USER_DATA:'purpleair_user_data',COOKIE_CONSENT:'@purpleair/cookieConsent',CART_ID:'purpleair_cart_id',GOOGLE_OAUTH_RESULT:'google_oauth_result',SELECTED_ORG:'purpleair_selected_org'}},484,[]);
583__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ROUTE_ACCESS_MAP",{enumerable:!0,get:function(){return n}}),e.getRouteAccess=t,e.isPublicScreen=function(n){return!u.has(n)},e.isRouteAccessible=function(n,u,s,c){const o=t(n);switch(o){case'public':return!0;case'anonymous':return!u;case'authenticated':return u;case'admin':return s;case'super_owner':return c;default:return o}};const n={Login:'anonymous',MyAccount:'authenticated',Admin:'admin',PressAdmin:'admin',PressAdminDetail:'admin',ContentAdmin:'admin',AdminSeo:'admin',OrderOutreach:'admin',OrderOutreachNew:'admin',OrderOutreachDetail:'admin',AdminSubscriptions:'admin',AdminSubscriptionDetail:'admin',AdminAuditLogs:'admin',Flasher:'super_owner',Widgets:'admin',Status:'admin',SensorManagement:'authenticated',ApiTokens:'admin'};function t(t){return n[t]??'public'}const u=new Set(Object.entries(n).filter(([,n])=>'public'!==n&&'anonymous'!==n).map(([n])=>n))},485,[]);
584__d(function(g,r,i,a,m,_e,d){"use strict";
584function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AppShell=function({children:e,currentRouteName:t,currentRouteParams:n,platformOs:l="web"}){const p=(0,o.useSafeAreaInsets)();if((0,c.isElectron)())return(0,h.jsxs)(s.default,{style:x.root,children:[(0,h.jsx)(u.ElectronToolbar,{currentRouteName:t}),e]});return(0,h.jsx)(f.NavVisibilityProvider,{children:(0,h.jsx)(j,Object.assign({insetTop:p.top,currentRouteName:t},null!=n?{currentRouteParams:n}:{},{platformOs:l,children:e}))})};var t=r(d[0]),n=e(r(d[1]));r(d[2]);var s=e(r(d[3])),o=r(d[4]),u=r(d[5]),l=r(d[6]),c=r(d[7]),f=r(d[8]),p=r(d[9]),h=r(d[10]);function j({children:e,insetTop:o,currentRouteName:u,currentRouteParams:c,platformOs:j="web"}){const{headerHeightPx:b,hidden:y,reduceMotion:v,resetVisibility:R}=(0,f.useNavVisibility)(),N=(0,p.useTouchLayoutCompensation)(y,b,v);return(0,t.useEffect)(()=>{R()},[u,R]),(0,h.jsxs)(s.default,{style:[x.root,{paddingTop:o}],children:[(0,h.jsx)(f.NavBar,Object.assign({currentRouteName:u},null!=c?{currentRouteParams:c}:{})),(0,h.jsxs)(n.default.View,{style:[x.content,N],children:['web'===j&&(0,h.jsx)(l.PersistentSensorUtilityHost,{active:'SensorUtility'===u}),e]})]})}const x={root:{flex:1},content:{flex:1,position:'relative'}}},486,[34,271,95,276,381,487,511,528,610,649,104]);
585__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ElectronToolbar=function({currentRouteName:e}){const c=(0,b.useAppNavigation)(),{isAuthenticated:O,isAdmin:L,user:R}=(0,u.useAuth)(),f=(0,C.useSignOut)({resetTo:'SensorUtility'}),h='SUPER_OWNER'===R?.role,[v,z]=(0,t.useState)(!1),[H,U]=(0,t.useState)(!1),Y=(0,t.useRef)(null),F=(0,t.useRef)(null),K=(0,t.useCallback)(e=>(0,S.isRouteAccessible)(e,O,L,h)&&(0,E.isRouteEnabledByUnreleasedCapabilities)(e,I.ENABLED_UNRELEASED_CAPABILITIES),[O,L,h]),X=(0,t.useCallback)(e=>{K(e)&&(z(!1),U(!1),c.navigate(e))},[K,c]),Z=(0,t.useCallback)(e=>{z(!1);const t=T();''!==t&&window.open(new URL(e,t).href,'_blank')},[]),$=(0,t.useCallback)(async()=>{U(!1),await f()},[f]);(0,t.useEffect)(()=>{const e=e=>{const t=Y.current;t&&!t.contains(e.target)&&z(!1);const n=F.current;n&&!n.contains(e.target)&&U(!1)};return document.addEventListener('mousedown',e),()=>{document.removeEventListener('mousedown',e)}},[]),(0,t.useEffect)(()=>{const e=window.electronBridge;if(null!=e?.onNavigate)return e.onNavigate(e=>{X(e)})},[X]);const q=x.DESKTOP_NAV_LINKS.filter(e=>K(e.screen));return(0,A.jsx)(n.default,{style:W.toolbar,children:(0,A.jsxs)(n.default,{style:W.toolbarInner,children:[(0,A.jsxs)(n.default,{style:W.leftSection,children:[(0,A.jsx)(s.default,{onPress:()=>{X('SensorUtility')},style:W.logoContainer,children:(0,A.jsx)(l.default,{source:_,style:W.logoImage,resizeMode:"contain"})}),(0,A.jsx)(n.default,{style:W.navLinks,children:q.map(t=>{const n=e===t.screen;return(0,A.jsx)(s.default,{onPress:()=>{X(t.screen)},style:[W.navLink,n&&W.navLinkActive],children:(0,A.jsx)(o.default,{style:[W.navLinkText,n&&W.navLinkTextActive],children:t.label})},t.screen)})})]}),(0,A.jsxs)(n.default,{style:W.rightSection,children:[(0,A.jsxs)(n.default,{ref:Y,children:[(0,A.jsxs)(s.default,{onPress:()=>{z(!v)},style:W.websiteButton,children:[(0,A.jsx)(o.default,{style:W.websiteButtonText,children:"Website"}),(0,A.jsx)(o.default,{style:W.chevron,children:v?'\u25b4':'\u25be'})]}),v&&(0,A.jsxs)("div",{style:p,children:[x.DESKTOP_WEBSITE_LINKS.map(e=>(0,A.jsxs)("button",{onClick:()=>{Z(e.path)},style:j,onMouseEnter:G,onMouseLeave:V,children:[e.label," ",(0,A.jsx)("span",{style:k,children:"\u2197"})]},e.path)),(0,A.jsx)("div",{style:B}),(0,A.jsx)("button",{onClick:()=>{Z('')},style:w,onMouseEnter:G,onMouseLeave:V,children:"Open purpleair.com \u2197"})]})]}),O?(0,A.jsxs)(n.default,{ref:F,children:[(0,A.jsx)(s.default,{onPress:()=>{U(!H)},style:W.userButton,children:(0,A.jsx)(n.default,{style:W.userAvatar,children:(0,A.jsx)(o.default,{style:W.userAvatarText,children:(R?.email??'?').charAt(0).toUpperCase()})})}),H&&(0,A.jsxs)("div",{style:y,children:[(0,A.jsxs)("div",{style:M,children:[(0,A.jsx)("div",{style:P,children:"Signed in as"}
585),(0,A.jsx)("div",{style:D,children:R?.email??'Unknown'})]}),(0,A.jsx)("button",{onClick:()=>{X('About')},style:j,onMouseEnter:G,onMouseLeave:V,children:"About"}),K('SensorManagement')&&(0,A.jsx)("button",{onClick:()=>{X('SensorManagement')},style:j,onMouseEnter:G,onMouseLeave:V,children:"My Sensors"}),(0,A.jsx)("button",{onClick:()=>{$()},style:N,onMouseEnter:G,onMouseLeave:V,children:"Sign Out"})]})]}):(0,A.jsx)(s.default,{onPress:()=>{X('Login')},style:W.signInButton,children:(0,A.jsx)(o.default,{style:W.signInButtonText,children:"Sign In"})})]})]})})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),l=e(r(d[4])),c=r(d[5]),u=r(d[6]),S=r(d[7]),O=r(d[8]),L=r(d[9]),R=r(d[10]),f=r(d[11]),h=r(d[12]),C=r(d[13]),E=r(d[14]),b=r(d[15]),I=r(d[16]),x=r(d[17]),A=r(d[18]);const _=r(d[19]);function T(){const e=window.electronBridge?.apiBaseUrl??O.UNIVERSAL_API_URL;return''!==e?e:'http:'===window.location.protocol||'https:'===window.location.protocol?window.location.origin:''}const p=Object.assign({position:'absolute',top:'100%',right:0,minWidth:180,backgroundColor:L.COLORS.BG_SURFACE,borderRadius:6},R.VIEW_SHADOW_STYLES.DROPDOWN_PANEL,{border:`1px solid ${L.COLORS.OVERLAY_DARK_10}`,paddingTop:4,paddingBottom:4,zIndex:1001,marginTop:4}),y=Object.assign({},p,{minWidth:200}),v={display:'block',width:'100%',padding:'8px 16px',border:'none',background:'none',textAlign:'left',cursor:'pointer',fontSize:14,fontFamily:h.FONT_FAMILY.WEB_SANS},j=Object.assign({},v,{color:L.COLORS.TEXT_DARK}),N=Object.assign({},v,{color:L.COLORS.ERROR}),k={color:L.COLORS.TEXT_CAPTION,fontSize:11},w=Object.assign({},v,{color:L.COLORS.BRAND_PRIMARY,fontWeight:'600'}),B={height:1,backgroundColor:L.COLORS.BORDER_LIGHT,margin:'4px 0'},M={padding:'8px 16px',borderBottom:`1px solid ${L.COLORS.BORDER_LIGHT}`},P={color:L.COLORS.TEXT_SOFT,fontSize:13,marginBottom:2},D={color:L.COLORS.TEXT_DARK,fontSize:14,fontWeight:'600',wordBreak:'break-all'};function G(e){e.target.style.backgroundColor=L.COLORS.BG_SUBTLE}function V(e){e.target.style.backgroundColor='transparent'}const W=(0,c.createStyles)({chevron:{color:L.COLORS.OVERLAY_LIGHT_60,fontSize:h.FONT_SIZE.MICRO,marginLeft:4},leftSection:{alignItems:'center',flexDirection:'row',gap:f.SPACING.LG},logoContainer:{alignItems:'center',flexDirection:'row'},logoImage:{height:28,width:110},navLink:{borderBottomColor:L.COLORS.TRANSPARENT,borderBottomWidth:2,paddingHorizontal:f.SPACING.SM,paddingVertical:f.SPACING.SM},navLinkActive:{borderBottomColor:L.COLORS.TEXT_INVERSE},navLinkText:{color:L.COLORS.OVERLAY_LIGHT_75,fontSize:h.FONT_SIZE.SM,fontWeight:'500'},navLinkTextActive:{color:L.COLORS.TEXT_INVERSE,fontWeight:'600'},navLinks:{alignItems:'center',flexDirection:'row',gap:f.SPACING.MICRO},rightSection:{alignItems:'center',flexDirection:'row',gap:f.SPACING.MD},signInButton:{backgroundColor:L.COLORS.OVERLAY_LIGHT_15,borderRadius:4,paddingHorizontal:f.SPACING.MD,paddingVertical:6},signInButtonText:{color:L.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.SM,fontWeight:'500'},toolbar:{backgroundColor:L.COLORS.ACTION_PRIMARY,borderBottomColor:L.COLORS.OVERLAY_DARK_15,borderBottomWidth:1},toolbarInner:{alignItems:'center',flexDirection:'row',height:44,justifyContent:'space-between',paddingHorizontal:f.SPACING.LG,width:'100%'},userAvatar:{alignItems:'center',backgroundColor:L.COLORS.OVERLAY_LIGHT_20,borderRadius:14,height:28,justifyContent:'center',width:28},userAvatarText:{color:L.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.SM,fontWeight:'600'},userButton:{padding:2},websiteButton:{alignItems:'center',backgroundColor:L.COLORS.OVERLAY_LIGHT_10,borderRadius:4,flexDirection:'row',paddingHorizontal:f.SPACING.SM,paddingVertical:6},websiteButtonText:{color:L.COLORS.OVERLAY_LIGHT_85,fontSize:h.FONT_SIZE.SM,fontWeight:'500'}})},487,[34,276,222,488,328,489,411,485,465,490,491,493,494,495,506,505,507,509,104,510]);
586__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var t=e(r(_d[0])),n=e(r(_d[1])),s=r(_d[2]),o=(function(e){if(e&&e.__esMo
586dule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(s),l=e(r(_d[3])),u=e(r(_d[4])),c=e(r(_d[5])),d=e(r(_d[6])),f=["activeOpacity","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onLongPress","onPress","onPressIn","onPressOut","rejectResponderTermination","style"];function y(e,c){var y=e.activeOpacity,b=e.delayPressIn,p=e.delayPressOut,O=e.delayLongPress,v=e.disabled,_=e.focusable,j=e.onLongPress,L=e.onPress,h=e.onPressIn,k=e.onPressOut,C=e.rejectResponderTermination,E=e.style,R=(0,n.default)(e,f),S=(0,s.useRef)(null),D=(0,l.default)(c,S),I=(0,s.useState)('0s'),M=I[0],w=I[1],T=(0,s.useState)(null),N=T[0],x=T[1],A=(0,s.useCallback)((e,t)=>{x(e),w(t?t/1e3+"s":'0s')},[x,w]),G=(0,s.useCallback)(e=>{A(null!=y?y:.2,e)},[y,A]),q=(0,s.useCallback)(e=>{A(null,e)},[A]),z=(0,s.useMemo)(()=>({cancelable:!C,disabled:v,delayLongPress:O,delayPressStart:b,delayPressEnd:p,onLongPress:j,onPress:L,onPressStart(e){var t=null!=e.dispatchConfig?'onResponderGrant'===e.dispatchConfig.registrationName:'keydown'===e.type;G(t?0:150),null!=h&&h(e)},onPressEnd(e){q(250),null!=k&&k(e)}}),[O,b,p,v,j,L,h,k,C,G,q]),B=(0,u.default)(S,z);return o.createElement(d.default,(0,t.default)({},R,B,{accessibilityDisabled:v,focusable:!v&&!1!==_,pointerEvents:v?'box-none':void 0,ref:D,style:[P.root,!v&&P.actionable,E,null!=N&&{opacity:N},{transitionDuration:M}]}))}var P=c.default.create({root:{transitionProperty:'opacity',transitionDuration:'0.15s',userSelect:'none'},actionable:{cursor:'pointer',touchAction:'manipulation'}}),b=o.memo(o.forwardRef(y));b.displayName='TouchableOpacity';var p=b},488,[27,43,34,240,374,42,276]);
587__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.createStyles=function(e){return u.default.create(e)};var e,t=r(d[0]),u=(e=t)&&e.__esModule?e:{default:e}},489,[42]);
588__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"COLORS",{enumerable:!0,get:function(){return _}});const _={BRAND_PRIMARY:'#aa44aa',BRAND_PRIMARY_DARK:'#882288',BRAND_ACCENT:'#8833aa',BRAND_GRADIENT_END:'#7b2d8e',BRAND_TINT:'#f3e8f3',BRAND_BG_SUBTLE:'#f0e6ff',BRAND_PRIMARY_ALPHA_08:'#aa44aa08',BRAND_PRIMARY_ALPHA_12:'#aa44aa12',BRAND_PRIMARY_ALPHA_14:'#aa44aa14',BRAND_PRIMARY_ALPHA_20:'#aa44aa20',ACTION_PRIMARY:'#2563eb',ACTION_PRIMARY_HOVER:'#1d4ed8',ERROR:'#dc2626',ERROR_BG:'#fef2f2',ERROR_BORDER:'#fecaca',SUCCESS:'#166534',SUCCESS_BG:'#f0fdf4',SUCCESS_DARK:'#0F5132',WARNING:'#d97706',WARNING_BG:'#fef3c7',WARNING_BG_GLASS:'rgba(254, 243, 199, 0.82)',WARNING_DARK:'#92400e',WARNING_BANNER_BG:'#FFF3CD',WARNING_BANNER_BORDER:'#FFE69C',WARNING_BANNER_TEXT:'#664D03',WARNING_BANNER_LINK:'#997404',WARNING_AMBER:'#856404',INFO:'#7c3aed',INDIGO_500:'#6366F1',NAVY_DARK:'#0f172a',NAVY_MID:'#1e293b',CYAN_ACCENT:'#22d3ee',INDIGO:'#4f46e5',STAR_GOLD:'#f59e0b',BLUE:'#2563eb',SKY_BLUE:'#5a9bd5',BLUE_400:'#3b82f6',BLUE_300:'#93c5fd',BLUE_200:'#bfdbfe',BLUE_DARK:'#1e3a5f',BLUE_800:'#1e40af',BLUE_BG_SUBTLE:'#f0f7ff',BLUE_50:'#eff6ff',GREEN_500:'#22c55e',GREEN_300:'#86efac',GREEN_200:'#bbf7d0',GREEN_100:'#dcfce7',GREEN_DARK:'#15803d',GREEN_NATURE:'#4a5a3a',MAP_GREEN:'#00A000',MAP_GREEN_LIGHT:'#00C000',EMERALD_600:'#059669',EMERALD_50:'#ecfdf5',RED_600:'#e53935',RED_100:'#fee2e2',RED_MUTED:'#cc4444',BADGE_RED:'#ff3b30',AMBER_200:'#fde68a',AMBER_700:'#b45309',AMBER_900:'#78350f',AMBER_400:'#fbbf24',YELLOW_500:'#eab308',TEAL_DARK:'#2c6e6a',CYAN_600:'#0891b2',VIOLET_DARK:'#5b21b6',RED_500:'#ef4444',ORANGE_500:'#f97316',GOOGLE_BLUE:'#4285F4',TEXT_PRIMARY:'#111827',TEXT_HEADING:'#111',TEXT_DARK:'#333',TEXT_BODY:'#374151',TEXT_MEDIUM:'#4b5563',TEXT_SECONDARY:'#555',TEXT_MUTED:'#6b7280',TEXT_SLATE:'#64748b',TEXT_SOFT:'#666',TEXT_PLACEHOLDER:'#9ca3af',TEXT_LIGHT:'#94a3b8',TEXT_GHOST:'#888',TEXT_CAPTION:'#999',TEXT_DIM:'#444',TEXT_SLATE_DARK:'#475569',TEXT_ZINC:'#71717a',TEXT_NEAR_BLACK:'#222',SLATE_DARK:'#334155',TEXT_GRAY_800:'#1f2937',BORDER_MUTED:'#c4c8cc',BORDER_STRONG:'#b4b8bc',BORDER_DISABLED:'#bbb',TEXT_INVERSE:'#fff',TEXT_BLACK:'#000',BLACK:'#000000',WHITE:'#ffffff',APP_SWITCH_WEB_TRACK_OFF:'#888888',APP_SWITCH_WEB_THUMB_OUTLINE:'#555555',BORDER:'#e5e7eb',BORDER_LIGHT:'#e0e0e0',BORDER_SUBTLE:'#ddd',BORDER_SOFT:'#ccc',BORDER_DEFAULT:'#d1d5db',BORDER_SLATE:'#e2e8f0',BORDER_NEUTRAL:'#e5e5e5',BORDER_FAINT:'#eee',BORDER_BRAND:'#e8e0ec',BG_SURFACE:'#fff',BG_LIGHT:'#f8f9fa',BG_WASH:'#f9fafb',BG_SUBTLE_100:'#f3f4f6',BG_SUBTLE:'#f5f5f5',BG_WARM:'#faf9f6',BG_WARM_END:'#f5f0e8',BG_WARM_BORDER:'#e8e4dc',BG_FAINT:'#fafafa',BG_CHIP:'#f0f0f0',BG_SLATE:'#f8fafc',BG_SLATE_100:'#f1f5f9',BG_NEAR_WHITE:'#f9f9f9',BG_NEUTRAL:'#f4f4f4',BG_NEAR_BLACK:'#1a1a1a',BG_COOL:'#f5f7fa',BG_MUTED:'#f0f1f3',BG_DARK:'#1a1a2e',BG_DARK_GLASS:'rgba(26, 26, 46, 0.72)',BG_CODE_DARK:'#0d1117',BG_AMBER_TINT:'#fffbeb',BG_GREEN_TINT:'#D1E7DD',BG_BLUE_TINT:'#e0f2fe',BG_PURPLE_TINT:'#ede9fe',BRAND_BG_WASH:'#f9f0f9',BRAND_BG_LIGHT:'#fdf4ff',BRAND_BG_SELECTED:'#faf5fa',BRAND_BG_HOVER:'#faf0fa',BRAND_BG_SURFACE:'#f8f5fa',BRAND_BG_FAINT:'#faf8fb',ERROR_DARK:'#991b1b',OVERLAY_DARK:'rgba(0, 0, 0, 0.4)',OVERLAY_MAP:'rgba(0, 0, 0, 0.5)',OVERLAY_LIGHT_95:'rgba(255,255,255,0.95)',OVERLAY_LIGHT_90:'rgba(255,255,255,0.9)',OVERLAY_LIGHT_85:'rgba(255,255,255,0.85)',OVERLAY_LIGHT_75:'rgba(255,255,255,0.75)',OVERLAY_LIGHT_30:'rgba(255,255,255,0.3)',OVERLAY_LIGHT_20:'rgba(255,255,255,0.2)',OVERLAY_LIGHT_10:'rgba(255,255,255,0.1)',OVERLAY_LIGHT_05:'rgba(255,255,255,0.05)',OVERLAY_LIGHT_15:'rgba(255,255,255,0.15)',OVERLAY_LIGHT_40:'rgba(255,255,255,0.4)',OVERLAY_LIGHT_50:'rgba(255,255,255,0.5)',OVERLAY_LIGHT_60:'rgba(255,255,255,0.6)',OVERLAY_LIGHT_70:'rgba(255,255,255,0.7)',OVERLAY_LIGHT_80:'rgba(255, 255, 255, 0.8)',OVERLAY_DARK_04:'rgba(0, 0, 0, 0.04)',OVERLAY_DARK_08:'rgba(0, 0, 0, 0.08)',OVERLAY_DARK_10:'rgba(0,0,0,0.1)',OVERLAY_DARK_15:'rgba(0,0,0,0.15)',OVERLAY_DARK_25:'rgba(0, 0, 0, 0.25)',OVERLAY_DARK_30:'rgba(0, 0, 0, 0.3)',OVERLAY_DARK_50:'rgba(0, 0, 0, 0.5)',OVERLAY_DARK_90:'rgba(0, 0, 0, 0.9)',OVERLAY_LIGHT_20_SPACED:'rgba(255, 255, 255, 0.2)',OVERLAY_GRAY:'rgba(113, 113, 122, 0.1)',OVERLAY_GREEN:'rgba(22, 163, 74, 0.1)',OVERLAY_AMBER:'rgba(245, 158, 11, 0.1)',AQI_GOOD:'#00E400',AQI_MODERATE:'#FFFF00',AQI_UNHEALTHY_SENSITIVE:'#FF7E00',AQI_UNHEALTHY:'#FF0000',AQI_VERY_UNHEALTHY:'#8F3F97',AQI_HAZARDOUS:'#7E0023',AQI_WASH_GOOD:'#E8FAEB',AQI_MID_GOOD:'#9DEAB0',AQI_WASH_MODERATE:'#FFFCDC',AQI_MID_MODERATE:'#FFEF8A',AQI_WASH_UNHEALTHY_SENSITIVE:'#FFEEDA',AQI_MID_UNHEALTHY_SENSITIVE:'#FFC88C',AQI_WASH_UNHEALTHY:'#FDE4E4',AQI_MID_UNHEALTHY:'#FFA8A8',AQI_WASH_VERY_UNHEALTHY:'#EFE4F3',AQI_MID_VERY_UNHEALTHY:'#C29DC9',AQI_WASH_HAZARDOUS:'#F3D9DE',AQI_MID_HAZARDOUS:'#C76B7F',MAP_RING_STROKE:'rgba(150,150,150,1)',MAP_TRANSPARENT:'rgba(0,0,0,0)',FLASHER_DIFF_RED:'#f85149',FLASHER_DIFF_BLUE:'#58a6ff',FLASHER_DIFF_GREEN:'#3fb950',FLASHER_DIFF_YELLOW:'#d29922',FLASHER_BG_DARK:'#0d1117',FLASHER_BORDER_DARK:'#374151',BRAND_TINT_SUBTLE:'rgba(120, 40, 160, 0.08)',SCROLL_EDGE_SHADOW_OPAQUE:'rgba(0, 0, 0, 0.10)',SCROLL_EDGE_SHADOW_MID:'rgba(0, 0, 0, 0.05)',SCROLL_EDGE_SHADOW_SOFT:'rgba(0, 0, 0, 0.02)',TRANSPARENT:'transparent',INHERIT:'inherit'}},490,[]);
589__d(function(g,r,i,a,m,e,d){"use strict";
589Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"VIEW_SHADOW_STYLES",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"TEXT_SHADOW_STYLES",{enumerable:!0,get:function(){return O}}),r(d[0]),r(d[1]);var S=r(d[2]);const A={BRAND_SWATCH:{boxShadow:S.SHADOWS.BRAND},BOTTOM_SHEET:{boxShadow:S.SHADOWS.BOTTOM_SHEET},MAP_SENSOR_DETAIL_SHEET:{boxShadow:S.SHADOWS.BOTTOM_SHEET},DROPDOWN_PANEL:{boxShadow:S.SHADOWS.DROPDOWN},HERO_PRIMARY_CTA:{boxShadow:S.SHADOWS.CTA},HERO_SECONDARY_CTA:{boxShadow:S.SHADOWS.SUBTLE},LOGIN_CARD:{boxShadow:S.SHADOWS.LOGIN},NEON_CYAN_SURFACE:{boxShadow:S.SHADOWS.NEON_CYAN},NEON_MAGENTA_SURFACE:{boxShadow:S.SHADOWS.NEON_MAGENTA},NEON_AMBER_SURFACE:{boxShadow:S.SHADOWS.NEON_AMBER}},O={AQI_VALUE:{textShadow:S.SHADOWS.AQI_VALUE},HERO_LABEL:{textShadow:S.SHADOWS.SM},HERO_CONTRAST:{textShadow:S.SHADOWS.HERO_TEXT_CONTRAST},HERO_SUBTITLE:{textShadow:S.SHADOWS.DEFAULT},HERO_TITLE:{textShadow:S.SHADOWS.MD},NEON_CYAN_TEXT:{textShadow:S.SHADOWS.NEON_TEXT_CYAN},NEON_MAGENTA_TEXT:{textShadow:S.SHADOWS.NEON_TEXT_MAGENTA}}},491,[95,490,492]);
590__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SHADOWS",{enumerable:!0,get:function(){return p}});const p={AQI_VALUE:'0 1px 2px rgba(0,0,0,0.5)',BOTTOM_SHEET:'0 -4px 12px rgba(0,0,0,0.15)',SM:'0 1px 4px rgba(0,0,0,0.6)',MD:'0 2px 8px rgba(0,0,0,0.7)',DEFAULT:'0 1px 6px rgba(0,0,0,0.6)',HERO_TEXT_CONTRAST:'0 1px 3px rgba(0,0,0,0.65), 0 0 1px rgba(0,0,0,0.7)',LOGIN:'0 4px 20px rgba(0,0,0,0.15)',CTA:'0 2px 8px rgba(0,0,0,0.15)',SUBTLE:'0 2px 8px rgba(0,0,0,0.10)',XS:'0 1px 3px rgba(0,0,0,0.06)',SM_ALT:'0 2px 8px rgba(0,0,0,0.12)',LG:'0 4px 24px rgba(0,0,0,0.12)',XL:'0 8px 24px rgba(0,0,0,0.12)',BRAND:'0 8px 32px rgba(170,68,170,0.3)',DROPDOWN:'0 4px 16px rgba(0,0,0,0.15)',NEON_CYAN:'0 0 10px rgba(34,211,238,0.9), 0 0 36px rgba(34,211,238,0.5)',NEON_MAGENTA:'0 0 10px rgba(170,68,170,0.9), 0 0 36px rgba(170,68,170,0.55)',NEON_AMBER:'0 0 8px rgba(245,158,11,0.95), 0 0 28px rgba(245,158,11,0.55)',NEON_TEXT_CYAN:'0 0 8px rgba(34,211,238,0.95), 0 0 26px rgba(34,211,238,0.6)',NEON_TEXT_MAGENTA:'0 0 8px rgba(170,68,170,0.95), 0 0 26px rgba(170,68,170,0.6)'}},492,[]);
591__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SPACING",{enumerable:!0,get:function(){return t}});const t={MICRO:2,XS:4,SM:8,MD:12,LG:16,XL:20,XXL:24,XXXL:32,HUGE:40,MASSIVE:48,JUMBO:64,HERO:80}},493,[]);
592__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FONT_SIZE",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"FONT_FAMILY",{enumerable:!0,get:function(){return S}}),r(d[0]);const n={MICRO:10,XS:12,SM:13,MD:14,LG:16,XL:18,XXL:20,XXXL:24,DISPLAY_SM:28,DISPLAY_MD:32,DISPLAY_ML:36,DISPLAY_LG:40,DISPLAY_XL:48,DISPLAY_XXL:64,DISPLAY_HERO:88,DISPLAY_GIANT:160},o='var(--pa-font-family-sans, system-ui, sans-serif)',t='ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',S={SANS:o,WEB_SANS:o,MONOSPACE:t,WEB_MONOSPACE:t}},494,[95]);
593__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useSignOut=function(e={}){const{resetTo:t="Home"}=e,{logout:s}=(0,o.useAuth)(),n=(0,l.useAppNavigation)(),_=(0,c.useToast)();return(0,u.useCallback)(async()=>{try{await s()}catch{}await f(),n.reset({index:0,routes:[{name:t}]}),_.success('Signed out',{id:'sign-out-success'})},[s,n,t,_])};var e,t=r(d[0]),s=(e=t)&&e.__esModule?e:{default:e},u=r(d[1]),o=r(d[2]),c=r(d[3]),n=r(d[4]),l=r(d[5]),_=r(d[6]);async function f(){try{await Promise.all([s.default.removeItem(n.STORAGE_KEYS.CART_ID),s.default.removeItem(n.STORAGE_KEYS.SELECTED_ORG)])}catch(e){_.logger.warn('Failed to clear user-specific storage during sign-out:',e)}}},495,[477,34,411,496,484,505,469]);
594__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ToastProvider",{enumerable:!0,get:function(){return t.ToastProvider}}),Object.defineProperty(e,"useToast",{enumerable:!0,get:function(){return n.useToast}}),Object.defineProperty(e,"DEFAULT_TOAST_CAP",{enumerable:!0,get:function(){return n.DEFAULT_TOAST_CAP}}),Object.defineProperty(e,"DEFAULT_TOAST_DURATIONS_MILLIS",{enumerable:!0,get:function(){return n.DEFAULT_TOAST_DURATIONS_MILLIS}});var t=r(d[0]),n=r(d[1])},496,[497,499]);
595__d(function(g,r,i,a,m,e,d){"use strict";
595Object.defineProperty(e,'__esModule',{value:!0}),e.ToastProvider=function({children:b,cap:I=c.DEFAULT_TOAST_CAP}){const[k,S]=(0,s.useReducer)(o.reduceToastQueue,f),C=(0,s.useRef)(0),_=(0,s.useRef)(new Map),v=(0,t.useLatestRef)(k.queue),A=(0,s.useCallback)(()=>(C.current+=1,`toast-${String(C.current)}`),[]),p=(0,s.useCallback)(s=>{const t=_.current.get(s);void 0!==t&&(clearTimeout(t.handle),_.current.delete(s))},[]),L=(0,s.useCallback)((s,t)=>{p(s),S({type:'DISMISS',id:s,reason:t})},[p]),O=(0,s.useCallback)((s,t)=>{if(!Number.isFinite(t))return;const n=setTimeout(()=>{L(s,'auto')},t);_.current.set(s,{handle:n,duration:t})},[L]);(0,s.useEffect)(()=>{if(0!==k.evicted.length)for(const{toast:s,reason:t}of k.evicted)p(s.id),s.onDismiss?.(t)},[k.evicted,p]),(0,s.useEffect)(()=>{const s=_.current;return()=>{for(const{handle:t}of s.values())clearTimeout(t);s.clear()}},[]);const h=(0,s.useCallback)(s=>{const t=s.id??A(),n=Object.assign({},s,{id:t});return S({type:'PUBLISH',toast:n,cap:I}),p(t),O(t,T(n)),t},[A,I,p,O]),y=(0,s.useCallback)(s=>{L(s,'manual')},[L]),D=(0,s.useCallback)(()=>{for(const s of _.current.values())clearTimeout(s.handle);_.current.clear(),S({type:'DISMISS_ALL',reason:'manual'})},[]),P=(0,s.useCallback)((s,t)=>{S({type:'UPDATE',id:s,patch:t});const n=v.current.find(t=>t.id===s);if(void 0===n)return;const c=Object.assign({},n,t,{id:s});p(s),O(s,T(c))},[p,O,v]),N=(0,s.useCallback)((s,t,n)=>h(Object.assign({},n??{},{kind:s,message:t})),[h]),E=(0,s.useCallback)((s,t)=>N('success',s,t),[N]),M=(0,s.useCallback)((s,t)=>N('info',s,t),[N]),U=(0,s.useCallback)((s,t)=>N('warning',s,t),[N]),w=(0,s.useCallback)((s,t)=>N('error',s,t),[N]),j=(0,s.useCallback)(async(s,t)=>{const n=h({kind:'info',message:t.loading,duration:Number.POSITIVE_INFINITY});try{const o=await s,u='function'==typeof t.success?t.success(o):t.success;return P(n,{kind:'success',message:u,duration:c.DEFAULT_TOAST_DURATIONS_MILLIS.success}),o}catch(s){const o='function'==typeof t.error?t.error(s):t.error;throw P(n,{kind:'error',message:o,duration:c.DEFAULT_TOAST_DURATIONS_MILLIS.error}),s}},[h,P]),F=(0,s.useMemo)(()=>({show:h,success:E,info:M,warning:U,error:w,dismiss:y,dismissAll:D,update:P,promise:j}),[h,E,M,U,w,y,D,P,j]),R=(0,s.useCallback)(s=>{p(s)},[p]),q=(0,s.useCallback)(s=>{if(_.current.has(s))return;const t=v.current.find(t=>t.id===s);void 0!==t&&O(s,T(t))},[O,v]),x=(0,s.useCallback)(s=>{const t=v.current.find(t=>t.id===s);if(void 0===t?.action)return;const{onPress:c,dismissOnPress:o=!0}=t.action;(async()=>{try{await c()}catch(s){n.logger.error('[ToastProvider] action onPress rejected',s)}})(),o&&L(s,'action')},[L,v]),V=(0,s.useMemo)(()=>
595({pause:R,resume:q,runAction:x,dismiss:y}),[R,q,x,y]);return(0,l.jsxs)(c.ToastContext,{value:F,children:[b,(0,l.jsx)(u.ToastViewport,{toasts:k.queue,controls:V})]})};var s=r(d[0]),t=r(d[1]),n=r(d[2]),c=r(d[3]),o=r(d[4]),u=r(d[5]),l=r(d[6]);const f={queue:[],evicted:[]};function T(s){return void 0!==s.duration?s.duration:'error'===s.kind&&void 0!==s.action?Number.POSITIVE_INFINITY:c.DEFAULT_TOAST_DURATIONS_MILLIS[s.kind]}},497,[34,498,469,499,500,501,104]);
596__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useLatestRef=function(u){const n=(0,t.useRef)(u);return(0,t.useEffect)(()=>{n.current=u}),n};var t=r(d[0])},498,[34]);
597__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ToastContext",{enumerable:!0,get:function(){return n}}),e.useToast=function(){const o=(0,t.useContext)(n);if(void 0===o)throw new Error('useToast must be used within a ToastProvider');return o},Object.defineProperty(e,"DEFAULT_TOAST_CAP",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"DEFAULT_TOAST_DURATIONS_MILLIS",{enumerable:!0,get:function(){return u}});var t=r(d[0]);const n=(0,t.createContext)(void 0);n.displayName='ToastContext';const o=3,u={success:4e3,info:4e3,warning:6e3,error:8e3}},499,[34]);
598__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.reduceToastQueue=function(t,o){switch(o.type){case'PUBLISH':return u(t.queue,o.toast,o.cap);case'DISMISS':return n(t.queue,o.id,o.reason);case'DISMISS_ALL':return c(t.queue,o.reason);case'UPDATE':return s(t.queue,o.id,o.patch);default:return t}};const t=[];function u(u,n,c){const s=u.findIndex(t=>t.id===n.id);if(-1!==s){const c=u.slice();return c[s]=n,{queue:c,evicted:t}}const o=[...u,n];if(o.length<=c)return{queue:o,evicted:t};const f=o.length-c,q=o.slice(0,f).map(t=>({toast:t,reason:'replaced'}));return{queue:o.slice(f),evicted:q}}function n(u,n,c){const s=u.findIndex(t=>t.id===n);if(-1===s)return{queue:u,evicted:t};const o=u[s],f=u.slice();return f.splice(s,1),void 0===o?{queue:u,evicted:t}:{queue:f,evicted:[{toast:o,reason:c}]}}function c(u,n){if(0===u.length)return{queue:u,evicted:t};return{queue:[],evicted:u.map(t=>({toast:t,reason:n}))}}function s(u,n,c){const s=u.findIndex(t=>t.id===n);if(-1===s)return{queue:u,evicted:t};const o=u[s];if(void 0===o)return{queue:u,evicted:t};const f=Object.assign({},o,c,{id:o.id}),q=u.slice();return q[s]=f,{queue:q,evicted:t}}},500,[]);
599__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.ToastViewport=function({toasts:e,controls:t}){const o=(0,s.useSafeAreaInsets)();if(0===e.length)return null;const f={paddingTop:o.top+l.SPACING.MD,paddingLeft:o.left+l.SPACING.MD,paddingRight:o.right+l.SPACING.MD};return(0,c.jsx)(n.default,{style:[p.wrapper,f],children:(0,c.jsx)(n.default,{style:p.stack,children:e.map(e=>(0,c.jsx)(u.ToastItem,{toast:e,onDismiss:t.dismiss,onActionPress:t.runAction,onHoverIn:t.pause,onHoverOut:t.resume,onFocus:t.pause,onBlur:t.resume},e.id))})})},r(d[0]);var e,t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e},s=r(d[2]),o=r(d[3]),l=r(d[4]),u=r(d[5]),c=r(d[6]);const p=(0,o.createStyles)({wrapper:{position:'absolute',top:0,left:0,right:0,alignItems:'center',pointerEvents:'box-none',zIndex:9999},stack:{width:'100%',maxWidth:480,flexDirection:'column',alignItems:'stretch',pointerEvents:'box-none'}})},501,[34,276,381,489,493,502,104]);
600__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ToastItem=function({toast:e,onDismiss:c,onActionPress:u,onHoverIn:S,onHoverOut:b,onFocus:G,onBlur:I}){const _=L[e.kind],A=h[e.kind],B=(0,y.useStableAnimatedValue)(0),N=(0,y.useStableAnimatedValue)(f),v=(0,y.useStableAnimatedValue)(p);(0,t.useEffect)(()=>{o.default.parallel([o.default.timing(B,{toValue:1,duration:C,useNativeDriver:!0}),o.default.timing(N,{toValue:0,duration:C,useNativeDriver:!0}),o.default.timing(v,{toValue:1,duration:C,useNativeDriver:!0})]).start()},[B,N,v]);const T=(0,t.useMemo)(()=>({opacity:B,transform:[{translateY:N},{scale:v}]}),[B,N,v]);return(0,O.jsx)(o.default.View,Object.assign({style:[E.outer,T],testID:`toast-${e.id}`,accessible:!0,accessibilityLiveRegion:_.accessibilityLiveRegion},void 0!==_.accessibilityRole?{accessibilityRole:_.accessibilityRole}:{},{children:(0,O.jsxs)(n.default,{style:E.card,onHoverIn:()=>{S(e.id)},onHoverOut:()=>{b(e.id)},onFocus:()=>{G(e.id)},onBlur:()=>{I(e.id)},children:[(0,O.jsx)(l.default,{style:[E.iconBadge,A.iconBadge],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",accessibilityLabel:_.indicatorLabel,children:(0,O.jsx)(s.default,{style:[E.iconGlyph,A.iconGlyph],children:_.iconGlyph})}),(0,O.jsxs)(l.default,{style:E.body,children:[(0,O.jsx)(s.default,{style:E.message,children:e.message}),void 0!==e.description&&''!==e.description&&(0,O.jsx)(s.default,{style:E.description,children:e.description})]}),void 0!==e.action&&(0,O.jsx)(n.default,{style:({pressed:e})=>[E.actionButton,e&&E.actionButtonPressed],onPress:()=>{u(e.id)},accessibilityRole:"button",accessibilityLabel:e.action.label,children:(0,O.jsx)(s.default,{style:E.actionLabel,children:e.action.label})}),(0,O.jsx)(n.default,{style:E.dismissButton,onPress:()=>{c(e.id)},accessibilityRole:"button",accessibilityLabel:"Dismiss notification",hitSlop:R.SPACING.SM,children:(0,O.jsx)(s.default,{style:E.dismissGlyph,children:"\xd7"})})]})}))};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),s=e(r(d[3])),l=e(r(d[4])),c=r(d[5]),u=r(d[6]),S=r(d[7]),R=r(d[8]),b=r(d[9]),y=r(d[10]),O=r(d[11]);const L={success:{accessibilityLiveRegion:'polite',accessibilityRole:void 0,indicatorLabel:'Success',iconGlyph:'\u2713'},info:{accessibilityLiveRegion:'polite',accessibilityRole:void 0,indicatorLabel:'Information',iconGlyph:'i'},warning:{accessibilityLiveRegion:'polite',accessibilityRole:void 0,indicatorLabel:'Warning',iconGlyph:'!'},error:{accessibilityLiveRegion:'assertive',accessibilityRole:'alert',indicatorLabel:'Error',iconGlyph:'\u2715'}},h={success:(0,c.createStyles)({iconBadge:{backgroundColor:u.COLORS.SUCCESS_BG},iconGlyph:{color:u.COLORS.GREEN_DARK}}),info:(0,c.createStyles)({iconBadge:{backgroundColor:u.COLORS.BLUE_50},iconGlyph:{color:u.COLORS.BLUE_800}}),warning:(0,c.createStyles)({iconBadge:{backgroundColor:u.COLORS.BG_AMBER_TINT},iconGlyph:{color:u.COLORS.WARNING_DARK}}),error:(0,c.createStyles)({iconBadge:{backgroundColor:u.COLORS.ERROR_BG},iconGlyph:{color:u.COLORS.ERROR_DARK}})},C=220,f=-10,p=.97;const E=(0,c.createStyles)({outer:{marginBottom:R.SPACING.SM},card:Object.assign({flexDirection:'row',alignItems:'center',paddingVertical:R.SPACING.MD,paddingHorizontal:R.SPACING.LG,borderRadius:12,borderWidth:1,borderColor:u.COLORS.BORDER_DEFAULT,backgroundColor:u.COLORS.BG_SURFACE,gap:R.SPACING.MD,pointerEvents:'auto'},S.ELEVATION.RAISED),iconBadge:{width:28,height:28,borderRadius:14,alignItems:'center',justifyContent:'center'},iconGlyph:{fontSize:b.FONT_SIZE.LG,lineHeight:b.FONT_SIZE.LG,fontWeight:'600',textAlign:'center'},body:{flex:1,minWidth:0},message:{color:u.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.MD,fontWeight:'600',lineHeight:20},description:{color:u.COLORS.TEXT_BODY,marginTop:R.SPACING.XS,fontSize:b.FONT_SIZE.SM,lineHeight:18},actionButton:{flexShrink:0,backgroundColor:u.COLORS.BG_CHIP,borderWidth:1,borderColor:u.COLORS.BORDER_DEFAULT,paddingHorizontal:R.SPACING.MD,paddingVertical:R.SPACING.SM,borderRadius:8,alignItems:'center',justifyContent:'center'},actionButtonPressed:{backgroundColor:u.COLORS.BORDER_NEUTRAL},actionLabel:{color:u.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.SM,fontWeight:'600',lineHeight:b.FONT_SIZE.SM},dismissButton:{paddingHorizontal:R.SPACING.XS,paddingVertical:R.SPACING.XS},dismissGlyph:{color:u.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.XL,lineHeight:b.FONT_SIZE.XL,fontWeight:'400',textAlign:'center'}})},502,[34,271,369,222,276,489,490,503,493,494,504,104]);
601__d(function(g,r,i,a,m,e,d){"use strict";
601Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ELEVATION",{enumerable:!0,get:function(){return o}}),r(d[0]),r(d[1]);var S=r(d[2]);const o={SUBTLE:{boxShadow:S.SHADOWS.XS},MEDIUM:{boxShadow:S.SHADOWS.SM_ALT},RAISED:{boxShadow:S.SHADOWS.XL},OVERLAY:{boxShadow:S.SHADOWS.LG}}},503,[95,490,492]);
602__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useStableAnimatedValue=function(e){const[u]=(0,t.useState)(()=>new n.default.Value(e));return u};var e,t=r(d[0]),u=r(d[1]),n=(e=u)&&e.__esModule?e:{default:e}},504,[34,271]);
603__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.navigateToFrameTarget=function(t,n){if('StoreCategory'===n.routeName)return void t.dispatch({type:'NAVIGATE',payload:{name:n.routeName,params:n.params}});t.dispatch({type:'NAVIGATE',payload:{name:n.routeName}})},e.isAppNavigationState=function(t){if('object'!=typeof t||null===t)return!1;const n=Reflect.get(t,'routes'),o=Reflect.get(t,'index');return Array.isArray(n)&&'number'==typeof o&&Number.isInteger(o)},e.useCurrentRoute=function(){const n=(0,t.useRoute)();return{name:n.name,params:n.params}},e.useCommunityCategoryParams=function(){return c.CommunityCategory()},e.useCommunityTopicParams=function(){return c.CommunityTopic()},e.useCommunityNewTopicParams=function(){return c.CommunityNewTopic()},e.useBlogArticleParams=function(){return c.BlogArticle()},e.usePressDiscoveryDetailParams=function(){return c.PressDiscoveryDetail()},e.usePressAdminDetailParams=function(){return c.PressAdminDetail()},e.useOrderOutreachDetailParams=function(){return c.OrderOutreachDetail()},e.useAdminSubscriptionDetailParams=function(){return c.AdminSubscriptionDetail()},e.usePressAdminParams=function(){return c.PressAdmin()},e.useSearchParams=function(){return c.Search()},e.useRegisterParams=function(){return c.Register()},e.useStoreCategoryParams=function(){return c.StoreCategory()},e.useProductParams=function(){return c.Product()},e.useSensorManagementParams=function(){return c.SensorManagement()},e.useAppNavigation=function(){return(0,t.useNavigation)()},e.useOptionalAppNavigation=function(){return(0,n.useContext)(t.NavigationContext)},e.useAppNativeStackNavigation=function(){return(0,t.useNavigation)()},e.useAppLinkTo=function(){return(0,t.useLinkTo)()};var t=r(d[0]),n=r(d[1]);function o(t,n){return new Error(`Route param hook: expected route '${t}', got '${n}'. This usually indicates a hook wired into the wrong screen.`)}function u(n){const u=(0,t.useRoute)();if(u.name!==n)throw o(String(n),u.name);return u.params}function s(n){const u=(0,t.useRoute)();if(u.name!==n)throw o(String(n),u.name);const s=u.params;if(void 0===s)throw new Error(`Route param hook: missing required params for '${String(n)}'. This usually indicates a broken deep link or navigate() call without params.`);return s}const c={CommunityCategory:()=>s('CommunityCategory'),CommunityTopic:()=>s('CommunityTopic'),CommunityNewTopic:()=>u('CommunityNewTopic'),BlogArticle:()=>s('BlogArticle'),PressDiscoveryDetail:()=>s('PressDiscoveryDetail'),PressAdminDetail:()=>s('PressAdminDetail'),OrderOutreachDetail:()=>s('OrderOutreachDetail'),AdminSubscriptionDetail:()=>s('AdminSubscriptionDetail'),PressAdmin:()=>u('PressAdmin'),Search:()=>u('Search'),Register:()=>u('Register'),StoreCategory:()=>s('StoreCategory'),Product:()=>s('Product'),SensorManagement:()=>u('SensorManagement')}},505,[107,34]);
604__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getRequiredUnreleasedCapabilityForRoute=s,e.isRouteEnabledByUnreleasedCapabilities=function(n,o){const c=s(n);return void 0===c||(0,t.isUnreleasedCapabilityEnabled)(o,c)};var t=r(d[0]);const n={APIDocs:'interactive-api-docs',SensorConfig:'local-sensor-discovery',Widgets:'embed-widgets'};function s(t){return n[t]}},506,[507]);
605__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UNRELEASED_CAPABILITY_IDS",{enumerable:!0,get:function(){return s}}),e.createUnreleasedCapabilityRegistry=u,e.parseRequestedUnreleasedCapabilities=c,e.isUnreleasedCapabilityEnabled=function(t,n){return t.has(n)},e.getEnabledUnreleasedCapabilities=function(t){return s.filter(n=>t.has(n))},Object.defineProperty(e,"ENABLED_UNRELEASED_CAPABILITIES",{enumerable:!0,get:function(){return E}});var t=r(d[0]),n=r(d[1]);const s=['interactive-api-docs','embed-widgets','local-sensor-discovery'],l=new Set(s);function o(t){return l.has(t)}function u({allowUnreleasedCapabilities:t,requestedCapabilities:n}){if(!t)return new Set;const s=new Set;for(const t of n){if(!o(t))throw new Error(`Unknown unreleased capability: ${t}`);s.add(t)}return s}function c(t){return void 0===t||''===t.trim()?[]:t.split(',').map(t=>t.trim()).filter(t=>t.length>0)}const E=u({allowUnreleasedCapabilities:n.IS_DEVELOPMENT_BUILD,requestedCapabilities:c(t.UNRELEASED_CAPABILITIES)})},507,[465,508]);
606__d(function(g,r,i,a,m,e,d){"use strict";
606Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"IS_DEVELOPMENT_BUILD",{enumerable:!0,get:function(){return t}});const t=!1},508,[]);
607__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DESKTOP_SCREENS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"DESKTOP_INITIAL_SCREEN",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DESKTOP_NAV_LINKS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"DESKTOP_WEBSITE_LINKS",{enumerable:!0,get:function(){return l}});const t=new Set(['Map','Location','SensorUtility','SensorConfig','Register','Flasher','SensorManagement','About','Login','MyAccount','Credits']),n='SensorUtility',o=[{screen:'Map',label:'Map'},{screen:'SensorUtility',label:'Sensor Utility'},{screen:'SensorConfig',label:'Config'},{screen:'Register',label:'Register'},{screen:'Flasher',label:'Flasher'},{screen:'SensorManagement',label:'My Sensors'}],l=[{label:'Store',path:'/store'},{label:'Community',path:'/community'},{label:'Blog',path:'/blog'},{label:'Support',path:'/contact'}]},509,[]);
608__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/assets/logo-white.f24b43b622febda673f112116bb03258.png",width:270,height:69}},510,[]);
609__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.resolveSameOriginSensorUtilityAssetUrl=v,_e.SensorUtilityScreen=function(){const e=(0,R.useSeoMeta)('SensorUtility');''===O||(0,u.readExternalUrlLinkProps)(O);return(0,w.jsx)(S.WebMeta,Object.assign({},e))},_e.PersistentSensorUtilityHost=function({active:e,loadModule:o=j,loadCss:u=x,resolveContainer:f=e=>e}){const S=(0,t.useRef)(null),h=(0,t.useRef)(null),E=(0,t.useRef)(null),[L,y]=(0,t.useState)(!1),[R,C]=(0,t.useState)(null),[O,A]=(0,t.useState)(0),{isDevTriggered:T,surface:v}=(0,p.useErrorSurface)(_.moduleLoad),P=null!=R||T?'Failed to load Sensor Utility':null,{isAdmin:X}=(0,s.useAuth)(),G=null!==h.current,F=(0,t.useCallback)(e=>{const t=f(S.current);if(null===t)return!1;const n={isAdmin:X};return E.current?.isAdmin===n.isAdmin||(e.mount(t,{isAdmin:n.isAdmin,firmware:I}),E.current=n),!0},[X,f]);return(0,t.useEffect)(()=>{if(!e||null!==h.current)return;let t=!1;return y(!0),C(null),(async function(){try{const e=b(U),[,n]=await Promise.all([u(e),o()]);if(t)return;h.current=n,F(n)&&y(!1)}catch(e){t||(C(e.message),y(!1))}})(),()=>{t=!0}},[e,F,u,o,O]),(0,t.useEffect)(()=>{null!==h.current&&F(h.current)},[F]),(0,t.useEffect)(()=>()=>{h.current?.unmount(),h.current=null,E.current=null},[]),(0,w.jsx)(n.default,{style:[N.hostShell,e?void 0:N.hidden],children:(0,w.jsxs)(c.PageLayout,{hideFooter:!0,children:[e&&!G&&null==P&&(0,w.jsx)(l.LoadingState,{message:"Loading Sensor Utility..."}),e&&null!=P&&(0,w.jsx)(l.ErrorState,Object.assign({message:P,surface:v},null!=R?{detail:R}:{},{onRetry:()=>{A(e=>e+1)}})),(0,w.jsx)(n.default,{ref:S,style:[N.moduleContainer,e&&G&&!L&&null==P?void 0:N.hidden]})]})})};var t=r(d[0]),n=e(r(d[1]));e(r(d[2]));r(d[3]);var o=r(d[4]),s=r(d[5]),l=r(d[6]),u=r(d[7]),c=r(d[8]),f=r(d[9]),S=r(d[10]),h=r(d[11]),E=r(d[12]),L=r(d[13]),y=r(d[14]),p=r(d[15]),R=r(d[16]),w=r(d[17]);const C=''!==h.SENSOR_UTILITY_URL?h.SENSOR_UTILITY_URL:'/sensor-utility/module/',O=(function(e,t){if(''===e)return'';try{return new URL(t,e).href}catch(e){if(e instanceof TypeError)return'';throw e}})(h.UNIVERSAL_API_URL,(0,f.getScreenPath)('SensorUtility')),U='sensor-web-utility.css',A='sensor-web-utility.js',T='Sensor Utility assets must resolve to the same-origin app host.',_=(0,p.defineScreenErrorSurfaces)('SensorUtility',{moduleLoad:{id:'module-load',kind:'page',label:'Sensor utility module load error'}}),I={manifestUrl:'/api/v1/firmware/manifest',binaryBasePath:'/api/v1/firmware/flasher'};function v(e,t,n){const o=P(e,t,n);if(o.origin!==n)throw new Error(T);return o.href}function P(e,t,n){const o=e.endsWith('/')?e:`${e}/`;try{return new URL(t,new URL(o,n))}catch(e){if(e instanceof TypeError)throw new Error(T);if(e instanceof Error)throw e;throw new Error(T)}}function b(e){return v(C,e,window.location.origin)}function x(e){const t=document.querySelector(`link[href="${CSS.escape(e)}"]`);if(null!==t)return null!==t.sheet?Promise.resolve(t):new Promise((n,o)=>{t.addEventListener('load',()=>{n(t)},{once:!0}),t.addEventListener('error',()=>{o(new Error(`Failed to load ${e}`))},{once:!0})});const n=document.createElement('link');n.rel='stylesheet',n.href=e;const o=new Promise((t,o)=>{n.addEventListener('load',()=>{t(n)},{once:!0}),n.addEventListener('error',()=>{o(new Error(`Failed to load ${e}`))},{once:!0})});return document.head.appendChild(n),o}async function j(){return import(b(A))}const N=(0,o.createStyles)({hostShell:{bottom:0,left:0,position:'absolute',right:0,top:0,zIndex:1},hidden:Object.assign({},{display:'none'}
609),moduleContainer:Object.assign({flex:1},{minHeight:600}),openButton:{backgroundColor:E.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:L.SPACING.XXL,paddingVertical:L.SPACING.LG},openButtonText:{color:E.COLORS.TEXT_INVERSE,fontSize:y.FONT_SIZE.LG,fontWeight:'600'},unsupportedContainer:{alignItems:'center',backgroundColor:E.COLORS.BG_SURFACE,flex:1,justifyContent:'center',padding:L.SPACING.XXXL},unsupportedText:{color:E.COLORS.TEXT_SOFT,fontSize:y.FONT_SIZE.LG,lineHeight:26,marginBottom:L.SPACING.XXL,maxWidth:500,textAlign:'center'},unsupportedTitle:{color:E.COLORS.TEXT_DARK,fontSize:y.FONT_SIZE.XXXL,fontWeight:'600',marginBottom:L.SPACING.LG,textAlign:'center'}})},511,[34,276,222,95,489,411,512,519,568,518,565,465,490,493,494,557,562,104]);
610__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"LoadingState",{enumerable:!0,get:function(){return t.LoadingState}}),Object.defineProperty(e,"ErrorState",{enumerable:!0,get:function(){return t.ErrorState}}),Object.defineProperty(e,"EmptyState",{enumerable:!0,get:function(){return t.EmptyState}}),Object.defineProperty(e,"LocalErrorBanner",{enumerable:!0,get:function(){return t.LocalErrorBanner}}),Object.defineProperty(e,"FormSubmitError",{enumerable:!0,get:function(){return t.FormSubmitError}}),Object.defineProperty(e,"FeatureStatusNotice",{enumerable:!0,get:function(){return n.FeatureStatusNotice}}),Object.defineProperty(e,"HeroCTAButtons",{enumerable:!0,get:function(){return o.HeroCTAButtons}}),Object.defineProperty(e,"FeatureUnavailable",{enumerable:!0,get:function(){return u.FeatureUnavailable}}),Object.defineProperty(e,"UnavailableFeatures",{enumerable:!0,get:function(){return u.UnavailableFeatures}}),Object.defineProperty(e,"DemoModeBanner",{enumerable:!0,get:function(){return c.DemoModeBanner}}),Object.defineProperty(e,"DemoModeIndicator",{enumerable:!0,get:function(){return c.DemoModeIndicator}}),Object.defineProperty(e,"ImageCredits",{enumerable:!0,get:function(){return b.ImageCredits}}),Object.defineProperty(e,"ImageGallery",{enumerable:!0,get:function(){return l.ImageGallery}}),Object.defineProperty(e,"PolicyFullPage",{enumerable:!0,get:function(){return f.PolicyFullPage}}),Object.defineProperty(e,"SectionCard",{enumerable:!0,get:function(){return P.SectionCard}}),Object.defineProperty(e,"MarkdownPage",{enumerable:!0,get:function(){return y.MarkdownPage}}),Object.defineProperty(e,"MarkdownPageLoading",{enumerable:!0,get:function(){return y.MarkdownPageLoading}}),Object.defineProperty(e,"MarkdownPageError",{enumerable:!0,get:function(){return y.MarkdownPageError}}),Object.defineProperty(e,"FeatureGate",{enumerable:!0,get:function(){return p.FeatureGate}}),Object.defineProperty(e,"DisclosureSection",{enumerable:!0,get:function(){return j.DisclosureSection}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),c=r(d[4]),b=r(d[5]),l=r(d[6]),f=r(d[7]),P=r(d[8]),y=r(d[9]),p=r(d[10]),j=r(d[11])},512,[513,514,515,535,536,537,539,556,604,566,606,608]);
611__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LoadingState=function({message:e="Loading..."}){return(0,R.jsxs)(t.default,{style:f.center,children:[(0,R.jsx)(o.default,{size:"large",color:c.COLORS.ACTION_PRIMARY}),(0,R.jsx)(l.default,{style:f.loadingText,children:e})]})},_e.ErrorState=function({message:e,surface:o,detail:s,onRetry:c,retryLabel:u="Retry"}){return(0,R.jsxs)(t.default,{style:f.center,children:[(0,R.jsx)(l.default,{style:f.errorText,children:e}),null!=s&&''!==s&&(0,R.jsx)(l.default,{style:f.detailText,children:s}),null!=c&&(0,R.jsx)(n.default,{style:f.retryButton,onPress:c,accessibilityRole:"button",accessibilityLabel:u,children:(0,R.jsx)(l.default,{style:f.retryButtonText,children:u})})]})},_e.LocalErrorBanner=function({surface:e,message:o,detail:s,style:c,onDismiss:u,onRetry:S,dismissLabel:O="Dismiss",retryLabel:E="Retry"}){return(0,R.jsxs)(t.default,{style:[f.localErrorBanner,c],children:[(0,R.jsx)(l.default,{style:f.localErrorMessage,children:o}),null!=s&&''!==s&&(0,R.jsx)(l.default,{style:f.localErrorDetail,children:s}),(null!=u||null!=S)&&(0,R.jsxs)(t.default,{style:f.localErrorActions,children:[null!=S&&(0,R.jsx)(n.default,{onPress:S,accessibilityRole:"button",accessibilityLabel:E,children:(0,R.jsx)(l.default,{style:f.localErrorActionText,children:E})}),null!=u&&(0,R.jsx)(n.default,{onPress:u,accessibilityRole:"button",accessibilityLabel:O,children:(0,R.jsx)(l.default,{style:f.localErrorActionText,children:O})})]})]})},_e.FormSubmitError=function({surface:e,message:t,style:o}){return(0,R.jsx)(l.default,{style:[f.formSubmitErrorText,o],children:t})},_e.EmptyState=function({message:e}){return(0,R.jsx)(t.default,{style:f.center,children:(0,R.jsx)(l.default,{style:f.emptyText,children:e})})},r(d[0]);var t=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),n=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),R=r(d[9]);const f=(0,s.createStyles)({center:{alignItems:'center',justifyContent:'center',paddingVertical:u.SPACING.HERO},detailText:{color:c.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.MD,marginBottom:u.SPACING.LG,textAlign:'center'},emptyText:{color:c.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.LG,textAlign:'center'},errorText:{color:c.COLORS.ERROR,fontSize:S.FONT_SIZE.LG,marginBottom:u.SPACING.LG,textAlign:'center'},loadingText:{color:c.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.LG,marginTop:u.SPACING.LG},formSubmitErrorText:{color:c.COLORS.ERROR,fontSize:S.FONT_SIZE.MD,marginBottom:u.SPACING.LG},localErrorActionText:{color:c.COLORS.ERROR,fontSize:S.FONT_SIZE.SM,fontWeight:'600'},localErrorActions:{flexDirection:'row',gap:u.SPACING.LG,marginTop:u.SPACING.SM},localErrorBanner:{backgroundColor:c.COLORS.ERROR_BG,borderColor:c.COLORS.ERROR_BORDER,borderRadius:8,borderWidth:1,padding:u.SPACING.MD},localErrorDetail:{color:c.COLORS.TEXT_SECONDARY,fontSize:S.FONT_SIZE.SM,marginTop:u.SPACING.XS},localErrorMessage:{color:c.COLORS.ERROR,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},retryButton:{backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:u.SPACING.XXL,paddingVertical:u.SPACING.MD},retryButtonText:{color:c.COLORS.BG_SURFACE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'}})},513,[34,276,222,410,488,489,490,493,494,104]);
612__d(function(g,r,i,a,m,_e,d){"use strict";
612function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FeatureStatusNotice=function({status:e,message:l,title:s,presentation:S="inline",style:O}){const C='card'===S,R=null!=s&&''!==s,N={loading:(0,I.jsx)(t.default,{color:C?c.COLORS.ACTION_PRIMARY:c.COLORS.WARNING,size:C?'large':'small'}),missing:(0,I.jsx)(n.default,{style:[u.icon,C&&u.cardIcon],children:(0,I.jsx)(o.default,{style:[u.iconText,C&&u.cardIconText],children:"!"})})};return(0,I.jsxs)(n.default,{style:[u.base,u[S],O],children:[N[e],(0,I.jsxs)(n.default,{style:[u.copy,!C&&u.rowCopy,C&&u.cardCopy],children:[R&&(0,I.jsx)(o.default,{style:[u.title,C&&u.cardTitle],children:s}),(0,I.jsx)(o.default,{style:[u.message,C&&u.cardMessage],children:l})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),l=r(d[4]),c=r(d[5]),s=r(d[6]),S=r(d[7]),O=r(d[8]),I=r(d[9]);const u=(0,l.createStyles)({base:{alignItems:'center'},card:Object.assign({backgroundColor:c.COLORS.OVERLAY_LIGHT_95,borderColor:c.COLORS.BORDER_LIGHT,borderRadius:14,borderWidth:1,maxWidth:340,paddingHorizontal:S.SPACING.XL,paddingVertical:S.SPACING.XL},s.ELEVATION.RAISED),cardCopy:{alignItems:'center'},cardIcon:{borderRadius:16,height:32,width:32},cardIconText:{fontSize:O.FONT_SIZE.MD},cardMessage:{fontSize:O.FONT_SIZE.MD,lineHeight:21,marginTop:S.SPACING.XS,textAlign:'center'},cardTitle:{color:c.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.LG,marginTop:S.SPACING.MD,textAlign:'center'},copy:{},icon:{alignItems:'center',backgroundColor:c.COLORS.WARNING,borderRadius:10,height:20,justifyContent:'center',width:20},iconText:{color:c.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.XS,fontWeight:'700'},inline:{backgroundColor:c.COLORS.BG_AMBER_TINT,borderColor:c.COLORS.AMBER_200,borderRadius:8,borderWidth:1,flexDirection:'row',gap:S.SPACING.SM,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},message:{color:c.COLORS.WARNING_DARK,fontSize:O.FONT_SIZE.SM,lineHeight:18},rowCopy:{flex:1},title:{color:c.COLORS.AMBER_900,fontSize:O.FONT_SIZE.SM,fontWeight:'700',marginBottom:2}})},514,[34,410,222,276,489,490,503,493,494,104]);
613__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeroCTAButtons=function({primary:e,secondary:n}){return(0,f.jsxs)(t.default,{style:O.container,children:[(0,f.jsx)(S,{config:e,variant:"primary"}),(0,f.jsx)(S,{config:n,variant:"secondary"})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),l=r(d[3]),o=r(d[4]),s=r(d[5]),c=r(d[6]),u=r(d[7]),y=r(d[8]),b=r(d[9]),L=r(d[10]),f=r(d[11]);function S({config:e,variant:l}){const o='primary'===l?O.primaryButton:O.secondaryButton,s='primary'===l?O.primaryButtonText:O.secondaryButtonText,c=(0,f.jsx)(t.default,{style:o,children:(0,f.jsx)(n.default,{style:s,children:e.label})});return'external'===e.kind?(0,f.jsx)(b.ExternalLink,Object.assign({href:e.href},null!=e.target&&{target:e.target},{accessibilityLabel:e.accessibilityLabel??e.label,children:c})):'service'===e.kind?(0,f.jsx)(L.ServiceExternalLink,Object.assign({service:e.service},null!=e.path?{path:e.path}:{},null!=e.target?{target:e.target}:{},{accessibilityLabel:e.accessibilityLabel??e.label,style:o,textStyle:s,children:e.label})):(0,f.jsx)(y.AppLink,Object.assign({to:e.to},null!=e.href&&{href:e.href},{accessibilityLabel:e.accessibilityLabel??e.label,testID:`hero-cta-${e.to.toLowerCase()}`,children:c}))}const O=(0,l.createStyles)({container:{flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.LG,justifyContent:'center'},primaryButton:Object.assign({backgroundColor:o.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:c.SPACING.XXXL,paddingVertical:c.SPACING.LG},s.VIEW_SHADOW_STYLES.HERO_PRIMARY_CTA),primaryButtonText:{color:o.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.XL,fontWeight:'600'},secondaryButton:Object.assign({backgroundColor:o.COLORS.OVERLAY_LIGHT_95,borderRadius:8,paddingHorizontal:c.SPACING.XXXL,paddingVertical:c.SPACING.LG},s.VIEW_SHADOW_STYLES.HERO_SECONDARY_CTA),secondaryButtonText:{color:o.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.XL,fontWeight:'600'}})},515,[34,276,222,489,490,491,493,494,516,519,522,104]);
614__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}
614Object.defineProperty(_e,'__esModule',{value:!0}),_e.isInternalPath=function(t){return t.startsWith('/')&&!t.startsWith('//')},_e.AppLink=function(t){const{children:l,style:c,textStyle:v,onPress:k,accessibilityLabel:x,selected:b,inline:I=!1,testID:L}=t,P=(0,o.useAppLinkTo)(),S=(0,o.useAppNativeStackNavigation)(),_=p(t),j=()=>{k&&k();const t=(0,s.parseProductHref)(_);null==t?P(_):S.dispatch((0,s.openProductStackAction)(t))},A=t=>{y(t)||(t.preventDefault(),j())},C='string'==typeof l?(0,u.jsx)(n.default,{style:v,children:l}):l;if(I)return(0,u.jsx)("a",{href:_,onClick:A,style:h,"aria-label":x,"aria-current":!0===b?'page':void 0,"data-testid":L,children:C});return(0,u.jsx)("a",{href:_,onClick:A,style:f,"aria-label":x,"aria-current":!0===b?'page':void 0,"data-testid":L,children:(0,u.jsx)(e.default,{style:c,children:C})})},_e.shouldHandleAsNativeLinkClick=y,r(d[0]);var e=t(r(d[1])),n=t(r(d[2]));t(r(d[3]));r(d[4]);var l=r(d[5]),s=r(d[6]),o=r(d[7]),c=r(d[8]),u=r(d[9]);const f={color:l.COLORS.INHERIT,display:'contents',textDecoration:'none'},h={color:l.COLORS.INHERIT,textDecoration:'none'};function p(t){return null!=t.href?t.href:(0,c.getScreenPath)(t.to)}function y(t){return t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button}},516,[34,276,222,369,95,490,517,505,518,104]);
615__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"productScreenRouteGetId",{enumerable:!0,get:function(){return t}}),e.openProductStackAction=function(t){return{type:'PUSH',payload:{name:'Product',params:t}}},e.parseProductHref=function(t){if(!t.startsWith('/'))return null;let n;try{n=new URL(t,'https://purpleair.invalid')}catch{return null}const u=n.pathname.split('/').filter(t=>''!==t);if(2!==u.length||'products'!==u[0])return null;const l=u[1];if(null==l||''===l)return null;let c;try{c=decodeURIComponent(l)}catch{return null}if(''===c||c.includes('/'))return null;const o=n.searchParams.get('fitSensor');if(null==o||''===o)return{handle:c};return{handle:c,fitSensor:o}};const t=void 0},517,[]);
616__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SCREEN_PATHS",{enumerable:!0,get:function(){return t}}),e.isLinkableScreenName=function(n){return Object.prototype.hasOwnProperty.call(t,n)},e.getScreenPath=function(o,s){const c=t[o];if(s){const t=Object.values(s);if(t.length>0){const o=`${c}/${t.map(t=>encodeURIComponent(t)).join('/')}`;if(!n(o))throw new Error(`Expected internal path, got: ${o}`);return o}}return c},e.buildCommunityTopicPath=function(t,n){return`/community/t/${encodeURIComponent(t)}/${encodeURIComponent(String(n))}`},e.buildCommunityCategoryPath=function(t,n){return`/community/c/${encodeURIComponent(t)}/${encodeURIComponent(String(n))}`},e.buildSensorManagementDetailPath=function(t){return`/my-sensors/${encodeURIComponent(String(t))}`};const t={Home:'/',Login:'/login',MyAccount:'/my-account',Admin:'/admin',Flasher:'/flasher',Status:'/status',Personal:'/personal',Government:'/government',Education:'/education',Business:'/business',Broadcasters:'/broadcasters',About:'/about',AboutMap:'/real-time-map',Community:'/community',CommunityCategory:'/community/c',CommunityTopic:'/community/t',CommunityNewTopic:'/community/new',API:'/api',Blog:'/blog',BlogArticle:'/blog',Press:'/press',PressDiscovery:'/press-v2',PressDiscoveryDetail:'/press-v2',Science:'/science',Search:'/search',Ecosystem:'/ecosystem',PressAdmin:'/admin/press',PressAdminDetail:'/admin/press',ContentAdmin:'/admin/content',AdminSeo:'/admin/seo',OrderOutreach:'/admin/order-outreach',OrderOutreachNew:'/admin/order-outreach/new',OrderOutreachDetail:'/admin/order-outreach',AdminSubscriptions:'/admin/subscriptions',AdminSubscriptionDetail:'/admin/subscriptions',AdminAuditLogs:'/admin/audit-logs',Contact:'/contact',DataUseCases:'/data-use-cases',ExploringAirQuality:'/exploring-air-quality-across-the-globe',TrustingPurpleAir:'/trusting-purpleair-sensor-evaluations',WhoUsesPurpleAir:'/from-schools-to-satellites-who-uses-purpleair-and-why',PrivacyPolicy:'/policies/privacy-policy',DoNotSell:'/do-not-sell',TermsOfService:'/policies/terms-of-service',RefundPolicy:'/policies/refund-policy',ShippingPolicy:'/policies/shipping-policy',Credits:'/credits',Attribution:'/attribution',License:'/license',Warranty:'/policies/warranty',PaymentMethods:'/pages/payment-methods',Purchasing:'/pages/purchasing',Technology:'/pages/technology',Recall:'/recall',Register:'/register',Store:'/store',StoreCategory:'/store',Product:'/products',Cart:'/cart',SensorManagement:'/my-sensors',SensorUtility:'/utility',ApiTokens:'/api-tokens',FAQ:'/faq',Papers:'/papers',Research:'/research',ResearchQuickGuide:'/research/quick-guide',ProjectsAndIntegrations:'/projects-and-integrations'};function n(t){return t.startsWith('/')}},518,[]);
617__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}
617Object.defineProperty(_e,'__esModule',{value:!0}),_e.isHttpsUrl=u,_e.readExternalUrlLinkProps=f,_e.toOpenableUrl=function(t){if(''===t)return'';return null===f(t)?'':t},_e.ExternalLink=function(t){const{target:n,inline:u=!1,children:f,onPress:h,style:y,textStyle:b,accessibilityLabel:R,accessibilityRole:_="link",testID:j}=t,k=p(t).trim(),I=k.startsWith('mailto:')||k.startsWith('tel:')?'_self':n??'_blank';if(''===k||!x(k))return s.IS_DEVELOPMENT_BUILD&&o.logger.warn(`ExternalLink: invalid URL resolved: "${k}". Check that href is a valid https:// URL, or protocol/address are correct.`),u?(0,c.jsx)(e.default,{style:b,children:f}):(0,c.jsx)(l.default,{style:y,children:'string'==typeof f?(0,c.jsx)(e.default,{style:b,children:f}):f});if(u)return L(Object.assign({url:k,target:I,children:f,textStyle:b,accessibilityRole:_},null!=h?{onPress:h}:void 0,null!=R?{accessibilityLabel:R}:void 0,null!=j?{testID:j}:void 0));return v(Object.assign({url:k,target:I,children:f,style:y,textStyle:b,accessibilityRole:_},null!=h?{onPress:h}:void 0,null!=R?{accessibilityLabel:R}:void 0,null!=j?{testID:j}:void 0))},r(d[0]);t(r(d[1])),t(r(d[2]));r(d[3]);t(r(d[4]));var e=t(r(d[5])),l=t(r(d[6])),n=r(d[7]),s=r(d[8]),o=r(d[9]),c=r(d[10]);function u(t){return t.startsWith('https://')}function f(t){return u(t)?{href:t}:t.startsWith('http://')?{protocol:'http',address:t.slice(7)}:(o.logger.error('[ExternalLink] Unsupported external URL:',t),null)}const h={color:n.COLORS.INHERIT,display:'contents',textDecoration:'none'},y={color:n.COLORS.INHERIT,textDecoration:'none'};function p(t){if('href'in t)return t.href;if('protocol'in t){return`${'http'===t.protocol?'http://':`${t.protocol}:`}${t.address}`}return''}const b=/^(https:\/\/.+|http:\/\/.+|mailto:.+|tel:.+)$/;function x(t){return b.test(t)}function L({url:t,target:l,children:n,onPress:s,textStyle:o,accessibilityLabel:u,accessibilityRole:f,testID:h}){{const p='_blank'===l?'noopener noreferrer':void 0;return(0,c.jsx)("a",{href:t,target:l,rel:p,style:y,"aria-label":u,role:f,"data-testid":h,onClick:s,children:'string'==typeof n?(0,c.jsx)(e.default,{style:o,children:n}):n})}}function v({url:t,target:n,children:s,onPress:o,style:u,textStyle:f,accessibilityLabel:y,accessibilityRole:p,testID:b}){const x='string'==typeof s?(0,c.jsx)(e.default,{style:f,children:s}):s;{const e='_blank'===n?'noopener noreferrer':void 0;return(0,c.jsx)("a",{href:t,target:n,rel:e,style:h,"aria-label":y,role:p,"data-testid":b,onClick:o,children:(0,c.jsx)(l.default,{style:u,children:x})})}}},519,[34,520,521,95,369,222,276,490,508,469,104]);
618__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=class{static alert(){}}},520,[]);
619__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var t=e(r(d[0])),n=e(r(d[1])),l=n.default?window.location.href:'';var o=(e,t)=>{if(n.default){var l=new URL(e,window.location).toString();0===l.indexOf('tel:')?window.location=l:window.open(l,t,'noopener')}},s=new class{constructor(){this._eventCallbacks={}}_dispatchEvent(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),l=1;l<t;l++)n[l-1]=arguments[l];var o=this._eventCallbacks[e];null!=o&&Array.isArray(o)&&o.map(e=>{e(...n)})}addEventListener(e,t){var n=this;return n._eventCallbacks[e]||(n._eventCallbacks[e]=[t]),n._eventCallbacks[e].push(t),{remove(){var l=n._eventCallbacks[e].filter(e=>e.toString()!==t.toString());n._eventCallbacks[e]=l}}}removeEventListener(e,t){console.error("Linking.removeEventListener('"+e+"', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `Linking.addEventListener`.");var n=this._eventCallbacks[e].filter(e=>e.toString()!==t.toString());this._eventCallbacks[e]=n}canOpenURL(){return Promise.resolve(!0)}getInitialURL(){return Promise.resolve(l)}openURL(e,t){1===arguments.length&&(t='_blank');try{return o(e,t),this._dispatchEvent('onOpen',e),Promise.resolve()}catch(e){return Promise.reject(e)}}_validateURL(e){(0,t.default)('string'==typeof e,'Invalid URL: should be a string. Was: '+e),(0,t.default)(e,'Invalid URL: cannot be empty')}}},521,[24,39]);
620__d(function(g,r,i,a,m,_e,d){"use strict";
620function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ServiceExternalLink=function({service:e,path:u="",destinationName:o,target:b,inline:y,children:f,onPress:j,style:x,textStyle:p,accessibilityLabel:L,accessibilityRole:O="link",testID:h}){const k=(0,n.useServiceLinkOpener)(e,u,o),P=''===k.url?null:(0,s.readExternalUrlLinkProps)(k.url);if(null!==P){const e=Object.assign({},null!=b?{target:b}:{},null!=y?{inline:y}:{},null!=j?{onPress:j}:{},null!=x?{style:x}:{},null!=p?{textStyle:p}:{},null!=L?{accessibilityLabel:L}:{},'link'!==O?{accessibilityRole:O}:{},null!=h?{testID:h}:{});return(0,c.jsx)(s.ExternalLink,Object.assign({},P,e,{children:f}))}const _=Object.assign({accessibilityRole:O},null!=L?{accessibilityLabel:L}:{});if(!0===y)return(0,c.jsx)(t.default,Object.assign({},_,{onPress:()=>{j?.(),k.open()},style:p,testID:h,children:f}));const v='string'==typeof f?(0,c.jsx)(t.default,{style:p,children:f}):f;return(0,c.jsx)(l.default,Object.assign({},_,{onPress:()=>{j?.(),k.open()},style:x,testID:h,children:v}))},r(d[0]);var l=e(r(d[1])),t=e(r(d[2])),n=r(d[3]),s=r(d[4]),c=r(d[5])},522,[34,369,222,523,519,104]);
621__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useServiceLinkOpener=function(f,k="",S){const y=(0,u.useServiceLinkStates)(),O=(0,u.useReloadClientConfig)(),L=(0,s.useToast)(),T=y[f],b=S??(0,l.serviceLinkName)(f),N=(0,o.readServiceLinkOpenSimulation)(f),P=(0,t.useMemo)(()=>null==N&&'ready'===T.status?(0,n.toOpenableUrl)((0,l.appendServicePath)(T.url,k)):'',[k,T.status,T.url,N]),_=(0,t.useRef)(()=>{}),R=(0,t.useRef)(!1),h=(0,t.useCallback)(()=>{if(R.current)return;R.current=!0;const t=null!=N?'':P,s={toastId:null},u=''===t?setTimeout(()=>{s.toastId=L.info(`Opening ${b}\u2026`,{description:'Fetching the latest link.',duration:Number.POSITIVE_INFINITY})},v):null,S={label:'Try again',onPress:()=>{_.current()},dismissOnPress:!0};(async()=>{try{const v=await(0,p.openServiceLink)({readyUrl:t,reload:async()=>{const t=async()=>{const t=await O();return(0,n.toOpenableUrl)((0,l.appendServicePath)(t[f],k))};return null!=N?(0,o.simulateServiceLinkOpen)(N,t):t()},openResolved:c.openExternalLink,timeoutMillis:I});null!=u&&clearTimeout(u);const y=(0,p.serviceLinkFailureMessage)(v,b);if(null==y)return void(null!=s.toastId&&L.dismiss(s.toastId));if(null!=s.toastId)return void L.update(s.toastId,{kind:'error',message:y.message,description:y.description,action:S,duration:Number.POSITIVE_INFINITY});L.error(y.message,{description:y.description,action:S})}finally{R.current=!1}})()},[P,N,f,k,b,O,L]);return(0,t.useEffect)(()=>{_.current=h},[h]),{status:T.status,url:P,isReady:''!==P,open:h}};var t=r(d[0]),n=r(d[1]),s=r(d[2]),u=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),p=r(d[7]);const I=6e3,v=400},523,[34,519,496,524,529,530,532,533]);
622__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ClientConfigProvider=function({children:c}){const[f,v]=(0,n.useState)(()=>b(h())),[E,p]=(0,n.useState)({kind:'loading'}),[P,_]=(0,n.useState)(!1),F=(0,n.useRef)(!0),T=(0,n.useRef)(h()),j=(0,n.useRef)(k),K=(0,n.useRef)(null),z=(0,n.useMemo)(()=>(0,C.deriveServiceLinkStates)(f.serviceLinks,P,u.IS_DEVELOPMENT_BUILD?(0,l.readServiceLinkDevOverrides)():{}),[f,P]),w=(0,n.useCallback)(()=>{const n=K.current;if(null!=n)return n;const u=(async()=>{try{const n=await(0,t.fetchClientConfig)();o.featureFlagService.initializeFrom(n.environment,n.features);const u=b(n);return F.current&&(j.current=k,T.current=n,_(!0),v(u),p(t=>O(t,n))),(0,l.applyServiceLinkOverridesToLinks)(u.serviceLinks)}catch(n){throw o.featureFlagService.initializeFailure(n),F.current&&p(n=>'ready'===n.kind?n:{kind:'unavailable'}),n}finally{K.current=null}})();return K.current=u,u},[]);return(0,n.useEffect)(()=>{F.current=!0;let n=null;const u=async()=>{try{const s=await(0,t.fetchClientConfig)();F.current&&(o.featureFlagService.initializeFrom(s.environment,s.features),j.current=k,T.current=s,_(!0),v(b(s)),p(n=>O(n,s)),I(s)&&(n=setTimeout(()=>{u()},L)))}catch(t){const c=j.current;s.logger.warn('Failed to fetch client config, retrying:',t),F.current&&(o.featureFlagService.initializeFailure(t),p(n=>'ready'===n.kind?n:{kind:'unavailable'}),n=setTimeout(()=>{u()},c),j.current=Math.min(2*c,S))}};return u(),()=>{F.current=!1,null!==n&&clearTimeout(n)}},[]),(0,n.useEffect)(()=>
622{if(u.IS_DEVELOPMENT_BUILD)return(0,l.subscribeClientConfigDevOverrides)(()=>{v(b(T.current))})},[]),(0,y.jsx)(x.Provider,{value:f,children:(0,y.jsx)(D.Provider,{value:E,children:(0,y.jsx)(R.Provider,{value:w,children:(0,y.jsx)(M.Provider,{value:z,children:c})})})})},e.useClientConfig=T,e.useLoginReturnPolicy=function(){return(0,n.useContext)(D)},e.useServiceLinkStates=function(){return(0,n.useContext)(M)},e.useReloadClientConfig=function(){return(0,n.useContext)(R)},e.useMapClientConfig=function(){const t=T();return(0,n.useMemo)(()=>(0,f.toMapClientConfig)(t.maptilerKey),[t.maptilerKey])};var n=r(d[0]),t=r(d[1]),u=r(d[2]),o=r(d[3]),s=r(d[4]),c=r(d[5]),l=r(d[6]),f=r(d[7]),v=r(d[8]),C=r(d[9]),y=r(d[10]);const L=2e3,k=2e3,S=3e4;function E(n){const t=n.trustedLoginReturnOrigins;return Array.isArray(t)?t.filter(n=>'string'==typeof n):[]}function O(n,t){const u=E(t);return'ready'===n.kind&&n.trustedOrigins.length===u.length&&n.trustedOrigins.every((n,t)=>n===u[t])?n:{kind:'ready',trustedOrigins:u}}function p(n){return(0,f.readyString)(n)??{status:'loading'}}function h(){return{maptilerKey:p(v.MAPTILER_KEY),googleClientId:p(v.GOOGLE_CLIENT_ID),backendVersion:'dev',environment:'unknown',features:[],trustedLoginReturnOrigins:[],serviceLinks:(0,C.normalizeServiceLinks)()}}function I(n){return'loading'===n.maptilerKey.status||'loading'===n.googleClientId.status}function P(n){if(!(0,c.isElectron)())return n;const t=h();return Object.assign({},n,{googleClientId:_(n.googleClientId,t.googleClientId),maptilerKey:_(n.maptilerKey,t.maptilerKey)})}function _(n,t){return'ready'===n.status?n:'ready'===t.status?t:n}const x=(0,n.createContext)(h()),D=(0,n.createContext)({kind:'loading'}),M=(0,n.createContext)((0,C.deriveServiceLinkStates)((0,C.normalizeServiceLinks)(),!1)),R=(0,n.createContext)(()=>Promise.reject(new Error('useReloadClientConfig used outside a ClientConfigProvider')));function b(n){const t=F(P(n));return u.IS_DEVELOPMENT_BUILD?(0,l.applyClientConfigDevOverrides)(t):t}function F(n){return Object.assign({},n,{serviceLinks:(0,C.normalizeServiceLinks)(n.serviceLinks)})}function T(){return(0,n.useContext)(x)}},524,[34,525,508,526,469,528,529,531,465,530,104]);
623__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fetchClientConfig=async function(){return n.config.getClientConfig()};var n=r(d[0])},525,[471]);
624__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FeatureFlagService",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"featureFlagService",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]);const s=new Set(t.FEATURE_FLAGS),o=new Set(t.ENVIRONMENTS);function u(t){return s.has(t)}function l(t){if(void 0===t)return[];const s=[];for(const o of t)u(o)?s.push(o):n.logger.warn('[FeatureFlagService] Ignoring unknown feature flag from backend:',o);return s}function f(t){return o.has(t)}class h{features=[];environment='unknown';loaded=!1;listeners=new Set;initializeFrom(t,s){var o;this.loaded||(this.features=l(s),this.environment=f(o=t)?o:(n.logger.warn('[FeatureFlagService] Ignoring unknown environment from backend:',o),'unknown'),this.loaded=!0,this.notifyListeners())}initializeFailure(t){this.loaded||(n.logger.error('[FeatureFlagService] Failed to fetch features:',t),this.features=[],this.environment='unknown',this.loaded=!0,this.notifyListeners())}isEnabled(t){return this.features.includes(t)}hasAllFeatures(t){return t.every(t=>this.features.includes(t))}hasAnyFeature(t){return t.some(t=>this.features.includes(t))}getFeatures(){return[...this.features]}getEnvironment(){return this.environment}isLoaded(){return this.loaded}addListener(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notifyListeners(){const t=this.getFeatures();this.listeners.forEach(n=>{n(t)})}reset(){this.features=[],this.environment='unknown',this.loaded=!1,this.listeners.clear()}}const c=new h},526,[527,469]);
625__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FEATURE_FLAGS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ENVIRONMENTS",{enumerable:!0,get:function(){return n}});const t=['CORE','MAP','SENSORS','BETA_FEATURES','DEBUG','LOCAL_AUTH','SUBSCRIPTIONS_ADMIN','SUBSCRIPTIONS_LIFECYCLE','SUBSCRIPTIONS_STOREFRONT'],n=['development','staging','uat','production','test']},527,[]);
626__d(function(g,r,i,a,m,e,d){"use strict";let n;
626Object.defineProperty(e,'__esModule',{value:!0}),e.isElectron=function(){if(void 0!==n)return n;return n='undefined'!=typeof window&&null!=window.electronBridge,n},r(d[0])},528,[95]);
627__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.applyClientConfigDevOverrides=function(n){const s=l();return Object.assign({},n,null!=s.map?{maptilerKey:v(s.map)}:{},null!=s.google?{googleClientId:v(s.google)}:{})},e.readServiceLinkDevOverrides=f,e.applyServiceLinkOverridesToLinks=function(n){const t=f();if(0===Object.keys(t).length)return n;const o=Object.assign({},n);for(const n of s.ALL_SERVICE_LINK_KEYS)null!=t[n]&&(o[n]='');return o},e.setClientConfigDevOverride=function(n,s){u(Object.assign({},l(),{[n]:s}))},e.clearClientConfigDevOverrides=function(){u({})},e.clearClientConfigDevOverride=function(n){const s=l();u(Object.assign({},'google'!==n&&null!=s.google?{google:s.google}:{},'map'!==n&&null!=s.map?{map:s.map}:{},null!=s.serviceLinks?{serviceLinks:s.serviceLinks}:{},null!=s.serviceLinkOpen?{serviceLinkOpen:s.serviceLinkOpen}:{}))},e.setServiceLinkDevOverride=function(n,s){const t=Object.assign({},f());t[n]=s,L(t)},e.clearServiceLinkDevOverride=function(n){const t=f(),o={};for(const c of s.ALL_SERVICE_LINK_KEYS){const s=t[c];c!==n&&null!=s&&(o[c]=s)}L(o)},e.setAllServiceLinksDevOverride=function(n,s){const t={};for(const o of n)t[o]=s;L(t)},e.clearServiceLinkDevOverrides=function(){L({})},e.readServiceLinkOpenSimulations=p,e.readServiceLinkOpenSimulation=function(n){return p()[n]},e.setServiceLinkOpenSimulation=function(n,s){const t=Object.assign({},p());t[n]=s,O(t)},e.clearServiceLinkOpenSimulation=function(n){const t=p(),o={};for(const c of s.ALL_SERVICE_LINK_KEYS){const s=t[c];c!==n&&null!=s&&(o[c]=s)}O(o)},e.setAllServiceLinkOpenSimulations=function(n,s){const t={};for(const o of n)t[o]=s;O(t)},e.clearServiceLinkOpenSimulations=function(){O({})},e.simulateServiceLinkOpen=async function(n,s){switch(n){case'unavailable':return'';case'offline':throw new Error('[dev] simulated offline failure');case'server':throw Object.assign(new Error('[dev] simulated server error'),{isAxiosError:!0,response:{status:500}});case'timeout':return new Promise(()=>{});
627case'slow':return await(o=t,new Promise(n=>{setTimeout(n,o)})),s()}var o},e.subscribeClientConfigDevOverrides=function(s){if(!n.IS_DEVELOPMENT_BUILD)return()=>{};return c.add(s),()=>{c.delete(s)}};var n=r(d[0]),s=r(d[1]);const t=2500;let o={};const c=new Set;function l(){return n.IS_DEVELOPMENT_BUILD?o:{}}function u(n){o=n,c.forEach(n=>{n()})}function v(n){return{loading:{status:'loading'},missing:{status:'missing'}}[n]}function f(){return l().serviceLinks??{}}function L(n){const s=l(),t=Object.keys(n).length>0;u(Object.assign({},null!=s.google?{google:s.google}:{},null!=s.map?{map:s.map}:{},t?{serviceLinks:n}:{},null!=s.serviceLinkOpen?{serviceLinkOpen:s.serviceLinkOpen}:{}))}function O(n){const s=l(),t=Object.keys(n).length>0;u(Object.assign({},null!=s.google?{google:s.google}:{},null!=s.map?{map:s.map}:{},null!=s.serviceLinks?{serviceLinks:s.serviceLinks}:{},t?{serviceLinkOpen:n}:{}))}function p(){return l().serviceLinkOpen??{}}},529,[508,530]);
628__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ALL_SERVICE_LINK_KEYS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"SERVICE_LINK_NAMES",{enumerable:!0,get:function(){return n}}),e.serviceLinkName=function(t){return n[t]},Object.defineProperty(e,"EMPTY_SERVICE_LINKS",{enumerable:!0,get:function(){return l}}),e.deriveServiceLinkStates=function(t,n,l={}){const o=o=>{const s=l[o];if('loading'===s||null==s&&!n)return{status:'loading',url:''};if('missing'===s)return{status:'missing',url:''};const u=t[o];return''!==u?{status:'ready',url:u}:{status:'missing',url:''}};return{mapBaseUrl:o('mapBaseUrl'),dataApiDocsUrl:o('dataApiDocsUrl'),developerPortalUrl:o('developerPortalUrl')}},e.normalizeServiceLinks=function(t=void 0){return{mapBaseUrl:t?.mapBaseUrl?.trim()??'',dataApiDocsUrl:t?.dataApiDocsUrl?.trim()??'',developerPortalUrl:t?.developerPortalUrl?.trim()??''}},e.appendServicePath=function(t,n){if(''===t)return'';if(''===n)return t;if(n.startsWith('?'))return`${t}${n}`;const l=t.endsWith('/')?t.slice(0,-1):t,o=n.startsWith('/')?n:`/${n}`;return`${l}${o}`};const t=['mapBaseUrl','dataApiDocsUrl','developerPortalUrl'],n={mapBaseUrl:'the Map',dataApiDocsUrl:'the API Documentation',developerPortalUrl:'the Developer Portal'};const l={mapBaseUrl:'',dataApiDocsUrl:'',developerPortalUrl:''}},530,[]);
629__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return''!==t.trim()}function n(n){const u=n.trim();return t(u)?u:null}function u(t){return'ready'===t.status&&null!==n(t.value)}function o(t){const n=t.at(0);return void 0===n?t:n.toUpperCase()+t.slice(1)}Object.defineProperty(e,'__esModule',{value:!0}),e.toNonEmptyString=n,e.readyString=function(t){const u=n(t);return null===u?null:{status:'ready',value:u}},e.isReadyStringConfigValue=u,e.configFeatureMessage=function(t,n){return s[t](n)},e.toMapClientConfig=function(t){if(u(t))return{status:'ready',maptilerKey:t.value};const n='missing';return{status:t.status===n?n:'loading',maptilerKey:t}};const s={loading:t=>`Loading ${t}...`,missing:t=>`${o(t)} didn't load. Refresh the page to try again.`}},531,[]);
630__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.openExternalLink=function(e){return null!=window.open(e,'_blank','noopener,noreferrer')};e(r(d[0])),e(r(d[1]));r(d[2]);r(d[3])},532,[520,521,95,469]);
631__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.openServiceLink=async function(l){if(''!==l.readyUrl)return l.openResolved(l.readyUrl)?'opened':'blocked';let s=()=>{};const u=new Promise(n=>{s=o(()=>{n(t)},l.timeoutMillis,l.setTimer,l.clearTimer)});try{const n=await Promise.race([l.reload(),u]);return n===t?'timeout':''===n?'unavailable':l.openResolved(n)?'opened':'blocked'}catch(t){return(0,n.classifyConfigLoadError)(t)}finally{s()}},e.serviceLinkFailureMessage=function(n,t){const o={opened:null,unavailable:"We don't have the latest link for it. Please try again later.",offline:'You appear to be offline. Check your internet connection and try again.',server:"We couldn't reach our servers. Please try again in a moment.",timeout:'This is taking longer than expected. Check your connection and try again.',unexpected:'Please try again.',blocked:'Your browser may have blocked the pop-up. Allow pop-ups for this site, or try again.'}[n];if(null===o)return null;return{message:`Couldn't open ${t}.`,description:o}};var n=r(d[0]);const t=Symbol('service-link-open-timeout');function o(n,t,o,l){if(null!=o&&null!=l){const s=o(n,t);return()=>{l(s)}}const s=setTimeout(n,t);return()=>{clearTimeout(s)}}},533,[534]);
632__d(function(g,r,i,a,m,_e,d){"use strict";
632Object.defineProperty(_e,'__esModule',{value:!0}),_e.classifyConfigLoadError=function(e){if(o.default.isAxiosError(e)){const n=e.response?.status;return null==n?'offline':n>=500||408===n||429===n?'server':'unexpected'}return'offline'};var e,n=r(d[0]),o=(e=n)&&e.__esModule?e:{default:e}},534,[412]);
633__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FeatureUnavailable=function({featureName:e,reason:s,alternative:c,compact:S=!1,icon:N}){if(S)return(0,u.jsxs)(t.default,{style:f.compactContainer,children:[(0,u.jsx)(t.default,{style:f.compactIcon,children:N??(0,u.jsx)(n.default,{style:f.iconText,children:"!"})}),(0,u.jsxs)(t.default,{style:f.compactContent,children:[(0,u.jsxs)(n.default,{style:f.compactTitle,children:[e," unavailable"]}),(0,u.jsx)(n.default,{style:f.compactReason,children:s})]}),c&&(0,u.jsx)(o.default,{style:f.compactButton,onPress:c.onPress,children:(0,u.jsx)(n.default,{style:f.compactButtonText,children:c.label})})]});return(0,u.jsxs)(t.default,{style:f.container,children:[(0,u.jsx)(t.default,{style:f.iconContainer,children:N??(0,u.jsx)(n.default,{style:f.largeIconText,children:"!"})}),(0,u.jsx)(n.default,{style:f.title,children:e}),(0,u.jsx)(n.default,{style:f.subtitle,children:"Not available on this device"}),(0,u.jsxs)(t.default,{style:f.reasonContainer,children:[(0,u.jsx)(n.default,{style:f.reasonLabel,children:"Why?"}),(0,u.jsx)(n.default,{style:f.reasonText,children:s})]}),c&&(0,u.jsxs)(t.default,{style:f.alternativeContainer,children:[(0,u.jsx)(n.default,{style:f.alternativeLabel,children:"Alternative"}),(0,u.jsx)(n.default,{style:f.alternativeDescription,children:c.description}),(0,u.jsx)(o.default,{style:f.alternativeButton,onPress:c.onPress,children:(0,u.jsx)(n.default,{style:f.alternativeButtonText,children:c.label})})]}),(0,u.jsxs)(n.default,{style:f.platformInfo,children:["Platform: ","web"," ",l.default.Version]})]})},Object.defineProperty(_e,"UnavailableFeatures",{enumerable:!0,get:function(){return C}}),r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),S=r(d[7]),N=r(d[8]),u=r(d[9]);const C={bluetooth:e=>({featureName:'Bluetooth Sensor Discovery',reason:'Web Bluetooth is not supported in this browser. Use Chrome, Edge, or Opera.',alternative:{label:'Use WiFi Instead',description:'Connect to your sensor via WiFi on the same network.',onPress:e}}),usbSerial:e=>({featureName:'USB Firmware Flashing',reason:'USB serial is not available on this device.',alternative:{label:'Use OTA Update',description:'Update firmware wirelessly via WiFi (recommended).',onPress:e}}),camera:e=>({featureName:'QR Code Scanning',reason:'Camera access is not available or was denied.',alternative:{label:'Enter Manually',description:'Type the device ID or configuration manually.',onPress:e}}),watch:()=>({featureName:'Wear OS',reason:'Smartwatch features are only available on iOS and Android.'})},f=(0,s.createStyles)({container:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BG,borderRadius:12,margin:S.SPACING.LG,padding:S.SPACING.XL},iconContainer:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BORDER,borderRadius:32,height:64,justifyContent:'center',marginBottom:S.SPACING.LG,width:64},largeIconText:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:N.FONT_SIZE.DISPLAY_MD,fontWeight:'bold'},reasonContainer:{backgroundColor:c.COLORS.BG_SURFACE,borderRadius:8,marginBottom:S.SPACING.LG,padding:S.SPACING.MD,width:'100%'},subtitle:{color:c.COLORS.WARNING_BANNER_LINK,fontSize:N.FONT_SIZE.MD,marginBottom:S.SPACING.LG},title:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:N.FONT_SIZE.XXL,fontWeight:'600',marginBottom:S.SPACING.XS},reasonLabel:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:N.FONT_SIZE.XS,fontWeight:'600',marginBottom:S.SPACING.XS},reasonText:{color:c.COLORS.WARNING_AMBER,fontSize:N.FONT_SIZE.MD,lineHeight:20},alternativeContainer:{backgroundColor:c.COLORS.BG_GREEN_TINT,borderRadius:8,marginBottom:S.SPACING.LG,padding:S.SPACING.MD,width:'100%'},alternativeLabel:{color:c.COLORS.SUCCESS_DARK,fontSize:N.FONT_SIZE.XS,fontWeight:'600',marginBottom:S.SPACING.XS},alternativeDescription:{color:c.COLORS.SUCCESS_DARK,fontSize:N.FONT_SIZE.MD,lineHeight:20,marginBottom:S.SPACING.MD},alternativeButton:{alignItems:'center',backgroundColor:c.COLORS.SUCCESS,borderRadius:8,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.MD},alternativeButtonText:{color:c.COLORS.TEXT_INVERSE,fontSize:N.FONT_SIZE.LG,fontWeight:'600'},platformInfo:{color:c.COLORS.WARNING_BANNER_LINK,fontSize:N.FONT_SIZE.XS,marginTop:S.SPACING.SM},compactContainer:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BG,borderRadius:8,flexDirection:'row',marginHorizontal:S.SPACING.LG,marginVertical:S.SPACING.SM,padding:S.SPACING.MD},compactIcon:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BORDER,borderRadius:16,height:32,justifyContent:'center',marginRight:S.SPACING.MD,width:32},iconText:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:N.FONT_SIZE.LG,fontWeight:'bold'},compactContent:{flex:1},compactTitle:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:N.FONT_SIZE.MD,fontWeight:'600'},compactReason:{color:c.COLORS.WARNING_BANNER_LINK,fontSize:N.FONT_SIZE.XS},compactButton:{backgroundColor:c.COLORS.SUCCESS,borderRadius:6,marginLeft:S.SPACING.SM,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},compactButtonText:{color:c.COLORS.TEXT_INVERSE,fontSize:N.FONT_SIZE.XS,fontWeight:'600'}})},535,[34,276,222,488,95,489,490,493,494,104]);
634__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}
634Object.defineProperty(_e,'__esModule',{value:!0}),_e.DemoModeBanner=function({onExitDemo:t,dismissible:l=!1,onDismiss:s}){return(0,u.jsxs)(e.default,{style:O.container,children:[(0,u.jsxs)(e.default,{style:O.content,children:[(0,u.jsx)(e.default,{style:O.badge,children:(0,u.jsx)(n.default,{style:O.badgeText,children:"DEMO"})}),(0,u.jsxs)(e.default,{style:O.textContainer,children:[(0,u.jsx)(n.default,{style:O.title,children:"Demo Mode Active"}),(0,u.jsx)(n.default,{style:O.subtitle,children:"Displaying simulated sensor data"})]})]}),(0,u.jsxs)(e.default,{style:O.actions,children:[t&&(0,u.jsx)(o.default,{style:O.exitButton,onPress:t,children:(0,u.jsx)(n.default,{style:O.exitButtonText,children:"Connect Real Sensors"})}),l&&s&&(0,u.jsx)(o.default,{style:O.dismissButton,onPress:s,children:(0,u.jsx)(n.default,{style:O.dismissButtonText,children:"Dismiss"})})]})]})},_e.DemoModeIndicator=function(){return(0,u.jsx)(e.default,{style:O.indicator,children:(0,u.jsx)(n.default,{style:O.indicatorText,children:"DEMO"})})},r(d[0]);var e=t(r(d[1])),n=t(r(d[2])),o=t(r(d[3])),l=r(d[4]),s=r(d[5]),c=r(d[6]),S=r(d[7]),u=r(d[8]);const O=(0,l.createStyles)({badge:{backgroundColor:s.COLORS.BG_SURFACE,borderRadius:4,marginRight:c.SPACING.MD,paddingHorizontal:c.SPACING.SM,paddingVertical:c.SPACING.XS},badgeText:{color:s.COLORS.INDIGO_500,fontSize:S.FONT_SIZE.XS,fontWeight:'bold'},container:{backgroundColor:s.COLORS.INDIGO_500,paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.MD},content:{alignItems:'center',flexDirection:'row'},textContainer:{flex:1},subtitle:{color:s.COLORS.OVERLAY_LIGHT_80,fontSize:S.FONT_SIZE.XS,marginTop:c.SPACING.MICRO},title:{color:s.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'},actions:{flexDirection:'row',gap:c.SPACING.SM,marginTop:c.SPACING.MD},exitButton:{backgroundColor:s.COLORS.BG_SURFACE,borderRadius:6,flex:1,paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.SM},exitButtonText:{color:s.COLORS.INDIGO_500,fontSize:S.FONT_SIZE.MD,fontWeight:'600',textAlign:'center'},dismissButton:{backgroundColor:s.COLORS.OVERLAY_LIGHT_20,borderRadius:6,paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.SM},dismissButtonText:{color:s.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},indicator:{backgroundColor:s.COLORS.INDIGO_500,borderRadius:4,paddingHorizontal:c.SPACING.SM,paddingVertical:c.SPACING.MICRO},indicatorText:{color:s.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.MICRO,fontWeight:'bold'}})},536,[34,276,222,488,489,490,493,494,104]);
635__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ImageCredits=function({variant:e="full"}){const o=(0,s.getAllImageCredits)();if('compact'===e)return(0,L.jsxs)(t.default,{style:O.compactContainer,children:[(0,L.jsx)(n.default,{style:O.compactTitle,children:"Photo Credits"}),(0,L.jsx)(n.default,{style:O.compactText,children:"Images credited to photographers, agencies, and other sources."}),(0,L.jsx)(p.AppLink,{to:"Credits",style:O.viewAllButton,children:(0,L.jsx)(n.default,{style:O.viewAllText,children:"View all credits"})})]});return(0,L.jsxs)(t.default,{style:O.container,children:[(0,L.jsx)(n.default,{style:O.title,children:"Image Credits"}),(0,L.jsx)(n.default,{style:O.intro,children:"The following images are used throughout this website. Credits go to photographers, public agencies, PurpleAir, and other sources. Unsplash photos are used under the Unsplash License, which does not require attribution; those artists are credited here as a courtesy."}),(0,L.jsx)(t.default,{style:O.creditsList,children:o.map(e=>(0,L.jsx)(f,{credit:e},e.id))}),(0,L.jsx)(t.default,{style:O.unsplashNote,children:(0,L.jsxs)(n.default,{style:O.unsplashNoteText,children:["Unsplash photos are used under the",' ',(0,L.jsx)(S.ExternalLink,{href:"https://unsplash.com/license",textStyle:O.licenseLink,inline:!0,children:"Unsplash License"}),". Other images follow their respective source terms."]})})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),s=r(d[5]),c=r(d[6]),h=r(d[7]),u=r(d[8]),p=r(d[9]),S=r(d[10]),L=r(d[11]);function f({credit:e}){const l=''!==e.thumbnailUrl?(0,L.jsx)(o.default,{source:{uri:e.thumbnailUrl},style:O.thumbnail,resizeMode:"cover",accessibilityLabel:e.description}
635):null,s=''!==e.photographerUrl?(0,L.jsx)(S.ExternalLink,{href:e.photographerUrl,accessibilityLabel:`Photo by ${e.photographerName} on Unsplash`,children:(0,L.jsxs)(n.default,{style:O.attribution,children:["Photo by",' ',(0,L.jsx)(n.default,{style:O.photographerLink,children:e.photographerName}),' on ',(0,L.jsx)(n.default,{style:O.unsplashLink,children:"Unsplash"})]})}):(0,L.jsx)(n.default,{style:O.attribution,children:e.photographerName});return(0,L.jsx)(t.default,{style:O.creditItem,children:(0,L.jsxs)(t.default,{style:O.creditContent,children:[null!=l&&''!==e.unsplashUrl?(0,L.jsx)(S.ExternalLink,{href:e.unsplashUrl,accessibilityLabel:e.description,children:l}):l??null,(0,L.jsxs)(t.default,{style:O.creditText,children:[(0,L.jsx)(p.AppLink,{to:"Home",href:e.linkPath,accessibilityLabel:`Go to ${e.usedIn}`,children:(0,L.jsx)(n.default,{style:O.usedInLink,children:e.usedIn})}),e.alsoUsedIn?.map(e=>(0,L.jsx)(p.AppLink,{to:"Home",href:e.linkPath,accessibilityLabel:`Go to ${e.usedIn}`,children:(0,L.jsx)(n.default,{style:O.usedInLink,children:e.usedIn})},e.linkPath)),(0,L.jsx)(n.default,{style:O.description,children:e.description}),s]})]})})}const O=(0,l.createStyles)({container:{alignSelf:'center',maxWidth:800,padding:h.SPACING.XXL,width:'100%'},intro:{color:c.COLORS.TEXT_SECONDARY,fontSize:u.FONT_SIZE.LG,lineHeight:26,marginBottom:h.SPACING.XXXL,textAlign:'center'},creditsList:{gap:h.SPACING.XXL},title:{color:c.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:h.SPACING.LG,textAlign:'center'},creditItem:{backgroundColor:c.COLORS.BG_LIGHT,borderColor:c.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:h.SPACING.LG},creditContent:{flexDirection:'row',gap:h.SPACING.LG},thumbnail:{backgroundColor:c.COLORS.BORDER,borderRadius:8,height:80,width:120},creditText:{flex:1,justifyContent:'center'},usedInLink:{color:c.COLORS.BRAND_PRIMARY,fontSize:u.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,marginBottom:h.SPACING.SM,textDecorationLine:'underline',textTransform:'uppercase'},description:{color:c.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.LG,fontWeight:'600',marginBottom:h.SPACING.SM},attribution:{color:c.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.MD},photographerLink:{color:c.COLORS.BRAND_PRIMARY,fontWeight:'600'},unsplashLink:{color:c.COLORS.TEXT_SOFT,textDecorationLine:'underline'},unsplashNote:{alignItems:'center',borderTopColor:c.COLORS.BORDER,borderTopWidth:1,marginTop:h.SPACING.XXXL,paddingTop:h.SPACING.XXL},unsplashNoteText:{color:c.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.MD},licenseLink:{color:c.COLORS.BRAND_PRIMARY,textDecorationLine:'underline'},compactContainer:{alignItems:'center',padding:h.SPACING.LG},compactTitle:{color:c.COLORS.TEXT_GHOST,fontSize:u.FONT_SIZE.MD,fontWeight:'600',marginBottom:h.SPACING.XS},compactText:{color:c.COLORS.TEXT_CAPTION,fontSize:u.FONT_SIZE.SM},viewAllButton:{marginTop:h.SPACING.SM},viewAllText:{color:c.COLORS.ACTION_PRIMARY,fontSize:u.FONT_SIZE.XS,textDecorationLine:'underline'}})},537,[34,276,222,328,489,538,490,493,494,516,519,104]);
636__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"imageCredits",{enumerable:!0,get:function(){return o}}),e.getImageCredit=function(s){return o.find(o=>o.id===s)},e.getAllImageCredits=function(){return o};const o=[{id:'about-utah-rocks',localPath:'/assets/images/hero/about-utah-rocks.jpg',unsplashUrl:'https://unsplash.com/photos/fY5HfuqGU5U',photographerName:'Vincent Yuan',photographerUsername:'vincentyuan87',photographerUrl:'https://unsplash.com/@vincentyuan87',description:'Majestic rock formations in Bryce Canyon National Park, Utah',usedIn:'About Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1743823144992-49174051002a?w=240&h=160&fit=crop&q=60',linkPath:'/about'},{id:'map-earth-space',localPath:'/assets/images/hero/map-earth-space.jpg',unsplashUrl:'https://unsplash.com/photos/Q1p7bh3SHj8',photographerName:'NASA',photographerUsername:'nasa',photographerUrl:'https://unsplash.com/@nasa',description:'Earth from space at night showing city lights',usedIn:'About Map Screen - Hero Backgroun
636d',thumbnailUrl:'https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=240&h=160&fit=crop&q=60',linkPath:'/real-time-map',alsoUsedIn:[{usedIn:'Who Uses PurpleAir Screen - Hero Background',linkPath:'/from-schools-to-satellites-who-uses-purpleair-and-why'}]},{id:'business-skyline',localPath:'/assets/images/hero/business-skyline.jpg',unsplashUrl:'https://unsplash.com/photos/c627a92ad1ab',photographerName:'Sean Pollock',photographerUsername:'seanpollock',photographerUrl:'https://unsplash.com/@seanpollock',description:'Low angle view of modern glass skyscrapers',usedIn:'Business Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=240&h=160&fit=crop&q=60',linkPath:'/business'},{id:'education-campus',localPath:'/assets/images/hero/education-campus.jpg',unsplashUrl:'https://unsplash.com/photos/wI-i-ye4Ofk',photographerName:'Zoshua Colah',photographerUsername:'zoshuacolah',photographerUrl:'https://unsplash.com/@zoshuacolah',description:'Suzzallo Library at University of Washington',usedIn:'Education Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1741528802984-38d14e5c66a7?w=240&h=160&fit=crop&q=60',linkPath:'/education'},{id:'government-capitol',localPath:'/assets/images/hero/government-capitol.jpg',unsplashUrl:'https://unsplash.com/photos/a00729c9e1f9',photographerName:'Andy Feliciotti',photographerUsername:'someguy',photographerUrl:'https://unsplash.com/@someguy',description:'United States Capitol building, Washington D.C.',usedIn:'Government Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1594581979864-36977b15d0dc?w=240&h=160&fit=crop&q=60',linkPath:'/government'},{id:'broadcasters-studio',localPath:'/assets/images/hero/broadcasters-studio.jpg',unsplashUrl:'https://unsplash.com/photos/2f02b77fc618',photographerName:'Jonathan Velasquez',photographerUsername:'jonathanvez',photographerUrl:'https://unsplash.com/@jonathanvez',description:'Professional radio/podcast microphone in studio',usedIn:'Broadcasters Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=240&h=160&fit=crop&q=60',linkPath:'/broadcasters'},{id:'press-hero-control-room',localPath:'/assets/images/hero/press-control-room.jpg',unsplashUrl:'https://unsplash.com/photos/control-room-with-monitors-and-chairs-NSlqiFRyafY',photographerName:'Igor Saikin',photographerUsername:'alteredpoint',photographerUrl:'https://unsplash.com/@alteredpoint',description:'Control room with monitors and chairs',usedIn:'Press & Media Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1764195287345-2086f504cb0b?w=240&h=160&fit=crop&q=60',linkPath:'/press'},{id:'landing-mountains',localPath:'/assets/images/hero/landing-mountains.jpg',unsplashUrl:'https://unsplash.com/photos/21bda4d32df4',photographerName:'Claudio Schwarz',photographerUsername:'purzlbaum',photographerUrl:'https://unsplash.com/@purzlbaum',description:'Mountain range above the clouds, Swiss Alps',usedIn:'Landing Page - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=240&h=160&fit=crop&q=60',linkPath:'/'},{id:'personal-home',localPath:'/assets/images/hero/personal-home.jpg',unsplashUrl:'https://unsplash.com/photos/1c1ef2d93688',photographerName:'Roberto Nickson',photographerUsername:'rpnickson',photographerUrl:'https://unsplash.com/@rpnickson',description:'Modern home interior living room',usedIn:'Personal Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?w=240&h=160&fit=crop&q=60',linkPath:'/personal'},{id:'store-sensors-landscape',localPath:'/assets/images/hero/store-sensors-landscape.jpg',unsplashUrl:'',photographerName:'v2osk',photographerUsername:'v2osk',photographerUrl:'https://unsplash.com/@v2osk',description:'Dramatic mountain landscape with mist and sunrise',usedIn:'Store Category - Air Quality Sensors Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=240&h=160&fit=crop&q=60',linkPath:'/store/air-quality-sensors'},{id:'store-power-supplies',localPath:'/assets/images/hero/store-power-supplies.jpg',unsplashUrl:'https://unsplash.com/photos/2e959784a276',photographerName:'American Public Power Association',photographerUsername:'publicpowerorg',photographerUrl:'https://unsplash.com/@publicpowerorg',description:'Solar panels in a field under blue sky',usedIn:'Store Category - Power Supplies Hero Backgroun
636d',thumbnailUrl:'https://images.unsplash.com/photo-1509391366360-2e959784a276?w=240&h=160&fit=crop&q=60',linkPath:'/store/power-supplies'},{id:'store-accessories',localPath:'/assets/images/hero/store-accessories.jpg',unsplashUrl:'',photographerName:'AI Generated',photographerUsername:'',photographerUrl:'',description:'Flat lay of sensor accessories: mounting bracket, screws, enclosure, USB cable, SD card, and protective cover on dark background',usedIn:'Store Category - Accessories Hero Background',thumbnailUrl:'',linkPath:'/store/accessories'},{id:'purpleair-official-response-logo',localPath:'/assets/purpleair-official.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'PurpleAir cloud-and-wordmark logo used to identify official review responses',usedIn:'Product Reviews - Official PurpleAir Response',thumbnailUrl:'',linkPath:'/store'},{id:'recall-power-supply',localPath:'/api/v1/pages/images/recall-power-supply.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'Recalled power supply model number RKPO-UL052000C shipped with PA-II and PA-II-SD sensors',usedIn:'Recall Screen - Power supply photo',thumbnailUrl:'',linkPath:'/recall'},{id:'research-haqast-logo',localPath:'/assets/research/haqast-logo.png',unsplashUrl:'',photographerName:'NASA HAQAST',photographerUsername:'',photographerUrl:'https://haqast.org',description:'Logo of NASA HAQAST, the Health and Air Quality Applied Sciences Team, credited as author of the researcher quick guide developed by its Tiger Team in collaboration with PurpleAir',usedIn:'Researcher Quick Guide - Authorship credit',thumbnailUrl:'',linkPath:'/research/quick-guide'},{id:'research-pa2-cutaway',localPath:'/assets/research/purpleair-pa2-cutaway.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'PurpleAir PA-II sensor with the cap removed, showing the two independent Plantower laser counters that produce channels A and B',usedIn:'Researcher Quick Guide - Technical summary',thumbnailUrl:'',linkPath:'/research/quick-guide'},{id:'research-network-map-snapshot',localPath:'/assets/research/purpleair-network-map-2026-09-11.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'World map of PurpleAir PM2.5 sensor coverage, a static snapshot of the live PurpleAir map retrieved 2026-09-11',usedIn:'Researcher Quick Guide - Network coverage figure',thumbnailUrl:'',linkPath:'/research/quick-guide'},{id:'store-replacement-parts',localPath:'/assets/images/hero/store-replacement-parts.jpg',unsplashUrl:'https://unsplash.com/photos/4636190af475',photographerName:'Alexandre Debieve',photographerUsername:'alexkixa',photographerUrl:'https://unsplash.com/@alexkixa',description:'Close-up of a printed circuit board',usedIn:'Store Category - Replacement Parts Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1518770660439-4636190af475?w=240&h=160&fit=crop&q=60',linkPath:'/store/replacement-parts'},{id:'projects-integrations-earth-lights',localPath:'/assets/images/hero/projects-integrations-earth-lights.jpg',unsplashUrl:'https://unsplash.com/photos/yZygONrUBe8',photographerName:'NASA',photographerUsername:'nasa',photographerUrl:'https://unsplash.com/@nasa',description:'Earth at night from space showing connected city lights',usedIn:'Projects & Integrations Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1446776709462-d6b525c57bd3?w=240&h=160&fit=crop&q=60',linkPath:'/projects-and-integrations'},{id:'projects-doee-purpleair-sensor',localPath:'',unsplashUrl:'',photographerName:'DC Department of Energy and Environment (DOEE)',photographerUsername:'',photographerUrl:'',description:'PurpleAir sensor deployed in Washington D.C.',usedIn:'Projects & Integrations - DOEE PurpleAir Sensor Project card',thumbnailUrl:'https://doee.dc.gov/sites/default/files/dc/sites/doee/service_content/images/purpleAir%20pic2.jpg',linkPath:'/projects-and-integrations'},{id:'projects-nps-sensor-station',localPath:'',unsplashUrl:'',photographerName:'National Park Service',photographerUsername:'',photographerUrl:'',description:'PurpleAir sensor installed at NPS air quality monitoring station',usedIn:'Projects & Integrations - 
636NPS Low-cost Sensor article card',thumbnailUrl:'https://www.nps.gov/articles/000/images/imageAQ002Mod.jpg',linkPath:'/projects-and-integrations'},{id:'projects-airnow-logo',localPath:'',unsplashUrl:'',photographerName:'U.S. EPA / AirNow',photographerUsername:'',photographerUrl:'',description:'AirNow logo',usedIn:'Projects & Integrations - Fire and Smoke Map card',thumbnailUrl:'https://www.airnow.gov/sites/default/files/download-images/airnow-logos/airnow-logo-250x133.jpg',linkPath:'/projects-and-integrations'},{id:'projects-epa-monitoring-site',localPath:'',unsplashUrl:'',photographerName:'U.S. Environmental Protection Agency (EPA)',photographerUsername:'',photographerUrl:'',description:'EPA air quality monitoring site with sensors and equipment',usedIn:'Projects & Integrations - EPA Air Sensor Toolbox card',thumbnailUrl:'https://www.epa.gov/sites/default/files/styles/gallery_medium/public/2019-08/epa-banner-images/rtp_air_monitoring_site_091.jpg',linkPath:'/projects-and-integrations'},{id:'papers-library',localPath:'/assets/images/hero/papers-library.jpg',unsplashUrl:'https://unsplash.com/photos/-z2WIDLCqAA',photographerName:'Bhavik Nasit',photographerUsername:'bhaviknasit',photographerUrl:'https://unsplash.com/@bhaviknasit',description:'Aerial view of Stuttgart City Library interior with symmetrical bookshelves',usedIn:'Papers Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1716730090346-663308dc1847?w=240&h=160&fit=crop&q=60',linkPath:'/papers'},{id:'research-hero-satellite-plume',localPath:'/assets/images/hero/research-hero-satellite-plume.jpg',unsplashUrl:'https://unsplash.com/photos/smoke-plume-from-a-wildfire-drifts-over-coastal-mountains-prLCY6qeIWQ',photographerName:'USGS',photographerUsername:'usgs',photographerUrl:'https://unsplash.com/@usgs',description:'Landsat 9 natural-color image of wildfire smoke over the coast near Uljin, South Korea',usedIn:'Research Quick Guide - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1722083854858-79fb7ea85380?w=240&h=160&fit=crop&q=60',linkPath:'/research/quick-guide'},{id:'blog-fireworks-today',localPath:'2022/07/fireworks-today-can-we-do-better/images/mike-enerio-se4RWwpqAMk-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/se4RWwpqAMk',photographerName:'Mike Enerio',photographerUsername:'mikeenerio',photographerUrl:'https://unsplash.com/@mikeenerio',description:'Multicolored fireworks at Marina Bay, Singapore',usedIn:'Blog - Fireworks Today',thumbnailUrl:'/api/v1/blog/images/2022/07/fireworks-today-can-we-do-better/images/mike-enerio-se4RWwpqAMk-unsplash.jpg',linkPath:'/blog/fireworks-today-can-we-do-better'},{id:'blog-rochester-air-quality',localPath:'2023/09/how-a-student-started-the-rochester-air-quality-network/images/lokesh-paduchuri-GSevODipDoM-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/GSevODipDoM',photographerName:'Lokesh Paduchuri',photographerUsername:'lokeshpaduchuri',photographerUrl:'https://unsplash.com/@lokeshpaduchuri',description:'Aerial view of city buildings and trees beside river, Rochester, NY',usedIn:'Blog - How a Student Started the Rochester Air Quality Network',thumbnailUrl:'/api/v1/blog/images/2023/09/how-a-student-started-the-rochester-air-quality-network/images/lokesh-paduchuri-GSevODipDoM-unsplash.jpg',linkPath:'/blog/how-a-student-started-the-rochester-air-quality-network'},{id:'blog-fireworks-air-pollution',localPath:'2023/10/case-study-the-impact-of-fireworks-on-air-pollution/images/jack-cohen-4x4F4sJ62QI-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/4x4F4sJ62QI',photographerName:'Jack Cohen',photographerUsername:'jackcohen',photographerUrl:'https://unsplash.com/@jackcohen',description:'Aerial photography of city buildings with fireworks',usedIn:'Blog - Case Study: The Impact of Fireworks on Air Pollution',thumbnailUrl:'/api/v1/blog/images/2023/10/case-study-the-impact-of-fireworks-on-air-pollution/images/jack-cohen-4x4F4sJ62QI-unsplash.jpg',linkPath:'/blog/case-study-the-impact-of-fireworks-on-air-pollution'},{id:'blog-pesticides-air-pollution',localPath:'2023/10/harvesting-season-how-
636pesticides-create-air-pollution/images/loren-king-WrUxd3Se0cw-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/WrUxd3Se0cw',photographerName:'Loren King',photographerUsername:'kingimaging',photographerUrl:'https://unsplash.com/@kingimaging',description:'A tractor plowing a field with a sprayer',usedIn:'Blog - Harvesting Season: How Pesticides Create Air Pollution',thumbnailUrl:'/api/v1/blog/images/2023/10/harvesting-season-how-pesticides-create-air-pollution/images/loren-king-WrUxd3Se0cw-unsplash.jpg',linkPath:'/blog/harvesting-season-how-pesticides-create-air-pollution'},{id:'blog-cleanaire-nc',localPath:'2024/06/how-cleanaire-nc-successfully-integrated-purpleair-sensors/images/daniel-weiss-aj2Os9mYgJU-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/aj2Os9mYgJU',photographerName:'Daniel Weiss',photographerUsername:'dweiss002',photographerUrl:'https://unsplash.com/@dweiss002',description:"Bird's-eye view of city",usedIn:'Blog - How CleanAIRE NC Successfully Integrated PurpleAir Sensors',thumbnailUrl:'/api/v1/blog/images/2024/06/how-cleanaire-nc-successfully-integrated-purpleair-sensors/images/daniel-weiss-aj2Os9mYgJU-unsplash.jpg',linkPath:'/blog/how-cleanaire-nc-successfully-integrated-purpleair-sensors'},{id:'blog-particulate-matter',localPath:'2024/09/particulate-matter-101/images/jeremy-bishop-dereTo8KbiQ-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/dereTo8KbiQ',photographerName:'Jeremy Bishop',photographerUsername:'jeremybishop',photographerUrl:'https://unsplash.com/@jeremybishop',description:'A close up of a grill with some food cooking on it',usedIn:'Blog - What is Particulate Matter (PM)?',thumbnailUrl:'/api/v1/blog/images/2024/09/particulate-matter-101/images/jeremy-bishop-dereTo8KbiQ-unsplash.jpg',linkPath:'/blog/particulate-matter-101'},{id:'blog-electric-cars',localPath:'2025/03/how-electric-cars-impact-air-quality/images/charlie-deets-AkgALppFIwo-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/AkgALppFIwo',photographerName:'Charlie Deets',photographerUsername:'charliedeets',photographerUrl:'https://unsplash.com/@charliedeets',description:'Electric car charging',usedIn:'Blog - Do Electric Cars Impact Air Quality?',thumbnailUrl:'/api/v1/blog/images/2025/03/how-electric-cars-impact-air-quality/images/charlie-deets-AkgALppFIwo-unsplash.jpg',linkPath:'/blog/how-electric-cars-impact-air-quality'},{id:'blog-climate-change-agents',localPath:'2025/04/spreading-air-quality-awareness-climate-change-agents-in-action/images/kenny-nguy\u1ec5n-YqBX_TIZh1U-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/YqBX_TIZh1U',photographerName:'Kenny Nguy\u1ec5n',photographerUsername:'nguyening',photographerUrl:'https://unsplash.com/@nguyening',description:'Silhouette of person standing on grass field during sunset',usedIn:'Blog - Spreading Air Quality Awareness: Climate Change Agents in Action!',thumbnailUrl:'/api/v1/blog/images/2025/04/spreading-air-quality-awareness-climate-change-agents-in-action/images/kenny-nguy\u1ec5n-YqBX_TIZh1U-unsplash.jpg',linkPath:'/blog/spreading-air-quality-awareness-climate-change-agents-in-action'},{id:'blog-air-quality-world',localPath:'2025/04/what-is-transboundary-air-pollution/images/javier-miranda-AlJ9TQqeCV0-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/AlJ9TQqeCV0',photographerName:'Javier Miranda',photographerUsername:'nuvaproductions',photographerUrl:'https://unsplash.com/@nuvaproductions',description:'Wide angle shot of white smoke coming out of nuclear plants',usedIn:'Blog - Why Air Quality Changes Around the World',thumbnailUrl:'/api/v1/blog/images/2025/04/what-is-transboundary-air-pollution/images/javier-miranda-AlJ9TQqeCV0-unsplash.jpg',linkPath:'/blog/what-is-transboundary-air-pollution'},{id:'blog-causes-air-pollution',localPath:'2025/10/what-are-common-causes-of-air-pollution/images/aleksandr-popov-Xbh_OGLRfUM-unsplash.png',unsplashUrl:'https://unsplash.com/photos/Xbh_OGLRfUM',photographerName:'Aleksandr Popov',photographerUsername:'5tep5',photographerUrl:'https://unsplash.com/@5tep5',description:'Cars passing through north and south',usedIn:'Blog - Common Causes of Air Pollution You Should Know About',thumbnailUrl:'/api/v1/blog/images/2025/10/what-are-common-causes-of-air-pollution/images/aleksandr-popov-Xbh_OGLRfUM-unsplash.png',linkPath:'/blog/what-are-common-causes-of-air-pollution'},{id:'blog-aqi',localPath:'2025/12/what-is-an-air-quality-index-aqi/images/marc-wieland-TPjcRLA-unsplash.jpg',unsplashUrl:'https://unsplash.com/photos/zrj-TPjcRLA',photographerName:'Marc Wieland',photographerUsername:'marcwieland95',photographerUrl:'https://unsplash.com/@marcwieland95',de
636scription:'Aerial view of a busy highway intersection',usedIn:'Blog - What is an Air Quality Index (AQI)?',thumbnailUrl:'/api/v1/blog/images/2025/12/what-is-an-air-quality-index-aqi/images/marc-wieland-TPjcRLA-unsplash.jpg',linkPath:'/blog/what-is-an-air-quality-index-aqi'},{id:'blog-wildfire-spread',localPath:'2026/01/how-fast-can-a-wildfire-spread/images/caleb-cook-syuox8fipX4-unsplash.png',unsplashUrl:'https://unsplash.com/photos/syuox8fipX4',photographerName:'Caleb Cook',photographerUsername:'venturecreative',photographerUrl:'https://unsplash.com/@venturecreative',description:'Silhouette of two people standing on grass field during sunset',usedIn:'Blog - How Fast Can a Wildfire Spread?',thumbnailUrl:'/api/v1/blog/images/2026/01/how-fast-can-a-wildfire-spread/images/caleb-cook-syuox8fipX4-unsplash.png',linkPath:'/blog/how-fast-can-a-wildfire-spread'},{id:'blog-wildfire-duration',localPath:'2026/01/how-long-do-wildfires-last/images/joanne-francis-S9NQnIV4zOI-unsplash.png',unsplashUrl:'https://unsplash.com/photos/S9NQnIV4zOI',photographerName:'Joanne Francis',photographerUsername:'nipawinnews',photographerUrl:'https://unsplash.com/@nipawinnews',description:'Silhouette of trees on smoke-covered forest',usedIn:'Blog - How Long Do W
636ildfires Last?',thumbnailUrl:'/api/v1/blog/images/2026/01/how-long-do-wildfires-last/images/joanne-francis-S9NQnIV4zOI-unsplash.png',linkPath:'/blog/how-long-do-wildfires-last'},{id:'blog-wildfire-causes',localPath:'2026/01/what-causes-wildfires/images/emma-renly-6SzTh0vV0Ko-unsplash.png',unsplashUrl:'https://unsplash.com/photos/6SzTh0vV0Ko',photographerName:'Emma Renly',photographerUsername:'emren',photographerUrl:'https://unsplash.com/@emren',description:'Wildfire burning in forest',usedIn:'Blog - What Causes Wildfires?',thumbnailUrl:'/api/v1/blog/images/2026/01/what-causes-wildfires/images/emma-renly-6SzTh0vV0Ko-unsplash.png',linkPath:'/blog/what-causes-wildfires'},{id:'blog-wildfire-containment',localPath:'2026/01/what-does-wildfire-containment-mean/images/sui-xu-Ggig6gC4ecM-unsplash.png',unsplashUrl:'https://unsplash.com/photos/Ggig6gC4ecM',photographerName:'Sui Xu',photographerUsername:'sui_xu',photographerUrl:'https://unsplash.com/@sui_xu',description:'Wildfire burning dry grass on a hillside',usedIn:'Blog - What Does Wildfire Containment Mean?',thumbnailUrl:'/api/v1/blog/images/2026/01/what-does-wildfire-containment-mean/images/sui-xu-Ggig6gC4ecM-unsplash.png',linkPath:'/blog/what-does-wildfire-containment-mean'},{id:'blog-air-quality-migration-real-estate',localPath:'2026/03/air-quality-migration-real-estate/images/vitaly-gariev-moving-boxes.jpg',unsplashUrl:'https://unsplash.com/photos/yxnzg8mn2O8',photographerName:'Vitaly Gariev',photographerUsername:'gariev',photographerUrl:'https://unsplash.com/@gariev',description:'Couple surrounded by moving boxes in new home',usedIn:'Blog - Renters and Buyers Are Moving Toward Better Air',thumbnailUrl:'/api/v1/blog/images/2026/03/air-quality-migration-real-estate/images/vitaly-gariev-moving-boxes.jpg',linkPath:'/blog/air-quality-migration-real-estate'},{id:'blog-winter-weather-indoor-air-quality',localPath:'2026/03/winter-weather-indoor-air-quality/images/winter-indoor-cozy-reading-nook.jpg',unsplashUrl:'',photographerName:'AI-generated',photographerUsername:'',photographerUrl:'',description:'Cozy reading nook with a snowy winter view through the window',usedIn:'Blog - Air Quality At-Home: The Surprising Impact of Winter Weather',thumbnailUrl:'/api/v1/blog/images/2026/03/winter-weather-indoor-air-quality/images/winter-indoor-cozy-reading-nook.jpg',linkPath:'/blog/air-quality-at-home-the-surprising-impact-of-winter-weather-1'},{id:'blog-winter-weather-wood-stove',localPath:'2026/03/winter-weather-indoor-air-quality/images/tanya-barrow-wood-stove.jpg',unsplashUrl:'https://unsplash.com/photos/a-wood-burning-stove-glows-warmly-in-a-rustic-room-fm2qmuLtKDs',photographerName:'Tanya Barrow',photographerUsername:'tanyabarrow',photographerUrl:'https://unsplash.com/@tanyabarrow',description:'A wood-burning stove glows warmly in a rustic room',usedIn:'Blog - Air Quality At-Home: The Surprising Impact of Winter Weather',thumbnailUrl:'/api/v1/blog/images/2026/03/winter-weather-indoor-air-quality/images/tanya-barrow-wood-stove.jpg',linkPath:'/blog/air-quality-at-home-the-surprising-impact-of-winter-weather-1'},{id:'blog-hillsborough-new-world-brewery',localPath:'2026/06/hillsborough-county-community-air-monitoring-network/images/purpleair-new-world-brewery.jpg',unsplashUrl:'',photographerName:'Plan Hillsborough / CAMN Coalition',photographerUsername:'',photographerUrl:'https://planhillsborough.org',description:'PurpleAir sensor installed at New World Brewery, Tampa, FL',usedIn:'Blog - Community Spotlight: Hillsborough County Community Air Monitoring Network',thumbnailUrl:'/api/v1/blog/images/2026/06/hillsborough-county-community-air-monitoring-network/images/purpleair-new-world-brewery.jpg',linkPath:'/blog/community-spotlight-hillsborough-countys-community-air-monitoring-network'},{id:'blog-international-smoke-symposium-iss4',localPath:'2026/03/international-smoke-symposium-iss4-2026/images/daniel-lincoln-smoke-plume.jpg',unsplashUrl:'https://unsplash.com/photos/TQ0aBpZAhoA',photographerName:'Daniel Lincoln',photographerUsername:'danielincoln',photographerUrl:'https://unsplash.com/@danielincoln',description:'Smoke plume in the distance',usedIn:'Blog - 4th International Smoke Symposium (ISS4)',thumbnailUrl:'/api/v1/blog/images/2026/03/international-smoke-symposium-iss4-2026/images/daniel-lincoln-smoke-plume.jpg',linkPath:'/blog/4th-international-smoke-symposium-iss4-wildland-fire-smoke-science-and-practice-in-2026'},{id:'blog-air-quality-buying-selling',localPath:'2026/09/air-quality-when-buying-selling-home/images/jakub-zerdzicki-house-key.jpg',unsplashUrl:'https://unsplash.com/photos/Vg96IZTFubo',photographerName:'Jakub Zerdzicki',photographerUsername:'jakubzerdzicki',photographerUrl:'https://unsplash.com/@jakubzerdzicki',description:'Person holding a house key',usedIn:'Blog - Air Quality When Buying or Selling a Home',thumbnailUrl:'/api/v1/blog/images/2026/09/air-quality-when-buying-selling-home/images/jakub-zerdzicki-house-key.jpg',linkPath:'/blog/air-quality-when-buying-selling-home'},{id:'blog-why-air-quality-matters-real-estate',localPath:'2026/02/why-air-quality-matters-in-real-estate/images/priscilla-du-preez-house.jpg',unsplashUrl:'https://unsplash.com/photos/nF8xhLMmg0c',photographerName:'Priscilla Du Preez',photographerUsername:'priscilladupreez',photographerUrl:'https://unsplash.com/@priscilladupreez',description:'House and yard',usedIn:'Blog - Why Air Quality Is Part of the Real Estate Conversation Now',thumbnailUrl:'/api/v1/blog/images/2026/02/why-air-quality-matters-in-real-estate/images/priscilla-du-preez-house.jpg',linkPath:'/blog/why-air-quality-is-part-of-the-real-estate-conversation-now'},{id:'blog-preparing-for-wildfires',localPath:'2026/04/preparing-for-wildfires/images/mathurin-napoly-go-bag.jpg',unsplashUrl:'https://unsplash.com/photos/MaKsx8JNbiI',photographerName:'Mathurin NAPOLY',photographerUsername:'matnapo',photographerUrl:'https://unsplash.com/@matnapo',description:'Orange and black go-bag',usedIn:'Blog - Preparing for Wildfires',thumbnailUrl:'/api/v1/blog/images/2026/04/preparing-for-wildfires/images/mathurin-napoly-go-bag.jpg',linkPath:'/blog/preparing-for-wildfires-evacuation-smoke-and-air-quality'},{id:'blog-preparing-for-wildfires-cozy-room',localPath:'2026/04/preparing-for-wildfires/images/cozy-living-room-indoors.jpg',unsplashUrl:'https://unsplash.com/photos/cozy-living-room-with-natural-elements-and-warm-tones-8fF_tF2ZMSQ',photographerName:'Simona Sergi',photographerUsername:'i_am_simoesse',photographerUrl:'https://unsplash.com/@i_am_simoesse',description:'Cozy living room with warm light and closed windows',usedIn:'Blog - Preparing for Wildfires',thumbnailUrl:'/api/v1/blog/images/2026/04/preparing-for-wildfires/images/cozy-living-room-indoors.jpg',linkPath:'/blog/preparing-for-wildfires-evacuation-smoke-and-air-quality'},{id:'blog-when-to-evacuate-vs-shelter-in-place',localPath:'2026/04/when-to-evacuate-vs-shelter-in-place-wildfires/images/wildfire-evacuation-route-sign.jpg',unsplashUrl:'',photographerName:'AI-generated',photographerUsername:'',photographerUrl:'',description:'Wildfire evacuation route sign along a rural highway with smoke rising from the ridgeline',usedIn:'Blog - When to Evacuate vs. Shelter in Place During Wildfires',thumbnailUrl:'/api/v1/blog/images/2026/04/when-to-evacuate-vs-shelter-in-place-wildfires/images/wildfire-evacuation-route-sign.jpg',linkPath:'/blog/when-to-evacuate-vs-shelter-in-place-during-wildfires'},{id:'blog-wildfires-across-the-west-june-2026',localPath:'2026/06/wildfires-across-the-west-june-2026/images/western-wildfires-smoke-plumes.jpg',unsplashUrl:'',photographerName:'AI-generated',photographerUsername:'',photographerUrl:'',description:'Smoke plumes rising from multiple ridges across a Western mountain landscape',usedIn:'Blog - Active Wildfires Across the West: A June 2026 Update',thumbnailUrl:'/api/v1/blog/images/2026/06/wildfires-across-the-west-june-2026/images/western-wildfires-smoke-plumes.jpg',linkPath:'/blog/active-wildfires-across-the-west-a-june-2026-update'},{id:'blog-fourth-of-july-air-quality-fireworks',localPath:'2026/07/fourth-of-july-air-quality-fireworks/images/purpleair-map-july-4-2026.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'PurpleAir mobile app screenshot showing US EPA PM2.5 (AQI) 10-minute readings across the Americas at 10:09 PM MDT on July 4, 2026',usedIn:'Blog - What the 4th of July Looks Like on the PurpleAir Map',thumbnailUrl:'/api/v1/blog/images/2026/07/fourth-of-july-air-quality-fireworks/images/purpleair-map-july-4-2026.png',linkPath:'/blog/fourth-of-july-air-quality-fireworks'},{id:'blog-santa-barbara-apcd-community-air-sensors',localPath:'2026/07/santa-barbara-apcd-community-air-sensors/images/riccardo-tuninato-santa-barbara-coast-mountains.jpg',unsplashUrl:'https://unsplash.com/photos/ZodXgWjCgnQ',photographerName:'Riccardo Tuninato',photographerUsername:'tuna96',photographerUrl:'https://unsplash.com/@tuna96',description:'Santa Barbara coastline at golden hour with palm trees along the beach and the Santa Ynez mountains rising behind the city',usedIn:'Blog - Santa Barbara County APCD Is Quadrupling Its PurpleAir Network',thumbnailUrl:'/api/v1/blog/images/2026/07/santa-barbara-apcd-community-air-sensors/images/riccardo-tuninato-santa-barbara-coast-mountains.jpg',linkPath:'/blog/santa-barbara-apcd-community-air-sensors'},{id:'blog-wildfire-smoke-sensitive-groups',localPath:'2026/05/wildfire-smoke-sensitive-groups/images/vitaly-gariev-grandfather-grandson.jpg',unsplashUrl:'https://unsplash.com/photos/C5zb9PE9Ccc',photographerName:'Vitaly Gariev',photographerUsername:'silverkblack',photographerUrl:'https://unsplash.com/@silverkblack',de
636scription:'Doctor consults with grandfather and grandson',usedIn:'Blog - Wildfire Smoke and Sensitive Groups',thumbnailUrl:'/api/v1/blog/images/2026/05/wildfire-smoke-sensitive-groups/images/vitaly-gariev-grandfather-grandson.jpg',linkPath:'/blog/wildfire-smoke-and-sensitive-groups-what-to-do-if-youre-at-higher-risk'},{id:'blog-earth-day-air-quality-celebration',localPath:'2026/04/earth-day-air-quality-celebration/images/earth-day-seedling-hands.jpg',unsplashUrl:'https://unsplash.com/photos/green-plant-x8ZStukS2PM',photographerName:'Noah Buscher',photographerUsername:'noahbuscher',photographerUrl:'https://unsplash.com/@noahbuscher',description:'Hands holding a young seedling in soil with a green forest in the background',usedIn:'Blog - Earth Day and Air Quality',thumbnailUrl:'/api/v1/blog/images/2026/04/earth-day-air-quality-celebration/images/earth-day-seedling-hands.jpg',linkPath:'/blog/earth-day-and-air-quality-why-the-air-we-breathe-matters-for-the-planet'},{id:'blog-earth-day-la-fire-smoke',localPath:'2026/04/earth-day-air-quality-celebration/images/la-palisades-fire-smoke.jpg',unsplashUrl:'https://unsplash.com/photos/a-large-plume-of-smoke-is-seen-over-a-city-e3nKKwEAS1A',photographerName:'Jessica Christian',photographerUsername:'lovesquish',photographerUrl:'https://unsplash.com/@lovesquish',description:'Smoke from the Palisades fire drifts over the Los Angeles skyline',usedIn:'Blog - Earth Day and Air Quality',thumbnailUrl:'/api/v1/blog/images/2026/04/earth-day-air-quality-celebration/images/la-palisades-fire-smoke.jpg',linkPath:'/blog/earth-day-and-air-quality-why-the-air-we-breathe-matters-for-the-planet'},{id:'blog-earth-day-utah-valley-inversion',localPath:'2026/04/earth-day-air-quality-celebration/images/utah-valley-inversion.jpg',unsplashUrl:'',photographerName:'Amanda Hawkins',photographerUsername:'',photographerUrl:'',description:'Temperature inversion trapping pollution over Utah Valley',usedIn:'Blog - Earth Day and Air Quality',thumbnailUrl:'/api/v1/blog/images/2026/04/earth-day-air-quality-celebration/images/utah-valley-inversion.jpg',linkPath:'/blog/earth-day-and-air-quality-why-the-air-we-breathe-matters-for-the-planet'},{id:'blog-earth-day-cyclist-bike-lane',localPath:'2026/04/earth-day-air-quality-celebration/images/cyclist-bike-lane-berne.jpg',unsplashUrl:'https://unsplash.com/photos/woman-riding-a-bicycle-on-a-bike-lane-g7wfZlnfZ04',photographerName:'Alain Rouiller',photographerUsername:'alainr',photographerUrl:'https://unsplash.com/@alainr',description:'Woman cycling on a dedicated bike lane in Berne, Switzerland',usedIn:'Blog - Earth Day and Air Quality',thumbnailUrl:'/api/v1/blog/images/2026/04/earth-day-air-quality-celebration/images/cyclist-bike-lane-berne.jpg',linkPath:'/blog/earth-day-and-air-quality-why-the-air-we-breathe-matters-for-the-planet'},{id:'blog-using-wildfire-smoke-forecasts-outlooks',localPath:'2026/04/using-wildfire-smoke-forecasts-outlooks/images/designecologist-hazy-sunset.jpg',unsplashUrl:'https://unsplash.com/photos/Y1CLEQZX-jc',photographerName:'DESIGNECOLOGIST',photographerUsername:'designecologist',photographerUrl:'https://unsplash.com/@designecologist',description:'Hazy sunset over city silhouette',usedIn:'Blog - Using Wildfire Smoke Forecasts and Outlooks',thumbnailUrl:'/api/v1/blog/images/2026/04/using-wildfire-smoke-forecasts-outlooks/images/designecologist-hazy-sunset.jpg',linkPath:'/blog/wildfire-smoke-forecasts-and-outlooks'},{id:'blog-fifa-world-cup-2026-air-quality',localPath:'2026/07/fifa-world-cup-2026-air-quality/images/sam-ladley-stadium-fiery-sky.jpg',unsplashUrl:'https://unsplash.com/photos/stadium-lights-shine-against-a-fiery-sky-kdD0Up_aKFA',photographerName:'Sam Ladley',photographerUsername:'samotion',photographerUrl:'https://unsplash.com/@samotion',description:'A stadium floodlight tower glowing against a fiery red, smoke-tinted evening sky',usedIn:'Blog - The 2026 FIFA World Cup and Air Quality',thumbnailUrl:'/api/v1/blog/images/2026/07/fifa-world-cup-2026-air-quality/images/sam-ladley-stadium-fiery-sky.jpg',linkPath:'/blog/fifa-world-cup-2026-air-quality'},{id:'blog-northeast-wildfire-smoke-july-2026',localPath:'2026/07/northeast-wildfire-smoke-july-2026/images/ahmer-kalam-nyc-wildfire-smoke-skyline.jpg',unsplashUrl:'https://unsplash.com/photos/a-foggy-skyline-with-a-tall-building-in-the-distance-0FkX9dUYBYw',photographerName:'Ahmer Kalam',photographerUsername:'ahmerkalam',photographerUrl:'https://unsplash.com/@ahmerkalam',description:'The Empire State Building shrouded in orange wildfire smoke with a pale sun overhead',usedIn:'Blog - Canadian Wildfire Smoke Is Hitting the Northeast (July 2026)',thumbnailUrl:'/api/v1/blog/images/2026/07/northeast-wildfire-smoke-july-2026/images/ahmer-kalam-nyc-wildfire-smoke-skyline.jpg',linkPath:'/blog/northeast-wildfire-smoke-july-2026'},{id:'blog-sensor-aging-global-study-hero',localPath:'2026/09/how-purpleair-sensors-age-global-study/images/sensor-aging-card-purpleair-study.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"Hero card for the sensor aging study post, carrying the scale of the analysis: 452,143,148 hours of data from 36,328 PurpleAir sensors across four continents over seven years. Figures from deSouza et al., SSRN 7425479, September 2026.",usedIn:'Blog - What 36,000 Sensors Say About How PurpleAir Sensors Age (hero)',thumbnailUrl:'/api/v1/blog/images/2026/09/how-purpleair-sensors-age-global-study/images/sensor-aging-card-purpleair-study.jpg',linkPath:'/blog/how-purpleair-sensors-age-global-study'},{id:'blog-why-purpleair-and-airnow-readings-differ',localPath:'2026/08/why-purpleair-and-airnow-readings-differ/images/two-scales-card-purpleair-map-manson.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"Hero card for the AirNow comparison post: the figure 58 over a PurpleAir map capture of the Chelan to Wenatchee corri
636dor on the PM2.5 concentration layer, where the Manson sensor visible behind the type reads 58 micrograms per cubic meter. The same sensor reads an AQI of 153, which is the ambiguity the card poses. Captured September 21, 2026. Basemap \xa9 MapTiler, \xa9 OpenStreetMap.",usedIn:'Blog - Why Your PurpleAir Reading Does Not Match AirNow (hero)',thumbnailUrl:'/api/v1/blog/images/2026/08/why-purpleair-and-airnow-readings-differ/images/two-scales-card-purpleair-map-manson.jpg',linkPath:'/blog/why-purpleair-and-airnow-readings-differ'},{id:'blog-airnow-differ-settings-panel',localPath:'2026/08/why-purpleair-and-airnow-readings-differ/images/map-settings-panel-purpleair-map.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"The PurpleAir map settings panel, opened from the gear icon, showing the Data layer, Apply conversion and Averaging period controls that determine which number a marker displays. Captured over the Puget Sound view on September 21, 2026. Basemap \xa9 MapTiler, \xa9 OpenStreetMap.",usedIn:'Blog - Why Your PurpleAir Reading Does Not Match AirNow',thumbnailUrl:'/api/v1/blog/images/2026/08/why-purpleair-and-airnow-readings-differ/images/map-settings-panel-purpleair-map.jpg',linkPath:'/blog/why-purpleair-and-airnow-readings-differ'},{id:'blog-airnow-differ-correction-comparison',localPath:'2026/08/why-purpleair-and-airnow-readings-differ/images/correction-comparison-purpleair-map-chelan.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"Two crops of the same PurpleAir map view over the Columbia River between Chelan and Wenatchee, Washington, captured a minute apart on September 21, 2026 during a wildfire smoke episode, with the US EPA correction off and then on. Sensors reading 123 and 110 uncorrected read 100 and 90 corrected, crossing from Unhealthy for Sensitive Groups into Moderate. Basemap \xa9 MapTiler, \xa9 OpenStreetMap.",usedIn:'Blog - Why Your PurpleAir Reading Does Not Match AirNow',thumbnailUrl:'/api/v1/blog/images/2026/08/why-purpleair-and-airnow-readings-differ/images/correction-comparison-purpleair-map-chelan.jpg',linkPath:'/blog/why-purpleair-and-airnow-readings-differ'},{id:'blog-airnow-differ-units-comparison',localPath:'2026/08/why-purpleair-and-airnow-readings-differ/images/units-comparison-purpleair-map-chelan.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"The same PurpleAir map view over Chelan and Wenatchee, Washington on September 21, 2026 with the US EPA correction applied, shown first as US EPA AQI values and then as PM2.5 concentrations in micrograms per cubic meter. A sensor at Manson reads 153 as an AQI and 58 as a concentration. Basemap \xa9 MapTiler, \xa9 OpenStreetMap.",usedIn:'Blog - Why Your PurpleAir Reading Does Not Match AirNow',thumbnailUrl:'/api/v1/blog/images/2026/08/why-purpleair-and-airnow-readings-differ/images/units-comparison-purpleair-map-chelan.jpg',linkPath:'/blog/why-purpleair-and-airnow-readings-differ'},{id:'blog-airnow-differ-averaging-comparison',localPath:'2026/08/why-purpleair-and-airnow-readings-differ/images/averaging-comparison-purpleair-map-chelan.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"The same PurpleAir map view over Chelan and Wenatchee, Washington on September 21, 2026 with the US EPA correction applied, shown in real time and averaged over the previous hour. Smoke was clearing, so sensors at Entiat read 54 in real time against 68 and 66 over the hour. Basemap \xa9 MapTiler, \xa9 OpenStreetMap.",usedIn:'Blog - Why Your PurpleAir Reading Does Not Match AirNow',thumbnailUrl:'/api/v1/blog/images/2026/08/why-purpleair-and-airnow-readings-differ/images/averaging-comparison-purpleair-map-chelan.jpg',linkPath:'/blog/why-purpleair-and-airnow-readings-differ'},{id:'blog-pacific-northwest-wildfire-smoke-july-2026',localPath:'2026/07/pacific-northwest-wildfire-smoke-july-2026/images/jan-keller-hazy-orange-hills.jpg',unsplashUrl:'https://unsplash.com/photos/a-hazy-orange-sky-over-silhouetted-trees-and-hills-ZhbXKUPadW8',photographerName:'Jan Keller',photographerUsername:'j_keller',photographerUrl:'https://unsplash.com/@j_keller',description:'A hazy orange sky from wildfire smoke over silhouetted trees and hills',usedIn:'Blog - Wildfire Smoke Is Blanketing Washington and Oregon (July 2026)',thumbnailUrl:'/api/v1/blog/images/2026/07/pacific-northwest-wildfire-smoke-july-2026/images/jan-keller-hazy-orange-hills.jpg',linkPath:'/blog/pacific-northwest-wildfire-smoke-july-2026'},{id:'blog-mediterranean-wildfires-2026-eu-total',localPath:'2026/09/mediterranean-wildfires-2026/images/eu-burned-area-card-mael-smoke-column.jpg',unsplashUrl:'https://unsplash.com/photos/a-large-plume-of-smoke-billows-into-the-sky-aU431CExHgM',photographerName:'Ma\xebl',photographerUsername:'mael____',photographerUrl:'https://unsplash.com/@mael____',description:'A wildfire smoke column, overlaid with the EU burned-area total to September 7, 2026',usedIn:'Blog - Mediterranean Wildfires in September 2026',thumbnailUrl:'/api/v1/blog/images/2026/09/mediterranean-wildfires-2026/images/eu-burned-area-card-mael-smoke-column.jpg',linkPath:'/blog/mediterranean-wildfires-2026'},{id:'blog-mediterranean-wildfires-2026-sentinel3-viotia',localPath:'2026/09/mediterranean-wildfires-2026/images/sentinel3-viotia-smoke-card-esa-2026-08-02.jpg',unsplashUrl:'',photographerName:'ESA / Copernicus Sentinel-3',photographerUsername:'',photographerUrl:'',description:"Smoke from the Viotia fires drifting south over the Mediterranean on August 2, 2026. Contains modified Copernicus Sentinel data (2026), processed by ESA, licensed CC BY-SA 3.0 IGO 
636(https://creativecommons.org/licenses/by-sa/3.0/igo/). Cropped by PurpleAir and overlaid with text; this adapted version is released under CC BY-SA 3.0 IGO.",usedIn:'Blog - Mediterranean Wildfires in September 2026',thumbnailUrl:'/api/v1/blog/images/2026/09/mediterranean-wildfires-2026/images/sentinel3-viotia-smoke-card-esa-2026-08-02.jpg',linkPath:'/blog/mediterranean-wildfires-2026'},{id:'blog-mediterranean-wildfires-2026-eaqi',localPath:'2026/09/mediterranean-wildfires-2026/images/eaqi-categories-card-anastase-maragos-athens.jpg',unsplashUrl:'https://unsplash.com/photos/athens-city-skyline-from-ancient-stone-walls-hwtfN8Ah_kI',photographerName:'Anastase Maragos',photographerUsername:'visualsbyroyalz',photographerUrl:'https://unsplash.com/@visualsbyroyalz',description:"The Athens skyline on a clear day, overlaid with the six European Air Quality Index categories",usedIn:'Blog - Mediterranean Wildfires in September 2026',thumbnailUrl:'/api/v1/blog/images/2026/09/mediterranean-wildfires-2026/images/eaqi-categories-card-anastase-maragos-athens.jpg',linkPath:'/blog/mediterranean-wildfires-2026'},{id:'blog-mediterranean-wildfires-2026-portugal-heat',localPath:'2026/09/mediterranean-wildfires-2026/images/portugal-heat-warning-card-thomas-winkler-lisbon.jpg',unsplashUrl:'https://unsplash.com/photos/a-view-of-a-city-at-sunset-from-a-hill-kfVxX0vt3Xc',photographerName:'Thomas Winkler',photographerUsername:'thomsonwinkler',photographerUrl:'https://unsplash.com/@thomsonwinkler',description:"Lisbon at sunset in clear weather, overlaid with the number of Portuguese districts under a heat warning on September 5, 2026",usedIn:'Blog - Mediterranean Wildfires in September 2026',thumbnailUrl:'/api/v1/blog/images/2026/09/mediterranean-wildfires-2026/images/portugal-heat-warning-card-thomas-winkler-lisbon.jpg',linkPath:'/blog/mediterranean-wildfires-2026'},{id:'blog-mediterranean-wildfires-2026-france-record',localPath:'2026/09/mediterranean-wildfires-2026/images/france-burned-area-record-card-rosalie-gdy-marseille.jpg',unsplashUrl:'https://unsplash.com/photos/city-skyline-with-church-on-hill-overlooking-harbor-aNpiSTAejok',photographerName:'Rosalie Gdy',photographerUsername:'rosaliegdy',photographerUrl:'https://unsplash.com/@rosaliegdy',description:'Marseille at dusk in clear weather, overlaid with France\u2019s 2026 burned-area record',usedIn:'Blog - Mediterranean Wildfires in September 2026',thumbnailUrl:'/api/v1/blog/images/2026/09/mediterranean-wildfires-2026/images/france-burned-area-record-card-rosalie-gdy-marseille.jpg',linkPath:'/blog/mediterranean-wildfires-2026'},{id:'blog-indonesia-haze-respiratory-cases',localPath:'2026/09/indonesia-haze-crisis-el-nino-2026/images/respiratory-cases-card-daris-ali-mufti-south-sumatra-fire-watch.jpg',unsplashUrl:'https://unsplash.com/photos/aerial-view-of-green-grass-field-ROn1Dx3eSbk',photographerName:'Daris Ali Mufti',photographerUsername:'darisalimufti',photographerUrl:'https://unsplash.com/@darisalimufti',description:'A drone view of a fire watch hut and a peat drainage canal at Muara Merang, South Sumatra, overlaid with Indonesia\u2019s wildfire related respiratory infection count as of September 9, 2026',usedIn:"Blog - Indonesia's Haze Crisis (September 2026)",thumbnailUrl:'/api/v1/blog/images/2026/09/indonesia-haze-crisis-el-nino-2026/images/respiratory-cases-card-daris-ali-mufti-south-sumatra-fire-watch.jpg',linkPath:'/blog/indonesia-haze-crisis-el-nino-2026'},{id:'blog-indonesia-haze-hotspot-count',localPath:'2026/09/indonesia-haze-crisis-el-nino-2026/images/hotspot-count-card-barkah-wibowo-sebangau-peat-swamp.jpg',unsplashUrl:'https://unsplash.com/photos/green-trees-on-gray-soil-Jsh7I8k3gso',photographerName:'Barkah Wibowo',photographerUsername:'barkahwib',photographerUrl:'https://unsplash.com/@barkahwib',description:'Blackwater peat swamp forest at Kereng Bangkirai, Sebangau National Park, Central Kalimantan, overlaid with the Indonesia-wide hotspot count for the 24 hours to the morning of September 11, 2026',usedIn:"Blog - Indonesia's Haze Crisis (September 2026)",thumbnailUrl:'/api/v1/blog/images/2026/09/indonesia-haze-crisis-el-nino-2026/images/hotspot-count-card-barkah-wibowo-sebangau-peat-swamp.jpg',linkPath:'/blog/indonesia-haze-crisis-el-nino-2026'},{id:'blog-indonesia-haze-sarawak-api',localPath:'2026/09/indonesia-haze-crisis-el-nino-2026/images/sarawak-api-card-muhamed-sukry-kuching-waterfront.jpg',unsplashUrl:'https://unsplash.com/photos/skyscrapers-rise-from-lush-green-foliage-E5tMtRO180U',photographerName:'Muhamed Sukry',photographerUsername:'drdx',photographerUrl:'https://unsplash.com/@drdx',description:'The Kuching waterfront in Sarawak, Malaysia, in clear conditions, overlaid with Serian district\u2019s peak Malaysia Air Pollutant Index reading',usedIn:"Blog - Indonesia's Haze Crisis (September 2026)",thumbnailUrl:'/api/v1/blog/images/2026/09/indonesia-haze-crisis-el-nino-2026/images/sarawak-api-card-muhamed-sukry-kuching-waterfront.jpg',linkPath:'/blog/indonesia-haze-crisis-el-nino-2026'},{id:'blog-indonesia-haze-singapore-psi',localPath:'2026/09/indonesia-haze-crisis-el-nino-2026/images/singapore-psi-card-bing-hui-yau-raffles-place.jpg',unsplashUrl:'https://unsplash.com/photos/city-buildings-near-body-of-water-during-daytime-fv0mbJsrCpk',photographerName:'Bing Hui Yau',photographerUsername:'yaubinghui',photographerUrl:'https://unsplash.com/@yaubinghui',description:'The Singapore skyline at Raffles Place in clear weather, overlaid with central Singapore\u2019s peak 24 hour Pollutant Standards Index reading on September 10, 2026',usedIn:"Blog - Indonesia's Haze Crisis (September 2026)",thumbnailUrl:'/api/v1/blog/images/2026/09/indonesia-haze-crisis-el-nino-2026/images/singapore-psi-card-bing-hui-yau-raffles-place.jpg',linkPath:'/blog/indonesia-haze-crisis-el-nino-2026'},{id:'blog-volcanic-ash-sensors-two-particles',localPath:'2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/two-particles-card-noaa21-anak-krakatau-plume.jpg',unsplashUrl:'',photographerName:'NOAA / JPSS (NOAA-21 satellite)',photographerUsername:'',photographerUrl:'',description:"NOAA-21 true colour imagery of the Anak Krakatau ash plume over the Sunda Strait, acquired September 5, 2026 at 05:48 UTC during the September 4 to 6 continuous eruption. Public domain as a work of the U.S. NOAA. Cropped by PurpleAir and overlaid with text; no colour grading applied.",usedIn:'Blog - Ash and Smoke Over Indonesia',thumbnailUrl:'/api/v1/blog/images/2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/two-particles-card-noaa21-anak-krakatau-plume.jpg',linkPath:'/blog/volcanic-ash-peat-smoke-low-cost-sensors'},{id:'blog-volcanic-ash-sensors-kilauea-validation',localPath:'2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/kilauea-validation-card-usgs-lower-east-rift-zone.jpg',unsplashUrl:'',photographerName:'U.S. Geological Survey, Hawaiian Volcano Observatory',photographerUsername:'',photographerUrl:'',description:"Aerial view of the lava channel from Fissure 22 and a gas plume in Kilauea\u2019s lower East Rift Zone, photographed by USGS on May 23, 2018 during the eruption the cited validation study covers. Overlaid with the study\u2019s 0.91 to 0.99 correlation range against reference monitors, and its finding that the sensors read up to 40 percent high before correction. Public domain as a work of the U.S. Geological Survey.",usedIn:'Blog - Ash and Smoke Over Indonesia',thumbnailUrl:'/api/v1/blog/images/2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/kilauea-validation-card-usgs-lower-east-rift-zone.jpg',linkPath:'/blog/volcanic-ash-peat-smoke-low-cost-sensors'},{id:'blog-volcanic-ash-sensors-ash-cases',localPath:'2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/ash-respiratory-cases-card-william-firmansyah-jakarta-monas-float.jpg',unsplashUrl:'https://unsplash.com/photos/skyscrapers-rise-above-a-green-park-on-a-h
636azy-day-CQn9bQ17Ers',photographerName:'William Firmansyah',photographerUsername:'williamf15',photographerUrl:'https://unsplash.com/@williamf15',description:"The Monas area of Central Jakarta on a hazy day, overlaid with the ash-affected respiratory infection count for Indonesia as of September 8, 2026. The photograph shows routine city haze and predates the eruption; it does not document the ashfall.",usedIn:'Blog - Ash and Smoke Over Indonesia',thumbnailUrl:'/api/v1/blog/images/2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/ash-respiratory-cases-card-william-firmansyah-jakarta-monas-float.jpg',linkPath:'/blog/volcanic-ash-peat-smoke-low-cost-sensors'},{id:'blog-volcanic-ash-sensors-global-study',localPath:'2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/global-sensor-study-card-nathaniel-filberto-south-jakarta-float.jpg',unsplashUrl:'https://unsplash.com/photos/a-view-of-a-city-with-tall-buildings-sUthUdpbTww',photographerName:'Nathaniel Filberto',photographerUsername:'nathaniel_feel',photographerUrl:'https://unsplash.com/@nathaniel_feel',description:"South Jakarta high-rises under a polluted sky, overlaid with the 1,013-sensor global PurpleAir evaluation published in Aerosol Science and Technology in June 2026. The figure is global in scope and carries no claim about conditions in the photograph.",usedIn:'Blog - Ash and Smoke Over Indonesia',thumbnailUrl:'/api/v1/blog/images/2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/global-sensor-study-card-nathaniel-filberto-south-jakarta-float.jpg',linkPath:'/blog/volcanic-ash-peat-smoke-low-cost-sensors'},{id:'blog-volcanic-ash-sensors-map-gradient',localPath:'2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/sensor-map-gradient-card-purpleair-map-indonesia.jpg',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:"The PurpleAir map over Sumatra and Central Kalimantan on September 18, 2026 with the US EPA conversion layer selected, showing sensors reading up to 1,605 over the peat fires and 55 to 117 downwind over Sumatra and Singapore. Marker labels are US EPA AQI under the 2024 breakpoints; 1,605 sits past the scale\u2019s defined top of 500 and is an extrapolation, implying roughly 880 micrograms per cubic meter. Basemap \xa9 MapTiler, \xa9 OpenStreetMap.",usedIn:'Blog - Ash and Smoke Over Indonesia',thumbnailUrl:'/api/v1/blog/images/2026/09/volcanic-ash-peat-smoke-low-cost-sensors/images/sensor-map-gradient-card-purpleair-map-indonesia.jpg',linkPath:'/blog/volcanic-ash-peat-smoke-low-cost-sensors'},{id:'blog-oregon-record-fire-season-2026-stories',localPath:'2026/08/oregon-record-fire-season-2026-stories/images/dave-hoefler-smoke-over-trees.jpg',unsplashUrl:'https://unsplash.com/photos/landscape-photography-of-trees-near-mountains-nyhI63n7vpQ',photographerName:'Dave Hoefler',photographerUsername:'iamthedave',photographerUrl:'https://unsplash.com/@iamthedave',description:'Wildfire smoke layered over forested ridges in the early morning light',usedIn:'Blog - Oregon\u2019s Record Fire Season: Four Stories From the People Living It',thumbnailUrl:'/api/v1/blog/images/2026/08/oregon-record-fire-season-2026-stories/images/dave-hoefler-smoke-over-trees.jpg',linkPath:'/blog/oregon-record-fire-season-2026-stories'},{id:'blog-oregon-record-fire-season-engines',localPath:'2026/08/oregon-record-fire-season-2026-stories/images/bench-fire-engines-dirt-road.jpg',unsplashUrl:'',photographerName:'Oregon State Fire Marshal',photographerUsername:'',photographerUrl:'https://inciweb.wildfire.gov/incident-photos-gallery/orwsa-bench',description:'Fire engines moving into position on a gravel road during the Bench Fire',usedIn:'Blog - Oregon\u2019s Record Fire Season: Four Stories From the People Living It',thumbnailUrl:'/api/v1/blog/images/2026/08/oregon-record-fire-season-2026-stories/images/bench-fire-engines-dirt-road.jpg',linkPath:'/blog/oregon-record-fire-season-2026-stories'},{id:'blog-oregon-record-fire-season-forest-floor',localPath:'2026/08/oregon-record-fire-season-2026-stories/images/bench-fire-smoky-forest-burning-trunk.jpg',unsplashUrl:'',photographerName:'Oregon State Fire Marshal',photographerUsername:'',photographerUrl:'https://inciweb.wildfire.gov/incident-photos-gallery/orwsa-bench',description:'Smoke and flame on the forest floor near Lake Billy Chinook during the Bench Fire',usedIn:'Blog - Oregon\u2019s Record Fire Season: Four Stories From the People Living It',thumbnailUrl:'/api/v1/blog/images/2026/08/oregon-rec
636ord-fire-season-2026-stories/images/bench-fire-smoky-forest-burning-trunk.jpg',linkPath:'/blog/oregon-record-fire-season-2026-stories'},{id:'blog-oregon-record-fire-season-watercraft',localPath:'2026/08/oregon-record-fire-season-2026-stories/images/bench-fire-firefighters-watercraft.jpg',unsplashUrl:'',photographerName:'Oregon State Fire Marshal',photographerUsername:'',photographerUrl:'https://inciweb.wildfire.gov/incident-photos-gallery/orwsa-bench',description:'Firefighters offloading gear from a sheriff boat onto the shore of Lake Billy Chinook',usedIn:'Blog - Oregon\u2019s Record Fire Season: Four Stories From the People Living It',thumbnailUrl:'/api/v1/blog/images/2026/08/oregon-record-fire-season-2026-stories/images/bench-fire-firefighters-watercraft.jpg',linkPath:'/blog/oregon-record-fire-season-2026-stories'},{id:'blog-oregon-record-fire-season-map',localPath:'2026/08/oregon-record-fire-season-2026-stories/images/purpleair-map-oregon-2026-08-02.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'PurpleAir map showing US EPA PM2.5 AQI across Oregon on the evening of August 2, 2026',usedIn:'Blog - Oregon\u2019s Record Fire Season: Four Stories From the People Living It',thumbnailUrl:'/api/v1/blog/images/2026/08/oregon-record-fire-season-2026-stories/images/purpleair-map-oregon-2026-08-02.png',linkPath:'/blog/oregon-record-fire-season-2026-stories'},{id:'blog-checking-air-quality-before-summer-travel',localPath:'2027/05/checking-air-quality-before-summer-travel/images/florian-schindler-zion-road-trip.jpg',unsplashUrl:'https://unsplash.com/photos/driving-towards-rocky-mountains-under-clear-blue-sky-dC59M-wLq_g',photographerName:'Florian Schindler',photographerUsername:'flo_raw',photographerUrl:'https://unsplash.com/@flo_raw',description:'A car on a scenic highway heading toward red rock mountains under a clear blue sky',usedIn:'Blog - Checking Air Quality Before Summer Travel',thumbnailUrl:'/api/v1/blog/images/2027/05/checking-air-quality-before-summer-travel/images/florian-schindler-zion-road-trip.jpg',linkPath:'/blog/checking-air-quality-before-summer-travel'},{id:'blog-may-the-fourth-air-quality-aqi',localPath:'2026/05/may-the-fourth-be-with-you-air-quality-aqi/images/superneox-lightsaber.jpg',unsplashUrl:'https://unsplash.com/photos/3nYOPPNA2yQ',photographerName:'superneox lightsaber',photographerUsername:'superneox',photographerUrl:'https://unsplash.com/@superneox',description:'Green and white lightsaber with red tassel',usedIn:'Blog - May the Fourth Be With You: AQI',thumbnailUrl:'/api/v1/blog/images/2026/05/may-the-fourth-be-with-you-air-quality-aqi/images/superneox-lightsaber.jpg',linkPath:'/blog/may-the-fourth-be-with-you-a-jedis-guide-to-the-aqi'},{id:'blog-how-to-use-purpleair-map-historical-data',localPath:'2026/05/how-to-use-purpleair-map-historical-data/images/compagnons-laptop-map.jpg',unsplashUrl:'https://unsplash.com/photos/21U9Ycoxlcw',photographerName:'Compagnons',photographerUsername:'sigmund',photographerUrl:'https://unsplash.com/@sigmund',description:'Laptop displaying a map',usedIn:'Blog - How to View Historical Air Quality on the PurpleAir Map',thumbnailUrl:'/api/v1/blog/images/2026/05/how-to-use-purpleair-map-historical-data/images/compagnons-laptop-map.jpg',linkPath:'/blog/how-to-use-purpleair-map-historical-data'},{id:'blog-how-to-read-purpleair-sensor-data',localPath:'2026/06/how-to-read-purpleair-sensor-data/images/luke-chesser-data-graphs.jpg',unsplashUrl:'https://unsplash.com/photos/JKUTrJ4vK00',photographerName:'Luke Chesser',photographerUsername:'lukechesser',photographerUrl:'https://unsplash.com/@lukechesser',description:'Data graphs on a laptop screen',usedIn:'Blog - How to Read Your PurpleAir Sensor Data',thumbnailUrl:'/api/v1/blog/images/2026/06/how-to-read-purpleair-sensor-data/images/luke-chesser-data-graphs.jpg',linkPath:'/blog/how-to-read-purpleair-sensor-data'},{id:'blog-hillsborough-county-community-air-monitoring-network',localPath:'2026/06/hillsborough-county-community-air-monitoring-network/images/camn-partners-2026-summit.jpg',unsplashUrl:'',photographerName:'Plan Hillsborough / CAMN Coalition',photographerUsername:'',photographerUrl:'https://planhillsborough.org',description:'CAMN partners group photo at the 2026 Coalition for Community Air Monitoring Summit',usedIn:'Blog - Community Spotlight: Hillsborough County Community Air Monitoring Network',thumbnailUrl:'/api/v1/blog/images/2026/06/hillsborough-county-community-air-monitoring-network/images/camn-partners-2026-summit.jpg',linkPath:'/blog/community-spotlight-hillsborough-countys-community-air-monitoring-network'},{id:'blog-interview-dybwad-student',localPath:'2026/04/interview-with-purpleair-founder-adrian-dybwad/images/student-air-quality-interview.jpg',unsplashUrl:'',photographerName:'AI-generated',photographerUsername:'',photographerUrl:'',description:'Student studying air quality data at a desk with an air quality sensor',usedIn:'Blog - An Interview with PurpleAir Founder Adrian Dybwad',thumbnailUrl:'/api/v1/blog/images/2026/04/interview-with-purpleair-founder-adrian-dybwad/images/student-air-quality-interview.jpg',linkPath:'/blog/an-interview-with-purpleair-founder-adrian-dybwad'},{id:'blog-air-quality-in-schools',localPath:'2026/04/air-quality-in-schools/images/school-classroom-air-quality.jpg',unsplashUrl:'',photographerName:'AI-generated',photographerUsername:'',photographerUrl:'',description:'Modern school classroom with an air quality sensor on the windowsill',usedIn:'Blog - Air Quality in Schools: Why Monitoring Matters for Students and Staff',thumbnailUrl:'/api/v1/blog/images/2026/04/air-quality-in-schools/images/school-classroom-air-quality.jpg',linkPath:'/blog/air-quality-in-schools-why-monitoring-matters-for-students-and-staff'},{id:'blog-community-air-monitoring-neighborhood',localPath:'2026/04/community-air-monitoring-neighbors-mapping-air-quality/images/neighborhood-air-monitoring.jpg',unsplashUrl:'',photographerName:'AI-generated',photographerUsername:'',photographerUrl:'',description:'Aerial view of a residential neighborhood on a clear day',usedIn:'Blog - Community Air Monitoring: How Neighbors Are Mapping Their Own Air Quality',thumbnailUrl:'/api/v1/blog/images/2026/04/community-air-monitoring-neighbors-mapping-air-quality/images/neighborhood-air-monitoring.jpg',linkPath:'/blog/community-air-monitoring-how-neighbors-are-mapping-their-own-air-quality'},{id:'blog-global-fire-season-2026',localPath:'2026/05/global-fire-season-2026-already-breaking-records/images/alex-widmer-smoky-mountain-wildfire.jpg',unsplashUrl:'https://unsplash.com/photos/Kw-S5Jt2lHU',photographerName:'Alex Widmer',photographerUsername:'alexwidmer',photographerUrl:'https://unsplash.com/@alexwidmer',description:'Aerial view of wildfire smoke rising over a mountain ridge near the Great Smoky Mountains',usedIn:'Blog - The 2026 Fire Season Is Already Breaking Records',thumbnailUrl:'https://images.unsplash.com/photo-1495471336889-2b8705a5c612?w=240&h=160&fit=crop&q=60',linkPath:'/blog/the-2026-fire-season-is-already-breaking-records'},{id:'blog-whats-in-wildfire-smoke-pm25',localPath:'2026/06/whats-in-wildfire-smoke-pm25/images/johel-espana-hazy-beirut-skyline.jpg',unsplashUrl:'https://unsplash.com/photos/KxKcUhip43Y',photographerName:'Johel Espana',photographerUsername:'johelespana',photographerUrl:'https://unsplash.com/@johelespana',description:'City skyline at sunset with a hazy orange sky over Beirut, Lebanon',usedIn:"Blog - What's Actually in Wildfire Smoke (And What You Can Do About It)",thumbnailUrl:'https://images.unsplash.com/photo-1761025398335-46ba282030fd?w=240&h=160&fit=crop&q=60',linkPath:'/blog/whats-actually-in-wildfire-smoke-and-what-you-can-do-about-it'},{id:'blog-aqi-scale-updates-canada-us-brazil',localPath:'2026/07/aqi-scale-updates-canada-us-brazil/images/three-aqi-scales-hero.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'PurpleAir graphic showing the Canadian AQHI+, US EPA AQI, and Brazilian IQAr PM2.5 color scales',usedIn:'Blog - A Clean Air Award and Three Updated AQI Scales',thumbnailUrl:'/api/v1/blog/images/2026/07/aqi-scale-updates-canada-us-brazil/images/three-aqi-scales-hero.png',linkPath:'/blog/aqi-scale-updates-canada-us-brazil'},{id:'blog-aca-clean-air-award-2026',localPath:'2026/07/aqi-scale-updates-canada-us-brazil/images/aca-clean-air-award-2026.png',unsplashUrl:'',photographerName:'Alberta Capital Airshed',photographerUsername:'',photographerUrl:'https://capitalairshed.ca/clean-air-awards/',description:'Alberta Capital Airshed 2026 Clean Air Award for Innovation and Application of Technology, presented to PurpleAir',usedIn:'Blog - A Clean Air Award and Three Updated AQI Scales',thumbnailUrl:'/api/v1/blog/images/2026/07/aqi-scale-updates-canada-us-brazil/images/aca-clean-air-award-2026.png',linkPath:'/blog/aqi-scale-updates-canada-us-brazil'}
636,{id:'blog-new-purpleair-website-and-map',localPath:'2026/07/new-purpleair-website-and-map/images/purpleair-new-home-hero-2026-07-30.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'Screenshot of the redesigned PurpleAir homepage with a "Know Your Air" banner over a mountain landscape',usedIn:'Blog - The New PurpleAir Website and Map',thumbnailUrl:'/api/v1/blog/images/2026/07/new-purpleair-website-and-map/images/purpleair-new-home-hero-2026-07-30.png',linkPath:'/blog/new-purpleair-website-and-map'},{id:'blog-store-ordering-before-after',localPath:'2026/07/new-purpleair-website-and-map/images/store-ordering-before-after-2026-08-01.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'Side-by-side comparison of the previous mixed Products grid and the new filter-by-sensor control',usedIn:'Blog - The New PurpleAir Website and Map',thumbnailUrl:'/api/v1/blog/images/2026/07/new-purpleair-website-and-map/images/store-ordering-before-after-2026-08-01.png',linkPath:'/blog/new-purpleair-website-and-map'},{id:'blog-store-category-pages',localPath:'2026/07/new-purpleair-website-and-map/images/store-category-pages-2026-08-01.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'Side-by-side comparison of the new Air Quality Sensors and Replacement Parts store pages',usedIn:'Blog - The New PurpleAir Website and Map',thumbnailUrl:'/api/v1/blog/images/2026/07/new-purpleair-website-and-map/images/store-category-pages-2026-08-01.png',linkPath:'/blog/new-purpleair-website-and-map'},{id:'blog-managing-your-purpleair-sensors',localPath:'2026/08/managing-your-purpleair-sensors/images/my-sensors-hero-2026-08-01.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'Screenshot of the My Sensors page showing registered sensors in card view with AQI, temperature, humidity, and Wi-Fi status',usedIn:'Blog - A Tour of My Sensors',thumbnailUrl:'/api/v1/blog/images/2026/08/managing-your-purpleair-sensors/images/my-sensors-hero-2026-08-01.png',linkPath:'/blog/managing-your-purpleair-sensors'},{id:'blog-managing-your-purpleair-sensors-detail',localPath:'2026/08/managing-your-purpleair-sensors/images/my-sensors-detail-2026-08-01.png',unsplashUrl:'',photographerName:'PurpleAir',photographerUsername:'',photographerUrl:'',description:'Screenshot of the PurpleAir sensor detail view showing channel readings, status, hardware, location, and API access',usedIn:'Blog - A Tour of My Sensors',thumbnailUrl:'/api/v1/blog/images/2026/08/managing-your-purpleair-sensors/images/my-sensors-detail-2026-08-01.png',linkPath:'/blog/managing-your-purpleair-sensors'},{id:'blog-wildfire-smoke-socal',localPath:'2026/05/wildfire-smoke-socal-protect-yourself/images/jessica-christian-la-wildfire-smoke.jpg',unsplashUrl:'https://unsplash.com/photos/iX1UVhJi1Jw',photographerName:'Jessica Christian',photographerUsername:'lovesquish',photographerUrl:'https://unsplash.com/@lovesquish',description:'Wildfire smoke plume rising over the Los Angeles skyline with palm trees and hills',usedIn:'Blog - Wildfire Smoke Is Hitting Southern California: How to Protect Yourself',thumbnailUrl:'https://images.unsplash.com/photo-1736472073980-094e333ef417?w=240&h=160&fit=crop&q=60',linkPath:'/blog/wildfire-smoke-is-hitting-southern-california-how-to-protect-yourself'},{id:'blog-hero-valley-dusk',localPath:'/assets/images/hero/blog-valley-dusk.jpg',unsplashUrl:'',photographerName:'Amanda Hawkins',photographerUsername:'',photographerUrl:'',description:'Wildfire smoke plume over a valley at dusk',usedIn:'Blog Screen - Hero Background',thumbnailUrl:'',linkPath:'/blog'},{id:'faq-meadow-wildflowers',localPath:'/assets/images/hero/faq-meadow-wildflowers.jpg',unsplashUrl:'https://unsplash.com/photos/4Tw-Gu5elWA',photographerName:'Nastia Petruk',photographerUsername:'mineral_of_demon',photographerUrl:'https://unsplash.com/@mineral_of_demon',description:'Sunlight illuminates a meadow with wildflowers at dawn',usedIn:'FAQ Screen - Hero Backgroun
636d',thumbnailUrl:'https://images.unsplash.com/photo-1755690042574-49ff5c3bfe96?w=240&h=160&fit=crop&q=60',linkPath:'/faq'},{id:'community-park-gathering',localPath:'/assets/images/hero/community-park-gathering.jpg',unsplashUrl:'https://unsplash.com/photos/96DW4Pow3qI',photographerName:'Ben Duchac',photographerUsername:'benshares',photographerUrl:'https://unsplash.com/@benshares',description:'People sitting on grass field at Brooklyn Bridge Park during golden hour',usedIn:'Community Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1455734729978-db1ae4f687fc?w=240&h=160&fit=crop&q=60',linkPath:'/community'},{id:'api-fiber-optics',localPath:'/assets/images/hero/api-fiber-optics.jpg',unsplashUrl:'https://unsplash.com/photos/WN0alo23Yhg',photographerName:'S A',photographerUsername:'sraze',photographerUrl:'https://unsplash.com/@sraze',description:'Blue fiber optic cables radiating outwards against a dark background',usedIn:'API Documentation Screen - Hero Background',thumbnailUrl:'https://images.unsplash.com/photo-1742774101928-f7e92a471c1b?w=240&h=160&fit=crop&q=60',linkPath:'/api'}]},538,[]);
637__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ImageGallery=function({images:e,layout:o,viewerLabel:b,preferredImageUrl:h=null}){const[f,y]=(0,t.useState)(()=>I(e,h)),[S,O]=(0,t.useState)(!1),[x,C]=(0,t.useState)(()=>new Set),[E]=(0,t.useState)(()=>new l.default.Value(0)),w=(0,t.useRef)(new Set),z=e.length,U=Math.min(Math.max(f,0),Math.max(z-1,0)),_=e[U]??null,j=_?.displayUrl??null,A=null!=j&&x.has(j),M=x.size>0,T=e.map(e=>({accessibilityLabel:e.accessibilityLabel,fullSizeUrl:e.fullSizeUrl})),N='primary-with-thumbnails'===o;(0,t.useLayoutEffect)(()=>{N&&l.default.timing(E,{toValue:A?1:0,duration:A?180:0,useNativeDriver:!1}).start()},[U,E,A,N]);const v=(0,t.useCallback)(()=>{null!=j&&C(e=>e.has(j)?e:new Set(e).add(j))},[j]);(0,t.useEffect)(()=>{if(N&&M)for(const t of e)null==t.displayUrl||w.current.has(t.displayUrl)||(w.current.add(t.displayUrl),n.default.prefetch(t.displayUrl))},[M,e,N]),(0,t.useEffect)(()=>{N&&M&&null!=_&&(w.current.has(_.fullSizeUrl)||(w.current.add(_.fullSizeUrl),n.default.prefetch(_.fullSizeUrl)))},[M,_,N]);const D=e=>{y(e),'thumbnails-only'===o&&O(!0)};return(0,p.jsxs)(p.Fragment,{children:[N&&null!=_&&(0,p.jsxs)(u.default,{accessibilityLabel:"Zoom image",accessibilityRole:"button",activeOpacity:.9,onPress:()=>{O(!0)},children:[(0,p.jsxs)(c.default,{style:L.mainImageFrame,children:[(0,p.jsx)(n.default,{accessibilityElementsHidden:!0,importantForAccessibility:"no",resizeMode:"contain",source:{uri:_.thumbnailUrl},style:L.mainImageLayer,testID:"galleryMainPlaceholder"}),(0,p.jsx)(l.default.Image,{accessibilityLabel:_.accessibilityLabel,onLoad:v,resizeMode:"contain",source:{uri:j??_.thumbnailUrl},style:[L.mainImageLayer,{opacity:E}]})]}),(0,p.jsx)(c.default,{style:L.zoomHint,children:(0,p.jsx)(s.default,{style:L.zoomHintText,children:"Tap to zoom"})})]}),('thumbnails-only'===o||z>1)&&(0,p.jsx)(c.default,{style:[L.thumbnailRow,'thumbnails-only'===o&&L.attachmentRow],children:e.map((e,t)=>(0,p.jsx)(u.default,{accessibilityLabel:e.thumbnailAccessibilityLabel,accessibilityRole:"button",onPress:()=>{D(t)},style:'thumbnails-only'===o?L.attachmentButton:void 0,children:(0,p.jsx)(n.default,{accessibilityElementsHidden:'thumbnails-only'===o,resizeMode:"contain",source:{uri:e.thumbnailUrl},style:[L.thumbnail,'thumbnails-only'===o&&L.attachmentThumbnail,N&&t===U&&L.thumbnailSelected]})},e.id))}),S&&(0,p.jsx)(R.ImageLightbox,{accessibilityLabel:b,images:T,onClose:()=>{O(!1)},onIndexChange:y,selectedIndex:U})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),s=e(r(d[4])),u=e(r(d[5])),c=e(r(d[6])),b=r(d[7]),h=r(d[8]),f=r(d[9]),y=r(d[10]),S=r(d[11]),R=r(d[12]),p=r(d[13]);function I(e,t){if(null==t||''===t)return 0;const l=e.findIndex(e=>(0,S.imageUrlsEquivalent)(e.id,t));return l>=0?l:0}const L=(0,y.createStyles)({attachmentButton:{borderColor:b.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,padding:2},attachmentRow:{marginTop:h.SPACING.MD}
637,attachmentThumbnail:{borderRadius:7,borderWidth:0,height:80,width:80},mainImageFrame:{aspectRatio:1,backgroundColor:b.COLORS.BG_NEAR_WHITE,borderRadius:16,maxHeight:500,overflow:'hidden',position:'relative',width:'100%'},mainImageLayer:Object.assign({},o.default.absoluteFillObject,{height:'100%',width:'100%'}),thumbnail:{backgroundColor:b.COLORS.BG_NEAR_WHITE,borderColor:b.COLORS.BORDER,borderRadius:8,borderWidth:2,height:64,width:64},thumbnailRow:{flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM,marginTop:h.SPACING.MD},thumbnailSelected:{borderColor:b.COLORS.ACTION_PRIMARY},zoomHint:{backgroundColor:b.COLORS.OVERLAY_DARK_50,borderRadius:12,bottom:12,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.XS,position:'absolute',right:12},zoomHintText:{color:b.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.XS,fontWeight:'500'}})},539,[34,271,328,42,222,488,276,490,493,494,489,540,541,104]);
638__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.imageUrlsEquivalent=function(n,t){if(n===t)return!0;try{const u=new URL(n),a=new URL(t);return u.origin===a.origin&&u.pathname===a.pathname}catch{return!1}}},540,[]);
639__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ImageLightbox=function({accessibilityLabel:e,images:x,onClose:y,onIndexChange:v,selectedIndex:R}){const j=(0,t.useRef)(null),{height:E,width:_}=(0,h.default)(),[k,T]=(0,t.useState)(()=>new Map),D=_<p.BREAKPOINTS.tablet,z=Math.min(Math.max(R,0),Math.max(x.length-1,0)),N=x[z]??null,A=x.length>1,F=(0,t.useCallback)(()=>{v(R>0?R-1:x.length-1)},[x.length,v,R]),V=(0,t.useCallback)(()=>{v(R<x.length-1?R+1:0)},[x.length,v,R]),H=(0,t.useMemo)(()=>s.default.create({onStartShouldSetPanResponder:()=>!0,onStartShouldSetPanResponderCapture:()=>!0,onMoveShouldSetPanResponder:(e,t)=>A&&P(t.dx,t.dy,C),onPanResponderRelease:(e,t)=>{A&&P(t.dx,t.dy,L)&&(t.dx<0?V():F())},onPanResponderTerminationRequest:()=>!1}),[A,V,F]),B=(0,t.useCallback)(()=>{j.current?.focus()},[]);if((0,t.useEffect)(()=>{const e=setTimeout(B,0);return()=>{clearTimeout(e)}},[B]),(0,t.useEffect)(()=>{if('undefined'==typeof document)return;const e=e=>{'Escape'===e.key?(e.preventDefault(),y()):'ArrowLeft'===e.key?(e.preventDefault(),F()):'ArrowRight'===e.key&&(e.preventDefault(),V())};return document.addEventListener('keydown',e),()=>{document.removeEventListener('keydown',e)}},[y,V,F]),(0,t.useEffect)(()=>{let e=!0;for(const t of x){const{fullSizeUrl:o}=t;k.has(o)||n.default.getSize(o,(t,n)=>{if(!e||n<=0||t<=0||!Number.isFinite(n)||!Number.isFinite(t))return;const s=t/n;T(e=>{if(e.has(o))return e;const t=new Map(e);return t.set(o,s),t})},()=>{})}return()=>{e=!1}},[k,x]),0===x.length)return null;if(null==N)return null;const G=k.get(N.fullSizeUrl),U=null==G?null:O(G,_,E,D);return(0,S.jsx)(o.default,{animationType:"fade",onRequestClose:y,presentationStyle:"overFullScreen",transparent:!0,visible:!0,children:(0,S.jsx)(l.default,{accessible:!1,onPress:y,style:M.overlay,testID:"image-lightbox-backdrop",children:(0,S.jsxs)(f.default,{accessibilityLabel:e,accessibilityViewIsModal:!0,style:M.viewer,children:[(0,S.jsx)(u.default,{ref:j,accessibilityLabel:"Close image viewer",accessibilityRole:"button",onPress:e=>{e.stopPropagation(),y()},style:M.closeButton,children:(0,S.jsx)(f.default,{accessibilityElementsHidden:!0,testID:"image-lightbox-close-icon",children:(0,S.jsx)(I.CloseIcon,{size:20,color:b.COLORS.TEXT_INVERSE})})}),A&&!D&&(0,S.jsx)(f.default,{style:[M.navigationRail,M.navigationLeft],testID:"image-lightbox-navigation-left",children:(0,S.jsx)(w,{direction:"left",onPress:F})}),null!=U&&(0,S.jsx)(f.default,Object.assign({},H.panHandlers,{style:[M.imageFrame,U],testID:"image-lightbox-content",children:(0,S.jsx)(n.default,{accessibilityLabel:N.accessibilityLabel,resizeMode:"contain",source:{uri:N.fullSizeUrl},style:M.image})})),A&&(D?(0,S.jsxs)(l.default,{accessible:!1,onPress:e=>{e.stopPropagation()},style:M.phoneNavigation,testID:"image-lightbox-phone-navigation",children:[(0,S.jsx)(w,{direction:"left",onPress:F}),(0,S.jsxs)(c.default,{accessibilityLiveRegion:"polite",style:M.counter,children:[z+1," / ",x.length]}),(0,S.jsx)(w,{direction:"right",onPress:V})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.default,{style:[M.navigationRail,M.navigationRight],testID:"image-lightbox-navigation-right",children:(0,S.jsx)(w,{direction:"right",onPress:V})}),(0,S.jsxs)(c.default,{accessibilityLiveRegion:"polite",style:[M.counter,M.desktopCounter],children:[z+1," / ",x.length]})]}))]})})})};var t=r(d[0]),n=(e(r(d[1])),e(r(d[2])),e(r(d[3]))),o=e(r(d[4])),s=e(r(d[5]));r(d[6]);var l=e(r(d[7])),c=e(r(d[8])),u=e(r(d[9])),h=e(r(d[10])),f=e(r(d[11])),b=r(d[12]),x=r(d[13]),y=r(d[14]),p=r(d[15]),v=r(d[16]),R=r(d[17]),I=r(d[18]),S=r(d[19]);const j=220,C=12,L=48,E=1.5;function P(e,t,n){const o=Math.abs(e);return o>=n&&o>Math.abs(t)*E}function O(e,t,n,o){const s=Math.min(t*(o?.9:.8),900),l=Math.min(o?Math.max(n-j,1):.8*n,900),c=s/e;return c<=l?{height:c,width:s}:{height:l,width:l*e}}function w({direction:e,onPress:t}){const n='left'===e?'Previous image':'Next image';return(0,S.jsx)(u.default,{accessibilityLabel:n,accessibilityRole:"button",onPress:e=>{e.stopPropagation(),t()},style:M.navigationButton,children:(0,S.jsx)(f.default,{accessibilityElementsHidden:!0,testID:`image-lightbox-chevron-${e}
639`,children:(0,S.jsx)(R.ChevronIcon,{color:b.COLORS.TEXT_INVERSE,direction:e,size:32})})})}const M=(0,v.createStyles)({closeButton:{alignItems:'center',backgroundColor:b.COLORS.OVERLAY_LIGHT_20,borderRadius:20,height:40,justifyContent:'center',position:'absolute',right:24,top:24,width:40,zIndex:10},counter:{color:b.COLORS.TEXT_INVERSE,fontSize:y.FONT_SIZE.MD,fontWeight:'500',minWidth:48,textAlign:'center'},desktopCounter:{bottom:24,position:'absolute'},image:{height:'100%',width:'100%'},imageFrame:{maxHeight:900,maxWidth:900},navigationLeft:{left:16},navigationButton:{alignItems:'center',backgroundColor:b.COLORS.OVERLAY_LIGHT_20,borderRadius:24,height:48,justifyContent:'center',width:48},navigationRail:{bottom:0,justifyContent:'center',position:'absolute',top:0,zIndex:10},navigationRight:{right:16},overlay:{alignItems:'center',backgroundColor:b.COLORS.OVERLAY_DARK_90,flex:1,justifyContent:'center'},phoneNavigation:{alignItems:'center',bottom:24,flexDirection:'row',gap:x.SPACING.LG,position:'absolute',zIndex:10},viewer:{alignItems:'center',flex:1,justifyContent:'center',width:'100%'}})},541,[34,542,543,328,544,549,95,369,222,488,552,276,490,493,494,553,489,554,555,104]);
640__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var e,n=r(d[0]);function t(){return new Promise((e,n)=>{e(!0)})}var o=((e=n)&&e.__esModule?e:{default:e}).default&&'function'==typeof window.matchMedia?window.matchMedia('(prefers-reduced-motion: reduce)'):null;var u={},c={isScreenReaderEnabled:t,isReduceMotionEnabled:function(){return new Promise((e,n)=>{e(!o||o.matches)})},fetch:t,addEventListener:function(e,n){if('reduceMotionChanged'===e){if(!o)return;var t=e=>{n(e.matches)};s=t,null!=o&&(null!=o.addEventListener?o.addEventListener('change',s):o.addListener(s)),u[n]=t}var s;return{remove:()=>c.removeEventListener(e,n)}},setAccessibilityFocus:function(e){},announceForAccessibility:function(e){},removeEventListener:function(e,n){if('reduceMotionChanged'===e){var t=u[n];if(!t||!o)return;c=t,null!=o&&(null!=o.removeEventListener?o.removeEventListener('change',c):o.removeListener(c))}var c}},s=c},542,[39]);
641__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=t=>{throw new Error("findNodeHandle is not supported on web. Use the ref property on the component instead.")}},543,[]);
642__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _}});var t=e(r(_d[0])),n=e(r(_d[1])),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),o=e(r(_d[3])),l=e(r(_d[4])),s=e(r(_d[5])),f=e(r(_d[6])),c=["animationType","children","onDismiss","onRequestClose","onShow","transparent","visible"],d=0,v=[],p={};function b(){if(0!==v.length){var e=v[v.length-1];v.forEach(t=>{t in p&&p[t](t===e)})}}function h(e){e in p&&(p[e](!1),delete p[e]);var t=v.indexOf(e);-1!==t&&(v.splice(t,1),b())}function y(e,t){h(e),v.push(e),p[e]=t,b()}var _=u.forwardRef((e,v)=>{var p=e.animationType,b=e.children,_=e.onDismiss,E=e.onRequestClose,O=e.onShow,j=e.transparent,w=e.visible,C=void 0===w||w,D=(0,n.default)(e,c),M=u.useMemo(()=>d++,[]),P=u.useState(!1),R=P[0],S=P[1],k=u.useCallback(()=>{h(M),_&&_()},[M,_]),q=u.useCallback(()=>{y(M,S),O&&O()},[M,O]);return u.useEffect(()=>()=>h(M),[M]),u.createElement(o.default,null,u.createElement(l.default,{animationType:p,onDismiss:k,onShow:q,visible:C},u.createElement(f.default,{active:R},u.createElement(s.default,(0,t.default)({},D,{active:R,onRequestClose:E,ref:v,transparent:j}),b))))})},544,[27,43,34,545,546,547,548]);
643__d(function(g,r,i,a,m,_e,_d){"use strict";
643Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return d}});var e,t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=r(_d[1]),u=r(_d[2]),c=(e=u)&&e.__esModule?e:{default:e};var d=function(e){var u=e.children,d=t.useRef(null);if(c.default&&!d.current){var o=document.createElement('div');o&&document.body&&(document.body.appendChild(o),d.current=o)}return t.useEffect(()=>{if(c.default)return()=>{document.body&&d.current&&(document.body.removeChild(d.current),d.current=null)}},[]),d.current&&c.default?(0,n.createPortal)(u,d.current):null}},545,[34,36,39]);
644__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var n=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),t=e(r(_d[1])),o=e(r(_d[2]));function u(e,n){return'slide'===e?n?s:f:'fade'===e?n?d:l:n?c.container:c.hidden}var c=t.default.create({container:{position:'fixed',top:0,right:0,bottom:0,left:0,zIndex:9999},animatedIn:{animationDuration:"250ms",animationTimingFunction:'cubic-bezier(0.215, 0.61, 0.355, 1)'},animatedOut:{pointerEvents:'none',animationDuration:"250ms",animationTimingFunction:'cubic-bezier(0.47, 0, 0.745, 0.715)'},fadeIn:{opacity:1,animationKeyframes:{'0%':{opacity:0},'100%':{opacity:1}}},fadeOut:{opacity:0,animationKeyframes:{'0%':{opacity:1},'100%':{opacity:0}}},slideIn:{transform:'translateY(0%)',animationKeyframes:{'0%':{transform:'translateY(100%)'},'100%':{transform:'translateY(0%)'}}},slideOut:{transform:'translateY(100%)',animationKeyframes:{'0%':{transform:'translateY(0%)'},'100%':{transform:'translateY(100%)'}}},hidden:{opacity:0}}),s=[c.container,c.animatedIn,c.slideIn],f=[c.container,c.animatedOut,c.slideOut],d=[c.container,c.animatedIn,c.fadeIn],l=[c.container,c.animatedOut,c.fadeOut],y=function(e){var t=e.animationType,s=e.children,f=e.onDismiss,d=e.onShow,l=e.visible,y=n.useState(!1),p=y[0],b=y[1],O=n.useRef(!1),v=n.useRef(!1),h=t&&'none'!==t,I=n.useCallback(e=>{e&&e.currentTarget!==e.target||(l?d&&d():b(!1))},[d,l]);return n.useEffect(()=>{v.current&&!p&&f&&f(),v.current=p},[p,f]),n.useEffect(()=>{l&&b(!0),l===O.current||h||I(),O.current=l},[h,l,I]),p||l?(0,o.default)('div',{style:p?u(t,l):c.hidden,onAnimationEnd:I,children:s}):null}},546,[34,42,223]);
645__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return p}});var t=e(r(_d[0])),n=e(r(_d[1])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=e(r(_d[3])),l=e(r(_d[4])),d=e(r(_d[5])),c=["active","children","onRequestClose","transparent"],f=o.forwardRef((e,l)=>{var f=e.active,p=e.children,v=e.onRequestClose,b=e.transparent,y=(0,n.default)(e,c);o.useEffect(()=>{if(d.default){var e=e=>{f&&'Escape'===e.key&&(e.stopPropagation(),v&&v())};return document.addEventListener('keyup',e,!1),()=>document.removeEventListener('keyup',e,!1)}},[f,v]);var O=o.useMemo(()=>[s.modal,b?s.modalTransparent:s.modalOpaque],[b]);return o.createElement(u.default,(0,t.default)({},y,{"aria-modal":!0,ref:l,role:f?'dialog':null,style:O}),o.createElement(u.default,{style:s.container},p))}),s=l.default.create({modal:{position:'fixed',top:0,right:0,bottom:0,left:0},modalTransparent:{backgroundColor:'transparent'},modalOpaque:{backgroundColor:'white'},container:{top:0,flex:1}}),p=f},547,[27,43,34,276,42,39]);
646__d(function(g,r,_i,a,m,_e,_d){"use strict";
646function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return v}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=e(r(_d[1])),u=e(r(_d[2])),c=e(r(_d[3])),o=e(r(_d[4])),l=e(r(_d[5])),f=()=>(0,u.default)('div',{role:'none',tabIndex:0,style:E.focusBracket});function s(e){if(!l.default)return!1;try{e.focus()}catch(e){}return document.activeElement===e}function d(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];if(s(n)||d(n))return!0}return!1}function i(e){for(var t=e.childNodes.length-1;t>=0;t--){var n=e.childNodes[t];if(s(n)||i(n))return!0}return!1}var v=e=>{var u=e.active,c=e.children,s=t.useRef(),v=t.useRef({trapFocusInProgress:!1,lastFocusedElement:null});return t.useEffect(()=>{if(l.default){var e=()=>{if(null!=s.current&&!v.current.trapFocusInProgress&&u){try{if(v.current.trapFocusInProgress=!0,document.activeElement instanceof Node&&!s.current.contains(document.activeElement)){var e=d(s.current);v.current.lastFocusedElement===document.activeElement&&(e=i(s.current)),!e&&null!=s.current&&document.activeElement&&o.default.focus(s.current)}}finally{v.current.trapFocusInProgress=!1}v.current.lastFocusedElement=document.activeElement}};return e(),document.addEventListener('focus',e,!0),()=>document.removeEventListener('focus',e,!0)}},[u]),t.useEffect(function(){if(l.default){var e=document.activeElement;return function(){e&&document.contains(e)&&o.default.focus(e)}}},[]),t.createElement(t.Fragment,null,t.createElement(f,null),t.createElement(n.default,{ref:s},c),t.createElement(f,null))},E=c.default.create({focusBracket:{outlineStyle:'none'}})},548,[34,276,223,42,235,39]);
647__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},549,[550]);
648__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return T}});var o=e(r(d[0])),n=e(r(d[1])),t=n.default.currentCentroidXOfTouchesChangedAfter,u=n.default.currentCentroidYOfTouchesChangedAfter,s=n.default.previousCentroidXOfTouchesChangedAfter,c=n.default.previousCentroidYOfTouchesChangedAfter,l=n.default.currentCentroidX,p=n.default.currentCentroidY,v={_initializeGestureState(e){e.moveX=0,e.moveY=0,e.x0=0,e.y0=0,e.dx=0,e.dy=0,e.vx=0,e.vy=0,e.numberActiveTouches=0,e._accountsForMovesUpTo=0},_updateGestureStateOnMove(e,o){e.numberActiveTouches=o.numberActiveTouches,e.moveX=t(o,e._accountsForMovesUpTo),e.moveY=u(o,e._accountsForMovesUpTo);var n=e._accountsForMovesUpTo,l=s(o,n),p=t(o,n),v=c(o,n),h=u(o,n),S=e.dx+(p-l),R=e.dy+(h-v),T=o.mostRecentTimeStamp-e._accountsForMovesUpTo;e.vx=(S-e.dx)/T,e.vy=(R-e.dy)/T,e.dx=S,e.dy=R,e._accountsForMovesUpTo=o.mostRecentTimeStamp},create(e){var n={handle:null,shouldCancelClick:!1,timeout:null},t={stateID:Math.random(),moveX:0,moveY:0,x0:0,y0:0,dx:0,dy:0,vx:0,vy:0,numberActiveTouches:0,_accountsForMovesUpTo:0};return{panHandlers:{onStartShouldSetResponder:o=>null!=e.onStartShouldSetPanResponder&&e.onStartShouldSetPanResponder(o,t),onMoveShouldSetResponder:o=>null!=e.onMoveShouldSetPanResponder&&e.onMoveShouldSetPanResponder(o,t),onStartShouldSetResponderCapture:o=>(1===o.nativeEvent.touches.length&&v._initializeGestureState(t),t.numberActiveTouches=o.touchHistory.numberActiveTouches,null!=e.onStartShouldSetPanResponderCapture&&e.onStart
648ShouldSetPanResponderCapture(o,t)),onMoveShouldSetResponderCapture(o){var n=o.touchHistory;return t._accountsForMovesUpTo!==n.mostRecentTimeStamp&&(v._updateGestureStateOnMove(t,n),!!e.onMoveShouldSetPanResponderCapture&&e.onMoveShouldSetPanResponderCapture(o,t))},onResponderGrant:u=>(n.handle||(n.handle=o.default.createInteractionHandle()),n.timeout&&S(n),n.shouldCancelClick=!0,t.x0=l(u.touchHistory),t.y0=p(u.touchHistory),t.dx=0,t.dy=0,e.onPanResponderGrant&&e.onPanResponderGrant(u,t),null==e.onShouldBlockNativeResponder||e.onShouldBlockNativeResponder(u,t)),onResponderReject(o){h(n,e.onPanResponderReject,o,t)},onResponderRelease(o){h(n,e.onPanResponderRelease,o,t),R(n),v._initializeGestureState(t)},onResponderStart(o){var n=o.touchHistory;t.numberActiveTouches=n.numberActiveTouches,e.onPanResponderStart&&e.onPanResponderStart(o,t)},onResponderMove(o){var n=o.touchHistory;t._accountsForMovesUpTo!==n.mostRecentTimeStamp&&(v._updateGestureStateOnMove(t,n),e.onPanResponderMove&&e.onPanResponderMove(o,t))},onResponderEnd(o){var u=o.touchHistory;t.numberActiveTouches=u.numberActiveTouches,h(n,e.onPanResponderEnd,o,t)},onResponderTerminate(o){h(n,e.onPanResponderTerminate,o,t),R(n),v._initializeGestureState(t)},onResponderTerminationRequest:o=>null==e.onPanResponderTerminationRequest||e.onPanResponderTerminationRequest(o,t),onClickCapture:e=>{!0===n.shouldCancelClick&&(e.stopPropagation(),e.preventDefault())}},getInteractionHandle:()=>n.handle}}};function h(e,n,t,u){e.handle&&(o.default.clearInteractionHandle(e.handle),e.handle=null),n&&n(t,u)}function S(e){clearTimeout(e.timeout)}function R(e){e.timeout=setTimeout(()=>{e.shouldCancelClick=!1},250)}var T=v},550,[291,551]);
649__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var n={centroidDimension:function(t,i,o,u){var c=t.touchBank,f=0,s=0,h=1===t.numberActiveTouches?t.touchBank[t.indexOfSingleActiveTouch]:null;if(null!==h)h.touchActive&&h.currentTimeStamp>i&&(f+=u&&o?h.currentPageX:u&&!o?h.currentPageY:!u&&o?h.previousPageX:h.previousPageY,s=1);else for(var v=0;v<c.length;v++){var l=c[v];if(null!=l&&l.touchActive&&l.currentTimeStamp>=i){f+=u&&o?l.currentPageX:u&&!o?l.currentPageY:!u&&o?l.previousPageX:l.previousPageY,s++}}return s>0?f/s:n.noCentroid},currentCentroidXOfTouchesChangedAfter:function(t,i){return n.centroidDimension(t,i,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(t,i){return n.centroidDimension(t,i,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(t,i){return n.centroidDimension(t,i,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(t,i){return n.centroidDimension(t,i,!1,!1)},currentCentroidX:function(t){return n.centroidDimension(t,0,!0,!0)},currentCentroidY:function(t){return n.centroidDimension(t,0,!1,!0)},noCentroid:-1},t=n},551,[]);
650__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},u=r(d[1]);function f(){var e=(0,u.useState)(()=>n.default.get('window')),t=e[0],f=e[1];return(0,u.useEffect)(()=>{function e(e){var t=e.window;null!=t&&f(t)}return n.default.addEventListener('change',e),f(n.default.get('window')),()=>{n.default.removeEventListener('change',e)}},[]),t}},552,[284,34]);
651__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"BREAKPOINTS",{enumerable:!0,get:function(){return u}}),_e.useResponsive=l,_e.responsive=h,_e.useResponsiveValue=function(e){const{deviceSize:t}=l();return h(e)(t)},_e.useIsTablet=function(){const{isTablet:e}=l();return e},_e.useIsDesktop=function(){const{isDesktop:e}=l();return e};var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e},s=r(d[2]);const u={phone:0,tablet:768,desktop:1024,largeDesktop:1440};function p(e){return e>=u.desktop?'desktop':e>=u.tablet?'tablet':'phone'}function c(e){const{width:t,height:n}=e,o=p(t),u=t>n?'landscape':'portrait',c='phone'===o?1:'tablet'===o?1.2:1.5;let l;l='phone'===o?'portrait'===u?1:2:'tablet'===o?'portrait'===u?2:3:'portrait'===u?3:4;const h='phone'===o?s.SPACING.LG:'tablet'===o?s.SPACING.XXL:s.SPACING.XXXL;return{width:t,height:n,deviceSize:o,orientation:u,isPhone:'phone'===o,isTablet:'tablet'===o,isDesktop:'desktop'===o,isPortrait:'portrait'===u,isLandscape:'landscape'===u,scale:c,columns:l,horizontalPadding:h,contentMaxWidth:'desktop'===o?Math.min(t-64,1200):t-2*h}}function l(){const[e,n]=(0,t.useState)(()=>c(o.default.get('window'))),s=(0,t.useCallback)(({window:e})=>{n(c(e))},[]);return(0,t.useEffect)(()=>{const e=o.default.addEventListener('change',s);return()=>{e.remove()}},[s]),e}function h(e){return t=>'desktop'===t&&void 0!==e.desktop?e.desktop:'tablet'===t&&void 0!==e.tablet?e.tablet:e.phone}},553,[34,284,493]);
652__d(function(g,r,i,a,m,_e,d){"use strict";
652Object.defineProperty(_e,'__esModule',{value:!0}),_e.ChevronIcon=function(t){const{direction:n,size:w=24,color:p}=t,v=p??s.COLORS.WHITE,[_,j,y]=h[n];return(0,l.jsx)(o.default,{accessibilityElementsHidden:!0,style:f(w),children:(0,e.createElement)('svg',{fill:'none',height:w,stroke:v,strokeLinecap:'round',strokeLinejoin:'round',strokeWidth:u,viewBox:`0 0 ${c} ${c}`,width:w,xmlns:'http://www.w3.org/2000/svg'},(0,e.createElement)('polyline',{points:[_,j,y].map(([e,t])=>`${String(e)},${String(t)}`).join(' ')}))})};var e=r(d[0]);r(d[1]);var t,n=r(d[2]),o=(t=n)&&t.__esModule?t:{default:t},s=r(d[3]),l=r(d[4]);const c=24,u=2.5,h={left:[[14,6],[8,12],[14,18]],right:[[10,6],[16,12],[10,18]],up:[[6,14],[12,8],[18,14]],down:[[6,10],[12,16],[18,10]]};function f(e){return{alignItems:'center',height:e,justifyContent:'center',width:e}}},554,[34,95,276,490,104]);
653__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.CloseIcon=function(t){const{size:e=24,color:n}=t,f=n??s.COLORS.WHITE,h=Math.max(2,Math.round(e/8)),y=Math.round(.6*e),b={backgroundColor:f,height:h,left:(e-y)/2,position:'absolute',top:(e-h)/2,width:y};return(0,l.jsxs)(o.default,{accessibilityElementsHidden:!0,style:c(e),children:[(0,l.jsx)(o.default,{style:[b,u.forward]}),(0,l.jsx)(o.default,{style:[b,u.backward]})]})},r(d[0]);var t,e=r(d[1]),o=(t=e)&&t.__esModule?t:{default:t},n=r(d[2]),s=r(d[3]),l=r(d[4]);function c(t){return{alignItems:'center',height:t,justifyContent:'center',width:t}}const u=(0,n.createStyles)({backward:{transform:[{rotate:'-45deg'}]},forward:{transform:[{rotate:'45deg'}]}})},555,[34,276,489,490,104]);
654__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PolicyFullPage=function({errorSurface:j,seoKey:f,slug:x,policyName:y}){const b=(0,o.useSeoMeta)(f),{page:M,loading:P,error:F,retry:p}=(0,t.usePageContent)(x,`${y} content not found.`,`Failed to load ${y}.`),{isDevTriggered:C,surface:O}=(0,n.useErrorSurface)(j),_=F??(null==M||C?'Content not found.':null);if(P)return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.WebMeta,Object.assign({},b)),(0,c.jsx)(l.MarkdownPageLoading,{})]});if(null!=_||null==M)return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.WebMeta,Object.assign({},b)),(0,c.jsx)(l.MarkdownPageError,{message:_??'Content not found.',onRetry:p,surface:O})]});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.WebMeta,Object.assign({},b)),(0,c.jsx)(l.MarkdownPage,{title:M.title,body:M.body,footer:(0,c.jsx)(u.PolicyContactFooter,{policyName:y})})]})},r(d[0]);var n=r(d[1]),t=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]),u=r(d[6]),c=r(d[7])},556,[34,557,559,562,565,566,603,104]);
655__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.defineScreenErrorSurfaces=function(t,l){return Object.fromEntries(Object.entries(l).map(([l,n])=>[l,s(t,n)]))},e.useErrorSurface=function(s){const[u,c]=(0,t.useState)(!1),o=(0,t.useMemo)(()=>({actions:[{accessibilityLabel:`Show ${s.label} state`,id:`show:${s.qualifiedId}`,label:s.label,onPress:()=>{c(!0)}},{accessibilityLabel:`Clear ${s.label} state`,id:`clear:${s.qualifiedId}`,label:`Clear ${s.label}`,onPress:()=>{c(!1)}}],id:`error-surface:${s.qualifiedId}`,title:`${s.label}`}),[s]);(0,l.useRegisterDevMenuActionSection)(o);const b=(0,t.useMemo)(()=>({[n]:!0,kind:s.kind,label:s.label,qualifiedId:s.qualifiedId}),[s]);return(0,t.useMemo)(()=>({isDevTriggered:u,surface:b}),[u,b])};var t=r(d[0]),l=r(d[1]);function s(t,l){return Object.assign({},l,{qualifiedId:`${String(t)}:${l.id}`,routeName:t})}const n=Symbol('RegisteredErrorSurface')},557,[34,558]);
656__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DevMenuActionContext",{enumerable:!0,get:function(){return n}}),e.useRegisterDevMenuActionSection=function(o){const u=(0,t.useContext)(n),c=u?.registerSection;(0,t.useEffect)(()=>{if(void 0!==c)return c(o)},[c,o])},e.useDevMenuActionSections=function(){return(0,t.useContext)(n)?.sections??[]};var t=r(d[0]);const n=(0,t.createContext)(null)},558,[34]);
657__d(function(g,r,i,a,m,e,d){"use strict";
657Object.defineProperty(e,'__esModule',{value:!0}),e.usePageContent=function(o,u="Content not found.",c="Failed to load content."){const{data:s,loading:l,error:f,retry:y}=(0,n.useAsyncData)(async()=>{const n=await t.pageApi.getPage(o);if(!n)throw new Error(u);return n},[o,u,c],c);return{page:s,loading:l,error:f,retry:y}};var t=r(d[0]),n=r(d[1])},559,[560,561]);
658__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"pageApi",{enumerable:!0,get:function(){return u}});var t=r(d[0]),n=r(d[1]);const u={async getPage(u){try{return await n.pages.getPage({path:{slug:u}})}catch(n){if((0,t.isAxios404)(n))return null;throw n}}}},560,[464,471]);
659__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useAsyncData=function(n,c,s="An error occurred."){const[l,o]=(0,t.useState)(null),[f,y]=(0,t.useState)(!0),[_,b]=(0,t.useState)(null),S=(0,t.useRef)(!0),k=(0,t.useRef)(0),v=(0,t.useCallback)(async()=>{const t=++k.current;y(!0),b(null);try{const u=await n();S.current&&t===k.current&&o(u)}catch(n){S.current&&t===k.current&&b((0,u.errorMessage)(n,s))}finally{S.current&&t===k.current&&y(!1)}},c);(0,t.useEffect)(()=>(S.current=!0,v(),()=>{S.current=!1}),[v]);const A=(0,t.useCallback)(()=>{v()},[v]);return{data:l,loading:f,error:_,retry:A}};var t=r(d[0]),u=r(d[1])},561,[34,468]);
660__d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.shallowRecordEqual=function(n,e){if(n===e)return!0;if(null==n||null==e)return!1;const t=Object.keys(n),o=Object.keys(e);if(t.length!==o.length)return!1;return t.every(t=>n[t]===e[t])},_e.interpolateRoutePath=a,_e.useSeoMeta=function(n,e,t){return y(n,e,t)},_e.useCurrentRouteSeoMeta=function(n){const{name:e}=(0,l.useCurrentRoute)();return y(e,n)};var n,e=r(d[0]),t=r(d[1]),o=(n=t)&&n.__esModule?n:{default:n},u=r(d[2]);r(d[3]);var l=r(d[4]);const s=o.default;function c(n){return'string'==typeof n?n:'number'==typeof n||'boolean'==typeof n||'bigint'==typeof n?String(n):null}function f(n){if(null==n)return null;const e=Object.keys(n).sort();let t='';for(const o of e)t+=`${o}\x01${c(n[o])??''}\x02`;return t}function a(n,e){if('/'===n)return'/';const t=[];for(const o of n.split('/')){if(''===o)continue;if(!o.startsWith(':')){t.push(o);continue}const n=o.endsWith('?'),u=o.slice(1,n?-1:void 0),l=c(e?.[u]);if(null==l||''===l){if(n)continue;return null}t.push(encodeURIComponent(l))}return`/${t.join('/')}`}function p(n,e){if('undefined'==typeof window)return;const t=s.routes[n];if(null==t||null!=t.externalCanonical)return;const o=a(t.path,e);return null!=o?window.location.origin+o:void 0}function y(n,t,o){const{params:c}=(0,l.useCurrentRoute)(),a=f(t),y=f(c);return(0,u.useMemo)(()=>{const u=(0,e.resolveSeoMeta)(s,n,t,o),l=p(n,c);return null!=l?Object.assign({},u,{canonicalUrl:l}):u},[n,a,y,o])}},562,[563,564,34,95,505]);
661__d(function(g,r,i,a,m,e,d){"use strict";function t(t,n,o,c){return n?.title?s(n.title,o):t.title?s(t.title,o):t.titleTemplate?s(t.titleTemplate,o):c}function n(t,n,o,c){if(n?.description)return s(n.description,o);if(t.description)return s(t.description,o);if(t.descriptionTemplate)return s(t.descriptionTemplate,o);if(t.descriptionSource){const n=o[t.descriptionSource];if(n)return n}return c}function o(t,n){if(!t.variants||0===t.variants.length)return null;if(n)return t.variants.find(t=>t.id===n)??null;const o=t.variants.reduce((t,n)=>t+n.weight,0);let s=Math.random()*o;for(const n of t.variants)if(s-=n.weight,s<=0)return n;return t.variants[t.variants.length-1]??null}function s(t,n){return t.replace(/\{(\w+)\}/g,(t,o)=>n[o]??t)}Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSeoMeta=function(s,c,u,l){const f=s.routes[c];if(!f)return{title:s.siteName,description:s.defaultDescription,ogType:'website'};const p=o(f,l),v=Object.assign({siteName:s.siteName},u),T=t(f,p,v,s.siteName),h=n(f,p,v,s.defaultDescription);return Object.assign({title:T,description:h,ogType:f.ogType},void 0!==f.noIndex&&{noIndex:f.noIndex})}},563,[]);
662__d(function(e,i,t,r,a,s,o){a.exports={$comment:"GENERATED FILE - do not edit. Produced by scripts/generate-route-manifest.mjs from universal-app/src/navigation/routes.config.json: the per-route `seo` blocks, the top-level `seo` site block, and `seoRefinements`. The backend (SeoRegistry.java, via the Maven-copied classpath resource) and the frontend (useSeoMeta) both read this projection, so crawler-injected and client-rendered meta stay identical. Edit the route table, then run `npm run routes:generate` and commit the result; CI fails if this file is not a byte-for-byte projection.",siteName:"PurpleAir",defaultDescription:"Real-time air quality monitoring with PurpleAir sensors. Monitor indo
662or and outdoor air quality with accurate PM2.5, PM10, temperature, and humidity data.",defaultImage:"",routes:{API:{path:"/api",title:"API | {siteName}",description:"Access real-time and historical air quality data through the PurpleAir API. RESTful endpoints for PM2.5, PM10, temperature, humidity, and more.",ogType:"website"},About:{path:"/about",title:"About | {siteName}",description:"Founded in 2015 in Draper, Utah. PurpleAir builds affordable, accurate air quality sensors used worldwide by individuals, researchers, and governments.",ogType:"website"},AboutMap:{path:"/real-time-map",title:"About the Map | {siteName}",description:"Learn about the PurpleAir Real-Time Air Quality Map. Features, use cases, and EPA integration with over 35,000 sensors worldwide.",ogType:"website"},Admin:{path:"/admin",title:"Admin | {siteName}",description:"PurpleAir administration dashboard.",ogType:"website",noIndex:!0},AdminAuditLogs:{path:"/admin/audit-logs",title:"Audit Logs | {siteName}",description:"PurpleAir administrative audit and change logs.",ogType:"website",noIndex:!0},AdminSeo:{path:"/admin/seo",title:"SEO Status | {siteName}",description:"PurpleAir SEO launch-surface observability.",ogType:"website",noIndex:!0},AdminSubscriptionDetail:{path:"/admin/subscriptions/:contractId",title:"API Subscription Contract | {siteName}",description:"PurpleAir API subscription contract detail.",ogType:"website",noIndex:!0},AdminSubscriptions:{path:"/admin/subscriptions",title:"API Subscriptions | {siteName}",description:"PurpleAir API subscription administration.",ogType:"website",noIndex:!0},ApiTokens:{path:"/api-tokens",title:"API Tokens | {siteName}",description:"Manage your PurpleAir API tokens. Create, view, and revoke API keys for data access.",ogType:"website",noIndex:!0},Attribution:{path:"/attribution",title:"Data Attribution | {siteName}",description:"How to properly attribute PurpleAir air quality data and use the PurpleAir logo when using PurpleAir data or the PurpleAir API.",ogType:"website"},Blog:{path:"/blog",title:"Blog | {siteName}",description:"Air quality insights, research, and news from PurpleAir.",ogType:"website"},BlogArticle:{path:"/blog/:slug",titleTemplate:"{postTitle} | {siteName}",descriptionSource:"postExcerpt",ogType:"article",dynamic:!0},Broadcasters:{path:"/broadcasters",title:"Broadcaster Solutions | {siteName}",description:"Real-time hyper-local air quality data for news broadcasters and weather reporting. Embed PurpleAir maps and widgets in your broadcast.",ogType:"website"},Business:{path:"/business",title:"Business Air Quality Solutions | {siteName}",description:"Professional air quality monitoring for businesses. Protect employees, optimize HVAC, and demonstrate environmental responsibility with PurpleAir sensors.",ogType:"website"},Cart:{path:"/cart",title:"Shopping Cart | {siteName}",description:"Review your PurpleAir shopping cart. Air quality monitors, accessories, and replacement parts.",ogType:"website",noIndex:!0},Community:{path:"/community",title:"Community | {siteName}",description:"Join the PurpleAir community forum. Discuss air quality monitoring, share sensor data insights, get help with setup, and connect with other users.",ogType:"website"},CommunityCategory:{path:"/community/c/:slug/:id",titleTemplate:"{categoryName} | Community | {siteName}",descriptionTemplate:"Discuss {categoryName} in the PurpleAir community forum.",ogType:"website",dynamic:!0,externalCanonical:"community"},CommunityNewTopic:{path:"/community/new",title:"New Topic | Community | {siteName}",description:"Create a new discussion topic in the PurpleAir community forum.",ogType:"website",noIndex:!0},CommunityTopic:{path:"/community/t/:slug/:id",titleTemplate:"{topicTitle} | Community | {siteName}",descriptionSource:"topicExcerpt",ogType:"article",dynamic:!0,externalCanonical:"community"},Contact:{path:"/contact",title:"Contact Us | {siteName}",description:"Get in touch with PurpleAir for support, sales inquiries, partnerships, or general questions about our air quality monitoring sensors.",ogType:"website"},ContentAdmin:{path:"/admin/content",title:"Content Admin | {siteName}",description:"PurpleAir content administration.",ogType:"website",noIndex:!0},Credits:{path:"/credits",title:"Credits | {siteName}",description:"Acknowledgments and credits for open source software, libraries, and contributors used in PurpleAir products.",ogType:"website"},DataUseCases:{path:"/data-use-cases",title:"Data Use Cases | {siteName}",description:"Discover how PurpleAir sensor data is used for research, public health, environmental monitoring, and community air quality awareness.",ogType:"website"},DoNotSell:{path:"/do-not-sell",title:"Do Not Sell My Personal Information | {siteName}",description:"PurpleAir does not sell your personal information. Learn about your privacy rights under the California Consumer Privacy Act (CCPA).",ogType:"website"},Ecosystem:{path:"/ecosystem",title:"Ecosystem | {siteName}",description:"The ecosystem of projects and integrations built on PurpleAir data.",ogType:"website",noIndex:!0},Education:{path:"/education",title:"Education & Research | {siteName}",description:"Air quality sensors for schools, universities, and research institutions. Access real-time data for STEM education, environmental science, and public health research.",ogType:"website"},ExploringAirQuality:{path:"/exploring-air-quality-across-the-globe",title:"Exploring Air Quality Across the Globe | {siteName}",description:"Research studies worldwide use PurpleAir sensors to explore air quality\u2014from volcanic eruptions and fireworks to indoor vs outdoor air and community science.",ogType:"website"},FAQ:{path:"/faq",title:"FAQ | {siteName}",description:"Frequently asked questions about PurpleAir air quality sensors, data, setup, and more.",ogType:"website"},Flasher:{path:"/flasher",title:"Firmware Flasher | {siteName}",description:"Update your PurpleAir sensor firmware using the web-based flasher tool.",ogType:"website",noIndex:!0},Government:{path:"/government",title:"Government Air Quality Solutions | {siteName}",description:"Air quality monitoring for government agencies. Deploy dense sensor networks for community-level air quality data and regulatory compliance.",ogType:"website"},Home:{path:"/",title:"{siteName} | Real-Time Air Quality Monitoring",description:"Real-time air quality monitoring with PurpleAir sensors. Monitor, configure, and manage your sensors for accurate PM2.5, PM10, temperature, and humidity data.",ogType:"website"},License:{path:"/license",title:"Data License | {siteName}",description:"PurpleAir data license terms for using PurpleAir air quality data and the PurpleAir API, including attribution and distribution requirements.",ogType:"website"},Location:{path:"/location",title:"Air Quality by Location | {siteName}",description:"Air quality by location on the PurpleAir map.",ogType:"website",noIndex:!0},Login:{path:"/login",title:"Sign In | {siteName}",description:"Sign in to your PurpleAir account to manage sensors and view data.",ogType:"website",noIndex:!0},Map:{path:"/map-preview",title:"Air Quality Map | {siteName}",description:"Preview of the in-app PurpleAir real-time air quality map.",ogType:"website",noIndex:!0},MyAccount:{path:"/my-account",title:"My Account | {siteName}",description:"Manage your PurpleAir account, sensors, and settings.",ogType:"website",noIndex:!0},OrderOutreach:{path:"/admin/order-outreach",title:"Order Outreach | {siteName}",description:"PurpleAir order outreach administration.",ogType:"website",noIndex:!0},OrderOutreachDetail:{path:"/admin/order-outreach/:id",title:"Order Update | {siteName}",description:"PurpleAir order update detail.",ogType:"website",noIndex:!0},OrderOutreachNew:{path:"/admin/order-outreach/new",title:"New Order Update | {siteName}",description:"Create a PurpleAir order update.",ogType:"website",noIndex:!0}
662,Papers:{path:"/papers",title:"Scientific Papers | {siteName}",description:"Peer-reviewed scientific papers and research studies featuring PurpleAir sensors in air quality monitoring, calibration, environmental justice, and public health.",ogType:"website"},PaymentMethods:{path:"/pages/payment-methods",title:"Payment Methods | {siteName}",description:"Payment methods accepted by PurpleAir for sensor and accessory purchases.",ogType:"website"},Personal:{path:"/personal",title:"Personal Air Quality Monitoring | {siteName}",description:"Monitor your home's air quality with PurpleAir sensors. Track PM2.5, allergens, wildfire smoke, and indoor pollutants in real time.",ogType:"website"},Press:{path:"/press",title:"Press & Media | {siteName}",description:"PurpleAir in the news and partner features. Featured in Redfin's guide to reducing indoor allergens.",ogType:"website"},PressAdmin:{path:"/admin/press",title:"Press Admin | {siteName}",description:"PurpleAir press moderation dashboard.",ogType:"website",noIndex:!0},PressAdminDetail:{path:"/admin/press/:id",title:"Press Admin | {siteName}",description:"PurpleAir press mention review.",ogType:"website",noIndex:!0},PressDiscovery:{path:"/press-v2",title:"Press Discovery | {siteName}",description:"PurpleAir press mentions and media coverage.",ogType:"website",noIndex:!0},PressDiscoveryDetail:{path:"/press-v2/:id",title:"Press Mention | {siteName}",description:"A PurpleAir press mention.",ogType:"article",noIndex:!0},PrivacyPolicy:{path:"/policies/privacy-policy",title:"Privacy Policy | {siteName}",description:"PurpleAir privacy policy. Learn how we collect, use, and protect your personal information and sensor data.",ogType:"website"},Product:{path:"/products/:handle",titleTemplate:"{productTitle} | {siteName}",descriptionSource:"productDescription",ogType:"product",dynamic:!0},ProjectsAndIntegrations:{path:"/projects-and-integrations",title:"Projects & Integrations | {siteName}",description:"Government programs, university projects, and tools that integrate PurpleAir sensor data for air quality monitoring and public health.",ogType:"website"},Purchasing:{path:"/pages/purchasing",title:"Purchasing | {siteName}",description:"Purchasing information for PurpleAir sensors, accessories, and institutional orders.",ogType:"website"},Recall:{path:"/recall",title:"Power Supply Safety Recall | {siteName}",description:"PurpleAir voluntary safety recall of power supply model RKPO-UL052000C shipped with PA-II and PA-II-SD sensors. Steps to receive a free replacement.",ogType:"website"},RefundPolicy:{path:"/policies/refund-policy",title:"Refund Policy | {siteName}",description:"PurpleAir 30-day return and refund policy for original purchasers, including how to request an RMA.",ogType:"website"},Register:{path:"/register",title:"Register Sensor | {siteName}",description:"Register your PurpleAir sensor to join the worldwide air quality monitoring network and access your data on the PurpleAir map.",ogType:"website"},Research:{path:"/research",title:"PurpleAir for Research | {siteName}",description:"Air quality data at research density. Guidance on data fields, calibration, quality control, access routes, and licensing for researchers and air quality managers.",ogType:"website",noIndex:!0},ResearchQuickGuide:{path:"/research/quick-guide",title:"Researcher Quick Guide | {siteName}",description:"A guide to research with PurpleAir data, including data access, quality control, calibration, and license terms, along with an example workflow.",ogType:"article",noIndex:!0},Science:{path:"/science",title:"Science | {siteName}",description:"Scientific research and studies featuring PurpleAir sensors.",ogType:"website",noIndex:!0},Search:{path:"/search",title:"Search | {siteName}",description:"Search PurpleAir store, community, blog, and press.",ogType:"website",noIndex:!0},SensorManagement:{path:"/my-sensors",title:"My Sensors | {siteName}",description:"Manage and configure your PurpleAir sensors. View status, update settings, and monitor performance.",ogType:"website",noIndex:!0},SensorUtility:{path:"/utility",title:"Sensor Utility | {siteName}",description:"PurpleAir sensor utility tool for advanced sensor configuration and diagnostics.",ogType:"website",noIndex:!0},ShippingPolicy:{path:"/policies/shipping-policy",title:"Shipping Policy | {siteName}",description:"PurpleAir shipping and delivery policy, including carriers, timeframes, and international DDP shipping.",ogType:"website"},Status:{path:"/status",title:"System Status | {siteName}",description:"Check the current status of PurpleAir services, API, and sensor network.",ogType:"website",noIndex:!0},Store:{path:"/store",title:"Store | {siteName}",description:"Shop PurpleAir air quality monitors as found on the EPA's Fire and Smoke Map. Real-time data for home, school, and community.",ogType:"website"},StoreCategory:{path:"/store/:category",titleTemplate:"{categoryLabel} | Store | {siteName}",descriptionTemplate:"Browse {categoryLabel} from PurpleAir.",ogType:"website",dynamic:!0},StoreCategorySensor:{path:"/store/:category/:sensor",titleTemplate:"{categoryLabel} | Store | {siteName}",descriptionTemplate:"Browse {categoryLabel} from PurpleAir.",ogType:"website",dynamic:!0,noIndex:!0},Technology:{path:"/pages/technology",title:"PurpleAir Technology | {siteName}",description:"Learn how PurpleAir sensors measure particulate matter and deliver real-time air quality data.",ogType:"website"},TermsOfService:{path:"/policies/terms-of-service",title:"Terms of Service | {siteName}",description:"PurpleAir terms of service. Terms and conditions governing use of PurpleAir products, services, and data.",ogType:"website"},TrustingPurpleAir:{path:"/trusting-purpleair-sensor-evaluations",title:"Trusting PurpleAir Sensor Evaluations | {siteName}",description:"How PurpleAir sensors are evaluated for accuracy, long-term performance, and data reliability against government-grade air monitors.",ogType:"website"},Warranty:{path:"/policies/warranty",title:"Warranty | {siteName}",description:"PurpleAir 30-day no-questions-asked return guarantee and one-year limited product warranty for manufacturing defects.",ogType:"website"},WhoUsesPurpleAir:{path:"/from-schools-to-satellites-who-uses-purpleair-and-why",title:"Who Uses PurpleAir and Why | {siteName}",description:"How schools, communities, researchers, and agencies use PurpleAir sensors for real-time air quality maps, public health, and scientific research.",ogType:"website"}}}},564,[]);
663__d(function(g,r,i,a,m,e,d){"use strict";
663Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"COMMUNITY_ORIGIN",{enumerable:!0,get:function(){return n}}),e.WebMeta=function({title:n,description:o,ogType:c,noIndex:l,canonicalUrl:s}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("title",{children:n}),o.length>0&&(0,t.jsx)("meta",{name:"description",content:o}),!0===l&&(0,t.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),null!=s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("link",{rel:"canonical",href:s}),(0,t.jsx)("meta",{property:"og:url",content:s})]}),(0,t.jsx)("meta",{property:"og:title",content:n}),o.length>0&&(0,t.jsx)("meta",{property:"og:description",content:o}),c.length>0&&(0,t.jsx)("meta",{property:"og:type",content:c})]})},r(d[0]),r(d[1]);var t=r(d[2]);const n='https://community.purpleair.com'},565,[34,95,104]);
664__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"pageMarkdownStyles",{enumerable:!0,get:function(){return L}}),_e.FullTextPageLayout=A,_e.MarkdownPage=function({title:e,body:t,subtitle:n,footer:o}){return(0,I.jsx)(A,Object.assign({title:e},void 0!==n?{subtitle:n}:{},void 0!==o?{footer:o}:{},{children:(0,I.jsx)(h.Markdown,{content:t,styles:f})}))},_e.MarkdownPageLoading=function({message:e}){return(0,I.jsx)(u.AsyncPageLayout,{status:"loading",children:(0,I.jsx)(O.LoadingState,Object.assign({},void 0!==e?{message:e}:{}))})},_e.MarkdownPageError=function({surface:e,message:t,onRetry:n}){return(0,I.jsx)(u.AsyncPageLayout,{status:"error",children:(0,I.jsx)(O.ErrorState,Object.assign({surface:e,message:t},void 0!==n?{onRetry:n}:{}))})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3]));r(d[4]);var l=r(d[5]),s=r(d[6]),S=r(d[7]),c=r(d[8]),u=r(d[9]),h=r(d[10]),O=r(d[11]),I=r(d[12]);const L=(0,l.createStyles)({body:{color:s.COLORS.NAVY_MID,fontSize:c.FONT_SIZE.XL,lineHeight:28},heading1:{color:s.COLORS.TEXT_PRIMARY,fontSize:c.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:S.SPACING.LG,marginTop:S.SPACING.XXXL},heading2:{color:s.COLORS.TEXT_PRIMARY,fontSize:c.FONT_SIZE.XXXL,fontWeight:'bold',marginBottom:S.SPACING.LG,marginTop:S.SPACING.XXL},heading3:{color:s.COLORS.TEXT_PRIMARY,fontSize:c.FONT_SIZE.XXL,fontWeight:'bold',marginBottom:S.SPACING.MD,marginTop:S.SPACING.XXL},heading4:{color:s.COLORS.TEXT_PRIMARY,fontSize:c.FONT_SIZE.XL,fontWeight:'bold',marginBottom:S.SPACING.MD,marginTop:S.SPACING.XL},link:{color:s.COLORS.BRAND_PRIMARY,textDecorationLine:'underline'},list_item:{marginBottom:S.SPACING.SM},paragraph:{marginBottom:S.SPACING.MD,marginTop:0},strong:{fontWeight:'bold'}}),f={body:L.body,heading1:L.heading1,heading2:L.heading2,heading3:L.heading3,heading4:L.heading4,link:L.link,listItem:L.list_item,paragraph:L.paragraph,strong:L.strong};function A({title:e,subtitle:l,children:s,footer:S}){return(0,I.jsx)(u.AsyncPageLayout,{status:"ready",children:(0,I.jsxs)(o.default,{style:C.container,children:[(0,I.jsxs)(t.default,{style:C.header,children:[(0,I.jsx)(n.default,{style:C.headerTitle,children:e}),null!=l&&''!==l?(0,I.jsx)(n.default,{style:C.headerSubtitle,children:l}):null]}),(0,I.jsx)(t.default,{style:C.content,children:s}),null!=S?(0,I.jsx)(t.default,{style:C.footer,children:S}):null]})})}const C=(0,l.createStyles)({container:{backgroundColor:s.COLORS.BG_SURFACE,flex:1},content:{alignSelf:'center',maxWidth:800,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.HUGE,width:'100%'},footer:{alignItems:'center',borderTopColor:s.COLORS.BORDER,borderTopWidth:1,gap:S.SPACING.LG,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.MASSIVE},header:{alignItems:'center',backgroundColor:s.COLORS.BG_LIGHT,borderBottomColor:s.COLORS.BORDER,borderBottomWidth:1,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.JUMBO},headerSubtitle:{color:s.COLORS.TEXT_SECONDARY,fontSize:c.FONT_SIZE.XL,lineHeight:28,marginTop:S.SPACING.LG,maxWidth:600,textAlign:'center'},headerTitle:Object.assign({color:s.COLORS.TEXT_HEADING,fontSize:c.FONT_SIZE.DISPLAY_ML,fontWeight:'bold',textAlign:'center'},{fontSize:c.FONT_SIZE.DISPLAY_XL})})},566,[34,276,222,283,95,489,490,493,494,567,597,513,104]);
665__d(function(g,r,i,a,m,_e,d){"use strict";const e=["children","status"];
665Object.defineProperty(_e,'__esModule',{value:!0}),_e.AsyncPageLayout=function(t){let{children:n,status:l}=t,_=(0,s.default)(t,e);return(0,u.jsx)(o.PageLayout,Object.assign({},_,{hideFooter:c[l],children:n}))};var t,n=r(d[0]),s=(t=n)&&t.__esModule?t:{default:t};r(d[1]);var o=r(d[2]),u=r(d[3]);const c={loading:!0,error:!1,ready:!1}},567,[109,34,568,104]);
666__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AppLink",{enumerable:!0,get:function(){return S.AppLink}}),Object.defineProperty(_e,"SCREEN_PATHS",{enumerable:!0,get:function(){return y.SCREEN_PATHS}}),Object.defineProperty(_e,"getScreenPath",{enumerable:!0,get:function(){return y.getScreenPath}}),_e.PageLayout=function({children:e,hideFooter:l=!1,scrollRef:c,onScroll:S,scrollEventThrottle:y,scrollViewTestID:h,testID:v}){const{reportScrollOffset:j}=(0,u.useNavVisibility)(),E=(0,t.useCallback)(e=>{j(e.nativeEvent.contentOffset.y),S?.(e)},[S,j]);return(0,p.jsx)(n.default,{style:b.container,testID:v,children:(0,p.jsx)(n.default,{style:b.content,children:(0,p.jsxs)(o.default,{ref:c,style:b.scrollWrapper,contentContainerStyle:b.scrollContent,onScroll:E,scrollEventThrottle:y??16,testID:h,children:[e,!l&&!(0,s.isElectron)()&&(0,p.jsx)(f.Footer,{})]})})})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),c=r(d[5]),s=r(d[6]),f=r(d[7]),u=r(d[8]),p=r(d[9]),S=r(d[10]),y=r(d[11]);const b=(0,l.createStyles)({container:{backgroundColor:c.COLORS.BG_SUBTLE,flex:1},content:{flex:1,overflow:'hidden'},scrollContent:{flexGrow:1},scrollWrapper:Object.assign({flex:1},{overflowAnchor:'none'})})},568,[34,95,276,283,489,490,528,569,594,104,516,518]);
667__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.Footer=function(){const b=(0,c.useAppNavigation)(),{backendVersion:k}=(0,o.useClientConfig)(),{mapBaseUrl:N}=(0,o.useServiceLinkStates)(),{showBanner:_}=(0,l.useCookieConsent)(),{isAdmin:p,isAuthenticated:A,user:U}=(0,s.useAuth)(),[h]=(0,n.useState)(()=>(new Date).getFullYear()),C=(0,n.useMemo)(()=>A&&null!=U?{kind:'authenticated',email:U.email,isAdmin:p,isSuperOwner:'SUPER_OWNER'===U.role}:{kind:'anonymous'},[p,A,U]),E='SUPER_OWNER'===U?.role,F=(0,n.useMemo)(()=>(0,v.getAccessibleFrameRouteNames)(A,p,E),[p,A,E]);return(0,R.jsx)(t.SiteFooter,{auth:C,backendVersion:k,buildVersion:u.BUILD_VERSION,currentYear:h,mapUrl:(0,S.getReadyWebServiceUrl)(N),onCookieSettings:_,onNavigate:t=>{(0,c.navigateToFrameTarget)(b,t)},visibleRouteNames:F})};var t=r(d[0]),n=r(d[1]);r(d[2]);var s=r(d[3]),o=r(d[4]),u=r(d[5]),l=r(d[6]),c=r(d[7]),S=r(d[8]),v=r(d[9]),R=r(d[10])},569,[570,34,586,411,524,465,587,505,592,593,104]);
668__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ANONYMOUS_HEADER_PROPS",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"ANONYMOUS_FOOTER_PROPS",{enumerable:!0,get:function(){return p}}),e.SiteHeader=function({activeStoreCategorySlug:l,auth:o,cartItemCount:h,currentPath:p,currentRouteName:k,linkOrigin:b,logoSrc:I,mapUrl:S,onNavigate:A,onSignOut:E,visibleRouteNames:O}){const M=(0,n.formatCartBadge)(h),[R,T]=(0,t.useState)(null),C=(0,t.useRef)(null),y=(0,t.useRef)(null),L=(0,t.useRef)(null),P=(0,t.useRef)(null),F=(0,t.useRef)(null),w=(0,t.useCallback)(()=>{null!==C.current&&(clearTimeout(C.current),C.current=null)},[]),G=(0,t.useCallback)(()=>{null!==y.current&&(clearTimeout(y.current),y.current=null)},[]),U=(0,t.useCallback)(()=>{w(),G(),T(null)},[G,w]),V=(0,t.useCallback)(t=>{G(),w(),null===R?C.current=setTimeout(()=>{C.current=null,T(t)},n.FRAME_INTERACTION.hoverOpenDelayMs):T(t)},[G,w,R]),D=(0,t.useCallback)(()=>{w(),G(),y.current=setTimeout(()=>{y.current=null,T(null)},n.FRAME_INTERACTION.hoverCloseDelayMs)},[G,w]),K=(0,t.useCallback)(n=>{w(),G(),T(n)},[G,w]);(0,t.useEffect)(()=>()=>{w(),G()},[G,w]),(0,t.useEffect)(()=>{if(null===R)return;const n=n=>{"Escape"===n.key&&U()},t=n=>{n.target instanceof Node&&!0!==L.current?.contains(n.target)&&U()};return document.addEventListener("keydown",n),document.addEventListener("pointerdown",t),()=>{document.removeEventListener("keydown",n),document.removeEventListener("pointerdown",t)}},[U,R]);const H=t=>t.map(t=>n.FRAME_LINKS[t]).filter(t=>void 0===O?(0,n.isFrameLinkVisible)(t,o):O.includes(t.routeName)),B=n.NAVIGATION_GROUPS.find(t=>t.linkIds.some(t=>n.FRAME_LINKS[t].routeName===k)||null!==p&&"associatedPathPrefixes"in t&&null!==(0,s.calculateActiveRoute)(p,t.associatedPathPrefixes)),Y=n=>"StoreCategory"===n.routeName?("StoreCategory"===k||"Product"===k)&&n.params.category===l:n.routeName===k,z=void 0===A?void 0:n=>{U(),null!==P.current&&(P.current.open=!1),null!==F.current&&(F.current.open=!1),A(n)};return(0,u.jsxs)("header",{className:"pa-site-frame pa-site-frame--header","data-pa-site-frame":"header",onBlur:n=>{n.relatedTarget instanceof Node&&n.currentTarget.contains(n.relatedTarget)||D()},ref:L,style:c.FRAME_HEADER_INLINE_STYLE,children:[(0,u.jsxs)("div",{className:"pa-site-frame__main-header",style:c.FRAME_MAIN_HEADER_INLINE_STYLE,children:[(0,u.jsx)(f,{placement:"header"}),(0,u.jsxs)("div",{className:"pa-site-frame__header-inner",children:[(0,u.jsx)(_,{className:"pa-site-frame__logo",currentPath:p,link:n.FRAME_LINKS.home,linkOrigin:b,onNavigate:z,children:(0,u.jsx)("img",{alt:"PurpleAir",src:I})}),(0,u.jsx)("nav",{"aria-label":"Primary",className:"pa-site-frame__primary-navigation",children:n.NAVIGATION_GROUPS.map(t=>{const l=n.FRAME_LINKS["overviewLinkId"in t?t.overviewLinkId:t.linkIds[0]];
668return(0,u.jsx)(_,{activeSection:B?.title===t.title,ariaControls:"pa-site-frame-mega-panel",ariaExpanded:R===t.title,className:"pa-site-frame__mega-trigger",currentPath:null,link:l,linkOrigin:b,navigationGroupTitle:t.title,onFocus:()=>{K(t.title)},onMouseEnter:()=>{V(t.title)},onMouseLeave:D,onNavigate:z,children:t.title},t.title)})}),(0,u.jsxs)("div",{className:"pa-site-frame__header-actions",children:[(0,u.jsxs)("button",{"aria-controls":"pa-site-frame-search-overlay","aria-expanded":"false","aria-haspopup":"dialog","aria-label":"Search",className:"pa-site-frame__search-toggle",type:"button",children:[(0,u.jsx)(x,{}),(0,u.jsx)("span",{className:"pa-site-frame__visually-hidden",children:"Search"})]}),(0,u.jsxs)(_,{className:"pa-site-frame__cart-link",currentPath:p,link:n.FRAME_LINKS.cart,linkOrigin:b,onNavigate:z,children:[(0,u.jsx)(v,{}),(0,u.jsx)("span",{className:"pa-site-frame__visually-hidden",children:"Cart"}),null===M?null:(0,u.jsx)("span",{className:"pa-site-frame__cart-badge",children:M})]}),(0,u.jsx)("span",{className:"pa-site-frame__map-link",children:(0,u.jsx)(N,{mapUrl:S})}),"anonymous"===o.kind?(0,u.jsx)(_,{className:"pa-site-frame__auth-link",currentPath:p,link:n.FRAME_LINKS.signIn,linkOrigin:b,onNavigate:z}):(0,u.jsxs)("details",{className:"pa-site-frame__account-menu",ref:F,children:[(0,u.jsx)("summary",{"aria-label":`Account menu for ${o.email}`,"data-pa-account-summary":"",children:(0,u.jsx)("span",{className:"pa-site-frame__avatar","data-pa-avatar":"",children:(0,n.getInitials)(o.email)})}),(0,u.jsxs)("ul",{children:[(0,u.jsx)("li",{className:"pa-site-frame__account-email","data-pa-account-email":"",children:o.email}),(0,u.jsx)("li",{"aria-hidden":"true",className:"pa-site-frame__account-divider",role:"separator"}),H(n.ACCOUNT_LINK_IDS).map(n=>(0,u.jsx)("li",{children:(0,u.jsx)(_,{currentPath:p,link:n,linkOrigin:b,onNavigate:z})},n.href)),(0,u.jsx)("li",{"aria-hidden":"true",className:"pa-site-frame__account-divider",role:"separator"}),(0,u.jsx)("li",{children:(0,u.jsx)("button",{"data-pa-sign-out":"",onClick:E,type:"button",children:"Sign Out"})})]})]}),(0,u.jsxs)("details",{className:"pa-site-frame__mobile-navigation",ref:P,children:[(0,u.jsxs)("summary",{"aria-label":"Navigation menu",children:[(0,u.jsx)(j,{}),(0,u.jsx)("span",{className:"pa-site-frame__visually-hidden",children:"Menu"})]}),(0,u.jsxs)("div",{children:[(0,u.jsx)("button",{"aria-controls":"pa-site-frame-search-overlay","aria-expanded":"false","aria-haspopup":"dialog",className:"pa-site-frame__search-toggle pa-site-frame__mobile-search",type:"button",children:"Search"}),"anonymous"===o.kind?(0,u.jsx)(_,{className:"pa-site-frame__mobile-auth-link",currentPath:p,link:n.FRAME_LINKS.signIn,linkOrigin:b,onNavigate:z}):(0,u.jsxs)("section",{children:[(0,u.jsxs)("div",{className:"pa-site-frame__mobile-identity",children:[(0,u.jsx)("span",{className:"pa-site-frame__avatar","data-pa-avatar":"",children:(0,n.getInitials)(o.email)}),(0,u.jsx)("span",{className:"pa-site-frame__mobile-identity-email","data-pa-account-email":"",children:o.email})]}),(0,u.jsx)("h2",{children:"Account"}),(0,u.jsxs)("ul",{children:[H(n.ACCOUNT_LINK_IDS).map(n=>(0,u.jsx)("li",{children:(0,u.jsx)(_,{currentPath:p,link:n,linkOrigin:b,onNavigate:z})},n.href)),(0,u.jsx)("li",{children:(0,u.jsx)("button",{"data-pa-sign-out":"",onClick:E,type:"button",children:"Sign Out"})})]})]}),n.NAVIGATION_GROUPS.map(n=>(0,u.jsxs)("section",{children:[(0,u.jsx)("h2",{children:n.title}),(0,u.jsx)("ul",{children:H(n.linkIds).map(n=>(0,u.jsx)("li",{children:(0,u.jsx)(_,{active:Y(n),currentPath:p,link:n,linkOrigin:b,onNavigate:z})},n.href))})]},n.title))]})]})]})]})]}),(0,u.jsx)("div",{"aria-label":"Site navigation",className:"pa-site-frame__mega-panel","data-pa-mega-panel":"",hidden:null===R,id:"pa-site-frame-mega-panel",onFocus:()=>{G()},onMouseEnter:G,onMouseLeave:D,role:"region",children:(0,u.jsx)("div",{className:"pa-site-frame__mega-panel-inner",children:n.NAVIGATION_GROUPS.map(n=>(0,u.jsxs)("section",{children:[(0,u.jsx)("h2",{children:n.title}),(0,u.jsx)("ul",{children:H(n.linkIds).map(n=>(0,u.jsx)("li",{children:(0,u.jsx)(_,{active:Y(n),currentPath:p,link:n,linkOrigin:b,onNavigate:z})},n.href))})]},n.title))})}),n.NAVIGATION_GROUPS.map(n=>(0,u.jsx)("nav",{"aria-label":n.title,className:"pa-site-frame__sub-navigation","data-
668pa-sub-navigation-group":n.title,hidden:B?.title!==n.title,children:(0,u.jsx)("div",{children:H(n.linkIds).map(n=>(0,u.jsx)(_,{active:Y(n),currentPath:p,link:n,linkOrigin:b,onNavigate:z},n.href))})},n.title))]})},e.SiteFooter=function({auth:t,backendVersion:l,buildVersion:h,currentYear:p,linkOrigin:v,mapUrl:x,onCookieSettings:j,onNavigate:b,visibleRouteNames:I}){const S=n.HOST_ACTIONS.cookieSettings,A=l=>void 0===I?(0,n.isFrameLinkVisible)(l,t):I.includes(l.routeName);return(0,u.jsxs)("footer",{className:"pa-site-frame pa-site-frame--footer","data-pa-site-frame":"footer",style:c.FRAME_FOOTER_INLINE_STYLE,children:[(0,u.jsx)(f,{placement:"footer"}),(0,u.jsxs)("div",{className:"pa-site-frame__footer-inner",children:[(0,u.jsx)("nav",{"aria-label":"Footer",className:"pa-site-frame__footer-columns",children:n.NAVIGATION_GROUPS.map(t=>(0,u.jsxs)("section",{"aria-labelledby":`pa-site-frame-footer-${t.title.toLowerCase()}`,children:[(0,u.jsx)("h2",{id:`pa-site-frame-footer-${t.title.toLowerCase()}`,children:t.title}),(0,u.jsxs)("ul",{children:["Tools"===t.title?(0,u.jsx)("li",{children:(0,u.jsx)(N,{mapUrl:x})}):null,t.linkIds.map(t=>n.FRAME_LINKS[t]).filter(A).map(n=>(0,u.jsx)("li",{children:(0,u.jsx)(_,{currentPath:null,link:n,linkOrigin:v,onNavigate:b})},n.href))]}),"Company"===t.title?(0,u.jsxs)("address",{children:[(0,u.jsx)("strong",{children:n.FRAME_CONTACT.company}),n.FRAME_CONTACT.lines.map(n=>(0,u.jsx)("span",{children:n},n))]}):null]},t.title))}),(0,u.jsxs)("section",{className:"pa-site-frame__image-credits",children:[(0,u.jsx)("h2",{children:n.IMAGE_CREDITS.title}),(0,u.jsx)("p",{children:n.IMAGE_CREDITS.description}),(0,u.jsx)(_,{currentPath:null,link:n.FRAME_LINKS[n.IMAGE_CREDITS.linkId],linkOrigin:v,onNavigate:b})]}),(0,u.jsx)("div",{"aria-label":"Social media",className:"pa-site-frame__social-links",children:n.SOCIAL_LINKS.map(n=>(0,u.jsx)("a",{"aria-label":n.label,href:n.url,rel:"noopener noreferrer",target:"_blank",children:(0,u.jsx)(k,{label:n.label,path:n.path})},n.label))}),(0,u.jsxs)("div",{className:"pa-site-frame__footer-bottom",children:[(0,u.jsx)("nav",{"aria-label":"Legal",children:(0,u.jsxs)("ul",{className:"pa-site-frame__legal-links",children:[n.LEGAL_LINK_IDS.map(t=>(0,u.jsx)("li",{children:(0,u.jsx)(_,{currentPath:null,link:n.FRAME_LINKS[t],linkOrigin:v,onNavigate:b})},t)),(0,u.jsx)("li",{children:(0,u.jsx)("a",{"data-pa-host-action":"cookie-settings","data-pa-host-action-event":S.eventName,href:(0,o.resolveFrameHref)(S.fallbackHref,v),onClick:n=>{void 0!==j&&(0,s.shouldHandleClientNavigation)(n)&&(n.preventDefault(),j())},children:S.label})})]})}),(0,u.jsxs)("p",{children:["\xa9 ",p," PurpleAir, Inc. All rights reserved.",null!==h&&null!==l?(0,u.jsxs)("span",{children:[" ","v ",h,"-",l]}):null]})]})]})]})};var n=r(d[0]),t=r(d[1]),l=r(d[2]),s=r(d[3]),c=r(d[4]),o=r(d[5]),u=r(d[6]);const h={auth:{kind:"anonymous"},cartItemCount:0,activeStoreCategorySlug:null,currentPath:null,currentRouteName:null,logoSrc:"/assets/logo-white.png",mapUrl:null},p={auth:{kind:"anonymous"},buildVersion:null,backendVersion:null,mapUrl:null};function _({currentPath:t,link:l,onNavigate:c,children:h,className:p,linkOrigin:_,active:f,ariaControls:N,ariaExpanded:v,activeSection:x,navigationGroupTitle:j,onFocus:k,onMouseEnter:b,onMouseLeave:I}){const S=null===t?null:(0,s.normalizeFramePath)(new URL(t,"https://www.purpleair.com").pathname),A=(0,o.resolveFrameHref)(l.href,_),E="Login"===l.routeName&&"undefined"!=typeof window?(0,n.buildLoginHref)(A,window.location.href):A;return(0,u.jsx)("a",{"aria-controls":N,"aria-current":!0===f||S===(0,s.normalizeFramePath)(l.href)?"page":void 0,"aria-expanded":v,className:p,"data-pa-active-section":!0===x?"":void 0,"data-pa-internal-link":"","data-pa-navigation-group":j,href:E,onClick:n=>{"Login"!==l.routeName&&void 0!==c&&(0,s.shouldHandleClientNavigation)(n)&&(n.preventDefault(),"StoreCategory"===l.routeName?c({routeName:l.routeName,params:l.params}):c({routeName:l.routeName}))},onFocus:k,onMouseEnter:b,onMouseLeave:I,children:h??l.label})}function f({placement:n}){if("header"===n)return(0,u.jsx)("div",{"aria-hidden":"true",className:"pa-site-frame__wave pa-site-frame__wave--header","data-pa-wave":"header",style:l.HEADER_WAVE_BACKGROUND_STYLE});return(0,u.jsx)("svg",{"aria-hidden":"true",className:"pa-site-frame__wave pa-site-frame__wave--footer","data-pa-wave":"footer",focu
668sable:"false",preserveAspectRatio:"none",viewBox:"0 0 400 120",children:["M0 60 Q80 30 160 55 T320 45 T480 60","M-50 35 Q60 70 180 40 T350 55 T500 30","M0 85 Q100 60 200 90 T400 75","M-30 100 Q90 110 180 95 T360 105 T450 90","M0 18 Q120 8 220 22 T420 15"].map(n=>(0,u.jsx)("path",{d:n},n))})}function N({mapUrl:n}){const t=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("svg",{"aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{d:"M1 6v16l7-4 8 4 7-4V2l-7 4-8-4-7 4zM8 2v16M16 6v16"})}),(0,u.jsx)("span",{children:"Map"})]});return null===n?(0,u.jsx)("span",{"aria-disabled":"true",className:"pa-site-frame__map-action",children:t}):(0,u.jsx)("a",{"aria-label":"Open the map",className:"pa-site-frame__map-action","data-pa-service":"map",href:n,children:t})}function v(){return(0,u.jsx)("svg",{"aria-hidden":"true",className:"pa-site-frame__cart-icon",focusable:"false",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2zm6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2v12z"})})}function x(){return(0,u.jsxs)("svg",{"aria-hidden":"true",className:"pa-site-frame__search-icon",focusable:"false",viewBox:"0 0 24 24",children:[(0,u.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,u.jsx)("path",{d:"M21 21l-4.35-4.35"})]})}function j(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("svg",{"aria-hidden":"true",className:"pa-site-frame__menu-icon pa-site-frame__menu-icon--open",focusable:"false",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})}),(0,u.jsx)("svg",{"aria-hidden":"true",className:"pa-site-frame__menu-icon pa-site-frame__menu-icon--close",focusable:"false",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{d:"M6 6l12 12M18 6 6 18"})})]})}function k({label:n,path:t}){return(0,u.jsx)("svg",{"aria-label":n,role:"img",viewBox:"0 0 24 24",children:(0,u.jsx)("path",{d:t})})}},570,[571,34,579,580,581,585,104]);
669__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FEATURED_STORE_CATEGORIES",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"FRAME_PATHS",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"FRAME_LINKS",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"NAVIGATION_GROUPS",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"ACCOUNT_LINK_IDS",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"LEGAL_LINK_IDS",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"SOCIAL_LINKS",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"FRAME_CONTACT",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"IMAGE_CREDITS",{enumerable:!0,get:function(){return v}}),Object.defineProperty(e,"HOST_ACTIONS",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"FRAME_LAYOUT",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"FRAME_INTERACTION",{enumerable:!0,get:function(){return j}}),e.isFrameLinkVisible=function(t,o){if("public"===t.access)return!0;if("anonymous"===t.access)return"anonymous"===o.kind;if("anonymous"===o.kind)return!1;if("authenticated"===t.access)return!0;return"admin"===t.access?o.isAdmin:o.isSuperOwner};var t=r(d[0]);Object.keys(t).forEach(function(o){'default'===o||Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[o]}})});var o=r(d[1]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var s=r(d[3]);Object.keys(s).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})});var n=r(d[4]);
669Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var l=r(d[5]);Object.keys(l).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var u=r(d[6]);Object.keys(u).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});const p={sensors:{slug:"air-quality-sensors",label:"Air Quality Sensors",navIcon:"\ud83d\udce1"},power:{slug:"power-supplies",label:"Power Supplies",navIcon:"\ud83d\udd0c"},accessories:{slug:"accessories",label:"Accessories",navIcon:"\ud83d\udd27"},replacementParts:{slug:"replacement-parts",label:"Replacement Parts",navIcon:"\ud83d\udd29"}},b=[p.sensors,p.power,p.accessories,p.replacementParts],f={productPrefix:"/products"},h={home:{label:"PurpleAir",routeName:"Home",href:"/",icon:"\u2302",access:"public"},allProducts:{label:"All Products",routeName:"Store",href:"/store",icon:"\ud83d\uded2",access:"public"},sensors:{label:p.sensors.label,routeName:"StoreCategory",href:`/store/${p.sensors.slug}`,icon:p.sensors.navIcon,access:"public",params:{category:p.sensors.slug}},power:{label:p.power.label,routeName:"StoreCategory",href:`/store/${p.power.slug}`,icon:p.power.navIcon,access:"public",params:{category:p.power.slug}},accessories:{label:p.accessories.label,routeName:"StoreCategory",href:`/store/${p.accessories.slug}`,icon:p.accessories.navIcon,access:"public",params:{category:p.accessories.slug}},replacementParts:{label:p.replacementParts.label,routeName:"StoreCategory",href:`/store/${p.replacementParts.slug}`,icon:p.replacementParts.navIcon,access:"public",params:{category:p.replacementParts.slug}},personal:{label:"Personal",routeName:"Personal",href:"/personal",icon:"\ud83c\udfe0",access:"public"},business:{label:"Business",routeName:"Business",href:"/business",icon:"\ud83c\udfe2",access:"public"},education:{label:"Education",routeName:"Education",href:"/education",icon:"\ud83c\udf93",access:"public"},broadcasters:{label:"Broadcasters",routeName:"Broadcasters",href:"/broadcasters",icon:"\ud83d\udce1",access:"public"},government:{label:"Government",routeName:"Government",href:"/government",icon:"\ud83c\udfdb",access:"public"},aboutMap:{label:"Real-Time Map",routeName:"AboutMap",href:"/real-time-map",icon:"\ud83d\uddfa",access:"public"},register:{label:"Register Your Sensor",routeName:"Register",href:"/register",icon:"\ud83d\udccb",access:"public"},mySensors:{label:"My Sensors",routeName:"SensorManagement",href:"/my-sensors",icon:"\ud83d\udee0",access:"authenticated"},flasher:{label:"Firmware Flasher",routeName:"Flasher",href:"/flasher",icon:"\u26a1",access:"superOwner"},sensorUtility:{label:"Sensor Utility",routeName:"SensorUtility",href:"/utility",icon:"\ud83d\udda5",access:"public"},community:{label:"Community",routeName:"Community",href:"/community",icon:"\ud83d\udcac",access:"public"},faq:{label:"FAQ",routeName:"FAQ",href:"/faq",icon:"\u2753",access:"public"},papers:{label:"Scientific Papers",routeName:"Papers",href:"/papers",icon:"\ud83d\udcc4",access:"public"},projects:{label:"Projects & Integrations",routeName:"ProjectsAndIntegrations",href:"/projects-and-integrations",icon:"\ud83d\udd17",access:"public"},api:{label:"API Documentation",routeName:"API",href:"/api",icon:"\ud83d\udd0c",access:"public"},apiTokens:{label:"API Tokens",routeName:"ApiTokens",href:"/api-tokens",icon:"\ud83d\udd11",access:"admin"},status:{label:"System Status",routeName:"Status",href:"/status",icon:"\ud83d\udce1",access:"admin"},about:{label:"About PurpleAir",routeName:"About",href:"/about",icon:"\ud83c\udfe2",access:"public"},blog:{label:"Blog",routeName:"Blog",href:"/blog",icon:"\ud83d\udcf0",access:"public"},press:{label:"Press",routeName:"Press",href:"/press",icon:"\ud83d\udce2",access:"public"},contact:{label:"Contact",routeName:"Contact",href:"/contact",icon:"\u2709",access:"public"},account:{label:"My Account",routeName:"MyAccount",href:"/my-account",icon:"\ud83d\udc64",access:"authenticated"},admin:{label:"Admin",routeName:"Admin",href:"/admin",icon:"\u2699",access:"admin"},cart:{label:"Cart",routeName:"Cart",href:"/cart",icon:"\ud83d\udecd",access:"public"},signIn:{label:"Sign In",routeName:"Login",href:"/login",icon:"\ud83d\udc64",access:"anonymous"},privacy:{label:"Privacy Policy",routeName:"PrivacyPolicy",href:"/policies/privacy-policy",icon:"\xb7",access:"public"},terms:{label:"Terms of Service",routeName:"TermsOfService",href:"/policies/terms-of-service",icon:"\xb7",access:"public"},refund:{label:"Refund Policy",routeName:"RefundPolicy",href:"/policies/refund-policy",icon:"\xb7",access:"public"},shipping:{label:"Shipping Policy",routeName:"ShippingPolicy",href:"/policies/shipping-policy",icon:"\xb7",access:"public"},warranty:{label:"Warranty",routeName:"Warranty",href:"/policies/warranty",icon:"\xb7",access:"public"},doNotSell:{label:"Do Not Sell My Info",routeName:"DoNotSell",href:"/do-not-sell",icon:"\xb7",access:"public"},credits:{label:"View all credits",routeName:"Credits",href:"/credits",icon:"\xb7",access:"public"}},y=[{title:"Store",overviewLinkId:"allProducts",linkIds:["allProducts","sensors","power","accessories","replacementParts"],associatedPathPrefixes:[f.productPrefix,h.cart.href]},{title:"Solutions",linkIds:["personal","business","education","broadcasters","government"]},{title:"Tools",linkIds:["aboutMap","register","mySensors","flasher","sensorUtility"]},{title:"Resources",linkIds:["community","faq","papers","projects","api","apiTokens","
669status"]},{title:"Company",linkIds:["about","blog","press","contact"]}],P=["account","mySensors","admin"],O=["privacy","terms","refund","shipping","warranty","doNotSell"],N=[{label:"Facebook",url:"https://www.facebook.com/ThePurpleAir/",path:"M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z"},{label:"X",url:"https://twitter.com/thepurpleair",path:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"},{label:"Instagram",url:"https://www.instagram.com/thepurpleair",path:"M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z"},{label:"YouTube",url:"https://youtube.com/@thepurpleair",path:"M21.543 6.498C22 8.28 22 12 22 12s0 3.72-.457 5.502c-.254.985-.997 1.76-1.938 2.022C17.896 20 12 20 12 20s-5.893 0-7.605-.476c-.945-.266-1.687-1.04-1.938-2.022C2 15.72 2 12 2 12s0-3.72.457-5.502c.254-.985.997-1.76 1.938-2.022C6.107 4 12 4 12 4s5.896 0 7.
669605.476c.945.266 1.687 1.04 1.938 2.022zM10 15.5l6-3.5-6-3.5v7z"}],S={company:"PurpleAir, Inc.",lines:["860 W 14600 S, Suite 600","Bluffdale, UT 84065"]},v={title:"Photo Credits",description:"Images credited to photographers, agencies, and other sources.",linkId:"credits"},A={cookieSettings:{label:"Cookie Settings",fallbackHref:"/policies/privacy-policy",eventName:"purpleair:cookie-settings-requested"}},I={headerHeightPx:56,headerActionSizePx:40,headerActionIconSizePx:22,avatarSizePx:36,avatarButtonPaddingPx:4,avatarFontSizePx:14,contentMaxWidthPx:1280,footerContentMaxWidthPx:1024,mobileBreakpointPx:640,horizontalPaddingPx:24,compactHorizontalPaddingPx:16},j={headerRevealDeltaPx:4,headerTransitionDurationMs:250,hoverOpenDelayMs:200,hoverCloseDelayMs:300}},571,[572,573,575,574,576,577,578]);
670__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getInitials=function(c){if(null==c||""===c)return n;const[f]=c.split("@"),l=(f??"").split(t).filter(t=>""!==t),[p,_]=l;if(void 0===p)return n;if(void 0===_)return u(p).slice(0,o).map(s).join("");return[p,_].map(t=>s(u(t)[0]??"")).join("")};const t=/[._-]/,n="?",o=2;function u(t){return Array.from(t)}function s(t){const n=t.toUpperCase();return 1===u(n).length?n:t}},572,[]);
671__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CART_COUNT_COOKIE_NAME",{enumerable:!0,get:function(){return n}}),e.serializeCartCountCookie=function(u,s){const c=Number.isFinite(u)?Math.max(0,Math.trunc(u)):0;return(0,t.serializeSharedCookie)(n,String(c),Object.assign({hostname:s.hostname,statedDomain:s.statedDomain,maxAgeSeconds:s.maxAgeSeconds??o},void 0===s.secure?{}:{secure:s.secure}))},e.parseCartCountCookie=function(o){const u=(0,t.readCookieValue)(o,n);if(null===u||!/^\d+$/.test(u))return null;return Number(u)},e.formatCartBadge=function(t){if(!Number.isFinite(t)||t<=0)return null;return t>u?`${String(u)}+`:String(Math.trunc(t))};var t=r(d[0]);const n="pa_cart_count",o=2592e3,u=99},573,[574]);
672__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"COOKIE_DOMAIN_META_NAME",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"COOKIE_DOMAIN_GLOBAL_NAME",{enumerable:!0,get:function(){return n}}),e.resolveSharedCookieDomain=c,e.readCookieValue=function(t,n){for(const o of t.split(";")){const t=o.indexOf("=");if(-1!==t&&o.slice(0,t).trim()===n)return o.slice(t+1).trim()}return null},e.serializeSharedCookie=function(t,n,o){const u=[`${t}=${n}`,"Path=/",`Max-Age=${String(o.maxAgeSeconds)}`,"SameSite=Lax"],s=c(o);void 0!==s&&u.push(`Domain=${s}`);(o.secure??1)&&u.push("Secure");return u.join("; ")};const t="pa-cookie-domain",n="__PA_COOKIE_DOMAIN__";function o(t){return t.includes(":")||/^\d{1,3}(\.\d{1,3}){3}$/.test(t)}function u(t,n){return t===n||t.endsWith(`.${n}`)}function c(t){const n=t.hostname.trim().toLowerCase();if(""===n||"localhost"===n||o(n))return;const c=(t.statedDomain??"").trim().toLowerCase().replace(/^\./,"");return c.split(".").filter(t=>t.length>0).length<2?void 0:u(n,c)?`.${c}`:void 0}},574,[]);
673__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CONSENT_POLICY_VERSION",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"CONSENT_COOKIE_NAME",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"DEFAULT_PREFERENCES",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"ALL_ACCEPTED",{enumerable:!0,get:function(){return l}}),e.preferencesForMethod=f,e.createStoredConsent=function(n,o,c){const s=f(n,o),l=c?.now?.()??new Date;return{version:c?.version??t,method:n,preferences:s.preferences,analytics:s.analytics,marketing:s.marketing,updatedAt:l.toISOString()}},e.serializeConsentCookie=function(t,s){return(0,n.serializeSharedCookie)(o,encodeURIComponent(JSON.stringify(t)),Object.assign({hostname:s.hostname,statedDomain:s.statedDomain,maxAgeSeconds:s.maxAgeSeconds??c},void 0===s.secure?{}:{secure:s.secure}))},e.parseConsentCookie=function(t){const c=(0,n.readCookieValue)(t,o);if(null===c)return null;try{return p(JSON.parse(decodeURIComponent(c)))}catch{return null}},e.parseStoredConsent=function(n){if(null===n||""===n)return null;try{return p(JSON.parse(n))}catch{return null}},e.needsConsentPrompt=function(n,o=t){if(null===n)return!0;return n.version<o},e.analyticsAllowed=function(n){return!0===n?.analytics},e.marketingAllowed=function(n){return!0===n?.marketing},e.preferencesAllowed=function(n){return!0===n?.preferences},e.buildConsentLogUrl=y,e.logConsent=async function(n,t,o){const c=o?.fetchImpl??globalThis.fetch;if("function"!=typeof c)return;try{await c(y(n,t,o?.pageUrl),{method:"POST",credentials:"include",keepalive:!0})}catch{}};var n=r(d[0]);const t=1,o="pa_cookie_consent",c=31536e3,s={necessary:!0,preferences:!1,analytics:!1,marketing:!1},l={necessary:!0,preferences:!0,analytics:!0,marketing:!0},u=new Set(["accept-all","reject-all","custom"]);function f(n,t){return"accept-all"===n?l:"reject-all"===n?s:{necessary:!0,preferences:!0===t?.preferences,analytics:!0===t?.analytics,marketing:!0===t?.marketing}}function p(n){if("object"!=typeof n||null===n)return null;const t=n,{version:o,method:c,preferences:s,analytics:l,marketing:f,updatedAt:p}=t;return"number"==typeof o&&"string"==typeof c&&u.has(c)&&"boolean"==typeof s&&"boolean"==typeof l&&"boolean"==typeof f&&"string"==typeof p?{version:o,method:c,preferences:s,analytics:l,marketing:f,updatedAt:p}:null}function y(n,t,o){const c=n.replace(/\/$/,""),s=new URLSearchParams({logc
673onsent:"true",preferences:String(t.preferences),analytics:String(t.analytics),marketing:String(t.marketing),version:String(t.version),method:t.method});return void 0!==o&&s.set("url",o),`${c}/api/v1/cookieconsent.json?${s.toString()}`}},575,[574]);
674__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CONSENT_COPY",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"NECESSARY_CATEGORY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"CONSENT_CATEGORIES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"CONSENT_SIMPLE_BUTTONS",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"CONSENT_CUSTOMIZE_BUTTONS",{enumerable:!0,get:function(){return s}});const t={simpleTitle:"Cookies & Privacy",simpleBody:"This website uses cookies to ensure you get the best experience.",learnMore:"Read our Privacy Policy",customizeTitle:"Cookie Preferences",customizeSubtitle:"Choose which categories of cookies you want to allow. You can change this at any time."},o={label:"Necessary",description:"Essential for the website to function correctly.",status:"Always on"},n=[{key:"preferences",label:"Site Preferences",description:"Cookies that remember your site preferences such as language, display settings, and region."},{key:"analytics",label:"Analytics",description:"Cookies that help us understand how visitors interact with our website by collecting and reporting information anonymously."},{key:"marketing",label:"Marketing",description:"Cookies used to deliver relevant advertisements and track campaign effectiveness."}],c=[{action:"accept-all",label:"Accept All",role:"primary"},{action:"reject-all",label:"Reject All",role:"secondary"},{action:"customize",label:"Customize",role:"ghost"}],s=[{action:"save",label:"Save Preferences",role:"primary"},{action:"accept-all",label:"Accept All",role:"secondary"}]},576,[]);
675__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.computeHeaderVisibility=function(n){const c=n.headerHeightPx??t.FRAME_LAYOUT.headerHeightPx,l=Math.max(n.currentScrollY,0);if(l<=c)return{hidden:!1,referenceScrollY:l};if(!n.state.hidden)return{hidden:l>n.state.referenceScrollY,referenceScrollY:l};if(l>n.state.referenceScrollY)return{hidden:!0,referenceScrollY:l};if(l<=n.state.referenceScrollY-t.FRAME_INTERACTION.headerRevealDeltaPx)return{hidden:!1,referenceScrollY:l};return n.state};var t=r(d[0])},577,[571]);
676__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"LOGIN_RETURN_PARAM",{enumerable:!0,get:function(){return n}}),e.buildLoginHref=function(o,u){const l=t(u);if(null!==l&&l.pathname.endsWith("/login"))return o;const c=o.includes("?")?"&":"?";return`${o}${c}${n}=${encodeURIComponent(u)}`},e.readLoginReturnFromSearch=function(t){const o=t.startsWith("?")?t.slice(1):t;if(""===o)return null;const u=new URLSearchParams(o).get(n);return null===u||""===u?null:u},e.resolveLoginReturn=function(n,u,l){if(null==n||""===n.trim())return null;const c=t(u);if(null===c)return null;const s=t(n,c.href);if(null===s||o(s,c))return null;const f=new Set([c.origin]);for(const n of l){const o=t(n);null!==o&&f.add(o.origin)}return f.has(s.origin)?s.href:null};const n="return";function t(n,t){let o;try{o=new URL(n,t)}catch{return null}return"https:"!==o.protocol&&"http:"!==o.protocol||""!==o.username||""!==o.password?null:o}function o(n,t){return n.origin===t.origin&&n.pathname===t.pathname&&n.search===t.search}},578,[]);
677__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HEADER_WAVE_BACKGROUND_STYLE",{enumerable:!0,get:function(){return o}});const t=["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 56' preserveAspectRatio='none'>","<path d='M0 28 Q25 18 50 28 T100 28 T150 28 T200 28' stroke='rgba(255,255,255,0.15)' stroke-width='2.5' fill='none'/>","<path d='M0 18 Q25 10 50 18 T100 18 T150 18 T200 18' stroke='rgba(255,255,255,0.10)' stroke-width='2' fill='none'/>","<path d='M0 38 Q25 46 50 38 T100 38 T150 38 T200 38' stroke='rgba(255,255,255,0.10)' stroke-width='2' fill='none'/>","<path d='M0 10 Q25 4 50 10 T100 10 T150 10 T200 10' stroke='rgba(255,255,255,0.06)' stroke-width='1.5' fill='none'/>","<path d='M0 46 Q25 52 50 46 T100 46 T150 46 T200 46' stroke='rgba(255,255,255,0.06)' stroke-width='1.5' fill='none'/>","</svg>"].join(""),o={backgroundImage:`url("data:image/svg+xml,${encodeURIComponent(t)}")`,backgroundPosition:"right center",backgroundRepeat:"repeat-x",backgroundSize:"auto 100%",pointerEvents:"none"}},579,[]);
678__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return(t.length>1?t.replace(/\/+$/,""):t)||"/"}
678Object.defineProperty(e,'__esModule',{value:!0}),e.normalizeFramePath=t,e.calculateActiveRoute=function(n,l){const u=t(new URL(n,"https://www.purpleair.com").pathname);return l.map(t).filter(t=>"/"===t?"/"===u:u===t||u.startsWith(`${t}/`)).sort((t,n)=>n.length-t.length)[0]??null},e.shouldHandleClientNavigation=function(t){return!(0!==t.button||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)}},580,[]);
679__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"FRAME_CSS_VARIABLES",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"FRAME_HEADER_INLINE_STYLE",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"FRAME_MAIN_HEADER_INLINE_STYLE",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"FRAME_FOOTER_INLINE_STYLE",{enumerable:!0,get:function(){return f}});var t=r(d[0]);const n=(0,r(d[1]).getColorTokens)("light").color,o={"--pa-frame-rem":"16px","--pa-frame-text":n.text.primary,"--pa-frame-soft-text":n.text.secondary,"--pa-frame-text-soft":n.text.soft,"--pa-frame-caption":n.text.muted,"--pa-frame-inverse":n.text.inverse,"--pa-frame-heading":n.text.heading,"--pa-frame-surface":n.surface.page,"--pa-frame-footer-surface":n.surface.subtle,"--pa-frame-overlay-shadow":`0 calc(0.5 * var(--pa-frame-rem)) calc(1.5 * var(--pa-frame-rem)) color-mix(in srgb, ${n.surface.overlay} 12%, transparent)`,"--pa-frame-scrim":`color-mix(in srgb, ${n.surface.overlay} 55%, transparent)`,"--pa-frame-mega-shadow":`0 calc(0.25 * var(--pa-frame-rem)) calc(1.5 * var(--pa-frame-rem)) color-mix(in srgb, ${n.surface.overlay} 12%, transparent)`,"--pa-frame-subtle-shadow":`0 calc(0.0625 * var(--pa-frame-rem)) calc(0.1875 * var(--pa-frame-rem)) color-mix(in srgb, ${n.surface.overlay} 6%, transparent)`,"--pa-frame-border":n.border.default,"--pa-frame-link":n.brand.accent,"--pa-frame-link-hover":n.brand.primaryDark,"--pa-frame-focus":n.focus.ring,"--pa-frame-brand":n.brand.primary,"--pa-frame-brand-dark":n.brand.primaryDark,"--pa-frame-badge":n.status.error.fg,"--pa-frame-header-border":`color-mix(in srgb, ${n.surface.overlay} 10%, transparent)`,"--pa-frame-trigger-text":`color-mix(in srgb, ${n.text.inverse} 85%, transparent)`,"--pa-frame-trigger-hover":`color-mix(in srgb, ${n.text.inverse} 20%, transparent)`,"--pa-frame-glass-background":`color-mix(in srgb, ${n.surface.glassOverlay} 25%, transparent)`,"--pa-frame-menu-glass-background":`color-mix(in srgb, ${n.surface.glassOverlay} 30%, transparent)`,"--pa-frame-glass-border":`color-mix(in srgb, ${n.text.inverse} 30%, transparent)`,"--pa-frame-brand-tint":`color-mix(in srgb, ${n.brand.primary} 9%, ${n.surface.page})`,"--pa-frame-sub-navigation-text":n.text.soft,"--pa-frame-sub-navigation-border":n.border.warm,"--pa-frame-mobile-band-text":n.text.secondaryStrong,"--pa-frame-mobile-active-background":n.surface.brandTint,"--pa-frame-mobile-chevron":n.text.secondary,"--pa-frame-mega-heading-text":n.text.secondary,"--pa-frame-mega-link-text":n.text.secondaryStrong,"--pa-frame-wave-primary":n.chart.signal.good,"--pa-frame-wave-secondary":n.decorativeIcon.fileStatus.data.accent,"--pa-frame-header-height":`${String(t.FRAME_LAYOUT.headerHeightPx)}px`,"--pa-frame-header-action-size":`${String(t.FRAME_LAYOUT.headerActionSizePx)}px`,"--pa-frame-header-action-icon-size":`${String(t.FRAME_LAYOUT.headerActionIconSizePx)}px`,"--pa-frame-avatar-size":`${String(t.FRAME_LAYOUT.avatarSizePx)}px`,"--pa-frame-avatar-padding":`${String(t.FRAME_LAYOUT.avatarButtonPaddingPx)}px`,"--pa-frame-avatar-font-size":`${String(t.FRAME_LAYOUT.avatarFontSizePx)}px`,"--pa-frame-content-max-width":`${String(t.FRAME_LAYOUT.contentMaxWidthPx)}px`,"--pa-frame-footer-content-max-width":`${String(t.FRAME_LAYOUT.footerContentMaxWidthPx)}px`,"--pa-frame-horizontal-padding":`${String(t.FRAME_LAYOUT.horizontalPaddingPx)}px`,"--pa-frame-compact-horizontal-padding":`${String(t.FRAME_LAYOUT.compactHorizontalPaddingPx)}px`},p=Object.assign({},o),c={backgroundImage:`linear-gradient(to right, ${n.brand.primary} 0%, ${n.brand.primary} 67%, ${n.surface.page} 100%)`},f=Object.assign({},o,{backgroundImage:`linear-gradient(135deg, ${n.surface.subtle}, ${n.surface.page})`})},581,[571,582]);
680__d(function(g,r,i,a,m,e,d){"use strict";
680Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"colorThemes",{enumerable:!0,get:function(){return t.colorThemes}}),Object.defineProperty(e,"getColorTokens",{enumerable:!0,get:function(){return t.getColorTokens}}),Object.defineProperty(e,"COLOR_POLICY",{enumerable:!0,get:function(){return n.COLOR_POLICY}}),Object.defineProperty(e,"CSS_BANNED_PROPERTIES",{enumerable:!0,get:function(){return n.CSS_BANNED_PROPERTIES}}),Object.defineProperty(e,"ALLOWED_IMPORTS",{enumerable:!0,get:function(){return n.ALLOWED_IMPORTS}}),Object.defineProperty(e,"SEMANTIC_TOKENS",{enumerable:!0,get:function(){return n.SEMANTIC_TOKENS}});var t=r(d[0]),n=r(d[1])},582,[583,584]);
681__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"colorThemes",{enumerable:!0,get:function(){return f}}),e.getColorTokens=function(b){return f[b]};const f={light:{color:{text:{primary:"#1a1a1a",secondary:"#6b7280",secondaryStrong:"#555",soft:"#666",muted:"#9ca3af",inverse:"#ffffff",heading:"#374151",code:"#e2e8f0",codeLineNumber:"#475569"},surface:{page:"#ffffff",default:"#f8f9fa",subtle:"#f3f4f6",raised:"#f8f9fa",overlay:"#1a1a1a",glassOverlay:"#000000",input:"#ffffff",sidebar:"#ffffff",badge:"#f3f4f6",brandTint:"#f3e8f3",code:"#0f172a"},border:{default:"#dee2e6",subtle:"#e5e7eb",input:"#d1d5db",panel:"#dee2e6",section:"#f3f4f6",warm:"#e8e4dc"},status:{success:{fg:"#059669",bg:"#ecfdf5",border:"#a7f3d0"},warning:{fg:"#d97706",bg:"#fef3c7",border:"#f59e0b"},error:{fg:"#dc2626",bg:"#fef2f2",border:"#fecaca"}},action:{primary:{fg:"#ffffff",bg:"#2563eb",bgHover:"#1d4ed8"},danger:{bg:"#ef4444",bgHover:"#dc2626"},utility:{bg:"#7c3aed",bgHover:"#6d28d9"},disconnect:{bg:"#6b7280",bgHover:"#4b5563"}},focus:{ring:"#2563eb"},icon:{default:"#374151",muted:"#9ca3af"},chart:{series:{a:{fg:"rgba(255, 0, 0, 0.9)",fgAvg:"rgba(180, 0, 0, 0.6)",bg:"rgba(255, 0, 0, 0.15)"},b:{fg:"rgba(0, 0, 255, 0.9)",fgAvg:"rgba(0, 0, 180, 0.6)",bg:"rgba(0, 0, 255, 0.15)"},sensorLevel:{fg:"rgba(13, 148, 136, 0.9)",fgAvg:"rgba(13, 148, 136, 0.6)",bg:"rgba(13, 148, 136, 0.15)"},diff:{fg:"rgba(128, 0, 200, 0.8)"}},axis:{stroke:"#888",gridStroke:"rgba(0,0,0,0.07)"},signal:{good:"#059669",warn:"#d97706",error:"#dc2626",bandWarn:"rgba(217, 119, 6, 0.08)",bandError:"rgba(220, 38, 38, 0.08)"}},brand:{primary:"#aa44aa",primaryDark:"#882288",accent:"#8833aa",surfaceDark:"#1a1a2e"},decorativeIcon:{folder:{codicon:{tab:"#daa83a",body:"#f0c95c"},finder:{tab:"#6ba8e5",body:"#82bbf0",highlight:"#a8d4fa"}},fileStatus:{data:{page:"#d4edda",accent:"#28a745"},csvEmpty:{page:"#fff3cd",accent:"#d4960a"},generic:{page:"#e9ecef",accent:"#8b95a1"}}},log:{success:"#10b981",info:"#3b82f6",warn:"#f59e0b",brand:"#8b5cf6"}}},dark:{color:{text:{primary:"#e2e5eb",secondary:"#8b90a0",secondaryStrong:"#c5c9d4",soft:"#8b90a0",muted:"#5f6478",inverse:"#0f1117",heading:"#c5c9d4",code:"#c5c9d4",codeLineNumber:"#4a4f60"},surface:{page:"#0f1117",default:"#1a1d27",subtle:"#262a36",raised:"#1a1d27",overlay:"#0d0f14",glassOverlay:"#000000",input:"#1e2130",sidebar:"#1a1d27",badge:"#262a36",brandTint:"#262a36",code:"#0d0f14"},border:{default:"#2a2e3a",subtle:"#2a2e3a",input:"#363b4a",panel:"#2a2e3a",section:"#222632",warm:"#2a2e3a"},status:{success:{fg:"#10b981",bg:"#052e16",border:"#065f46"},warning:{fg:"#f59e0b",bg:"#422006",border:"#92400e"},error:{fg:"#f87171",bg:"#2d0a0a",border:"#7f1d1d"}},action:{primary:{fg:"#ffffff",bg:"#3b82f6",bgHover:"#60a5fa"},danger:{bg:"#b91c1c",bgHover:"#dc2626"},utility:{bg:"#5b21b6",bgHover:"#6d28d9"},disconnect:{bg:"#4b5563",bgHover:"#6b7280"}},focus:{ring:"#3b82f6"},icon:{default:"#c5c9d4",muted:"#5f6478"},chart:{series:{a:{fg:"rgba(248, 113, 113, 0.9)",fgAvg:"rgba(180, 60, 60, 0.6)",bg:"rgba(248, 113, 113, 0.15)"},b:{fg:"rgba(96, 165, 250, 0.9)",fgAvg:"rgba(50, 100, 200, 0.6)",bg:"rgba(96, 165, 250, 0.15)"},sensorLevel:{fg:"rgba(45, 212, 191, 0.9)",fgAvg:"rgba(45, 212, 191, 0.6)",bg:"rgba(45, 212, 191, 0.15)"},diff:{fg:"rgba(180, 80, 255, 0.8)"}},axis:{stroke:"#666",gridStroke:"rgba(255,255,255,0.08)"},signal:{good:"#10b981",warn:"#f59e0b",error:"#f87171",bandWarn:"rgba(217, 119, 6, 0.12)",bandError:"rgba(220, 38, 38, 0.12)"}},brand:{primary:"#aa44aa",primaryDark:"#882288",accent:"#8833aa",surfaceDark:"#1a1a2e"},decorativeIcon:{folder:{codicon:{tab:"#daa83a",body:"#f0c95c"},finder:{tab:"#6ba8e5",body:"#82bbf0",highlight:"#a8d4fa"}},fileStatus:{data:{page:"#d4edda",accent:"#28a745"},csvEmpty:{page:"#fff3cd",accent:"#d4960a"},generic:{page:"#e9ecef",accent:"#8b95a1"}}},log:{success:"#10b981",info:"#3b82f6",warn:"#f59e0b",brand:"#8b5cf6"}}}}},583,[]);
682__d(function(g,r,i,a,m,e,d){"use strict";
682Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CSS_BANNED_PROPERTIES",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"ALLOWED_IMPORTS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"SEMANTIC_TOKENS",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"COLOR_POLICY",{enumerable:!0,get:function(){return l}});const o=["color","background-color","background","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","outline-color","text-decoration-color","caret-color","accent-color","fill","stroke","box-shadow","text-shadow","column-rule-color","flood-color","lighting-color","stop-color"],t=["@purpleair/design-tokens","@purpleair/design-tokens/colors"],c=[{path:"color.text.primary",family:"text"},{path:"color.text.secondary",family:"text"},{path:"color.text.secondaryStrong",family:"text"},{path:"color.text.soft",family:"text"},{path:"color.text.muted",family:"text"},{path:"color.text.inverse",family:"text"},{path:"color.text.heading",family:"text"},{path:"color.text.code",family:"text"},{path:"color.text.codeLineNumber",family:"text"},{path:"color.surface.page",family:"surface"},{path:"color.surface.default",family:"surface"},{path:"color.surface.subtle",family:"surface"},{path:"color.surface.raised",family:"surface"},{path:"color.surface.overlay",family:"surface"},{path:"color.surface.glassOverlay",family:"surface"},{path:"color.surface.input",family:"surface"},{path:"color.surface.sidebar",family:"surface"},{path:"color.surface.badge",family:"surface"},{path:"color.surface.brandTint",family:"surface"},{path:"color.surface.code",family:"surface"},{path:"color.border.default",family:"border"},{path:"color.border.subtle",family:"border"},{path:"color.border.input",family:"border"},{path:"color.border.panel",family:"border"},{path:"color.border.section",family:"border"},{path:"color.border.warm",family:"border"},{path:"color.status.success.fg",family:"status"},{path:"color.status.success.bg",family:"status"},{path:"color.status.success.border",family:"status"},{path:"color.status.warning.fg",family:"status"},{path:"color.status.warning.bg",family:"status"},{path:"color.status.warning.border",family:"status"},{path:"color.status.error.fg",family:"status"},{path:"color.status.error.bg",family:"status"},{path:"color.status.error.border",family:"status"},{path:"color.action.primary.fg",family:"action"},{path:"color.action.primary.bg",family:"action"},{path:"color.action.primary.bgHover",family:"action"},{path:"color.action.danger.bg",family:"action"},{path:"color.action.danger.bgHover",family:"action"},{path:"color.action.utility.bg",family:"action"},{path:"color.action.utility.bgHover",family:"action"},{path:"color.action.disconnect.bg",family:"action"},{path:"color.action.disconnect.bgHover",family:"action"},{path:"color.focus.ring",family:"focus"},{path:"color.icon.default",family:"icon"},{path:"color.icon.muted",family:"icon"},{path:"color.chart.series.a.fg",family:"chart"},{path:"color.chart.series.a.fgAvg",family:"chart"},{path:"color.chart.series.a.bg",family:"chart"},{path:"color.chart.series.b.fg",family:"chart"},{path:"color.chart.series.b.fgAvg",family:"chart"},{path:"color.chart.series.b.bg",family:"chart"},{path:"color.chart.series.sensorLevel.fg",family:"chart"},{path:"color.chart.series.sensorLevel.fgAvg",family:"chart"},{path:"color.chart.series.sensorLevel.bg",family:"chart"},{path:"color.chart.series.diff.fg",family:"chart"},{path:"color.chart.axis.stroke",family:"chart"},{path:"color.chart.axis.gridStroke",family:"chart"},{path:"color.chart.signal.good",family:"chart"},{path:"color.chart.signal.warn",family:"chart"},{path:"color.chart.signal.error",family:"chart"},{path:"color.chart.signal.bandWarn",family:"chart"},{path:"color.chart.signal.bandError",family:"chart"},{path:"color.brand.primary",family:"brand"},{path:"color.brand.primaryDark",family:"brand"},{path:"color.brand.accent",family:"brand"},{path:"color.brand.surfaceDark",family:"brand"},{path:"color.decorativeIcon.folder.codicon.tab",family:"decorativeIcon"},{path:"color.decorativeIcon.folder.codicon.body",family:"decorativeIcon"},{path:"color.decorativeIcon.folder.finder.tab",family:"decorativeIcon"},{path:"color.decorativeIcon.folder.finder.body",family:"decorativeIcon"},{path:"color.decorativeIcon.folder.finder.highlight",family:"decorativeIcon"},{path:"color.decorativeIcon.fileStatus.data.page",family:"decorativeIcon"},{path:"color.decorativeIcon.fileStatus.data.accent",family:"decorativeIcon"},{path:"color.decorativeIcon.fileStatus.csvEmpty.page",family:"decorativeIcon"},{path:"color.decorativeIcon.fileStatus.csvEmpty.accent",family:"decorativeIcon"},{path:"color.decorativeIcon.fileStatus.generic.page",family:"decorativeIcon"},{path:"color.decorativeIcon.fileStatus.generic.accent",family:"decorativeIcon"},{path:"color.log.success",family:"log"},{path:"color.log.info",family:"log"},{path:"color.log.warn",family:"log"},{path:"color.log.brand",family:"log"}],l={themes:["light","dark"],semanticTokens:c,allowedImports:t,cssBannedProperties:o}},584,[]);
683__d(function(g,r,i,a,m,e,d){"use strict";function n(n,o){const t=new URL(n);if("https:"!==t.protocol&&"http:"!==t.protocol)throw new Error(`${o} must use HTTP or HTTPS.`);return t}
683Object.defineProperty(e,'__esModule',{value:!0}),e.resolveFrameHref=function(n,o){return void 0===o?n:new URL(n,o).href},e.parseAbsoluteWebUrl=n,e.parseCanonicalOrigin=function(o){const t=n(o,"canonicalOrigin");if(t.href!==`${t.origin}/`)throw new Error("canonicalOrigin must contain only an origin.");return t}},585,[]);
684__d(function(g,r,i,a,m,e,d){},586,[]);
685__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useCookieConsent=function(){return(0,t.useContext)(n.CookieConsentContext)};var t=r(d[0]),n=r(d[1])},587,[34,588]);
686__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CookieConsentContext",{enumerable:!0,get:function(){return p}}),e.CookieConsentProvider=function({children:o}){const{isAuthenticated:E,isLoading:h}=(0,s.useAuth)(),[v,w]=(0,t.useState)(null),[A,P]=(0,t.useState)(!1),[S,F]=(0,t.useState)(!1),j=(0,t.useRef)(0);(0,t.useEffect)(()=>{const t=j.current+1;return j.current=t,(async function(){let o=null;try{o=await(0,u.readConsent)()}catch(n){l.logger.warn('[CookieConsent] Failed to read stored consent:',(0,c.describeError)(n))}if(t===j.current){if(!(0,n.needsConsentPrompt)(o))return w(o),void P(!1);if(!h){if(E){const n=await y();if(t!==j.current)return;if(null!==n)return w(n),P(!1),F(!0),void b(n)}w(o),P(!0)}}})(),()=>{j.current+=1}},[E,h]);const N=(0,t.useCallback)(n=>{w(n),P(!1),F(!1),b(n),k(n)},[]),_=(0,t.useCallback)(()=>{N((0,n.createStoredConsent)('accept-all'))},[N]),R=(0,t.useCallback)(()=>{N((0,n.createStoredConsent)('reject-all'))},[N]),V=(0,t.useCallback)(t=>{N((0,n.createStoredConsent)('custom',t))},[N]),x=(0,t.useCallback)(()=>{F(!1),P(!0)},[]),L=(0,t.useCallback)(()=>{F(!1)},[]),M=(0,t.useMemo)(()=>f(v),[v]),B=null!==v&&!(0,n.needsConsentPrompt)(v),D=(0,t.useMemo)(()=>({hasConsented:B,consent:M,bannerVisible:A,acceptAll:_,rejectAll:R,updatePreferences:V,showBanner:x,syncNoticeVisible:S,dismissSyncNotice:L}),[B,M,A,_,R,V,x,S,L]);return(0,C.jsx)(p.Provider,{value:D,children:o})};var n=r(d[0]),t=r(d[1]);r(d[2]);var o=r(d[3]),s=r(d[4]),c=r(d[5]),l=r(d[6]),u=r(d[7]),C=r(d[8]);function f(t){return null===t?n.DEFAULT_PREFERENCES:{necessary:!0,preferences:t.preferences,analytics:t.analytics,marketing:t.marketing}}async function b(n){try{await(0,u.writeConsent)(n)}catch(n){l.logger.warn('[CookieConsent] Failed to persist consent:',(0,c.describeError)(n))}}async function y(){try{const t=await o.cookieConsentApi.getCurrentConsent();return null===t||(0,n.needsConsentPrompt)(t)?null:t}catch(n){return l.logger.debug('[CookieConsent] Account consent sync unavailable:',(0,c.describeError)(n)),null}}async function k(n){try{await o.cookieConsentApi.logCookieConsent({preferences:n.preferences,analytics:n.analytics,marketing:n.marketing,version:n.version,method:n.method})}catch(n){l.logger.warn('[CookieConsent] Failed to log consent:',(0,c.describeError)(n))}}const p=(0,t.createContext)({hasConsented:!1,consent:n.DEFAULT_PREFERENCES,bannerVisible:!1,acceptAll:()=>{},rejectAll:()=>{},updatePreferences:()=>{},showBanner:()=>{},syncNoticeVisible:!1,dismissSyncNotice:()=>{}})},588,[571,34,95,589,411,468,469,590,104]);
687__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"cookieConsentApi",{enumerable:!0,get:function(){return c}});var n=r(d[0]),t=r(d[1]);function o(n){return n?'true':'false'}function s(){if('undefined'!=typeof window)return window.location.href}const c={async logCookieConsent(n){const c=s();await t.cookieconsentJson.postCookieConsent({query:Object.assign({logconsent:'true',preferences:o(n.preferences),analytics:o(n.analytics),marketing:o(n.marketing),version:String(n.version),method:n.method},void 0===c?{}:{url:c})})},async getCurrentConsent(){const o=await t.cookieconsent.getCurrentCookieConsent();return void 0===o?null:(0,n.parseStoredConsent)(JSON.stringify({version:o.version,method:o.method,preferences:o.preferences,analytics:o.analytics,marketing:o.marketing,updatedAt:(new Date).toISOString()}))}}},589,[571,471]);
688__d(function(g,r,i,a,m,e,d){"use strict";
688Object.defineProperty(e,'__esModule',{value:!0}),e.readConsent=function(){if('undefined'==typeof document)return Promise.resolve(null);return Promise.resolve((0,o.parseConsentCookie)(document.cookie))},e.writeConsent=function(t){if('undefined'==typeof document)return Promise.resolve();const s='undefined'==typeof window?'':window.location.hostname,u='undefined'==typeof window||'https:'===window.location.protocol;return document.cookie=(0,o.serializeConsentCookie)(t,{hostname:s,secure:u,statedDomain:(0,n.readStatedCookieDomain)(document)}),Promise.resolve()};var o=r(d[0]),n=r(d[1])},590,[571,591]);
689__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readStatedCookieDomain=function(o){const u=o.querySelector(`meta[name="${t.COOKIE_DOMAIN_META_NAME}"]`),c=n(u?.content);if(void 0!==c)return c;const _=o.defaultView;return n(_?.[t.COOKIE_DOMAIN_GLOBAL_NAME])};var t=r(d[0]);function n(t){if("string"!=typeof t)return;const n=t.trim();return""===n?void 0:n}},591,[571]);
690__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getReadyWebServiceUrl=function(t){if('ready'!==t.status)return null;if(!URL.canParse(t.url))return null;const n=new URL(t.url);return'https:'===n.protocol||'http:'===n.protocol?n.href:null}},592,[]);
691__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getAccessibleFrameRouteNames=function(u,c,o){return Array.from(new Set(Object.values(t.FRAME_LINKS).map(t=>t.routeName))).filter(t=>(0,s.isRouteAccessible)(t,u,c,o))};var t=r(d[0]),s=r(d[1])},593,[571,485]);
692__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.NavVisibilityProvider=function({children:o}){const[l,h]=(0,n.useState)(!1),[f,b]=(0,n.useState)(t.FRAME_LAYOUT.headerHeightPx),H=(0,c.useReduceMotion)(),x=(0,n.useRef)({hidden:!1,referenceScrollY:0}),M=(0,n.useCallback)(t=>{!Number.isFinite(t)||t<=0||b(n=>n===t?n:t)},[]),v=(0,n.useCallback)(n=>{const c=Math.max(n,0),u=(0,t.computeHeaderVisibility)({currentScrollY:c,state:x.current}),o=u.hidden!==x.current.hidden;x.current=u,o&&h(u.hidden)},[]),P=(0,n.useCallback)(()=>{const t=x.current.hidden;x.current={hidden:!1,referenceScrollY:0},t&&h(!1)},[]),S=(0,n.useMemo)(()=>({hidden:l,reduceMotion:H,headerHeightPx:f,reportHeaderHeight:M,reportScrollOffset:v,resetVisibility:P}),[f,l,H,M,v,P]);return(0,u.jsx)(s.Provider,{value:S,children:o})},e.useNavVisibility=function(){return(0,n.useContext)(s)??o};var t=r(d[0]),n=r(d[1]),c=r(d[2]),u=r(d[3]);const o={hidden:!1,reduceMotion:!1,headerHeightPx:t.FRAME_LAYOUT.headerHeightPx,reportHeaderHeight:()=>{},reportScrollOffset:()=>{},resetVisibility:()=>{}},s=(0,n.createContext)(null)},594,[571,34,595,104]);
693__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AQI_ACCESSIBLE_COLORS",{enumerable:!0,get:function(){return u}}),_e.getAqiCategory=y,_e.getAccessibleAqiColors=f,_e.useScreenReader=function(){const[e,o]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{(async()=>{const e=await n.default.isScreenReaderEnabled();o(e)})();const e=n.default.addEventListener('screenReaderChanged',o);return()=>{e.remove()}},[]),e},_e.useReduceMotion=function(){const[e,o]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{(async()=>{const e=await n.default.isReduceMotionEnabled();o(e)})();const e=n.default.addEventListener('reduceMotionChanged',o);return()=>{e.remove()}},[]),e},_e.useBoldText=function(){const[e,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{(async()=>{})()},[]),e},_e.usePreferredContentSize=function(){const[e,n]=(0,t.useState)(()=>o.default.getFontScale());return(0,t.useEffect)(()=>{{const e=()=>{n(o.default.getFontScale())};return window.addEventListener('resize',e),()=>{window.removeEventListener('resize',e)}}},[]),e},_e.getAccessibleTextStyle=function(e,t,n){return{fontSize:e*t,fontWeight:n?'700':void 0,lineHeight:Math.max(e*t*1.5,24)}},Object.defineProperty(_e,"MIN_TOUCH_TARGET",{enumerable:!0,get:function(){return h}}),_e.getAqiAccessibilityProps=function(e,t){const n=f(e),o=b(e);let s=`Air Quality Index is ${e}. ${n.ariaLabel}.`;null!=t&&''!==t&&(s=`${t}: ${s}`);return{accessible:!0,accessibilityRole:'text',accessibilityLabel:s,accessibilityHint:o}},_e.getAqiDescription=b,_e.getHeadingAccessibilityProps=function(e){return{accessible:!0,accessibilityRole:'header','aria-level':e}},Object.defineProperty(_e,"KEYBOARD_KEYS",{enumerable:!0,get:function(){return A}}),_e.isActivationKey=function(e){return e.key===A.ENTER||e.key===A.SPACE};var t=r(d[0]),n=e(r(d[1]));r(d[2]);var o=e(r(d[3])),s=r(d[4]);const c={good:{secondary:'#007000',pattern:'solid',icon:'check-circle',ariaLabel:'Good air quality'},moderate:{secondary:'#B8860B',pattern:'diagonal-stripes',icon:'minus-circle',ariaLabel:'Moderate air quality'},unhealthySensitive:{secondary:'#CC6600',pattern:'dots',icon:'alert-triangle',ariaLabel:'Unhealthy for sensitive groups'},unhealthy:{secondary:'#8B0000',pattern:'horizontal-stripes',icon:'alert-circle',ariaLabel:'Unhealthy air quality'},veryUnhealthy:{secondary:'#4B0082',pattern:'cross-hatch',icon:'x-circle',ariaLabel:'Very unhealthy air quality'},hazardous:{secondary:'#4A0013',pattern:'dense-dots',icon:'skull',ariaLabel:'Hazardous air quality'}};function l(e){const t=s.AQI_BANDS.find(t=>t.key===e);if(void 0===t)throw new Error(`Missing AQI band definition for key "${e}"`);return Object.assign({primary:t.color},c[e])}const u={good:l('good'),moderate:l('moderate'),unhealthySensitive:l('unhealthySensitive'),unhealthy:l('unhealthy'),veryUnhealthy:l('veryUnhealthy'),hazardous:l('hazardous')};function y(e){return(0,s.getAqiBandKey)(e)}function f(e){return u[y(e)]}const h=48;function b(e){return e<=50?'Air quality is satisfactory. Air pollution poses little or no risk.':e<=100?'Air quality is acceptable. Some pollutants may be a concern for sensitive individuals.':e<=150?'Members of sensitive groups may experience health effects. General public is less likely to be affected.':e<=200?'Everyone may begin to experience health effects. Sensitive groups may experience more serious effects.':e<=300?'Health warnings of emergency conditions. The entire population is more likely to be affected.':'Health alert: everyone may experience serious health effects. Avoid outdoor activities.'}const A={ENTER:'Enter',SPACE:' ',ESCAPE:'Escape',TAB:'Tab',ARROW_UP:'ArrowUp',ARROW_DOWN:'ArrowDown',ARROW_LEFT:'ArrowLeft',ARROW_RIGHT:'ArrowRight',HOME:'Home',END:'End'}},595,[34,542,95,331,596]);
694__d(function(g,r,i,a,m,e,d){"use strict";
694Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AQI_BANDS",{enumerable:!0,get:function(){return n}}),e.findAqiBand=o,e.getAqiBandKey=function(n){return o(n).key};const n=[{min:0,max:50,key:'good',label:'Good',color:'#00E400'},{min:51,max:100,key:'moderate',label:'Moderate',color:'#FFFF00'},{min:101,max:150,key:'unhealthySensitive',label:'Unhealthy for Sensitive Groups',color:'#FF7E00'},{min:151,max:200,key:'unhealthy',label:'Unhealthy',color:'#FF0000'},{min:201,max:300,key:'veryUnhealthy',label:'Very Unhealthy',color:'#8F3F97'},{min:301,max:500,key:'hazardous',label:'Hazardous',color:'#7E0023'}];function o(o){return n.find(n=>o>=n.min&&o<=n.max)??n[0]}},596,[]);
695__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Markdown",{enumerable:!0,get:function(){return n.Markdown}}),Object.defineProperty(e,"markdownDefaultStyles",{enumerable:!0,get:function(){return t.markdownDefaultStyles}}),Object.defineProperty(e,"mergeMarkdownStyles",{enumerable:!0,get:function(){return t.mergeMarkdownStyles}}),Object.defineProperty(e,"decodeMarkdownEntities",{enumerable:!0,get:function(){return o.decodeMarkdownEntities}}),Object.defineProperty(e,"isImageOnlyParagraph",{enumerable:!0,get:function(){return o.isImageOnlyParagraph}}),Object.defineProperty(e,"parseMarkdown",{enumerable:!0,get:function(){return o.parseMarkdown}});var n=r(d[0]),t=r(d[1]),o=r(d[2])},597,[598,599,600]);
696__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Markdown=function({content:e,styles:s,onLinkPress:n,overrides:c}){const o=(0,t.useMemo)(()=>(0,y.parseMarkdown)(e),[e]),u=(0,t.useMemo)(()=>(0,h.mergeMarkdownStyles)(s),[s]),f=Object.assign({styles:u},null!=n?{onLinkPress:n}:{},{overrides:c??{}}),x=H(o,f,'md');if(null!=f.overrides.root)return(0,p.jsx)(p.Fragment,{children:f.overrides.root(x)});return(0,p.jsx)(l.default,{children:x})};var t=r(d[0]),s=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),c=r(d[4]),o=r(d[5]),u=r(d[6]),h=r(d[7]),y=r(d[8]),f=r(d[9]),p=r(d[10]);const x=(0,c.createStyles)({alignCenter:{textAlign:'center'},alignLeft:{textAlign:'left'},alignRight:{textAlign:'right'},listItemContent:{flex:1}}),k=new Set(['blockquote','br','code','codespan','def','del','em','escape','heading','hr','html','image','link','list','list_item','paragraph','space','strong','table','text']);function j(e){return k.has(e.type)}function b(e){throw new Error(`Unhandled markdown token: ${JSON.stringify(e)}`)}function v(...e){return e.join('.')}function w(e){return'center'===e?x.alignCenter:'right'===e?x.alignRight:'left'===e?x.alignLeft:void 0}function M(e,t,s){return e.map((e,n)=>E(e,t,v(s,n)))}function E(e,t,s){if(!j(e))return null;switch(e.type){case'text':return null!=e.tokens&&e.tokens.length>0?(0,p.jsx)(n.default,{children:M(e.tokens,t,s)},s):(0,y.decodeMarkdownEntities)(e.text);case'escape':return e.text;case'strong':return(0,p.jsx)(n.default,{style:t.styles.strong,children:M(e.tokens,t,s)},s);case'em':return(0,p.jsx)(n.default,{style:t.styles.em,children:M(e.tokens,t,s)},s);case'del':return(0,p.jsx)(n.default,{style:t.styles.del,children:M(e.tokens,t,s)},s);case'codespan':return(0,p.jsx)(n.default,{style:t.styles.codespan,children:(0,y.decodeMarkdownEntities)(e.text)},s);case'br':return'\n';case'link':return L(e,t,s);case'image':return I(e,t,s);case'html':return(0,y.decodeMarkdownEntities)(e.text);case'blockquote':case'code':case'def':case'heading':case'hr':case'list':case'list_item':case'paragraph':case'space':case'table':return null;default:return b(e)}}function L(e,t,s){const l=e.href.trim(),c=M(e.tokens,t,s),h=(0,p.jsx)(n.default,{style:t.styles.link,children:c});if((0,o.isInternalPath)(l)){const e=t.onLinkPress;return null!=e?(0,p.jsx)(n.default,{style:t.styles.link,accessibilityRole:"link",onPress:()=>{e(l)},children:c},s):(0,p.jsx)(o.AppLink,{href:l,inline:!0,children:h},s)}return(0,u.isHttpsUrl)(l)?(0,p.jsx)(u.ExternalLink,{href:l,inline:!0,children:h},s):l.startsWith('http://')?(0,p.jsx)(u.ExternalLink,{protocol:"http",address:l.slice(7),inline:!0,children:h},s):l.startsWith('mailto:')?(0,p.jsx)(u.ExternalLink,{protocol:"mailto",address:l.slice(7),inline:!0,children:h},s):l.startsWith('tel:')?(0,p.jsx)(u.ExternalLink,{protocol:"tel",address:l.slice(4),inline:!0,children:h}
696,s):(0,p.jsx)(n.default,{style:t.styles.link,children:c},s)}function I(e,t,n){const l={href:(0,f.sanitizeUrl)(e.href),alt:(0,y.decodeMarkdownEntities)(e.text),title:e.title,key:n};return null!=t.overrides.image?t.overrides.image(l):''===l.href?null:(0,p.jsx)(s.default,{source:{uri:l.href},style:t.styles.image,resizeMode:"contain",accessibilityLabel:l.alt},n)}function _(e,t,s){if((0,y.isImageOnlyParagraph)(e)){const n=e.tokens.filter(e=>'image'===e.type).map((e,n)=>I(e,t,v(s,n))),c=()=>(0,p.jsx)(l.default,{children:n},s);return null!=t.overrides.paragraph?t.overrides.paragraph({children:n,isImageOnly:!0,key:s},c):c()}if(e.tokens.some(e=>'image'===e.type)){const n=C(e.tokens,t,s),c=()=>(0,p.jsx)(l.default,{style:t.styles.paragraph,children:n},s);return null!=t.overrides.paragraph?t.overrides.paragraph({children:n,isImageOnly:!1,key:s},c):c()}const c=M(e.tokens,t,s),o=()=>(0,p.jsx)(n.default,{style:[t.styles.body,t.styles.paragraph],children:c},s);return null!=t.overrides.paragraph?t.overrides.paragraph({children:c,isImageOnly:!1,key:s},o):o()}function C(e,t,s){const l=[];let c=[],o=0;const u=()=>{c.length>0&&(l.push((0,p.jsx)(n.default,{style:[t.styles.body,t.styles.paragraph],children:c},v(s,'~',o))),o+=1,c=[])};return e.forEach((e,n)=>{j(e)&&'image'===e.type?(u(),l.push(I(e,t,v(s,n)))):c.push(E(e,t,v(s,n)))}),u(),l}const O=[1,2,3,4,5,6];function P(e,t,s){const l=Math.min(Math.max(e.depth,1),6),c=O[l-1]??6,o=`heading${c}`,u=M(e.tokens,t,s),h=()=>(0,p.jsx)(n.default,{style:t.styles[o],children:u},s);return null!=t.overrides.heading?t.overrides.heading({depth:c,children:u,key:s},h):h()}function R(e,t,s){const c=e.ordered,o='number'==typeof e.start?e.start:1,u=e.items.map((e,u)=>{const h=v(s,u),y=e.task?!0===e.checked?'\u2611 ':'\u2610 ':c?`${o+u}.`:'\u2022';return(0,p.jsxs)(l.default,{style:t.styles.listItem,children:[(0,p.jsx)(n.default,{style:t.styles.listItemMarker,children:y}),(0,p.jsx)(l.default,{style:x.listItemContent,children:H(e.tokens,t,h)})]},h)});return(0,p.jsx)(l.default,{style:c?t.styles.orderedList:t.styles.bulletList,children:u},s)}function q(e,t,s){const c=(0,p.jsx)(l.default,{style:t.styles.tableHeaderRow,children:e.header.map((c,o)=>(0,p.jsx)(l.default,{style:t.styles.tableHeaderCell,children:(0,p.jsx)(n.default,{style:[t.styles.tableHeaderCellText,w(e.align[o]??null)],children:M(c.tokens,t,v(s,'h',o))})},v(s,'h',o)))},v(s,'h')),o=e.rows.map((c,o)=>(0,p.jsx)(l.default,{style:t.styles.tableRow,children:c.map((c,u)=>(0,p.jsx)(l.default,{style:t.styles.tableCell,children:(0,p.jsx)(n.default,{style:[t.styles.tableCellText,w(e.align[u]??null)],children:M(c.tokens,t,v(s,'r',o,u))})},v(s,'r',o,u)))},v(s,'r',o)));return(0,p.jsxs)(l.default,{style:t.styles.table,children:[c,o]},s)}function A(e,t,s){if(!j(e))return null;switch(e.type){case'space':case'def':case'br':case'codespan':case'del':case'em':case'escape':case'image':case'link':case'list_item':case'strong':return null;case'heading':return P(e,t,s);case'paragraph':return _(e,t,s);case'text':{const l=null!=e.tokens&&e.tokens.length>0?M(e.tokens,t,s):(0,y.decodeMarkdownEntities)(e.text);return(0,p.jsx)(n.default,{style:t.styles.body,children:l},s)}case'blockquote':return(0,p.jsx)(l.default,{style:t.styles.blockquote,children:H(e.tokens,t,s)},s);case'list':return R(e,t,s);case'code':return(0,p.jsx)(l.default,{style:t.styles.codeBlock,children:(0,p.jsx)(n.default,{style:t.styles.codeBlockText,children:e.text})},s);case'hr':{const e=()=>(0,p.jsx)(l.default,{style:t.styles.hr},s);return null!=t.overrides.hr?t.overrides.hr({key:s},e):e()}case'table':return q(e,t,s);case'html':{const l=e.text.trim();return''!==l?(0,p.jsx)(n.default,{style:[t.styles.body,t.styles.paragraph],children:(0,y.decodeMarkdownEntities)(l)},s):null}default:return b(e)}}function H(e,t,s){const n=[];return e.forEach((e,l)=>{const c=A(e,t,v(s,l));null!=c&&n.push(c)}),n}},598,[34,328,222,276,489,516,519,599,600,602,104]);
697__d(function(g,r,i,a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"markdownDefaultStyles",{enumerable:!0,get:function(){return d}}),e.mergeMarkdownStyles=function(l){if(null==l)return d;const t=d,o=l;return{blockquote:null!=o.blockquote?Object.assign({},t.blockquote,o.blockquote):t.blockquote,body:null!=o.body?Object.assign({},t.body,o.body):t.body,bulletList:null!=o.bulletList?Object.assign({},t.bulletList,o.bulletList):t.bulletList,codeBlock:null!=o.codeBlock?Object.assign({},t.codeBlock,o.codeBlock):t.codeBlock,codeBlockText:null!=o.codeBlockText?Object.assign({}
697,t.codeBlockText,o.codeBlockText):t.codeBlockText,codespan:null!=o.codespan?Object.assign({},t.codespan,o.codespan):t.codespan,del:null!=o.del?Object.assign({},t.del,o.del):t.del,em:null!=o.em?Object.assign({},t.em,o.em):t.em,heading1:null!=o.heading1?Object.assign({},t.heading1,o.heading1):t.heading1,heading2:null!=o.heading2?Object.assign({},t.heading2,o.heading2):t.heading2,heading3:null!=o.heading3?Object.assign({},t.heading3,o.heading3):t.heading3,heading4:null!=o.heading4?Object.assign({},t.heading4,o.heading4):t.heading4,heading5:null!=o.heading5?Object.assign({},t.heading5,o.heading5):t.heading5,heading6:null!=o.heading6?Object.assign({},t.heading6,o.heading6):t.heading6,hr:null!=o.hr?Object.assign({},t.hr,o.hr):t.hr,image:null!=o.image?Object.assign({},t.image,o.image):t.image,link:null!=o.link?Object.assign({},t.link,o.link):t.link,listItem:null!=o.listItem?Object.assign({},t.listItem,o.listItem):t.listItem,listItemMarker:null!=o.listItemMarker?Object.assign({},t.listItemMarker,o.listItemMarker):t.listItemMarker,orderedList:null!=o.orderedList?Object.assign({},t.orderedList,o.orderedList):t.orderedList,paragraph:null!=o.paragraph?Object.assign({},t.paragraph,o.paragraph):t.paragraph,strong:null!=o.strong?Object.assign({},t.strong,o.strong):t.strong,table:null!=o.table?Object.assign({},t.table,o.table):t.table,tableCell:null!=o.tableCell?Object.assign({},t.tableCell,o.tableCell):t.tableCell,tableCellText:null!=o.tableCellText?Object.assign({},t.tableCellText,o.tableCellText):t.tableCellText,tableHeaderCell:null!=o.tableHeaderCell?Object.assign({},t.tableHeaderCell,o.tableHeaderCell):t.tableHeaderCell,tableHeaderCellText:null!=o.tableHeaderCellText?Object.assign({},t.tableHeaderCellText,o.tableHeaderCellText):t.tableHeaderCellText,tableHeaderRow:null!=o.tableHeaderRow?Object.assign({},t.tableHeaderRow,o.tableHeaderRow):t.tableHeaderRow,tableRow:null!=o.tableRow?Object.assign({},t.tableRow,o.tableRow):t.tableRow}};var l=r(_d[0]),t=r(_d[1]),o=r(_d[2]),n=r(_d[3]);const d=(0,l.createStyles)({blockquote:{backgroundColor:t.COLORS.BG_AMBER_TINT,borderLeftColor:t.COLORS.WARNING,borderLeftWidth:4,borderRadius:4,marginVertical:o.SPACING.LG,padding:o.SPACING.LG},body:{color:t.COLORS.NAVY_MID,fontSize:n.FONT_SIZE.XL,lineHeight:28},bulletList:{marginBottom:o.SPACING.LG},codeBlock:{backgroundColor:t.COLORS.BG_SUBTLE_100,borderRadius:8,marginVertical:o.SPACING.LG,padding:o.SPACING.LG},codeBlockText:{color:t.COLORS.TEXT_PRIMARY,fontFamily:n.FONT_FAMILY.MONOSPACE,fontSize:n.FONT_SIZE.MD},codespan:{backgroundColor:t.COLORS.BG_SUBTLE_100,borderRadius:4,color:t.COLORS.WARNING_DARK,fontFamily:n.FONT_FAMILY.MONOSPACE,fontSize:n.FONT_SIZE.LG,paddingHorizontal:o.SPACING.SM},del:{textDecorationLine:'line-through'},em:{fontStyle:'italic'},heading1:{color:t.COLORS.TEXT_PRIMARY,fontSize:n.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:o.SPACING.LG,marginTop:o.SPACING.XXXL},heading2:{color:t.COLORS.TEXT_PRIMARY,fontSize:n.FONT_SIZE.XXXL,fontWeight:'bold',marginBottom:o.SPACING.LG,marginTop:o.SPACING.XXL},heading3:{color:t.COLORS.TEXT_PRIMARY,fontSize:n.FONT_SIZE.XXL,fontWeight:'bold',marginBottom:o.SPACING.MD,marginTop:o.SPACING.XXL},heading4:{color:t.COLORS.TEXT_PRIMARY,fontSize:n.FONT_SIZE.XL,fontWeight:'bold',marginBottom:o.SPACING.MD,marginTop:o.SPACING.XL},heading5:{color:t.COLORS.TEXT_PRIMARY,fontSize:n.FONT_SIZE.LG,fontWeight:'600',marginBottom:o.SPACING.SM,marginTop:o.SPACING.XL},heading6:{color:t.COLORS.TEXT_MUTED,fontSize:n.FONT_SIZE.MD,fontWeight:'600',marginBottom:o.SPACING.SM,marginTop:o.SPACING.LG},hr:{borderBottomColor:t.COLORS.BORDER,borderBottomWidth:1,marginVertical:o.SPACING.XXXL},image:{borderRadius:8,height:240,marginVertical:o.SPACING.LG,width:'100%'},link:{color:t.COLORS.BRAND_PRIMARY,textDecorationLine:'underline'},listItem:{flexDirection:'row',marginBottom:o.SPACING.SM},listItemMarker:{color:t.COLORS.NAVY_MID,fontSize:n.FONT_SIZE.XL,lineHeight:28,marginRight:o.SPACING.SM},orderedList:{marginBottom:o.SPACING.LG},paragraph:{marginBottom:o.SPACING.MD,marginTop:0},strong:{fontWeight:'bold'},table:{borderColor:t.COLORS.BORDER,borderRadius:6,borderWidth:1,marginVertical:o.SPACING.LG,overflow:'hidden'},tableCell:{borderColor:t.COLORS.BORDER,borderRightWidth:1,borderTopWidth:1,flex:1,padding:o.SPACING.MD},tableCellText:{color:t.COLORS.NAVY_MID,fontSize:n.FONT_SIZE.MD,lineHeight:22},tableHeaderCell:{borderColor:t.COLORS.BORDER,borderRightWidth:1,flex:1,padding:o.SPACING.MD},tableHeaderCellText:{color:t.COLORS.TEXT_PRIMARY,fontSize:n.FONT_SIZE.MD,fontWeight:'bold',lineHeight:22},tableHeaderRow:{backgroundColor:t.COLORS.BG_LIGHT,flexDirection:'row'},tableRow:{flexDirection:'row'}})},599,[489,490,493,494]);
698__d(function(g,r,i,a,m,e,d){"use strict";
698Object.defineProperty(e,'__esModule',{value:!0}),e.parseMarkdown=function(n){return t.marked.lexer(n,{gfm:!0})},e.isImageOnlyParagraph=function(t){let n=!1;for(const c of t.tokens)if('image'!==c.type){if('br'!==c.type&&'space'!==c.type&&('text'!==c.type||''!==c.raw.trim()))return!1}else n=!0;return n},e.decodeMarkdownEntities=function(t){if(!t.includes('&'))return t;return t.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&quot;/g,'"').replace(/&#39;/g,"'")};var t=r(d[0])},600,[601]);
699__d(function(_g,_r,_i,_a,_m,_e2,_d){"use strict";function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}Object.defineProperty(_e2,'__esModule',{value:!0}),Object.defineProperty(_e2,"Hooks",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(_e2,"Lexer",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(_e2,"Marked",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(_e2,"Parser",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(_e2,"Renderer",{enumerable:!0,get:function(){return he}}),Object.defineProperty(_e2,"TextRenderer",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(_e2,"Tokenizer",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(_e2,"defaults",{enumerable:!0,get:function(){return t}}),Object.defineProperty(_e2,"getDefaults",{enumerable:!0,get:function(){return e}}),Object.defineProperty(_e2,"lexer",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e2,"marked",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(_e2,"options",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e2,"parse",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(_e2,"parseInline",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(_e2,"parser",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(_e2,"setOptions",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_e2,"use",{enumerable:!0,get:function(){return me}}),Object.defineProperty(_e2,"walkTokens",{enumerable:!0,get:function(){return we}});var t={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function n(e){t=e}var r={exec:()=>null};function s(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let s="string"==typeof t?t:t.source;return s=s.replace(l.caret,"$1"),n=n.replace(e,s),r},getRegex:()=>new RegExp(n,t)};return r}var i=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),l={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,o=/(?:[*+-]|\d{1,9}[.)])/,c=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,h=s(c).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/\|table/g,"").getRegex(),p=s(c).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),u=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,g=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,k=s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",g).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),d=s(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o).getRegex(),f="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",b=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x=s("^ {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|/?>
699)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",b).replace("tag",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),m=s(u).replace("hr",a).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",f).getRegex(),w={blockquote:s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",m).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:k,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:a,html:x,lheading:h,list:d,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:m,table:r,text:/^[^\n]+/},y=s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\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",f).getRegex(),$=Object.assign({},w,{lheading:p,table:y,paragraph:s(u).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",y).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",f).getRegex()}),R=Object.assign({},w,{html:s("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",b).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:r,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:s(u).replace("hr",a).replace("heading"," *#{1,6} *[^\n]").replace("lheading",h).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),S=/^( {2,}|\\)\n(?!\s*$)/,T=/[\p{P}\p{S}]/u,z=/[\s\p{P}\p{S}]/u,A=/[^\s\p{P}\p{S}]/u,P=s(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,z).getRegex(),_=/(?!~)[\p{P}\p{S}]/u,I=s(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",i?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),O=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,j=s(O,"u").replace(/punct/g,T).getRegex(),L=s(O,"u").replace(/punct/g,_).getRegex(),B="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C=s(B,"gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,z).replace(/punct/g,T).getRegex(),E=s(B,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,_).getRegex(),q=s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,A).replace(/punctSpace/g,z).replace(/punct/g,T).getRegex(),v=s(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),Z=s(/^<(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(),M=s(b).replace("(?:--\x3e|$)","--\x3e").getRegex(),D=s("^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",M).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),H=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,N=s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",H).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q=s(/^!?\[(label)\]\[(ref)\]/).replace("label",H).replace("ref",g).getRegex(),G=s(/^!?\[(ref)\](?:\[\])?/).replace("ref",g).getRegex(),F=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,W={_backpedal:r,anyPunctuation:v,autolink:Z,blockSkip:I,br:S,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:r,emStrongLDelim:j,emStrongRDelimAst:C,emStrongRDelimUnd:q,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:N,nolink:G,punctuation:P,reflink:Q,reflinkSearch:s("reflink|nolink(?!\\()","g").replace("reflink",Q).replace("nolink",G).getRegex(),tag:D,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:r},X=Object.assign({},W,{link:s(/^!?\[(label)\]\((.*?)\)/).replace("label",H).getRegex(),reflink:s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",H).getRegex()}),U=Object.assign({},W,{emStrongRDelimAst:E,emStrongLDelim:L,url:s(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",F).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\S]|[^\s~\\]))\1(?=[^~]|$)/,text:s(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",F).getRegex()}),J=Object.assign({},U,{br:s(S).replace("{2,}","*").getRegex(),text:s(U.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),K={normal:w,gfm:$,pedantic:R},V={normal:W,gfm:U,breaks:J,pedantic:X},Y={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ee=e=>Y[e];function te(e,t){if(t){if(l.escapeTest.test(e))return e.replace(l.escapeReplace,ee)}else if(l.escapeTestNoEncode.test(e))return e.replace(l.escapeReplaceNoEncode,ee);return e}function ne(e){try{e=encodeURI(e).replace(l.percentDecode,"%")}catch{return null}return e}function re(e,t){let n=e.replace(l.findPipe,(e,t,n)=>{let r=!1,s=t;for(;--s>=0&&"\\"===n[s];)r=!r;return r?"|":" |"}).split(l.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(l.slashPipe,"|");return n}function se(e,t,n){let r=e.length;if(0===r)return"";let s=0;for(;s<r;){let i=e.charAt(r-s-1);if(i!==t||n){if(i===t||!n)break;s++}else s++}
699return e.slice(0,r-s)}function ie(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function le(e,t,n,r,s){let i=t.href,l=t.title||null,a=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:l,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,o}function ae(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let s=r[1];return t.split("\n").map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=s.length?e.slice(s.length):e}).join("\n")}var oe=class{constructor(e){this.options=e||t}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:se(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=ae(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=se(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:se(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=se(t[0],"\n").split("\n"),n="",r="",s=[];for(;e.length>0;){let t,i=!1,l=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))l.push(e[t]),i=!0;else{if(i)break;l.push(e[t])}e=e.slice(t);let a=l.join("\n"),o=a.replace(this.rules.other.blockquoteSetextReplace,"\n    $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${a}`:a,r=r?`${r}\n${o}`:o;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(o,s,!0),this.lexer.state.top=c,0===e.length)break;let h=s.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){let t=h,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);s[s.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,r=r.substring(0,r.length-t.text.length)+l.text;break}if("list"===h?.type){let t=h,i=t.raw+"\n"+e.join("\n"),l=this.list(i);s[s.length-1]=l,n=n.substring(0,n.length-h.raw.length)+l.raw,r=r.substring(0,r.length-t.raw.length)+l.raw,e=i.substring(s.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;e;){let n=!1,r="",a="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let o=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],h=!o.trim(),p=0;if(this.options.pedantic?(p=2,a=o.trimStart()):h?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,a=o.slice(p),p+=t[1].length),h&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),s=this.rules.other.fencesBeginRegex(p),i=this.rules.other.headingBeginRegex(p),l=this.rules.other.htmlBeginRegex(p);for(;e;){let u,g=e.split("\n",1)[0];if(c=g,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting,"  "),u=c):u=c.replace(this.rules.other.tabCharGlobal,"    "),s.test(c)||i.test(c)||l.test(c)||t.test(c)||n.test(c))break;if(u.search(this.rules.other.nonSpaceChar)>=p||!c.trim())a+="\n"+u.slice(p);else{if(h||o.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||s.test(o)||i.test(o)||n.test(o))break;a+="\n"+c}!h&&!c.trim()&&(h=!0),r+=g+"\n",e=e.substring(g.length+1),o=u.slice(p)}}s.loose||(l?s.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(l=!0));let u,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(a),g&&(u="[ ] "!==g[0],a=a.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:r,task:!!g,checked:u,loose:!1,text:a,tokens:[]}),s.raw+=r}let a=s.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){let t=s.items[e].tokens.filter(e=>
vendor: 6,255 bytes, line 699
699"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));s.loose=n}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=re(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(let e of s)i.rows.push(re(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=se(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=ie(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),le(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return le(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){let n,s,i=[...r[0]].length-1,l=i,a=0,o="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,t=t.slice(-1*e.length+i);null!=(r=o.exec(t));){if(n=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!n)continue;if(s=[...n].length,r[3]||r[4]){l+=s;continue}if((r[5]||r[6])&&i%3&&!((i+s)%3)){a+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+a);let t=[...r[0]][0].length,o=e.slice(0,i+r.index+t+s);if(Math.min(i,s)%2){let e=o.slice(1,-1);return{type:"em",raw:o,text:e,tokens:this.lexer.inlineTokens(e)}}let c=o.slice(2,-2);return{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ce=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:l,block:K.normal,inline:V.normal};this.options.pedantic?(n.block=K.pedantic,n.inline=V.pedantic):this.options.gfm&&(n.block=K.gfm,this.options.breaks?n.inline=V.breaks:n.inl
vendor: 4,796 bytes, line 699
699ine=V.gfm),this.tokenizer.rules=n}static get rules(){return{block:K,inline:V}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(l.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(l.tabCharGlobal,"    ").replace(l.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+="\n":t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let s=e;if(this.options.extensions?.startBlock){let t,n=1/0,r=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(this.state.top&&(r=this.tokenizer.paragraph(s))){let i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+=(i.raw.endsWith("\n")?"":"\n")+r.raw,i.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(r),n=s.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===n?.type?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r=e,s=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(r));)n=s[2]?s[2].length:0,r=r.slice(0,s.index+n)+"["+"a".repeat(s[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let i=!1,l="";for(;e;){let n;if(i||(l=""),i=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if(n=this.tokenizer.escape(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.link(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(e,r,l)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(e)){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(e)){e=e.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let s=e;if(this.options.extensions?.startInline){let t,n=1/0,r=e.slice(1);
699this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},r),"number"==typeof t&&t>=0&&(n=Math.min(n,t))}),n<1/0&&n>=0&&(s=e.substring(0,n+1))}if(n=this.tokenizer.inlineText(s)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(l=n.raw.slice(-1)),i=!0;let r=t.at(-1);"text"===r?.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},he=class{constructor(e){this.options=e||t}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(l.notSpaceStart)?.[0],s=e.replace(l.endingNewline,"")+"\n";return r?'<pre><code class="language-'+te(r)+'">'+(n?s:te(s,!0))+"</code></pre>\n":"<pre><code>"+(n?s:te(s,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+s+">\n"}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+te(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let s=e.rows[t];n="";for(let e=0;e<s.length;e++)n+=this.tablecell(s[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${te(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=ne(e);if(null===s)return r;let i='<a href="'+(e=s)+'"';return t&&(i+=' title="'+te(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=ne(e);if(null===s)return te(n);let i=`<img src="${e=s}" alt="${n}"`;return t&&(i+=` title="${te(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:te(e.text)}},pe=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ue=class e{constructor(e){this.options=e||t,this.options.renderer=this.options.renderer||new he,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new pe}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let e=s,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){n+=t||"";continue}}let i=s;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"def":n+=this.renderer.def(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let s=i,l=this.renderer.text(s);for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],l+="\n"+this.renderer.text(s);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):l;continue}default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let s=e[r];if(this.options.extensions?.renderers?.[s.type]){let e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=e||"";continue}}let i=s;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},ge=class{constructor(e){this.options=e||t}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ce.lex:ce.lexInline}provideParser(){return this.block?ue.parse:ue.parseInline}},ke=class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ue;Renderer=he;TextRenderer=pe;Lexer=ce;Tokenizer=oe;Hooks=ge;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{let e=r;
vendor: 4,938 bytes, line 699
699for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let s=e[r].flat(1/0);n=n.concat(this.walkTokens(s,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n=Object.assign({},e);if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new he(this.defaults);for(let n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=n,s=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new oe(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=n,s=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new ge;for(let n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=n,s=e.hooks[r],i=t[r];ge.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&ge.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await s.call(t,e);return i.call(t,n)})();let r=s.call(t,e);return i.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await s.apply(t,e);return!1===n&&(n=await i.apply(t,e)),n})();let n=s.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults=Object.assign({},this.defaults,n)}),this}setOptions(e){return this.defaults=Object.assign({},this.defaults,e),this}lexer(e,t){return ce.lex(e,t??this.defaults)}parser(e,t){return ue.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r=Object.assign({},n),s=Object.assign({},this.defaults,r),i=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let n=s.hooks?await s.hooks.preprocess(t):t,r=await(s.hooks?await s.hooks.provideLexer():e?ce.lex:ce.lexInline)(n,s),i=s.hooks?await s.hooks.processAllTokens(r):r;s.walkTokens&&await Promise.all(this.walkTokens(i,s.walkTokens));let l=await(s.hooks?await s.hooks.provideParser():e?ue.parse:ue.parseInline)(i,s);return s.hooks?await s.hooks.postprocess(l):l})().catch(i);try{s.hooks&&(t=s.hooks.preprocess(t));let n=(s.hooks?s.hooks.provideLexer():e?ce.lex:ce.lexInline)(t,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let r=(s.hooks?s.hooks.provideParser():e?ue.parse:ue.parseInline)(n,s);return s.hooks&&(r=s.hooks.postprocess(r)),r}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+te(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},de=new ke;function fe(e,t){return de.parse(e,t)}fe.options=fe.setOptions=function(e){return de.setOptions(e),fe.defaults=de.defaults,n(fe.defaults),fe},fe.getDefaults=e,fe.defaults=t,fe.use=function(...e){return de.use(...e),fe.defaults=de.defaults,n(fe.defaults),fe},fe.walkTokens=function(e,t){return de.walkTokens(e,t)},fe.parseInline=de.parseInline,fe.Parser=ue,fe.parser=ue.parse,fe.Renderer=he,fe.TextRenderer=pe,fe.
699Lexer=ce,fe.lexer=ce.lex,fe.Tokenizer=oe,fe.Hooks=ge,fe.parse=fe;var be=fe.options,xe=fe.setOptions,me=fe.use,we=fe.walkTokens,ye=fe.parseInline,$e=fe,Re=ue.parse,Se=ce.lex},601,[]);
700__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sanitizeUrl=function(s){const c=o(s),u=c.indexOf(':');if(u<=0)return s;const f=c.slice(0,u);if(!n.test(f))return s;return t.has(f.toLowerCase())?s:''};const t=new Set(['http','https','mailto','tel','sms']),n=/^[a-zA-Z][a-zA-Z0-9+.-]*$/;function o(t){let n='';for(const o of t)(o.codePointAt(0)??0)>32&&(n+=o);return n}},602,[]);
701__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.PolicyContactFooter=function({policyName:t}){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)(e.default,{style:C.footerText,children:["Questions about our ",t,"?"]}),(0,S.jsx)(u.AppLink,{to:"Contact",style:C.contactButton,children:(0,S.jsx)(e.default,{style:C.contactButtonText,children:"Contact Us"})})]})},r(d[0]);var t,o=r(d[1]),e=(t=o)&&t.__esModule?t:{default:t},n=r(d[2]),c=r(d[3]),l=r(d[4]),s=r(d[5]),u=r(d[6]),S=r(d[7]);const C=(0,n.createStyles)({contactButton:{backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:l.SPACING.XXL,paddingVertical:l.SPACING.LG},contactButtonText:{color:c.COLORS.TEXT_INVERSE,fontSize:s.FONT_SIZE.LG,fontWeight:'600'},footerText:{color:c.COLORS.TEXT_SECONDARY,fontSize:s.FONT_SIZE.LG,marginBottom:l.SPACING.LG,textAlign:'center'}})},603,[34,222,489,490,493,494,516,104]);
702__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.SectionCard=function({title:e,summary:t,titleColor:o}){const s=o??n.COLORS.TEXT_PRIMARY;return(0,S.jsxs)(u.Card,{padding:c.SPACING.XXL,children:[(0,S.jsx)(l.default,{style:[_.cardTitle,{color:s}],children:e}),(0,S.jsx)(l.default,{style:_.cardSummary,children:t})]})},r(d[0]);var e,t=r(d[1]),l=(e=t)&&e.__esModule?e:{default:e}
702,o=r(d[2]),n=r(d[3]),c=r(d[4]),s=r(d[5]),u=r(d[6]),S=r(d[7]);const _=(0,o.createStyles)({cardSummary:{color:n.COLORS.TEXT_SECONDARY,fontSize:s.FONT_SIZE.LG,lineHeight:26},cardTitle:{fontSize:s.FONT_SIZE.XL,fontWeight:'600',marginBottom:c.SPACING.MD}})},604,[34,222,489,490,493,494,605,104]);
703__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.Card=function({children:e,style:s,hoverable:n=!1,padding:u,testID:c}){const[l,E]=(0,t.useState)(!1),v=n?{onMouseEnter:()=>{E(!0)},onMouseLeave:()=>{E(!1)}}:{};return(0,b.jsx)(o.default,Object.assign({style:[O.base,void 0!==u&&{padding:u},l&&O.hovered,s],testID:c},v,{children:e}))};var e,t=r(d[0]),s=r(d[1]),o=(e=s)&&e.__esModule?e:{default:e};r(d[2]);var n=r(d[3]),u=r(d[4]),c=r(d[5]),l=r(d[6]),b=r(d[7]);const O=(0,n.createStyles)({base:Object.assign({backgroundColor:u.COLORS.BG_SURFACE,borderRadius:12,borderWidth:1,borderColor:u.COLORS.BORDER,padding:l.SPACING.LG},c.ELEVATION.SUBTLE),hovered:Object.assign({},c.ELEVATION.RAISED)})},605,[34,276,95,489,490,503,493,104]);
704__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.FeatureGate=function({feature:t,requireAll:l,requireAny:n,children:s,fallback:o=null}){const{isEnabled:c,hasAllFeatures:f,hasAnyFeature:F,isLoaded:v}=(0,u.useFeatureFlags)();if(!v)return null;let A=!1;A=void 0!==t?c(t):void 0!==l?f(l):F(n);if(A)return s;return o};var u=r(d[0])},606,[607]);
705__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.FeatureFlagProvider=function({children:l}){const[o,c]=(0,t.useState)(s.featureFlagService.getFeatures()),[v,F]=(0,t.useState)(s.featureFlagService.getEnvironment()),[f,S]=(0,t.useState)(!s.featureFlagService.isLoaded()),[b,h]=(0,t.useState)(s.featureFlagService.isLoaded()),C=(0,t.useCallback)(()=>{const t=s.featureFlagService.isLoaded();c(s.featureFlagService.getFeatures()),F(s.featureFlagService.getEnvironment()),h(t),S(!t)},[]);(0,t.useEffect)(()=>{const t=s.featureFlagService.addListener(C);return()=>{t()}},[C]);const L=(0,t.useCallback)(t=>o.includes(t),[o]),k=(0,t.useCallback)(t=>t.every(t=>o.includes(t)),[o]),E=(0,t.useCallback)(t=>t.some(t=>o.includes(t)),[o]),P=(0,t.useCallback)(()=>(C(),Promise.resolve()),[C]),_=(0,t.useMemo)(()=>({features:o,environment:v,isLoading:f,isLoaded:b,isEnabled:L,hasAllFeatures:k,hasAnyFeature:E,refresh:P}),[o,v,f,b,L,k,E,P]);return(0,u.jsx)(n.Provider,{value:_,children:l})},e.useFeatureFlags=function(){const s=(0,t.useContext)(n);if(void 0===s)throw new Error('useFeatureFlags must be used within a FeatureFlagProvider');return s};var t=r(d[0]),s=r(d[1]),u=r(d[2]);const n=(0,t.createContext)(void 0)},607,[34,526,104]);
706__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DisclosureSection=function({title:e,children:c,animateDetail:f=!1,leadingAccessory:h,chevronPlacement:C="leading"}){const[D,I]=(0,t.useState)(!1),{hovered:O,webHoverProps:_}=(0,S.useWebHover)(),A=(0,v.useReduceMotion)(),[E,P]=(0,t.useState)(0),[H,M]=(0,t.useState)(!1),[N]=(0,t.useState)(()=>new s.default.Value(0));(0,t.useEffect)(()=>{if(f&&H)if(D)0!==E&&(A?N.setValue(E):s.default.timing(N,{toValue:E,duration:j,useNativeDriver:!1}).start());else{if(A)return;s.default.timing(N,{toValue:0,duration:j,useNativeDriver:!1}).start(({finished:e})=>{e&&M(!1)})}},[f,H,D,E,A,N]);const R=(0,x.jsx)(o.default,{testID:"disclosure-chevron",style:[p.markerSlot,p.chevron,D?p.chevronExpanded:null],children:(0,x.jsx)(y.ChevronIcon,{direction:"down",size:b,color:u.COLORS.TEXT_DARK})});return(0,x.jsxs)(o.default,{children:[(0,x.jsxs)(n.default,Object.assign({style:[p.summary,O&&p.summaryHovered],onPress:()=>{const e=!D;I(e),f&&(e?M(!0):A&&(N.setValue(0),M(!1)))},activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:e,accessibilityState:{expanded:D}},_,{children:[void 0===h?null:(0,x.jsx)(o.default,{testID:"disclosure-accessory",style:p.markerSlot,children:h}),'leading'===C?R:null,(0,x.jsx)(l.default,{testID:"disclosure-title",style:p.title,children:e}),'trailing'===C?R:null]})),f?H&&(0,x.jsx)(s.default.View,{style:[p.detailClip,{height:N}],accessibilityElementsHidden:!D,importantForAccessibility:D?'auto':'no-hide-descendants',children:(0,x.jsx)(o.default,{testID:"disclosure-detail",style:p.detail,onLayout:e=>{const t=e.nativeEvent.layout.height;P(e=>e===t?e:t)},children:c})}):D&&(0,x.jsx)(o.default,{style:p.detail,children:c})]})};var t=r(d[0]),s=e(r(d[1]));r(d[2]);var l=e(r(d[3])),n=e(r(d[4])),o=e(r(d[5])),c=r(d[6]),u=r(d[7]),f=r(d[8]),h=r(d[9]),S=r(d[10]),v=r(d[11]),y=r(d[12]),x=r(d[13]);const b=16,j=180;const p=(0,c.createStyles)({chevron:Object.assign({},{transition:`transform ${j}ms ease`}),chevronExpanded:{transform:[{rotate:'180deg'}]},detail:{marginTop:f.SPACING.SM},detailClip:{overflow:'hidden'},markerSlot:{height:20,justifyContent:'center'},summary:{alignItems:'flex-start',borderRadius:6,flexDirection:'row',gap:f.SPACING.XS,marginHorizontal:-f.SPACING.SM,paddingHorizontal:f.SPACING.SM,paddingVertical:f.SPACING.SM},summaryHovered:{backgroundColor:u.COLORS.BG_SUBTLE},title:{color:u.COLORS.TEXT_DARK,flexShrink:1,flexGrow:1,fontSize:h.FONT_SIZE.MD,fontWeight:'600',lineHeight:20}})},608,[34,271,95,222,488,276,489,490,493,494,609,595,554,104]);
707__d(function(g,r,i,a,m,e,d){"use strict";
707Object.defineProperty(e,'__esModule',{value:!0}),e.useWebHover=function(){const[t,u]=(0,o.useState)(!1),n=(0,o.useMemo)(()=>({onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)}}),[]);return{hovered:t,webHoverProps:n}};var o=r(d[0]);r(d[1])},609,[34,95]);
708__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NavBar",{enumerable:!0,get:function(){return t.NavBar}}),Object.defineProperty(e,"NavVisibilityProvider",{enumerable:!0,get:function(){return n.NavVisibilityProvider}}),Object.defineProperty(e,"useNavVisibility",{enumerable:!0,get:function(){return n.useNavVisibility}});var t=r(d[0]),n=r(d[1])},610,[611,594]);
709__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.NavBar=function(n){const u=(0,t.useHeaderImplementationOverride)(),v=o?.StaticHeaderCandidate;if('static'===u&&void 0!==v)return(0,c.jsx)(v,Object.assign({},n),"static-header");return(0,c.jsx)(s.NavBar,Object.assign({},n),"react-header")},r(d[0]);var t=r(d[1]),n=r(d[2]),s=r(d[3]),c=r(d[4]);const o=(0,n.loadStaticHeaderCandidate)()},611,[34,612,613,615,104]);
710__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HEADER_IMPLEMENTATIONS",{enumerable:!0,get:function(){return u}}),e.readHeaderImplementationOverride=l,e.setHeaderImplementationOverride=function(t){o=t,c.forEach(t=>{t()})},e.useHeaderImplementationOverride=function(){return(0,t.useSyncExternalStore)(t=>n.IS_DEVELOPMENT_BUILD?(c.add(t),()=>{c.delete(t)}):()=>{},l,l)};var t=r(d[0]),n=r(d[1]);const u=['react','static'];let o=null;const c=new Set;function l(){return n.IS_DEVELOPMENT_BUILD?o:null}},612,[34,508]);
711__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.loadStaticHeaderCandidate=function(){return null}},613,[614]);
712__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ScreenBoundaryDevTools=function(){return null}},614,[]);
713__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NavBar=function({currentRouteName:e,currentRouteParams:A}){const I=(0,v.useAppNavigation)(),{isAdmin:C,user:G,isAuthenticated:X}=(0,S.useAuth)(),K=(0,b.useSignOut)(),{itemCount:Z}=(0,L.useCart)(),$=(0,t.formatCartBadge)(Z),{activeCategorySlug:q}=(0,p.useActiveStoreCategory)(),[J,Q]=(0,o.useState)(!1),[ee,te]=(0,o.useState)(!1),{width:ie,height:ne}=(0,R.default)(),{hidden:oe,reduceMotion:ae,reportHeaderHeight:se}=(0,D.useNavVisibility)(),re=(0,k.hasWebTouchInput)(),[le,ce]=(0,o.useState)(0),ue=(0,o.useMemo)(()=>new s.default.Value(0),[]);(0,o.useEffect)(()=>{if(!re)return ae?(ue.stopAnimation(),void ue.setValue(oe?1:0)):void s.default.timing(ue,{toValue:oe?1:0,duration:t.FRAME_INTERACTION.headerTransitionDurationMs,useNativeDriver:!1}).start()},[re,oe,ae,ue]);const de=(0,o.useCallback)(e=>{const t=e.nativeEvent.layout.height;ce(e=>e===t?e:t),se(t)},[se]),ge=(0,k.useTouchLayoutCompensation)(oe,le,ae),he=(0,o.useMemo)(()=>re?{marginTop:oe?-le:0}:{marginTop:ue.interpolate({inputRange:[0,1],outputRange:[0,-le]})},[re,oe,le,ue]),Re=ie<640,Ae='SUPER_OWNER'===G?.role,Se=(0,o.useMemo)(()=>(0,B.getAccountMenuItems)({isAuthenticated:X,isAdmin:C,isSuperOwner:Ae}),[X,C,Ae]),Oe=(0,o.useCallback)(e=>e.filter(e=>!0!==e.hidden&&(0,O.isRouteAccessible)(e.name,X,C,Ae)),[X,C,Ae]),xe=async()=>{Q(!1),await K()},Ie=(e,t)=>{Q(!1),I.navigate(e,t)},Ce=t=>e===t,be=[V.navBar,{backgroundImage:`linear-gradient(to right, ${x.COLORS.BRAND_PRIMARY} 0%, ${x.COLORS.BRAND_PRIMARY} 67%, ${x.COLORS.WHITE} 100%)`,position:'relative',zIndex:1e3}],pe=[V.mobileGlassChip,w],Le=Object.assign({position:'absolute',top:0,right:0,bottom:0,width:'50%'},n.HEADER_WAVE_BACKGROUND_STYLE),me=.75*ne;return(0,H.jsxs)(s.default.View,{style:[V.navWrapper,he,ge],onLayout:de,children:[(0,H.jsxs)(l.default,{style:be,children:[null!=Le&&(0,H.jsx)(l.default,{style:Le}),(0,H.jsxs)(l.default,{style:V.navContainer,children:[(0,H.jsx)(E.AppLink,{to:"Home",style:V.logoContainer,onPress:()=>{Ie('Home')},accessibilityLabel:"PurpleAir home",testID:"nav-logo",children:(0,H.jsx)(h.default,{source:U,style:V.logoImage,resizeMode:"contain"})}),!Re&&(0,H.jsx)(N.DesktopMenu,{visibleLinks:Oe,isActive:Ce,isSubNavLinkActive:t=>(0,z.isSubNavLinkActive)(e,A,q,t),onNavigate:Ie}),(0,H.jsxs)(l.default,{style:V.navActions,children:[!Re&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u.default,{onPress:()=>{te(!0)},style:V.cartButton,accessibilityRole:"button",accessibilityLabel:"Search",testID:"nav-search",children:(0,H.jsx)(_.SearchIcon,{size:t.FRAME_LAYOUT.headerActionIconSizePx,color:x.COLORS.WHITE})}),(0,H.jsxs)(E.AppLink,{to:"Cart",style:V.cartButton,selected:Ce('Cart'),onPress:()=>{Ie('Cart')},accessibilityLabel:"Shopping cart",children:[(0,H.jsx)(j.ShoppingBagIcon,{size:t.FRAME_LAYOUT.headerActionIconSizePx,color:x.COLORS.WHITE}),null!==$&&(0,H.jsx)(l.default,{style:V.cartBadge,children:(0,H.jsx)(c.default,{style:V.cartBadgeText,children:$})})]}),(0,H.jsxs)(M.ServiceExternalLink,{service:"mapBaseUrl",target:"_self",style:V.mapButton,textStyle:V.mapButtonText,accessibilityLabel:"Open the map",children:[(0,H.jsx)(f.MapIcon,{size:15,color:x.COLORS.BRAND_PRIMARY}),(0,H.jsx)(c.default,{style:V.mapButtonText,children:"Map"})]}
713),X?(0,H.jsx)(W.UserMenu,{items:Se,onNavigate:Ie,onLogout:()=>{xe()}}):(0,H.jsx)(u.default,{onPress:()=>{Ie('Login')},style:V.authButton,children:(0,H.jsx)(c.default,{style:V.signInButtonText,children:"Sign In"})})]}),Re&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u.default,{onPress:()=>{te(!0)},testID:"nav-search-mobile",style:[V.cartButton,pe],accessibilityRole:"button",accessibilityLabel:"Search",children:(0,H.jsx)(_.SearchIcon,{size:t.FRAME_LAYOUT.headerActionIconSizePx,color:x.COLORS.WHITE})}),(0,H.jsxs)(E.AppLink,{to:"Cart",testID:"nav-cart-mobile",style:[V.cartButton,pe],selected:Ce('Cart'),onPress:()=>{Ie('Cart')},accessibilityLabel:"Shopping cart",children:[(0,H.jsx)(j.ShoppingBagIcon,{size:t.FRAME_LAYOUT.headerActionIconSizePx,color:x.COLORS.WHITE}),null!==$&&(0,H.jsx)(l.default,{style:V.cartBadge,children:(0,H.jsx)(c.default,{style:V.cartBadgeText,children:$})})]}),(0,H.jsx)(u.default,{onPress:()=>{Q(!J)},style:[pe,V.menuToggle],accessibilityRole:"button",accessibilityLabel:J?'Close navigation menu':'Open navigation menu',accessibilityState:{expanded:J},testID:"nav-menu-toggle",children:J?(0,H.jsx)(T.CloseIcon,{size:t.FRAME_LAYOUT.headerActionIconSizePx,color:x.COLORS.WHITE}):(0,H.jsx)(y.MenuIcon,{size:t.FRAME_LAYOUT.headerActionIconSizePx,color:x.COLORS.WHITE})})]})]})]})]}),(0,H.jsx)(F.SubNav,Object.assign({currentRouteName:e},void 0!==A?{currentRouteParams:A}:{},{activeCategorySlug:q,visibleLinks:Oe,onNavigate:Ie})),Re&&J&&(0,H.jsx)(P.MobileMenu,Object.assign({maxHeight:me,isAuthenticated:X,userEmail:G?.email,userRole:G?.role,accountItems:Se,currentRouteName:e},void 0!==A?{currentRouteParams:A}:{},{activeCategorySlug:q,visibleLinks:Oe,onNavigate:Ie,onLogout:()=>{xe()}})),(0,H.jsx)(Y.SearchOverlay,{visible:ee,onClose:()=>{te(!1)}})]})};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=e(r(d[3])),l=e(r(d[4])),c=e(r(d[5])),u=e(r(d[6]));r(d[7]);var h=e(r(d[8])),R=e(r(d[9])),A=r(d[10]),S=r(d[11]),O=r(d[12]),x=r(d[13]),I=r(d[14]),C=r(d[15]),b=r(d[16]),p=r(d[17]),L=r(d[18]),v=r(d[19]),E=r(d[20]),T=r(d[21]),f=r(d[22]),y=r(d[23]),_=r(d[24]),j=r(d[25]),M=r(d[26]),B=r(d[27]),N=r(d[28]),P=r(d[29]),z=r(d[30]),D=r
713(d[31]),Y=r(d[32]),F=r(d[33]),W=r(d[34]),k=r(d[35]),H=r(d[36]);const U=r(d[37]);const w={backdropFilter:'blur(8px)'},V=(0,A.createStyles)({authButton:{backgroundColor:x.COLORS.BRAND_PRIMARY,borderRadius:6,paddingHorizontal:I.SPACING.MD,paddingVertical:I.SPACING.SM,zIndex:2},authButtonText:{color:x.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.MD,fontWeight:'500'},cartBadge:{alignItems:'center',backgroundColor:x.COLORS.BADGE_RED,borderRadius:9,height:18,justifyContent:'center',minWidth:18,paddingHorizontal:I.SPACING.XS,position:'absolute',right:0,top:2},cartBadgeText:{color:x.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.XS,fontWeight:'700',lineHeight:14},cartButton:{alignItems:'center',borderRadius:6,height:t.FRAME_LAYOUT.headerActionSizePx,justifyContent:'center',position:'relative',width:t.FRAME_LAYOUT.headerActionSizePx,zIndex:2},logoContainer:{alignItems:'center',flexDirection:'row'},logoImage:{height:36,width:140},mapButton:{alignItems:'center',backgroundColor:x.COLORS.BG_SURFACE,borderRadius:20,flexDirection:'row',gap:6,paddingHorizontal:16,paddingVertical:7,zIndex:2},mapButtonText:{color:x.COLORS.BRAND_PRIMARY,fontSize:C.FONT_SIZE.MD,fontWeight:'700',letterSpacing:.3},menuToggle:{backgroundColor:x.COLORS.OVERLAY_DARK_30},mobileGlassChip:{alignItems:'center',backgroundColor:x.COLORS.OVERLAY_DARK_25,borderColor:x.COLORS.OVERLAY_LIGHT_30,borderRadius:8,borderWidth:1,height:t.FRAME_LAYOUT.headerActionSizePx,justifyContent:'center',width:t.FRAME_LAYOUT.headerActionSizePx},navActions:{alignItems:'center',flexDirection:'row',gap:I.SPACING.MD,zIndex:2},navBar:{backgroundColor:x.COLORS.BRAND_PRIMARY,borderBottomColor:x.COLORS.OVERLAY_DARK_10,borderBottomWidth:1},navContainer:{alignItems:'center',alignSelf:'center',flexDirection:'row',height:t.FRAME_LAYOUT.headerHeightPx,justifyContent:'space-between',maxWidth:t.FRAME_LAYOUT.contentMaxWidthPx,paddingHorizontal:I.SPACING.LG,width:'100%'},navWrapper:Object.assign({position:'relative',zIndex:1e3},{overflow:'visible'}),signInButtonText:{color:x.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.MD,fontWeight:'600'}})},615,[571,579,34,271,276,222,488,95,328,552,489,411,485,490,493,494,495,616,617,505,516,555,621,622,623,624,522,625,626,639,642,594,643,647,648,649,104,510]);
714__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ActiveStoreCategoryProvider=function({children:u}){const[c,s]=(0,t.useState)(null),l=(0,t.useCallback)(t=>{s(t)},[]),v=(0,t.useMemo)(()=>({activeCategorySlug:c,setActiveCategorySlug:l}),[c,l]);return(0,o.jsx)(n.Provider,{value:v,children:u})},e.useActiveStoreCategory=function(){const o=(0,t.useContext)(n);if(null===o)throw new Error('useActiveStoreCategory must be used within an ActiveStoreCategoryProvider');return o};var t=r(d[0]),o=r(d[1]);const n=(0,t.createContext)(null)},616,[34,104]);
715__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.CartProvider=function({children:e}){const[,t]=(0,u.useReducer)(e=>e+1,0),I=(0,u.useRef)(null),E=(0,u.useRef)(null),w=(0,u.useRef)(new Map),A=(0,u.useRef)(new Set),q=(0,u.useRef)([]),R=(0,u.useRef)(new Map),j=(0,u.useRef)(null),P=(0,u.useRef)(null),L=(0,u.useRef)(!1),_=(0,u.useRef)('pending'),M=(0,u.useRef)(!0),S=(0,u.useRef)(async()=>{}),T=(0,u.useRef)(async()=>{}),z=(0,u.useCallback)(()=>{M.current&&t()},[]),O=(0,u.useCallback)(async e=>{try{null==e?await n.default.removeItem(c.STORAGE_KEYS.CART_ID):await n.default.setItem(c.STORAGE_KEYS.CART_ID,e)}catch(e){o.logger.debug('Cart storage unavailable, cart will be in-memory only',e)}},[]),Q=(0,u.useCallback)(e=>{q.current.forEach(t=>{t.reject(e)}),q.current=[]},[]),D=(0,u.useCallback)(e=>{const t=new Set(e);q.current=q.current.filter(e=>!t.has(e))},[]),F=(0,u.useCallback)(()=>{const e=new Error('Your cart is no longer available.');E.current=null,I.current=null,w.current.clear(),A.current.clear(),R.current.clear(),j.current=null,_.current='hydrated',P.current=e.message,Q(e),O(null)},[O,Q]),x=(0,u.useCallback)(()=>{M.current&&!L.current&&('failed'!==_.current?'hydrated'===_.current&&null==j.current&&S.current():T.current())},[]),B=(0,u.useCallback)((e="now")=>{z(),'microtask'===e?queueMicrotask(x):x()},[x,z]),U=(0,u.useCallback)((e,t=[])=>{const n=I.current;if(null!=n){const t=q.current.filter(t=>{if(null!=t.convertedLineId)return!1;const u=b(n,t.line);return null!=u&&!A.current.has(u.id)&&null==b(e,t.line)});
715D(t),t.forEach(e=>{e.reject(new Error(p))})}I.current=e;const u=new Map((e.lines??[]).map(e=>[e.id,e.quantity]));t.forEach(e=>{w.current.get(e.id)===e.quantity&&w.current.delete(e.id)}),w.current.forEach((e,t)=>{const n=u.get(t);null!=n&&n!==e||w.current.delete(t)}),A.current.forEach(e=>{u.has(e)||(A.current.delete(e),R.current.delete(e))})},[D]),Y=(0,u.useCallback)(()=>{if(null==I.current)return;const e=new Map((I.current.lines??[]).map(e=>[e.id,e.quantity]));w.current.forEach((t,n)=>{const u=e.get(n);null!=u&&u!==t||w.current.delete(n)})},[]),G=(0,u.useCallback)(()=>{const e=E.current;if(A.current.size>0&&null!=e)return{kind:'remove',cartId:e,lineIds:Array.from(A.current)};if(null!=e&&null!=I.current){const t=new Map((I.current.lines??[]).map(e=>[e.id,e.quantity])),n=[];if(w.current.forEach((e,u)=>{const l=t.get(u);null!=l&&l!==e&&n.push({id:u,quantity:e})}),n.length>0)return{kind:'update',cartId:e,lines:n,convertedAdds:[]}}const t=I.current;if(null!=e&&null!=t&&q.current.length>0){const n=new Map;if(q.current.forEach(e=>{const u=b(t,e.line);if(null==u)return;e.convertedLineId=u.id;const l=n.get(u.id),c={entry:e,lineId:u.id};n.set(u.id,{line:Object.assign({id:u.id,quantity:e.line.quantity},null==e.line.attributes?{}:{attributes:e.line.attributes}),convertedAdds:[...l?.convertedAdds??[],c]})}),n.size>0)return{kind:'update',cartId:e,lines:Array.from(n.values(),e=>e.line),convertedAdds:Array.from(n.values(),e=>e.convertedAdds).flat()}}return q.current.length>0?{kind:'add',cartId:e,batch:[...q.current]}:null},[]);S.current=async()=>{if(L.current||'hydrated'!==_.current||null!=j.current)return;Y();let e=G();if(null!=e){L.current=!0,z();try{for(;;){try{let t;if('remove'===e.kind)t=await l.storeApi.removeCartLines(e.cartId,e.lineIds);else if('update'===e.kind)t=await l.storeApi.updateCartLines(e.cartId,e.lines);else{const n=e.batch.map(e=>e.line);t=null==e.cartId?await l.storeApi.createCart(n):await l.storeApi.addCartLines(e.cartId,n)}if('add'===e.kind?(null==e.cartId&&(E.current=t.id,O(t.id)),D(e.batch)):'update'===e.kind&&e.convertedAdds.length>0&&D(e.convertedAdds.map(e=>e.entry)),U(t,'update'===e.kind?e.lines:[]),P.current=null,j.current=null,z(),'add'===e.kind)e.batch.forEach(e=>{e.resolve()});else if('update'===e.kind){const n=new Set((t.lines??[]).map(e=>e.id));e.convertedAdds.forEach(({entry:e,lineId:t})=>{n.has(t)&&!A.current.has(t)?e.resolve():e.reject(new Error(p))})}}catch(t){const n='remove'===e.kind?'Failed to remove item':'update'===e.kind?'Failed to update quantity':'Failed to add item',u=(0,s.errorMessage)(t,n),l=(0,s.readAxiosLikeResponse)(t)?.status;if(404===l)return F(),void z();if(C(t)){if('update'===e.kind){const l=e;if(l.lines.forEach(e=>{w.current.get(e.id)===e.quantity&&(w.current.delete(e.id),R.current.set(e.id,{kind:'quantity',attemptedQuantity:e.quantity,message:u}))}),l.convertedAdds.length>0){const e=k(t,n);D(l.convertedAdds.map(e=>e.entry)),l.convertedAdds.forEach(({entry:t,lineId:n})=>{const c=l.lines.find(e=>e.id===n);null!=c&&R.current.set(n,{kind:'quantity',attemptedQuantity:c.quantity,message:u}),t.reject(e)})}}else if('remove'===e.kind)e.lineIds.forEach(e=>{A.current.delete(e),R.current.set(e,{kind:'removal',message:u})});else{D(e.batch);const u=k(t,n);e.batch.forEach(e=>{e.reject(u)})}z()}else if('add'===e.kind){D(e.batch);const u=k(t,n);e.batch.forEach(e=>{e.reject(u)}),z()}else{if(!('update'===e.kind&&e.convertedAdds.length>0))return j.current=u,void z();{const u=k(t,n);D(e.convertedAdds.map(e=>e.entry)),e.convertedAdds.forEach(({entry:e})=>{e.reject(u)}),z()}}}if(Y(),e=G(),null==e)return}}finally{L.current=!1,z(),Y(),null==j.current&&null!=G()&&x()}}},T.current=async()=>{if('pending'===_.current||'failed'===_.current){_.current='restoring',z();try{let e=E.current;if(null==e)try{e=await n.default.getItem(c.STORAGE_KEYS.CART_ID)}catch(e){o.logger.debug('Cart storage unavailable, cart will be in-memory only',e)}if(!M.current)return;if(null==e)return _.current='hydrated',void(j.current=null);E.current=e;const t=await l.storeApi.getCart(e);if(!M.current)return;null==t?(E.current=null,I.current=null,await O(null)):U(t),_.current='hydrated',j.current=null}catch(e){o.logger.warn('Failed to restore cart from Shopify:',e),Q(k(e,"Couldn't load your cart.")),_.current='failed',j.current="Couldn't load your cart."}finally{z(),'hydrated'===_.current&&x()}}},(0,u.useEffect)(()=>(M.current=!0,T.current(),()=>{M.current=!1}),[]);const K=(0,u.useCallback)(e=>{let t;try{t=(0,y.requireCartLineQuantity)(e.quantity)}catch(e){return Promise.reject(k(e,'Invalid cart line quantity'))}P.current=null,j.current=null;const n=Object.assign({merchandiseId:e.merchandiseId,quantity:t},null!=e.attributes&&e.attributes.length>0?{attributes:e.attributes}:{},null!=e.sellingPlanId?{sellingPlanId:e.sellingPlanId}:{}),u=new Promise((e,t)=>
715{q.current.push({line:n,resolve:e,reject:t})});return B('microtask'),u},[B]),H=(0,u.useCallback)((e,t)=>{let n;try{n=(0,y.requireCartLineQuantity)(t)}catch(e){return Promise.reject(k(e,'Invalid cart line quantity'))}const u=I.current?.lines?.find(t=>t.id===e);return null==u||A.current.has(e)||(R.current.delete(e),P.current=null,j.current=null,w.current.set(e,n),B()),Promise.resolve()},[B]),N=(0,u.useCallback)(e=>{if(null==E.current||!0!==I.current?.lines?.some(t=>t.id===e))return Promise.resolve();const t=q.current.filter(t=>t.convertedLineId===e);return D(t),t.forEach(e=>{e.reject(new Error(p))}),w.current.delete(e),R.current.delete(e),A.current.add(e),P.current=null,j.current=null,B(),Promise.resolve()},[B,D]),J=(0,u.useCallback)(()=>{null!=j.current&&(j.current=null,B())},[B]),V=(null==I.current?[]:($=I.current,($.lines??[]).map(e=>{const t=e.attributes??[],n=t.find(e=>'For'===e.key),u=t.find(e=>'ID'===e.key),l=t.find(e=>'Points'===e.key);return{lineId:e.id,merchandiseId:e.merchandiseId,title:e.title,productHandle:e.productHandle??null,variantTitle:e.variantTitle,price:parseFloat(e.price.amount),currencyCode:e.price.currencyCode,imageUrl:null==e.image?null:e.image.thumbnailUrl,quantity:(0,y.requireCartLineQuantity)(e.quantity),removing:!1,orgName:n?.value??null,orgId:u?.value??null,pointsTotal:l?.value??null,sellingPlanId:e.sellingPlanId??null,recurringBillingInterval:e.recurringBillingInterval??null,recurringBillingIntervalCount:e.recurringBillingIntervalCount??null}}))).map(e=>{const t=R.current.get(e.lineId),n=w.current.get(e.lineId);return Object.assign({},e,{quantity:'quantity'===t?.kind?(0,y.requireCartLineQuantity)(t.attemptedQuantity):n??e.quantity,removing:A.current.has(e.lineId)})}),W=V.reduce((e,t)=>e+(null==t.pointsTotal?t.quantity:1),0),X=V.reduce((e,t)=>e+t.price*t.quantity,0),Z='hydrated'===_.current;var $;(0,u.useEffect)(()=>{Z&&(0,f.publishCartCount)(W)},[Z,W]);const ee=w.current.size>0||A.current.size>0||q.current.length>0,re='hydrated'===_.current&&!L.current&&!ee&&0===R.current.size&&null==j.current,te={items:V,itemCount:W,subtotal:X,loading:'pending'===_.current||'restoring'===_.current,error:P.current,lineRejections:R.current,syncError:j.current,retrySync:J,addItem:K,removeItem:N,updateQuantity:H},ne=re?Object.assign({},te,{synchronization:{status:'synchronized',checkoutUrl:I.current?.checkoutUrl??null}}):Object.assign({},te,{synchronization:{status:'synchronizing'}});return(0,h.jsx)(v.Provider,{value:ne,children:e})},_e.useCart=function(){const e=(0,u.useContext)(v);if(null==e)throw new Error('useCart must be used within a CartProvider');return e};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},u=r(d[1]),l=r(d[2]),c=r(d[3]),s=r(d[4]),o=r(d[5]),f=r(d[6]),y=r(d[7]),h=r(d[8]);const v=(0,u.createContext)(null),p='This item was removed from your cart.';function I(e,t){return e?.find(e=>e.key===t)?.value}function b(e,t){const n=I(t.attributes,'ID'),u=t.sellingPlanId??null;return(e.lines??[]).find(e=>e.merchandiseId===t.merchandiseId&&I(e.attributes,'ID')===n&&(e.sellingPlanId??null)===u&&null!=I(e.attributes,'Points'))}function k(e,t){return e instanceof Error?e:new Error((0,s.errorMessage)(e,t))}function C(e){const t=(0,s.readAxiosLikeResponse)(e)?.status;return 400===t}},617,[477,34,618,484,468,469,619,620,104]);
716__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"storeApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]),s=r(d[1]);const n={getCategories:async()=>s.store.getCategories(),getProducts:async()=>s.store.getProducts(),async getProductByHandle(n){try{return await s.store.getProductByHandle({path:{handle:n}})}catch(s){if((0,t.isAxios404)(s))return null;throw s}},getShopPolicy:async t=>s.store.getShopPolicy({path:{handle:t}}),getProductReviews:async(t,n=1,o=5,c=null,u="NEWEST")=>s.store.getProductReviews({path:{handle:t},query:Object.assign({page:n,perPage:o,sort:u},null==c?{}:{rating:c})}),async submitProductReview(t,n){await s.store.submitProductReview({path:{handle:t},body:n})},createCart:async t=>s.store.createCart({body:{lines:t}}),async getCart(n){try{return await s.store.getCart({query:{cartId:n}})}catch(s){if((0,t.isAxios404)(s))return null;throw s}},addCartLines:async(t,n)=>s.store.addCartLines({body:{cartId:t,lines:n}}),updateCartLines:async(t,n)=>s.store.updateCartLines({body:{cartId:t,lines:n}}),removeCartLines:async(t,n)=>s.store.removeCartLines({body:{cartId:t,lineIds:n}}),getApiPointsTiers:async()=>s.store.getApiPointsTiers(),getSubscriptionOffer:async()=>s.store.getSubscriptionOffer()}},618,[464,471]);
717__d(function(g,r,i,a,m,e,d){"use strict";
717Object.defineProperty(e,'__esModule',{value:!0}),e.publishCartCount=function(n){if('undefined'==typeof document)return;const u='undefined'==typeof window?'':window.location.hostname,c='undefined'==typeof window||'https:'===window.location.protocol;document.cookie=(0,o.serializeCartCountCookie)(n,{hostname:u,secure:c,statedDomain:(0,t.readStatedCookieDomain)(document)})};var o=r(d[0]),t=r(d[1])},619,[571,591]);
718__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isCartLineQuantity=o,e.requireCartLineQuantity=l,e.cartLineQuantityInput=function(t){return{kind:'valid',text:String(t),quantity:t}},e.parseCartLineQuantityInput=function(t){const o=t.trim();if(!s.test(o))return{kind:'invalid',text:o,reason:'not-whole-number',errorMessage:'Enter a whole-number quantity.',adjustableQuantity:null};const c=Number(o);if(!Number.isSafeInteger(c)||c>u)return{kind:'invalid',text:o,reason:'above-maximum',errorMessage:`Quantity cannot exceed ${u.toLocaleString('en-US')}.`,adjustableQuantity:Number.isSafeInteger(c)?c:null};if(c<n)return{kind:'invalid',text:o,reason:'below-minimum',errorMessage:`Quantity must be at least ${n.toLocaleString('en-US')}.`,adjustableQuantity:c};return{kind:'valid',text:o,quantity:l(c)}};var t=r(d[0]);const n=t.cartLineQuantityConstraints.minimum,u=t.cartLineQuantityConstraints.maximum,s=/^(0|[1-9][0-9]*)$/;function o(t){return Number.isSafeInteger(t)&&t>=n&&t<=u}function l(t){if(!o(t))throw new RangeError(`Cart line quantity must be between ${n} and ${u}`);return t}},620,[471]);
719__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.MapIcon=function(e){const{size:s=16,color:l}=e,u=l??n.COLORS.WHITE,c='path';return(0,o.jsx)(t.default,{style:{width:s,height:s},children:(0,o.jsxs)("svg",{width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(c,{d:"M1 6v16l7-4 8 4 7-4V2l-7 4-8-4-7 4z"}),(0,o.jsx)(c,{d:"M8 2v16"}),(0,o.jsx)(c,{d:"M16 6v16"})]})})},r(d[0]),r(d[1]);e(r(d[2]));var t=e(r(d[3])),n=r(d[4]),o=r(d[5])},621,[34,95,222,276,490,104]);
720__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.MenuIcon=function(e){const{size:o=24,color:l}=e,u=l??n.COLORS.WHITE,x='line';return(0,s.jsx)(t.default,{style:{width:o,height:o},children:(0,s.jsxs)("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:2.5,strokeLinecap:"round",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(x,{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,s.jsx)(x,{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,s.jsx)(x,{x1:"4",y1:"18",x2:"20",y2:"18"})]})})},r(d[0]),r(d[1]);e(r(d[2]));var t=e(r(d[3])),n=r(d[4]),s=r(d[5])},622,[34,95,222,276,490,104]);
721__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SearchIcon=function(e){const{size:u=22,color:h}=e,f=h??o.COLORS.WHITE;return(0,c.jsx)(n.default,{style:{width:u,height:u},children:(0,t.createElement)('svg',{fill:'none',height:u,stroke:f,strokeLinecap:'round',strokeLinejoin:'round',strokeWidth:s,viewBox:`0 0 ${l} ${l}`,width:u,xmlns:'http://www.w3.org/2000/svg'},(0,t.createElement)('circle',{cx:11,cy:11,r:8}),(0,t.createElement)('path',{d:'M21 21l-4.35-4.35'}))})};var t=r(d[0]);r(d[1]);e(r(d[2]));var n=e(r(d[3])),o=r(d[4]),c=r(d[5]);const l=24,s=2},623,[34,95,222,276,490,104]);
722__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ShoppingBagIcon=function(e){const{size:n=22,color:s}=e,o=s??c.COLORS.WHITE;return(0,h.jsx)(t.default,{style:{width:n,height:n},children:(0,h.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:o,xmlns:"http://www.w3.org/2000/svg",children:(0,h.jsx)("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2zm6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2v12z"})})})},r(d[0]),r(d[1]);e(r(d[2]));var t=e(r(d[3])),c=r(d[4]),h=r(d[5])},624,[34,95,222,276,490,104]);
723__d(function(g,r,i,a,m,e,d){"use strict";
723Object.defineProperty(e,'__esModule',{value:!0}),e.getAccountMenuItems=function(n){return s.filter(c=>(0,t.isRouteAccessible)(c.screen,n.isAuthenticated,n.isAdmin,n.isSuperOwner))};var n=r(d[0]),t=r(d[1]),c=r(d[2]);const s=n.ACCOUNT_LINK_IDS.map(function(t){const s=n.FRAME_LINKS[t],u=s.routeName;if(!(0,c.isLinkableScreenName)(u))throw new Error(`Account frame link "${t}" routeName "${u}" is not a www linkable screen`);return{label:s.label,screen:u}})},625,[571,485,518]);
724__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DesktopMenu=function({visibleLinks:e,isActive:s,isSubNavLinkActive:o,onNavigate:c}){const{openKey:u,enterTrigger:x,scheduleClose:j,cancelClose:b,closeNow:A}=(0,y.useHoverIntent)(),N=(0,n.useRef)(null);(0,O.useNavDismiss)({isOpen:null!=u,onDismiss:A,containerRef:N});const R=(0,n.useCallback)((e,n)=>{A(),c(e,n)},[A,c]),E=e=>e.links.some(e=>s(e.name))||null!=e.overview&&s(e.overview.name),I={onMouseEnter:b,onMouseLeave:j},_=h.NAV_CATEGORIES.map(n=>({category:n,links:e(n.links)})).filter(e=>e.links.length>0),w=(0,C.jsx)(l.default,{style:S.panelBar,children:(0,C.jsx)(l.default,{style:S.panelInner,children:_.map(({category:e,links:n})=>(0,C.jsxs)(l.default,{style:f.panelStyles.column,children:[(0,C.jsx)(l.default,{style:f.panelStyles.columnTitleRow,children:(0,C.jsx)(t.default,{style:f.panelStyles.columnTitle,children:e.title})}),n.map(e=>(0,C.jsx)(k.NavLink,{link:e,isActiveLink:o(e),onNavigate:R,variant:"megaMenu"},`${e.name}:${e.label}`))]},e.title))})});return(0,C.jsxs)(l.default,{ref:N,style:f.triggerStyles.navLinks,children:[h.NAV_CATEGORIES.map(n=>{const t=e(n.links),s=(0,p.categoryDestination)(n,t);if(0===t.length||null===s)return null;const o={onMouseEnter:()=>{x(n.title)},onMouseLeave:j};return(0,C.jsx)(l.default,Object.assign({},o,{children:(0,C.jsx)(v.HoverNavLink,{title:n.title,destination:s,active:E(n),isOpen:u===n.title,showChevron:!1,onNavigate:R})}),n.title)}),null!==u&&(0,C.jsx)("div",Object.assign({style:L},I,{children:w}))]})};var n=r(d[0]);r(d[1]);var t=e(r(d[2])),l=e(r(d[3])),s=r(d[4]),o=r(d[5]),c=r(d[6]),u=r(d[7]),v=r(d[8]),f=r(d[9]),p=r(d[10]),h=r(d[11]),k=r(d[12]),y=r(d[13]),O=r(d[14]),C=r(d[15]);const L={position:'fixed',top:57,left:0,right:0,zIndex:999},S=(0,s.createStyles)({nativePanel:{backgroundColor:o.COLORS.BG_SURFACE,left:0,position:'absolute',right:0,top:'100%',zIndex:999},panelBar:Object.assign({backgroundColor:o.COLORS.BG_SURFACE,borderBottomColor:o.COLORS.BORDER_LIGHT,borderBottomWidth:1,width:'100%'},c.ELEVATION.OVERLAY),panelInner:{alignSelf:'center',flexDirection:'row',maxWidth:1280,paddingHorizontal:u.SPACING.XL,paddingVertical:u.SPACING.XL,width:'100%'}})},626,[34,95,222,276,489,490,503,493,627,628,629,630,636,637,638,104]);
725__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HoverNavLink=function({title:e,destination:y,active:f,isOpen:p,showChevron:L=!0,onNavigate:b}){const{hovered:j,webHoverProps:k}=(0,s.useWebHover)(),x=f||p||j;return(0,v.jsx)(n.default,Object.assign({},k,{children:(0,v.jsxs)(l.AppLink,{to:y.name,href:(0,o.getScreenPath)(y.name,y.params),style:[c.triggerStyles.navLink,x&&c.triggerStyles.navLinkActive],selected:f,accessibilityLabel:e,onPress:()=>{b(y.name,y.params)},children:[(0,v.jsx)(t.default,{style:[c.triggerStyles.navLinkText,x&&c.triggerStyles.navLinkTextActive],children:e}),L&&(0,v.jsx)(t.default,{style:c.triggerStyles.navChevron,children:p?u:h})]})}))},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),s=r(d[3]),l=r(d[4]),o=r(d[5]),c=r(d[6]),v=r(d[7]);const u='\u25b4',h='\u25be'},627,[34,222,276,609,516,518,628,104]);
726__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"triggerStyles",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"panelStyles",{enumerable:!0,get:function(){return c}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),S=r(d[3]);const l=(0,n.createStyles)({navChevron:{color:t.COLORS.OVERLAY_LIGHT_85,fontSize:S.FONT_SIZE.XS,marginLeft:o.SPACING.XS},navLink:{alignItems:'center',borderRadius:6,flexDirection:'row',gap:o.SPACING.SM,paddingHorizontal:o.SPACING.MD,paddingVertical:o.SPACING.SM},navLinkActive:{backgroundColor:t.COLORS.OVERLAY_LIGHT_20},navLinkText:{color:t.COLORS.OVERLAY_LIGHT_85,fontSize:S.FONT_SIZE.MD,fontWeight:'500'},navLinkTextActive:{color:t.COLORS.TEXT_INVERSE},navLinks:{alignItems:'center',flexDirection:'row',gap:o.SPACING.MICRO}}),c=(0,n.createStyles)({column:{flex:1,gap:o.SPACING.MICRO,minWidth:160,paddingHorizontal:o.SPACING.LG},columnTitle:{color:t.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.8,paddingHorizontal:o.SPACING.SM,textTransform:'uppercase'},columnTitleRow:{marginBottom:o.SPACING.XS}})},628,[489,490,493,494]);
727__d(function(g,r,i,a,m,e,d){"use strict";
727Object.defineProperty(e,'__esModule',{value:!0}),e.categoryDestination=function(t,n){return t.overview??n[0]??null}},629,[]);
728__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NAV_CATEGORIES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DROPDOWN_CLOSE_DELAY_MS",{enumerable:!0,get:function(){return l}});const n=[{title:'Store',overview:{name:'Store',label:'All Products',icon:'\ud83d\uded2'},links:[{name:'Store',label:'All Products',icon:'\ud83d\uded2'},...r(d[0]).FEATURED_STORE_CATEGORIES.map(n=>({name:'StoreCategory',label:n.label,icon:n.navIcon,params:{category:n.slug}}))]},{title:'Solutions',links:[{name:'Personal',label:'Personal',icon:'\ud83c\udfe0'},{name:'Business',label:'Business',icon:'\ud83c\udfe2'},{name:'Education',label:'Education',icon:'\ud83c\udf93'},{name:'Broadcasters',label:'Broadcasters',icon:'\ud83d\udce1'},{name:'Government',label:'Government',icon:'\ud83c\udfdb'}]},{title:'Tools',links:[{name:'AboutMap',label:'Real-Time Map',icon:'\ud83d\uddfa'},{name:'Register',label:'Register Your Sensor',icon:'\ud83d\udccb'},{name:'SensorManagement',label:'My Sensors',icon:'\ud83d\udee0'},{name:'Flasher',label:'Firmware Flasher',icon:'\u26a1'},{name:'SensorUtility',label:'Sensor Utility',icon:'\ud83d\udda5'}]},{title:'Resources',links:[{name:'Community',label:'Community',icon:'\ud83d\udcac'},{name:'FAQ',label:'FAQ',icon:'\u2753'},{name:'Papers',label:'Scientific Papers',icon:'\ud83d\udcc4'},{name:'ProjectsAndIntegrations',label:'Projects & Integrations',icon:'\ud83d\udd17'},{name:'API',label:'API Documentation',icon:'\ud83d\udd0c'},{name:'ApiTokens',label:'API Tokens',icon:'\ud83d\udd11'},{name:'Status',label:'System Status',icon:'\ud83d\udce1'}]},{title:'Company',links:[{name:'About',label:'About PurpleAir',icon:'\ud83c\udfe2'},{name:'Blog',label:'Blog',icon:'\ud83d\udcf0'},{name:'Press',label:'Press',icon:'\ud83d\udce2'},{name:'Contact',label:'Contact',icon:'\u2709'}]}],l=300},630,[631]);
729__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SENSOR_CATEGORY_SLUG",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"REPLACEMENT_PARTS_CATEGORY_SLUG",{enumerable:!0,get:function(){return c}}),Object.defineProperty(_e,"FEATURED_STORE_CATEGORIES",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"CATEGORY_CONFIG_BY_SLUG",{enumerable:!0,get:function(){return f}});var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),s=e(r(d[3])),u=e(r(d[4]));const l='air-quality-sensors',c='replacement-parts',p={'air-quality-sensors':{heroAsset:u.default,heroPosition:'center 40%',heroSubtitle:"Laser particle counters that help power the EPA's Fire and Smoke Map. Real-time monitoring for homes, schools, and research."},'power-supplies':{heroAsset:n.default,heroPosition:'center 50%',heroSubtitle:'Reliable power solutions designed for continuous outdoor and indoor sensor operation.'},accessories:{heroAsset:o.default,heroPosition:'center 50%',heroSubtitle:'Mounting hardware, enclosures, and add-ons to get the most from your PurpleAir sensor.'},'replacement-parts':{heroAsset:s.default,heroPosition:'center 40%',heroSubtitle:'Keep your sensor running at peak performance with genuine PurpleAir replacement components.'}},h=[...t.FEATURED_STORE_CATEGORIES.map(e=>Object.assign({},e,p[e.slug]))],f=new Map(h.map(e=>[e.slug,e]))},631,[571,632,633,634,635]);
730__d(function(s,e,c,t,i,r,a){i.exports={uri:"/assets/src/assets/images/hero/store-accessories.954b7870cf09acf2214863d253c1bc46.jpg",width:3584,height:1184}},632,[]);
731__d(function(e,s,t,i,r,c,d){r.exports={uri:"/assets/src/assets/images/hero/store-power-supplies.dee2b68d67cf74f1e57cc706e864278d.jpg",width:1920,height:1278}},633,[]);
732__d(function(e,s,t,r,a,f,i){a.exports={uri:"/assets/src/assets/images/hero/store-replacement-parts.3883bf362c899b49a1e446db0ff259f3.jpg",width:1920,height:1280}},634,[]);
733__d(function(s,e,c,t,a,r,d){a.exports={uri:"/assets/src/assets/images/hero/store-sensors-landscape.19ab2d756c0187c62c5f190321c5d289.
733jpg",width:1920,height:1144}},635,[]);
734__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NavLink=function({link:e,isActiveLink:l,onNavigate:o,variant:k}){const c=u[k],{hovered:s,webHoverProps:O}=(0,v.useWebHover)(),R=l?c.linkActive:s?c.linkHover:void 0;return(0,T.jsx)(t.default,Object.assign({},O,{children:(0,T.jsx)(S.AppLink,{to:e.name,href:(0,A.getScreenPath)(e.name,e.params),style:[c.link,R],selected:l,onPress:()=>{o(e.name,e.params)},children:(0,T.jsx)(n.default,{style:[c.linkText,l&&c.linkTextActive],children:e.label})})}))},r(d[0]);var n=e(r(d[1])),t=e(r(d[2])),l=r(d[3]),o=r(d[4]),k=r(d[5]),c=r(d[6]),v=r(d[7]),S=r(d[8]),A=r(d[9]),T=r(d[10]);const s=(0,l.createStyles)({link:{borderRadius:4,marginHorizontal:k.SPACING.XS,paddingHorizontal:k.SPACING.LG,paddingVertical:k.SPACING.SM},linkActive:{backgroundColor:o.COLORS.BRAND_TINT_SUBTLE},linkHover:{backgroundColor:o.COLORS.BG_SUBTLE},linkText:{color:o.COLORS.TEXT_DIM,fontSize:c.FONT_SIZE.MD},linkTextActive:{color:o.COLORS.BRAND_PRIMARY,fontWeight:'600'}}),O=(0,l.createStyles)({link:{borderRadius:4,paddingHorizontal:k.SPACING.SM,paddingVertical:k.SPACING.SM},linkActive:{backgroundColor:o.COLORS.BRAND_TINT_SUBTLE},linkHover:{backgroundColor:o.COLORS.BG_SUBTLE},linkText:{color:o.COLORS.TEXT_SECONDARY,fontSize:c.FONT_SIZE.MD},linkTextActive:{color:o.COLORS.BRAND_PRIMARY,fontWeight:'600'}}),u={dropdown:{link:s.link,linkActive:s.linkActive,linkHover:s.linkHover,linkText:s.linkText,linkTextActive:s.linkTextActive},megaMenu:{link:O.link,linkActive:O.linkActive,linkHover:O.linkHover,linkText:O.linkText,linkTextActive:O.linkTextActive}}},636,[34,222,276,489,490,493,494,609,516,518,104]);
735__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HOVER_OPEN_DELAY_MS",{enumerable:!0,get:function(){return n}}),e.useHoverIntent=function(t={}){const[c,s]=(0,l.useState)(null),o=(0,l.useRef)(null),b=(0,l.useRef)(null),f=(0,l.useRef)(null),C=t.openDelayMs??n,_=t.closeDelayMs??u.DROPDOWN_CLOSE_DELAY_MS,k=(0,l.useCallback)(l=>{o.current=l,s(l)},[]),O=(0,l.useCallback)(()=>{null!==b.current&&(clearTimeout(b.current),b.current=null)},[]),D=(0,l.useCallback)(()=>{null!==f.current&&(clearTimeout(f.current),f.current=null)},[]);(0,l.useEffect)(()=>()=>{O(),D()},[O,D]);const E=(0,l.useCallback)(l=>{D(),O(),null===o.current?b.current=setTimeout(()=>{b.current=null,k(l)},C):k(l)},[k,D,O,C]),y=(0,l.useCallback)(()=>{O(),D(),f.current=setTimeout(()=>{f.current=null,k(null)},_)},[k,D,O,_]),M=(0,l.useCallback)(()=>{D()},[D]),R=(0,l.useCallback)(()=>{O(),D(),k(null)},[k,D,O]);return{openKey:c,enterTrigger:E,scheduleClose:y,cancelClose:M,closeNow:R}};var l=r(d[0]),u=r(d[1]);const n=200},637,[34,630]);
736__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useNavDismiss=function({isOpen:t,onDismiss:o,containerRef:s}){(0,n.useEffect)(()=>{if(!t)return;const n=n=>{'Escape'===n.key&&o()},c=n=>{const t=s.current,c=n.target;t instanceof Node&&c instanceof Node&&!t.contains(c)&&o()};return document.addEventListener('keydown',n),document.addEventListener('mousedown',c),()=>{document.removeEventListener('keydown',n),document.removeEventListener('mousedown',c)}},[t,o,s])};var n=r(d[0]);r(d[1])},638,[34,95]);
737__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.MobileMenu=function({maxHeight:e,isAuthenticated:c,userEmail:S,userRole:f,accountItems:O,currentRouteName:h,currentRouteParams:N,activeCategorySlug:b,visibleLinks:E,onNavigate:y,onLogout:P}){const _=e=>(0,T.isSubNavLinkActive)(h,N,b,e),j=(0,R.formatRole)(f),G=(f??'').trim().toUpperCase(),D=''!==G&&'USER'!==G,v=(0,R.getInitials)(S),M=(0,L.jsxs)(n.default,{testID:"mobile-menu-account",children:[(0,L.jsx)(o.default,{style:x.band,children:"Account"}),O.map(e=>{const t=h===e.screen;return(0,L.jsxs)(I.AppLink,{to:e.screen,style:[x.row,t?x.rowActive:null],selected:t,onPress:()=>{y(e.screen)},testID:`account-link-${e.screen}`,children:[(0,L.jsx)(o.default,{style:[x.rowLabel,t?x.rowLabelActive:null],children:e.label}),(0,L.jsx)(o.default,{style:x.chevron,children:p})]},e.screen)})]}),B=(0,L.jsx)(n.default,{testID:"mobile-menu-nav",children:A.NAV_CATEGORIES.map(e=>{const t=E(e.links);return 0===t.length?null:(0,L.jsxs)(n.default,{children:[(0,L.jsx)(o.default,{style:x.band,children:e.title}),t.map(e=>{const t=_(e);return(0,L.jsxs)(I.AppLink,{to:e.name,href:(0,C.getScreenPath)(e.name,e.params),style:[x.row,t?x.rowActive:null],selected:t,onPress:()=>{y(e.name,e.params)},testID:`nav-link-${e.name}`,children:[(0,L.jsx)(o.default,{style:[x.rowLabel,t?x.rowLabelActive:null],children:e.label}),(0,L.jsx)(o.default,{style:x.chevron,children:p})]},e.label)})]},e.title)})}),w=(0,L.jsx)(I.AppLink,{to:"Login",style:x.authButton,onPress:()=>{{const e=(0,u.currentPageHref)();if(''!==e)return void(0,u.assignPageUrl)((0,t.buildLoginHref)('/login',e))}y('Login')},children:(0,L.jsx)(o.default,{style:x.authButtonText,children:"Sign In"})});return(0,L.jsx)(s.default,{testID:"mobile-menu",style:[x.menu,{maxHeight:e}],contentContainerStyle:x.menuContent,children:(0,L.jsxs)(n.default,{style:x.root,children:[c?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(n.default,{style:x.identity,children:[(0,L.jsx)(n.default,{style:x.avatar,children:(0,L.jsx)(o.default,{style:x.avatarText,children:v})}),(0,L.jsxs)(n.default,{style:x.identityText,children:[null!=S&&(0,L.jsx)(o.default,{style:x.email,numberOfLines:1,ellipsizeMode:"middle",children:S}),D&&(0,L.jsx)(o.default,{testID:"mobile-menu-role",style:x.roleText,children:j})]})]}
737),M,(0,L.jsx)(l.default,{onPress:P,style:x.quietSignOut,accessibilityRole:"button",children:(0,L.jsx)(o.default,{style:x.quietSignOutText,children:"Sign Out"})})]}):w,B]})})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=e(r(d[5]));r(d[6]);var c=r(d[7]),u=r(d[8]),S=r(d[9]),f=r(d[10]),O=r(d[11]),h=r(d[12]),R=r(d[13]),I=r(d[14]),C=r(d[15]),A=r(d[16]),T=r(d[17]),L=r(d[18]);const p='\u203a';const x=(0,c.createStyles)({menu:Object.assign({backgroundColor:S.COLORS.BG_SURFACE,borderBottomColor:S.COLORS.BORDER,borderBottomWidth:1,left:0,position:'absolute',right:0,top:'100%'},f.ELEVATION.RAISED),menuContent:{paddingBottom:O.SPACING.MD},root:{paddingTop:O.SPACING.XS},identity:{alignItems:'center',flexDirection:'row',gap:O.SPACING.MD,paddingBottom:O.SPACING.MD,paddingHorizontal:O.SPACING.LG,paddingTop:O.SPACING.SM},identityText:{flex:1,gap:2,minWidth:0},avatar:{alignItems:'center',backgroundColor:S.COLORS.BRAND_PRIMARY,borderRadius:22,height:44,justifyContent:'center',width:44},avatarText:{color:S.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.LG,fontWeight:'700'},email:{color:S.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.LG,fontWeight:'600'},roleText:{color:S.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.SM},band:{backgroundColor:S.COLORS.BG_SUBTLE_100,color:S.COLORS.TEXT_SECONDARY,fontSize:h.FONT_SIZE.XS,fontWeight:'700',letterSpacing:1,paddingBottom:O.SPACING.SM,paddingHorizontal:O.SPACING.LG,paddingTop:O.SPACING.LG,textTransform:'uppercase'},row:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',paddingHorizontal:O.SPACING.LG,paddingVertical:O.SPACING.MD},rowActive:{backgroundColor:S.COLORS.BRAND_TINT},rowLabel:{color:S.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.LG,fontWeight:'500'},rowLabelActive:{color:S.COLORS.BRAND_PRIMARY_DARK},chevron:{color:S.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XL},authButton:{alignItems:'center',backgroundColor:S.COLORS.BRAND_PRIMARY,borderRadius:8,marginHorizontal:O.SPACING.MD,marginTop:O.SPACING.SM,paddingVertical:O.SPACING.MD},authButtonText:{color:S.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.LG,fontWeight:'600'},quietSignOut:{paddingHorizontal:O.SPACING.LG,paddingVertical:O.SPACING.MD},quietSignOutText:{color:S.COLORS.ERROR,fontSize:h.FONT_SIZE.MD,fontWeight:'600'}})},639,[571,34,276,222,488,283,95,489,640,490,503,493,494,641,516,518,630,642,104]);
738__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.currentPageHref=function(){return window.location.href},e.currentPageSearch=function(){return window.location.search},e.assignPageUrl=function(n){window.location.assign(n)}},640,[]);
739__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"getInitials",{enumerable:!0,get:function(){return t.getInitials}}),e.formatRole=function(t){if(null==t||''===t)return'User';return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()};var t=r(d[0])},641,[571]);
740__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isSubNavLinkActive=function(t,n,o,u){if(t===u.name)return!u.params||'StoreCategory'!==u.name||n?.category===u.params.category;if('Product'===t&&null!=o&&'StoreCategory'===u.name&&u.params?.category===o)return!0;return!1}},642,[]);
741__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SearchOverlay=function({visible:e,onClose:t}){return(0,x.jsx)(o.default,{visible:e,transparent:!0,animationType:"fade",onRequestClose:t,children:e&&(0,x.jsx)(P,{onClose:t})})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),n=e(r(d[4])),c=e(r(d[5])),u=e(r(d[6])),S=e(r(d[7])),h=e(r(d[8])),C=r(d[9]),p=r(d[10]),f=r(d[11]),y=r(d[12]),I=r(d[13]),T=r(d[14]),R=r(d[15]),A=r(d[16]),O=r(d[17]),b=r(d[18]),x=r(d[19]);const D=2,E=500;function N(e,t){return e.length<D?'idle':t?.query!==e?'loading':null===t.results?'error':'done'}function P({onClose:e}){const o=(0,R.useAppLinkTo)(),[C,y]=(0,t.useState)(''),[I,T]=(0,t.useState)(null),P=(0,t.useRef)(0),G=C.trim(),M=N(G,I),_=(0,t.useCallback)(()=>{e(),o((0,O.buildSearchPath)({q:G}))},[o,e,G]),v=(0,t.useCallback)(async(e,t,l)=>{try{const o=await p.searchApi.query(e,{signal:l});t===P.current&&T({query:e,results:o})}catch(o){if(l.aborted)return;t===P.current&&(A.logger.error('Federated search failed',o),T({query:e,results:null}))}},[]);(0,t.useEffect)(()=>
741{if(G.length<D)return;const e=++P.current,t=new AbortController,l=setTimeout(()=>{v(G,e,t.signal)},E);return()=>{clearTimeout(l),t.abort()}},[G,v]);const j=null!=I?.results&&'done'===M?I.results.groups:[];return(0,x.jsx)(s.default,{style:L.backdrop,accessibilityLabel:"Dismiss search",onPress:e,testID:"search-overlay-backdrop",children:(0,x.jsxs)(s.default,{style:L.panel,testID:"search-overlay-panel",children:[(0,x.jsxs)(h.default,{style:L.searchRow,children:[(0,x.jsx)(u.default,{style:L.input,value:C,onChangeText:y,placeholder:"Search PurpleAir",placeholderTextColor:f.COLORS.TEXT_MUTED,autoFocus:!0,autoCorrect:!1,autoCapitalize:"none",returnKeyType:"search",onSubmitEditing:_,accessibilityLabel:"Search query",testID:"search-overlay-input"}),(0,x.jsx)(S.default,{style:L.closeButton,onPress:e,accessibilityRole:"button",accessibilityLabel:"Close search",testID:"search-overlay-close",children:(0,x.jsx)(c.default,{style:L.closeButtonText,children:"Close"})})]}),(0,x.jsxs)(n.default,{style:L.results,contentContainerStyle:L.resultsContent,keyboardShouldPersistTaps:"handled",testID:"search-overlay-results",children:[G.length<D&&(0,x.jsx)(c.default,{style:L.message,children:"Type at least two characters to search."}),G.length>=D&&'loading'===M&&(0,x.jsxs)(h.default,{style:L.loadingRow,children:[(0,x.jsx)(l.default,{color:f.COLORS.BRAND_PRIMARY}),(0,x.jsx)(c.default,{style:L.messageInline,children:"Searching\u2026"})]}),'error'===M&&(0,x.jsx)(c.default,{style:L.message,children:"Search is unavailable right now. Please try again."}),'done'===M&&0===j.length&&(0,x.jsx)(c.default,{style:L.message,children:`No results for \u201c${G}\u201d.`}),'done'===M&&j.length>0&&(0,x.jsx)(b.SearchResultList,{groups:j,onNavigate:e,previewItemCount:b.SEARCH_RESULT_PREVIEW_COUNT}),(0,x.jsx)(S.default,{style:L.advancedButton,onPress:_,accessibilityRole:"button",accessibilityLabel:"Advanced search",testID:"search-overlay-advanced",children:(0,x.jsx)(c.default,{style:L.advancedButtonText,children:"Advanced search"})})]})]})})}const L=(0,C.createStyles)({advancedButton:{borderTopColor:f.COLORS.BORDER_DEFAULT,borderTopWidth:1,marginTop:I.SPACING.SM,paddingHorizontal:I.SPACING.LG,paddingVertical:I.SPACING.MD},advancedButtonText:{color:f.COLORS.BRAND_PRIMARY,fontSize:T.FONT_SIZE.MD,fontWeight:'600'},backdrop:{alignItems:'center',backgroundColor:f.COLORS.OVERLAY_DARK,flex:1,paddingHorizontal:I.SPACING.LG,paddingTop:I.SPACING.HERO},closeButton:{paddingHorizontal:I.SPACING.MD,paddingVertical:I.SPACING.SM},closeButtonText:{color:f.COLORS.TEXT_SECONDARY,fontSize:T.FONT_SIZE.MD,fontWeight:'600'},input:{color:f.COLORS.TEXT_HEADING,flex:1,fontSize:T.FONT_SIZE.LG,paddingVertical:I.SPACING.SM},loadingRow:{alignItems:'center',flexDirection:'row',gap:I.SPACING.SM,paddingHorizontal:I.SPACING.LG,paddingVertical:I.SPACING.MD},message:{color:f.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.MD,paddingHorizontal:I.SPACING.LG,paddingVertical:I.SPACING.MD},messageInline:{color:f.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.MD},panel:Object.assign({backgroundColor:f.COLORS.BG_SURFACE,borderRadius:12,maxHeight:'80%',maxWidth:640,overflow:'hidden',width:'100%'},y.ELEVATION.MEDIUM),results:{flexGrow:0},resultsContent:{paddingBottom:I.SPACING.SM,paddingTop:I.SPACING.SM},searchRow:{alignItems:'center',borderBottomColor:f.COLORS.BORDER_DEFAULT,borderBottomWidth:1,flexDirection:'row',gap:I.SPACING.SM,paddingHorizontal:I.SPACING.LG,paddingVertical:I.SPACING.MD}})},643,[34,410,544,369,283,222,394,488,276,489,644,490,503,493,494,505,469,645,646,104]);
742__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"searchApi",{enumerable:!0,get:function(){return n}});var s=r(d[0]);const n={query:async(n,t)=>s.search.federatedSearch(Object.assign({query:Object.assign({q:n},null!=t?.limit?{limit:t.limit}:{},null!=t?.sources&&t.sources.length>0?{sources:[...t.sources]}:{})},null!=t?.signal?{signal:t.signal}:{}))}},644,[471]);
743__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ALL_SEARCH_SOURCES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SEARCH_SOURCE_LABELS",{enumerable:!0,get:function(){return t}}),e.buildSearchPath=function(n={}){const t=[],o=n.q?.trim()??'';o.length>0&&t.push(`q=${encodeURIComponent(o)}`);const c=n.sources;null!=c&&c.length>0&&!u(c)&&t.push(`sources=${encodeURIComponent(c.join(','))}`);return t.length>0?`/search?${t.join('&')}`:'/search'},e.parseSearchSources=function(t){if(null==t||''===t.trim())return[...n];const u=[];for(const n of t.split(',')){const t=o(n.trim().toUpperCase());null==t||u.includes(t)||u.push(t)}return u.length>0?u:[...n]};const n=['PRODUCT','COMMUNITY','BLOG','PRESS'],t={PRODUCT:'Store',COMMUNITY:'Community',BLOG:'Blog',PRESS:'Press'};function o(t){for(const o of n)if(o===t)return o;return null}function u(t){return n.every(n=>t.includes(n))&&t.length===n.length}},645,[]);
744__d(function(g,r,i,a,m,_e,d){"use strict";
744function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SEARCH_RESULT_PREVIEW_COUNT",{enumerable:!0,get:function(){return N}}),_e.SearchResultList=function({groups:e,onNavigate:t,previewItemCount:n=null}){return(0,f.jsx)(s.default,{testID:"search-result-list",children:e.map(e=>(0,f.jsx)(T,{group:e,onNavigate:t,previewItemCount:n},e.type))})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),s=e(r(d[3])),o=r(d[4]),u=r(d[5]),c=r(d[6]),p=r(d[7]),S=r(d[8]),I=r(d[9]),f=r(d[10]);const N=3;function T({group:e,onNavigate:o,previewItemCount:u}){const[c,p]=(0,t.useState)(!1),S=u??Number.POSITIVE_INFINITY,I=e.items.length-S,N=c||I<=0?e.items:e.items.slice(0,S);return(0,f.jsxs)(s.default,{style:x.group,testID:`search-group-${e.type}`,children:[(0,f.jsx)(n.default,{style:x.groupHeading,children:e.label}),N.map(e=>(0,f.jsx)(h,{item:e,onNavigate:o},e.url)),I>0&&!c&&(0,f.jsx)(l.default,{style:x.expandButton,onPress:()=>{p(!0)},accessibilityRole:"button",accessibilityLabel:`Show ${String(I)} more`,children:(0,f.jsx)(n.default,{style:x.expandButtonText,children:`Show ${String(I)} more`})})]})}function h({item:e,onNavigate:t}){const l=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(n.default,{style:x.resultTitle,children:e.title}),null!=e.snippet&&''!==e.snippet&&(0,f.jsx)(n.default,{style:x.resultSnippet,numberOfLines:2,children:e.snippet})]});if((0,S.isInternalPath)(e.url))return(0,f.jsx)(S.AppLink,Object.assign({href:e.url,style:x.result,accessibilityLabel:e.title},null!=t?{onPress:t}:{},{children:l}));const s=(0,I.readExternalUrlLinkProps)(e.url);return null===s?null:(0,f.jsx)(I.ExternalLink,Object.assign({},s,{style:x.result,accessibilityLabel:e.title},null!=t?{onPress:t}:{},{children:l}))}const x=(0,o.createStyles)({expandButton:{paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.SM},expandButtonText:{color:u.COLORS.ACTION_PRIMARY,fontSize:p.FONT_SIZE.SM,fontWeight:'600'},group:{marginTop:c.SPACING.SM,paddingBottom:c.SPACING.SM},groupHeading:{color:u.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.5,paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.XS,textTransform:'uppercase'},result:{paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.SM},resultSnippet:{color:u.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM,marginTop:c.SPACING.MICRO},resultTitle:{color:u.COLORS.BRAND_PRIMARY,fontSize:p.FONT_SIZE.MD,fontWeight:'600'}})},646,[34,222,488,276,489,490,493,494,516,519,104]);
745__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubNav=function({currentRouteName:e,currentRouteParams:l,activeCategorySlug:c,visibleLinks:s,onNavigate:u}){const S=(()=>{const t=C.NAV_CATEGORIES.find(t=>t.links.some(t=>{return n=t.name,e===n;var n}));return null!=t?t:b.includes(e)?C.NAV_CATEGORIES.find(e=>'Store'===e.title)??null:null})();if(!S)return null;const _=s(S.links).map(t=>{const o=(0,O.isSubNavLinkActive)(e,l,c,t);return(0,f.jsx)(A.AppLink,{to:t.name,href:(0,R.getScreenPath)(t.name,t.params),style:[N.link,o&&N.linkActive],selected:o,onPress:()=>{u(t.name,t.params)},children:(0,f.jsx)(n.default,{style:[N.linkText,o&&N.linkTextActive],children:t.label})},t.label)});return(0,f.jsx)(t.default,{style:N.bar,children:(0,f.jsx)(o.default,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:N.barInner,children:_})})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),c=r(d[5]),s=r(d[6]),u=r(d[7]),S=r(d[8]),A=r(d[9]),R=r(d[10]),C=r(d[11]),O=r(d[12]),f=r(d[13]);const b=['Product','Cart'];const N=(0,l.createStyles)({bar:Object.assign({backgroundColor:c.COLORS.BG_SURFACE,borderBottomColor:c.COLORS.BG_WARM_BORDER,borderBottomWidth:1},s.ELEVATION.SUBTLE),barInner:{alignItems:'center',flexDirection:'row',flexGrow:1,gap:u.SPACING.XS,justifyContent:'center',paddingHorizontal:u.SPACING.LG},link:{borderBottomColor:c.COLORS.TRANSPARENT,borderBottomWidth:2,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.MD},linkActive:{borderBottomColor:c.COLORS.BRAND_PRIMARY},linkText:{color:c.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.SM,fontWeight:'500'},linkTextActive:{color:c.COLORS.BRAND_PRIMARY,fontWeight:'600'}})},647,[34,276,222,283,489,490,503,493,494,516,518,630,642,104]);
746__d(function(g,r,i,a,m,_e,d){"use strict";
746function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.UserMenu=function({items:e,onNavigate:t,onLogout:c}){const[O,S]=(0,n.useState)(!1),{user:v}=(0,x.useAuth)(),f=()=>{S(!1)},I=e=>{f(),t(e)};return(0,R.jsxs)(s.default,{style:p.container,children:[(0,R.jsx)(l.default,{onPress:()=>{S(!O)},style:p.avatarButton,children:null!=v?.pictureUrl&&''!==v.pictureUrl?(0,R.jsx)(u.default,{source:{uri:v.pictureUrl},style:p.avatarImage}):(0,R.jsx)(s.default,{style:p.avatar,children:(0,R.jsx)(o.default,{style:p.avatarText,children:(0,A.getInitials)(v?.email)})})}),O&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(l.default,{style:p.backdrop,onPress:f,activeOpacity:1}),(0,R.jsxs)(s.default,{style:p.dropdown,children:[(0,R.jsx)(o.default,{style:p.emailText,children:v?.email}),(0,R.jsx)(s.default,{style:p.divider}),e.map(e=>(0,R.jsx)(j,{item:e,onSelect:I},e.screen)),(0,R.jsx)(s.default,{style:p.divider}),(0,R.jsx)(T,{onPress:()=>{f(),c()}})]})]})]})};var t=r(d[0]),n=r(d[1]),s=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4]));r(d[5]);var u=e(r(d[6])),c=r(d[7]),x=r(d[8]),O=r(d[9]),S=r(d[10]),v=r(d[11]),f=r(d[12]),I=r(d[13]),A=r(d[14]),h=r(d[15]),R=r(d[16]);function j({item:e,onSelect:t}){const{hovered:n,webHoverProps:l}=(0,I.useWebHover)();return(0,R.jsx)(h.AppLink,{to:e.screen,onPress:()=>{t(e.screen)},children:(0,R.jsx)(s.default,Object.assign({style:[p.menuItem,n?p.menuItemHovered:null],testID:`user-menu-item-${e.screen}`},l,{children:(0,R.jsx)(o.default,{style:p.menuItemText,children:e.label})}))})}function T({onPress:e}){const{hovered:t,webHoverProps:n}=(0,I.useWebHover)();return(0,R.jsx)(s.default,Object.assign({},n,{children:(0,R.jsx)(l.default,{onPress:e,style:[p.menuItem,t?p.menuItemHovered:null],testID:"user-menu-sign-out",children:(0,R.jsx)(o.default,{style:p.menuItemText,children:"Sign Out"})})}))}const p=(0,c.createStyles)({avatar:{alignItems:'center',backgroundColor:O.COLORS.BRAND_PRIMARY_DARK,borderRadius:t.FRAME_LAYOUT.avatarSizePx/2,height:t.FRAME_LAYOUT.avatarSizePx,justifyContent:'center',width:t.FRAME_LAYOUT.avatarSizePx},avatarButton:{padding:t.FRAME_LAYOUT.avatarButtonPaddingPx},avatarImage:{borderRadius:t.FRAME_LAYOUT.avatarSizePx/2,height:t.FRAME_LAYOUT.avatarSizePx,width:t.FRAME_LAYOUT.avatarSizePx},avatarText:{color:O.COLORS.TEXT_INVERSE,fontSize:t.FRAME_LAYOUT.avatarFontSizePx,fontWeight:'600'},backdrop:Object.assign({},{position:'fixed',top:0,left:0,right:0,bottom:0,zIndex:9998}),container:{position:'relative',zIndex:9999},divider:{backgroundColor:O.COLORS.BORDER_LIGHT,height:1,marginHorizontal:v.SPACING.MD},dropdown:Object.assign({backgroundColor:O.COLORS.BG_SURFACE,borderRadius:8,overflow:'hidden',minWidth:200,position:'absolute',right:0,top:44,zIndex:9999},S.ELEVATION.RAISED),emailText:Object.assign({color:O.COLORS.TEXT_SOFT,fontSize:f.FONT_SIZE.SM,padding:v.SPACING.MD,paddingBottom:v.SPACING.SM},{wordBreak:'break-all'}),menuItem:Object.assign({alignItems:'center',flexDirection:'row',gap:v.SPACING.MD,padding:v.SPACING.MD},{cursor:'pointer'}),menuItemHovered:{backgroundColor:O.COLORS.BG_SUBTLE_100},menuItemText:{color:O.COLORS.TEXT_DARK,fontSize:f.FONT_SIZE.MD}})},648,[571,34,276,222,488,95,328,489,411,490,503,493,494,609,641,516,104]);
747__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.hasWebTouchInput=s,_e.nextTouchLayoutCompensation=c,_e.useTouchLayoutCompensation=function(t,o,f){const l=s(),v=(0,n.useMemo)(()=>new u.default.Value(0),[]),p=(0,n.useRef)(t);return(0,n.useLayoutEffect)(()=>{const n=p.current!==t;if(p.current=t,l)return f?(v.stopAnimation(),void v.setValue(0)):void(!n||o<=0||v.stopAnimation(n=>{v.setValue(c(n,t,o)),u.default.timing(v,{duration:e.FRAME_INTERACTION.headerTransitionDurationMs,toValue:0,useNativeDriver:!1}).start()}))},[o,t,f,l,v]),l?{transform:[{translateY:v}]}:void 0};var t,e=r(d[0]),n=r(d[1]),o=r(d[2]),u=(t=o)&&t.__esModule?t:{default:t};function s(){return'undefined'!=typeof navigator&&navigator.maxTouchPoints>0}function c(t,e,n){return t+(e?n:-n)}r(d[3])},649,[571,34,271,95]);
748__d(function(g,r,i,a,m,e,d){"use strict";
748Object.defineProperty(e,'__esModule',{value:!0}),e.DevMenuActionProvider=function({children:t}){return(0,n.jsx)(n.Fragment,{children:t})},r(d[0]);var n=r(d[1])},650,[34,104]);
749__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ErrorBoundary=function({children:e,fallback:n,onError:o,resetPolicy:l,boundaryId:s="universal-app",title:c="Something went wrong",description:u="An unexpected error occurred. Please try again.",resetLabel:y="Try Again",resetKeys:S}){(0,t.assertValidResetPolicy)(l,`error boundary "${s}"`);const b=(A={description:u,fallback:n,resetPolicy:l,resetLabel:y,title:c},function({normalizedError:e,resetBoundary:t}){return null!=A.fallback?A.fallback:(0,L.jsx)(O,Object.assign({description:A.description,errorMessage:e.error.message,resetLabel:A.resetLabel,title:A.title},'no-reset'===A.resetPolicy.kind?{}:{resetAction:t}))});var A;return(0,L.jsx)(t.PurpleAirErrorBoundary,{boundaryId:s,resetKeys:S,onError:e=>{null!=o?o(e):f.logger.error('ErrorBoundary caught an error:',e.normalizedError.error,e.componentStack)},onReset:'reset-with-cleanup'===l.kind?l.onReset:void 0,fallbackRender:b,children:e})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),y=r(d[8]),S=r(d[9]),f=r(d[10]),L=r(d[11]);function O({description:e,errorMessage:t,resetAction:s,resetLabel:c,title:u}){return(0,L.jsxs)(n.default,{style:b.container,children:[(0,L.jsx)(o.default,{style:b.title,children:u}),(0,L.jsx)(o.default,{style:b.message,children:e}),S.IS_DEVELOPMENT_BUILD&&(0,L.jsx)(o.default,{style:b.errorDetail,children:t}),null!=s&&(0,L.jsx)(l.default,{style:b.retryButton,onPress:s,accessibilityRole:"button",accessibilityLabel:c,children:(0,L.jsx)(o.default,{style:b.retryButtonText,children:c})})]})}const b=(0,s.createStyles)({container:{alignItems:'center',backgroundColor:c.COLORS.BG_SUBTLE,flex:1,justifyContent:'center',padding:u.SPACING.XXXL},errorDetail:{color:c.COLORS.TEXT_MUTED,fontFamily:y.FONT_FAMILY.MONOSPACE,fontSize:y.FONT_SIZE.XS,marginBottom:u.SPACING.XXL,paddingHorizontal:u.SPACING.LG,textAlign:'center'},message:{color:c.COLORS.TEXT_SECONDARY,fontSize:y.FONT_SIZE.LG,lineHeight:24,marginBottom:u.SPACING.XXL,textAlign:'center'},retryButton:{backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:u.SPACING.XXXL,paddingVertical:u.SPACING.MD},retryButtonText:{color:c.COLORS.BG_SURFACE,fontSize:y.FONT_SIZE.LG,fontWeight:'600'},title:{color:c.COLORS.TEXT_PRIMARY,fontSize:y.FONT_SIZE.XXXL,fontWeight:'700',marginBottom:u.SPACING.MD,textAlign:'center'}})},651,[97,34,276,222,488,489,490,493,494,508,469,104]);
750__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.loadScreenBoundaryDevTools=function(){return null},e.loadEmailPreviewDevRoute=function(){return null},e.loadLocalTestingDevRoute=function(){return null},e.loadOrderOutreachScenariosDevRoute=function(){return null},e.loadPwaManifestEvaluatorDevRoute=function(){return null}},652,[614,614,614,614,614]);
751__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.withRouteGuard=function(e,s){if('public'===s)return e;function p(p){const{isAuthenticated:y,isAdmin:S,user:h,isLoading:P}=(0,l.useAuth)(),_=(0,f.useLoginReturnPolicy)(),x=(0,R.useAppNavigation)(),E='SUPER_OWNER'===h?.role,N='anonymous'===s,O=!P&&(N?y:!y);if((0,t.useEffect)(()=>{if(O){if(N){const e=(0,n.readLoginReturnFromSearch)((0,c.currentPageSearch)());if(null!=e){const t=(0,c.currentPageHref)(),o=(0,n.resolveLoginReturn)(e,t,[]);if(null!=o)return void(0,c.assignPageUrl)(o);if('loading'===_.kind)return;if('ready'===_.kind){const o=(0,n.resolveLoginReturn)(e,t,_.trustedOrigins);if(null!=o)return void(0,c.assignPageUrl)(o)}}return void x.reset({index:0,routes:[{name:'MyAccount'}]})}{const e=(0,c.currentPageHref)();if(''!==e)return void(0,c.assignPageUrl)((0,n.buildLoginHref)('/login',e))}x.reset({index:0,routes:[{name:'Login'}]})}},[O,N,x,_]),P||O)return null;if(N)return(0,t.createElement)(e,p);return'admin'===s&&!S||'super_owner'===s&&!E?(0,v.jsxs)(o.default,{style:L.container,children:[(0,v.jsx)(u.default,{style:L.errorText,children:"Access Denied"}),(0,v.jsx)(u.default,{style:L.subText,children:"You do not have permission to view this page."})]}):(0,t.createElement)(e,p)}const y=null!=e.displayName&&''!==e.displayName?e.displayName:''!==e.name?e.name:'Component';return p.displayName=`RouteGuard[${s}](${y})`,p};var n=r(d[0]),t=r(d[1]);r(d[2]);var o=e(r(d[3])),u=e(r(d[4])),s=r(d[5]),l=r(d[6]),c=r(d[7]),f=r(d[8]),p=r(d[9]),y=r(d[10]),S=r(d[11]),R=r(d[12]),v=r(d[13]);const L=(0,s.createStyles)({container:{alignItems:'center',flex:1,justifyContent:'center',padding:y.SPACING.XL},errorText:{color:p.COLORS.ERROR,fontSize:S.FONT_SIZE.XL,fontWeight:'bold'},subText:{color:p.COLORS.TEXT_SLATE,fontSize:S.FONT_SIZE.MD,marginTop:y.SPACING.SM}})},653,[571,34,95,276,222,489,411,640,524,490,493,494,505,104]);
752__d(function(g,r,i,a,m,e,d){"use strict";
752Object.defineProperty(e,'__esModule',{value:!0}),e.ScreenBoundaryDevTools=function({boundaryId:n,screenName:u}){return null};r(d[0]),r(d[1]),r(d[2])},654,[34,652,104]);
753__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.UpdateBanner=function(){const{updateAvailable:e,latestVersion:s}=(0,N.useVersionCheck)(),[c,u]=(0,t.useState)(null),_=(0,t.useCallback)(()=>{window.location.reload()},[]),O=(0,t.useCallback)(()=>{u(s)},[s]),S=c===s;if(!e||S)return null;return(0,R.jsxs)(l.default,{style:f.banner,children:[(0,R.jsx)(n.default,{style:f.message,children:"A new version is available."}),(0,R.jsxs)(l.default,{style:f.actions,children:[(0,R.jsx)(o.default,{onPress:_,style:f.reloadButton,children:(0,R.jsx)(n.default,{style:f.reloadText,children:"Reload"})}),(0,R.jsx)(o.default,{onPress:O,style:f.dismissButton,children:(0,R.jsx)(n.default,{style:f.dismissText,children:"Dismiss"})})]})]})};var t=r(d[0]);r(d[1]);var o=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),N=r(d[8]),R=r(d[9]);const f=(0,s.createStyles)({actions:{alignItems:'center',flexDirection:'row',gap:10},banner:{alignItems:'center',backgroundColor:c.COLORS.WARNING_BANNER_BG,borderBottomColor:c.COLORS.WARNING_BANNER_BORDER,borderBottomWidth:1,flexDirection:'row',justifyContent:'center',paddingHorizontal:16,paddingVertical:10},dismissButton:{borderColor:c.COLORS.AMBER_700,borderRadius:6,borderWidth:1,paddingHorizontal:12,paddingVertical:5},dismissText:{color:c.COLORS.WARNING_BANNER_TEXT,fontSize:u.FONT_SIZE.SM,fontWeight:'600'},message:{color:c.COLORS.WARNING_BANNER_TEXT,flex:1,fontSize:u.FONT_SIZE.MD,fontWeight:'600'},reloadButton:{backgroundColor:c.COLORS.WARNING_BANNER_LINK,borderRadius:6,paddingHorizontal:14,paddingVertical:5},reloadText:{color:c.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.SM,fontWeight:'700'}})},655,[34,95,369,222,276,489,490,494,656,104]);
754__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useVersionCheck=function(){const f=(0,n.useMemo)(()=>(0,s.loadVersionPollDevOverride)(),[]),[I,V]=(0,n.useState)(t.BUILD_VERSION),v=(0,n.useRef)(t.BUILD_VERSION),b=(0,n.useRef)(t.BUILD_VERSION);(0,n.useEffect)(()=>{(0,o.isUnpollableWebDeploy)({platformOS:"web",buildVersion:t.BUILD_VERSION,hostname:'undefined'==typeof window?null:window.location.hostname})&&l.logger.error((0,o.unpollableWebDeployMessage)(t.BUILD_VERSION))},[]),(0,n.useEffect)(()=>{if(!(0,o.isPollableBuildVersion)(t.BUILD_VERSION))return;const n={value:!1},l=()=>{if(n.value)return;const o=v.current,t=f?f.applyToPolledVersion(o)??o:o;''!==t&&t!==b.current&&(b.current=t,V(t))},s=async()=>{try{const n=await fetch('/version.json',{cache:'no-store'});if(!n.ok)return;const o=c(await n.json());null!==o&&''!==o&&(v.current=o)}catch{}finally{l()}};s();const I=setInterval(()=>{s()},u),_=f?.subscribe(l);return()=>{n.value=!0,clearInterval(I),_?.()}},[f]);const _=(0,o.isPollableBuildVersion)(t.BUILD_VERSION)&&I!==t.BUILD_VERSION;return(0,n.useEffect)(()=>{_&&l.logger.info(`Update available: ${I} (current: ${t.BUILD_VERSION}).`)},[_,I]),{updateAvailable:_,currentVersion:t.BUILD_VERSION,latestVersion:I}};var n=r(d[0]);r(d[1]);var o=r(d[2]),t=r(d[3]),l=r(d[4]),s=r(d[5]);const u=3e5;function c(n){if('object'!=typeof n||null===n||!('version'in n))return null;const{version:o}=n;return'string'==typeof o?o:null}},656,[34,95,657,465,469,658]);
755__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NON_POLLABLE_BUILD_VERSIONS",{enumerable:!0,get:function(){return l}}),e.isPollableBuildVersion=t,e.unpollableWebDeployMessage=function(n){return`Deployed web build reports BUILD_VERSION="${n}", a non-pollable sentinel: EXPO_PUBLIC_BUILD_VERSION was not inlined at build time, so update polling is disabled and users on stale tabs will never be prompted to reload. Verify the build pipeline inlines EXPO_PUBLIC_* env vars (see src/config/env.ts).`},e.isUnpollableWebDeploy=function(l){const{platformOS:o,buildVersion:s,hostname:u}=l;if('web'!==o||t(s)||null===u)return!1;return!n.has(u)};const n=new Set(['localhost','127.0.0.1','::1','']),l=new Set(['dev','unknown']);function t(n){return!l.has(n)}},657,[]);
756__d(function(g,r,i,a,m,e,d){"use strict";
756Object.defineProperty(e,'__esModule',{value:!0}),e.loadVersionPollDevOverride=function(){return null}},658,[614]);
757__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readNextChunkFailureArmed=function(){return u.IS_DEVELOPMENT_BUILD&&t},e.setNextChunkFailureArmed=function(n){if(!u.IS_DEVELOPMENT_BUILD)return;t=n,l()},e.consumeNextChunkFailure=_,e.simulateChunkFailureIfArmed=async function(n,u){if(!_())return u();return new Promise((u,t)=>{setTimeout(()=>{t(new Error(`Simulated stale chunk failure for "${n}" (dev)`))},0)})},e.readChunkReloadMax=function(){if(!u.IS_DEVELOPMENT_BUILD||null===E)return n.DEFAULT_CHUNK_RELOAD_MAX;return E},e.readChunkReloadMaxOverride=function(){return u.IS_DEVELOPMENT_BUILD?E:null},e.setChunkReloadMaxOverride=function(n){if(!u.IS_DEVELOPMENT_BUILD)return;E=n,l()},e.subscribeChunkLoadDevOverride=function(n){if(!u.IS_DEVELOPMENT_BUILD)return()=>{};return o.add(n),()=>{o.delete(n)}};var n=r(d[0]),u=r(d[1]);let t=!1,E=null;const o=new Set;function l(){o.forEach(n=>{n()})}function _(){return!(!u.IS_DEVELOPMENT_BUILD||!t)&&(t=!1,l(),!0)}},659,[660,508]);
758__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CHUNK_RELOAD_KEY_PREFIX",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"DEFAULT_CHUNK_RELOAD_MAX",{enumerable:!0,get:function(){return n}}),e.loadChunkWithReload=async function(o,u,c,s=n){const l=`${t}${o}`;try{const t=await u();return c.removeItem(l),t}catch(t){const n=Number.parseInt(c.getItem(l)??'0',10),o=Number.isNaN(n)?0:n;if(o>=s)throw t;return c.setItem(l,String(o+1)),c.reload(),new Promise(()=>{})}},e.clearChunkReloadGuards=function(n){const o=[];for(let u=0;u<n.length;u+=1){const c=n.key(u);!0===c?.startsWith(t)&&o.push(c)}return o.forEach(t=>{n.removeItem(t)}),o.length};const t='chunk-reload:',n=1},660,[]);
759__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CookieConsentBanner=function(){const{bannerVisible:e,consent:y,acceptAll:C,rejectAll:f,updatePreferences:O,syncNoticeVisible:h,showBanner:R,dismissSyncNotice:E}=(0,b.useCookieConsent)(),[T,N]=(0,s.useState)(!1),[I,A]=(0,s.useState)({preferences:y.preferences,analytics:y.analytics,marketing:y.marketing}),j=(0,s.useCallback)(()=>{A({preferences:y.preferences,analytics:y.analytics,marketing:y.marketing}),N(!0)},[y]),_=(0,s.useCallback)(()=>{O(I),N(!1)},[I,O]),L=(0,s.useCallback)(()=>{C(),N(!1)},[C]),D=(0,s.useCallback)(()=>{f(),N(!1)},[f]),P=(0,s.useCallback)((e,t)=>{A(s=>Object.assign({},s,{[e]:t}))},[]),k={primary:{button:p.primaryButton,text:p.primaryButtonText},secondary:{button:p.secondaryButton,text:p.secondaryButtonText},ghost:{button:p.ghostButton,text:p.ghostButtonText}},G={'accept-all':{onPress:L,accessibilityLabel:'Accept all cookies',testID:'cookie-accept-all'},'reject-all':{onPress:D,accessibilityLabel:'Reject all optional cookies',testID:void 0},customize:{onPress:j,accessibilityLabel:'Customize cookie preferences',testID:void 0},save:{onPress:_,accessibilityLabel:'Save cookie preferences',testID:void 0}},B=e=>{const t=k[e.role],s=G[e.action];return(0,x.jsx)(o.default,{style:t.button,onPress:s.onPress,accessibilityRole:"button",accessibilityLabel:s.accessibilityLabel,testID:s.testID,children:(0,x.jsx)(n.default,{style:t.text,children:e.label})},e.action)},w=[p.wrapper,{position:'fixed',bottom:0,left:0,right:0,zIndex:9999}];if(!e)return h?(0,x.jsx)(l.default,{style:w,children:(0,x.jsxs)(l.default,{style:[p.card,p.noticeCard],testID:"cookie-sync-notice",children:[(0,x.jsxs)(l.default,{style:p.textBlock,children:[(0,x.jsx)(n.default,{style:p.title,children:"Preferences applied"}),(0,x.jsx)(n.default,{style:p.message,children:"We applied the cookie preferences saved to your account."})]}),(0,x.jsxs)(l.default,{style:p.actions,children:[(0,x.jsx)(o.default,{style:p.secondaryButton,onPress:R,accessibilityRole:"button",accessibilityLabel:"Change cookie preferences",testID:"cookie-sync-notice-change",children:(0,x.jsx)(n.default,{style:p.secondaryButtonText,children:"Change"})}),(0,x.jsx)(o.default,{style:p.ghostButton,onPress:E,accessibilityRole:"button",accessibilityLabel:"Dismiss notice",testID:"cookie-sync-notice-dismiss",children:(0,x.jsx)(n.default,{style:p.ghostButtonText,children:"Dismiss"})})]})]})}):null;return(0,x.jsx)(l.default,{style:w,children:(0,x.jsx)(l.default,{style:p.card,children:T?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.default,{style:p.title,children:t.CONSENT_COPY.customizeTitle}),(0,x.jsx)(n.default,{style:p.subtitle,children:t.CONSENT_COPY.customizeSubtitle}),(0,x.jsxs)(c.default,{style:p.categoriesScroll,children:[(0,x.jsx)(l.default,{accessible:!0,role:"group",accessibilityLabel:`${t.NECESSARY_CATEGORY.label} cookies, ${t.NECESSARY_CATEGORY.status.toLowerCase()}`,accessibilityHint:t.NECESSARY_CATEGORY.description,style:p.categoryRow,children:(0,x.jsxs)(l.default,{"aria-hidden":!0,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:p.necessaryStatusContent,children:[(0,x.jsxs)(l.default,{style:p.categoryInfo,children:[(0,x.jsx)(n.default,{style:p.categoryLabel,children:t.NECESSARY_CATEGORY.label}),(0,x.jsx)(n.default,{style:p.categoryDesc,children:t.NECESSARY_CATEGORY.description})]}),(0,x.jsx)(n.default,{style:p.alwaysOnStatus,children:t.NECESSARY_CATEGORY.status})]})}),t.CONSENT_CATEGORIES.map(e=>(0,x.jsxs)(l.default,{style:p.categoryRow,children:[(0,x.jsxs)(l.default,{style:p.categoryInfo,children:[(0,x.jsx)(n.default,{style:p.categoryLabel,children:e.label}),(0,x.jsx)(n.default,{style:p.categoryDesc,children:e.description})]}
759),(0,x.jsx)(S.AppSwitch,{value:I[e.key],onValueChange:t=>{P(e.key,t)},accessibilityLabel:`${e.label} cookies`})]},e.key))]}),(0,x.jsx)(l.default,{style:p.advancedActions,children:t.CONSENT_CUSTOMIZE_BUTTONS.map(B)})]}):(0,x.jsxs)(l.default,{style:p.simpleRow,children:[(0,x.jsxs)(l.default,{style:p.textBlock,children:[(0,x.jsx)(n.default,{style:p.title,children:t.CONSENT_COPY.simpleTitle}),(0,x.jsx)(n.default,{style:p.message,children:t.CONSENT_COPY.simpleBody}),(0,x.jsx)(u.AppLink,{to:"PrivacyPolicy",children:(0,x.jsx)(n.default,{style:p.link,children:t.CONSENT_COPY.learnMore})})]}),(0,x.jsx)(l.default,{style:p.actions,children:t.CONSENT_SIMPLE_BUTTONS.map(B)})]})})})};var t=r(d[0]),s=r(d[1]),l=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4]));r(d[5]);var c=e(r(d[6])),u=r(d[7]),S=r(d[8]),y=r(d[9]),C=r(d[10]),f=r(d[11]),O=r(d[12]),h=r(d[13]),b=r(d[14]),x=r(d[15]);const p=(0,h.createStyles)({actions:{alignItems:'stretch',flexDirection:'row',flexShrink:0,flexWrap:'wrap',gap:f.SPACING.SM},advancedActions:{flexDirection:'row',flexWrap:'wrap',gap:f.SPACING.SM},alwaysOnStatus:{color:y.COLORS.TEXT_SECONDARY,flexShrink:0,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},card:Object.assign({alignSelf:'center',backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER_FAINT,borderRadius:12,borderWidth:1,maxWidth:960,padding:f.SPACING.XL,width:'100%'},C.ELEVATION.OVERLAY,{pointerEvents:'auto'}),categoriesScroll:{marginBottom:f.SPACING.LG,marginTop:f.SPACING.MD,maxHeight:300},categoryDesc:{color:y.COLORS.TEXT_GHOST,fontSize:O.FONT_SIZE.SM,lineHeight:18},categoryInfo:{flex:1,marginRight:f.SPACING.LG},categoryLabel:{color:y.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.LG,fontWeight:'600',marginBottom:f.SPACING.MICRO},categoryRow:{alignItems:'center',borderBottomColor:y.COLORS.BORDER_FAINT,borderBottomWidth:1,flexDirection:'row',justifyContent:'space-between',paddingVertical:f.SPACING.MD},ghostButton:{alignItems:'center',borderRadius:8,justifyContent:'center',paddingHorizontal:f.SPACING.LG,paddingVertical:f.SPACING.MD},ghostButtonText:{color:y.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},link:{color:y.COLORS.BRAND_PRIMARY,fontWeight:'600',textDecorationLine:'underline'},message:{color:y.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,lineHeight:22},necessaryStatusContent:{alignItems:'center',flexDirection:'row',flex:1,justifyContent:'space-between'},noticeCard:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:f.SPACING.LG,justifyContent:'space-between'},primaryButton:{alignItems:'center',backgroundColor:y.COLORS.ACTION_PRIMARY,borderRadius:8,justifyContent:'center',paddingHorizontal:f.SPACING.XL,paddingVertical:f.SPACING.MD},primaryButtonText:{color:y.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},secondaryButton:{alignItems:'center',backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER_SOFT,borderRadius:8,borderWidth:1,justifyContent:'center',paddingHorizontal:f.SPACING.LG,paddingVertical:f.SPACING.MD},secondaryButtonText:{color:y.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},simpleRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:f.SPACING.LG},subtitle:{color:y.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,lineHeight:22},textBlock:{flexBasis:360,flexGrow:1,flexShrink:1,minWidth:240},title:{color:y.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.XL,fontWeight:'700',marginBottom:f.SPACING.XS},wrapper:Object.assign({padding:f.SPACING.LG},{pointerEvents:'none'})})},661,[571,34,276,222,488,95,283,516,662,490,503,493,494,489,587,104]);
760__d(function(g,r,i,a,m,_e,d){"use strict";const e=["value","accessibilityLabel","onValueChange"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AppSwitch=function(t){let{value:u,accessibilityLabel:h,onValueChange:c}=t,C=(0,o.default)(t,e);const R=s.COLORS.APP_SWITCH_WEB_TRACK_OFF,_=(0,b.jsx)(n.default,Object.assign({},C,{value:u,accessibilityLabel:h,onValueChange:c,disabled:!1,style:O.webSwitch,trackColor:{false:R,true:s.COLORS.ACTION_PRIMARY},thumbColor:s.COLORS.BG_SURFACE,activeThumbColor:s.COLORS.BG_SURFACE,ios_backgroundColor:s.COLORS.BORDER}));return(0,b.jsxs)(l.default,{style:O.webRoot,children:[_,(0,b.jsx)(l.default,{style:[O.webThumbOutline,u?O.webThumbOutlineOn:O.webThumbOutlineOff,O.pointerEventsNone],"aria-hidden":!0})]})};var o=t(r(d[0]));r(d[1]),r(d[2]);
760var n=t(r(d[3])),l=t(r(d[4])),u=r(d[5]),s=r(d[6]),b=r(d[7]);const O=(0,u.createStyles)({webSwitch:{width:40,height:20},webRoot:{width:40,height:20},webThumbOutline:{position:'absolute',top:0,width:20,height:20,borderRadius:10,borderWidth:1,borderColor:s.COLORS.APP_SWITCH_WEB_THUMB_OUTLINE,backgroundColor:s.COLORS.TRANSPARENT,transitionDuration:'0.1s'},webThumbOutlineOff:{start:0},webThumbOutlineOn:{start:20},pointerEventsNone:{pointerEvents:'none'}})},662,[109,34,95,663,276,489,490,104]);
761__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return j}});var t=e(r(_d[0])),l=e(r(_d[1])),o=e(r(_d[2])),n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}),t.default=e,t})(r(_d[3])),u=e(r(_d[4])),c=e(r(_d[5])),d=e(r(_d[6])),f=e(r(_d[7])),s=["aria-label","accessibilityLabel","activeThumbColor","activeTrackColor","disabled","onValueChange","style","thumbColor","trackColor","value"],b={},h='0px 1px 3px rgba(0,0,0,0.5)',p='#D5D5D5',v='#BDBDBD',y=n.forwardRef((e,t)=>{var y=e['aria-label'],j=e.accessibilityLabel,k=e.activeThumbColor,x=e.activeTrackColor,D=e.disabled,w=void 0!==D&&D,A=e.onValueChange,O=e.style,_=void 0===O?b:O,F=e.thumbColor,S=e.trackColor,E=e.value,B=void 0!==E&&E,P=(0,o.default)(e,s),R=n.useRef(null);function T(e){var t='focus'===e.nativeEvent.type?"0px 1px 3px rgba(0,0,0,0.5), 0 0 0 10px rgba(0,0,0,0.1)":h;null!=R.current&&(R.current.style.boxShadow=t)}var I=d.default.flatten(_),M=I.height,L=I.width,V=M||'20px',N=(0,c.default)(V,2),Z=L>N?L:N,q=(0,c.default)(V,.5),z=!0===B?null!=S&&'object'==typeof S?S.true:null!=x?x:"#A3D3CF":null!=S&&'object'==typeof S?S.false:null!=S?S:"#939393",G=B?null!=k?k:"#009688":null!=F?F:"#FAFAFA",H=V,J=H,K=[C.root,_,w&&C.cursorDefault,{height:V,width:Z}],Q=!0===B?'string'==typeof x&&null!=x||'object'==typeof S&&null!=S&&S.true?z:p:'string'==typeof S&&null!=S||'object'==typeof S&&null!=S&&S.false?z:p,U=!0===B?null==k?v:G:null==F?v:G,W=[C.track,{backgroundColor:w?Q:z,borderRadius:q}],X=[C.thumb,B&&C.thumbActive,{backgroundColor:w?U:G,height:H,marginStart:B?(0,c.default)(J,-1):0,width:J}],Y=(0,u.default)('input',{'aria-label':y||j,checked:B,disabled:w,onBlur:T,onChange:function(e){null!=A&&A(e.nativeEvent.target.checked)},onFocus:T,ref:t,style:[C.nativeControl,C.cursorInherit],type:'checkbox',role:'switch'});return n.createElement(f.default,(0,l.default)({},P,{style:K}),n.createElement(f.default,{style:W}),n.createElement(f.default,{ref:R,style:X}),Y)});y.displayName='Switch';var C=d.default.create({root:{cursor:'pointer',userSelect:'none'},cursorDefault:{cursor:'default'},cursorInherit:{cursor:'inherit'},track:(0,t.default)((0,t.default)({forcedColorAdjust:'none'},d.default.absoluteFillObject),{},{height:'70%',margin:'auto',transitionDuration:'0.1s',width:'100%'}),thumb:{forcedColorAdjust:'none',alignSelf:'flex-start',borderRadius:'100%',boxShadow:h,start:'0%',transform:'translateZ(0)',transitionDuration:'0.1s'},thumbActive:{insetInlineStart:'100%'},nativeControl:(0,t.default)((0,t.default)({},d.default.absoluteFillObject),{},{height:'100%',margin:0,appearance:'none',padding:0,width:'100%'})}),j=y},663,[19,27,43,34,223,664,42,276]);
762__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t=/^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/,n=(n,o)=>{var u;return'string'==typeof n?""+parseFloat(n)*o+n.match(t)[1]:(u=n,!isNaN(parseFloat(u))&&isFinite(u)?n*o:void 0)}},664,[]);
763__d(function(g,r,i,a,m,e,d){"use strict";function n(n,s){return{errorPolicy:{kind:'standard-screen',title:n,description:s,resetPolicy:{kind:'reset-with-cleanup'},resetLabel:'Try Again'}}}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SCREEN_ERROR_POLICIES",{enumerable:!0,get:function(){return s}});const s=(0,r(d[0]).defineErrorRegistry)({Home:n('Home screen crashed','Try rendering the home screen again.'),Login:n('Login screen crashed','Try rendering the login screen again.'),MyAccount:n('Account screen crashed','Try rendering the account screen again.'),Admin:n('Admin screen crashed','Try rendering the admin screen again.'),Flas
763her:n('Flasher screen crashed','Try rendering the flasher screen again.'),SensorConfig:n('Sensor Config screen crashed','Try rendering the sensor configuration screen again.'),Status:n('Status screen crashed','Try rendering the status screen again.'),Widgets:n('Widgets screen crashed','Try rendering the widgets screen again.'),Personal:n('Personal screen crashed','Try rendering the personal screen again.'),Government:n('Government screen crashed','Try rendering the government screen again.'),Education:n('Education screen crashed','Try rendering the education screen again.'),Business:n('Business screen crashed','Try rendering the business screen again.'),Broadcasters:n('Broadcasters screen crashed','Try rendering the broadcasters screen again.'),About:n('About screen crashed','Try rendering the about screen again.'),AboutMap:n('About Map screen crashed','Try rendering the about map screen again.'),Map:n('Map screen crashed','Try rendering the map screen again.'),Location:n('Location screen crashed','Try rendering the location screen again.'),Community:n('Community screen crashed','Try rendering the community screen again.'),CommunityCategory:n('Community Category screen crashed','Try rendering the community category screen again.'),CommunityTopic:n('Community Topic screen crashed','Try rendering the community topic screen again.'),CommunityNewTopic:n('Community New Topic screen crashed','Try rendering the new-topic screen again.'),API:n('API screen crashed','Try rendering the API screen again.'),APIDocs:n('API Docs screen crashed','Try rendering the API docs screen again.'),Blog:n('Blog screen crashed','Try rendering the blog screen again.'),BlogArticle:n('Blog Article screen crashed','Try rendering the blog article screen again.'),Press:n('Press screen crashed','Try rendering the press screen again.'),PressDiscovery:n('Press Discovery screen crashed','Try rendering the press discovery screen again.'),PressDiscoveryDetail:n('Press Discovery Detail screen crashed','Try rendering the press discovery detail screen again.'),Science:n('Science screen crashed','Try rendering the science screen again.'),Ecosystem:n('Ecosystem screen crashed','Try rendering the ecosystem screen again.'),PressAdmin:n('Press Admin screen crashed','Try rendering the press admin screen again.'),PressAdminDetail:n('Press Admin Detail screen crashed','Try rendering the press admin detail screen again.'),ContentAdmin:n('Content Admin screen crashed','Try rendering the content admin screen again.'),AdminSeo:n('SEO Status screen crashed','Try rendering the SEO status screen again.'),OrderOutreach:n('Order Outreach screen crashed','Try rendering the order outreach screen again.'),OrderOutreachNew:n('New Order Update screen crashed','Try rendering the new order update screen again.'),OrderOutreachDetail:n('Order Update Detail screen crashed','Try rendering the order update detail screen again.'),AdminSubscriptions:n('API Subscriptions screen crashed','Try rendering the subscriptions screen again.'),AdminSubscriptionDetail:n('API Subscription Detail screen crashed','Try rendering the subscription detail screen again.'),AdminAuditLogs:n('Audit Logs screen crashed','Try rendering the audit logs screen again.'),Contact:n('Contact screen crashed','Try rendering the contact screen again.'),FAQ:n('FAQ screen crashed','Try rendering the FAQ screen again.'),Search:n('Search screen crashed','Try rendering the search screen again.'),Papers:n('Papers screen crashed','Try rendering the papers screen again.'),Research:n('Research screen crashed','Try rendering the research screen again.'),ResearchQuickGuide:n('Researcher Quick Guide screen crashed','Try rendering the researcher quick guide screen again.'),ProjectsAndIntegrations:n('Projects and Integrations screen crashed','Try rendering the projects and integrations screen again.'),DataUseCases:n('Data Use Cases screen crashed','Try rendering the data use cases screen again.'),ExploringAirQuality:n('Exploring Air Quality screen crashed','Try rendering the exploring air quality screen again.'),TrustingPurpleAir:n('Trusting PurpleAir screen crashed','Try rendering the trusting PurpleAir screen again.'),WhoUsesPurpleAir:n('Who Uses PurpleAir screen crashed','Try rendering the who uses PurpleAir screen again.'),PrivacyPolicy:n('Privacy Policy screen crashed','Try rendering the privacy policy screen again.'),DoNotSell:n('Do Not Sell screen crashed','Try rendering the do-not-sell screen again.'),TermsOfService:n('Terms of Service screen crashed','Try rendering the terms-of-service screen again.'),RefundPolicy:n('Refund Policy screen crashed','Try rendering the refund policy screen again.'),ShippingPolicy:n('Shipping Policy screen crashed','Try rendering the shipping policy screen again.'),Credits:n('Credits screen crashed','Try rendering the credits screen again.'),Attribution:n('Attribution screen crashed','Try rendering the data attribution screen again.'),License:n('License screen crashed','Try rendering the data license screen again.'),Warranty:n('Warranty screen crashed','Try rendering the warranty screen again.'),PaymentMethods:n('Payment Methods screen crashed','Try rendering the payment methods screen again.'),Purchasing:n('Purchasing screen crashed','Try rendering the purchasing screen again.'),Technology:n('Technology screen crashed','Try rendering the technology screen again.'),Recall:n('Recall screen crashed','Try rendering the safety recall screen again.'),Register:n('Register screen crashed','Try rendering the register screen again.'),Store:n('Store screen crashed','Try rendering the store screen again.'),StoreCategory:n('Store Category screen crashed','Try rendering the store category screen again.'),Product:n('Product screen crashed','Try rendering the product screen again.'),Cart:n('Cart screen crashed','Try rendering the cart screen again.'),SensorManagement:n('Sensor Management screen crashed','Try rendering the sensor management screen again.'),SensorUtility:n('Sensor Utility screen crashed','Try rendering the sensor utility screen again.'),ApiTokens:n('API Tokens screen crashed','Try rendering the API tokens screen again.'),NotFound:n('Not Found screen crashed','Try rendering the not-found screen again.'),DevEmailPreview:n('Dev Email Preview screen crashed','Try rendering the dev email preview screen again.'),DevLocalTesting:n('Dev Local Testing screen crashed','Try rendering the dev local testing screen again.'),DevOrderOutreachScenarios:n('Dev Order Outreach Scenarios screen crashed','Try rendering the order outreach scenarios screen again.'),DevPwaManifestEvaluator:n('Dev PWA Manifest Evaluator screen crashed','Try rendering the PWA manifest evaluator screen again.')})},665,[97]);
764__d(function(g,r,i,a,m,_e,d){"use strict";
764Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ROUTE_DEFINITIONS",{enumerable:!0,get:function(){return s}}),_e.buildWebLinkingScreens=function(e,t={}){const n=new Map(Object.entries(t)),c={};for(const t of s){if(!o(t,e))continue;const s=n.get(t.name),u=l(t.path);c[t.name]=null!=s?Object.assign({path:u},s):u}return c},_e.buildDesktopLinkingScreens=function(e,t,n={}){const c=new Map(Object.entries(n)),u={};for(const n of s){if(!e.has(n.name)||!o(n,t))continue;const s=l('prefix'===n.match?(n.prefixBases??[n.path])[0]??n.path:n.path),f=c.get(n.name);u[n.name]=null!=f?Object.assign({path:s},f):s}return u},_e.getEnabledPrefixRoutes=function(e){const t=[];for(const n of s)if('prefix'===n.match&&o(n,e))for(const e of n.prefixBases??[])t.push({base:e.replace(/^\//,''),screen:n.name});return t};var e,t=r(d[0]);function n(e){return'stable'===e||'preview'===e||'unreleased'===e}const s=((e=t)&&e.__esModule?e:{default:e}).default.routes.map(function(e){if(!e.path.startsWith('/'))throw new Error(`Route '${e.name}' path must be leading-slash canonical, got '${e.path}'`);if('exact'!==(t=e.match)&&'params'!==t&&'prefix'!==t)throw new Error(`Route '${e.name}' has invalid match '${e.match}'`);var t;if(!n(e.availability))throw new Error(`Route '${e.name}' has invalid availability '${e.availability}'`);if('prefix'===e.match&&(null==e.prefixBases||0===e.prefixBases.length))throw new Error(`Prefix route '${e.name}' must declare at least one prefixBase`);if('stable'!==e.availability&&null==e.gate)throw new Error(`Non-stable route '${e.name}' must declare a gate`);return Object.assign({name:e.name,path:e.path,match:e.match,availability:e.availability},null!=e.gate?{gate:e.gate}:{},null!=e.prefixBases?{prefixBases:e.prefixBases}:{})});function o(e,t){return'stable'===e.availability||null!=e.gate&&!0===t[e.gate]}function l(e){return'/'===e?'':e.replace(/^\//,'')}},666,[667]);
765__d(function(e,t,a,i,s,r,o){s.exports={$comment:"Route configuration and per-route SEO. See routeManifest.ts for routing documentation and docs/seo/SEO_ARCHITECTURE.md for the seo-block contract. Every stable/preview route MUST carry a `seo` block (real metadata, or `noIndex: true`); the generator refuses to emit projections otherwise. A preview route may declare a unique `previewQueryValue` to require matching query/cookie access at the backend; previews without one keep the legacy always-served shell behavior. `seoRefinements` holds registry-only entries that refine a sub-shape of an existing route. Run `npm run routes:generate` after editing.",seo:{siteName:"PurpleAir",defaultDescription:"Real-time air quality monitoring with PurpleAir sensors. Monitor indoor and outdoor air quality with accurate PM2.5, PM10, temperature, and humidity data.",defaultImage:""},routes:[{name:"Home",path:"/",match:"exact",availability:"stable",seo:{title:"{siteName} | Real-Time Air Quality Monitoring",description:"Real-time air quality monitoring with PurpleAir sensors. Monitor, configure, and manage your sensors for accurate PM2.5, PM10, temperature, and humidity data.",ogType:"website"}},{name:"Login",path:"/login",match:"exact",availability:"stable",seo:{title:"Sign In | {siteName}",description:"Sign in to your PurpleAir account to manage sensors and view data.",ogType:"website",noIndex:!0}},{name:"MyAccount",path:"/my-account",match:"exact",availability:"stable",seo:{title:"My Account | {siteName}",description:"Manage your PurpleAir account, sensors, and settings.",ogType:"website",noIndex:!0}},{name:"Admin",path:"/admin",match:"exact",availability:"stable",seo:{title:"Admin | {siteName}",description:"PurpleAir administration dashboard.",ogType:"website",noIndex:!0}},{name:"Flasher",path:"/flasher",match:"exact",availability:"stable",seo:{title:"Firmware Flasher | {siteName}",description:"Update your PurpleAir sensor firmware using the web-based flasher tool.",ogType:"website",noIndex:!0}},{name:"SensorConfig",path:"/config",match:"exact",availability:"unreleased",gate:"unreleasedSensorConfig"},{name:"Status",path:"/status",match:"exact",availability:"stable",seo:{title:"System Status | {siteName}",description:"Check the current status of PurpleAir services, API, and sensor network.",ogType:"website",noIndex:!0}},{name:"Widgets",path:"/widgets",match:"exact",availability:"unreleased",gate:"unreleasedWidgets"}
765,{name:"Personal",path:"/personal",match:"exact",availability:"stable",seo:{title:"Personal Air Quality Monitoring | {siteName}",description:"Monitor your home's air quality with PurpleAir sensors. Track PM2.5, allergens, wildfire smoke, and indoor pollutants in real time.",ogType:"website"}},{name:"Government",path:"/government",match:"exact",availability:"stable",seo:{title:"Government Air Quality Solutions | {siteName}",description:"Air quality monitoring for government agencies. Deploy dense sensor networks for community-level air quality data and regulatory compliance.",ogType:"website"}},{name:"Education",path:"/education",match:"exact",availability:"stable",seo:{title:"Education & Research | {siteName}",description:"Air quality sensors for schools, universities, and research institutions. Access real-time data for STEM education, environmental science, and public health research.",ogType:"website"}},{name:"Business",path:"/business",match:"exact",availability:"stable",seo:{title:"Business Air Quality Solutions | {siteName}",description:"Professional air quality monitoring for businesses. Protect employees, optimize HVAC, and demonstrate environmental responsibility with PurpleAir sensors.",ogType:"website"}},{name:"Broadcasters",path:"/broadcasters",match:"exact",availability:"stable",seo:{title:"Broadcaster Solutions | {siteName}",description:"Real-time hyper-local air quality data for news broadcasters and weather reporting. Embed PurpleAir maps and widgets in your broadcast.",ogType:"website"}},{name:"About",path:"/about",match:"exact",availability:"stable",seo:{title:"About | {siteName}",description:"Founded in 2015 in Draper, Utah. PurpleAir builds affordable, accurate air quality sensors used worldwide by individuals, researchers, and governments.",ogType:"website"}},{name:"AboutMap",path:"/real-time-map",match:"exact",availability:"stable",seo:{title:"About the Map | {siteName}",description:"Learn about the PurpleAir Real-Time Air Quality Map. Features, use cases, and EPA integration with over 35,000 sensors worldwide.",ogType:"website"}},{name:"Map",path:"/map-preview",match:"prefix",availability:"preview",gate:"universalMap",prefixBases:["/map","/map-preview"],seo:{title:"Air Quality Map | {siteName}",description:"Preview of the in-app PurpleAir real-time air quality map.",ogType:"website",noIndex:!0}},{name:"Location",path:"/location",match:"prefix",availability:"preview",gate:"universalMap",prefixBases:["/location"],seo:{title:"Air Quality by Location | {siteName}",description:"Air quality by location on the PurpleAir map.",ogType:"website",noIndex:!0}},{name:"Community",path:"/community",match:"exact",availability:"stable",seo:{title:"Community | {siteName}",description:"Join the PurpleAir community forum. Discuss air quality monitoring, share sensor data insights, get help with setup, and connect with other users.",ogType:"website"}},{name:"CommunityCategory",path:"/community/c/:slug/:id",match:"params",availability:"stable",seo:{titleTemplate:"{categoryName} | Community | {siteName}",descriptionTemplate:"Discuss {categoryName} in the PurpleAir community forum.",ogType:"website",dynamic:!0,externalCanonical:"community"}},{name:"CommunityTopic",path:"/community/t/:slug/:id",match:"params",availability:"stable",seo:{titleTemplate:"{topicTitle} | Community | {siteName}",descriptionSource:"topicExcerpt",ogType:"article",dynamic:!0,externalCanonical:"community"}},{name:"CommunityNewTopic",path:"/community/new",match:"exact",availability:"stable",seo:{title:"New Topic | Community | {siteName}",description:"Create a new discussion topic in the PurpleAir community forum.",ogType:"website",noIndex:!0}},{name:"API",path:"/api",match:"exact",availability:"stable",seo:{title:"API | {siteName}",description:"Access real-time and historical air quality data through the PurpleAir API. RESTful endpoints for PM2.5, PM10, temperature, humidity, and more.",ogType:"website"}},{name:"APIDocs",path:"/api-docs",match:"exact",availability:"unreleased",gate:"unreleasedApiDocs"},{name:"Blog",path:"/blog",match:"exact",availability:"stable",seo:{title:"Blog | {siteName}",description:"Air quality insights, research, and news from PurpleAir.",ogType:"website"}},{name:"BlogArticle",path:"/blog/:slug",match:"params",availability:"stable",seo:{titleTemplate:"{postTitle} | {siteName}",descriptionSource:"postExcerpt",ogType:"article",dynamic:!0}},{name:"Press",path:"/press",match:"exact",availability:"stable",seo:{title:"Press & Media | {siteName}",description:"PurpleAir in the news and partner features. Featured in Redfin's guide to reducing indoor allergens.",ogType:"website"}},{name:"PressDiscovery",path:"/press-v2",match:"exact",availability:"stable",seo:{title:"Press Discovery | {siteName}",description:"PurpleAir press mentions and media coverage.",ogType:"website",noIndex:!0}},{name:"PressDiscoveryDetail",path:"/press-v2/:id",match:"params",availability:"stable",seo:{title:"Press Mention | {siteName}
765",description:"A PurpleAir press mention.",ogType:"article",noIndex:!0}},{name:"Science",path:"/science",match:"exact",availability:"stable",seo:{title:"Science | {siteName}",description:"Scientific research and studies featuring PurpleAir sensors.",ogType:"website",noIndex:!0}},{name:"Ecosystem",path:"/ecosystem",match:"exact",availability:"stable",seo:{title:"Ecosystem | {siteName}",description:"The ecosystem of projects and integrations built on PurpleAir data.",ogType:"website",noIndex:!0}},{name:"PressAdmin",path:"/admin/press",match:"exact",availability:"stable",seo:{title:"Press Admin | {siteName}",description:"PurpleAir press moderation dashboard.",ogType:"website",noIndex:!0}},{name:"PressAdminDetail",path:"/admin/press/:id",match:"params",availability:"stable",seo:{title:"Press Admin | {siteName}",description:"PurpleAir press mention review.",ogType:"website",noIndex:!0}},{name:"ContentAdmin",path:"/admin/content",match:"exact",availability:"stable",seo:{title:"Content Admin | {siteName}",description:"PurpleAir content administration.",ogType:"website",noIndex:!0}},{name:"AdminSeo",path:"/admin/seo",match:"exact",availability:"stable",seo:{title:"SEO Status | {siteName}",description:"PurpleAir SEO launch-surface observability.",ogType:"website",noIndex:!0}},{name:"OrderOutreach",path:"/admin/order-outreach",match:"exact",availability:"stable",seo:{title:"Order Outreach | {siteName}",description:"PurpleAir order outreach administration.",ogType:"website",noIndex:!0}},{name:"OrderOutreachNew",path:"/admin/order-outreach/new",match:"exact",availability:"stable",seo:{title:"New Order Update | {siteName}",description:"Create a PurpleAir order update.",ogType:"website",noIndex:!0}},{name:"OrderOutreachDetail",path:"/admin/order-outreach/:id",match:"params",availability:"stable",seo:{title:"Order Update | {siteName}",description:"PurpleAir order update detail.",ogType:"website",noIndex:!0}},{name:"AdminSubscriptions",path:"/admin/subscriptions",match:"exact",availability:"stable",seo:{title:"API Subscriptions | {siteName}",description:"PurpleAir API subscription administration.",ogType:"website",noIndex:!0}},{name:"AdminSubscriptionDetail",path:"/admin/subscriptions/:contractId",match:"params",availability:"stable",seo:{title:"API Subscription Contract | {siteName}",description:"PurpleAir API subscription contract detail.",ogType:"website",noIndex:!0}},{name:"AdminAuditLogs",path:"/admin/audit-logs",match:"exact",availability:"stable",seo:{title:"Audit Logs | {siteName}",description:"PurpleAir administrative audit and change logs.",ogType:"website",noIndex:!0}},{name:"Contact",path:"/contact",match:"exact",availability:"stable",seo:{title:"Contact Us | {siteName}",description:"Get in touch with PurpleAir for support, sales inquiries, partnerships, or general questions about our air quality monitoring sensors.",ogType:"website"}},{name:"FAQ",path:"/faq",match:"exact",availability:"stable",seo:{title:"FAQ | {siteName}",description:"Frequently asked questions about PurpleAir air quality sensors, data, setup, and more.",ogType:"website"}},{name:"Search",path:"/search",match:"exact",availability:"stable",seo:{title:"Search | {siteName}",description:"Search PurpleAir store, community, blog, and press.",ogType:"website",noIndex:!0}},{name:"Papers",path:"/papers",match:"exact",availability:"stable",seo:{title:"Scientific Papers | {siteName}",description:"Peer-reviewed scientific papers and research studies featuring PurpleAir sensors in air quality monitoring, calibration, environmental justice, and public health.",ogType:"website"}},{name:"Research",path:"/research",match:"exact",availability:"preview",gate:"researchHub",previewQueryValue:"research-hub-0f862940",seo:{title:"PurpleAir for Research | {siteName}",description:"Air quality data at research density. Guidance on data fields, calibration, quality control, access routes, and licensing for researchers and air quality managers.",ogType:"website",noIndex:!0}},{name:"ResearchQuickGuide",path:"/research/quick-guide",match:"exact",availability:"preview",gate:"researchQuickGuide",previewQueryValue:"research-quick-guide-520786f9",seo:{title:"Researcher Quick Guide | {siteName}",description:"A guide to research with PurpleAir data, including data access, quality control, calibration, and license terms, along with an example workflow.",ogType:"article",n
765oIndex:!0}},{name:"ProjectsAndIntegrations",path:"/projects-and-integrations",match:"exact",availability:"stable",seo:{title:"Projects & Integrations | {siteName}",description:"Government programs, university projects, and tools that integrate PurpleAir sensor data for air quality monitoring and public health.",ogType:"website"}},{name:"DataUseCases",path:"/data-use-cases",match:"exact",availability:"stable",seo:{title:"Data Use Cases | {siteName}",description:"Discover how PurpleAir sensor data is used for research, public health, environmental monitoring, and community air quality awareness.",ogType:"website"}},{name:"ExploringAirQuality",path:"/exploring-air-quality-across-the-globe",match:"exact",availability:"stable",seo:{title:"Exploring Air Quality Across the Globe | {siteName}",description:"Research studies worldwide use PurpleAir sensors to explore air quality\u2014from volcanic eruptions and fireworks to indoor vs outdoor air and community science.",ogType:"website"}},{name:"TrustingPurpleAir",path:"/trusting-purpleair-sensor-evaluations",match:"exact",availability:"stable",seo:{title:"Trusting PurpleAir Sensor Evaluations | {siteName}",description:"How PurpleAir sensors are evaluated for accuracy, long-term performance, and data reliability against government-grade air monitors.",ogType:"website"}},{name:"WhoUsesPurpleAir",path:"/from-schools-to-satellites-who-uses-purpleair-and-why",match:"exact",availability:"stable",seo:{title:"Who Uses PurpleAir and Why | {siteName}",description:"How schools, communities, researchers, and agencies use PurpleAir sensors for real-time air quality maps, public health, and scientific research.",ogType:"website"}},{name:"PrivacyPolicy",path:"/policies/privacy-policy",match:"exact",availability:"stable",seo:{title:"Privacy Policy | {siteName}",description:"PurpleAir privacy policy. Learn how we collect, use, and protect your personal information and sensor data.",ogType:"website"}},{name:"DoNotSell",path:"/do-not-sell",match:"exact",availability:"stable",seo:{title:"Do Not Sell My Personal Information | {siteName}",description:"PurpleAir does not sell your personal information. Learn about your privacy rights under the California Consumer Privacy Act (CCPA).",ogType:"website"}},{name:"TermsOfService",path:"/policies/terms-of-service",match:"exact",availability:"stable",seo:{title:"Terms of Service | {siteName}",description:"PurpleAir terms of service. Terms and conditions governing use of PurpleAir products, services, and data.",ogType:"website"}},{name:"RefundPolicy",path:"/policies/refund-policy",match:"exact",availability:"stable",seo:{title:"Refund Policy | {siteName}",description:"PurpleAir 30-day return and refund policy for original purchasers, including how to request an RMA.",ogType:"website"}},{name:"ShippingPolicy",path:"/policies/shipping-policy",match:"exact",availability:"stable",seo:{title:"Shipping Policy | {siteName}",description:"PurpleAir shipping and delivery policy, including carriers, timeframes, and international DDP shipping.",ogType:"website"}},{name:"Credits",path:"/credits",match:"exact",availability:"stable",seo:{title:"Credits | {siteName}",description:"Acknowledgments and credits for open source software, libraries, and contributors used in PurpleAir products.",ogType:"website"}},{name:"Attribution",path:"/attribution",match:"exact",availability:"stable",seo:{title:"Data Attribution | {siteName}",description:"How to properly attribute PurpleAir air quality data and use the PurpleAir logo when using PurpleAir data or the PurpleAir API.",ogType:"website"}},{name:"License",path:"/license",match:"exact",availability:"stable",seo:{title:"Data License | {siteName}",description:"PurpleAir data license terms for using PurpleAir air quality data and the PurpleAir API, including attribution and distribution requirements.",ogType:"website"}},{name:"Warranty",path:"/policies/warranty",match:"exact",availability:"stable",seo:{title:"Warranty | {siteName}",description:"PurpleAir 30-day no-questions-asked return guarantee and one-year limited product warranty for manufacturing defects.",ogType:"website"}},{name:"PaymentMethods",path:"/pages/payment-methods",match:"exact",availability:"stable",seo:{title:"Payment Methods | {siteName}",description:"Payment methods accepted by PurpleAir for sensor and accessory purchases.",ogType:"website"}},{name:"Purchasing",path:"/pages/purchasing",match:"exact",availability:"stable",seo:{title:"Purchasing | {siteName}",description:"Purchasing information for PurpleAir sensors, accessories, and institutional orders.",ogType:"website"}},{name:"Technology",path:"/pages/technology",match:"exact",availability:"stable",seo:{title:"PurpleAir Technology | {siteName}",description:"Learn how PurpleAir sensors measure particulate matter and deliver real-time air quality data.",ogType:"website"}},{name:"Recall",path:"/recall",match:"exact",availability:"stable",seo:{title:"Power Supply Safety Recall | {siteName}",description:"PurpleAir voluntary safety recall of power supply model RKPO-UL052
765000C shipped with PA-II and PA-II-SD sensors. Steps to receive a free replacement.",ogType:"website"}},{name:"Register",path:"/register",match:"exact",availability:"stable",seo:{title:"Register Sensor | {siteName}",description:"Register your PurpleAir sensor to join the worldwide air quality monitoring network and access your data on the PurpleAir map.",ogType:"website"}},{name:"Store",path:"/store",match:"exact",availability:"stable",seo:{title:"Store | {siteName}",description:"Shop PurpleAir air quality monitors as found on the EPA's Fire and Smoke Map. Real-time data for home, school, and community.",ogType:"website"}},{name:"StoreCategory",path:"/store/:category/:sensor?",match:"params",availability:"stable",seo:{titleTemplate:"{categoryLabel} | Store | {siteName}",descriptionTemplate:"Browse {categoryLabel} from PurpleAir.",ogType:"website",dynamic:!0}},{name:"Product",path:"/products/:handle",match:"params",availability:"stable",seo:{titleTemplate:"{productTitle} | {siteName}",descriptionSource:"productDescription",ogType:"product",dynamic:!0}},{name:"Cart",path:"/cart",match:"exact",availability:"stable",seo:{title:"Shopping Cart | {siteName}",description:"Review your PurpleAir shopping cart. Air quality monitors, accessories, and replacement parts.",ogType:"website",noIndex:!0}},{name:"SensorManagement",path:"/my-sensors/:sensorIndex?",match:"params",availability:"stable",seo:{title:"My Sensors | {siteName}",description:"Manage and configure your PurpleAir sensors. View status, update settings, and monitor performance.",ogType:"website",noIndex:!0}},{name:"SensorUtility",path:"/utility",match:"exact",availability:"stable",seo:{title:"Sensor Utility | {siteName}",description:"PurpleAir sensor utility tool for advanced sensor configuration and diagnostics.",ogType:"website",noIndex:!0}},{name:"ApiTokens",path:"/api-tokens",match:"exact",availability:"stable",seo:{title:"API Tokens | {siteName}",description:"Manage your PurpleAir API tokens. Create, view, and revoke API keys for data access.",ogType:"website",noIndex:!0}}],seoRefinements:{StoreCategorySensor:{path:"/store/:category/:sensor",titleTemplate:"{categoryLabel} | Store | {siteName}",descriptionTemplate:"Browse {categoryLabel} from PurpleAir.",ogType:"website",dynamic:!0,noIndex:!0}}}},667,[]);
766__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CATCH_ALL_SCREEN",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"SCREEN_LINKING_OVERRIDES",{enumerable:!0,get:function(){return o}}),e.assembleWebLinkingScreens=function(t,o={},u={}){return Object.assign({},(0,n.buildWebLinkingScreens)(t,o),u,{[s]:'*'})},e.createTableAwareGetStateFromPath=function(n,s=t.getStateFromPath){return(t,o)=>{const u=t.replace(/^\//,''),c=u.indexOf('/');if(c>=0){const t=u.substring(0,c),s=n.find(n=>n.base===t);if(null!=s)return{routes:[{name:s.screen}]}}return s(t,o)}};var t=r(d[0]),n=r(d[1]);const s='NotFound',o={CommunityCategory:{parse:{slug:t=>t,id:t=>Number(t)},stringify:{id:t=>String(t)}},CommunityTopic:{parse:{slug:t=>t,id:t=>Number(t)},stringify:{id:t=>String(t)}},PressDiscoveryDetail:{parse:{id:t=>t}},PressAdminDetail:{parse:{id:t=>t,returnTab:t=>t}},OrderOutreachDetail:{parse:{id:t=>t}},AdminSubscriptionDetail:{parse:{contractId:t=>t}},PressAdmin:{parse:{tab:t=>t}},Search:{parse:{q:t=>t,sources:t=>t}},BlogArticle:{parse:{slug:t=>t}},Register:{parse:{mac:t=>t,lat:t=>t,lon:t=>t,token:t=>t,reg:t=>t}},StoreCategory:{parse:{category:t=>t,sensor:t=>t}},Product:{parse:{handle:t=>t,fitSensor:t=>t}}}},668,[107,666]);
767__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"RESEARCH_HUB_PREVIEW_ID",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"RESEARCH_QUICK_GUIDE_PREVIEW_ID",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"PREVIEW_FEATURE_IDS",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"UNIVERSAL_MAP_PREVIEW_PATH",{enumerable:!0,get:function(){return s}}),e.parsePreviewFeatureList=_,e.parsePreviewQueryString=p,e.parsePreviewCookie
767=R,e.createPreviewFeatureRegistry=P,e.resolveEnabledPreviewFeatures=w,e.isUniversalMapPreviewPath=S,e.isPreviewFeatureEnabled=h,Object.defineProperty(e,"ENABLED_PREVIEW_FEATURES",{enumerable:!0,get:function(){return y}}),e.isSessionPreviewFeatureEnabled=function(t){return h(y,t)};var t=r(d[0]);r(d[1]);var n=r(d[2]);const o=n.PREVIEW_QUERY_VALUES_BY_ROUTE.Research,u=n.PREVIEW_QUERY_VALUES_BY_ROUTE.ResearchQuickGuide,c=['universal-map',...Object.values(n.PREVIEW_QUERY_VALUES_BY_ROUTE)],s='/map-preview',E=new Set(c),l='purpleair.preview-features';function f(t){return E.has(t)}function _(t){if(null==t)return[];const n=[];for(const o of t.split(',')){const t=o.trim();''!==t&&f(t)&&n.push(t)}return n}function p(t){return _(new URLSearchParams(t).getAll(n.PREVIEW_QUERY_PARAMETER).join(','))}function R(o){const u=(0,t.readCookieValue)(o,n.PREVIEW_COOKIE_NAME);if(null===u)return[];let c,s;try{c=decodeURIComponent(u)}catch(t){if(t instanceof URIError)return[];throw t}try{s=JSON.parse(c)}catch(t){if(t instanceof SyntaxError)return[];throw t}return Array.isArray(s)?[...P(s.filter(t=>'string'==typeof t))]:[]}function P(t){const n=new Set;for(const o of t)f(o)&&n.add(o);return n}function w(t){return P([...p(t.queryString),...R(t.documentCookie??''),..._(t.storedValue).filter(t=>'universal-map'===t),...S(t.pathname)?['universal-map']:[]])}function S(t){if(null==t)return!1;const n=t.replace(/\/+$/,'');return n===s||n.startsWith(`${s}/`)}function h(t,n){return t.has(n)}function v(){return'undefined'!=typeof window}function I(t){if(!v())return;const n=t.has('universal-map')?['universal-map']:[];n.length>0&&window.localStorage.setItem(l,n.join(','))}const y=(()=>{const t=v()?{documentCookie:document.cookie,pathname:window.location.pathname,queryString:window.location.search,storedValue:window.localStorage.getItem(l)}:{documentCookie:'',pathname:'',queryString:'',storedValue:null},n=w({documentCookie:t.documentCookie,pathname:t.pathname,queryString:t.queryString,storedValue:t.storedValue});return I(n),n})()},669,[571,95,670]);
768__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PREVIEW_QUERY_PARAMETER",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"PREVIEW_COOKIE_NAME",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PREVIEW_QUERY_VALUES_BY_ROUTE",{enumerable:!0,get:function(){return u}});const t="preview",n="pa_preview",u={Research:"research-hub-0f862940",ResearchQuickGuide:"research-quick-guide-520786f9"}},670,[]);
769__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.syncRouteFavicons=function(e){if('undefined'==typeof document)return;o??=Array.from(document.querySelectorAll('link[rel="icon"]')).map(e=>{const t=e.getAttribute('sizes');return Object.assign({href:e.getAttribute('href')??'',type:e.type},null!=t&&t.length>0?{sizes:t}:{})}),l('Map'===e?n:o)};var e,t=r(d[0]);const n=((e=t)&&e.__esModule?e:{default:e}).default;let o=null;function l(e){const t=Array.from(document.querySelectorAll('link[rel="icon"]'));for(const[n,o]of e.entries()){const e=t[n]??document.head.appendChild(document.createElement('link'));e.rel='icon',e.type=o.type,e.href=o.href,null!=o.sizes?e.setAttribute('sizes',o.sizes):e.removeAttribute('sizes')}for(const n of t.slice(e.length))n.remove()}},671,[672]);
770__d(function(i,n,a,e,p,f,o){p.exports=[{href:"/favicons/map/favicon.ico",type:"image/x-icon"},{href:"/favicons/map/favicon-16x16.png?12345",type:"image/png",sizes:"16x16"},{href:"/favicons/map/favicon-32x32.png?12345",type:"image/png",sizes:"32x32"},{href:"/favicons/map/favicon-48x48.png?12345",type:"image/png",sizes:"48x48"}]},672,[]);
771__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AboutMapScreen=function(){const e=(0,p.useSeoMeta)('AboutMap');return(0,x.jsxs)(S.PageLayout,{children:[(0,x.jsx)(h.WebMeta,Object.assign({},e)),(0,x.jsxs)(n.default,{style:C.MARKETING.container,children:[(0,x.jsx)(u.HeroSection,{backgroundColor:y.COLORS.MAP_GREEN_LIGHT,background:{imageUrl:'https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80',imagePosition:'center'},minHeight:400,label:"REAL-TIME DATA",title:"The PurpleAir Map",subtitle:"Explore real-time air quality data from over 35,000 sensors worldwide. See what you're breathing, r
771ight now.",centered:!0,children:(0,x.jsxs)(t.default,{style:[C.MARKETING.heroActions,L.heroActionsCentered],children:[(0,x.jsx)(f.ServiceExternalLink,{service:"mapBaseUrl",style:T.primaryButton,accessibilityLabel:"Open the Map",children:(0,x.jsx)(o.default,{style:T.primaryButtonText,children:"Open the Map"})}),(0,x.jsx)(O.PreviewMapEntryButton,{style:T.secondaryButton,textStyle:T.secondaryButtonText})]})}),(0,x.jsxs)(t.default,{style:C.MARKETING.section,children:[(0,x.jsx)(o.default,{style:C.MARKETING.sectionTitle,children:"Map Features"}),(0,x.jsxs)(t.default,{style:C.MARKETING.grid,children:[(0,x.jsx)(G,{title:"Real-Time Updates",description:"Air quality data updates every few minutes, giving you the most current picture of conditions in your area."}),(0,x.jsx)(G,{title:"Hyperlocal Data",description:"With sensors on nearly every block in many areas, see air quality variations within your own neighborhood."}),(0,x.jsx)(G,{title:"Historical Data",description:"View historical trends and download data for any sensor to analyze air quality patterns over time."}),(0,x.jsx)(G,{title:"Multiple Conversions",description:"View data as AQI, raw PM2.5, or with EPA, LRAPA, or other correction factors applied."}),(0,x.jsx)(G,{title:"Indoor & Outdoor",description:"Filter between indoor and outdoor sensors to focus on the data most relevant to you."}),(0,x.jsx)(G,{title:"Customizable View",description:"Adjust map layers, color scales, and averaging periods to see the data the way you need it."})]})]}),(0,x.jsxs)(t.default,{style:[C.MARKETING.section,C.MARKETING.sectionAlt],children:[(0,x.jsx)(o.default,{style:C.MARKETING.sectionTitle,children:"Who Uses the Map"}),(0,x.jsxs)(t.default,{style:L.useCasesGrid,children:[(0,x.jsxs)(t.default,{style:L.useCase,children:[(0,x.jsx)(o.default,{style:L.useCaseTitle,children:"Individuals & Families"}),(0,x.jsx)(o.default,{style:L.useCaseDesc,children:"Check air quality before outdoor activities, decide when to open windows, or monitor conditions for sensitive family members."})]}),(0,x.jsxs)(t.default,{style:L.useCase,children:[(0,x.jsx)(o.default,{style:L.useCaseTitle,children:"Schools & Districts"}),(0,x.jsx)(o.default,{style:L.useCaseDesc,children:"Make informed decisions about outdoor recess, athletic events, and HVAC system operation based on real-time data."})]}),(0,x.jsxs)(t.default,{style:L.useCase,children:[(0,x.jsx)(o.default,{style:L.useCaseTitle,children:"Emergency Responders"}),(0,x.jsx)(o.default,{style:L.useCaseDesc,children:"Track wildfire smoke plumes, industrial incidents, and other air quality events as they unfold in real-time."})]}),(0,x.jsxs)(t.default,{style:L.useCase,children:[(0,x.jsx)(o.default,{style:L.useCaseTitle,children:"Researchers"}),(0,x.jsx)(o.default,{style:L.useCaseDesc,children:"Access granular air quality data for studies on health impacts, pollution patterns, and community health."})]})]})]}),(0,x.jsx)(t.default,{style:[C.MARKETING.section,C.MARKETING.sectionAlt],children:(0,x.jsxs)(t.default,{style:L.epaRow,children:[(0,x.jsxs)(t.default,{style:L.epaText,children:[(0,x.jsx)(o.default,{style:L.epaTitle,children:"Integrated with EPA AirNow"}),(0,x.jsx)(o.default,{style:L.epaDesc,children:"PurpleAir sensor data is integrated into the official EPA Fire and Smoke Map at fire.airnow.gov, supplementing government monitoring stations with community-powered data during wildfire events."})]}),(0,x.jsx)(t.default,{style:L.epaAside,children:(0,x.jsx)(c.ExternalLink,{href:"https://fire.airnow.gov",style:L.secondaryButton,children:(0,x.jsx)(o.default,{style:L.secondaryButtonText,children:"View Fire & Smoke Map"})})})]})}),(0,x.jsxs)(t.default,{style:[C.MARKETING.ctaSection,{backgroundColor:y.COLORS.MAP_GREEN}],children:[(0,x.jsx)(o.default,{style:C.MARKETING.ctaTitle,children:"See Your Air Quality"}),(0,x.jsx)(o.default,{style:C.MARKETING.ctaSubtitle,children:"Explore the map to find sensors near you, or add your own sensor to the network."}),(0,x.jsxs)(t.default,{style:C.MARKETING.ctaActions,children:[(0,x.jsx)(f.ServiceExternalLink,{service:"mapBaseUrl",style:R.ctaButton,children:(0,x.jsx)(o.default,{style:R.ctaButtonText,children:"Open the Map"})}),(0,x.jsx)(O.PreviewMapEntryButton,{style:R.ctaSecondaryButton,textStyle:R.ctaSecondaryButtonText,label:"Try the New Map"}),(0,x.jsx)(l.AppLink,{to:"Store",style:R.ctaSecondaryButton,children:(0,x.jsx)(o.default,{style:R.ctaSecondaryButtonText,children:"Get a Sensor"})})]})]})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2]));r(d[3]);var n=e(r(d[4])),s=r(d[5]),l=r(d[6]),c=r(d[7]),u=r(d[8]),S=r(d[9]),f=r(d[10]),h=r(d[11]),y=r(d[12]),C=r(d[13]),E=r(d[14]),A=r(d[15]),p=r(d[16]),O=r(d[17]),x=r(d[18]);const T=(0,C.createHeroButtonStyles)(y.COLORS.TEXT_INVERSE,y.COLORS.MAP_GREEN),R=(0,C.createCTAButtonStyles)(y.COLORS.TEXT_INVERSE,y.COLORS.MAP_GREEN);function G({title:e,description:n}){return(0,x.jsxs)(t.default,{style:L.feature,children:[(0,x.jsx)(o.default,{style:L.featureTitle,children:e}),(0,x.jsx)(o.default,{style:L.featureDesc,children:n})]})}const L=(0,s.createStyles)({container:{backgroundColor:y.COLORS.BG_SURFACE,flex:1},heroActionsCentered:{alignSelf:'stretch',justifyContent:'center'},primaryButton:{backgroundColor:y.COLORS.BG_SURFACE,borderRadius:8,paddingHorizontal:E.SPACING.HUGE,paddingVertical:E.SPACING.LG},primaryButtonText:{color:y.COLORS.MAP_GREEN,fontSize:A.FONT_SIZE.XL,fontWeight:'600'},section:{paddingHorizontal:E.SPACING.XXL,paddingVertical:E.SPACING.JUMBO},sectionAlt:{backgroundColor:y.COLORS.BG_LIGHT},sectionTitle:Object.assign({color:y.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:E.SPACING.HUGE,textAlign:'center'},{fontSize:A.FONT_SIZE.DISPLAY_ML}),featuresGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:E.SPACING.XXL,justifyContent:'center',maxWidth:1e3},feature:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:E.SPACING.XXL,width:300},featureTitle:{color:y.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.XL,fontWeight:'600',marginBottom:E.SPACING.SM},featureDesc:{color:y.COLORS.TEXT_SOFT,fontSize:A.FONT_SIZE.LG,lineHeight:24},useCasesGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:E.SPACING.XXL,justifyContent:'center',maxWidth:900},useCase:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:E.SPACING.XXL,width:400},useCaseTitle:{color:y.COLORS.MAP_GREEN,fontSize:A.FONT_SIZE.XL,fontWeight:'600',marginBottom:E.SPACING.MD},useCaseDesc:{color:y.COLORS.TEXT_SECONDARY,fontSize:A.FONT_SIZE.LG,lineHeight:24},epaRow:Object.assign({alignSelf:'center',gap:E.SPACING.XXL,maxWidth:1e3,width:'100%'},{alignItems:'center',flexDirection:'row',flexWrap:'wrap'}),epaText:Object.assign({},{flexBasis:280,flexGrow:1,flexShrink:1}),epaAside:{alignItems:'flex-start'},epaTitle:{color:y.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.XXXL,fontWeight:'bold',marginBottom:E.SPACING.LG},epaDesc:{color:y.COLORS.TEXT_SECONDARY,fontSize:A.FONT_SIZE.XL,lineHeight:28},secondaryButton:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.MAP_GREEN,borderRadius:8,borderWidth:2,paddingHorizontal:E.SPACING.XXL,paddingVertical:E.SPACING.LG},secondaryButtonText:{color:y.COLORS.MAP_GREEN,fontSize:A.FONT_SIZE.LG,fontWeight:'600'},ctaSection:{alignItems:'center',backgroundColor:y.COLORS.MAP_GREEN,paddingHorizontal:E.SPACING.XXL,paddingVertical:E.SPACING.JUMBO},ctaTitle:Object.assign({color:y.COLORS.TEXT_INVERSE,fontSize:A.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:E.SPACING.MD,textAlign:'center'},{fontSize:A.FONT_SIZE.DISPLAY_ML}),ctaSubtitle:{color:y.COLORS.OVERLAY_LIGHT_90,fontSize:A.FONT_SIZE.XL,marginBottom:E.SPACING.XXXL,maxWidth:500,textAlign:'center'},ctaButtons:{flexDirection:'row',flexWrap:'wrap',gap:E.SPACING.LG,justifyContent:'center'},ctaButtonPrimary:{backgroundColor:y.COLORS.BG_SURFACE,borderRadius:8,paddingHorizontal:E.SPACING.XXXL,paddingVertical:E.SPACING.LG},ctaButtonPrimaryText:{color:y.COLORS.MAP_GREEN,fontSize:A.FONT_SIZE.LG,fontWeight:'600'},ctaButtonSecondary:{backgroundColor:y.COLORS.TRANSPARENT,borderColor:y.COLORS.TEXT_INVERSE,borderRadius:8,borderWidth:2,paddingHorizontal:E.SPACING.XXXL,paddingVertical:E.SPACING.LG},ctaButtonSecondaryText:{color:y.COLORS.TEXT_INVERSE,fontSize:A.FONT_SIZE.LG,fontWeight:'600'}})},673,[34,276,222,95,283,489,516,519,674,568,522,565,490,676,493,494,562,677,104]);
772__d(function(g,r,i,a,m,_e,d){"use strict";
772function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.HeroSection=function(e){const{width:l}=(0,n.default)(),{background:S,minHeight:h=400,stableImageFrame:s,label:_,title:E,subtitle:L,centered:I,labelColor:f,titleColor:A,subtitleColor:R,enhancedSubtitleContrast:H=!1,children:x}=e,X=e.backgroundColor,N=(D=S,'imageUrl'in D),P=X??c.COLORS.BRAND_PRIMARY,k=I??!N,j=N&&null!=s?b(l,h,s.imageAspectRatio,s.verticalPosition):void 0,p=N?Object.assign({backgroundImage:`${S.overlayGradient??O}, url("${S.imageUrl}")`,backgroundSize:j?.backgroundSize??'cover',backgroundPosition:j?.backgroundPosition??S.imagePosition??'center'},null!=j&&{backgroundRepeat:'no-repeat'}):{backgroundImage:S.gradient},v=[C.hero,Object.assign({backgroundColor:P},{minHeight:h,justifyContent:'center'}),p],G=[C.heroContent,k&&C.heroContentCentered],W=N?u.TEXT_SHADOW_STYLES.HERO_LABEL:{},Y=N?u.TEXT_SHADOW_STYLES.HERO_TITLE:{},y=N?u.TEXT_SHADOW_STYLES.HERO_SUBTITLE:{},z=N&&H?u.TEXT_SHADOW_STYLES.HERO_CONTRAST:y;var D;return(0,T.jsx)(o.default,{style:v,children:(0,T.jsxs)(o.default,{style:G,children:[null!=_&&(0,T.jsx)(t.default,{style:[C.heroLabel,k&&C.heroTextCentered,W,null!=f&&''!==f?{color:f}:void 0],children:_}),(0,T.jsx)(t.default,{style:[C.heroTitle,k&&C.heroTextCentered,Y,null!=A&&''!==A?{color:A}:void 0],children:E}),null!=L&&(0,T.jsx)(t.default,{style:[C.heroSubtitle,H&&C.heroSubtitleEnhancedContrast,k&&C.heroTextCentered,z,null!=R&&''!==R?{color:R}:void 0],children:L}),x]})})},r(d[0]),r(d[1]);var t=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),l=r(d[5]),c=r(d[6]),S=r(d[7]),u=r(d[8]),h=r(d[9]),s=r(d[10]),T=r(d[11]);const O=S.GRADIENTS.HERO_OVERLAY,_={fontSize:s.FONT_SIZE.XXL,lineHeight:32},E={fontSize:s.FONT_SIZE.DISPLAY_XL,lineHeight:58};function b(e,t,n,o){const l=Math.max(e,t*n),c=l/n;return{backgroundPosition:`center ${String((t-c)*o)}px`,backgroundSize:`${String(l)}px ${String(c)}px`}}const C=(0,l.createStyles)({hero:{paddingHorizontal:h.SPACING.XXL,paddingVertical:h.SPACING.HERO},heroContent:{alignSelf:'center',maxWidth:800,width:'100%'},heroContentCentered:{alignItems:'center'},heroLabel:{color:c.COLORS.OVERLAY_LIGHT_90,fontSize:s.FONT_SIZE.MD,fontWeight:'600',letterSpacing:2,marginBottom:h.SPACING.LG},heroSubtitle:Object.assign({color:c.COLORS.OVERLAY_LIGHT_95,fontSize:s.FONT_SIZE.XL,lineHeight:28,marginBottom:h.SPACING.XXXL,maxWidth:560},_),heroSubtitleEnhancedContrast:{fontWeight:'500',maxWidth:480},heroTextCentered:{textAlign:'center'},heroTitle:Object.assign({color:c.COLORS.TEXT_INVERSE,fontSize:s.FONT_SIZE.DISPLAY_ML,fontWeight:'bold',lineHeight:44,marginBottom:h.SPACING.XL},E)})},674,[34,95,222,552,276,489,490,675,491,493,494,104]);
773__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"GRADIENTS",{enumerable:!0,get:function(){return R}});var O=r(d[0]);const R={HERO_OVERLAY:`linear-gradient(to bottom, ${O.COLORS.OVERLAY_DARK_15} 0%, ${O.COLORS.OVERLAY_DARK_04} 50%, rgba(0,0,0,0.2) 100%)`,LANDING_OVERLAY:`linear-gradient(to bottom, ${O.COLORS.OVERLAY_DARK_15} 0%, ${O.COLORS.OVERLAY_DARK_04} 50%, rgba(0,0,0,0.25) 100%)`,FOOTER_WARM:`linear-gradient(135deg, ${O.COLORS.BG_WARM} 0%, ${O.COLORS.BG_WARM_END} 100%)`,DARK_OVERLAY:`linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 50%, ${O.COLORS.OVERLAY_DARK_50} 100%)`}},675,[490]);
774__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MARKETING",{enumerable:!0,get:function(){return c}}),e.createHeroButtonStyles=function(c,l){return(0,t.createStyles)({primaryButton:{backgroundColor:c,borderRadius:8,paddingHorizontal:n.SPACING.XXXL,paddingVertical:n.SPACING.LG},primaryButtonText:{color:l,fontSize:S.FONT_SIZE.LG,fontWeight:'600'},secondaryButton:{backgroundColor:o.COLORS.TRANSPARENT,borderColor:o.COLORS.TEXT_INVERSE,borderRadius:8,borderWidth:2,paddingHorizontal:n.SPACING.XXXL,paddingVertical:n.SPACING.LG},secondaryButtonText:{color:o.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'}})},e.createCTAButtonStyles=function(c,l){return(0,t.createStyles)({ctaButton:{backgroundColor:c,borderRadius:8,paddingHorizontal:n.SPACING.HUGE,paddingVertical:n.SPACING.LG},ctaButtonText:{color:l,fontSize:S.FONT_SIZE.XL,fontWeight:'600'},ctaSecondaryButton:{backgroundColor:o.COLORS.TRANSPARENT,borderColor:o.COLORS.OVERLAY_LIGHT_30,borderRadius:8,borderWidth:2,paddingHorizontal:n.SPACING.HUGE,paddingVertical:n.SPACING.LG},ctaSecondaryButtonText:{color:o.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.XL,fontWeight:'600'}})},r(d[0]);
774var t=r(d[1]),o=r(d[2]),n=r(d[3]),S=r(d[4]);const c=(0,t.createStyles)({container:{backgroundColor:o.COLORS.BG_SURFACE,flex:1},section:{paddingHorizontal:n.SPACING.XXL,paddingVertical:n.SPACING.JUMBO},sectionAlt:{backgroundColor:o.COLORS.BG_LIGHT},sectionTitle:Object.assign({color:o.COLORS.TEXT_HEADING,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:n.SPACING.HUGE,textAlign:'center'},{fontSize:S.FONT_SIZE.DISPLAY_ML}),sectionTitleCompact:Object.assign({color:o.COLORS.TEXT_HEADING,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:n.SPACING.MD,textAlign:'center'},{fontSize:S.FONT_SIZE.DISPLAY_ML}),sectionSubtitle:{alignSelf:'center',color:o.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.XL,marginBottom:n.SPACING.HUGE,maxWidth:600,textAlign:'center'},sectionSubtitleLight:{alignSelf:'center',color:o.COLORS.OVERLAY_LIGHT_85,fontSize:S.FONT_SIZE.XL,marginBottom:n.SPACING.HUGE,maxWidth:600,textAlign:'center'},sectionTitleLight:Object.assign({color:o.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:n.SPACING.MD,textAlign:'center'},{fontSize:S.FONT_SIZE.DISPLAY_ML}),heroActions:{flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.LG},grid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.XXL,justifyContent:'center',maxWidth:1e3},gridWide:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.XXL,justifyContent:'center',maxWidth:1100},ctaSection:{alignItems:'center',paddingHorizontal:n.SPACING.XXL,paddingVertical:n.SPACING.JUMBO},ctaTitle:Object.assign({color:o.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:n.SPACING.MD,textAlign:'center'},{fontSize:S.FONT_SIZE.DISPLAY_ML}),ctaSubtitle:{color:o.COLORS.OVERLAY_LIGHT_90,fontSize:S.FONT_SIZE.XL,marginBottom:n.SPACING.XXXL,maxWidth:500,textAlign:'center'},ctaActions:{flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.LG,justifyContent:'center'}})},676,[95,489,490,493,494]);
775__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PreviewMapEntryButton=function({style:s,textStyle:u,label:c=o}){if('undefined'==typeof window)return null;const y=(0,t.readExternalUrlLinkProps)(`${window.location.origin}${n.UNIVERSAL_MAP_PREVIEW_PATH}`);if(null===y)return null;return(0,l.jsx)(t.ExternalLink,Object.assign({},y,{target:"_self",style:s,textStyle:u,accessibilityLabel:c,children:c}))},r(d[0]),r(d[1]);
775var t=r(d[2]),n=r(d[3]),l=r(d[4]);const o='Try the new map (preview)'},677,[34,95,519,669,104]);
776__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AboutScreen=function(){const e=(0,O.useSeoMeta)('About');return(0,T.jsxs)(h.PageLayout,{children:[(0,T.jsx)(f.WebMeta,Object.assign({},e)),(0,T.jsxs)(o.default,{style:I.container,children:[(0,T.jsx)(u.HeroSection,{backgroundColor:y.COLORS.BRAND_PRIMARY,background:{imageUrl:"https://images.unsplash.com/photo-1743823144992-49174051002a?w=1920&q=80",imagePosition:"center"},minHeight:450,label:"OUR STORY",title:'Born from a\nPersonal Mission',subtitle:"In 2015, a Utah engineer concerned about dust from a nearby gravel pit built his own air quality sensor. That personal project became PurpleAir - now the world's largest network of community air quality monitors.",centered:!1}),(0,T.jsx)(t.default,{style:I.storySection,children:(0,T.jsxs)(t.default,{style:I.storyContent,children:[(0,T.jsx)(n.default,{style:I.storySectionTitle,children:"The Beginning"}),(0,T.jsx)(n.default,{style:I.storyParagraph,children:"Adrian Dybwad, originally from South Africa, was living in Draper, Utah when he noticed something troubling - a nearby gravel pit was kicking up dust, and he had no way to know how bad the air quality actually was. The closest government air quality monitors were miles away, providing readings that didn't reflect what was happening in his own backyard."}),(0,T.jsx)(n.default,{style:I.storyParagraph,children:"With a background in electronics and programming, Adrian decided to build his own solution. He developed a low-cost, Wi-Fi-enabled sensor that could measure particulate matter in real-time and display the data online. The sensor used dual laser particle counters for accuracy and redundancy - a design choice that would become a hallmark of PurpleAir sensors."}),(0,T.jsx)(n.default,{style:I.storyParagraph,children:"In late 2015, Adrian built 80 sensors and gave them away for free to neighbors and friends around the Salt Lake Valley. His original vision was to create a nonprofit community monitoring network. But as word spread and demand grew, what started as a personal project evolved into something much bigger."}),(0,T.jsx)(n.default,{style:I.storyParagraph,children:"About a year in, Amanda joined Adrian - becoming his partner in both the business and in life. Together, they've built PurpleAir into what it is today."})]})}),(0,T.jsx)(t.default,{style:I.brandSection,children:(0,T.jsxs)(t.default,{style:I.brandContent,children:[(0,T.jsx)(t.default,{style:I.colorSwatch}),(0,T.jsx)(n.default,{style:I.brandTitle,children:"Why This Specific Purple?"}),(0,T.jsx)(n.default,{style:I.brandText,children:"The brand color - #a4a in shorthand - holds a personal meaning. Like initials carved into a tree, it represents \"Adrian 4 Amanda\" - the couple who built PurpleAir together. A love story encoded into every pixel of the brand."})]})}),(0,T.jsxs)(t.default,{style:I.timelineSection,children:[(0,T.jsx)(n.default,{style:I.sectionTitle,children:"Our Journey"}),(0,T.jsxs)(t.default,{style:I.timeline,children:[(0,T.jsx)(b,{year:"2015",title:"The First Sensors",description:"Adrian builds 80 sensors and distributes them for free around the Salt Lake Valley to create the first community air quality network."}),(0,T.jsx)(b,{year:"2016",title:"PurpleAir is Founded",description:"Overwhelming demand leads to the formal establishment of PurpleAir as a company, manufacturing sensors for individuals and organizations."}),(0,T.jsx)(b,{year:"2018",title:"California Wildfires",description:"PurpleAir sensors gain national attention during devastating California wildfires as residents seek real-time, hyperlocal air quality data."}),(0,T.jsx)(b,{year:"2020",title:"AirNow Fire and Smoke Map Integration",description:"The EPA and U.S. Forest Service integrate PurpleAir data into the official Fire and Smoke Map (fire.airnow.gov), expanding wildfire air quality coverage with thousands of community sensors."}),(0,T.jsx)(b,{year:"2021",title:"Enhanced Map & Municipal Networks",description:"PurpleAir launches an enhanced real-time map with improved features. Cities like Pasaden
776a begin deploying municipal sensor networks for community health monitoring."}),(0,T.jsx)(b,{year:"2022",title:"PurpleAir Flex",description:"The PurpleAir Flex is introduced with user-replaceable laser counters and expansion ports for future upgrades, making sensors more maintainable and versatile."}),(0,T.jsx)(b,{year:"2023",title:"New Products & Partnerships",description:"The PurpleAir Zen launches with LED air quality indicators. Universities and health departments across the country begin deploying sensor networks for community health initiatives."}),(0,T.jsx)(b,{year:"2024",title:"PurpleAir PIXEL",description:"The PurpleAir PIXEL is born - the world's smallest air quality sensor. A breakthrough in miniaturization that brings accurate air quality monitoring to new form factors."}),(0,T.jsx)(b,{year:"2025",title:"35,000+ Sensors Worldwide",description:"The network spans 100+ countries. State agencies from Massachusetts to Montana expand deployments. Tribal nations, universities, and communities worldwide rely on PurpleAir for real-time air quality data."})]})]}),(0,T.jsxs)(t.default,{style:[p.MARKETING.section,I.statsSection],children:[(0,T.jsx)(n.default,{style:I.sectionTitle,children:"Our Impact"}),(0,T.jsxs)(t.default,{style:I.statsGrid,children:[(0,T.jsxs)(t.default,{style:I.statCard,children:[(0,T.jsx)(n.default,{style:I.statNumber,children:"35,000+"}),(0,T.jsx)(n.default,{style:I.statLabel,children:"Sensors Deployed"})]}),(0,T.jsxs)(t.default,{style:I.statCard,children:[(0,T.jsx)(n.default,{style:I.statNumber,children:"100+"}),(0,T.jsx)(n.default,{style:I.statLabel,children:"Countries"})]}),(0,T.jsxs)(t.default,{style:I.statCard,children:[(0,T.jsx)(n.default,{style:I.statNumber,children:"Real-Time"}),(0,T.jsx)(n.default,{style:I.statLabel,children:"Data Updates"})]}),(0,T.jsxs)(t.default,{style:I.statCard,children:[(0,T.jsx)(n.default,{style:I.statNumber,children:"EPA"}),(0,T.jsx)(n.default,{style:I.statLabel,children:"Integrated"})]})]})]}),(0,T.jsx)(t.default,{style:[p.MARKETING.section,p.MARKETING.sectionAlt],children:(0,T.jsxs)(t.default,{style:I.techContent,children:[(0,T.jsx)(n.default,{style:I.sectionTitle,children:"The Technology"}),(0,T.jsx)(n.default,{style:I.techParagraph,children:"The PurpleAir Flex and Zen contain dual laser particle counters - a deliberate design choice that provides redundancy and allows for real-time accuracy verification. If the two sensors diverge significantly, the data is flagged, ensuring reliability across the network. The Touch offers a single laser counter for indoor use, while the PIXEL uses a revolutionary solid-state particulate matter detector with no moving parts."}),(0,T.jsx)(n.default,{style:I.techParagraph,children:"PurpleAir sensors measure PM1.0, PM2.5, and PM10 particulate matter, along with temperature, humidity, and pressure. Data is transmitted via Wi-Fi and displayed in real-time on the PurpleAir Map, creating a crowdsourced air quality monitoring network that complements official government stations."}),(0,T.jsx)(n.default,{style:I.techParagraph,children:"The EPA has developed correction factors specifically for PurpleAir sensors, which are applied to the data displayed on the official AirNow Fire and Smoke Map. This collaboration between citizen science and government agencies represents a new model for environmental monitoring."})]})}),(0,T.jsxs)(t.default,{style:I.pressSection,children:[(0,T.jsx)(n.default,{style:I.sectionTitle,children:"In the Press"}),(0,T.jsx)(n.default,{style:I.sectionSubtitle,children:"Coverage of PurpleAir's journey from a personal project to global network"}),(0,T.jsxs)(t.default,{style:I.articlesGrid,children:[(0,T.jsx)(x,{source:"LA Times",year:"2025",title:"New Network of Air Pollution Monitors Launches Near Palisades Fire",url:"https://www.latimes.com/environment/story/2025-07-22/new-air-pollution-network"}),(0,T.jsx)(x,{source:"WIRED",year:"2025",title:"Why It's So Confusing to Determine Air Quality in Los Angeles Right Now",url:"https://www.wired.com/story/confusing-air-quality-los-angeles-aqi/"}),(0,T.jsx)(x,{source:"Boston Globe",year:"2024",title:"Massachusetts to Deploy Hundreds of Community Air Pollution Sensors",url:"https://www.bostonglobe.com/2024/04/23/science/massachusetts-community-air-sensors-environmental-justice/"}),(0,T.jsx)(x,{source:"NPR",year:"2023",title:"3 Lessons From the Western U.S. for Dealing With Wildfire Smoke",url:"https://www.npr.org/2023/06/09/1181179929/wildfire-smoke-health-wester
776n-tips"}),(0,T.jsx)(x,{source:"KQED",year:"2022",title:"From PurpleAir to AirNow, Your Air Quality Maps for Wildfire Smoke",url:"https://www.kqed.org/science/1969271/making-sense-of-purple-air-vs-airnow-and-a-new-map-to-rule-them-all"}),(0,T.jsx)(x,{source:"Business Wire",year:"2021",title:"PurpleAir's 30,000 Citizen Scientists Give Communities Real-Time Air Information",url:"https://www.businesswire.com/news/home/20210921005311/en/PurpleAirs-30000-Citizen-Scientists-Across-the-World-Give-Communities-Real-Time-Information-About-the-Air-They-Breathe"}),(0,T.jsx)(x,{source:"SFGATE",year:"2021",title:"The Story Behind the Website Bay Area Residents Check During Wildfires",url:"https://www.sfgate.com/news/article/The-story-behind-website-Bay-Area-PurpleAir-16393480.php"}),(0,T.jsx)(x,{source:"EPA",year:"2020",title:"EPA Research Improves Air Quality Information on AirNow Fire and Smoke Map",url:"https://www.epa.gov/sciencematters/epa-research-improves-air-quality-information-public-airnow-fire-and-smoke-map"}),(0,T.jsx)(x,{source:"WIRED",year:"2020",title:"The Bay Area Just Tur
776ned Orange. All Eyes Are on PurpleAir",url:"https://www.wired.com/story/bay-area-just-turned-orange-all-eyes-on-purpleair/"}),(0,T.jsx)(x,{source:"Euronews",year:"2019",title:"High-Tech California Relies on Utah Startup to See How Smoky It Is",url:"https://www.euronews.com/2019/10/31/high-tech-california-relies-startup-utah-see-how-smoky-its-n1074906"}),(0,T.jsx)(x,{source:"KVPR",year:"2018",title:"How PurpleAir's Founder Put Air Quality Monitoring in the Hands of the Public",url:"https://www.kvpr.org/health/2018-02-06/how-purpleairs-founder-put-air-quality-monitoring-in-the-hands-of-the-public"}),(0,T.jsx)(x,{source:"CBC News",year:"2017",title:"Kamloops Professor Calls Ministry Air Quality Readings 'Completely Inadequate'",url:"https://www.cbc.ca/news/canada/british-columbia/kamloops-air-quality-1.3976491"})]})]}),(0,T.jsx)(t.default,{style:I.missionSection,children:(0,T.jsxs)(t.default,{style:I.missionContent,children:[(0,T.jsx)(n.default,{style:I.missionTitle,children:"Our Mission"}),(0,T.jsx)(n.default,{style:I.missionText,children:"To democratize air quality monitoring by putting accurate, real-time data in the hands of individuals and communities worldwide. Because everyone deserves to know what they're breathing."})]})}),(0,T.jsxs)(t.default,{style:I.ctaSection,children:[(0,T.jsx)(n.default,{style:I.ctaTitle,children:"Join the Network"}),(0,T.jsx)(n.default,{style:I.ctaSubtitle,children:"Add your own sensor to the world's largest community air quality monitoring network."}),(0,T.jsxs)(t.default,{style:p.MARKETING.ctaActions,children:[(0,T.jsx)(l.AppLink,{to:"Store",style:I.ctaButtonPrimary,children:(0,T.jsx)(n.default,{style:I.ctaButtonPrimaryText,children:"Get a Sensor"})}),(0,T.jsx)(S.ServiceExternalLink,{service:"mapBaseUrl",style:I.ctaButtonSecondary,accessibilityLabel:"View the Map",children:(0,T.jsx)(n.default,{style:I.ctaButtonSecondaryText,children:"View the Map"})})]})]})]})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2]));r(d[3]);var o=e(r(d[4])),s=r(d[5]),l=r(d[6]),c=r(d[7]),u=r(d[8]),h=r(d[9]),S=r(d[10]),f=r(d[11]),y=r(d[12]),p=r(d[13]),A=r(d[14]),w=r(d[15]),C=r(d[16]),O=r(d[17]),T=r(d[18]);function b({year:e,title:o,description:s}){return(0,T.jsxs)(t.default,{style:I.timelineEvent,children:[(0,T.jsxs)(t.default,{style:I.timelineYearContainer,children:[(0,T.jsx)(n.default,{style:I.timelineYear,children:e}),(0,T.jsx)(t.default,{style:I.timelineDot})]}),(0,T.jsxs)(t.default,{style:I.timelineContent,children:[(0,T.jsx)(n.default,{style:I.timelineTitle,children:o}),(0,T.jsx)(n.default,{style:I.timelineDesc,children:s})]})]})}function x({source:e,title:t,url:o,year:s}){return(0,T.jsxs)(c.ExternalLink,{href:o,style:I.articleCard,accessibilityLabel:`Read ${e} article: ${t}`,children:[(0,T.jsxs)(n.default,{style:I.articleSource,children:[e," - ",s]}),(0,T.jsx)(n.default,{style:I.articleTitle,children:t}),(0,T.jsx)(n.default,{style:I.articleLink,children:"Read Article"})]})}const I=(0,s.createStyles)({container:{backgroundColor:y.COLORS.BG_SURFACE,flex:1},storySection:{backgroundColor:y.COLORS.BG_SURFACE,paddingHorizontal:w.SPACING.XXL,paddingVertical:w.SPACING.JUMBO},storyContent:{alignSelf:'center',maxWidth:700,width:'100%'},storySectionTitle:{color:y.COLORS.BRAND_PRIMARY,fontSize:C.FONT_SIZE.MD,fontWeight:'600',letterSpacing:2,marginBottom:w.SPACING.XXL,textTransform:'uppercase'},storyParagraph:Object.assign({color:y.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.XL,lineHeight:30,marginBottom:w.SPACING.XXL},{fontSize:C.FONT_SIZE.XL,lineHeight:32}),brandSection:{backgroundColor:y.COLORS.BRAND_BG_SELECTED,paddingHorizontal:w.SPACING.XXL,paddingVertical:w.SPACING.JUMBO},brandContent:{alignItems:'center',alignSelf:'center',maxWidth:600,width:'100%'},colorSwatch:Object.assign({backgroundColor:y.COLORS.BRAND_PRIMARY,borderRadius:16,height:80,marginBottom:w.SPACING.XXL,width:80},A.VIEW_SHADOW_STYLES.BRAND_SWATCH),brandTitle:Object.assign({color:y.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:w.SPACING.LG,textAlign:'center'},{fontSize:C.FONT_SIZE.DISPLAY_MD}),brandText:Object.assign({color:y.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.XL,fontStyle:'italic',lineHeight:28,textAlign:'center'},{fontSize:C.FONT_SIZE.XXL,lineHeight:32}),timelineSection:{backgroundColor:y.COLORS.BG_SURFACE,paddingHorizontal:w.SPACING.XXL,paddingVertical:w.SPACING.JUMBO},sectionTitle:Object.assign({color:y.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:w.SPACING.HUGE,textAlign:'center'},{fontSize:C.FONT_SIZE.DISPLAY_ML}),sectionSubtitle:{alignSelf:'center',color:y.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.XL,marginBottom:w.SPACING.HUGE,maxWidth:600,textAlign:'center'},timeline:{alignSelf:'center',maxWidth:700,width:'100%'},timelineEvent:{flexDirection:'row',marginBottom:w.SPACING.XXXL},timelineYearContainer:{alignItems:'center',width:80},timelineYear:{color:y.COLORS.BRAND_PRIMARY,fontSize:C.FONT_SIZE.LG,fontWeight:'bold',marginBottom:w.SPACING.SM},timelineDot:{backgroundColor:y.COLORS.BRAND_PRIMARY,borderRadius:6,height:12,width:12},timelineContent:{borderLeftColor:y.COLORS.BORDER_LIGHT,borderLeftWidth:2,flex:1,marginLeft:-6,paddingBottom:w.SPACING.LG,paddingLeft:w.SPACING.XXL},timelineTitle:{color:y.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.XL,fontWeight:'600',marginBottom:w.SPACING.SM},timelineDesc:{color:y.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.LG,lineHeight:24},statsSection:{backgroundColor:y.COLORS.BRAND_PRIMARY},statsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:w.SPACING.XXL,justifyContent:'center',maxWidth:800},statCard:{alignItems:'center',backgroundColor:y.COLORS.OVERLAY_LIGHT_15,borderRadius:16,minWidth:160,paddingHorizontal:w.SPACING.HUGE,paddingVertical:w.SPACING.XXXL},statNumber:{color:y.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:w.SPACING.SM},statLabel:{color:y.COLORS.OVERLAY_LIGHT_90,fontSize:C.FONT_SIZE.MD,fontWeight:'500'},techContent:{alignSelf:'center',maxWidth:700,width:'100%'},techParagraph:{color:y.COLORS.TEXT_DIM,fontSize:C.FONT_SIZE.LG,lineHeight:28,marginBottom:w.SPACING.XL},pressSection:{backgroundColor:y.COLORS.BG_SURFACE,paddingHorizontal:w.SPACING.XXL,paddingVertical:w.SPACING.JUMBO},articlesGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:w.SPACING.XL,justifyContent:'center',maxWidth:1e3},articleCard:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:w.SPACING.XXL,width:300},articleSource:{color:y.COLORS.BRAND_PRIMARY,fontSize:C.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,marginBottom:w.SPACING.SM},articleTitle:{color:y.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.LG,fontWeight:'600',lineHeight:24,marginBottom:w.SPACING.MD},articleLink:{color:y.COLORS.BRAND_PRIMARY,fontSize:C.FONT_SIZE.MD,fontWeight:'600'},missionSection:{backgroundColor:y.COLORS.BG_DARK,paddingHorizontal:w.SPACING.XXL,paddingVertical:w.SPACING.HERO},missionContent:{alignItems:'center',alignSelf:'center',maxWidth:700,width:'100%'},missionTitle:{color:y.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.MD,fontWeight:'600',letterSpacing:2,marginBottom:w.SPACING.XXL,textTransform:'uppercase'},missionText:Object.assign({color:y.COLORS.OVERLAY_LIGHT_90,fontSize:C.FONT_SIZE.XXXL,fontWeight:'300',lineHeight:38,textAlign:'center'},{fontSize:C.FONT_SIZE.DISPLAY_SM,lineHeight:44}),ctaSection:{alignItems:'center',backgroundColor:y.COLORS.BG_SURFACE,borderTopColor:y.COLORS.BORDER,borderTopWidth:1,paddingHorizontal:w.SPACING.XXL,paddingVertical:w.SPACING.JUMBO},ctaTitle:Object.assign({color:y.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:w.SPACING.MD,textAlign:'center'},{fontSize:C.FONT_SIZE.DISPLAY_ML}),ctaSubtitle:{color:y.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.XL,marginBottom:w.SPACING.XXXL,maxWidth:500,textAlign:'center'},ctaButtonPrimary:{backgroundColor:y.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:w.SPACING.XXXL,paddingVertical:w.SPACING.LG},ctaButtonPrimaryText:{color:y.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.LG,fontWeight:'600'},ctaButtonSecondary:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:2,paddingHorizontal:w.SPACING.XXXL,paddingVertical:w.SPACING.LG},ctaButtonSecondaryText:{color:y.COLORS.ACTION_PRIMARY,fontSize:C.FONT_SIZE.LG,fontWeight:'600'}})},678,[34,276,222,95,283,489,516,519,674,568,522,565,490,676,491,493,494,562,104]);
777__d(function(g,r,i,a,m,_e,d){"use strict";
777function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AdminSeoScreen=function(){const e=(0,A.useSeoMeta)('AdminSeo'),{isPhone:t}=(0,L.useResponsive)(),{data:o,loading:s,error:u}=(0,T.useAsyncData)(()=>h.seo.status(),[],'Failed to load SEO status.');return(0,E.jsxs)(y.PageLayout,{children:[(0,E.jsx)(j.WebMeta,Object.assign({},e)),(0,E.jsx)(n.default,{style:J.scroll,children:(0,E.jsxs)(c.default,{style:[J.container,{paddingHorizontal:t?R.SPACING.MD:R.SPACING.LG,paddingVertical:t?R.SPACING.LG:R.SPACING.XXL}],children:[(0,E.jsx)(l.default,{style:J.title,children:"SEO Status"}),(0,E.jsx)(l.default,{style:J.subtitle,children:"The served state of the launch surface. Every claim links to the live artifact."}),s&&(0,E.jsx)(l.default,{style:J.summaryLine,children:"Loading\u2026"}),null!=u&&(0,E.jsx)(M,{tone:"warn",children:u}),null!=o&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(k,{status:o}),(0,E.jsx)(F,{status:o}),(0,E.jsx)(B,{status:o}),(0,E.jsx)(W,{status:o}),(0,E.jsx)(H,{status:o}),(0,E.jsx)(z,{}),(0,E.jsx)(V,{})]})]})})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),h=r(d[7]),f=r(d[8]),x=r(d[9]),p=r(d[10]),b=r(d[11]),S=r(d[12]),y=r(d[13]),j=r(d[14]),C=r(d[15]),R=r(d[16]),O=r(d[17]),T=r(d[18]),L=r(d[19]),A=r(d[20]),w=r(d[21]),I=r(d[22]),E=r(d[23]);const N=[{file:'redirects',label:'redirects.config.json'},{file:'seo-registry',label:'seo-registry.json'},{file:'route-manifest',label:'route-manifest.json'}],P='https://search.google.com/test/rich-results?url=';function v({title:e,info:t,children:n}){return(0,E.jsxs)(x.Card,{style:J.card,children:[(0,E.jsxs)(c.default,{style:J.cardHeader,children:[(0,E.jsx)(l.default,{style:J.cardTitle,children:e}),(0,E.jsx)(S.InfoTip,{text:t,accessibilityLabel:`About ${e}`})]}),n]})}function D({path:e,label:t,accessibilityLabel:n}){if('undefined'==typeof window)return null;const o=(0,b.readExternalUrlLinkProps)(window.location.origin+e);return null==o?null:(0,E.jsx)(b.ExternalLink,Object.assign({},o,{accessibilityLabel:n??`Open ${t??e} in a new tab`,children:(0,E.jsx)(l.default,{style:J.link,children:t??e})}))}function G({path:e}){if('undefined'==typeof window)return null;const t=(0,b.readExternalUrlLinkProps)(P+encodeURIComponent(window.location.origin+e));return null==t?null:(0,E.jsx)(b.ExternalLink,Object.assign({},t,{accessibilityLabel:"Test in Google Rich Results",children:(0,E.jsx)(l.default,{style:J.link,children:"Test in Google Rich Results"})}))}function M({tone:e,children:t}){return(0,E.jsx)(c.default,{style:[J.badge,Y[e]],children:(0,E.jsx)(l.default,{style:[J.badgeText,q[e]],children:t})})}function _({label:e,children:t}){return(0,E.jsxs)(c.default,{style:J.kvRow,children:[(0,E.jsx)(l.default,{style:J.kvLabel,children:e}),(0,E.jsx)(c.default,{style:J.kvValue,children:t})]})}function k({status:e}){const t=e.sitemap.children.reduce((e,t)=>e+(t.urlCount??0),0),n=e.sitemap.children.filter(e=>null==e.urlCount).length;return(0,E.jsxs)(c.default,{style:J.summaryStrip,children:[(0,E.jsx)(M,{tone:e.posture.productionIndexable?'ok':'neutral',children:e.posture.productionIndexable?'INDEXABLE':'CRAWL-BLOCKED (dark launch)'}),(0,E.jsx)(M,{tone:n>0?'warn':'ok',children:n>0?`sitemap: ${n} child cold`:`sitemap: ${t} URLs`}),(0,E.jsx)(M,{tone:"neutral",children:`${e.registry.indexableRoutes} indexable routes`}),(0,E.jsx)(M,{tone:"neutral",children:`${e.redirects.pathRules.length} redirect rules`})]})}function F({status:e}){const t=e.posture;return(0,E.jsxs)(v,{title:"Indexing Posture",info:"The committed seo.indexing-posture drives BOTH crawl controls atomically: robots.txt and the X-Robots-Tag header. Responses are indexable only when the environment is production AND the posture is indexable. Changing it requires editing IndexingPostureConfigGuardTest in the same commit (the recorded go-live decision). Verify via the served robots.txt link, not this summary.",children:[(0,E.jsx)(_,{label:"Environment",children:(0,E.jsx)(l.default,{style:J.mono,children:t.environment})}),(0,E.jsx)(_,{label:"Posture",children:(0,E.jsxs)(l.default,{style:J.mono,children:[t.indexingPosture," (effective: ",t.effectivePosture,")"]})}),(0,E.jsx)(_,{label:"Crawlers see",children:(0,E.jsx)(M,{tone:t.productionIndexable?'ok':'neutral',children:t.productionIndexable?'INDEXABLE':'BLOCKED / NOINDEX'})}),(0,E.jsx)(_,{label:"Canonical base",children:(0,E.jsx)(l.default,{style:J.mono,children:t.siteUrl})}),(0,E.jsx)(_,{label:"Host canonicalization",children:(0,E.jsx)(l.default,{style:J.mono,children:''!==t.canonicalHost?t.canonicalHost:'off (non-production)'})}),(0,E.jsx)(c.default,{style:J.codeBox,children:(0,E.jsx)(l.default,{style:J.monoBlock,children:e.robotsTxtBody.trim()})}),(0,E.jsx)(D,{path:"/robots.txt",label:"View served /robots.txt"})]})}function B({status:e}){return(0,E.jsxs)(v,{title:"Sitemaps",info:"Derived at request time from the route manifest and live data services -- there is no hand-maintained URL list. Only indexable, self-canonical pages can appear. A \"cold\" 
777child means the product cache has not warmed and the child is serving 503 + Retry-After: the inventory is indeterminate, deliberately never an empty 200 (which would tell crawlers the products were deleted).",children:[e.sitemap.children.map(e=>(0,E.jsxs)(c.default,{style:J.sitemapRow,children:[(0,E.jsxs)(c.default,{style:J.sitemapPathCell,children:[(0,E.jsx)(D,{path:e.path}),'ok'!==e.note&&(0,E.jsx)(l.default,{style:J.subtle,children:e.note})]}),(0,E.jsx)(M,{tone:null!=e.urlCount?'ok':'warn',children:null!=e.urlCount?`${e.urlCount} URLs`:'503 (cold)'})]},e.path)),(0,E.jsx)(c.default,{style:J.cardFooter,children:(0,E.jsx)(D,{path:"/sitemap.xml",label:"View sitemap index"})})]})}function X(e,t){return t&&!e.noIndex?{label:'GATED BUT INDEXABLE',tone:'warn'}:e.noIndex?{label:t?'noindex (gated)':'noindex',tone:'neutral'}:null!=e.externalCanonical?{label:`canonical: ${e.externalCanonical}`,tone:'neutral'}:{label:'indexable',tone:'ok'}}function W({status:e}){const n=e.registry,o=(0,t.useMemo)(()=>new Set(Object.entries(f.ROUTE_ACCESS_MAP).filter(([,e])=>'public'!==e).map(([e])=>e)),[]),s=(0,t.useMemo)(()=>[{id:'path',header:'Path',accessor:e=>e.path,render:e=>(0,E.jsx)(l.default,{style:J.monoCell,children:e.path}),minWidth:200},{id:'name',header:'Route',accessor:e=>e.name,minWidth:150},{id:'policy',header:'Policy',accessor:e=>X(e,o.has(e.name)).label,render:e=>{const t=X(e,o.has(e.name));return(0,E.jsx)(M,{tone:t.tone,children:t.label})},minWidth:180},{id:'dynamic',header:'Dynamic',accessor:e=>e.dynamic,type:'boolean',width:90}
777],[o]);return(0,E.jsxs)(v,{title:"Metadata Coverage",info:"Every servable route has a generated registry entry (the generator refuses routes without an seo block). Auth-gated routes must be noindex -- a gated page advertised as indexable would be sitemap-promoted to crawlers who can only see a login redirect. A build test enforces this, so a GATED BUT INDEXABLE badge here means the build is being bypassed. Use \"Inspect a Path\" below to see resolved tags.",children:[(0,E.jsxs)(l.default,{style:J.summaryLine,children:[n.totalRoutes," routes: ",n.indexableRoutes," indexable,",' ',n.noindexRoutes," noindex, ",n.externalCanonicalRoutes," external-canonical"]}),(0,E.jsx)(p.ColumnTable,{columns:s,rows:n.routes,getRowKey:e=>e.name,emptyMessage:"No registry routes loaded.",testID:"seo-coverage-table"})]})}function H({status:e}){const n=e.redirects,o=(0,t.useMemo)(()=>[{id:'from',header:'From',accessor:e=>e.from,render:e=>e.pattern||e.computed?(0,E.jsx)(l.default,{style:J.monoCell,children:e.from}):(0,E.jsx)(D,{path:e.from}),minWidth:160},{id:'to',header:'To',accessor:e=>e.to,render:e=>(0,E.jsx)(l.default,{style:J.monoCell,children:e.to}),minWidth:200},{id:'kind',header:'Kind',accessor:e=>e.computed?'computed':e.pattern?'pattern':'exact',width:90},{id:'status',header:'Status',accessor:e=>e.status,type:'number',width:70},{id:'query',header:'Query',accessor:e=>e.preservesQuery,type:'boolean',width:70},{id:'reason',header:'Reason',accessor:e=>e.reason,render:e=>(0,E.jsx)(l.default,{style:J.cellWrap,children:e.reason}),minWidth:200}],[]);return(0,E.jsxs)(v,{title:"Redirects",info:"The authored redirect catalog (shared/redirects/redirects.config.json): exact rules, regex patterns for unbounded slug families, and DECLARATIONS of redirects implemented in code (Kind = computed; \"To\" names the class). Every entry carries a reason. Rules apply on every host; requests on apex or retired storefront hosts get the rule applied in the SAME response that canonicalizes the host, so any legacy URL reaches its final target in one hop (corpus-tested). Exact sources link to the live URL to verify the actual Location header. \"Deliberately not redirected\" lists reviewed non-redirects. Dedicated host redirects preserve the path and query while targeting the listed host, so this view is the complete index of the surface.",children:[(0,E.jsx)(_,{label:"Alias hosts",children:(0,E.jsx)(l.default,{style:J.mono,children:n.aliasRedirectHosts.length>0?n.aliasRedirectHosts.join(', '):'none configured'})}),(0,E.jsx)(_,{label:"Store hosts",children:(0,E.jsx)(l.default,{style:J.mono,children:n.storeRedirectHosts.length>0?n.storeRedirectHosts.join(', '):'none configured'})}),(0,E.jsx)(_,{label:"Dedicated host redirects",children:(0,E.jsx)(l.default,{style:J.mono,children:n.hostRedirects.length>0?n.hostRedirects.map(e=>`${e.sourceHost} \u2192 ${e.targetHost}`).join(', '):'none configured'})}),(0,E.jsx)(p.ColumnTable,{columns:o,rows:n.pathRules,getRowKey:e=>`${e.from}|${e.to}`,emptyMessage:"No path redirect rules.",testID:"seo-redirects-table"}),(0,E.jsx)(U,{entries:n.deliberatelyAbsent})]})}function U({entries:e}){return 0===e.length?null:(0,E.jsxs)(c.default,{style:J.codeBox,children:[(0,E.jsx)(l.default,{style:J.sectionLabel,children:"Deliberately not redirected"}),e.map(e=>(0,E.jsx)(_,{label:e.path,children:(0,E.jsx)(l.default,{style:J.subtle,children:e.reason})},e.path))]})}function z(){const[e,n]=(0,t.useState)(null),[o,u]=(0,t.useState)(null),[f,x]=(0,t.useState)(null),p=async t=>{if(x(null),u(null),e!==t){n(t);try{u(JSON.stringify(await h.seo.source({path:{file:t}}),null,2))}catch(e){w.logger.error('[AdminSeoScreen] source file load failed:',e),x('Failed to load the source file.')}}else n(null)};return(0,E.jsxs)(v,{title:"Source Files",info:"The raw authored and generated JSON the backend loaded from its classpath -- the redirect catalog, the SEO registry (generated from the route table), and the route manifest. Reading these shows the exact source of truth behind every card above, without a repo checkout.",children:[(0,E.jsx)(c.default,{style:J.inspectorRow,children:N.map(t=>(0,E.jsxs)(c.default,{style:J.sourceFileGroup,children:[(0,E.jsx)(s.default,{style:[J.button,e===t.file&&J.buttonActive],onPress:()=>{p(t.file)},accessibilityRole:"button",accessibilityState:{expanded:e===t.file},accessibilityLabel:e===t.file?`Collapse ${t.label}`:`Expand ${t.label}`,testID:`seo-source-${t.file}`,children:(0,E.jsx)(l.default,{style:J.buttonText,children:t.label})}),(0,E.jsx)(D,{path:`/api/v1/seo/source/${t.file}`,label:"raw",accessibilityLabel:`Open ${t.label} raw JSON in a new tab`})]},t.file))}),null!=f&&(0,E.jsx)(M,{tone:"warn",children:f}),null!=o&&(0,E.jsx)(c.default,{style:J.codeBox,children:(0,E.jsx)(l.default,{style:J.monoBlock,children:o})})]})}async function $(e){const t=await fetch(e,{headers:{Accept:'text/html'},credentials:'omit'}),n=await t.text();return{status:t.status,redirected:t.redirected,finalUrl:t.url,xRobotsTag:t.headers.get('x-robots-tag'),head:(0,I.parseSeoHead)(n)}}function K(e){const t=`${e.xRobotsTag??''} ${e.head.robots??''}`;return 200===e.status&&!t.includes('noindex')}function Z({path:e,probe:t}){return(0,E.jsxs)(c.default,{style:J.codeBox,children:[(0,E.jsx)(_,{label:"HTTP status",children:(0,E.jsx)(M,{tone:(n=t.status,n>=200&&n<300?'ok':n>=500?'warn':'neutral'),children:String(t.status)})}),t.redirected&&(0,E.jsx)(_,{label:"Redirected to",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.finalUrl})}),null!=t.xRobotsTag&&(0,E.jsx)(_,{label:"X-Robots-Tag",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.xRobotsTag})}),(0,E.jsx)(_,{label:"robots meta",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.head.robots??'(none \u2014 indexable by default)'})}),(0,E.jsx)(_,{label:"title",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.head.title??'(none)'})}),(0,E.jsx)(_,{label:"description",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.head.description??'(none)'})}),(0,E.jsx)(_,{label:"canonical",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.head.canonicalUrl??'(none)'})}),(0,E.jsx)(_,{label:"og:type",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.head.ogType??'(none)'})}),(0,E.jsx)(_,{label:"JSON-LD",children:(0,E.jsx)(l.default,{style:J.monoCell,children:t.head.hasJsonLd?'present':'absent'})}),(0,E.jsxs)(c.default,{style:J.inspectorLinks,children:[(0,E.jsx)(D,{path:e,label:"Open the live page"}),K(t)&&(0,E.jsx)(G,{path:e})]})]});var n}function V(){const[e,n]=(0,t.useState)('/'),[u,h]=(0,t.useState)(null),[f,x]=(0,t.useState)(null),p=async()=>
777{if(x(null),e.startsWith('/')&&!e.startsWith('//'))try{h({path:e,result:await $(e)})}catch(e){w.logger.error('[AdminSeoScreen] path probe failed:',e),x('Probe failed. Check the path and try again.')}else x('Enter a site-relative path starting with a single "/".')};return(0,E.jsxs)(v,{title:"Inspect a Path",info:"Fetches the REAL page (cookie-less, like a crawler) and reports exactly what the server sent: the HTTP status, the X-Robots-Tag header, and the head tags parsed from the served HTML. Redirects are followed and reported with their final URL. For indexable 200s, the Rich Results link runs Google\u2019s own structured-data verification against the live URL.",children:[(0,E.jsxs)(c.default,{style:J.inspectorRow,children:[(0,E.jsx)(o.default,{style:J.input,value:e,onChangeText:n,placeholder:"/products/purpleair-flex",autoCapitalize:"none",autoCorrect:!1,onSubmitEditing:()=>{p()},testID:"seo-inspect-path"}),(0,E.jsx)(s.default,{style:J.button,onPress:()=>{p()},accessibilityRole:"button",accessibilityLabel:"Inspect path",testID:"seo-inspect-run",children:(0,E.jsx)(l.default,{style:J.buttonText,children:"Inspect"})})]}),null!=f&&(0,E.jsx)(M,{tone:"warn",children:f}),null!=u&&(0,E.jsx)(Z,{path:u.path,probe:u.result})]})}const Y={ok:{backgroundColor:C.COLORS.SUCCESS_BG},warn:{backgroundColor:C.COLORS.ERROR_BG},neutral:{backgroundColor:C.COLORS.BRAND_BG_SURFACE}},q={ok:{color:C.COLORS.SUCCESS},warn:{color:C.COLORS.ERROR},neutral:{color:C.COLORS.TEXT_SLATE}},J=(0,u.createStyles)({scroll:{flex:1},container:{alignSelf:'center',maxWidth:1600,width:'100%'},title:{color:C.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.XXL,fontWeight:'bold'},subtitle:{color:C.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.MD,marginBottom:R.SPACING.LG},summaryStrip:{flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.SM,marginBottom:R.SPACING.LG},card:{marginBottom:R.SPACING.LG},cardHeader:{alignItems:'center',flexDirection:'row',gap:R.SPACING.SM,marginBottom:R.SPACING.MD},cardTitle:{color:C.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.LG,fontWeight:'bold'},cardFooter:{marginTop:R.SPACING.SM},summaryLine:{color:C.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.MD,marginBottom:R.SPACING.SM},kvRow:{alignItems:'center',flexDirection:'row',gap:R.SPACING.MD,paddingVertical:R.SPACING.XS},kvLabel:{color:C.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.SM,fontWeight:'bold',width:160},kvValue:{flex:1,flexDirection:'row',flexWrap:'wrap'},sitemapRow:{alignItems:'center',borderTopColor:C.COLORS.BORDER_LIGHT,borderTopWidth:1,flexDirection:'row',gap:R.SPACING.MD,justifyContent:'space-between',paddingVertical:R.SPACING.SM},sitemapPathCell:{flex:1},subtle:{color:C.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.SM},mono:{color:C.COLORS.TEXT_DARK,fontFamily:O.FONT_FAMILY.MONOSPACE,fontSize:O.FONT_SIZE.SM},monoCell:{color:C.COLORS.TEXT_DARK,fontFamily:O.FONT_FAMILY.MONOSPACE,fontSize:O.FONT_SIZE.SM},cellWrap:{color:C.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.SM},monoBlock:{color:C.COLORS.TEXT_DARK,fontFamily:O.FONT_FAMILY.MONOSPACE,fontSize:O.FONT_SIZE.SM,lineHeight:19},codeBox:{backgroundColor:C.COLORS.BRAND_BG_SURFACE,borderColor:C.COLORS.BORDER_LIGHT,borderRadius:6,borderWidth:1,marginVertical:R.SPACING.SM,padding:R.SPACING.MD},link:{color:C.COLORS.BRAND_PRIMARY,fontSize:O.FONT_SIZE.SM,textDecorationLine:'underline'},badge:{alignSelf:'flex-start',borderRadius:12,paddingHorizontal:R.SPACING.SM,paddingVertical:2},badgeText:{fontSize:O.FONT_SIZE.XS,fontWeight:'bold'},inspectorRow:{flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.SM,marginBottom:R.SPACING.SM},sourceFileGroup:{alignItems:'center',flexDirection:'row',gap:R.SPACING.XS,marginRight:R.SPACING.SM},sectionLabel:{color:C.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.SM,fontWeight:'bold',marginBottom:R.SPACING.XS},inspectorLinks:{flexDirection:'row',gap:R.SPACING.LG,marginTop:R.SPACING.SM},input:{borderColor:C.COLORS.BORDER_LIGHT,borderRadius:6,borderWidth:1,flex:1,fontFamily:O.FONT_FAMILY.MONOSPACE,padding:R.SPACING.SM},button:{backgroundColor:C.COLORS.ACTION_PRIMARY,borderRadius:6,justifyContent:'center',paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.SM},buttonActive:{backgroundColor:C.COLORS.TEXT_DARK},buttonText:{color:C.COLORS.BG_SURFACE,fontWeight:'bold'}})},679,[34,283,222,394,488,276,489,471,485,605,680,519,697,568,565,490,493,494,561,553,562,469,699,104]);
778__d(function(g,r,i,a,m,e,d){"use strict";
778Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ColumnTable",{enumerable:!0,get:function(){return t.ColumnTable}}),Object.defineProperty(e,"isClampedTextTruncated",{enumerable:!0,get:function(){return t.isClampedTextTruncated}}),Object.defineProperty(e,"readDomTextOverflow",{enumerable:!0,get:function(){return t.readDomTextOverflow}}),Object.defineProperty(e,"tableContentWidth",{enumerable:!0,get:function(){return t.tableContentWidth}}),Object.defineProperty(e,"textLikelyClips",{enumerable:!0,get:function(){return t.textLikelyClips}}),Object.defineProperty(e,"ColumnSelector",{enumerable:!0,get:function(){return n.ColumnSelector}}),Object.defineProperty(e,"useTableSort",{enumerable:!0,get:function(){return o.useTableSort}}),Object.defineProperty(e,"useColumnVisibility",{enumerable:!0,get:function(){return u.useColumnVisibility}}),Object.defineProperty(e,"sortRows",{enumerable:!0,get:function(){return l.sortRows}}),Object.defineProperty(e,"cellText",{enumerable:!0,get:function(){return c.cellText}}),Object.defineProperty(e,"columnsToCsv",{enumerable:!0,get:function(){return c.columnsToCsv}}),Object.defineProperty(e,"downloadColumnsCsv",{enumerable:!0,get:function(){return b.downloadColumnsCsv}}),Object.defineProperty(e,"filterRows",{enumerable:!0,get:function(){return f.filterRows}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),u=r(d[3]),l=r(d[4]),c=r(d[5]),b=r(d[6]),f=r(d[7])},680,[681,690,691,693,692,688,694,696]);
779__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.expandedTextStyle=j,_e.expandedWordBreakStyle=function(e){return e?R:void 0},_e.tableContentWidth=E,_e.isClampedTextTruncated=L,_e.readDomTextOverflow=M,_e.textLikelyClips=k,_e.ColumnTable=function({columns:e,rows:c,getRowKey:x,sort:p=null,onSort:h,emptyMessage:f="No rows found.",align:C="center",getRowStyle:S,getRowTestID:O,testID:w,compactContent:R,compactBreakpoint:j}){const I=(0,t.useMemo)(()=>E(e),[e]),[L,M]=(0,t.useState)(new Set),[A,B]=(0,t.useState)(new Map),N=(0,t.useCallback)(e=>{M(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),P=(0,t.useCallback)((e,t,n,l)=>{const s=_(e,t);B(e=>{const t=e.get(s);if(t?.text===n&&t.truncated===l)return e;const o=new Map(e);return o.set(s,{text:n,truncated:l}),o})},[]),G=(0,t.useCallback)((t,n)=>e.some((e,l)=>{const s=n[l]??'';if(!s.includes('\n')&&!k(e,s))return!1;const o=A.get(_(t,e.id));return!0===o?.truncated&&o.text===s}),[e,A]);if(0===c.length)return(0,b.jsx)(s.default,{style:$.emptyContainer,testID:w,children:(0,b.jsx)(n.default,{style:$.emptyText,children:f})});return(0,b.jsxs)(u.ResponsiveTable,Object.assign({minWidth:I},void 0!==R?{compactContent:R}:{},void 0!==j?{compactBreakpoint:j}:{},null!=w?{testID:w}:{},{children:[(0,b.jsxs)(u.ResponsiveTableHeader,{children:[(0,b.jsx)(u.ResponsiveTableCell,{align:"center",style:$.expandCell}),e.map(e=>{const t=p?.column===e.id,s=!1!==e.enableSort&&null!=h,o=t?y[p.direction]:'',c=e.align??C,x=[$.headerText,{textAlign:v[c]}];return(0,b.jsx)(u.ResponsiveTableCell,Object.assign({align:c,style:W(e)},null!=w?{testID:`${w}-header-${e.id}`}:{},{children:e.renderHeader??(s?(0,b.jsx)(l.default,{onPress:()=>{h(e.id)},accessibilityRole:"button",accessibilityLabel:`Sort by ${e.header}`,children:(0,b.jsxs)(n.default,{style:[x,t&&$.headerTextSorted],children:[e.header,o]})}):(0,b.jsx)(n.default,{style:x,children:e.header}))}),e.id)})]}),c.map(t=>{const s=x(t),c=O?.(t),p=L.has(s),h=e.map(e=>(0,T.cellText)(e,t)),f=e.map((e,n)=>null==e.exportValue?h[n]??'':(0,o.formatCellValue)(e.accessor(t),e.type)),y=p||G(s,f);return(0,b.jsxs)(u.ResponsiveTableRow,Object.assign({},null!=c?{testID:c}:{},{style:[p?$.rowExpanded:void 0,S?.(t)],children:[y?(0,b.jsx)(u.ResponsiveTableCell,{align:"center",style:$.expandCell,children:(0,b.jsx)(l.default,{onPress:()=>{N(s)},accessibilityRole:"button",accessibilityLabel:p?`Collapse row ${s}`:`Expand row ${s}`,accessibilityState:{expanded:p},children:(0,b.jsx)(n.default,{style:$.expandChevron,children:p?'\u25bc':'\u25b6'})})}):(0,b.jsx)(u.ResponsiveTableCell,{align:"center",style:$.expandCell}),e.map((e,n)=>(0,b.jsx)(u.ResponsiveTableCell,Object.assign({align:e.align??C,style:W(e)},null!=w?{testID:`${w}-cell-${s}-${e.id}`}:{},{children:null!=e.render?e.render(t,{isExpanded:p}):(0,b.jsx)(D,{column:e,row:t,isExpanded:p,precomputedText:h[n]??'',rowKey:s,onTruncationChange:P})}),e.id))]}),s)})]}))};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),o=r(d[5]),c=r(d[6]),u=r(d[7]),x=r(d[8]),p=r(d[9]),h=r(d[10]),f=r(d[11]),T=r(d[12]),b=r(d[13]);const C={boolean:80,datetime:170,number:100,string:150},y={asc:' \u25b2',desc:' \u25bc'},S=32,O=9,w=2*p.SPACING.SM,R={wordBreak:'break-word'};function j(e){return e?[$.cellText,R]:$.cellText}const v={center:'center',end:'right',start:'left'};function W(e){if(null!=e.width)return{flexBasis:e.width,flexGrow:0,maxWidth:e.width,minWidth:e.width};const t=e.minWidth??C[e.type??'string'];return Object.assign({flexBasis:t,flexGrow:e.flexGrow??1,minWidth:t},null!=e.maxWidth?{maxWidth:e.maxWidth}:{})}function I(e){return e.width??e.minWidth??C[e.type??'string']}function E(e){return e.reduce((e,t)=>
779e+I(t),S)}function _(e,t){return`${e}\0${t}`}function L(e,t,n){if(0===t.length)return!1;if(1===n&&t.includes('\n'))return!0;if(e.length>n)return!0;const l=e.map(e=>e.text).join('');return(l.endsWith('\u2026')&&!t.endsWith('\u2026')?l.slice(0,-1):l).length<t.length}function M(e){if(null==e||'object'!=typeof e)return null;if(!('clientWidth'in e)||!('scrollWidth'in e))return null;const{clientWidth:t,scrollWidth:n}=e;return'number'!=typeof t||'number'!=typeof n?null:n>t}function k(e,t){if(t.includes('\n'))return!0;const n=I(e)-w,l=Math.floor(n/O);return t.length>l}function D({column:e,row:n,isExpanded:l,precomputedText:s,rowKey:x,onTruncationChange:p}){const h=null==e.exportValue?s:(0,o.formatCellValue)(e.accessor(n),e.type),f=(0,t.useRef)(null),T=e.id,C=(h.includes('\n')||k(e,h))&&!l,y=(0,t.useCallback)(e=>{if(!C)return;if(h.includes('\n'))return void p(x,T,h,!0);const t=null!=e&&'target'in e?e.target:null,n=M(f.current)??M(t);null!=n&&p(x,T,h,n)},[T,p,x,C,h]),S=(0,t.useCallback)(e=>{},[T,p,x,C,h]),O=(0,t.useCallback)(e=>{y(e)},[y]),w=(0,b.jsx)(u.ResponsiveTableText,Object.assign({ref:f,style:j(l)},C?{numberOfLines:1,onTextLayout:S,onLayout:O}:l?{}:{numberOfLines:1},{children:h}));return l||0===h.length||!k(e,h)?w:(0,b.jsx)(c.HoverTooltip,{text:h,children:w})}const $=(0,f.createStyles)({cellText:{color:x.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.SM},emptyContainer:{borderColor:x.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:p.SPACING.XL},emptyText:{color:x.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.MD,textAlign:'center'},expandCell:{flexBasis:S,flexGrow:0,minWidth:S,paddingHorizontal:0},expandChevron:{color:x.COLORS.TEXT_CAPTION,fontSize:h.FONT_SIZE.XS},headerText:{color:x.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},headerTextSorted:{color:x.COLORS.ACTION_PRIMARY},rowExpanded:{alignItems:'flex-start',backgroundColor:x.COLORS.BG_WASH}})},681,[34,95,222,488,276,682,686,687,490,493,494,489,688,104]);
780__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DataTable",{enumerable:!0,get:function(){return t.DataTable}}),Object.defineProperty(e,"camelToTitle",{enumerable:!0,get:function(){return n.camelToTitle}}),Object.defineProperty(e,"formatCellValue",{enumerable:!0,get:function(){return n.formatCellValue}});var t=r(d[0]),n=r(d[1])},682,[683,684]);
781__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DataTable=function({columns:e,columnTypes:c,rows:u,getRowKey:f,sort:x=null,onSort:O,loading:y=!1,emptyMessage:b="No rows found.",columnWidths:p}){const[w,j]=(0,t.useState)(new Set),I=(0,t.useCallback)(e=>{j(t=>{const l=new Set(t);return l.has(e)?l.delete(e):l.add(e),l})},[]),L=(0,t.useMemo)(()=>{const t=new Map;for(const l of e)if(null!=p?.[l])t.set(l,{width:p[l]});else{const e=C[c[l]??'string'];1===e.flex?t.set(l,{flex:1,minWidth:e.fixed}):t.set(l,{width:e.fixed})}return t},[e,c,p]);if(0===u.length)return(0,S.jsx)(s.default,{style:T.emptyContainer,children:(0,S.jsx)(o.default,{style:T.emptyText,children:b})});return(0,S.jsx)(s.default,{style:[T.container,y&&T.containerLoading],children:(0,S.jsx)(l.default,{horizontal:!0,showsHorizontalScrollIndicator:!0,children:(0,S.jsxs)(s.default,{style:T.table,children:[(0,S.jsxs)(s.default,{style:T.headerRow,children:[(0,S.jsx)(s.default,{style:T.chevronCell}),e.map(e=>{const t=x?.column===e,l=t?'asc'===x.direction?' \u25b2':' \u25bc':'';return(0,S.jsx)(n.default,{style:[T.cell,L.get(e)],onPress:null!=O?()=>{O(e)}:void 0,disabled:null==O,accessibilityRole:"button",children:(0,S.jsxs)(o.default,{style:[T.headerText,t&&T.headerTextSorted],children:[(0,h.camelToTitle)(e),l]})},e)})]}),u.map(t=>{const l=f(t),u=w.has(l),x=R(t,e,c);return(0,S.jsx)(s.default,{children:(0,S.jsxs)(s.default,{style:[T.dataRow,u&&T.dataRowExpanded],children:[x?(0,S.jsx)(n.default,{style:T.chevronCell,onPress:()=>{I(l)},accessibilityRole:"button",accessibilityLabel:u?'Collapse row':'Expand row',children:(0,S.jsx)(o.default,{style:T.chevronText,children:u?'\u25bc':'\u25b6'})}):(0,S.jsx)(s.default,{style:T.chevronCell}),e.map(e=>(0,S.jsx)(s.default,{style:[T.cell,L.get(e)],children:(0,S.jsx)(o.default,{style:T.cellText,numberOfLines:u?void 0:1,selectable:!0,children:(0,h.formatCellValue)(t[e],c[e])})},e))]})},l)})]})})})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),c=r(d[5]),u=r(d[6]),f=r(d[7
781]),x=r(d[8]),h=r(d[9]),S=r(d[10]);const C={boolean:{fixed:80,flex:0},number:{fixed:120,flex:0},datetime:{fixed:160,flex:1},string:{fixed:140,flex:1}},O=24;function R(e,t,l){return t.some(t=>{const o=(0,h.formatCellValue)(e[t],l[t]);return o.includes('\n')||o.length>O})}const T=(0,x.createStyles)({cell:{paddingHorizontal:u.SPACING.MD},cellText:{color:c.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.SM},chevronCell:{alignItems:'center',justifyContent:'center',width:32},chevronText:{color:c.COLORS.TEXT_CAPTION,fontSize:f.FONT_SIZE.XS},container:{borderColor:c.COLORS.BORDER,borderRadius:8,borderWidth:1,overflow:'hidden'},containerLoading:{opacity:.6},dataRow:{alignItems:'center',borderBottomColor:c.COLORS.BORDER_NEUTRAL,borderBottomWidth:1,flexDirection:'row',paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.MD},dataRowExpanded:{alignItems:'flex-start',backgroundColor:c.COLORS.BG_WASH},emptyContainer:{padding:u.SPACING.XL},emptyText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.MD,textAlign:'center'},headerRow:{backgroundColor:c.COLORS.BG_WASH,borderBottomColor:c.COLORS.BORDER,borderBottomWidth:1,flexDirection:'row',paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.MD},headerText:{color:c.COLORS.TEXT_SECONDARY,fontSize:f.FONT_SIZE.XS,fontWeight:'600',textTransform:'uppercase'},headerTextSorted:{color:c.COLORS.ACTION_PRIMARY},table:{minWidth:'100%'}})},683,[34,283,222,488,276,490,493,494,489,684,104]);
782__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatCellValue=function(t,o){if(null==t)return'\u2014';if(null!=o)return n[o](t);if('boolean'==typeof t)return t?'true':'false';return String(t)},e.camelToTitle=function(t){return t.replace(/([a-z])([A-Z])/g,'$1 $2').replace(/([A-Z]+)([A-Z][a-z])/g,'$1 $2').replace(/^./,t=>t.toUpperCase())};var t=r(d[0]);const n={datetime:n=>'string'==typeof n?(0,t.formatIsoDateTime)(n):String(n),boolean:t=>!0===t||1===t||'1'===t?'Yes':'No',number:t=>'number'==typeof t?t.toLocaleString():String(t),string:t=>String(t)}},684,[685]);
783__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatTimeAgo=function(n){const o=new Date(n),u=(new Date).getTime()-o.getTime(),c=Math.floor(u/6e4);if(c<60)return`${c}m ago`;const f=Math.floor(c/60);if(f<24)return`${f}h ago`;const s=Math.floor(f/24);if(s<30)return`${s}d ago`;return o.toLocaleDateString(t,{month:'short',day:'numeric',year:'numeric'})},e.formatDateLong=function(n){try{const[o,u,c]=n.split('-');return new Date(Number(o),Number(u)-1,Number(c)).toLocaleDateString(t,{year:'numeric',month:'long',day:'numeric'})}catch{return n}},e.formatIsoDateLong=function(n){return new Date(n).toLocaleDateString(t,{year:'numeric',month:'long',day:'numeric'})},e.formatIsoDateShort=function(n){return new Date(n).toLocaleDateString(t,{year:'numeric',month:'short',day:'numeric'})},e.formatIsoTime=function(n,o="--",u=!0){if(null==n||''===n)return o;const c=new Date(n);if(isNaN(c.getTime()))return o;return c.toLocaleTimeString(t,Object.assign({hour:'2-digit',minute:'2-digit'},u?{second:'2-digit'}:{}))},e.formatIsoDateTime=function(n,o="--"){if(null==n||''===n)return o;const u=new Date(n);if(isNaN(u.getTime()))return o;return u.toLocaleDateString(t,{year:'numeric',month:'short',day:'numeric',hour:'2-digit',minute:'2-digit'})},e.formatUtcDayLabel=function(n){return new Date(n).toLocaleDateString(t,{timeZone:'UTC',weekday:'short',year:'numeric',month:'short',day:'numeric'})},e.formatUtcDateTime=function(n){return new Date(n).toLocaleDateString(t,{day:'numeric',hour:'2-digit',hour12:!1,minute:'2-digit',month:'short',timeZone:'UTC',year:'numeric'})},e.formatUtcTimeOfDay=function(n){return new Date(n).toLocaleTimeString(t,{timeZone:'UTC',hour:'2-digit',minute:'2-digit',hour12:!1})};const t='en-US'},685,[]);
784__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.HoverTooltip=function({text:l,children:o}){return(0,t.jsx)("div",{title:l,"aria-label":l,style:n,children:o})},r(d[0]),r(d[1]);var t=r(d[2]);const n={display:'contents'}},686,[34,95,104]);
785__d(function(g,r,i,a,m,_e,d){"use strict";
785function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ResponsiveTable=function({children:e,compactContent:s,compactBreakpoint:c=768,minWidth:h,testID:f}){const{width:D}=(0,u.useResponsive)(),I=void 0===f?void 0:`${f}-scroll`,y=void 0===f?void 0:`${f}-content`,R=void 0===f?void 0:`${f}-compact`,[E,L]=(0,t.useState)(0),[j,T]=(0,t.useState)(0),[_,w]=(0,t.useState)(0),[A,H]=(0,t.useState)(v),M=(0,t.useCallback)(e=>{L(e.nativeEvent.layout.width)},[]),z=(0,t.useCallback)(e=>{T(e)},[]),G=(0,t.useCallback)(e=>{w(e.nativeEvent.contentOffset.x)},[]),N=(0,t.useMemo)(()=>({headerHeight:A,setHeaderHeight:H}),[A]),W=j>E+b&&E>0,F=_>b,P=W&&_+E<j-b,k=W&&F,B=W&&P,$=void 0===f?'responsive-table-overflow-hint':`${f}-overflow-hint`;if(void 0!==s&&D<c)return(0,S.jsx)(l.default,{style:[x.frame,x.compactFrame],testID:f,children:(0,S.jsx)(l.default,{style:x.compactContent,testID:R,children:s})});return(0,S.jsx)(C.Provider,{value:N,children:(0,S.jsxs)(l.default,{style:x.frame,testID:f,children:[W?(0,S.jsx)(o.default,Object.assign({nativeID:$,style:x.overflowDescription,accessible:!1,importantForAccessibility:"no"},void 0===f?{}:{testID:`${f}-overflow-hint`},{children:'Swipe horizontally to see more columns'})):null,(0,S.jsx)(n.default,Object.assign({horizontal:!0,bounces:!1,showsHorizontalScrollIndicator:!0,scrollEventThrottle:16,onLayout:M,onContentSizeChange:z,onScroll:G,style:x.horizontalScroll,contentContainerStyle:x.horizontalScrollContent},void 0===I?{}:{testID:I},{accessibilityLabel:"Data table"},W?{'aria-describedby':$}:{},{children:(0,S.jsx)(l.default,Object.assign({style:[x.table,{minWidth:h}]},void 0===y?{}:{testID:y},{children:e}))})),k?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(O,Object.assign({side:"left"},void 0===f?{}:{testID:`${f}-fade-left`})),(0,S.jsx)(p,Object.assign({side:"left"},void 0===f?{}:{testID:`${f}-chevron-left`}))]}):null,B?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(O,Object.assign({side:"right"},void 0===f?{}:{testID:`${f}-fade-right`})),(0,S.jsx)(p,Object.assign({side:"right"},void 0===f?{}:{testID:`${f}-chevron-right`}))]}):null]})})},_e.ResponsiveTableHeader=function({children:e,style:n,testID:o}){const{setHeaderHeight:s}=(0,t.useContext)(C),c=(0,t.useCallback)(e=>{s(e.nativeEvent.layout.height)},[s]);return(0,S.jsx)(l.default,{style:[x.headerRow,n],testID:o,onLayout:c,children:e})},_e.ResponsiveTableRow=function({children:e,style:t,testID:n}){return(0,S.jsx)(l.default,{style:[x.row,t],testID:n,children:e})},_e.ResponsiveTableCell=function({align:e="start",children:t,style:n,testID:o}){const s='center'===e?x.cellAlignCenter:'end'===e?x.cellAlignEnd:x.cellAlignStart;return(0,S.jsx)(l.default,{style:[x.cell,s,n],testID:o,children:t})},_e.ResponsiveTableHeaderText=function({children:e}){return(0,S.jsx)(o.default,{style:x.headerText,children:e})},Object.defineProperty(_e,"ResponsiveTableText",{enumerable:!0,get:function(){return D}});var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),h=r(d[7]),f=r(d[8]),u=r(d[9]),S=r(d[10]);const b=2,v=2*h.SPACING.MD+f.FONT_SIZE.XS,C=(0,t.createContext)({headerHeight:v,setHeaderHeight:()=>{}});function O({side:e,testID:t}){const n='left'===e?x.fadeLeft:x.fadeRight;{const o={backgroundImage:'left'===e?`linear-gradient(to right, ${c.COLORS.SCROLL_EDGE_SHADOW_OPAQUE}, transparent)`:`linear-gradient(to left, ${c.COLORS.SCROLL_EDGE_SHADOW_OPAQUE}, transparent)`};return(0,S.jsx)(l.default,Object.assign({style:[x.fade,x.pointerEventsNone,n,o]},void 0===t?{}:{testID:t},{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants"}))}}function p({side:e,testID:n}){const{headerHeight:s}=(0,t.useContext)(C);return(0,S.jsx)(l.default,Object.assign({style:[x.headerChevron,x.pointerEventsNone,'left'===e?x.headerChevronLeft:x.headerChevronRight,{height:s}]},void 0===n?{}:{testID:n},{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:(0,S.jsx)(o.default,{style:x.headerChevronText,accessible:!1,children:'left'===e?'\u2039':'\u203a'})}))}const D=(0,t.forwardRef)(({children:e,style:t,numberOfLines:n,ellipsizeMode:l,onTextLayout:s,onLayout:c,testID:h},f)=>(0,S.jsx)(o.default,{ref:f,selectable:!0,style:t,numberOfLines:n,ellipsizeMode:l,onTextLayout:s,onLayout:c,testID:h,children:e}));D.displayName='ResponsiveTableText';const x=(0,s.createStyles)({frame:{backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER,borderRadius:12,borderWidth:1,overflow:'hidden',position:'relative',width:'100%'},compactFrame:{borderWidth:0,overflow:'visible'},compactContent:{gap:h.SPACING.MD},horizontalScroll:{width:'100%'}
785,horizontalScrollContent:{flexGrow:1},table:{width:'100%'},headerRow:{alignSelf:'stretch',backgroundColor:c.COLORS.BG_WASH,borderBottomColor:c.COLORS.BORDER,borderBottomWidth:1,borderTopLeftRadius:11,borderTopRightRadius:11,flexDirection:'row',paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.MD,width:'100%'},row:{alignItems:'center',alignSelf:'stretch',borderBottomColor:c.COLORS.BG_SUBTLE_100,borderBottomWidth:1,flexDirection:'row',paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.MD,width:'100%'},cell:{justifyContent:'center',minWidth:0,paddingHorizontal:h.SPACING.SM},cellAlignCenter:{alignItems:'center'},cellAlignEnd:{alignItems:'flex-end'},cellAlignStart:{alignItems:'flex-start'},fade:{bottom:0,flexDirection:'row',position:'absolute',top:0,width:28,zIndex:2},pointerEventsNone:{pointerEvents:'none'},fadeLeft:{left:0},fadeRight:{right:0},fadeStrip:{flex:1,height:'100%'},fadeStripMid:{backgroundColor:c.COLORS.SCROLL_EDGE_SHADOW_MID},fadeStripOpaque:{backgroundColor:c.COLORS.SCROLL_EDGE_SHADOW_OPAQUE}
785,fadeStripSoft:{backgroundColor:c.COLORS.SCROLL_EDGE_SHADOW_SOFT},headerChevron:{alignItems:'center',justifyContent:'center',position:'absolute',top:0,width:28,zIndex:3},headerChevronLeft:{left:0},headerChevronRight:{right:0},headerChevronText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.MD,fontWeight:'500',includeFontPadding:!1,lineHeight:f.FONT_SIZE.MD,opacity:.55,textAlignVertical:'center'},headerText:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},overflowDescription:{height:1,opacity:0,overflow:'hidden',position:'absolute',width:1}})},687,[34,95,283,222,276,489,490,493,494,553,104]);
786__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.cellText=o,e.columnsToCsv=function(t,u){const l=t.map(t=>({header:t.header,sanitizeFormula:'string'===(t.type??'string')})),s=u.map(n=>t.map(t=>o(t,n)));return(0,n.rowsToCsv)(l,s)};var t=r(d[0]),n=r(d[1]);function o(n,o){return null!=n.exportValue?n.exportValue(o):(0,t.formatCellValue)(n.accessor(o),n.type)}},688,[682,689]);
787__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.escapeCsvField=s,e.rowsToCsv=function(n,t){const c=n.map(n=>s(n.header,!1)).join(','),u=t.map(t=>n.map((n,o)=>s(t[o]??'',n.sanitizeFormula)).join(','));return[c,...u].join(o)};const n=/^[=+\-@\t\r]/,t=/[",\r\n]/,o='\r\n';function s(o,s){const c=s&&n.test(o),u=c?`'${o}`:o;return c||t.test(u)?`"${u.replace(/"/g,'""')}"`:u}},689,[]);
788__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ColumnSelector=function({columns:e,hiddenIds:b,onToggle:h,onToggleAll:u,testID:C}){const[O,A]=(0,t.useState)(!1),x=e.filter(e=>!1!==e.enableHiding).length,I=b.size,T=e.length-I,k=0===I;return(0,R.jsxs)(S.default,{testID:C,children:[(0,R.jsxs)(s.default,{style:[f.button,O&&f.buttonActive],onPress:()=>{A(!0)},accessibilityRole:"button",accessibilityLabel:"Toggle column visibility",children:[(0,R.jsxs)(n.default,{style:[f.buttonText,O&&f.buttonTextActive],children:["Columns",I>0?` (${String(T)}/${String(e.length)})`:'']}),(0,R.jsx)(n.default,{style:[f.caret,O&&f.buttonTextActive],children:'\u25be'})]}),(0,R.jsx)(l.default,{visible:O,transparent:!0,animationType:"fade",onRequestClose:()=>{A(!1)},children:(0,R.jsx)(o.default,{style:f.backdrop,onPress:()=>{A(!1)},accessibilityLabel:"Close column menu",children:(0,R.jsxs)(o.default,{style:f.card,children:[(0,R.jsx)(n.default,{style:f.cardTitle,children:"Show columns"}),(0,R.jsxs)(c.default,{style:f.cardScroll,children:[(0,R.jsxs)(o.default,{style:[f.row,f.toggleAllRow],onPress:u,accessibilityRole:"checkbox",accessibilityState:{checked:k},disabled:0===x,children:[(0,R.jsx)(S.default,{style:[f.checkbox,k&&f.checkboxChecked],children:k&&(0,R.jsx)(n.default,{style:f.checkmark,children:'\u2713'})}),(0,R.jsx)(n.default,{style:[f.label,f.toggleAllLabel],children:k?'Deselect All':'Select All'})]}),e.map(e=>{const t=!b.has(e.id),l=!1===e.enableHiding;return(0,R.jsxs)(o.default,{style:f.row,onPress:()=>{h(e.id)},disabled:l,accessibilityRole:"checkbox",accessibilityState:{checked:t,disabled:l},accessibilityLabel:l?`${e.header} (always shown)`:`${t?'Hide':'Show'} ${e.header}`,children:[(0,R.jsx)(S.default,{style:[f.checkbox,t&&f.checkboxChecked,l&&f.checkboxLocked],children:t&&(0,R.jsx)(n.default,{style:f.checkmark,children:'\u2713'})}),(0,R.jsx)(n.default,{style:[f.label,l&&f.labelLocked],children:e.header})]},e.id)})]})]})})})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),c=e(r(d[3])),n=e(r(d[4])),s=e(r(d[5])),S=e(r(d[6])),b=r(d[7]),h=r(d[8]),u=r(d[9]),C=r(d[10]),O=r(d[11]),R=r(d[12]);const f=(0,O.createStyles)({backdrop:{alignItems:'center',backgroundColor:b.COLORS.OVERLAY_DARK,flex:1,justifyContent:'center',padding:u.SPACING.LG},button:{alignItems:'center',backgroundColor:b.COLORS.BG_WASH,borderColor:b.COLORS.BORDER,borderRadius:8,borderWidth:1,flexDirection:'row',gap:u.SPACING.XS,height:38,paddingHorizontal:u.SPACING.LG},buttonActive:{backgroundColor:b.COLORS.ACTION_PRIMARY,borderColor:b.COLORS.ACTION_PRIMARY},buttonText:{color:b.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.SM,fontWeight:'600'},caret:{color:b.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.XS},buttonTextActive:{color:b.COLORS.TEXT_INVERSE,fontWeight:'600'},card:Object.assign({backgroundColor:b.COLORS.BG_SURFACE,borderRadius:12,maxHeight:'80%',maxWidth:360,overflow:'hidden',paddingVertical:u.SPACING.SM,width:'100%'},h.ELEVATION.MEDIUM),cardScroll:{flexGrow:0},cardTitle:{color:b.COLORS.TEXT_PRIMARY,fontSize:C.FONT_SIZE.MD,fontWeight:'700',paddingBottom:u.SPACING.XS,paddingHorizontal:u.SPACING.MD,paddingTop:u.SPACING.SM},checkbox:{alignItems:'center',borderColor:b.COLORS.BORDER,borderRadius:3,borderWidth:1.5,height:18,justifyContent:'center',width:18},checkboxChecked:{backgroundColor:b.COLORS.ACTION_PRIMARY,borderColor:b.COLORS.ACTION_PRIMARY},checkboxLocked:{opacity:.5},checkmark:{color:b.COLORS.TEXT_INVERSE,fontSize:12,fontWeight:'700',lineHeight:14},label:{color:b.COLORS.TEXT_PRIMARY,fontSize:C.FONT_SIZE.SM},labelLocked:{color:b.COLORS.TEXT_MUTED},row:{alignItems:'center',flexDirection:'row',gap:u.SPACING.SM,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},toggleAllLabel:{fontWeight:'600'},toggleAllRow:{borderBottomColor:b.COLORS.BORDER_LIGHT,borderBottomWidth:1,marginBottom:u.SPACING.XS,paddingBottom:u.SPACING.SM}})},690,[34,544,369,283,222,488,276,490,503,493,494,489,104]);
789__d(function(g,r,i,a,m,e,d){"use strict";
789Object.defineProperty(e,'__esModule',{value:!0}),e.useTableSort=function(t,c){const[u,s]=(0,n.useState)(null),l=(0,n.useCallback)(n=>{s(o=>o?.column===n?'desc'===o.direction?{column:n,direction:'asc'}:null:{column:n,direction:'desc'})},[]),f=(0,n.useMemo)(()=>{if(null==u)return t;const n=c.find(n=>n.id===u.column);return null==n?t:(0,o.sortRows)(t,n.accessor,u.direction)},[t,c,u]);return{sort:u,onSort:l,sortedRows:f}};var n=r(d[0]),o=r(d[1])},691,[34,692]);
790__d(function(g,r,i,_a,m,e,d){"use strict";function n(n,t){return'number'==typeof n&&'number'==typeof t?n-t:'boolean'==typeof n&&'boolean'==typeof t?n===t?0:n?1:-1:String(n).localeCompare(String(t),'en-US',{numeric:!0,sensitivity:'base'})}Object.defineProperty(e,'__esModule',{value:!0}),e.sortRows=function(t,o,u){return[...t].sort((t,s)=>{const f=o(t),c=o(s),l=null==f,a=null==c;if(l&&a)return 0;if(l)return 1;if(a)return-1;const b=n(f,c);return'asc'===u?b:-b})}},692,[]);
791__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useColumnVisibility=function(e,t={}){const{storageKey:c}=t,[f,b]=(0,n.useState)(()=>o(e));(0,n.useEffect)(()=>{if(null==c)return;let t=!0;return(async()=>{try{const n=await l.default.getItem(c);if(!t||null==n)return;const s=JSON.parse(n);if(!Array.isArray(s))return;const o=new Set(s.filter(t=>'string'==typeof t&&e.some(e=>e.id===t&&u(e))));b(o)}catch(e){s.logger.warn('Failed to load column visibility:',e)}})(),()=>{t=!1}},[c]);const y=(0,n.useCallback)(e=>{null!=c&&l.default.setItem(c,JSON.stringify([...e]))},[c]),S=(0,n.useCallback)(t=>{const l=e.find(e=>e.id===t);if(null==l||!u(l))return;const n=new Set(f);n.has(t)?n.delete(t):n.add(t),b(n),y(n)},[e,f,y]),w=(0,n.useCallback)(()=>{const t=0===f.size?new Set(e.filter(u).map(e=>e.id)):new Set;b(t),y(t)},[e,f,y]),C=(0,n.useMemo)(()=>e.filter(e=>!f.has(e.id)),[e,f]),_=(0,n.useCallback)(e=>!f.has(e),[f]);return{visibleColumns:C,hiddenIds:f,isVisible:_,toggle:S,toggleAll:w,allVisible:0===f.size}};var e,t=r(d[0]),l=(e=t)&&e.__esModule?e:{default:e},n=r(d[1]),s=r(d[2]);function u(e){return!1!==e.enableHiding}function o(e){return new Set(e.filter(e=>!0===e.defaultHidden&&u(e)).map(e=>e.id))}},693,[477,34,469]);
792__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.downloadColumnsCsv=async function(s,t,c){const u=(0,o.columnsToCsv)(t,c);return(0,n.downloadCsv)({filename:s,content:u})};var n=r(d[0]),o=r(d[1])},694,[695,688]);
793__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.downloadCsv=function(o){const n=new Blob([t,o.content],{type:'text/csv;charset=utf-8;'}),c=URL.createObjectURL(n);try{const t=document.createElement('a');t.href=c,t.download=o.filename,t.style.display='none',document.body.appendChild(t),t.click(),document.body.removeChild(t)}finally{URL.revokeObjectURL(c)}return Promise.resolve({status:'downloaded'})};const t='\ufeff'},695,[]);
794__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.filterRows=function(o,n,s){const u=s.trim().toLowerCase();if(''===u)return[...n];return n.filter(n=>o.some(o=>(0,t.cellText)(o,n).toLowerCase().includes(u)))};var t=r(d[0])},696,[688]);
795__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.InfoTip=function({intro:e,text:c,accessibilityLabel:f}){const[p,v]=(0,t.useState)(!1),[R,C]=(0,t.useState)(!1),[E,y]=(0,t.useState)(!1),[_,I]=(0,t.useState)(null),[x,A]=(0,t.useState)(null),{width:L,height:T}=(0,u.default)(),w=(0,t.useRef)(null),P=(0,t.useRef)(null),j=p||R||E,D=null===_?null:(0,b.computePopoverPosition)(_,L,T,x??0),N=D?.width??b.POPOVER_WIDTH,B=()=>{const e=w.current;if(null===e||'undefined'==typeof window)return;const t=e.getBoundingClientRect();I({top:t.top,bottom:t.bottom,left:t.left})};(0,t.useLayoutEffect)(()=>{j&&null===x&&null!==P.current&&A(P.current.getBoundingClientRect().height)},[x,j]),(0,t.useEffect)(()=>{if(!j||'undefined'==typeof window)return;const e=()=>{A(null),B()};return window.addEventListener('resize',e),window.addEventListener('scroll',B,!0),()=>{window.removeEventListener('resize',e),window.removeEventListener('scroll',B,!0)}},[j]),(0,t.useEffect)(()=>
795{if(!p||'undefined'==typeof document)return;const e=e=>{const t=e.target;if(!(t instanceof Node))return;const n=!0===w.current?.contains(t),o=!0===P.current?.contains(t);n||o||v(!1)};return document.addEventListener('mousedown',e),()=>{document.removeEventListener('mousedown',e)}},[p]);const H=(0,h.jsx)(o.default,{onPress:()=>{j||A(null),B(),p?(v(!1),y(!1),C(!1)):v(!0)},onHoverIn:()=>{j||A(null),B(),C(!0)},onHoverOut:()=>{C(!1)},onFocus:()=>{j||A(null),B(),y(!0)},onBlur:()=>{y(!1)},accessibilityRole:"button",accessibilityLabel:f??'More information',accessibilityState:{expanded:j},style:O.trigger,testID:"info-tip-trigger",children:(0,h.jsx)(s.default,{style:[O.badge,j&&O.badgeActive],testID:"info-tip-badge",children:(0,h.jsx)(l.default,{style:[O.badgeText,j&&O.badgeTextActive],children:"i"})})}),M=(0,h.jsxs)(s.default,{style:[O.popoverSurface,S.VIEW_SHADOW_STYLES.DROPDOWN_PANEL,{width:N}],testID:"info-tip-popover",children:[null!=e&&(0,h.jsx)(l.default,{style:O.popoverIntro,children:e}),(0,h.jsx)(l.default,{style:O.popoverText,children:c})]}),z={left:D?.left??0,maxHeight:null===x?void 0:D?.maxHeight,overflowY:'auto',position:'fixed',top:D?.top??0,visibility:null===x?'hidden':'visible',zIndex:9999};return(0,h.jsxs)("div",{ref:w,children:[H,j&&null!==D&&'undefined'!=typeof document&&(0,n.createPortal)((0,h.jsx)("div",{ref:P,style:z,children:M}),document.body)]})};var t=r(d[0]),n=r(d[1]);r(d[2]);var o=e(r(d[3])),l=e(r(d[4])),u=e(r(d[5])),s=e(r(d[6])),c=r(d[7]),f=r(d[8]),S=r(d[9]),p=r(d[10]),v=r(d[11]),b=r(d[12]),h=r(d[13]);const O=(0,c.createStyles)({badge:{alignItems:'center',backgroundColor:f.COLORS.BRAND_BG_SURFACE,borderColor:f.COLORS.TEXT_SLATE,borderRadius:10,borderWidth:1,height:20,justifyContent:'center',width:20},badgeActive:{backgroundColor:f.COLORS.ACTION_PRIMARY,borderColor:f.COLORS.ACTION_PRIMARY},badgeText:{color:f.COLORS.TEXT_SLATE_DARK,fontSize:v.FONT_SIZE.XS,fontStyle:'italic',fontWeight:'bold',lineHeight:18},badgeTextActive:{color:f.COLORS.BG_SURFACE},nativeAnchor:{position:'relative',zIndex:10},nativePopover:{position:'absolute',right:0,top:50,zIndex:9999},popoverIntro:{color:f.COLORS.BG_SURFACE,fontSize:v.FONT_SIZE.SM,fontStyle:'italic',lineHeight:19,marginBottom:p.SPACING.SM},popoverSurface:{backgroundColor:f.COLORS.TEXT_DARK,borderRadius:8,padding:p.SPACING.MD},popoverText:{color:f.COLORS.BG_SURFACE,fontSize:v.FONT_SIZE.SM,lineHeight:19},trigger:{alignItems:'center',height:44,justifyContent:'center',width:44}})},697,[34,36,95,369,222,552,276,489,490,491,493,494,698,104]);
796__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"POPOVER_WIDTH",{enumerable:!0,get:function(){return t}}),e.computePopoverPosition=function(u,c,h=Number.POSITIVE_INFINITY,M=0){const f=Math.min(t,Math.max(0,c-16)),p=Math.min(u.left,c-f-n),P=Math.max(0,h-u.bottom-o-n),b=Math.max(0,u.top-o-n),s=M<=P,I=M<=b||!s&&b>P,_=I?b:P,l=Math.min(M,_);return{top:I?u.top-o-l:u.bottom+o,left:Math.max(n,p),width:f,maxHeight:_}};const t=320,o=6,n=8},698,[]);
797__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseSeoHead=function(t){const n=(new DOMParser).parseFromString(t,'text/html'),o=n.querySelector('title')?.textContent??null,l=n.querySelector('meta[name="description" i]')?.getAttribute('content')??null,c=n.querySelector('link[rel="canonical" i]')?.getAttribute('href')??null,u=n.querySelector('meta[name="robots" i]')?.getAttribute('content')??null,s=n.querySelector('meta[property="og:type" i]')?.getAttribute('content')??null;return{title:o,description:l,canonicalUrl:c,robots:u,ogType:s,hasJsonLd:null!=n.querySelector('script[type="application/ld+json" i]')}}},699,[]);
798__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.APIScreen=function(){const e=(0,p.useSeoMeta)('API');return(0,j.jsxs)(f.PageLayout,{children:[(0,j.jsx)(y.WebMeta,Object.assign({},e)),(0,j.jsxs)(n.default,{style:x.MARKETING.container,children:[(0,j.jsx)(u.HeroSection,{backgroundColor:C.COLORS.NAVY_DARK,background:{imageUrl:'https://images.unsplash.com/photo-1742774101928-f7e92a471c1b?w=1920&q=80',imagePosition:'center'},minHeight:450,label:"DEVELOPER TOOLS",labelColor:C.COLORS.CYAN_ACCENT,title:"PurpleAir API",subtitle:"Access real-time and historical air quality data from 35,000+ sensors worldwide. Build applications, dashboards, and integrations with our comprehensive REST API.",subtitleColor:C.COLORS.OVERLAY_LIGHT_80,centered:!0,children:(0,j.jsxs)(l.default,{style:x.MARKETING.heroActions,children:[null!==E?(0,j.jsx)(t.Suspense,{fallback:null,children:(0,j.jsx)(E,{buttonStyle:O.primaryButton,textStyle:O.primaryButtonText})}):null,(0,j.jsx)(h.ServiceExternalLink,{service:"dataApiDocsUrl",style:O.secondaryButton,testID:"api-
798hero-docs-link",children:(0,j.jsx)(s.default,{style:O.secondaryButtonText,children:"API Docs"})}),(0,j.jsx)(h.ServiceExternalLink,{service:"developerPortalUrl",style:O.primaryButton,testID:"api-hero-keys-link",children:(0,j.jsx)(s.default,{style:O.primaryButtonText,children:"Get API Keys"})})]})}),(0,j.jsxs)(l.default,{style:x.MARKETING.section,children:[(0,j.jsx)(s.default,{style:x.MARKETING.sectionTitle,children:"API Capabilities"}),(0,j.jsxs)(l.default,{style:N.featuresGrid,children:[(0,j.jsxs)(l.default,{style:N.feature,children:[(0,j.jsx)(s.default,{style:N.featureTitle,children:"Real-Time Data"}),(0,j.jsx)(s.default,{style:N.featureDesc,children:"Access current readings from any sensor including PM2.5, PM10, temperature, humidity, and pressure - updated every few minutes."})]}),(0,j.jsxs)(l.default,{style:N.feature,children:[(0,j.jsx)(s.default,{style:N.featureTitle,children:"Historical Data"}),(0,j.jsx)(s.default,{style:N.featureDesc,children:"Query historical sensor data with flexible time ranges, averaging periods, and field selection for analysis and research."})]}),(0,j.jsxs)(l.default,{style:N.feature,children:[(0,j.jsx)(s.default,{style:N.featureTitle,children:"Sensor Discovery"}),(0,j.jsx)(s.default,{style:N.featureDesc,children:"Find sensors by location, bounding box, or proximity. Filter by indoor/outdoor, channel flags, and data age."})]}),(0,j.jsxs)(l.default,{style:N.feature,children:[(0,j.jsx)(s.default,{style:N.featureTitle,children:"Group Management"}),(0,j.jsx)(s.default,{style:N.featureDesc,children:"Organize sensors into groups for easier management. Query multiple sensors with a single API call."})]})]})]}),(0,j.jsxs)(l.default,{style:[x.MARKETING.section,N.sectionDark],children:[(0,j.jsx)(s.default,{style:[x.MARKETING.sectionTitle,{color:C.COLORS.TEXT_INVERSE}],children:"Example Endpoints"}),(0,j.jsxs)(l.default,{style:N.endpointsContainer,children:[(0,j.jsx)(R,{method:"GET",path:"/v1/sensors",description:"Get a list of all public sensors with their current readings"}),(0,j.jsx)(R,{method:"GET",path:"/v1/sensors/:sensor_index",description:"Get detailed information and readings for a specific sensor"}),(0,j.jsx)(R,{method:"GET",path:"/v1/sensors/:sensor_index/history",description:"Get historical data for a sensor with customizable time range and averaging"}),(0,j.jsx)(R,{method:"GET",path:"/v1/groups/:group_id/members",description:"Get all sensors in a group with their current readings"})]}),(0,j.jsx)(h.ServiceExternalLink,{service:"dataApiDocsUrl",style:N.docsButton,children:(0,j.jsx)(s.default,{style:N.docsButtonText,children:"View Full Documentation"})})]}),(0,j.jsxs)(l.default,{style:x.MARKETING.section,children:[(0,j.jsx)(s.default,{style:x.MARKETING.sectionTitle,children:"Available Data Fields"}),(0,j.jsxs)(l.default,{style:N.fieldsGrid,children:[(0,j.jsxs)(l.default,{style:N.fieldCategory,children:[(0,j.jsx)(s.default,{style:N.fieldCategoryTitle,children:"Air Quality"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"PM1.0, PM2.5, PM10"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Particle counts (0.3-10\u03bcm)"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"AQI calculations"})]}),(0,j.jsxs)(l.default,{style:N.fieldCategory,children:[(0,j.jsx)(s.default,{style:N.fieldCategoryTitle,children:"Environmental"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Temperature"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Humidity"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Pressure"})]}),(0,j.jsxs)(l.default,{style:N.fieldCategory,children:[(0,j.jsx)(s.default,{style:N.fieldCategoryTitle,children:"Sensor Info"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Location (lat/lon)"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Channel confidence"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Last seen / uptime"})]}),(0,j.jsxs)(l.default,{style:N.fieldCategory,children:[(0,j.jsx)(s.default,{style:N.fieldCategoryTitle,children:"Metadata"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Sensor name"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Indoor/outdoor flag"}),(0,j.jsx)(s.default,{style:N.fieldItem,children:"Hardware version"})]})]})]}),(0,j.jsxs)(l.default,{style:[x.MARKETING.section,x.MARKETING.sectionAlt],children:[(0,j.jsx)(s.default,{style:x.MARKETING.sectionTitle,children:"What People Build"}),(0,j.jsxs)(l.default,{style:N.useCasesGrid,children:[(0,j.jsxs)(l.default,{style:N.useCase,children:[(0,j.jsx)(s.default,{style:N.useCaseTitle,children:"Home Automation"}),(0,j.jsx)(s.default,{style:N.useCaseDesc,children:"Trigger HVAC systems, air purifiers, or window controls based on real-time air quality data."})]}),(0,j.jsxs)(l.default,{style:N.useCase,children:[(0,j.jsx)(s.default,{style:N.useCaseTitle,children:"Research Applications"}),(0,j.jsx)(s.default,{style:N.useCaseDesc,children:"Analyze air quality patterns, health correlations, and environmental trends at scale."})]}),(0,j.jsxs)(l.default,{style:N.useCase,children:[(0,j.jsx)(s.default,{style:N.useCaseTitle,children:"Custom Dashboards"}),(0,j.jsx)(s.default,{style:N.useCaseDesc,children:"Build monitoring displays for schools, office
798s, or public spaces with your own branding."})]}),(0,j.jsxs)(l.default,{style:N.useCase,children:[(0,j.jsx)(s.default,{style:N.useCaseTitle,children:"Alert Systems"}),(0,j.jsx)(s.default,{style:N.useCaseDesc,children:"Send notifications when air quality thresholds are exceeded in your area."})]})]})]}),(0,j.jsxs)(l.default,{style:[x.MARKETING.ctaSection,{backgroundColor:C.COLORS.NAVY_DARK}],children:[(0,j.jsx)(s.default,{style:x.MARKETING.ctaTitle,children:"Start Building"}),(0,j.jsx)(s.default,{style:x.MARKETING.ctaSubtitle,children:"Create a free developer account to get your API keys and start integrating PurpleAir data."}),(0,j.jsxs)(l.default,{style:x.MARKETING.ctaActions,children:[(0,j.jsx)(h.ServiceExternalLink,{service:"developerPortalUrl",style:I.ctaButton,children:(0,j.jsx)(s.default,{style:I.ctaButtonText,children:"Get API Keys"})}),(0,j.jsx)(c.AppLink,{to:"Community",style:I.ctaSecondaryButton,children:(0,j.jsx)(s.default,{style:I.ctaSecondaryButtonText,children:"Developer Community"})})]})]})]})]})};var t=r(d[0]),l=e(r(d[1])),s=e(r(d[2]));r(d[3]);var n=e(r(d[4])),o=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),h=r(d[9]),y=r(d[10]),C=r(d[11]),x=r(d[12]),S=r(d[13]),A=r(d[14]),p=r(d[15]),T=r(d[16]),j=r(d[17]);const O=(0,x.createHeroButtonStyles)(C.COLORS.CYAN_ACCENT,C.COLORS.NAVY_DARK),I=(0,x.createCTAButtonStyles)(C.COLORS.CYAN_ACCENT,C.COLORS.NAVY_DARK),E=(0,T.isUnreleasedCapabilityEnabled)(T.ENABLED_UNRELEASED_CAPABILITIES,'interactive-api-docs')?(0,t.lazy)(async()=>({default:(await r(d[19])(d[18],d.paths)).APIDocsHeroAction})):null;function R({method:e,path:t,description:n}){return(0,j.jsxs)(l.default,{style:N.endpoint,children:[(0,j.jsxs)(l.default,{style:N.endpointHeader,children:[(0,j.jsx)(s.default,{style:[N.endpointMethod,'GET'===e?N.methodGet:N.methodPost],children:e}),(0,j.jsx)(s.default,{style:N.endpointPath,children:t})]}),(0,j.jsx)(s.default,{style:N.endpointDesc,children:n})]})}const N=(0,o.createStyles)({sectionDark:{backgroundColor:C.COLORS.NAVY_MID},featuresGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.XXL,justifyContent:'center',maxWidth:900},feature:{backgroundColor:C.COLORS.BG_SURFACE,borderColor:C.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:S.SPACING.XXL,width:400},featureTitle:{color:C.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.XL,fontWeight:'600',marginBottom:S.SPACING.MD},featureDesc:{color:C.COLORS.TEXT_SECONDARY,fontSize:A.FONT_SIZE.LG,lineHeight:24},endpointsContainer:{alignSelf:'center',gap:S.SPACING.MD,marginBottom:S.SPACING.XXXL,maxWidth:600,width:'100%'},endpoint:{backgroundColor:C.COLORS.NAVY_DARK,borderColor:C.COLORS.TEXT_BODY,borderRadius:8,borderWidth:1,padding:S.SPACING.LG},endpointHeader:{alignItems:'center',flexDirection:'row',marginBottom:S.SPACING.SM},endpointMethod:{borderRadius:4,fontSize:A.FONT_SIZE.XS,fontWeight:'bold',marginRight:S.SPACING.MD,paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.MICRO},methodGet:{backgroundColor:C.COLORS.GREEN_500,color:C.COLORS.TEXT_INVERSE},methodPost:{backgroundColor:C.COLORS.BLUE_400,color:C.COLORS.TEXT_INVERSE},endpointPath:{color:C.COLORS.CYAN_ACCENT,fontFamily:A.FONT_FAMILY.WEB_MONOSPACE,fontSize:A.FONT_SIZE.MD},endpointDesc:{color:C.COLORS.TEXT_LIGHT,fontSize:A.FONT_SIZE.MD},docsButton:{alignSelf:'center',backgroundColor:C.COLORS.CYAN_ACCENT,borderRadius:8,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.LG},docsButtonText:{color:C.COLORS.NAVY_DARK,fontSize:A.FONT_SIZE.LG,fontWeight:'600'},fieldsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.XXL,justifyContent:'center',maxWidth:900},fieldCategory:{backgroundColor:C.COLORS.BG_LIGHT,borderRadius:12,padding:S.SPACING.XL,width:200},fieldCategoryTitle:{borderBottomColor:C.COLORS.CYAN_ACCENT,borderBottomWidth:2,color:C.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.LG,fontWeight:'600',marginBottom:S.SPACING.MD,paddingBottom:S.SPACING.SM},fieldItem:{color:C.COLORS.TEXT_SECONDARY,fontSize:A.FONT_SIZE.MD,lineHeight:28},useCasesGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.XXL,justifyContent:'center',maxWidth:900},useCase:{backgroundColor:C.COLORS.BG_SURFACE,borderColor:C.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:S.SPACING.XXL,width:400},useCaseTitle:{color:C.COLORS.NAVY_DARK,fontSize:A.FONT_SIZE.XL,fontWeight:'600',marginBottom:S.SPACING.MD},useCaseDesc:{color:C.COLORS.TEXT_SECONDARY,fontSize:A.FONT_SIZE.LG,lineHeight:24}})},700,{"0":34,"1":276,"2":222,"3":95,"4":283,"5":489,"6":516,"7":674,"8":568,"9":522,"10":565,"11":490,"12":676,"13":493,"14":494,"15":562,"16":507,"17":104,"18":1115,"19":701,"paths":{"111
7985":"/_expo/static/js/web/emptyUnreleasedScreenModule-511ed0e534e9d26ed8896ff99524277f.js"}});
799__d(function(g,r,i,a,m,e,d){m.exports=r(d[0])},701,[702]);
800__d(function(g,r,i,a,m,e,d){function n(n,t){const o=g[`${__METRO_GLOBAL_PREFIX__}__loadBundleAsync`];if(null!=o){const s=String(n);if(null!=t){const n=t[s];if(null!=n)return o(n)}}}function t(t,o){const s=n(t,o),u=()=>r.importAll(t);return null!=s?s.then(u):u()}async function o(n,o,s){return t(n,o)}o.unstable_importMaybeSync=function(n,o){return t(n,o)},o.prefetch=function(t,o,s){n(t,o)?.then(()=>{},()=>{})},o.unstable_resolve=function(n,t){if(!t)throw new Error('Bundle splitting is required for Web Worker imports');const o=t[n];if(!o)throw new Error('Worker import is missing from split bundle paths: '+o);return o},o.unstable_createWorker=function(n,t){if('undefined'==typeof crossOriginIsolated||!crossOriginIsolated)return new Worker(n,t);try{const s=(o=n,`\n    const ASYNC_WORKER_BASE = ${JSON.stringify(o)};\n    const IMPORT_SCRIPTS = importScripts;\n    const FETCH = fetch;\n    const fromBaseURL = (input) => new URL(input, ASYNC_WORKER_BASE).href;\n    self.fetch = function(input, init) {\n      return FETCH(typeof input === 'string' ? fromBaseURL(input) : input, init);\n    };\n    self.importScripts = function(...urls) {\n      return IMPORT_SCRIPTS.apply(self, urls.map(fromBaseURL));\n    };\n    importScripts(ASYNC_WORKER_BASE);\n  `);return n=URL.createObjectURL(new Blob([s],{type:'text/javascript'})),new Worker(n,t)}finally{URL.revokeObjectURL(n)}var o},m.exports=o},702,[]);
801__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AttributionScreen=function(){return(0,o.jsx)(t.PolicyFullPage,{errorSurface:u.contentLoad,seoKey:"Attribution",slug:"attribution",policyName:"Data Attribution requirements"})},r(d[0]);var t=r(d[1]),n=r(d[2]),o=r(d[3]);const u=(0,n.defineScreenErrorSurfaces)('Attribution',{contentLoad:{id:'content-load',kind:'page',label:'Data attribution content load error'}})},703,[34,556,557,104]);
802__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BlogArticleScreen=function(){const e=(0,y.useAppNativeStackNavigation)(),{slug:c,preview:L}=(0,y.useBlogArticleParams)(),{data:I,loading:C,error:j}=(0,G.useAsyncData)(async()=>{const e=await u.blogApi.getPost(c,L);if(!e)throw new Error('Article not found.');return e},[c,L],'Failed to load article. Please try again.'),{isDevTriggered:X,surface:E}=(0,N.useErrorSurface)(R.articleLoad),k=j??(X?'Failed to load article. Please try again.':null),_=(0,t.useMemo)(()=>null!=I?{postTitle:I.title,postExcerpt:I.excerpt}:void 0,[I]),M=(0,P.useSeoMeta)('BlogArticle',_),w=(0,t.useCallback)(t=>(0,A.handleLinkPress)(t,e),[e]),W=(0,t.useMemo)(()=>(0,A.createBlogMarkdownOverrides)(null!=I?I.imageAttribution:[]),[I]);if((0,A.useBlogMarkdownWebCss)(),C)return(0,O.jsx)(f.AsyncPageLayout,{status:"loading",children:(0,O.jsx)(x.LoadingState,{message:"Loading article..."})});if(null==I||null!=k)return(0,O.jsx)(f.AsyncPageLayout,{status:"error",children:(0,O.jsx)(x.ErrorState,{message:k??'Article not found.',surface:E,onRetry:()=>{e.navigate('Blog')},retryLabel:"Back to Blog"})});return(0,O.jsxs)(f.AsyncPageLayout,{status:"ready",children:[(0,O.jsx)(b.WebMeta,Object.assign({},M,{noIndex:!0===M.noIndex||'PUBLISHED'!==I.publicationState})),(0,O.jsxs)(n.default,{style:T.container,children:[(0,O.jsxs)(o.default,{style:T.header,children:[(0,O.jsx)(S.AppLink,{to:"Blog",style:T.breadcrumb,children:(0,O.jsx)(l.default,{style:T.breadcrumbText,children:"Blog"})}),(0,O.jsx)(h.BlogPublicationNotice,{publicationState:I.publicationState}),(0,O.jsx)(l.default,{style:T.title,children:I.title}),(0,O.jsx)(o.default,{style:T.meta,children:(0,O.jsxs)(l.default,{style:T.metaText,children:[I.author," \xb7 ",(0,B.formatIsoDateLong)(I.publishedAt)]})}),I.tags.length>0&&(0,O.jsx)(o.default,{style:T.tagsRow,children:I.tags.map(e=>(0,O.jsx)(o.default,{style:T.tag,children:(0,O.jsx)(l.default,{style:T.tagText,children:e})},e))})]}),null!=I.imageUrl&&''!==I.imageUrl&&(0,O.jsxs)(o.default,{style:T.featuredImageContainer,children:[(0,O.jsx)(s.default,{source:{uri:I.imageUrl},style:T.featuredImage,resizeMode:"cover"}),(()=>{const e=(0,A.findAttribution)(I.imageUrl,I.imageAttribution);return null!=e?(0,O.jsx)(A.ImageCaption,{attribution:e}):null})()]}),(0,O.jsx)("div",{style:T.webMarkdownShell,children:(0,O.jsx)(p.Markdown,{content:I.body,styles:A.blogMarkdownStyles,overrides:W,onLinkPress:w})}),(0,O.jsx)(o.default,{style:T.footerNav,children:(0,O.jsx)(S.AppLink,{to:"Blog",style:T.backButton,children:(0,O.jsx)(l.default,{style:T.backButtonText,children:"Back to Blog"})})})]})]})};var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3]));r(d[4]);var s=e(r(d[5])),c=r(d[6]),u=r(d[7]),S=r(d[8]),f=r(d[9]),A=r(d[10]),h=r(d[11]),x=r(d[12]),p=r(d[13]),b=r(d[14]),L=r(d[15]),I=r(d[16]),C=r(d[17]),N=r(d[18]),G=r(d[19]),P=r(d[20]),y=r(d[21]),B=r(d[22]),O
802=r(d[23]);const R=(0,N.defineScreenErrorSurfaces)('BlogArticle',{articleLoad:{id:'article-load',kind:'page',label:'Blog article load error'}});const T=(0,c.createStyles)({backButton:{alignSelf:'flex-start',backgroundColor:L.COLORS.WARNING,borderRadius:8,paddingHorizontal:I.SPACING.XXL,paddingVertical:I.SPACING.MD},backButtonText:{color:L.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.LG,fontWeight:'600'},bodyContainer:{alignSelf:'center',maxWidth:800,paddingBottom:I.SPACING.HUGE,paddingHorizontal:I.SPACING.XXL,width:'100%'},breadcrumb:{marginBottom:I.SPACING.XL},breadcrumbText:{color:L.COLORS.WARNING_DARK,fontSize:C.FONT_SIZE.MD,fontWeight:'600',letterSpacing:1,textTransform:'uppercase'},container:{backgroundColor:L.COLORS.BG_SURFACE,flex:1},featuredImage:{backgroundColor:L.COLORS.BG_SUBTLE_100,borderRadius:12,height:400,width:'100%'},featuredImageContainer:{alignSelf:'center',marginBottom:I.SPACING.XXXL,maxWidth:800,paddingHorizontal:I.SPACING.XXL,width:'100%'},footerNav:{alignSelf:'center',borderTopColor:L.COLORS.BORDER,borderTopWidth:1,maxWidth:800,paddingBottom:I.SPACING.JUMBO,paddingHorizontal:I.SPACING.XXL,paddingTop:I.SPACING.XXL,width:'100%'},header:{alignSelf:'center',maxWidth:800,paddingBottom:I.SPACING.XXL,paddingHorizontal:I.SPACING.XXL,paddingTop:I.SPACING.HUGE,width:'100%'},meta:{marginBottom:I.SPACING.LG},metaText:{color:L.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.LG},tag:{backgroundColor:L.COLORS.WARNING_BG,borderRadius:12,paddingHorizontal:I.SPACING.MD,paddingVertical:I.SPACING.XS},tagText:{color:L.COLORS.WARNING_DARK,fontSize:C.FONT_SIZE.SM,fontWeight:'500'},tagsRow:{flexDirection:'row',flexWrap:'wrap',gap:I.SPACING.SM},title:Object.assign({color:L.COLORS.TEXT_PRIMARY,fontSize:C.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',lineHeight:40,marginBottom:I.SPACING.LG},{fontSize:C.FONT_SIZE.DISPLAY_LG,lineHeight:50}),webMarkdownShell:{marginLeft:'auto',marginRight:'auto',maxWidth:800,paddingBottom:I.SPACING.HUGE,paddingLeft:I.SPACING.XXL,paddingRight:I.SPACING.XXL}})},704,[34,276,222,283,95,328,489,705,516,567,706,707,512,597,565,490,493,494,557,561,562,505,685,104]);
803__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"blogApi",{enumerable:!0,get:function(){return u}});var t=r(d[0]),l=r(d[1]);const u={listPosts:async t=>l.blog.listPosts({query:Object.assign({},null!=t?.page?{page:t.page}:{},null!=t?.pageSize?{pageSize:t.pageSize}:{},null!=t?.query&&''!==t.query?{query:t.query}:{},null!=t?.tag&&''!==t.tag?{tag:t.tag}:{},null!=t?.year?{year:t.year}:{})}),async getPost(u,n){try{return await l.blog.getPost(Object.assign({path:{slug:u}},null!=n?{query:{preview:n}}:{}))}catch(l){if((0,t.isAxios404)(l))return null;throw l}}}},705,[464,471]);
804__d(function(g,r,i,_a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"blogMarkdownStyles",{enumerable:!0,get:function(){return S}}),_e.filenameFromUrl=p,_e.findAttribution=I,_e.ImageCaption=L,_e.isAqiDotImage=y,Object.defineProperty(_e,"BLOG_MARKDOWN_WEB_BODY_CLASS",{enumerable:!0,get:function(){return G}}),_e.buildBlogMarkdownWebCss=N,_e.useBlogMarkdownWebCss=function(t=G){(0,e.useEffect)(()=>{const e=document.createElement('style');return e.textContent=N(t),document.head.appendChild(e),()=>{document.head.removeChild(e)}},[t])},_e.parseFloatDirective=O,_e.createBlogMarkdownOverrides=function(t){return{root:t=>(0,h.jsx)("div",{className:G,style:P.bodyWeb,children:t}),paragraph:({children:t,isImageOnly:e,key:o},n)=>e?(0,h.jsx)("div",{style:P.imageOnlyParagraphWeb,children:t},o):(0,h.jsx)("div",{style:P.paragraphWeb,children:(0,h.jsx)(a.default,{style:f.body,children:t})},o),heading:({depth:t,children:e,key:o},n)=>2===t?(0,h.jsx)("div",{style:P.heading2ClearWrap,children:(0,h.jsx)(a.default,{style:f.heading2,children:e})},o):n(),hr:({key:t},e)=>(0,h.jsx)("div",{style:P.hrWeb},t),image:e=>k(e,t)}},_e.handleLinkPress=function(t,e){const o=t.match(/^\/blog\/([\w-]+)$/),a=o?.[1];if(null!=a&&''!==a)return e.push('BlogArticle',{slug:a}),!1;const l=t.match(/^\/store\/([\w-]+)$/),s=l?.[1];if(null!=s&&''!==s)return e.push('Product',{handle:s}),!1;if('/store'===t)return e.navigate('Store'),!1;if('/contact'===t)return e.navigate('Contact'),!1;return n.default.openURL(t),!1};var e=r(d[0]),o=t(r(d[1])),a=t(r(d[2]));r(d[3]);t(r(d[4]));var n=t(r(d[5])),l=r(d[6]),s=r(d[7]),c=r(d[8]),u=r(d[9]),h=r(d[10]);const f=(0,l.createStyles)({blockquote:{backgroundColor:s.COLORS.BRAND_BG_SUBTLE,borderLeftColor:s.COLORS.BRAND_PRIMARY,borderLeftWidth:4,borderRadius:4,marginLeft:0,marginVertical:c.SPACING.LG,paddingLeft:c.SPACING.LG,padding:c.SPACING.LG},body:{color:s.COLORS.NAVY_MID,fontSize:u.FONT_SIZE.XL,lineHeight:28},bulletList:{marginBottom:c.SPACING.LG},codeBlock:{backgroundColor:s.COLORS.BG_SUBTLE_100,borderRadius:8,marginVertical:c.SPACING.LG,padding:c.SPACING.LG},codespan:{backgroundColor:s.COLORS.BG_SUBTLE_100,borderRadius:4,color:s.COLORS.WARNING_DARK,fontSize:u.FONT_SIZE.LG,paddingHorizontal:c.SPACING.SM,paddingVertical:c.SPACING.MICRO},em:{fontStyle:'italic'},heading1:{color:s.COLORS.TEXT_PRIMARY,fontSize:u.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:c.SPACING.LG,marginTop:c.SPACING.XXXL},heading2:{color:s.COLORS.TEXT_PRIMARY,fontSize:u.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:c.SPACING.LG,marginTop:c.SPACING.XXL},heading3:{color:s.COLORS.TEXT_PRIMARY,fontSize:u.FONT_SIZE.XXXL,fontWeight:'600',marginBottom:c.SPACING.MD,marginTop:c.SPACING.XXL},hr:{borderBottomColor:s.COLORS.BORDER,borderBottomWidth:1,marginVertical:c.SPACING.XXXL},image:{borderRadius:8,marginVertical:c.SPACING.LG,width:'100%'},link:{color:s.COLORS.WARNING,textDecorationLine:'underline'},listItem:{marginBottom:c.SPACING.SM},orderedList:{marginBottom:c.SPACING.LG},paragraph:{marginBottom:c.SPACING.MD,marginTop:0},strong:{fontWeight:'bold'}}),S={blockquote:f.blockquote,body:f.body,bulletList:f.bulletList,codeBlock:f.codeBlock,codespan:f.codespan,em:f.em,heading1:f.heading1,heading2:f.heading2,heading3:f.heading3,hr:f.hr,image:f.image,link:f.link,listItem:f.listItem,orderedList:f.orderedList,paragraph:f.paragraph,strong:f.strong};function p(t){const e=t.lastIndexOf('/');return e>=0?t.substring(e+1):t}const b=/_\d+x(\.[^./]+)$/;function C(t){return p(t.split(/[?#]/,1)[0]??t)}function I(t,e){if(!e.length)return;const o=C(t),a=e.find(t=>t.file===o);if(null!=a)return a;const n=o.replace(b,'$1');return e.find(t=>t.file===n)}function L({attribution:t}){const{source:e,photographer:o,photographerUrl:n,url:l,tool:s}=t;if('purpleair'===e||'purpleair-original'===e)return null;if('ai-generated'===e)return(0,h.jsx)(a.default,{style:A.caption,children:null!=s&&''!==s?`Generated 
804with ${s}`:'AI-generated image'});const c=null==e?null:{unsplash:'Unsplash',pixabay:'Pixabay',istock:'iStock','ai-generated':''}[e]??e,u='pixabay'===e?'Image by ':'Photo by ';return(0,h.jsxs)(a.default,{style:A.caption,children:[u,null!=o&&''!==o&&null!=n&&''!==n?(0,h.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",style:A.mutedLink,children:o}):o,null!=l&&''!==l?(0,h.jsxs)(h.Fragment,{children:[' on ',(0,h.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",style:A.mutedLink,children:c})]}):null!=c&&''!==c?` / ${c}`:null]})}const A=(0,l.createStyles)({caption:{color:s.COLORS.TEXT_PLACEHOLDER,fontSize:u.FONT_SIZE.XS,fontStyle:'italic',marginBottom:c.SPACING.SM,marginTop:c.SPACING.XS,textAlign:'center'},mutedLink:{color:s.COLORS.TEXT_MUTED}});function y(t){const e=p(t);return/^aqi-(green|yellow|orange|red|purple|maroon)\.svg$/i.test(e)}const G='blog-md-body';function N(t){const e=`.${t}`;return`\n${e} { display: block; }\n${e} > div { display: block; }\n`}const P={aqiDotImg:{display:'inline-block',height:28,marginRight:c.SPACING.SM,verticalAlign:'middle',width:28},bodyWeb:{display:'block'},floatImg:{borderRadius:8,display:'block',height:'auto',width:'100%'},floatWrapLeftNarrow:{display:'block',float:'left',marginBottom:c.SPACING.MD,marginRight:c.SPACING.XL,marginTop:c.SPACING.XS,width:'30%'},floatWrapLeftWide:{display:'block',float:'left',marginBottom:c.SPACING.MD,marginRight:c.SPACING.XL,marginTop:c.SPACING.XS,width:'45%'},floatWrapRightNarrow:{display:'block',float:'right',marginBottom:c.SPACING.MD,marginLeft:c.SPACING.XL,marginTop:c.SPACING.XS,width:'30%'},floatWrapRightWide:{display:'block',float:'right',marginBottom:c.SPACING.MD,marginLeft:c.SPACING.XL,marginTop:c.SPACING.XS,width:'45%'},heading2ClearWrap:{clear:'both',display:'block'},hrWeb:{borderBottom:`1px solid ${s.COLORS.BORDER}`,clear:'both',display:'block',marginBottom:c.SPACING.XXXL,marginTop:c.SPACING.XXXL},imageDefaultBlock:{borderRadius:8,display:'block',height:'auto',maxWidth:'100%',width:'100%'},imageOnlyParagraphWeb:{display:'block'},paragraphWeb:{marginBottom:c.SPACING.MD,marginTop:0}},R={marginVertical:c.SPACING.SM,maxWidth:'100%',overflow:'hidden'};(0,l.createStyles)({bodyImage:{backgroundColor:s.COLORS.BG_SUBTLE_100,borderRadius:8,height:300,width:'100%'},bodyImageWrap:{marginVertical:c.SPACING.SM},dotImage:{borderRadius:14,height:28,marginRight:c.SPACING.SM,width:28}});function O(t){const e=t.match(/^float-(left|right)(?:-(small))?:\s*(.*)/i);if(null!=e?.[1]&&null!=e[3]){const t=e[1].toLowerCase();return{float:'left'===t||'right'===t?t:null,floatSize:null!=e[2]&&''!==e[2]?'small':'normal',cleanAlt:e[3]}}return{float:null,floatSize:'normal',cleanAlt:t}}function k({href:t,alt:e,key:a},n){if(''===t)return null;const l=y(t),{float:s,floatSize:c,cleanAlt:u}=O(e),f=l?null:I(t,n);if(l)return(0,h.jsx)("img",{src:t,alt:u,style:P.aqiDotImg},a);if(s){const e='left'===s?'small'===c?P.floatWrapLeftNarrow:P.floatWrapLeftWide:'small'===c?P.floatWrapRightNarrow:P.floatWrapRightWide;return(0,h.jsxs)("div",{style:e,children:[(0,h.jsx)("img",{src:t,alt:u,style:P.floatImg}),f&&(0,h.jsx)(L,{attribution:f})]},a)}return(0,h.jsxs)(o.default,{style:R,children:[(0,h.jsx)("img",{src:t,alt:u,style:P.imageDefaultBlock}),f&&(0,h.jsx)(L,{attribution:f})]},a)}},706,[34,276,222,95,328,521,489,490,493,494,104]);
805__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BlogPublicationNotice=function({publicationState:e,variant:o="notice"}){const n=s[e],c='notice'!==o?b[e]:n;if(null==c||null==n)return null;return(0,S.jsx)(t.default,{accessibilityLabel:n,accessibilityRole:"text",style:[f.badge,'notice'!==o?f.compactBadge:null,'overlay'===o?f.overlayBadge:null],children:(0,S.jsx)(l.default,{style:f.label,children:c})})},r(d[0]);var l=e(r(d[1])),t=e(r(d[2])),o=r(d[3]),n=r(d[4]),c=r(d[5]),u=r(d[6]),S=r(d[7]);const s={DRAFT:'Draft \u2014 not published',SCHEDULED:'Scheduled \u2014 not published yet',PUBLISHED:null},b={DRAFT:'Draft',SCHEDULED:'Scheduled',PUBLISHED:null};const f=(0,o.createStyles)({badge:{alignSelf:'flex-start',backgroundColor:n.COLORS.WARNING_BG,borderColor:n.COLORS.WARNING,borderRadius:12,borderWidth:1,marginBottom:c.SPACING.SM,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.XS},compactBadge:{marginBottom:0,paddingHorizontal:c.SPACING.SM},overlayBadge:{backgroundColor:n.COLORS.WARNING_BG_GLASS},label:{color:n.COLORS.WARNING_DARK,fontSize:u.FONT_SIZE.SM,fontWeight:'700'}})},707,[34,222,276,489,490,493,494,104]);
806__d(function(g,r,i,a,m,_e,d){"use strict";
806function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BlogScreen=function(){const{isAdmin:e}=(0,h.useAuth)(),c=(0,v.useSeoMeta)('Blog'),u=(0,j.useResolveImageUri)(C.default,'Blog hero'),[b,y]=(0,t.useState)(0),[f,N]=(0,t.useState)(),[G,_]=(0,t.useState)(),[H,w]=(0,t.useState)(''),[Y,k]=(0,t.useState)(),U=(0,t.useRef)(null),{data:V,loading:Z,error:$,retry:K}=(0,E.useAsyncData)(()=>S.blogApi.listPosts(Object.assign({},void 0!==f&&{tag:f},void 0!==G&&{year:G},void 0!==Y&&{query:Y},{page:b,pageSize:12})),[f,G,Y,b],'Failed to load blog posts. Please try again.'),{isDevTriggered:q,surface:J}=(0,P.useErrorSurface)(B.articleList),Q=$??(q?'Failed to load blog posts. Please try again.':null),ee=Z?'loading':null!=Q?'error':'ready',te=V?.posts??[],ie=V?.availableTags??[],ae=V?.availableYears??[],re=V?.totalPosts??0,le=V?.totalPages??0,oe=(0,t.useCallback)(e=>{w(e),null!==U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{const t=e.trim();k(t.length>0?t:void 0),y(0)},350)},[]);(0,t.useEffect)(()=>()=>{null!==U.current&&clearTimeout(U.current)},[]);const se=(0,t.useCallback)(e=>{N(e),y(0)},[]),ne=(0,t.useCallback)(e=>{_(e),y(0)},[]),ce=(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(l.default,{style:z.filtersSection,children:[ie.length>0&&(0,M.jsx)(l.default,{style:z.filtersRow,children:(0,M.jsxs)(n.default,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:z.filterChips,children:[(0,M.jsx)(s.default,{accessibilityLabel:"Filter by tag: all tags",accessibilityRole:"button",style:[z.tagChip,void 0===f&&z.tagChipActive],onPress:()=>{se(void 0)},children:(0,M.jsx)(o.default,{style:[z.tagChipText,void 0===f&&z.tagChipTextActive],children:"All tags"})}),ie.map(e=>(0,M.jsx)(s.default,{accessibilityLabel:`Filter by tag: ${e}`,accessibilityRole:"button",style:[z.tagChip,f===e&&z.tagChipActive],onPress:()=>{se(e)},children:(0,M.jsx)(o.default,{style:[z.tagChipText,f===e&&z.tagChipTextActive],children:e})},e))]})}),(0,M.jsxs)(o.default,{style:z.resultCount,children:[re," article",1!==re?'s':'',null!=G?` in ${G}`:'',null!=Y&&''!==Y?` matching "${Y}"`:'']})]}),Z?(0,M.jsx)(I.LoadingState,{message:"Loading articles..."}):null!=Q?(0,M.jsx)(I.ErrorState,{message:Q,surface:J,onRetry:K}):0===te.length?(0,M.jsx)(I.EmptyState,{message:"No articles found."}):(0,M.jsxs)(l.default,{style:z.articlesSection,children:[(0,M.jsx)(l.default,{style:z.articlesGrid,children:te.map(t=>(0,M.jsx)(W,{post:t,showPublicationState:e},t.slug))}),le>1&&(0,M.jsx)(A.Pagination,{page:b,totalPages:le,onPageChange:y,itemLabel:"blog articles"})]})]});return(0,M.jsxs)(O.AsyncPageLayout,{status:ee,testID:"blog-screen",children:[(0,M.jsx)(R.WebMeta,Object.assign({},c)),(0,M.jsxs)(n.default,{style:z.container,children:[(0,M.jsx)(x.HeroSection,{backgroundColor:T.COLORS.NAVY_DARK,background:(0,D.heroBackgroundFromImageUri)(u,{imagePosition:'center 50%'}),minHeight:280,label:"INSIGHTS & UPDATES",title:"PurpleAir Blog",subtitle:"News, guides, research, and stories from the world of air quality monitoring.",centered:!0,children:(0,M.jsxs)(l.default,{style:z.searchContainer,children:[(0,M.jsx)(p.AppTextInput,{accessibilityLabel:"Search blog articles",style:z.searchInput,placeholder:"Search articles...",placeholderTextColor:T.COLORS.OVERLAY_LIGHT_60,value:H,onChangeText:oe,autoCapitalize:"none",autoCorrect:!1}),H.length>0&&(0,M.jsx)(s.default,{accessibilityLabel:"Clear search",accessibilityRole:"button",style:z.searchClear,onPress:()=>{w(''),k(void 0),y(0)},children:(0,M.jsx)(o.default,{style:z.searchClearText,children:"\u2715"})})]})}),(0,M.jsx)(L.SidebarLayout,{sidebar:ae.length>0?(0,M.jsx)(F,{years:ae,selectedYear:G,onSelectYear:ne}):null,strip:ae.length>0?(0,M.jsx)(X,{years:ae,selectedYear:G,onSelectYear:ne}):null,bodyMaxWidth:1280,sidebarWidth:200,children:ce})]})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3]));r(d[4]);var n=e(r(d[5])),c=e(r(d[6])),u=r(d[7]),S=r(d[8]),C=e(r(d[9])),h=r(d[10]),b=r(d[11]),p=r(d[12]),O=r(d[13]),y=r(d[14]),f=r(d[15]),I=r(d[16]),A=r(d[17]),x=r(d[18]),L=r(d[19]),R=r(d[20]),T=r(d[21]),N=r(d[22]),G=r(d[23]),P=r(d[24]),E=r(d[25]),j=r(d[26]),v=r(d[27]),_=r(d[28]),D=r(d[29]),M=r(d[30]);const B=(0,P.defineScreenErrorSurfaces)('Blog',{articleList:{id:'article-list',kind:'page',label:'Blog article list error'}});function W({post:e,showPublicationState:t}){const s=e.imageUrl??'',n=''!==s,u=t&&'PUBLISHED'!==e.publicationState;return(0,M.jsx)(f.Card,{hoverable:!0,padding:0,style:z.cardLayout,children:(0,M.jsxs)(b.AppLink,{to:"BlogArticle",href:`/blog/${e.slug}`,accessibilityLabel:`Read article: ${e.title}`,children:[n&&(0,M.jsxs)(l.default,{style:z.cardImageContainer,children:[(0,M.jsx)(c.default,{source:{uri:s},style:z.cardImage,resizeMode:"cover"}),u?(0,M.jsx)(l.default,{testID:"blog-publication-image-overlay",style:z.cardImageStatus,children:(0,M.jsx)(y.BlogPublicationNotice,{publicationState:e.publicationState,variant:"overlay"})}):null]}),(0,M.jsxs)(l.default,{style:z.cardContent,children:[(0,M.jsx)(o.default,{style:z.cardTitle,numberOfLines:2,children:e.title}),(0,M.jsx)(o.default,{style:z.cardExcerpt,numberOfLines:3,children:e.excerpt}),(0,M.jsxs)(l.default,{style:z.cardMeta,children:[(0,M.jsxs)(l.default,{style:z.cardMetaPrimary,children:[u&&!n?(0,M.jsx)(y.BlogPublicationNotice,{publicationState:e.publicationState,variant:"badge"}):null,(0,M.jsx)(o.default,{style:z.cardDate,children:(0,_.formatIsoDateLong)(e.publishedAt)})]}),(0,M.jsx)(o.default,{style:z.cardAuthor,children:e.author})]})]})]})})}function F({years:e,selectedYear:t,onSelectYear:l}){return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(o.default,{style:z.sidebarTitle,children:"Archive"}),(0,M.jsx)(s.default,{accessibilityLabel:"Filter archive: all years",accessibilityRole:"button",style:[z.sidebarItem,void 0===t&&z.sidebarItemActive],onPress:()=>{l(void 0)},children:(0,M.jsx)(o.default,{style:[z.sidebarItemText,void 0===t&&z.sidebarItemTextActive],children:"All Years"})}),e.map(e=>(0,M.jsx)(s.default,{accessibilityLabel:`Filter archive by year: ${e}`,accessibilityRole:"button",style:[z.sidebarItem,t===e&&z.sidebarItemActive],onPress:()=>{l(e)},children:(0,M.jsx)(o.default,{style:[z.sidebarItemText,t===e&&z.sidebarItemTextActive],children:e})},e))]})}function X({years:e,selectedYear:t,onSelectYear:c}){return(0,M.jsx)(l.default,{style:z.yearStripContainer,children:(0,M.jsxs)(n.default,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:z.yearStripContent,children:[(0,M.jsx)(s.default,{accessibilityLabel:"Filter archive: all years",accessibilityRole:"button",style:[z.yearChip,void 0===t&&z.yearChipActive],onPress:()=>{c(void 0)},children:(0,M.jsx)(o.default,{style:[z.yearChipText,void 0===t&&z.yearChipTextActive],children:"All Years"})}),e.map(e=>(0,M.jsx)(s.default,{accessibilityLabel:`Filter archive by year: ${e}`,accessibilityRole:"button",style:[z.yearChip,t===e&&z.yearChipActive],onPress:()=>{c(e)},children:(0,M.jsx)(o.default,{style:[z.yearChipText,t===e&&z.yearChipTextActive],children:e})},e))]})})}const z=(0,u.createStyles)({container:{backgroundColor:T.COLORS.BG_SURFACE,flex:1},searchContainer:{marginTop:N.SPACING.XXL,maxWidth:480,position:'relative',width:'100%'},searchInput:Object.assign({backgroundColor:T.COLORS.OVERLAY_LIGHT_20,borderColor:T.COLORS.OVERLAY_LIGHT_30,borderRadius:8,borderWidth:1,color:T.COLORS.TEXT_INVERSE,fontSize:G.FONT_SIZE.LG,paddingHorizontal:N.SPACING.LG,paddingVertical:N.SPACING.MD},{outlineStyle:'none'}),searchClear:{bottom:0,justifyContent:'center',paddingHorizontal:N.SPACING.XS,position:'absolute',right:12,top:0},searchClearText:{color:T.COLORS.OVERLAY_LIGHT_70,fontSize:G.FONT_SIZE.LG,fontWeight:'600'},sidebarTitle:{color:T.COLORS.TEXT_PLACEHOLDER,fontSize:G.FONT_SIZE.SM,fontWeight:'700',letterSpacing:1.5,marginBottom:N.SPACING.LG,textTransform:'uppercase'},sidebarItem:{borderRadius:6,marginBottom:N.SPACING.MICRO,paddingHorizontal:N.SPACING.MD,paddingVertical:N.SPACING.SM},sidebarItemActive:{backgroundColor:T.COLORS.WARNING_BG},sidebarItemText:{color:T.COLORS.TEXT_MEDIUM,fontSize:G.FONT_SIZE.LG,fontWeight:'500'},sidebarItemTextActive:{color:T.COLORS.WARNING_DARK,fontWeight:'700'},yearStripContainer:{backgroundColor:T.COLORS.BG_FAINT,borderBottomColor:T.COLORS.BORDER,borderBottomWidth:1},yearStripContent:{gap:N.SPACING.SM,paddingHorizontal:N.SPACING.XXL,paddingVertical:N.SPACING.MD},yearChip:{backgroundColor:T.COLORS.BG_SURFACE,borderColor:T.COLORS.BORDER_DEFAULT,borderRadius:16,borderWidth:1,paddingHorizontal:N.SPACING.LG,paddingVertical:N.SPACING.SM},yearChipActive:{backgroundColor:T.COLORS.WARNING,borderColor:T.COLORS.WARNING},yearChipText:{color:T.COLORS.TEXT_BODY,fontSize:G.FONT_SIZE.MD,fontWeight:'500'},yearChipTextActive:{color:T.COLORS.TEXT_PRIMARY},filtersSection:{maxWidth:1200,paddingBottom:N.SPACING.LG,paddingHorizontal:N.SPACING.XXL,paddingTop:N.SPACING.XXL,width:'100%'},filtersRow:{marginBottom:N.SPACING.MD},filterChips:{gap:N.SPACING.SM,paddingVertical:N.SPACING.XS},tagChip:{backgroundColor:T.COLORS.BG_WASH,borderColor:T.COLORS.BORDER,borderRadius:16,borderWidth:1,paddingHorizontal:N.SPACING.MD,paddingVertical:N.SPACING.SM},tagChipActive:{backgroundColor:T.COLORS.WARNING_BG,borderColor:T.COLORS.WARNING},tagChipText:{color:T.COLORS.TEXT_MUTED,fontSize:G.FONT_SIZE.SM},tagChipTextActive:{color:T.COLORS.WARNING_DARK,fontWeight:'600'},resultCount:{color:T.COLORS.TEXT_MUTED,fontSize:G.FONT_SIZE.MD,marginTop:N.SPACING.XS},articlesSection:{paddingBottom:N.SPACING.JUMBO,paddingHorizontal:N.SPACING.XXL,width:'100%'},articlesGrid:{flexDirection:'row',flexWrap:'wrap',gap:N.SPACING.XXL},cardLayout:Object.assign({flexBasis:280,flexGrow:1,flexShrink:0,maxWidth:380,overflow:'hidden'},{transition:'box-shadow 0.2s',cursor:'pointer'}),cardImage:{backgroundColor:T.COLORS.BG_SUBTLE_100,height:180,width:'100%'},cardImageContainer:{position:'relative'},cardImageStatus:{position:'absolute',right:N.SPACING.MD,top:N.SPACING.MD},cardContent:{flex:1,padding:N.SPACING.XL},cardTitle:{color:T.COLORS.TEXT_PRIMARY,fontSize:G.FONT_SIZE.XL,fontWeight:'600',lineHeight:24,marginBottom:N.SPACING.SM},cardExcerpt:{color:T.COLORS.TEXT_MUTED,fontSize:G.FONT_SIZE.MD,lineHeight:22,marginBottom:N.SPACING.MD},cardMeta:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginTop:'auto'},cardMetaPrimary:{alignItems:'center',flexDirection:'row',gap:N.SPACING.SM},cardDate:{color:T.COLORS.TEXT_PLACEHOLDER,fontSize:G.FONT_SIZE.SM},cardAuthor:{color:T.COLORS.TEXT_PLACEHOLDER,fontSize:G.FONT_SIZE.SM},pagination:{alignItems:'center',flexDirection:'row',gap:N.SPACING.LG,justifyContent:'center',paddingVertical:N.SPACING.HUGE},pageButton:{borderColor:T.COLORS.WARNING,borderRadius:8,borderWidth:1,paddingHorizontal:N.SPACING.XL,paddingVertical:N.SPACING.MD},pageButtonDisabled:{borderColor:T.COLORS.BORDER_DEFAULT},pageButtonText:{color:T.COLORS.WARNING,fontSize:G.FONT_SIZE.MD,fontWeight:'600'},pageButtonTextDisabled:{color:T.COLORS.BORDER_DEFAULT},pageInfo:{color:T.COLORS.TEXT_BODY,fontSize:G.FONT_SIZE.MD,fontWeight:'500'}})},708,[34,276,222,488,95,283,328,489,705,709,710,516,711,567,707,605,512,712,674,713,565,490,493,494,557,561,714,562,685,717,104]);
807__d(function(s,e,b,c,t,a,d){t.exports={uri:"/assets/src/assets/images/hero/blog-valley-dusk.ba9b36b991de4ffe89d8c1bcc1012c5b.jpg",width:1024,height:768}},709,[]);
808__d(function(g,r,i,a,m,e,d){"use strict";
808Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useAuth",{enumerable:!0,get:function(){return t.useAuth}});var t=r(d[0])},710,[411]);
809__d(function(g,r,i,a,m,_e,d){"use strict";const e=["style","placeholderTextColor"];function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AppTextInput=function(o){let{style:n,placeholderTextColor:u}=o,c=(0,t.default)(o,e);return(0,O.jsx)(l.default,Object.assign({style:[C.base,n],placeholderTextColor:u??s.COLORS.TEXT_CAPTION},c))};var t=o(r(d[0]));r(d[1]);var l=o(r(d[2])),n=r(d[3]),s=r(d[4]),u=r(d[5]),c=r(d[6]),O=r(d[7]);const C=(0,n.createStyles)({base:{borderWidth:1,borderColor:s.COLORS.BORDER,borderRadius:8,padding:u.SPACING.MD,fontSize:c.FONT_SIZE.MD,color:s.COLORS.NAVY_MID,backgroundColor:s.COLORS.BG_SURFACE}})},711,[109,34,394,489,490,493,494,104]);
810__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Pagination=function({page:e,totalPages:u,onPageChange:p,itemLabel:c="items"}){const[b,S]=(0,t.useState)(String(e+1)),T=e>0,y=null==u||e<u-1,I=null!=u&&u>0,P=I?e+1:0,C=(0,t.useMemo)(()=>{const e=b.trim();if(!/^\d+$/.test(e))return null;const t=Number(e);return!Number.isSafeInteger(t)||t<1||null!=u&&t>u?null:t-1},[b,u]),O=null!=C&&C!==e;(0,t.useEffect)(()=>{S(String(e+1))},[e]);const N=()=>{null!=C&&p(C)};return(0,f.jsxs)(n.default,{style:x.pagination,children:[(0,f.jsx)(o.default,{accessibilityLabel:`Previous page of ${c}`,accessibilityRole:"button",style:[x.pageButton,!T&&x.pageButtonDisabled],onPress:()=>{p(Math.max(0,e-1))},disabled:!T,children:(0,f.jsx)(l.default,{style:[x.pageButtonText,!T&&x.pageButtonTextDisabled],children:"Previous"})}),(0,f.jsx)(l.default,{style:x.pageInfo,children:null!=u?`Page ${P} of ${u}`:`Page ${e+1}`}),I&&u>1&&(0,f.jsxs)(n.default,{style:x.pageJump,children:[(0,f.jsx)(l.default,{style:x.pageJumpLabel,children:"Go to page"}),(0,f.jsx)(s.AppTextInput,{accessibilityLabel:`Page number for ${c}`,value:b,onChangeText:S,onSubmitEditing:N,keyboardType:"number-pad",returnKeyType:"go",selectTextOnFocus:!0,style:x.pageJumpInput}),(0,f.jsx)(o.default,{accessibilityLabel:`Go to page for ${c}`,accessibilityRole:"button",style:[x.pageButton,!O&&x.pageButtonDisabled],onPress:N,disabled:!O,children:(0,f.jsx)(l.default,{style:[x.pageButtonText,!O&&x.pageButtonTextDisabled],children:"Go"})})]}),(0,f.jsx)(o.default,{accessibilityLabel:`Next page of ${c}`,accessibilityRole:"button",style:[x.pageButton,!y&&x.pageButtonDisabled],onPress:()=>{p(null!=u?Math.min(u-1,e+1):e+1)},disabled:!y,children:(0,f.jsx)(l.default,{style:[x.pageButtonText,!y&&x.pageButtonTextDisabled],children:"Next"})})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),u=r(d[5]),p=r(d[6]),c=r(d[7]),b=r(d[8]),f=r(d[9]);const x=(0,u.createStyles)({pageButton:{backgroundColor:p.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:c.SPACING.XL,paddingVertical:c.SPACING.MD},pageButtonDisabled:{backgroundColor:p.COLORS.BORDER_NEUTRAL},pageButtonText:{color:p.COLORS.TEXT_INVERSE,fontSize:b.FONT_SIZE.MD,fontWeight:'600'},pageButtonTextDisabled:{color:p.COLORS.TEXT_CAPTION},pageInfo:{color:p.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.MD},pageJump:{alignItems:'center',flexDirection:'row',gap:c.SPACING.SM},pageJumpInput:{minWidth:72,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.SM,textAlign:'center'},pageJumpLabel:{color:p.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM},pagination:{alignItems:'center',flexWrap:'wrap',flexDirection:'row',gap:c.SPACING.LG,justifyContent:'center',paddingVertical:c.SPACING.XXL}})},712,[34,276,222,488,711,489,490,493,494,104]);
811__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SidebarLayout=function({sidebar:t,strip:l,children:o,bodyMaxWidth:s=1100,narrowMaxWidth:f,sidebarWidth:y=220}){const{width:b}=(0,n.default)(),x=b>=u.BREAKPOINTS.tablet;return(0,h.jsxs)(h.Fragment,{children:[!x&&l,x?(0,h.jsxs)(e.default,{style:[c.bodyLayout,{maxWidth:s}],children:[null!=t&&(0,h.jsx)(e.default,{style:[c.sidebar,{width:y}],children:t}),(0,h.jsx)(e.default,{style:c.mainContent,children:o})]}):null!=f?(0,h.jsx)(e.default,{style:[c.narrowLayout,{maxWidth:f}],children:o}):(0,h.jsx)(e.default,{children:o})]})},r(d[0]);var e=t(r(d[1]));r(d[2]);var n=t(r(d[3])),l=r(d[4]),o=r(d[5]),s=r(d[6]),u=r(d[7]),h=r(d[8]);const c=(0,l.createStyles)({bodyLayout:{alignSelf:'center',flexDirection:'row',paddingTop:s.SPACING.XXXL,width:'100%'},mainContent:{flex:1,minWidth:0},narrowLayout:{alignSelf:'center',width:'100%'},sidebar:Object.assign({borderRightColor:o.COLORS.BORDER,borderRightWidth:1,paddingLeft:s.SPACING.XXL,paddingRight:s.SPACING.LG},{position:'sticky',top:0,alignSelf:'flex-start'})})},713,[34,276,95,552,489,490,493,553,104]);
812__d(function(g,r,i,a,m,e,d){"use strict";
812Object.defineProperty(e,'__esModule',{value:!0}),e.useResolveImageUri=function(l,t){const c=(0,o.useSyncExternalStore)(u.subscribeImageUriDevOverride,u.readForceImageUriFailure,()=>!1);return(0,o.useMemo)(()=>c?(n.logger.warn(`[resolveImageUri] Dev override forcing failure for ${t}`),null):(0,s.resolveImageUri)(l,t),[l,t,c])};var o=r(d[0]),u=r(d[1]),n=r(d[2]),s=r(d[3])},714,[34,715,469,716]);
813__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readForceImageUriFailure=function(){return t.IS_DEVELOPMENT_BUILD&&n},e.setImageUriDevFailure=c,e.clearImageUriDevOverride=function(){c(!1)},e.subscribeImageUriDevOverride=function(n){if(!t.IS_DEVELOPMENT_BUILD)return()=>{};return u.add(n),()=>{u.delete(n)}};var t=r(d[0]);let n=!1;const u=new Set;function c(c){t.IS_DEVELOPMENT_BUILD&&(n=c,u.forEach(t=>{t()}))}},715,[508]);
814__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveImageUri=function(l,s="image asset"){if(null==l)return null;if('string'==typeof l)return''===l?(t.logger.error(`[resolveImageUri] ${s}: image asset URL string must not be empty`),null):l;if('number'==typeof l)return t.logger.error(`[resolveImageUri] ${s}: expected a web bundler URL, not a native asset id (${l})`),null;if('object'==typeof l){if('default'in l)return o(l,'default');if('uri'in l)return o(l,'uri')}return t.logger.error(`[resolveImageUri] ${s}: unrecognized image asset shape: ${n(l)}`),null},r(d[0]);var t=r(d[1]);function n(t){return null==t?'null':'object'==typeof t?`object(keys=${Object.keys(t).join(',')})`:typeof t}function o(o,l){if(!Object.hasOwn(o,l))return t.logger.error(`[resolveImageUri] Image asset is missing required "${l}" field: ${n(o)}`),null;const s=Reflect.get(o,l);return'string'!=typeof s||''===s?(t.logger.error(`[resolveImageUri] Image asset "${l}" must be a non-empty string, got ${n(s)}`),null):s}},716,[95,469]);
815__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.heroBackgroundFromImageUri=function(n,o={}){if(null!=n&&''!==n)return Object.assign({imageUrl:n},null!=o.imagePosition?{imagePosition:o.imagePosition}:{});return{gradient:o.fallbackGradient??t}};var n=r(d[0]);const t=`linear-gradient(135deg, ${n.COLORS.BRAND_PRIMARY} 0%, ${n.COLORS.BRAND_GRADIENT_END} 100%)`},717,[490]);
816__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BroadcastersScreen=function(){const e=(0,C.useSeoMeta)('Broadcasters');return(0,L.jsxs)(u.PageLayout,{children:[(0,L.jsx)(h.WebMeta,Object.assign({},e)),(0,L.jsxs)(n.default,{style:y.MARKETING.container,children:[(0,L.jsx)(p.HeroSection,{backgroundColor:f.COLORS.INFO,background:{imageUrl:'https://images.unsplash.com/photo-1478737270239-2f02b77fc618?w=1920&q=80',imagePosition:'center 40%'},minHeight:500,label:"FOR BROADCASTERS",title:'Real-Time Air Quality Data\nfor Your Audience',subtitle:"From TV weather segments to mobile apps, broadcasters trust PurpleAir to deliver accurate, hyper-local air quality information. Engage your audience with data from 35,000+ sensors worldwide.",centered:!1,children:(0,L.jsxs)(t.default,{style:y.MARKETING.heroActions,children:[(0,L.jsx)(S.ServiceExternalLink,{service:"dataApiDocsUrl",style:b.primaryButton,textStyle:b.primaryButtonText,accessibilityLabel:"Access the API",children:"Access the API"}),(0,L.jsx)(S.ServiceExternalLink,{service:"mapBaseUrl",style:b.secondaryButton,textStyle:b.secondaryButtonText,accessibilityLabel:"View Live Map",children:"View Live Map"})]})}),(0,L.jsxs)(t.default,{style:j.integrationsSection,children:[(0,L.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Platform Integrations"}),(0,L.jsx)(o.default,{style:y.MARKETING.sectionSubtitle,children:"PurpleAir data is integrated into major weather and mapping platforms worldwide"}),(0,L.jsx)(t.default,{style:j.integrationsGrid,children:N.map(e=>(0,L.jsx)(I,Object.assign({},e),e.name))})]}),(0,L.jsxs)(t.default,{style:[y.MARKETING.section,j.newsSection],children:[(0,L.jsx)(o.default,{style:y.MARKETING.sectionTitleLight,children:"Trusted by News Organizations"}),(0,L.jsx)(o.default,{style:y.MARKETING.sectionSubtitleLight,children:"Major TV networks and news outlets rely on PurpleAir for air quality reporting"}),(0,L.jsx)(t.default,{style:j.broadcastersGrid,children:R.map(e=>(0,L.jsx)(T,Object.assign({},e),e.name))})]}),(0,L.jsxs)(t.default,{style:y.MARKETING.section,children:[(0,L.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Mobile App Ecosystem"}),(0,L.jsx)(o.default,{style:y.MARKETING.sectionSubtitle,children:"Third-party developers have built popular apps powered by PurpleAir data"}),(0,L.jsx)(t.default,{style:j.appsGrid,children:E.map(e=>(0,L.jsxs)(c.ExternalLink,{href:e.url,style:j.appCard,accessibilityLabel:`Visit ${e.name} - ${e.platform}`,children:[(0,L.jsx)(o.default,{style:j.appName,children:e.name}),(0,L.jsx)(o.default,{style:j.appPlatform,children:e.platform}
816),(0,L.jsx)(o.default,{style:j.appDesc,children:e.description}),(0,L.jsx)(o.default,{style:j.appLink,children:e.linkLabel})]},e.name))})]}),(0,L.jsx)(t.default,{style:[y.MARKETING.section,j.apiSection],children:(0,L.jsxs)(t.default,{style:j.apiContent,children:[(0,L.jsx)(o.default,{style:j.apiLabel,children:"DEVELOPER API"}),(0,L.jsx)(o.default,{style:j.apiTitle,children:"Build with PurpleAir Data"}),(0,L.jsx)(o.default,{style:j.apiDesc,children:"Access real-time and historical air quality data from our global sensor network through a comprehensive REST API."}),(0,L.jsx)(t.default,{style:j.apiFeatures,children:x.map(e=>(0,L.jsxs)(t.default,{style:j.apiFeature,children:[(0,L.jsx)(o.default,{style:j.apiFeatureTitle,children:e.title}),(0,L.jsx)(o.default,{style:j.apiFeatureDesc,children:e.description})]},e.title))}),(0,L.jsxs)(t.default,{style:j.apiActions,children:[(0,L.jsx)(S.ServiceExternalLink,{service:"dataApiDocsUrl",style:j.apiButton,textStyle:j.apiButtonText,accessibilityLabel:"API Documentation",children:"API Documentation"}),(0,L.jsx)(l.AppLink,{to:"CommunityTopic",href:"/community/t/about-the-purpleair-api/7145",style:j.apiSecondaryButton,children:(0,L.jsx)(o.default,{style:j.apiSecondaryButtonText,children:"Developer Community"})})]})]})}),(0,L.jsxs)(t.default,{style:y.MARKETING.section,children:[(0,L.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Embeddable Widgets"}),(0,L.jsx)(o.default,{style:y.MARKETING.sectionSubtitle,children:"Add real-time air quality data to any website with our embeddable widgets"}),(0,L.jsx)(t.default,{style:j.widgetFeatures,children:G.map(e=>(0,L.jsxs)(t.default,{style:j.widgetFeature,children:[(0,L.jsx)(o.default,{style:j.widgetFeatureTitle,children:e.title}),(0,L.jsx)(o.default,{style:j.widgetFeatureDesc,children:e.description})]},e.title))}),(0,L.jsx)(S.ServiceExternalLink,{service:"mapBaseUrl",style:j.widgetCta,textStyle:j.widgetCtaText,accessibilityLabel:"Get Widget Code from PurpleAir Map",children:"Get Widget Code from PurpleAir Map"})]}),(0,L.jsxs)(t.default,{style:[y.MARKETING.section,j.useCasesSection],children:[(0,L.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Broadcast Use Cases"}),(0,L.jsx)(t.default,{style:j.useCasesGrid,children:P.map(e=>(0,L.jsxs)(t.default,{style:j.useCase,children:[(0,L.jsx)(o.default,{style:j.useCaseTitle,children:e.title}),(0,L.jsx)(o.default,{style:j.useCaseDesc,children:e.description})]},e.title))})]}),(0,L.jsxs)(t.default,{style:[y.MARKETING.ctaSection,{backgroundColor:f.COLORS.INFO}],children:[(0,L.jsx)(o.default,{style:y.MARKETING.ctaTitle,children:"Ready to Broadcast Air Quality?"}),(0,L.jsx)(o.default,{style:y.MARKETING.ctaSubtitle,children:"Contact us for enterprise API access, custom integrations, and broadcast partnerships."}),(0,L.jsxs)(t.default,{style:y.MARKETING.ctaActions,children:[(0,L.jsx)(l.AppLink,{to:"Contact",style:w.ctaButton,children:(0,L.jsx)(o.default,{style:w.ctaButtonText,children:"Contact Partnership Team"})}),(0,L.jsx)(S.ServiceExternalLink,{service:"dataApiDocsUrl",style:w.ctaSecondaryButton,textStyle:w.ctaSecondaryButtonText,accessibilityLabel:"Start with API",children:"Start with API"})]})]})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2]));r(d[3]);var n=e(r(d[4])),s=r(d[5]),l=r(d[6]),c=r(d[7]),p=r(d[8]),u=r(d[9]),S=r(d[10]),h=r(d[11]),f=r(d[12]),y=r(d[13]),A=r(d[14]),O=r(d[15]),C=r(d[16]),L=r(d[17]);const b=(0,y.createHeroButtonStyles)(f.COLORS.BG_SURFACE,f.COLORS.INFO),w=(0,y.createCTAButtonStyles)(f.COLORS.BG_SURFACE,f.COLORS.INFO);function I({name:e,description:t,url:n,type:s}){return(0,L.jsxs)(c.ExternalLink,{href:n,style:j.integration,accessibilityLabel:`Learn more about ${e}`,children:[(0,L.jsx)(o.default,{style:j.integrationType,children:s}),(0,L.jsx)(o.default,{style:j.integrationName,children:e}),(0,L.jsx)(o.default,{style:j.integrationDesc,children:t}),(0,L.jsx)(o.default,{style:j.integrationLink,children:"Learn More"})]})}function T({name:e,description:n,url:s}){const l=(0,L.jsxs)(t.default,{style:j.broadcaster,children:[(0,L.jsx)(o.default,{style:j.broadcasterName,children:e}),(0,L.jsx)(o.default,{style:j.broadcasterDesc,children:n}),null!=s?(0,L.jsx)(o.default,{style:j.broadcasterLink,children:"View Coverage"}):null]});return null!=s?(0,L.jsx)(c.ExternalLink,{href:s,accessibilityLabel:`View ${e} coverage`,children:l}):l}const N=[{name:'Google Maps',type:'MAPPING',description:'PurpleAir data powers the Air Quality layer in Google Maps, providing hyper-local readings to billions of users on mobile and desktop.',url:'https://blog.google/products/search/get-some-fresh-air-outdoors-with-google/'},{name:'Weather Underground',type:'WEATHER',description:'The Weather Company (IBM) integrates PurpleAir sensor data across its consumer properties including Weather Underground for comprehensive air quality coverage.',url:'https://www.prnewswire.com/news-releases/the-weather-company-collaborates-with-purpleair-to-provide-community-air-quality-data-across-its-consumer-properties-300491652.html'},{name:'Windy.com',type:'WEATHER',description:'Popular weather visualization platform Windy.com integrates real-time PurpleAir data for interactive air quality maps used by millions.',url:'https://www.windy.com'},{name:'AirNow Fire & Smoke Map',type:'GOVERNMENT',description:'U.S. EPA and Forest Service integrate PurpleAir data into the official Fire and Smoke Map at fire.airnow.gov for wildfire air quality monitoring.',url:'https://fire.airnow.gov'},{name:'Google Nest',type:'SMART HOME',description:'PurpleAir data is available on Nest displays and speakers, offering real-time air quality updates through Google\'s smart home ecosystem.',url:'https://blog.google/products/search/get-some-fresh-air-outdoors-with-google/'},{name:'Home Assistant',type:'SMART HOME',description:'Open-source home automation platform with native PurpleAir integration for real-time sensor data and automation triggers.',url:'https://www.home-assistant.io/integrations/purpleair'}],R=[{name:'NBC News',description:'NBC affiliates display live PurpleAir maps during weather segments for wildfire smoke coverage, helping viewers understand real-time air quality conditions.',url:'https://www.mynbc5.com/article/track-wildfire-smoke/65412608'},{name:'CBS News',description:'CBS News reports on air quality alert systems utilizing PurpleAir data to inform the public about wildfire smoke health risks.',url:'https://www.cbsnews.com/video/new-air-quality-alert-system-works-to-combat-risks-of-wildfire-smoke/'},{name:'KQED',description:'San Francisco Bay Area\'s public media outlet uses PurpleAir for detailed wildfire air quality analysis and citizen science coverage.',url:'https://www.kqed.org/science/1969271/making-sense-of-purple-air-vs-airnow-and-a-new-map-to-rule-them-all'},{name:'The New York Times',description:'Featured PurpleAir in coverage of wildfire smoke, air quality monitoring technology, and community science initiatives.'},{name:'The Washington Post',description:'Reports on air quality events and the role of low-cost sensors in democratizing environmental monitoring.'},{name:'NPR',description:'National Public Radio coverage of air quality issues, wildfire smoke impacts, and community monitoring networks.'}],E=[{name:'Paku',platform:'iOS, watchOS, macOS',description:'Real-time air quality monitoring with widgets for Home Screen, Lock Screen, Apple Watch, and Mac Desktop. Push notifications for AQI threshold alerts.',linkLabel:'paku.app',url:'https://paku.app'},{name:'My PurpleAir',platform:'iOS, iPadOS, watchOS',description:'Monitor AQI from your own PurpleAir sensor. Supports widgets and complications for quick access to air quality data.',linkLabel:'App Store',url:'https://apps.apple.com/us/app/my-purpleair/id1606538700'},{name:'Fresh Air',platform:'iOS, watchOS',description:'Real-time air quality on iPhone and Apple Watch with notifications when air quality worsens. Set alerts based on specific AQI categories.',linkLabel:'fresh-air-app.com',url:'https://fresh-air-app.com'},{name:'Local Haze',platform:'iOS, watchOS',description:'Aggregates air quality data from PurpleAir and other sources. Widgets and notifications keep you informed about changes.',linkLabel:'localhaze.humanlogic.com',url:'https://localhaze.humanlogic.com'},{name:'Breathable',platform:'iOS, iPadOS, watchOS, macOS',description:'Free, customizable AQI widget. A quick, glanceable answer to the question: Is it safe to go outside?',linkLabel:'breathable.app',url:'https://breathable.app'},{name:'PurpleAir Python API',platform:'Developer Tool',description:'Python 
816wrapper for the PurpleAir API. Build custom applications, data analysis tools, and integrations.',linkLabel:'pypi.org',url:'https://pypi.org/project/purpleair-api/'}],x=[{title:'Real-Time Data',description:'Access live readings from 35,000+ sensors updated every 2 minutes.'},{title:'Historical Data',description:'Query historical readings for trend analysis and research.'},{title:'Geospatial Queries',description:'Find sensors by location, bounding box, or radius search.'}],G=[{title:'Easy Integration',description:'Copy and paste a simple HTML snippet to display air quality on your website.'},{title:'Customizable Display',description:'Choose from multiple data layers including PM2.5, temperature, and humidity.'},{title:'Real-Time Updates',description:'Widgets automatically refresh with the latest sensor readings.'},{title:'Responsive Design',description:'Widgets adapt to any screen size for mobile and desktop viewing.'}],P=[{title:'Weather Segments',description:'Integrate air quality data into daily weather reports. Show viewers hyper-local AQI readings alongside temperature and precipitation forecasts.'},{title:'Wildfire Coverage',description:'During fire season, display real-time smoke impact maps. Help viewers understand air quality conditions across affected regions.'},{title:'Health Advisories',description:'Issue air quality health warnings based on real-time data. Guide sensitive groups on when to limit outdoor activities.'},{title:'Digital Signage',description:'Display air quality on public screens in airports, transit stations, and building lobbies. Keep communities informed in real-time.'},{title:'Mobile Apps',description:'Build air quality features into your station\'s mobile app. Push notifications for air quality alerts in your coverage area.'},{title:'Website Integration',description:'Embed interactive air quality maps on your news website. Provide viewers with searchable, hyper-local air quality data.'}];const j=(0,s.createStyles)({integrationsSection:{backgroundColor:f.COLORS.BG_SLATE,paddingHorizontal:A.SPACING.XXL,paddingVertical:A.SPACING.JUMBO},integrationsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XL,justifyContent:'center',maxWidth:1100},integration:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER_SLATE,borderRadius:12,borderWidth:1,padding:A.SPACING.XXL,width:320},integrationType:{color:f.COLORS.INFO,fontSize:O.FONT_SIZE.XS,fontWeight:'600',letterSpacing:1,marginBottom:A.SPACING.SM},integrationName:{color:f.COLORS.NAVY_DARK,fontSize:O.FONT_SIZE.XXL,fontWeight:'600',marginBottom:A.SPACING.MD},integrationDesc:{color:f.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.MD,lineHeight:22,marginBottom:A.SPACING.LG},integrationLink:{color:f.COLORS.INFO,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},newsSection:{backgroundColor:f.COLORS.INFO},broadcastersGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XL,justifyContent:'center',maxWidth:1100},broadcaster:{backgroundColor:f.COLORS.OVERLAY_LIGHT_10,borderRadius:12,padding:A.SPACING.XXL,width:320},broadcasterName:{color:f.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.XXL,fontWeight:'600',marginBottom:A.SPACING.MD},broadcasterDesc:{color:f.COLORS.OVERLAY_LIGHT_85,fontSize:O.FONT_SIZE.MD,lineHeight:22,marginBottom:A.SPACING.MD},broadcasterLink:{color:f.COLORS.OVERLAY_LIGHT_90,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},appsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XL,justifyContent:'center',maxWidth:1100},appCard:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER_SLATE,borderRadius:12,borderWidth:1,padding:A.SPACING.XXL,width:320},appName:{color:f.COLORS.NAVY_DARK,fontSize:O.FONT_SIZE.XXL,fontWeight:'600',marginBottom:A.SPACING.XS},appPlatform:{color:f.COLORS.INFO,fontSize:O.FONT_SIZE.XS,fontWeight:'500',marginBottom:A.SPACING.MD},appDesc:{color:f.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.MD,lineHeight:22,marginBottom:A.SPACING.LG},appLink:{color:f.COLORS.INFO,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},apiSection:{backgroundColor:f.COLORS.NAVY_DARK},apiContent:{alignSelf:'center',maxWidth:900},apiLabel:{color:f.COLORS.INFO,fontSize:O.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:A.SPACING.MD},apiTitle:Object.assign({color:f.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:A.SPACING.LG},{fontSize:O.FONT_SIZE.DISPLAY_LG}),apiDesc:Object.assign({color:f.COLORS.OVERLAY_LIGHT_85,fontSize:O.FONT_SIZE.XL,lineHeight:28,marginBottom:A.SPACING.HUGE},{maxWidth:600}),apiFeatures:{flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XL,marginBottom:A.SPACING.HUGE},apiFeature:{backgroundColor:f.COLORS.OVERLAY_LIGHT_05,borderColor:f.COLORS.OVERLAY_LIGHT_10,borderRadius:12,borderWidth:1,padding:A.SPACING.XL,width:200},apiFeatureTitle:{color:f.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.LG,fontWeight:'600',marginBottom:A.SPACING.SM},apiFeatureDesc:{color:f.COLORS.OVERLAY_LIGHT_70,fontSize:O.FONT_SIZE.SM,lineHeight:20},apiActions:{flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.LG},apiButton:{backgroundColor:f.COLORS.INFO,borderRadius:8,paddingHorizontal:A.SPACING.XXL,paddingVertical:A.SPACING.LG},apiButtonText:{color:f.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.LG,fontWeight:'600'},apiSecondaryButton:{backgroundColor:f.COLORS.TRANSPARENT,borderColor:f.COLORS.OVERLAY_LIGHT_30,borderRadius:8,borderWidth:2,paddingHorizontal:A.SPACING.XXL,paddingVertical:A.SPACING.LG},apiSecondaryButtonText:{color:f.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.LG,fontWeight:'600'},widgetFeatures:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XXL,justifyContent:'center',marginBottom:A.SPACING.XXXL,maxWidth:1e3},widgetFeature:{alignItems:'center',width:220},widgetFeatureTitle:{color:f.COLORS.NAVY_DARK,fontSize:O.FONT_SIZE.LG,fontWeight:'600',marginBottom:A.SPACING.SM,textAlign:'center'},widgetFeatureDesc:{color:f.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.MD,lineHeight:22,textAlign:'center'},widgetCta:{alignSelf:'center',backgroundColor:f.COLORS.BG_SLATE_100,borderRadius:8,paddingHorizontal:A.SPACING.XXXL,paddingVertical:A.SPACING.LG},widgetCtaText:{color:f.COLORS.INFO,fontSize:O.FONT_SIZE.LG,fontWeight:'600'},useCasesSection:{backgroundColor:f.COLORS.BG_SLATE},useCasesGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XXL,justifyContent:'center',marginTop:A.SPACING.HUGE,maxWidth:1100},useCase:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER_SLATE,borderRadius:12,borderWidth:1,padding:A.SPACING.XXL,width:320},useCaseTitle:{color:f.COLORS.NAVY_DARK,fontSize:O.FONT_SIZE.XL,fontWeight:'600',marginBottom:A.SPACING.MD},useCaseDesc:{color:f.COLORS.TEXT_SLATE,fontSize:O.FONT_SIZE.MD,lineHeight:22}})},718,[34,276,222,95,283,489,516,519,674,568,522,565,490,676,493,494,562,104]);
817__d(function(g,r,i,a,m,_e,d){"use strict";
817function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BusinessScreen=function(){const e=(0,T.useSeoMeta)('Business');return(0,O.jsxs)(y.PageLayout,{children:[(0,O.jsx)(f.WebMeta,Object.assign({},e)),(0,O.jsxs)(s.default,{style:R.container,children:[(0,O.jsx)(u.HeroSection,{backgroundColor:S.COLORS.NAVY_DARK,background:{imageUrl:'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&q=80',imagePosition:'center 30%'},minHeight:500,label:"FOR BUSINESS",title:'Air Quality Intelligence\nfor the Modern Enterprise',subtitle:"From ESG reporting to operational compliance, leading companies use PurpleAir to monitor air quality, protect employees, and demonstrate environmental responsibility.",centered:!1,children:(0,O.jsxs)(t.default,{style:p.MARKETING.heroActions,children:[(0,O.jsx)(o.AppLink,{to:"Contact",style:j.primaryButton,children:(0,O.jsx)(n.default,{style:j.primaryButtonText,children:"Request Demo"})}),(0,O.jsx)(h.ServiceExternalLink,{service:"dataApiDocsUrl",style:j.secondaryButton,textStyle:j.secondaryButtonText,accessibilityLabel:"Enterprise API",children:"Enterprise API"})]})}),(0,O.jsx)(t.default,{style:R.valueSection,children:(0,O.jsxs)(t.default,{style:[p.MARKETING.grid,{gap:x.SPACING.XXXL}],children:[(0,O.jsx)(E,{title:"Real-Time Monitoring",description:"Track air quality across facilities, offices, and operations 24/7 with instant alerts."}),(0,O.jsx)(E,{title:"ESG Reporting",description:"Quantifiable environmental data for sustainability reports and stakeholder communications."}),(0,O.jsx)(E,{title:"Regulatory Compliance",description:"Supplement required monitoring with dense sensor networks for comprehensive coverage."}),(0,O.jsx)(E,{title:"Employee Health",description:"Protect workplace air quality and demonstrate commitment to employee wellbeing."})]})}),(0,O.jsxs)(t.default,{style:p.MARKETING.section,children:[(0,O.jsx)(n.default,{style:[p.MARKETING.sectionTitleCompact,R.navyText],children:"Industry Solutions"}),(0,O.jsx)(n.default,{style:R.sectionSubtitle,children:"PurpleAir sensors are deployed across industries for air quality monitoring and compliance"}),(0,O.jsxs)(t.default,{style:p.MARKETING.gridWide,children:[(0,O.jsx)(L,{title:"Manufacturing",description:"Monitor emissions and air quality around production facilities to protect workers and communities.",useCases:['Fence-line monitoring','Indoor air quality','Emission verification','Community transparency'],to:"DataUseCases"}),(0,O.jsx)(L,{title:"Oil & Gas",description:"Support regulatory requirements for refinery fence-line monitoring and community air quality reporting.",useCases:['Refinery perimeter monitoring','Flaring event tracking','AB 1647 compliance (CA)','Public data dashboards'],url:"https://www.aqmd.gov/home/rules-compliance/rules/support-documents/rule-1180-refinery-fenceline-monitoring-plans"}),(0,O.jsx)(L,{title:"Mining & Extraction",description:"Track particulate matter from mining operations and demonstrate environmental stewardship.",useCases:['Dust monitoring','Haul road emissions','Processing facility air','Reclamation verification'],to:"DataUseCases"}),(0,O.jsx)(L,{title:"Construction",description:"Monitor dust and emissions from construction sites to comply with local ordinances and protect workers.",useCases:['Site perimeter monitoring','Demolition dust tracking','Worker exposure assessment','Neighbor relations'],to:"DataUseCases"}),(0,O.jsx)(L,{title:"Logistics & Warehousing",description:"Track vehicle emissions and indoor air quality in distribution centers and transportation hubs.",useCases:['Loading dock air quality','Fleet yard monitoring','Indoor warehouse air','Sustainability metrics']}),(0,O.jsx)(L,{title:"Real Estate & Property",description:"Differentiate properties with on-site air quality monitoring tenants can check in real time.",useCases:['Building air quality','Tenant amenity','Indoor/outdoor readings to guide ventilation and filtration','Property marketing','Sustainability metrics'],to:"BlogArticle",href:"/blog/how-air-quality-data-is-transforming-real-estate-decisions"})]})]}),(0,O.jsx)(t.default,{style:[p.MARKETING.section,R.esgSection],children:(0,O.jsxs)(t.default,{style:R.esgContent,children:[(0,O.jsx)(n.default,{style:R.esgLabel,children:"ESG & SUSTAINABILITY"}),(0,O.jsx)(n.default,{style:R.esgTitle,children:"Data-Driven Environmental Reporting"}),(0,O.jsx)(n.default,{style:R.esgDesc,children:"Investors and stakeholders increasingly demand transparent environmental data. PurpleAir provides quantifiable air quality metrics you can include in sustainability reporting."}),(0,O.jsxs)(t.default,{style:R.esgFeatures,children:[(0,O.jsxs)(t.default,{style:R.esgFeature,children:[(0,O.jsx)(n.default,{style:R.esgFeatureTitle,children:"Continuous Monitoring"}),(0,O.jsx)(n.default,{style:R.esgFeatureDesc,children:"24/7 data collection captures conditions continuously, not just point-in-time snapshots."})]}),(0,O.jsxs)(t.default,{style:R.esgFeature,children:[(0,O.jsx)(n.default,{style:R.esgFeatureTitle,children:"Historical Analysis"}),(0,O.jsx)(n.default,{style:R.esgFeatureDesc,children:"Track trends over time to demonstrate improvement and identify areas for operational optimization."})]}),(0,O.jsxs)(t.default,{style:R.esgFeature,children:[(0,O.jsx)(n.default,{style:R.esgFeatureTitle,children:"EPA Correction Factors"}),(0,O.jsx)(n.default,{style:R.esgFeatureDesc,children:"EPA-developed correction equations are applied to sensor data, improving accuracy for PM2.5 readings."})]}),(0,O.jsxs)(t.default,{style:R.esgFeature,children:[(0,O.jsx)(n.default,{style:R.esgFeatureTitle,children:"Public Transparency"}),(0,O.jsx)(n.default,{style:R.esgFeatureDesc,children:"Optionally share data publicly to demonstrate commitment to environmental responsibility."})]})]})]})}),(0,O.jsxs)(t.default,{style:p.MARKETING.section,children:[(0,O.jsx)(n.default,{style:[p.MARKETING.sectionTitleCompact,R.navyText],children:"Regulatory Landscape"}),(0,O.jsx)(n.default,{style:R.sectionSubtitle,children:"Stay ahead of evolving air quality regulations with comprehensive monitoring"}),(0,O.jsxs)(t.default,{style:p.MARKETING.grid,children:[(0,O.jsxs)(t.default,{style:R.regulation,children:[(0,O.jsx)(n.default,{style:R.regulationTitle,children:"California AB 1647"}),(0,O.jsx)(n.default,{style:R.regulationDesc,children:"Requires petroleum refineries to install fence-line air monitoring systems with real-time public data access. PurpleAir sensors supplement required monitoring for enhanced community coverage."})]}),(0,O.jsxs)(t.default,{style:R.regulation,children:[(0,O.jsx)(n.default,{style:R.regulationTitle,children:"SCAQMD Rule 1180"}),(0,O.jsx)(n.default,{style:R.regulationDesc,children:"South Coast Air Quality Management District rule mandating real-time fence-line monitoring at major refineries. Community air monitoring systems enhance required networks."})]}),(0,O.jsxs)(t.default,{style:R.regulation,children:[(0,O.jsx)(n.default,{style:R.regulationTitle,children:"EPA Good Neighbor Provisions"}),(0,O.jsx)(n.default,{style:R.regulationDesc,children:"Federal requirements for monitoring and reducing cross-state air pollution. Dense sensor networks provide additional evidence for compliance and improvement tracking."})]}),(0,O.jsxs)(t.default,{style:R.regulation,children:[(0,O.jsx)(n.default,{style:R.regulationTitle,children:"OSHA Workplace Standards"}),(0,O.jsx)(n.default,{style:R.regulationDesc,children:"Occupational Safety and Health Administration standards for workplace air quality. Real-time monitoring supports compliance and worker protection programs."})]})]})]}),(0,O.jsxs)(t.default,{style:[p.MARKETING.section,R.communitySection],children:[(0,O.jsx)(n.default,{style:R.sectionTitleLight,children:"Community Engagement"}),(0,O.jsx)(n.default,{style:R.sectionSubtitleLight,children:"Build trust with neighboring communities through transparent air quality data"}),(0,O.jsxs)(t.default,{style:p.MARKETING.grid,children:[(0,O.jsxs)(t.default,{style:R.communityCard,children:[(0,O.jsx)(n.default,{style:R.communityCardTitle,children:"Public Dashboards"}),(0,O.jsx)(n.default,{style:R.communityCardDesc,children:"Share real-time air quality data with community members through custom dashboards and the public PurpleAir Map."})]}),(0,O.jsxs)(t.default,{style:R.communityCard,children:[(0,O.jsx)(n.default,{style:R.communityCardTitle,children:"Incident Response"}
817),(0,O.jsx)(n.default,{style:R.communityCardDesc,children:"Quickly assess and communicate air quality impacts during operational upsets or emergency events."})]}),(0,O.jsxs)(t.default,{style:R.communityCard,children:[(0,O.jsx)(n.default,{style:R.communityCardTitle,children:"Stakeholder Reports"}),(0,O.jsx)(n.default,{style:R.communityCardDesc,children:"Generate data-driven reports for community advisory panels, local government, and other stakeholders."})]})]})]}),(0,O.jsxs)(t.default,{style:p.MARKETING.section,children:[(0,O.jsx)(n.default,{style:[p.MARKETING.sectionTitleCompact,R.navyText],children:"Enterprise Capabilities"}),(0,O.jsxs)(t.default,{style:[p.MARKETING.grid,{marginTop:x.SPACING.HUGE}],children:[(0,O.jsxs)(t.default,{style:R.enterpriseFeature,children:[(0,O.jsx)(n.default,{style:R.enterpriseTitle,children:"API Integration"}),(0,O.jsx)(n.default,{style:R.enterpriseDesc,children:"RESTful API for integration with existing environmental management systems, dashboards, and reporting tools."})]}),(0,O.jsxs)(t.default,{style:R.enterpriseFeature,children:[(0,O.jsx)(n.default,{style:R.enterpriseTitle,children:"Bulk Deployment"}),(0,O.jsx)(n.default,{style:R.enterpriseDesc,children:"Streamlined procurement and setup for large-scale sensor networks across multiple facilities and locations."})]}),(0,O.jsxs)(t.default,{style:R.enterpriseFeature,children:[(0,O.jsx)(n.default,{style:R.enterpriseTitle,children:"Custom Alerts"}),(0,O.jsx)(n.default,{style:R.enterpriseDesc,children:"Configure threshold-based monitoring and integrate with your existing alert and incident management systems via the API."})]}),(0,O.jsxs)(t.default,{style:R.enterpriseFeature,children:[(0,O.jsx)(n.default,{style:R.enterpriseTitle,children:"Data Export"}),(0,O.jsx)(n.default,{style:R.enterpriseDesc,children:"Export historical data in multiple formats for analysis, archiving, and regulatory submission."})]}),(0,O.jsxs)(t.default,{style:R.enterpriseFeature,children:[(0,O.jsx)(n.default,{style:R.enterpriseTitle,children:"Private Networks"}),(0,O.jsx)(n.default,{style:R.enterpriseDesc,children:"Option to keep sensor data private for internal use only, with selective public sharing capabilities."})]}),(0,O.jsxs)(t.default,{style:R.enterpriseFeature,children:[(0,O.jsx)(n.default,{style:R.enterpriseTitle,children:"Support"}),(0,O.jsx)(n.default,{style:R.enterpriseDesc,children:"Contact our team for bulk deployment guidance, setup assistance, and technical questions."})]})]})]}),(0,O.jsxs)(t.default,{style:[p.MARKETING.ctaSection,{backgroundColor:S.COLORS.NAVY_DARK}],children:[(0,O.jsx)(n.default,{style:p.MARKETING.ctaTitle,children:"Ready to Get Started?"}),(0,O.jsx)(n.default,{style:p.MARKETING.ctaSubtitle,children:"Contact our enterprise team to discuss your air quality monitoring needs."}),(0,O.jsxs)(t.default,{style:p.MARKETING.ctaActions,children:[(0,O.jsx)(o.AppLink,{to:"Contact",style:A.ctaButton,children:(0,O.jsx)(n.default,{style:A.ctaButtonText,children:"Contact Sales"})}),(0,O.jsx)(o.AppLink,{to:"Store",style:A.ctaSecondaryButton,children:(0,O.jsx)(n.default,{style:A.ctaSecondaryButtonText,children:"View Products"})})]})]})]})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2]));r(d[3]);var s=e(r(d[4])),l=r(d[5]),o=r(d[6]),c=r(d[7]),u=r(d[8]),y=r(d[9]),h=r(d[10]),f=r(d[11]),S=r(d[12]),p=r(d[13]),x=r(d[14]),C=r(d[15]),T=r(d[16]),O=r(d[17]);const j=(0,p.createHeroButtonStyles)(S.COLORS.BLUE_400,S.COLORS.TEXT_INVERSE),A=(0,p.createCTAButtonStyles)(S.COLORS.BLUE_400,S.COLORS.TEXT_INVERSE);function L({title:e,description:s,useCases:l,url:u,to:y,href:h}){const f=null!=u||null!=y,S=(0,O.jsxs)(t.default,{style:R.industry,children:[(0,O.jsx)(n.default,{style:R.industryTitle,children:e}),(0,O.jsx)(n.default,{style:R.industryDesc,children:s}),(0,O.jsx)(t.default,{style:R.useCasesList,children:l.map(s=>(0,O.jsxs)(t.default,{style:R.useCaseItem,children:[(0,O.jsx)(n.default,{style:R.useCaseBullet,children:"+"}),(0,O.jsx)(n.default,{style:R.useCaseText,children:s})]},`${e}-${s}`))}),f?(0,O.jsx)(n.default,{style:R.industryLink,children:"Learn More"}):null]});if(null!=y)return(0,O.jsx)(o.AppLink,Object.assign({to:y},null!=h&&{href:h},{children:S}));if(null!=u){const t=(0,c.readExternalUrlLinkProps)(u);return null===t?S:(0,O.jsx)(c.ExternalLink,Object.assign({},t,{accessibilityLabel:`Learn more about ${e} solutions`,children:S}))}return S}function E({title:e,description:s}){return(0,O.jsxs)(t.default,{style:R.valueProp,children:[(0,O.jsx)(n.default,{style:R.valuePropTitle,children:e}),(0,O.jsx)(n.default,{style:R.valuePropDesc,children:s})]})}const R=(0,l.createStyles)({container:{backgroundColor:S.COLORS.BG_SURFACE,flex:1},valueSection:{backgroundColor:S.COLORS.BG_SLATE,paddingHorizontal:x.SPACING.XXL,paddingVertical:x.SPACING.HUGE},valueProp:{alignItems:'center',width:200},valuePropTitle:{color:S.COLORS.NAVY_DARK,fontSize:C.FONT_SIZE.LG,fontWeight:'600',marginBottom:x.SPACING.SM,textAlign:'center'},valuePropDesc:{color:S.COLORS.TEXT_SLATE,fontSize:C.FONT_SIZE.MD,lineHeight:22,textAlign:'center'},navyText:{color:S.COLORS.NAVY_DARK},sectionTitleLight:Object.assign({color:S.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:x.SPACING.MD,textAlign:'center'},{fontSize:C.FONT_SIZE.DISPLAY_ML}),sectionSubtitle:{alignSelf:'center',color:S.COLORS.TEXT_SLATE,fontSize:C.FONT_SIZE.XL,marginBottom:x.SPACING.HUGE,maxWidth:600,textAlign:'center'},sectionSubtitleLight:{alignSelf:'center',color:S.COLORS.OVERLAY_LIGHT_85,fontSize:C.FONT_SIZE.XL,marginBottom:x.SPACING.HUGE,maxWidth:600,textAlign:'center'},industry:{backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_SLATE,borderRadius:12,borderWidth:1,padding:x.SPACING.XXL,width:320},industryTitle:{color:S.COLORS.NAVY_DARK,fontSize:C.FONT_SIZE.XXL,fontWeight:'600',marginBottom:x.SPACING.MD},industryDesc:{color:S.COLORS.TEXT_SLATE,fontSize:C.FONT_SIZE.MD,lineHeight:22,marginBottom:x.SPACING.LG},useCasesList:{gap:x.SPACING.SM},useCaseItem:{flexDirection:'row',gap:x.SPACING.SM},useCaseBullet:{color:S.COLORS.BLUE_400,fontSize:C.FONT_SIZE.MD,fontWeight:'600'},useCaseText:{color:S.COLORS.TEXT_MEDIUM,fontSize:C.FONT_SIZE.SM},industryLink:{color:S.COLORS.BLUE_400,fontSize:C.FONT_SIZE.SM,fontWeight:'600',marginTop:x.SPACING.LG},esgSection:{backgroundColor:S.COLORS.NAVY_DARK},esgContent:{alignSelf:'center',maxWidth:900},esgLabel:{color:S.COLORS.BLUE_400,fontSize:C.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:x.SPACING.MD},esgTitle:Object.assign({color:S.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:x.SPACING.LG},{fontSize:C.FONT_SIZE.DISPLAY_LG}),esgDesc:Object.assign({color:S.COLORS.OVERLAY_LIGHT_85,fontSize:C.FONT_SIZE.XL,lineHeight:28,marginBottom:x.SPACING.HUGE},{maxWidth:700}),esgFeatures:{flexDirection:'row',flexWrap:'wrap',gap:x.SPACING.XXL,justifyContent:'center'},esgFeature:{backgroundColor:S.COLORS.OVERLAY_LIGHT_05,borderColor:S.COLORS.OVERLAY_LIGHT_10,borderRadius:12,borderWidth:1,padding:x.SPACING.XXL,width:280},esgFeatureTitle:{color:S.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.LG,fontWeight:'600',marginBottom:x.SPACING.SM},esgFeatureDesc:{color:S.COLORS.OVERLAY_LIGHT_75,fontSize:C.FONT_SIZE.MD,lineHeight:22},regulation:{backgroundColor:S.COLORS.WARNING_BG,borderLeftColor:S.COLORS.WARNING,borderLeftWidth:4,borderRadius:12,padding:x.SPACING.XXL,width:300},regulationTitle:{color:S.COLORS.WARNING_DARK,fontSize:C.FONT_SIZE.LG,fontWeight:'600',marginBottom:x.SPACING.SM},regulationDesc:{color:S.COLORS.WARNING_DARK,fontSize:C.FONT_SIZE.MD,lineHeight:22},communitySection:{backgroundColor:S.COLORS.BLUE_400}
817,communityCard:{backgroundColor:S.COLORS.OVERLAY_LIGHT_15,borderRadius:12,padding:x.SPACING.XXL,width:300},communityCardTitle:{color:S.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.XL,fontWeight:'600',marginBottom:x.SPACING.MD},communityCardDesc:{color:S.COLORS.OVERLAY_LIGHT_90,fontSize:C.FONT_SIZE.MD,lineHeight:22},enterpriseFeature:{backgroundColor:S.COLORS.BG_SLATE,borderRadius:12,padding:x.SPACING.XXL,width:280},enterpriseTitle:{color:S.COLORS.NAVY_DARK,fontSize:C.FONT_SIZE.LG,fontWeight:'600',marginBottom:x.SPACING.SM},enterpriseDesc:{color:S.COLORS.TEXT_SLATE,fontSize:C.FONT_SIZE.MD,lineHeight:22}})},719,[34,276,222,95,283,489,516,519,674,568,522,565,490,676,493,494,562,104]);
818__d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return X}}),_e.CartScreen=B;var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),i=e(r(d[3])),l=e(r(d[4]));r(d[5]);var s=e(r(d[6])),c=r(d[7]),u=r(d[8]),S=r(d[9]),h=r(d[10]),I=r(d[11]),C=r(d[12]),f=r(d[13]),y=r(d[14]),O=r(d[15]),R=r(d[16]),T=r(d[17]),b=r(d[18]),x=r(d[19]),L=r(d[20]),p=r(d[21]),E=r(d[22]),N=r(d[23]),j=r(d[24]);const k='Checkout is temporarily unavailable. Please try again in a few minutes or contact support.',A=(0,T.defineScreenErrorSurfaces)('Cart',{cartBanner:{id:'cart-banner',kind:'local-banner',label:'Cart banner error'},checkoutUnavailable:{id:'checkout-unavailable',kind:'local-banner',label:'Checkout unavailable'}});function G({message:e,onRetry:t}){return(0,j.jsxs)(n.default,{style:M.syncError,children:[(0,j.jsx)(o.default,{style:M.syncErrorText,children:e}),(0,j.jsx)(s.default,{onPress:t,accessibilityRole:"button",accessibilityLabel:"Retry cart update",style:M.retryButton,children:(0,j.jsx)(o.default,{style:M.retryButtonText,children:"Retry"})})]})}function _({item:e,quantityInput:i,rejection:c,onRemove:S,onQuantityInputChange:h}){const I=(0,t.useRef)(null),f=(0,N.cartLinePeriod)(e),y=(0,N.cartLinePeriodCopy)(f),O='one-time'!==f.kind,R=null!=e.pointsTotal,T=!O&&!R,b=null!=e.productHandle&&''!==e.productHandle?`/products/${encodeURIComponent(e.productHandle)}`:null;return(0,j.jsxs)(n.default,{testID:`cart-line-${e.lineId}`,style:[M.lineItem,e.removing&&M.lineItemRemoving],accessibilityState:{disabled:e.removing},children:[null!=e.imageUrl&&(null!=b?(0,j.jsx)(u.AppLink,{to:"Product",href:b,style:M.lineItemImageLink,accessibilityLabel:`View ${e.title}`,children:(0,j.jsx)(l.default,{source:{uri:e.imageUrl},style:M.lineItemImage,resizeMode:"contain"})}):(0,j.jsx)(l.default,{source:{uri:e.imageUrl},style:M.lineItemImage,resizeMode:"contain"})),(0,j.jsxs)(n.default,{style:M.lineItemInfo,children:[null!=b?(0,j.jsx)(u.AppLink,{to:"Product",href:b,inline:!0,textStyle:M.lineItemNameLink,children:e.title}):(0,j.jsx)(o.default,{style:M.lineItemName,children:e.title}),!R&&''!==e.variantTitle&&(0,j.jsx)(o.default,{style:M.lineItemVariant,children:e.variantTitle}),R&&(0,j.jsxs)(o.default,{style:M.lineItemPoints,children:[e.pointsTotal," points",y.pointsSuffix]}),null!=e.orgName&&(0,j.jsxs)(o.default,{style:M.lineItemOrg,children:["For: ",e.orgName]}),!R&&(0,j.jsx)(o.default,{style:M.lineItemPrice,children:(0,p.formatMoney)(e.price)})]}),T&&(0,j.jsx)(C.QuantityStepper,{value:i,onChange:t=>{h(e.lineId,t,()=>{I.current?.focus()})},inputRef:I,itemLabel:e.title,externalError:'quantity'===c?.kind?c.message:void 0,disabled:e.removing}),(0,j.jsxs)(n.default,{style:M.lineItemTotal,children:[(0,j.jsxs)(o.default,{style:M.lineItemTotalText,children:[(0,p.formatMoney)(e.price*e.quantity),y.totalSuffix]}),(0,j.jsx)(s.default,{onPress:()=>{S(e.lineId)},disabled:e.removing,accessibilityLabel:`Remove ${e.title} from cart`,children:(0,j.jsx)(o.default,{style:M.removeText,children:"Remove"})}),null!=c&&(!T||'removal'===c.kind)&&(0,j.jsx)(o.default,{style:M.lineRejectionText,accessibilityRole:"alert",children:c.message})]})]})}const P=(0,t.memo)(_);function B(){const e=(0,b.useSeoMeta)('Cart'),l=(0,x.useCart)(),{items:c,itemCount:C,subtotal:y,loading:O,error:R,lineRejections:N,syncError:_,retrySync:B,updateQuantity:X,removeItem:D}=l,v='synchronizing'===l.synchronization.status,z='synchronized'===l.synchronization.status?l.synchronization.checkoutUrl:null,{isDevTriggered:F,surface:W}=(0,T.useErrorSurface)(A.cartBanner),{isDevTriggered:Z,surface:w}=(0,T.useErrorSurface)(A.checkoutUnavailable),H=R??(F?'Failed to update cart.':null),[V,U]=(0,t.useState)(!1),[Y,q]=(0,t.useState)(()=>new Map),Q=(0,t.useCallback)((e,t,n)=>
818{q(o=>{const i=new Map(o);return'valid'===t.kind?i.delete(e):i.set(e,{input:t,focusInput:n}),i}),'valid'===t.kind&&X(e,t.quantity)},[X]),$=(0,t.useCallback)(e=>{q(t=>{if(!t.has(e))return t;const n=new Map(t);return n.delete(e),n})},[]),K=(0,t.useCallback)(()=>{for(const e of c){const t=Y.get(e.lineId);if(null!=t)return void t.focusInput()}},[Y,c]);let J=null,ee=null;null!=z&&((0,I.isHttpsUrl)(z)?J=z:(E.logger.error('[Cart] Checkout URL must use HTTPS but received:',z),ee=k));const te=ee??(Z?k:null),ne=c.some(e=>Y.has(e.lineId)),oe=null!=J&&!v&&V&&!ne;return O?(0,j.jsxs)(S.AsyncPageLayout,{status:"loading",children:[(0,j.jsx)(f.WebMeta,Object.assign({},e)),(0,j.jsx)(h.LoadingState,{message:"Loading cart..."})]}):0===c.length?(0,j.jsxs)(S.AsyncPageLayout,{status:"ready",children:[(0,j.jsx)(f.WebMeta,Object.assign({},e)),(0,j.jsxs)(n.default,{style:M.emptyCart,children:[null!=H&&(0,j.jsx)(h.LocalErrorBanner,{message:H,surface:W,style:M.errorBanner}),null!=_&&(0,j.jsx)(G,{message:_,onRetry:B}),(0,j.jsx)(o.default,{style:M.emptyCartTitle,children:"Your Cart is Empty"}),(0,j.jsx)(o.default,{style:M.emptyCartText,children:"Browse our air quality sensors to get started."}),(0,j.jsx)(u.AppLink,{to:"Store",style:M.shopButton,children:(0,j.jsx)(o.default,{style:M.shopButtonText,children:"Shop Sensors"})})]})]}):(0,j.jsxs)(S.AsyncPageLayout,{status:"ready",children:[(0,j.jsx)(f.WebMeta,Object.assign({},e)),(0,j.jsx)(i.default,{style:M.container,children:(0,j.jsxs)(n.default,{style:M.content,children:[(0,j.jsx)(o.default,{style:M.title,children:"Your Cart"}),(0,j.jsxs)(o.default,{style:M.subtitle,children:[C," ",1===C?'item':'items']}),null!=H&&(0,j.jsx)(h.LocalErrorBanner,{message:H,surface:W,style:M.errorBanner}),null!=te&&(0,j.jsx)(h.LocalErrorBanner,{message:te,surface:w,style:M.errorBanner}),(0,j.jsx)(n.default,{style:M.lineItems,children:c.map(e=>(0,j.jsx)(P,{item:e,quantityInput:Y.get(e.lineId)?.input??(0,L.cartLineQuantityInput)(e.quantity),rejection:N.get(e.lineId),onRemove:e=>{$(e),D(e)},onQuantityInputChange:Q},e.lineId))}),(0,j.jsxs)(n.default,{style:M.summary,children:[null!=_&&(0,j.jsx)(G,{message:_,onRetry:B}),(0,j.jsxs)(n.default,{style:M.summaryRow,children:[(0,j.jsx)(o.default,{style:M.summaryLabel,children:"Subtotal"}),(0,j.jsx)(o.default,{style:M.summaryValue,children:(0,p.formatMoney)(y)})]}),c.some(e=>null==e.sellingPlanId)&&(0,j.jsxs)(n.default,{style:M.summaryRow,children:[(0,j.jsx)(o.default,{style:M.summaryLabel,children:"Shipping"}),(0,j.jsx)(o.default,{style:M.summaryNote,children:"Calculated at checkout"})]}),(0,j.jsx)(n.default,{style:M.summaryDivider}),(0,j.jsxs)(n.default,{style:M.summaryRow,children:[(0,j.jsx)(o.default,{style:M.totalLabel,children:"Total"}),(0,j.jsx)(o.default,{style:M.totalValue,children:(0,p.formatMoney)(y)})]}),(0,j.jsx)(o.default,{style:M.internationalNote,children:"Please note: International shipping costs do not include duty, taxes or brokerage fees"}),(0,j.jsx)(n.default,{style:M.termsAgreement,children:(0,j.jsxs)(n.default,{style:M.termsCheckboxRow,children:[(0,j.jsx)(s.default,{style:M.termsCheckboxHitTarget,accessibilityRole:"checkbox",accessibilityLabel:"I agree with the terms and conditions",accessibilityState:{checked:V},onPress:()=>{U(e=>!e)},children:(0,j.jsx)(n.default,{style:[M.termsCheckbox,V&&M.termsCheckboxChecked],children:V&&(0,j.jsx)(o.default,{style:M.termsCheckmark,children:'\u2713'})})}),(0,j.jsxs)(o.default,{style:M.termsLabel,children:["I agree with the",' ',(0,j.jsx)(u.AppLink,{to:"TermsOfService",inline:!0,textStyle:M.termsLink,accessibilityLabel:"terms and conditions",children:"terms and conditions"})]})]})}),oe&&null!=J?(0,j.jsx)(I.ExternalLink,{href:J,target:"_self",style:M.checkoutButton,accessibilityLabel:"Proceed to checkout",children:(0,j.jsx)(o.default,{style:M.checkoutButtonText,children:"Proceed to Checkout"})}):ne&&null!=J&&!v&&V?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s.default,{style:[M.checkoutButton,M.checkoutErrorButton],onPress:K,accessibilityRole:"button",accessibilityLabel:"Review cart quantity error",accessibilityHint:"Focus the cart item whose quantity must be corrected.",children:(0,j.jsx)(o.default,{style:M.checkoutButtonText,children:"Review Cart Error"})}),(0,j.jsx)(o.default,{style:M.checkoutValidationMessage,children:"Correct the quantity error above before proceeding to checkout."})]}):(0,j.jsx)(n.default,{style:[M.checkoutButton,M.checkoutDisabled],accessibilityRole:"button",accessibilityState:{disabled:!0},accessibilityLabel:"Proceed to checkout",accessibilityHint:null!=_?'Retry the cart update before proceeding to checkout.':N.size>0?'Correct the cart error before proceeding to checkout.':v?'Updating your cart, one moment.':null==J?te??'Checkout link is not available yet.':'Agree to the terms and conditions to continue to checkout.',children:(0,j.jsx)(o.default,{style:M.checkoutButtonText,children:"Proceed to Checkout"})}),(0,j.jsx)(o.default,{style:M.checkoutNote,children:"Secure checkout powered by Shopify"}),(0,j.jsx)(u.AppLink,{to:"Store",style:M.continueShoppingButton,children:(0,j.jsx)(o.default,{style:M.continueShoppingText,children:"Continue Shopping"})})]})]})})]})}const M=(0,c.createStyles)({checkoutButton:{alignItems:'center',backgroundColor:y.COLORS.ACTION_PRIMARY,borderRadius:10,marginTop:O.SPACING.XXL,paddingVertical:O.SPACING.LG},checkoutButtonText:{color:y.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.XL,fontWeight:'700'},checkoutDisabled:{opacity:.6},checkoutErrorButton:{backgroundColor:y.COLORS.ERROR},checkoutNote:{color:y.COLORS.TEXT_GHOST,fontSize:R.FONT_SIZE.XS,marginTop:O.SPACING.MD,textAlign:'center'},checkoutValidationMessage:{color:y.COLORS.ERROR,fontSize:R.FONT_SIZE.SM,marginTop:O.SPACING.SM,textAlign:'center'},internationalNote:{color:y.COLORS.TEXT_SOFT,fontSize:R.FONT_SIZE.SM,lineHeight:20,marginTop:O.SPACING.LG},termsAgreement:{marginTop:O.SPACING.XL},termsCheckbox:{alignItems:'center',backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER_SUBTLE,borderRadius:4,borderWidth:2,height:24,justifyContent:'center',width:24},termsCheckboxChecked:{backgroundColor:y.COLORS.ACTION_PRIMARY,borderColor:y.COLORS.ACTION_PRIMARY},termsCheckboxHitTarget:{marginRight:O.SPACING.MD,paddingVertical:O.SPACING.XS},termsCheckboxRow:{alignItems:'center',flexDirection:'row'},termsCheckmark:{color:y.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.MD,fontWeight:'bold'},termsLabel:{color:y.COLORS.TEXT_DARK,flex:1,flexShrink:1,fontSize:R.FONT_SIZE.MD,lineHeight:22},termsLink:{color:y.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.MD,fontWeight:'600',textDecorationLine:'underline'},container:{backgroundColor:y.COLORS.BG_LIGHT,flex:1},errorBanner:{backgroundColor:y.COLORS.ERROR_BG,borderColor:y.COLORS.ERROR,borderRadius:8,borderWidth:1,marginBottom:O.SPACING.LG,padding:O.SPACING.LG},content:{alignSelf:'center',maxWidth:800,padding:O.SPACING.XXL,paddingVertical:O.SPACING.HUGE,width:'100%'},continueShoppingButton:{alignItems:'center',marginTop:O.SPACING.LG,paddingVertical:O.SPACING.SM},continueShoppingText:{color:y.COLORS.ACTION_PRIMARY,fontSize:R.FONT_SIZE.LG,fontWeight:'500'},emptyCart:{alignItems:'center',flex:1,justifyContent:'center',minHeight:400,padding:O.SPACING.HUGE},emptyCartText:{color:y.COLORS.TEXT_SOFT,fontSize:R.FONT_SIZE.LG,marginBottom:O.SPACING.XXL,textAlign:'center'},emptyCartTitle:{color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XXXL,fontWeight:'bold',marginBottom:O.SPACING.MD},lineItem:{alignItems:'center',backgroundColor:y.COLORS.TEXT_INVERSE,borderColor:y.COLORS.BORDER,borderRadius:12,borderWidth:1,flexDirection:'row',flexWrap:'wrap',gap:O.SPACING.MD,padding:O.SPACING.LG},lineItemRemoving:{opacity:.5},lineItemImage:{backgroundColor:y.COLORS.BG_SUBTLE,borderRadius:8,height:72,width:72},lineItemImageLink:Object.assign({borderRadius:8},{cursor:'pointer'}),lineItemInfo:{flex:1,minWidth:120},lineItemName:{color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.LG,fontWeight:'600',marginBottom:O.SPACING.MICRO},lineItemNameLink:Object.assign({color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.LG,fontWeight:'600',marginBottom:O.SPACING.MICRO},{cursor:'pointer'}),lineItemOrg:{color:y.COLORS.ACTION_PRIMARY,fontSize:R.FONT_SIZE.SM,fontWeight:'600',marginBottom:O.SPACING.XS},lineItemPoints:{color:y.COLORS.ACTION_PRIMARY,fontSize:R.FONT_SIZE.MD,fontWeight:'700',marginBottom:O.SPACING.XS},lineItemPrice:{color:y.COLORS.TEXT_SECONDARY,fontSize:R.FONT_SIZE.MD},lineRejectionText:{color:y.COLORS.ERROR,fontSize:R.FONT_SIZE.SM,marginTop:O.SPACING.XS,maxWidth:180,textAlign:'right'},lineItemTotal:{alignItems:'flex-end',marginLeft:'auto',minWidth:80},lineItemTotalText:{color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.LG,fontWeight:'700',marginBottom:O.SPACING.XS},lineItemVariant:{color:y.COLORS.TEXT_GHOST,fontSize:R.FONT_SIZE.SM,marginBottom:O.SPACING.XS},lineItems:{gap:O.SPACING.LG,marginBottom:O.SPACING.XXXL},removeText:{color:y.COLORS.RED_MUTED,fontSize:R.FONT_SIZE.SM,fontWeight:'500'},retryButton:{alignItems:'center',backgroundColor:y.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:O.SPACING.LG,paddingVertical:O.SPACING.SM},retryButtonText:{color:y.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.MD,fontWeight:'600'},shopButton:{backgroundColor:y.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:O.SPACING.XXXL,paddingVertical:O.SPACING.LG},shopButtonText:{color:y.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.LG,fontWeight:'600'},subtitle:{color:y.COLORS.TEXT_SOFT,fontSize:R.FONT_SIZE.LG,marginBottom:O.SPACING.XXXL},summary:{backgroundColor:y.COLORS.TEXT_INVERSE,borderColor:y.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:O.SPACING.XXL},syncError:{alignItems:'center',backgroundColor:y.COLORS.ERROR_BG,borderColor:y.COLORS.ERROR,borderRadius:8,borderWidth:1,flexDirection:'row',gap:O.SPACING.MD,justifyContent:'space-between',marginBottom:O.SPACING.LG,padding:O.SPACING.MD},syncErrorText:{color:y.COLORS.ERROR,flex:1,fontSize:R.FONT_SIZE.MD},summaryDivider:{backgroundColor:y.COLORS.BORDER,height:1,marginVertical:O.SPACING.MD},summaryLabel:{color:y.COLORS.TEXT_SECONDARY,fontSize:R.FONT_SIZE.LG},summaryNote:{color:y.COLORS.TEXT_GHOST,fontSize:R.FONT_SIZE.MD,fontStyle:'italic'},summaryRow:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginBottom:O.SPACING.MD},summaryValue:{color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.LG,fontWeight:'600'},title:Object.assign({color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:O.SPACING.XS},{fontSize:R.FONT_SIZE.DISPLAY_MD}),totalLabel:{color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XL,fontWeight:'700'},totalValue:{color:y.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XXL,fontWeight:'700'}});var X=B},720,[34,276,222,283,328,95,488,489,516,567,513,519,721,565,490,493,494,557,562,617,620,722,469,723,104]);
819__d(function(g,r,i,a,m,_e,d){"use strict";
819function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.QuantityStepper=function({value:e,onChange:u,itemLabel:b,inputRef:y,externalError:R,disabled:f=!1,style:L}){const x=(0,t.useId)(),T='invalid'===e.kind?e.errorMessage:R??null,E='valid'===e.kind?e.quantity:e.adjustableQuantity,_=f||null==E||E<=C,p=f||null==E||E>=S,I=e=>{u((0,c.parseCartLineQuantityInput)(e))},j=e=>{null!=E&&(e<0&&_||e>0&&p||I(String(E+e)))};return(0,O.jsxs)(s.default,{style:h.wrapper,children:[(0,O.jsxs)(s.default,{style:[h.container,null!=T&&h.containerError,L],children:[(0,O.jsx)(o.default,{style:[h.button,_&&h.buttonDisabled],onPress:()=>{j(-1)},disabled:_,accessibilityRole:"button",accessibilityState:{disabled:_},accessibilityLabel:`Decrease quantity of ${b}`,children:(0,O.jsx)(n.default,{style:h.buttonText,children:"-"})}),(0,O.jsx)(l.default,{ref:y,style:h.input,value:e.text,onChangeText:e=>{I(e)},keyboardType:"number-pad",editable:!f,accessibilityLabel:`Quantity of ${b}`,"aria-describedby":null==T?void 0:x,"aria-invalid":null!=T}),(0,O.jsx)(o.default,{style:[h.button,p&&h.buttonDisabled],onPress:()=>{j(1)},disabled:p,accessibilityRole:"button",accessibilityState:{disabled:p},accessibilityLabel:`Increase quantity of ${b}`,children:(0,O.jsx)(n.default,{style:h.buttonText,children:"+"})})]}),null!=T&&(0,O.jsx)(n.default,{nativeID:x,style:h.errorText,accessibilityRole:"alert",children:T})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),s=e(r(d[4])),u=r(d[5]),c=r(d[6]),b=r(d[7]),y=r(d[8]),R=r(d[9]),f=r(d[10]),O=r(d[11]);const S=u.cartLineQuantityConstraints.maximum,C=u.cartLineQuantityConstraints.minimum;const h=(0,b.createStyles)({button:{alignItems:'center',backgroundColor:y.COLORS.BG_LIGHT,height:44,justifyContent:'center',width:44},buttonDisabled:{opacity:.4},buttonText:{color:y.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.XXL,fontWeight:'600',lineHeight:f.FONT_SIZE.XXL},container:{alignItems:'center',backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER_MUTED,borderRadius:10,borderWidth:1,flexDirection:'row',overflow:'hidden'},containerError:{borderColor:y.COLORS.ERROR},errorText:{color:y.COLORS.ERROR,fontSize:f.FONT_SIZE.SM,marginTop:R.SPACING.XS},input:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER_MUTED,borderLeftWidth:1,borderRightWidth:1,color:y.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.LG,fontWeight:'700',height:44,textAlign:'center',width:56},wrapper:{alignItems:'flex-start'}})},721,[34,222,394,488,276,471,620,489,490,493,494,104]);
820__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatMoney=function(t){const n='string'==typeof t?parseFloat(t):t;if(isNaN(n))return'$0.00';return`$${n.toFixed(2)}`}},722,[]);
821__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.cartLinePeriod=function(n){if(null==n.sellingPlanId)return{kind:'one-time'};const{recurringBillingInterval:u}=n,{recurringBillingIntervalCount:o}=n;if(!t(u)||null==o||!Number.isInteger(o)||o<1)return{kind:'recurring-unspecified'};return{kind:'recurring',interval:u,count:o}},e.cartLinePeriodCopy=function(t){if('one-time'===t.kind)return{pointsSuffix:'',totalSuffix:''};if('recurring-unspecified'===t.kind)return{pointsSuffix:' / billing period',totalSuffix:'/period'};const u=n[t.interval];return 1===t.count?{pointsSuffix:` / ${u.singular}`,totalSuffix:`/${u.short}`}:{pointsSuffix:` / ${t.count} ${u.singular}s`,totalSuffix:`/${t.count} ${u.short}`}};const n={DAY:{singular:'day',short:'day'},WEEK:{singular:'week',short:'wk'},MONTH:{singular:'month',short:'mo'},YEAR:{singular:'year',short:'yr'}};function t(n){return'DAY'===n||'WEEK'===n||'MONTH'===n||'YEAR'===n}},723,[]);
822__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CommunityCategoryScreen=function(){const{isAuthenticated:e}=(0,u.useAuth)(),{slug:s,id:T,name:I}=(0,E.useCommunityCategoryParams)(),h=null!=I&&''!==I?I:s.replace(/-/g,' ').replace(/\b\w/g,e=>e.toUpperCase()),j=(0,x.useSeoMeta)('CommunityCategory',{categoryName:I??s}),D=(0,N.useCommunityWriteEnabled)(),[G,M]=(0,t.useState)(0),{data:B,loading:X,error:w,retry:W}=(0,A.useAsyncData)(()=>c.communityApi.getCategoryTopics(s,T,G),[s,T,G],'Failed to load topics.'),{isDevTriggered:z,surface:F}=(0,R.useErrorSurface)(_.topicList),k=w??(z?'Failed to load topics.':null),Y=B?.topics??[],U=B?.moreTopicsUrl??null;return(0,P.jsxs)(O.PageLayout,{children:[(0,P.jsx)(L.WebMeta,Object.assign({},j,{canonicalUrl:`${L.COMMUNITY_ORIGIN}/c/${s}/${T}`})),(0,P.jsxs)(l.default,{style:b.container,children:[(0,P.jsxs)(o.default,{style:b.header,children:[(0,P.jsx)(p.AppLink,{to:"Community",children:(0,P.jsx)(n.default,{style:b.backLink,children:"Community"})}),(0,P.jsxs)(o.default,{style:b.headerRow,children:[(0,P.jsx)(n.default,{style:b.headerTitle,children:h}),e&&D&&(0,P.jsx)(p.AppLink,{to:"CommunityNewTopic",style:b.newTopicButton,children:(0,P.jsx)(n.default,{style:b.newTopicButtonText,children:"+ New Topic"})})]})]}),X?(0,P.jsx)(S.LoadingState,{message:"Loading topics..."}):null!=k?(0,P.jsx)(S.ErrorState,{message:k,surface:F,onRetry:W}):0===Y.length?(0,P.jsx)(S.EmptyState,{message:"No topics in this category yet."}):(0,P.jsxs)(o.default,{style:b.contentSection,children:[(0,P.jsx)(o.default,{style:b.topicsList,children:Y.map(e=>(0,P.jsx)(f.CommunityTopicRow,{topic:e,showExcerpt:!0,href:(0,y.buildCommunityTopicPath)(e.slug,e.id)},e.id))}),(G>0||null!=U&&''!==U)&&(0,P.jsx)(C.Pagination,{page:G,onPageChange:M,itemLabel:"topics"})]})]})]})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2]));r(d[3]);var l=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),p=r(d[8]),S=r(d[9]),C=r(d[10]),f=r(d[11]),O=r(d[12]),y=r(d[13]),L=r(
822d[14]),T=r(d[15]),I=r(d[16]),h=r(d[17]),R=r(d[18]),A=r(d[19]),N=r(d[20]),x=r(d[21]),E=r(d[22]),P=r(d[23]);const _=(0,R.defineScreenErrorSurfaces)('CommunityCategory',{topicList:{id:'topic-list',kind:'page',label:'Community category topic list error'}});const b=(0,s.createStyles)({backLink:{color:T.COLORS.BRAND_PRIMARY,fontSize:h.FONT_SIZE.MD,fontWeight:'500',marginBottom:I.SPACING.SM},container:{backgroundColor:T.COLORS.TEXT_INVERSE,flex:1},contentSection:{alignSelf:'center',maxWidth:1e3,paddingHorizontal:I.SPACING.XXL,paddingVertical:I.SPACING.LG,width:'100%'},header:{alignSelf:'center',borderBottomColor:T.COLORS.BORDER,borderBottomWidth:1,maxWidth:1e3,paddingBottom:I.SPACING.XXL,paddingHorizontal:I.SPACING.XXL,paddingTop:I.SPACING.XXXL,width:'100%'},headerRow:{alignItems:'center',flexDirection:'row',justifyContent:'space-between'},headerTitle:Object.assign({color:T.COLORS.TEXT_HEADING,flex:1,fontSize:h.FONT_SIZE.DISPLAY_SM,fontWeight:'bold'},{fontSize:h.FONT_SIZE.DISPLAY_ML}),newTopicButton:{backgroundColor:T.COLORS.ACTION_PRIMARY,borderRadius:6,marginLeft:I.SPACING.LG,paddingHorizontal:I.SPACING.LG,paddingVertical:I.SPACING.SM},newTopicButtonText:{color:T.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.MD,fontWeight:'600'},pageButton:{borderColor:T.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:1,paddingHorizontal:I.SPACING.XL,paddingVertical:I.SPACING.MD},pageButtonDisabled:{borderColor:T.COLORS.BORDER_DEFAULT},pageButtonText:{color:T.COLORS.ACTION_PRIMARY,fontSize:h.FONT_SIZE.MD,fontWeight:'600'},pageButtonTextDisabled:{color:T.COLORS.BORDER_DEFAULT},pageInfo:{color:T.COLORS.TEXT_BODY,fontSize:h.FONT_SIZE.MD,fontWeight:'500'},pagination:{alignItems:'center',flexDirection:'row',gap:I.SPACING.LG,justifyContent:'center',paddingVertical:I.SPACING.XXXL},topicsList:{gap:0}})},724,[34,276,222,95,283,489,725,710,516,512,712,726,568,518,565,490,493,494,557,561,727,562,505,104]);
823__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CommunityAccountRequiredError",{enumerable:!0,get:function(){return p}}),_e.parseCommunityAccountRequiredError=f,Object.defineProperty(_e,"CommunityRateLimitedError",{enumerable:!0,get:function(){return h}}),_e.parseCommunityRateLimitedError=w,Object.defineProperty(_e,"communityApi",{enumerable:!0,get:function(){return b}});var t,e=r(d[0]),o=(t=e)&&t.__esModule?t:{default:t},n=r(d[1]),c=r(d[2]),s=r(d[3]),u=r(d[4]);const y='COMMUNITY_ACCOUNT_REQUIRED',l='COMMUNITY_RATE_LIMITED';
823class p extends Error{constructor(t,e){super(t),this.name='CommunityAccountRequiredError',this.signupUrl=e}}function f(t){if(!o.default.isAxiosError(t)||409!==t.response?.status)return null;const e=t.response.data;if('object'!=typeof e||null===e)return null;if((0,n.readOptionalString)(e,'error')!==y)return null;const c=Reflect.get(e,'details'),s='object'==typeof c&&null!==c?(0,n.readOptionalString)(c,'signupUrl')??'':'',u=(0,n.readOptionalString)(e,'message')??'A community forum account is required to participate.';return new p(u,s)}class h extends Error{constructor(t,e){super(t),this.name='CommunityRateLimitedError',this.retryAfterSeconds=e}}function w(t){if(!o.default.isAxiosError(t)||429!==t.response?.status)return null;const e=t.response.data;if('object'!=typeof e||null===e)return null;if((0,n.readOptionalString)(e,'error')!==l)return null;const c=Reflect.get(e,'details'),s='object'==typeof c&&null!==c?(0,n.readOptionalString)(c,'retryAfterSeconds'):void 0,u=Number(s),y=Number.isFinite(u)&&u>0?Math.floor(u):0,p=(0,n.readOptionalString)(e,'message')??"You're doing that too quickly. Please wait a moment before trying again.";return new h(p,y)}function T(t){return f(t)??w(t)??t}const b={getCategories:async()=>u.community.getCategories(),getLatestTopics:async(t=0)=>u.community.getLatestTopics({query:{page:t}}),getTopTopics:async(t="all")=>u.community.getTopTopics({query:{period:t}}),getCategoryTopics:async(t,e,o=0)=>u.community.getCategoryTopics({path:{slug:t,id:e},query:{page:o}}),async getTopic(t){try{return await u.community.getTopic({path:{id:t}})}catch(t){if((0,s.isAxios404)(t))return null;throw t}},getTopicPosts:async(t,e)=>u.community.getTopicPosts({path:{id:t},query:{ids:e.join(',')}}),search:async t=>u.community.search({query:{q:t}}),async getWriteStatus(){try{return!0===(await u.community.writeStatus()).enabled}catch(t){return c.logger.warn('Failed to check community write status:',t),!1}},async createPost(t,e,o){try{return await u.community.createPost({body:Object.assign({topicId:t,raw:e},null!=o?{replyToPostNumber:o}:{})})}catch(t){throw T(t)}},async createTopic(t,e,o){try{return await u.community.createTopic({body:{title:t,raw:e,categoryId:o}})}catch(t){throw T(t)}},async toggleLike(t){try{return await u.community.toggleLike({path:{postId:t}})}catch(t){throw T(t)}},getPost:async t=>u.community.getCommunityPost({path:{postId:t}}),async editPost(t,e){try{return await u.community.editPost({path:{postId:t},body:{raw:e}})}catch(t){throw T(t)}},async deletePost(t){try{await u.community.deletePost({path:{postId:t}})}catch(t){throw T(t)}},async deleteTopic(t){try{await u.community.deleteTopic({path:{topicId:t}})}catch(t){throw T(t)}}}},725,[412,467,469,464,471]);
824__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CommunityTopicRow",{enumerable:!0,get:function(){return h}});var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2]));r(d[3]);var n=r(d[4]),c=r(d[5]),s=r(d[6]),p=r(d[7]),S=r(d[8]),u=r(d[9]),f=r(d[10]),O=r(d[11]);function C({topic:e,href:t,categories:n,showExcerpt:c}){const{hovered:s,webHoverProps:p}=(0,S.useWebHover)(),C=n?.find(t=>t.id===e.categoryId);return(0,O.jsx)(f.AppLink,{to:"CommunityTopic",href:t,children:(0,O.jsxs)(o.default,Object.assign({style:[I.topicRow,s&&I.topicRowHovered]},p,{children:[(0,O.jsxs)(o.default,{style:I.topicMain,children:[(0,O.jsxs)(o.default,{style:I.topicTitleRow,children:[e.pinned&&(0,O.jsx)(l.default,{style:I.pinnedBadge,children:"Pinned"}),e.closed&&(0,O.jsx)(l.default,{style:I.closedBadge,children:"Closed"}),(0,O.jsx)(l.default,{style:I.topicTitle,numberOfLines:2,children:e.title})]}),null!=C&&(0,O.jsxs)(o.default,{style:I.topicCategoryBadge,children:[(0,O.jsx)(o.default,{style:[I.topicCategoryDot,{backgroundColor:`#${C.color}`}]}),(0,O.jsx)(l.default,{style:I.topicCategoryText,children:C.name})]}),!0===c&&null!=e.excerpt&&''!==e.excerpt?(0,O.jsx)(l.default,{style:I.topicExcerpt,numberOfLines:2,children:e.excerpt}):null]}),(0,O.jsxs)(o.default,{style:I.topicMeta,children:[(0,O.jsxs)(o.default,{style:I.topicMetaItem,children:[(0,O.jsx)(l.default,{style:I.topicMetaValue,children:e.replyCount}),(0,O.jsx)(l.default,{style:I.topicMetaLabel,children:"replies"})]}),(0,O.jsxs)(o.default,{style:I.topicMetaItem,children:[(0,O.jsx)(l.default,{style:I.topicMetaValue,children:e.views}),(0,O.jsx)(l.default,{style:I.topicMetaLabel,children:"views"})]}),(0,O.jsx)(l.default,{style:I.topicActivity,children:(0,u.formatTimeAgo)(e.lastPostedAt)})]})]}))})}const h=(0,t.memo)(C),I=(0,n.createStyles)({closedBadge:{backgroundColor:c.COLORS.ERROR_BG,borderRadius:4,color:c.COLORS.ERROR,fontSize:p.FONT_SIZE.XS,fontWeight:'600',paddingHorizontal:s.SPACING.SM,paddingVertical:s.SPACING.MICRO},pinnedBadge:{backgroundColor:c.COLORS.BRAND_TINT,borderRadius:4,color:c.COLORS.BRAND_PRIMARY,fontSize:p.FONT_SIZE.XS,fontWeight:'600',paddingHorizontal:s.SPACING.SM,paddingVertical:s.SPACING.MICRO},topicActivity:{color:c.COLORS.TEXT_GHOST,fontSize:p.FONT_SIZE.XS,minWidth:60,textAlign:'right'},topicCategoryBadge:{alignItems:'center',flexDirection:'row',gap:s.SPACING.XS},topicCategoryDot:{borderRadius:4,height:8,width:8},topicCategoryText:{color:c.COLORS.TEXT_GHOST,fontSize:p.FONT_SIZE.XS},topicExcerpt:{color:c.COLORS.TEXT_GHOST,fontSize:p.FONT_SIZE.SM,lineHeight:20},topicMain:{flex:1,marginRight:s.SPACING.LG},topicMeta:{alignItems:'center',flexDirection:'row',gap:s.SPACING.LG},topicMetaItem:{alignItems:'center',minWidth:48},topicMetaLabel:{color:c.COLORS.TEXT_CAPTION,fontSize:p.FONT_SIZE.XS},topicMetaValue:{color:c.COLORS.TEXT_SECONDARY,fontSize:p.FONT_SIZE.MD,fontWeight:'600'},topicRow:Object.assign({alignItems:'center',borderBottomColor:c.COLORS.BG_CHIP,borderBottomWidth:1,flexDirection:'row',paddingHorizontal:s.SPACING.MD,paddingVertical:s.SPACING.LG},{cursor:'pointer'}
824),topicRowHovered:{backgroundColor:c.COLORS.BG_FAINT},topicTitle:{color:c.COLORS.TEXT_HEADING,flexShrink:1,fontSize:p.FONT_SIZE.LG,fontWeight:'500'},topicTitleRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:s.SPACING.SM,marginBottom:s.SPACING.XS}})},726,[34,276,222,95,489,490,493,494,609,685,516,104]);
825__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useCommunityWriteEnabled=function(){const[n,s]=(0,t.useState)(!1),o=(0,t.useRef)(!1);return(0,t.useEffect)(()=>(o.current=!1,(async()=>{try{const t=await u.communityApi.getWriteStatus();o.current||s(t)}catch(t){c.logger.warn('Failed to check community write status:',t)}})(),()=>{o.current=!0}),[]),n};var t=r(d[0]),u=r(d[1]),c=r(d[2])},727,[34,725,469]);
826__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CommunityNewTopicScreen=function(){const e=(0,N.useAppNativeStackNavigation)(),u=(0,N.useCommunityNewTopicParams)(),{isAuthenticated:R}=(0,C.useAuth)(),x=(0,L.useSeoMeta)('CommunityNewTopic'),[_,B]=(0,t.useState)([]),[F,k]=(0,t.useState)(!0),[X,w]=(0,t.useState)(u?.categoryId??0),[z,W]=(0,t.useState)(''),[U,Z]=(0,t.useState)(''),[v,H]=(0,t.useState)(!1),[Y,V]=(0,t.useState)(null),{isDevTriggered:$,surface:q}=(0,I.useErrorSurface)(D.form),K=Y??($?'Failed to create topic. Please try again.':null),{signupUrl:J,handle:Q,dismiss:ee}=(0,A.useCommunityAccountPrompt)(),te=(0,t.useRef)(!0);(0,t.useEffect)(()=>((async()=>{try{const e=await S.communityApi.getCategories();if(!te.current)return;B(e)}catch(e){if(!te.current)return;V((0,P.errorMessage)(e,'Failed to load categories. Please try again.')),j.logger.error('Failed to load categories:',e)}finally{te.current&&k(!1)}})(),()=>{te.current=!1}),[]);const ie=(0,t.useCallback)(async()=>{if(z.trim().length<15)V("Title must be at least 15 characters.");else if(U.trim())if(X<=0)V('Please select a category.');else{H(!0),V(null);try{const t=await S.communityApi.createTopic(z.trim(),U.trim(),X);e.replace('CommunityTopic',{id:t.id,slug:t.slug})}catch(e){if(Q(e))return;V((0,P.errorMessage)(e,'Failed to create topic. Please try again.'))}finally{H(!1)}}else V('Content is required.')},[z,U,X,e,Q]);if(!R)return(0,E.jsxs)(O.PageLayout,{children:[(0,E.jsx)(h.WebMeta,Object.assign({},x)),(0,E.jsxs)(o.default,{style:M.centerContainer,children:[(0,E.jsx)(l.default,{style:M.errorText,children:"You must be signed in to create a topic."}),(0,E.jsx)(y.AppLink,{to:"Login",style:M.submitButton,children:(0,E.jsx)(l.default,{style:M.submitButtonText,children:"Sign In"})})]})]});const oe=z.trim().length>=15&&U.trim().length>0&&X>0;return(0,E.jsxs)(O.PageLayout,{children:[(0,E.jsx)(h.WebMeta,Object.assign({},x)),(0,E.jsx)(s.default,{style:M.container,children:(0,E.jsxs)(o.default,{style:M.contentWrapper,children:[(0,E.jsx)(n.default,{style:M.backButton,onPress:()=>{e.goBack()},accessibilityRole:"button",accessibilityLabel:"Go back",children:(0,E.jsx)(l.default,{style:M.backLink,children:"Back"})}),(0,E.jsx)(l.default,{style:M.pageTitle,children:"New Topic"}),(0,E.jsxs)(o.default,{style:M.field,children:[(0,E.jsx)(l.default,{style:M.label,children:"Category"}),F?(0,E.jsxs)(o.default,{style:M.categoryLoading,children:[(0,E.jsx)(c.default,{size:"small",color:T.COLORS.ACTION_PRIMARY}),(0,E.jsx)(l.default,{style:M.categoryLoadingText,children:"Loading categories..."})]}):(0,E.jsx)(o.default,{style:M.categoryPicker,children:_.map(e=>{const t=G(e.color),s=null==t?M.categoryDotInvalid:[M.categoryDot,{backgroundColor:t}];return(0,E.jsxs)(n.default,{style:[M.categoryChip,X===e.id&&M.categoryChipSelected],onPress:()=>{w(e.id)},accessibilityRole:"button",accessibilityLabel:X===e.id?`Selected category: ${e.name}`:`Select category: ${e.name}`,children:[(0,E.jsx)(o.default,{style:s}),(0,E.jsx)(l.default,{style:[M.categoryChipText,X===e.id&&M.categoryChipTextSelected],children:e.name})]},e.id)})})]}),(0,E.jsxs)(o.default,{style:M.field,children:[(0,E.jsx)(l.default,{style:M.label,children:"Title"}),(0,E.jsx)(f.AppTextInput,{style:M.titleInput,placeholder:"Topic title (at least 15 characters)...",value:z,onChangeText:W,editable:!v,accessibilityLabel:"Topic title"})]}),(0,E.jsxs)(o.default,{style:M.field,children:[(0,E.jsx)(l.default,{style:M.label,children:"Content"}),(0,E.jsx)(f.AppTextInput,{style:M.bodyInput,placeholder:"Write your post content here... (Mark
826down supported)",multiline:!0,value:U,onChangeText:Z,editable:!v,accessibilityLabel:"Topic body"})]}),null!=K&&''!==K?(0,E.jsx)(b.FormSubmitError,{message:K,surface:q}):null,(0,E.jsxs)(o.default,{style:M.actions,children:[(0,E.jsx)(n.default,{style:M.cancelButton,onPress:()=>{e.goBack()},disabled:v,accessibilityRole:"button",accessibilityLabel:"Cancel new topic",children:(0,E.jsx)(l.default,{style:M.cancelButtonText,children:"Cancel"})}),(0,E.jsx)(n.default,{style:[M.submitButton,(!oe||v)&&M.submitButtonDisabled],onPress:()=>{ie()},disabled:!oe||v,accessibilityRole:"button",accessibilityLabel:"Create topic",children:v?(0,E.jsx)(c.default,{size:"small",color:T.COLORS.TEXT_INVERSE}):(0,E.jsx)(l.default,{style:M.submitButtonText,children:"Create Topic"})})]})]})}),(0,E.jsx)(p.CommunityAccountRequiredModal,{signupUrl:J,onDismiss:ee})]})};var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3]));r(d[4]);var s=e(r(d[5])),c=e(r(d[6])),u=r(d[7]),S=r(d[8]),C=r(d[9]),y=r(d[10]),f=r(d[11]),b=r(d[12]),p=r(d[13]),O=r(d[14]),h=r(d[15]),T=r(d[16]),R=r(d[17]),x=r(d[18]),I=r(d[19]),A=r(d[20]),L=r(d[21]),N=r(d[22]),P=r(d[23]),j=r(d[24]),E=r(d[25]);const _=/^[0-9A-Fa-f]{6}$/,D=(0,I.defineScreenErrorSurfaces)('CommunityNewTopic',{form:{id:'form',kind:'form-submit',label:'Community topic form error'}});function G(e){return _.test(e)?`#${e}`:null}const M=(0,u.createStyles)({actions:{flexDirection:'row',gap:R.SPACING.MD,justifyContent:'flex-end',marginTop:R.SPACING.SM},backButton:{marginBottom:R.SPACING.LG},backLink:{color:T.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.MD,fontWeight:'500'},bodyInput:Object.assign({backgroundColor:T.COLORS.BG_SURFACE,borderColor:T.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,fontSize:x.FONT_SIZE.LG,lineHeight:22,minHeight:200,padding:R.SPACING.MD,textAlignVertical:'top'},{outlineStyle:'none'}),cancelButton:{borderRadius:8,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.MD},cancelButtonText:{color:T.COLORS.TEXT_SOFT,fontSize:x.FONT_SIZE.LG},categoryChip:{alignItems:'center',backgroundColor:T.COLORS.BG_SURFACE,borderColor:T.COLORS.BORDER_DEFAULT,borderRadius:20,borderWidth:1,flexDirection:'row',paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.SM},categoryChipSelected:{backgroundColor:T.COLORS.BRAND_BG_WASH,borderColor:T.COLORS.ACTION_PRIMARY},categoryChipText:{color:T.COLORS.TEXT_SECONDARY,fontSize:x.FONT_SIZE.MD},categoryChipTextSelected:{color:T.COLORS.ACTION_PRIMARY,fontWeight:'600'},categoryDot:{borderRadius:5,height:10,marginRight:R.SPACING.SM,width:10},categoryDotInvalid:{borderColor:T.COLORS.BORDER_DEFAULT,borderRadius:5,borderWidth:1,height:10,marginRight:R.SPACING.SM,width:10},categoryLoading:{alignItems:'center',flexDirection:'row',gap:R.SPACING.MD,paddingVertical:R.SPACING.MD},categoryLoadingText:{color:T.COLORS.TEXT_SOFT,fontSize:x.FONT_SIZE.MD},categoryPicker:{flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.SM},centerContainer:{alignItems:'center',flex:1,justifyContent:'center',padding:R.SPACING.HUGE},container:{backgroundColor:T.COLORS.BG_SURFACE,flex:1},contentWrapper:{alignSelf:'center',maxWidth:800,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.XXL,width:'100%'},errorText:{color:T.COLORS.ERROR,fontSize:x.FONT_SIZE.MD,marginBottom:R.SPACING.LG},field:{marginBottom:R.SPACING.XL},label:{color:T.COLORS.TEXT_DARK,fontSize:x.FONT_SIZE.MD,fontWeight:'600',marginBottom:R.SPACING.SM},pageTitle:Object.assign({color:T.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:R.SPACING.XXL},{fontSize:x.FONT_SIZE.DISPLAY_MD}),submitButton:{backgroundColor:T.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.MD},submitButtonDisabled:{opacity:.5},submitButtonText:{color:T.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.LG,fontWeight:'600'},titleInput:Object.assign({backgroundColor:T.COLORS.BG_SURFACE,borderColor:T.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,fontSize:x.FONT_SIZE.LG,padding:R.SPACING.MD},{outlineStyle:'none'})})},728,[34,276,222,488,95,283,410,489,725,710,516,711,513,729,568,565,490,493,494,557,730,562,505,468,469,104]);
827__d(function(g,r,i,a,m,_e,d){"use strict";
827function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CommunityAccountRequiredModal=function({signupUrl:e,onDismiss:u}){const y=(0,t.useCallback)(()=>{null!=e&&''!==e&&(0,O.openExternalLink)(e),u()},[e,u]);if(null==e)return null;const C=''!==e;return(0,b.jsx)(n.default,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:u,children:(0,b.jsx)(o.default,{accessibilityLabel:"Dismiss community account prompt",style:R.backdrop,onPress:u,children:(0,b.jsxs)(o.default,{style:R.card,children:[(0,b.jsx)(l.default,{style:R.title,children:"Join the community forum"}),(0,b.jsx)(l.default,{style:R.body,children:"Posting, replying, and liking need a community forum account. Create one with the same email you use here, then come back to join the conversation."}),(0,b.jsxs)(c.default,{style:R.actions,children:[(0,b.jsx)(s.default,{style:R.secondaryButton,onPress:u,accessibilityRole:"button",accessibilityLabel:"Not now",children:(0,b.jsx)(l.default,{style:R.secondaryButtonText,children:"Not now"})}),C?(0,b.jsx)(s.default,{style:R.primaryButton,onPress:y,accessibilityRole:"button",accessibilityLabel:"Create a community account",children:(0,b.jsx)(l.default,{style:R.primaryButtonText,children:"Create account"})}):null]})]})})})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),y=r(d[7]),C=r(d[8]),S=r(d[9]),f=r(d[10]),O=r(d[11]),b=r(d[12]);const R=(0,u.createStyles)({actions:{flexDirection:'row',gap:S.SPACING.MD,justifyContent:'flex-end',marginTop:S.SPACING.XL},backdrop:{alignItems:'center',backgroundColor:y.COLORS.OVERLAY_DARK,flex:1,justifyContent:'center',padding:S.SPACING.LG},body:{color:y.COLORS.TEXT_SECONDARY,fontSize:f.FONT_SIZE.MD,lineHeight:22},card:Object.assign({backgroundColor:y.COLORS.BG_SURFACE,borderRadius:12,maxWidth:420,padding:S.SPACING.XL,width:'100%'},C.ELEVATION.MEDIUM),primaryButton:{backgroundColor:y.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:S.SPACING.XXL,paddingVertical:S.SPACING.MD},primaryButtonText:{color:y.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.MD,fontWeight:'600'},secondaryButton:{backgroundColor:y.COLORS.BG_SURFACE,borderColor:y.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:S.SPACING.XL,paddingVertical:S.SPACING.MD},secondaryButtonText:{color:y.COLORS.TEXT_SECONDARY,fontSize:f.FONT_SIZE.MD,fontWeight:'600'},title:{color:y.COLORS.TEXT_HEADING,fontSize:f.FONT_SIZE.XL,fontWeight:'700',marginBottom:S.SPACING.MD}})},729,[34,544,369,222,488,276,489,490,503,493,494,532,104]);
828__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useCommunityAccountPrompt=function(){const[t,s]=(0,u.useState)(null),l=(0,u.useCallback)(u=>u instanceof n.CommunityAccountRequiredError&&(s(u.signupUrl),!0),[]),c=(0,u.useCallback)(()=>{s(null)},[]);return{signupUrl:t,handle:l,dismiss:c}};var u=r(d[0]),n=r(d[1])},730,[34,725]);
829__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CommunityScreen=function(){const{isAuthenticated:e}=(0,h.useAuth)(),c=(0,P.useSeoMeta)('Community'),[C,N]=(0,t.useState)('categories'),[A,_]=(0,t.useState)(0),[X,F]=(0,t.useState)(''),[k,U]=(0,t.useState)([]),[v,V]=(0,t.useState)(!1),[Y,$]=(0,t.useState)(null),[q,K]=(0,t.useState)(!1),J=(0,G.useCommunityWriteEnabled)(),{data:Q,loading:ee,error:te,retry:oe}=(0,j.useAsyncData)(async()=>{const[e,t]=await Promise.all([u.communityApi.getCategories(),u.communityApi.getLatestTopics(A)]);return{categories:e,latestTopics:t.topics,moreTopicsUrl:t.moreTopicsUrl}},[A],'Failed to load community.'),{isDevTriggered:re,surface:ae}=(0,E.useErrorSurface)(D.homeLoad),ie=te??(re?'Failed to load community.':null),ne=Q?.categories??[],se=Q?.latestTopics??[],le=Q?.moreTopicsUrl??null,[ce,de]=(0,t.useState)([]),[ue,he]=(0,t.useState)(!1),Se=(0,t.useRef)(!0);(0,t.useEffect)(()=>()=>{Se.current=!1},[]),(0,t.useEffect)(()=>{'top'===C&&0===ce.length&&(async()=>{he(!0);try{const e=await u.communityApi.getTopTopics('all');if(!Se.current)return;de(e.topics)}catch(e){B.logger.warn('Failed to load top topics:',e)}finally{Se.current&&he(!1)}})()},[C,ce.length]);const ge=ee||ue,me=(0,t.useCallback)(async()=>
829{if(X.trim()){V(!0),K(!0),$(null);try{const e=await u.communityApi.search(X.trim());U(e)}catch(e){B.logger.warn('Community search failed',e),U([]),$('Search failed. Please try again.')}finally{V(!1)}}},[X]),fe=(0,t.useCallback)(()=>{K(!1),F(''),U([]),$(null)},[]);return(0,w.jsxs)(R.PageLayout,{children:[(0,w.jsx)(I.WebMeta,Object.assign({},c)),(0,w.jsxs)(l.default,{style:Z.container,children:[(0,w.jsx)(O.HeroSection,{backgroundColor:b.COLORS.GREEN_NATURE,background:{imageUrl:'https://images.unsplash.com/photo-1455734729978-db1ae4f687fc?w=1920&q=80',imagePosition:'center 60%'},minHeight:320,label:"CONNECT & LEARN",title:"PurpleAir Community",subtitle:"Join thousands of air quality enthusiasts, researchers, and sensor owners. Get help, share knowledge, and connect with others.",centered:!0,children:(0,w.jsxs)(o.default,{style:Z.searchBar,children:[(0,w.jsx)(f.AppTextInput,{style:Z.searchInput,placeholder:"Search the community...",value:X,onChangeText:F,onSubmitEditing:()=>{me()},returnKeyType:"search",accessibilityLabel:"Search community topics"}),(0,w.jsx)(s.default,{style:Z.searchButton,onPress:()=>{me()},accessibilityRole:"button",accessibilityLabel:"Search community topics",children:(0,w.jsx)(n.default,{style:Z.searchButtonText,children:"Search"})})]})}),q&&(0,w.jsxs)(o.default,{style:Z.searchResultsSection,children:[(0,w.jsxs)(o.default,{style:Z.searchResultsHeader,children:[(0,w.jsxs)(n.default,{style:Z.searchResultsTitle,children:["Search results for \"",X,"\""]}),(0,w.jsx)(s.default,{onPress:fe,accessibilityRole:"button",accessibilityLabel:"Clear search",children:(0,w.jsx)(n.default,{style:Z.clearSearch,children:"Clear search"})})]}),v?(0,w.jsx)(p.LoadingState,{}):null!=Y?(0,w.jsx)(n.default,{style:Z.errorText,children:Y}):0===k.length?(0,w.jsx)(n.default,{style:Z.emptyText,children:"No results found."}):k.map(e=>(0,w.jsx)(z,{result:e,href:(0,x.buildCommunityTopicPath)(e.topicSlug,e.topicId)},`${e.topicId}-${e.postNumber}`))]}),!q&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(o.default,{style:Z.tabBarRow,children:[(0,w.jsx)(L.TabBar,{tabs:W,activeTab:C,onTabChange:e=>{H(e)&&(N(e),_(0))},variant:"underline",style:Z.communityTabBar}),e&&J&&(0,w.jsx)(S.AppLink,{to:"CommunityNewTopic",style:Z.newTopicButton,children:(0,w.jsx)(n.default,{style:Z.newTopicButtonText,children:"+ New Topic"})})]}),ge?(0,w.jsx)(p.LoadingState,{}):null!=ie?(0,w.jsx)(p.ErrorState,{message:ie,surface:ae,onRetry:oe,retryLabel:"Retry loading community"}):(0,w.jsxs)(o.default,{style:Z.contentSection,children:['categories'===C&&(0,w.jsx)(o.default,{style:Z.categoriesGrid,children:ne.map(e=>(0,w.jsx)(M,{category:e,href:(0,x.buildCommunityCategoryPath)(e.slug,e.id)},e.id))}),'latest'===C&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(o.default,{style:Z.topicsList,children:se.map(e=>(0,w.jsx)(T.CommunityTopicRow,{topic:e,categories:ne,href:(0,x.buildCommunityTopicPath)(e.slug,e.id)},e.id))}),null!=le&&''!==le?(0,w.jsx)(y.Pagination,{page:A,onPageChange:_,itemLabel:"topics"}):null]}),'top'===C&&(0,w.jsx)(o.default,{style:Z.topicsList,children:ce.map(e=>(0,w.jsx)(T.CommunityTopicRow,{topic:e,categories:ne,href:(0,x.buildCommunityTopicPath)(e.slug,e.id)},e.id))})]})]})]})]})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),s=e(r(d[3]));r(d[4]);var l=e(r(d[5])),c=r(d[6]),u=r(d[7]),h=r(d[8]),S=r(d[9]),f=r(d[10]),C=r(d[11]),p=r(d[12]),y=r(d[13]),T=r(d[14]),O=r(d[15]),R=r(d[16]),x=r(d[17]),L=r(d[18]),I=r(d[19]),b=r(d[20]),N=r(d[21]),A=r(d[22]),E=r(d[23]),j=r(d[24]),G=r(d[25]),P=r(d[26]),_=r(d[27]),B=r(d[28]),w=r(d[29]);const D=(0,E.defineScreenErrorSurfaces)('Community',{homeLoad:{id:'home-load',kind:'page',label:'Community home load error'}});function X({category:e,href:t}){return(0,w.jsx)(S.AppLink,{to:"CommunityCategory",href:t,style:Z.categoryCardWrapper,children:(0,w.jsxs)(C.Card,{hoverable:!0,padding:0,style:Z.categoryCardInner,children:[(0,w.jsx)(o.default,{style:[Z.categoryColor,{backgroundColor:`#${e.color}`}]}),(0,w.jsxs)(o.default,{style:Z.categoryContent,children:[(0,w.jsx)(n.default,{style:Z.categoryName,children:e.name}),(0,w.jsx)(n.default,{style:Z.categoryDesc,numberOfLines:2,children:e.description}),(0,w.jsxs)(o.default,{style:Z.categoryStats,children:[(0,w.jsxs)(n.default,{style:Z.categoryStat,children:[e.topicCount," topics"]}),(0,w.jsxs)(n.default,{style:Z.categoryStat,children:[e.postCount," posts"]})]})]})]})})}const M=(0,t.memo)(X);function F({result:e,href:t}){return(0,w.jsxs)(S.AppLink,{to:"CommunityTopic",href:t,style:Z.searchResult,children:[(0,w.jsx)(n.default,{style:Z.searchResultTitle,children:e.topicTitle}),(0,w.jsx)(n.default,{style:Z.searchResultBlurb,numberOfLines:3,children:e.blurb}),(0,w.jsxs)(o.default,{style:Z.searchResultMeta,children:[(0,w.jsx)(n.default,{style:Z.searchResultUser,children:e.username}),(0,w.jsx)(n.default,{style:Z.searchResultDate,children:(0,_.formatTimeAgo)(e.createdAt)})]})]})}const z=(0,t.memo)(F),W=[{key:'categories',label:'Categories'},{key:'latest',label:'Latest'},{key:'top',label:'Top'}],k=new Set(['categories','latest','top']);function H(e){return k.has(e)}const Z=(0,c.createStyles)({categoriesGrid:{flexDirection:'row',flexWrap:'wrap',gap:N.SPACING.LG},categoryCardInner:Object.assign({flexDirection:'row',overflow:'hidden'},{transition:'box-shadow 0.2s'}),categoryCardWrapper:{flexBasis:300,flexGrow:1,flexShrink:0,maxWidth:480},categoryColor:{width:6},categoryContent:{flex:1,padding:N.SPACING.LG},categoryDesc:{color:b.COLORS.TEXT_SOFT,fontSize:A.FONT_SIZE.MD,lineHeight:20,marginBottom:N.SPACING.MD},categoryName:{color:b.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.XL,fontWeight:'600',marginBottom:N.SPACING.SM},categoryStat:{color:b.COLORS.TEXT_CAPTION,fontSize:A.FONT_SIZE.SM},categoryStats:{flexDirection:'row',gap:N.SPACING.LG},clearSearch:{color:b.COLORS.ACTION_PRIMARY,fontSize:A.FONT_SIZE.MD,fontWeight:'600'},container:{backgroundColor:b.COLORS.BG_SURFACE,flex:1},contentSection:{alignSelf:'center',maxWidth:1e3,paddingHorizontal:N.SPACING.XXL,paddingVertical:N.SPACING.XXXL,width:'100%'},emptyText:{color:b.COLORS.TEXT_MUTED,fontSize:A.FONT_SIZE.LG,paddingVertical:N.SPACING.HUGE,textAlign:'center'},errorText:{color:b.COLORS.ERROR,fontSize:A.FONT_SIZE.LG,marginBottom:N.SPACING.LG},newTopicButton:{backgroundColor:b.COLORS.ACTION_PRIMARY,borderRadius:6,marginLeft:N.SPACING.LG,paddingHorizontal:N.SPACING.LG,paddingVertical:N.SPACING.SM},newTopicButtonText:{color:b.COLORS.TEXT_INVERSE,fontSize:A.FONT_SIZE.MD,fontWeight:'600'},pageButton:{borderColor:b.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:1,paddingHorizontal:N.SPACING.XL,paddingVertical:N.SPACING.MD},pageButtonDisabled:{borderColor:b.COLORS.BORDER_DEFAULT},pageButtonText:{color:b.COLORS.ACTION_PRIMARY,fontSize:A.FONT_SIZE.MD,fontWeight:'600'},pageButtonTextDisabled:{color:b.COLORS.BORDER_DEFAULT},pageInfo:{color:b.COLORS.TEXT_BODY,fontSize:A.FONT_SIZE.MD,fontWeight:'500'},pagination:{alignItems:'center',flexDirection:'row',gap:N.SPACING.LG,justifyContent:'center',paddingVertical:N.SPACING.XXXL},searchBar:{backgroundColor:b.COLORS.BG_SURFACE,borderRadius:8,flexDirection:'row',maxWidth:500,overflow:'hidden',width:'100%'},searchButton:{backgroundColor:b.COLORS.ACTION_PRIMARY,justifyContent:'center',paddingHorizontal:N.SPACING.XL},searchButtonText:{color:b.COLORS.TEXT_INVERSE,fontSize:A.FONT_SIZE.LG,fontWeight:'600'},searchInput:{color:b.COLORS.TEXT_DARK,flex:1,fontSize:A.FONT_SIZE.LG,paddingHorizontal:N.SPACING.LG,paddingVertical:N.SPACING.MD},searchResult:{borderBottomColor:b.COLORS.BORDER,borderBottomWidth:1,paddingVertical:N.SPACING.LG},searchResultBlurb:{color:b.COLORS.TEXT_SOFT,fontSize:A.FONT_SIZE.MD,lineHeight:22,marginBottom:N.SPACING.SM},searchResultDate:{color:b.COLORS.TEXT_CAPTION,fontSize:A.FONT_SIZE.SM},searchResultMeta:{flexDirection:'row',gap:N.SPACING.LG},searchResultTitle:{color:b.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.LG,fontWeight:'600',marginBottom:N.SPACING.SM},searchResultUser:{color:b.COLORS.BRAND_PRIMARY,fontSize:A.FONT_SIZE.SM,fontWeight:'500'},searchResultsHeader:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginBottom:N.SPACING.XL},searchResultsSection:{alignSelf:'center',maxWidth:900,paddingHorizontal:N.SPACING.XXL,paddingVertical:N.SPACING.XXXL,width:'100%'},searchResultsTitle:{color:b.COLORS.TEXT_HEADING,fontSize:A.FONT_SIZE.XL,fontWeight:'600'},communityTabBar:{marginBottom:0},tabBarRow:{alignItems:'center',borderBottomColor:b.COLORS.BORDER,borderBottomWidth:1,flexDirection:'row',flexWrap:'wrap',gap:N.SPACING.MD,justifyContent:'center',paddingHorizontal:N.SPACING.XXL},topicsList:{gap:0}})},731,[34,276,222,488,95,283,489,725,710,516,711,605,512,712,726,674,568,518,732,565,490,493,494,557,561,727,562,685,469,104]);
830__d(function(g,r,i,a,m,_e,d){"use strict";
830function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.TabBar=function({tabs:e,activeTab:l,onTabChange:S,variant:A="pill",style:C,testID:T}){const R=(0,c.useTabBarVariantOverride)(),f=p[R??A];return(0,s.jsx)(t.default,{style:[f.container,I,C],testID:T,children:e.map(e=>{const t=l===e.key;return(0,s.jsx)(n.default,{style:[f.item,t&&f.itemActive],onPress:()=>{S(e.key)},accessibilityRole:"tab",accessibilityState:{selected:t},accessibilityLabel:e.label,children:(0,s.jsx)(o.default,{style:[f.text,t&&f.textActive],children:e.label})},e.key)})})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3]));r(d[4]);var l=r(d[5]),c=r(d[6]),S=r(d[7]),A=r(d[8]),C=r(d[9]),s=r(d[10]);const I={userSelect:'none'};const T=(0,l.createStyles)({pillContainer:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',justifyContent:'center',gap:A.SPACING.SM,marginBottom:A.SPACING.XXL},pillItem:{backgroundColor:S.COLORS.BG_SUBTLE,borderRadius:20,paddingHorizontal:A.SPACING.LG,paddingVertical:A.SPACING.SM},pillItemActive:{backgroundColor:S.COLORS.BRAND_PRIMARY},pillText:{color:S.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.MD,fontWeight:'500'},pillTextActive:{color:S.COLORS.TEXT_INVERSE},pillSoftContainer:{borderBottomColor:S.COLORS.BORDER_NEUTRAL,borderBottomWidth:1,flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XS,marginBottom:A.SPACING.XXL,paddingBottom:A.SPACING.SM},pillSoftItem:{borderRadius:8,paddingHorizontal:A.SPACING.LG,paddingVertical:A.SPACING.SM},pillSoftItemActive:{backgroundColor:S.COLORS.BRAND_PRIMARY},pillSoftText:{color:S.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.MD,fontWeight:'600'},pillSoftTextActive:{color:S.COLORS.TEXT_INVERSE},underlineContainer:{flexDirection:'row',flexWrap:'wrap',gap:A.SPACING.XS,marginBottom:A.SPACING.XXL},underlineItem:{borderBottomColor:S.COLORS.TRANSPARENT,borderBottomWidth:2,paddingHorizontal:A.SPACING.XL,paddingVertical:A.SPACING.MD},underlineItemActive:{borderBottomColor:S.COLORS.BRAND_PRIMARY},underlineText:{color:S.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.LG,fontWeight:'500'},underlineTextActive:{color:S.COLORS.BRAND_PRIMARY,fontWeight:'600'},segmentedContainer:{backgroundColor:S.COLORS.BG_SLATE_100,borderRadius:12,flexDirection:'row',flexWrap:'wrap',marginBottom:A.SPACING.XXXL,padding:A.SPACING.XS},segmentedItem:{alignItems:'center',borderRadius:10,flex:1,paddingVertical:A.SPACING.MD},segmentedItemActive:{backgroundColor:S.COLORS.BRAND_PRIMARY},segmentedText:{color:S.COLORS.TEXT_SLATE,fontSize:C.FONT_SIZE.MD,fontWeight:'600'},segmentedTextActive:{color:S.COLORS.TEXT_INVERSE}}),p={pill:{container:T.pillContainer,item:T.pillItem,itemActive:T.pillItemActive,text:T.pillText,textActive:T.pillTextActive},pillSoft:{container:T.pillSoftContainer,item:T.pillSoftItem,itemActive:T.pillSoftItemActive,text:T.pillSoftText,textActive:T.pillSoftTextActive},underline:{container:T.underlineContainer,item:T.underlineItem,itemActive:T.underlineItemActive,text:T.underlineText,textActive:T.underlineTextActive},segmented:{container:T.segmentedContainer,item:T.segmentedItem,itemActive:T.segmentedItemActive,text:T.segmentedText,textActive:T.segmentedTextActive}}},732,[34,276,222,488,95,489,733,490,493,494,104]);
831__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readTabBarVariantOverride=o,e.setTabBarVariantOverride=function(n){u=n,c.forEach(n=>{n()})},e.useTabBarVariantOverride=function(){return(0,n.useSyncExternalStore)(l,o,o)};var n=r(d[0]),t=r(d[1]);let u=null;const c=new Set;function o(){return t.IS_DEVELOPMENT_BUILD?u:null}function l(n){return t.IS_DEVELOPMENT_BUILD?(c.add(n),()=>{c.delete(n)}):()=>{}}},733,[34,508]);
832__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CommunityTopicScreen=function(){const{id:e,slug:u}=(0,B.useCommunityTopicParams)(),{isAuthenticated:S}=(0,R.useAuth)(),T=(0,B.useAppNavigation)(),{data:L,loading:x,error:F,retry:z}=(0,E.useAsyncData)(async()=>{const t=await p.communityApi.getTopic(e);if(null==t)throw new Error('Topic not found.');return t},[e],'Failed to load topic.'),{isDevTriggered:W,surface:w}=(0,A.useErrorSurface)(X.topicLoad),Z=F??(W?'Failed to load topic.':null),Y=(0,t.useMemo)(()=>L?{topicTitle:L.title,topicExcerpt:L.title}
832:void 0,[L]),V=(0,j.useSeoMeta)('CommunityTopic',Y),$=(0,P.useCommunityWriteEnabled)(),[U,K]=(0,t.useState)(''),[q,J]=(0,t.useState)(null),[Q,ee]=(0,t.useState)(!1),[te,le]=(0,t.useState)(null),[oe,ie]=(0,t.useState)({}),[ne,ae]=(0,t.useState)({}),[re,se]=(0,t.useState)(null),[de,ce]=(0,t.useState)(null),[ue,Se]=(0,t.useState)(''),[pe,Re]=(0,t.useState)(!1),[Ce,Oe]=(0,t.useState)(!1),[ye,ge]=(0,t.useState)(!1),[fe,me]=(0,t.useState)(null),be=(0,t.useRef)(null),[Te,Ie]=(0,t.useState)(null),[he,Ne]=(0,t.useState)(!1),[Le,xe]=(0,t.useState)(null);(0,t.useEffect)(()=>{ie({}),ae({}),se(null)},[L]);const Ae=L?.id;(0,t.useEffect)(()=>{be.current=null,ce(null),Se(''),Oe(!1),me(null),Ie(null),xe(null)},[Ae]);const{signupUrl:Ee,handle:ke,dismiss:Pe}=(0,k.useCommunityAccountPrompt)(),je=S&&$&&!0!==L?.closed,Be=S&&$,De=(0,t.useCallback)(e=>{J(e),le(null)},[]),Ge=(0,t.useCallback)(async e=>{be.current=e,ce(e),J(null),me(null),Se(''),Oe(!1),Re(!0);try{const t=await p.communityApi.getPost(e);if(be.current!==e)return;Se(t.raw??''),Oe(!0)}catch(t){if(be.current!==e)return;me((0,D.errorMessage)(t,'Could not load this post for editing.'))}finally{be.current===e&&Re(!1)}},[]),Me=(0,t.useCallback)(()=>{be.current=null,ce(null),Se(''),Oe(!1),me(null)},[]),Xe=(0,t.useCallback)(async()=>{if(null!=de&&Ce&&ue.trim()){ge(!0),me(null);try{await p.communityApi.editPost(de,ue.trim()),be.current=null,ce(null),Se(''),Oe(!1),z()}catch(e){if(ke(e))return;me((0,D.errorMessage)(e,'Failed to save your changes. Please try again.'))}finally{ge(!1)}}},[de,Ce,ue,z,ke]),Fe=(0,t.useCallback)(e=>{const t=L?.posts.find(t=>t.id===e);t&&(xe(null),Ie({id:e,deletesEntireTopic:1===t.postNumber}))},[L]),ze=(0,t.useCallback)(()=>{he||(Ie(null),xe(null))},[he]),We=(0,t.useCallback)(async()=>{if(!Te||null==Ae)return;const{id:e,deletesEntireTopic:t}=Te;Ne(!0),xe(null);try{t?await p.communityApi.deleteTopic(Ae):await p.communityApi.deletePost(e),Ie(null),t?T.navigate('Community'):z()}catch(e){if(ke(e))return void Ie(null);xe((0,D.errorMessage)(e,'Failed to delete. Please try again.'))}finally{Ne(!1)}},[Te,Ae,T,z,ke]),He=(0,t.useCallback)(()=>{J(null),K(''),le(null)},[]),ve=(0,t.useCallback)(async()=>{if(U.trim()&&L){ee(!0),le(null);try{await p.communityApi.createPost(L.id,U.trim(),q??void 0),K(''),J(null),z()}catch(e){if(ke(e))return;le((0,D.errorMessage)(e,'Failed to submit reply. Please try again.'))}finally{ee(!1)}}},[U,L,q,z,ke]),we=(0,t.useCallback)(async e=>{const t=L?.posts.find(t=>t.id===e);if(!t||!0===ne[e])return;const l=oe[e]??{liked:t.likedByCurrentUser,count:t.likeCount};ae(t=>Object.assign({},t,{[e]:!0})),se(null),ie(t=>Object.assign({},t,{[e]:{liked:!l.liked,count:Math.max(0,l.count+(l.liked?-1:1))}}));try{const t=await p.communityApi.toggleLike(e);ie(l=>Object.assign({},l,{[e]:{liked:t.liked,count:Math.max(0,t.likeCount)}}))}catch(t){if(ie(t=>Object.assign({},t,{[e]:l})),ke(t))return;se((0,D.errorMessage)(t,'Could not update your like. Please try again.')),G.logger.debug('Like toggle failed',t)}finally{ae(t=>Object.assign({},t,{[e]:!1}))}},[L,oe,ne,ke]),Ze=(0,t.useCallback)(e=>oe[e.id]??{liked:e.likedByCurrentUser,count:e.likeCount},[oe]);return(0,M.jsxs)(I.PageLayout,{children:[(0,M.jsx)(h.WebMeta,Object.assign({},V,{canonicalUrl:`${h.COMMUNITY_ORIGIN}/t/${u}/${e}`})),(0,M.jsx)(s.default,{style:v.container,children:(0,M.jsxs)(l.default,{style:v.contentWrapper,children:[(0,M.jsx)(C.AppLink,{to:"Community",style:v.backButton,children:(0,M.jsx)(o.default,{style:v.backLink,children:"Community"})}),x?(0,M.jsx)(y.LoadingState,{message:"Loading topic..."}):null!=Z?(0,M.jsx)(y.ErrorState,{message:Z,surface:w,onRetry:z}):L?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(l.default,{style:v.topicHeader,children:[(0,M.jsx)(o.default,{style:v.topicTitle,children:L.title}),(0,M.jsxs)(l.default,{style:v.topicStats,children:[(0,M.jsxs)(o.default,{style:v.topicStat,children:[L.postsCount," post",1!==L.postsCount?'s':'']}),(0,M.jsx)(o.default,{style:v.topicStatDot,children:"\xb7"}),(0,M.jsxs)(o.default,{style:v.topicStat,children:[L.views," view",1!==L.views?'s':'']}),(0,M.jsx)(o.default,{style:v.topicStatDot,children:"\xb7"}),(0,M.jsx)(o.default,{style:v.topicStat,children:(0,_.formatIsoDateLong)(L.createdAt)}),L.pinned&&(0,M.jsx)(o.default,{style:v.pinnedBadge,children:"Pinned"}),L.closed&&(0,M.jsx)(o.default,{style:v.closedBadge,children:"Closed"})]})]}),null!=re&&''!==re&&(0,M.jsx)(l.default,{style:v.likeNotice,accessibilityRole:"alert",children:(0,M.jsx)(o.default,{style:v.likeNoticeText,children:re})}),(0,M.jsx)(l.default,{style:v.postsContainer,children:L.posts.map(e=>{if(de===e.id)return(0,M.jsxs)(l.default,{style:v.editComposer,children:[(0,M.jsxs)(o.default,{style:v.editComposerTitle,children:["Editing post #",e.postNumber]}),pe?(0,M.jsx)(c.default,{size:"small",color:N.COLORS.ACTION_PRIMARY}):Ce?(0,M.jsx)(O.AppTextInput,{style:v.replyInput,placeholder:"Edit your post...",multiline:!0,value:ue,onChangeText:Se,editable:!ye,accessibilityLabel:"Edit post content"}):null,null!=fe&&''!==fe&&(0,M.jsx)(o.default,{style:v.submitError,children:fe}),(0,M.jsxs)(l.default,{style:v.replyActions,children:[(0,M.jsx)(n.default,{onPress:Me,disabled:ye,accessibilityRole:"button",accessibilityLabel:"Cancel editing",children:(0,M.jsx)(o.default,{style:v.cancelReplyText,children:"Cancel"})}),Ce&&(0,M.jsx)(n.default,{style:[v.submitButton,(!ue.trim()||ye)&&v.submitButtonDisabled],onPress:()=>{Xe()},disabled:!ue.trim()||ye,accessibilityRole:"button",accessibilityLabel:"Save edits",children:ye?
832(0,M.jsx)(c.default,{size:"small",color:N.COLORS.TEXT_INVERSE}):(0,M.jsx)(o.default,{style:v.submitButtonText,children:"Save"})})]})]},e.id);const t=Ze(e),s=1===e.postNumber,u=s?L.canDelete:e.canDelete;return(0,M.jsx)(H,{post:e,isOriginalPost:s,canInteract:je,canManage:Be,canDelete:u,liked:t.liked,likeCount:t.count,likePending:!0===ne[e.id],onReply:De,onLike:e=>{we(e)},onEdit:e=>{Ge(e)},onDelete:Fe},e.id)})}),L.closed?(0,M.jsx)(l.default,{style:v.closedNotice,children:(0,M.jsx)(o.default,{style:v.closedNoticeText,children:"This topic is closed and no longer accepts replies."})}):je?(0,M.jsxs)(l.default,{style:v.replyComposer,children:[null!=q&&(0,M.jsxs)(l.default,{style:v.replyingToBar,children:[(0,M.jsxs)(o.default,{style:v.replyingToText,children:["Replying to #",q]}),(0,M.jsx)(n.default,{onPress:He,accessibilityRole:"button",accessibilityLabel:"Cancel reply",children:(0,M.jsx)(o.default,{style:v.cancelReplyText,children:"Cancel"})})]}),(0,M.jsx)(O.AppTextInput,{style:v.replyInput,placeholder:"Write your reply...",multiline:!0,value:U,onChangeText:K,editable:!Q,accessibilityLabel:"Reply message"}),null!=te&&''!==te&&(0,M.jsx)(o.default,{style:v.submitError,children:te}),(0,M.jsxs)(l.default,{style:v.replyActions,children:[(0,M.jsx)(o.default,{style:v.markdownHint,children:"Supports Markdown formatting"}),(0,M.jsx)(n.default,{style:[v.submitButton,(!U.trim()||Q)&&v.submitButtonDisabled],onPress:()=>{ve()},disabled:!U.trim()||Q,accessibilityRole:"button",accessibilityLabel:"Submit reply",children:Q?(0,M.jsx)(c.default,{size:"small",color:N.COLORS.TEXT_INVERSE}):(0,M.jsx)(o.default,{style:v.submitButtonText,children:"Reply"})})]})]}):S?null:(0,M.jsxs)(l.default,{style:v.ctaSection,children:[(0,M.jsx)(o.default,{style:v.ctaText,children:"Sign in to reply or join the discussion."}),(0,M.jsx)(C.AppLink,{to:"Login",style:v.ctaButton,children:(0,M.jsx)(o.default,{style:v.ctaButtonText,children:"Sign In"})})]})]}):null]})}),(0,M.jsx)(f.CommunityAccountRequiredModal,{signupUrl:Ee,onDismiss:Pe}),(0,M.jsx)(b.ConfirmDeletePostModal,{visible:null!=Te,deletesEntireTopic:Te?.deletesEntireTopic??!1,deleting:he,error:Le,onConfirm:()=>{We()},onCancel:ze})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3]));r(d[4]);var s=e(r(d[5])),c=e(r(d[6])),u=e(r(d[7])),S=r(d[8]),p=r(d[9]),R=r(d[10]),C=r(d[11]),O=r(d[12]),y=r(d[13]),f=r(d[14]),b=r(d[15]),T=r(d[16]),I=r(d[17]),h=r(d[18]),N=r(d[19]),L=r(d[20]),x=r(d[21]),A=r(d[22]),E=r(d[23]),k=r(d[24]),P=r(d[25]),j=r(d[26]),B=r(d[27]),_=r(d[28]),D=r(d[29]),G=r(d[30]),M=r(d[31]);const X=(0,A.defineScreenErrorSurfaces)('CommunityTopic',{topicLoad:{id:'topic-load',kind:'page',label:'Community topic load error'}});function F(e){return`${e} ${1===e?'like':'likes'}`}function z(e,t){const l=F(t);return e?`You liked this post. ${l}. Activate to unlike.`:t>0?`Like this post. ${l}.`:'Like this post.'}function W({post:e,isOriginalPost:t,canInteract:s,canManage:c,canDelete:S,liked:p,likeCount:R,likePending:C,onReply:O,onLike:y,onEdit:f,onDelete:b}){const I=s&&e.canLike;return(0,M.jsxs)(l.default,{style:[v.postCard,t&&v.originalPost],children:[(0,M.jsxs)(l.default,{style:v.postHeader,children:[(0,M.jsxs)(l.default,{style:v.postAuthor,children:[e.avatarUrl?(0,M.jsx)(u.default,{source:{uri:e.avatarUrl},style:v.avatar,accessibilityLabel:`${e.displayName??e.username}'s avatar`}):(0,M.jsx)(l.default,{style:[v.avatar,v.avatarPlaceholder],children:(0,M.jsx)(o.default,{style:v.avatarLetter,children:(e.displayName??e.username).charAt(0).toUpperCase()})}),(0,M.jsxs)(l.default,{children:[(0,M.jsx)(o.default,{style:v.authorName,children:e.displayName??e.username}),(0,M.jsxs)(o.default,{style:v.authorUsername,children:["@",e.username]})]})]}),(0,M.jsxs)(l.default,{style:v.postHeaderRight,children:[(0,M.jsx)(o.default,{style:v.postDate,children:(0,_.formatTimeAgo)(e.createdAt)}),(0,M.jsxs)(o.default,{style:v.postNumber,children:["#",e.postNumber]})]})]}),(e.replyToPostNumber??0)>0&&(0,M.jsxs)(o.default,{style:v.replyIndicator,children:["Replying to #",e.replyToPostNumber]}),(0,M.jsx)(T.DiscourseHtmlBody,{html:e.cookedHtml,fallbackStyle:v.postBodyFallback}),(0,M.jsxs)(l.default,{style:v.postFooter,children:[I?(0,M.jsx)(n.default,{style:[v.likeButton,p&&v.likeButtonActive,C&&v.likeButtonPending],onPress:()=>y?.(e.id),disabled:C,accessibilityRole:"button",accessibilityState:{selected:p,disabled:C},accessibilityLabel:z(p,R),children:(0,M.jsxs)(o.default,{style:[v.likeButtonText,p&&v.likeButtonTextActive],children:[p?'Liked':'Like',R>0?` \xb7 ${R}`:'']})}):R>0?(0,M.jsx)(l.default,{style:v.likeStat,accessibilityRole:"text",accessibilityLabel:p?`You liked this post. ${F(R)}.`:F(R),children:(0,M.jsx)(o.default,{style:[v.likeStatText,p&&v.likeStatTextLiked],children:p?`Liked \xb7 ${R}`:F(R)})}
832):null,s&&(0,M.jsx)(n.default,{style:v.replyButton,onPress:()=>O?.(e.postNumber),accessibilityRole:"button",accessibilityLabel:`Reply to post ${e.postNumber}`,children:(0,M.jsx)(o.default,{style:v.replyButtonText,children:"Reply"})}),c&&e.canEdit&&(0,M.jsx)(n.default,{style:v.manageButton,onPress:()=>f?.(e.id),accessibilityRole:"button",accessibilityLabel:`Edit post ${e.postNumber}`,children:(0,M.jsx)(o.default,{style:v.manageButtonText,children:"Edit"})}),c&&S&&(0,M.jsx)(n.default,{style:v.manageButton,onPress:()=>b?.(e.id),accessibilityRole:"button",accessibilityLabel:t?`Delete post ${e.postNumber} and the whole topic`:`Delete post ${e.postNumber}`,children:(0,M.jsx)(o.default,{style:v.manageButtonDanger,children:"Delete"})})]})]})}const H=(0,t.memo)(W);const v=(0,S.createStyles)({authorName:{color:N.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.LG,fontWeight:'600'},authorUsername:{color:N.COLORS.TEXT_GHOST,fontSize:x.FONT_SIZE.SM},avatar:{backgroundColor:N.COLORS.BORDER,borderRadius:20,height:40,width:40},avatarLetter:{color:N.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.XL,fontWeight:'600'},avatarPlaceholder:{alignItems:'center',backgroundColor:N.COLORS.BRAND_PRIMARY,justifyContent:'center'},backButton:{marginBottom:L.SPACING.LG},backLink:{color:N.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.MD,fontWeight:'500'},cancelReplyText:{color:N.COLORS.TEXT_GHOST,fontSize:x.FONT_SIZE.SM},closedBadge:{backgroundColor:N.COLORS.ERROR_BG,borderRadius:4,color:N.COLORS.ERROR,fontSize:x.FONT_SIZE.XS,fontWeight:'600',paddingHorizontal:L.SPACING.SM,paddingVertical:L.SPACING.XS},closedNotice:{alignItems:'center',backgroundColor:N.COLORS.ERROR_BG,borderColor:N.COLORS.ERROR_BORDER,borderRadius:10,borderWidth:1,marginTop:L.SPACING.XXXL,padding:L.SPACING.XL},closedNoticeText:{color:N.COLORS.ERROR_DARK,fontSize:x.FONT_SIZE.MD},container:{backgroundColor:N.COLORS.TEXT_INVERSE,flex:1},contentWrapper:{alignSelf:'center',maxWidth:900,paddingHorizontal:L.SPACING.XXL,paddingVertical:L.SPACING.XXL,width:'100%'},ctaButton:{backgroundColor:N.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:L.SPACING.XXXL,paddingVertical:L.SPACING.LG},ctaButtonText:{color:N.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.LG,fontWeight:'600'},ctaSection:{alignItems:'center',backgroundColor:N.COLORS.BG_WASH,borderColor:N.COLORS.BORDER,borderRadius:10,borderWidth:1,marginTop:L.SPACING.XXXL,padding:L.SPACING.XXL},ctaText:{color:N.COLORS.TEXT_SECONDARY,fontSize:x.FONT_SIZE.LG,marginBottom:L.SPACING.LG,textAlign:'center'},editComposer:{backgroundColor:N.COLORS.BG_WASH,borderColor:N.COLORS.BORDER_SUBTLE,borderRadius:10,borderWidth:2,padding:L.SPACING.XL},editComposerTitle:{color:N.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.MD,fontWeight:'600',marginBottom:L.SPACING.MD},likeButton:{alignItems:'center',borderColor:N.COLORS.TRANSPARENT,borderRadius:6,borderWidth:1,flexDirection:'row',paddingHorizontal:L.SPACING.SM,paddingVertical:L.SPACING.XS},likeButtonActive:{backgroundColor:N.COLORS.BRAND_TINT,borderColor:N.COLORS.ACTION_PRIMARY},likeButtonPending:{opacity:.6},likeButtonText:{color:N.COLORS.ACTION_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'500'},likeButtonTextActive:{color:N.COLORS.ACTION_PRIMARY,fontWeight:'700'},likeNotice:{backgroundColor:N.COLORS.ERROR_BG,borderColor:N.COLORS.ERROR_BORDER,borderRadius:8,borderWidth:1,marginBottom:L.SPACING.LG,padding:L.SPACING.MD},likeNoticeText:{color:N.COLORS.ERROR_DARK,fontSize:x.FONT_SIZE.SM},likeStat:{paddingHorizontal:L.SPACING.SM,paddingVertical:L.SPACING.XS},likeStatText:{color:N.COLORS.TEXT_GHOST,fontSize:x.FONT_SIZE.SM},likeStatTextLiked:{color:N.COLORS.BRAND_PRIMARY,fontWeight:'600'},manageButton:{paddingHorizontal:L.SPACING.SM,paddingVertical:L.SPACING.XS},manageButtonDanger:{color:N.COLORS.ERROR,fontSize:x.FONT_SIZE.SM,fontWeight:'500'},manageButtonText:{color:N.COLORS.ACTION_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'500'},markdownHint:{color:N.COLORS.TEXT_CAPTION,fontSize:x.FONT_SIZE.XS},originalPost:{borderColor:N.COLORS.BORDER_SUBTLE,borderWidth:2},pinnedBadge:{backgroundColor:N.COLORS.BRAND_TINT,borderRadius:4,color:N.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.XS,fontWeight:'600',paddingHorizontal:L.SPACING.SM,paddingVertical:L.SPACING.XS},postAuthor:{alignItems:'center',flexDirection:'row',gap:L.SPACING.MD},postBodyFallback:{color:N.COLORS.TEXT_DARK,fontSize:x.FONT_SIZE.LG,lineHeight:24},postCard:{backgroundColor:N.COLORS.TEXT_INVERSE,borderColor:N.COLORS.BORDER,borderRadius:10,borderWidth:1,padding:L.SPACING.XL},postDate:{color:N.COLORS.TEXT_GHOST,fontSize:x.FONT_SIZE.SM},postFooter:{alignItems:'center',flexDirection:'row',gap:L.SPACING.LG,marginTop:L.SPACING.MD},postHeader:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginBottom:L.SPACING.LG},postHeaderRight:{alignItems:'flex-end'},postNumber:{color:N.COLORS.BORDER_DISABLED,fontSize:x.FONT_SIZE.XS,marginTop:L.SPACING.MICRO},postsContainer:{gap:L.SPACING.LG},replyActions:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginTop:L.SPACING.MD},replyButton:{paddingHorizontal:L.SPACING.SM,paddingVertical:L.SPACING.XS},replyButtonText:{color:N.COLORS.ACTION_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'500'},replyComposer:{backgroundColor:N.COLORS.BG_WASH,borderColor:N.COLORS.BORDER,borderRadius:10,borderWidth:1,marginTop:L.SPACING.XXXL,padding:L.SPACING.XL},replyIndicator:{color:N.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.SM,fontStyle:'italic',marginBottom:L.SPACING.MD},replyInput:Object.assign({backgroundColor:N.COLORS.TEXT_INVERSE,borderColor:N.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,fontSize:x.FONT_SIZE.LG,lineHeight:22,minHeight:120,padding:L.SPACING.MD,textAlignVertical:'top'},{outlineStyle:'none'}),replyingToBar:{alignItems:'center',borderBottomColor:N.COLORS.BORDER,borderBottomWidth:1,flexDirection:'row',justifyContent:'space-between',marginBottom:L.SPACING.MD,paddingBottom:L.SPACING.SM},replyingToText:{color:N.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.SM,fontStyle:'italic'},submitButton:{backgroundColor:N.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:L.SPACING.XXL,paddingVertical:L.SPACING.MD},submitButtonDisabled:{opacity:.5},submitButtonText:{color:N.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.LG,fontWeight:'600'},submitError:{color:N.COLORS.ERROR,fontSize:x.FONT_SIZE.SM,marginTop:L.SPACING.SM},topicHeader:{borderBottomColor:N.COLORS.BORDER,borderBottomWidth:1,marginBottom:L.SPACING.XXL,paddingBottom:L.SPACING.XL},topicStat:{color:N.COLORS.TEXT_SOFT,fontSize:x.FONT_SIZE.MD},topicStatDot:{color:N.COLORS.BORDER_SOFT,fontSize:x.FONT_SIZE.MD},topicStats:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:L.SPACING.SM},topicTitle:Object.assign({color:N.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XXXL,fontWeight:'bold',lineHeight:32,marginBottom:L.SPACING.MD},{fontSize:x.FONT_SIZE.DISPLAY_MD,lineHeight:40})})},734,[34,276,222,488,95,283,410,328,489,725,710,516,711,512,729,735,736,568,565,490,493,494,557,561,730,727,562,505,685,468,469,104]);
833__d(function(g,r,i,a,m,_e,d){"use strict";
833function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ConfirmDeletePostModal=function({visible:e,deletesEntireTopic:u,deleting:f,error:C,onConfirm:O,onCancel:y}){if(!e)return null;const T=u?'Delete this topic?':'Delete this post?',h=u?"This is the first post, so deleting it removes the entire topic and all of its replies. This cannot be undone.":'This removes your post from the discussion. This cannot be undone.';return(0,R.jsx)(o.default,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:y,children:(0,R.jsx)(n.default,{accessibilityLabel:"Dismiss delete confirmation",style:b.backdrop,onPress:f?void 0:y,children:(0,R.jsxs)(n.default,{style:b.card,children:[(0,R.jsx)(l.default,{style:b.title,children:T}),(0,R.jsx)(l.default,{style:b.body,children:h}),null!=C&&''!==C&&(0,R.jsx)(l.default,{style:b.error,accessibilityRole:"alert",children:C}),(0,R.jsxs)(c.default,{style:b.actions,children:[(0,R.jsx)(s.default,{style:b.secondaryButton,onPress:y,disabled:f,accessibilityRole:"button",accessibilityLabel:"Cancel",children:(0,R.jsx)(l.default,{style:b.secondaryButtonText,children:"Cancel"})}),(0,R.jsx)(s.default,{style:[b.dangerButton,f&&b.dangerButtonPending],onPress:O,disabled:f,accessibilityRole:"button",accessibilityLabel:u?'Delete topic':'Delete post',children:f?(0,R.jsx)(t.default,{size:"small",color:S.COLORS.TEXT_INVERSE}):(0,R.jsx)(l.default,{style:b.dangerButtonText,children:"Delete"})})]})]})})})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),s=e(r(d[5])),c=e(r(d[6])),u=r(d[7]),S=r(d[8]),f=r(d[9]),C=r(d[10]),O=r(d[11]),R=r(d[12]);const b=(0,u.createStyles)({actions:{flexDirection:'row',gap:C.SPACING.MD,justifyContent:'flex-end',marginTop:C.SPACING.XL},backdrop:{alignItems:'center',backgroundColor:S.COLORS.OVERLAY_DARK,flex:1,justifyContent:'center',padding:C.SPACING.LG},body:{color:S.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,lineHeight:22},card:Object.assign({backgroundColor:S.COLORS.BG_SURFACE,borderRadius:12,maxWidth:420,padding:C.SPACING.XL,width:'100%'},f.ELEVATION.MEDIUM),dangerButton:{alignItems:'center',backgroundColor:S.COLORS.ERROR,borderRadius:8,minWidth:92,paddingHorizontal:C.SPACING.XXL,paddingVertical:C.SPACING.MD},dangerButtonPending:{opacity:.6},dangerButtonText:{color:S.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},error:{color:S.COLORS.ERROR,fontSize:O.FONT_SIZE.SM,marginTop:C.SPACING.MD},secondaryButton:{backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:C.SPACING.XL,paddingVertical:C.SPACING.MD},secondaryButtonText:{color:S.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},title:{color:S.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.XL,fontWeight:'700',marginBottom:C.SPACING.MD}})},735,[34,410,544,369,222,488,276,489,490,503,493,494,104]);
834__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sanitizeDiscourseHtml=n,e.DiscourseHtmlBody=function({html:t,fallbackStyle:u}){return(0,c.jsx)(s.RichTextHtml,{html:n(t),variant:"discourse",fallbackText:(0,l.stripHtml)(t),fallbackStyle:u})},r(d[0]);var t=r(d[1]),l=r(d[2]),s=r(d[3]),c=r(d[4]);function n(l){return(0,t.sanitizeHtml)(l,'discourse')}},736,[34,737,740,741,104]);
835__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"sanitizeHtml",{enumerable:!0,get:function(){return t.sanitizeHtml}}),Object.defineProperty(e,"isSanitizedHtml",{enumerable:!0,get:function(){return t.isSanitizedHtml}}),Object.defineProperty(e,"injectSanitizedHtml",{enumerable:!0,get:function(){return t.injectSanitizedHtml}}),Object.defineProperty(e,"getWebDomElement",{enumerable:!0,get:function(){return t.getWebDomElement}});var t=r(d[0])},737,[738]);
836__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.isSanitizedHtml=s,_e.sanitizeHtml=function(t,e){if(!l.default.isSupported)return u(e);if(''===t)return u(e);const o=c[e];A=!0===o.allowDataImageOnImgSrc;try{const s=l.default.sanitize(t,Object.assign({RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,ALLOW_DATA_ATTR:!0===o.allowDataAttr,ALLOW_ARIA_ATTR:!0===o.allowAriaAttr},!0===o.allowHtmlAndSvgProfiles&&{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}},null!=o.allowedTags&&{ALLOWED_TAGS:[...o.allowedTags]},null!=o.allowedAttr&&{ALLOWED_ATTR:[...o.allowedAttr]},null!=o.additionalAllowedAttr&&{ADD_ATTR:[...o.additionalAllowedAttr]},null!=o.allowedUriRegexp&&{ALLOWED_URI_REGEXP:o.allowedUriRegexp}));return new n(s,e)}finally{A=!1}},_e.getWebDomElement=function(t){if('undefined'==typeof HTMLElement)return null;const e=t.current;if(e instanceof HTMLElement)return e;return null}
836,_e.injectSanitizedHtml=function(t,e){if(!s(e))throw new Error("injectSanitizedHtml: received a value not produced by sanitizeHtml(). This indicates a bypass attempt or incorrect usage.");t.innerHTML=e.toString()};var t,e=r(d[0]),l=(t=e)&&t.__esModule?t:{default:t};const o=new WeakSet;class n{#t;constructor(t,e){this.#t=t,this.profile=e,o.add(this)}toString(){return this.#t}}function s(t){return t instanceof n&&o.has(t)}function u(t){return new n('',t)}const c={'product-description':{allowedTags:['a','b','blockquote','br','code','em','h2','h3','h4','hr','i','li','ol','p','pre','strong','table','tbody','td','th','thead','tr','ul'],allowedAttr:['href','title'],allowedUriRegexp:/^(?:(?:https?|mailto|tel):|\/(?!\/)|#)/i},discourse:{allowedTags:['a','abbr','b','blockquote','br','code','dd','del','details','div','dl','dt','em','h1','h2','h3','h4','h5','h6','hr','i','img','ins','kbd','li','mark','ol','p','pre','q','s','small','span','strong','sub','summary','sup','table','tbody','td','th','thead','tr','u','ul'],allowedAttr:['alt','class','height','href','loading','name','rel','src','target','title','width'],allowedUriRegexp:/^(?:(?:https?|mailto|tel):|\/(?!\/)|#)/i,allowAriaAttr:!0,allowDataImageOnImgSrc:!0},'shopify-policy':{allowedTags:['a','b','blockquote','br','em','h1','h2','h3','h4','i','li','ol','p','span','strong','table','tbody','td','th','thead','tr','ul'],allowedAttr:['href','title'],allowedUriRegexp:/^(?:(?:https?|mailto|tel):|\/(?!\/)|#)/i},'site-frame':{additionalAllowedAttr:['alt','class','d','focusable','height','hidden','href','id','preserveAspectRatio','rel','role','src','style','target','viewBox','width'],allowAriaAttr:!0,allowDataAttr:!0,allowHtmlAndSvgProfiles:!0}},h=/^data:image\/(png|gif|jpeg|webp);base64,/i;let A=!1;'undefined'!=typeof window&&l.default.isSupported&&l.default.addHook('afterSanitizeAttributes',t=>{if(!A)return;if('IMG'!==t.tagName)return;const e=t.getAttribute('src');null!=e&&e.startsWith('data:')&&!h.test(e)&&t.removeAttribute('src')})},738,[739]);
837__d(function(g,_r,_i,_a,m,_e,d){"use strict";
838/*! @license DOMPurify 3.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.5/LICENSE */
839function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function t(e){if(Array.isArray(e))return e}function n(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(c=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return l}}function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(e,r){return t(e)||n(e,r)||i(e,r)||o()}function i(t,n){if(t){if("string"==typeof t)return e(t,n);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?e(t,n):void 0}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return Ee}});const a=Object.entries,l=Object.setPrototypeOf,c=Object.isFrozen,s=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor;let f=Object.freeze,p=Object.seal,h=Object.create,y='undefined'!=typeof Reflect&&Reflect,T=y.apply,b=y.construct;f||(f=function(e){return e}),p||(p=function(e){return e}),T||(T=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),b||(b=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const A=B(Array.prototype.forEach),S=B(Array.prototype.lastIndexOf),E=B(Array.prototype.pop),_=B(Array.prototype.push),N=B(Array.prototype.splice),O=Array.isArray,D=B(String.prototype.toLowerCase),R=B(String.prototype.toString),w=B(String.prototype.match),I=B(String.prototype.replace),v=B(String.prototype.indexOf),C=B(String.prototype.trim),x=B(Number.prototype.toString),k=B(Boolean.prototype.toString),L='undefined'==typeof BigInt?null:B(BigInt.prototype.toString),M='undefined'==typeof Symbol?null:B(Symbol.prototype.toString),F=B(Object.prototype.hasOwnProperty),z=B(Object.prototype.toString),P=B(RegExp.prototype.test),U=(H=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b(H,t)});var H;function B(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return T(e,t,o)}}function j(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:D;if(l&&l(e,null),!O(t))return e;let o=t.length;for(;o--;){let r=t[o];if('string'==typeof r){const e=n(r);e!==r&&(c(t)||(t[o]=e),r=e)}e[r]=!0}return e}function G(e){for(let t=0;t<e.length;t++){F(e,t)||(e[t]=null)}return e}function W(e){const t=h(null);for(const o of a(e)){var n=r(o,2);const i=n[0],a=n[1];F(e,i)&&(O(a)?t[i]=G(a):a&&'object'==typeof a&&a.constructor===Object?t[i]=W(a):t[i]=a)}return t}function Y(e){switch(typeof e){case'string':return e;case'number':return x(e);case'boolean':return k(e);case'bigint':return L?L(e):'0';case'symbol':return M?M(e):'Symbol()';case'undefined':default:return z(e);case'function':case'object':{if(null===e)return z(e);const t=e,n=X(t,'toString');
839if('function'==typeof n){const e=n(t);return'string'==typeof e?e:z(e)}return z(e)}}}function X(e,t){for(;null!==e;){const n=u(e,t);if(n){if(n.get)return B(n.get);if('function'==typeof n.value)return B(n.value)}e=s(e)}return function(){return null}}function q(e){try{return P(e,''),!0}catch(e){return!1}}const $=f(['a','abbr','acronym','address','area','article','aside','audio','b','bdi','bdo','big','blink','blockquote','body','br','button','canvas','caption','center','cite','code','col','colgroup','content','data','datalist','dd','decorator','del','details','dfn','dialog','dir','div','dl','dt','element','em','fieldset','figcaption','figure','font','footer','form','h1','h2','h3','h4','h5','h6','head','header','hgroup','hr','html','i','img','input','ins','kbd','label','legend','li','main','map','mark','marquee','menu','menuitem','meter','nav','nobr','ol','optgroup','option','output','p','picture','pre','progress','q','rp','rt','ruby','s','samp','search','section','select','shadow','slot','small','source','spacer','span','strike','strong','style','sub','summary','sup','table','tbody','td','template','textarea','tfoot','th','thead','time','tr','track','tt','u','ul','var','video','wbr']),K=f(['svg','a','altglyph','altglyphdef','altglyphitem','animatecolor','animatemotion','animatetransform','circle','clippath','defs','desc','ellipse','enterkeyhint','exportparts','filter','font','g','glyph','glyphref','hkern','image','inputmode','line','lineargradient','marker','mask','metadata','mpath','part','path','pattern','polygon','polyline','radialgradient','rect','stop','style','switch','symbol','text','textpath','title','tref','tspan','view','vkern']),V=f(['feBlend','feColorMatrix','feComponentTransfer','feComposite','feConvolveMatrix','feDiffuseLighting','feDisplacementMap','feDistantLight','feDropShadow','feFlood','feFuncA','feFuncB','feFuncG','feFuncR','feGaussianBlur','feImage','feMerge','feMergeNode','feMorphology','feOffset','fePointLight','feSpecularLighting','feSpotLight','feTile','feTurbulence']),Z=f(['animate','color-profile','cursor','discard','font-face','font-face-format','font-face-name','font-face-src','font-face-uri','foreignobject','hatch','hatchpath','mesh','meshgradient','meshpatch','meshrow','missing-glyph','script','set','solidcolor','unknown','use']),J=f(['math','menclose','merror','mfenced','mfrac','mglyph','mi','mlabeledtr','mmultiscripts','mn','mo','mover','mpadded','mphantom','mroot','mrow','ms','mspace','msqrt','mstyle','msub','msup','msubsup','mtable','mtd','mtext','mtr','munder','munderover','mprescripts']),Q=f(['maction','maligngroup','malignmark','mlongdiv','mscarries','mscarry','msgroup','mstack','msline','msrow','semantics','annotation','annotation-xml','mprescripts','none']),ee=f(['#text']),te=f(['accept','action','align','alt','autocapitalize','autocomplete','auto
839pictureinpicture','autoplay','background','bgcolor','border','capture','cellpadding','cellspacing','checked','cite','class','clear','color','cols','colspan','command','commandfor','controls','controlslist','coords','crossorigin','datetime','decoding','default','dir','disabled','disablepictureinpicture','disableremoteplayback','download','draggable','enctype','enterkeyhint','exportparts','face','for','headers','height','hidden','high','href','hreflang','id','inert','inputmode','integrity','ismap','kind','label','lang','list','loading','loop','low','max','maxlength','media','method','min','minlength','multiple','muted','name','nonce','noshade','novalidate','nowrap','open','optimum','part','pattern','placeholder','playsinline','popover','popovertarget','popovertargetaction','poster','preload','pubdate','radiogroup','readonly','rel','required','rev','reversed','role','rows','rowspan','spellcheck','scope','selected','shape','size','sizes','slot','span','srclang','start','src','srcset','step','style','summary','tabindex','title','translate','type','usemap','valign','value','width','wrap','xmlns']),ne=f(['accent-height','accumulate','additive','alignment-baseline','amplitude','ascent','attributename','attributetype','azimuth','basefrequency','baseline-shift','begin','bias','by','class','clip','clippathunits','clip-path','clip-rule','color','color-interpolation','color-interpolation-filters','color-profile','color-rendering','cx','cy','d','dx','dy','diffuseconstant','direction','display','divisor','dur','edgemode','elevation','end','exponent','fill','fill-opacity','fill-rule','filter','filterunits','flood-color','flood-opacity','font-family','font-size','font-size-adjust','font-stretch','font-style','font-variant','font-weight','fx','fy','g1','g2','glyph-name','glyphref','gradientunits','gradienttransform','height','href','id','image-rendering','in','in2','intercept','k','k1','k2','k3','k4','kerning','keypoints','keysplines','keytimes','lang','lengthadjust','letter-spacing','kernelmatrix','kernelunitlength','lighting-color','local','marker-end','marker-mid','marker-start','markerheight','markerunits','markerwidth','maskcontentunits','maskunits','max','mask','mask-type','media','method','mode','min','name','numoctaves','offset','operator','opacity','order','orient','orientation','origin','overflow','paint-order','path','pathlength','patterncontentunits','patterntransform','patternunits','points','preservealpha','preserveaspectratio','primitiveunits','r','rx','ry','radius','refx','refy','repeatcount','repeatdur','restart','result','rotate','scale','seed','shape-rendering','slope','specularconstant','specularexponent','spreadmethod','startoffset','stddeviation','stitchtiles','stop-color','stop-opacity','stroke-dasharray','stroke-dashoffset','stroke-linecap','stroke-linejoin','stroke-miterlimit','stroke-opacity','stroke','stroke-width','style','surfacescale','systemlanguage','tabindex','tablevalues','targetx','targety','transform','transform-origin','text-anchor','text-decoration','text-rendering','textlength','type','u1','u2','unicode','values','viewbox','visibility','version','vert-adv-y','vert-origin-x','vert-origin-y','width','word-spacing','wrap','writing-mode','xchannelselector','ychannelselector','x','x1','x2','xmlns','y','y1','y2','z','zoomandpan']),oe=f(['accent','accentunder','align','bevelled','close','columnalign','columnlines','columnspacing','columnspan','denomalign','depth','dir','display','displaystyle','encoding','fence','frame','height','href','id','largeop','length','linethickness','lquote','lspace','mathbackground','mathcolor','mathsize','mathvariant','maxsize','minsize','movablelimits','notation','numalign','open','rowalign','rowlines','rowspacing','rowspan','rspace','rquote','scriptlevel','scriptminsize','scriptsizemultiplier','selection','separator','separators','stretchy','subscriptshift','supscriptshift','symmetric','voffset','width','xmlns']),re=f(['xlink:href','xml:id','xlink:title','xml:space','xmlns:xlink']),ie=p(/{{[\w\W]*|^[\w\W]*}}/g),ae=p(/<%[\w\W]*|^[\w\W]*%>/g),le=p(/\${[\w\W]*/g),ce=p(/^data-[\-\w.\u00B7-\uFFFF]+$/),se=p(/^aria-[\-\w]+$/),ue=p(/^(?:(?:(?
839:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),me=p(/^(?:\w+script|data):/i),fe=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pe=p(/^html$/i),de=p(/^[a-z][.\w]*(-[.\w]+)+$/i),he=1,ge=3,ye=7,Te=8,be=9,Ae=function(){return'undefined'==typeof window?null:window},Se=function(e,t){if('object'!=typeof e||'function'!=typeof e.createPolicy)return null;let n=null;const o='data-tt-policy-suffix';t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r='dompurify'+(n?'#'+n:'');try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn('TrustedTypes policy '+r+' could not be created.'),null}};var Ee=(function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae();const n=t=>e(t);if(n.version='3.4.5',n.removed=[],!t||!t.document||t.document.nodeType!==be||!t.Element)return n.isSupported=!1,n;let o=t.document;const r=o,i=r.currentScript,l=t.DocumentFragment,c=t.HTMLTemplateElement,s=t.Node,u=t.Element,p=t.NodeFilter,y=t.NamedNodeMap,T=void 0===y?t.NamedNodeMap||t.MozNamedAttrMap:y,b=t.HTMLFormElement,x=t.DOMParser,k=t.trustedTypes,L=u.prototype,M=X(L,'cloneNode'),z=X(L,'remove'),H=X(L,'nextSibling'),B=X(L,'childNodes'),G=X(L,'parentNode'),Ee=s&&s.prototype?X(s.prototype,'nodeType'):null;if('function'==typeof c){const e=o.createElement('template');e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Ne,Oe='';const De=o,Re=De.implementation,we=De.createNodeIterator,Ie=De.createDocumentFragment,ve=De.getElementsByTagName,Ce=r.importNode;let xe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported='function'==typeof a&&'function'==typeof G&&Re&&void 0!==Re.createHTMLDocument;const ke=ie,Le=ae,Me=le,Fe=ce,ze=se,Pe=me,Ue=fe,He=de;let Be=ue,je=null;const Ge=j({},[...$,...K,...V,...J,...ee]);let We=null;const Ye=j({},[...te,...ne,...oe,...re]);let Xe=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),qe=null,$e=null;const Ke=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,Ze=!0,Je=!1,Qe=!0,et=!1,tt=!0,nt=!1,ot=!1,rt=!1,it=!1,at=!1,lt=!1,ct=!0,st=!1;const ut='user-content-';let mt=!0,ft=!1,pt={},dt=null;const ht=j({},['annotation-xml','audio','colgroup','desc','foreignobject','head','iframe','math','mi','mn','mo','ms','mtext','noembed','noframes','noscript','plaintext','script','style','svg','template','thead','title','video','xmp']);let gt=null;const yt=j({},['audio','video','img','source','image','track']);let Tt=null;const bt=j({},['alt','class','for','id','label','name','pattern','placeholder','role','summary','title','value','style','xmlns']),At='http://www.w3.org/1998/Math/MathML',St='http://www.w3.org/2000/svg',Et='http://www.w3.org/1999/xhtml';let _t=Et,Nt=!1,Ot=null;const Dt=j({},[At,St,Et],R);let Rt=j({},['mi','mo','mn','ms','mtext']),wt=j({},['annotation-xml']);const It=j({},['title','style','font','a','script']);let vt=null;const Ct=['application/xhtml+xml','text/html'];let xt=null,kt=null;const Lt=o.createElement('form'),Mt=function(e){return e instanceof RegExp||e instanceof Function},Ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(kt&&kt===e)return;e&&'object'==typeof e||(e={}),e=W(e),vt=-1===Ct.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xt='application/xhtml+xml'===vt?R:D,je=F(e,'ALLOWED_TAGS')&&O(e.ALLOWED_TAGS)?j({},e.ALLOWED_TAGS,xt):Ge,We=F(e,'ALLOWED_ATTR')&&O(e.ALLOWED_ATTR)?j({},e.ALLOWED_ATTR,xt):Ye,Ot=F(e,'ALLOWED_NAMESPACES')&&O(e.ALLOWED_NAMESPACES)?j({},e.ALLOWED_NAMESPACES,R):Dt,Tt=F(e,'ADD_URI_SAFE_ATTR')&&O(e.ADD_URI_SAFE_ATTR)?j(W(bt),e.ADD_URI_SAFE_ATTR,xt):bt,gt=F(e,'ADD_DATA_URI_TAGS')&&O(e.ADD_DATA_URI_TAGS)?j(W(yt),e.ADD_DATA_URI_TAGS,xt):yt,dt=F(e,'FORBID_CONTENTS')&&O(e.FORBID_CONTENTS)?j({},e.FORBID_CONTENTS,xt):ht,qe=F(e,'FORBID_TAGS')&&O(e.FORBID_TAGS)?j({},e.FORBID_TAGS,xt):W({}),$e=F(e,'FORBID_ATTR')&&O(e.FORBID_ATTR)?j({},e.FORBID_ATTR,xt):W({}),pt=!!F(e,'USE_PROFILES')&&(e.USE_PROFILES&&'object'==typeof e.USE_PROFILES?W(e.USE_PROFILES):e.USE_PROFILES),Ve=!1!==e.ALLOW_ARIA_ATTR,Ze=!1!==e.ALLOW_DATA_ATTR,Je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Qe
vendor: 9,068 bytes, line 839
839=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,et=e.SAFE_FOR_TEMPLATES||!1,tt=!1!==e.SAFE_FOR_XML,nt=e.WHOLE_DOCUMENT||!1,it=e.RETURN_DOM||!1,at=e.RETURN_DOM_FRAGMENT||!1,lt=e.RETURN_TRUSTED_TYPE||!1,rt=e.FORCE_BODY||!1,ct=!1!==e.SANITIZE_DOM,st=e.SANITIZE_NAMED_PROPS||!1,mt=!1!==e.KEEP_CONTENT,ft=e.IN_PLACE||!1,Be=q(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ue,_t='string'==typeof e.NAMESPACE?e.NAMESPACE:Et,Rt=F(e,'MATHML_TEXT_INTEGRATION_POINTS')&&e.MATHML_TEXT_INTEGRATION_POINTS&&'object'==typeof e.MATHML_TEXT_INTEGRATION_POINTS?W(e.MATHML_TEXT_INTEGRATION_POINTS):j({},['mi','mo','mn','ms','mtext']),wt=F(e,'HTML_INTEGRATION_POINTS')&&e.HTML_INTEGRATION_POINTS&&'object'==typeof e.HTML_INTEGRATION_POINTS?W(e.HTML_INTEGRATION_POINTS):j({},['annotation-xml']);const t=F(e,'CUSTOM_ELEMENT_HANDLING')&&e.CUSTOM_ELEMENT_HANDLING&&'object'==typeof e.CUSTOM_ELEMENT_HANDLING?W(e.CUSTOM_ELEMENT_HANDLING):h(null);if(Xe=h(null),F(t,'tagNameCheck')&&Mt(t.tagNameCheck)&&(Xe.tagNameCheck=t.tagNameCheck),F(t,'attributeNameCheck')&&Mt(t.attributeNameCheck)&&(Xe.attributeNameCheck=t.attributeNameCheck),F(t,'allowCustomizedBuiltInElements')&&'boolean'==typeof t.allowCustomizedBuiltInElements&&(Xe.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),et&&(Ze=!1),at&&(it=!0),pt&&(je=j({},ee),We=h(null),!0===pt.html&&(j(je,$),j(We,te)),!0===pt.svg&&(j(je,K),j(We,ne),j(We,re)),!0===pt.svgFilters&&(j(je,V),j(We,ne),j(We,re)),!0===pt.mathMl&&(j(je,J),j(We,oe),j(We,re))),Ke.tagCheck=null,Ke.attributeCheck=null,F(e,'ADD_TAGS')&&('function'==typeof e.ADD_TAGS?Ke.tagCheck=e.ADD_TAGS:O(e.ADD_TAGS)&&(je===Ge&&(je=W(je)),j(je,e.ADD_TAGS,xt))),F(e,'ADD_ATTR')&&('function'==typeof e.ADD_ATTR?Ke.attributeCheck=e.ADD_ATTR:O(e.ADD_ATTR)&&(We===Ye&&(We=W(We)),j(We,e.ADD_ATTR,xt))),F(e,'ADD_URI_SAFE_ATTR')&&O(e.ADD_URI_SAFE_ATTR)&&j(Tt,e.ADD_URI_SAFE_ATTR,xt),F(e,'FORBID_CONTENTS')&&O(e.FORBID_CONTENTS)&&(dt===ht&&(dt=W(dt)),j(dt,e.FORBID_CONTENTS,xt)),F(e,'ADD_FORBID_CONTENTS')&&O(e.ADD_FORBID_CONTENTS)&&(dt===ht&&(dt=W(dt)),j(dt,e.ADD_FORBID_CONTENTS,xt)),mt&&(je['#text']=!0),nt&&j(je,['html','head','body']),je.table&&(j(je,['tbody']),delete qe.tbody),e.TRUSTED_TYPES_POLICY){if('function'!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if('function'!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw U('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Ne=e.TRUSTED_TYPES_POLICY,Oe=Ne.createHTML('')}else void 0===Ne&&(Ne=Se(k,i)),null!==Ne&&'string'==typeof Oe&&(Oe=Ne.createHTML(''));f&&f(e),kt=e},zt=j({},[...K,...V,...Z]),Pt=j({},[...J,...Q]),Ut=function(e){let t=G(e);t&&t.tagName||(t={namespaceURI:_t,tagName:'template'});const n=D(e.tagName),o=D(t.tagName);return!!Ot[e.namespaceURI]&&(e.namespaceURI===St?t.namespaceURI===Et?'svg'===n:t.namespaceURI===At?'svg'===n&&('annotation-xml'===o||Rt[o]):Boolean(zt[n]):e.namespaceURI===At?t.namespaceURI===Et?'math'===n:t.namespaceURI===St?'math'===n&&wt[o]:Boolean(Pt[n]):e.namespaceURI===Et?!(t.namespaceURI===St&&!wt[o])&&(!(t.namespaceURI===At&&!Rt[o])&&(!Pt[n]&&(It[n]||!zt[n]))):!('application/xhtml+xml'!==vt||!Ot[e.namespaceURI]))},Ht=function(e){_(n.removed,{element:e});try{G(e).removeChild(e)}catch(t){z(e)}},Bt=function(e,t){try{_(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),'is'===e)if(it||at)try{Ht(t)}catch(e){}else try{t.setAttribute(e,'')}catch(e){}},jt=function(e){let t=null,n=null;if(rt)e='<remove></remove>'+e;else{const t=w(e,/^[\r\n\t ]+/);n=t&&t[0]}'application/xhtml+xml'===vt&&_t===Et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+'</body></html>');const r=Ne?Ne.createHTML(e):e;if(_t===Et)try{t=(new x).parseFromString(r,vt)}catch(e){}if(!t||!t.documentElement){t=Re.createDocument(_t,'template',null);try{t.documentElement.innerHTML=Nt?Oe:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),_t===Et?ve.call(t,nt?'html':'body')[0]:nt?t.documentElement:i},Gt=function(e){return we.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Wt=function(e){e.normalize();const t=we.call(e.ownerDocument||e,e,p.SHOW_TEXT|p.SHOW_COMMENT|p.SHOW_CDATA_SECTION|p.SHOW_PROCESSING_INSTRUCTION,null);let n=t.nextNode();for(;n;){let e=n.data;A([ke,Le,Me],t=>{e=I(e,t,' ')}),n.data=e,n=t.nextNode()}},Yt=function(e){return e instanceof b&&('string'!=typeof e.nodeName||'string'!=typeof e.textContent||'function'!=typeof e.removeChild||!(e.attributes instanceof T)||'function'!=typeof e.removeAttribute||'function'!=typeof e.setAttribute||'string'!=typeof e.namespaceURI||'function'!=typeof e.insertBefore||'function'!=typeof e.hasChildNodes)},Xt=function(e){if(!Ee||'object'!=typeof e||null===e)return!1;try{return'number'==typeof Ee(e)}catch(e){return!1}};function qt(e,t,o){A(e,e=>{e.call(n,t,o,kt)})}const $t=function(e){let t=null;if(qt(xe.beforeSanitizeElements,e,null),Yt(e))return Ht(e),!0;const o=xt(e.nodeName);if(qt(xe.uponSanitizeElement,e,{tagName:o,allowedTags:je}),tt&&e.hasChildNodes()&&!Xt(e.firstElementChild)&&P(/<[/\w!]/g,e.innerHTML)&&P(/<[/\w!]/g,e.textContent))return Ht(e),!0;if(tt&&e.namespaceURI===Et&&'style'===o&&Xt(e.firstElementChild))return Ht(e),!0;if(e.nodeType===ye)return Ht(e),!0;if(tt&&e.nodeType===Te&&P(/<[/\w]/g,e.data))return Ht(e),!0;if(qe[o]||!(Ke.tagCheck instanceof Function&&Ke.tagCheck(o))&&!je[o]){if(!qe[o]&&Zt(o)){if(Xe.tagNameCheck instanceof RegExp&&P(Xe.tagNameCheck,o))return!1;if(Xe.tagNameCheck instanceof Function&&Xe.tagNameCheck(o))return!1}if(mt&&!dt[o]){const t=G(e)||e.parentNode,n=B(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=M(n[o],!0);t.insertBefore(r,H(e))}}}return Ht(e),!0}return e instanceof u&&!Ut(e)?(Ht(e),!0):'noscript'!==o&&'noembed'!==o&&'noframes'!==o||!P(/<\/no(script|embed|frames)/i,e.innerHTML)?(et&&e.nodeType===ge&&(t=e.textContent,A([ke,Le,Me],e=>{t=I(t,e,' ')}),e.textContent!==t&&(_(n.removed,{element:e.cloneNode()}),e.textContent=t)),qt(xe.afterSanitizeElements,e,null),!1):(Ht(e),!0)},Kt=function(e,t,n){if($e[t])return!1;if(ct&&('id'===t||'name'===t)&&(n in o||n in Lt))return!1;const r=We[t]||Ke.attributeCheck instanceof Function&&Ke.attributeCheck(t,e);if(Ze&&!$e[t]&&P(Fe,t));else if(Ve&&P(ze,t));else if(!r||$e[t]){if(!(Zt(e)&&(Xe.tagNameCheck instanceof RegExp&&P(Xe.tagNameCheck,e)||Xe.tagNameCheck instanceof Function&&Xe.tagNameCheck(e))&&(Xe.attributeNameCheck instanceof RegExp&&P(Xe.attributeNameCheck,t)||Xe.attributeNameCheck instanceof Function&&Xe.attributeNameCheck(t,e))||'is'===t&&Xe.allowCustomizedBuiltInElements&&(Xe.tagNameCheck instanceof RegExp&&P(Xe.tagNameCheck,n)||Xe.tagNameCheck instanceof Function&&Xe.tagNameCheck(n))))return!1}else if(Tt[t]);else if(P(Be,I(n,Ue,'')));else if('src'!==t&&'xlink:href'!==t&&'href'!==t||'script'===e||0!==v(n,'data:')||!gt[e]){if(Je&&!P(Pe,I(n,Ue,'')));else if(n)return!1}else;return!0},Vt=j({},['annotation-xml','color-profile','font-face','font-face-format','font-face-name','font-face-src','font-face-uri','missing-glyph']),Zt=function(e){return!Vt[D(e)]&&P(He,e)},Jt=function(e){qt(xe.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||Yt(e))return;const o={attrName:'',attrValue:'',keepAttr:!0,allowedAttributes:We,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],a=i.name,l=i.namespaceURI,c=i.value,s=xt(a),u=c;let f='value'===a?u:C(u);if(o.attrName=s,o.attrValue=f,o.keepAttr=!0,o.forceKeepAttr=void 0,qt(xe.uponSanitizeAttribute,e,o),f=o.attrValue,!st||'id'!==s&&'name'!==s||0===v(f,ut)||(Bt(a,e),f=ut+f),tt&&P(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Bt(a,e);continue}if('attributename'===s&&w(f,'href')){Bt(a,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){Bt(a,e);continue}if(!Qe&&P(/\/>/i,f)){Bt(a,e);continue}et&&A([ke,Le,Me],e=>{f=I(f,e,' ')});const p=xt(e.nodeName);if(Kt(p,s,f)){if(Ne&&'object'==typeof k&&'function'==typeof k.getAttributeType)if(l);else switch(k.getAttributeType(p,s)){case'TrustedHTML':f=Ne.createHTML(f);break;case'TrustedScriptURL':f=Ne.createScriptURL(f)}if(f!==u)try{l?e.setAttributeNS(l,a,f):e.setAttribute(a,f),Yt(e)?Ht(e):E(n.removed)}catch(t){Bt(a,e)}}else Bt(a,e)}qt(xe.afterSanitizeAttributes,e,null)},Qt=function(e){let t=null;const n=Gt(e);for(qt(xe.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)qt(xe.uponSanitizeShadowNode,t,null),$t(t),Jt(t),t.content instanceof l&&Qt(t.content);qt(xe.afterSanitizeShadowDOM,e,null)},en=function(e){if(e.nodeType===he&&e.shadowRoot instanceof l){const t=e.shadowRoot;en(t),Qt(t)}const t=e.childNodes;if(!t)return;const n=[];A(t,e=>{_(n,e)});for(const e of n)en(e)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,i=null,a=null,c=null;if(Nt=!e,Nt&&(e='\x3c!--\x3e'),'string'!=typeof e&&!Xt(e)&&'string'!=typeof(e=Y(e)))throw U('dirty is not a string, aborting');
839if(!n.isSupported)return e;if(ot||Ft(t),n.removed=[],'string'==typeof e&&(ft=!1),ft){const t=e.nodeName;if('string'==typeof t){const e=xt(t);if(!je[e]||qe[e])throw U('root node is forbidden and cannot be sanitized in-place')}en(e)}else if(Xt(e))o=jt('\x3c!----\x3e'),i=o.ownerDocument.importNode(e,!0),i.nodeType===he&&'BODY'===i.nodeName||'HTML'===i.nodeName?o=i:o.appendChild(i),en(i);else{if(!it&&!et&&!nt&&-1===e.indexOf('<'))return Ne&&lt?Ne.createHTML(e):e;if(o=jt(e),!o)return it?null:lt?Oe:''}o&&rt&&Ht(o.firstChild);const s=Gt(ft?e:o);for(;a=s.nextNode();)$t(a),Jt(a),a.content instanceof l&&Qt(a.content);if(ft)return et&&Wt(e),e;if(it){if(et&&Wt(o),at)for(c=Ie.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(We.shadowroot||We.shadowrootmode)&&(c=Ce.call(r,c,!0)),c}let u=nt?o.outerHTML:o.innerHTML;return nt&&je['!doctype']&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&P(pe,o.ownerDocument.doctype.name)&&(u='<!DOCTYPE '+o.ownerDocument.doctype.name+'>\n'+u),et&&A([ke,Le,Me],e=>{u=I(u,e,' ')}),Ne&&lt?Ne.createHTML(u):u},n.setConfig=function(){Ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ot=!0},n.clearConfig=function(){kt=null,ot=!1},n.isValidAttribute=function(e,t,n){kt||Ft({});const o=xt(e),r=xt(t);return Kt(o,r,n)},n.addHook=function(e,t){'function'==typeof t&&_(xe[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=S(xe[e],t);return-1===n?void 0:N(xe[e],n,1)[0]}return E(xe[e])},n.removeHooks=function(e){xe[e]=[]},n.removeAllHooks=function(){xe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n})()},739,[]);
840__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.stripHtml=function(t){return t.replace(/<[^>]+>/g,' ').replace(/\s+/g,' ').trim()}},740,[]);
841__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.RichTextHtml=function({html:e,variant:s,fallbackText:u,fallbackStyle:h}){if(e.profile!==s)throw new Error(`RichTextHtml received ${e.profile} HTML for ${s} rendering.`);const v=(0,t.useRef)(null);return(0,t.useEffect)(()=>(_(s),()=>{T(s)}),[s]),(0,t.useEffect)(()=>{const t=(0,l.getWebDomElement)(v);null!=t&&(t.classList.remove(...f),t.classList.add(c.RICH_TEXT_CLASS_BY_VARIANT[s]),''!==e.toString().trim()||''===u?(0,l.injectSanitizedHtml)(t,e):t.textContent=u)},[u,e,s]),(0,o.jsx)(n.default,{ref:v})};var t=r(d[0]);r(d[1]);e(r(d[2]));var n=e(r(d[3])),l=r(d[4]),c=r(d[5]),o=r(d[6]);const s=new Map,u=new Map,f=Object.values(c.RICH_TEXT_CLASS_BY_VARIANT);function _(e){const t=(u.get(e)??0)+1;if(u.set(e,t),1!==t)return;const n=document.createElement('style');n.textContent=(0,c.buildRichTextCss)(e),document.head.appendChild(n),s.set(e,n)}function T(e){const t=Math.max(0,(u.get(e)??0)-1);if(t>0)return void u.set(e,t);u.delete(e);const n=s.get(e);null!=n&&(document.head.removeChild(n),s.delete(e))}},741,[34,95,222,276,737,742,104]);
842__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PRODUCT_DESCRIPTION_CLASS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"DISCOURSE_RICH_TEXT_CLASS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"SHOPIFY_POLICY_CLASS",{enumerable:!0,get:function(){return $}}),Object.defineProperty(e,"RICH_TEXT_CLASS_BY_VARIANT",{enumerable:!0,get:function(){return O}}),e.buildProductDescriptionCss=c,e.buildDiscourseRichTextCss=p,e.buildShopifyPolicyCss=R,e.buildRichTextCss=function(n){return s[n]()};var n=r(d[0]),o=r(d[1]);const t='product-description-html',l='discourse-rich-text-html',$='shopify-policy-html',O={'product-description':t,discourse:l,'shopify-policy':$};function c(){const l=`.${t}`;return`\n${l} {\n  color: ${n.COLORS.TEXT_DIM};\n  font-family: ${o.FONT_FAMILY.WEB_SANS};\n  font-size: ${o.FONT_SIZE.LG}px;\n  line-height: 1.55;\n  overflow-wrap: break-word;\n  word-wrap: break-word;\n}\n${l} p { margin: 0 0 1em; }\n${l} p:last-child { margin-bottom: 0; }\n${l} strong,\n${l}
842 b { color: ${n.COLORS.TEXT_DARK}; font-weight: 700; }\n${l} em,\n${l} i { font-style: italic; }\n${l} a { color: ${n.COLORS.BRAND_PRIMARY}; text-decoration: none; }\n${l} a:hover { text-decoration: underline; }\n${l} ul,\n${l} ol { margin: 0 0 1em; padding-left: 1.5em; }\n${l} li { margin: 0.35em 0; }\n${l} h2 { color: ${n.COLORS.TEXT_HEADING}; font-size: 1.35em; margin: 1em 0 0.5em; }\n${l} h3 { color: ${n.COLORS.TEXT_HEADING}; font-size: 1.2em; margin: 1em 0 0.5em; }\n${l} h4 { color: ${n.COLORS.TEXT_HEADING}; font-size: 1.1em; margin: 1em 0 0.5em; }\n${l} blockquote {\n  background: ${n.COLORS.BG_FAINT};\n  border-left: 4px solid ${n.COLORS.BORDER};\n  border-radius: 4px;\n  color: ${n.COLORS.TEXT_SECONDARY};\n  margin: 0 0 1em;\n  padding: 8px 16px;\n}\n${l} table {\n  border-collapse: collapse;\n  margin: 0 0 1em;\n  width: 100%;\n}\n${l} th,\n${l} td {\n  border: 1px solid ${n.COLORS.BORDER_SUBTLE};\n  font-size: ${o.FONT_SIZE.SM}px;\n  padding: 8px 12px;\n  text-align: left;\n}\n${l} th {\n  background: ${n.COLORS.BG_NEAR_WHITE};\n  color: ${n.COLORS.TEXT_DARK};\n  font-weight: 600;\n}\n`}function p(t){const l=`.${t}`;return`\n${l} {\n  font-family: ${o.FONT_FAMILY.WEB_SANS};\n  font-size: 15px;\n  line-height: 1.6;\n  color: ${n.COLORS.TEXT_DARK};\n  word-wrap: break-word;\n  overflow-wrap: break-word;\n}\n${l} h1 { font-size: 1.8em; font-weight: 700; margin: 1em 0 0.5em; color: ${n.COLORS.TEXT_HEADING}; }\n${l} h2 { font-size: 1.5em; font-weight: 700; margin: 1em 0 0.5em; color: ${n.COLORS.TEXT_HEADING}; }\n${l} h3 { font-size: 1.25em; font-weight: 600; margin: 1em 0 0.5em; color: ${n.COLORS.TEXT_HEADING}; }\n${l} h4 { font-size: 1.1em; font-weight: 600; margin: 1em 0 0.5em; color: ${n.COLORS.TEXT_HEADING}; }\n${l} p { margin: 0.5em 0; }\n${l} a { color: ${n.COLORS.BRAND_PRIMARY}; text-decoration: none; }\n${l} a:hover { text-decoration: underline; }\n${l} img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }\n${l} .lightbox-wrapper { display: block; }\n${l} .lightbox-wrapper .meta { display: none; }\n${l} ul, ${l} ol { padding-left: 1.5em; margin: 0.5em 0; }\n${l} li { margin: 0.25em 0; }\n${l} blockquote {\n  margin: 0.5em 0; padding: 8px 16px;\n  border-left: 4px solid ${n.COLORS.BORDER}; color: ${n.COLORS.TEXT_SECONDARY};\n  background: ${n.COLORS.BG_FAINT}; border-radius: 4px;\n}\n${l} pre {\n  background: ${n.COLORS.BG_NEUTRAL}; padding: 12px 16px;\n  border-radius: 6px; overflow-x: auto;\n  font-size: 13px; line-height: 1.5;\n}\n${l} code { background: ${n.COLORS.BG_CHIP}; padding: 2px 5px; border-radius: 3px; font-size: 0.9em; }\n${l} pre code { background: none; padding: 0; }\n${l} hr { border: none; border-top: 1px solid ${n.COLORS.BORDER}; margin: 1.5em 0; }\n${l} table { border-collapse: collapse; width: 100%; margin: 0.5em 0; }\n${l} th, ${l} td { border: 1px solid ${n.COLORS.BORDER_SUBTLE}; padding: 8px 12px; text-align: left; }\n${l} th { background: ${n.COLORS.BG_NEAR_WHITE}; font-weight: 600; }\n${l} .emoji { width: 20px; height: 20px; vertical-align: middle; }\n`}function R(t){const l=`.${t}`;return`\n${l} {\n  color: ${n.COLORS.NAVY_MID};\n  font-family: ${o.FONT_FAMILY.WEB_SANS};\n  font-size: ${o.FONT_SIZE.XL}px;\n  line-height: 1.6;\n  overflow-wrap: break-word;\n  word-wrap: break-word;\n}\n${l} p { margin: 0 0 1em; }\n${l} p:last-child { margin-bottom: 0; }\n${l} strong,\n${l} b { color: ${n.COLORS.TEXT_PRIMARY}; font-weight: 700; }\n${l} em,\n${l} i { font-style: italic; }\n${l} a { color: ${n.COLORS.BRAND_PRIMARY}; text-decoration: underline; }\n${l} ul,\n${l} ol { margin: 0 0 1em; padding-left: 1.5em; }\n${l} li { margin: 0.35em 0; }\n${l} h1 { color: ${n.COLORS.TEXT_PRIMARY}; font-size: 1.5em; margin: 0 0 0.75em; }\n${l} h2 { color: ${n.COLORS.TEXT_PRIMARY}; font-size: 1.35em; margin: 1.25em 0 0.5em; }\n${l} h3 { color: ${n.COLORS.TEXT_PRIMARY}; font-size: 1.2em; margin: 1.1em 0 0.5em; }\n${l} h4 { color: ${n.COLORS.TEXT_PRIMARY}; font-size: 1.1em; margin: 1em 0 0.5em; }\n${l} blockquote {\n  background: ${n.COLORS.BG_FAINT};\n  border-left: 4px solid ${n.COLORS.BORDER};\n  border-radius: 4px;
842\n  color: ${n.COLORS.TEXT_SECONDARY};\n  margin: 0 0 1em;\n  padding: 8px 16px;\n}\n${l} table {\n  border-collapse: collapse;\n  margin: 0 0 1em;\n  width: 100%;\n}\n${l} th,\n${l} td {\n  border: 1px solid ${n.COLORS.BORDER_SUBTLE};\n  font-size: ${o.FONT_SIZE.MD}px;\n  padding: 8px 12px;\n  text-align: left;\n}\n${l} th {\n  background: ${n.COLORS.BG_NEAR_WHITE};\n  color: ${n.COLORS.TEXT_PRIMARY};\n  font-weight: 600;\n}\n`}const s={'product-description':c,discourse:()=>p(l),'shopify-policy':function(){return R($)}}},742,[490,494]);
843__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ContactScreen=function(){const e=(0,N.useSeoMeta)('Contact'),[u,p]=(0,t.useState)(''),[b,D]=(0,t.useState)(''),[X,F]=(0,t.useState)(_[0]),[k,w]=(0,t.useState)(''),[z,W]=(0,t.useState)(!1),[H,U]=(0,t.useState)(!1),[Z,v]=(0,t.useState)(null),{isDevTriggered:Y,surface:V}=(0,y.useErrorSurface)(M.submit),q=Z??(Y?`Failed to send your message. Please try again or email us directly at ${R.CONTACT.EMAIL}.`:null),$=(0,t.useCallback)(async()=>{if(v(null),u.trim()&&b.trim()&&k.trim())if((0,P.isValidEmail)(b.trim())){W(!0);try{const e={name:u.trim(),email:b.trim(),subject:X,message:k.trim()};await S.contactApi.submit(e),U(!0)}catch(e){E.logger.warn('Contact form submission failed',e),v((0,j.errorMessage)(e,`Failed to send your message. Please try again or email us directly at ${R.CONTACT.EMAIL}.`))}finally{W(!1)}}else v('Please enter a valid email address.');else v('Please fill in all required fields.')},[u,b,X,k]);return(0,G.jsxs)(T.PageLayout,{testID:"contact-screen",children:[(0,G.jsx)(L.WebMeta,Object.assign({},e)),(0,G.jsxs)(n.default,{style:B.container,children:[(0,G.jsx)(A.HeroSection,{backgroundColor:I.COLORS.BRAND_PRIMARY,background:{gradient:`linear-gradient(135deg, ${I.COLORS.BRAND_PRIMARY} 0%, ${I.COLORS.BRAND_ACCENT} 100%)`},minHeight:350,label:"GET IN TOUCH",title:"Contact Us",subtitle:"Have questions about PurpleAir products, need technical support, or want to discuss a partnership? We're here to help.",centered:!0}),(0,G.jsxs)(l.default,{style:B.section,children:[(0,G.jsx)(o.default,{style:B.sectionTitle,children:"Self-Service Resources"}),(0,G.jsx)(o.default,{style:B.sectionSubtitle,children:"Find answers quickly with our help resources"}),(0,G.jsxs)(l.default,{style:B.resourcesGrid,children:[(0,G.jsxs)(C.AppLink,{to:"FAQ",style:B.resource,children:[(0,G.jsx)(o.default,{style:B.resourceTitle,children:"FAQs"}),(0,G.jsx)(o.default,{style:B.resourceDesc,children:"Answers to frequently asked questions about sensors, data, and more."})]}),(0,G.jsxs)(C.AppLink,{to:"Community",style:B.resource,children:[(0,G.jsx)(o.default,{style:B.resourceTitle,children:"Knowledge Base"}),(0,G.jsx)(o.default,{style:B.resourceDesc,children:"Setup guides, troubleshooting tips, and how-to articles."})]}),(0,G.jsxs)(x.ServiceExternalLink,{service:"dataApiDocsUrl",style:B.resource,accessibilityLabel:"API Documentation",children:[(0,G.jsx)(o.default,{style:B.resourceTitle,children:"API Documentation"}),(0,G.jsx)(o.default,{style:B.resourceDesc,children:"Complete reference for the PurpleAir API with examples."})]}),(0,G.jsxs)(C.AppLink,{to:"Blog",style:B.resource,children:[(0,G.jsx)(o.default,{style:B.resourceTitle,children:"Blog"}),(0,G.jsx)(o.default,{style:B.resourceDesc,children:"Product updates, air quality science, and company news."})]})]})]}),(0,G.jsxs)(l.default,{style:[B.section,B.sectionAlt],children:[(0,G.jsx)(o.default,{style:B.sectionTitle,children:"Ways to Reach Us"}),(0,G.jsxs)(l.default,{style:B.contactMethods,children:[(0,G.jsxs)(l.default,{style:B.contactMethod,children:[(0,G.jsx)(o.default,{style:B.contactMethodTitle,children:"Email"}),(0,G.jsx)(f.ExternalLink,{protocol:"mailto",address:R.CONTACT.EMAIL,children:(0,G.jsx)(o.default,{style:B.contactMethodLink,children:R.CONTACT.EMAIL})})]}),(0,G.jsxs)(l.default,{style:B.contactMethod,children:[(0,G.jsx)(o.default,{style:B.contactMethodTitle,children:"Phone"}),(0,G.jsx)(o.default,{style:B.contactMethodDetail,children:"Mon-Fri 9am-5pm MT"}),(0,G.jsx)(f.ExternalLink,{protocol:"tel",address:R.CONTACT.PHONE,children:(0,G.jsx)(o.default,{style:B.contactMethodLink,children:R.CONTACT.PHONE})}),(0,G.jsxs)(o.default,{style:B.contactMethodDetail,children:["International: ",R.CONTACT.PHONE_INTERNATIONAL]})]}),(0,G.jsxs)(l.default,{style:B.contactMethod,children:[(0,G.jsx)(o.default,{style:B.contactMethodTitle,children:"Community Forum"}),(0,G.jsx)(C.AppLink,{to:"Community",children:(0,G.jsx)(o.default,{style:B.contactMethodLink,children:"community.purpleair.com"})})]})]})]}),(0,G.jsxs)(l.default,{style:B.section,children:[(0,G.jsx)(o.default,{style:B.sectionTitle,children:"Send Us a Message"}),(0,G.jsx)(l.default,{style:B.formContainer,children:H?(0,G.jsxs)(l.default,{style:B.successBox,children:[(0,G.jsx)(o.default,{style:B.successTitle,children:"Message Sent"}
843),(0,G.jsx)(o.default,{style:B.successText,children:"Thank you for contacting PurpleAir. We will respond to your inquiry shortly."}),(0,G.jsx)(s.default,{style:B.resetButton,onPress:()=>{U(!1),p(''),D(''),F(_[0]),w('')},children:(0,G.jsx)(o.default,{style:B.resetButtonText,children:"Send Another Message"})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(l.default,{style:B.fieldRow,children:[(0,G.jsxs)(l.default,{style:B.field,children:[(0,G.jsx)(o.default,{style:B.label,children:"Name *"}),(0,G.jsx)(h.AppTextInput,{style:B.input,value:u,onChangeText:p,placeholder:"Your full name",autoCapitalize:"words"})]}),(0,G.jsxs)(l.default,{style:B.field,children:[(0,G.jsx)(o.default,{style:B.label,children:"Email *"}),(0,G.jsx)(h.AppTextInput,{style:B.input,value:b,onChangeText:D,placeholder:"[email protected]",keyboardType:"email-address",autoCapitalize:"none"})]})]}),(0,G.jsxs)(l.default,{style:B.field,children:[(0,G.jsx)(o.default,{style:B.label,children:"Subject"}),(0,G.jsx)(l.default,{style:B.subjectRow,children:_.map(e=>(0,G.jsx)(s.default,{style:[B.subjectChip,X===e&&B.subjectChipActive],onPress:()=>{F(e)},accessibilityRole:"button",accessibilityLabel:`Subject: ${e}`,accessibilityState:{selected:X===e},children:(0,G.jsx)(o.default,{style:[B.subjectChipText,X===e&&B.subjectChipTextActive],children:e})},e))})]}),(0,G.jsxs)(l.default,{style:B.field,children:[(0,G.jsx)(o.default,{style:B.label,children:"Message *"}),(0,G.jsx)(h.AppTextInput,{style:[B.input,B.textArea],value:k,onChangeText:w,placeholder:"How can we help you?",multiline:!0,numberOfLines:6,textAlignVertical:"top"})]}),null!=q?(0,G.jsx)(O.FormSubmitError,{message:q,surface:V}):null,(0,G.jsx)(s.default,{style:[B.submitButton,z&&B.submitButtonDisabled],onPress:()=>{$()},disabled:z,children:z?(0,G.jsx)(c.default,{color:I.COLORS.TEXT_INVERSE,size:"small"}):(0,G.jsx)(o.default,{style:B.submitButtonText,children:"Send Message"})})]})})]}),(0,G.jsxs)(l.default,{style:B.ctaSection,children:[(0,G.jsx)(o.default,{style:B.ctaTitle,children:"PurpleAir, Inc."}),(0,G.jsxs)(o.default,{style:B.ctaSubtitle,children:["Bluffdale, Utah, USA",'\n',"Making air quality data accessible to everyone since 2015."]}),(0,G.jsx)(C.AppLink,{to:"Store",style:B.ctaButton,children:(0,G.jsx)(o.default,{style:B.ctaButtonText,children:"Shop Sensors"})})]})]})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3]));r(d[4]);var n=e(r(d[5])),c=e(r(d[6])),u=r(d[7]),S=r(d[8]),C=r(d[9]),h=r(d[10]),O=r(d[11]),f=r(d[12]),A=r(d[13]),T=r(d[14]),x=r(d[15]),L=r(d[16]),I=r(d[17]),R=r(d[18]),p=r(d[19]),b=r(d[20]),y=r(d[21]),N=r(d[22]),j=r(d[23]),E=r(d[24]),P=r(d[25]),G=r(d[26]);const _=['Sales','Technical Support','API & Developer','Partnership','Other'],M=(0,y.defineScreenErrorSurfaces)('Contact',{submit:{id:'submit',kind:'form-submit',label:'Contact form error'}});const B=(0,u.createStyles)({contactMethod:{alignItems:'center',backgroundColor:I.COLORS.BG_SURFACE,borderColor:I.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:p.SPACING.XXL,width:260},contactMethodDetail:{color:I.COLORS.TEXT_SOFT,fontSize:b.FONT_SIZE.MD,marginBottom:p.SPACING.XS},contactMethodLink:{color:I.COLORS.BRAND_PRIMARY,fontSize:b.FONT_SIZE.LG,fontWeight:'600',marginTop:p.SPACING.XS},contactMethodTitle:{color:I.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.XL,fontWeight:'600',marginBottom:p.SPACING.SM},contactMethods:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.XXL,justifyContent:'center',marginTop:p.SPACING.XXL,maxWidth:900},container:{backgroundColor:I.COLORS.BG_SURFACE,flex:1},ctaButton:{backgroundColor:I.COLORS.BG_SURFACE,borderRadius:8,paddingHorizontal:p.SPACING.XXXL,paddingVertical:p.SPACING.LG},ctaButtonText:{color:I.COLORS.ACTION_PRIMARY,fontSize:b.FONT_SIZE.LG,fontWeight:'600'},ctaSection:{alignItems:'center',backgroundColor:I.COLORS.BRAND_PRIMARY,paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.JUMBO},ctaSubtitle:{color:I.COLORS.OVERLAY_LIGHT_90,fontSize:b.FONT_SIZE.XL,marginBottom:p.SPACING.XXXL,maxWidth:500,textAlign:'center'},ctaTitle:Object.assign({color:I.COLORS.TEXT_INVERSE,fontSize:b.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:p.SPACING.MD,textAlign:'center'},{fontSize:b.FONT_SIZE.DISPLAY_ML}),errorText:{color:I.COLORS.ERROR,fontSize:b.FONT_SIZE.MD,marginBottom:p.SPACING.LG},field:{flex:1,marginBottom:p.SPACING.XL},fieldRow:Object.assign({flexDirection:'row',gap:p.SPACING.LG,marginBottom:p.SPACING.XL},{flexDirection:'row'}),formContainer:{alignSelf:'center',marginTop:p.SPACING.XXL,maxWidth:700,width:'100%'},input:Object.assign({backgroundColor:I.COLORS.BG_SURFACE,borderColor:I.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,color:I.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.LG,paddingHorizontal:p.SPACING.LG,paddingVertical:p.SPACING.MD},{outlineColor:I.COLORS.ACTION_PRIMARY}),label:{color:I.COLORS.TEXT_DARK,fontSize:b.FONT_SIZE.MD,fontWeight:'600',marginBottom:p.SPACING.SM},resetButton:{borderColor:I.COLORS.SUCCESS,borderRadius:8,borderWidth:1,paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.MD},resetButtonText:{color:I.COLORS.SUCCESS,fontSize:b.FONT_SIZE.LG,fontWeight:'600'},resource:{backgroundColor:I.COLORS.BG_SURFACE,borderColor:I.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:p.SPACING.XXL,width:200},resourceDesc:{color:I.COLORS.TEXT_SOFT,fontSize:b.FONT_SIZE.MD,lineHeight:20},resourceTitle:{color:I.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.LG,fontWeight:'600',marginBottom:p.SPACING.SM},resourcesGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.XL,justifyContent:'center',maxWidth:900},section:{paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.JUMBO},sectionAlt:{backgroundColor:I.COLORS.BG_LIGHT},sectionSubtitle:{color:I.COLORS.TEXT_SOFT,fontSize:b.FONT_SIZE.XL,marginBottom:p.SPACING.HUGE,textAlign:'center'},sectionTitle:Object.assign({color:I.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:p.SPACING.LG,textAlign:'center'},{fontSize:b.FONT_SIZE.DISPLAY_ML}),subjectChip:{backgroundColor:I.COLORS.BG_SURFACE,borderColor:I.COLORS.BORDER_DEFAULT,borderRadius:20,borderWidth:1,paddingHorizontal:p.SPACING.LG,paddingVertical:p.SPACING.SM},subjectChipActive:{backgroundColor:I.COLORS.ACTION_PRIMARY,borderColor:I.COLORS.ACTION_PRIMARY},subjectChipText:{color:I.COLORS.TEXT_SECONDARY,fontSize:b.FONT_SIZE.MD},subjectChipTextActive:{color:I.COLORS.TEXT_INVERSE,fontWeight:'600'},subjectRow:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.SM},submitButton:{alignItems:'center',backgroundColor:I.COLORS.ACTION_PRIMARY,borderRadius:8,marginTop:p.SPACING.SM,paddingVertical:p.SPACING.LG},submitButtonDisabled:{opacity:.6},submitButtonText:{color:I.COLORS.TEXT_INVERSE,fontSize:b.FONT_SIZE.LG,fontWeight:'600'},successBox:{alignItems:'center',backgroundColor:I.COLORS.SUCCESS_BG,borderColor:I.COLORS.GREEN_300,borderRadius:12,borderWidth:1,padding:p.SPACING.XXXL},successText:{color:I.COLORS.SUCCESS,fontSize:b.FONT_SIZE.LG,lineHeight:26,marginBottom:p.SPACING.XXL,textAlign:'center'},successTitle:{color:I.COLORS.SUCCESS,fontSize:b.FONT_SIZE.XXXL,fontWeight:'bold',marginBottom:p.SPACING.MD},textArea:{minHeight:150,textAlignVertical:'top'}})},743,[34,276,222,488,95,283,410,489,744,516,711,513,519,674,568,522,565,490,745,493,494,557,562,468,469,746,104]);
844__d(function(g,r,i,a,m,e,d){"use strict";
844Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"contactApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n={submit:async n=>t.contact.submitContact({body:n})}},744,[471]);
845__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CONTACT",{enumerable:!0,get:function(){return t}});const t={EMAIL:'[email protected]',PRIVACY_EMAIL:'[email protected]',PHONE:'1-800-474-0696',PHONE_INTERNATIONAL:'+1-313-474-0696'}},745,[]);
846__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EMAIL_REGEX",{enumerable:!0,get:function(){return t}}),e.isValidEmail=function(n){return t.test(n)};const t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/},746,[]);
847__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ContentAdminScreen=function(){const e=(0,S.useSeoMeta)('ContentAdmin'),{horizontalPadding:o,isPhone:u}=(0,C.useResponsive)();return(0,h.jsxs)(s.PageLayout,{children:[(0,h.jsx)(c.WebMeta,Object.assign({},e)),(0,h.jsx)(n.default,{style:j.scrollContainer,children:(0,h.jsx)(t.default,{style:[j.container,{paddingHorizontal:o,paddingVertical:u?f.SPACING.LG:f.SPACING.XXL}],children:(0,h.jsx)(l.ContentAdminPanel,{})})})]})},r(d[0]);var n=e(r(d[1])),t=e(r(d[2])),o=r(d[3]),l=r(d[4]),s=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),C=r(d[9]),S=r(d[10]),h=r(d[11]);const j=(0,o.createStyles)({scrollContainer:{backgroundColor:u.COLORS.BG_WASH,flex:1},container:{alignSelf:'center',maxWidth:1100,width:'100%'}})},747,[34,283,276,489,748,568,565,490,493,553,562,104]);
848__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AdminDashboardPanel",{enumerable:!0,get:function(){return n.AdminDashboardPanel}}),Object.defineProperty(e,"AdminUsersPanel",{enumerable:!0,get:function(){return t.AdminUsersPanel}}),Object.defineProperty(e,"AdminBillingPanel",{enumerable:!0,get:function(){return u.AdminBillingPanel}}),Object.defineProperty(e,"OrderOutreachHubPanel",{enumerable:!0,get:function(){return l.OrderOutreachHubPanel}}),Object.defineProperty(e,"OrderOutreachCreatePanel",{enumerable:!0,get:function(){return o.OrderOutreachCreatePanel}}),Object.defineProperty(e,"OrderOutreachDetailPanel",{enumerable:!0,get:function(){return c.OrderOutreachDetailPanel}}),Object.defineProperty(e,"CampaignDetail",{enumerable:!0,get:function(){return P.CampaignDetail}}),Object.defineProperty(e,"SubscriptionsAdminPanel",{enumerable:!0,get:function(){return b.SubscriptionsAdminPanel}}),Object.defineProperty(e,"SubscriptionContractDetailPanel",{enumerable:!0,get:function(){return f.SubscriptionContractDetailPanel}}),Object.defineProperty(e,"AdminAuditLogsPanel",{enumerable:!0,get:function(){return O.AdminAuditLogsPanel}}),Object.defineProperty(e,"ContentAdminPanel",{enumerable:!0,get:function(){return s.ContentAdminPanel}}),Object.defineProperty(e,"PressInlineAdminControls",{enumerable:!0,get:function(){return p.PressInlineAdminControls}});var n=r(d[0]),t=r(d[1]),u=r(d[2]),l=r(d[3]),o=r(d[4]),c=r(d[5]),P=r(d[6]),b=r(d[7]),f=r(d[8]),O=r(d[9]),s=r(d[10]),p=r(d[11])},748,[749,755,759,765,778,831,832,835,843,845,863,868]);
849__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.AdminDashboardPanel=function(){const[e,n]=(0,t.useState)(null),[s,S]=(0,t.useState)(!0),[h,p]=(0,t.useState)(null),[E,P]=(0,t.useState)(!1),{isOwner:b}=(0,c.useAuth)(),C=(0,t.useRef)(!0);(0,t.useEffect)(()=>()=>{C.current=!1},[]);const L=(0,t.useCallback)(async()=>{try{S(!0),p(null);const e=await l.helloApi.getAdmin();if(!C.current)return;n(e)}catch(e){if(!C.current)return;p((0,x.errorMessage)(e,'Failed to load admin data'))}finally{C.current&&S(!1)}},[]);if((0,t.useEffect)(()=>{L()},[L]),s&&null==e)return(0,A.jsx)(f.LoadingState,{});return(0,A.jsxs)(u.default,{style:_.container,children:[(0,A.jsx)(j.AdminFeaturePanel,{adminData:e,adminLoading:s,adminError:h,featuresExpanded:E,onToggleExpanded:()=>{P(e=>!e)}}),b&&(0,A.jsx)(y.OrganizationUuidBackfillCard,{}),(0,A.jsx)(o.PlatformStatusSection,{})]})};
849var e,t=r(d[0]),n=r(d[1]),u=(e=n)&&e.__esModule?e:{default:e},s=r(d[2]),l=r(d[3]),c=r(d[4]),o=r(d[5]),f=r(d[6]),S=r(d[7]),x=r(d[8]),j=r(d[9]),y=r(d[10]),A=r(d[11]);const _=(0,s.createStyles)({container:{gap:S.SPACING.XXL}})},749,[34,276,489,750,411,751,512,493,468,752,753,104]);
850__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"helloApi",{enumerable:!0,get:function(){return t}});var n=r(d[0]);const t={getUser:async()=>n.hello.user(),getAdmin:async()=>n.admin.helloAdmin()}},750,[471]);
851__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PlatformStatusSection=function(){const[e,l]=(0,t.useState)([]);if((0,t.useEffect)(()=>{const e={value:!1};return(async()=>{const t=await v();e.value||l(t)})(),()=>{e.value=!0}},[]),0===e.length)return(0,b.jsx)(n.default,{});return(0,b.jsxs)(n.default,{style:C.section,children:[(0,b.jsx)(o.default,{style:C.sectionTitle,children:"Platform Features"}),(0,b.jsx)(n.default,{style:C.grid,children:e.map(e=>(0,b.jsxs)(n.default,{style:C.featureCard,children:[(0,b.jsxs)(n.default,{style:C.featureHeader,children:[(0,b.jsx)(n.default,{style:[C.dot,e.available?C.dotGreen:C.dotRed]}),(0,b.jsx)(o.default,{style:C.featureName,children:e.name})]}),(0,b.jsx)(o.default,{style:C.featureDetail,children:e.detail})]},e.name))})]})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),s=r(d[5]),u=r(d[6]),c=r(d[7]),f=r(d[8]),b=r(d[9]);function p(e){if('object'!=typeof e||null===e)return!1;return'number'==typeof Reflect.get(e,'UNMASKED_RENDERER_WEBGL')}async function v(){const e=[];return e.push(S()),e.push(h()),e.push(await E()),e.push(N()),e.push(R()),e.push(y()),e}function S(){try{const e=document.createElement('canvas'),t=e.getContext('webgl2')??e.getContext('webgl');if(null!=t){const e=t.getExtension('WEBGL_debug_renderer_info'),n=p(e)?t.getParameter(e.UNMASKED_RENDERER_WEBGL):null;return{name:'WebGL',available:!0,detail:'string'==typeof n&&''!==n?n:'Available'}}return{name:'WebGL',available:!1,detail:'Not supported -- map rendering may not work'}}catch{return{name:'WebGL',available:!1,detail:'Detection failed'}}}function h(){const e='undefined'!=typeof navigator&&'serial'in navigator;return{name:'Web Serial',available:e,detail:e?'USB firmware flashing supported':'Not supported -- use OTA firmware updates'}}async function E(){if('undefined'==typeof navigator||!('bluetooth'in navigator))return{name:'Web Bluetooth',available:!1,detail:'Not supported in this browser'};try{const e=await navigator.bluetooth.getAvailability();return{name:'Web Bluetooth',available:e,detail:e?'Sensor discovery supported':'Bluetooth hardware not available'}}catch{return{name:'Web Bluetooth',available:!1,detail:'Access denied'}}}function N(){return'Notification'in window?'denied'===Notification.permission?{name:'Notifications',available:!1,detail:'Permission denied'}:'granted'===Notification.permission?{name:'Notifications',available:!0,detail:'Enabled'}:{name:'Notifications',available:!0,detail:'Available (not yet granted)'}:{name:'Notifications',available:!1,detail:'Not supported in this browser'}}function R(){const e='undefined'!=typeof navigator&&'mediaDevices'in navigator&&'getUserMedia'in navigator.mediaDevices;return{name:'Camera',available:e,detail:e?'QR code scanning supported':'Not available -- enter device IDs manually'}}function y(){const e='serviceWorker'in navigator;return{name:'Service Worker',available:e,detail:e?'Offline support and caching enabled':'Not supported'}}const C=(0,l.createStyles)({dot:{borderRadius:5,height:10,width:10},dotGreen:{backgroundColor:s.COLORS.SUCCESS},dotRed:{backgroundColor:s.COLORS.ERROR},featureCard:Object.assign({backgroundColor:s.COLORS.BG_SURFACE,borderColor:s.COLORS.BORDER,borderRadius:8,borderWidth:1,flex:1,minWidth:180,padding:c.SPACING.MD},u.ELEVATION.SUBTLE),featureDetail:{color:s.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.XS,marginTop:c.SPACING.XS},featureHeader:{alignItems:'center',flexDirection:'row',gap:c.SPACING.SM},featureName:{color:s.COLORS.TEXT_DARK,fontSize:f.FONT_SIZE.MD,fontWeight:'600'},grid:{flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.SM},section:{gap:c.SPACING.MD},sectionTitle:{color:s.COLORS.TEXT_DARK,fontSize:f.FONT_SIZE.XL,fontWeight:'600'}})},751,[34,95,276,222,489,490,503,493,494,104]);
852__d(function(g,r,i,a,m,_e,d){"use strict";
852function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AdminFeaturePanel=function({adminData:e,adminLoading:s,adminError:f,featuresExpanded:S,onToggleExpanded:R}){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(n.default,{accessibilityLabel:"Feature flags",accessibilityRole:"button",style:O.featureHeader,onPress:R,activeOpacity:.7,children:[(0,c.jsx)(o.default,{style:O.featureHeaderText,children:"Feature Flags"}),(0,c.jsx)(o.default,{style:O.featureChevron,children:S?'\u25b2':'\u25bc'})]}),S&&(0,c.jsxs)(t.default,{style:O.featurePanel,children:[s&&(0,c.jsx)(l.default,{size:"small",color:u.COLORS.ACTION_PRIMARY}),null!=f&&''!==f&&(0,c.jsx)(o.default,{style:O.featureErrorText,children:f}),null!=e&&(0,c.jsxs)(t.default,{style:O.featureTags,children:[e.allFeatures.map(e=>(0,c.jsx)(t.default,{style:O.featureTag,children:(0,c.jsx)(o.default,{style:O.featureTagText,children:e})},e)),0===e.allFeatures.length&&(0,c.jsx)(o.default,{style:O.noFeaturesText,children:"No features enabled"})]})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),n=e(r(d[4])),s=r(d[5]),u=r(d[6]),f=r(d[7]),S=r(d[8]),c=r(d[9]);const O=(0,s.createStyles)({featureHeader:{alignItems:'center',backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER,borderRadius:8,borderWidth:1,flexDirection:'row',justifyContent:'space-between',marginBottom:f.SPACING.XS,paddingHorizontal:f.SPACING.LG,paddingVertical:f.SPACING.MD},featureHeaderText:{color:u.COLORS.TEXT_BODY,fontSize:S.FONT_SIZE.MD,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},featureChevron:{color:u.COLORS.TEXT_PLACEHOLDER,fontSize:S.FONT_SIZE.XS},featurePanel:{backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER,borderRadius:8,borderTopLeftRadius:0,borderTopRightRadius:0,borderTopWidth:0,borderWidth:1,marginBottom:f.SPACING.XXL,paddingHorizontal:f.SPACING.LG,paddingVertical:f.SPACING.MD},featureTags:{flexDirection:'row',flexWrap:'wrap',gap:f.SPACING.SM},featureTag:{backgroundColor:u.COLORS.BRAND_BG_SUBTLE,borderRadius:16,paddingHorizontal:f.SPACING.MD,paddingVertical:f.SPACING.SM},featureTagText:{color:u.COLORS.BRAND_PRIMARY,fontSize:S.FONT_SIZE.SM,fontWeight:'500'},noFeaturesText:{color:u.COLORS.TEXT_PLACEHOLDER,fontSize:S.FONT_SIZE.SM,fontStyle:'italic'},featureErrorText:{color:u.COLORS.ERROR,fontSize:S.FONT_SIZE.SM}})},752,[34,276,222,410,488,489,490,493,494,104]);
853__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrganizationUuidBackfillCard=function(){const[e,u]=(0,t.useState)(String(R)),[S,b]=(0,t.useState)(!0),[T,k]=(0,t.useState)(null),[E,j]=(0,t.useState)(null),[N,L]=(0,t.useState)(!1),[_,B]=(0,t.useState)(!1),[D,M]=(0,t.useState)(null),[z,A]=(0,t.useState)(0),[G,w]=(0,t.useState)(null),[U,P]=(0,t.useState)(!1),F=(0,t.useRef)(!0),X=(0,t.useRef)(!1);(0,t.useEffect)(()=>()=>{F.current=!1},[]);const H=(0,t.useCallback)(()=>{X.current=!0,B(!0)},[]),W=(0,t.useCallback)(()=>{X.current=!1},[]),Z=(0,t.useCallback)(async()=>{b(!0),k(null);try{const e=await y.organizationBackfillApi.getStatus();if(!F.current)return;j(e.remaining)}catch(e){if(!F.current)return;k((0,h.errorMessage)(e,'Could not load backfill status'))}finally{F.current&&b(!1)}},[]);(0,t.useEffect)(()=>{Z()},[Z]);const v=(0,t.useCallback)(async()=>{const t=Number(e);if(!Number.isInteger(t)||t<1||t>p)return void w(`Batch size must be a whole number between 1 and ${C(p)}.`);W(),L(!0),B(!1),w(null),P(!1),A(0),M(E);let n=0;try{for(;;){const e=await y.organizationBackfillApi.backfillBatch(t);if(!F.current)return;if(n+=e.updated,A(n),j(e.remaining),e.remaining<=0){P(!0);break}if(X.current)break;if(0===e.updated){w(`Backfill stalled with ${C(e.remaining)} row(s) remaining (a batch stamped 0 rows). Stopping.`);break}}}catch(e){if(!F.current)return;w((0,h.errorMessage)(e,'Backfill failed'))}finally{F.current&&(L(!1),B(!1))}},[e,E,W]);return(0,O.jsxs)(n.default,{style:I.card,children:[(0,O.jsx)(l.default,{style:I.title,children:"Organization UUID backfill"}),(0,O.jsx)(l.default,{style:I.body,children:"Legacy organizations created before the shared UUID existed have no canonical join key yet. Running this stamps a UUIDv7 onto each one (in batches, until none remain) so both apps can reference them. Safe to re-run: organizations that already have a UUID are skipped."}),S&&null===E?(0,O.jsxs)(n.default,{style:I.inlineRow,children:[(0,O.jsx)(c.default,{color:f.COLORS.ACTION_PRIMARY}),(0,O.jsx)(l.default,{style:I.muted,children:"Checking how many need a UUID\u2026"})]}):null!=T&&null===E?(0,O.jsxs)(n.default,{style:I.statusBlock,children:[(0,O.jsx)(l.default,{style:I.error,children:T}),(0,O.jsx)(o.default,{style:I.secondaryButton,onPress:()=>{Z()},accessibilityRole:"button",accessibilityLabel:"Retry loading backfill status",children:(0,O.jsx)(l.default,{style:I.secondaryButtonText,children:"Retry"})})]}):0===E&&null===D?(0,O.jsx)(l.default,{style:I.success,children:"All organizations already have a UUID. Nothing to back fill."}):(0,O.jsxs)(O.Fragment,{children:[null===D?(0,O.jsxs)(l.default,{style:I.statusLine,children:[(0,O.jsx)(l.default,{style:I.statusCount,children:C(E??0)}),` organization${1===E?'':'s'} still need a UUID.`]}):(0,O.jsx)(x,{startRemaining:D,remaining:E??0,stamped:z,running:N}),U&&(0,O.jsx)(l.default,{style:I.success,children:`Backfill complete \u2014 stamped ${C(z)} organization(s).`}),0!==E&&(0,O.jsxs)(n.default,{style:I.controlRow,children:[(0,O.jsx)(l.default,{style:I.label,children:"Batch size"}
853),(0,O.jsx)(s.default,{style:I.input,value:e,onChangeText:u,editable:!N,keyboardType:"numeric",inputMode:"numeric",accessibilityLabel:"Backfill batch size"}),(0,O.jsx)(o.default,{style:[I.button,N&&I.buttonDisabled],onPress:()=>{v()},disabled:N,accessibilityRole:"button",accessibilityLabel:"Run organization uuid backfill to completion",children:N?(0,O.jsx)(c.default,{color:f.COLORS.TEXT_INVERSE}):(0,O.jsx)(l.default,{style:I.buttonText,children:null===D?'Run backfill':'Resume backfill'})}),N&&(0,O.jsx)(o.default,{style:[I.secondaryButton,_&&I.buttonDisabled],onPress:H,disabled:_,accessibilityRole:"button",accessibilityLabel:"Stop backfill",children:(0,O.jsx)(l.default,{style:I.secondaryButtonText,children:_?'Stopping\u2026':'Stop'})})]}),null!=G&&''!==G&&(0,O.jsx)(l.default,{style:I.error,children:G})]})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),s=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),f=r(d[7]),S=r(d[8]),b=r(d[9]),h=r(d[10]),y=r(d[11]),O=r(d[12]);const R=500,p=5e3;function C(e){return e.toLocaleString('en-US')}function x({startRemaining:e,remaining:t,stamped:s,running:o}){const c=Math.max(0,e-t),u=e>0?Math.min(1,c/e):1,f=Math.round(100*u),S=`${f}%`;return(0,O.jsxs)(n.default,{style:I.progressBlock,children:[(0,O.jsxs)(n.default,{style:I.progressHeader,children:[(0,O.jsxs)(l.default,{style:I.muted,children:[o?'Stamping\u2026':'Stopped',`  ${C(s)} of ${C(e)} stamped`]}),(0,O.jsx)(l.default,{style:I.muted,children:`${String(f)}%`})]}),(0,O.jsx)(n.default,{style:I.progressTrack,accessibilityRole:"progressbar",accessibilityValue:{now:f,min:0,max:100},children:(0,O.jsx)(n.default,{style:[I.progressFill,{width:S}]})}),(0,O.jsx)(l.default,{style:I.muted,children:`${C(t)} remaining`})]})}const I=(0,u.createStyles)({card:{padding:S.SPACING.LG,borderRadius:8,backgroundColor:f.COLORS.BG_SUBTLE_100,gap:S.SPACING.MD},title:{fontSize:b.FONT_SIZE.LG,fontWeight:'600',color:f.COLORS.TEXT_HEADING},body:{fontSize:b.FONT_SIZE.SM,color:f.COLORS.TEXT_BODY,lineHeight:22},inlineRow:{flexDirection:'row',alignItems:'center',gap:S.SPACING.SM},statusBlock:{gap:S.SPACING.SM,alignItems:'flex-start'},statusLine:{fontSize:b.FONT_SIZE.MD,color:f.COLORS.TEXT_BODY},statusCount:{fontWeight:'700',color:f.COLORS.TEXT_HEADING},controlRow:{flexDirection:'row',alignItems:'center',gap:S.SPACING.MD,flexWrap:'wrap'},label:{fontSize:b.FONT_SIZE.SM,color:f.COLORS.TEXT_BODY},input:{minWidth:90,paddingVertical:S.SPACING.XS,paddingHorizontal:S.SPACING.SM,borderWidth:1,borderColor:f.COLORS.BORDER,borderRadius:6,fontSize:b.FONT_SIZE.MD,color:f.COLORS.TEXT_HEADING,backgroundColor:f.COLORS.BG_SUBTLE},button:{backgroundColor:f.COLORS.ACTION_PRIMARY,paddingVertical:S.SPACING.SM,paddingHorizontal:S.SPACING.LG,borderRadius:6,minWidth:130,alignItems:'center'},buttonDisabled:{opacity:.7},buttonText:{color:f.COLORS.TEXT_INVERSE,fontSize:b.FONT_SIZE.MD,fontWeight:'600'},secondaryButton:{borderWidth:1,borderColor:f.COLORS.BORDER,paddingVertical:S.SPACING.XS,paddingHorizontal:S.SPACING.MD,borderRadius:6},secondaryButtonText:{color:f.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.SM,fontWeight:'600'},progressBlock:{gap:S.SPACING.XS},progressHeader:{flexDirection:'row',justifyContent:'space-between'},progressTrack:{height:10,borderRadius:5,backgroundColor:f.COLORS.BORDER,overflow:'hidden'},progressFill:{height:'100%',borderRadius:5,backgroundColor:f.COLORS.ACTION_PRIMARY},muted:{fontSize:b.FONT_SIZE.SM,color:f.COLORS.TEXT_MUTED},success:{color:f.COLORS.SUCCESS,fontSize:b.FONT_SIZE.SM,fontWeight:'600'},error:{color:f.COLORS.ERROR,fontSize:b.FONT_SIZE.SM}})},753,[34,276,222,394,488,410,489,490,493,494,468,754,104]);
854__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"organizationBackfillApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n={getStatus:async()=>t.admin.backfillStatus(),backfillBatch:async n=>t.admin.backfillUuids({query:{batchSize:n}})}},754,[471]);
855__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AdminUsersPanel=function(){const{isOwner:e}=(0,S.useAuth)(),o=(0,T.useToast)(),[c,h]=(0,t.useState)([]),[R,y]=(0,t.useState)([]),[v,w]=(0,t.useState)(!0),[G,F]=(0,t.useState)(null),[k,z]=(0,t.useState)(0),[W,X]=(0,t.useState)(0),[H,Y]=(0,t.useState)(0),[Z,$]=(0,t.useState)(null),{isDevTriggered:V,surface:K}=(0,_.useErrorSurface)(U.usersTable),q=G??(V?'Failed to load users':null),[J,Q]=(0,t.useState)(''),[ee,te]=(0,t.useState)(''),[re,ae]=(0,t.useState)(x),[se,le]=(0,t.useState)(M),ne=(0,t.useRef)(!0);(0,t.useEffect)(()=>()=>{ne.current=!1},[]);const ie=(0,t.useCallback)(async e=>{try{w(!0),F(null);const t={page:e,search:ee,size:D,sortBy:re,sortDirection:se},s=await u.userAdminApi.listUsers(t);if(!ne.current)return;h(s.content),X(s.totalPages),Y(s.totalElements),z(s.page)}catch(e){if(!ne.current)return;F((0,E.errorMessage)(e,'Failed to load users'))}finally{ne.current&&w(!1)}},[ee,re,se]),oe=(0,t.useCallback)(async()=>{try{const e=await u.userAdminApi.getAssignableRoles();if(!ne.current)return;y(e)}catch(e){if(!ne.current)return;L.logger.warn('Failed to fetch assignable roles:',e),y([])}},[]);(0,t.useEffect)(()=>{ie(0),oe()},[ie,oe]);const ce=(0,t.useCallback)(()=>{te(J.trim()),z(0)},[J]),de=(0,t.useCallback)(()=>{Q(''),te(''),z(0)},[]),ue=(0,t.useCallback)(e=>{z(0),e!==re?(ae(e),le(P[e])):le(e=>'asc'===e?'desc':'asc')},[re]),Se=(0,t.useCallback)((e,t,s,o="start")=>{const c=re===t,u=c?'asc'===se?' \u2191':' \u2193':'';return(0,N.jsx)(b.ResponsiveTableCell,{align:o,style:s,children:(0,N.jsx)(n.default,{accessibilityLabel:`Sort users by ${e.toLowerCase()}`,accessibilityRole:"button",onPress:()=>{ue(t)},children:(0,N.jsxs)(l.default,{style:[j.headerCellActive,!c&&j.headerCellInactive],children:[e,u]})})})},[ue,re,se]),fe=(0,t.useCallback)(async(e,t)=>{$(e);try{const s=await u.userAdminApi.updateRole(e,t);h(t=>t.map(t=>
855t.id===e?s:t))}catch(t){o.error((0,E.errorMessage)(t,'Failed to change role'),{id:`admin-users-role-${e}`})}finally{$(null)}},[o]),Ae=(0,t.useCallback)(async(e,t)=>{$(e);try{const s=await u.userAdminApi.updateEnabled(e,t);h(t=>t.map(t=>t.id===e?s:t))}catch(t){o.error((0,E.errorMessage)(t,'Failed to update user'),{id:`admin-users-enabled-${e}`})}finally{$(null)}},[o]),Ce=(0,t.useCallback)(async(e,t)=>{if(await B(t)){$(e);try{await u.userAdminApi.terminalDelete(e),o.success('User permanently deleted',{id:`admin-users-delete-${e}`}),await ie(k)}catch(t){o.error((0,E.errorMessage)(t,'Failed to delete user'),{id:`admin-users-delete-${e}`})}finally{$(null)}}},[o,ie,k]),be=e?p.ADMIN_USERS_OWNER_TABLE_MIN_WIDTH:p.ADMIN_USERS_READONLY_TABLE_MIN_WIDTH;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(s.default,{style:j.sectionHeader,children:[(0,N.jsx)(l.default,{style:j.sectionTitle,children:"Users"}),(0,N.jsxs)(l.default,{style:j.sectionSubtitle,children:[H," user",1!==H?'s':'']})]}),(0,N.jsxs)(s.default,{style:j.filters,children:[(0,N.jsxs)(s.default,{style:j.searchField,children:[(0,N.jsx)(l.default,{style:j.searchLabel,children:"Search by email or full user ID"}),(0,N.jsx)(f.AppTextInput,{accessibilityLabel:"Search users by email or full user ID",value:J,onChangeText:Q,onSubmitEditing:ce,placeholder:"[email protected] or a complete user ID (UUID)",autoCapitalize:"none",keyboardType:"default",returnKeyType:"search",style:j.searchInput})]}),(0,N.jsxs)(s.default,{style:j.filterActions,children:[(0,N.jsx)(n.default,{accessibilityLabel:"Search users",accessibilityRole:"button",style:j.filterButton,onPress:ce,children:(0,N.jsx)(l.default,{style:j.filterButtonText,children:"Search"})}),(0,N.jsx)(n.default,{accessibilityLabel:"Clear user search",accessibilityRole:"button",style:j.clearButton,onPress:de,children:(0,N.jsx)(l.default,{style:j.clearButtonText,children:"Clear"})})]})]}),null!=q&&(0,N.jsx)(A.LocalErrorBanner,{message:q,retryLabel:"Retry",surface:K,style:j.errorBanner,onRetry:()=>{ie(k)}}),v&&0===c.length?(0,N.jsx)(A.LoadingState,{}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(b.ResponsiveTable,{compactContent:c.map(t=>(0,N.jsx)(O.UserCard,{user:t,isOwner:e,assignableRoles:R,isLoading:Z===t.id,onRoleChange:(e,t)=>
855{fe(e,t)},onToggleEnabled:(e,t)=>{Ae(e,t)},onTerminalDelete:(e,t)=>{Ce(e,t)},formatDate:e=>(0,I.formatIsoDateTime)(e,'Never')},t.id)),minWidth:be,testID:"admin-users-table",children:[(0,N.jsxs)(b.ResponsiveTableHeader,{children:[Se('Email','email',p.ADMIN_USERS_TABLE_COLUMNS.email),Se('Role','role',p.ADMIN_USERS_TABLE_COLUMNS.role,'center'),Se('Status','enabled',p.ADMIN_USERS_TABLE_COLUMNS.status),Se('Provider','authProvider',p.ADMIN_USERS_TABLE_COLUMNS.provider),Se('Created','createdAt',p.ADMIN_USERS_TABLE_COLUMNS.date),Se('Last Login','lastLoginAt',p.ADMIN_USERS_TABLE_COLUMNS.date),e&&(0,N.jsx)(b.ResponsiveTableCell,{align:"end",style:p.ADMIN_USERS_TABLE_COLUMNS.actions,children:(0,N.jsx)(b.ResponsiveTableHeaderText,{children:"Actions"})})]}),c.map(t=>(0,N.jsx)(O.UserRow,{user:t,isOwner:e,assignableRoles:R,isLoading:Z===t.id,onRoleChange:(e,t)=>{fe(e,t)},onToggleEnabled:(e,t)=>{Ae(e,t)},onTerminalDelete:(e,t)=>{Ce(e,t)},formatDate:e=>(0,I.formatIsoDateTime)(e,'Never')},t.id))]}),W>1&&(0,N.jsx)(C.Pagination,{page:k,totalPages:W,onPageChange:e=>{ie(e)},itemLabel:"users"})]})]})};var t=r(d[0]),s=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3]));r(d[4]);var o=e(r(d[5])),c=r(d[6]),u=r(d[7]),S=r(d[8]),f=r(d[9]),A=r(d[10]),C=r(d[11]),b=r(d[12]),T=r(d[13]),h=r(d[14]),R=r(d[15]),y=r(d[16]),_=r(d[17]),I=r(d[18]),E=r(d[19]),L=r(d[20]),p=r(d[21]),O=r(d[22]),N=r(d[23]);const D=20,x='createdAt',M='desc',P={authProvider:'asc',createdAt:'desc',email:'asc',enabled:'desc',lastLoginAt:'desc',role:'asc'};async function B(e){const t=`Permanently delete ${null!=e&&''!==e.trim()?e:'this account'}? This scrubs PurpleAir-owned data and removes the email. The account cannot be restored. The Developer Portal must have already deleted this user.`;return'undefined'!=typeof window?window.confirm(t):new Promise(e=>{o.default.alert('Delete user?',t,[{onPress:()=>{e(!1)},style:'cancel',text:'Cancel'},{onPress:()=>{e(!0)},style:'destructive',text:'Delete'}])})}const U=(0,_.defineScreenErrorSurfaces)('Admin',{usersTable:{id:'users-table',kind:'local-banner',label:'Admin users table error'}});const j=(0,c.createStyles)({clearButton:{alignItems:'center',backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.SM},clearButtonText:{color:h.COLORS.TEXT_BODY,fontSize:y.FONT_SIZE.MD,fontWeight:'600'},sectionHeader:{marginBottom:R.SPACING.LG,marginTop:R.SPACING.SM},sectionTitle:{color:h.COLORS.TEXT_PRIMARY,fontSize:y.FONT_SIZE.XXL,fontWeight:'600',marginBottom:R.SPACING.XS},sectionSubtitle:{color:h.COLORS.TEXT_MUTED,fontSize:y.FONT_SIZE.MD},errorBanner:{marginBottom:R.SPACING.LG},filters:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.MD,marginBottom:R.SPACING.LG},filterActions:{flexDirection:'row',gap:R.SPACING.SM},filterButton:{alignItems:'center',backgroundColor:h.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.SM},filterButtonText:{color:h.COLORS.TEXT_INVERSE,fontSize:y.FONT_SIZE.MD,fontWeight:'600'},searchField:{flexBasis:280,flexGrow:1,gap:R.SPACING.XS},searchInput:{backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,color:h.COLORS.TEXT_PRIMARY,fontSize:y.FONT_SIZE.MD,paddingHorizontal:R.SPACING.MD,paddingVertical:R.SPACING.SM},searchLabel:{color:h.COLORS.TEXT_BODY,fontSize:y.FONT_SIZE.SM,fontWeight:'600'},headerCellActive:{color:h.COLORS.ACTION_PRIMARY,fontSize:y.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},headerCellInactive:{color:h.COLORS.TEXT_MUTED}})},755,[34,276,222,488,95,520,489,756,411,711,512,712,687,496,490,493,494,557,685,468,469,757,758,104]);
856__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"userAdminApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]);function s(t){return'USER'===t||'ADMIN'===t||'OWNER'===t||'SUPER_OWNER'===t}const n={async listUsers(s={}){const{page:n=0,search:l="",size:o=20,sortBy:c="createdAt",sortDirection:u="desc"}=s,p=await t.adminUsers.listUsers({query:{page:n,search:l,size:o,sortBy:c,sortDirection:u}});return{content:p.content,first:p.first,last:p.last,page:p.number,size:p.size,totalElements:p.totalElements,totalPages:p.totalPages}},getUser:async s=>t.adminUsers.getUser({path:{id:s}}),updateRole:async(s,n)=>t.adminUsers.updateRole({path:{id:s},body:{role:n}}),updateEnabled:async(s,n)=>t.adminUsers.updateEnabled({path:{id:s},body:{enabled:n}}),async terminalDelete(s){await t.adminUsers.terminalDelete({path:{id:s}})},getAssignableRoles:async()=>(await t.adminUsers.getAssignableRoles()).filter(s)}},756,[471]);
857__d(function(g,r,i,a,m,e,d){"use strict";
857Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ADMIN_USERS_READONLY_TABLE_MIN_WIDTH",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ADMIN_USERS_OWNER_TABLE_MIN_WIDTH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ADMIN_USERS_TABLE_COLUMNS",{enumerable:!0,get:function(){return f}});const t=1020,n=1180,f={actions:{alignItems:'flex-end',flexBasis:160,flexGrow:1,minWidth:160},date:{flexBasis:200,flexGrow:1,minWidth:200},email:{flexBasis:260,flexGrow:2,minWidth:260},provider:{flexBasis:105,flexGrow:1,minWidth:105},role:{flexBasis:140,flexGrow:1,minWidth:140},status:{flexBasis:115,flexGrow:1,minWidth:115}}},757,[]);
858__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ROLE_LABELS",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"ROLE_COLORS",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"UserRow",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"UserCard",{enumerable:!0,get:function(){return N}});var l=r(d[0]),t=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=e(r(d[6])),S=r(d[7]),T=r(d[8]),O=r(d[9]),R=r(d[10]),b=r(d[11]),C=r(d[12]),x=r(d[13]),E=r(d[14]);const f={SUPER_OWNER:'Super Owner',OWNER:'Owner',ADMIN:'Admin',USER:'User'},L={SUPER_OWNER:O.COLORS.INFO,OWNER:O.COLORS.BLUE,ADMIN:O.COLORS.WARNING,USER:O.COLORS.TEXT_MUTED},h='Deleted account';function I(e){return null==e.email}function p({user:e,isOwner:n,assignableRoles:S,isLoading:T,onRoleChange:O}){const[R,b]=(0,l.useState)(!1),C=L[e.role];return n&&0!==S.length?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(u.default,{accessibilityLabel:`Change role for ${e.email}`,accessibilityRole:"button",style:[D.roleBadge,{backgroundColor:`${C}18`}],onPress:()=>{b(!0)},disabled:T,children:(0,E.jsx)(o.default,{style:[D.roleBadgeText,{color:C}],children:f[e.role]})}),(0,E.jsx)(s.default,{visible:R,transparent:!0,animationType:"fade",onRequestClose:()=>{b(!1)},children:(0,E.jsx)(c.default,{accessibilityLabel:"Dismiss role picker",style:D.roleModalBackdrop,onPress:()=>{b(!1)},children:(0,E.jsxs)(c.default,{style:D.roleModalCard,children:[(0,E.jsx)(o.default,{style:D.roleModalTitle,children:"Change role"}),(0,E.jsx)(o.default,{style:D.roleModalSubtitle,numberOfLines:1,ellipsizeMode:"middle",children:e.email}),S.map(l=>(0,E.jsx)(u.default,{accessibilityLabel:`Set role to ${f[l]} for ${e.email}`,accessibilityRole:"button",style:[D.roleMenuItem,l===e.role&&D.roleMenuItemActive],onPress:()=>{b(!1),l!==e.role&&O(e.id,l)},children:(0,E.jsx)(o.default,{style:[D.roleMenuItemText,{color:L[l]}],children:f[l]})},l))]})})})]}):(0,E.jsx)(t.default,{style:[D.roleBadge,{backgroundColor:`${C}18`}],children:(0,E.jsx)(o.default,{style:[D.roleBadgeText,{color:C}],children:f[e.role]})})}function M({user:e,isOwner:l,assignableRoles:n,isLoading:s,onRoleChange:c,onToggleEnabled:u,onTerminalDelete:S,formatDate:R}){return(0,E.jsxs)(T.ResponsiveTableRow,{style:e.enabled?void 0:D.disabledRow,children:[(0,E.jsxs)(T.ResponsiveTableCell,{style:x.ADMIN_USERS_TABLE_COLUMNS.email,children:[(0,E.jsx)(T.ResponsiveTableText,{style:[D.emailText,null==e.email&&D.deletedEmailText],numberOfLines:1,ellipsizeMode:"tail",children:e.email??h}),(0,E.jsx)(T.ResponsiveTableText,{style:D.userIdText,children:e.id}),null!=e.pictureUrl&&''!==e.pictureUrl&&(0,E.jsx)(o.default,{style:D.hasAvatar,children:"Has avatar"})]}),(0,E.jsx)(T.ResponsiveTableCell,{align:"center",style:x.ADMIN_USERS_TABLE_COLUMNS.role,testID:"admin-user-role-cell",children:(0,E.jsx)(p,{user:e,isOwner:l,assignableRoles:n,isLoading:s,onRoleChange:c})}),(0,E.jsxs)(T.ResponsiveTableCell,{align:"start",style:[x.ADMIN_USERS_TABLE_COLUMNS.status,D.statusCol],testID:"admin-user-status-cell",children:[(0,E.jsx)(t.default,{style:[D.statusDot,{backgroundColor:e.enabled?O.COLORS.SUCCESS:O.COLORS.ERROR}]}),(0,E.jsx)(T.ResponsiveTableText,{style:D.statusText,children:e.enabled?'Active':'Disabled'})]}),(0,E.jsx)(T.ResponsiveTableCell,{style:x.ADMIN_USERS_TABLE_COLUMNS.provider,children:(0,E.jsx)(T.ResponsiveTableText,{style:D.providerText,children:'GOOGLE'===e.authProvider?'Google':'Email'})}),(0,E.jsx)(T.ResponsiveTableCell,{style:x.ADMIN_USERS_TABLE_COLUMNS.date,children:(0,E.jsx)(T.ResponsiveTableText,{style:D.dateText,children:R(e.createdAt)})}),(0,E.jsx)(T.ResponsiveTableCell,{style:x.ADMIN_USERS_TABLE_COLUMNS.date,children:(0,E.jsx)(T.ResponsiveTableText,{style:D.dateText,children:R(e.lastLoginAt)})}),l&&(0,E.jsx)(T.ResponsiveTableCell,{align:"end",style:x.ADMIN_USERS_TABLE_COLUMNS.actions,children:(0,E.jsx)(_,{user:e,isLoading:s,onToggleEnabled:u,onTerminalDelete:S})})]})}const y=(0,l.memo)(M);function A({user:e,isOwner:l,assignableRoles:n,isLoading:s,onRoleChange:c,onToggleEnabled:u,onTerminalDelete:S,formatDate:R}){return(0,E.jsxs)(t.default,{style:[D.card,!e.enabled&&D.disabledRow],children:[(0,E.jsxs)(t.default,{style:D.cardHeader,children:[(0,E.jsxs)(t.default,{style:D.cardIdentity,children:[(0,E.jsx)(T.ResponsiveTableText,{style:[D.emailText,null==e.email&&D.deletedEmailText],numberOfLines:2,ellipsizeMode:"tail",children:e.email??h}),(0,E.jsx)(T.ResponsiveTableText,{style:D.userIdText,children:e.id}),null!=e.pictureUrl&&''!==e.pictureUrl&&(0,E.jsx)(o.default,{style:D.hasAvatar,children:"Has avatar"})]}),(0,E.jsx)(t.default,{style:D.cardRole,children:(0,E.jsx)(p,{user:e,isOwner:l,assignableRoles:n,isLoading:s,onRoleChange:c})})]}
858),(0,E.jsxs)(t.default,{style:D.cardDetails,children:[(0,E.jsx)(j,{label:"Status",children:(0,E.jsxs)(t.default,{style:D.statusInline,children:[(0,E.jsx)(t.default,{style:[D.statusDot,{backgroundColor:e.enabled?O.COLORS.SUCCESS:O.COLORS.ERROR}]}),(0,E.jsx)(T.ResponsiveTableText,{style:D.statusText,children:e.enabled?'Active':'Disabled'})]})}),(0,E.jsx)(j,{label:"Provider",children:(0,E.jsx)(T.ResponsiveTableText,{style:D.providerText,children:'GOOGLE'===e.authProvider?'Google':'Email'})}),(0,E.jsx)(j,{label:"Created",children:(0,E.jsx)(T.ResponsiveTableText,{style:D.dateText,children:R(e.createdAt)})}),(0,E.jsx)(j,{label:"Last Login",children:(0,E.jsx)(T.ResponsiveTableText,{style:D.dateText,children:R(e.lastLoginAt)})})]}),l&&(0,E.jsx)(t.default,{style:D.cardActions,children:(0,E.jsx)(_,{user:e,isLoading:s,onToggleEnabled:u,onTerminalDelete:S})})]})}function _({user:e,isLoading:l,onToggleEnabled:s,onTerminalDelete:c}){if(l)return(0,E.jsx)(n.default,{size:"small",color:O.COLORS.ACTION_PRIMARY});const S=e.email??h;return(0,E.jsxs)(t.default,{style:D.actionButtons,children:[(0,E.jsx)(u.default,{accessibilityLabel:e.enabled?`Disable user: ${S}`:`Enable user: ${S}`,accessibilityRole:"button",style:[D.actionButton,e.enabled?D.disableButton:D.enableButton],onPress:()=>{s(e.id,!e.enabled)},children:(0,E.jsx)(o.default,{style:D.actionButtonText,children:e.enabled?'Disable':'Enable'})}),!I(e)&&(0,E.jsx)(u.default,{accessibilityLabel:`Delete user: ${S}`,accessibilityRole:"button",style:[D.actionButton,D.deleteButton],onPress:()=>{c(e.id,e.email)},children:(0,E.jsx)(o.default,{style:[D.actionButtonText,D.deleteButtonText],children:"Delete"})})]})}function j({children:e,label:l}){return(0,E.jsxs)(t.default,{style:D.cardField,children:[(0,E.jsx)(o.default,{style:D.cardFieldLabel,children:l}),e]})}const N=(0,l.memo)(A),D=(0,S.createStyles)({disabledRow:{backgroundColor:O.COLORS.BG_WASH,opacity:.6},card:{backgroundColor:O.COLORS.BG_SURFACE,borderColor:O.COLORS.BORDER,borderRadius:12,borderWidth:1,gap:b.SPACING.MD,padding:b.SPACING.LG},cardActions:{alignItems:'flex-start',borderTopColor:O.COLORS.BG_SUBTLE_100,borderTopWidth:1,paddingTop:b.SPACING.MD},cardDetails:{gap:b.SPACING.SM},cardField:{alignItems:'flex-start',flexDirection:'row',gap:b.SPACING.MD,justifyContent:'space-between'},cardFieldLabel:{color:O.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},cardHeader:{alignItems:'flex-start',flexDirection:'row',gap:b.SPACING.MD,justifyContent:'space-between'},cardIdentity:{flex:1,minWidth:0},cardRole:{alignItems:'flex-end'},statusCol:{flexDirection:'row',gap:b.SPACING.SM},emailText:{color:O.COLORS.TEXT_PRIMARY,fontSize:C.FONT_SIZE.MD,fontWeight:'500'},deletedEmailText:{color:O.COLORS.TEXT_MUTED,fontStyle:'italic'},hasAvatar:{color:O.COLORS.TEXT_PLACEHOLDER,fontSize:C.FONT_SIZE.XS,marginTop:b.SPACING.MICRO},userIdText:{color:O.COLORS.TEXT_MUTED,fontFamily:C.FONT_FAMILY.MONOSPACE,fontSize:C.FONT_SIZE.XS,marginTop:b.SPACING.MICRO},roleBadge:{borderRadius:12,paddingHorizontal:b.SPACING.MD,paddingVertical:b.SPACING.XS},roleBadgeText:{fontSize:C.FONT_SIZE.XS,fontWeight:'600'},roleModalBackdrop:{alignItems:'center',backgroundColor:O.COLORS.OVERLAY_DARK,flex:1,justifyContent:'center',padding:b.SPACING.LG},roleModalCard:Object.assign({backgroundColor:O.COLORS.BG_SURFACE,borderRadius:12,maxWidth:360,paddingVertical:b.SPACING.SM,width:'100%'},R.ELEVATION.MEDIUM),roleModalTitle:{color:O.COLORS.TEXT_PRIMARY,fontSize:C.FONT_SIZE.MD,fontWeight:'700',paddingHorizontal:b.SPACING.MD,paddingTop:b.SPACING.SM},roleModalSubtitle:{color:O.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.XS,marginBottom:b.SPACING.XS,paddingHorizontal:b.SPACING.MD},roleMenuItem:{paddingHorizontal:b.SPACING.MD,paddingVertical:b.SPACING.SM},roleMenuItemActive:{backgroundColor:O.COLORS.BG_SUBTLE_100},roleMenuItemText:{fontSize:C.FONT_SIZE.SM,fontWeight:'500'},statusDot:{borderRadius:4,height:8,width:8},statusText:{color:O.COLORS.TEXT_BODY,fontSize:C.FONT_SIZE.SM},statusInline:{alignItems:'center',flexDirection:'row',gap:b.SPACING.SM},providerText:{color:O.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.SM},dateText:{color:O.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.SM},actionButtons:{flexDirection:'row',gap:b.SPACING.SM},actionButton:{borderRadius:6,borderWidth:1,paddingHorizontal:b.SPACING.MD,paddingVertical:b.SPACING.SM},actionButtonText:{color:O.COLORS.TEXT_BODY,fontSize:C.FONT_SIZE.XS,fontWeight:'600'},enableButton:{backgroundColor:O.COLORS.SUCCESS_BG,borderColor:O.COLORS.SUCCESS},disableButton:{backgroundColor:O.COLORS.BG_AMBER_TINT,borderColor:O.COLORS.WARNING},deleteButton:{backgroundColor:O.COLORS.ERROR_BG,borderColor:O.COLORS.ERROR},deleteButtonText:{color:O.COLORS.ERROR}})},758,[34,276,222,410,544,369,488,489,687,490,503,493,494,757,104]);
859__d(function(g,r,i,a,m,_e,d){"use strict";
859Object.defineProperty(_e,'__esModule',{value:!0}),_e.AdminBillingPanel=function(){const[e,t]=(0,s.useState)('purchases'),o=y[e];return(0,p.jsxs)(n.default,{style:_.container,children:[(0,p.jsx)(l.TabBar,{tabs:v,activeTab:e,onTabChange:e=>{k(e)&&t(e)},variant:"underline",style:_.sectionNav,testID:"billing-section-nav"}),(0,p.jsx)(o,{})]})};var e,s=r(d[0]),t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[2]),c=r(d[3]),l=r(d[4]),u=r(d[5]),b=r(d[6]),h=r(d[7]),p=r(d[8]);const S=['purchases','webhooks','tables'],f={purchases:'Point Purchases',webhooks:'Shopify Webhooks',tables:'Table Browser'},v=S.map(e=>({key:e,label:f[e]})),P=new Set(S);function k(e){return P.has(e)}const y={purchases:b.PointPurchaseSection,webhooks:h.WebhooksSection,tables:u.BillingTablesSection};const _=(0,c.createStyles)({container:{gap:o.SPACING.LG},sectionNav:{marginBottom:0}})},759,[34,276,493,489,732,760,763,764,104]);
860__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BillingTablesSection=function(){const[e,l]=(0,t.useState)(null),[n,x]=(0,t.useState)(null),[C,y]=(0,t.useState)(null),[p,T]=(0,t.useState)(!0),[B,N]=(0,t.useState)(!1),[E,w]=(0,t.useState)(null),[M,G]=(0,t.useState)(0),[_,z]=(0,t.useState)(''),[D,v]=(0,t.useState)(''),[W,X]=(0,t.useState)(null),[F,H]=(0,t.useState)(new Set),V=(0,t.useRef)(!0),Y=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{V.current=!1},[]),(0,t.useEffect)(()=>(null!=Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>{v(_),G(0)},300),()=>{null!=Y.current&&clearTimeout(Y.current)}),[_]);const $=(0,t.useCallback)(async()=>{try{T(!0),w(null);const e=await P.billingAdminApi.listTables();if(!V.current)return;l(e);const t=e.length>0?e[0]:null;null!=t&&null==n&&x(t)}catch(e){if(!V.current)return;w((0,k.errorMessage)(e,'Failed to load table catalog'))}finally{V.current&&T(!1)}},[n]);(0,t.useEffect)(()=>{$()},[]);const Z=(0,t.useCallback)(async()=>{if(null!=n)try{N(!0),w(null);const e=await P.billingAdminApi.listBillingTable(Object.assign({source:n.source,table:n.table,page:M,size:20},''!==D?{search:D}:{},null!=W?{sort:W.column,direction:W.direction}:{}));if(!V.current)return;y(e)}catch(e){if(!V.current)return;w((0,k.errorMessage)(e,'Failed to load table data'))}finally{V.current&&N(!1)}},[n,M,D,W]);(0,t.useEffect)(()=>{Z()},[Z]);const U=(0,t.useCallback)(e=>{x(e),G(0),z(''),v(''),X(null),H(new Set),y(null)},[]),K=(0,t.useCallback)(e=>{H(t=>{const l=new Set(t);return l.has(e)?l.delete(e):l.add(e),l})},[]),q=(0,t.useCallback)(()=>{H(e=>0===e.size&&null!=C?new Set(C.columns):new Set)},[C]),J=(0,t.useMemo)(()=>C?.columns.filter(e=>!F.has(e))??[],[C?.columns,F]),Q=(0,t.useMemo)(()=>{if(null==C)return{};const e={};for(const t of J)null!=C.columnTypes[t]&&(e[t]=C.columnTypes[t]);return e},[C,J]),ee=(0,t.useCallback)(e=>{X(t=>t?.column===e?'desc'===t.direction?{column:e,direction:'asc'}:null:{column:e,direction:'desc'}),G(0)},[]),te=(0,t.useCallback)(e=>{const t=e.id;if(null!=t&&('string'==typeof t||'number'==typeof t))return String(t);return(C?.columns??[]).map(t=>String(e[t]??'')).join('|')},[C?.columns]);if(p&&null==e)return(0,A.jsx)(b.LoadingState,{message:"Loading table catalog..."});if(null!=E&&null==e)return(0,A.jsxs)(S.Card,{children:[(0,A.jsx)(o.default,{style:R.adminSectionStyles.errorText,children:E}),(0,A.jsx)(c.default,{style:R.adminSectionStyles.retryButton,onPress:()=>{$()},children:(0,A.jsx)(o.default,{style:R.adminSectionStyles.retryButtonText,children:"Retry"})})]});if(null==e||0===e.length)return(0,A.jsx)(S.Card,{children:(0,A.jsx)(o.default,{style:R.adminSectionStyles.emptyText,children:"No tables available."})});const le=O(e);return(0,A.jsxs)(s.default,{style:R.adminSectionStyles.sectionContent,children:[(0,A.jsx)(j,{sources:le,selected:n,onSelect:U}),(0,A.jsxs)(s.default,{style:L.searchRow,children:[(0,A.jsx)(u.AppTextInput,{value:_,onChangeText:z,placeholder:"Search...",style:L.searchInput}),null!=C&&(0,A.jsx)(I,{allColumns:C.columns,hiddenColumns:F,onToggle:K,onToggleAll:q})]}),null!=E&&(0,A.jsx)(o.default,{style:R.adminSectionStyles.inlineError,children:E}),B&&null==C&&(0,A.jsx)(b.LoadingState,{message:"Loading table data..."}),null!=C&&(0,A.jsx)(h.DataTable,{columns:J,columnTypes:Q,rows:C.content,getRowKey:te,sort:W,onSort:ee,loading:B}),null!=C&&(0,A.jsx)(f.Pagination,{page:M,totalPages:C.totalPages,onPageChange:G,itemLabel:"rows"})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),c=e(r(d[4])),s=e(r(d[5])),u=r(d[6]),S=r(d[7]),b=r(d[8]),h=r(d[9]),f=r(d[10]),x=r(d[11]),
860C=r(d[12]),y=r(d[13]),p=r(d[14]),T=r(d[15]),k=r(d[16]),R=r(d[17]),P=r(d[18]),A=r(d[19]);function O(e){const t=new Map;for(const l of e){const e=t.get(l.source);null!=e?e.push(l):t.set(l.source,[l])}return t}function j({sources:e,selected:t,onSelect:l}){return(0,A.jsx)(s.default,{style:L.tablePicker,children:Array.from(e.entries()).map(([e,n])=>{return(0,A.jsxs)(s.default,{style:L.tablePickerGroup,children:[(0,A.jsx)(o.default,{style:L.tablePickerGroupLabel,children:(u=e,u.charAt(0).toUpperCase()+u.slice(1))}),(0,A.jsx)(s.default,{style:L.tablePickerButtons,children:n.map(e=>{const n=t?.source===e.source&&t.table===e.table;return(0,A.jsx)(c.default,{style:[L.tablePickerButton,n&&L.tablePickerButtonActive],onPress:()=>{l(e)},accessibilityRole:"button",accessibilityState:{selected:n},children:(0,A.jsx)(o.default,{style:[L.tablePickerButtonText,n&&L.tablePickerButtonTextActive],children:e.displayName})},`${e.source}-${e.table}`)})})]},e);var u})})}function I({allColumns:e,hiddenColumns:u,onToggle:S,onToggleAll:b}){const[f,x]=(0,t.useState)(!1),C=0===u.size;return(0,A.jsxs)(s.default,{style:L.columnSelectorContainer,children:[(0,A.jsx)(c.default,{style:[L.tablePickerButton,f&&L.tablePickerButtonActive],onPress:()=>{x(e=>!e)},accessibilityRole:"button",accessibilityLabel:"Toggle column visibility",children:(0,A.jsxs)(o.default,{style:[L.tablePickerButtonText,f&&L.tablePickerButtonTextActive],children:["Columns",u.size>0?` (${e.length-u.size}/${e.length})`:'']})}),f&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(l.default,{style:L.columnSelectorBackdrop,onPress:()=>{x(!1)}}),(0,A.jsx)(s.default,{style:L.columnSelectorDropdown,children:(0,A.jsxs)(n.default,{children:[(0,A.jsxs)(l.default,{style:[L.columnSelectorRow,L.columnSelectorToggleAll],onPress:b,accessibilityRole:"checkbox",accessibilityState:{checked:C},children:[(0,A.jsx)(s.default,{style:[L.checkbox,C&&L.checkboxChecked],children:C&&(0,A.jsx)(o.default,{style:L.checkmark,children:"\u2713"})}),(0,A.jsx)(o.default,{style:[L.columnSelectorLabel,L.columnSelectorToggleAllLabel],children:C?'Deselect All':'Select All'})]}),e.map(e=>{const t=!u.has(e);return(0,A.jsxs)(l.default,{style:L.columnSelectorRow,onPress:()=>{S(e)},accessibilityRole:"checkbox",accessibilityState:{checked:t},children:[(0,A.jsx)(s.default,{style:[L.checkbox,t&&L.checkboxChecked],children:t&&(0,A.jsx)(o.default,{style:L.checkmark,children:"\u2713"})}),(0,A.jsx)(o.default,{style:L.columnSelectorLabel,children:(0,h.camelToTitle)(e)})]},e)})]})})]})]})}const L=(0,T.createStyles)({checkbox:{alignItems:'center',borderColor:x.COLORS.BORDER,borderRadius:3,borderWidth:1.5,height:18,justifyContent:'center',width:18},checkboxChecked:{backgroundColor:x.COLORS.ACTION_PRIMARY,borderColor:x.COLORS.ACTION_PRIMARY},checkmark:{color:x.COLORS.TEXT_INVERSE,fontSize:12,fontWeight:'700',lineHeight:14},columnSelectorBackdrop:{position:'absolute',top:-1e3,left:-1e3,right:-1e3,bottom:-1e3,width:3e3,height:3e3},columnSelectorContainer:{position:'relative',zIndex:10},columnSelectorDropdown:Object.assign({backgroundColor:x.COLORS.BG_SURFACE,borderRadius:8,maxHeight:320,minWidth:200,paddingVertical:y.SPACING.XS,position:'absolute',right:0,top:40,zIndex:11},C.ELEVATION.RAISED),columnSelectorLabel:{color:x.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.SM},columnSelectorRow:{alignItems:'center',flexDirection:'row',gap:y.SPACING.SM,paddingHorizontal:y.SPACING.MD,paddingVertical:y.SPACING.SM},columnSelectorToggleAll:{borderBottomColor:x.COLORS.BORDER_LIGHT,borderBottomWidth:1,marginBottom:y.SPACING.XS,paddingBottom:y.SPACING.SM},columnSelectorToggleAllLabel:{fontWeight:'600'},searchInput:{flex:1},searchRow:{alignItems:'center',flexDirection:'row',gap:y.SPACING.MD,zIndex:10},tablePicker:{gap:y.SPACING.LG},tablePickerButton:{backgroundColor:x.COLORS.BG_WASH,borderColor:x.COLORS.BORDER,borderRadius:8,borderWidth:1,paddingHorizontal:y.SPACING.LG,paddingVertical:y.SPACING.SM},tablePickerButtonActive:{backgroundColor:x.COLORS.ACTION_PRIMARY,borderColor:x.COLORS.ACTION_PRIMARY},tablePickerButtonText:{color:x.COLORS.TEXT_SECONDARY,fontSize:p.FONT_SIZE.SM,fontWeight:'500'},tablePickerButtonTextActive:{color:x.COLORS.TEXT_INVERSE,fontWeight:'600'},tablePickerButtons:{flexDirection:'row',flexWrap:'wrap',gap:y.SPACING.SM},tablePickerGroup:{gap:y.SPACING.SM},tablePickerGroupLabel:{color:x.COLORS.TEXT_CAPTION,fontSize:p.FONT_SIZE.XS,fontWeight:'600',textTransform:'uppercase'}})},760,[34,369,283,222,488,276,711,605,512,682,712,490,503,493,494,489,468,761,762,104]);
861__d(function(g,r,i,a,m,e,d){"use strict";
861Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"adminSectionStyles",{enumerable:!0,get:function(){return S}});var t=r(d[0]),o=r(d[1]),n=r(d[2]);const S=(0,r(d[3]).createStyles)({emptyText:{color:t.COLORS.TEXT_MUTED,fontSize:n.FONT_SIZE.MD,textAlign:'center'},errorText:{color:t.COLORS.ERROR,fontSize:n.FONT_SIZE.MD,marginBottom:o.SPACING.MD},inlineError:{color:t.COLORS.ERROR,fontSize:n.FONT_SIZE.SM,marginBottom:o.SPACING.SM},retryButton:{alignSelf:'flex-start',backgroundColor:t.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:o.SPACING.XL,paddingVertical:o.SPACING.SM},retryButtonText:{color:t.COLORS.TEXT_INVERSE,fontSize:n.FONT_SIZE.SM,fontWeight:'600'},sectionContent:{gap:o.SPACING.LG}})},761,[490,493,494,489]);
862__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"billingAdminApi",{enumerable:!0,get:function(){return l}});var t=r(d[0]);const n=new Set(['string','number','boolean','datetime']);function s(t){return n.has(t)}function o(t){const n={};for(const[o,c]of Object.entries(t.columnTypes))n[o]=s(c)?c:'string';const o=t.content.map(t=>{const n={};for(const[s,o]of Object.entries(t))n[s]=null===o||'string'==typeof o||'number'==typeof o||'boolean'==typeof o?o:JSON.stringify(o);return n});return Object.assign({},t,{columnTypes:n,content:o})}function c(t){const n={};for(const[s,o]of Object.entries(t))void 0!==o&&(n[s]=o);return n}const l={listTables:async()=>(await t.admin.catalog()).tables,async listBillingTable(n){const{source:s,table:l,page:u=0,size:f=20,search:b,sort:p,direction:y}=n;return o(await t.admin.list({path:{source:s,table:l},query:c({page:u,size:f,search:b,sort:p,direction:y})}))},async getPointPurchaseOverview(n={}){const{page:s=0,size:o=20,search:l,direction:u}=n;return t.admin.getPointPurchaseOverview({query:c({page:s,size:o,search:l,direction:u})})},listWebhooks:async()=>t.admin.listWebhooks(),getFulfillmentDetails:async n=>t.admin.getDetails({path:{fulfillmentLineItemId:n}})}},762,[471]);
863__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PointPurchaseSection=function(){const[e,f]=(0,t.useState)(null),[S,p]=(0,t.useState)(!0),[T,h]=(0,t.useState)(null),[b,O]=(0,t.useState)(0),[I,L]=(0,t.useState)(''),[A,N]=(0,t.useState)(''),E=(0,t.useRef)(!0),w=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{E.current=!1},[]),(0,t.useEffect)(()=>(null!=w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{N(I),O(0)},300),()=>{null!=w.current&&clearTimeout(w.current)}),[I]);const _=(0,t.useCallback)(async()=>{try{p(!0),h(null);const e=await R.billingAdminApi.getPointPurchaseOverview(Object.assign({page:b,size:15},''!==A?{search:A}:{}));if(!E.current)return;f(e)}catch(e){if(!E.current)return;h((0,j.errorMessage)(e,'Failed to load point purchase data'))}finally{E.current&&p(!1)}},[b,A]);if((0,t.useEffect)(()=>{_()},[_]),S&&null==e)return(0,C.jsx)(u.LoadingState,{message:"Loading point purchases..."});if(null!=T&&null==e)return(0,C.jsxs)(c.Card,{children:[(0,C.jsx)(l.default,{style:y.adminSectionStyles.errorText,children:T}),(0,C.jsx)(s.default,{style:y.adminSectionStyles.retryButton,onPress:()=>{_()},children:(0,C.jsx)(l.default,{style:y.adminSectionStyles.retryButtonText,children:"Retry"})})]});if(null==e)return(0,C.jsx)(n.default,{});return(0,C.jsxs)(n.default,{style:y.adminSectionStyles.sectionContent,children:[(0,C.jsx)(v,{periods:e.periods}),(0,C.jsx)(n.default,{style:z.searchRow,children:(0,C.jsx)(o.AppTextInput,{value:I,onChangeText:L,placeholder:"Search by organization name...",style:z.searchInput})}),null!=T&&(0,C.jsx)(l.default,{style:y.adminSectionStyles.inlineError,children:T}),(0,C.jsx)(P,{rows:e.activity.content}),(0,C.jsx)(x.Pagination,{page:b,totalPages:e.activity.totalPages,onPageChange:O,itemLabel:"purchases"})]})};var t=r(d[0]),l=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),o=r(d[4]),c=r(d[5]),u=r(d[6]),x=r(d[7]),f=r(d[8]),S=r(d[9]),p=r(d[10]),T=r(d[11]),h=r(d[12]),b=r(d[13]),j=r(d[14]),y=r(d[15]),R=r(d[16]),C=r(d[17]);const O={organization:{flexBasis:220,flexGrow:2,minWidth:220},points:{flexBasis:90,flexGrow:1,minWidth:90},balance:{flexBasis:170,flexGrow:1,minWidth:170},status:{flexBasis:120,flexGrow:1,minWidth:120},date:{flexBasis:170,flexGrow:1,minWidth:170}},I=840;function v({periods:e}){return(0,C.jsxs)(n.default,{style:z.periodSection,children:[(0,C.jsx)(l.default,{style:z.periodSectionLabel,children:"All Activity"}),(0,C.jsxs)(n.default,{style:z.periodRow,testID:"point-purchase-period-row",children:[(0,C.jsx)(L,{label:"Today",totals:e.today}),(0,C.jsx)(L,{label:"This Week",totals:e.thisWeek}),(0,C.jsx)(L,{label:"This Month",totals:e.thisMonth})]})]})}function L({label:e,totals:t}){return(0,C.jsxs)(c.Card,{style:z.periodCard,children:[(0,C.jsx)(l.default,{style:z.periodLabel,children:e}),(0,C.jsx)(l.default,{style:z.periodValue,children:t.orders.toLocaleStr
863ing()}),(0,C.jsx)(l.default,{style:z.periodSubLabel,children:"orders"}),(0,C.jsxs)(n.default,{style:z.periodStats,children:[(0,C.jsxs)(l.default,{style:z.periodStatText,children:[_(t.pointsPurchased)," pts"]}),t.problems>0&&(0,C.jsxs)(l.default,{style:z.periodProblem,children:[t.problems," issue",1!==t.problems?'s':'']})]})]})}function P({rows:e}){return 0===e.length?(0,C.jsx)(c.Card,{children:(0,C.jsx)(l.default,{style:y.adminSectionStyles.emptyText,children:"No point purchase activity found."})}):(0,C.jsxs)(f.ResponsiveTable,{minWidth:I,compactContent:e.map(e=>(0,C.jsx)(N,{row:e},e.fulfillmentRecordId)),testID:"point-purchase-table",children:[(0,C.jsxs)(f.ResponsiveTableHeader,{children:[(0,C.jsx)(f.ResponsiveTableCell,{style:O.organization,children:(0,C.jsx)(f.ResponsiveTableHeaderText,{children:"Organization"})}),(0,C.jsx)(f.ResponsiveTableCell,{align:"end",style:O.points,children:(0,C.jsx)(f.ResponsiveTableHeaderText,{children:"Points"})}),(0,C.jsx)(f.ResponsiveTableCell,{style:O.balance,children:(0,C.jsx)(f.ResponsiveTableHeaderText,{children:"Balance Before/After"})}),(0,C.jsx)(f.ResponsiveTableCell,{style:O.status,children:(0,C.jsx)(f.ResponsiveTableHeaderText,{children:"Status"})}),(0,C.jsx)(f.ResponsiveTableCell,{style:O.date,children:(0,C.jsx)(f.ResponsiveTableHeaderText,{children:"Date"})})]}),e.map(e=>(0,C.jsx)(A,{row:e},e.fulfillmentRecordId))]})}function A({row:e}){return(0,C.jsxs)(f.ResponsiveTableRow,{children:[(0,C.jsxs)(f.ResponsiveTableCell,{style:O.organization,children:[(0,C.jsx)(f.ResponsiveTableText,{style:z.cellText,numberOfLines:1,children:e.organizationName??'(missing)'}),(0,C.jsx)(f.ResponsiveTableText,{style:z.cellSubText,numberOfLines:1,children:e.organizationId})]}),(0,C.jsx)(f.ResponsiveTableCell,{align:"end",style:O.points,children:(0,C.jsx)(f.ResponsiveTableText,{style:z.cellText,children:_(e.pointsCredited)})}),(0,C.jsx)(f.ResponsiveTableCell,{style:O.balance,children:(0,C.jsxs)(f.ResponsiveTableText,{style:z.cellSubText,children:[w(e.balanceBefore)," ",'\u2192'," ",w(e.balanceAfter)]})}),(0,C.jsx)(f.ResponsiveTableCell,{style:O.status,children:(0,C.jsx)(E,{status:e.localStatus})}),(0,C.jsx)(f.ResponsiveTableCell,{style:O.date,children:(0,C.jsx)(f.ResponsiveTableText,{style:z.cellText,children:(0,b.formatIsoDateTime)(e.createdAt)})})]})}function N({row:e}){return(0,C.jsxs)(c.Card,{style:z.card,children:[(0,C.jsxs)(n.default,{style:z.cardHeader,children:[(0,C.jsxs)(n.default,{style:z.cardOrg,children:[(0,C.jsx)(f.ResponsiveTableText,{style:z.cellText,numberOfLines:2,children:e.organizationName??'(missing)'}),(0,C.jsx)(f.ResponsiveTableText,{style:z.cellSubText,children:e.organizationId})]}),(0,C.jsx)(E,{status:e.localStatus})]}),(0,C.jsxs)(n.default,{style:z.cardField,children:[(0,C.jsx)(l.default,{style:z.cardFieldLabel,children:"Points"}),(0,C.jsx)(f.ResponsiveTableText,{style:z.cellText,children:_(e.pointsCredited)})]}),(0,C.jsxs)(n.default,{style:z.cardField,children:[(0,C.jsx)(l.default,{style:z.cardFieldLabel,children:"Balance Before/After"}),(0,C.jsxs)(f.ResponsiveTableText,{style:z.cellSubText,children:[w(e.balanceBefore)," ",'\u2192'," ",w(e.balanceAfter)]})]}),(0,C.jsxs)(n.default,{style:z.cardField,children:[(0,C.jsx)(l.default,{style:z.cardFieldLabel,children:"Date"}),(0,C.jsx)(f.ResponsiveTableText,{style:z.cellSubText,children:(0,b.formatIsoDateTime)(e.createdAt)})]})]})}function E({status:e}){const t='credited'===e;return(0,C.jsx)(l.default,{style:[z.statusBadge,t?z.statusOk:z.statusWarn],children:e})}function w(e){return null==e?'\u2014':e.toLocaleString()}function _(e){return Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(0)}K`:e.toLocaleString()}const z=(0,h.createStyles)({card:{gap:p.SPACING.SM},cardField:{alignItems:'flex-start',flexDirection:'row',gap:p.SPACING.MD,justifyContent:'space-between'},cardFieldLabel:{color:S.COLORS.TEXT_CAPTION,fontSize:T.FONT_SIZE.XS,fontWeight:'600',textTransform:'uppercase'},cardHeader:{alignItems:'flex-start',flexDirection:'row',gap:p.SPACING.MD,justifyContent:'space-between'},cardOrg:{flex:1,minWidth:0},cellSubText:{color:S.COLORS.TEXT_CAPTION,fontSize:T.FONT_SIZE.XS},cellText:{color:S.COLORS.TEXT_PRIMARY,fontSize:T.FONT_SIZE.SM},periodCard:{alignItems:'center',flex:1,minWidth:140},periodLabel:{color:S.COLORS.TEXT_SECONDARY,fontSize:T.FONT_SIZE.XS,fontWeight:'600',marginBottom:p.SPACING.XS,textTransform:'uppercase'},periodProblem:{color:S.COLORS.ERROR,fontSize:T.FONT_SIZE.XS,fontWeight:'600'},periodRow:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.MD},periodSection:{gap:p.SPACING.SM},periodSectionLabel:{color:S.COLORS.TEXT_CAPTION,fontSize:T.FONT_SIZE.XS,fontWeight:'600',textTransform:'uppercase'},periodStatText:{color:S.COLORS.TEXT_CAPTION,fontSize:T.FONT_SIZE.XS},periodStats:{alignItems:'center',gap:p.SPACING.XS,marginTop:p.SPACING.SM},periodSubLabel:{color:S.COLORS.TEXT_CAPTION,fontSize:T.FONT_SIZE.SM},periodValue:{color:S.COLORS.TEXT_PRIMARY,fontSize:T.FONT_SIZE.DISPLAY_SM,fontWeight:'700'},searchInput:{flex:1},searchRow:{flexDirection:'row',gap:p.SPACING.MD},statusBadge:{borderRadius:4,fontSize:T.FONT_SIZE.XS,fontWeight:'600',overflow:'hidden',paddingHorizontal:p.SPACING.SM,paddingVertical:2,textAlign:'center'},statusOk:{backgroundColor:S.COLORS.SUCCESS_BG,color:S.COLORS.SUCCESS},statusWarn:{backgroundColor:S.COLORS.ERROR_BG,color:S.COLORS.ERROR}})},763,[34,222,488,276,711,605,512,712,687,490,493,494,489,685,468,761,762,104]);
864__d(function(g,r,i,a,m,_e,d){"use strict";
864function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.WebhooksSection=function(){const[e,c]=(0,t.useState)(null),[f,S]=(0,t.useState)(!0),[h,T]=(0,t.useState)(null),j=(0,t.useRef)(!0);(0,t.useEffect)(()=>()=>{j.current=!1},[]);const C=(0,t.useCallback)(async()=>{try{S(!0),T(null);const e=await x.billingAdminApi.listWebhooks();if(!j.current)return;c(e)}catch(e){if(!j.current)return;T((0,y.errorMessage)(e,'Failed to load webhooks'))}finally{j.current&&S(!1)}},[]);if((0,t.useEffect)(()=>{C()},[C]),f&&null==e)return(0,k.jsx)(u.LoadingState,{message:"Loading webhooks..."});if(null!=h&&null==e)return(0,k.jsxs)(s.Card,{children:[(0,k.jsx)(n.default,{style:b.adminSectionStyles.errorText,children:h}),(0,k.jsx)(o.default,{style:b.adminSectionStyles.retryButton,onPress:()=>{C()},children:(0,k.jsx)(n.default,{style:b.adminSectionStyles.retryButtonText,children:"Retry"})})]});if(null==e||0===e.length)return(0,k.jsx)(s.Card,{children:(0,k.jsx)(n.default,{style:b.adminSectionStyles.emptyText,children:null==e?'':'No webhook subscriptions found.'})});return(0,k.jsxs)(l.default,{style:b.adminSectionStyles.sectionContent,children:[null!=h&&(0,k.jsx)(n.default,{style:b.adminSectionStyles.inlineError,children:h}),e.map(e=>(0,k.jsx)(w,{webhook:e},e.id??`${e.topic??'unknown'}-${e.uri??''}`))]})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),s=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7]),S=r(d[8]),h=r(d[9]),y=r(d[10]),b=r(d[11]),x=r(d[12]),k=r(d[13]);function w({webhook:e}){return(0,k.jsxs)(s.Card,{style:T.webhookCard,children:[(0,k.jsx)(n.default,{style:T.webhookTopic,children:e.topic??'Unknown topic'}),null!=e.name&&(0,k.jsxs)(n.default,{style:T.webhookDetail,children:["Name: ",e.name]}),null!=e.uri&&(0,k.jsxs)(n.default,{style:T.webhookDetail,numberOfLines:1,children:["URI: ",e.uri]}),(0,k.jsxs)(l.default,{style:T.webhookMeta,children:[null!=e.apiVersion&&(0,k.jsxs)(n.default,{style:T.webhookMetaText,children:["v",e.apiVersion]}),null!=e.format&&(0,k.jsx)(n.default,{style:T.webhookMetaText,children:e.format})]})]})}const T=(0,h.createStyles)({webhookCard:{gap:f.SPACING.XS},webhookDetail:{color:c.COLORS.TEXT_SECONDARY,fontSize:S.FONT_SIZE.SM},webhookMeta:{flexDirection:'row',gap:f.SPACING.MD,marginTop:f.SPACING.XS},webhookMetaText:{backgroundColor:c.COLORS.BG_WASH,borderRadius:4,color:c.COLORS.TEXT_CAPTION,fontSize:S.FONT_SIZE.XS,overflow:'hidden',paddingHorizontal:f.SPACING.SM,paddingVertical:2},webhookTopic:{color:c.COLORS.TEXT_PRIMARY,fontSize:S.FONT_SIZE.MD,fontWeight:'600'}})},764,[34,222,488,276,605,512,490,493,494,489,468,761,762,104]);
865__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachHubPanel=function(){const e=(0,f.useAppNavigation)(),{readiness:l,loading:c,error:u,retry:h}=(0,S.useOrderOutreachReadiness)(),[R,I]=(0,t.useState)(0);return(0,t.useEffect)(()=>e.addListener('focus',()=>{I(e=>e+1)}),[e]),(0,y.jsxs)(o.default,{style:x.container,children:[(0,y.jsx)(s.AppLink,{to:"Admin",accessibilityLabel:"Admin dashboard",style:x.adminLink,testID:"order-outreach-hub-admin-link",children:(0,y.jsx)(n.default,{style:x.adminLinkText,children:"\u2190 Admin dashboard"})}),(0,y.jsxs)(o.default,{style:x.headerRow,children:[(0,y.jsx)(n.default,{accessibilityRole:"header",style:x.title,testID:"order-outreach-hub-heading",children:"Order updates"}),(0,y.jsx)(s.AppLink,{to:"OrderOutreachNew",accessibilityLabel:"New order update",style:x.primaryButton,testID:"order-outreach-new-button",children:(0,y.jsx)(n.default,{style:x.primaryButtonText,children:"New order update"})})]}),(0,y.jsx)(p.OrderOutreachReadinessBanner,{readiness:l,loading:c,error:u,onRetry:h}),(0,y.jsx)(O.OrderOutreachCampaignSection,{listRefreshEpoch:R})]})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),s=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]),h=r(d[7]),f=r(d[8]),O=r(d[9]),p=r(d[10]),S=r(d[11]),y=r(d[12]);const x=(0,h.createStyles)({adminLink:{alignSelf:'flex-start',marginBottom:-c.SPACING.MD},adminLinkText:{color:l.COLORS.TEXT_MUTED,fontSize:u.FONT_SIZE.SM,fontWeight:'600'},container:{gap:c.SPACING.XL},headerRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.MD,justifyContent:'space-between'},primaryButton:{backgroundColor:l.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:c.SPACING.XL,paddingVertical:c.SPACING.MD},primaryButtonText:{color:l.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.MD,fontWeight:'700'},title:{color:l.COLORS.TEXT_PRIMARY,flexGrow:1,flexShrink:1,fontSize:u.FONT_SIZE.XL,fontWeight:'700'}})},765,[34,222,276,516,490,493,494,489,505,766,776,777,104]);
866__d(function(g,r,i,a,m,_e,d){"use strict";
866function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachCampaignSection=function({listRefreshEpoch:e}){const[n,s]=(0,t.useState)(0);return(0,C.jsx)(o.Card,{style:x.campaignStyles.sectionCard,children:(0,C.jsx)(A,{refreshKey:e,page:n,onPageChange:s})})};var t=r(d[0]),n=e(r(d[1])),s=e(r(d[2])),l=e(r(d[3])),c=r(d[4]),o=r(d[5]),u=r(d[6]),p=r(d[7]),y=r(d[8]),h=r(d[9]),S=r(d[10]),f=r(d[11]),x=r(d[12]),j=r(d[13]),b=r(d[14]),C=r(d[15]);const L=20,O=[{id:'campaign',header:'Campaign',accessor:e=>`${e.name}\n${e.subject}`,minWidth:250,maxWidth:310,flexGrow:2,align:'start',enableSort:!1,render:(e,{isExpanded:t})=>(0,C.jsx)(c.AppLink,{to:"OrderOutreachDetail",href:`/admin/order-outreach/${e.id}`,accessibilityLabel:R(e),style:x.campaignStyles.campaignLinkCell,children:(0,C.jsxs)(l.default,{style:x.campaignStyles.campaignIdentity,children:[(0,C.jsx)(n.default,{numberOfLines:t?void 0:1,style:[x.campaignStyles.campaignSubject,(0,p.expandedWordBreakStyle)(t)],children:e.name}),(0,C.jsx)(n.default,{numberOfLines:t?void 0:1,style:[x.campaignStyles.campaignSubjectSecondary,(0,p.expandedWordBreakStyle)(t)],children:e.subject}),(0,C.jsx)(n.default,{style:x.campaignStyles.campaignViewLink,children:"View campaign \u2192"})]})})},{id:'state',header:'State',accessor:e=>f.CAMPAIGN_STATE_LABELS[e.state],width:90,align:'center',enableSort:!1,render:e=>(0,C.jsx)(f.StateBadge,{state:e.state})},{id:'created',header:'Created',accessor:e=>(0,f.formatInstant)(e.createdAt),minWidth:145,maxWidth:200,flexGrow:1,align:'center',enableSort:!1},{id:'recipients',header:'Recipients',accessor:e=>P(e.includedRecipientCount,e.excludedRecipientCount),minWidth:165,maxWidth:235,flexGrow:1,align:'center',enableSort:!1},{id:'orders',header:'Orders',accessor:e=>P(e.includedOrderCount,e.excludedOrderCount),minWidth:160,maxWidth:225,flexGrow:1,align:'center',enableSort:!1},{id:'progress',header:'Send progress',accessor:W,minWidth:155,maxWidth:215,flexGrow:1,align:'center',enableSort:!1},{id:'filters',header:'Filters',accessor:e=>(0,j.campaignFilterSummary)(e.filter,e.filterDisplay),minWidth:140,maxWidth:230,flexGrow:2,align:'start',enableSort:!1}];function A({refreshKey:e,page:t,onPageChange:c}){const{data:o,loading:f,error:j,retry:b}=(0,h.useAsyncData)(async()=>S.orderOutreachAdminApi.listCampaigns(t,L),[t,e],'Failed to load order updates');return(0,C.jsxs)(l.default,{style:x.campaignStyles.campaignHistory,children:[f&&(0,C.jsx)(u.LoadingState,{message:"Loading updates\u2026"}),null!=j&&(0,C.jsxs)(l.default,{style:x.campaignStyles.actionRow,children:[(0,C.jsx)(n.default,{accessibilityRole:"alert",style:x.campaignStyles.errorText,children:j}),(0,C.jsx)(s.default,{accessibilityRole:"button",accessibilityLabel:"Retry loading updates",onPress:b,children:(0,C.jsx)(n.default,{style:x.campaignStyles.linkText,children:"Retry"})})]}),null!=o&&!f&&(0===o.campaigns.length?(0,C.jsx)(l.default,{testID:"order-outreach-hub-empty",children:(0,C.jsx)(u.EmptyState,{message:"No order updates yet. Start by finding the orders you need to notify."})}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(n.default,{style:x.campaignStyles.recipientsTitle,children:"Previous updates"}),(0,C.jsx)(p.ColumnTable,{align:"start",columns:O,rows:o.campaigns,getRowKey:e=>e.id,compactContent:o.campaigns.map(e=>(0,C.jsx)(w,{summary:e},e.id)),getRowStyle:e=>'CANCELLED'===e.state?x.campaignStyles.cancelledRow:void 0,getRowTestID:e=>'CANCELLED'===e.state?'order-outreach-campaign-row-cancelled':void 0,testID:"order-outreach-campaign-table"}),o.totalPages>1&&(0,C.jsx)(y.Pagination,{page:t,totalPages:o.totalPages,onPageChange:c,itemLabel:"updates"})]}))]})}function w({summary:e}){const t='CANCELLED'===e.state;return(0,C.jsx)(c.AppLink,{to:"OrderOutreachDetail",href:`/admin/order-outreach/${e.id}`,accessibilityLabel:R(e),children:(0,C.jsxs)(o.Card,Object.assign({},t?{testID:'order-outreach-campaign-row-cancelled'}:{},{style:[x.campaignStyles.summaryCard,t&&x.campaignStyles.cancelledRow],children:[(0,C.jsx)(n.default,{numberOfLines:1,style:x.campaignStyles.campaignSubject,children:e.name}),(0,C.jsxs)(n.default,{numberOfLines:1,style:x.campaignStyles.campaignSubjectSecondary,children:["Subject: ",e.subject]}),(0,C.jsxs)(l.default,{style:x.campaignStyles.summaryCardFilters,children:[(0,C.jsx)(n.default,{style:x.campaignStyles.summaryCardFilterLabel,children:"Filters"}),(0,C.jsx)(n.default,{numberOfLines:4,style:x.campaignStyles.campaignFilterSummary,children:(0,j.campaignFilterSummary)(e.filter,e.filterDisplay)})]}),(0,C.jsxs)(l.default,{style:x.campaignStyles.summaryCardHeader,children:[(0,C.jsx)(f.StateBadge,{state:e.state}),(0,C.jsx)(n.default,{style:x.campaignStyles.orderText,children:W(e)})]}),(0,C.jsxs)(n.default,{style:x.campaignStyles.orderText,children:["Created ",(0,f.formatInstant)(e.createdAt)]}),(0,C.jsxs)(n.default,{style:x.campaignStyles.mutedText,children:["Recipients: ",P(e.includedRecipientCount,e.excludedRecipientCount),' ',"\xb7 Orders: ",P(e.includedOrderCount,e.excludedOrderCount)]})]}))})}function R(e){const t=(0,f.formatInstant)(e.createdAt);return`Open ${f.CAMPAIGN_STATE_LABELS[e.state]} order update "${e.name}" created ${t}`}function P(e,t){return`${String(e)} included \xb7 ${String(t)} excluded`}function W(e){if(null==e.sendStartedAt)return'Not started';const{processed:t,total:n}=(0,b.summarizeSendProgress)(e.sendProgress);return`${String(t)} of ${String(n)} processed`}},766,[34,222,488,276,516,605,512,681,712,561,767,769,770,771,775,104]);
867__d(function(g,r,i,a,m,e,d){"use strict";
867Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"orderOutreachAdminApi",{enumerable:!0,get:function(){return c}});var n=r(d[0]),t=r(d[1]);const c={readiness:async()=>n.admin.orderOutreachReadiness(),async searchAllOrders(c,s,p){const o=await n.admin.orderOutreachSearchOrders(Object.assign({body:{filter:c,catalogDisplayHints:s}},null==p?{}:{signal:p},{timeout:3e4})),u=(0,t.parseOrderOutreachReviewPayload)(o.reviewPayload);return{orders:u.orders,summary:u.summary,interpretedFilter:u.interpretedFilter,reviewPayload:o.reviewPayload,reviewManifest:o.reviewManifest,reviewToken:o.reviewToken,scanId:u.scanId,scanStartedAt:u.scanStartedAt,scanCompletedAt:u.scanCompletedAt}},syntheticPreview:async t=>n.admin.orderOutreachSyntheticPreview({body:t}),createCampaign:async t=>n.admin.orderOutreachCreateCampaign({body:t,timeout:12e4}),getCampaign:async t=>n.admin.orderOutreachGetCampaign({path:{campaignId:t}}),getCampaignRecipient:async(t,c)=>n.admin.orderOutreachGetCampaignRecipient({path:{campaignId:t,recipientId:c}}),getCampaignProgress:async t=>n.admin.orderOutreachGetCampaignProgress({path:{campaignId:t}}),listCampaigns:async(t,c)=>n.admin.orderOutreachListCampaigns({query:{page:t,size:c}}),sendCampaign:async t=>n.admin.orderOutreachSendCampaign({path:{campaignId:t}}),pauseCampaign:async t=>n.admin.orderOutreachPauseCampaign({path:{campaignId:t}}),resumeCampaign:async t=>n.admin.orderOutreachResumeCampaign({path:{campaignId:t}}),cancelCampaign:async t=>n.admin.orderOutreachCancelCampaign({path:{campaignId:t}}),retryRecipient:async(t,c)=>n.admin.orderOutreachRetryRecipient({path:{campaignId:t,recipientId:c}}),resendUnknownRecipient:async(t,c)=>n.admin.orderOutreachResendUnknownRecipient({path:{campaignId:t,recipientId:c}})}},767,[471,768]);
868__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseOrderOutreachReviewPayload=function(t){const I=s(JSON.parse(t),'review payload'),C=w(I,'schemaVersion');if(1!==C)throw new Error('Unsupported order-outreach review payload version');return{schemaVersion:C,scanId:l(I,'scanId'),scanStartedAt:v(I,'scanStartedAt'),scanCompletedAt:v(I,'scanCompletedAt'),orders:c(I,'orders').map(n),summary:o(u(I,'summary')),interpretedFilter:(h=u(I,'interpretedFilter'),{createdFrom:l(h,'createdFrom'),createdTo:l(h,'createdTo'),storeIanaTimezone:l(h,'storeIanaTimezone'),skus:y(h,'skus'),productGids:y(h,'productGids'),variantGids:y(h,'variantGids'),orderStatuses:c(h,'orderStatuses').map(S),financialStatuses:c(h,'financialStatuses').map(O),fulfillmentStatuses:c(h,'fulfillmentStatuses').map(A),destinationCountryCodes:y(h,'destinationCountryCodes'),destinationProvinceCodes:y(h,'destinationProvinceCodes'),includeTestOrders:p(h,'includeTestOrders'),customerEmail:f(h,'customerEmail')})};var h};function n(n){const o=s(n,'review order');return{reviewRecipientId:f(o,'reviewRecipientId'),shopifyOrderGid:l(o,'shopifyOrderGid'),orderNumber:l(o,'orderNumber'),createdAt:v(o,'createdAt'),customerDisplayName:f(o,'customerDisplayName'),contactEmail:f(o,'contactEmail'),orderStatus:f(o,'orderStatus'),financialStatus:f(o,'financialStatus'),fulfillmentStatus:f(o,'fulfillmentStatus'),destinationCountryCode:f(o,'destinationCountryCode'),destinationProvinceCode:f(o,'destinationProvinceCode'),test:p(o,'test'),sendable:p(o,'sendable'),nonSendableReason:C(o,'nonSendableReason'),lineItems:c(o,'lineItems').map(t)}}function t(n){const t=s(n,'review line item');return{productGid:f(t,'productGid'),productTitle:f(t,'productTitle'),variantGid:f(t,'variantGid'),variantTitle:f(t,'variantTitle'),sku:f(t,'sku'),quantity:w(t,'quantity'),fulfillmentStatus:f(t,'fulfillmentStatus')}}function o(n){const t=u(n,'nonSendableOrdersByReason'),o={};for(const n of['MISSING_CONTACT_EMAIL','INVALID_CONTACT_EMAIL']){const s=t[n];null!=s&&(o[n]=I(s,n))}return{matchingOrders:I(n.matchingOrders,'matchingOrders'),includedOrders:I(n.includedOrders,'includedOrders'),uniqueRecipients:I(n.uniqueRecipients,'uniqueRecipients'),nonSendableOrdersByReason:o,scanCompleteness:h(n.scanCompleteness),matchingCountPrecision:E(n.matchingCountPrecision),incompletenessReasons:y(n,'incompletenessReasons')}}function s(n,t){if('object'!=typeof n||null==n||Array.isArray(n))throw new Error(`Invalid ${t}`);return Object.fromEntries(Object.entries(n))}function u(n,t){return s(n[t],t)}function c(n,t){const o=n[t];if(!Array.isArray(o))throw new Error(`Invalid ${t}`);return o}function l(n,t){const o=n[t];if('string'!=typeof o)throw new Error(`Invalid ${t}`);return o}function f(n,t){const o=n[t];if(null!==o&&'string'!=typeof o)throw new Error(`Invalid ${t}`);return o}function p(n,t){const o=n[t];if('boolean'!=typeof o)throw new Error(`Invalid ${t}`);return o}function w(n,t){return I(n[t],t)}function I(n,t){if('number'!=typeof n||!Number.isSafeInteger(n)||n<0)throw new Error(`Invalid ${t}`);return n}function v(n,t){const o=n[t];if('number'!=typeof o||!Number.isFinite(o)||o<0)throw new Error(`Invalid ${t}`);return o}function y(n,t){return c(n,t).map(n=>{if('string'!=typeof n)throw new Error(`Invalid ${t}`);return n})}function C(n,t){const o=n[t];
868if(null===o||'MISSING_CONTACT_EMAIL'===o||'INVALID_CONTACT_EMAIL'===o)return o;throw new Error(`Invalid ${t}`)}function h(n){if('COMPLETE'===n||'INCOMPLETE'===n)return n;throw new Error('Invalid scanCompleteness')}function E(n){if('EXACT'===n||'AT_LEAST'===n||'UNKNOWN'===n)return n;throw new Error('Invalid matchingCountPrecision')}function S(n){if('open'===n||'closed'===n||'cancelled'===n)return n;throw new Error('Invalid orderStatuses')}function O(n){if('pending'===n||'authorized'===n||'partially_paid'===n||'paid'===n||'partially_refunded'===n||'refunded'===n||'voided'===n)return n;throw new Error('Invalid financialStatuses')}function A(n){if('unshipped'===n||'partial'===n||'shipped'===n)return n;throw new Error('Invalid fulfillmentStatuses')}},768,[]);
869__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CAMPAIGN_STATE_LABELS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(_e,"RECIPIENT_STATE_LABELS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"DISPATCH_PHASE_LABELS",{enumerable:!0,get:function(){return s}}),Object.defineProperty(_e,"DELIVERY_STATUS_LABELS",{enumerable:!0,get:function(){return D}}),Object.defineProperty(_e,"SENDGRID_EVENT_TYPE_LABELS",{enumerable:!0,get:function(){return p}}),_e.StateBadge=function({state:e}){return(0,c.jsx)(b,{label:o[e],warning:'PAUSED'===e})},_e.Badge=b,_e.formatInstant=function(e){return null==e||''===e?'\u2014':(0,u.formatIsoDateTime)(e)},_e.pluralCount=function(e,n){return`${String(e)} ${1===e?n:`${n}s`}`},r(d[0]);var n=e(r(d[1])),t=e(r(d[2])),u=r(d[3]),E=r(d[4]),c=r(d[5]);const o={DRAFT:'Draft',SENDING:'Sending',PAUSED:'Paused',COMPLETED:'Completed',PARTIALLY_FAILED:'Partially failed',FAILED:'Failed',CANCELLED:'Cancelled'},l={NOT_ATTEMPTED:'Not attempted',QUEUED:'Queued',ACCEPTED:'Accepted by SendGrid',REJECTED:'Rejected',RETRYABLE_FAILURE:'Retryable failure',TERMINAL_FAILURE:'Terminal failure',SUBMISSION_UNKNOWN:'Submission unknown'},s={DISPATCH_NOT_STARTED:'Dispatch not started',DISPATCH_ATTEMPTED:'Dispatch attempted'},D={PROCESSING:'Processing',DEFERRED:'Deferred',DELIVERED:'Delivered',BOUNCED:'Bounced',BLOCKED:'Blocked',DROPPED:'Dropped'},p={bounce:'Bounce',click:'Click',deferred:'Deferred',delivered:'Delivered',dropped:'Dropped',group_resubscribe:'Group resubscribe',group_unsubscribe:'Group unsubscribe',open:'Open',processed:'Processed',spamreport:'Spam report',unsubscribe:'Unsubscribe'};function b({label:e,warning:u=!1}){return(0,c.jsx)(t.default,{style:[E.campaignStyles.badge,u&&E.campaignStyles.badgeWarning],children:(0,c.jsx)(n.default,{style:[E.campaignStyles.badgeText,u&&E.campaignStyles.badgeWarningText],children:e})})}},769,[34,222,276,685,770,104]);
870__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"campaignStyles",{enumerable:!0,get:function(){return R}}),r(d[0]);var e,o=r(d[1]),t=(e=o)&&e.__esModule?e:{default:e}
870,S=r(d[2]),n=r(d[3]),l=r(d[4]);const R=(0,r(d[5]).createStyles)({acknowledgeRow:{alignItems:'center',flexDirection:'row',gap:n.SPACING.SM},acknowledgeText:{color:S.COLORS.TEXT_SECONDARY,flexShrink:1,fontSize:l.FONT_SIZE.SM},actionRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.MD},attemptBlock:{gap:n.SPACING.XS,paddingLeft:n.SPACING.MD},attemptEntry:{gap:n.SPACING.XS},attemptDeliveryStatus:{color:S.COLORS.TEXT_BODY,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},backButton:{alignSelf:'flex-start',justifyContent:'center',minHeight:36,paddingHorizontal:n.SPACING.SM,paddingVertical:n.SPACING.SM},backButtonText:{color:S.COLORS.BRAND_PRIMARY_DARK,fontSize:l.FONT_SIZE.MD,fontWeight:'600'},badge:{alignSelf:'flex-start',backgroundColor:S.COLORS.BG_WASH,borderColor:S.COLORS.BORDER,borderRadius:999,borderWidth:1,paddingHorizontal:n.SPACING.SM,paddingVertical:2},badgeRow:{flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.XS},badgeText:{color:S.COLORS.TEXT_SECONDARY,fontSize:l.FONT_SIZE.XS,fontWeight:'600'},badgeWarning:{backgroundColor:S.COLORS.WARNING_BANNER_BG,borderColor:S.COLORS.WARNING_BANNER_BORDER},badgeWarningText:{color:S.COLORS.WARNING_BANNER_TEXT},buttonDisabled:{backgroundColor:S.COLORS.BORDER_DISABLED},deliveryFilterSelected:{borderColor:S.COLORS.BRAND_PRIMARY,borderRadius:999,borderWidth:2},deliveryRefreshButton:{borderColor:S.COLORS.BRAND_PRIMARY,borderRadius:6,borderWidth:1,paddingHorizontal:n.SPACING.MD,paddingVertical:n.SPACING.SM},deliveryRefreshButtonText:{color:S.COLORS.BRAND_PRIMARY_DARK,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},deliveryStatusHeader:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.MD,justifyContent:'space-between'},cancelBlock:{gap:n.SPACING.SM,marginTop:n.SPACING.XS},cancelButtonDisabled:{opacity:.6},cancelConfirmBlock:{gap:n.SPACING.SM},cancelConfirmNo:{backgroundColor:S.COLORS.BG_SUBTLE_100,borderRadius:6,paddingHorizontal:n.SPACING.MD,paddingVertical:n.SPACING.SM},cancelConfirmNoText:{color:S.COLORS.TEXT_BODY,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},cancelConfirmRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.SM},cancelConfirmText:{color:S.COLORS.ERROR_DARK,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},cancelConfirmYes:{backgroundColor:S.COLORS.ERROR_BG,borderColor:S.COLORS.ERROR_BORDER,borderRadius:6,borderWidth:1,paddingHorizontal:n.SPACING.MD,paddingVertical:n.SPACING.SM},cancelConfirmYesText:{color:S.COLORS.ERROR_DARK,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},cancelledBanner:{backgroundColor:S.COLORS.WARNING_BANNER_BG,borderColor:S.COLORS.WARNING_BANNER_BORDER,borderRadius:8,borderWidth:1,paddingHorizontal:n.SPACING.MD,paddingVertical:n.SPACING.SM},cancelledBannerText:{color:S.COLORS.WARNING_BANNER_TEXT,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},cancelledRow:{opacity:.55},campaignHistory:{gap:n.SPACING.SM,marginTop:n.SPACING.SM},campaignIdentity:{flexShrink:1,gap:n.SPACING.XS,maxWidth:'100%',minWidth:0,overflow:'hidden',width:'100%'},campaignLinkCell:{maxWidth:'100%',minWidth:0,overflow:'hidden',width:'100%'},campaignSubject:{color:S.COLORS.TEXT_PRIMARY,flexShrink:1,fontSize:l.FONT_SIZE.SM,fontWeight:'600',maxWidth:'100%'},campaignSubjectSecondary:{color:S.COLORS.TEXT_MUTED,flexShrink:1,fontSize:l.FONT_SIZE.XS,maxWidth:'100%'},campaignViewLink:{color:S.COLORS.ACTION_PRIMARY,fontSize:l.FONT_SIZE.XS,fontWeight:'600'},campaignFilterSummary:{color:S.COLORS.TEXT_MUTED,flexShrink:1,fontSize:l.FONT_SIZE.XS,lineHeight:18},destructiveSecondaryButton:{alignSelf:'flex-start',backgroundColor:S.COLORS.ERROR_BG,borderColor:S.COLORS.ERROR_BORDER,borderRadius:6,borderWidth:1,paddingHorizontal:n.SPACING.LG,paddingVertical:n.SPACING.SM},destructiveSecondaryButtonText:{color:S.COLORS.ERROR_DARK,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},checkbox:{alignItems:'center',borderColor:S.COLORS.BORDER,borderRadius:4,borderWidth:1,height:20,justifyContent:'center',width:20},checkboxChecked:{backgroundColor:S.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:S.COLORS.BRAND_PRIMARY_DARK},checkmark:{color:S.COLORS.BRAND_PRIMARY_DARK,fontSize:l.FONT_SIZE.XS,fontWeight:'700'},confirmBlock:{borderColor:S.COLORS.BORDER,borderRadius:8,borderWidth:1,gap:n.SPACING.SM,padding:n.SPACING.MD},consequenceText:{color:S.COLORS.TEXT_PRIMARY,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},detailContainer:{alignSelf:'stretch',gap:n.SPACING.SM,width:'100%'},detailProse:{alignSelf:'flex-start',gap:n.SPACING.SM,maxWidth:960,width:'100%'},sendGridModeDescription:{color:S.COLORS.TEXT_MUTED,fontSize:l.FONT_SIZE.XS},sendGridModeDescriptionLive:{color:S.COLORS.WARNING_DARK},sendGridModeDescriptionSandbox:{color:S.COLORS.BLUE_800},sendGridModeIndicator:{alignItems:'center',alignSelf:'flex-start',backgroundColor:S.COLORS.BG_SUBTLE,borderColor:S.COLORS.BORDER,borderRadius:6,borderWidth:1,flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.SM,paddingHorizontal:n.SPACING.SM,paddingVertical:n.SPACING.XS},sendGridModeIndicatorLive:{backgroundColor:S.COLORS.WARNING_BG,borderColor:S.COLORS.WARNING_BANNER_BORDER},sendGridModeIndicatorSandbox:{backgroundColor:S.COLORS.BLUE_50,borderColor:S.COLORS.BLUE_200},sendGridModeTitle:{color:S.COLORS.TEXT_BODY,fontSize:l.FONT_SIZE.XS,fontWeight:'700'},sendGridModeTitleLive:{color:S.COLORS.WARNING_DARK},sendGridModeTitleSandbox:{color:S.COLORS.BLUE_800},masterDetail:{borderTopColor:S.COLORS.BORDER,borderTopWidth:1,gap:n.SPACING.MD,marginTop:n.SPACING.SM,paddingTop:n.SPACING.MD,width:'100%'}
870,masterDetailWide:{alignItems:'flex-start',flexDirection:'row',gap:n.SPACING.LG},previewPane:{alignItems:'center',flexGrow:1,flexShrink:1,gap:n.SPACING.SM,minWidth:0},previewLoadError:{gap:n.SPACING.SM},recipientsPane:{gap:n.SPACING.SM,width:'100%'},recipientsPaneWide:{borderRightColor:S.COLORS.BORDER,borderRightWidth:t.default.hairlineWidth,flexGrow:0,flexShrink:0,maxWidth:560,paddingRight:n.SPACING.LG,width:520},recipientRowSelected:{backgroundColor:S.COLORS.BRAND_PRIMARY_ALPHA_20,borderLeftColor:S.COLORS.BRAND_PRIMARY_DARK},recipientRowHovered:{backgroundColor:S.COLORS.BG_FAINT},recipientSearchInput:{fontSize:l.FONT_SIZE.SM,paddingHorizontal:n.SPACING.SM,paddingVertical:n.SPACING.SM},recipientsEndCap:{alignItems:'center',borderTopColor:S.COLORS.BORDER,borderTopWidth:t.default.hairlineWidth,paddingVertical:n.SPACING.SM},recipientsEndCapText:{color:S.COLORS.TEXT_MUTED,fontSize:l.FONT_SIZE.XS},recipientIdentity:{flexGrow:1,flexShrink:1,gap:n.SPACING.MICRO,minWidth:0},recipientEmail:{color:S.COLORS.TEXT_MUTED,fontSize:l.FONT_SIZE.SM},messageFieldLabel:{color:S.COLORS.TEXT_CAPTION,fontSize:l.FONT_SIZE.XS,fontWeight:'700',textTransform:'uppercase'},messagePreview:{gap:n.SPACING.MD,maxWidth:760,width:'100%'},messageSubject:{color:S.COLORS.TEXT_PRIMARY,fontSize:l.FONT_SIZE.MD,fontWeight:'600'},plainTextBody:{backgroundColor:S.COLORS.BG_CODE_DARK,borderRadius:8,color:S.COLORS.TEXT_INVERSE,fontFamily:l.FONT_FAMILY.MONOSPACE,fontSize:l.FONT_SIZE.SM,padding:n.SPACING.LG,whiteSpace:'pre-wrap'},previewAsLabel:{color:S.COLORS.TEXT_MUTED,flexShrink:1,fontSize:l.FONT_SIZE.SM},previewAsRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.SM},previewStepButton:{justifyContent:'center',minHeight:36,paddingHorizontal:n.SPACING.XS,paddingVertical:n.SPACING.XS},previewStepDisabled:{color:S.COLORS.TEXT_MUTED,opacity:.45,textDecorationLine:'none'},detailFieldValueProminent:{color:S.COLORS.TEXT_PRIMARY,flexShrink:1,fontSize:l.FONT_SIZE.MD,fontWeight:'600'},detailHeader:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.MD},detailSection:{borderTopColor:S.COLORS.BORDER,borderTopWidth:1,gap:n.SPACING.SM,marginTop:n.SPACING.SM,paddingTop:n.SPACING.MD},detailSectionTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:l.FONT_SIZE.MD,fontWeight:'700'},filterLogicSummary:{color:S.COLORS.TEXT_SECONDARY,fontSize:l.FONT_SIZE.SM,lineHeight:20,maxWidth:760},filterGroupGrid:{flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.MD},filterGroup:{backgroundColor:S.COLORS.BG_WASH,borderColor:S.COLORS.BORDER,borderRadius:8,borderWidth:1,flexBasis:360,flexGrow:1,gap:n.SPACING.SM,padding:n.SPACING.MD},filterGroupTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:l.FONT_SIZE.SM,fontWeight:'700'},filterGroupExplanation:{color:S.COLORS.TEXT_MUTED,fontSize:l.FONT_SIZE.XS,lineHeight:18},filterDetail:{borderTopColor:S.COLORS.BORDER,borderTopWidth:1,gap:n.SPACING.XS,paddingTop:n.SPACING.SM},filterDetailLabel:{color:S.COLORS.TEXT_SECONDARY,fontSize:l.FONT_SIZE.XS,fontWeight:'600'},filterValueList:{gap:n.SPACING.XS},filterDetailValue:{color:S.COLORS.TEXT_SECONDARY,fontSize:l.FONT_SIZE.SM},errorText:{color:S.COLORS.ERROR_DARK,fontSize:l.FONT_SIZE.SM},ordersBlock:{gap:n.SPACING.XS},ordersLineText:{color:S.COLORS.TEXT_MUTED,fontSize:l.FONT_SIZE.SM},ordersLineWrap:{flexDirection:'row',flexWrap:'wrap'},linkText:{color:S.COLORS.TEXT_SLATE_DARK,fontSize:l.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},mutedText:{color:S.COLORS.TEXT_MUTED,fontSize:l.FONT_SIZE.SM},orderText:{color:S.COLORS.TEXT_SECONDARY,fontSize:l.FONT_SIZE.SM},warningMetaText:{color:S.COLORS.WARNING_BANNER_TEXT,fontSize:l.FONT_SIZE.SM},primaryButton:{alignSelf:'flex-start',backgroundColor:S.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:n.SPACING.XL,paddingVertical:n.SPACING.MD},primaryButtonText:{color:S.COLORS.TEXT_INVERSE,fontSize:l.FONT_SIZE.MD,fontWeight:'700'},recipientHeader:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.SM,justifyContent:'space-between'},recipientName:{color:S.COLORS.TEXT_PRIMARY,fontSize:l.FONT_SIZE.SM,fontWeight:'600'},recipientRow:{borderLeftColor:S.COLORS.TRANSPARENT,borderLeftWidth:3,borderTopColor:S.COLORS.BORDER,borderTopWidth:t.default.hairlineWidth,gap:n.SPACING.XS,paddingHorizontal:n.SPACING.SM,paddingVertical:n.SPACING.SM},recipientRowSelectable:Object.assign({},{cursor:'pointer'}),retryBlock:{gap:n.SPACING.SM,paddingLeft:n.SPACING.MD},recipientsTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:l.FONT_SIZE.MD,fontWeight:'700',marginTop:n.SPACING.SM},sectionCard:{gap:n.SPACING.SM},sendingIndicatorRow:{alignItems:'center',flexDirection:'row',gap:n.SPACING.SM},summaryCard:{gap:n.SPACING.SM},summaryCardFilters:{borderTopColor:S.COLORS.BORDER,borderTopWidth:1,gap:n.SPACING.XS,paddingTop:n.SPACING.SM},summaryCardFilterLabel:{color:S.COLORS.TEXT_SECONDARY,fontSize:l.FONT_SIZE.XS,fontWeight:'600',textTransform:'uppercase'},summaryCardHeader:{alignItems:'center',flexDirection:'row',justifyContent:'space-between'},zebraRow:{backgroundColor:S.COLORS.BG_WASH}})},770,[95,42,490,493,494,489]);
871__d(function(g,r,i,a,m,e,d){"use strict";
871Object.defineProperty(e,'__esModule',{value:!0}),e.campaignFilterSummary=function(t,s){const n=[`Created ${t.createdFrom} through ${t.createdTo}`,`Timezone: ${t.storeIanaTimezone}`];null!=t.customerEmail&&''!==t.customerEmail&&n.push(`Customer email: ${t.customerEmail}`);return l(n,'SKUs',t.skus),l(n,'Products',o(t,s)),l(n,'Variants',u(t,s)),l(n,'Order statuses',t.orderStatuses),l(n,'Financial statuses',t.financialStatuses),l(n,'Fulfillment statuses',t.fulfillmentStatuses),l(n,'Countries',t.destinationCountryCodes),l(n,'Provinces',t.destinationProvinceCodes),n.push(t.includeTestOrders?'Test orders included':'Test orders excluded'),n.join(' \xb7 ')},e.campaignFilterGroups=function(l,c){return[{key:'scope',title:'Date and customer',explanation:'Orders had to satisfy every restriction in this section.',details:[{key:'created',label:'Order created',values:[`${l.createdFrom} through ${l.createdTo} (inclusive)`]},{key:'timezone',label:'Date timezone',values:[l.storeIanaTimezone]},{key:'customer-email',label:'Customer email',values:null==l.customerEmail||''===l.customerEmail?['No restriction']:[l.customerEmail]}]},{key:'catalog',title:'Catalog match',explanation:"An order needed at least one of the products or variants below. SKU restrictions, when present, also had to match that line item.",details:[{key:'products',label:'Whole products (match any)',values:s(o(l,c))},{key:'variants',label:'Specific variants (match any)',values:s(u(l,c))},{key:'skus',label:'SKU restriction',values:s(l.skus)}]},{key:'state',title:'Order state',explanation:'The order had to match one saved value in each row.',details:[{key:'order-statuses',label:'Order status (match any)',values:n(l.orderStatuses,t.ALL_ORDER_STATUSES,t.ORDER_STATUS_LABELS)},{key:'financial-statuses',label:'Financial status (match any)',values:n(l.financialStatuses,t.ALL_FINANCIAL_STATUSES,t.FINANCIAL_STATUS_LABELS)},{key:'fulfillment-statuses',label:'Fulfillment status (match any)',values:n(l.fulfillmentStatuses,t.ALL_FULFILLMENT_STATUSES,t.FULFILLMENT_STATUS_LABELS)}]},{key:'destination',title:'Destination and test orders',explanation:'These restrictions were also required in addition to the sections above.',details:[{key:'countries',label:'Destination country (match any)',values:s(l.destinationCountryCodes)},{key:'provinces',label:'Destination province/state (match any)',values:s(l.destinationProvinceCodes)},{key:'test-orders',label:'Test orders',values:[l.includeTestOrders?'Allowed alongside standard orders':'Excluded']}]}]};var t=r(d[0]);function s(t){return 0===t.length?['No restriction']:t}function n(t,n,l){return t.length===n.length&&n.every(s=>t.includes(s))?['No restriction (all statuses selected)']:s(t.map(t=>l[t]))}function l(t,s,n){n.length>0&&t.push(`${s}: ${n.join(', ')}`)}function o(t,s){const n=new Map(s.products.map(t=>[t.gid,t]));return t.productGids.map(t=>{const s=n.get(t)?.title;return null==s||''===s?t:s})}function u(t,s){const n=new Map(s.variants.map(t=>[t.gid,t]));return t.variantGids.map(t=>{const s=n.get(t);if(null==s)return t;const l=''!==s.displayTitle?s.displayTitle:[s.productTitle,s.variantTitle].filter(t=>''!==t).join(' \u2014 '),o=''===s.sku?'':` (SKU: ${s.sku})`;return''===l?t:`${l}${o}`})}},771,[772]);
872__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ALL_TIME_START_DATE",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"ORDER_STATUS_LABELS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"FINANCIAL_STATUS_LABELS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"FULFILLMENT_STATUS_LABELS",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"ALL_ORDER_STATUSES",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"ALL_FINANCIAL_STATUSES",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"ALL_FULFILLMENT_STATUSES",{enumerable:!0,get:function(){return p}}),Object.defineProperty(e,"DEFAULT_ORDER_STATUS_SELECTION",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"DEFAULT_FULFILLMENT_STATUS_SELECTION",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"DEFAULT_FINANCIAL_STATUS_SELECTION",{enumerable:!0,get:function(){return C}}),e.initialFilterFormState=function(t){return Object.assign({},y('last30',t),{skus:'',customerEmail:'',productSelections:[],orderStatuses:S,financialStatuses:C,fulfillmentStatuses:T,destinationCountryCodes:'',destinationProvinceCodes:'',includeTestOrders:!1})}
872,e.deriveDatePreset=y,e.matchDatePreset=function(t,n,s){return b.find(o=>{const l=y(o,s);return l.createdFrom===t&&l.createdTo===n})??null},e.formatLocalDateOnly=function(n){return(0,t.localCalendarDay)(n)},e.customerEmailValidationError=F,e.isHistoryPossiblyUnavailable=function(n,s){if(!(0,t.isCalendarDate)(n)||!(0,t.isCalendarDate)(s))return!1;const o=(0,t.parseCalendarDate)(s);return o.setUTCDate(o.getUTCDate()-h),(0,t.parseCalendarDate)(n).getTime()<o.getTime()},e.toggleWholeProductSelection=function(t,n){if(t.some(t=>'product'===t.kind&&t.gid===n.gid))return t.filter(t=>!('product'===t.kind&&t.gid===n.gid));return[...t.filter(t=>t.productGid!==n.gid),{kind:'product',gid:n.gid,productGid:n.gid,title:n.title}]},e.toggleVariantSelection=function(t,n){if(t.some(t=>'variant'===t.kind&&t.gid===n.gid))return t.filter(t=>!('variant'===t.kind&&t.gid===n.gid));return[...t.filter(t=>!('product'===t.kind&&t.gid===n.productGid)),Object.assign({kind:'variant'},n)]},e.deriveVariantRowState=function(t,n){if(t.some(t=>'product'===t.kind&&t.gid===n.productGid))return'impliedIncluded';return t.some(t=>'variant'===t.kind&&t.gid===n.gid)?'selected':'selectable'},e.removeCatalogSelection=function(t,n){return t.filter(t=>t.gid!==n)},e.selectionGidFilters=_,e.catalogDisplayHints=function(t){return{products:t.filter(t=>'product'===t.kind).map(t=>({gid:t.gid,title:t.title})),variants:t.filter(t=>'variant'===t.kind).map(t=>({gid:t.gid,title:t.title}))}},e.filterCatalogByTitle=function(t,n){const s=n.trim().toLocaleLowerCase();if(''===s)return t;return t.filter(t=>t.title.toLocaleLowerCase().includes(s))},e.advancedFilterCount=function(t){return L.filter(n=>!D(t,n)).length},e.deriveAppliedFilterChips=function(t,n){const s=[{field:'createdFrom',label:`From: ${t.createdFrom}`},{field:'createdTo',label:`To: ${t.createdTo}`}];
872''!==t.customerEmail&&s.push({field:'customerEmail',label:`Customer email: ${t.customerEmail}`});j(s,'skus','SKU',t.skus),j(s,'productGids','Product',t.productGids.map(t=>n.get(t)??t)),j(s,'variantGids','Variant',t.variantGids.map(t=>n.get(t)??t)),k(s,'orderStatuses','Order',t.orderStatuses,S,c),k(s,'financialStatuses','Payment',t.financialStatuses,C,f),k(s,'fulfillmentStatuses','Fulfillment',t.fulfillmentStatuses,T,p),j(s,'destinationCountryCodes','Country',t.destinationCountryCodes),j(s,'destinationProvinceCodes','Province/state',t.destinationProvinceCodes),t.includeTestOrders&&s.push({field:'includeTestOrders',label:'Test orders included'});return s},e.removeFilterField=function(t,n){return P[n](t)},e.toApiFilter=function(t){const n=G(t.skus),{productGids:s,variantGids:o}=_(t.productSelections),l=G(t.destinationCountryCodes),u=G(t.destinationProvinceCodes),c=t.customerEmail.trim().toLocaleLowerCase();return Object.assign({createdFrom:t.createdFrom,createdTo:t.createdTo,includeTestOrders:t.includeTestOrders},''!==c?{customerEmail:c}:{},{orderStatuses:[...t.orderStatuses],financialStatuses:[...t.financialStatuses],fulfillmentStatuses:[...t.fulfillmentStatuses]},n.length>0?{skus:n}:{},s.length>0?{productGids:[...s]}:{},o.length>0?{variantGids:[...o]}:{},l.length>0?{destinationCountryCodes:l}:{},u.length>0?{destinationProvinceCodes:u}:{})},e.filterValidationError=function(n){if(!(0,t.isCalendarDate)(n.createdFrom)||!(0,t.isCalendarDate)(n.createdTo))return'Choose both dates in YYYY-MM-DD format.';if(n.createdFrom>n.createdTo)return'Created from must be on or before created to.';const s=F(n.customerEmail);if(null!=s)return s;if(0===n.orderStatuses.length)return'Select at least one order status, or choose All.';if(0===n.financialStatuses.length)return'Select at least one payment status, or choose All.';if(0===n.fulfillmentStatuses.length)return'Select at least one fulfillment status, or choose All.';return null};var t=r(d[0]),n=r(d[1]);const s='2000-01-01',o={open:'Open',closed:'Closed',cancelled:'Cancelled'},l={pending:'Pending',authorized:'Authorized',partially_paid:'Partially paid',paid:'Paid',partially_refunded:'Partially refunded',refunded:'Refunded',voided:'Voided'},u={unshipped:'Unshipped',partial:'Partial',shipped:'Shipped'},c=['open','closed','cancelled'],f=['pending','authorized','partially_paid','paid','partially_refunded','refunded','voided'],p=['unshipped','partial','shipped'],S=['open'],T=['unshipped','partial'],C=f,b=['last7','last30','last60','allTime'],h=60,O={last7:t=>v(7,t),last30:t=>v(30,t),last60:t=>v(60,t),allTime:t=>({createdFrom:s,createdTo:t})},L=['skus','destinationCountryCodes','destinationProvinceCodes','includeTestOrders'];function y(t,n){return O[t](n)}function v(s,o){const l=(0,n.lastUtcDaysRange)(s,(0,t.asCalendarDate)(o));return{createdFrom:l.from,createdTo:l.through}}const E=/[\s"':()]/,A=3;function F(t){const n=t.trim().toLocaleLowerCase();if(''===n)return null;if(E.test(n))return'Customer email must not contain spaces, quotes, colons, or parentheses.';const s=n.indexOf('*');if(-1!==s)return s!==n.length-1||n.indexOf('*')!==n.lastIndexOf('*')?"Use a single * at the end to match emails starting with the text before it (e.g. pat*). Searching by domain is not supported.":n.length-1<A?'Customer email prefix search needs at least 3 characters before the *.':null;const o=n.indexOf('@');return o<=0||o!==n.lastIndexOf('@')||o===n.length-1?"Customer email must be a single address like [email protected], or end with * for a prefix search.":null}function _(t){return{productGids:t.filter(t=>'product'===t.kind).map(t=>t.gid),variantGids:t.filter(t=>'variant'===t.kind).map(t=>t.gid)}}const P={createdFrom:t=>Object.assign({},t,{createdFrom:''}),createdTo:t=>Object.assign({},t,{createdTo:''}),skus:t=>Object.assign({},t,{skus:''}),customerEmail:t=>Object.assign({},t,{customerEmail:''}),productGids:t=>Object.assign({},t,{productSelections:t.productSelections.filter(t=>'product'!==t.kind)}),variantGids:t=>Object.assign({},t,{productSelections:t.productSelections.filter(t=>'variant'!==t.kind)}),orderStatuses:t=>Object.assign({},t,{orderStatuses:S}),financialStatuses:t=>Object.assign({},t,{financialStatuses:C}),fulfillmentStatuses:t=>Object.assign({},t,{fulfillmentStatuses:T}),destinationCountryCodes:t=>Object.assign({},t,{destinationCountryCodes:''}),destinationProvinceCodes:t=>Object.assign({},t,{destinationProvinceCodes:''}),includeTestOrders:t=>Object.assign({},t,{includeTestOrders:!1})};function j(t,n,s,o){o.length>0&&t.push({field:n,label:`${s}: ${o.join(', ')}`})}function k(t,n,s,o,l,u){U(o,l)||t.push({field:n,label:U(o,u)?`${s}: All`:`${s}: ${o.join(', ')}`})}function D(t,n){const s=t[n];return'boolean'==typeof s?!s:'string'==typeof s?''===s.trim():0===s.length}function U(t,n){return t.length===n.length&&n.every(n=>t.includes(n))}function G(t){return t.split(/\r?\n/).map(t=>t.trim()).filter(t=>''!==t)}},772,[773,774]);
873__d(function(g,r,i,a,m,e,d){"use strict";
873Object.defineProperty(e,'__esModule',{value:!0}),e.isCalendarDate=n,e.asCalendarDate=u,e.parseCalendarDate=function(t){return new Date(`${t}T00:00:00Z`)},e.utcCalendarDay=function(t){return u(o(c(t)))},e.localCalendarDay=function(t){const n=c(t);return u(l(n.getFullYear(),n.getMonth()+1,n.getDate()))};const t=/^\d{4}-\d{2}-\d{2}$/;function n(n){if(!t.test(n))return!1;const u=new Date(`${n}T00:00:00Z`);return!Number.isNaN(u.getTime())&&o(u)===n}function u(t){if(!n(t))throw new Error(`Expected a real YYYY-MM-DD calendar day, received: ${t}`);return t}function c(t){if(Number.isNaN(t.getTime()))throw new Error('Expected a valid instant, received an Invalid Date');return t}function o(t){return l(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate())}function l(t,n,u){return`${String(t).padStart(4,'0')}-${String(n).padStart(2,'0')}-${String(u).padStart(2,'0')}`}},773,[]);
874__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.calendarDateRange=n,e.lastUtcDaysRange=function(o,s){if(!Number.isSafeInteger(o)||o<1)throw new Error(`Expected a whole number of at least one day, received: ${o}`);const c=(0,t.parseCalendarDate)(s);return c.setUTCDate(c.getUTCDate()-(o-1)),n((0,t.utcCalendarDay)(c),s)},e.monthToDateUtcRange=function(o){return n((0,t.asCalendarDate)(`${o.slice(0,7)}-01`),o)};var t=r(d[0]);function n(t,n){if(t>n)throw new Error(`Range starts at ${t}, after it ends at ${n}`);return{from:t,through:n}}},774,[773]);
875__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.deriveSendProgressSegments=function(l){return t.map(t=>({key:t,label:n[t].label,count:l[t],warning:n[t].warning}))},e.summarizeSendProgress=function(n){const u=t.reduce((t,l)=>t+n[l],0),o=l.reduce((t,l)=>t+n[l],0);return{processed:u-o,total:u}},e.shouldPollCampaign=function(n){return u[n]},e.recipientRetryAction=function(n){return null==n?null:o[n]};const n={accepted:{label:'Accepted',warning:!1},queued:{label:'Queued',warning:!1},notAttempted:{label:'Not attempted',warning:!1},retryableFailure:{label:'Retryable failure',warning:!0},terminalFailure:{label:'Terminal failure',warning:!0},rejected:{label:'Rejected',warning:!0},submissionUnknown:{label:'Submission unknown',warning:!0}},t=['accepted','queued','notAttempted','retryableFailure','terminalFailure','rejected','submissionUnknown'];const l=['queued','notAttempted'];const u={DRAFT:!1,SENDING:!0,PAUSED:!1,COMPLETED:!1,PARTIALLY_FAILED:!1,FAILED:!1,CANCELLED:!1};const o={NOT_ATTEMPTED:null,QUEUED:null,ACCEPTED:null,REJECTED:null,RETRYABLE_FAILURE:'retry',TERMINAL_FAILURE:null,SUBMISSION_UNKNOWN:'resendUnknown'}},775,[]);
876__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachReadinessBanner=function({readiness:e,loading:u,error:S,onRetry:c}){if(u&&null==e)return(0,O.jsx)(s.LoadingState,{message:"Checking Shopify order outreach readiness\u2026"});if(null!=S&&null==e)return(0,O.jsxs)(o.Card,{style:E.readinessError,children:[(0,O.jsx)(t.default,{accessibilityRole:"alert",style:E.error,children:S}),(0,O.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:"Retry order outreach readiness",onPress:c,style:E.retryButton,children:(0,O.jsx)(t.default,{style:E.retryText,children:"Retry"})})]});if(null==e)return(0,O.jsx)(l.default,{});const R=e.limitations.filter(e=>'MISSING_SCOPE_READ_ALL_ORDERS_LIMITS_HISTORY_TO_60_DAYS'!==e);if(e.usable&&0===R.length)return(0,O.jsx)(l.default,{});return(0,O.jsxs)(o.Card,{style:E.readinessError,children:[!e.usable&&(0,O.jsx)(t.default,{style:E.readinessTitle,children:"Shopify order search is unavailable"}),!e.usable&&e.configurationErrors.map(e=>(0,O.jsx)(t.default,{style:E.error,children:_(e)},e)),R.map(e=>(0,O.jsx)(t.default,{style:E.warning,children:f(e)},e))]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),o=r(d[4]),s=r(d[5]),u=r(d[6]),S=r(d[7]),c=r(d[8]),R=r(d[9]),O=r(d[10]);function _(e){return'SHOPIFY_NOT_CONFIGURED'===e?'Shopify is not configured. Set SHOPIFY_CLIENT_ID, SHOPIFY_CLIENT_SECRET, and SHOPIFY_STORE_NAME in .env, then restart the backend.':f(e)}function f(e){return e.toLocaleLowerCase().split('_').map(e=>0===e.length?e:e.charAt(0).toLocaleUpperCase()+e.slice(1)).join(' ')}const E=(0,R.createStyles)({error:{color:u.COLORS.ERROR_DARK,fontSize:c.FONT_SIZE.SM},readinessError:{backgroundColor:u.COLORS.ERROR_BG,borderColor:u.COLORS.ERROR_BORDER,gap:S.SPACING.SM},readinessTitle:{color:u.COLORS.TEXT_PRIMARY,fontSize:c.FONT_SIZE.MD,fontWeight:'700'},retryButton:{alignSelf:'flex-start',backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:6,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.SM},retryText:{color:u.COLORS.TEXT_INVERSE,fontSize:c.FONT_SIZE.SM,fontWeight:'700'},warning:{color:u.COLORS.WARNING_DARK,fontSize:c.FONT_SIZE.SM}})},776,[34,222,488,276,605,512,490,493,494,489,104]);
877__d(function(g,r,i,a,m,e,d){"use strict";
877Object.defineProperty(e,'__esModule',{value:!0}),e.useOrderOutreachReadiness=function(c=null){const[s,l]=(0,t.useState)(null),[o,f]=(0,t.useState)(!0),[y,h]=(0,t.useState)(null),O=(0,t.useRef)(0),R=(0,t.useRef)(null),S=(0,t.useRef)(!0),_=(0,t.useCallback)(async t=>{const c=O.current+1;O.current=c;const s=`${t??'default'}:${String(c)}`;R.current=s,f(!0),h(null);try{const t=await u.orderOutreachAdminApi.readiness();S.current&&R.current===s&&l(t)}catch(t){S.current&&R.current===s&&h((0,n.errorMessage)(t,'Failed to load order outreach readiness'))}finally{S.current&&R.current===s&&f(!1)}},[]);(0,t.useEffect)(()=>(S.current=!0,_(c),()=>{S.current=!1,R.current=null}),[_,c]);const b=(0,t.useCallback)(()=>{_(c)},[_,c]);return{readiness:s,loading:o,error:y,retry:b}};var t=r(d[0]),n=r(d[1]),u=r(d[2])},777,[34,468,767]);
878__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachCreatePanel=function({onCampaignCreated:e,headingRef:u}){const[S]=(0,t.useState)(()=>(0,E.formatLocalDateOnly)(new Date)),[p,f]=(0,t.useState)(()=>(0,E.initialFilterFormState)(S)),[I,M]=(0,t.useState)(new Map),{readiness:D,loading:F,error:N,retry:k}=(0,_.useOrderOutreachReadiness)(),[w,P]=(0,t.useState)(null),[z,X]=(0,t.useState)(b),[Z,G]=(0,t.useState)(!1),[U,W]=(0,t.useState)(0),[Y,H]=(0,t.useState)(null),q=(0,t.useRef)(!0),B=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{q.current=!1,B.current?.abort()},[]),(0,t.useEffect)(()=>{if(!Z)return;const e=setInterval(()=>{W(e=>e+1)},1e3);return()=>{clearInterval(e)}},[Z]);const K=(0,t.useCallback)(async(e,t)=>{B.current?.abort();const n=new AbortController;B.current=n,X(b),P(null),H(null),W(0);try{G(!0);const s=await O.orderOutreachAdminApi.searchAllOrders(e,t,n.signal);q.current&&B.current===n&&P(s)}catch(e){q.current&&B.current===n&&!j(e)&&H((0,h.errorMessage)(e,'Failed to search Shopify orders'))}finally{q.current&&B.current===n&&(B.current=null,G(!1))}},[]),J=(0,t.useMemo)(()=>(0,C.deriveOrderOutreachSelection)(w?.orders??[],z),[w?.orders,z]),Q=F?'Checking Shopify order search readiness\u2026':!0===D?.usable?null:'Shopify order search is unavailable.',V=(0,t.useCallback)(e=>{f(t=>(0,E.removeFilterField)(t,e))},[]),$=(0,t.useCallback)(e=>{const t=(0,E.catalogDisplayHints)(p.productSelections);M(new Map(p.productSelections.map(e=>[e.gid,e.title]))),K(e,t)},[p.productSelections,K]),ee=L(U);return(0,A.jsxs)(s.default,{style:v.container,children:[(0,A.jsx)(l.AppLink,{to:"OrderOutreach",accessibilityLabel:"All order updates",style:v.hubLink,testID:"order-outreach-create-hub-link",children:(0,A.jsx)(n.default,{style:v.hubLinkText,children:"\u2190 All order updates"})}),(0,A.jsx)(n.default,Object.assign({ref:u,accessibilityRole:"header",style:v.title,testID:"order-outreach-create-heading"},{tabIndex:-1},{children:"New order update"})),(0,A.jsx)(n.default,{style:v.transactionalRule,children:"Transactional updates only \u2014 never marketing, promotions, or unrelated customer communication."}),(0,A.jsx)(n.default,{style:v.testedEnvelope,children:"Tested operating envelope: staging has completed an approximately 120-recipient test routed to the same test inbox. This is observed validation, not a configured audience limit."}),(0,A.jsx)(T.OrderOutreachReadinessBanner,{readiness:D,loading:F,error:N,onRetry:k}),(0,A.jsx)(o.Card,{style:v.filterCard,children:(0,A.jsx)(y.OrderOutreachFilterForm,{disabledReason:Q,filter:p,hasLimitedOrderHistory:!0===D?.limitations.includes('MISSING_SCOPE_READ_ALL_ORDERS_LIMITS_HISTORY_TO_60_DAYS'),loading:Z,onChange:f,onSearch:$,today:S})}),Z?(0,A.jsx)(o.Card,{children:(0,A.jsxs)(s.default,{style:v.scanProgress,children:[(0,A.jsx)(c.LoadingState,{message:ee}),(0,A.jsxs)(n.default,{accessibilityLiveRegion:"polite",style:v.scanElapsed,children:[U.toLocaleString()," seconds elapsed"]}),(0,A.jsx)(n.default,{style:v.scanExplanation,children:"Large date ranges can require several Shopify pages. Results appear only after the complete review set is ready."})]})}):null!=Y?(0,A.jsx)(o.Card,{children:(0,A.jsx)(n.default,{accessibilityRole:"alert",style:v.error,children:Y})}):null!=w?(0,A.jsx)(x.OrderOutreachResults,{result:w,selection:z,derivedSelection:J,onToggleOrder:e=>{X(t=>(0,C.toggleOrderExclusion)(t,e))},onToggleRecipient:e=>{X(t=>(0,C.toggleRecipientExclusion)(t,e))},onIncludeRecipient:e=>{X(t=>(0,C.includeRecipientOrders)(t,w.orders,e))},onIncludeAll:()=>{X(e=>(0,C.includeAllOrders)(e))},onExcludeAll:()=>{X(e=>(0,C.excludeAllOrders)(e,w.orders))},onRemoveAppliedFilter:V,gidTitles:I}):null,null!=w&&(0,A.jsx)(R.OrderOutreachDraftCreation,{result:w,selection:z,sender:D?.sender??null,replyToEmails:D?.replyToEmails??[],onRerunSearch:()=>{$((0,E.toApiFilter)(p))},onCampaignCreated:e})]})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),s=e(r(d[3])),l=r(d[4]),o=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),p=r(d[9]),f=r(d[10]),h=r(d[11]),O=r(d[12]),R=r(d[13]),y=r(d[14]),E=r(d[15]),T=r(d[16]),x=r(d[17]),C=r(d[18]),_=r(d[19]),A=r(d[20]);const b={excludedOrderGids:new Set,excludedRecipientIds:new Set},I=[{startsAtSeconds:0,message:'Scanning Shopify order pages\u2026'},{startsAtSeconds:8,message:'Completing required line-item details\u2026'},{startsAtSeconds:16,message:'Deriving recipient groups\u2026'}];function L(e){let t=I[0].message;for(const n of I)e>=n.startsAtSeconds&&(t=n.message);return t}function j(e){return!!M(e)&&('AbortError'===e.name||'ERR_CANCELED'===e.code)}function M(e){return'object'==typeof e&&null!=e}const v=(0,f.createStyles)({container:{gap:S.SPACING.XL},error:{color:u.COLORS.ERROR_DARK,fontSize:p.FONT_SIZE.SM},filterCard:{zIndex:10},hubLink:{alignSelf:'flex-start'},hubLinkText:{color:u.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM,fontWeight:'600'},scanElapsed:{color:u.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.SM,fontWeight:'600'},scanExplanation:{color:u.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM},scanProgress:{gap:S.SPACING.SM},title:{color:u.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.XL,fontWeight:'700'},testedEnvelope:{color:u.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM},transactionalRule:{color:u.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM,fontWeight:'600'}})},778,[34,95,222,276,516,605,512,490,493,494,489,468,767,779,826,7
87872,776,828,823,777,104]);
879__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachDraftCreation=function({result:e,selection:S,sender:b,replyToEmails:T,onRerunSearch:R,onCampaignCreated:C}){const[I,X]=(0,l.useState)(!1),[H,v]=(0,l.useState)(''),[F,B]=(0,l.useState)(null),[U,z]=(0,l.useState)(null),[W,K]=(0,l.useState)(y.EMPTY_ORDER_OUTREACH_MESSAGE_VALUES),[Y,Z]=(0,l.useState)(!1),[V,q]=(0,l.useState)(!1),[$,J]=(0,l.useState)(null),[Q,ee]=(0,l.useState)(!1),te=y.ORDER_OUTREACH_MESSAGE_PRESETS.find(e=>e.id===U)??null,ie=null!=e&&(0,O.hasConfirmableAudience)(e.orders,S)?null:'The draft needs at least one included, sendable recipient with an included order.',le=W.orderUpdateMessage.length>y.ORDER_UPDATE_MESSAGE_MAX_LENGTH,ae=W.shippingOpeningText.length>y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH||W.shippingClosingText.length>y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH,se=W.shippingDateLabel.length>y.ORDER_OUTREACH_DATE_LABEL_MAX_LENGTH,ne=W.subject.length>L,re=M({campaignName:H,selectedPresetId:U,messageValues:W,noteTooLong:le,shippingMessageTooLong:ae,shippingDateLabelTooLong:se,subjectTooLong:ne,transactionalAcknowledged:Y}),de=async()=>{if(null!=e&&null!=U){q(!0),J(null),ee(!1);try{const t=await E.orderOutreachAdminApi.createCampaign({reviewManifest:e.reviewManifest,reviewToken:e.reviewToken,name:H.trim(),subject:W.subject.trim(),customReplyToEmail:F,includedShopifyOrderGids:(0,O.buildIncludedShopifyOrderGids)(e.orders,S),messageDefinition:(0,y.messageDefinitionForPreset)(U,W),transactionalUseAcknowledged:Y});X(!1),C(t)}catch(e){const t=(0,f.readAxiosLikeResponse)(e)?.status;410===t?(ee(!0),J("These search results have expired. Re-run the search to refresh them, review the selection, and create the draft again.")):J(409===t?"A draft order update requires a complete scan, and this search was incomplete. Narrow the filters and search again.":413===t?"The reviewed campaign is too large for one request. Narrow the filters and re-run the search, or select fewer orders.":(0,f.errorMessage)(e,'Failed to create the draft order update'))}finally{q(!1)}}};if(null==e||null==b)return null;const oe=(0,A.deriveOrderOutreachSelection)(e.orders,S),ce=[];oe.excludedRecipients>0&&ce.push(P(oe.excludedRecipients,'recipient'));oe.excludedOrders>0&&ce.push(P(oe.excludedOrders,'order'));return(0,j.jsxs)(h.Card,{style:G.sectionCard,children:[(0,j.jsx)(n.default,{style:G.sectionTitle,children:"Create draft"}),(0,j.jsxs)(c.default,{style:G.audienceSummaryRow,children:[(0,j.jsxs)(n.default,{style:G.audienceSummaryText,children:["Sending to ",P(oe.uniqueIncludedRecipients,'recipient'),' \xb7 ',P(oe.includedOrders,'order')]}),ce.length>0&&(0,j.jsxs)(n.default,{style:G.audienceExcludedText,children:[ce.join(', ')," excluded"]})]}),I?(0,j.jsxs)(c.default,{style:G.draftFormLayout,children:[(0,j.jsx)(c.default,{style:G.draftFormColumn,children:(0,j.jsxs)(c.default,{style:G.draftForm,children:[(0,j.jsxs)(k,{label:"Campaign name (required)",children:[(0,j.jsx)(u.AppTextInput,{accessibilityLabel:"Campaign name",value:H,onChangeText:v,placeholder:"Internal name describing why this update is being sent"}),(0,j.jsxs)(n.default,{style:H.length>D?G.errorText:G.mutedText,children:[String(H.length)," / ",String(D)," characters"]})]}),(0,j.jsx)(w,{selectedPresetId:U,onSelect:e=>{z(e.id)}}),null==te?(0,j.jsx)(n.default,{style:G.mutedText,children:"Choose a template to continue."}):(0,j.jsx)(N,{presetId:te.id,values:W,onChange:K,noteTooLong:le,subjectTooLong:ne}),(0,j.jsx)(k,{label:"Sender",children:(0,j.jsxs)(n.default,{accessibilityLabel:"Campaign sender",style:G.senderText,children:[b.displayName," <",b.email,">"]})}),(0,j.jsxs)(k,{label:"Reply-to email (required)",children:[(0,j.jsxs)(c.default,{style:G.pickerContainer,children:[(0,j.jsx)(t.Picker,{accessibilityLabel:"Reply-to email",mode:"dropdown",selectedValue:F??b.email,onValueChange:e=>{B(e===b.email?null:e)},style:G.picker,children:T.map(e=>(0,j.jsx)(t.Picker.Item,{label:e,value:e},e))}),(0,j.jsx)(c.default,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:G.pickerChevron,children:(0,j.jsx)(p.ChevronIcon,{color:x.COLORS.TEXT_SECONDARY,direction:"down",size:20})})]}),(0,j.jsx)(n.default,{style:G.mutedText,children:"Replies go to the selected address. The sender is selected by default."})]}),(0,j.jsxs)(s.default,{accessibilityRole:"checkbox",accessibilityLabel:"Acknowledge transactional use only",accessibilityState:{checked:Y},onPress:()=>{Z(e=>!e)},style:G.acknowledgeRow,children:[(0,j.jsx)(c.default,{style:[G.checkbox,Y&&G.checkboxChecked],children:Y&&(0,j.jsx)(n.default,{style:G.checkmark,children:'\u2713'})}),(0,j.jsx)(n.default,{style:G.acknowledgeText,children:"This order update is only for transactional updates concerning the selected orders."})]}),(0,j.jsxs)(c.default,{style:G.actionRow,children:[(0,j.jsx)(o.default,{accessibilityRole:"button",accessibilityLabel:"Create draft",accessibilityState:{disabled:null!=re||V},disabled:null!=re||V,onPress:()=>{de()},style:[G.primaryButton,(null!=re||V)&&G.buttonDisabled],children:(0,j.jsx)(n.default,{style:G.primaryButtonText,children:V?'Creating draft\u2026':'Create draft'})}),(0,j.jsx)(o.default,{accessibilityRole:"button",accessibilityLabel:"Cancel draft form",onPress:()=>{X(!1)},children:(0,j.jsx)(n.default,{style:G.linkText,children:"Cancel"})}),null!=re&&(0,j.jsx)(n.default,{style:G.mutedText,children:re})]}),null!=$&&(0,j.jsx)(n.default,{accessibilityRole:"alert",style:G.errorText,children:$}),Q&&(0,j.jsx)(o.default,{accessibilityRole:"button",accessibilityLabel:"Re-run the search with the current filters",onPress:()=>{ee(!1),J(null),R()},style:G.primaryButton,children:(0,j.jsx)(n.default,{style:G.primaryButtonText,children:"Re-run search"})})]})}),(0,j.jsx)(c.default,{style:G.previewColumn,children:(0,j.jsx)(_.SyntheticOrderOutreachPreview,{messagePresetSelected:null!=U,subject:W.subject,messageDefinition:null!=U&&(0,y.messagePresetInputsValid)(U,W)?(0,y.messageDefinitionForPreset)(U,W):null})})]}):(0,j.jsxs)(c.default,{style:G.actionRow,children:[(0,j.jsx)(o.default,{accessibilityRole:"button",accessibilityLabel:"Draft an order update",accessibilityState:{disabled:null!=ie},disabled:null!=ie,onPress:()=>{v(''),B(null),Z(!1),X(!0)},style:[G.primaryButton,null!=ie&&G.buttonDisabled],children:(0,j.jsx)(n.default,{style:G.primaryButtonText,children:"Draft an order update"})}),null!=ie&&(0,j.jsx)(n.default,{style:G.mutedText,children:ie})]})]})};var t=r(d[0]),l=r(d[1]);r(d[2]);var s=e(r(d[3])),n=e(r(d[4])),o=e(r(d[5])),c=e(r(d[6])),u=r(d[7]),h=r(d[8]),p=r(d[9]),S=r(d[10]),x=r(d[11]),b=r(d[12]),T=r(d[13]),R=r(d[14]),f=r(d[15]),C=r(d[16]),E=r(d[17]),O=r(d[18]),y=r(d[19]),A=r(d[20]),_=r(d[21]),j=r(d[22]);const L=255,D=120,I=['New estimated ship date','Ships no earlier than','Ships by'];function M({campaignName:e,selectedPresetId:t,messageValues:l,noteTooLong:s,shippingMessageTooLong:n,shippingDateLabelTooLong:o,subjectTooLong:c,transactionalAcknowledged:u}){return''===e.trim()?'Enter a campaign name that explains why this update is being sent.':e.length>D?`The campaign name must be at most ${String(D)} characters.`:null==t?'Choose a template to continue.':''===l.subject.trim()?'Enter an email subject.':'order-update'===t&&s?`The message must be at most ${String(y.ORDER_UPDATE_MESSAGE_MAX_LENGTH)} characters.`:'shipping-delay'===t&&n?`The message must be at most ${String(y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH)} characters.`:'shipping-delay'===t&&o?`The date wording must be at most ${String(y.ORDER_OUTREACH_DATE_LABEL_MAX_LENGTH)} characters.`:(0,y.messagePresetInputsValid)(t,l)?c?`The subject must be at most ${String(L)} characters.`:u?null:'Acknowledge that this order update is transactional only.':'Fill the required message fields.'}function w({selectedPresetId:e,onSelect:t}){return(0,j.jsxs)(c.default,{style:G.choiceGroup,children:[(0,j.jsx)(n.default,{style:G.label,children:"Template"}),(0,j.jsx)(c.default,{accessibilityRole:"radiogroup",style:G.templateCards,children:y.ORDER_OUTREACH_MESSAGE_PRESETS.map(l=>{const s=l.id===e;return(0,j.jsxs)(S.RadioOption,{checked:s,interaction:"pressable",accessibilityLabel:`Template: ${l.displayName}`,onPress:()=>{t(l)},style:[G.templateCard,s&&G.templateCardSelected],children:[(0,j.jsx)(n.default,{style:[G.templateCardTitle,s&&G.templateCardTitleSelected],children:l.displayName}),(0,j.jsx)(n.default,{style:G.templateCardDescription,children:l.description})]},l.id)})})]})}function N({presetId:e,values:t,onChange:l,noteTooLong:h,subjectTooLong:p}){const S={resize:'vertical'};return(0,j.jsxs)(c.default,{style:G.messageInputs,children:[(0,j.jsxs)(k,{label:"Subject (required)",children:[(0,j.jsx)(u.AppTextInput,{accessibilityLabel:"Email subject",value:t.subject,onChangeText:e=>{l(Object.assign({},t,{subject:e}))},placeholder:"Subject shown in the recipient's inbox"}),(0,j.jsxs)(n.default,{style:p?G.errorText:G.mutedText,children:[String(t.subject.length)," / ",String(L)," characters"]})]}),'shipping-delay'===e&&(0,j.jsxs)(k,{label:"Message above estimated ship date (optional)",children:[(0,j.jsx)(u.AppTextInput,{accessibilityLabel:"Message above estimated ship date",value:t.shippingOpeningText,onChangeText:e=>{l(Object.assign({},t,{shippingOpeningText:e}))},placeholder:"Optional context shown before the new ship date",multiline:!0,style:[G.noteInput,S]}),(0,j.jsxs)(n.default,{style:t.shippingOpeningText.length>y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH?G.errorText:G.mutedText,children:[String(t.shippingOpeningText.length),' / ',String(y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH)," characters"]})]}),'shipping-delay'===e&&(0,j.jsxs)(k,{label:"Date wording (required)",children:[(0,j.jsx)(u.AppTextInput,{accessibilityLabel:"Ship date wording",value:t.shippingDateLabel,onChangeText:e=>{l(Object.assign({},t,{shippingDateLabel:e}))},placeholder:"Text shown above the revised ship date"}),(0,j.jsxs)(n.default,{style:t.shippingDateLabel.length>y.ORDER_OUTREACH_DATE_LABEL_MAX_LENGTH?G.errorText:G.mutedText,children:[String(t.shippingDateLabel.length),' / ',String(y.ORDER_OUTREACH_DATE_LABEL_MAX_LENGTH)," characters"]}),(0,j.jsx)(n.default,{style:G.mutedText,children:"Suggestions"}),(0,j.jsx)(c.default,{style:G.shipDateKindChips,children:I.map(e=>(0,j.jsx)(o.default,{accessibilityRole:"button",accessibilityLabel:`Use ship date wording: ${e}`,onPress:()=>{l(Object.assign({},t,{shippingDateLabel:e}))},style:[G.shipDateKindChip,t.shippingDateLabel===e&&G.shipDateKindChipSelected],children:(0,j.jsx)(n.default,{style:[G.shipDateKindChipText,t.shippingDateLabel===e&&G.shipDateKindChipTextSelected],children:e})},e))})]}),'shipping-delay'===e&&(0,j.jsx)(c.default,{style:G.fieldRow,children:(0,j.jsxs)(k,{inRow:!0,label:"Revised estimated ship date (required)",children:[(0,j.jsx)(C.AdminDateInput,{accessibilityLabel:"Revised estimated ship date",disabled:!1,onChange:e=>{l(Object.assign({},t,{shippingDate:e}))},value:t.shippingDate}),(0,j.jsx)(n.default,{style:G.mutedText,children:"No new date yet? Use the Order update template instead."})]})}),'shipping-delay'===e&&(0,j.jsxs)(k,{label:"Message below estimated ship date (optional)",children:[(0,j.jsx)(u.AppTextInput,{accessibilityLabel:"Message below estimated ship date",value:t.shippingClosingText,onChangeText:e=>{l(Object.assign({},t,{shippingClosingText:e}))},placeholder:"Optional context shown after the new ship date",multiline:!0,style:[G.noteInput,S]}),(0,j.jsxs)(n.default,{style:t.shippingClosingText.length>y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH?G.errorText:G.mutedText,children:[String(t.shippingClosingText.length),' / ',String(y.SHIPPING_MESSAGE_TEXT_MAX_LENGTH)," characters"]})]}),'order-update'===e&&(0,j.jsxs)(k,{label:"Message (required)",children:[(0,j.jsx)(u.AppTextInput,{accessibilityLabel:"Order update message",value:t.orderUpdateMessage,onChangeText:e=>{l(Object.assign({},t,{orderUpdateMessage:e}))},placeholder:"Order update included in the email",multiline:!0,style:[G.noteInput,S]}),(0,j.jsxs)(n.default,{style:h?G.errorText:G.mutedText,children:[String(t.orderUpdateMessage.length),' / ',String(y.ORDER_UPDATE_MESSAGE_MAX_LENGTH)," characters"]})]}),'order-update'===e&&(0,j.jsxs)(s.default,{accessibilityRole:"checkbox",accessibilityLabel:"Enable simple formatting",accessibilityHint:"Supports bullet lists, bold, and italics.",accessibilityState:{checked:t.simpleMarkdownEnabled},onPress:()=>{l(Object.assign({},t,{simpleMarkdownEnabled:!t.simpleMarkdownEnabled}))},style:G.acknowledgeRow,children:[(0,j.jsx)(c.default,{style:[G.checkbox,t.simpleMarkdownEnabled&&G.checkboxChecked],children:t.simpleMarkdownEnabled&&(0,j.jsx)(n.default,{style:G.checkmark,children:'\u2713'})}),(0,j.jsxs)(c.default,{style:G.checkboxCopy,children:[(0,j.jsx)(n.default,{style:G.acknowledgeText,children:"Enable simple formatting"}),(0,j.jsx)(n.default,{style:G.mutedText,children:"Supports bullet lists, **bold**, and *italics*."})]})]}),(0,j.jsxs)(s.default,{accessibilityRole:"checkbox",accessibilityLabel:"Include order details in the email",accessibilityState:{checked:t.includeOrderDetails},onPress:()=>{l(Object.assign({},t,{includeOrderDetails:!t.includeOrderDetails}))},style:G.acknowledgeRow,children:[(0,j.jsx)(c.default,{style:[G.checkbox,t.includeOrderDetails&&G.checkboxChecked],children:t.includeOrderDetails&&(0,j.jsx)(n.default,{style:G.checkmark,children:'\u2713'})}),(0,j.jsx)(n.default,{style:G.acknowledgeText,children:"Include order details in the email"})]})]})}function P(e,t){return`${String(e)} ${t}${1===e?'':'s'}`}function k({label:e,children:t,inRow:l=!1}){return(0,j.jsxs)(c.default,{style:[G.draftField,l&&G.draftFieldRowSizing],children:[(0,j.jsx)(n.default,{style:G.label,children:e}),t]})}const G=(0,R.createStyles)({acknowledgeRow:{alignItems:'center',flexDirection:'row',gap:b.SPACING.SM},acknowledgeText:{color:x.COLORS.TEXT_SECONDARY,flexShrink:1,fontSize:T.FONT_SIZE.SM},audienceExcludedText:{color:x.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.SM},audienceSummaryRow:{alignItems:'baseline',flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.SM},audienceSummaryText:{color:x.COLORS.TEXT_SLATE_DARK,fontSize:T.FONT_SIZE.SM,fontWeight:'600'},actionRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.MD},buttonDisabled:{backgroundColor:x.COLORS.BORDER_DISABLED},checkbox:{alignItems:'center',borderColor:x.COLORS.BORDER,borderRadius:4,borderWidth:1,height:20,justifyContent:'center',width:20},checkboxChecked:{backgroundColor:x.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:x.COLORS.BRAND_PRIMARY_DARK},checkboxCopy:{flexShrink:1,gap:b.SPACING.MICRO},checkmark:{color:x.COLORS.BRAND_PRIMARY_DARK,fontSize:T.FONT_SIZE.XS,fontWeight:'700'},choiceGroup:{gap:b.SPACING.SM},draftField:{gap:b.SPACING.XS},draftFieldRowSizing:{flexBasis:240,flexGrow:1},draftForm:{gap:b.SPACING.MD},draftFormColumn:{flexBasis:420,flexGrow:1,gap:b.SPACING.MD,minWidth:280},draftFormLayout:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.XL},errorText:{color:x.COLORS.ERROR_DARK,fontSize:T.FONT_SIZE.SM},fieldRow:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.MD},previewColumn:{flexBasis:420,flexGrow:1,minWidth:280},label:{color:x.COLORS.TEXT_SECONDARY,fontSize:T.FONT_SIZE.SM,fontWeight:'600'},linkText:{color:x.COLORS.TEXT_SLATE_DARK,fontSize:T.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},mutedText:{color:x.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.SM},picker:Object.assign({backgroundColor:x.COLORS.BG_SURFACE,borderRadius:7,borderWidth:0,color:x.COLORS.TEXT_PRIMARY,fontSize:T.FONT_SIZE.SM,height:36,paddingHorizontal:b.SPACING.SM,width:'100%'},{appearance:'none',paddingRight:b.SPACING.XXXL}),pickerChevron:{alignItems:'center',bottom:0,justifyContent:'center',pointerEvents:'none',position:'absolute',right:b.SPACING.MD,top:0},pickerContainer:{backgroundColor:x.COLORS.BG_SURFACE,borderColor:x.COLORS.BORDER,borderRadius:8,borderWidth:1,overflow:'hidden'},noteInput:{minHeight:76,textAlignVertical:'top'},primaryButton:{alignSelf:'flex-start',backgroundColor:x.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:b.SPACING.XL,paddingVertical:b.SPACING.MD},primaryButtonText:{color:x.COLORS.TEXT_INVERSE,fontSize:T.FONT_SIZE.MD,fontWeight:'700'},sectionCard:{gap:b.SPACING.SM},sectionTitle:{color:x.COLORS.TEXT_PRIMARY,fontSiz
879e:T.FONT_SIZE.LG,fontWeight:'700'},senderText:{color:x.COLORS.TEXT_PRIMARY,fontSize:T.FONT_SIZE.SM},shipDateKindChip:{backgroundColor:x.COLORS.BG_SURFACE,borderColor:x.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:b.SPACING.MD,paddingVertical:b.SPACING.XS},shipDateKindChipSelected:{backgroundColor:x.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:x.COLORS.BRAND_PRIMARY_DARK},shipDateKindChipText:{color:x.COLORS.TEXT_SLATE_DARK,fontSize:T.FONT_SIZE.SM},shipDateKindChipTextSelected:{color:x.COLORS.BRAND_PRIMARY_DARK,fontWeight:'600'},shipDateKindChips:{flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.SM},templateCard:{backgroundColor:x.COLORS.BG_SURFACE,borderColor:x.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,flexBasis:220,flexGrow:1,gap:b.SPACING.XS,maxWidth:360,paddingHorizontal:b.SPACING.MD,paddingVertical:b.SPACING.MD},templateCardDescription:{color:x.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.SM},templateCardSelected:{backgroundColor:x.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:x.COLORS.BRAND_PRIMARY_DARK},templateCardTitle:{color:x.COLORS.TEXT_SLATE_DARK,fontSize:T.FONT_SIZE.SM,fontWeight:'600'},templateCardTitleSelected:{color:x.COLORS.BRAND_PRIMARY_DARK},templateCards:{flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.SM}
879,messageInputs:{gap:b.SPACING.MD}})},779,[780,34,95,369,222,488,276,711,605,554,820,490,493,494,489,468,821,767,822,824,823,825,104]);
880__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"Picker",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(_e,"PickerIOS",{enumerable:!0,get:function(){return n.default}});var t=e(r(d[0])),n=e(r(d[1]))},780,[781,818]);
881__d(function(g,r,_i,a,m,_e,_d){"use strict";const e=["enabled","onValueChange","selectedValue","itemStyle","mode","prompt","dropdownIconColor"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return i}});var n=t(r(_d[0])),o=r(_d[1]),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(o),l=t(r(_d[2])),c=t(r(_d[3]));function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d.apply(this,arguments)}const f=(0,o.forwardRef)((e,t)=>(0,l.default)('select',Object.assign({},e,{ref:t}))),s=(0,o.forwardRef)((t,o)=>{const{enabled:l,onValueChange:c,selectedValue:s}=t,i=(0,n.default)(t,e),b=u.useCallback(e=>{const{selectedIndex:t,value:n}=e.target;c&&c(n,t)},[c]);return u.createElement(f,d({disabled:!1===l||void 0,onChange:b,ref:o,value:s},i))});s.Item=c.default;var i=s},781,[109,34,223,782]);
882__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var t=e(r(_d[0])),n=e(r(_d[1]));const o=e=>n.unstable_createElement('option',e);function u({color:e,label:n,testID:u,value:l,enabled:c=!0}){return t.createElement(o,{disabled:!1===c||void 0,style:{color:e},testID:u,value:l,label:n},n)}},782,[34,783]);
883__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"unstable_createElement",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(_e,"findNodeHandle",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(_e,"processColor",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(_e,"render",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(_e,"unmountComponentAtNode",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(_e,"NativeModules",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(_e,"AccessibilityInfo",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(_e,"Alert",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(_e,"Animated",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(_e,"Appearance",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(_e,"AppRegistry",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(_e,"AppState",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(_e,"BackHandler",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(_e,"Clipboard",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(_e,"Dimensions",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(_e,"Easing",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(_e,"I18nManager",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(_e,"Keyboard",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(_e,"InteractionManager",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(_e,"LayoutAnimation",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(_e,"Linking",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(_e,"NativeEventEmitter",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(_e,"PanResponder",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(_e,"PixelRatio",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(_e,"Platform",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(_e,"Share",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(_e,"StyleSheet",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(_e,"UIManager",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(_e,"Vibration",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(_e,"ActivityIndicator",{enumerable:!0,get:function(){return V.default}}),Object.defineProperty(_e,"Button",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(_e,"CheckBox",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(_e,"FlatList",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(_e,"Image",{enumerable:!0,get:function(){return F.default}}
883),Object.defineProperty(_e,"ImageBackground",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(_e,"KeyboardAvoidingView",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(_e,"Modal",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(_e,"Picker",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(_e,"Pressable",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(_e,"ProgressBar",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(_e,"RefreshControl",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(_e,"SafeAreaView",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(_e,"ScrollView",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(_e,"SectionList",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(_e,"StatusBar",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(_e,"Switch",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(_e,"Text",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(_e,"TextInput",{enumerable:!0,get:function(){return ee.default}}),Object.defineProperty(_e,"Touchable",{enumerable:!0,get:function(){return te.default}}),Object.defineProperty(_e,"TouchableHighlight",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(_e,"TouchableNativeFeedback",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(_e,"TouchableOpacity",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(_e,"TouchableWithoutFeedback",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(_e,"View",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(_e,"VirtualizedList",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(_e,"YellowBox",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(_e,"LogBox",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(_e,"DeviceEventEmitter",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(_e,"useColorScheme",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(_e,"useLocaleContext",{enumerable:!0,get:function(){return be.default}}),Object.defineProperty(_e,"useWindowDimensions",{enumerable:!0,get:function(){return ge.default}});var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2])),f=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5])),c=e(r(d[6])),b=e(r(d[7])),p=e(r(d[8])),y=e(r(d[9])),P=e(r(d[10])),O=e(r(d[11])),j=e(r(d[12])),s=e(r(d[13])),h=e(r(d[14])),A=e(r(d[15])),v=e(r(d[16])),S=e(r(d[17])),B=e(r(d[18])),I=e(r(d[19])),k=e(r(d[20])),w=e(r(d[21])),x=e(r(d[22])),C=e(r(d[23])),L=e(r(d[24])),M=e(r(d[25])),T=e(r(d[26])),_=e(r(d[27])),E=e(r(d[28])),V=e(r(d[29])),N=e(r(d[30])),R=e(r(d[31])),D=e(r(d[32])),F=e(r(d[33])),H=e(r(d[34])),K=e(r(d[35])),W=e(r(d[36])),z=e(r(d[37])),U=e(r(d[38])),Y=e(r(d[39])),q=e(r(d[40])),G=e(r(d[41])),J=e(r(d[42])),Q=e(r(d[43])),X=e(r(d[44])),Z=e(r(d[45])),$=e(r(d[46])),ee=e(r(d[47])),te=e(r(d[48])),ne=e(r(d[49])),re=e(r(d[50])),ue=e(r(d[51])),fe=e(r(d[52])),ae=e(r(d[53])),ie=e(r(d[54])),oe=e(r(d[55])),le=e(r(d[56])),ce=e(r(d[57])),de=e(r(d[58])),be=e(r(d[59])),ge=e(r(d[60]))},783,[223,543,50,29,25,784,542,520,271,785,18,786,787,788,284,355,209,789,291,790,521,792,549,331,95,793,42,235,794,410,795,796,274,328,797,798,544,799,369,801,282,802,283,334,803,663,222,394,804,808,809,488,811,276,812,813,814,815,816,817,552]);
884__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u={UIManager:((e=t)&&e.__esModule?e:{default:e}).default}},784,[235]);
885__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]);var n=((e=t)&&e.__esModule?e:{default:e}).default&&null!=window.matchMedia?window.matchMedia('(prefers-color-scheme: dark)'):null,l=new WeakMap,o={getColorScheme:()=>n&&n.matches?'dark':'light',addChangeListener(e){var t=l.get(e);return t||(t=t=>{var n=t.matches;e({colorScheme:n?'dark':'light'})},l.set(e,t)),n&&n.addListener(t),{remove:function(){var t=l.get(e);n&&t&&n.removeListener(t),l.delete(e)}}}}},785,[39]);
886__d(function(g,r,i,a,m,_e,d){"use strict";
886function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var t=e(r(d[0])),n=e(r(d[1])),u=e(r(d[2])),c=u.default&&!document.hasOwnProperty('hidden')&&document.hasOwnProperty('webkitHidden'),s=['change','memoryWarning'],l=c?'webkitvisibilitychange':'visibilitychange',o=c?'webkitVisibilityState':'visibilityState',b='background',f='active',v=null;class h{static get currentState(){if(!h.isAvailable)return f;switch(document[o]){case'hidden':case'prerender':case'unloaded':return b;default:return f}}static addEventListener(e,u){if(h.isAvailable&&((0,t.default)(-1!==s.indexOf(e),'Trying to subscribe to unknown event: "%s"',e),'change'===e))return v||(v=new n.default,document.addEventListener(l,()=>{v&&v.emit('change',h.currentState)},!1)),v.addListener(e,u)}}h.isAvailable=u.default&&!!document[o]},786,[24,293,39]);
887__d(function(g,r,i,a,m,e,d){"use strict";function t(){}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var n={exitApp:t,addEventListener:()=>({remove:t}),removeEventListener:t}},787,[]);
888__d(function(g,r,i,a,m,_e,d){"use strict";var e;Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return t}});class t{static isAvailable(){return void 0===e&&(e='function'==typeof document.queryCommandSupported&&document.queryCommandSupported('copy')),e}static getString(){return Promise.resolve('')}static setString(e){var t=!1,n=document.body;if(n){var o=document.createElement('span');o.textContent=e,o.style.opacity='0',o.style.position='absolute',o.style.whiteSpace='pre-wrap',o.style.userSelect='auto',n.appendChild(o);var c=window.getSelection();c.removeAllRanges();var u=document.createRange();u.selectNodeContents(o),c.addRange(u);try{document.execCommand('copy'),t=!0}catch(e){}c.removeAllRanges(),n.removeChild(o)}return t}}},788,[]);
889__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var e,t=r(d[0]),s=(e=t)&&e.__esModule?e:{default:e},n={isVisible:()=>!1,addListener:()=>({remove:()=>{}}),dismiss(){(0,s.default)()},removeAllListeners(){},removeListener(){}}},789,[285]);
890__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},790,[791]);
891__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(d[0])),n=e(r(d[1]));function s(e,s){t.default.isTesting||n.default.configureNextLayoutAnimation(e,null!=s?s:function(){},function(){})}function u(e,t,n){return{duration:e,create:{type:t,property:n},update:{type:t},delete:{type:t,property:n}}}var o={easeInEaseOut:u(300,'easeInEaseOut','opacity'),linear:u(500,'linear','opacity'),spring:{duration:700,create:{type:'linear',property:'opacity'},update:{type:'spring',springDamping:.4},delete:{type:'linear',property:'opacity'}}},c={configureNext:s,create:u,Types:Object.freeze({spring:'spring',linear:'linear',easeInEaseOut:'easeInEaseOut',easeIn:'easeIn',easeOut:'easeOut',keyboard:'keyboard'}),Properties:Object.freeze({opacity:'opacity',scaleX:'scaleX',scaleY:'scaleY',scaleXY:'scaleXY'}),checkConfig(){console.error('LayoutAnimation.checkConfig(...) has been disabled.')},Presets:o,easeInEaseOut:s.bind(null,o.easeInEaseOut),linear:s.bind(null,o.linear),spring:s.bind(null,o.spring)}},791,[95,235]);
892__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},792,[319]);
893__d(function(g,r,i,a,m,_e,d){"use strict";
893Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=r(d[0]),s=(e=t)&&e.__esModule?e:{default:e};var o=class{static share(e,t){return void 0===t&&(t={}),(0,s.default)('object'==typeof e&&null!==e,'Content to share must be a valid object'),(0,s.default)('string'==typeof e.url||'string'==typeof e.message,'At least one of URL and message is required'),(0,s.default)('object'==typeof t&&null!==t,'Options must be a valid object'),(0,s.default)(!e.title||'string'==typeof e.title,'Invalid title: title should be a string.'),void 0!==window.navigator.share?window.navigator.share({title:e.title,text:e.message,url:e.url}):Promise.reject(new Error('Share is not supported in this browser'))}static get sharedAction(){return'sharedAction'}static get dismissedAction(){return'dismissedAction'}}},793,[24]);
894__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var t=t=>{'vibrate'in window.navigator&&window.navigator.vibrate(t)}
894,n={cancel(){t(0)},vibrate(n){void 0===n&&(n=400),t(n)}}},794,[]);
895__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t})(r(_d[0])),o=e(r(_d[1])),n=e(r(_d[2])),l=e(r(_d[3])),u=t.forwardRef((e,o)=>{var u=e.accessibilityLabel,c=e.color,s=e.disabled,f=e.onPress,b=e.testID,y=e.title;return t.createElement(n.default,{accessibilityLabel:u,accessibilityRole:"button",disabled:s,focusable:!s,onPress:f,ref:o,style:[d.button,c&&{backgroundColor:c},s&&d.buttonDisabled],testID:b},t.createElement(l.default,{style:[d.text,s&&d.textDisabled]},y))});u.displayName='Button';var d=o.default.create({button:{backgroundColor:'#2196F3',borderRadius:2},text:{color:'#fff',fontWeight:'500',padding:8,textAlign:'center',textTransform:'uppercase'},buttonDisabled:{backgroundColor:'#dfdfdf'},textDisabled:{color:'#a1a1a1'}}),c=u},795,[34,42,488,222]);
896__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var o=e(r(_d[0])),t=e(r(_d[1])),l=e(r(_d[2])),n=(function(e){if(e&&e.__esModule)return e;var o={};return e&&Object.keys(e).forEach(function(t){var l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,l.get?l:{enumerable:!0,get:function(){return e[t]}})}),o.default=e,o})(r(_d[3])),d=e(r(_d[4])),c=e(r(_d[5])),u=e(r(_d[6])),C=["aria-readonly","color","disabled","onChange","onValueChange","readOnly","style","value"],M=n.forwardRef((e,o)=>{var c=e['aria-readonly'],M=e.color,y=e.disabled,I=e.onChange,s=e.onValueChange,f=e.readOnly,v=e.style,h=e.value,k=(0,l.default)(e,C);var j=n.createElement(u.default,{style:[b.fakeControl,h&&b.fakeControlChecked,h&&M&&{backgroundColor:M,borderColor:M},y&&b.fakeControlDisabled,h&&y&&b.fakeControlCheckedAndDisabled]}),z=(0,d.default)('input',{checked:h,disabled:y,onChange:function(e){var o=e.nativeEvent.target.checked;e.nativeEvent.value=o,I&&I(e),s&&s(o)},readOnly:!0===f||!0===c||!0===k.accessibilityReadOnly,ref:o,style:[b.nativeControl,b.cursorInherit],type:'checkbox'});return n.createElement(u.default,(0,t.default)({},k,{"aria-disabled":y,"aria-readonly":c,style:[b.root,v,y&&b.cursorDefault]}),j,z)});M.displayName='CheckBox';var b=c.default.create({root:{cursor:'pointer',height:16,userSelect:'none',width:16},cursorDefault:{cursor:'default'},cursorInherit:{cursor:'inherit'},fakeControl:{alignItems:'center',backgroundColor:'#fff',borderColor:'#657786',borderRadius:2,borderStyle:'solid',borderWidth:2,height:'100%',justifyContent:'center',width:'100%'},fakeControlChecked:{backgroundColor:'#009688',backgroundImage:'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")',backgroundRepeat:'no-repeat',borderColor:'#009688'},fakeControlDisabled:{borderColor:'#CCD6DD'},fakeControlCheckedAndDisabled:{backgroundColor:'#AAB8C2',borderColor:'#AAB8C2'},nativeControl:(0,o.default)((0,o.default)({},c.default.absoluteFillObject),{},{height:'100%',margin:0,appearance:'none',padding:0,width:'100%'})}),y=M},796,[19,27,43,34,223,42,276]);
897__d(function(g,r,i,a,m,_e,_d){"use strict";
897function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var t=e(r(_d[0])),n=e(r(_d[1])),l=r(_d[2]),u=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(l),f=e(r(_d[3])),d=e(r(_d[4])),c=e(r(_d[5])),o=["children","style","imageStyle","imageRef"],s={},y=(0,l.forwardRef)((e,l)=>{var y=e.children,h=e.style,b=void 0===h?s:h,_=e.imageStyle,v=e.imageRef,p=(0,n.default)(e,o),O=d.default.flatten(b),j=O.height,w=O.width;return u.createElement(c.default,{ref:l,style:b},u.createElement(f.default,(0,t.default)({},p,{ref:v,style:[{width:w,height:j,zIndex:-1},d.default.absoluteFill,_]})),y)});y.displayName='ImageBackground';var h=y},797,[27,43,34,328,42,276]);
898__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=e(r(_d[0])),n=e(r(_d[1])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=e(r(_d[3])),f=["behavior","contentContainerStyle","keyboardVerticalOffset"];class s extends o.Component{constructor(){super(...arguments),this.frame=null,this.onLayout=e=>{this.frame=e.nativeEvent.layout}}relativeKeyboardHeight(e){var t=this.frame;if(!t||!e)return 0;var n=e.screenY-(this.props.keyboardVerticalOffset||0);return Math.max(t.y+t.height-n,0)}onKeyboardChange(e){}render(){var e=this.props,s=(e.behavior,e.contentContainerStyle,e.keyboardVerticalOffset,(0,n.default)(e,f));return o.createElement(u.default,(0,t.default)({onLayout:this.onLayout},s))}}var c=s},798,[27,43,34,276]);
899__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return b}});var t=e(r(_d[0])),n=e(r(_d[1])),l=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),u=e(r(_d[3])),d=e(r(_d[4])),f=e(r(_d[5])),o=e(r(_d[6])),c=e(r(_d[7])),s=["children","enabled","onValueChange","selectedValue","style","testID","itemStyle","mode","prompt"],y=l.forwardRef((e,o)=>{var c=e.children,y=e.enabled,b=e.onValueChange,p=e.selectedValue,h=e.style,_=e.testID,O=(e.itemStyle,e.mode,e.prompt,(0,n.default)(e,s)),j=l.useRef(null);var I=(0,t.default)({children:c,disabled:!1===y||void 0,onChange:function(e){var t=e.target,n=t.selectedIndex,l=t.value;b&&b(l,n)},style:[v.initial,h],testID:_,value:p},O),D=(0,f.default)(I),P=(0,d.default)(j,D,o);return I.ref=P,(0,u.default)('select',I)});y.Item=o.default;var v=c.default.create({initial:{fontFamily:'System',fontSize:'inherit',margin:0}}),b=y},799,[19,43,34,223,240,242,800,42]);
900__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),l=(e=t)&&e.__esModule?e:{default:e};function u(e){var t=e.color,u=e.label,n=e.testID,o=e.value,c={color:t};return(0,l.default)('option',{children:u,style:c,testID:n,value:o})}},800,[223]);
901__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var t=e(r(_d[0])),n=e(r(_d[1])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),l=e(r(_d[3])),u=e(r(_d[4])),d=["color","indeterminate","progress","trackColor","style"],s=o.forwardRef((e,l)=>{var s=e.color,f=void 0===s?'#1976D2':s,v=e.indeterminate,p=void 0!==v&&v,y=e.progress,b=void 0===y?0:y,_=e.trackColor,h=void 0===_?'transparent':_,j=e.style,k=(0,n.default)(e,d),C=100*b,O=p?'25%':C+"%";return o.createElement(u.default,(0,t.default)({},k,{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":p?null:C,ref:l,role:"progressbar",style:[c.track,j,{backgroundColor:h}]}),o.createElement(u.default,{style:[{backgroundColor:f,width:O},c.progress,p&&c.animation]}))});s.displayName='ProgressBar';var c=l.default.create({track:{forcedColorAdjust:'none',height:5,overflow:'hidden',userSelect:'none',zIndex:0},progress:{forcedColorAdjust:'none',height:'100%',zIndex:-1},animation:{animationDuration:'1s',animationKeyframes:[{'0%':{transform:'translateX(-100%)'},'100%':{transform:'translateX(400%)'}}],animationTimingFunction:'linear',animationIterationCount:'infinite'}}),f=s},801,[27,43,34,42,276]);
902__d(function(g,r,i,a,m,_e,_d){"use strict";
902function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return w}});var t=e(r(_d[0])),n=e(r(_d[1])),o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[2])),f=e(r(_d[3])),u=e(r(_d[4])),d=e(r(_d[5])),s=["style"],l=d.default&&window.CSS&&window.CSS.supports&&window.CSS.supports('top: constant(safe-area-inset-top)')?'constant':'env',c=o.forwardRef((e,f)=>{var d=e.style,l=(0,n.default)(e,s);return o.createElement(u.default,(0,t.default)({},l,{ref:f,style:[p.root,d]}))});c.displayName='SafeAreaView';var p=f.default.create({root:{paddingTop:l+"(safe-area-inset-top)",paddingRight:l+"(safe-area-inset-right)",paddingBottom:l+"(safe-area-inset-bottom)",paddingLeft:l+"(safe-area-inset-left)"}}),w=c},802,[27,43,34,42,276,39]);
903__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var t=()=>{};function n(){return null}n.setBackgroundColor=t,n.setBarStyle=t,n.setHidden=t,n.setNetworkActivityIndicatorVisible=t,n.setTranslucent=t;var u=n},803,[]);
904__d(function(g,r,i,a,m,_e,d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return F}});var t=e(r(d[0])),o=e(r(d[1])),s=e(r(d[2])),E=e(r(d[3])),n=e(r(d[4])),l=e(r(d[5])),h=e(r(d[6])),u=e(r(d[7])),R=e(r(d[8])),c=r(d[9]),_=e=>{var t=e.touches,o=e.changedTouches,s=t&&t.length>0,E=o&&o.length>0;return!s&&E?o[0]:s?t[0]:e},S='NOT_RESPONDER',T='RESPONDER_INACTIVE_PRESS_IN',P='RESPONDER_INACTIVE_PRESS_OUT',D='RESPONDER_ACTIVE_PRESS_IN',N='RESPONDER_ACTIVE_PRESS_OUT',b='RESPONDER_ACTIVE_LONG_PRESS_IN',O='RESPONDER_ACTIVE_LONG_PRESS_OUT',A='ERROR',p={NOT_RESPONDER:!1,RESPONDER_INACTIVE_PRESS_IN:!1,RESPONDER_INACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_PRESS_IN:!1,RESPONDER_ACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_LONG_PRESS_IN:!1,RESPONDER_ACTIVE_LONG_PRESS_OUT:!1,ERROR:!1},f=(0,o.default)((0,o.default)({},p),{},{RESPONDER_ACTIVE_PRESS_OUT:!0,RESPONDER_ACTIVE_PRESS_IN:!0}),v=(0,o.default)((0,o.default)({},p),{},{RESPONDER_INACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),L=(0,o.default)((0,o.default)({},p),{},{RESPONDER_ACTIVE_LONG_PRESS_IN:!0}
904),I='DELAY',y='RESPONDER_GRANT',C='RESPONDER_RELEASE',G='RESPONDER_TERMINATED',H='ENTER_PRESS_RECT',V='LEAVE_PRESS_RECT',M='LONG_PRESS_DETECTED',U={NOT_RESPONDER:{DELAY:A,RESPONDER_GRANT:T,RESPONDER_RELEASE:A,RESPONDER_TERMINATED:A,ENTER_PRESS_RECT:A,LEAVE_PRESS_RECT:A,LONG_PRESS_DETECTED:A},RESPONDER_INACTIVE_PRESS_IN:{DELAY:D,RESPONDER_GRANT:A,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:T,LEAVE_PRESS_RECT:P,LONG_PRESS_DETECTED:A},RESPONDER_INACTIVE_PRESS_OUT:{DELAY:N,RESPONDER_GRANT:A,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:T,LEAVE_PRESS_RECT:P,LONG_PRESS_DETECTED:A},RESPONDER_ACTIVE_PRESS_IN:{DELAY:A,RESPONDER_GRANT:A,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:D,LEAVE_PRESS_RECT:N,LONG_PRESS_DETECTED:b},RESPONDER_ACTIVE_PRESS_OUT:{DELAY:A,RESPONDER_GRANT:A,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:D,LEAVE_PRESS_RECT:N,LONG_PRESS_DETECTED:A},RESPONDER_ACTIVE_LONG_PRESS_IN:{DELAY:A,RESPONDER_GRANT:A,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:b,LEAVE_PRESS_RECT:O,LONG_PRESS_DETECTED:b},RESPONDER_ACTIVE_LONG_PRESS_OUT:{DELAY:A,RESPONDER_GRANT:A,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:b,LEAVE_PRESS_RECT:O,LONG_PRESS_DETECTED:A},error:{DELAY:S,RESPONDER_GRANT:T,RESPONDER_RELEASE:S,RESPONDER_TERMINATED:S,ENTER_PRESS_RECT:S,LEAVE_PRESS_RECT:S,LONG_PRESS_DETECTED:S}},Y={componentDidMount:function(){(0,c.warnOnce)('TouchableMixin','TouchableMixin is deprecated. Please use Pressable.');var e=this.getTouchableNode&&this.getTouchableNode();e&&e.addEventListener&&(this._touchableBlurListener=e=>{this._isTouchableKeyboardActive&&(this.state.touchable.touchState&&this.state.touchable.touchState!==S&&this.touchableHandleResponderTerminate({nativeEvent:e}),this._isTouchableKeyboardActive=!1)},e.addEventListener('blur',this._touchableBlurListener))},componentWillUnmount:function(){var e=this.getTouchableNode&&this.getTouchableNode();e&&e.addEventListener&&e.removeEventListener('blur',this._touchableBlurListener),this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressInLocation=null,this.state.touchable.responderID=null},touchableGetInitialState:function(){return{touchable:{touchState:void 0,responderID:null}}},touchableHandleResponderTerminationRequest:function(){return!this.props.rejectResponderTermination},touchableHandleStartShouldSetResponder:function(){return!this.props.disabled},touchableLongPressCancelsPress:function(){return!0},touchableHandleResponderGrant:function(e){var t=e.currentTarget;e.persist(),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressOutDelayTimeout=null,this.state.touchable.touchState=S,this.state.touchable.responderID=t,this._receiveSignal(y,e);var o=void 0!==this.touchableGetHighlightDelayMS?Math.max(this.touchableGetHighlightDelayMS(),0):130;0!==(o=isNaN(o)?130:o)?this.touchableDelayTimeout=setTimeout(this._handleDelay.bind(this,e),o):this._handleDelay(e);var s=void 0!==this.touchableGetLongPressDelayMS?Math.max(this.touchableGetLongPressDelayMS(),10):370;s=isNaN(s)?370:s,this.longPressDelayTimeout=setTimeout(this._handleLongDelay.bind(this,e),s+o)},touchableHandleResponderRelease:function(e){this.pressInLocation=null,this._receiveSignal(C,e)},touchableHandleResponderTerminate:function(e){this.pressInLocation=null,this._receiveSignal(G,e)},touchableHandleResponderMove:function(e){if(this.state.touchable.positionOnActivate){var t=this.state.touchable.positionOnActivate,o=this.state.touchable.dimensionsOnActivate,s=this.touchableGetPressRectOffset?this.touchableGetPressRectOffset():{left:20,right:20,top:20,bottom:20},E=s.left,n=s.top,l=s.right,h=s.bottom,u=this.touchableGetHitSlop?this.touchableGetHitSlop():null;u&&(E+=u.left||0,n+=u.top||0,l+=u.right||0,h+=u.bottom||0);var R=_(e.nativeEvent),c=R&&R.pageX,S=R&&R.pageY;if(this.pressInLocation)this._getDistanceBetweenPoints(c,S,this.pressInLocation.pageX,this.pressInLocation.pageY)>10&&this._cancelLongPressDelayTimeout();if(c>t.left-E&&S>t.top-n&&c<t.left+o.width+l&&S<t.top+o.height+h){var P=this.state.touchable.touchState;this._receiveSignal(H,e),this.state.touchable.touchState===T&&P!==T&&this._cancelLongPressDelayTimeout()}else this._cancelLongPressDelayTimeout(),this._receiveSignal(V,e)}},touchableHandleFocus:function(e){this.props.onFocus&&this.props.onFocus(e)},touchableHandleBlur:function(e){this.props.onBlur&&this.props.onBlur(e)},_remeasureMetricsOnActivation:function(){var e=this.state.touchable.responderID;null!=e&&u.default.measure(e,this._handleQueryLayout)},_handleQueryLayout:function(e,t,o,s,n,h){(e||t||o||s||n||h)&&(this.state.touchable.positionOnActivate&&l.default.release(this.state.touchable.positionOnActivate),this.state.touchable.dimensionsOnActivate&&E.default.release(this.state.touchable.dimensionsOnActivate),this.state.touchable.positionOnActivate=l.default.getPooled(n,h),this.state.touchable.dimensionsOnActivate=E.default.getPooled(o,s))},_handleDelay:function(e){this.touchableDelayTimeout=null,this._receiveSignal(I,e)},_handleLongDelay:function(e){this.longPressDelayTimeout=null;var t=this.state.touchable.touchState;t!==D&&t!==b?console.error('Attempted to transition from state `'+t+'` to `'+b+"`, which is not supported. This is most likely due to `Touchable.longPressDelayTimeout` not being cancelled."):this._receiveSignal(M,e)},_receiveSignal:function(e,t){var o=this.state.touchable.responderID,s=this.state.touchable.touchState,E=U[s]&&U[s][e];if(o||e!==C){if(!E)throw new Error('Unrecognized signal `'+e+'` or state `'+s+'` for Touchable responder `'+o+'`');
904if(E===A)throw new Error('Touchable cannot transition from `'+s+'` to `'+e+'` for responder `'+o+'`');s!==E&&(this._performSideEffectsForTransition(s,E,e,t),this.state.touchable.touchState=E)}},_cancelLongPressDelayTimeout:function(){this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.longPressDelayTimeout=null},_isHighlight:function(e){return e===D||e===b},_savePressInLocation:function(e){var t=_(e.nativeEvent),o=t&&t.pageX,s=t&&t.pageY,E=t&&t.locationX,n=t&&t.locationY;this.pressInLocation={pageX:o,pageY:s,locationX:E,locationY:n}},_getDistanceBetweenPoints:function(e,t,o,s){var E=e-o,n=t-s;return Math.sqrt(E*E+n*n)},_performSideEffectsForTransition:function(e,t,o,s){var E=this._isHighlight(e),n=this._isHighlight(t);(o===G||o===C)&&this._cancelLongPressDelayTimeout();var l=e===S&&t===T,h=!f[e]&&f[t];if((l||h)&&this._remeasureMetricsOnActivation(),v[e]&&o===M&&this.touchableHandleLongPress&&this.touchableHandleLongPress(s),n&&!E?this._startHighlight(s):!n&&E&&this._endHighlight(s),v[e]&&o===C){var u=!!this.props.onLongPress,R=L[e]&&(!u||!this.touchableLongPressCancelsPress());(!L[e]||R)&&this.touchableHandlePress&&(n||E||(this._startHighlight(s),this._endHighlight(s)),this.touchableHandlePress(s))}this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.touchableDelayTimeout=null},_playTouchSound:function(){u.default.playTouchSound()},_startHighlight:function(e){this._savePressInLocation(e),this.touchableHandleActivePressIn&&this.touchableHandleActivePressIn(e)},_endHighlight:function(e){this.touchableHandleActivePressOut&&(this.touchableGetPressOutDelayMS&&this.touchableGetPressOutDelayMS()?this.pressOutDelayTimeout=setTimeout(()=>{this.touchableHandleActivePressOut(e)},this.touchableGetPressOutDelayMS()):this.touchableHandleActivePressOut(e))},touchableHandleKeyEvent:function(e){var t=e.type,o=e.key;'Enter'!==o&&' '!==o||('keydown'===t?this._isTouchableKeyboardActive||this.state.touchable.touchState&&this.state.touchable.touchState!==S||(this.touchableHandleResponderGrant(e),this._isTouchableKeyboardActive=!0):'keyup'===t&&this._isTouchableKeyboardActive&&this.state.touchable.touchState&&this.state.touchable.touchState!==S&&(this.touchableHandleResponderRelease(e),this._isTouchableKeyboardActive=!1),e.stopPropagation(),'Enter'===o&&'link'===s.default.propsToAriaRole(this.props)||e.preventDefault())},withoutDefaultFocusAndBlur:{}},B=(Y.touchableHandleFocus,Y.touchableHandleBlur,(0,t.default)(Y,["touchableHandleFocus","touchableHandleBlur"]));Y.withoutDefaultFocusAndBlur=B;var w={Mixin:Y,TOUCH_TARGET_DEBUG:!1,renderDebugView:e=>{var t=e.color,s=e.hitSlop;if(!w.TOUCH_TARGET_DEBUG)return null;var E={};for(var l in s=s||{top:0,bottom:0,left:0,right:0})E[l]=-s[l];var u=(0,n.default)(t);if('number'!=typeof u)return null;var c='#'+('00000000'+u.toString(16)).substr(-8);return h.default.createElement(R.default,{pointerEvents:"none",style:(0,o.default)({position:'absolute',borderColor:c.slice(0,-2)+'55',borderWidth:1,borderStyle:'dashed',backgroundColor:c.slice(0,-2)+'0F'},E)})}},F=w},804,[43,19,224,805,51,807,34,235,276,87]);
905__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return l}});var e,t=r(d[0]),o=(e=t)&&e.__esModule?e:{default:e},n=o.default.twoArgumentPooler;function u(e,t){this.width=e,this.height=t}u.prototype.destructor=function(){this.width=null,this.height=null},u.getPooledFromElement=function(e){return u.getPooled(e.offsetWidth,e.offsetHeight)},o.default.addPoolingTo(u,n);var l=u},805,[806]);
906__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return l}}),r(d[0]);var o=function(o,n){var t=this;if(t.instancePool.length){var l=t.instancePool.pop();return t.call(l,o,n),l}return new t(o,n)},n=function(o){var n=this;o.destructor(),n.instancePool.length<n.poolSize&&n.instancePool.push(o)},t=o,l={addPoolingTo:function(o,l){var u=o;return u.instancePool=[],u.getPooled=l||t,u.poolSize||(u.poolSize=10),u.release=n,u},twoArgumentPooler:o}},806,[24]);
907__d(function(g,r,i,a,m,_e,d){"use strict";
907Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var t,e=r(d[0]),o=(t=e)&&t.__esModule?t:{default:t},u=o.default.twoArgumentPooler;function l(t,e){this.left=t,this.top=e}l.prototype.destructor=function(){this.left=null,this.top=null},o.default.addPoolingTo(l,u);var n=l},807,[806]);
908__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return h}});var n=e(r(_d[0])),l=e(r(_d[1])),s=r(_d[2]),t=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(l){var s=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(n,l,s.get?s:{enumerable:!0,get:function(){return e[l]}})}),n.default=e,n})(s),o=e(r(_d[3])),u=e(r(_d[4])),d=e(r(_d[5])),c=e(r(_d[6])),y=["activeOpacity","children","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onHideUnderlay","onLongPress","onPress","onPressIn","onPressOut","onShowUnderlay","rejectResponderTermination","style","testOnly_pressed","underlayColor"];function f(e,n){return{child:{opacity:null!=e?e:.85},underlay:{backgroundColor:void 0===n?'black':n}}}function P(e){return null!=e.onPress||null!=e.onPressIn||null!=e.onPressOut||null!=e.onLongPress}function b(e,d){var b=e.activeOpacity,O=e.children,h=e.delayPressIn,v=e.delayPressOut,_=e.delayLongPress,j=e.disabled,L=e.focusable,C=e.onHideUnderlay,E=e.onLongPress,S=e.onPress,k=e.onPressIn,I=e.onPressOut,w=e.onShowUnderlay,M=e.rejectResponderTermination,R=e.style,U=e.testOnly_pressed,H=e.underlayColor,T=(0,l.default)(e,y),D=(0,s.useRef)(null),x=(0,o.default)(d,D),A=(0,s.useState)(!0===U?f(b,H):null),N=A[0],q=A[1],z=(0,s.useCallback)(()=>{P(e)&&(q(f(b,H)),null!=w&&w())},[b,w,e,H]),B=(0,s.useCallback)(()=>{!0!==U&&P(e)&&(q(null),null!=C&&C())},[C,e,U]),F=(0,s.useMemo)(()=>({cancelable:!M,disabled:j,delayLongPress:_,delayPressStart:h,delayPressEnd:v,onLongPress:E,onPress:S,onPressStart(e){z(),null!=k&&k(e)},onPressEnd(e){B(),null!=I&&I(e)}}),[_,h,v,j,E,S,k,I,M,z,B]),G=(0,u.default)(D,F),J=t.Children.only(O);return t.createElement(c.default,(0,n.default)({},T,G,{accessibilityDisabled:j,focusable:!j&&!1!==L,pointerEvents:j?'box-none':void 0,ref:x,style:[p.root,R,!j&&p.actionable,N&&N.underlay]}),t.cloneElement(J,{style:[J.props.style,N&&N.child]}))}var p=d.default.create({root:{userSelect:'none'},actionable:{cursor:'pointer',touchAction:'manipulation'}}),O=t.memo(t.forwardRef(b));O.displayName='TouchableHighlight';var h=O},808,[27,43,34,240,374,42,276]);
909__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},809,[810]);
910__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),u=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),f=["style"];var c={},o=function(e){var o=e.style,s=(0,u.default)(e,f);return l.default.createElement(n.default,(0,t.default)({},s,{style:[c,o]}))}},810,[27,43,276,34]);
911__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return y}});var s=r(_d[0]),t=(function(e){if(e&&e.__esModule)return e;var s={};return e&&Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),s.default=e,s})(s),n=e(r(_d[1])),l=e(r(_d[2])),o=e(r(_d[3])),c=r(_d[4]),u={accessibilityDisabled:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityState:!0,accessibilityValue:!0,children:!0,disabled:!0,focusable:!0,nativeID:!0,onBlur:!0,onFocus:!0,onLayout:!0,testID:!0},d=e=>(0,n.default)(e,u);function b(e,n){(0,c.warnOnce)('TouchableWithoutFeedback','TouchableWithoutFeedback is deprecated. Please use Pressable.');var u=e.delayPressIn,b=e.delayPressOut,f=e.delayLongPress,y=e.disabled,P=e.focusable,h=e.onLongPress,p=e.onPress,v=e.onPressIn,O=e.onPressOut,_=e.rejectResponderTermination,j=(0,s.useRef)(null),L=(0,s.useMemo)(()=>({cancelable:!_,disabled:y,delayLongPress:f,delayPressStart:u,delayPressEnd:b,onLongPress:h,onPress:p,onPressStart:v,onPressEnd:O}),[y,u,b,f,h,p,v,O,_]),D=(0,o.default)(j,L),R=t.Children.only(e.children),k=[R.props.children],E=d(e);E.accessibilityDisabled=y,E.focusable=!y&&!1!==P,E.ref=(0,l.default)(n,j,R.ref);var F=Object.assign(E,D);return t.cloneElement(R,F,...k)}var f=t.memo(t.forwardRef(b));f.displayName='TouchableWithoutFeedback';var y=f},811,[34,232,240,374,87]);
912__d(function(g,r,i,a,m,_e,d){"use strict";
912Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},812,[278]);
913__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}});var t=e(r(d[0])),n=e(r(d[1]));function u(e){return t.default.createElement(n.default,e)}u.ignoreWarnings=()=>{};var f=u},813,[34,810]);
914__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});var n={ignoreLogs(){},ignoreAllLogs(){},uninstall(){},install(){}}},814,[]);
915__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),u=((e=t)&&e.__esModule?e:{default:e}).default},815,[320]);
916__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=r(_d[1]),u=(e=n)&&e.__esModule?e:{default:e};function o(){var e=t.useState(u.default.getColorScheme()),n=e[0],o=e[1];return t.useEffect(()=>u.default.addChangeListener(function(e){o(e.colorScheme)}).remove),n}},816,[34,785]);
917__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t=r(d[0]).useLocaleContext},817,[229]);
918__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var e,t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=r(_d[1]),u=(e=n)&&e.__esModule?e:{default:e};function f(){return t.createElement(u.default,null)}f.Item=u.default;var c=f},818,[34,819]);
919__d(function(g,r,i,a,m,_e,_d){'use strict';function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return c}});var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),n=e(r(_d[1]));const u=e(r(_d[2])).default.create({unimplementedView:{}});var c=e=>t.createElement(n.default,{style:[u.unimplementedView,e.style]},e.children)},819,[34,276,42]);
920__d(function(g,r,i,a,m,_e,d){"use strict";const e=["checked","disabled","interaction"],t=["checked","disabled","interaction"];function c(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.RadioOption=function(e){if('pressable'===e.interaction)return(0,o.jsx)(b,Object.assign({},e));const{checked:c,disabled:n=!1,interaction:u}=e,f=(0,s.default)(e,t);const j=!0===n;return(0,o.jsx)(l.default,Object.assign({},f,{disabled:j,accessibilityRole:"radio","aria-checked":c,accessibilityState:{disabled:j}}))};var s=c(r(d[0]));r(d[1]);var n=c(r(d[2])),l=c(r(d[3])),o=r(d[4]);function b(t){let{checked:c,disabled:l=!1,interaction:b}=t,u=(0,s.default)(t,e);const f=!0===l;return(0,o.jsx)(n.default,Object.assign({},u,{disabled:f,accessibilityRole:"radio","aria-checked":c,accessibilityState:{disabled:f}}))}},820,[109,34,369,488,104]);
921__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AdminDateInput=function({accessibilityLabel:n,disabled:o,onChange:u,testID:s,value:b}){return(0,t.createElement)('input',{'aria-label':n,'data-testid':s,disabled:o,onChange:t=>{u(t.currentTarget.value)},style:l,type:'date',value:b})};var t=r(d[0]),n=r(d[1]),o=r(d[2]);const l={backgroundColor:n.COLORS.BG_SURFACE,border:`1px solid ${n.COLORS.BORDER}`,borderRadius:8,boxSizing:'border-box',color:n.COLORS.TEXT_PRIMARY,fontFamily:o.FONT_FAMILY.W
921EB_SANS,fontSize:o.FONT_SIZE.MD,minHeight:44,padding:'10px 12px',width:'100%'}},821,[34,490,494]);
922__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildIncludedShopifyOrderGids=function(n,u){const c=[];for(const t of n)!t.sendable||null==t.reviewRecipientId||u.excludedOrderGids.has(t.shopifyOrderGid)||u.excludedRecipientIds.has(t.reviewRecipientId)||c.push(t.shopifyOrderGid);return c},e.hasConfirmableAudience=function(u,c){return(0,n.deriveOrderOutreachSelection)(u,c).uniqueIncludedRecipients>0},e.campaignCounts=function(n){return{includedRecipients:n.includedRecipientCount,excludedRecipients:n.excludedRecipientCount,includedOrders:n.includedOrderCount,excludedOrders:n.excludedOrderCount}};var n=r(d[0])},822,[823]);
923__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.toggleOrderExclusion=function(t,c){return{excludedOrderGids:n(t.excludedOrderGids,c),excludedRecipientIds:new Set(t.excludedRecipientIds)}},e.toggleRecipientExclusion=function(t,c){return{excludedOrderGids:new Set(t.excludedOrderGids),excludedRecipientIds:n(t.excludedRecipientIds,c)}},e.includeAllOrders=function(n){return{excludedOrderGids:new Set,excludedRecipientIds:new Set}},e.excludeAllOrders=function(n,t){return{excludedOrderGids:new Set(t.filter(n=>n.sendable).map(n=>n.shopifyOrderGid)),excludedRecipientIds:new Set(n.excludedRecipientIds)}},e.includeRecipientOrders=function(n,t,c){const s=new Set(t.filter(n=>n.sendable&&n.reviewRecipientId===c).map(n=>n.shopifyOrderGid));return{excludedOrderGids:new Set([...n.excludedOrderGids].filter(n=>!s.has(n))),excludedRecipientIds:new Set([...n.excludedRecipientIds].filter(n=>n!==c))}},e.deriveOrderOutreachSelection=function(n,t){const c=new Set,s=new Set,u=new Map;for(const l of n){if(!l.sendable)continue;const n=l.reviewRecipientId;if(null==n)continue;const o=t.excludedOrderGids.has(l.shopifyOrderGid)||t.excludedRecipientIds.has(n);o?s.add(l.shopifyOrderGid):c.add(l.shopifyOrderGid);const p=u.get(n)??!1;u.set(n,p||!o)}let l=0,o=0;for(const n of u.values())n?l+=1:o+=1;return{includedOrderGids:c,excludedOrderGids:s,includedOrders:c.size,excludedOrders:s.size,uniqueIncludedRecipients:l,excludedRecipients:o}};function n(n,t){const c=new Set(n);return c.has(t)?c.delete(t):c.add(t),c}},823,[]);
924__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ORDER_UPDATE_MESSAGE_MAX_LENGTH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SHIPPING_MESSAGE_TEXT_MAX_LENGTH",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ORDER_OUTREACH_DATE_LABEL_MAX_LENGTH",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"ORDER_OUTREACH_MESSAGE_PRESETS",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"EMPTY_ORDER_OUTREACH_MESSAGE_VALUES",{enumerable:!0,get:function(){return p}}),e.messagePresetInputsValid=function(s,p){if('order-update'===s){const t=p.orderUpdateMessage.trim();return''!==t&&t.length<=n}const o=p.shippingDateLabel.trim();return''!==p.shippingDate.trim()&&''!==o&&o.length<=l&&p.shippingOpeningText.trim().length<=t&&p.shippingClosingText.trim().length<=t},e.messageDefinitionForPreset=function(n,t){if('order-update'===n)return{heading:null,openingText:o(t.orderUpdateMessage),dateCallout:null,closingText:null,orderDetailsIntroduction:t.includeOrderDetails?'This update concerns the following order(s):':null,includeOrderDetails:t.includeOrderDetails,simpleMarkdownEnabled:t.simpleMarkdownEnabled};return{heading:'An update on your shipment',openingText:o(t.shippingOpeningText),dateCallout:{date:t.shippingDate.trim(),label:t.shippingDateLabel.trim()},closingText:o(t.shippingClosingText),orderDetailsIntroduction:null,includeOrderDetails:t.includeOrderDetails,simpleMarkdownEnabled:!1}};const n=1500,t=500,l=80,s=[{id:'order-update',displayName:'Order update',description:'Send a general transactional update about selected orders.'},{id:'shipping-delay',displayName:'Shipping delay',description:'Share a revised shipping date with optional context.'}],p={subject:'',orderUpdateMessage:'',shippingOpeningText:'',shippingDate:'',shippingDateLabel:'',shippingClosingText:'',includeOrderDetails:!0,simpleMarkdownEnabled:!1};function o(n){const t=n.trim();return''===t?null:t}},824,[]);
925__d(function(g,r,i,a,m,_e,d){"use strict";
925function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SyntheticOrderOutreachPreview=function({messagePresetSelected:e,messageDefinition:c,subject:u}){const[h,S]=(0,t.useState)('one_customer_multiple_orders'),[p,b]=(0,t.useState)(null),[T,x]=(0,t.useState)('desktop'),[y,L]=(0,t.useState)(!1),[M,N]=(0,t.useState)(null),[P,v]=(0,t.useState)(null),[F,B]=(0,t.useState)(0),G=(0,t.useRef)(0),W=null!=c&&''!==u.trim()&&u.length<=_,H=e?'Fill the required fields to preview.':'Choose a template to continue.';return(0,t.useEffect)(()=>{if(!W)return v(null),b(null),N(null),void L(!1);const e=setTimeout(()=>{v({subject:u,messageDefinition:c,scenario:h})},R);return()=>{clearTimeout(e)}},[W,c,u,h]),(0,t.useEffect)(()=>{if(null==P)return;const e=G.current+1;G.current=e;let t=!1;return(async()=>{L(!0),N(null);try{const o=await O.orderOutreachAdminApi.syntheticPreview({scenario:P.scenario,subject:P.subject.trim(),messageDefinition:P.messageDefinition});t||G.current!==e||b(o)}catch(o){t||G.current!==e||N((0,f.errorMessage)(o,'Failed to render preview'))}finally{t||G.current!==e||L(!1)}})(),()=>{t=!0}},[P,F]),(0,C.jsxs)(n.default,{style:I.container,children:[(0,C.jsx)(o.default,{style:I.heading,children:"Email preview"}),(0,C.jsx)(o.default,{style:I.syntheticNotice,children:"Synthetic sample data only \u2014 not selected customers. Subject is set by the renderer from your authored message below."}),W?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(j,{label:"Synthetic scenario",values:w,labels:E,selected:h,onChange:S}),y&&(0,C.jsx)(o.default,{style:I.mutedText,children:"Rendering preview\u2026"}),null!=M&&(0,C.jsxs)(n.default,{style:I.errorRow,children:[(0,C.jsx)(o.default,{accessibilityRole:"alert",style:I.error,children:M}),(0,C.jsx)(l.default,{accessibilityRole:"button",accessibilityLabel:"Retry email preview",onPress:()=>{B(e=>e+1)},children:(0,C.jsx)(o.default,{style:I.linkText,children:"Retry"})})]}),null!=p&&(0,C.jsxs)(n.default,{style:I.preview,children:[(0,C.jsx)(o.default,{style:I.subjectLabel,children:"Subject"}),(0,C.jsx)(o.default,{accessibilityLabel:"Rendered email subject",selectable:!0,style:I.subject,children:p.subject}),(0,C.jsxs)(n.default,{style:I.viewportHeader,children:[(0,C.jsx)(o.default,{style:I.subjectLabel,children:"HTML preview"}),(0,C.jsx)(n.default,{style:I.widthChoices,children:['desktop','narrow'].map(e=>(0,C.jsx)(s.RadioOption,{checked:T===e,interaction:"pressable",accessibilityLabel:`${D(e)} preview width`,onPress:()=>{x(e)},style:[I.widthChoice,T===e&&I.widthChoiceSelected],children:(0,C.jsx)(o.default,{style:[I.widthChoiceText,T===e&&I.widthChoiceTextSelected],children:D(e)})},e))})]}),(0,C.jsx)(A,{htmlBody:p.htmlBody,contentWidth:'narrow'===T?'narrow':'fluid'}),(0,C.jsx)(o.default,{style:I.subjectLabel,children:"Plain-text body"}),(0,C.jsx)(o.default,{selectable:!0,style:I.plainText,children:p.plainTextBody})]})]}):(0,C.jsx)(o.default,{style:I.mutedText,children:H})]})},_e.deriveEmailFrameHeight=L,_e.SandboxedEmailFrame=A;var t=r(d[0]);r(d[1]);var o=e(r(d[2])),l=e(r(d[3])),n=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),S=r(d[9]),f=r(d[10]),O=r(d[11]),C=r(d[12]);const R=500,_=255,p=360,b=480,T=320,x=640,y='Viewport preview only; this does not simulate email clients.',E={one_customer_one_order:'One customer, one order',one_customer_multiple_orders:'One customer, multiple orders',one_order_multiple_products:'One order, multiple products',long_names:'Long names',missing_optional_values:'Missing optional values',large_order_list:'Large order list',html_significant_characters:'HTML-significant characters'},w=['one_customer_one_order','one_customer_multiple_orders','one_order_multiple_products','long_names','missing_optional_values','large_order_list','html_significant_characters'];function L(e){return{heightPx:Math.min(x,Math.max(T,e)),overflowing:e>x}}function A({htmlBody:e,contentWidth:l="fluid"}){const s=(0,t.useRef)(null),[u,h]=(0,t.useState)({heightPx:b,overflowing:!1});(0,t.useEffect)(()=>{const e=s.current;if(null==e)return;const t=()=>{try{const t=e.contentDocument;if(null==t)return;const o=Math.max(t.documentElement.scrollHeight,t.body.scrollHeight);if(o<=0)return;h(L(o))}catch{}};return t(),e.addEventListener('load',t),()=>{e.removeEventListener('load',t)}},[e]);const S='narrow'===l?p:'100%';return(0,C.jsxs)(n.default,{testID:"sandboxed-email-frame",style:I.frameChrome,children:[(0,C.jsx)(n.default,{style:I.frameChromeHeader,children:(0,C.jsx)(o.default,{style:I.frameChromeCaption,children:y})}),(0,C.jsx)(n.default,{style:[I.frameBody,'narrow'===l&&I.frameBodyNarrow],children:(0,t.createElement)('iframe',{ref:s,sandbox:'allow-same-origin',srcDoc:e,title:'Synthetic order update email HTML preview',style:{background:c.COLORS.WHITE,border:'none',dis
925play:'block',height:u.heightPx,maxHeight:x,width:S}})}),u.overflowing&&(0,C.jsx)(n.default,{style:I.frameChromeFooter,testID:"sandboxed-email-frame-overflow",children:(0,C.jsx)(o.default,{style:I.frameChromeCaption,children:"Email continues \u2014 scroll within the preview"})})]})}function j({label:e,values:t,labels:l,selected:c,onChange:u}){return(0,C.jsxs)(n.default,{style:I.field,children:[(0,C.jsx)(o.default,{style:I.label,children:e}),(0,C.jsx)(n.default,{accessibilityRole:"radiogroup",style:I.choices,children:t.map(t=>(0,C.jsx)(s.RadioOption,{checked:c===t,interaction:"pressable",accessibilityLabel:`${e}: ${l[t]}`,onPress:()=>{u(t)},style:[I.choice,c===t&&I.choiceSelected],children:(0,C.jsx)(o.default,{style:[I.choiceText,c===t&&I.choiceTextSelected],children:l[t]})},t))})]})}function D(e){return e.charAt(0).toLocaleUpperCase()+e.slice(1)}const I=(0,S.createStyles)({choice:{backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.XS},choiceSelected:{backgroundColor:c.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:c.COLORS.BRAND_PRIMARY_DARK},choiceText:{color:c.COLORS.TEXT_SLATE_DARK,fontSize:h.FONT_SIZE.SM},choiceTextSelected:{color:c.COLORS.BRAND_PRIMARY_DARK,fontWeight:'600'},choices:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.SM},container:{gap:u.SPACING.MD},error:{color:c.COLORS.ERROR_DARK,flexShrink:1,fontSize:h.FONT_SIZE.SM},errorRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.SM},field:{gap:u.SPACING.SM},heading:{color:c.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.MD,fontWeight:'700'},frameBody:{backgroundColor:c.COLORS.WHITE,width:'100%'},frameBodyNarrow:{alignItems:'center'},frameChrome:{backgroundColor:c.COLORS.WHITE,borderColor:c.COLORS.BORDER,borderRadius:8,borderWidth:1,overflow:'hidden',width:'100%'},frameChromeCaption:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS},frameChromeFooter:{backgroundColor:c.COLORS.BG_SLATE_100,borderTopColor:c.COLORS.BORDER,borderTopWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},frameChromeHeader:{backgroundColor:c.COLORS.BG_SLATE_100,borderBottomColor:c.COLORS.BORDER,borderBottomWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},label:{color:c.COLORS.TEXT_SECONDARY,fontSize:h.FONT_SIZE.SM,fontWeight:'600'},linkText:{color:c.COLORS.TEXT_SLATE_DARK,fontSize:h.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},mutedText:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.SM},nativeFallback:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS},plainText:{backgroundColor:c.COLORS.BG_CODE_DARK,borderRadius:8,color:c.COLORS.TEXT_INVERSE,fontFamily:h.FONT_FAMILY.MONOSPACE,fontSize:h.FONT_SIZE.SM,padding:u.SPACING.LG,whiteSpace:'pre-wrap'},preview:{gap:u.SPACING.MD},subject:{color:c.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.MD,fontWeight:'600'},subjectLabel:{color:c.COLORS.TEXT_CAPTION,fontSize:h.FONT_SIZE.XS,fontWeight:'700',textTransform:'uppercase'},syntheticNotice:{color:c.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.SM},viewportHeader:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.MD,justifyContent:'space-between'},widthChoice:{borderColor:c.COLORS.BORDER,borderRadius:6,borderWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.XS},widthChoiceSelected:{backgroundColor:c.COLORS.BRAND_TINT,borderColor:c.COLORS.BRAND_PRIMARY},widthChoiceText:{color:c.COLORS.TEXT_SECONDARY,fontSize:h.FONT_SIZE.SM},widthChoiceTextSelected:{color:c.COLORS.BRAND_PRIMARY_DARK,fontWeight:'700'},widthChoices:{flexDirection:'row',gap:u.SPACING.SM}})},825,[34,95,222,488,276,820,490,493,494,489,468,767,104]);
926__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachFilterForm=function({disabledReason:e,filter:l,hasLimitedOrderHistory:u,loading:S,onChange:h,onSearch:b,today:f}){const[C,I]=(0,t.useState)(!1),[_,E]=(0,t.useState)(!1),j=(0,O.filterValidationError)(l),D=e??j,N=null!=e,P=(0,O.advancedFilterCount)(l),v=(0,O.matchDatePreset)(l.createdFrom,l.createdTo,f),G=''!==l.customerEmail.trim(),M=_||G,F=R.filter(e=>'allTime'!==e.value||G),w=u&&(0,O.isHistoryPossiblyUnavailable)(l.createdFrom,f);return(0,T.jsxs)(n.default,{style:y.container,children:[(0,T.jsx)(s.default,{style:y.heading,children:"Find matching Shopify orders"}),(0,T.jsxs)(n.default,{testID:"order-outreach-primary-row",style:y.primaryRow,children:[(0,T.jsxs)(n.default,{style:y.dateRange,children:[(0,T.jsx)(s.default,{style:y.groupLabel,children:"Creation date range"}
926),(0,T.jsxs)(n.default,{style:y.dateControlLine,children:[F.map(e=>{const t=e.value===v;return(0,T.jsx)(o.default,{accessibilityLabel:`Use ${e.label.toLocaleLowerCase()}`,accessibilityRole:"button",accessibilityState:{disabled:N,selected:t},disabled:N,onPress:()=>{h(Object.assign({},l,(0,O.deriveDatePreset)(e.value,f)))},style:[y.presetButton,t&&y.presetButtonSelected],children:(0,T.jsx)(s.default,{style:[y.presetText,t&&y.presetTextSelected],children:e.label})},e.value)}),(0,T.jsxs)(n.default,{style:y.datePair,children:[(0,T.jsx)(p,{label:"Created from",value:l.createdFrom,disabled:N,onChange:e=>{h(Object.assign({},l,{createdFrom:e}))}}),(0,T.jsx)(s.default,{style:y.dateRangeSeparator,children:"\u2013"}),(0,T.jsx)(p,{label:"Created to",value:l.createdTo,disabled:N,onChange:e=>{h(Object.assign({},l,{createdTo:e}))}})]})]}),w&&(0,T.jsx)(s.default,{accessibilityRole:"alert",style:y.historyWarning,children:"History older than approximately 60 days may be unavailable because this Shopify store has not granted read_all_orders."})]}),(0,T.jsx)(A,Object.assign({label:"Customer email",value:l.customerEmail,onChangeText:e=>{h(Object.assign({},l,{customerEmail:e}))},onFocus:()=>{E(!0)},onBlur:()=>{E(!1)},placeholder:"[email protected] or pat*",disabled:N},M?{hint:'Exact address, or end with * to match emails starting with the text before it (e.g. pat*, at least 3 characters).'}:{})),(0,T.jsx)(n.default,{testID:"order-outreach-picker-column",style:y.pickerColumn,children:(0,T.jsx)(x.OrderOutreachProductPicker,{disabled:N,selections:l.productSelections,onChange:e=>{h(Object.assign({},l,{productSelections:e}))}})})]}),(0,T.jsx)(x.OrderOutreachSelectedProductChips,{disabled:N,selections:l.productSelections,onChange:e=>{h(Object.assign({},l,{productSelections:e}))}}),(0,T.jsxs)(n.default,{style:y.statusSection,children:[(0,T.jsxs)(n.default,{style:y.statusHeader,children:[(0,T.jsx)(s.default,{style:y.statusGroupLabel,children:"Status"}),(0,T.jsx)(s.default,{style:y.statusCaption,children:"Orders must match all three rows \u2014 within a row, any selected value counts."})]}),(0,T.jsx)(L,{label:"Order",values:O.ALL_ORDER_STATUSES,labels:O.ORDER_STATUS_LABELS,selected:l.orderStatuses,disabled:N,onChange:e=>{h(Object.assign({},l,{orderStatuses:e}))}}),(0,T.jsx)(L,{label:"Payment",values:O.ALL_FINANCIAL_STATUSES,labels:O.FINANCIAL_STATUS_LABELS,selected:l.financialStatuses,disabled:N,onChange:e=>{h(Object.assign({},l,{financialStatuses:e}))}}),(0,T.jsx)(L,{label:"Fulfillment",values:O.ALL_FULFILLMENT_STATUSES,labels:O.FULFILLMENT_STATUS_LABELS,selected:l.fulfillmentStatuses,disabled:N,onChange:e=>{h(Object.assign({},l,{fulfillmentStatuses:e}))}})]}),(0,T.jsx)(o.default,{accessibilityLabel:(C?'Close':'Open')+" advanced filters",accessibilityRole:"button",accessibilityState:{expanded:C},onPress:()=>{I(e=>!e)},style:y.advancedToggle,children:(0,T.jsxs)(s.default,{style:y.advancedToggleText,children:[C?'\u25be':'\u25b8'," Advanced filters",P>0?` (${P})`:'']})}),C&&(0,T.jsxs)(n.default,{style:y.advancedPanel,children:[(0,T.jsxs)(n.default,{style:y.fieldGrid,children:[(0,T.jsx)(A,{label:"Destination country codes",value:l.destinationCountryCodes,onChangeText:e=>{h(Object.assign({},l,{destinationCountryCodes:e}))},placeholder:'US\nCA',multiline:!0,autoCapitalize:"characters",disabled:N}),(0,T.jsx)(A,{label:"Destination province/state codes",value:l.destinationProvinceCodes,onChangeText:e=>{h(Object.assign({},l,{destinationProvinceCodes:e}))},placeholder:'CA\nUT',multiline:!0,autoCapitalize:"characters",disabled:N}),(0,T.jsx)(A,{label:"Product SKUs (fallback)",value:l.skus,onChangeText:e=>{h(Object.assign({},l,{skus:e}))},placeholder:'PA-FLEX\nPA-LEGACY',multiline:!0,disabled:N,hint:"Use SKUs when an order references a product that is no longer published in the store catalog \u2014 the product picker lists published products only."})]}),(0,T.jsxs)(n.default,{style:y.switchRow,children:[N?(0,T.jsx)(s.default,{style:y.disabledControl,children:"Unavailable"}):(0,T.jsx)(c.AppSwitch,{value:l.includeTestOrders,accessibilityLabel:"Include test orders",onValueChange:e=>{h(Object.assign({},l,{includeTestOrders:e}))}}),(0,T.jsxs)(n.default,{style:y.switchLabelBlock,children:[(0,T.jsx)(s.default,{style:y.label,children:"Include test orders"}),(0,T.jsx)(s.default,{style:y.switchHint,children:"Excluded by default."})]})]})]}),(0,T.jsxs)(n.default,{testID:"order-outreach-action-bar",style:y.actionBar,children:[(0,T.jsx)(o.default,{accessibilityRole:"button",accessibilityLabel:"Search Shopify orders",accessibilityState:{disabled:null!=D||S},disabled:null!=D||S,onPress:()=>{b((0,O.toApiFilter)(l))},style:[y.button,(null!=D||S)&&y.buttonDisabled],children:(0,T.jsx)(s.default,{style:y.buttonText,children:S?'Searching all matching orders\u2026':'Search orders'})}),(0,T.jsx)(n.default,{style:y.actionBarText,children:null!=D?(0,T.jsx)(s.default,{accessibilityRole:"alert",style:y.disabledReason,
926children:D}):l.includeTestOrders?(0,T.jsx)(s.default,{style:y.defaultsText,children:"Including test orders"}):null})]})]})};var t=r(d[0]),l=e(r(d[1])),s=e(r(d[2])),o=e(r(d[3])),n=e(r(d[4])),c=r(d[5]),u=r(d[6]),S=r(d[7]),h=r(d[8]),b=r(d[9]),f=r(d[10]),C=r(d[11]),O=r(d[12]),x=r(d[13]),T=r(d[14]);const R=[{value:'last7',label:'Last 7 days'},{value:'last30',label:'Last 30 days'},{value:'last60',label:'Last 60 days'},{value:'allTime',label:'All time'}];function p({disabled:e,label:t,onChange:l,value:s}){return(0,T.jsx)(n.default,{style:y.dateField,children:(0,T.jsx)(C.AdminDateInput,{accessibilityLabel:t,disabled:e,onChange:l,value:s})})}function A({label:e,value:t,onChangeText:l,placeholder:o,multiline:c=!1,autoCapitalize:S="none",disabled:h,hint:b,onFocus:f,onBlur:C}){return(0,T.jsxs)(n.default,{style:y.field,children:[(0,T.jsx)(s.default,{style:y.label,children:e}),(0,T.jsx)(u.AppTextInput,{accessibilityLabel:e,value:t,onChangeText:l,onFocus:f,onBlur:C,placeholder:o,multiline:c,autoCapitalize:S,editable:!h,style:c?y.multilineInput:void 0}),null!=b&&(0,T.jsx)(s.default,{style:y.fieldHint,children:b})]})}function L({label:e,values:t,labels:o,selected:c,disabled:u,onChange:S}){const h=c.length===t.length&&t.every(e=>c.includes(e));return(0,T.jsxs)(n.default,{style:y.statusRow,children:[(0,T.jsx)(s.default,{style:y.statusRowLabel,children:e}),(0,T.jsxs)(n.default,{accessibilityRole:"list",style:y.choices,children:[(0,T.jsx)(l.default,{accessibilityRole:"checkbox",accessibilityLabel:`${e}: All`,accessibilityState:{checked:h,disabled:u},disabled:u,onPress:()=>{S([...t])},style:[y.choice,h&&y.choiceSelected],children:(0,T.jsx)(s.default,{style:[y.choiceText,h&&y.choiceTextSelected],children:"All"})}),t.map(n=>{const b=!h&&c.includes(n);return(0,T.jsx)(l.default,{accessibilityRole:"checkbox",accessibilityLabel:`${e}: ${o[n]}`,accessibilityState:{checked:b,disabled:u},disabled:u,onPress:()=>{if(h)S([n]);else{if(b){const e=c.filter(e=>e!==n);return void S(0===e.length?[...t]:e)}S([...c,n])}},style:[y.choice,b&&y.choiceSelected],children:(0,T.jsx)(s.default,{style:[y.choiceText,b&&y.choiceTextSelected],children:o[n]})},n)})]})]})}const y=(0,f.createStyles)({advancedPanel:{backgroundColor:S.COLORS.BG_SLATE,borderColor:S.COLORS.BORDER_SLATE,borderRadius:8,borderWidth:1,gap:h.SPACING.LG,padding:h.SPACING.LG},advancedToggle:{alignSelf:'flex-start',paddingVertical:h.SPACING.XS},advancedToggleText:{color:S.COLORS.TEXT_SLATE_DARK,fontSize:b.FONT_SIZE.MD,fontWeight:'600'},button:{alignSelf:'flex-start',backgroundColor:S.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:h.SPACING.XL,paddingVertical:h.SPACING.MD},buttonDisabled:{backgroundColor:S.COLORS.BORDER_DISABLED},buttonText:{color:S.COLORS.TEXT_INVERSE,fontSize:b.FONT_SIZE.MD,fontWeight:'700'},choice:{backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.XS},choiceSelected:{backgroundColor:S.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:S.COLORS.BRAND_PRIMARY_DARK},choiceText:{color:S.COLORS.TEXT_SLATE_DARK,fontSize:b.FONT_SIZE.SM},choiceTextSelected:{color:S.COLORS.BRAND_PRIMARY_DARK,fontWeight:'600'},choices:{flex:1,flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM},container:{gap:h.SPACING.LG},dateField:{width:170},dateControlLine:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM},datePair:{alignItems:'center',flexDirection:'row',gap:h.SPACING.SM},dateRangeSeparator:{color:S.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.MD},dateRange:{flexBasis:660,flexGrow:2,gap:h.SPACING.SM},actionBar:{alignItems:'center',borderTopColor:S.COLORS.BORDER,borderTopWidth:1,flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.LG,paddingTop:h.SPACING.LG},actionBarText:{flexBasis:260,flexGrow:1,flexShrink:1},defaultsText:{color:S.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM},disabledControl:{color:S.COLORS.TEXT_CAPTION,fontSize:b.FONT_SIZE.SM},disabledReason:{color:S.COLORS.ERROR_DARK,fontSize:b.FONT_SIZE.SM},field:{flexBasis:240,flexGrow:1,gap:h.SPACING.XS},fieldGrid:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD},fieldHint:{color:S.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.XS},groupLabel:{color:S.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.SM,fontWeight:'700'},heading:{color:S.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.LG,fontWeight:'700'},historyWarning:{color:S.COLORS.WARNING_DARK,fontSize:b.FONT_SIZE.SM},label:{color:S.COLORS.TEXT_SECONDARY,fontSize:b.FONT_SIZE.SM,fontWeight:'600'},multilineInput:{minHeight:76,textAlignVertical:'top'},pickerColumn:{flexBasis:320,flexGrow:1,zIndex:10},presetButton:{backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_DEFAULT,borderRadius:999,borderWidth:1,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.XS},presetButtonSelected:{backgroundColor:S.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:S.COLORS.BRAND_PRIMARY_DARK},presetText:{color:S.COLORS.TEXT_SLATE_DARK,fontSize:b.FONT_SIZE.SM,fontWeight:'600'},presetTextSelected:{color:S.COLORS.BRAND_PRIMARY_DARK,fontWeight:'600'},primaryRow:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.LG,zIndex:10},statusCaption:{color:S.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM},statusGroupLabel:{color:S.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM,fontWeight:'700'},statusHeader:{gap:h.SPACING.XS},statusRow:{alignItems:'flex-start',flexDirection:'row',gap:h.SPACING.MD},statusRowLabel:{color:S.COLORS.TEXT_SECONDARY,fontSize:b.FONT_SIZE.SM,fontWeight:'600',paddingTop:h.SPACING.XS,width:88},statusSection:{gap:h.SPACING.MD},switchHint:{color:S.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.XS},switchLabelBlock:{gap:2},switchRow:{alignItems:'center',flexDirection:'row',gap:h.SPACING.SM}})},826,[34,369,222,488,276,662,711,490,493,494,489,821,772,827,104]);
927__d(function(g,r,i,a,m,_e,d){"use strict";
927function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachSelectedProductChips=function({disabled:e,selections:t,onChange:l}){if(0===t.length)return null;return(0,C.jsx)(n.default,{testID:"order-outreach-selected-products-strip",style:A.chipRow,children:t.map(o=>(0,C.jsx)(s.default,{accessibilityRole:"button",accessibilityLabel:`Remove ${o.title} from product filter`,disabled:e,onPress:()=>{l((0,y.removeCatalogSelection)(t,o.gid))},style:A.chip,children:(0,C.jsxs)(c.default,{style:A.chipText,children:[o.title," \xd7"]})},o.gid))})},_e.OrderOutreachProductPicker=function({disabled:e,selections:l,onChange:h}){const{data:p,loading:R,error:x,retry:f}=(0,b.useAsyncData)(async()=>u.storeApi.getProducts(),[],'Failed to load the product catalog'),[O,I]=(0,t.useState)(''),[_,P]=(0,t.useState)(!1),[L,D]=(0,t.useState)(new Set),E=(0,y.filterCatalogByTitle)(p??[],O);return(0,C.jsxs)(n.default,{style:A.container,children:[(0,C.jsx)(c.default,{style:A.label,children:"Products"}),(0,C.jsxs)(n.default,{style:A.anchor,children:[(0,C.jsx)(S.AppTextInput,{accessibilityLabel:"Search products by title",value:O,onChangeText:I,onFocus:()=>{P(!0)},onKeyPress:e=>{'Escape'===e.nativeEvent.key&&P(!1)},placeholder:"Search products by title",autoCapitalize:"none",editable:!e}),_&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s.default,{testID:"order-outreach-product-backdrop",accessible:!1,activeOpacity:1,onPress:()=>{P(!1)},style:A.backdrop}),(0,C.jsxs)(n.default,{testID:"order-outreach-product-overlay",style:A.overlay,children:[R&&(0,C.jsx)(c.default,{style:A.statusText,children:"Loading product catalog\u2026"}),null!=x&&(0,C.jsxs)(n.default,{style:A.errorRow,children:[(0,C.jsx)(c.default,{accessibilityRole:"alert",style:A.errorText,children:x}),(0,C.jsx)(s.default,{accessibilityRole:"button",accessibilityLabel:"Retry loading product catalog",onPress:f,children:(0,C.jsx)(c.default,{style:A.retryText,children:"Retry"})})]}),null!=p&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(o.default,{accessibilityRole:"list",style:A.list,keyboardShouldPersistTaps:"handled",nestedScrollEnabled:!0,children:0===E.length?(0,C.jsx)(c.default,{style:A.statusText,children:"No products match this title."}):E.map(t=>(0,C.jsx)(T,{product:t,disabled:e,selections:l,expanded:L.has(t.id),onToggleExpanded:()=>{D(e=>{const l=new Set(e);return l.has(t.id)?l.delete(t.id):l.add(t.id),l})},onChange:h},t.id))}),(0,C.jsx)(c.default,{style:A.statusText,children:"Only currently published store products are listed."})]})]})]})]})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),c=e(r(d[3])),s=e(r(d[4])),n=e(r(d[5])),u=r(d[6]),S=r(d[7]),h=r(d[8]),p=r(d[9]),R=r(d[10]),x=r(d[11]),b=r(d[12]),f=r(d[13]),y=r(d[14]),C=r(d[15]);const O={selectable:{checked:!1,locked:!1,note:null},selected:{checked:!0,locked:!1,note:null},impliedIncluded:{checked:!0,locked:!0,note:'Included via product'}};function T({product:e,disabled:t,selections:o,expanded:u,onToggleExpanded:S,onChange:h}){const p=o.some(t=>'product'===t.kind&&t.gid===e.id),R=e.variants??[],x=R.length>1;return(0,C.jsxs)(n.default,{style:A.productRow,children:[(0,C.jsxs)(n.default,{style:A.productHeader,children:[(0,C.jsx)(l.default,{accessibilityRole:"checkbox",accessibilityLabel:`Filter by product: ${e.title}`,accessibilityState:{checked:p,disabled:t},disabled:t,onPress:()=>{h((0,y.toggleWholeProductSelection)(o,{gid:e.id,title:e.title}))},style:[A.productChoice,p&&A.choiceSelected],children:(0,C.jsx)(c.default,{style:[A.choiceText,p&&A.choiceTextSelected],children:e.title})}),x&&(0,C.jsx)(s.default,{accessibilityRole:"button",accessibilityLabel:`${u?'Hide':'Show'} variants for ${e.title}`,accessibilityState:{expanded:u},disabled:t,onPress:S,style:A.expandToggle,children:(0,C.jsxs)(c.default,{style:A.expandText,children:[u?'\u25be':'\u25b8'," ",R.length," variants"]})})]}),x&&u&&(0,C.jsx)(n.default,{style:A.variantList,children:R.map(s=>{const n=(0,y.deriveVariantRowState)(o,{gid:s.id,productGid:e.id}),u=O[n],S=t||u.locked;return(0,C.jsxs)(l.default,{accessibilityRole:"checkbox",accessibilityLabel:`Filter by variant: ${e.title} ${s.title}`,accessibilityState:{checked:u.checked,disabled:S},disabled:S,onPress:()=>
927{h((0,y.toggleVariantSelection)(o,{gid:s.id,productGid:e.id,title:`${e.title} \u2014 ${s.title}`}))},style:[A.variantChoice,u.checked&&A.choiceSelected],children:[(0,C.jsx)(c.default,{style:[A.variantTitle,A.choiceText,u.checked&&A.choiceTextSelected],children:s.title}),null!=u.note&&(0,C.jsx)(c.default,{style:A.impliedNote,children:u.note})]},s.id)})})]})}const A=(0,f.createStyles)({anchor:{position:'relative',zIndex:30},backdrop:{bottom:-1e3,height:3e3,left:-1e3,position:'absolute',right:-1e3,top:-1e3,width:3e3,zIndex:29},chip:{backgroundColor:h.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:h.COLORS.BRAND_PRIMARY_DARK,borderRadius:999,borderWidth:1,paddingHorizontal:R.SPACING.MD,paddingVertical:R.SPACING.XS},chipRow:{flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.SM},chipText:{color:h.COLORS.BRAND_PRIMARY_DARK,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},choiceSelected:{backgroundColor:h.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:h.COLORS.BRAND_PRIMARY_DARK},choiceText:{color:h.COLORS.TEXT_SLATE_DARK,fontSize:x.FONT_SIZE.SM},choiceTextSelected:{color:h.COLORS.BRAND_PRIMARY_DARK,fontWeight:'600'},container:{gap:R.SPACING.SM},errorRow:{alignItems:'center',flexDirection:'row',gap:R.SPACING.MD},errorText:{color:h.COLORS.ERROR_DARK,flexShrink:1,fontSize:x.FONT_SIZE.SM},expandText:{color:h.COLORS.TEXT_SLATE_DARK,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},expandToggle:{flexShrink:0,paddingTop:R.SPACING.SM},impliedNote:{color:h.COLORS.TEXT_MUTED,flexShrink:0,fontSize:x.FONT_SIZE.XS,fontStyle:'italic'},label:{color:h.COLORS.TEXT_SECONDARY,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},list:{maxHeight:260},overlay:Object.assign({backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.BORDER,borderRadius:8,borderWidth:1,gap:R.SPACING.SM,left:0,padding:R.SPACING.MD,position:'absolute',right:0,top:'100%',zIndex:30},p.ELEVATION.RAISED),productChoice:{backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,flexGrow:1,flexShrink:1,minWidth:0,paddingHorizontal:R.SPACING.MD,paddingVertical:R.SPACING.SM},productHeader:{alignItems:'flex-start',flexDirection:'row',gap:R.SPACING.MD},productRow:{gap:R.SPACING.XS,paddingVertical:R.SPACING.XS},retryText:{color:h.COLORS.TEXT_SLATE_DARK,fontSize:x.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},statusText:{color:h.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.XS},variantChoice:{alignItems:'flex-start',backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,flexDirection:'row',gap:R.SPACING.SM,paddingHorizontal:R.SPACING.MD,paddingVertical:R.SPACING.XS},variantList:{gap:R.SPACING.XS,paddingLeft:R.SPACING.XL},variantTitle:{flexShrink:1}})},827,[34,369,283,222,488,276,618,711,490,503,493,494,561,489,772,104]);
928__d(function(g,r,i,a,m,_e,d){"use strict";const e=["zebra"];function t(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ORDER_OUTREACH_TABLE_COLUMN_STYLES",{enumerable:!0,get:function(){return J}}),_e.OrderOutreachResults=function({result:e,selection:t,derivedSelection:l,onToggleOrder:s,onToggleRecipient:R,onIncludeRecipient:T,onIncludeAll:O,onExcludeAll:y,onRemoveAppliedFilter:I,gidTitles:N}){const[A,w]=(0,n.useState)('by-order'),[E,G]=(0,n.useState)('all'),[M,P]=(0,n.useState)('all'),[X,te]=(0,n.useState)(''),[le,ne]=(0,n.useState)(0),[oe,de]=(0,n.useState)(0),[se,ue]=(0,n.use
928State)(()=>new Set),[xe,Se]=(0,n.useState)(e.scanId);e.scanId!==xe&&(Se(e.scanId),ne(0),de(0),G('all'),P('all'),te(''),ue(new Set));const he=(0,n.useMemo)(()=>Q(e.orders,X),[e.orders,X]),ge={all:he,'to-send':he.filter(e=>l.includedOrderGids.has(e.shopifyOrderGid)),excluded:he.filter(e=>l.excludedOrderGids.has(e.shopifyOrderGid))}[E],me=Math.ceil(ge.length/W),fe=Math.min(le,Math.max(me-1,0)),pe=(0,n.useMemo)(()=>ge.slice(fe*W,(fe+1)*W),[ge,fe]),Re=(0,n.useMemo)(()=>(0,C.groupOrdersByCustomer)(he,t,l),[l,he,t]),Te=(0,n.useMemo)(()=>(0,C.partitionCustomerGroupsByInclusion)(Re.groups),[Re.groups]),ye={all:Re.groups,'to-send':Te.toSend,excluded:Te.excluded}[M],Ce=Math.ceil(ye.length/W),je=Math.min(oe,Math.max(Ce-1,0)),Ne=(0,n.useMemo)(()=>ye.slice(je*W,(je+1)*W),[ye,je]),Le='by-customer'===A&&'all'===M&&(0===Re.groups.length||je===Math.max(Ce-1,0)),Ae='INCOMPLETE'===e.summary.scanCompleteness,we=Ae?'Observed ':'',Ee=l.excludedOrders>0,ve=Ee?l.uniqueIncludedRecipients.toLocaleString():e.summary.uniqueRecipients.toLocaleString(),Ge=Ee?l.excludedRecipients.toLocaleString():'0',Me={all:l.uniqueIncludedRecipients+l.excludedRecipients,'to-send':l.uniqueIncludedRecipients,excluded:l.excludedRecipients},Pe={all:e.orders.length,'to-send':l.includedOrders,excluded:l.excludedOrders},De=(0,j.deriveAppliedFilterChips)(e.interpretedFilter,N),ke=0===l.excludedOrders,We=k(e.summary.nonSendableOrdersByReason);return(0,L.jsxs)(x.default,{style:Ie.container,children:[Ae&&(0,L.jsxs)(h.Card,{style:Ie.incompleteBanner,children:[(0,L.jsx)(c.default,{accessibilityRole:"alert",style:Ie.incompleteTitle,children:"Incomplete audience scan"}),(0,L.jsx)(c.default,{style:Ie.incompleteText,children:"This result cannot be treated as a complete audience."}),e.summary.incompletenessReasons.map(e=>(0,L.jsxs)(c.default,{style:Ie.incompleteText,children:["\u2022 ",Oe(e)]},e))]}),(0,L.jsx)(c.default,{style:Ie.sectionTitle,children:"Order review"}),(0,L.jsxs)(x.default,{style:Ie.appliedFilterStrip,children:[(0,L.jsxs)(c.default,{style:Ie.mutedMeta,children:["Store timezone: ",e.interpretedFilter.storeIanaTimezone,' \xb7 ',"Scanned ",D(e.scanCompletedAt),' \xb7 ',"Review token valid for 30 minutes"]}),(0,L.jsx)(x.default,{style:Ie.chipRow,children:De.map(e=>(0,L.jsx)(u.default,{accessibilityLabel:`Remove ${e.label} from next search`,accessibilityRole:"button",onPress:()=>{I(e.field)},style:Ie.chip,children:(0,L.jsxs)(c.default,{style:Ie.chipText,children:[e.label," \xd7"]})},e.field))}),(0,L.jsx)(c.default,{style:Ie.mutedMeta,children:"Chips update the next search only"})]}),(0,L.jsxs)(x.default,{style:Ie.summaryGrid,children:[(0,L.jsx)(be,{label:"Matching orders",value:v[e.summary.matchingCountPrecision](e.summary.matchingOrders)}),(0,L.jsx)(be,{label:`${we}included orders`,value:l.includedOrders.toLocaleString()}),(0,L.jsx)(be,{label:`${we}excluded orders`,value:l.excludedOrders.toLocaleString()}),(0,L.jsx)(be,{label:`${we}unique included recipients`,value:ve}),(0,L.jsx)(be,{label:`${we}excluded recipients`,value:Ge}),(0,L.jsx)(be,{label:"Scan completeness",value:_[e.summary.scanCompleteness]})]}),null!=We&&(0,L.jsx)(c.default,{style:Ie.mutedMeta,children:We}),0===e.orders.length?(0,L.jsx)(h.Card,{children:(0,L.jsx)(f.EmptyState,{message:"No orders matched the applied filters."})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(x.default,{style:Ie.reviewSearchControl
928s,children:[(0,L.jsx)(S.AppTextInput,{accessibilityLabel:"Search name, email, order, or item",autoCapitalize:"none",autoCorrect:!1,onChangeText:e=>{te(e),ne(0),de(0)},placeholder:"Search name, email, order, or item",style:Ie.reviewSearchInput,value:X}),(0,L.jsxs)(c.default,{style:Ie.mutedMeta,children:["Showing ",he.length.toLocaleString()," of",' ',e.orders.length.toLocaleString()," orders"]})]}),0===he.length?(0,L.jsx)(h.Card,{children:(0,L.jsx)(f.EmptyState,{message:"No reviewed orders match this search."})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(x.default,{style:Ie.viewToggleRow,children:z.map(e=>{const t=A===e;return(0,L.jsx)(o.default,{accessibilityRole:"button",accessibilityState:{selected:t},accessibilityLabel:F[e],testID:$[e],onPress:()=>{w(e)},style:[Ie.viewToggleSegment,t?Ie.viewToggleSegmentSelected:Ie.viewToggleSegmentIdle],children:(0,L.jsx)(c.default,{style:[Ie.viewToggleText,t?Ie.viewToggleTextSelected:Ie.viewToggleTextIdle],children:F[e]})},e)})}),'by-order'===A?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(x.default,{style:Ie.reviewControls,children:[(0,L.jsxs)(x.default,{style:Ie.reviewControlGroup,children:[(0,L.jsx)(c.default,{style:Ie.reviewControlLabel,children:"Bulk selection"}),(0,L.jsx)(ie,{allIncluded:ke,itemLabel:"orders",onIncludeAll:O,onExcludeAll:y})]}),(0,L.jsxs)(x.default,{style:Ie.reviewControlGroup,children:[(0,L.jsx)(c.default,{style:Ie.reviewControlLabel,children:"Show orders"}),(0,L.jsx)(x.default,{style:Ie.viewToggleRow,children:U.map(e=>{const t=E===e,l=`${V[e]} (${Pe[e].toLocaleString()})`;return(0,L.jsx)(o.default,{accessibilityLabel:l,accessibilityRole:"button",accessibilityState:{selected:t},onPress:()=>{G(e),ne(0)},style:[Ie.viewToggleSegment,t?Ie.viewToggleSegmentSelected:Ie.viewToggleSegmentIdle],children:(0,L.jsx)(c.default,{style:[Ie.viewToggleText,t?Ie.viewToggleTextSelected:Ie.viewToggleTextIdle],children:l})},e)})})]})]}),0===ge.length?(0,L.jsx)(f.EmptyState,{message:K[E]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(b.ResponsiveTable,{minWidth:B,compactContent:pe.map(e=>(0,L.jsx)(re,{order:e,selection:t,derivedSelection:l,onToggleOrder:s,onToggleRecipient:R,onIncludeRecipient:T},e.shopifyOrderGid)),testID:"order-outreach-table",children:[(0,L.jsx)(b.ResponsiveTableHeader,{children:q.map(e=>(0,L.jsx)(b.ResponsiveTableCell,{testID:`order-outreach-header-${e.key}`,style:J[e.key],children:(0,L.jsx)(b.ResponsiveTableHeaderText,{children:e.label})},e.key))}),pe.map((e,n)=>(0,L.jsx)(ee,{order:e,selection:t,derivedSelection:l,onToggleOrder:s,onToggleRecipient:R,onIncludeRecipient:T,zebra:n%2==1},e.shopifyOrderGid))]}),(0,L.jsx)(p.Pagination,{page:fe,totalPages:me,onPageChange:ne,itemLabel:"orders"})]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(x.default,{style:Ie.reviewControls,children:[(0,L.jsxs)(x.default,{style:Ie.reviewControlGroup,children:[(0,L.jsx)(c.default,{style:Ie.reviewControlLabel,children:"Bulk selection"}),(0,L.jsx)(ie,{allIncluded:ke,itemLabel:"recipients",onIncludeAll:O,onExcludeAll:y})]}),(0,L.jsxs)(x.default,{style:Ie.reviewControlGroup,children:[(0,L.jsx)(c.default,{style:Ie.reviewControlLabel,children:"Show customers"}),(0,L.jsx)(x.default,{style:Ie.viewToggleRow,children:Z.map(e=>{const t=M===e,l=Me[e],n=`${Y[e]} (${l.toLocaleString()})`;return(0,L.jsx)(o.default,{accessibilityLabel:n,accessibilityRole:"button",accessibilityState:{selected:t},onPress:()=>{P(e),de(0)},style:[Ie.viewToggleSegment,t?Ie.viewToggleSegmentSelected:Ie.viewToggleSegmentIdle],children:(0,L.jsx)(c.default,{style:[Ie.viewToggleText,t?Ie.viewToggleTextSelected:Ie.viewToggleTextIdle],children:n})},e)})})]})]}),(0,L.jsxs)(x.default,{style:Ie.customerGroups,testID:"order-outreach-customer-groups",children:[0===ye.length&&(0,L.jsx)(f.EmptyState,{message:H[M]}),Ne.length>0&&(0,L.jsx)(x.default,{style:Ie.customerList,children:Ne.map((e,n)=>(0,L.jsx)(ce,{group:e,isFirst:0===n,expanded:se.has(e.recipientId),selection:t,derivedSelection:l,onToggleOrder:s,onToggleRecipient:R,onIncludeRecipient:T,onToggleExpanded:()=>{ue(t=>{const l=new Set(t);return l.has(e.recipientId)?l.delete(e.recipientId):l.add(e.recipientId),l})}},e.recipientId))}),Le&&Re.ordersWithoutRecipientIdentity.length>0&&(0,L.jsxs)(x.default,{style:Ie.noIdentitySection,children:[(0,L.jsx)(c.default,{style:Ie.noIdentityHeading,children:"Orders without a sendable recipient"}),(0,L.jsx)(x.default,{style:Ie.customerList,children:Re.ordersWithoutRecipientIdentity.map((e,n)=>(0,L.jsx)(ae,{order:e,isFirst:0===n,selection:t,derivedSelection:l,onToggleOrder:s,onToggleRecipient:R,onIncludeRecipient:T},e.shopifyOrderGid))})]})]}),(Ce>1||Re.groups.length>0)&&(0,L.jsx)(p.Pagination,{page:je,totalPages:Math.max(Ce,1),onPageChange:de,itemLabel:"customers"})]})]})]})]})};
928var l=t(r(d[0])),n=r(d[1]),o=t(r(d[2])),s=t(r(d[3])),c=t(r(d[4])),u=t(r(d[5])),x=t(r(d[6])),S=r(d[7]),h=r(d[8]),f=r(d[9]),p=r(d[10]),b=r(d[11]),R=r(d[12]),T=r(d[13]),O=r(d[14]),y=r(d[15]),I=r(d[16]),C=r(d[17]),j=r(d[18]),N=r(d[19]),L=r(d[20]);const A='EXACT',w='AT_LEAST',E='UNKNOWN',_={COMPLETE:'Complete scan',INCOMPLETE:'Incomplete scan'},v={[A]:e=>e.toLocaleString(),[w]:e=>`At least ${e.toLocaleString()}`,[E]:e=>`Unknown (API observed ${e.toLocaleString()})`},G={MISSING_CONTACT_EMAIL:'Missing contact email',INVALID_CONTACT_EMAIL:'Invalid contact email'},M={MISSING_CONTACT_EMAIL:'missing address',INVALID_CONTACT_EMAIL:'invalid address'},P=['MISSING_CONTACT_EMAIL','INVALID_CONTACT_EMAIL'];function D(e){return(0,I.formatIsoDateTime)(new Date(1e3*e).toISOString())}function k(e){const t=[];let l=0;for(const n of P){const o=e[n]??0;o>0&&(l+=o,t.push(`${o.toLocaleString()} ${M[n]}`))}if(0===l)return null;const n=1===l?'order':'orders';return`${l.toLocaleString()} ${n} can't receive email \u2014 ${t.join(', ')}`}const W=25,B=1610,X=3,F={'by-order':'By order','by-customer':'By customer'},$={'by-order':'order-outreach-view-toggle-order','by-customer':'order-outreach-view-toggle-customer'},z=['by-order','by-customer'],Z=['all','to-send','excluded'],Y={all:'All','to-send':'To send',excluded:'Excluded'},H={all:'No recipients match this search.','to-send':'No recipients in this search will receive an email.',excluded:'No recipients in this search are excluded.'},U=['all','to-send','excluded'],V={all:'All orders','to-send':'Orders to send',excluded:'Excluded orders'},K={all:'No orders match this search.','to-send':'No orders in this search will receive an email.',excluded:'No orders in this search are excluded.'},q=[{key:'include',label:'Include'},{key:'order',label:'Order'},{key:'created',label:'Created'},{key:'customer',label:'Customer'},{key:'email',label:'Contact email'},{key:'statuses',label:'Status'},{key:'destination',label:'Destination'},{key:'items',label:'Line items'},{key:'sendability',label:'Recipient status'}],J={include:{flexBasis:140,flexGrow:0,minWidth:140},order:{flexBasis:110,flexGrow:0,minWidth:110},created:{flexBasis:170,flexGrow:0,minWidth:170},customer:{flexBasis:160,flexGrow:1,minWidth:160},email:{flexBasis:230,flexGrow:2,minWidth:230},statuses:{flexBasis:240,flexGrow:1,minWidth:240},destination:{flexBasis:100,flexGrow:0,minWidth:100},items:{flexBasis:280,flexGrow:2,minWidth:280},sendability:{flexBasis:140,flexGrow:0,minWidth:140}};function Q(e,t){const l=t.trim().toLocaleLowerCase();return''===l?e:e.filter(e=>[...[e.orderNumber,e.customerDisplayName,e.contactEmail,e.destinationCountryCode,e.destinationProvinceCode,e.orderStatus,e.financialStatus,e.fulfillmentStatus],...e.lineItems.flatMap(e=>[e.productTitle,e.variantTitle,e.sku])].some(e=>!0===e?.toLocaleLowerCase().includes(l)))}function ee(t){let{zebra:n}=t,o=(0,l.default)(t,e);const{order:s,derivedSelection:c}=o,u=c.includedOrderGids.has(s.shopifyOrderGid);return(0,L.jsxs)(b.ResponsiveTableRow,{style:[n&&Ie.zebraRow,!u&&Ie.excludedRow],children:[(0,L.jsx)(te,{column:"include",children:(0,L.jsx)(ne,Object.assign({},o))}),(0,L.jsx)(le,{column:"order",children:s.orderNumber}),(0,L.jsx)(le,{column:"created",children:D(s.createdAt)}),(0,L.jsx)(le,{column:"customer",children:Re(s.customerDisplayName)}),(0,L.jsx)(le,{column:"email",children:Re(s.contactEmail)}),(0,L.jsx)(te,{column:"statuses",children:(0,L.jsx)(he,{order:s})}),(0,L.jsx)(le,{column:"destination",children:Te(s)}),(0,L.jsx)(te,{column:"items",children:(0,L.jsx)(pe,{order:s})}),(0,L.jsx)(te,{column:"sendability",children:(0,L.jsx)(ge,{order:s})})]})}function te({column:e,children:t}){return(0,L.jsx)(b.ResponsiveTableCell,{testID:`order-outreach-cell-${e}`,style:J[e],children:t})}function le({column:e,children:t}){return(0,L.jsx)(te,{column:e,children:(0,L.jsx)(b.ResponsiveTableText,{children:t})})}function re(e){const{order:t,derivedSelection:l}=e,n=l.includedOrderGids.has(t.shopifyOrderGid);return(0,L.jsxs)(h.Card,{style:[Ie.orderCard,!n&&Ie.excludedRow],children:[(0,L.jsxs)(x.default,{style:Ie.cardHeader,children:[(0,L.jsx)(c.default,{style:Ie.orderTitle,children:t.orderNumber}),(0,L.jsx)(ge,{order:t})]}),(0,L.jsx)(c.default,{style:Ie.cardText,children:D(t.createdAt)}),(0,L.jsxs)(c.default,{style:Ie.cardText,children:[Re(t.customerDisplayName)," \xb7 ",Re(t.contactEmail)]}),(0,L.jsx)(he,{order:t}),(0,L.jsxs)(c.default,{style:Ie.cardText,children:["Destination: ",Te(t)]}),(0,L.jsx)(pe,{order:t}),(0,L.jsx)(ne,Object.assign({},e))]})}function ie({allIncluded:e,itemLabel:t,onIncludeAll:l,onExcludeAll:n}
928){const s=`${e?'Deselect':'Select'} all ${t}`;return(0,L.jsxs)(o.default,{accessibilityRole:"checkbox",accessibilityLabel:s,accessibilityState:{checked:e},onPress:e?n:l,style:Ie.checkboxPressable,children:[(0,L.jsx)(x.default,{style:[Ie.checkbox,e&&Ie.checkboxChecked],children:e&&(0,L.jsx)(c.default,{style:Ie.checkmark,children:'\u2713'})}),(0,L.jsx)(c.default,{style:Ie.checkboxCaption,children:s})]})}function ne({order:e,selection:t,derivedSelection:l,onToggleOrder:n,onToggleRecipient:o,onIncludeRecipient:s}){const c=e.sendable?e.reviewRecipientId:null,u=l.includedOrderGids.has(e.shopifyOrderGid);return(0,L.jsxs)(x.default,{style:Ie.inclusionControls,children:[(0,L.jsx)(oe,{order:e,selection:t,derivedSelection:l,onToggleOrder:n}),null!=c&&(0,L.jsx)(de,{contactEmail:e.contactEmail,recipientId:c,included:u,onToggleRecipient:o,onIncludeRecipient:s})]})}function oe({order:e,selection:t,derivedSelection:l,onToggleOrder:n}){const s=l.includedOrderGids.has(e.shopifyOrderGid),u=t.excludedOrderGids.has(e.shopifyOrderGid),S=e.sendable?e.reviewRecipientId:null,h=null!=S&&t.excludedRecipientIds.has(S)&&!u,f=!e.sendable||h,p=e.sendable?h?`Order ${e.orderNumber} is excluded via its recipient`:`Include order ${e.orderNumber}`:`Order ${e.orderNumber} cannot receive email`;return(0,L.jsxs)(o.default,{accessibilityRole:"checkbox",accessibilityLabel:p,accessibilityState:{checked:s,disabled:f},disabled:f,onPress:()=>{n(e.shopifyOrderGid)},style:Ie.checkboxPressable,children:[(0,L.jsx)(x.default,{style:[Ie.checkbox,s&&Ie.checkboxChecked,f&&Ie.checkboxLocked],children:s&&(0,L.jsx)(c.default,{style:Ie.checkmark,children:'\u2713'})}),(0,L.jsx)(c.default,{style:Ie.checkboxCaption,children:e.sendable?s?'Included':'Excluded':'Cannot send'})]})}function de({contactEmail:e,recipientId:t,included:l,onToggleRecipient:n,onIncludeRecipient:o}){return(0,L.jsx)(u.default,{accessibilityRole:"button",accessibilityLabel:`${l?'Exclude':'Include'} recipient ${Re(e)}`,onPress:()=>{l?n(t):o(t)},children:(0,L.jsx)(c.default,{style:Ie.recipientToggleText,children:l?'Exclude recipient':'Include recipient'})})}function se({contactEmail:e,recipientId:t,included:l,mixed:n,onToggleRecipient:s,onIncludeRecipient:u}){const S=n?'mixed':l;return(0,L.jsx)(o.default,{accessibilityRole:"checkbox",accessibilityLabel:`${l?'Exclude':'Include'} recipient ${Re(e)}`,accessibilityState:{checked:S},onPress:()=>{l?s(t):u(t)},style:Ie.checkboxPressable,children:(0,L.jsxs)(x.default,{style:[Ie.checkbox,(!0===S||n)&&Ie.checkboxChecked],children:[n&&(0,L.jsx)(c.default,{style:Ie.checkmark,children:'\u2013'}),!0===S&&(0,L.jsx)(c.default,{style:Ie.checkmark,children:'\u2713'})]})})}function ce({group:e,isFirst:t,expanded:l,selection:n,derivedSelection:o,onToggleOrder:s,onToggleRecipient:S,onIncludeRecipient:h,onToggleExpanded:f}){const p=0===e.excludedOrderCount,b=e.excludedOrderCount>0&&e.includedOrderCount>0;return(0,L.jsxs)(x.default,{style:[!t&&Ie.customerListSeparator,0===e.includedOrderCount&&Ie.excludedRow],testID:`order-outreach-customer-group-${e.recipientId}`,children:[(0,L.jsxs)(x.default,{style:Ie.customerRow,children:[(0,L.jsx)(se,{contactEmail:e.contactEmail,recipientId:e.recipientId,included:p,mixed:b,onToggleRecipient:S,onIncludeRecipient:h}),(0,L.jsx)(x.default,{style:Ie.customerIdentity,children:(0,L.jsxs)(c.default,{style:Ie.customerIdentityLine,children:[(0,L.jsx)(c.default,{style:Ie.customerGroupName,children:Re(e.displayName)}),(0,L.jsxs)(c.default,{style:Ie.customerEmailMuted,children:[' \xb7 ',Re(e.contactEmail)]})]})}),(0,L.jsx)(c.default,{style:Ie.customerOrderMeta,children:ue(e)}),(0,L.jsx)(u.default,{accessibilityRole:"button",accessibilityLabel:l?`Hide orders for ${Re(e.contactEmail)}`:`Show orders for ${Re(e.contactEmail)}`,accessibilityState:{expanded:l},onPress:f,children:(0,L.jsx)(c.default,{style:Ie.disclosureText,children:l?'Hide orders':'Show orders'})})]}),l&&(0,L.jsx)(x.default,{style:Ie.customerOrderList,children:e.orders.map(e=>{const t=o.includedOrderGids.has(e.shopifyOrderGid);return(0,L.jsxs)(x.default,{style:[Ie.customerOrderRow,!t&&Ie.excludedRow],children:[(0,L.jsx)(oe,{order:e,selection:n,derivedSelection:o,onToggleOrder:s}),(0,L.jsxs)(c.default,{style:Ie.customerOrderLine,numberOfLines:1,children:[(0,L.jsx)(c.default,{style:Ie.orderNumberCompact,children:e.orderNumber}),(0,L.jsxs)(c.default,{style:Ie.mutedMeta,children:[' \xb7 ',D(e.createdAt),' \xb7 ',xe(e)]})]})]},e.shopifyOrderGid)})})]})}function ae({order:e,isFirst:t,selection:l,derivedSelection:n,onToggleOrder:o}){const s=n.includedOrderGids.has(e.shopifyOrderGid);return(0,L.jsxs)(x.default,{style:[Ie.customerOrderRow,Ie.noIdentityOrderRow,!t&&Ie.customerListSeparator,!s&&Ie.excludedRow],children:[(0,L.jsx)(oe,{order:e,selection:l,derivedSelection:n,onToggleOrder:o}),(0,L.jsxs)(c.default,{style:Ie.customerOrderLine,numberOfLines:1,children:[(0,L.jsx)(c.default,{style:Ie.orderNumberCompact,children:e.orderNumber}),(0,L.jsxs)(c.default,{style:Ie.mutedMeta,children:[' \xb7 ',D(e.createdAt),' \xb7 ',Re(e.customerDisplayName),' \xb7 ',Re(e.contactEmail),' \xb7 ',Se(e)]})]})]})}function ue(e){const t=e.orders.length;return e.excludedOrderCount>0?`${String(e.includedOrderCount)} of ${String(t)} included`:`${String(t)} ${1===t?'order':'orders'}`}function xe(e){return[e.orderStatus,e.financialStatus,e.fulfillmentStatus].filter(e=>null!=e&&''!==e.trim()).map(Oe).join(' \xb7 ')}function Se(e){return e.sendable?'Sendable':null==e.nonSendableReason?'Not sendable':M[e.nonSendableReason]}function he({order:e}){const t=[e.orderStatus,e.financialStatus,e.fulfillmentStatus].filter(e=>null!=e&&''!==e.trim());return(0,L.jsx)(x.default,{style:Ie.badgeRow,children:t.map(e=>(0,L.jsx)(fe,{label:Oe(e),tone:"neutral"},e))})}function ge({order:e}){if(e.sendable)return(0,L.jsx)(fe,{label:"Sendable",tone:"neutral"});const t=null==e.nonSendableReason?'Not sendable':G[e.nonSendableReason];return(0,L.jsx)(fe,{label:t,tone:"warning"})}const me={neutral:{badge:'badgeNeutral',text:'badgeNeutralText'},warning:{badge:'badgeWarning',text:'badgeWarningText'}}
928;function fe({label:e,tone:t}){const l=me[t];return(0,L.jsx)(x.default,{style:[Ie.badge,Ie[l.badge]],children:(0,L.jsx)(c.default,{style:[Ie.badgeText,Ie[l.text]],children:e})})}function pe({order:e}){const[t,l]=(0,n.useState)(!1),o=e.lineItems.map(N.formatLineItemLine),{visible:s,hiddenCount:S}=(0,N.partitionLineItemLines)(o,X),h=t?o:s;return(0,L.jsxs)(x.default,{style:Ie.lineItems,children:[(0,L.jsx)(b.ResponsiveTableText,{style:Ie.lineItemText,children:h.join('\n')}),S>0&&(0,L.jsx)(u.default,{accessibilityRole:"button",accessibilityLabel:t?`Show fewer line items for order ${e.orderNumber}`:`Show ${String(S)} more line items for order ${e.orderNumber}`,accessibilityState:{expanded:t},onPress:()=>{l(e=>!e)},children:(0,L.jsx)(c.default,{style:Ie.lineItemsToggleText,children:t?'Show less':`+${String(S)} more`})})]})}function be({label:e,value:t}){return(0,L.jsxs)(h.Card,{style:Ie.summaryCard,children:[(0,L.jsx)(c.default,{style:Ie.summaryValue,children:t}),(0,L.jsx)(c.default,{style:Ie.summaryLabel,children:e})]})}function Re(e){return null==e||''===e.trim()?'\u2014':e}function Te(e){return[e.destinationCountryCode,e.destinationProvinceCode].map(Re).filter(e=>'\u2014'!==e).join(' / ')||'\u2014'}function Oe(e){return e.toLocaleLowerCase().split('_').map(ye).join(' ')}function ye(e){return 0===e.length?e:e.charAt(0).toLocaleUpperCase()+e.slice(1)}const Ie=(0,y.createStyles)({appliedFilterStrip:{gap:T.SPACING.SM},badge:{alignSelf:'flex-start',borderRadius:999,borderWidth:1,paddingHorizontal:T.SPACING.SM,paddingVertical:2},badgeNeutral:{backgroundColor:R.COLORS.BG_WASH,borderColor:R.COLORS.BORDER},badgeNeutralText:{color:R.COLORS.TEXT_SECONDARY},badgeRow:{flexDirection:'row',flexWrap:'wrap',gap:T.SPACING.XS},badgeText:{fontSize:O.FONT_SIZE.XS,fontWeight:'600'},badgeWarning:{backgroundColor:R.COLORS.WARNING_BANNER_BG,borderColor:R.COLORS.WARNING_BANNER_BORDER},badgeWarningText:{color:R.COLORS.WARNING_BANNER_TEXT},cardHeader:{alignItems:'center',flexDirection:'row',justifyContent:'space-between'},cardText:{color:R.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.SM},checkbox:{alignItems:'center',borderColor:R.COLORS.BORDER,borderRadius:4,borderWidth:1,height:20,justifyContent:'center',width:20},checkboxCaption:{color:R.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.XS,fontWeight:'600'},checkboxChecked:{backgroundColor:R.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:R.COLORS.BRAND_PRIMARY_DARK},checkboxLocked:{borderColor:R.COLORS.BORDER_DISABLED},checkboxPressable:{alignItems:'center',flexDirection:'row',gap:T.SPACING.SM,paddingVertical:T.SPACING.XS},checkmark:{color:R.COLORS.BRAND_PRIMARY_DARK,fontSize:O.FONT_SIZE.XS,fontWeight:'700'},chip:{backgroundColor:R.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:R.COLORS.BRAND_PRIMARY_DARK,borderRadius:999,borderWidth:1,paddingHorizontal:T.SPACING.MD,paddingVertical:T.SPACING.XS},chipRow:{flexDirection:'row',flexWrap:'wrap',gap:T.SPACING.SM},chipText:{color:R.COLORS.BRAND_PRIMARY_DARK,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},container:{gap:T.SPACING.LG},customerEmailMuted:{color:R.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM,fontWeight:'400'},customerGroupName:{color:R.COLORS.TEXT_PRIMARY,fontSize:O.FONT_SIZE.SM,fontWeight:'700'},customerGroups:{gap:T.SPACING.MD},reviewControls:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:T.SPACING.MD},reviewControlGroup:{alignItems:'flex-start',gap:T.SPACING.XS},reviewControlLabel:{color:R.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.XS,fontWeight:'600'},customerIdentity:{flexGrow:1,flexShrink:1,minWidth:0},customerIdentityLine:{flexShrink:1},customerList:{borderColor:R.COLORS.BORDER,borderWidth:s.default.hairlineWidth},customerListSeparator:{borderTopColor:R.COLORS.BORDER,borderTopWidth:s.default.hairlineWidth},customerOrderLine:{flexGrow:1,flexShrink:1,minWidth:0},customerOrderList:{gap:T.SPACING.XS,paddingBottom:T.SPACING.SM,paddingLeft:T.SPACING.XL,paddingRight:T.SPACING.SM},customerOrderMeta:{color:R.COLORS.TEXT_MUTED,flexShrink:0,fontSize:O.FONT_SIZE.SM},customerOrderRow:{alignItems:'center',flexDirection:'row',gap:T.SPACING.SM},customerRow:{alignItems:'center',flexDirection:'row',gap:T.SPACING.SM,paddingHorizontal:T.SPACING.SM,paddingVertical:T.SPACING.SM},disclosureText:{color:R.COLORS.TEXT_SLATE_DARK,flexShrink:0,fontSize:O.FONT_SIZE.XS,fontWeight:'600'},excludedRow:{opacity:.55},inclusionControls:{alignItems:'flex-start',gap:T.SPACING.XS},incompleteBanner:{backgroundColor:R.COLORS.WARNING_BANNER_BG,borderColor:R.COLORS.WARNING_BANNER_BORDER,gap:T.SPACING.XS},incompleteText:{color:R.COLORS.WARNING_BANNER_TEXT,fontSize:O.FONT_SIZE.SM},incompleteTitle:{color:R.COLORS.WARNING_BANNER_TEXT,fontSize:O.FONT_SIZE.LG,fontWeight:'700'},lineItemText:{color:R.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.SM},lineItems:{gap:2},lineItemsToggleText:{color:R.COLORS.TEXT_SLATE_DARK,fontSize:O.FONT_SIZE.XS,fontWeight:'600'},mutedMeta:{color:R.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM},noIdentityHeading:{color:R.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},noIdentityOrderRow:{paddingHorizontal:T.SPACING.SM,paddingVertical:T.SPACING.SM},noIdentitySection:{gap:T.SPACING.SM,marginTop:T.SPACING.SM},orderCard:{gap:T.SPACING.SM},orderNumberCompact:{color:R.COLORS.TEXT_PRIMARY,fontSize:O.FONT_SIZE.SM,fontWeight:'700'},orderTitle:{color:R.COLORS.TEXT_PRIMARY,fontSize:O.FONT_SIZE.MD,fontWeight:'700'},recipientToggleText:{color:R.COLORS.TEXT_SLATE_DARK,fontSize:O.FONT_SIZE.XS,fontWeight:'600',textDecorationLine:'underline'}
928,reviewSearchControls:{alignItems:'flex-start',gap:T.SPACING.XS},reviewSearchInput:{maxWidth:520,width:'100%'},sectionTitle:{color:R.COLORS.TEXT_PRIMARY,fontSize:O.FONT_SIZE.LG,fontWeight:'700'},summaryCard:{flexBasis:170,flexGrow:1,gap:T.SPACING.XS},summaryGrid:{flexDirection:'row',flexWrap:'wrap',gap:T.SPACING.MD},summaryLabel:{color:R.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM},summaryValue:{color:R.COLORS.TEXT_PRIMARY,fontSize:O.FONT_SIZE.XL,fontWeight:'700'},viewToggleRow:{alignSelf:'flex-start',flexDirection:'row',gap:T.SPACING.SM},viewToggleSegment:{borderRadius:999,borderWidth:1,paddingHorizontal:T.SPACING.MD,paddingVertical:T.SPACING.XS},viewToggleSegmentIdle:{backgroundColor:R.COLORS.BG_SURFACE,borderColor:R.COLORS.BORDER},viewToggleSegmentSelected:{backgroundColor:R.COLORS.BRAND_PRIMARY_ALPHA_20,borderColor:R.COLORS.BRAND_PRIMARY_DARK},viewToggleText:{fontSize:O.FONT_SIZE.SM,fontWeight:'600'},viewToggleTextIdle:{color:R.COLORS.TEXT_SECONDARY},viewToggleTextSelected:{color:R.COLORS.BRAND_PRIMARY_DARK},zebraRow:{backgroundColor:R.COLORS.BG_WASH}})},828,[109,34,369,42,222,488,276,711,605,512,712,687,490,493,494,489,685,829,772,830,104]);
929__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.groupOrdersByCustomer=function(c,s,l){const p=new Map,f=[];for(const t of c){const n=t.sendable?t.reviewRecipientId:null;if(null==n){f.push(t);continue}const o=p.get(n);null==o?p.set(n,[t]):o.push(t)}return{groups:[...p.entries()].map(([n,c])=>{const p=[...c].sort(t);let f=0,h=0;for(const t of p)l.includedOrderGids.has(t.shopifyOrderGid)?f+=1:h+=1;return{recipientId:n,contactEmail:u(p),displayName:o(p),orders:p,includedOrderCount:f,excludedOrderCount:h,recipientExcluded:s.excludedRecipientIds.has(n)}}).sort(n),ordersWithoutRecipientIdentity:f}},e.partitionCustomerGroupsByInclusion=function(t){const n=[],o=[];for(const u of t)u.includedOrderCount>0?n.push(u):o.push(u);return{toSend:n,excluded:o}};function t(t,n){return t.createdAt===n.createdAt?t.shopifyOrderGid<n.shopifyOrderGid?-1:t.shopifyOrderGid>n.shopifyOrderGid?1:0:t.createdAt<n.createdAt?1:-1}function n(t,n){return t.orders.length!==n.orders.length?n.orders.length-t.orders.length:t.recipientId===n.recipientId?0:t.recipientId<n.recipientId?-1:1}function o(t){for(const n of t){const t=n.customerDisplayName;if(null!=t&&''!==t.trim())return t}return null}function u(t){for(const n of t){const t=n.contactEmail;if(null!=t&&''!==t.trim())return t}return null}},829,[]);
930__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.formatLineItemLine=function(u){const l=n(u.productTitle)?'Unknown product':u.productTitle,o=n(u.variantTitle)||u.variantTitle===t?'':` \u2014 ${u.variantTitle}`;return`${String(u.quantity)} \xd7 ${l}${o}`},e.partitionLineItemLines=function(t,n){if(t.length<=n)return{visible:t,hiddenCount:0};return{visible:t.slice(0,n),hiddenCount:t.length-n}};const t='Default Title';function n(t){return null==t||''===t.trim()}},830,[]);
931__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachDetailPanel=function({campaignId:e,headingRef:p}){const[x,y]=(0,t.useState)(null),{readiness:f,loading:A,error:C,retry:L}=(0,b.useOrderOutreachReadiness)(e),{data:j,loading:_,error:k,retry:D}=(0,O.useAsyncData)(async()=>{try{const t=await S.orderOutreachAdminApi.getCampaign(e);return{kind:'ready',campaignId:e,campaign:t}}catch(t){if((0,o.isAxios404)(t))return{kind:'notFound',campaignId:e};throw t}},[e],'Failed to load the order update'),M=j?.campaignId===e?j:null,E='ready'===M?.kind?M:null,F=(x?.campaignId===e?x.campaign:null)??E?.campaign??null,N=k??C;return(0,I.jsxs)(s.default,{style:T.container,children:[(0,I.jsx)(c.AppLink,{to:"OrderOutreach",accessibilityLabel:"All order updates",style:T.hubLink,testID:"order-outreach-detail-hub-link",children:(0,I.jsx)(n.default,{style:T.hubLinkText,children:"\u2190 All order updates"})}),(0,I.jsx)(n.default,Object.assign({ref:p,accessibilityRole:"header",style:T.title,testID:"order-outreach-detail-heading"},{tabIndex:-1},{children:"Order update"})),(_||A)&&null==F&&(0,I.jsx)(h.LoadingState,{message:"Loading order update\u2026"}),'notFound'===M?.kind&&(0,I.jsxs)(u.Card,{style:T.stateCard,testID:"order-outreach-detail-not-found",children:[(0,I.jsx)(n.default,{style:T.stateText,children:"This order update does not exist."}),(0,I.jsx)(c.AppLink,{to:"OrderOutreach",accessibilityLabel:"All order updates",children:(0,I.jsx)(n.default,{style:T.linkText,children:"\u2190 All order updates"})})]}),null!=N&&'notFound'!==M?.kind&&(0,I.jsxs)(u.Card,{style:T.stateCard,testID:"order-outreach-detail-error",children:[(0,I.jsx)(n.default,{accessibilityRole:"alert",style:T.errorText,children:N}),(0,I.jsx)(l.default,{accessibilityRole:"button",accessibilityLabel:"Retry loading order update",onPress:()=>{D(),L()},children:(0,I.jsx)(n.default,{style:T.linkText,children:"Retry"})})]}),null!=F&&null!=f&&!A&&null==C&&(0,I.jsx)(u.Card,{style:T.detailCard,children:(0,I.jsx)(R.
931CampaignDetail,{campaign:F,sendAvailable:f.sendAvailable,sandboxMode:f.sandboxMode,onCampaignUpdated:t=>{y({campaignId:e,campaign:t})}})})]})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),o=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),p=r(d[9]),x=r(d[10]),y=r(d[11]),O=r(d[12]),f=r(d[13]),S=r(d[14]),R=r(d[15]),b=r(d[16]),I=r(d[17]);const T=(0,f.createStyles)({container:{gap:x.SPACING.LG},detailCard:{gap:x.SPACING.SM},errorText:{color:p.COLORS.ERROR_DARK,fontSize:y.FONT_SIZE.SM},hubLink:{alignSelf:'flex-start'},hubLinkText:{color:p.COLORS.TEXT_MUTED,fontSize:y.FONT_SIZE.SM},linkText:{color:p.COLORS.BRAND_PRIMARY_DARK,fontSize:y.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},stateCard:{gap:x.SPACING.MD},stateText:{color:p.COLORS.TEXT_PRIMARY,fontSize:y.FONT_SIZE.MD,fontWeight:'600'},title:{color:p.COLORS.TEXT_PRIMARY,fontSize:y.FONT_SIZE.XL,fontWeight:'700'}})},831,[34,95,222,488,276,464,516,605,512,490,493,494,561,489,767,832,777,104]);
932__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CampaignDetail=function({campaign:e,sendAvailable:j,sandboxMode:D,onCampaignUpdated:L,onBack:$,loadRecipientDetail:O=T}){const[F,E]=(0,t.useState)(!1),[N,_]=(0,t.useState)(!1),[U,V]=(0,t.useState)(null),[Y,z]=(0,t.useState)(!1),[q,H]=(0,t.useState)(null),[K,W]=(0,t.useState)(!1),[J,Q]=(0,t.useState)(null),[X,Z]=(0,t.useState)(!1),[ee,te]=(0,t.useState)(!1),[le,ae]=(0,t.useState)(null),[se,ie]=(0,t.useState)(null),[ne,de]=(0,t.useState)(!1),[re,ce]=(0,t.useState)(null),oe=(0,f.campaignCounts)(e),ue=(0,t.useCallback)(t=>{L(w(e,t))},[e,L]),ye=(0,t.useRef)(!1),me=(0,t.useRef)(null),pe=(0,t.useCallback)(async t=>{t&&(de(!0),ce(null));try{const t=await S.orderOutreachAdminApi.getCampaignProgress(e.id);ue(t)}catch(e){t?ce((0,y.errorMessage)(e,'Failed to refresh delivery status')):p.logger.warn('order-outreach delivery poll failed:',(0,y.describeError)(e))}finally{ye.current=!1,t&&de(!1)}},[e.id,ue]);(0,t.useEffect)(()=>{'SENDING'===e.state?me.current=null:null!=e.sendStartedAt&&null==me.current&&(me.current=Date.now());const t=null==me.current?0:Date.now()-me.current;if(!(0,b.shouldPollDelivery)(e.state,e.deliverySummary,t))return;const l=setInterval(()=>{const t=me.current,l=null==t?0:Date.now()-t;!ye.current&&(0,b.shouldPollDelivery)(e.state,e.deliverySummary,l)&&(ye.current=!0,pe(!1))},C);return()=>{clearInterval(l)}},[e,pe]);const ge=async()=>{_(!0),V(null);try{ue(await S.orderOutreachAdminApi.sendCampaign(e.id))}catch(e){V((0,y.errorMessage)(e,'Failed to start sending the update'))}finally{_(!1)}},Se=async()=>{te(!0),ae(null);try{ue(await S.orderOutreachAdminApi.cancelCampaign(e.id)),Z(!1)}catch(e){ae((0,y.errorMessage)(e,'Failed to cancel the update'))}finally{te(!1)}},fe=async()=>{z(!0),H(null);try{ue(await S.orderOutreachAdminApi.pauseCampaign(e.id))}catch(e){H((0,y.errorMessage)(e,'Failed to stop sending the update'))}finally{z(!1)}},he=async()=>{W(!0),Q(null);try{ue(await S.orderOutreachAdminApi.resumeCampaign(e.id))}catch(e){Q((0,y.errorMessage)(e,'Failed to resume sending the update'))}finally{W(!1)}};return(0,A.jsxs)(o.default,{style:x.campaignStyles.detailContainer,testID:"order-outreach-campaign-detail",children:[(0,A.jsxs)(o.default,{style:x.campaignStyles.detailProse,testID:"order-outreach-detail-prose",children:[null!=$&&(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:"All updates",onPress:$,style:x.campaignStyles.backButton,children:(0,A.jsx)(n.default,{style:x.campaignStyles.backButtonText,children:"\u2190 All updates"})}),(0,A.jsxs)(o.default,{style:x.campaignStyles.detailHeader,children:[(0,A.jsxs)(o.default,{style:x.campaignStyles.campaignIdentity,children:[(0,A.jsx)(n.default,{style:x.campaignStyles.detailFieldValueProminent,children:e.name}),(0,A.jsxs)(n.default,{style:x.campaignStyles.mutedText,children:["Subject: ",e.subject]}),(0,A.jsxs)(n.default,{style:x.campaignStyles.mutedText,children:["From: ",e.sender.displayName," <",e.sender.email,">"]}),(0,A.jsxs)(n.default,{style:x.campaignStyles.mutedText,children:["Replies to: ",e.customReplyToEmail??e.sender.email]})]}),(0,A.jsx)(h.StateBadge,{state:e.state})]}),'CANCELLED'===e.state&&(0,A.jsx)(o.default,{style:x.campaignStyles.cancelledBanner,testID:"order-outreach-cancelled-banner",children:(0,A.jsxs)(n.default,{style:x.campaignStyles.cancelledBannerText,children:["This order update was cancelled",null!=e.cancelledAt&&` on ${(0,h.formatInstant)(e.cancelledAt)}`,". No further emails will be sent."]})}),'PAUSED'===e.state&&(0,A.jsx)(o.default,{style:x.campaignStyles.cancelledBanner,testID:"order-outreach-paused-banner",children:(0,A.jsxs)(n.default,{style:x.campaignStyles.cancelledBannerText,children:["Sending is paused",null!=e.lastPausedAt&&` since ${(0,h.formatInstant)(e.lastPausedAt)}`,"."]})}),(0,A.jsx)(P,{campaign:e,counts:oe}),(0,A.jsx)(k,{filter:e.filter,display:e.filterDisplay}),(0,A.jsx)(I,{sendAvailable:j,sandboxMode:D}),'DRAFT'===e.state&&(0,A.jsxs)(o.default,{style:x.campaignStyles.confirmBlock,children:[D?(0,A.jsxs)(n.default,{style:x.campaignStyles.consequenceText,children:["Runs the full send for ",String(oe.includedRecipients)," included recipients in SendGrid sandbox mode: SendGrid validates each message but no email is delivered."]}):(0,A.jsxs)(n.default,{style:x.campaignStyles.consequenceText,children:["Sends the persisted message using current order details to",' ',String(oe.includedRecipients)," included recipients via SendGrid. This cannot be undone."]}),j?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(s.default,{accessibilityRole:"checkbox",accessibilityLabel:D?'Acknowledge sandbox send':'Acknowledge real email delivery',accessibilityState:{checked:F},onPress:()=>{E(e=>!e)},style:x.campaignStyles.acknowledgeRow,children:[(0,A.jsx)(o.default,{style:[x.campaignStyles.checkbox,F&&x.campaignStyles.checkboxChecked],children:F&&(0,A.jsx)(n.default,{style:x.campaignStyles.checkmark,children:'\u2713'})}),(0,A.jsx)(n.default,{style:x.campaignStyles.acknowledgeText,children:D?"I confirm running this order update against SendGrid in sandbox mode; no email will be delivered.":"I confirm sending this transactional update as real email to the included recipients now."})]}),(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:"Send update",accessibilityState:{disabled:!F||N},disabled:!F||N,onPress:()=>{ge()},style:[x.campaignStyles.primaryButton,(!F||N)&&x.campaignStyles.buttonDisabled],children:(0,A.jsx)(n.default,{style:x.campaignStyles.primaryButtonText,children:N?'Starting send\u2026':'Send update'})}),null!=U&&(0,A.jsx)(n.default,{accessibilityRole:"alert",style:x.campaignStyles.errorText,children:U})]}):(0,A.jsx)(n.default,{style:x.campaignStyles.mutedText,children:"Sending is unavailable in this environment. Resolve the readiness limitations before sending."}),(0,A.jsx)(G,{mode:"draft",confirmOpen:X,cancelling:ee,cancelError:le,onOpenConfirm:()=>{Z(!0),ae(null)},onDismissConfirm:()=>{Z(!1),ae(null)},onConfirm:()=>{Se()}})]}),null!=e.sendStartedAt&&(0,A.jsxs)(o.default,{accessibilityLiveRegion:"polite",testID:"order-outreach-send-progress",style:x.campaignStyles.detailSection,children:[(0,A.jsx)(n.default,{style:x.campaignStyles.detailSectionTitle,children:"Send progress"}),'SENDING'===e.state&&(0,A.jsxs)(o.default,{style:x.campaignStyles.sendingIndicatorRow,children:[(0,A.jsx)(l.default,{testID:"order-outreach-sending-indicator",size:"small",color:u.COLORS.BRAND_PRIMARY}),(0,A.jsx)(n.default,{style:x.campaignStyles.mutedText,children:M(e.sendProgress)})]}),(0,A.jsx)(o.default,{style:x.campaignStyles.badgeRow,children:(0,R.deriveSendProgressSegments)(e.sendProgress).map(e=>(0,A.jsx)(h.Badge,{label:`${e.label}: ${String(e.count)}`,warning:e.warning&&e.count>0},e.key))}),'SENDING'===e.state&&(0,A.jsxs)(o.default,{style:x.campaignStyles.cancelBlock,children:[(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:"Stop sending",accessibilityState:{disabled:Y},disabled:Y,onPress:()=>{fe()},style:x.campaignStyles.destructiveSecondaryButton,children:(0,A.jsx)(n.default,{style:x.campaignStyles.destructiveSecondaryButtonText,children:Y?'Stopping\u2026':'Stop sending'})}),(0,A.jsx)(n.default,{style:x.campaignStyles.mutedText,children:"Stops before the next email \u2014 an email already being submitted may still be delivered. You can resume."}),null!=q&&(0,A.jsx)(n.default,{accessibilityRole:"alert",style:x.campaignStyles.errorText,children:q})]}),'PAUSED'===e.state&&(0,A.jsxs)(o.default,{style:x.campaignStyles.cancelBlock,children:[(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:"Resume sending",accessibilityState:{disabled:K},disabled:K,onPress:()=>{he()},style:[x.campaignStyles.primaryButton,K&&x.campaignStyles.buttonDisabled],children:(0,A.jsx)(n.default,{style:x.campaignStyles.primaryButtonText,children:K?'Resuming\u2026':'Resume sending'})}),null!=J&&(0,A.jsx)(n.default,{accessibilityRole:"alert",style:x.campaignStyles.errorText,children:J}),(0,A.jsx)(G,{mode:"paused",confirmOpen:X,cancelling:ee,cancelError:le,onOpenConfirm:()=>{Z(!0),ae(null)},onDismissConfirm:()=>{Z(!1),ae(null)},onConfirm:()=>{Se()}})]})]}),null!=e.sendStartedAt&&(0,A.jsx)(B,{summary:e.deliverySummary,selectedFilter:se,refreshing:ne,refreshError:re,onSelectFilter:ie,onRefresh:()=>{ye.current||(ye.current=!0,pe(!0))}})]}),(0,A.jsx)(v.OrderOutreachRecipientAudit,{campaignId:e.id,counts:oe,recipients:e.recipients,sendStartedAt:e.sendStartedAt,deliveryFilter:se,onCampaignProgressUpdated:ue,loadRecipientDetail:O},e.id)]})};var t=r(d[0]),l=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),c=e(r(d[4])),o=e(r(d[5])),u=r(d[6]),y=r(d[7]),p=r(d[8]),S=r(d[9]),f=r(d[10]),h=r(d[11]),x=r(d[12]),b=r(d[13]),j=r(
932d[14]),v=r(d[15]),R=r(d[16]),A=r(d[17]);const C=5e3,D={unavailable:{description:'Sending is not available in this environment.',title:'Sending unavailable'},sandbox:{description:'Validation only. Email delivery is disabled.',title:'SendGrid sandbox'},live:{description:'Messages can be delivered to included recipients.',title:'SendGrid live delivery'}},T=(e,t)=>S.orderOutreachAdminApi.getCampaignRecipient(e,t);function w(e,t){const l=new Map(t.recipients.map(e=>[e.id,e]));return Object.assign({},e,{state:t.state,sendStartedBy:t.sendStartedBy,lastPausedBy:t.lastPausedBy,cancelledBy:t.cancelledBy,sendStartedAt:t.sendStartedAt,lastPausedAt:t.lastPausedAt,completedAt:t.completedAt,cancelledAt:t.cancelledAt,sendProgress:t.sendProgress,deliverySummary:t.deliverySummary,recipients:e.recipients.map(e=>{const t=l.get(e.id);return null==t?e:Object.assign({},e,t)})})}function B({summary:e,selectedFilter:t,refreshing:l,refreshError:s,onSelectFilter:u,onRefresh:y}){return(0,A.jsxs)(o.default,{accessibilityLiveRegion:"polite",testID:"order-outreach-delivery-status",style:x.campaignStyles.detailSection,children:[(0,A.jsxs)(o.default,{style:x.campaignStyles.deliveryStatusHeader,children:[(0,A.jsxs)(o.default,{children:[(0,A.jsx)(n.default,{style:x.campaignStyles.detailSectionTitle,children:"Delivery status"}),(0,A.jsx)(n.default,{style:x.campaignStyles.mutedText,children:e.deliveryTrackingComplete?'Provider outcomes are complete.':'Waiting for provider delivery events.'})]}),(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:"Refresh delivery status",accessibilityState:{disabled:l},disabled:l,onPress:y,style:[x.campaignStyles.deliveryRefreshButton,l&&x.campaignStyles.buttonDisabled],children:(0,A.jsx)(n.default,{style:x.campaignStyles.deliveryRefreshButtonText,children:l?'Refreshing\u2026':'Refresh'})})]}),(0,A.jsxs)(o.default,{style:x.campaignStyles.badgeRow,children:[(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:"Show all delivery statuses",accessibilityState:{selected:null==t},onPress:()=>{u(null)},style:null==t?x.campaignStyles.deliveryFilterSelected:void 0,children:(0,A.jsx)(h.Badge,{label:"All"})}),(0,b.deriveDeliverySegments)(e).map(e=>(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:`Filter recipients by ${e.label} (${String(e.count)})`,accessibilityState:{selected:t===e.key},onPress:()=>{u(e.key)},style:t===e.key?x.campaignStyles.deliveryFilterSelected:void 0,children:(0,A.jsx)(h.Badge,{label:`${e.label}: ${String(e.count)}`,warning:e.warning&&e.count>0})},e.key))]}),null!=s&&(0,A.jsx)(n.default,{accessibilityRole:"alert",style:x.campaignStyles.errorText,children:s})]})}function I({sendAvailable:e,sandboxMode:t}){const l=e?t?'sandbox':'live':'unavailable',s=D[l];return(0,A.jsxs)(o.default,{accessibilityLabel:`${s.title}. ${s.description}`,style:[x.campaignStyles.sendGridModeIndicator,'sandbox'===l&&x.campaignStyles.sendGridModeIndicatorSandbox,'live'===l&&x.campaignStyles.sendGridModeIndicatorLive],testID:"order-outreach-sendgrid-mode",children:[(0,A.jsx)(n.default,{style:[x.campaignStyles.sendGridModeTitle,'sandbox'===l&&x.campaignStyles.sendGridModeTitleSandbox,'live'===l&&x.campaignStyles.sendGridModeTitleLive],children:s.title}),(0,A.jsx)(n.default,{style:[x.campaignStyles.sendGridModeDescription,'sandbox'===l&&x.campaignStyles.sendGridModeDescriptionSandbox,'live'===l&&x.campaignStyles.sendGridModeDescriptionLive],children:s.description})]})}function P({campaign:e,counts:t}){return(0,A.jsxs)(n.default,{style:x.campaignStyles.mutedText,testID:"order-outreach-campaign-meta",children:["Created ",(0,h.formatInstant)(e.createdAt),null!=e.sendStartedAt&&` \xb7 Send started ${(0,h.formatInstant)(e.sendStartedAt)}`,null!=e.completedAt&&` \xb7 Completed ${(0,h.formatInstant)(e.completedAt)}`,null!=e.cancelledAt&&` \xb7 Cancelled ${(0,h.formatInstant)(e.cancelledAt)}`,' \xb7 ',(0,h.pluralCount)(t.includedRecipients,'recipient'),t.excludedRecipients>0&&(0,A.jsx)(n.default,{style:x.campaignStyles.warningMetaText,children:` \xb7 ${String(t.excludedRecipients)} excluded`}
932),` \xb7 ${(0,h.pluralCount)(t.includedOrders,'order')}`,t.excludedOrders>0&&(0,A.jsx)(n.default,{style:x.campaignStyles.warningMetaText,children:` \xb7 ${String(t.excludedOrders)} excluded`}),(0,A.jsx)(n.default,{style:x.campaignStyles.mutedText,children:` \xb7 audience frozen at creation \xb7 ${(0,h.formatInstant)(e.createdAt)}`})]})}function k({filter:e,display:t}){return(0,A.jsxs)(o.default,{style:x.campaignStyles.detailSection,testID:"order-outreach-campaign-filters",children:[(0,A.jsx)(n.default,{style:x.campaignStyles.detailSectionTitle,children:"Audience filters"}),(0,A.jsx)(n.default,{style:x.campaignStyles.filterLogicSummary,children:"An order entered this campaign only if it matched every section below. Within a row, matching any listed value was sufficient."}),(0,A.jsx)(o.default,{style:x.campaignStyles.filterGroupGrid,children:(0,j.campaignFilterGroups)(e,t).map(e=>(0,A.jsxs)(o.default,{style:x.campaignStyles.filterGroup,testID:`order-outreach-filter-group-${e.key}`,children:[(0,A.jsx)(n.default,{style:x.campaignStyles.filterGroupTitle,children:e.title}),(0,A.jsx)(n.default,{style:x.campaignStyles.filterGroupExplanation,children:e.explanation}),e.details.map(e=>(0,A.jsxs)(o.default,{style:x.campaignStyles.filterDetail,testID:`order-outreach-filter-${e.key}`,children:[(0,A.jsx)(n.default,{style:x.campaignStyles.filterDetailLabel,children:e.label}),(0,A.jsx)(o.default,{style:x.campaignStyles.filterValueList,children:e.values.map(t=>(0,A.jsx)(n.default,{selectable:!0,style:x.campaignStyles.filterDetailValue,children:t},`${e.key}-${t}`))})]},e.key))]},e.key))})]})}function G({mode:e,confirmOpen:t,cancelling:l,cancelError:s,onOpenConfirm:u,onDismissConfirm:y,onConfirm:p}
932){const S='draft'===e?'Cancel draft':'Cancel permanently',f='draft'===e?'Confirm cancel draft':'Confirm permanent cancel',h='draft'===e?'Keep draft':'Keep paused',b='draft'===e?'Cancel draft':'Cancel permanently';return(0,A.jsxs)(o.default,{style:x.campaignStyles.cancelBlock,children:[t?(0,A.jsxs)(o.default,{style:x.campaignStyles.cancelConfirmBlock,children:[(0,A.jsx)(n.default,{style:x.campaignStyles.cancelConfirmText,children:'draft'===e?'Cancel this draft? It stays in history as Cancelled.':"Recipients already emailed cannot be unsent. Recipients not yet processed will never be contacted. This cannot be resumed."}),(0,A.jsxs)(o.default,{style:x.campaignStyles.cancelConfirmRow,children:[(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:f,accessibilityState:{disabled:l},disabled:l,onPress:p,style:[x.campaignStyles.cancelConfirmYes,l&&x.campaignStyles.cancelButtonDisabled],children:(0,A.jsx)(n.default,{style:x.campaignStyles.cancelConfirmYesText,children:l?'Cancelling\u2026':b})}),(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:h,accessibilityState:{disabled:l},disabled:l,onPress:y,style:x.campaignStyles.cancelConfirmNo,children:(0,A.jsx)(n.default,{style:x.campaignStyles.cancelConfirmNoText,children:h})})]})]}):(0,A.jsx)(c.default,{accessibilityRole:"button",accessibilityLabel:S,onPress:u,style:x.campaignStyles.destructiveSecondaryButton,children:(0,A.jsx)(n.default,{style:x.campaignStyles.destructiveSecondaryButtonText,children:S})}),null!=s&&(0,A.jsx)(n.default,{accessibilityRole:"alert",style:x.campaignStyles.errorText,children:s})]})}function M(e){const{processed:t,total:l}=(0,R.summarizeSendProgress)(e);return`Sending in progress \xb7 ${String(t)} of ${String(l)} processed`}},832,[34,410,369,222,488,276,490,468,469,767,822,769,770,833,771,834,775,104]);
933__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DELIVERY_OBSERVATION_LIMIT_MS",{enumerable:!0,get:function(){return n}}),e.deriveDeliverySegments=function(n){return t.map(t=>({key:t,label:l[t].label,count:n[t],warning:l[t].warning}))},e.deliveryFilterKeyForRecipient=c,e.shouldPollDelivery=function(l,t,o){if('SENDING'===l)return!0;return u[l]&&!t.deliveryTrackingComplete&&o<n},e.deliveryLabelForRecipient=function(n){const t=c(n);return null==t?null:l[t].label};const n=6e5,l={awaitingEvent:{label:'Awaiting event',warning:!1},processing:{label:'Processing',warning:!1},deferred:{label:'Deferred',warning:!0},delivered:{label:'Delivered',warning:!1},bounced:{label:'Bounced',warning:!0},blocked:{label:'Blocked',warning:!0},dropped:{label:'Dropped',warning:!0}},t=['awaitingEvent','processing','deferred','delivered','bounced','blocked','dropped'];const o={BLOCKED:'blocked',BOUNCED:'bounced',DEFERRED:'deferred',DELIVERED:'delivered',DROPPED:'dropped',PROCESSING:'processing'};function c(n){return n.awaitingDeliveryEvent?'awaitingEvent':null==n.deliveryStatus?null:o[n.deliveryStatus]}const u={CANCELLED:!0,COMPLETED:!0,DRAFT:!1,FAILED:!0,PARTIALLY_FAILED:!0,PAUSED:!0,SENDING:!0}},833,[]);
934__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrderOutreachRecipientAudit=function({campaignId:e,counts:l,recipients:n,sendStartedAt:u,deliveryFilter:p,onCampaignProgressUpdated:S,loadRecipientDetail:h}){const{isDesktop:x}=(0,y.useResponsive)(),[f,v]=(0,t.useState)(''),[R,L]=(0,t.useState)(()=>n[0]?.id??null),[E,A]=(0,t.useState)(0),$=n.some(e=>e.id===R)?R:n[0]?.id??null,B=null==$?null:n.find(e=>e.id===$)??null,k=(W=f,W.trim().toLocaleLowerCase()),F=I(null==p?n:n.filter(e=>(0,j.deliveryFilterKeyForRecipient)(e)===p),k),_=F,O=null==$?-1:_.findIndex(e=>e.id===$),H=e=>{const t=_[e];null!=t&&L(t.id)},N=F.slice(0,P),U=n.length>=T,M=F.length>P,G=(0,w.jsxs)(c.default,{style:[b.campaignStyles.recipientsPane,x&&null!=B&&b.campaignStyles.recipientsPaneWide],testID:"order-outreach-recipients-pane",children:[(0,w.jsxs)(s.default,{style:b.campaignStyles.detailSectionTitle,testID:"order-outreach-recipients-heading",children:["Recipients",' \xb7 ',String(l.includedRecipients),l.excludedRecipients>0&&(0,w.jsx)(s.default,{style:b.campaignStyles.warningMetaText,children:` \xb7 ${String(l.excludedRecipients)} excluded`})]}),U&&(0,w.jsx)(o.AppTextInput,{accessibilityLabel:"Search Shopify order ID",autoCapitalize:"none",autoCorrect:!1,onChangeText:v,placeholder:"Search Shopify order ID",style:b.campaignStyles.recipientSearchInput,value:f}),0===F.length?(0,w.jsx)(s.default,{style:b.campaignStyles.mutedText,children:"No recipients match."}):(0,w.jsxs)(w.Fragment,{children:[N.map(t=>(0,w.jsx)(C,{campaignId:e,recipient:t,sendStartedAt:u,selected:t.id===$,onSelectPreview:()=>{L(t.id)},onCampaignProgressUpdated:e=>{S(e),t.id===$&&A(e=>e+1)}},t.id)),M?(0,w.jsx)(s.default,{style:b.campaignStyles.mutedText,testID:"order-outreach-recipients-truncation",children:`Showing ${String(P)} of ${String(F.length)} \u2014 refine search`}):(0,w.jsx)(c.default,{style:b.campaignStyles.recipientsEndCap,testID:"order-outreach-recipients-end",children:(0,w.jsx)(s.default,{style:b.campaignStyles.recipientsEndCapText,children:"End of recipients"})})]})]});var W;if(null==B)return(0,w.jsxs)(c.default,{style:b.campaignStyles.masterDetail,testID:"order-outreach-master-detail",children:[(0,w.jsx)(s.default,{style:b.campaignStyles.mutedText,children:"No recipients to preview."}),G]});const q=n.length>1,K=O<=0,V=0===_.length||O>=0&&O>=_.length-1;return(0,w.jsxs)(c.default,{style:[b.campaignStyles.masterDetail,x&&b.campaignStyles.masterDetailWi
934de],testID:"order-outreach-master-detail",children:[G,(0,w.jsx)(D,{campaignId:e,recipient:B,showStepper:q,previousDisabled:K,nextDisabled:V,onPrevious:()=>{O>0&&H(O-1)},onNext:()=>{O<0?H(0):O<_.length-1&&H(O+1)},loadRecipientDetail:h},`${e}:${B.id}:${String(E)}`)]})};var t=r(d[0]),l=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),c=e(r(d[4])),o=r(d[5]),u=r(d[6]),p=r(d[7]),y=r(d[8]),S=r(d[9]),h=r(d[10]),x=r(d[11]),f=r(d[12]),b=r(d[13]),j=r(d[14]),v=r(d[15]),R=r(d[16]),w=r(d[17]);const T=9,P=100;function D({campaignId:e,recipient:t,showStepper:l,previousDisabled:o,nextDisabled:y,onPrevious:S,onNext:h,loadRecipientDetail:x}){const{data:f,loading:j,error:v,retry:T}=(0,p.useAsyncData)(async()=>x(e,t.id),[e,t.id,x],'Failed to load the recipient preview'),P=f?.id===t.id&&f.campaignId===e?f:null,D=null!=P?.renderedSubject&&null!=P.renderedHtmlBody&&null!=P.renderedPlainTextBody?Object.assign({},P,{renderedSubject:P.renderedSubject,renderedHtmlBody:P.renderedHtmlBody,renderedPlainTextBody:P.renderedPlainTextBody}):null;return(0,w.jsx)(c.default,{style:b.campaignStyles.previewPane,testID:"order-outreach-message-preview",children:(0,w.jsxs)(c.default,{style:b.campaignStyles.messagePreview,testID:"order-outreach-message-preview-column",children:[(0,w.jsxs)(c.default,{style:b.campaignStyles.previewAsRow,children:[l&&(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:"Preview previous included recipient",accessibilityState:{disabled:o},disabled:o,onPress:S,style:b.campaignStyles.previewStepButton,children:(0,w.jsx)(s.default,{style:[b.campaignStyles.linkText,o&&b.campaignStyles.previewStepDisabled],children:"Previous"})}),(0,w.jsxs)(s.default,{style:b.campaignStyles.previewAsLabel,children:["Previewing ",E(P,t)]}),l&&(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:"Preview next included recipient",accessibilityState:{disabled:y},disabled:y,onPress:h,style:b.campaignStyles.previewStepButton,children:(0,w.jsx)(s.default,{style:[b.campaignStyles.linkText,y&&b.campaignStyles.previewStepDisabled],children:"Next"})})]}),j&&null==P&&(0,w.jsx)(u.LoadingState,{message:"Loading recipient preview\u2026"}),null!=v&&null==P&&(0,w.jsxs)(c.default,{style:b.campaignStyles.previewLoadError,children:[(0,w.jsx)(s.default,{accessibilityRole:"alert",style:b.campaignStyles.errorText,children:v}),(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:"Retry loading recipient preview",onPress:T,children:(0,w.jsx)(s.default,{style:b.campaignStyles.linkText,children:"Retry"})})]}),null!=P&&null==D&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(s.default,{accessibilityRole:"alert",style:b.campaignStyles.errorText,children:["Current Shopify order details are unavailable, so this message cannot be rendered.",null!=P.currentOrderFailureCode&&` (${P.currentOrderFailureCode})`]}),(0,w.jsxs)(s.default,{selectable:!0,style:b.campaignStyles.mutedText,children:["Shopify order references:",' ',t.orders.map(e=>e.shopifyOrderGid).join(', ')]})]}),null!=P?.currentShopifyContactEmail&&(0,w.jsxs)(s.default,{selectable:!0,style:b.campaignStyles.recipientEmail,children:["Contact email (current in Shopify): ",P.currentShopifyContactEmail]}),null!=D&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s.default,{style:b.campaignStyles.messageFieldLabel,children:"Subject"}),(0,w.jsx)(s.default,{accessibilityLabel:"Rendered email subject",selectable:!0,style:b.campaignStyles.messageSubject,children:D.renderedSubject}),(0,w.jsx)(s.default,{style:b.campaignStyles.messageFieldLabel,children:"HTML preview"}),(0,w.jsx)(R.SandboxedEmailFrame,{htmlBody:D.renderedHtmlBody}),(0,w.jsx)(s.default,{style:b.campaignStyles.messageFieldLabel,children:"Plain-text body"}),(0,w.jsx)(s.default,{selectable:!0,style:b.campaignStyles.plainTextBody,children:D.renderedPlainTextBody})]}),null!=P&&(0,w.jsx)($,{recipient:P})]})})}function L(e){const t=e.orders[0]?.shopifyOrderGid;if(null==t)return`Recipient ${e.id}`;const l=t.split('/').at(-1);return null==l||''===l?`Shopify order ${t}`:`Shopify order ${l}`}function E(e,t){const l=e?.currentShopifyCustomerDisplayName;return null!=l&&''!==l?`as ${l}`:null!=e?.currentShopifyContactEmail?`for ${e.currentShopifyContactEmail}`:`for ${L(t)}`}function I(e,t){return''===t?e:e.filter(e=>!!e.id.toLocaleLowerCase().includes(t)||e.orders.some(e=>e.shopifyOrderGid.toLocaleLowerCase().includes(t)))}function C({campaignId:e,recipient:t,sendStartedAt:n,selected:o,onSelectPreview:u,onCampaignProgressUpdated:p}){const{hovered:y,webHoverProps:h}=(0,S.useWebHover)(),x=(0,j.deliveryLabelForRecipient)(t),R=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(c.default,{style:b.campaignStyles.recipientHeader,children:[(0,w.jsx)(c.default,{style:b.campaignStyles.recipientIdentity,children:(0,w.jsx)(s.default,{style:b.campaignStyles.recipientName,children:L(t)})}),(0,w.jsxs)(c.default,{style:b.campaignStyles.badgeRow,children:[null!=n&&(0,w.jsx)(f.Badge,{label:`Submission: ${f.RECIPIENT_STATE_LABELS[t.state]}`,warning:null!=(0,v.recipientRetryAction)(t.state)}),null!=n&&null!=x&&(0,w.jsx)(f.Badge,{label:`Delivery: ${x}`,warning:'BOUNCED'===t.deliveryStatus||'BLOCKED'===t.deliveryStatus||'DROPPED'===t.deliveryStatus||'DEFERRED'===t.deliveryStatus})]})]}),(0,w.jsx)(A,{recipient:t}),(0,w.jsx)(k,{campaignId:e,recipient:t,onCampaignProgressUpdated:p})]}),T=[b.campaignStyles.recipientRow,o&&b.campaignStyles.recipientRowSelected,!o&&y&&b.campaignStyles.recipientRowHovered];return(0,w.jsx)(l.default,Object.assign({accessibilityRole:"button",accessibilityLabel:`Preview message for ${L(t)}`,accessibilityState:{selected:o},onPress:u,style:[T,b.campaignStyles.recipientRowSelectable]},h,{children:R}))}function A({recipient:e}){return 0===e.orders.length?null:(0,w.jsx)(c.default,{style:b.campaignStyles.ordersBlock,
934children:(0,w.jsx)(c.default,{testID:`order-outreach-orders-${e.id}`,style:b.campaignStyles.ordersLineWrap,children:(0,w.jsx)(s.default,{style:b.campaignStyles.ordersLineText,children:(0,f.pluralCount)(e.orders.length,'selected order')})})})}function $({recipient:e}){const[l,o]=(0,t.useState)(!1);return 0===e.attempts.length?null:(0,w.jsxs)(c.default,{style:b.campaignStyles.attemptBlock,children:[(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:`${l?'Hide':'Show'} ${String(e.attempts.length)} send attempts`,accessibilityState:{expanded:l},onPress:()=>{o(e=>!e)},children:(0,w.jsxs)(s.default,{style:b.campaignStyles.linkText,children:[l?'Hide':'Show'," ",String(e.attempts.length)," attempts"]})}),l&&e.attempts.map(e=>(0,w.jsxs)(c.default,{style:b.campaignStyles.attemptEntry,children:[(0,w.jsxs)(s.default,{style:b.campaignStyles.mutedText,children:["#",String(e.attemptNumber),' ',"\xb7 ",null==e.outcome?f.DISPATCH_PHASE_LABELS[e.dispatchPhase]:f.RECIPIENT_STATE_LABELS[e.outcome],' ',"\xb7 claimed ",(0,f.formatInstant)(e.claimedAt),null!=e.completedAt&&` \xb7 completed ${(0,f.formatInstant)(e.completedAt)}`,null!=e.failureCode&&` \xb7 ${e.failureCode}`,e.sandboxMode&&' \xb7 sandbox']}),null!=e.deliveryStatus&&(0,w.jsxs)(s.default,{style:b.campaignStyles.attemptDeliveryStatus,children:["Delivery: ",f.DELIVERY_STATUS_LABELS[e.deliveryStatus]]}),e.deliveryEvents.map(e=>(0,w.jsxs)(s.default,{style:b.campaignStyles.mutedText,children:[B(e)," \xb7 ",(0,f.formatInstant)(e.occurredAt),null!=e.diagnosticExcerpt&&` \xb7 ${e.diagnosticExcerpt}`]},e.id))]},e.id))]})}function B(e){const t=f.SENDGRID_EVENT_TYPE_LABELS[e.eventType]??e.eventType;return null==e.bounceType?t:`${t} (${e.bounceType})`}function k({campaignId:e,recipient:o,onCampaignProgressUpdated:u}){const[p,y]=(0,t.useState)(!1),[S,f]=(0,t.useState)(!1),[j,R]=(0,t.useState)(!1),[T,P]=(0,t.useState)(null),D=(0,v.recipientRetryAction)(o.state);if(null==D)return null;const E=async e=>{R(!0),P(null);try{u(await e())}catch(e){P((0,h.errorMessage)(e,'The retry request failed'))}finally{R(!1)}};return(0,w.jsxs)(c.default,{style:b.campaignStyles.retryBlock,children:['retry'===D?(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:`Retry ${L(o)}`,accessibilityState:{disabled:j},disabled:j,onPress:()=>{E(async()=>x.orderOutreachAdminApi.retryRecipient(e,o.id))},children:(0,w.jsx)(s.default,{style:b.campaignStyles.linkText,children:j?'Retrying\u2026':'Retry'})}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:`Open resend confirmation for ${L(o)}`,accessibilityState:{expanded:p},onPress:()=>{y(e=>!e)},children:(0,w.jsx)(s.default,{style:b.campaignStyles.linkText,children:"Resend (may duplicate)"})}),p&&(0,w.jsxs)(c.default,{style:b.campaignStyles.confirmBlock,children:[(0,w.jsx)(s.default,{style:b.campaignStyles.consequenceText,children:"The previous attempt may already have been delivered. Resending risks a duplicate email to this recipient."}),(0,w.jsxs)(l.default,{accessibilityRole:"checkbox",accessibilityLabel:`Acknowledge duplicate email risk for ${L(o)}`,accessibilityState:{checked:S},onPress:()=>{f(e=>!e)},style:b.campaignStyles.acknowledgeRow,children:[(0,w.jsx)(c.default,{style:[b.campaignStyles.checkbox,S&&b.campaignStyles.checkboxChecked],children:S&&(0,w.jsx)(s.default,{style:b.campaignStyles.checkmark,children:'\u2713'})}),(0,w.jsx)(s.default,{style:b.campaignStyles.acknowledgeText,children:"I accept that this recipient may receive the same email twice."})]}),(0,w.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:`Resend ${L(o)} despite duplicate risk`,accessibilityState:{disabled:!S||j},disabled:!S||j,onPress:()=>{E(async()=>x.orderOutreachAdminApi.resendUnknownRecipient(e,o.id))},style:[b.campaignStyles.primaryButton,(!S||j)&&b.campaignStyles.buttonDisabled],children:(0,w.jsx)(s.default,{style:b.campaignStyles.primaryButtonText,children:j?'Resending\u2026':'Resend anyway'})})]})]}),null!=T&&(0,w.jsx)(s.default,{accessibilityRole:"alert",style:b.campaignStyles.errorText,children:T})]})}},834,[34,369,222,488,276,711,512,561,553,609,468,767,769,770,833,775,825,104]);
935__d(function(g,r,i,a,m,_e,d){"use strict";
935function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionsAdminPanel=function(){const{data:e,loading:l,error:u,retry:S}=(0,b.useAsyncData)(()=>L.subscriptionsAdminApi.getOverview(),[],'Failed to load subscriptions'),{surface:h}=(0,f.useErrorSurface)(E.overview),{surface:p}=(0,f.useErrorSurface)(E.missingProductContracts);if(l)return(0,R.jsxs)(n.default,{style:w.container,children:[(0,R.jsx)(o.LoadingState,{message:"Loading subscriptions\u2026"}),(0,R.jsx)(A.SubscriptionRenewalStepRunsCard,{},"renewal-step-runs")]});if(null!=u)return(0,R.jsxs)(n.default,{style:w.container,children:[(0,R.jsx)(o.ErrorState,{message:u,surface:h,onRetry:S,retryLabel:"Retry loading subscriptions"}),(0,R.jsx)(A.SubscriptionRenewalStepRunsCard,{},"renewal-step-runs")]});if('unavailable'===e)return(0,R.jsxs)(s.Card,{style:w.stateCard,children:[(0,R.jsx)(t.default,{style:w.stateTitle,children:"Subscriptions are not enabled in this environment"}),(0,R.jsx)(t.default,{style:w.stateDescription,children:"Enable the SUBSCRIPTIONS_ADMIN feature flag to expose live subscription administration data."})]});if(null==e)return(0,R.jsxs)(n.default,{style:w.container,children:[(0,R.jsx)(o.LoadingState,{message:"Loading subscriptions\u2026"}),(0,R.jsx)(A.SubscriptionRenewalStepRunsCard,{},"renewal-step-runs")]});const x=1===e.contracts.length?'1 contract still exists':`${e.contracts.length} contracts still exist`,T=!e.subscriptionProductInStore&&0===e.contracts.length;return(0,R.jsxs)(n.default,{style:w.container,children:[(0,R.jsxs)(n.default,{style:w.header,children:[(0,R.jsxs)(n.default,{children:[(0,R.jsx)(t.default,{accessibilityRole:"header",style:w.title,children:"API subscriptions"}),(0,R.jsx)(t.default,{style:w.subtitle,children:"Read-only contract and billing data from Shopify."})]}),(0,R.jsxs)(t.default,{style:w.liveLabel,children:["Live from Shopify at ",(0,C.formatIsoTime)(e.fetchedAt,'--',!1)]})]}),T?(0,R.jsxs)(s.Card,{style:w.stateCard,children:[(0,R.jsx)(t.default,{style:w.stateTitle,children:"No subscription product in this store"}),(0,R.jsx)(t.default,{style:w.stateDescription,children:"The api-subscription product has not been applied to this Shopify store, so there are no selling plans or contracts to show."})]}):(0,R.jsxs)(R.Fragment,{children:[e.subscriptionProductInStore?(0,R.jsx)(_,{sellingPlans:e.sellingPlans}):(0,R.jsx)(o.LocalErrorBanner,{surface:p,message:`The api-subscription product is missing from this Shopify store while ${x}.`,detail:"Active contracts keep renewing in Shopify."}),e.metrics.months.length>0?(0,R.jsx)(O.SubscriptionMetricsCard,{metrics:e.metrics}):null,(0,R.jsxs)(s.Card,{style:w.sectionCard,children:[(0,R.jsx)(t.default,{style:w.sectionTitle,children:"Contracts"}),0===e.contracts.length?(0,R.jsx)(o.EmptyState,{message:"No subscription contracts found."}):(0,R.jsx)(c.ColumnTable,{align:"start",columns:D,rows:e.contracts,getRowKey:e=>e.id,compactContent:e.contracts.map(e=>(0,R.jsx)(v,{contract:e},e.id)),testID:"subscriptions-contracts-table"})]})]}),(0,R.jsx)(A.SubscriptionRenewalStepRunsCard,{},"renewal-step-runs")]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),l=r(d[3]),s=r(d[4]),o=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),h=r(d[9]),p=r(d[10]),f=r(d[11]),b=r(d[12]),x=r(d[13]),C=r(d[14]),T=r(d[15]),y=r(d[16]),j=r(d[17]),I=r(d[18]),O=r(d[19]),A=r(d[20]),L=r(d[21]),P=r(d[22]),R=r(d[23]);const E=(0,f.defineScreenErrorSurfaces)('AdminSubscriptions',{overview:{id:'overview',kind:'page',label:'Subscriptions admin overview error'},missingProductContracts:{id:'missing-product-contracts',kind:'local-banner',label:'Missing subscription product warning'}}),D=[{id:'organization',header:'Organization',accessor:e=>e.organization?.name??e.organizationAttributeValue??'Missing organization ID',minWidth:190,flexGrow:2,align:'start',enableSort:!1,render:e=>(0,R.jsx)(M,{contract:e})},{id:'status',header:'Status',accessor:e=>P.CONTRACT_STATUS_DESCRIPTORS[e.status].label,width:105,enableSort:!1,render:e=>(0,R.jsx)(N,{descriptor:P.CONTRACT_STATUS_DESCRIPTORS[e.status]})},{id:'monthly',header:'Monthly',accessor:e=>(0,T.formatMoney)(e.monthlyDollars),width:100,enableSort:!1},{id:'allowance',header:'Allowance points',accessor:e=>(0,y.formatPointBalance)(e.allowancePoints),minWidth:125,enableSort:!1},{id:'nextBilling',header:'Next billing',accessor:e=>null==e.nextBillingDate?'\u2014':(0,C.formatIsoDateShort)(e.nextBillingDate),minWidth:125,enableSort:!1},{id:'lastPayment',header:'Last payment',accessor:e=>null==e.lastPaymentStatus?'\u2014':P.LAST_PAYMENT_LABELS[e.lastPaymentStatus],minWidth:110,enableSort:!1},{id:'lastCredit',header:'Last credit',accessor:e=>null==e.lastCreditedAt?'\u2014':(0,C.formatIsoDateTime)(e.lastCreditedAt),minWidth:190,enableSort:!1},{id:'creditCount',header:'Allowance resets',accessor:e=>e.creditCount,type:'number',minWidth:125,align:'center',enableSort:!1},{id:'fairUse',header:'Fair-use balance',accessor:e=>null==e.organization?'\u2014':(0,y.formatPointBalance)(e.organization.fairUseBalance),minWidth:125,enableSort:!1},{id:'purchased',header:'Purchased balance',accessor:e=>null==e.organization?'\u2014':(0,y.formatPointBalance)(e.organization.purchasedBalance),minWidth:130,enableSort:!1},{id:'health',header:'Health',accessor:e=>null==e.health?'\u2014':e.health.state,minWidth:130,enableSort:!1,render:e=>(0,R.jsx)(I.SubscriptionHealthBadge,{health:e.health})},{id:'details',header:'Details',accessor:e=>e.id,width:105,enableSort:!1,render:e=>(0,R.jsx)(l.AppLink,{to:"AdminSubscriptionDetail",href:`/admin/subscriptions/${e.id}`,accessibilityLabel:`Open subscription contract ${e.id}
935`,textStyle:w.detailLink,inline:!0,children:"View contract"})}];function _({sellingPlans:e}){return(0,R.jsxs)(s.Card,{style:w.sectionCard,children:[(0,R.jsx)(t.default,{style:w.sectionTitle,children:"Selling plans"}),0===e.length?(0,R.jsx)(t.default,{style:w.mutedText,children:"No selling plans found."}):(0,R.jsx)(n.default,{style:w.planList,children:e.map(e=>(0,R.jsxs)(n.default,{style:w.planRow,children:[(0,R.jsxs)(n.default,{style:w.planIdentity,children:[(0,R.jsx)(t.default,{style:w.planName,children:e.name}),(0,R.jsx)(t.default,{style:w.mutedText,children:(0,P.sellingPlanCadence)(e.billingInterval,e.billingIntervalCount)})]}),(0,R.jsxs)(t.default,{style:w.planCount,children:[e.activeContractCount,' ',1===e.activeContractCount?'active contract':'active contracts']})]},e.id))})]})}function M({contract:e}){return null==e.organization?(0,R.jsxs)(n.default,{children:[(0,R.jsx)(t.default,{style:w.unresolvedValue,children:e.organizationAttributeValue??'Missing organization ID'}),(0,R.jsx)(t.default,{style:w.unresolvedLabel,children:"Unresolved"})]}):(0,R.jsx)(u.ServiceExternalLink,{service:"developerPortalUrl",path:(0,P.developerPortalOrganizationPath)(e.organization.legacyId),inline:!0,accessibilityLabel:`Open ${e.organization.name} in Developer Portal`,textStyle:w.organizationLink,children:e.organization.name})}function N({descriptor:e}){return(0,R.jsx)(n.default,{style:[w.badge,{backgroundColor:e.backgroundColor,borderColor:e.color}],children:(0,R.jsx)(t.default,{style:[w.badgeText,{color:e.color}],children:e.label})})}function v({contract:e}){return(0,R.jsxs)(s.Card,{style:w.compactCard,children:[(0,R.jsxs)(n.default,{style:w.compactHeader,children:[(0,R.jsx)(M,{contract:e}),(0,R.jsx)(N,{descriptor:P.CONTRACT_STATUS_DESCRIPTORS[e.status]})]}),(0,R.jsx)(j.SubscriptionFact,{label:"Monthly",value:(0,T.formatMoney)(e.monthlyDollars)}),(0,R.jsx)(j.SubscriptionFact,{label:"Allowance points",value:(0,y.formatPointBalance)(e.allowancePoints)}),(0,R.jsx)(j.SubscriptionFact,{label:"Next billing",value:null==e.nextBillingDate?'\u2014':(0,C.formatIsoDateShort)(e.nextBillingDate)}),(0,R.jsx)(j.SubscriptionFact,{label:"Last payment",value:null==e.lastPaymentStatus?'\u2014':P.LAST_PAYMENT_LABELS[e.lastPaymentStatus]}),(0,R.jsx)(j.SubscriptionFact,{label:"Last credit",value:null==e.lastCreditedAt?'\u2014':(0,C.formatIsoDateTime)(e.lastCreditedAt)}),(0,R.jsx)(j.SubscriptionFact,{label:"Allowance resets",value:String(e.creditCount)}),(0,R.jsx)(j.SubscriptionFact,{label:"Fair-use balance",value:null==e.organization?'\u2014':(0,y.formatPointBalance)(e.organization.fairUseBalance)}),(0,R.jsx)(j.SubscriptionFact,{label:"Purchased balance",value:null==e.organization?'\u2014':(0,y.formatPointBalance)(e.organization.purchasedBalance)}),(0,R.jsxs)(n.default,{style:w.compactHealth,children:[(0,R.jsx)(t.default,{style:w.factLabel,children:"Health"}),(0,R.jsx)(I.SubscriptionHealthBadge,{health:e.health})]}),(0,R.jsx)(l.AppLink,{to:"AdminSubscriptionDetail",href:`/admin/subscriptions/${e.id}`,accessibilityLabel:`Open subscription contract ${e.id}`,textStyle:w.detailLink,inline:!0,children:"View contract"})]})}const w=(0,x.createStyles)({badge:{alignSelf:'flex-start',borderRadius:999,borderWidth:1,paddingHorizontal:h.SPACING.SM,paddingVertical:2},badgeText:{fontSize:p.FONT_SIZE.XS,fontWeight:'700'},compactCard:{gap:h.SPACING.SM,marginBottom:h.SPACING.MD},compactHeader:{alignItems:'flex-start',flexDirection:'row',gap:h.SPACING.MD,justifyContent:'space-between'},compactHealth:{alignItems:'center',flexDirection:'row',justifyContent:'space-between'},container:{gap:h.SPACING.XL},detailLink:{color:S.COLORS.ACTION_PRIMARY,fontSize:p.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},factLabel:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM},header:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD,justifyContent:'space-between'},liveLabel:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM},mutedText:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM},organizationLink:{color:S.COLORS.ACTION_PRIMARY,fontSize:p.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},planCount:{color:S.COLORS.TEXT_SECONDARY,fontSize:p.FONT_SIZE.SM},planIdentity:{gap:h.SPACING.XS},planList:{gap:h.SPACING.MD},planName:{color:S.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.MD,fontWeight:'600'},planRow:{alignItems:'center',borderBottomColor:S.COLORS.BORDER,borderBottomWidth:1,flexDirection:'row',gap:h.SPACING.MD,justifyContent:'space-between',paddingBottom:h.SPACING.MD},sectionCard:{gap:h.SPACING.LG},sectionTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.XL,fontWeight:'700'},stateCard:{gap:h.SPACING.SM},stateDescription:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.MD},stateTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.XL,fontWeight:'700'},subtitle:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.MD,marginTop:h.SPACING.XS},title:{color:S.COLORS.TEXT_PRIMARY,fontSize:p.FONT_SIZE.DISPLAY_SM,fontWeight:'700'},unresolvedLabel:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.XS,fontStyle:'italic'},unresolvedValue:{color:S.COLORS.TEXT_MUTED,fontSize:p.FONT_SIZE.SM}})},835,[34,222,276,516,605,512,681,522,490,493,494,557,561,489,685,722,836,837,838,840,841,842,839,104]);
936__d(function(g,r,i,a,m,e,d){"use strict";
936Object.defineProperty(e,'__esModule',{value:!0}),e.formatPointBalance=function(t){return(t??0).toLocaleString('en-US')}},836,[]);
937__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionFact=function({label:e,value:c}){return(0,u.jsxs)(l.default,{style:s.factRow,children:[(0,u.jsx)(t.default,{style:s.factLabel,children:e}),(0,u.jsx)(t.default,{style:s.factValue,children:c})]})},r(d[0]);var t=e(r(d[1])),l=e(r(d[2])),c=r(d[3]),n=r(d[4]),o=r(d[5]),f=r(d[6]),u=r(d[7]);const s=(0,f.createStyles)({factLabel:{color:c.COLORS.TEXT_MUTED,fontSize:o.FONT_SIZE.SM},factRow:{flexDirection:'row',gap:n.SPACING.MD,justifyContent:'space-between'},factValue:{color:c.COLORS.TEXT_PRIMARY,fontSize:o.FONT_SIZE.SM,textAlign:'right'}})},837,[34,222,276,490,493,494,489,104]);
938__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionHealthBadge=function({health:e}){if(null==e)return(0,b.jsx)(l.default,{accessibilityLabel:"Health unavailable",style:f.unavailable,children:"\u2014"});const o=s.HEALTH_DESCRIPTORS[e.state];return(0,b.jsx)(t.default,{accessibilityLabel:`Health: ${o.label}`,style:[f.badge,{backgroundColor:o.backgroundColor,borderColor:o.color}],children:(0,b.jsx)(l.default,{style:[f.badgeText,{color:o.color}],children:o.label})})},r(d[0]);var l=e(r(d[1])),t=e(r(d[2])),o=r(d[3]),n=r(d[4]),c=r(d[5]),u=r(d[6]),s=r(d[7]),b=r(d[8]);const f=(0,u.createStyles)({badge:{alignSelf:'flex-start',borderRadius:999,borderWidth:1,paddingHorizontal:n.SPACING.SM,paddingVertical:2},badgeText:{fontSize:c.FONT_SIZE.XS,fontWeight:'700'},unavailable:{color:o.COLORS.TEXT_MUTED,fontSize:c.FONT_SIZE.MD}})},838,[34,222,276,490,493,494,489,839,104]);
939__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HEALTH_DESCRIPTORS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"CONTRACT_STATUS_DESCRIPTORS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"RENEWAL_STEP_RUN_STATE_DESCRIPTORS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"RENEWAL_STEP_LABELS",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"LAST_PAYMENT_LABELS",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"BILLING_CYCLE_STATUS_LABELS",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"BILLING_ATTEMPT_OUTCOME_LABELS",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"SUBSCRIPTION_CREDIT_TYPE_LABELS",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"UNKNOWN_SHOPIFY_ORDER_LABEL",{enumerable:!0,get:function(){return C}}),e.subscriptionCreditType=function(n,o){if(null==o||null==n.shopifyOrderId)return'unknown';return n.shopifyOrderId===o?'origin':'renewal'},e.shopifyOrderDisplayName=function(n,o){return n??o??C},e.shopifyOrderAdminUrl=function(n,o){if(null==n||null==o)return null;return`${n}/orders/${encodeURIComponent(o)}`},e.developerPortalOrganizationPath=function(n){return`/dashboards/organization?orgId=${encodeURIComponent(String(n))}`},e.sellingPlanCadence=function(n,o){const t=n.toLocaleLowerCase('en-US'),l=1===o?t:`${t}s`;return`Every ${String(o)} ${l}`},e.formatFractionPercent=function(n){return`${String(Math.round(100*n))}%`},e.shortenShopifyJobId=function(n){const o=n.lastIndexOf('/');return o<0?n:n.slice(o+1)},e.yesNo=function(n){return n?'Yes':'No'},e.formatMetricsMonth=function(n){const o=S.exec(n),t=o?.[1],l=o?.[2],O=null==l?void 0:L[Number.parseInt(l,10)-1];if(null==t||null==O)throw new Error(`Invalid metrics month "${n}": expected YYYY-MM with month 01-12`);return`${O} ${t}`},e.latestMetricsMonth=function(n){return n[n.length-1]??null},e.metricsMonthsNewestFirst=function(n){return[...n].reverse()};var n=r(d[0]);const o={ON_TRACK:{label:'On track',color:n.COLORS.SUCCESS,backgroundColor:n.COLORS.SUCCESS_BG},RUNNING_HOT:{label:'Running hot',color:n.COLORS.WARNING_DARK,backgroundColor:n.COLORS.WARNING_BG},DEPLETED:{label:'Depleted',color:n.COLORS.ERROR_DARK,backgroundColor:n.COLORS.ERROR_BG},COVERED:{label:'Covered',color:n.COLORS.BLUE_800,backgroundColor:n.COLORS.BLUE_50},NOT_YET_CREDITED:{label:'Not yet credited',color:n.COLORS.TEXT_SLATE_DARK,backgroundColor:n.COLORS.BG_SLATE_100}},t={ACTIVE:{label:'Active',color:n.COLORS.SUCCESS,backgroundColor:n.COLORS.SUCCESS_BG},PAUSED:{label:'Paused',color:n.COLORS.WARNING_DARK,backgroundColor:n.COLORS.WARNING_BG},CANCELLED:{label:'Cancelled',color:n.COLORS.TEXT_MUTED,backgroundColor:n.COLORS.BG_SUBTLE_100},EXPIRED:{label:'Expired',color:n.COLORS.TEXT_MUTED,backgroundColor:n.COLORS.BG_SUBTLE_100},FAILED:{label:'Failed',color:n.COLORS.ERROR_DARK,backgroundColor:n.COLORS.ERROR_BG}},l={RUNNING:{label:'Running',color:n.COLORS.TEXT_MUTED,backgroundColor:n.COLORS.BG_SUBTLE_100},COMPLETED:{label:'Completed',color:n.COLORS.SUCCESS,backgroundColor:n.COLORS.SUCCESS_BG},FAILED:{label:'Failed',color:n.COLORS.ERROR_DARK,backgroundColor:n.COLORS.ERROR_BG},ABANDONED:{label:'Abandoned',color:n.COLORS.ERROR_DARK,backgroundColor:n.COLORS.ERROR_BG}},O={CHARGE_DUE_CYCLES:'Charge due cycles',REVIEW_UNPAID_CYCLES:'Review unpaid cycles',EXPIRE_ENDED_ALLOWANCES:'Expire ended allowances'},E={SUCCEEDED:'Succeeded',FAILED:'Failed'},c={BILLED:'Billed',UNBILLED:'Unbilled'},u={SUCCEEDED:'Succeeded',FAILED:'Failed',ACTION_REQUIRED:'Action required',PENDING:'Pending'}
939,R={origin:'Origin',renewal:'Renewal',unknown:'\u2014'},C='\u2014';const S=/^(\d{4})-(\d{2})$/,L=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']},839,[490]);
940__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionMetricsCard=function({metrics:e}){const s=(0,C.latestMetricsMonth)(e.months),o=(0,C.metricsMonthsNewestFirst)(e.months);return(0,f.jsxs)(l.Card,{style:y.sectionCard,children:[(0,f.jsx)(t.default,{style:y.sectionTitle,children:"Program metrics"}),(0,f.jsxs)(n.default,{style:y.headlineRow,children:[(0,f.jsx)(T,{id:"activeContracts",label:"Active contracts",value:String(e.activeContractCount)}),(0,f.jsx)(T,{id:"monthlyRecurringRevenue",label:"Monthly recurring revenue",value:(0,S.formatMoney)(e.monthlyRecurringRevenue)}),(0,f.jsx)(T,{id:"newThisMonth",label:"New this month",value:null==s?'\u2014':String(s.newContracts)}),(0,f.jsx)(T,{id:"cancelledThisMonth",label:"Cancelled this month",value:null==s?'\u2014':String(s.cancelledContracts)})]}),(0,f.jsx)(t.default,{style:y.caption,children:x}),(0,f.jsx)(c.ColumnTable,{align:"start",columns:M,rows:o,getRowKey:e=>e.month,compactContent:o.map(e=>(0,f.jsx)(j,{month:e},e.month)),testID:v})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),l=r(d[3]),c=r(d[4]),s=r(d[5]),o=r(d[6]),u=r(d[7]),h=r(d[8]),S=r(d[9]),b=r(d[10]),p=r(d[11]),C=r(d[12]),f=r(d[13]);const v='subscriptions-metrics-table',x="Months are UTC calendar months. Cancellation timing is approximate: Shopify records the contract's last update, not when it was cancelled.",M=[{id:'month',header:'Month',accessor:e=>(0,C.formatMetricsMonth)(e.month),minWidth:110,enableSort:!1},{id:'newContracts',header:'New',accessor:e=>e.newContracts,type:'number',align:'center',minWidth:70,enableSort:!1},{id:'cancelledContracts',header:'Cancelled',accessor:e=>e.cancelledContracts,type:'number',align:'center',minWidth:100,enableSort:!1},{id:'billingAttemptsSucceeded',header:'Billing succeeded',accessor:e=>e.billingAttemptsSucceeded,type:'number',align:'center',minWidth:130,enableSort:!1},{id:'billingAttemptsFailed',header:'Billing failed',accessor:e=>e.billingAttemptsFailed,type:'number',align:'center',minWidth:110,enableSort:!1},{id:'billingAttemptsUnresolved',header:'Billing unresolved',accessor:e=>e.billingAttemptsUnresolved,type:'number',align:'center',minWidth:135,enableSort:!1},{id:'creditCount',header:'Credits',accessor:e=>e.creditCount,type:'number',align:'center',minWidth:90,enableSort:!1},{id:'creditedPoints',header:'Credited points',accessor:e=>(0,b.formatPointBalance)(e.creditedPoints),minWidth:125,enableSort:!1}];function T({id:e,label:l,value:c}){return(0,f.jsxs)(n.default,{style:y.headlineStat,children:[(0,f.jsx)(t.default,{style:y.headlineLabel,children:l}),(0,f.jsx)(t.default,{style:y.headlineValue,testID:`subscriptions-metrics-headline-${e}`,children:c})]})}function j({month:e}){return(0,f.jsxs)(l.Card,{style:y.compactCard,children:[(0,f.jsx)(t.default,{style:y.compactTitle,children:(0,C.formatMetricsMonth)(e.month)}),(0,f.jsx)(p.SubscriptionFact,{label:"New",value:String(e.newContracts)}),(0,f.jsx)(p.SubscriptionFact,{label:"Cancelled",value:String(e.cancelledContracts)}),(0,f.jsx)(p.SubscriptionFact,{label:"Billing succeeded",value:String(e.billingAttemptsSucceeded)}),(0,f.jsx)(p.SubscriptionFact,{label:"Billing failed",value:String(e.billingAttemptsFailed)}),(0,f.jsx)(p.SubscriptionFact,{label:"Billing unresolved",value:String(e.billingAttemptsUnresolved)}),(0,f.jsx)(p.SubscriptionFact,{label:"Credits",value:String(e.creditCount)}),(0,f.jsx)(p.SubscriptionFact,{label:"Credited points",value:(0,b.formatPointBalance)(e.creditedPoints)})]})}const y=(0,h.createStyles)({caption:{color:s.COLORS.TEXT_MUTED,fontSize:u.FONT_SIZE.XS},compactCard:{gap:o.SPACING.SM,marginBottom:o.SPACING.MD},compactTitle:{color:s.COLORS.TEXT_PRIMARY,fontSize:u.FONT_SIZE.MD,fontWeight:'600'},headlineLabel:{color:s.COLORS.TEXT_MUTED,fontSize:u.FONT_SIZE.SM},headlineRow:{flexDirection:'row',flexWrap:'wrap',gap:o.SPACING.XL},headlineStat:{gap:o.SPACING.XS,minWidth:140},headlineValue:{color:s.COLORS.TEXT_PRIMARY,fontSize:u.FONT_SIZE.XL,fontWeight:'700'},sectionCard:{gap:o.SPACING.LG},sectionTitle:{color:s.COLORS.TEXT_PRIMARY,fontSize:u.FONT_SIZE.XL,fontWeight:'700'}})},840,[34,222,276,605,681,490,493,494,489,722,836,837,839,104]);
941__d(function(g,r,i,a,m,_e,d){"use strict";
941function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionRenewalStepRunsCard=function(){const{data:e,loading:p,error:b,retry:T}=(0,y.useAsyncData)(E.fetchSubscriptionRenewalStepRuns,[],'Failed to load recent renewal step runs'),{surface:C}=(0,h.useErrorSurface)(j.renewalStepRuns),{surface:R}=(0,h.useErrorSurface)(j.renewalTrigger),[w,A]=(0,t.useState)(!1),[_,D]=(0,t.useState)(null),[N,M]=(0,t.useState)(!1),v=(0,t.useRef)(!0);(0,t.useEffect)(()=>()=>{v.current=!1},[]);const W=(0,t.useCallback)(async()=>{if(!w){A(!0),D(null),M(!1);try{await(0,E.triggerSubscriptionRenewal)(),v.current&&M(!0)}catch(e){v.current&&D((0,x.errorMessage)(e,'Could not queue the subscription renewal job'))}finally{v.current&&A(!1)}}},[w]);return(0,I.jsxs)(c.Card,{style:P.sectionCard,children:[(0,I.jsxs)(l.default,{style:P.heading,children:[(0,I.jsx)(o.default,{style:P.sectionTitle,children:"Recent subscription renewal step runs"}),(0,I.jsx)(o.default,{style:P.caption,children:"The renewal job runs at five minutes past every hour (UTC). The charge and review steps run every hour; allowance expiry runs once per UTC day at 00:05. Unpaid monthly cycles are retried one and seven days after their expected date, one retry per completed failed attempt, and never after ten days; a monthly contract is failed one day after its last retry fails. The staging-only daily plan uses one and four hours, an eight-hour cutoff, and a one-hour grace. A failed or abandoned expiry run is reclaimed by the next hourly tick; a failed charge or review run is not rerun because the run one hour later covers its cycles."})]}),(0,I.jsxs)(l.default,{style:P.triggerControls,children:[(0,I.jsxs)(s.default,{style:[P.triggerButton,w&&P.triggerButtonDisabled],onPress:()=>{W()},disabled:w,accessibilityRole:"button",accessibilityLabel:"Run subscription renewal now",children:[w&&(0,I.jsx)(n.default,{size:"small",color:f.COLORS.WHITE}),(0,I.jsx)(o.default,{style:P.triggerButtonText,children:w?'Queueing renewal job\u2026':'Run renewal job now'})]}),(0,I.jsx)(o.default,{style:P.triggerExplanation,children:"Uses the current UTC run periods. Steps already running or completed are skipped."})]}),N&&(0,I.jsx)(o.default,{style:P.triggerSuccess,accessibilityLiveRegion:"polite",children:"Renewal job queued. Current-period steps already running or completed will be skipped."}),null!=_&&(0,I.jsx)(u.LocalErrorBanner,{surface:R,message:_,onDismiss:()=>{D(null)},dismissLabel:"Dismiss renewal trigger error"}),p&&(0,I.jsx)(u.LoadingState,{message:"Loading recent renewal step runs\u2026"}),null!=b&&(0,I.jsx)(u.LocalErrorBanner,{surface:C,message:b,onRetry:T,retryLabel:"Retry loading renewal step runs"}),null!=e&&(0,I.jsx)(S.ColumnTable,{align:"start",columns:O,rows:e.runs,getRowKey:e=>e.id,emptyMessage:"No renewal steps have run yet.",compactContent:e.runs.map(e=>(0,I.jsx)(L,{run:e},e.id)),testID:"subscriptions-renewal-step-runs-table"})]})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3])),l=e(r(d[4])),c=r(d[5]),u=r(d[6]),S=r(d[7]),f=r(d[8]),p=r(d[9]),b=r(d[10]),h=r(d[11]),y=r(d[12]),T=r(d[13]),C=r(d[14]),x=r(d[15]),E=r(d[16]),R=r(d[17]),I=r(d[18]);const w='\u2014',j=(0,h.defineScreenErrorSurfaces)('AdminSubscriptions',{renewalStepRuns:{id:'renewal-step-runs',kind:'local-banner',label:'Subscription renewal step runs error'},renewalTrigger:{id:'renewal-trigger',kind:'local-banner',label:'Subscription renewal trigger error'}});function A(e){return'FAILED'===e.state||'ABANDONED'===e.state?`subscriptions-renewal-step-run-${e.id}-attention`:void 0}const O=[{id:'runPeriod',header:'Run period',accessor:e=>(0,C.formatIsoDateTime)(e.runPeriodStart),minWidth:180,enableSort:!1},{id:'step',header:'Step',accessor:e=>R.RENEWAL_STEP_LABELS[e.step],minWidth:130,enableSort:!1},{id:'state',header:'State',accessor:e=>R.RENEWAL_STEP_RUN_STATE_DESCRIPTORS[e.state].label,width:105,enableSort:!1,render:e=>(0,I.jsx)(D,{run:e})},{id:'claimedBy',header:'Claimed by',accessor:e=>e.claimedBy,minWidth:210,enableSort:!1},{id:'claimedAt',header:'Claimed at',accessor:e=>(0,C.formatIsoDateTime)(e.claimedAt),minWidth:180,enableSort:!1},{id:'completedAt',header:'Completed at',accessor:e=>(0,C.formatIsoDateTime)(e.completedAt,w),minWidth:180,enableSort:!1},{id:'job',header:'Job',accessor:e=>null==e.shopifyJobId?w:(0,R.shortenShopifyJobId)(e.shopifyJobId),minWidth:130,enableSort:!1},{id:'error',header:'Error',accessor:e=>e.error??w,minWidth:210,flexGrow:2,enableSort:!1}];function _({descriptor:e,testID:t}){return(0,I.jsx)(l.default,Object.assign({},null==t?{}:{testID:t},{style:[P.badge,{backgroundColor:e.backgroundColor,borderColor:e.color}],children:(0,I.jsx)(o.default,{style:[P.badgeText,{color:e.color}],children:e.label})}))}function D({run:e}){const t=A(e);return(0,I.jsx)(_,Object.assign({descriptor:R.RENEWAL_STEP_RUN_STATE_DESCRIPTORS[e.state]},null==t?{}:{testID:t}))}function L({run:e}){return(0,I.jsxs)(c.Card,{style:P.compactCard,children:[(0,I.jsxs)(l.default,{style:P.compactHeader,children:[(0,I.jsx)(o.default,{style:P.compactTitle,children:R.RENEWAL_STEP_LABELS[e.step]}),(0,I.jsx)(D,{run:e})]}),(0,I.jsx)(N,{label:"Run period",value:(0,C.formatIsoDateTime)(e.runPeriodStart)}),(0,I.jsx)(N,{label:"Claimed by",value:e.claimedBy}),(0,I.jsx)(N,{label:"Claimed at",value:(0,C.formatIsoDateTime)(e.claimedAt)}),(0,I.jsx)(N,{label:"Completed at",value:(0,C.formatIsoDateTime)(e.completedAt,w)}),(0,I.jsx)(N,{label:"Job",value:null==e.shopifyJobId?w:(0,R.shortenShopifyJobId)(e.shopifyJobId)}),(0,I.jsx)(N,{label:"Error",value:e.error??w})]})}function N({label:e,value:t}){return(0,I.jsxs)(l.default,{style:P.factRow,children:[(0,I.jsx)(o.default,{style:P.factLabel,children:e}),(0,I.jsx)(o.default,{style:P.factValue,children:t})]})}const P=(0,T.createStyles)({badge:{alignSelf:'flex-start',borderRadius:999,borderWidth:1,paddingHorizontal:p.SPACING.SM,paddingVertical:2},badgeText:{fontSize:b.FONT_SIZE.XS,fontWeight:'700'},caption:{color:f.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM},compactCard:{gap:p.SPACING.SM,marginBottom:p.SPACING.MD},compactHeader:{alignItems:'flex-start',flexDirection:'row',gap:p.SPACING.MD,justifyContent:'space-between'},compactTitle:{color:f.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.MD,fontWeight:'700'},factLabel:{color:f.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM},factRow:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.MD,justifyContent:'space-between'},factValue:{color:f.COLORS.TEXT_PRIMARY,flexShrink:1,fontSize:b.FONT_SIZE.SM,textAlign:'right'},heading:{gap:p.SPACING.XS},sectionCard:{gap:p.SPACING.LG},sectionTitle:{color:f.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.XL,fontWeight:'700'},triggerButton:{alignItems:'center',alignSelf:'flex-start',backgroundColor:f.COLORS.ACTION_PRIMARY,borderRadius:6,flexDirection:'row',gap:p.SPACING.SM,paddingHorizontal:p.SPACING.MD,paddingVertical:p.SPACING.SM},triggerButtonDisabled:{opacity:.65},triggerButtonText:{color:f.COLORS.WHITE,fontSize:b.FONT_SIZE.SM,fontWeight:'700'},triggerControls:{alignItems:'flex-start',gap:p.SPACING.XS},triggerExplanation:{color:f.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.XS},triggerSuccess:{color:f.COLORS.SUCCESS,fontSize:b.FONT_SIZE.SM}})},841,[34,410,222,488,276,605,512,681,490,493,494,557,561,489,685,468,842,839,104]);
942__d(function(g,r,i,a,m,e,d){"use strict";
942Object.defineProperty(e,'__esModule',{value:!0}),e.fetchSubscriptionRenewalStepRuns=async function(){return t.admin.subscriptionsAdminRenewalStepRuns()},e.triggerSubscriptionRenewal=async function(){await t.admin.subscriptionsAdminTriggerRenewal()},Object.defineProperty(e,"subscriptionsAdminApi",{enumerable:!0,get:function(){return s}});var n=r(d[0]),t=r(d[1]);const s={async getOverview(){try{return await t.admin.subscriptionsAdminOverview()}catch(t){if((0,n.isAxios404)(t))return'unavailable';throw t}},async getContractDetail(s){try{return await t.admin.subscriptionsAdminContractDetail({path:{contractId:s}})}catch(t){if((0,n.isAxios404)(t))return null;throw t}}}},842,[464,471]);
943__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionContractDetailPanel=function({contractId:e,headingRef:t}){const{data:u,loading:f,error:h,retry:S}=(0,b.useAsyncData)(()=>L.subscriptionsAdminApi.getContractDetail(e),[e],'Failed to load the subscription contract'),{surface:p}=(0,y.useErrorSurface)(_.detail);return(0,R.jsxs)(n.default,{style:K.container,children:[(0,R.jsx)(s.AppLink,{to:"AdminSubscriptions",accessibilityLabel:"All subscription contracts",style:K.backLink,children:(0,R.jsx)(l.default,{style:K.backLinkText,children:"\u2190 All subscriptions"})}),(0,R.jsxs)(l.default,Object.assign({ref:t,accessibilityRole:"header",style:K.title},{tabIndex:-1},{children:["Subscription contract ",e]})),f&&(0,R.jsx)(c.LoadingState,{message:"Loading subscription contract\u2026"}),null!=h&&(0,R.jsx)(c.ErrorState,{message:h,surface:p,onRetry:S,retryLabel:"Retry loading subscription contract"}),!f&&null==h&&null==u&&(0,R.jsxs)(o.Card,{style:K.stateCard,testID:"subscription-contract-not-found",children:[(0,R.jsx)(l.default,{style:K.stateTitle,children:"Contract not found"}),(0,R.jsx)(l.default,{style:K.stateDescription,children:"This subscription contract could not be found in Shopify."}),(0,R.jsx)(s.AppLink,{to:"AdminSubscriptions",accessibilityLabel:"All subscription contracts",textStyle:K.inlineLink,inline:!0,children:"Return to subscriptions"})]}),null!=u&&(0,R.jsx)(M,{detail:u})]})};var t=r(d[0]);r(d[1]);var l=e(r(d[2])),n=e(r(d[3])),s=r(d[4]),o=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),h=r(d[9]),S=r(d[10]),p=r(d[11]),x=r(d[12]),y=r(d[13]),b=r(d[14]),T=r(d[15]),j=r(d[16]),O=r(d[17]),I=r(d[18]),C=r(d[19]),A=r(d[20]),L=r(d[21]),E=r(d[22]),R=r(d[23]);const _=(0,y.defineScreenErrorSurfaces)('AdminSubscriptionDetail',{detail:{id:'detail',kind:'page',label:'Subscription contract detail error'},uncreditedPaidOrders:{id:'uncredited-paid-orders',kind:'local-banner',label:'Uncredited paid orders warning'}}),N="A paid order credits the allowance through the orders/paid webhook, normally within seconds. A missing credit means that webhook was not processed for the order; check its webhook delivery before crediting by hand.";function D(e){return[{id:'index',header:'Cycle',accessor:e=>e.cycleIndex,type:'number',width:75,enableSort:!1},{id:'start',header:'Start',accessor:e=>(0,j.formatIsoDateTime)(e.cycleStartAt),minWidth:165,enableSort:!1},{id:'end',header:'End',accessor:e=>(0,j.formatIsoDateTime)(e.cycleEndAt),minWidth:165,enableSort:!1},{id:'expected',header:'Expected billing',accessor:e=>(0,j.formatIsoDateTime)(e.billingAttemptExpectedDate),minWidth:165,enableSort:!1},{id:'status',header:'Status',accessor:e=>E.BILLING_CYCLE_STATUS_LABELS[e.status],width:90,enableSort:!1},{id:'flags',header:'Flags',accessor:e=>`Skipped: ${(0,E.yesNo)(e.skipped)} \xb7 Edited: ${(0,E.yesNo)(e.edited)}`,minWidth:150,enableSort:!1},{id:'attempts',header:'Billing attempts',accessor:e=>`${String(e.billingAttempts.length)} attempts`,minWidth:360,flexGrow:3,align:'start',enableSort:!1,render:t=>(0,R.jsx)(F,{attempts:t.billingAttempts,credited:e})}]}function P(e,t){return[{id:'creditedAt',header:'Credited at',accessor:e=>e.creditedAt,type:'datetime',minWidth:165,enableSort:!1},{id:'creditType',header:'Credit type',accessor:e=>E.SUBSCRIPTION_CREDIT_TYPE_LABELS[(0,E.subscriptionCreditType)(e,t)],width:100,enableSort:!1},{id:'allowancePoints',header:'Allowance points',accessor:e=>(0,I.formatPointBalance)(e.allowancePoints),minWidth:135,enableSort:!1},{id:'fairUseBalanceBefore',header:'Fair-use balance before',accessor:e=>(0,I.formatPointBalance)(e.fairUseBalanceBefore),minWidth:180,enableSort:!1},{id:'shopifyOrderId',header:'Shopify order',accessor:e=>(0,E.shopifyOrderDisplayName)(e.shopifyOrderName,e.shopifyOrderId),render:t=>(0,R.jsx)(V,{adminUrl:(0,E.shopifyOrderAdminUrl)(e,t.shopifyOrderId),displayName:(0,E.shopifyOrderDisplayName)(t.shopifyOrderName,t.shopifyOrderId)}),minWidth:145,enableSort:!1}]}function M({detail:e}){const{surface:s}=(0,y.useErrorSurface)(_.uncreditedPaidOrders),f=(0,t.useMemo)(()=>(0,C.creditedOrderIds)(e.credits),[e.credits]),h=(0,t.useMemo)(()=>(0,C.uncreditedPaidOrders)(e),[e]),S=(0,t.useMemo)(()=>D(f),[f]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(U,{summary:e.summary,fetchedAt:e.fetchedAt}),(0,R.jsx)(z,{detail:e,credited:f}),(0,R.jsx)(G,{detail:e}),h.length>0&&(0,R.jsx)(n.default,{testID:"subscription-uncredited-paid-orders",children:(0,R.jsx)(c.LocalErrorBanner,{surface:s,message:v(h),detail:N})}),(0,R.jsx)(w,{credits:e.credits,originOrderId:e.originOrder?.id??null,storeAdminUrl:e.shopifyAdminUrl}),(0,R.jsxs)(o.Card,{style:K.sectionCard,children:[(0,R.jsx)(l.default,{style:K.sectionTitle,children:"Billing cycles"}),0===e.billingCycles.length?(0,R.jsx)(l.default,{style:K.mutedText,children:"No billing cycles found."}):(0,R.jsx)(u.ColumnTable,{align:"start",columns:S,rows:e.billingCycles,getRowKey:e=>String(e.cycleIndex),compactContent:e.billingCycles.map(e=>(0,R.jsx)(Z,{cycle:e,credited:f},e.cycleIndex)),testID:"subscription-billing-cycles-table"})]})]})}function v(e){const t=e.map(e=>(0,E.shopifyOrderDisplayName)(e.orderName,e.orderId)).join(', '),l=e.length;return 1===l?`1 paid order has no recorded allowance credit: ${t}`:`${String(l)} paid orders have no recorded allowance credit: ${t}`}function w({credits:e,originOrderId:s,storeAdminUrl:c}){const f=(0,t.useMemo)(()=>P(c,s),[c,s]);return(0,R.jsxs)(o.Card,{style:K.sectionCard,children:[(0,R.jsxs)(n.default,{style:K.sectionHeading,children:[(0,R.jsx)(l.default,{style:K.sectionTitle,children:"Credit history"}),(0,R.jsx)(l.default,{style:K.mutedText,children:"Each credit resets the organization\u2019s fair-use allowance. The balance before the reset is the remainder that was discarded."})]}),0===e.length?(0,R.jsx)(l.default,{style:K.mutedText,children:"No credits recorded."}):(0,R.jsx)(u.ColumnTable,{align:"start",columns:f,rows:e,getRowKey:e=>e.id,getRowTestID:e=>`subscription-credit-row-${e.id}`,compactContent:e.map(e=>(0,R.jsx)(B,{credit:e,originOrderId:s,storeAdminUrl:c},e.id)),testID:"subscription-credit-history-table"})]})}function B({credit:e,originOrderId:t,storeAdminUrl:n}){const s=E.SUBSCRIPTION_CREDIT_TYPE_LABELS[(0,E.subscriptionCreditType)(e,t)];return(0,R.jsxs)(o.Card,{style:K.cycleCard,children:[(0,R.jsx)(l.default,{style:K.subsectionTitle,children:s}),(0,R.jsx)($,{label:"Credited at",value:(0,j.formatIsoDateTime)(e.creditedAt)}),(0,R.jsx)($,{label:"Allowance points",value:(0,I.formatPointBalance)(e.allowancePoints)}),(0,R.jsx)($,{label:"Fair-use balance before",value:(0,I.formatPointBalance)(e.fairUseBalanceBefore)}
943),(0,R.jsx)(H,{label:"Shopify order",displayName:(0,E.shopifyOrderDisplayName)(e.shopifyOrderName,e.shopifyOrderId),adminUrl:(0,E.shopifyOrderAdminUrl)(n,e.shopifyOrderId)})]})}function U({summary:e,fetchedAt:t}){return(0,R.jsxs)(o.Card,{style:K.sectionCard,children:[(0,R.jsxs)(n.default,{style:K.summaryHeader,children:[(0,R.jsxs)(n.default,{children:[(0,R.jsx)(l.default,{style:K.organizationName,children:(0,R.jsx)(k,{summary:e})}),(0,R.jsxs)(l.default,{style:K.mutedText,children:["Live from Shopify ",(0,j.formatIsoDateTime)(t)]})]}),(0,R.jsx)(A.SubscriptionHealthBadge,{health:e.health})]}),(0,R.jsxs)(n.default,{style:K.metricsGrid,children:[(0,R.jsx)(Y,{label:"Cycle elapsed",value:null==e.health?'\u2014':(0,E.formatFractionPercent)(e.health.cycleElapsedFraction)}),(0,R.jsx)(Y,{label:"Consumed",value:null==e.health?'\u2014':(0,E.formatFractionPercent)(e.health.consumedFraction)}),(0,R.jsx)(Y,{label:"Projected shortfall",value:null==e.health?'\u2014':(0,I.formatPointBalance)(e.health.projectedShortfallPoints)}),(0,R.jsx)(Y,{label:"Allowance points",value:(0,I.formatPointBalance)(e.allowancePoints)}),(0,R.jsx)(Y,{label:"Fair-use balance",value:null==e.organization?'\u2014':(0,I.formatPointBalance)(e.organization.fairUseBalance)}),(0,R.jsx)(Y,{label:"Purchased balance",value:null==e.organization?'\u2014':(0,I.formatPointBalance)(e.organization.purchasedBalance)})]})]})}function k({summary:e}){return null==e.organization?(0,R.jsxs)(l.default,{style:K.unresolved,children:[e.organizationAttributeValue??'Missing organization ID'," (Unresolved)"]}):(0,R.jsx)(h.ServiceExternalLink,{service:"developerPortalUrl",path:(0,E.developerPortalOrganizationPath)(e.organization.legacyId),inline:!0,accessibilityLabel:`Open ${e.organization.name} in Developer Portal`,textStyle:K.organizationLink,children:e.organization.name})}function z({detail:e,credited:t}){const{summary:s}=e,c=(0,C.originOrderCreditStatus)(e.originOrder,t);return(0,R.jsxs)(o.Card,{style:K.sectionCard,children:[(0,R.jsx)(l.default,{style:K.sectionTitle,children:"Contract facts"}),(0,R.jsxs)(n.default,{style:K.factGrid,children:[(0,R.jsx)($,{label:"Status",value:E.CONTRACT_STATUS_DESCRIPTORS[s.status].label}),(0,R.jsx)($,{label:"Created",value:(0,j.formatIsoDateTime)(s.createdAt)}),(0,R.jsx)($,{label:"Updated",value:(0,j.formatIsoDateTime)(e.updatedAt)}),(0,R.jsx)($,{label:"Next billing",value:null==s.nextBillingDate?'\u2014':(0,j.formatIsoDateTime)(s.nextBillingDate)}),(0,R.jsx)($,{label:"Revision",value:e.revisionId}),(0,R.jsx)($,{label:"Payment method on file",value:(0,E.yesNo)(e.paymentMethodOnFile)}),(0,R.jsx)($,{label:"Customer email",value:e.customerEmail??'\u2014'}),(0,R.jsx)($,{label:"Origin order name",value:e.originOrder?.name??'\u2014'}),null!=c&&(0,R.jsx)($,{label:"Origin order credit",value:C.PAID_ORDER_CREDIT_STATUS_LABELS[c]})]})]})}function G({detail:e}){return(0,R.jsxs)(o.Card,{style:K.sectionCard,children:[(0,R.jsx)(l.default,{style:K.sectionTitle,children:"Subscription line"}),(0,R.jsxs)(n.default,{style:K.factGrid,children:[(0,R.jsx)($,{label:"Title",value:e.line.title}),(0,R.jsx)($,{label:"SKU",value:e.line.sku}),(0,R.jsx)($,{label:"Quantity",value:String(e.line.quantity)}),(0,R.jsx)($,{label:"Unit price",value:(0,O.formatMoney)(e.line.currentPrice.amount)})]}),(0,R.jsx)(l.default,{style:K.subsectionTitle,children:"Custom attributes"}),0===e.line.customAttributes.length?(0,R.jsx)(l.default,{style:K.mutedText,children:"No custom attributes."}):(0,R.jsx)(n.default,{style:K.attributeList,children:e.line.customAttributes.map(e=>(0,R.jsx)($,{label:e.key,value:e.value},e.key))})]})}function F({attempts:e,credited:t}){return 0===e.length?(0,R.jsx)(l.default,{style:K.mutedText,children:"No attempts"}):(0,R.jsx)(n.default,{style:K.attemptList,children:e.map(e=>(0,R.jsxs)(n.default,{style:K.attempt,children:[(0,R.jsx)(l.default,{style:K.attemptOutcome,children:E.BILLING_ATTEMPT_OUTCOME_LABELS[e.outcome]}),(0,R.jsxs)(l.default,{style:K.attemptMeta,children:["Created ",(0,j.formatIsoDateTime)(e.createdAt)]}),(0,R.jsxs)(l.default,{style:K.attemptMeta,children:["Completed ",(0,j.formatIsoDateTime)(e.completedAt,'\u2014')]}),(0,R.jsx)(W,{label:"Order",value:e.orderName}),(0,R.jsx)(X,{attempt:e,credited:t}),(0,R.jsx)(W,{label:"Error code",value:e.errorCode}),(0,R.jsx)(W,{label:"Error message",value:e.errorMessage}),(0,R.jsx)(W,{label:"Action status",value:e.actionStatus})]},e.id))})}function X({attempt:e,credited:t}){const n=(0,C.attemptCreditStatus)(e,t);return null==n?null:(0,R.jsxs)(l.default,{style:K.attemptMeta,testID:`subscription-attempt-credit-${e.id}`,children:["Credit: ",C.PAID_ORDER_CREDIT_STATUS_LABELS[n]]})}function W({label:e,value:t}){return null==t||''===t?null:(0,R.jsxs)(l.default,{style:K.attemptMeta,children:[e,": ",t]})}function Z({cycle:e,credited:t}){return(0,R.jsxs)(o.Card,{style:K.cycleCard,children:[(0,R.jsxs)(l.default,{style:K.subsectionTitle,children:["Cycle ",e.cycleIndex]}),(0,R.jsx)($,{label:"Start",value:(0,j.formatIsoDateTime)(e.cycleStartAt)}),(0,R.jsx)($,{label:"End",value:(0,j.formatIsoDateTime)(e.cycleEndAt)}),(0,R.jsx)($,{label:"Expected billing",value:(0,j.formatIsoDateTime)(e.billingAttemptExpectedDate)}),(0,R.jsx)($,{label:"Status",value:E.BILLING_CYCLE_STATUS_LABELS[e.status]}),(0,R.jsx)($,{label:"Skipped",value:(0,E.yesNo)(e.skipped)}),(0,R.jsx)($,{label:"Edited",value:(0,E.yesNo)(e.edited)}),(0,R.jsx)(F,{attempts:e.billingAttempts,credited:t})]})}function Y({label:e,value:t}){return(0,R.jsxs)(n.default,{style:K.metric,children:[(0,R.jsx)(l.default,{style:K.metricValue,children:t}),(0,R.jsx)(l.default,{style:K.metricLabel,children:e})]})}function $({label:e,value:t}){return(0,R.jsxs)(n.default,{style:K.factRow,children:[(0,R.jsx)(l.default,{style:K.factLabel,children:e}),(0,R.jsx)(l.default,{style:K.factValue,children:t})]})}function H({label:e,displayName:t,adminUrl:s}){return(0,R.jsxs)(n.default,{style:K.factRow,children:[(0,R.jsx)(l.default,{style:K.factLabel,children:e}),(0,R.jsx)(V,{displayName:t,adminUrl:s})]})}function V({displayName:e,adminUrl:t}){const n=null==t?null:(0,f.readExternalUrlLinkProps)(t);return null==n?(0,R.jsx)(l.default,{style:K.orderText,children:e}):(0,R.jsx)(f.ExternalLink,Object.assign({}
943,n,{inline:!0,accessibilityLabel:`Open Shopify order ${e}`,textStyle:K.orderLink,children:e}))}const K=(0,T.createStyles)({attributeList:{gap:p.SPACING.SM},attempt:{borderLeftColor:S.COLORS.BORDER_STRONG,borderLeftWidth:2,gap:p.SPACING.XS,paddingLeft:p.SPACING.SM},attemptList:{gap:p.SPACING.MD},attemptMeta:{color:S.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.XS},attemptOutcome:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'700'},backLink:{alignSelf:'flex-start'},backLinkText:{color:S.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.SM},container:{gap:p.SPACING.LG},cycleCard:{gap:p.SPACING.SM,marginBottom:p.SPACING.MD},factGrid:{gap:p.SPACING.SM},factLabel:{color:S.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.SM},factRow:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.MD,justifyContent:'space-between'},factValue:{color:S.COLORS.TEXT_PRIMARY,flexShrink:1,fontSize:x.FONT_SIZE.SM,textAlign:'right'},inlineLink:{color:S.COLORS.ACTION_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'600',textDecorationLine:'underline'},metric:{backgroundColor:S.COLORS.BG_WASH,borderRadius:8,flexBasis:150,flexGrow:1,padding:p.SPACING.MD},metricLabel:{color:S.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.XS,marginTop:p.SPACING.XS},metricValue:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.LG,fontWeight:'700'},metricsGrid:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.MD},mutedText:{color:S.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.SM},organizationLink:{color:S.COLORS.ACTION_PRIMARY,fontSize:x.FONT_SIZE.XL,fontWeight:'700',textDecorationLine:'underline'},organizationName:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.XL,fontWeight:'700'},orderLink:{color:S.COLORS.ACTION_PRIMARY,flexShrink:1,fontSize:x.FONT_SIZE.SM,textAlign:'right',textDecorationLine:'underline'},orderText:{color:S.COLORS.TEXT_PRIMARY,flexShrink:1,fontSize:x.FONT_SIZE.SM,textAlign:'right'},sectionCard:{gap:p.SPACING.LG},sectionHeading:{gap:p.SPACING.XS},sectionTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.XL,fontWeight:'700'},stateCard:{gap:p.SPACING.SM},stateDescription:{color:S.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.MD},stateTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.XL,fontWeight:'700'},subsectionTitle:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.MD,fontWeight:'700'},summaryHeader:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.MD,justifyContent:'space-between'},title:{color:S.COLORS.TEXT_PRIMARY,fontSize:x.FONT_SIZE.DISPLAY_SM,fontWeight:'700'},unresolved:{color:S.COLORS.TEXT_MUTED,fontStyle:'italic'}})},843,[34,95,222,276,516,605,512,681,519,522,490,493,494,557,561,489,685,722,836,844,838,842,839,104]);
944__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PAID_ORDER_CREDIT_STATUS_LABELS",{enumerable:!0,get:function(){return t}}),e.creditedOrderIds=o,e.attemptCreditStatus=c,e.originOrderCreditStatus=u,e.uncreditedPaidOrders=function(t){const n=o(t.credits),s=new Map;null!=t.originOrder&&'not-credited'===u(t.originOrder,n)&&s.set(t.originOrder.id,{orderId:t.originOrder.id,orderName:t.originOrder.name,source:'origin',paidAt:t.originOrder.createdAt});for(const o of t.billingCycles)for(const t of o.billingAttempts)null==t.orderId||s.has(t.orderId)||'not-credited'!==c(t,n)||s.set(t.orderId,{orderId:t.orderId,orderName:t.orderName,source:'renewal',paidAt:t.completedAt??t.createdAt});return[...s.values()].sort((t,o)=>Date.parse(o.paidAt)-Date.parse(t.paidAt))};const t={credited:'Credit recorded','not-credited':'No credit recorded'};function o(t){const o=new Set;for(const n of t)null!=n.shopifyOrderId&&o.add(n.shopifyOrderId);return o}function n(t,o){return o.has(t)?'credited':'not-credited'}function c(t,o){return'SUCCEEDED'!==t.outcome||null==t.orderId?null:n(t.orderId,o)}function u(t,o){return null==t?null:n(t.id,o)}},844,[]);
945__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AdminAuditLogsPanel=function(){const[e,l]=(0,t.useState)('sensors'),c=T[e].component,u=(0,t.useCallback)(e=>{_(e)&&l(e)},[]);return(0,f.jsxs)(n.default,{style:j.container,children:[(0,f.jsxs)(n.default,{children:[(0,f.jsx)(s.default,{style:j.title,children:"Audit Logs"}),(0,f.jsx)(s.default,{style:j.subtitle,children:"Review changes across administrative data sources."})]}),(0,f.jsx)(o.TabBar,{tabs:O,activeTab:e,onTabChange:u}),(0,f.jsx)(c,{})]})};var t=r(d[0]),s=e(r(d[1])),n=e(r(d[2])),o=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]),S=r(d[7]),b=r(d[8]),f=r(d[9]);const T={sensors:{component:b.SensorAuditLogSourcePanel,tab:{key:'sensors',label:'Sensors'}}},O=Object.values(T).map(({tab:e})=>e);function _(e){return Object.hasOwn(T,e)}const j=(0,S.createStyles)({container:{gap:c.SPACING.LG},subtitle:{color:l.COLORS.TEXT_MUTED,fontSize:u.FONT_SIZE.MD,marginTop:c.SPACING.XS},title:{color:l.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.XXL,fontWeight:'700'}})},845,[34,222,276,732,490,493,494,489,846,104]);
946__d(function(g,r,i,a,m,_e,d){"use strict";
946function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditLogSourcePanel=function(){const[e,T]=(0,t.useState)({}),[C,x]=(0,t.useState)(null),[y,I]=(0,t.useState)(new Set),[N,M]=(0,t.useState)(!0),[D,v]=(0,t.useState)(null),[B,P]=(0,t.useState)(null),U=(0,t.useRef)(e),G=null!==C&&C.filters===e?C:_,X=D===e,w=(0,t.useMemo)(()=>(0,A.groupSensorAuditEntriesByDay)(G.content),[G.content]);(0,t.useEffect)(()=>{let t=!0;return(async function(){try{const n=await c.adminAuditLogApi.listSensorEntries(e);t&&x(Object.assign({},n,{filters:e}))}catch(e){t&&P((0,O.errorMessage)(e,'Failed to load sensor audit entries.'))}finally{t&&M(!1)}})(),()=>{t=!1}},[e]);const H=(0,t.useCallback)(e=>{U.current=e,M(!0),P(null),I(new Set),T(e)},[]),F=(0,t.useCallback)(e=>{I(t=>{const n=new Set(t);return n.delete(e)||n.add(e),n})},[]),W=(0,t.useCallback)(e=>{I(t=>{const n=new Set(t);return n.delete(e),n})},[]),z=(0,t.useCallback)(async()=>{if(null===G.nextCursor||X)return;const t=e;v(t),P(null);try{const e=await c.adminAuditLogApi.listSensorEntries(Object.assign({},t,{cursor:G.nextCursor}));x(n=>null!==n&&n.filters===t?{content:[...n.content,...e.content],filters:t,nextCursor:e.nextCursor}:n)}catch(e){U.current===t&&P((0,O.errorMessage)(e,'Failed to load more sensor audit entries.'))}finally{v(e=>e===t?null:e)}},[e,X,G]);return(0,L.jsxs)(o.default,{style:j.sourcePanel,children:[(0,L.jsxs)(o.default,{children:[(0,L.jsx)(s.default,{style:j.sourceTitle,children:"Sensor changes"}),(0,L.jsx)(s.default,{style:j.sourceDescription,children:"Registration, management, and archive events recorded in the sensor audit table. Times are UTC. Select a row for its before and after values."})]}),(0,L.jsx)(h.SensorAuditFilterToolbar,{appliedAction:e.action,entries:G.content,onApply:H}),null!==B&&(0,L.jsx)(s.default,{style:j.errorText,children:B}),N?(0,L.jsxs)(o.default,{style:j.loadingState,children:[(0,L.jsx)(n.default,{color:S.COLORS.BRAND_PRIMARY}),(0,L.jsx)(s.default,{style:j.mutedText,children:"Loading audit entries..."})]}):(0,L.jsxs)(o.default,{style:j.workspace,children:[(0,L.jsxs)(u.ResponsiveTable,{compactContent:G.content.map(e=>(0,L.jsx)(R.SensorAuditEntryCard,{entry:e},e.id)),minWidth:b.SENSOR_AUDIT_TABLE_MIN_WIDTH,testID:"sensor-audit-table",children:[(0,L.jsxs)(u.ResponsiveTableHeader,{children:[(0,L.jsx)(u.ResponsiveTableCell,{style:b.SENSOR_AUDIT_TABLE_COLUMNS.time,children:(0,L.jsx)(u.ResponsiveTableHeaderText,{children:"UTC"})}),(0,L.jsx)(u.ResponsiveTableCell,{style:b.SENSOR_AUDIT_TABLE_COLUMNS.action,children:(0,L.jsx)(u.ResponsiveTableHeaderText,{children:"Action"})}),(0,L.jsx)(u.ResponsiveTableCell,{style:b.SENSOR_AUDIT_TABLE_COLUMNS.sensor,children:(0,L.jsx)(u.ResponsiveTableHeaderText,{children:"Sensor"})}),(0,L.jsx)(u.ResponsiveTableCell,{style:b.SENSOR_AUDIT_TABLE_COLUMNS.actor,children:(0,L.jsx)(u.ResponsiveTableHeaderText,{children:"Actor"})}),(0,L.jsx)(u.ResponsiveTableCell,{style:b.SENSOR_AUDIT_TABLE_COLUMNS.fields,children:(0,L.jsx)(u.ResponsiveTableHeaderText,{children:"Changed fields"})})]}),w.map((e,n)=>(0,L.jsxs)(t.Fragment,{children:[(0,L.jsx)(E,{dayKey:e.dayKey,isoDate:e.entries[0]?.createdAt??'',count:e.entries.length,partial:null!==G.nextCursor&&n===w.length-1}),e.entries.map(e=>(0,L.jsxs)(t.Fragment,{children:[(0,L.jsx)(f.SensorAuditEntryRow,{entry:e,expanded:y.has(e.id),onToggle:F}),y.has(e.id)&&(0,L.jsx)(p.SensorAuditRowDetail,{entry:e,onCollapse:W})]},e.id))]},e.id))]}),0===G.content.length&&null===B&&(0,L.jsx)(s.default,{style:j.emptyText,children:"No sensor audit entries match these filters."}),null!==G.nextCursor&&(0,L.jsx)(l.default,{accessibilityLabel:"Load more audit entries",accessibilityRole:"button",accessibilityState:{disabled:X},disabled:X,onPress:()=>{z()},style:j.loadMoreButton,children:(0,L.jsx)(s.default,{style:j.loadMoreButtonText,children:X?'Loading...':'Load more'})})]})]})};var t=r(d[0]),n=e(r(d[1])),s=e(r(d[2])),l=e(r(d[3])),o=e(r(d[4])),c=r(d[5]),u=r(d[6]),S=r(d[7]),T=r(d[8]),C=r(d[9]),x=r(d[10]),y=r(d[11]),O=r(d[12]),R=r(d[13]),f=r(d[14]),h=r(d[15]),A=r(d[16]),p=r(d[17]),b=r(d[18]),L=r(
946d[19]);const _={content:[],nextCursor:null};function E({dayKey:e,isoDate:t,count:n,partial:l}){const c=1===n?'1 event':`${String(n)} events`;return(0,L.jsxs)(o.default,{style:j.dayBand,testID:`audit-day-${e}`,children:[(0,L.jsx)(s.default,{style:j.dayLabel,children:(0,y.formatUtcDayLabel)(t)}),(0,L.jsx)(s.default,{style:j.dayCount,children:l?`${c} loaded so far`:c})]})}const j=(0,x.createStyles)({dayBand:{alignItems:'baseline',backgroundColor:S.COLORS.BG_WASH,borderBottomColor:S.COLORS.BORDER,borderBottomWidth:1,borderTopColor:S.COLORS.BORDER,borderTopWidth:1,flexDirection:'row',gap:T.SPACING.MD,paddingHorizontal:T.SPACING.MD,paddingVertical:T.SPACING.XS,width:'100%'},dayCount:{color:S.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.MICRO},dayLabel:{color:S.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.XS,fontWeight:'700'},emptyText:{color:S.COLORS.TEXT_MUTED,paddingVertical:T.SPACING.XXL,textAlign:'center'},errorText:{color:S.COLORS.ERROR,fontSize:C.FONT_SIZE.SM},loadMoreButton:{alignSelf:'center',borderColor:S.COLORS.ACTION_PRIMARY,borderRadius:6,borderWidth:1,paddingHorizontal:T.SPACING.XL,paddingVertical:T.SPACING.SM},loadMoreButtonText:{color:S.COLORS.ACTION_PRIMARY,fontWeight:'700'},loadingState:{alignItems:'center',gap:T.SPACING.SM,paddingVertical:T.SPACING.XXL},mutedText:{color:S.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.SM},sourceDescription:{color:S.COLORS.TEXT_MUTED,fontSize:C.FONT_SIZE.MD,marginTop:T.SPACING.XS},sourcePanel:{gap:T.SPACING.LG},sourceTitle:{color:S.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.XL,fontWeight:'700'},workspace:{gap:T.SPACING.LG}})},846,[34,410,222,488,276,847,687,490,493,494,489,685,468,848,853,855,860,862,854,104]);
947__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"adminAuditLogApi",{enumerable:!0,get:function(){return o}});var t=r(d[0]);const o={async listSensorEntries(o={}){const u=s(o.sensor),c=s(o.fromDate),f=s(o.throughDate),b=s(o.label),v=void 0===u?{}:n(u);return t.admin.listSensorAuditLog({query:Object.assign({},v,void 0!==o.action&&{action:o.action},void 0!==c&&{fromDate:c},void 0!==f&&{throughDate:f},void 0!==b&&{label:b},void 0!==o.cursor&&{beforeOccurredAt:o.cursor.occurredAt,beforeEntryId:o.cursor.entryId},void 0!==o.size&&{size:o.size})})}};function n(t){if(!/^\d+$/.test(t))return{sensorMac:t};const o=Number(t);if(!Number.isSafeInteger(o)||o<=0)throw new Error('Sensor ID is outside the supported range');return{sensorId:o}}function s(t){const o=t?.trim();return''===o?void 0:o}},847,[471]);
948__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditEntryCard=function({entry:e}){const[u,y]=(0,t.useState)(!1),T=C.SENSOR_AUDIT_ACTION_PRESENTATIONS[e.action],f=(0,C.sensorAuditActorDisplay)(e),E=(0,C.sensorAuditSensorLabel)(e),N=(0,t.useCallback)(()=>{y(e=>!e)},[]);return(0,h.jsxs)(c.Card,{style:A.entryCard,testID:`audit-entry-${e.id}`,children:[(0,h.jsxs)(s.default,{style:A.entryHeader,children:[(0,h.jsxs)(s.default,{style:A.actionRow,children:[(0,h.jsx)(s.default,{style:[A.actionTick,{backgroundColor:T.color}]}),(0,h.jsx)(n.default,{style:A.actionText,children:T.label})]}),(0,h.jsx)(n.default,{style:A.entryDate,children:(0,O.formatUtcDateTime)(e.createdAt)})]}),(0,h.jsxs)(s.default,{style:A.subjectIdentity,children:[null===e.sensorId?(0,h.jsx)(n.default,{style:A.subjectLabel,children:E}):(0,h.jsx)(o.AppLink,{to:"SensorManagement",href:(0,S.buildSensorManagementDetailPath)(e.sensorId),inline:!0,accessibilityLabel:`Open sensor ${e.sensorId} in Sensor Management`,textStyle:A.subjectLink,children:E}),(0,h.jsx)(n.default,{selectable:!0,style:A.subjectMetadata,children:e.sensorMac})]}),(0,h.jsx)(n.default,{style:A.actorText,children:f}),(0,h.jsx)(n.default,{style:A.changeSummary,testID:`audit-card-summary-${e.id}`,children:(0,I.auditChangeSummary)(e.changeDetailAvailability,e.changes.length)}),(0,h.jsx)(l.default,{accessibilityLabel:`${u?'Collapse':'Expand'} audit entry ${e.id}`,accessibilityState:{expanded:u},onPress:N,style:A.expandButton,children:(0,h.jsx)(n.default,{style:A.expandButtonText,children:u?'Hide details':'Show details'})}),u&&(0,h.jsx)(s.default,{style:A.entryDetails,children:(0,h.jsx)(x.SensorAuditEntryDetail,{entry:e})})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),s=e(r(d[3])),o=r(d[4]),c=r(d[5]),S=r(d[6]),u=r(d[7]),y=r(d[8]),T=r(d[9]),f=r(d[10]),I=r(d[11]),O=r(d[12]),x=r(d[13]),C=r(d[14]),h=r(d[15]);const A=(0,f.createStyles)({actionRow:{alignItems:'center',flexDirection:'row',gap:y.SPACING.SM},actionText:{color:u.COLORS.TEXT_HEADING,fontSize:T.FONT_SIZE.SM,fontWeight:'700'},actionTick:{borderRadius:2,height:16,width:4},actorText:{color:u.COLORS.TEXT_BODY,fontSize:T.FONT_SIZE.SM,marginTop:y.SPACING.SM},changeSummary:{color:u.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.XS,marginTop:y.SPACING.SM},entryCard:{gap:y.SPACING.XS},entryDate:{color:u.COLORS.TEXT_MUTED,fontSize:T.FONT_SIZE.XS},entryDetails:{marginTop:y.SPACING.MD},entryHeader:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:y.SPACING.SM,justifyContent:'space-between'}
948,expandButton:{alignSelf:'flex-start',paddingVertical:y.SPACING.SM},expandButtonText:{color:u.COLORS.ACTION_PRIMARY,fontSize:T.FONT_SIZE.SM,fontWeight:'600'},subjectIdentity:{gap:y.SPACING.MICRO,marginTop:y.SPACING.SM},subjectLabel:{color:u.COLORS.TEXT_HEADING,fontSize:T.FONT_SIZE.LG,fontWeight:'700'},subjectLink:{color:u.COLORS.ACTION_PRIMARY,fontSize:T.FONT_SIZE.LG,fontWeight:'700'},subjectMetadata:{color:u.COLORS.TEXT_MUTED,fontFamily:T.FONT_FAMILY.WEB_MONOSPACE,fontSize:T.FONT_SIZE.XS}})},848,[34,222,488,276,516,605,518,490,493,494,489,849,685,850,852,104]);
949__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.auditChangeDetailExplanation=function(t){return n[t]},e.auditChangeDetailShortLabel=function(n){return t[n]},e.auditChangeSummary=function(n,t){const h=u[n];if(null!==h)return h;return 1===t?'1 field changed':`${String(t)} fields changed`};const n={NOT_RECORDED:"The change detail for this entry was never recorded: the server could not serialize it when the event was written. Who acted, when, and under what authority is unaffected.",RECORDED:null,UNREADABLE:"The stored change detail for this entry could not be read, so which fields changed is unknown. Who acted, when, and under what authority is unaffected."},t={NOT_RECORDED:'unrecorded',RECORDED:null,UNREADABLE:'unreadable'},u={NOT_RECORDED:'Change detail was never recorded',RECORDED:null,UNREADABLE:'Change detail could not be read'}},849,[]);
950__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditEntryDetail=function({entry:e}){const n=(0,f.groupSensorAuditChanges)(e.changes),o=(0,c.auditChangeDetailExplanation)(e.changeDetailAvailability),s=n.length>1;return(0,h.jsxs)(l.default,{style:A.detail,children:[(0,h.jsxs)(l.default,{style:A.attribution,children:[(0,h.jsx)(I,{label:"Actor classification",value:e.actorClassification}),(0,h.jsx)(I,{label:"Authenticated role",value:e.authenticatedPrincipalRole}),(0,h.jsx)(I,{label:"Authentication",value:e.requestAuthenticationMechanism}),(0,h.jsx)(I,{label:"Authorization",value:(0,S.authorizationBasisLabel)(e.requestAuthorizationBasis)})]}),null!==o&&(0,h.jsx)(t.default,{style:A.changeDetailLoss,testID:"audit-change-detail-loss",children:o}),(0,h.jsx)(l.default,{style:A.groups,children:n.map(n=>(0,h.jsxs)(l.default,{style:A.group,testID:`audit-group-${n.id}`,children:[s&&(0,h.jsx)(t.default,{style:A.groupTitle,children:n.title}),n.changes.map(t=>(0,h.jsx)(C,{change:t},`${e.id}:${t.field}`))]},n.id))})]})},r(d[0]),r(d[1]);var t=e(r(d[2])),l=e(r(d[3])),n=r(d[4]),o=r(d[5]),s=r(d[6]),u=r(d[7]),c=r(d[8]),f=r(d[9]),S=r(d[10]),h=r(d[11]);const O={wordBreak:'break-word'};function C({change:e}){const n=(0,f.sensorAuditChangeKind)(e),o='set'===n?null:e.oldValue,s='cleared'===n?null:e.newValue,u=e.redacted?A.withheld:A.removed,c=e.redacted?A.withheld:A.added;return(0,h.jsxs)(l.default,Object.assign({style:A.change},e.redacted?{testID:`audit-redacted-${e.field}`}:{},{children:[(0,h.jsx)(t.default,{selectable:!0,style:A.changeField,children:e.field}),null!=o&&(0,h.jsx)(x,{marker:"-",style:u,testID:`audit-removed-${e.field}`,value:o}),null!=s&&(0,h.jsx)(x,{marker:"+",style:c,testID:`audit-added-${e.field}`,value:s})]}))}function x({marker:e,style:n,testID:o,value:s}){const u=O;return(0,h.jsxs)(l.default,{style:A.diffLine,testID:o,children:[(0,h.jsx)(t.default,{style:[A.marker,n],children:e}),(0,h.jsx)(t.default,{selectable:!0,style:[A.value,n,u],children:s})]})}function I({label:e,value:n}){return(0,h.jsxs)(l.default,{style:A.metadataItem,children:[(0,h.jsx)(t.default,{style:A.metadataLabel,children:e}),(0,h.jsx)(t.default,{selectable:!0,style:A.metadataValue,children:n})]})}const A=(0,u.createStyles)({added:{color:n.COLORS.SUCCESS_DARK},attribution:{flexDirection:'row',flexWrap:'wrap',gap:o.SPACING.MD},change:{gap:o.SPACING.MICRO},changeField:{color:n.COLORS.TEXT_MUTED,fontSize:s.FONT_SIZE.MICRO},detail:{gap:o.SPACING.LG},diffLine:{alignItems:'baseline',flexDirection:'row',gap:o.SPACING.XS},group:{flexBasis:230,flexGrow:1,gap:o.SPACING.SM,maxWidth:400,minWidth:190},groupTitle:{borderBottomColor:n.COLORS.BORDER,borderBottomWidth:1,color:n.COLORS.TEXT_HEADING,fontSize:s.FONT_SIZE.XS,fontWeight:'700',paddingBottom:o.SPACING.XS},groups:{flexDirection:'row',flexWrap:'wrap',gap:o.SPACING.XL}
950,marker:{fontFamily:s.FONT_FAMILY.WEB_MONOSPACE,fontSize:s.FONT_SIZE.SM,width:8},metadataItem:{flexBasis:180,flexGrow:1,gap:o.SPACING.MICRO},metadataLabel:{color:n.COLORS.TEXT_MUTED,fontSize:s.FONT_SIZE.MICRO,textTransform:'uppercase'},metadataValue:{color:n.COLORS.TEXT_BODY,fontSize:s.FONT_SIZE.SM},removed:{color:n.COLORS.ERROR_DARK},value:{color:n.COLORS.TEXT_BODY,flexShrink:1,fontFamily:s.FONT_FAMILY.WEB_MONOSPACE,fontSize:s.FONT_SIZE.SM},changeDetailLoss:{backgroundColor:n.COLORS.BG_WASH,borderLeftColor:n.COLORS.WARNING,borderLeftWidth:3,color:n.COLORS.TEXT_BODY,fontSize:s.FONT_SIZE.SM,padding:o.SPACING.SM},withheld:{color:n.COLORS.TEXT_PLACEHOLDER,fontStyle:'italic'}})},850,[34,95,222,276,490,493,494,489,849,851,852,104]);
951__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sensorAuditChangeKind=s,e.groupSensorAuditChanges=function(t){const o=[];for(const l of n){const n=t.filter(n=>l.fields.includes(n.field));n.length>0&&o.push({changes:c(n),id:l.id,title:l.title})}const s=new Set(n.flatMap(n=>n.fields)),f=t.filter(n=>!s.has(n.field));f.length>0&&o.push(Object.assign({changes:f},l));return o};const n=[{fields:['label','hidden','locationType','lat','lon','elevation','locationVerification'],id:'placement',title:'Identity & location'},{fields:['owner','ownerName','ownerPhone'],id:'ownership',title:'Ownership'},{fields:['brightness','ledMode','firmwareVersion','firmwareVersion2mb','downgraded','deviceLoggingRate'],id:'device',title:'Device'},{fields:['key3','key4','method','shareKeys'],id:'channels',title:'Data channels'},{fields:['mac','archivedSensorIndex','replacementSensorIndex','replacementMac','archivedRows','createdRows'],id:'lifecycle',title:'Lifecycle'}],l={id:'other',title:'Other'},t=[{fields:['lat','lon'],label:'lat, lon'}],o=', ';function s(n){const l=null!==n.oldValue&&''!==n.oldValue,t=null!==n.newValue&&''!==n.newValue;return l?t?'changed':'cleared':'set'}function c(n){const l=[],o=new Set;for(const s of n){if(o.has(s.field))continue;const c=t.find(n=>n.fields.includes(s.field)),h=void 0===c?null:f(n,c.fields);if(void 0!==c&&null!==h){l.push({field:c.label,newValue:u(h.map(n=>n.newValue)),oldValue:u(h.map(n=>n.oldValue)),redacted:h.some(n=>n.redacted)});for(const n of c.fields)o.add(n)}else l.push(s)}return l}function f(n,l){const t=[];for(const o of l){const l=n.find(n=>n.field===o);if(void 0===l)return null;t.push(l)}const[o]=t;if(void 0===o)return null;const c=s(o);return t.every(n=>s(n)===c)?t:null}function u(n){return n.every(n=>null==n||''===n)?null:n.map(n=>n??'').join(o)}},851,[]);
952__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SENSOR_AUDIT_ACTION_PRESENTATIONS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"SENSOR_AUDIT_ACTION_ORDER",{enumerable:!0,get:function(){return t}}),e.sensorAuditActorDisplay=function(n){return n.actorIdentifier??n.actorClassification},e.sensorAuditSensorLabel=function(n){return n.currentLabel??'Unlabeled sensor'},e.authorizationBasisLabel=function(n){return E[n]??n},e.countSensorAuditActions=function(n){const o={ARCHIVE:0,MANAGEMENT:0,MODIFY:0,REGISTER:0};for(const t of n)o[t.action]+=1;return o};var n=r(d[0]);const o={ARCHIVE:{color:n.COLORS.WARNING,label:'Archive'},MANAGEMENT:{color:n.COLORS.INFO,label:'Management'},MODIFY:{color:n.COLORS.BLUE,label:'Modification'},REGISTER:{color:n.COLORS.SUCCESS,label:'Registration'}},t=['REGISTER','MODIFY','MANAGEMENT','ARCHIVE'];const E={API_TOKEN_SENSOR_OWNER:'API token sensor owner',JWT_AUTHENTICATED_SENSOR_OWNER:'JWT sensor owner',JWT_INTERACTIVE_ADMIN_PRIVILEGES:'JWT interactive admin privileges',MODIFY_REGISTRATION_TOKEN_SENSOR_OWNER:'Modify-registration token sensor owner',REGISTRATION_OWNER_EMAIL_AFTER_STAGE_ASSOCIATION_PROOF:'Owner email after association proof',SYSTEM_PROCESS:'System process',UNOWNED_SENSOR_STAGE_ASSOCIATION_PROOF:'Association proof on unowned sensor'}},852,[490]);
953__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}
953Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditEntryRow=function({entry:e,expanded:T,onToggle:O}){const _=E.SENSOR_AUDIT_ACTION_PRESENTATIONS[e.action],f=(0,E.sensorAuditActorDisplay)(e),h=(0,E.sensorAuditSensorLabel)(e),b=(0,C.auditChangeDetailShortLabel)(e.changeDetailAvailability),u=e.changes.slice(0,L),A=e.changes.length-u.length,y=(0,l.useCallback)(()=>{O(e.id)},[e.id,O]);return(0,x.jsx)(s.default,{accessibilityLabel:`Show audit entry ${e.id} details`,accessibilityRole:"button",accessibilityState:{expanded:T},onPress:y,style:N.pressable,testID:`audit-row-${e.id}`,children:(0,x.jsxs)(S.ResponsiveTableRow,{style:T?N.expandedRow:void 0,children:[(0,x.jsx)(S.ResponsiveTableCell,{style:I.SENSOR_AUDIT_TABLE_COLUMNS.time,children:(0,x.jsx)(S.ResponsiveTableText,{style:N.timeText,children:(0,R.formatUtcTimeOfDay)(e.createdAt)})}),(0,x.jsx)(S.ResponsiveTableCell,{style:I.SENSOR_AUDIT_TABLE_COLUMNS.action,children:(0,x.jsxs)(n.default,{style:N.actionCell,children:[(0,x.jsx)(n.default,{style:[N.actionTick,{backgroundColor:_.color}]}),(0,x.jsx)(S.ResponsiveTableText,{style:N.actionText,children:_.label})]})}),(0,x.jsxs)(S.ResponsiveTableCell,{style:I.SENSOR_AUDIT_TABLE_COLUMNS.sensor,children:[null===e.sensorId?(0,x.jsx)(S.ResponsiveTableText,{style:N.sensorLabel,numberOfLines:1,children:h}):(0,x.jsx)(o.AppLink,{to:"SensorManagement",href:(0,c.buildSensorManagementDetailPath)(e.sensorId),inline:!0,accessibilityLabel:`Open sensor ${e.sensorId} in Sensor Management`,textStyle:N.sensorLink,children:h}),(0,x.jsx)(S.ResponsiveTableText,{style:N.macText,numberOfLines:1,children:e.sensorMac})]}),(0,x.jsx)(S.ResponsiveTableCell,{style:I.SENSOR_AUDIT_TABLE_COLUMNS.actor,children:(0,x.jsx)(S.ResponsiveTableText,{style:N.actorText,numberOfLines:1,ellipsizeMode:"middle",children:f})}),(0,x.jsx)(S.ResponsiveTableCell,{style:I.SENSOR_AUDIT_TABLE_COLUMNS.fields,children:(0,x.jsx)(n.default,{style:N.fieldList,children:null!==b?(0,x.jsx)(t.default,{style:N.fieldDetailLoss,testID:`audit-row-change-detail-loss-${e.id}`,children:b}):(0,x.jsxs)(x.Fragment,{children:[u.map(l=>(0,x.jsx)(t.default,{style:N.fieldChip,children:l.field},`${e.id}:${l.field}`)),A>0&&(0,x.jsx)(t.default,{style:N.fieldOverflow,children:`+${String(A)}`})]})})})]})})};var l=r(d[0]),t=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),o=r(d[4]),c=r(d[5]),S=r(d[6]),T=r(d[7]),O=r(d[8]),_=r(d[9]),f=r(d[10]),C=r(d[11]),R=r(d[12]),E=r(d[13]),I=r(d[14]),x=r(d[15]);const L=3;const N=(0,f.createStyles)({actionCell:{alignItems:'center',flexDirection:'row',gap:O.SPACING.SM},actionText:{color:T.COLORS.TEXT_BODY,fontSize:_.FONT_SIZE.SM},actionTick:{borderRadius:2,height:16,width:4},actorText:{color:T.COLORS.TEXT_BODY,fontSize:_.FONT_SIZE.SM},fieldDetailLoss:{color:T.COLORS.WARNING,fontSize:_.FONT_SIZE.MICRO,fontStyle:'italic'},fieldChip:{backgroundColor:T.COLORS.BG_CHIP,borderRadius:4,color:T.COLORS.TEXT_BODY,fontFamily:_.FONT_FAMILY.WEB_MONOSPACE,fontSize:_.FONT_SIZE.MICRO,paddingHorizontal:O.SPACING.SM,paddingVertical:O.SPACING.MICRO},fieldList:{flexDirection:'row',flexWrap:'wrap',gap:O.SPACING.XS},fieldOverflow:{color:T.COLORS.TEXT_MUTED,fontSize:_.FONT_SIZE.MICRO,paddingVertical:O.SPACING.MICRO},macText:{color:T.COLORS.TEXT_MUTED,fontFamily:_.FONT_FAMILY.WEB_MONOSPACE,fontSize:_.FONT_SIZE.MICRO},pressable:{width:'100%'},expandedRow:{backgroundColor:T.COLORS.BRAND_BG_SELECTED},sensorLabel:{color:T.COLORS.TEXT_HEADING,fontSize:_.FONT_SIZE.SM,fontWeight:'600'},sensorLink:{color:T.COLORS.ACTION_PRIMARY,fontSize:_.FONT_SIZE.SM,fontWeight:'600'},timeText:{color:T.COLORS.TEXT_MUTED,fontFamily:_.FONT_FAMILY.WEB_MONOSPACE,fontSize:_.FONT_SIZE.XS}})},853,[34,222,488,276,516,518,687,490,493,494,489,849,685,852,854,104]);
954__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SENSOR_AUDIT_TABLE_MIN_WIDTH",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"SENSOR_AUDIT_TABLE_COLUMNS",{enumerable:!0,get:function(){return n}});const t=940,n={action:{flexBasis:124,flexGrow:0,minWidth:124},actor:{flexBasis:190,flexGrow:1,minWidth:190},fields:{flexBasis:250,flexGrow:3,minWidth:250},sensor:{flexBasis:230,flexGrow:2,minWidth:230},time:{flexBasis:62,flexGrow:0,minWidth:62}}},854,[]);
955__d(function(g,r,i,a,m,_e,d){"use strict";
955function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditFilterToolbar=function({appliedAction:e,entries:c,onApply:f}){const[C,A]=(0,t.useState)(''),[T,I]=(0,t.useState)(''),[L,E]=(0,t.useState)(''),[j,B]=(0,t.useState)(''),[P,_]=(0,t.useState)(),[N,F]=(0,t.useState)(null),[G,M]=(0,t.useState)(()=>(0,S.utcCalendarDay)(new Date)),H=(0,t.useCallback)(()=>{const e={action:P,fromDate:L,label:T,sensor:C,throughDate:j},t=(0,O.sensorAuditFilterError)(e);F(t),null===t&&f((0,O.buildSensorAuditFilters)(e))},[P,L,T,f,C,j]),v=(0,t.useCallback)(()=>{F(null),A(''),I(''),E(''),B(''),_(void 0),f({})},[f]),z=(0,t.useCallback)(e=>{const t=(0,S.utcCalendarDay)(new Date);M(t);const l=(0,y.deriveSensorAuditDateRange)(e,t);E(l.from),B(l.through)},[]);return(0,x.jsxs)(s.default,{style:R.toolbar,children:[(0,x.jsxs)(s.default,{style:R.filterFields,children:[(0,x.jsx)(D,{label:"Sensor ID or MAC",children:(0,x.jsx)(o.default,{accessibilityLabel:"Sensor ID or MAC",autoCapitalize:"none",onChangeText:A,placeholder:"1234 or aa:bb:cc:dd:ee:ff",placeholderTextColor:u.COLORS.TEXT_PLACEHOLDER,style:R.filterInput,testID:"audit-sensor-filter",value:C})}),(0,x.jsx)(D,{label:"Current or historical label",children:(0,x.jsx)(o.default,{accessibilityLabel:"Current or historical label",autoCapitalize:"none",onChangeText:I,placeholder:"Porch",placeholderTextColor:u.COLORS.TEXT_PLACEHOLDER,style:R.filterInput,testID:"audit-label-filter",value:T})}),(0,x.jsx)(D,{label:"From date (UTC)",children:(0,x.jsx)(b.AdminDateInput,{accessibilityLabel:"From date (UTC)",disabled:!1,onChange:E,testID:"audit-from-date-filter",value:L})}),(0,x.jsx)(D,{label:"Through date (UTC)",children:(0,x.jsx)(b.AdminDateInput,{accessibilityLabel:"Through date (UTC)",disabled:!1,onChange:B,testID:"audit-through-date-filter",value:j})}),(0,x.jsxs)(s.default,{style:R.filterActions,children:[(0,x.jsx)(n.default,{accessibilityLabel:"Apply audit filters",accessibilityRole:"button",onPress:H,style:R.primaryButton,children:(0,x.jsx)(l.default,{style:R.primaryButtonText,children:"Apply filters"})}),(0,x.jsx)(n.default,{accessibilityLabel:"Clear audit filters",accessibilityRole:"button",onPress:v,style:R.secondaryButton,children:(0,x.jsx)(l.default,{style:R.secondaryButtonText,children:"Clear"})})]})]}),null!==N&&(0,x.jsx)(l.default,{style:R.filterError,testID:"audit-filter-error",children:N}),(0,x.jsx)(p.SensorAuditDateRangePresets,{fromDate:L,onSelect:z,throughDate:j,today:G}),(0,x.jsx)(h.SensorAuditActionFilters,{appliedAction:e,entries:c,onSelect:_,selected:P})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),u=r(d[5]),c=r(d[6]),f=r(d[7]),C=r(d[8]),S=r(d[9]),b=r(d[10]),h=r(d[11]),y=r(d[12]),p=r(d[13]),O=r(d[14]),x=r(d[15]);function D({children:e,label:t}){return(0,x.jsxs)(s.default,{style:R.filterField,children:[(0,x.jsx)(l.default,{style:R.filterLabel,children:t}),e]})}const R=(0,C.createStyles)({filterActions:{alignSelf:'flex-end',flexDirection:'row',gap:c.SPACING.SM},filterField:{flexBasis:180,flexGrow:1,gap:c.SPACING.XS},filterError:{color:u.COLORS.ERROR,fontSize:f.FONT_SIZE.SM},filterFields:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.MD},filterInput:{backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER,borderRadius:8,borderWidth:1,color:u.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.MD,minHeight:44,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.SM},filterLabel:{color:u.COLORS.TEXT_HEADING,fontSize:f.FONT_SIZE.XS,fontWeight:'600'},primaryButton:{backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:6,minHeight:44,justifyContent:'center',paddingHorizontal:c.SPACING.LG},primaryButtonText:{color:u.COLORS.TEXT_INVERSE,fontWeight:'700'},secondaryButton:{borderColor:u.COLORS.BORDER,borderRadius:6,borderWidth:1,justifyContent:'center',minHeight:44,paddingHorizontal:c.SPACING.LG},secondaryButtonText:{color:u.COLORS.TEXT_BODY,fontWeight:'600'},toolbar:{borderBottomColor:u.COLORS.BORDER,borderBottomWidth:1,gap:c.SPACING.MD,paddingBottom:c.SPACING.MD}})},855,[34,222,394,488,276,490,493,494,489,773,821,856,857,858,859,104]);
956__d(function(g,r,i,a,m,_e,d){"use strict";
956function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditActionFilters=function({appliedAction:e,entries:c,onSelect:n,selected:s}){const S=(0,u.countSensorAuditActions)(c),x=c.length;return(0,h.jsxs)(o.default,{style:A.filters,children:[(0,h.jsx)(o.default,{style:A.chips,children:f.map(c=>{const f='ALL'===c,C=f?void 0:c,T=f?p:u.SENSOR_AUDIT_ACTION_PRESENTATIONS[c].label,_=O({action:C,appliedAction:e,counts:S,total:x}),b=C===s;return(0,h.jsxs)(l.default,{accessibilityLabel:`Filter by ${T}`,accessibilityRole:"button",accessibilityState:{selected:b},onPress:()=>{n(C)},style:[A.chip,b&&A.chipSelected],testID:`audit-action-filter-${c}`,children:[(0,h.jsxs)(o.default,{style:A.chipHeader,children:[(0,h.jsx)(t.default,{style:[A.chipLabel,b&&A.chipTextSelected],children:T}),null!==_&&(0,h.jsx)(t.default,{style:[A.chipCount,b&&A.chipTextSelected],testID:"audit-action-count",children:String(_)})]}),null!==_&&!f&&(0,h.jsx)(R,{action:c,share:0===x?0:Math.round(_/x*100)})]},c)})}),(0,h.jsx)(t.default,{style:A.caveat,children:"Counts cover the entries loaded so far, not the whole audit table."})]})},r(d[0]);var t=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),c=r(d[4]),n=r(d[5]),s=r(d[6]),S=r(d[7]),u=r(d[8]),h=r(d[9]);const f=['ALL',...u.SENSOR_AUDIT_ACTION_ORDER],p='All actions';function O({action:e,appliedAction:t,counts:l,total:o}){return void 0!==t&&e!==t?null:void 0===e?o:l[e]}function R({action:e,share:t}){return(0,h.jsxs)(o.default,{style:A.track,children:[(0,h.jsx)(o.default,{style:[A.bar,{backgroundColor:u.SENSOR_AUDIT_ACTION_PRESENTATIONS[e].color,flexGrow:t}]}),(0,h.jsx)(o.default,{style:[A.trackRemainder,{flexGrow:100-t}]})]})}const A=(0,S.createStyles)({bar:{borderRadius:2,flexBasis:0,height:'100%'},caveat:{color:c.COLORS.TEXT_MUTED,fontSize:s.FONT_SIZE.XS},chip:{borderColor:c.COLORS.BORDER,borderRadius:6,borderWidth:1,flexBasis:150,flexGrow:1,gap:n.SPACING.XS,maxWidth:240,paddingHorizontal:n.SPACING.MD,paddingVertical:n.SPACING.XS},chipCount:{color:c.COLORS.TEXT_HEADING,fontSize:s.FONT_SIZE.SM,fontWeight:'700'},chipHeader:{alignItems:'baseline',flexDirection:'row',gap:n.SPACING.SM,justifyContent:'space-between'},chipLabel:{color:c.COLORS.TEXT_BODY,flexShrink:1,fontSize:s.FONT_SIZE.SM},chipSelected:{backgroundColor:c.COLORS.BRAND_PRIMARY,borderColor:c.COLORS.BRAND_PRIMARY},chipTextSelected:{color:c.COLORS.TEXT_INVERSE,fontWeight:'700'},chips:{flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.SM},filters:{gap:n.SPACING.XS},track:{backgroundColor:c.COLORS.BG_SUBTLE,borderRadius:2,flexDirection:'row',height:4,overflow:'hidden'},trackRemainder:{flexBasis:0}})},856,[34,222,488,276,490,493,494,489,852,104]);
957__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SENSOR_AUDIT_DATE_PRESETS",{enumerable:!0,get:function(){return o}}),e.deriveSensorAuditDateRange=s,e.matchSensorAuditDatePreset=function(t,n,l){if(''===t||''===n)return null;return o.find(o=>{const u=s(o.id,l);return u.from===t&&u.through===n})?.id??null};var t=r(d[0]);const n={today:n=>(0,t.lastUtcDaysRange)(1,n),last7:n=>(0,t.lastUtcDaysRange)(7,n),last30:n=>(0,t.lastUtcDaysRange)(30,n),monthToDate:t.monthToDateUtcRange},o=[{id:'today',label:'Today'},{id:'last7',label:'Last 7 days'},{id:'last30',label:'Last 30 days'},{id:'monthToDate',label:'This month'}];function s(t,o){return n[t](o)}},857,[774]);
958__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditDateRangePresets=function({fromDate:e,onSelect:c,throughDate:n,today:s}){const S=(0,u.matchSensorAuditDatePreset)(e,n,s);return(0,R.jsxs)(o.default,{style:b.row,children:[(0,R.jsx)(t.default,{style:b.rowLabel,children:"Quick range"}),u.SENSOR_AUDIT_DATE_PRESETS.map(e=>{const o=e.id===S;return(0,R.jsx)(l.default,{accessibilityLabel:`Set date range to ${e.label}`,accessibilityRole:"button",accessibilityState:{selected:o},onPress:()=>{c(e.id)},style:[b.chip,o&&b.chipSelected],testID:`audit-date-preset-${e.id}`,children:(0,R.jsx)(t.default,{style:[b.chipLabel,o&&b.chipLabelSelected],children:e.label})},e.id)})]})},r(d[0]);
958var t=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),c=r(d[4]),n=r(d[5]),s=r(d[6]),S=r(d[7]),u=r(d[8]),R=r(d[9]);const b=(0,S.createStyles)({chip:{alignItems:'center',borderColor:c.COLORS.BORDER,borderRadius:999,borderWidth:1,justifyContent:'center',minHeight:40,paddingHorizontal:n.SPACING.LG},chipLabel:{color:c.COLORS.TEXT_BODY,fontSize:s.FONT_SIZE.MD},chipLabelSelected:{color:c.COLORS.TEXT_INVERSE,fontWeight:'700'},chipSelected:{backgroundColor:c.COLORS.BRAND_PRIMARY,borderColor:c.COLORS.BRAND_PRIMARY},row:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:n.SPACING.SM},rowLabel:{color:c.COLORS.TEXT_MUTED,fontSize:s.FONT_SIZE.XS,letterSpacing:.4,marginRight:n.SPACING.XS,textTransform:'uppercase'}})},858,[34,222,488,276,490,493,494,489,857,104]);
959__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildSensorAuditFilters=function(t){return Object.assign({},n('sensor',t.sensor),n('label',t.label),n('fromDate',t.fromDate),n('throughDate',t.throughDate),void 0!==t.action&&{action:t.action})},e.sensorAuditFilterError=function(n){const o=n.fromDate.trim(),u=n.throughDate.trim(),s=[o,u].filter(n=>''!==n&&!(0,t.isCalendarDate)(n));if(s.length>0)return`Enter dates as YYYY-MM-DD. Not a date: ${s.join(', ')}.`;if(''!==o&&''!==u&&o>u)return'From date must be on or before the through date.';return null};var t=r(d[0]);function n(t,n){const o=n.trim();return''===o?{}:{[t]:o}}},859,[773]);
960__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.groupSensorAuditEntriesByDay=function(s){const n=[];for(const o of s){const s=(0,t.utcCalendarDayOf)((0,t.asIsoTimestamp)(o.createdAt)),u=n.at(-1);u?.dayKey===s?u.entries.push(o):n.push({dayKey:s,entries:[o],id:o.id})}return n};var t=r(d[0])},860,[861]);
961__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isIsoTimestamp=u,e.asIsoTimestamp=function(t){if(!u(t))throw new Error(`Expected an ISO 8601 instant with a zone, received: ${t}`);return t},e.instantOf=c,e.utcCalendarDayOf=function(n){return(0,t.utcCalendarDay)(c(n))};var t=r(d[0]);const n=10,s=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/;function u(u){return s.test(u)&&(0,t.isCalendarDate)(u.slice(0,n))&&!Number.isNaN(Date.parse(u))}function c(t){return new Date(t)}},861,[773]);
962__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorAuditRowDetail=function({entry:e,onCollapse:s}){const c=y.SENSOR_AUDIT_ACTION_PRESENTATIONS[e.action],u=(0,t.useCallback)(()=>{s(e.id)},[e.id,s]);return(0,O.jsxs)(n.default,{style:b.container,testID:`audit-row-detail-${e.id}`,children:[(0,O.jsx)(n.default,{style:[b.accent,{backgroundColor:c.color}]}),(0,O.jsxs)(n.default,{style:b.body,children:[(0,O.jsx)(f.SensorAuditEntryDetail,{entry:e}),(0,O.jsx)(o.default,{accessibilityLabel:`Hide audit entry ${e.id} details`,accessibilityRole:"button",onPress:u,style:b.collapseButton,children:(0,O.jsx)(l.default,{style:b.collapseText,children:"Hide details"})})]})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),s=r(d[4]),c=r(d[5]),u=r(d[6]),S=r(d[7]),f=r(d[8]),y=r(d[9]),O=r(d[10]);const b=(0,S.createStyles)({accent:{width:3},body:{flex:1,gap:c.SPACING.MD,minWidth:0,padding:c.SPACING.LG},collapseButton:{alignSelf:'flex-start'},collapseText:{color:s.COLORS.ACTION_PRIMARY,fontSize:u.FONT_SIZE.SM,fontWeight:'600'},container:{backgroundColor:s.COLORS.BG_WASH,borderBottomColor:s.COLORS.BORDER,borderBottomWidth:1,flexDirection:'row',width:'100%'}})},862,[34,222,488,276,490,493,494,489,850,852,104]);
963__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ContentAdminPanel=function(){const e=(0,x.useAsyncData)(()=>c.contentAdminApi.listPages(),[],'Failed to load repository pages'),s=(0,x.useAsyncData)(()=>S.shopifyAdminApi.listShopPolicies(),[],'Failed to load Shopify shop policies'),p=(0,x.useAsyncData)(()=>u.admin.listDiscoursePages(),[],'Failed to load Discourse pages'),y=e.retry,[f,h]=(0,t.useState)(!1),[O,C]=(0,t.useState)(null),P=(0,t.useCallback)(()=>{(async()=>{h(!0),C(null);try{await c.contentAdminApi.reload(),y()}catch(e){C((0,R.errorMessage)(e,'Failed to reload repository content'))}finally{h(!1)}})()},[y]);return(0,T.jsxs)(l.default,{style:N.container,children:[(0,T.jsxs)(l.default,{style:N.header,children:[(0,T.jsx)(o.default,{style:N.title,children:"Managed content"}),(0,T.jsx)(o.default,{style:N.subtitle,children:"First-party pages whose content is loaded from repository markdown, Shopify, or Discourse rather than defined directly in the frontend application."})]}),(0,T.jsx)(A,{source:"REPOSITORY",title:"Repository CMS pages",description:"Markdown content loaded by the backend from the configured content storage.",rows:e.data?.map(I.repositoryPageRow)??null,loading:e.loading,error:e.error??O,onRetry:e.retry,action:(0,T.jsx)(n.default,{style:[N.secondaryButton,f&&N.disabledButton],onPress:P,disabled:f,accessibilityRole:"button",accessibilityLabel:"Reload repository content",children:(0,T.jsx)(o.default,{style:N.secondaryButtonText,children:f?'Reloading\u2026':'Reload repository content'})})}),(0,T.jsx)(A,{source:"SHOPIFY",title:"Shopify shop policies",description:"Published Storefront policies served on first-party policy routes.",rows:s.data?.map(I.shopifyPolicyRow)??null,loading:s.loading,error:s.error,onRetry:s.retry}),(0,T.jsx)(A,{source:"DISCOURSE",title:"Discourse pages",description:"Public opening-post content served on first-party information and policy routes.",rows:p.data?.map(I.discoursePageRow)??null,loading:p.loading,error:p.error,onRetry:p.retry})]})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),s=r(d[4]),c=r(d[5]),u=r(d[6]),S=r(d[7]),p=r(d[8]),y=r(d[9]),f=r(d[10]),h=r(d[11]),O=r(d[12]),x=r(d[13]),R=r(d[14]),C=r(d[15]),I=r(d[16]),T=r(d[17]);function A({source:e,title:t,description:s,rows:c,loading:u,error:S,onRetry:p,action:y}){return(0,T.jsxs)(l.default,{style:N.section,children:[(0,T.jsxs)(l.default,{style:N.sectionHeader,children:[(0,T.jsxs)(l.default,{style:N.sectionHeading,children:[(0,T.jsxs)(o.default,{style:N.sourceBadge,children:["SOURCE: ",e]}),(0,T.jsx)(o.default,{style:N.sectionTitle,children:t}),(0,T.jsx)(o.default,{style:N.description,children:s})]}),y]}),u&&null==c?(0,T.jsx)(o.default,{style:N.metadata,children:"Loading\u2026"}):null,null!=S?(0,T.jsxs)(l.default,{style:N.error,children:[(0,T.jsx)(o.default,{style:C.adminSectionStyles.errorText,children:S}),(0,T.jsx)(n.default,{style:C.adminSectionStyles.retryButton,onPress:p,children:(0,T.jsx)(o.default,{style:C.adminSectionStyles.retryButtonText,children:"Retry"})})]}):null,0===c?.length?(0,T.jsx)(o.default,{style:N.metadata,children:"No pages reported by this 
963source."}):null,null!=c&&c.length>0?(0,T.jsx)(l.default,{style:N.list,children:c.map(t=>(0,T.jsx)(P,{row:t},`${e}:${t.id}`))}):null]})}function P({row:e}){const t=null==e.sourceUrl?null:(0,y.readExternalUrlLinkProps)(e.sourceUrl),n=null!=e.publicPath&&(0,p.isInternalPath)(e.publicPath);return(0,T.jsxs)(l.default,{style:N.row,children:[(0,T.jsxs)(l.default,{style:N.rowText,children:[(0,T.jsx)(o.default,{style:N.rowTitle,children:e.title}),(0,T.jsx)(o.default,{style:N.metadata,children:e.metadata})]}),(0,T.jsxs)(l.default,{style:N.actions,children:[n?(0,T.jsx)(p.AppLink,{href:e.publicPath,style:N.primaryButton,children:(0,T.jsx)(o.default,{style:N.primaryButtonText,children:"Open public page"})}):null,null!=t?(0,T.jsx)(y.ExternalLink,Object.assign({},t,{style:N.secondaryButton,children:(0,T.jsx)(o.default,{style:N.secondaryButtonText,children:"Open source"})})):null]})]})}const N=(0,s.createStyles)({actions:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM},container:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER,borderRadius:8,borderWidth:1,overflow:'hidden'},description:{color:f.COLORS.TEXT_BODY,fontSize:O.FONT_SIZE.SM,lineHeight:22},disabledButton:{opacity:.6},error:{alignItems:'flex-start',gap:h.SPACING.SM},header:{backgroundColor:f.COLORS.BG_SUBTLE_100,gap:h.SPACING.SM,padding:h.SPACING.XL},list:{gap:h.SPACING.SM},metadata:{color:f.COLORS.TEXT_MUTED,fontFamily:O.FONT_FAMILY.MONOSPACE,fontSize:O.FONT_SIZE.SM},primaryButton:{backgroundColor:f.COLORS.ACTION_PRIMARY,borderRadius:6,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.SM},primaryButtonText:{color:f.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},row:{alignItems:'center',backgroundColor:f.COLORS.BG_SUBTLE_100,borderRadius:6,flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD,justifyContent:'space-between',padding:h.SPACING.MD},rowText:{flexBasis:420,flexGrow:1,gap:h.SPACING.XS},rowTitle:{color:f.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},secondaryButton:{borderColor:f.COLORS.ACTION_PRIMARY,borderRadius:6,borderWidth:1,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.SM},secondaryButtonText:{color:f.COLORS.ACTION_PRIMARY,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},section:{borderTopColor:f.COLORS.BORDER,borderTopWidth:1,gap:h.SPACING.MD,padding:h.SPACING.XL},sectionHeader:{alignItems:'flex-start',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.MD,justifyContent:'space-between'},sectionHeading:{flexBasis:480,flexGrow:1,gap:h.SPACING.XS},sectionTitle:{color:f.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.LG,fontWeight:'600'},sourceBadge:{color:f.COLORS.BRAND_PRIMARY,fontFamily:O.FONT_FAMILY.MONOSPACE,fontSize:O.FONT_SIZE.XS,fontWeight:'700'},subtitle:{color:f.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.MD,lineHeight:22},title:{color:f.COLORS.ACTION_PRIMARY,fontSize:O.FONT_SIZE.DISPLAY_SM,fontWeight:'700'}})},863,[34,222,488,276,489,864,471,865,516,519,490,493,494,561,468,761,866,104]);
964__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"contentAdminApi",{enumerable:!0,get:function(){return t}});var n=r(d[0]);const t={listPages:async()=>n.adminContent.listPages(),async reload(){await n.adminContent.reloadContent()}}},864,[471]);
965__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"shopifyAdminApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n={listShopPolicies:async()=>t.admin.listShopPolicies()}},865,[471]);
966__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.repositoryPageRow=function(l){const u=(0,t.publicPathForCmsSlug)(l.slug);return Object.assign({id:l.slug,title:l.title,metadata:null==u?`Loaded \xb7 ${l.slug} \xb7 No public route`:`Loaded \xb7 ${l.slug} \xb7 ${u}`},null!=u?{publicPath:u}:{})},e.shopifyPolicyRow=function(t){const l=t.published?'Published':'Missing';return Object.assign({id:t.handle,title:t.title??t.handle,metadata:t.published?`${l} \xb7 ${t.handle} \xb7 ${String(t.bodyLengthChars)} chars \xb7 ${t.publicPath}`:`${l} \xb7 ${t.handle} \xb7 Not published in Shopify \xb7 ${t.publicPath}`},t.published?{publicPath:t.publicPath}:{})},e.discoursePageRow=function(t){const u='CURRENT'===t.sourceState||'STALE'===t.sourceState;return Object.assign({id:t.slug,title:t.title??t.slug,metadata:`${l[t.sourceState]} \xb7 ${t.slug} \xb7 Topic ${String(t.topicId)} \xb7 ${String(t.bodyLengthChars)} chars \xb7 ${t.publicPath}`},u?{publicPath:t.publicPath}:{},{sourceUrl:t.communityTopicUrl})};var t=r(d[0]);const l={CURRENT:'Current',STALE:'Stale (cached)',MISSING:'Missing',UNAVAILABLE:'Unavailable'}},866,[867]);
967__d(function(g,r,i,a,m,e,d){"use strict";
967Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PAGE_SLUG_TO_SCREEN",{enumerable:!0,get:function(){return n}}),e.publicPathForCmsSlug=function(u){const s=n[u];if(null==s)return;return t.SCREEN_PATHS[s]};var t=r(d[0]);const n={'data-use-cases':'DataUseCases',attribution:'Attribution',license:'License',recall:'Recall','exploring-air-quality-across-the-globe':'ExploringAirQuality','trusting-purpleair-sensor-evaluations':'TrustingPurpleAir'}},867,[518]);
968__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressInlineAdminControls=function(e){const{isAdmin:t}=(0,u.useAuth)();if(!t)return null;return(0,p.jsx)(O,Object.assign({},e))};var t=r(d[0]),s=e(r(d[1])),n=e(r(d[2]));r(d[3]);var o=e(r(d[4])),l=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),T=r(d[9]),y=r(d[10]),b=r(d[11]),h=r(d[12]),A=r(d[13]),C=r(d[14]),f=r(d[15]),p=r(d[16]);function O({mention:e,onChanged:l}){const u=(0,h.useToast)(),[A,C]=(0,t.useState)(!1),[f,O]=(0,t.useState)(!1),[R,P]=(0,t.useState)({category:e.category,keyThemes:e.aiKeyThemes}),x=(0,t.useCallback)(()=>{(async()=>{C(!0);try{await c.pressAdminApi.archive(e.id),u.success('Mention archived \u2014 no longer public',{id:`press-public-${e.id}`}),l()}catch(t){u.error(t instanceof Error?t.message:'Failed to archive',{id:`press-public-${e.id}`})}finally{C(!1)}})()},[e.id,u,l]),M=(0,t.useCallback)(()=>{(async()=>{C(!0);try{await c.pressAdminApi.updateMention(e.id,{category:R.category,keyThemes:R.keyThemes}),u.success('Tags updated',{id:`press-public-tags-${e.id}`}),O(!1),l()}catch(t){u.error(t instanceof Error?t.message:'Failed to save tags',{id:`press-public-tags-${e.id}`})}finally{C(!1)}})()},[e.id,R,u,l]);return(0,p.jsx)(s.default,{style:I.adminBarOuter,children:(0,p.jsxs)(T.Card,{style:I.adminBar,children:[(0,p.jsxs)(s.default,{style:I.adminBarHeader,children:[(0,p.jsx)(n.default,{style:I.adminBarTitle,children:"Admin Controls"}),(0,p.jsx)(S.AppLink,{to:"PressAdminDetail",href:`/admin/press/${e.id}`,textStyle:I.adminBarLink,inline:!0,children:"Open in Press Admin"})]}),(0,p.jsx)(y.PressStatusActions,{status:"APPROVED",busyKey:A?'archive':null,onTransition:x}),f?(0,p.jsxs)(s.default,{style:I.adminTagEditor,children:[(0,p.jsx)(b.PressTagEditor,{category:R.category,keyThemes:R.keyThemes,onChange:P,disabled:A}),(0,p.jsxs)(s.default,{style:I.adminTagActions,children:[(0,p.jsx)(o.default,{style:[I.saveButton,A&&I.buttonDisabled],onPress:M,disabled:A,accessibilityRole:"button",accessibilityLabel:"Save tags",children:(0,p.jsx)(n.default,{style:I.saveButtonText,children:A?'Saving...':'Save Tags'})}),(0,p.jsx)(o.default,{style:I.cancelButton,onPress:()=>{P({category:e.category,keyThemes:e.aiKeyThemes}),O(!1)},disabled:A,accessibilityRole:"button",accessibilityLabel:"Cancel tag editing",children:(0,p.jsx)(n.default,{style:I.cancelButtonText,children:"Cancel"})})]})]}):(0,p.jsx)(o.default,{style:I.editTagsButton,onPress:()=>{O(!0)},accessibilityRole:"button",accessibilityLabel:"Edit tags",children:(0,p.jsx)(n.default,{style:I.editTagsText,children:"Edit Tags"})})]})})}const I=(0,l.createStyles)({adminBarOuter:{alignItems:'center',paddingHorizontal:C.SPACING.XL,paddingTop:C.SPACING.LG},adminBar:Object.assign({width:'100%',padding:C.SPACING.LG,gap:C.SPACING.MD,borderColor:A.COLORS.BRAND_PRIMARY,borderWidth:1},{maxWidth:800}),adminBarHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',gap:C.SPACING.MD},adminBarTitle:{color:A.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.MD,fontWeight:'700'},adminBarLink:{color:A.COLORS.BRAND_PRIMARY,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},adminTagEditor:{gap:C.SPACING.MD},adminTagActions:{flexDirection:'row',gap:C.SPACING.SM},editTagsButton:{alignSelf:'flex-start',borderColor:A.COLORS.ACTION_PRIMARY,borderRadius:6,borderWidth:1,paddingHorizontal:C.SPACING.LG,paddingVertical:C.SPACING.SM},editTagsText:{color:A.COLORS.ACTION_PRIMARY,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},saveButton:{backgroundColor:A.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:C.SPACING.XL,paddingVertical:C.SPACING.SM},saveButtonText:{color:A.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},cancelButton:{borderColor:A.COLORS.TEXT_MUTED,borderRadius:8,borderWidth:1,paddingHorizontal:C.SPACING.XL,paddingVertical:C.SPACING.SM},cancelButtonText:{color:A.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},buttonDisabled:{opacity:.5}})},868,[34,276,222,95,488,489,869,411,516,605,870,871,496,490,493,494,104]);
969__d(function(g,r,i,a,m,e,d){"use strict";
969Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"pressAdminApi",{enumerable:!0,get:function(){return s}});var t=r(d[0]);function n(t){return{category:t.category??null,displayDescription:t.displayDescription??null,displayTitle:t.displayTitle??null,featured:t.featured??null,outletName:t.outletName??null,keyThemes:t.keyThemes??null}}const s={getQueue:async(n=0,s=20)=>t.adminPress.getQueue({query:{page:n,size:s}}),getMention:async n=>t.adminPress.getAdminMention({path:{id:n}}),listMentions:async n=>t.adminPress.listAdminMentions({query:Object.assign({},null!=n?.status?{status:n.status}:{},null!=n?.categoryFilter?{categoryFilter:n.categoryFilter}:{},{page:n?.page??0,size:n?.size??20})}),async approve(n){await t.adminPress.approve({path:{id:n}})},async reject(n){await t.adminPress.reject({path:{id:n}})},async archive(n){await t.adminPress.archive({path:{id:n}})},async restore(n){await t.adminPress.restore({path:{id:n}})},submitUrl:async n=>t.adminPress.submitUrl({body:n}),updateMention:async(s,u)=>t.adminPress.updateMention({path:{id:s},body:n(u)}),async regenerateSummary(n){await t.adminPress.regenerateSummary({path:{id:n}})},getSettings:async()=>t.adminPress.getSettings(),async updateSetting(n,s){await t.adminPress.updateSetting({path:{key:n},body:s,headers:{'Content-Type':'text/plain'}})},getDashboard:async()=>t.adminPress.getDashboard(),getAuditLog:async n=>t.adminPress.getAuditLog({query:Object.assign({},null!=n?.mentionId&&''!==n.mentionId?{mentionId:n.mentionId}:{},{page:n?.page??0,size:n?.size??20})})}},869,[471]);
970__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressStatusActions=function({status:e,onTransition:s,busyKey:b=null}){const u=R[e];return(0,p.jsx)(t.default,{style:E.row,children:u.map(e=>{const t=y[e],u=b===e;return(0,p.jsx)(o.default,{style:[E.button,'primary'===t.tone?E.buttonPrimary:E.buttonDanger,null!=b&&E.buttonDisabled],onPress:()=>{s(e)},disabled:null!=b,accessibilityRole:"button",accessibilityLabel:t.accessibilityLabel,children:u?(0,p.jsx)(l.default,{size:"small",color:c.COLORS.TEXT_INVERSE}):(0,p.jsx)(n.default,{style:E.buttonText,children:t.label})},e)})})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),b=r(d[7]),u=r(d[8]),p=r(d[9]);const y={approve:{label:'Approve',tone:'primary',accessibilityLabel:'Approve mention'},reject:{label:'Reject',tone:'danger',accessibilityLabel:'Reject mention'},archive:{label:'Archive',tone:'danger',accessibilityLabel:'Archive mention'},restore:{label:'Restore',tone:'primary',accessibilityLabel:'Restore mention'}},R={PENDING:['approve','reject'],APPROVED:['archive'],REJECTED:['approve'],ARCHIVED:['restore']};const E=(0,s.createStyles)({row:{flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.SM},button:{borderRadius:6,paddingHorizontal:b.SPACING.LG,paddingVertical:b.SPACING.SM,minWidth:88,alignItems:'center',justifyContent:'center'},buttonPrimary:{backgroundColor:c.COLORS.EMERALD_600},buttonDanger:{backgroundColor:c.COLORS.ERROR},buttonDisabled:{opacity:.6},buttonText:{color:c.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.SM,fontWeight:'600'}})},870,[34,276,222,488,410,489,490,493,494,104]);
971__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressTagEditor=function({category:e,keyThemes:c,onChange:C,disabled:h=!1}){const[b,p]=(0,t.useState)(''),f=(0,t.useCallback)(t=>{C({category:e===t?null:t,keyThemes:c})},[e,c,C]),x=(0,t.useCallback)(()=>{const t=b.trim();''===t||c.length>=u||(c.includes(t)||C({category:e,keyThemes:[...c,t.slice(0,y)]}),p(''))},[b,c,e,C]),E=(0,t.useCallback)(t=>{C({category:e,keyThemes:c.filter(e=>e!==t)})},[e,c,C]),I=c.length>=u;return(0,T.jsxs)(l.default,{style:O.container,children:[(0,T.jsx)(o.default,{style:O.label,children:"Category"}),(0,T.jsx)(l.default,{style:O.chipRow,children:R.PRESS_CATEGORY_OPTIONS.map(t=>{const l=t.key===e;return(0,T.jsx)(s.default,{style:[O.categoryChip,l&&O.categoryChipSelected],onPress:()=>{f(t.key)},disabled:h,accessibilityRole:"button",accessibilityState:{selected:l},accessibilityLabel:`Category ${t.label}`,children:(0,T.jsx)(o.default,{style:[O.categoryChipText,l&&O.categoryChipTextSelected],children:t.label})},t.key)})}),(0,T.jsx)(o.default,{style:O.label,children:"Key Themes"}),0===c.length&&(0,T.jsx)(o.default,{style:O.emptyText,children:"No themes yet."}),(0,T.jsx)(l.default,{style:O.chipRow,children:c.map(e=>(0,T.jsxs)(l.default,{style:O.themeChip,children:[(0,T.jsx)(o.default,{style:O.themeChipText,children:e}),(0,T.jsx)(s.default,{onPress:()=>{E(e)},disabled:h,accessibilityRole:"button",accessibilityLabel:`Remove theme ${e}`,hitSlop:{top:8,bottom:8,left:8,right:8},children:(0,T.jsx)(o.default,{style:O.themeChipRemove,children:"\xd7"})})]},e))}),(0,T.jsxs)(l.default,{style:O.addRow,children:[(0,T.jsx)(n.default,{style:O.input,value:b,onChangeText:p,onSubmitEditing:x,editable:!h&&!I,placeholder:I?`Max ${u} themes`:'Add a theme',placeholderTextColor:S.COLORS.TEXT_CAPTION,maxLength:y,accessibilityLabel:"New key theme"}),(0,T.jsx)(s.default,{style:[O.addButton,(h||I||''===b.trim())&&O.addButtonDisabled],onPress:x,disabled:h||I||''===b.trim(),accessibilityRole:"button",accessibilityLabel:"Add key theme",children:(0,T.jsx)(o.default,{style:O.addButtonText,children:"Add"})})]})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),c=r(d[5]),S=r(d[6]),C=r(d[7]),h=r(d[8]),R=r(d[9]),T=r(d[10]);const u=12,y=80;const O=(0,c.createStyles)({container:{gap:C.SPACING.SM},label:{color:S.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS,fontWeight:'700',textTransform:'uppercase',marginTop:C.SPACING.SM},chipRow:{flexDirection:'row',flexWrap:'wrap',gap:C.SPACING.SM},categoryChip:{borderColor:S.COLORS.BORDER_NEUTRAL,borderWidth:1,borderRadius:999,paddingHorizontal:C.SPACING.MD,paddingVertical:C.SPACING.XS},categoryChipSelected:{backgroundColor:S.COLORS.ACTION_PRIMARY,borderColor:S.COLORS.ACTION_PRIMARY},categoryChipText:{color:S.COLORS.TEXT_SECONDARY,fontSize:h.FONT_SIZE.SM,fontWeight:'600'},categoryChipTextSelected:{color:S.COLORS.TEXT_INVERSE},themeChip:{flexDirection:'row',alignItems:'center',gap:C.SPACING.XS,backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_NEUTRAL,borderWidth:1,borderRadius:999,paddingHorizontal:C.SPACING.MD,paddingVertical:C.SPACING.XS},themeChipText:{color:S.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.SM}
971,themeChipRemove:{color:S.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.MD,fontWeight:'700'},emptyText:{color:S.COLORS.TEXT_CAPTION,fontSize:h.FONT_SIZE.SM,fontStyle:'italic'},addRow:{flexDirection:'row',gap:C.SPACING.SM,alignItems:'center'},input:{flex:1,backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_NEUTRAL,borderRadius:8,borderWidth:1,color:S.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.MD,paddingHorizontal:C.SPACING.MD,paddingVertical:C.SPACING.SM},addButton:{backgroundColor:S.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:C.SPACING.LG,paddingVertical:C.SPACING.SM},addButtonDisabled:{opacity:.5},addButtonText:{color:S.COLORS.TEXT_INVERSE,fontSize:h.FONT_SIZE.SM,fontWeight:'600'}})},871,[34,276,222,394,488,489,490,493,494,872,104]);
972__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PRESS_CATEGORY_OPTIONS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"PRESS_CATEGORIES_EXHAUSTIVE",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UNCATEGORIZED_KEY",{enumerable:!0,get:function(){return l}}),e.isPressApiCategory=function(t){return Object.prototype.hasOwnProperty.call(o,t)},e.pressCategoryLabel=function(t){const n=o[t];if(void 0!==n)return n;const l=t.toLowerCase().replace(/_/g,' ');return l.charAt(0).toUpperCase()+l.slice(1)};const t=[{key:'NEWS_MEDIA',label:'News'},{key:'GOVERNMENT',label:'Government'},{key:'ACADEMIC',label:'Research'},{key:'COMMUNITY',label:'Community'},{key:'ECOSYSTEM',label:'Ecosystem'},{key:'PRODUCT_REVIEW',label:'Reviews'}],n=!0,o=Object.fromEntries(t.map(t=>[t.key,t.label])),l='UNCATEGORIZED'},872,[]);
973__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.CreditsScreen=function(){const e=(0,f.useSeoMeta)('Credits');return(0,_.jsxs)(o.PageLayout,{children:[(0,_.jsx)(l.WebMeta,Object.assign({},e)),(0,_.jsx)(s.default,{style:j.container,children:(0,_.jsx)(c.ImageCredits,{variant:"full"})})]})},r(d[0]);var e,t=r(d[1]),s=(e=t)&&e.__esModule?e:{default:e},n=r(d[2]),c=r(d[3]),o=r(d[4]),l=r(d[5]),u=r(d[6]),f=r(d[7]),_=r(d[8]);const j=(0,n.createStyles)({container:{backgroundColor:u.COLORS.BG_SURFACE,flex:1}})},873,[34,283,489,537,568,565,490,562,104]);
974__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.DataUseCasesScreen=function(){const{page:t,loading:e,error:n}=(0,A.usePageContent)('data-use-cases'),u=(0,I.useSeoMeta)('DataUseCases'),{isDevTriggered:C,surface:f}=(0,S.useErrorSurface)(P.contentLoad),L=n??(C?'Content not found.':null);if(e)return(0,O.jsx)(c.MarkdownPageLoading,{});if(null!=L||null==t)return(0,O.jsx)(c.MarkdownPageError,{message:L??'Content not found.',surface:f});return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(l.WebMeta,Object.assign({},u)),(0,O.jsx)(c.MarkdownPage,{title:t.title,body:t.body,subtitle:"See how leading organizations use PurpleAir data to monitor and improve air quality worldwide.",footer:(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(s.AppLink,{to:"API",style:x.ctaButton,children:(0,O.jsx)(o.default,{style:x.ctaButtonText,children:"View API Documentation"})}),(0,O.jsx)(s.AppLink,{to:"Contact",style:x.contactButton,children:(0,O.jsx)(o.default,{style:x.contactButtonText,children:"Contact Us"})})]})})]})},r(d[0]);var t,e=r(d[1]),o=(t=e)&&t.__esModule?t:{default:t},n=r(d[2]),s=r(d[3]),c=r(d[4]),l=r(d[5]),u=r(d[6]),C=r(d[7]),f=r(d[8]),S=r(d[9]),A=r(d[10]),I=r(d[11]),O=r(d[12]);const P=(0,S.defineScreenErrorSurfaces)('DataUseCases',{contentLoad:{id:'content-load',kind:'page',label:'Data use cases content load error'}});const x=(0,n.createStyles)({contactButton:{borderColor:u.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:2,paddingHorizontal:C.SPACING.XXL,paddingVertical:C.SPACING.MD},contactButtonText:{color:u.COLORS.ACTION_PRIMARY,fontSize:f.FONT_SIZE.LG,fontWeight:'600'},ctaButton:{backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:C.SPACING.XXL,paddingVertical:C.SPACING.LG},ctaButtonText:{color:u.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.LG,fontWeight:'600'}})},874,[34,222,489,516,566,565,490,493,494,557,559,562,104]);
975__d(function(g,r,i,a,m,_e,d){"use strict";
975function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DoNotSellScreen=function(){const e=(0,I.useSeoMeta)('DoNotSell'),{showBanner:s}=(0,A.useCookieConsent)();return(0,O.jsxs)(u.PageLayout,{children:[(0,O.jsx)(h.WebMeta,Object.assign({},e)),(0,O.jsxs)(n.default,{style:P.container,children:[(0,O.jsxs)(t.default,{style:P.header,children:[(0,O.jsx)(o.default,{style:P.headerTitle,children:"Do Not Sell or Share My Personal Information"}),(0,O.jsx)(o.default,{style:P.headerSubtitle,children:"Your privacy rights under the California Consumer Privacy Act (CCPA)"})]}),(0,O.jsxs)(t.default,{style:P.section,children:[(0,O.jsxs)(t.default,{style:P.card,children:[(0,O.jsx)(o.default,{style:P.cardTitle,children:"PurpleAir Does Not Sell Your Data"}),(0,O.jsx)(o.default,{style:P.cardBody,children:"PurpleAir does not sell your personal information to third parties as defined by the California Consumer Privacy Act (CCPA) and the California Privacy Rights Act (CPRA). PurpleAir also does not share your personal information for cross-context behavioral advertising."})]}),(0,O.jsxs)(t.default,{style:P.card,children:[(0,O.jsx)(o.default,{style:P.cardTitle,children:"Public Sensor Data"}),(0,O.jsx)(o.default,{style:P.cardBody,children:"If you choose to make your sensor data public, it will be displayed on the PurpleAir Real-Time Map and may be accessed through the PurpleAir API. You can change your sensor to private at any time through the Sensor Manager. Public sensor data is not considered a \"sale\" or \"sharing\" under the CCPA, as it is information you have voluntarily made publicly available."})]}),(0,O.jsxs)(t.default,{style:P.card,children:[(0,O.jsx)(o.default,{style:P.cardTitle,children:"Cookie Preferences"}),(0,O.jsx)(o.default,{style:P.cardBody,children:"You can control which categories of cookies are active on your device. Adjusting your cookie preferences may limit certain site functionality."}),(0,O.jsx)(l.default,{style:P.actionButton,onPress:s,accessibilityRole:"button",accessibilityLabel:"Manage cookie preferences",children:(0,O.jsx)(o.default,{style:P.actionButtonText,children:"Manage Cookie Settings"})})]}),(0,O.jsxs)(t.default,{style:P.card,children:[(0,O.jsx)(o.default,{style:P.cardTitle,children:"Your CCPA Rights"}),(0,O.jsx)(o.default,{style:P.cardBody,children:"California residents have the right to:"}),(0,O.jsxs)(t.default,{style:P.rightsList,children:[(0,O.jsxs)(o.default,{style:P.rightsItem,children:['\u2022'," Know what personal information is collected and how it is used"]}),(0,O.jsxs)(o.default,{style:P.rightsItem,children:['\u2022'," Request deletion of personal information"]}),(0,O.jsxs)(o.default,{style:P.rightsItem,children:['\u2022'," Request correction of inaccurate personal information"]}),(0,O.jsxs)(o.default,{style:P.rightsItem,children:['\u2022'," Opt out of the sale or sharing of personal information"]}),(0,O.jsxs)(o.default,{style:P.rightsItem,children:['\u2022'," Not be discriminated against for exercising these rights"]})]})]}),(0,O.jsxs)(t.default,{style:P.card,children:[(0,O.jsx)(o.default,{style:P.cardTitle,children:"Contact Us"}),(0,O.jsx)(o.default,{style:P.cardBody,children:"To exercise any of your privacy rights, or if you have questions about how PurpleAir handles your personal information:"}),(0,O.jsxs)(o.default,{style:P.contactInfo,children:["Email: ",S.CONTACT.PRIVACY_EMAIL]}),(0,O.jsxs)(o.default,{style:P.contactInfo,children:["PurpleAir, Inc.",'\n',"860 W 14600 S, Suite 600",'\n',"Bluffdale, UT 84065"]})]})]}),(0,O.jsx)(t.default,{style:P.footer,children:(0,O.jsx)(c.AppLink,{to:"PrivacyPolicy",children:(0,O.jsx)(o.default,{style:P.footerLink,children:"View Privacy Policy"})})})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3]));r(d[4]);var n=e(r(d[5])),s=r(d[6]),c=r(d[7]),u=r(d[8]),h=r(d[9]),f=r(d[10]),S=r(d[11]),y=r(d[12]),C=r(d[13]),A=r(d[14]),I=r(d[15]),O=r(d[16]);const P=(0,s.createStyles)({actionButton:{alignSelf:'flex-start',backgroundColor:f.COLORS.ACTION_PRIMARY,borderRadius:8,marginTop:y.SPACING.LG,paddingHorizontal:y.SPACING.XXL,paddingVertical:y.SPACING.MD},actionButtonText:{color:f.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.LG,fontWeight:'600'},card:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:y.SPACING.XXL},cardBody:{color:f.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.LG,lineHeight:26},cardTitle:{color:f.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.XL,fontWeight:'600',marginBottom:y.SPACING.MD},contactInfo:{color:f.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.LG,lineHeight:24,marginTop:y.SPACING.SM},container:{backgroundColor:f.COLORS.BG_SURFACE,flex:1},footer:{alignItems:'center',borderTopColor:f.COLORS.BORDER,borderTopWidth:1,paddingHorizontal:y.SPACING.XXL,paddingVertical:y.SPACING.XXXL},footerLink:{color:f.COLORS.BRAND_PRIMARY,fontSize:C.FONT_SIZE.LG,fontWeight:'600'},header:{alignItems:'center',backgroundColor:f.COLORS.BG_LIGHT,borderBottomColor:f.COLORS.BORDER,borderBottomWidth:1,paddingHorizontal:y.SPACING.XXL,paddingVertical:y.SPACING.JUMBO},headerSubtitle:{color:f.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.XL,lineHeight:28,maxWidth:600,textAlign:'center'},headerTitle:Object.assign({color:f.COLORS.TEXT_HEADING,fontSize:C.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:y.SPACING.LG,maxWidth:700,textAlign:'center'},{fontSize:C.FONT_SIZE.DISPLAY_LG}),rightsItem:{color:f.COLORS.TEXT_SECONDARY,fontSize:C.FONT_SIZE.LG,lineHeight:24,paddingLeft:y.SPACING.SM},rightsList:{gap:y.SPACING.SM,marginTop:y.SPACING.MD},section:{alignSelf:'center',gap:y.SPACING.XXL,maxWidth:700,paddingHorizontal:y.SPACING.XXL,paddingVertical:y.SPACING.MASSIVE,width:'100%'}})},875,[34,276,222,488,95,283,489,516,568,565,490,745,493,494,587,562,104]);
976__d(function(g,r,i,a,m,_e,d){"use strict";
976function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.EducationScreen=function(){const e=(0,E.useSeoMeta)('Education');return(0,L.jsxs)(h.PageLayout,{children:[(0,L.jsx)(S.WebMeta,Object.assign({},e)),(0,L.jsxs)(n.default,{style:j.container,children:[(0,L.jsx)(u.HeroSection,{backgroundColor:f.COLORS.SUCCESS,background:{imageUrl:'https://images.unsplash.com/photo-1741528802984-38d14e5c66a7?w=1920&q=80',imagePosition:'center 40%'},minHeight:500,label:"FOR EDUCATION",title:'Inspiring the Next Generation\nof Environmental Scientists',subtitle:"From classroom experiments to university research, PurpleAir sensors bring real-world air quality data into the learning experience. Empower students with hands-on STEM education.",centered:!1,children:(0,L.jsxs)(t.default,{style:p.MARKETING.heroActions,children:[(0,L.jsx)(o.AppLink,{to:"Contact",style:b.primaryButton,children:(0,L.jsx)(s.default,{style:b.primaryButtonText,children:"Education Pricing"})}),(0,L.jsx)(o.AppLink,{to:"Community",style:b.secondaryButton,children:(0,L.jsx)(s.default,{style:b.secondaryButtonText,children:"Educator Resources"})})]})}),(0,L.jsxs)(t.default,{style:j.statsBar,children:[(0,L.jsxs)(t.default,{style:j.statItem,children:[(0,L.jsx)(s.default,{style:j.statNumber,children:"K-12"}),(0,L.jsx)(s.default,{style:j.statLabel,children:"Classroom Programs"})]}),(0,L.jsx)(t.default,{style:j.statDivider}),(0,L.jsxs)(t.default,{style:j.statItem,children:[(0,L.jsx)(s.default,{style:j.statNumber,children:"Widely Cited"}),(0,L.jsx)(s.default,{style:j.statLabel,children:"In Academic Research"})]}),(0,L.jsx)(t.default,{style:j.statDivider}),(0,L.jsxs)(t.default,{style:j.statItem,children:[(0,L.jsx)(s.default,{style:j.statNumber,children:"Universities"}),(0,L.jsx)(s.default,{style:j.statLabel,children:"Across the Country"})]})]}),(0,L.jsxs)(t.default,{style:p.MARKETING.section,children:[(0,L.jsxs)(t.default,{style:j.sectionHeader,children:[(0,L.jsx)(s.default,{style:j.sectionLabel,children:"K-12 EDUCATION"}),(0,L.jsx)(s.default,{style:j.sectionTitle,children:"Air Quality in the Classroom"}),(0,L.jsx)(s.default,{style:j.sectionDesc,children:"PurpleAir sensors transform abstract environmental concepts into tangible, measurable data. Students learn about air quality, particulate matter, and environmental health through real-time monitoring."})]}),(0,L.jsxs)(t.default,{style:[p.MARKETING.grid,j.benefitGrid],children:[(0,L.jsx)(T,{title:"STEM Curriculum Integration",description:"Integrate air quality monitoring into science, math, and health classes. Students analyze real data, create graphs, and draw conclusions."}),(0,L.jsx)(T,{title:"Real-Time Data",description:"Access live air quality readings from your school and compare with locations around the world using the PurpleAir Map."}),(0,L.jsx)(T,{title:"Health Awareness",description:"Teach students about the health impacts of air pollution and empower them to make informed decisions about outdoor activities."}),(0,L.jsx)(T,{title:"Community Science",description:"Connect classroom learning to real-world impact. Student data contributes to the global PurpleAir network."})]})]}),(0,L.jsxs)(t.default,{style:[p.MARKETING.section,j.programsSection],children:[(0,L.jsx)(s.default,{style:j.sectionTitleLight,children:"Featured Programs"}),(0,L.jsx)(s.default,{style:j.sectionDescLight,children:"Schools and districts across the country are using PurpleAir to enhance education"}),(0,L.jsxs)(t.default,{style:p.MARKETING.gridWide,children:[(0,L.jsx)(A,{institution:"Central Texas Schools",title:"Be Air Smart Program",description:"Clean Air Force of Central Texas and Air Central Texas install PurpleAir sensors in schools with teacher guides and student activities. Data displayed on public maps.",highlight:"Multi-District Initiative",url:"https://cleanairforce.org/be-air-smart/"}),(0,L.jsx)(A,{institution:"Austin Independent School District",title:"School Sensor Network",description:"Partnership with the City of Austin to install monitors in public schools, creating a localized network that identifies neighborhood-specific air quality changes.",highlight:"City Partnership",url:"https://www.austinmonitor.com/stories/2021/12/city-partners-up-to-monitor-particulate-matter-in-the-air/"}),(0,L.jsx)(A,{institution:"Santa Barbara County",title:"150-Sensor School Program",description:"Air Pollution Control District offering to install approximately 150 sensors at schools, government buildings, and nonprofits for PM2.5 monitoring.",highlight:"County-Wide Coverage",url:"https://www.independent.com/2025/09/11/apcd-offering-air-quality-sensors-to-be-hosted-at-schools-nonprofits-and-government-buildings/"}),(0,L.jsx)(A,{institution:"Montana Tribal Schools",title:"CSKT Air Quality Network",description:"Montana Climate Office partnership with Confederated Salish & Kootenai Tribes installing sensors in schools and health centers across the Flathead Reservation.",highlight:"Tribal Partnership",url:"https://climate.umt.edu/hardware/2024/07/29/cskt-purpleair.html"})]})]}),(0,L.jsxs)(t.default,{style:p.MARKETING.section,children:[(0,L.jsxs)(t.default,{style:j.sectionHeader,children:[(0,L.jsx)(s.default,{style:j.sectionLabel,children:"HIGHER EDUCATION"}),(0,L.jsx)(s.default,{style:j.sectionTitle,children:"Powering University Research"}),(0,L.jsx)(s.default,{style:j.sectionDesc,children:"Leading universities use PurpleAir sensors for atmospheric research, environmental health studies, and campus sustainability initiatives."})]}),(0,L.jsxs)(t.default,{style:p.MARKETING.gridWide,children:[(0,L.jsxs)(c.ExternalLink,{style:j.universityCard,accessibilityLabel:"Read about UC Davis Air Pollution Course Lab",href:"https://airqual
976ity.ucdavis.edu/news/purpleair-supports-new-undergrad-air-pollution-course-pa-ii-donations",children:[(0,L.jsx)(s.default,{style:j.universityName,children:"UC Davis"}),(0,L.jsx)(s.default,{style:j.universityProgram,children:"Air Pollution Course Lab"}),(0,L.jsx)(s.default,{style:j.universityDesc,children:"PurpleAir donated PA-II instruments to support a new undergraduate laboratory, giving students hands-on experience with low-cost sensor technology."}),(0,L.jsx)(s.default,{style:j.universityLink,children:"Read More"})]}),(0,L.jsxs)(c.ExternalLink,{style:j.universityCard,accessibilityLabel:"Read about University of Arizona Campus Sensor Network",href:"https://sustainability.arizona.edu/featured-story/university-arizona-air-pollution-sensor-network-monitoring-and-mapping-pm-25",children:[(0,L.jsx)(s.default,{style:j.universityName,children:"University of Arizona"}),(0,L.jsx)(s.default,{style:j.universityProgram,children:"Campus Sensor Network"}),(0,L.jsx)(s.default,{style:j.universityDesc,children:"20 PurpleAir sensors installed across campus to monitor air pollution, providing real-time data for students, faculty, and staff."}),(0,L.jsx)(s.default,{style:j.universityLink,children:"Read More"})]}),(0,L.jsxs)(c.ExternalLink,{style:j.universityCard,accessibilityLabel:"Read about University of Montana REACH Program",href:"https://www.umt.edu/reach/equipment/",children:[(0,L.jsx)(s.default,{style:j.universityName,children:"University of Montana"}),(0,L.jsx)(s.default,{style:j.universityProgram,children:"REACH Program"}),(0,L.jsx)(s.default,{style:j.universityDesc,children:"Research Education on Air and Climate Change Health program provides students with PurpleAir sensors for research projects on air quality."}),(0,L.jsx)(s.default,{style:j.universityLink,children:"Read More"})]}),(0,L.jsxs)(c.ExternalLink,{style:j.universityCard,accessibilityLabel:"Read about Ohio University Regional Health Initiative",href:"https://www.ohio.edu/news/2023/12/purpleair-air-quality-project-aims-increase-health-information-data-collection-across",children:[(0,L.jsx)(s.default,{style:j.universityName,children:"Ohio University"}),(0,L.jsx)(s.default,{style:j.universityProgram,children:"Regional Health Initiative"}),(0,L.jsx)(s.default,{style:j.universityDesc,children:"DOE-funded project installing sensors in libraries, schools, and government buildings across southeast Ohio for health data collection."}),(0,L.jsx)(s.default,{style:j.universityLink,children:"Read More"})]}),(0,L.jsxs)(c.ExternalLink,{style:j.universityCard,accessibilityLabel:"Read about Virginia State University Community Health Research",href:"https://www.vsu.edu/news/2024/vsu-research-to-reveal-impact-of-heat-and-air-quality-in-local-communities.php",children:[(0,L.jsx)(s.default,{style:j.universityName,children:"Virginia State University"}),(0,L.jsx)(s.default,{style:j.universityProgram,children:"Community Health Research"}),(0,L.jsx)(s.default,{style:j.universityDesc,children:"Faculty and students use PurpleAir monitors to collect temperature and air quality data in local communities for health research."}),(0,L.jsx)(s.default,{style:j.universityLink,children:"Read More"})]}),(0,L.jsxs)(c.ExternalLink,{style:j.universityCard,accessibilityLabel:"Read about UCLA Fielding School Community Air Quality Study",href:"https://www.uasra.org/air",children:[(0,L.jsx)(s.default,{style:j.universityName,children:"UCLA Fielding School"}),(0,L.jsx)(s.default,{style:j.universityProgram,children:"Community Air Quality Study"}),(0,L.jsx)(s.default,{style:j.universityDesc,children:"Collaboration with University Village residents deploying PurpleAir sensors to study local air quality and health implications."}),(0,L.jsx)(s.default,{style:j.universityLink,children:"Read More"})]})]})]}),(0,L.jsxs)(t.default,{style:[p.MARKETING.section,j.capabilitiesSection],children:[(0,L.jsx)(s.default,{style:j.sectionTitle,children:"Research Capabilities"}),(0,L.jsxs)(t.default,{style:[p.MARKETING.grid,j.capabilityGrid],children:[(0,L.jsxs)(t.default,{style:j.capability,children:[(0,L.jsx)(s.default,{style:j.capabilityTitle,children:"Open API"}),(0,L.jsx)(s.default,{style:j.capabilityDesc,children:"Access historical and real-time data through our REST API for custom research applications and data analysis."})]}),(0,L.jsxs)(t.default,{style:j.capability,children:[(0,L.jsx)(s.default,{style:j.capabilityTitle,children:"Data Downloads"}),(0,L.jsx)(s.default,{style:j.capabilityDesc,children:"Export sensor data in multiple formats for statistical analysis, machine learning, and publication-ready charts."})]}),(0,L.jsxs)(t.default,{style:j.capability,children:[(0,L.jsx)(s.default,{style:j.capabilityTitle,children:"Global Network"}),(0,L.jsx)(s.default,{style:j.capabilityDesc,children:"Compare data from 35,000+ sensors worldwide. Study regional patterns, transboundary pollution, and climate impacts."})]}),(0,L.jsxs)(t.default,{style:j.capability,children:[(0,L.jsx)(s.default,{style:j.capabilityTitle,children:"Calibration Support"}),(0,L.jsx)(s.default,{style:j.capabilityDesc,children:"EPA correction equations and co-location studies help researchers calibrate PurpleAir data and evaluate its agreement with reference monitors."})]})]})]}),(0,L.jsxs)(t.default,{style:p.MARKETING.section,children:[(0,L.jsx)(s.default,{style:j.sectionTitle,children:"Educator Resources"}),(0,L.jsx)(s.default,{style:j.sectionSubtitle,children:"Free resources to help integrate air quality education into your curriculum"}),(0,L.jsxs)(t.default,{style:p.MARKETING.grid,children:[(0,L.jsxs)(o.AppLink,{to:"Community",style:j.resourceCard,children:[(0,L.jsx)(s.default,{style:j.resourceTitle,children:"Community Forum"}),(0,L.jsx)(s.default,{style:j.resourceDesc,children:"Connect with other educators, share lesson plans, and get answers from the PurpleAir community."}),(0,L.jsx)(s.default,{style:j.resourceLink,children:"Join the Community"})]}),(0,L.jsxs)(o.AppLink,{to:"Blog",style:j.resourceCard,children:[(0,L.jsx)(s.default,{style:j.resourceTitle,children:"Blog & Articles"}),(0,L.jsx)(s.default,{style:j.resourceDesc,children:"Educational content about air quality science, health impacts, and sensor technology."}),(0,L.jsx)(s.default,{style:j.resourceLink,children:"Read the Blog"})]}),(0,L.jsxs)(y.ServiceExternalLink,{service:"dataApiDocsUrl",style:j.resourceCard,accessibilityLabel:"View API Documentation",children:[(0,L.jsx)(s.default,{style:j.resourceTitle,children:"API Documentation"}),(0,L.jsx)(s.default,{style:j.resourceDesc,children:"Technical documentation for students learning to work with real-world data APIs."}),(0,L.jsx)(s.default,{style:j.resourceLink,children:"View API Docs"})]})]})]}),(0,L.jsxs)(t.default,{style:[p.MARKETING.ctaSection,{backgroundColor:f.COLORS.GREEN_500}],children:[(0,L.jsx)(s.default,{style:p.MARKETING.ctaTitle,children:"Bring Air Quality Education to Your School"}),(0,L.jsx)(s.default,{style:p.MARKETING.ctaSubtitle,children:"Contact us about education pricing, bulk orders, and curriculum support."}),(0,L.jsx)(o.AppLink,{to:"Contact",style:O.ctaButton,children:(0,L.jsx)(s.default,{style:O.ctaButtonText,children:"Contact Education Team"})})]})]})]})},r(d[0]);var t=e(r(d[1])),s=e(r(d[2]));r(d[3]);var n=e(r(d[4])),l=r(d[5]),o=r(d[6]),c=r(d[7]),u=r(d[8]),h=r(d[9]),y=r(d[10]),S=r(d[11]),f=r(d[12]),p=r(d[13]),C=r(d[14]),x=r
976(d[15]),E=r(d[16]),L=r(d[17]);const b=(0,p.createHeroButtonStyles)(f.COLORS.BG_SURFACE,f.COLORS.SUCCESS),O=(0,p.createCTAButtonStyles)(f.COLORS.BG_SURFACE,f.COLORS.SUCCESS);function A({institution:e,title:n,description:l,highlight:o,url:u}){const h=(0,L.jsxs)(t.default,{style:j.program,children:[(0,L.jsx)(s.default,{style:j.programInstitution,children:e}),(0,L.jsx)(s.default,{style:j.programTitle,children:n}),(0,L.jsx)(s.default,{style:j.programDesc,children:l}),null!=o&&''!==o&&(0,L.jsx)(t.default,{style:j.highlightBadge,children:(0,L.jsx)(s.default,{style:j.highlightText,children:o})}),null!=u?(0,L.jsx)(s.default,{style:j.programLink,children:"Learn More"}):null]});return null!=u?(0,L.jsx)(c.ExternalLink,{href:u,accessibilityLabel:`Learn more about ${n}`,children:h}):h}function T({title:e,description:n}){return(0,L.jsxs)(t.default,{style:j.benefit,children:[(0,L.jsx)(s.default,{style:j.benefitTitle,children:e}),(0,L.jsx)(s.default,{style:j.benefitDesc,children:n})]})}const j=(0,l.createStyles)({container:{backgroundColor:f.COLORS.BG_SURFACE,flex:1},statsBar:{alignItems:'center',backgroundColor:f.COLORS.SUCCESS_BG,flexDirection:'row',flexWrap:'wrap',gap:C.SPACING.XXL,justifyContent:'center',paddingHorizontal:C.SPACING.XXL,paddingVertical:C.SPACING.XXXL},statItem:{alignItems:'center',minWidth:140},statNumber:{color:f.COLORS.SUCCESS,fontSize:x.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:C.SPACING.XS},statLabel:{color:f.COLORS.TEXT_MEDIUM,fontSize:x.FONT_SIZE.MD,textAlign:'center'},statDivider:{backgroundColor:f.COLORS.BORDER_DEFAULT,height:40,width:1},sectionHeader:{alignSelf:'center',marginBottom:C.SPACING.HUGE,maxWidth:700},sectionLabel:{color:f.COLORS.SUCCESS,fontSize:x.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:C.SPACING.MD,textAlign:'center'},sectionTitle:Object.assign({color:f.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:C.SPACING.LG,textAlign:'center'},{fontSize:x.FONT_SIZE.DISPLAY_ML}),sectionTitleLight:Object.assign({color:f.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:C.SPACING.LG,textAlign:'center'},{fontSize:x.FONT_SIZE.DISPLAY_ML}),sectionDesc:{color:f.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.XL,lineHeight:28,textAlign:'center'},sectionDescLight:{color:f.COLORS.OVERLAY_LIGHT_85,fontSize:x.FONT_SIZE.XL,lineHeight:28,marginBottom:C.SPACING.HUGE,textAlign:'center'},sectionSubtitle:{color:f.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.XL,marginBottom:C.SPACING.HUGE,textAlign:'center'},benefit:{backgroundColor:f.COLORS.SUCCESS_BG,borderLeftColor:f.COLORS.GREEN_500,borderLeftWidth:4,borderRadius:12,padding:C.SPACING.XXL,width:260},benefitGrid:{maxWidth:900},benefitTitle:{color:f.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.LG,fontWeight:'600',marginBottom:C.SPACING.SM},benefitDesc:{color:f.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.MD,lineHeight:22},programsSection:{backgroundColor:f.COLORS.SUCCESS},program:{backgroundColor:f.COLORS.OVERLAY_LIGHT_10,borderRadius:12,padding:C.SPACING.XXL,width:280},programInstitution:{color:f.COLORS.OVERLAY_LIGHT_70,fontSize:x.FONT_SIZE.XS,fontWeight:'600',letterSpacing:1,marginBottom:C.SPACING.SM},programTitle:{color:f.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:C.SPACING.MD},programDesc:{color:f.COLORS.OVERLAY_LIGHT_85,fontSize:x.FONT_SIZE.MD,lineHeight:22,marginBottom:C.SPACING.LG},highlightBadge:{alignSelf:'flex-start',backgroundColor:f.COLORS.OVERLAY_LIGHT_20,borderRadius:12,paddingHorizontal:C.SPACING.MD,paddingVertical:C.SPACING.XS},highlightText:{color:f.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.XS,fontWeight:'600'},programLink:{color:f.COLORS.OVERLAY_LIGHT_90,fontSize:x.FONT_SIZE.SM,fontWeight:'600',marginTop:C.SPACING.MD},universityCard:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:C.SPACING.XXL,width:320},universityName:{color:f.COLORS.SUCCESS,fontSize:x.FONT_SIZE.MD,fontWeight:'600',marginBottom:C.SPACING.XS},universityProgram:{color:f.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:C.SPACING.MD},universityDesc:{color:f.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.MD,lineHeight:22},universityLink:{color:f.COLORS.SUCCESS,fontSize:x.FONT_SIZE.SM,fontWeight:'600',marginTop:C.SPACING.MD},capabilitiesSection:{backgroundColor:f.COLORS.BG_LIGHT},capability:{alignItems:'center',textAlign:'center',width:220},capabilityGrid:{marginTop:C.SPACING.HUGE,maxWidth:900},capabilityTitle:{color:f.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:C.SPACING.SM,textAlign:'center'},capabilityDesc:{color:f.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.MD,lineHeight:22,textAlign:'center'},resourceCard:{backgroundColor:f.COLORS.BG_SURFACE,borderColor:f.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:C.SPACING.XXL,width:300},resourceTitle:{color:f.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:C.SPACING.MD},resourceDesc:{color:f.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.MD,lineHeight:22,marginBottom:C.SPACING.LG},resourceLink:{color:f.COLORS.SUCCESS,fontSize:x.FONT_SIZE.MD,fontWeight:'600'}})},876,[34,276,222,95,283,489,516,519,674,568,522,565,490,676,493,494,562,104]);
977__d(function(g,r,i,a,m,_e,d){"use strict";
977Object.defineProperty(_e,'__esModule',{value:!0}),_e.ExploringAirQualityScreen=function(){const{page:t,loading:e,error:n}=(0,C.usePageContent)('exploring-air-quality-across-the-globe'),u=(0,p.useSeoMeta)('ExploringAirQuality'),{isDevTriggered:f,surface:S}=(0,x.useErrorSurface)(O.contentLoad),I=n??(f?'Content not found.':null);if(e)return(0,A.jsx)(c.MarkdownPageLoading,{});if(null!=I||null==t)return(0,A.jsx)(c.MarkdownPageError,{message:I??'Content not found.',surface:S});return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(s.WebMeta,Object.assign({},u)),(0,A.jsx)(c.MarkdownPage,{title:t.title,body:t.body,footer:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(l.AppLink,{to:"Papers",style:P.ctaButton,children:(0,A.jsx)(o.default,{style:P.ctaButtonText,children:"View Research Papers"})}),(0,A.jsx)(l.AppLink,{to:"Contact",style:P.contactButton,children:(0,A.jsx)(o.default,{style:P.contactButtonText,children:"Contact Us"})})]})})]})},r(d[0]);var t,e=r(d[1]),o=(t=e)&&t.__esModule?t:{default:t},n=r(d[2]),l=r(d[3]),c=r(d[4]),s=r(d[5]),u=r(d[6]),f=r(d[7]),S=r(d[8]),x=r(d[9]),C=r(d[10]),p=r(d[11]),A=r(d[12]);const O=(0,x.defineScreenErrorSurfaces)('ExploringAirQuality',{contentLoad:{id:'content-load',kind:'page',label:'Exploring air quality content load error'}});const P=(0,n.createStyles)({contactButton:{borderColor:u.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:2,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.MD},contactButtonText:{color:u.COLORS.ACTION_PRIMARY,fontSize:S.FONT_SIZE.LG,fontWeight:'600'},ctaButton:{backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.LG,marginBottom:f.SPACING.MD},ctaButtonText:{color:u.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'}})},877,[34,222,489,516,566,565,490,493,494,557,559,562,104]);
978__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FAQScreen=function(){const e=(0,R.useSeoMeta)('FAQ'),{data:s,loading:c,error:f,retry:A}=(0,x.useAsyncData)(()=>u.faqApi.getItems(),[],'Failed to load FAQs.'),{isDevTriggered:L,surface:p}=(0,T.useErrorSurface)(j.faqLoad),b=f??(L?'Failed to load FAQ content.':null),[w,G]=(0,t.useState)(new Set),X=(0,t.useCallback)(e=>{G(t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o})},[]);return(0,N.jsxs)(O.PageLayout,{children:[(0,N.jsx)(h.WebMeta,Object.assign({},e)),(0,N.jsxs)(l.default,{style:E.container,children:[(0,N.jsx)(y.HeroSection,{backgroundColor:I.COLORS.TEAL_DARK,background:{imageUrl:'https://images.unsplash.com/photo-1755690042574-49ff5c3bfe96?w=1920&q=80',imagePosition:'center 40%'},minHeight:300,label:"HELP & SUPPORT",title:"Frequently Asked Questions",subtitle:"Find answers to common questions about PurpleAir sensors, air quality data, setup, and more.",centered:!0}),(0,N.jsxs)(o.default,{style:E.contentSection,children:[c?(0,N.jsx)(C.LoadingState,{message:"Loading FAQs..."}):null!=b?(0,N.jsx)(C.ErrorState,{message:b,surface:p,onRetry:A}):0===(s??[]).length?(0,N.jsx)(C.EmptyState,{message:"No FAQs available yet. Check back soon."}):(0,N.jsx)(o.default,{style:E.accordionList,children:(s??[]).map(e=>(0,N.jsx)(P,{item:e,isOpen:w.has(e.topicId),onToggle:()=>{X(e.topicId)}},e.topicId))}),(0,N.jsxs)(o.default,{style:E.communityCallout,children:[(0,N.jsx)(n.default,{style:E.communityCalloutTitle,children:"Did not find what you were looking for?"}),(0,N.jsx)(n.default,{style:E.communityCalloutText,children:"Browse the community forum for more topics, or ask a question."}),(0,N.jsx)(S.AppLink,{to:"Community",style:E.communityButton,children:(0,N.jsx)(n.default,{style:E.communityButtonText,children:"Visit Community"})})]})]})]})]})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),s=e(r(d[3]));r(d[4]);var l=e(r(d[5])),c=r(d[6]),u=r(d[7]),S=r(d[8]),C=r(d[9]),f=r(d[10]),y=r(d[11]),O=r(d[12]),A=r(d[13]),h=r(d[14]),I=r(d[15]),L=r(d[16]),p=r(d[17]),T=r(d[18]),x=r(d[19]),R=r(d[20]),b=r(d[21]),N=r(d[22]);const j=(0,T.defineScreenErrorSurfaces)('FAQ',{faqLoad:{id:'faq-load',kind:'page',label:'FAQ load error'}});function P({item:e,isOpen:t,onToggle:l}){const{hovered:c,webHoverProps:u}=(0,b.useWebHover)();return(0,N.jsxs)(o.default,{style:E.accordionItem,children:[(0,N.jsxs)(s.default,Object.assign({style:[E.questionRow,c&&!t&&E.questionRowH
978overed],onPress:l,activeOpacity:.8,accessibilityRole:"button",accessibilityLabel:e.question,accessibilityState:{expanded:t}},u,{children:[(0,N.jsx)(n.default,{style:E.questionText,children:e.question}),(0,N.jsx)(n.default,{style:E.chevron,children:t?'\u2212':'+'})]})),t&&(0,N.jsxs)(o.default,{style:E.answerContainer,children:[(0,N.jsx)(f.DiscourseHtmlBody,{html:e.answerHtml,fallbackStyle:E.answerFallback}),(0,N.jsx)(S.AppLink,{to:"CommunityTopic",href:(0,A.buildCommunityTopicPath)(e.topicSlug,e.topicId),style:E.viewDiscussionLink,children:(0,N.jsx)(n.default,{style:E.viewDiscussionText,children:"View discussion in community"})})]})]})}const E=(0,c.createStyles)({accordionItem:{borderBottomColor:I.COLORS.BORDER,borderBottomWidth:1},accordionList:{gap:0},answerContainer:{paddingBottom:L.SPACING.XXL,paddingHorizontal:L.SPACING.XS},answerFallback:{color:I.COLORS.TEXT_DARK,fontSize:p.FONT_SIZE.LG,lineHeight:24},chevron:{color:I.COLORS.ACTION_PRIMARY,fontSize:p.FONT_SIZE.XXXL,fontWeight:'300',textAlign:'center',width:28},communityButton:{backgroundColor:I.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:L.SPACING.XXL,paddingVertical:L.SPACING.MD},communityButtonText:{color:I.COLORS.TEXT_INVERSE,fontSize:p.FONT_SIZE.LG,fontWeight:'600'},communityCallout:{alignItems:'center',backgroundColor:I.COLORS.BG_LIGHT,borderColor:I.COLORS.BORDER,borderRadius:12,borderWidth:1,marginTop:L.SPACING.MASSIVE,padding:L.SPACING.XXXL},communityCalloutText:{color:I.COLORS.TEXT_SOFT,fontSize:p.FONT_SIZE.LG,lineHeight:22,marginBottom:L.SPACING.XL,textAlign:'center'},communityCalloutTitle:{color:I.COLORS.TEXT_HEADING,fontSize:p.FONT_SIZE.XXL,fontWeight:'600',marginBottom:L.SPACING.SM,textAlign:'center'},container:{backgroundColor:I.COLORS.BG_SURFACE,flex:1},contentSection:{alignSelf:'center',maxWidth:800,paddingHorizontal:L.SPACING.XXL,paddingVertical:L.SPACING.MASSIVE,width:'100%'},questionRow:Object.assign({alignItems:'center',flexDirection:'row',justifyContent:'space-between',paddingHorizontal:L.SPACING.XS,paddingVertical:L.SPACING.XL},{cursor:'pointer'}),questionRowHovered:{backgroundColor:I.COLORS.BG_FAINT},questionText:{color:I.COLORS.TEXT_HEADING,flex:1,fontSize:p.FONT_SIZE.XL,fontWeight:'600',lineHeight:24,marginRight:L.SPACING.LG},viewDiscussionLink:{marginTop:L.SPACING.LG,paddingVertical:L.SPACING.XS},viewDiscussionText:{color:I.COLORS.ACTION_PRIMARY,fontSize:p.FONT_SIZE.MD,fontWeight:'500'}})},878,[34,276,222,488,95,283,489,879,516,512,736,674,568,518,565,490,493,494,557,561,562,609,104]);
979__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"faqApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]);const n={getItems:async()=>t.community.getFaq()}},879,[471]);
980__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.GovernmentScreen=function(){const e=(0,O.useSeoMeta)('Government');return(0,C.jsxs)(f.PageLayout,{children:[(0,C.jsx)(S.WebMeta,Object.assign({},e)),(0,C.jsxs)(n.default,{style:j.container,children:[(0,C.jsx)(u.HeroSection,{backgroundColor:h.COLORS.BLUE_DARK,background:{imageUrl:"https://images.unsplash.com/photo-1594581979864-36977b15d0dc?w=1920&q=80",imagePosition:"center 60%"},minHeight:500,label:"FOR GOVERNMENT",title:'Protecting Communities\nwith Real-Time Air Quality Data',subtitle:"From the EPA Fire and Smoke Map to municipal sensor networks, government agencies trust PurpleAir to deliver accurate, hyper-local air quality information to protect public health.",centered:!1,children:(0,C.jsxs)(t.default,{style:y.MARKETING.heroActions,children:[(0,C.jsx)(o.AppLink,{to:"Contact",style:L.primaryButton,children:(0,C.jsx)(s.default,{style:L.primaryButtonText,children:"Contact Sales"})}),(0,C.jsx)(c.ExternalLink,{href:"https://fire.airnow.gov",style:L.secondaryButton,children:(0,C.jsx)(s.default,{style:L.secondaryButtonText,children:"View Fire & Smoke Map"})})]})}),(0,C.jsxs)(t.default,{style:j.trustedSection,children:[(0,C.jsx)(s.default,{style:j.trustedLabel,children:"DATA USED BY"}),(0,C.jsxs)(t.default,{style:j.trustedLogos,children:[(0,C.jsx)(s.default,{style:j.trustedOrg,children:"U.S. EPA"}),(0,C.jsx)(s.default,{style:j.trustedDivider,children:"|"}),(0,C.jsx)(s.default,{style:j.trustedOrg,children:"U.S. Forest Service"}),(0,C.jsx)(s.default,{style:j.trustedDivider,children:"|"}),(0,C.jsx)(s.default,{style:j.trustedOrg,children:"National Park Service"}),(0,C.jsx)(s.default,{style:j.trustedDivider,children:"|"}),(0,C.jsx)(s.default,{style:j.trustedOrg,children:"BC Ministry of Environment"}),(0,C.jsx)(s.default,{style:j.trustedDivider,children:"|"}),(0,C.jsx)(s.default,{style:j.trustedOrg,children:"NSW EPA (Australia)"}),(0,C.jsx)(s.default,{style:j.trustedDivider,children:"|"}),(0,C.jsx)(s.default,{style:j.trustedOrg,children:"Alberta Environment"})]})]}),(0,C.jsx)(t.default,{style:j.featuredSection,children:(0,C.jsxs)(t.default,{style:j.featuredContent,children:[(0,C.jsx)(s.default,{style:j.featuredLabel,children:"FEATURED INTEGRATION"}),(0,C.jsx)(s.default,{style:j.featuredTitle,children:"AirNow Fire and Smoke Map"}),(0,C.jsx)(s.default,{style:j.featuredDesc,children:"The U.S. EPA and U.S. Forest Service integrate PurpleAir sensor data into the official Fire and Smoke Map at fire.airnow.gov. This collaboration supplements regulatory-grade monitors with thousands of community sensors, providing comprehensive PM2.5 coverage during wildfire events."}),(0,C.jsxs)(t.default,{style:j.featuredStats,children:[(0,C.jsxs)(t.default,{style:j.stat,children:[(0,C.jsx)(s.default,{style:j.statNumber,children:"35,000+"}),(0,C.jsx)(s.default,{style:j.statLabel,children:"Sensors Worldwide"})]}),(0,C.jsxs)(t.default,{style:j.stat,children:[(0,C.jsx)(s.default,{style:j.statNumber,children:"Real-Time"}),(0,C.jsx)(s.default,{style:j.statLabel,children:"Data Updates"})]}),(0,C.jsxs)(t.default,{style:j.stat,children:[(0,C.jsx)(s.default,{style:j.statNumber,children:"EPA"}),(0,C.jsx)(s.default,{style:j.statLabel,children:"US-wide correction"})]})]}),(0,C.jsx)(c.ExternalLink,{style:j.featuredButton,href:"https://www.epa.gov/sciencematters/epa-research-improves-air-quality-information-public-airnow-fire-and-smoke-map",children:(0,C.jsx)(s.default,{style:j.featuredButtonText,children:"Learn About EPA Integration"})})]})}),(0,C.jsxs)(t.default,{style:j.section,children:[(0,C.jsx)(s.default,{style:j.sectionTitle,children:"Government Use Cases"}),(0,C.jsx)(s.default,{style:j.sectionSubtitle,children:"How federal, state, and local agencies leverage PurpleAir for public health protection"}),(0,C.jsxs)(t.default,{style:y.MARKETING.grid,children:[(0,C.jsx)(c.ExternalLink,{href:"https://fire.airnow.gov",children:(0,C.jsxs)(t.default,{style:j.feature,children:[(0,C.jsx)(s.default,{style:j.featureTitle,children:"Emergency Re
980sponse"}),(0,C.jsx)(s.default,{style:j.featureDesc,children:"Monitor air quality during wildfires, industrial accidents, and natural disasters. Provide real-time health advisories to affected communities."}),(0,C.jsx)(s.default,{style:j.featureLink,children:"View Fire & Smoke Map"})]})}),(0,C.jsx)(c.ExternalLink,{href:"https://www.epa.gov/sciencematters/epas-air-sensor-toolbox-offers-new-tools-community-led-air-monitoring",children:(0,C.jsxs)(t.default,{style:j.feature,children:[(0,C.jsx)(s.default,{style:j.featureTitle,children:"Community Air Monitoring"}),(0,C.jsx)(s.default,{style:j.featureDesc,children:"Deploy sensors in communities near industrial facilities. Give residents access to hyperlocal air quality data for informed decision-making."}),(0,C.jsx)(s.default,{style:j.featureLink,children:"EPA Community Monitoring"})]})}),(0,C.jsx)(c.ExternalLink,{href:"https://doee.dc.gov/service/purpleair-sensor-project",children:(0,C.jsxs)(t.default,{style:j.feature,children:[(0,C.jsx)(s.default,{style:j.featureTitle,children:"Municipal Networks"}),(0,C.jsx)(s.default,{style:j.featureDesc,children:"Create city-wide sensor networks for comprehensive air quality coverage. Support smart city initiatives with hyper-local data."}),(0,C.jsx)(s.default,{style:j.featureLink,children:"D.C. Case Study"})]})}),(0,C.jsx)(c.ExternalLink,{href:"https://www.epa.gov/air-sensor-toolbox",children:(0,C.jsxs)(t.default,{style:j.feature,children:[(0,C.jsx)(s.default,{style:j.featureTitle,children:"Regulatory Supplement"}),(0,C.jsx)(s.default,{style:j.featureDesc,children:"Fill gaps between regulatory monitors with low-cost sensors. Provide ground-level data that researchers compare with satellite-based estimates."}),(0,C.jsx)(s.default,{style:j.featureLink,children:"EPA Sensor Toolbox"})]})})]})]}),(0,C.jsxs)(t.default,{style:[j.section,j.caseStudiesSection],children:[(0,C.jsx)(s.default,{style:y.MARKETING.sectionTitleLight,children:"Success Stories"}),(0,C.jsxs)(t.default,{style:y.MARKETING.gridWide,children:[(0,C.jsx)(E,{organization:"Washington, D.C.",title:"District-Wide Sensor Network",description:"The D.C. Department of Energy and Environment distributes PurpleAir sensors to residents, enabling localized monitoring across neighborhoods.",metrics:['Community-hosted','Real-time data','District-wide'],url:"https://doee.dc.gov/service/purpleair-sensor-project"}),(0,C.jsx)(E,{organization:"Minneapolis, Minnesota",title:"100+ Sensor Network",description:"Over 100 sensors including 80 resident-hosted PurpleAir devices provide hyperlocal coverage, informing targeted environmental policies.",metrics:['100+ Sensors','80 Resident Hosts','Policy Impact'],url:"https://www.pca.state.mn.us/news-and-stories/community-air-monitoring-grants"}),(0,C.jsx)(E,{organization:"Hawaii Department of Health",title:"Volcanic Smog Monitoring",description:"Community-operated PurpleAir sensors monitor PM2.5 across Hawai\u02bbi Island during K\u012blauea volcanic emissions, providing residents with real-time, island-wide particle data through public air quality resources.",metrics:['PM2.5 Monitoring','Community Network','Island-Wide'],url:"https://vog.ivhhn.org/current-air-quality"}),(0,C.jsx)(E,{organization:"National Park Service",title:"Smoke Impact Tracking",description:"NPS integrates PurpleAir sensors to monitor air quality in national parks, track wildfire smoke impacts, and inform visitor health advisories.",metrics:['Park Coverage','Visitor Safety','Smoke Tracking'],url:"https://www.nps.gov/articles/smoke-monitoring-pilot.htm"})]})]}),(0,C.jsxs)(t.default,{style:j.section,children:[(0,C.jsx)(s.default,{style:y.MARKETING.sectionTitle,children:"Built for Government"}),(0,C.jsxs)(t.default,{style:y.MARKETING.grid,children:[(0,C.jsxs)(t.default,{style:j.featureCard,children:[(0,C.jsx)(s.default,{style:j.featureCardTitle,children:"Data API Access"}),(0,C.jsx)(s.default,{style:j.featureCardDesc,children:"Integrate sensor data directly into existing systems with our comprehensive REST API. Support for real-time and historical data queries."})]}),(0,C.jsxs)(t.default,{style:j.featureCard,children:[(0,C.jsx)(s.default,{style:j.featureCardTitle,children:"Bulk Deployment"}),(0,C.jsx)(s.default,{style:j.featureCardDesc,children:"Streamlined procurement and deployment for large-scale sensor networks. Dedicated support for government purchasing processes."})]}),(0,C.jsxs)(t.default,{style:j.featureCard,children:[(0,C.jsx)(s.default,{style:j.featureCardTitle,children:"Data Correction"}),(0,C.jsx)(s.default,{style:j.featureCardDesc,children:"EPA scientists developed a US-wide correction specifically for PurpleAir\u2014so Fire and Smoke Map readings can be compared alongside regulatory monitors."})]}),(0,C.jsxs)(t.default,{style:j.featureCard,children:[(0,C.jsx)(s.default,{style:j.featureCardTitle,children:"Public Transparency"}),(0,C.jsx)(s.default,{style:j.featureCardDesc,children:"Share air quality data with communities through embeddable widgets, public dashboards, and the PurpleAir Map."})]})]})]}),(0,C.jsxs)(t.default,{style:[y.MARKETING.ctaSection,{backgroundColor:h.COLORS.BLUE}],children:[(0,C.jsx)(s.default,{style:y.MARKETING.ctaTitle,children:"Ready to Protect Your Community?"}),(0,C.jsx)(s.default,{style:y.MARKETING.ctaSubtitle,children:"Contact our government sales team to discu
980ss your air quality monitoring needs."}),(0,C.jsx)(o.AppLink,{to:"Contact",style:T.ctaButton,children:(0,C.jsx)(s.default,{style:T.ctaButtonText,children:"Get Started"})})]})]})]})},r(d[0]);var t=e(r(d[1])),s=e(r(d[2]));r(d[3]);var n=e(r(d[4])),l=r(d[5]),o=r(d[6]),c=r(d[7]),u=r(d[8]),f=r(d[9]),S=r(d[10]),h=r(d[11]),y=r(d[12]),p=r(d[13]),x=r(d[14]),O=r(d[15]),C=r(d[16]);const L=(0,y.createHeroButtonStyles)(h.COLORS.BG_SURFACE,h.COLORS.BLUE_DARK),T=(0,y.createCTAButtonStyles)(h.COLORS.BG_SURFACE,h.COLORS.BLUE);function E({title:e,organization:n,description:l,metrics:o,url:u}){const f=(0,C.jsxs)(t.default,{style:j.caseStudy,children:[(0,C.jsx)(s.default,{style:j.caseStudyOrg,children:n}),(0,C.jsx)(s.default,{style:j.caseStudyTitle,children:e}),(0,C.jsx)(s.default,{style:j.caseStudyDesc,children:l}),o&&o.length>0&&(0,C.jsx)(t.default,{style:j.metricsRow,children:o.map(n=>(0,C.jsx)(t.default,{style:j.metricBadge,children:(0,C.jsx)(s.default,{style:j.metricText,children:n})},`${e}-${n}`))}),null!=u?(0,C.jsx)(s.default,{style:j.caseStudyLink,children:"Learn More"}):null]});return null!=u?(0,C.jsx)(c.ExternalLink,{href:u,children:f}):f}const j=(0,l.createStyles)({container:{backgroundColor:h.COLORS.BG_SURFACE,flex:1},trustedSection:{alignItems:'center',backgroundColor:h.COLORS.BG_LIGHT,paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.XXL},trustedLabel:{color:h.COLORS.TEXT_SOFT,fontSize:x.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:p.SPACING.MD},trustedLogos:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.SM,justifyContent:'center'},trustedOrg:{color:h.COLORS.TEXT_DARK,fontSize:x.FONT_SIZE.MD,fontWeight:'600'},trustedDivider:{color:h.COLORS.BORDER_SOFT},featuredSection:{backgroundColor:h.COLORS.BLUE_BG_SUBTLE,paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.JUMBO},featuredContent:{alignSelf:'center',maxWidth:900,width:'100%'},featuredLabel:{color:h.COLORS.BLUE,fontSize:x.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:p.SPACING.MD},featuredTitle:Object.assign({color:h.COLORS.BLUE_DARK,fontSize:x.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:p.SPACING.LG},{fontSize:x.FONT_SIZE.DISPLAY_LG}),featuredDesc:Object.assign({color:h.COLORS.TEXT_MEDIUM,fontSize:x.FONT_SIZE.XL,lineHeight:28,marginBottom:p.SPACING.XXXL},{maxWidth:700}),featuredStats:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.XXXL,marginBottom:p.SPACING.XXXL},stat:{minWidth:120},statNumber:{color:h.COLORS.BLUE,fontSize:x.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:p.SPACING.XS},statLabel:{color:h.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.MD},featuredButton:{alignSelf:'flex-start',backgroundColor:h.COLORS.BLUE,borderRadius:8,paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.LG},featuredButtonText:{color:h.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.LG,fontWeight:'600'},section:{paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.JUMBO},sectionTitle:Object.assign({color:h.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:p.SPACING.MD,textAlign:'center'},{fontSize:x.FONT_SIZE.DISPLAY_ML}),sectionSubtitle:{alignSelf:'center',color:h.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.XL,marginBottom:p.SPACING.HUGE,maxWidth:600,textAlign:'center'},feature:{backgroundColor:h.COLORS.BG_LIGHT,borderRadius:12,padding:p.SPACING.XXL,width:280},featureTitle:{color:h.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:p.SPACING.SM},featureDesc:{color:h.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.LG,lineHeight:24,marginBottom:p.SPACING.MD},featureLink:{color:h.COLORS.BLUE,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},caseStudiesSection:{backgroundColor:h.COLORS.BLUE_DARK},caseStudy:{backgroundColor:h.COLORS.OVERLAY_LIGHT_10,borderRadius:12,padding:p.SPACING.XXL,width:280},caseStudyOrg:{color:h.COLORS.OVERLAY_LIGHT_70,fontSize:x.FONT_SIZE.XS,fontWeight:'600',letterSpacing:1,marginBottom:p.SPACING.SM},caseStudyTitle:{color:h.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:p.SPACING.MD},caseStudyDesc:{color:h.COLORS.OVERLAY_LIGHT_85,fontSize:x.FONT_SIZE.MD,lineHeight:22,marginBottom:p.SPACING.LG},caseStudyLink:{color:h.COLORS.OVERLAY_LIGHT_90,fontSize:x.FONT_SIZE.SM,fontWeight:'600',marginTop:p.SPACING.SM},metricsRow:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.SM},metricBadge:{backgroundColor:h.COLORS.OVERLAY_LIGHT_15,borderRadius:12,paddingHorizontal:p.SPACING.MD,paddingVertical:p.SPACING.XS},metricText:{color:h.COLORS.TEXT_INVERSE,fontSize:x.FONT_SIZE.XS,fontWeight:'500'},featureCard:{backgroundColor:h.COLORS.BG_SURFACE,borderColor:h.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:p.SPACING.XXL,width:280},featureCardTitle:{color:h.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XL,fontWeight:'600',marginBottom:p.SPACING.MD},featureCardDesc:{color:h.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.LG,lineHeight:24}})},880,[34,276,222,95,283,489,516,519,674,568,565,490,676,493,494,562,104]);
981__d(function(g,r,i,a,m,e,d){"use strict";
981Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return f}}),e.HomeScreen=c,r(d[0]);var t=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),u=r(d[5]);function c(){const c=(0,s.useSeoMeta)('Home');return(0,u.jsxs)(n.PageLayout,{testID:"home-screen",children:[(0,u.jsx)(o.WebMeta,Object.assign({},c)),(0,u.jsx)(t.LandingContent,{})]})}var f=c},881,[34,882,568,565,562,104]);
982__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LandingContent=function({heroContent:t}){return(0,A.jsxs)(o.default,{style:y.root,testID:"landing-content",children:[(0,A.jsx)(O.HeroSection,{backgroundColor:l.COLORS.SKY_BLUE,background:{imageUrl:'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1920&q=80',imagePosition:'center 40%',overlayGradient:s.GRADIENTS.LANDING_OVERLAY},minHeight:450,title:"Know Your Air",subtitle:"Real-time air quality monitoring for homes, schools, businesses, and communities worldwide.",centered:!0,children:null!=t?(0,A.jsx)(o.default,{style:y.heroContent,children:t}):(0,A.jsx)(h.HeroCTAButtons,{primary:{kind:'service',label:'Explore the Map',service:'mapBaseUrl'},secondary:{kind:'internal',label:'Shop Sensors',to:'Store'}})}),(0,A.jsx)(o.default,{style:y.mapSection,children:(0,A.jsxs)(o.default,{style:y.container,children:[(0,A.jsx)(e.default,{style:c.MARKETING.sectionTitleCompact,children:"The World's Largest Air Quality Network"}),(0,A.jsx)(e.default,{style:y.sectionSubtitle,children:"Over 35,000 sensors in 100+ countries providing real-time air quality data"}),(0,A.jsxs)(o.default,{style:y.statsRow,children:[(0,A.jsxs)(o.default,{style:y.stat,children:[(0,A.jsx)(e.default,{style:y.statNumber,children:"35,000+"}),(0,A.jsx)(e.default,{style:y.statLabel,children:"Sensors"})]}),(0,A.jsxs)(o.default,{style:y.stat,children:[(0,A.jsx)(e.default,{style:y.statNumber,children:"100+"}),(0,A.jsx)(e.default,{style:y.statLabel,children:"Countries"})]}),(0,A.jsxs)(o.default,{style:y.stat,children:[(0,A.jsx)(e.default,{style:y.statNumber,children:"Real-Time"}),(0,A.jsx)(e.default,{style:y.statLabel,children:"Updates"})]}),(0,A.jsxs)(o.default,{style:y.stat,children:[(0,A.jsx)(e.default,{style:y.statNumber,children:"Free Map"}),(0,A.jsx)(e.default,{style:y.statLabel,children:"Public Access"})]})]}),(0,A.jsx)(p.ServiceExternalLink,{service:"mapBaseUrl",style:y.mapButton,textStyle:y.mapButtonText,accessibilityLabel:"View Live Map",children:"View Live Map"})]})}),(0,A.jsx)(o.default,{style:y.solutions,children:(0,A.jsxs)(o.default,{style:y.container,children:[(0,A.jsx)(e.default,{style:c.MARKETING.sectionTitleCompact,children:"Solutions for Everyone"}),(0,A.jsx)(e.default,{style:y.sectionSubtitle,children:"From personal home monitoring to enterprise-scale deployments"}),(0,A.jsxs)(o.default,{style:y.solutionsGrid,children:[(0,A.jsx)(L,{icon:"home",title:"Personal",description:"Monitor indoor and outdoor air quality at home. Protect your family from wildfire smoke, pollution, and allergens.",to:"Personal"}),(0,A.jsx)(L,{icon:"building",title:"Business",description:"Workplace air quality, facility monitoring, and ESG reporting with professional-grade sensors.",to:"Business"}),(0,A.jsx)(L,{icon:"graduation",title:"Education",description:"STEM learning with real-time data. Air quality curriculum for K-12 schools and university research programs.",to:"Education"}),(0,A.jsx)(L,{icon:"broadcast",title:"Broadcasters",description:"Integrate air quality data into weather reports, news broadcasts, and digital platforms.",to:"Broadcasters"}),(0,A.jsx)(L,{icon:"government",title:"Government",description:"Supplement regulatory networks with hyperlocal data. Emergency response and community air monitoring.",to:"Government"})]})]})}),(0,A.jsxs)(o.default,{style:[c.MARKETING.ctaSection,y.ctaSectionBg],children:[(0,A.jsx)(e.default,{style:c.MARKETING.ctaTitle,children:"Start Monitoring Today"}),(0,A.jsx)(e.default,{style:c.MARKETING.ctaSubtitle,children:"Join the world's largest community-driven air quality network"}),(0,A.jsxs)(o.default,{style:c.MARKETING.ctaActions,children:[(0,A.jsx)(f.AppLink,{to:"Store",style:x.ctaButton,children:(0,A.jsx)(e.default,{style:x.ctaButtonText,children:"Shop Sensors"})}),(0,A.jsx)(p.ServiceExternalLink,{service:"mapBaseUrl",style:x.ctaSecondaryButton,children:(0,A.jsx)(e.default,{style:x.ctaSecondaryButtonText,children:"Explore the Map"})})]})]})]})},r(d[0]),r(d[1]);var e=t(r(d[2])),o=t(r(d[3])),n=r(d[4]),l=r(d[5]),s=r(d[6]),c=r(d[7]),u=r(d[8]),S=r(d[9]),f=r(d[10]),h=r(d[11]),O=r(d[12]),C=r(d[13]),p=r(d[14]),A=r(d[15]);function L({title:t,description:o,icon:n,to:l}){return(0,A.jsxs)(f.AppLink,{to:l,style:y.solutionCard,children:[(0,A.jsx)(C.UseCaseIcon,{name:n,size:36}),(0,A.jsx)(e.default,{style:y.solutionTitle,children:t}),(0,A.jsx)(e.default,{style:y.solutionDescription,children:o}),(0,A.jsx)(e.default,{style:y.solutionLink,children:"Learn more"})]})}const x=(0,c.createCTAButtonStyles)(l.COLORS.TEXT_INVERSE,l.COLORS.ACTION_PRIMARY),y=(0,n.createStyles)({container:{alignSelf:'center',maxWidth:1200,paddingHorizontal:u.SPACING.XL,width:'100%'},root:{backgroundColor:l.COLORS.BG_SUBTLE},heroContent:{maxWidth:400,width:'100%'},mapSection:{backgroundColor:l.COLORS.BG_SURFACE,paddingVertical:u.SPACING.JUMBO},sectionTitle:Object.assign({color:l.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:u.SPACING.MD,textAlign:'center'},{fontSize:S.FONT_SIZE.DISPLAY_ML}),sectionSubtitle:{alignSelf:'center',color:l.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.LG,marginBottom:u.SPACING.HUGE,maxWidth:600,textAlign:'center'},statsRow:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.XXXL,justifyContent:'center',marginBottom:u.SPACING.HUGE},stat:{alignItems:'center',minWidth:100},statNumber:{color:l.COLORS.BRAND_PRIMARY,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:u.SPACING.XS},statLabel:{color:l.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.MD},mapButton:{alignSelf:'center',backgroundColor:l.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:u.SPACING.HUGE,paddingVertical:u.SPACING.LG},mapButtonText:{color:l.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.XL,fontWeight:'600'},solutions:{backgroundColor:l.COLORS.BG_WARM,paddingVertical:u.SPACING.JUMBO},solutionsGrid:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.XXL,justifyContent:'center'},solutionCard:{alignItems:'center',backgroundColor:l.COLORS.BG_SURFACE,borderColor:l.COLORS.BORDER_LIGHT,borderRadius:16,borderWidth:1,gap:u.SPACING.MD,padding:u.SPACING.XXL,width:280},solutionTitle:{color:l.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.XXL,fontWeight:'600',textAlign:'center'},solutionDescription:{color:l.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.MD,lineHeight:22,textAlign:'center'},solutionLink:{color:l.COLORS.BRAND_PRIMARY,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},ctaSectionBg:{backgroundColor:l.COLORS.BRAND_PRIMARY,paddingHorizontal:u.SPACING.XXL,paddingVertical:u.SPACING.JUMBO},ctaTitle:Object.assign({color:l.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:u.SPACING.MD,textAlign:'center'},{fontSize:S.FONT_SIZE.DISPLAY_ML}),ctaSubtitle:{color:l.COLORS.OVERLAY_LIGHT_90,fontSize:S.FONT_SIZE.XL,marginBottom:u.SPACING.XXXL,maxWidth:500,textAlign:'center'},ctaActions:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.LG,justifyContent:'center'},ctaButton:{backgroundColor:l.COLORS.BG_SURFACE,borderRadius:8,paddingHorizontal:u.SPACING.HUGE,paddingVertical:u.SPACING.LG},ctaButtonText:{color:l.COLORS.ACTION_PRIMARY,fontSize:S.FONT_SIZE.XL,fontWeight:'600'},ctaSecondaryButton:{backgroundColor:l.COLORS.TRANSPARENT,borderColor:l.COLORS.OVERLAY_LIGHT_30,borderRadius:8,borderWidth:2,paddingHorizontal:u.SPACING.HUGE,paddingVertical:u.SPACING.LG},ctaSecondaryButtonText:{color:l.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.XL,fontWeight:'600'}})},882,[34,95,222,276,489,490,675,676,493,494,516,515,674,883,522,104]);
983__d(function(g,r,i,a,m,_e,d){"use strict";
983function v(v){return v&&v.__esModule?v:{default:v}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.UseCaseIcon=function(v){const{name:c,size:n=32,color:s}=v,o=s??e.COLORS.BRAND_PRIMARY;return(0,z.jsx)(h.default,{style:[t.circle,{width:n+24,height:n+24,borderRadius:(n+24)/2}],children:(0,z.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:o,xmlns:"http://www.w3.org/2000/svg",children:(0,z.jsx)("path",{d:l[c]})})})},r(d[0]),r(d[1]);v(r(d[2]));var h=v(r(d[3])),c=r(d[4]),e=r(d[5]),z=r(d[6]);const l={fire:'M12 23c-3.6 0-7-2.74-7-7.2 0-3.26 2.3-6.49 4.03-8.55.37-.45 1.07-.36 1.32.16.6 1.22 1.77 2.3 2.88 2.3.6 0 1.07-.22 1.37-.42C13.2 5.1 12.34 2.46 12.02 1.54a.73.73 0 0 1 .72-1c2.03.12 4.53 2.26 5.86 4.78C19.86 7.63 20 10.14 20 11.5 20 17.5 16.75 23 12 23zm-1.53-8.85c-.55.95-.47 2.3.2 3.1.63.76 1.58.75 2.12.43.55-.33.82-.98.82-1.68 0-1.03-.67-2.14-1.34-2.8a.5.5 0 0 0-.81.13c-.22.47-.57.86-.99.82z',home:'M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z',flower:'M12 22a4 4 0 0 1-3.46-6A4 4 0 0 1 6.56 8.57 4 4 0 0 1 9.06 2.1a4 4 0 0 1 5.88 0 4 4 0 0 1 2.5 6.47A4 4 0 0 1 15.46 16 4 4 0 0 1 12 22zm0-10a2 2 0 1 0 0 4 2 2 0 0 0 0-4z',baby:'M12 2a4 4 0 0 1 4 4 4 4 0 0 1-4 4 4 4 0 0 1-4-4 4 4 0 0 1 4-4zm-1 9.29c-2.89.37-5.55 1.87-7 4.04V18h16v-2.67c-1.45-2.17-4.11-3.67-7-4.04L12 15l-1-3.71z',runner:'M13.49 5.48a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zm-3.6 13.9 1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3A7.03 7.03 0 0 0 19.49 13v-2a4.97 4.97 0 0 1-4.2-2.1l-1-1.6a2.06 2.06 0 0 0-1.7-1c-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2z',globe:'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z',microscope:'M13 11.33 18 18H6l3.53-4.71M12.98 6a2 2 0 0 0-1.98 2v4a2 2 0 0 0 1.98 2h.04a2 2 0 0 0 1.98-2V8a2 2 0 0 0-1.98-2h-.04zM5 20h14v2H5z',building:'M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z',pin:'M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z',graduation:'M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z',broadcast:'M12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 2c0-3.31-2.69-6-6-6s-6 2.69-6 6c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.48-.81 2.75-2 3.45l1 1.74c1.79-1.04 3-2.97 3-5.19zM12 3C6.48 3 2 7.48 2 13c0 3.7 2.01 6.92 4.99 8.65l1-1.73C5.61 18.53 4 15.96 4 13c0-4.42 3.58-8 8-8s8 3.58 8 8c0 2.96-1.61 5.53-4 6.92l1 1.73c2.99-1.73 5-4.95 5-8.65 0-5.52-4.48-10-10-10z',government:'M12 2L2 7v1h20V7L12 2zm0 2.24L18.47 7H5.53L12 4.24zM2 22h20v-2H2v2zm2-3h2v-7H4v7zm4 0h2v-7H8v7zm4 0h2v-7h-2v7zm4 0h2v-7h-2v7zm4 0h2v-7h-2v7z'};const t=(0,c.createStyles)({circle:{alignItems:'center',backgroundColor:e.COLORS.BRAND_PRIMARY_ALPHA_14,justifyContent:'center'}})},883,[34,95,222,276,489,490,104]);
984__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.LicenseScreen=function(){return(0,o.jsx)(n.PolicyFullPage,{errorSurface:t.contentLoad,seoKey:"License",slug:"license",policyName:"Data License"})},r(d[0]);var n=r(d[1]),c=r(d[2]),o=r(d[3]);const t=(0,c.defineScreenErrorSurfaces)('License',{contentLoad:{id:'content-load',kind:'page',label:'Data license content load error'}})},884,[34,556,557,104]);
985__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.LoginScreen=function(){const{width:e}=(0,t.default)(),{login:n,loginWithGoogle:O}=(0,s.useAuth)(),{signIn:x,configStatus:y,isLoading:G}=(0,l.useGoogleAuth)(),{isEnabled:v}=(0,w.useFeatureFlags)(),H=v('LOCAL_AUTH'),M=(0,P.useSeoMeta)('Login'),T=(0,b.useToast)(),[k,F]=(0,o.useState)(''),[N,R]=(0,o.useState)(''),[B,K]=(0,o.useState)(!1),U=e<A.BREAKPOINTS.tablet,W=e>=A.BREAKPOINTS.desktop,q=(0,o.useCallback)(async()=>
985{if(k&&N){K(!0);try{await n(k,N)}catch(e){T.error((0,_.errorMessage)(e,'Invalid credentials'),{id:'login-failed'})}finally{K(!1)}}else T.warning('Please enter email and password',{id:'login-missing-credentials'})},[k,N,n,T]),D=(0,o.useCallback)(async()=>{C.logger.debug('[LoginScreen] handleGoogleLogin() called');try{const e=await x();null!=e&&''!==e&&await O(e)}catch(e){const o=e,n=null!=o.message&&''!==o.message?o.message:'Failed to sign in with Google';T.error(n,{id:'login-google-failed'})}},[x,O,T]);return(0,E.jsxs)(S.PageLayout,{children:[(0,E.jsx)(j.WebMeta,Object.assign({},M)),(0,E.jsx)(u.HeroSection,Object.assign({backgroundColor:p.COLORS.SKY_BLUE,background:{imageUrl:'https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1920&q=80',imagePosition:`center ${String(100*I.verticalPosition)}%`},minHeight:500},W&&{stableImageFrame:I},{title:"Sign In to PurpleAir",subtitle:"Access your account to manage sensors, view data, and configure settings.",centered:!0,children:(0,E.jsx)(L.LoginForm,{localAuthEnabled:H,email:k,onEmailChange:F,password:N,onPasswordChange:R,loading:B,onLogin:()=>{q()},googleConfigStatus:y,isGoogleLoading:G,onGoogleLogin:()=>{D()},signInNote:(0,E.jsx)(h.LoginAlternateEmailNote,{}),footer:U?(0,E.jsx)(f.LoginHelpModal,{}):(0,E.jsx)(c.DisclosureSection,{title:h.LOGIN_HELP_TITLE,children:(0,E.jsx)(h.LoginHelpContent,{})})})}))]})};var e,o=r(d[0]),n=r(d[1]),t=(e=n)&&e.__esModule?e:{default:e},s=r(d[2]),l=r(d[3]),c=r(d[4]),u=r(d[5]),L=r(d[6]),h=r(d[7]),f=r(d[8]),S=r(d[9]),b=r(d[10]),j=r(d[11]),p=r(d[12]),w=r(d[13]),A=r(d[14]),P=r(d[15]),_=r(d[16]),C=r(d[17]),E=r(d[18]);const I={imageAspectRatio:1.5,verticalPosition:.4}},885,[34,552,411,886,512,674,956,957,959,568,496,565,490,607,553,562,468,469,104]);
986__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var o={};return e&&Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),o.default=e,o}Object.defineProperty(_e,'__esModule',{value:!0}),_e.useGoogleAuth=function(){const{googleClientId:e}=(0,u.useClientConfig)(),[t,s]=(0,n.useState)(!1),[c,O]=(0,n.useState)(null),f=(0,n.useRef)(!1),E=(0,n.useRef)(S()).current,b=w((0,l.isReadyStringConfigValue)(e)?e.value:''),_=!!b,P=_?'ready':e.status,y=_,T=(0,n.useMemo)(()=>o.makeRedirectUri({scheme:'com.purpleair.app',path:'auth/google'}),[]),k=(0,n.useMemo)(()=>({clientId:b||'placeholder-not-used-on-web',scopes:['openid','email','profile'],responseType:o.ResponseType.IdToken,redirectUri:T,extraParams:{nonce:E}}),[b,T,E]),[v,G,R]=o.useAuthRequest(k,h);(0,n.useEffect)(()=>{f.current=!0},[]),(0,n.useEffect)(()=>{},[G]);return{signIn:(0,n.useCallback)(async()=>{if(d.logger.debug('[OAuth] signIn() called, platform:',"web"),d.logger.debug('[OAuth] isConfigured:',_,'clientId length:',b.length),!_)throw d.logger.warn('[OAuth] Google Sign-In unavailable; no client ID configured for platform:',"web"),new Error('Google Sign-In is not available right now. Try again later.');s(!0),O(null);try{{d.logger.debug('[OAuth] Starting web popup flow');const e=await A(b);return d.logger.debug('[OAuth] Popup flow returned id_token, length:',e.length),e}}catch(e){const o=(0,p.errorMessage)(e,'Unknown error');throw d.logger.error('[OAuth] signIn() error:',o),O(o),e}finally{s(!1)}},[_,b,v,R]),isLoading:t,isAvailable:y,configStatus:P,error:c}};var o=e(r(_d[0])),t=e(r(_d[1])),n=(e(r(_d[2])),r(_d[3]));r(_d[4]);var u=r(_d[5]),l=r(_d[6]),s=(r(_d[7]),r(_d[8])),p=r(_d[9]),c=r(_d[10]),d=r(_d[11]);const h={authorizationEndpoint:'https://accounts.google.com/o/oauth2/v2/auth',tokenEndpoint:'https://oauth2.googleapis.com/token',revocationEndpoint:'https://oauth2.googleapis.com/revoke'};function w(e){return e}const O=3e5;function f(e){const o=JSON.parse(e);if('object'!=typeof o||null===o)throw new Error('Invalid OAuth result');const t={},n=(0,c.readOptionalString)(o,'idToken'),u=(0,c.readOptionalString)(o,'error');return void 0!==n&&(t.idToken=n),void 0!==u&&(t.error=u),t}async function A(e){const o=window.location.origin,t=S();return d.logger.debug('[OAuth Popup Flow] redirect_uri:',o),d.logger.debug('[OAuth Popup Flow] client_id length:',e.length),d.logger.debug('[OAuth Popup Flow] nonce:',`${t.substring(0,8)}...`),new Promise((n,u)=>{const l=new URL('https://accounts.google.com/o/oauth2/v2/auth');l.searchParams.set('client_id',e),l.searchParams.set('redirect_uri',o),l.searchParams.set('response_type','id_token'),l.searchParams.set('scope','openid email profile'),l.searchParams.set('nonce',t),l.searchParams.set('prompt','select_account'),d.logger.debug('[OAuth Popup Flow] Opening popup to:',l.origin+l.pathname);const p=window.screenX+(window.outerWidth-500)/2,c=window.screenY+(window.outerHeight-600)/2,h=window.open(l.toString(),'google-signin',`width=500,height=600,left=${p},top=${c}`);if(!h)return d.logger.error('[OAuth Popup Flow] window.open() returned null -- popup blocked'),void u(new Error('Failed to open popup. Please allow popups for this site.'));d.logger.debug('[OAuth Popup Flow] Popup opened, listening for storage event on key:',s.STORAGE_KEYS.GOOGLE_OAUTH_RESULT);let w=!1;function A(){w=!0,window.removeEventListener('storage',S),clearTimeout(E)}function S(e){const o=null!==e.newValue&&e.newValue.length>0;if(d.logger.debug('[OAuth Popup Flow] Storage event received, key:',e.key,'hasNewValue:',o),!w&&e.key===s.STORAGE_KEYS.GOOGLE_OAUTH_RESULT&&null!==e.newValue&&0!==e.newValue.length){d.logger.debug('[OAuth Popup Flow] Matched GOOGLE_OAUTH_RESULT key, parsing result'),A();try{const o=f(e.newValue);if(void 0!==o.idToken)d.logger.debug('[OAuth Popup Flow] Got id_token from popup, length:',o.idToken.length),n(o.idToken);else{d.logger.error('[OAuth Popup Flow] Popup returned error:',o.error);const e=o.error;u(new Error(void 0!==e&&e.length>0?e:'No ID token received'))}}catch{d.logger.error('[OAuth Popup Flow] Failed to parse popup result'),u(new Error('Failed to parse OAuth result'))}}}window.addEventListener('storage',S);const E=setTimeout(()=>{if(!1===w){d.logger.warn('[OAuth Popup Flow] Timed out after 5 minutes'),A();try{h.close()}catch{}u(new Error('Sign-in timed out'))}},O)})}function S(){const e=new Uint8Array(32);return'function'==typeof window.crypto.getRandomValues?window.crypto.getRandomValues(e):t.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,'0')).join('')}!(function(){const e=window.location.hash;if(0===e.length||!e.includes('id_token=')&&!e.includes('error='))return;d.logger.debug('[OAuth Popup] Detected OAuth redirect in popup window'),d.logger.debug('[OAuth Popup] Hash fragment present:',e.length,'chars');const o=new URLSearchParams(e.substring(1)),t=o.get('id_token'),n=o.get('error');null!==t&&t.length>0&&d.logger.debug('[OAuth Popup] Got id_token, length:',t.length),null!==n&&n.length>0&&d.logger.debug('[OAuth Popup] Got error:',n);const u=null!==t&&t.length>0?JSON.stringify({idToken:t}):JSON.stringify({error:null!==n&&n.length>0?n:'Unknown error'});d.logger.debug('[OAuth Popup] Writing result to localStorage key:',s.STORAGE_KEYS.GOOGLE_OAUTH_RESULT),localStorage.setItem(s.STORAGE_KEYS.GOOGLE_OAUTH_RESULT,u),localStorage.removeItem(s.STORAGE_KEYS.GOOGLE_OAUTH_RESULT),d.logger.debug('[OAuth Popup] Closing popup window'),window.close()})()},886,[887,931,889,34,95,524,531,465,484,468,467,469]);
987__d(function(g,r,i,a,m,e,d){"use strict";
987Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})});var u=r(d[4]);Object.keys(u).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}})});var f=r(d[5]);Object.keys(f).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}})});var l=r(d[6]);Object.keys(l).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var b=r(d[7]);Object.keys(b).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return b[t]}})});var p=r(d[8]);Object.keys(p).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}})});var y=r(d[9]);Object.keys(y).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return y[t]}})});var O=r(d[10]);Object.keys(O).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return O[t]}})})},887,[888,940,942,929,938,941,936,928,954,939,955]);
988__d(function(g,r,i,a,m,_e,_d){"use strict";const e=["url"];function t(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"AuthRequest",{enumerable:!0,get:function(){return C}});var n=t(r(_d[0])),o=s(r(_d[1])),c=t(r(_d[2]));r(_d[3]);var l=r(_d[4]),h=r(_d[5]),u=s(r(_d[6])),d=s(r(_d[7])),p=r(_d[8]);let y=!1;class C{url=null;constructor(e){this.responseType=e.responseType??l.ResponseType.Code,this.clientId=e.clientId,this.redirectUri=e.redirectUri,this.scopes=e.scopes,this.clientSecret=e.clientSecret,this.prompt=e.prompt,this.state=e.state??u.generateRandom(10),this.extraParams=e.extraParams??{},this.codeChallengeMethod=e.codeChallengeMethod??l.CodeChallengeMethod.S256,this.usePKCE=e.usePKCE??!0,(0,c.default)(this.codeChallengeMethod!==l.CodeChallengeMethod.Plain,"`AuthRequest` does not support `CodeChallengeMethod.Plain` as it's not secure."),(0,c.default)(this.redirectUri,"`AuthRequest` requires a valid `redirectUri`. Ex: https://yourwebsite.com/")}async getAuthRequestConfigAsync(){return this.usePKCE&&await this.ensureCodeIsSetupAsync(),{responseType:this.responseType,clientId:this.clientId,redirectUri:this.redirectUri,scopes:this.scopes,clientSecret:this.clientSecret,codeChallenge:this.codeChallenge,codeChallengeMethod:this.codeChallengeMethod,prompt:this.prompt,state:this.state,extraParams:this.extraParams,usePKCE:this.usePKCE}}async promptAsync(t,s={}){let{url:l}=s,h=(0,n.default)(s,e);if(!l){if(!this.url)return this.promptAsync(t,Object.assign({},h,{url:await this.makeAuthUrlAsync(t)}));l=this.url}(0,c.default)(l,'No authUrl provided to AuthSession.startAsync. An authUrl is required -- it points to the page where the user will be able to sign in.');const u=l,d=this.redirectUri;if(y)return{type:'locked'};let p;y=!0;
988try{p=await o.openAuthSessionAsync(u,d,h)}finally{y=!1}if('opened'===p.type)throw new Error('An unexpected error occurred');return'success'!==p.type?{type:p.type}:this.parseReturnUrl(p.url)}parseReturnUrl(e){const{params:t,errorCode:s}=d.getQueryParams(e),{state:n,error:o=s}=t;let c=null,l=null;return n!==this.state?c=new h.AuthError({error:'state_mismatch',error_description:'Cross-Site request verification failed. Cached state and returned state do not match.'}):o&&(c=new h.AuthError(Object.assign({error:o},t))),t.access_token&&(l=p.TokenResponse.fromQueryParams(t)),{type:c?'error':'success',error:c,url:e,params:t,authentication:l,errorCode:s}}async makeAuthUrlAsync(e){const t=await this.getAuthRequestConfigAsync();if(!t.state)throw new Error('Cannot make request URL without a valid `state` loaded');const s={};t.codeChallenge&&(s.code_challenge=t.codeChallenge);for(const e in t.extraParams)e in t.extraParams&&(s[e]=t.extraParams[e]);return t.usePKCE&&t.codeChallengeMethod&&(s.code_challenge_method=t.codeChallengeMethod),t.clientSecret&&(s.client_secret=t.clientSecret),t.prompt&&(s.prompt='string'==typeof t.prompt?t.prompt:t.prompt.join(' ')),s.redirect_uri=t.redirectUri,s.client_id=t.clientId,s.response_type=t.responseType,s.state=t.state,t.scopes?.length&&(s.scope=t.scopes.join(' ')),this.url=`${e.authorizationEndpoint}?${new URLSearchParams(s)}`,this.url}async ensureCodeIsSetupAsync(){if(this.codeVerifier)return;const{codeVerifier:e,codeChallenge:t}=await u.buildCodeAsync();this.codeVerifier=e,this.codeChallenge=t}}},888,[109,889,924,95,928,929,930,935,936]);
989__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"WebBrowserResultType",{enumerable:!0,get:function(){return u.WebBrowserResultType}}),Object.defineProperty(_e,"WebBrowserPresentationStyle",{enumerable:!0,get:function(){return u.WebBrowserPresentationStyle}}),_e.getCustomTabsSupportingBrowsersAsync=async function(){if(!t.default.getCustomTabsSupportingBrowsersAsync)throw new o.UnavailabilityError('WebBrowser','getCustomTabsSupportingBrowsersAsync');return l},_e.warmUpAsync=async function(e){if(!t.default.warmUpAsync)throw new o.UnavailabilityError('WebBrowser','warmUpAsync');return{}},_e.mayInitWithUrlAsync=async function(e,n){if(!t.default.mayInitWithUrlAsync)throw new o.UnavailabilityError('WebBrowser','mayInitWithUrlAsync');return{}},_e.coolDownAsync=async function(e){if(!t.default.coolDownAsync)throw new o.UnavailabilityError('WebBrowser','coolDownAsync');return{}},_e.openBrowserAsync=c,_e.dismissBrowser=function(){return t.default.dismissBrowser?.()},_e.openAuthSessionAsync=async function(e,n,s={}){if(!t.default.openAuthSessionAsync)throw new o.UnavailabilityError('WebBrowser','openAuthSessionAsync');return['ios','macos','web'].includes("web")?t.default.openAuthSessionAsync(e,n,y(s)):t.default.openAuthSessionAsync(e,n)},_e.dismissAuthSession=function(){if(!t.default.dismissAuthSession)throw new o.UnavailabilityError('WebBrowser','dismissAuthSession');t.default.dismissAuthSession()},_e.maybeCompleteAuthSession=function(e={}){if(t.default.maybeCompleteAuthSession)return t.default.maybeCompleteAuthSession(e);return{type:'failed',message:'Not supported on this platform'}};var o=r(d[0]),n=e(r(d[1]));e(r(d[2]));r(d[3]);var s=e(r(d[4])),t=e(r(d[5])),u=r(d[6]);const l={defaultBrowserPackage:void 0,preferredBrowserPackage:void 0,browserPackages:[],servicePackages:[]};async function c(e,n={}){if(!t.default.openBrowserAsync)throw new o.UnavailabilityError('WebBrowser','openBrowserAsync');return await t.default.openBrowserAsync(e,y(n))}function y(e){return Object.assign({},e,{controlsColor:(0,s.default)(e.controlsColor),toolbarColor:(0,s.default)(e.toolbarColor),secondaryToolbarColor:(0,s.default)(e.secondaryToolbarColor)})}n.default.currentState},889,[890,786,521,95,50,926,927]);
990__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"EventEmitter",{enumerable:!0,get:function(){return t.EventEmitter}}),Object.defineProperty(_e,"NativeModule",{enumerable:!0,get:function(){return n.NativeModule}}),Object.defineProperty(_e,"SharedObject",{enumerable:!0,get:function(){return o.SharedObject}}),Object.defineProperty(_e,"SharedRef",{enumerable:!0,get:function(){return u.SharedRef}}),Object.defineProperty(_e,"Platform",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(_e,"uuid",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(_e,"requireNativeViewManager",{enumerable:!0,get:function(){return b.requireNativeViewManager}}),Object.defineProperty(_e,"CodedError",{enumerable:!0,get:function(){return h.C
990odedError}}),Object.defineProperty(_e,"UnavailabilityError",{enumerable:!0,get:function(){return E.UnavailabilityError}}),Object.defineProperty(_e,"LegacyEventEmitter",{enumerable:!0,get:function(){return w.LegacyEventEmitter}}),Object.defineProperty(_e,"NativeModulesProxy",{enumerable:!0,get:function(){return k.default}}),r(d[0]),r(d[1]);var t=r(d[2]),n=r(d[3]),o=r(d[4]),u=r(d[5]),c=e(r(d[6])),f=e(r(d[7])),b=r(d[8]),l=r(d[9]);Object.keys(l).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return l[e]}})});var y=r(d[10]);Object.keys(y).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return y[e]}})});var O=r(d[11]);Object.keys(O).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return O[e]}})});var p=r(d[12]);Object.keys(p).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return p[e]}})});var j=r(d[13]);Object.keys(j).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return j[e]}})});var P=r(d[14]);Object.keys(P).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return P[e]}})});var s=r(d[15]);Object.keys(s).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return s[e]}})});var v=r(d[16]);Object.keys(v).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return v[e]}})});var h=r(d[17]),E=r(d[18]),w=r(d[19]),k=e(r(d[20]))},890,[891,892,905,907,908,909,910,895,912,915,916,917,918,919,920,921,922,914,913,923,925]);
991__d(function(g,r,i,a,m,e,d){},891,[]);
992__d(function(g,r,i,a,m,e,d){"use strict";(0,r(d[0]).installExpoGlobalPolyfill)()},892,[893]);
993__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.installExpoGlobalPolyfill=function(){if(globalThis.expo)return;globalThis.expo={EventEmitter:o.EventEmitter,NativeModule:o.NativeModule,SharedObject:o.SharedObject,SharedRef:o.SharedRef,modules:globalThis.ExpoDomWebView?.expoModulesProxy??{},uuidv4:l.default.v4,uuidv5:l.default.v5,getViewConfig:()=>{throw new Error('Method not implemented.')},reloadAppAsync:async()=>{window.location.reload()},expoModulesCoreVersion:void 0,cacheDir:void 0,documentsDir:void 0}};var e,o=r(d[0]),t=r(d[1]),l=(e=t)&&e.__esModule?e:{default:e},n=r(d[2]);Object.keys(n).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return n[e]}})})},893,[894,895,900]);
994__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EventEmitter",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"NativeModule",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"SharedObject",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SharedRef",{enumerable:!0,get:function(){return o}});class t{addListener(t,s){this.listeners||(this.listeners=new Map),this.listeners?.has(t)||this.listeners?.set(t,new Set);const n=this.listenerCount(t);return this.listeners?.get(t)?.add(s),0===n&&1===this.listenerCount(t)&&this.startObserving(t),{remove:()=>{this.removeListener(t,s)}}}removeListener(t,s){const n=this.listeners?.get(t)?.delete(s);0===this.listenerCount(t)&&n&&this.stopObserving(t)}removeAllListeners(t){const s=this.listenerCount(t);this.listeners?.get(t)?.clear(),s>0&&this.stopObserving(t)}emit(t,...s){new Set(this.listeners?.get(t)).forEach(t=>{try{t(...s)}catch(t){console.error(t)}})}listenerCount(t){return this.listeners?.get(t)?.size??0}startObserving(t){}stopObserving(t){}}class s extends t{}class n extends t{release(){}}class o extends n{nativeRefType='unknown'}},894,[]);
995__d(function(g,r,i,a,m,_e,d){"use strict";
995function _interopDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return _default}});var _libSha=r(d[0]),sha1=_interopDefault(_libSha),_libV=r(d[1]),v35=_interopDefault(_libV),_uuidTypes=r(d[2]);function uuidv4(){return'undefined'==typeof crypto&&'undefined'==typeof window?eval('require')('node:crypto').randomUUID():crypto.randomUUID()}const uuid={v4:uuidv4,v5:(0,v35.default)('v5',80,sha1.default),namespace:_uuidTypes.Uuidv5Namespace};var _default=uuid},895,[896,897,899]);
996__d(function(g,r,_i,_a,m,_e,_d){'use strict';function e(e,t,n,o){switch(e){case 0:return t&n^~t&o;case 1:case 3:return t^n^o;case 2:return t&n^t&o^n&o;default:return 0}}function t(e,t){return e<<t|e>>>32-t}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n}});var n=function(n){const o=[1518500249,1859775393,2400959708,3395469782],c=[1732584193,4023233417,2562383102,271733878,3285377520];if('string'==typeof n){const e=unescape(encodeURIComponent(n));n=new Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t)}n.push(128);const l=n.length/4+2,f=Math.ceil(l/16),u=new Array(f);for(let e=0;e<f;e++){u[e]=new Array(16);for(let t=0;t<16;t++)u[e][t]=n[64*e+4*t]<<24|n[64*e+4*t+1]<<16|n[64*e+4*t+2]<<8|n[64*e+4*t+3]}u[f-1][14]=8*(n.length-1)/Math.pow(2,32),u[f-1][14]=Math.floor(u[f-1][14]),u[f-1][15]=8*(n.length-1)&4294967295;for(let n=0;n<f;n++){const l=new Array(80);for(let e=0;e<16;e++)l[e]=u[n][e];for(let e=16;e<80;e++)l[e]=t(l[e-3]^l[e-8]^l[e-14]^l[e-16],1);let f=c[0],a=c[1],s=c[2],h=c[3],i=c[4];for(let n=0;n<80;n++){const c=Math.floor(n/20),u=t(f,5)+e(c,a,s,h)+i+o[c]+l[n]>>>0;i=h,h=s,s=t(a,30)>>>0,a=f,f=u}c[0]=c[0]+f>>>0,c[1]=c[1]+a>>>0,c[2]=c[2]+s>>>0,c[3]=c[3]+h>>>0,c[4]=c[4]+i>>>0}return[c[0]>>24&255,c[0]>>16&255,c[0]>>8&255,255&c[0],c[1]>>24&255,c[1]>>16&255,c[1]>>8&255,255&c[1],c[2]>>24&255,c[2]>>16&255,c[2]>>8&255,255&c[2],c[3]>>24&255,c[3]>>16&255,c[3]>>8&255,255&c[3],c[4]>>24&255,c[4]>>16&255,c[4]>>8&255,255&c[4]]}},896,[]);
997__d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};function o(e){const t=[];return e.replace(/[a-fA-F0-9]{2}/g,e=>(t.push(parseInt(e,16)),'')),t}function c(e){e=unescape(encodeURIComponent(e));const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function u(e,t,u){const f=function(e,f,s,i){const y=s&&i||0;if('string'==typeof e&&(e=c(e)),'string'==typeof f&&(f=o(f)),!Array.isArray(e))throw TypeError('value must be an array of bytes');if(!Array.isArray(f)||16!==f.length)throw TypeError('namespace must be uuid string or an Array of 16 byte values');const l=u(f.concat(e));if(l[6]=15&l[6]|t,l[8]=63&l[8]|128,s)for(let e=0;e<16;++e)s[y+e]=l[e];return(0,n.default)(l)};try{f.name=e}catch{}return f.DNS='6ba7b810-9dad-11d1-80b4-00c04fd430c8',f.URL='6ba7b811-9dad-11d1-80b4-00c04fd430c8',f}},897,[898]);
998__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=[];for(let n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);var n=function(n,o){let u=o||0;const c=t;return[c[n[u++]],c[n[u++]],c[n[u++]],c[n[u++]],'-',c[n[u++]],c[n[u++]],'-',c[n[u++]],c[n[u++]],'-',c[n[u++]],c[n[u++]],'-',c[n[u++]],c[n[u++]],c[n[u++]],c[n[u++]],c[n[u++]],c[n[u++]]].join('')}},898,[]);
999__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Uuidv5Namespace",{enumerable:!0,get:function(){return b}});let b=(function(b){return b.dns="6ba7b810-9dad-11d1-80b4-00c04fd430c8",b.url="6ba7b811-9dad-11d1-80b4-00c04fd430c8",b.oid="6ba7b812-9dad-11d1-80b4-00c04fd430c8",b.x500="6ba7b814-9dad-11d1-80b4-00c04fd430c8",b})({})},899,[]);
1000__d(function(g,r,i,a,m,e,d){"use strict";r(d[0]),r(d[1]),r(d[2]),r(d[3])},900,[901,902,903,904]);
1001__d(function(g,r,i,a,m,e,d){}
1001,901,[]);
1002__d(function(g,r,i,a,m,e,d){},902,[]);
1003__d(function(g,r,i,a,m,e,d){},903,[]);
1004__d(function(g,r,i,a,m,e,d){},904,[]);
1005__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EventEmitter",{enumerable:!0,get:function(){return t}}),(0,r(d[0]).ensureNativeModulesAreInstalled)();const t=globalThis.expo.EventEmitter},905,[906]);
1006__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ensureNativeModulesAreInstalled=function(){},r(d[0])},906,[892]);
1007__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NativeModule",{enumerable:!0,get:function(){return t}}),(0,r(d[0]).ensureNativeModulesAreInstalled)();const t=globalThis.expo.NativeModule},907,[906]);
1008__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SharedObject",{enumerable:!0,get:function(){return t}}),(0,r(d[0]).ensureNativeModulesAreInstalled)();const t=globalThis.expo.SharedObject},908,[906]);
1009__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SharedRef",{enumerable:!0,get:function(){return t}}),(0,r(d[0]).ensureNativeModulesAreInstalled)();const t=globalThis.expo.SharedRef},909,[906]);
1010__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}});var e,n=r(d[0]),t=(e=n)&&e.__esModule?e:{default:e},s=r(d[1]);var u={OS:"web",select:'undefined'!=typeof window?t.default.select:function(e){return e.hasOwnProperty("web")?e.web:e.hasOwnProperty('default')?e.default:void 0},isDOMAvailable:s.isDOMAvailable,canUseEventListeners:s.canUseEventListeners,canUseViewport:s.canUseViewport,isAsyncDebugging:s.isAsyncDebugging}},910,[95,911]);
1011__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"isDOMAvailable",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"canUseEventListeners",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"canUseViewport",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"isAsyncDebugging",{enumerable:!0,get:function(){return c}});const n='undefined'!=typeof window&&!!window.document?.createElement,t=n&&!(!window.addEventListener&&!window.attachEvent),o=n&&!!window.screen,c=!1},911,[]);
1012__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.requireNativeViewManager=function(n,o){throw new t.UnavailabilityError('expo-modules-core','requireNativeViewManager')};var t=r(d[0])},912,[913]);
1013__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UnavailabilityError",{enumerable:!0,get:function(){return o}});var t=r(d[0]);r(d[1]);class o extends t.CodedError{constructor(t,o){super('ERR_UNAVAILABLE',`The method or property ${t}.${o} is not available on web, are you sure you've linked all the native dependencies properly?`)}}},913,[914,910]);
1014__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CodedError",{enumerable:!0,get:function(){return t}});class t extends Error{constructor(t,o){super(o),this.code=t}}},914,[]);
1015__d(function(g,r,i,a,m,e,d){"use strict";function o(o){return'object'==typeof globalThis.ExpoDomWebView&&null!=globalThis?.expo?.modules?globalThis.expo?.modules?.[o]??null:null}Object.defineProperty(e,'__esModule',{value:!0}),e.requireNativeModule=function(n){const l=o(n);if(null!=l)return l;if('undefined'==typeof window)return{};throw new Error(`Cannot find native module '${n}'`)},e.requireOptionalNativeModule=o},915,[]);
1016__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.registerWebModule=function(s,l){if((0,o.ensureNativeModulesAreInstalled)(),!(l=l??s.name))throw new Error('Web module implementation is missing a name - it is either not a class or has been minified. Pass the name as a second argument to the `registerWebModule` function.');globalThis?.expo?.modules||(globalThis.expo.modules={});if(globalThis.expo.modules[l])return globalThis.expo.modules[l];return globalThis.expo.modules[l]=new s,globalThis.expo.modules[l]};var o=r(d[0])},916,[906]);
1017__d(function(g,r,i,a,m,e,d){},917,[]);
1018__d(function(g,r,i,a,m,e,d){"use strict";
1018Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PermissionStatus",{enumerable:!0,get:function(){return t}});let t=(function(t){return t.GRANTED="granted",t.UNDETERMINED="undetermined",t.DENIED="denied",t})({})},918,[]);
1019__d(function(g,r,i,a,m,_e,d){"use strict";const e=["get","request"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.createPermissionHook=function(e){return t=>c(e,t)};var t,u=r(d[0]),n=(t=u)&&t.__esModule?t:{default:t},s=r(d[1]);function c(t,u){const c=(0,s.useRef)(!0),[o,l]=(0,s.useState)(null),f=u||{},{get:h=!0,request:M=!1}=f,_=(0,n.default)(f,e),b=(0,s.useCallback)(async()=>{let e;return e=Object.keys(_).length>0?await t.getMethod(_):await t.getMethod(),c.current&&l(e),e},[t.getMethod]),k=(0,s.useCallback)(async()=>{let e;return e=Object.keys(_).length>0?await t.requestMethod(_):await t.requestMethod(),c.current&&l(e),e},[t.requestMethod]);return(0,s.useEffect)(function(){M&&k(),!M&&h&&b()},[h,M,k,b]),(0,s.useEffect)(function(){return c.current=!0,()=>{c.current=!1}},[]),[o,k,b]}},919,[109,34]);
1020__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createSnapshotFriendlyRef=function(){return(0,t.createRef)()};var t=r(d[0])},920,[34]);
1021__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useReleasingSharedObject=function(u,n){const c=(0,t.useRef)(null),s=(0,t.useRef)(!1),l=(0,t.useRef)(n);null==c.current&&(c.current=u());const o=(0,t.useMemo)(()=>{let t=c.current;const s=l.current?.length===n.length&&n.every((t,u)=>t===l.current[u]);return t&&s||(c.current?.release(),t=u(),c.current=t,l.current=n),t},n);return(0,t.useMemo)(()=>{s.current=!0},[]),(0,t.useEffect)(()=>(s.current=!1,()=>{!s.current&&c.current&&c.current.release()}),[]),o};var t=r(d[0])},921,[34]);
1022__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.reloadAppAsync=async function(o="Reloaded from JS call"){await(globalThis.expo?.reloadAppAsync(o))}},922,[]);
1023__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LegacyEventEmitter",{enumerable:!0,get:function(){return o}});var t=e(r(d[0])),n=e(r(d[1]));r(d[2]);const s='@@nativeEmitterSubscription@@';class o{_listenerCount=0;constructor(e){if(e.__expo_module_name__)return e;this._nativeModule=e,this._eventEmitter=new n.default(e)}addListener(e,t){!this._listenerCount&&this._nativeModule.startObserving&&this._nativeModule.startObserving(),this._listenerCount++;const n=this._eventEmitter.addListener(e,t),o={[s]:n,remove:()=>{this.removeSubscription(o)}};return o}removeAllListeners(e){const n=this._eventEmitter.listenerCount?this._eventEmitter.listenerCount(e):this._eventEmitter.listeners(e).length;this._eventEmitter.removeAllListeners(e),this._listenerCount-=n,(0,t.default)(this._listenerCount>=0,"EventEmitter must have a non-negative number of listeners"),!this._listenerCount&&this._nativeModule.stopObserving&&this._nativeModule.stopObserving()}removeSubscription(e){const t=e,n=t[s];n&&('remove'in n&&n.remove?.(),this._listenerCount--,delete t[s],e.remove=()=>{},!this._listenerCount&&this._nativeModule.stopObserving&&this._nativeModule.stopObserving())}emit(e,...t){this._eventEmitter.emit(e,...t)}}},923,[924,792,95]);
1024__d(function(g,r,i,_a,m,_e,_d){'use strict';m.exports=function(e,n,o,t,a,f,s,d){if(!e){var u;if(void 0===n)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[o,t,a,f,s,d],l=0;(u=new Error(n.replace(/%s/g,function(){return c[l++]}))).name='Invariant Violation'}throw u.framesToPop=1,u}}},924,[]);
1025__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}});var t={}},925,[]);
1026__d(function(g,r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return f}}),_e.normalizeUrl=u,_e.featureObjectToString=I;
1026var e,t=r(d[0]),n=r(d[1]),o=(e=n)&&e.__esModule?e:{default:e},i=r(d[2]);let s=null;const c=new Map,l=e=>`ExpoWebBrowser_OriginUrl_${e}`,w=e=>`ExpoWebBrowser_RedirectUrl_${e}`;function u(e){return(e.origin.replace(e.protocol,'').replace(/^\/+/,'').replace(/\/+$/,'')+decodeURI(e.pathname.replace(/\/{2,}/g,'/'))).toLowerCase()}function p(){if(s&&(s.close(),c.has(s))){const{listener:e,appStateSubscription:t,interval:n}=c.get(s);clearInterval(n),window.removeEventListener('message',e),t.remove(),c.delete(s);const o=window.localStorage.getItem('ExpoWebBrowserRedirectHandle');o&&(window.localStorage.removeItem('ExpoWebBrowserRedirectHandle'),window.localStorage.removeItem(l(o)),window.localStorage.removeItem(w(o))),s=null}}var f={async openBrowserAsync(e,t={}){if('undefined'==typeof window)return{type:i.WebBrowserResultType.CANCEL};const{windowName:n="_blank",windowFeatures:o}=t,s=B(o);return window.open(e,n,s),{type:i.WebBrowserResultType.OPENED}},dismissAuthSession(){'undefined'!=typeof window&&p()},maybeCompleteAuthSession({skipRedirectCheck:e}){if('undefined'==typeof window)return{type:'failed',message:'Cannot use expo-web-browser in a non-browser environment'};const n=window.localStorage.getItem('ExpoWebBrowserRedirectHandle');if(!n)return{type:'failed',message:'No auth session is currently in progress'};const o=window.location.href;if(!0!==e){const e=window.localStorage.getItem(w(n)),t=u(window.location);if(e!==t)return{type:'failed',message:`Current URL "${t}" and original redirect URL "${e}" do not match.`}}window.localStorage.setItem(l(n),o);const i=window.opener??window.parent;if(!i)throw new t.CodedError('ERR_WEB_BROWSER_REDIRECT',"The window cannot complete the redirect request because the invoking window doesn't have a reference to it's parent. This can happen if the parent window was reloaded.");return i.postMessage({url:o,expoSender:n},i.location.toString()),{type:'success',message:"Attempting to complete auth"}},async openAuthSessionAsync(e,n,f){if('undefined'==typeof window)return{type:i.WebBrowserResultType.CANCEL};if(n=n??b(e),null==s||s?.closed){const n=B(f?.windowFeatures);if(s=window.open(e,f?.windowName,n),!s)throw new t.CodedError('ERR_WEB_BROWSER_BLOCKED','Popup window was blocked by the browser or failed to open. This can happen in mobile browsers when the window.open() method was invoked too long after a user input was fired.');try{s.focus()}catch{}}const h=await y(e);window.localStorage.setItem('ExpoWebBrowserRedirectHandle',h);const R=(()=>{if(!n)return n;try{return u(new URL(n))}catch{return n}})();return window.localStorage.setItem(w(h),R),new Promise(async e=>{const t=t=>{if(!t.isTrusted)return;if(t.origin!==window.location.origin)return;const{data:n}=t,o=window.localStorage.getItem('ExpoWebBrowserRedirectHandle');n.expoSender===o&&(p(),e({type:'success',url:n.url}))};window.addEventListener('message',t,!1);const n=o.default.addEventListener('change',t=>{if('active'!==t)return;const n=window.localStorage.getItem('ExpoWebBrowserRedirectHandle');if(n){const t=window.localStorage.getItem(l(n));t&&(p(),e({type:'success',url:t}))}}),w=setInterval(()=>{s?.closed&&(e&&e({type:i.WebBrowserResultType.DISMISS}),clearInterval(w),p())},1e3);c.set(s,{listener:t,interval:w,appStateSubscription:n})})}};function h(){return'undefined'!=typeof window&&!!window?.crypto}async function y(e){const t=new URL(e);return t.searchParams.has('state')&&'string'==typeof t.searchParams.get('state')?t.searchParams.get('state'):await E()}function b(e){const t=new URL(e);return t.searchParams.has('redirect_uri')&&'string'==typeof t.searchParams.get('redirect_uri')?t.searchParams.get('redirect_uri'):location.origin+location.pathname}const R='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';async function E(){if(!h()||!window.crypto.subtle)throw new t.CodedError('ERR_WEB_BROWSER_CRYPTO',"The current environment doesn't support crypto. Ensure you are running from a secure origin (localhost/https).");const e=new TextEncoder,n=S(10),o=e.encode(n),i=await crypto.subtle.digest('SHA-256',o);return btoa(String.fromCharCode(...new Uint8Array(i)))}function S(e){let t=new Uint8Array(e);t.byteLength!==t.length&&(t=new Uint8Array(t.buffer));const n=new Uint8Array(t.length);if(h())window.crypto.getRandomValues(n);else for(let t=0;t<e;t+=1)n[t]=Math.random()*R.length|0;return v(n)}function v(e){let t='';for(let n=0;n<e.byteLength;n+=1){const o=e[n]%R.length;t+=R[o]}return t}function _(e){let t={};if('string'==typeof e){const n=e.split(',');for(const e of n){const[n,o]=e.trim().split('=');n&&o&&(t[n]=o)}}else e&&(t=e);return t}function B(e){const t=_(e),n=t.width??500,o=t.height??650,i=t.top??Math.max(0,.5*(window.screen.height-o)),s=t.left??Math.max(0,.5*(window.screen.width-n));return I(Object.assign({},t,{toolbar:t.toolbar??'no',menubar:t.menubar??'no',location:t.location??'yes',resizable:t.resizable??'yes',status:t.status??'no',scrollbars:t.scrollbars??'yes',to
1026p:i,left:s,width:n,height:o}))}function I(e){return Object.keys(e).reduce((t,n)=>{let o=e[n];return'boolean'==typeof o&&(o=o?'yes':'no'),n&&o?(t&&(t+=','),`${t}${n}=${o}`):t},'')}},926,[890,786,927]);
1027__d(function(g,r,i,a,m,e,d){"use strict";var t,n;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"WebBrowserResultType",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"WebBrowserPresentationStyle",{enumerable:!0,get:function(){return n}}),(function(t){t.CANCEL="cancel",t.DISMISS="dismiss",t.OPENED="opened",t.LOCKED="locked"})(t||(t={})),(function(t){t.FULL_SCREEN="fullScreen",t.PAGE_SHEET="pageSheet",t.FORM_SHEET="formSheet",t.CURRENT_CONTEXT="currentContext",t.OVER_FULL_SCREEN="overFullScreen",t.OVER_CURRENT_CONTEXT="overCurrentContext",t.POPOVER="popover",t.AUTOMATIC="automatic"})(n||(n={}))},927,[]);
1028__d(function(g,r,i,a,m,e,d){"use strict";var n,t,o;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CodeChallengeMethod",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"ResponseType",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"Prompt",{enumerable:!0,get:function(){return o}}),(function(n){n.S256="S256",n.Plain="plain"})(n||(n={})),(function(n){n.Code="code",n.Token="token",n.IdToken="id_token"})(t||(t={})),(function(n){n.None="none",n.Login="login",n.Consent="consent",n.SelectAccount="select_account"})(o||(o={}))},928,[]);
1029__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"AuthError",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"TokenError",{enumerable:!0,get:function(){return u}});var t=r(d[0]);const n={auth:{invalid_request:"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",unauthorized_client:"The client is not authorized to request an authorization code using this method.",access_denied:"The resource owner or authorization server denied the request.",unsupported_response_type:"The authorization server does not support obtaining an authorization code using this method.",invalid_scope:'The requested scope is invalid, unknown, or malformed.',server_error:'The authorization server encountered an unexpected condition that prevented it from fulfilling the request. (This error code is needed because a 500 Internal Server Error HTTP status code cannot be returned to the client via an HTTP redirect.)',temporarily_unavailable:'The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.  (This error code is needed because a 503 Service Unavailable HTTP status code cannot be returned to the client via an HTTP redirect.)',interaction_required:'Auth server requires user interaction of some form to proceed. This error may be returned when the prompt parameter value in the auth request is none, but the auth request cannot be completed without displaying a user interface for user interaction.',login_required:'Auth server requires user authentication. This error may be returned when the prompt parameter value in the auth request is none, but the auth request cannot be completed without displaying a user interface for user authentication.',account_selection_required:'User is required to select a session at the auth server. The user may be authenticated at the auth server with different associated accounts, but the user did not select a session. This error may be returned when the prompt parameter value in the auth request is `none`, but the auth request cannot be completed without displaying a user interface to prompt for a session to use.',consent_required:'Auth server requires user consent. This error may be returned when the prompt parameter value in the auth request is none, but the auth request cannot be completed without displaying a user interface for user consent.',invalid_request_uri:'The `request_uri` in the auth request returns an error or contains invali
1029d data.',invalid_request_object:'The request parameter contains an invalid request object.',request_not_supported:'The OP does not support use of the `request` parameter defined in Section 6. (https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests)',request_uri_not_supported:'The OP does not support use of the `request_uri` parameter defined in Section 6. (https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests)',registration_not_supported:'The OP does not support use of the `registration` parameter defined in Section 7.2.1. (https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter)'},token:{invalid_request:"The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.",invalid_client:"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).  The authorization server MAY return an HTTP 401 (Unauthorized) status code to indicate which HTTP authentication schemes are supported.  If the client attempted to authenticate via the \"Authorization\" request header field, the authorization server MUST respond with an HTTP 401 (Unauthorized) status code and include the \"WWW-Authenticate\" response header field matching the authentication scheme used by the client.",invalid_grant:"The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.",unauthorized_client:"The authenticated client is not authorized to use this authorization grant type.",unsupported_grant_type:"The authorization grant type is not supported by the authorization server."}};class o extends t.CodedError{constructor(t,o){const{error:s,error_description:u,error_uri:h}=t,c=n[o][s];let p;p=c?c+(u?`\nMore info: ${u}`:''):u||'An unknown error occurred',super(s,p),this.description=u??c,this.uri=h,this.params=t}}class s extends o{constructor(t){super(t,'auth'),this.state=t.state}}class u extends o{constructor(t){super(t,'token')}}},929,[890]);
1030__d(function(g,r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.generateRandom=s,_e.deriveChallengeAsync=l,_e.buildCodeAsync=async function(e=128){const n=s(e),t=await l(n);return{codeVerifier:n,codeChallenge:t}},_e.generateHexStringAsync=async function(e){const t=s(e);return u(await n.digestStringAsync(n.CryptoDigestAlgorithm.SHA256,t,{encoding:n.CryptoEncoding.HEX}))};var e,n=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[0])),t=r(_d[1]),o=(e=t)&&e.__esModule?e:{default:e};const c='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';function i(e){const n=[];for(let t=0;t<e.byteLength;t+=1){const o=e[t]%c.length;n.push(c[o])}return n.join('')}function u(e){return e.replace(/\+/g,'-').replace(/\//g,'_').replace(/=/g,'')}function s(e){return i(n.getRandomValues(new Uint8Array(e)))}async function l(e){(0,o.default)(e.length>42&&e.length<129,'Invalid code length for PKCE.');return u(await n.digestStringAsync(n.CryptoDigestAlgorithm.SHA256,e,{encoding:n.CryptoEncoding.BASE64}))}},930,[931,924]);
1031__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getRandomBytes=function(n){l(n,'getRandomBytes');const o=Math.floor(n);if(c.default.getRandomValues){const t=new Uint8Array(o);return c.default.getRandomValues(t),t}if(c.default.getRandomBase64String){const e=c.default.getRandomBase64String(o);return(0,t.toByteArray)(e)}throw new e.UnavailabilityError('expo-crypto','getRandomBytes')},_e.getRandomBytesAsync=async function(n){l(n,'getRandomBytesAsync');const o=Math.floor(n);if(c.default.getRandomValues){const t=new Uint8Array(o);return c.default.getRandomValues(t),t}if(c.default.getRandomBase64StringAsync){const e=await c.default.getRandomBase64StringAsync(o);return(0,t.toByteArray)(e)}throw new e.UnavailabilityError('expo-crypto','getRandomBytesAsync')},_e.digestStringAsync=async function(t,o,s={encoding:n.CryptoEncoding.HEX}){if(!c.default.digestStringAsync)throw new e.UnavailabilityError('expo-crypto','digestStringAsync');return u(t),f(o),p(s.encoding),await c.default.digestStringAsync(t,o,s)},_e.getRandomValues=function(t){return c.default.getRandomValues(t),t},_e.randomUUID=function(){return c.default.randomUUID()},_e.digest=function(t,e){return new Promise((n,o)=>{try{if('function'==typeof c.default.digestAsync)n(c.default.digestAsync(t,e));else{const o=new Uint8Array(A[t]);c.default.digest(t,o,e),n(o.buffer)}}catch(t){o(t)}})};var t=r(d[0]),e=r(d[1]),n=r(d[2]);
1031Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(_e,t)||Object.defineProperty(_e,t,{enumerable:!0,get:function(){return n[t]}})});var o,s=r(d[3]),c=(o=s)&&o.__esModule?o:{default:o};class y extends TypeError{code='ERR_CRYPTO';constructor(t){super(`expo-crypto: ${t}`)}}function l(t,e){if('number'!=typeof t||isNaN(t)||Math.floor(t)<0||Math.floor(t)>1024)throw new TypeError(`expo-crypto: ${e}(${t}) expected a valid number from range 0...1024`)}function u(t){if(!Object.values(n.CryptoDigestAlgorithm).includes(t))throw new y(`Invalid algorithm provided. Expected one of: CryptoDigestAlgorithm.${Object.keys(n.CryptoDigestAlgorithm).join(', AlgCryptoDigestAlgorithmorithm.')}`)}function f(t){if('string'!=typeof t)throw new y("Invalid data provided. Expected a string.")}function p(t){if(!Object.values(n.CryptoEncoding).includes(t))throw new y(`Invalid encoding provided. Expected one of: CryptoEncoding.${Object.keys(n.CryptoEncoding).join(', CryptoEncoding.')}`)}const A={[n.CryptoDigestAlgorithm.SHA1]:20,[n.CryptoDigestAlgorithm.SHA256]:32,[n.CryptoDigestAlgorithm.SHA384]:48,[n.CryptoDigestAlgorithm.SHA512]:64,[n.CryptoDigestAlgorithm.MD2]:16,[n.CryptoDigestAlgorithm.MD4]:16,[n.CryptoDigestAlgorithm.MD5]:16}},931,[932,890,933,934]);
1032__d(function(g,r,_i,a,m,e,d){'use strict';e.byteLength=function(t){var n=h(t),o=n[0],u=n[1];return 3*(o+u)/4-u},e.toByteArray=function(t){var u,c,f=h(t),A=f[0],C=f[1],y=new o(i(t,A,C)),s=0,v=C>0?A-4:A;for(c=0;c<v;c+=4)u=n[t.charCodeAt(c)]<<18|n[t.charCodeAt(c+1)]<<12|n[t.charCodeAt(c+2)]<<6|n[t.charCodeAt(c+3)],y[s++]=u>>16&255,y[s++]=u>>8&255,y[s++]=255&u;2===C&&(u=n[t.charCodeAt(c)]<<2|n[t.charCodeAt(c+1)]>>4,y[s++]=255&u);1===C&&(u=n[t.charCodeAt(c)]<<10|n[t.charCodeAt(c+1)]<<4|n[t.charCodeAt(c+2)]>>2,y[s++]=u>>8&255,y[s++]=255&u);return y},e.fromByteArray=function(n){for(var o,u=n.length,c=u%3,h=[],i=16383,f=0,C=u-c;f<C;f+=i)h.push(A(n,f,f+i>C?C:f+i));1===c?(o=n[u-1],h.push(t[o>>2]+t[o<<4&63]+'==')):2===c&&(o=(n[u-2]<<8)+n[u-1],h.push(t[o>>10]+t[o>>4&63]+t[o<<2&63]+'='));return h.join('')};for(var t=[],n=[],o='undefined'!=typeof Uint8Array?Uint8Array:Array,u='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',c=0;c<64;++c)t[c]=u[c],n[u.charCodeAt(c)]=c;function h(t){var n=t.length;if(n%4>0)throw new Error('Invalid string. Length must be a multiple of 4');var o=t.indexOf('=');return-1===o&&(o=n),[o,o===n?0:4-o%4]}function i(t,n,o){return 3*(n+o)/4-o}function f(n){return t[n>>18&63]+t[n>>12&63]+t[n>>6&63]+t[63&n]}function A(t,n,o){for(var u,c=[],h=n;h<o;h+=3)u=(t[h]<<16&16711680)+(t[h+1]<<8&65280)+(255&t[h+2]),c.push(f(u));return c.join('')}n['-'.charCodeAt(0)]=62,n['_'.charCodeAt(0)]=63},932,[]);
1033__d(function(g,r,i,a,m,e,d){"use strict";var t,n;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CryptoDigestAlgorithm",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"CryptoEncoding",{enumerable:!0,get:function(){return n}}),(function(t){t.SHA1="SHA-1",t.SHA256="SHA-256",t.SHA384="SHA-384",t.SHA512="SHA-512",t.MD2="MD2",t.MD4="MD4",t.MD5="MD5"})(t||(t={})),(function(t){t.HEX="hex",t.BASE64="base64"})(n||(n={}))},933,[]);
1034__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return s}});var t=r(d[0]),n=r(d[1]);const o=()=>window.crypto??window.msCrypto;var s={async digestStringAsync(o,s,u){if(!crypto.subtle)throw new t.CodedError('ERR_CRYPTO_UNAVAILABLE','Access to the WebCrypto API is restricted to secure origins (localhost/https).');const y=(new TextEncoder).encode(s),l=await crypto.subtle.digest(o,y);if(u.encoding===n.CryptoEncoding.HEX)return c(l);if(u.encoding===n.CryptoEncoding.BASE64)return btoa(String.fromCharCode(...new Uint8Array(l)));throw new t.CodedError('ERR_CRYPTO_DIGEST','Invalid encoding type provided.')},getRandomBytes(t){const n=new Uint8Array(t);return o().getRandomValues(n)},async getRandomBytesAsync(t){const n=new Uint8Array(t);return o().getRandomValues(n)},getRandomValues:t=>o().getRandomValues(t),randomUUID:()=>o().randomUUID(),digestAsync:(t,n)=>o().subtle.digest(t,n)};function c(t){return[...new Uint8Array(t)].map(t=>t.toString(16).padStart(2,'0')).join('')}},934,[890,933]);
1035__d(function(g,r,i,a,m,e,d){"use strict";
1035Object.defineProperty(e,'__esModule',{value:!0}),e.getQueryParams=function(s){const t=new URL(s,'https://phony.example'),o=t.searchParams.get('errorCode');t.searchParams.delete('errorCode');const c=Object.fromEntries(t.searchParams);t.hash&&new URLSearchParams(t.hash.replace(/^#/,'')).forEach((s,t)=>{c[t]=s});return{errorCode:o,params:c}}},935,[]);
1036__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.getCurrentTimeInSeconds=d,Object.defineProperty(_e,"TokenResponse",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"Request",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"TokenRequest",{enumerable:!0,get:function(){return f}}),Object.defineProperty(_e,"AccessTokenRequest",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"RefreshTokenRequest",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"RevokeTokenRequest",{enumerable:!0,get:function(){return T}}),_e.exchangeCodeAsync=function(e,t){return new k(e).performAsync(t)},_e.refreshAsync=function(e,t){return new y(e).performAsync(t)},_e.revokeAsync=function(e,t){return new T(e).performAsync(t)},_e.fetchUserInfoAsync=function(e,t){if(!t.userInfoEndpoint)throw new Error('User info endpoint is not defined in the service config discovery document');return(0,c.requestAsync)(t.userInfoEndpoint,{headers:{'Content-Type':'application/x-www-form-urlencoded',Authorization:`Bearer ${e.accessToken}`},dataType:'json',method:'GET'})};var e,t=r(_d[0]),s=(e=t)&&e.__esModule?e:{default:e};r(_d[1]);var n=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(s){var n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return e[s]}})}),t.default=e,t})(r(_d[2])),o=r(_d[3]),c=r(_d[4]),h=r(_d[5]);function d(){return Math.floor(Date.now()/1e3)}class u{static isTokenFresh(e,t=-600){if(!e)return!1;if(e.expiresIn){return d()<e.issuedAt+e.expiresIn+t}return!0}static fromQueryParams(e){return new u({accessToken:e.access_token,refreshToken:e.refresh_token,scope:e.scope,state:e.state,idToken:e.id_token,tokenType:e.token_type,expiresIn:e.expires_in,issuedAt:e.issued_at})}constructor(e,t){this.rawResponse=t,this.accessToken=e.accessToken,this.tokenType=e.tokenType??'bearer',this.expiresIn=e.expiresIn,this.refreshToken=e.refreshToken,this.scope=e.scope,this.state=e.state,this.idToken=e.idToken,this.issuedAt=e.issuedAt??d()}applyResponseConfig(e){this.accessToken=e.accessToken??this.accessToken,this.tokenType=e.tokenType??this.tokenType??'bearer',this.expiresIn=e.expiresIn??this.expiresIn,this.refreshToken=e.refreshToken??this.refreshToken,this.scope=e.scope??this.scope,this.state=e.state??this.state,this.idToken=e.idToken??this.idToken,this.issuedAt=e.issuedAt??this.issuedAt??d()}getRequestConfig(){return{accessToken:this.accessToken,idToken:this.idToken,refreshToken:this.refreshToken,scope:this.scope,state:this.state,tokenType:this.tokenType,issuedAt:this.issuedAt,expiresIn:this.expiresIn}}async refreshAsync(e,t){const s=new y(Object.assign({},e,{refreshToken:this.refreshToken})),n=await s.performAsync(t);n.refreshToken=n.refreshToken??this.refreshToken;const o=n.getRequestConfig();return this.applyResponseConfig(o),this}shouldRefresh(){return!(u.isTokenFresh(this)||!this.refreshToken)}}class p{constructor(e){this.request=e}async performAsync(e){throw new Error('performAsync must be extended')}getRequestConfig(){throw new Error('getRequestConfig must be extended')}getQueryBody(){throw new Error('getQueryBody must be extended')}}class f extends p{constructor(e,t){super(e),this.grantType=t,this.clientId=e.clientId,this.clientSecret=e.clientSecret,this.extraParams=e.extraParams,this.scopes=e.scopes}getHeaders(){const e={'Content-Type':'application/x-www-form-urlencoded'};if(void 0!==this.clientSecret){const t=`${encodeURIComponent(this.clientId)}:${encodeURIComponent(this.clientSecret)}`,s=n.encodeNoWrap(t);e.Authorization=`Basic ${s}`}return e}async performAsync(e){(0,s.default)(e.tokenEndpoint,"Cannot invoke `performAsync()` without a valid tokenEndpoint");const t=await(0,c.requestAsync)(e.tokenEndpoint,{dataType:'json',method:'POST',headers:this.getHeaders(),body:this.getQueryBody()});if('error'in t)throw new o.TokenError(t);return new u({accessToken:t.access_token,tokenType:t.token_type,expires
1036In:t.expires_in,refreshToken:t.refresh_token,scope:t.scope,idToken:t.id_token,issuedAt:t.issued_at},t)}getQueryBody(){const e={grant_type:this.grantType};if(this.clientSecret||(e.client_id=this.clientId),this.scopes&&(e.scope=this.scopes.join(' ')),this.extraParams)for(const t in this.extraParams)t in this.extraParams&&!(t in e)&&(e[t]=this.extraParams[t]);return e}}class k extends f{constructor(e){(0,s.default)(e.redirectUri,"`AccessTokenRequest` requires a valid `redirectUri` (it must also match the one used in the auth request). Example: https://yourwebsite.com/redirect"),(0,s.default)(e.code,"`AccessTokenRequest` requires a valid authorization `code`. This is what's received from the authorization server after an auth request."),super(e,h.GrantType.AuthorizationCode),this.code=e.code,this.redirectUri=e.redirectUri}getQueryBody(){const e=super.getQueryBody();return this.redirectUri&&(e.redirect_uri=this.redirectUri),this.code&&(e.code=this.code),e}getRequestConfig(){return{clientId:this.clientId,clientSecret:this.clientSecret,grantType:this.grantType,code:this.code,redirectUri:this.redirectUri,extraParams:this.extraParams,scopes:this.scopes}}}class y extends f{constructor(e){(0,s.default)(e.refreshToken,"`RefreshTokenRequest` requires a valid `refreshToken`."),super(e,h.GrantType.RefreshToken),this.refreshToken=e.refreshToken}getQueryBody(){const e=super.getQueryBody();return this.refreshToken&&(e.refresh_token=this.refreshToken),e}getRequestConfig(){return{clientId:this.clientId,clientSecret:this.clientSecret,grantType:this.grantType,refreshToken:this.refreshToken,extraParams:this.extraParams,scopes:this.scopes}}}class T extends p{constructor(e){super(e),(0,s.default)(e.token,"`RevokeTokenRequest` requires a valid `token` to revoke."),this.clientId=e.clientId,this.clientSecret=e.clientSecret,this.token=e.token,this.tokenTypeHint=e.tokenTypeHint}getHeaders(){const e={'Content-Type':'application/x-www-form-urlencoded'};if(void 0!==this.clientSecret&&this.clientId){const t=`${encodeURIComponent(this.clientId)}:${encodeURIComponent(this.clientSecret)}`,s=n.encodeNoWrap(t);e.Authorization=`Basic ${s}`}return e}async performAsync(e){return(0,s.default)(e.revocationEndpoint,"Cannot invoke `performAsync()` without a valid revocationEndpoint"),await(0,c.requestAsync)(e.revocationEndpoint,{method:'POST',headers:this.getHeaders(),body:this.getQueryBody()}),!0}getRequestConfig(){return{clientId:this.clientId,clientSecret:this.clientSecret,token:this.token,tokenTypeHint:this.tokenTypeHint}}getQueryBody(){const e={token:this.token};return this.tokenTypeHint&&(e.token_type_hint=this.tokenTypeHint),this.clientId&&(e.client_id=this.clientId),this.clientSecret&&(e.client_secret=this.clientSecret),e}}},936,[924,95,937,929,938,939]);
1037__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.encodeNoWrap=function(c){let o='',n=0;do{const h=c.charCodeAt(n++),i=c.charCodeAt(n++),s=c.charCodeAt(n++),A=h>>2,l=(3&h)<<4|i>>4;let u=(15&i)<<2|s>>6,N=63&s;isNaN(i)?(u=64,N=64):isNaN(s)&&(N=64),o=o+t.charAt(A)+t.charAt(l)+t.charAt(u)+t.charAt(N)}while(n<c.length);return o};const t='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='},937,[]);
1038__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.requestAsync=async function(t,o){const s=new URL(t),n={},c={body:void 0,method:o.method,mode:'cors',headers:n},i='json'===o.dataType?.toLowerCase();if(o.headers)for(const t in o.headers)t in o.headers&&(n[t]=o.headers[t]);if(o.body)if('POST'===o.method?.toUpperCase())c.body=new URLSearchParams(o.body).toString();else for(const t of Object.keys(o.body))s.searchParams.append(t,o.body[t]);!i||n.Accept||n.accept||(n.Accept='application/json, text/javascript; q=0.01');const p=s.toString().replace(/\/$/,''),h=await fetch(p,c),y=h.headers.get('content-type');if(i||y?.includes('application/json'))return h.json();return h.text()}},938,[]);
1039__d(function(g,r,i,a,m,e,d){"use strict";var n,t;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TokenTypeHint",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"GrantType",{enumerable:!0,get:function(){return t}}),(function(n){n.AccessToken="access_token",n.RefreshToken="refresh_token"})(n||(n={})),(function(n){n.AuthorizationCode="authorization_code",n.Implicit="impl
1039icit",n.RefreshToken="refresh_token",n.ClientCredentials="client_credentials"})(t||(t={}))},939,[]);
1040__d(function(g,r,i,a,m,_e,d){"use strict";const e=["windowFeatures"];Object.defineProperty(_e,'__esModule',{value:!0}),_e.useAutoDiscovery=function(e){const[t,n]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let t=!0;return(0,c.resolveDiscoveryAsync)(e).then(e=>{t&&n(e)}),()=>{t=!1}},[e]),t},_e.useLoadedAuthRequest=l,_e.useAuthRequestResult=h,_e.useAuthRequest=function(e,t){const n=l(e,t,o.AuthRequest),[u,s]=h(n,t);return[n,u,s]};var t,n=r(d[0]),u=(t=n)&&t.__esModule?t:{default:t},s=r(d[1]),o=r(d[2]),c=r(d[3]);function l(e,t,n){const[u,o]=(0,s.useState)(null),c=e.scopes?.join(' '),l=f(e.prompt),h=(0,s.useMemo)(()=>JSON.stringify(e.extraParams||{}),[e.extraParams]);return(0,s.useEffect)(()=>{let u=!0;if(t){const s=new n(e);s.makeAuthUrlAsync(t).then(()=>{u&&o(s)})}return()=>{u=!1}},[t?.authorizationEndpoint,e.clientId,e.redirectUri,e.responseType,e.clientSecret,e.codeChallenge,e.state,e.usePKCE,c,l,h]),u}function f(e){if(e)return Array.isArray(e)?e.join(' '):e}function h(t,n,o={}){const[c,l]=(0,s.useState)(null),f=(0,s.useCallback)(async(s={})=>{let{windowFeatures:c={}}=s,f=(0,u.default)(s,e);if(!n||!t)throw new Error('Cannot prompt to authenticate until the request has finished loading.');const h=Object.assign({},o,f,{windowFeatures:Object.assign({},o.windowFeatures??{},c)}),p=await(t?.promptAsync(n,h));return l(p),p},[t?.url,n?.authorizationEndpoint]);return[c,f]}},940,[109,34,888,941]);
1041__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.issuerWithWellKnownUrl=s,_e.fetchDiscoveryAsync=u,_e.resolveDiscoveryAsync=async function(n){if((0,o.default)(n&&!['number','boolean'].includes(typeof n),'Expected a valid discovery object or issuer URL'),'string'==typeof n)return await u(n);return n};var n,e=r(d[0]),o=(n=e)&&n.__esModule?n:{default:n},t=r(d[1]);function s(n){return`${n}/.well-known/openid-configuration`}async function u(n){const e=await(0,t.requestAsync)(s(n),{dataType:'json',method:'GET'});return{discoveryDocument:e,authorizationEndpoint:e.authorization_endpoint,tokenEndpoint:e.token_endpoint,revocationEndpoint:e.revocation_endpoint,userInfoEndpoint:e.userinfo_endpoint,endSessionEndpoint:e.end_session_endpoint,registrationEndpoint:e.registration_endpoint}}},941,[924,938]);
1042__d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.dismiss=function(){(0,n.dismissAuthSession)()},Object.defineProperty(_e,"getDefaultReturnUrl",{enumerable:!0,get:function(){return o}}),_e.getRedirectUrl=function(e){return c.default.getRedirectUrl({urlPath:e})},_e.makeRedirectUri=function({native:e,scheme:n,isTripleSlashed:u,queryParams:s,path:c,preferLocalhost:o}={}){const l=t.createURL(c||'',{isTripleSlashed:u,scheme:n,queryParams:s});if(o){const e=l.match(/\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/);if(e?.length){const[t,n]=l.split(e[0]);return`${t}localhost${n}`}}return l},_e.loadAsync=async function(e,t){const n=new u.AuthRequest(e),c=await(0,s.resolveDiscoveryAsync)(t);return await n.makeAuthUrlAsync(c),n};e(r(_d[0]));var t=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1]));r(_d[2]);var n=r(_d[3]),u=r(_d[4]),s=r(_d[5]),c=e(r(_d[6]));const o=c.default.getDefaultReturnUrl},942,[943,946,890,889,888,941,953]);
1043__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"AppOwnership",{enumerable:!0,get:function(){return l.AppOwnership}}),Object.defineProperty(_e,"ExecutionEnvironment",{enumerable:!0,get:function(){return l.ExecutionEnvironment}}),Object.defineProperty(_e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return l.UserInterfaceIdiom}});
1043var n=e(r(d[0])),t=r(d[1]);r(d[2]);var u=e(r(d[3])),l=r(d[4]),o=e(r(d[5]));o.default||console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");const s=(0,t.requireOptionalNativeModule)('ExpoUpdates');let f=null;if(s){let e;s.manifest?e=s.manifest:s.manifestString&&(e=JSON.parse(s.manifestString)),e&&Object.keys(e).length>0&&(f=e)}let c=null;if(u.default.EXDevLauncher){let e;u.default.EXDevLauncher.manifestString&&(e=JSON.parse(u.default.EXDevLauncher.manifestString)),e&&Object.keys(e).length>0&&(c=e)}let p=null;if(o.default&&o.default.manifest){const e=o.default.manifest;p='string'==typeof e?JSON.parse(e):e}let b=f??c??p;const E=o.default||{},{appOwnership:O}=E,x=(0,n.default)(E,["name","appOwnership"]),v=Object.assign({},x,{appOwnership:O??null});function _(e){return!h(e)}function h(e){return'metadata'in e}function S(e=!1){if(!b){const e=null===b?'null':'undefined';if(x.executionEnvironment,l.ExecutionEnvironment.Bare,x.executionEnvironment===l.ExecutionEnvironment.StoreClient||x.executionEnvironment===l.ExecutionEnvironment.Standalone)throw new t.CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE',`Constants.manifest is ${e}, must be an object.`)}return b}Object.defineProperties(v,{__unsafeNoWarnManifest:{get(){const e=S(!0);return e&&_(e)?e:null},enumerable:!1},__unsafeNoWarnManifest2:{get(){const e=S(!0);return e&&h(e)?e:null},enumerable:!1},manifest:{get(){const e=S();return e&&_(e)?e:null},enumerable:!0},manifest2:{get(){const e=S();return e&&h(e)?e:null},enumerable:!0},expoConfig:{get(){const e=S(!0);return e?s&&s.isEmbeddedLaunch?p:h(e)?e.extra?.expoClient??null:_(e)?e:null:null},enumerable:!0},expoGoConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.expoGo??null:_(e)?e:null:null},enumerable:!0},easConfig:{get(){const e=S(!0);return e?h(e)?e.extra?.eas??null:_(e)?e:null:null},enumerable:!0},__rawManifest_TEST:{get:()=>b,set(e){b=e},enumerable:!1}});var N=v},943,[109,890,95,784,944,945]);
1044__d(function(g,r,i,a,m,e,d){"use strict";var t,n,o;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AppOwnership",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ExecutionEnvironment",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"UserInterfaceIdiom",{enumerable:!0,get:function(){return o}}),(function(t){t.Expo="expo"})(t||(t={})),(function(t){t.Bare="bare",t.Standalone="standalone",t.StoreClient="storeClient"})(n||(n={})),(function(t){t.Handset="handset",t.Tablet="tablet",t.Desktop="desktop",t.TV="tv",t.Unsupported="unsupported"})(o||(o={}))},944,[]);
1045__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var n=r(d[0]);const t=(Date.now()+'-'+Math.floor(1e9*Math.random())).toString();function o(){if('undefined'!=typeof navigator&&'string'==typeof navigator.userAgent){const n=navigator.userAgent.toLowerCase();if(n.includes('edge'))return'Edge';if(n.includes('edg'))return'Chromium Edge';if(n.includes('opr')&&'opr'in window&&window.opr)return'Opera';if(n.includes('chrome')&&'chrome'in window&&window.chrome)return'Chrome';if(n.includes('trident'))return'IE';if(n.includes('firefox'))return'Firefox';if(n.includes('safari'))return'Safari'}}var u={get appOwnership(){return null},get executionEnvironment(){return n.ExecutionEnvironment.Bare},get sessionId(){return t},get isHeadless(){return'undefined'==typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return'undefined'!=typeof location?location.origin:''},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return o()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return"{\"name\":\"PurpleAir\",\"slug\":\"purpleair-app\",\"version\":\"1.0.0\",\"orientation\":\"portrait\",\"icon\":\"./assets/icon.png\",\"userInterfaceStyle\":\"automatic\",\"scheme\":\"com.purpleair.app\",\"splash\":{\"image\":\"./assets/splash.png\",\"resizeMode\":\"contain\",\"backgroundColor\":\"#aa44aa\"},\"web\":{\"favicon\":\"./public/favicon-32x32.png\",\"bundler\":\"metro\",\"shortName\":\"PurpleAir\",\"orientation\":\"portrait\",\"backgroundColor\":\"#aa44aa\",\"name\":\"PurpleAir\"},\"sdkVersion\":\"54.0.0\",\"platforms\":[\"ios\",\"android\",\"web\"]}"},get manifest2(){return null},get experienceUrl(){return'undefined'!=typeof location?location.origin:''},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>'undefined'!=typeof navigator?navigator.userAgent:null}},945,[944]);
1046__d(function(g,r,i,a,m,_e,d){"use strict";
1046function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"parse",{enumerable:!0,get:function(){return o.parse}}),Object.defineProperty(_e,"createURL",{enumerable:!0,get:function(){return o.createURL}}),_e.addEventListener=L,_e.parseInitialURLAsync=async function(){const e=await c.default.getInitialURL();if(!e)return{scheme:null,hostname:null,path:null,queryParams:null};return(0,o.parse)(e)},_e.sendIntent=async function(e,t){throw new n.UnavailabilityError('Linking','sendIntent')},_e.openSettings=async function(){throw new n.UnavailabilityError('Linking','openSettings')},_e.getInitialURL=p,_e.getLinkingURL=function(){return u.default.getLinkingURL()},_e.openURL=y,_e.canOpenURL=async function(e){return(0,l.validateURL)(e),await c.default.canOpenURL(e)},_e.useURL=function(){const[e,n]=(0,t.useState)(null);function u(e){n(e.url)}return(0,t.useEffect)(()=>{p().then(e=>n(e));const e=L('url',u);return()=>e.remove()},[]),e},_e.useLinkingURL=function(){const[e,n]=(0,t.useState)(u.default.getLinkingURL);function c(e){n(e.url)}return(0,t.useEffect)(()=>{const e=u.default.addListener('onURLReceived',c);return()=>e.remove()},[]),e??null};var n=r(d[0]),t=r(d[1]);r(d[2]);var u=e(r(d[3])),c=e(r(d[4])),o=r(d[5]),l=r(d[6]),f=r(d[7]);Object.keys(f).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return f[e]}})});var s=r(d[8]);function L(e,n){return c.default.addEventListener(e,n)}async function p(){return await c.default.getInitialURL()??null}async function y(e){return(0,l.validateURL)(e),await c.default.openURL(e)}Object.keys(s).forEach(function(e){'default'===e||Object.prototype.hasOwnProperty.call(_e,e)||Object.defineProperty(_e,e,{enumerable:!0,get:function(){return s[e]}})})},946,[890,34,95,947,948,949,950,951,952]);
1047__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return o}});var e,n=r(d[0]),t=(e=n)&&e.__esModule?e:{default:e},o={addListener(e,n){if((0,t.default)('onURLReceived'===e,`Linking.addListener(): ${e} is not a valid event`),'undefined'==typeof window)return{remove(){}};const o=e=>n({url:window.location.href,nativeEvent:e});return window.addEventListener('message',o,!1),{remove:()=>{window.removeEventListener('message',o)}}},getLinkingURL:()=>'undefined'==typeof window?'':window.location.href}},947,[924]);
1048__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return s}});var e,n=r(d[0]),t=(e=n)&&e.__esModule?e:{default:e};const o=[];var s={addEventListener(e,n){if('undefined'==typeof window)return{remove(){}};(0,t.default)('url'===e,`Linking.addEventListener(): ${e} is not a valid event`);const s=e=>n({url:window.location.href,nativeEvent:e});return o.push({listener:n,nativeListener:s}),window.addEventListener('message',s,!1),{remove:()=>{this.removeEventListener(e,n)}}},removeEventListener(e,n){if('undefined'==typeof window)return;(0,t.default)('url'===e,`Linking.addEventListener(): ${e} is not a valid event`);const s=o.findIndex(e=>e.listener===n);(0,t.default)(-1!==s,'Linking.removeEventListener(): cannot remove an unregistered event listener.');const v=o[s].nativeListener;window.removeEventListener('message',v,!1),o.splice(s,1)},canOpenURL:async()=>!0,getInitialURL:async()=>'undefined'==typeof window?'':window.location.href,async openURL(e){'undefined'!=typeof window&&(window.location=new URL(e,window.location).toString())}}},948,[924]);
1049__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.createURL=function(n,{queryParams:t={}}={}){if('undefined'==typeof window)return'';const o=new URL(n,window.location.origin);return Object.entries(t).forEach(([n,t])=>{'string'==typeof t?o.searchParams.set(n,encodeURIComponent(t)):null!=t&&o.searchParams.set(n,t)}),o.toString().replace(/\/$/,'')},e.parse=function(n){let t;try{t=new URL(n)}catch{return'undefined'==typeof window?{hostname:null,path:n,queryParams:{},scheme:null}:{hostname:'localhost',path:n,queryParams:{},scheme:'http'}}const o={};
1049return t.searchParams.forEach((n,t)=>{o[t]=decodeURIComponent(n)}),{hostname:t.hostname||null,path:t.hostname||t.pathname?''===t.pathname?null:t.pathname.replace(/^\//,''):null,queryParams:o,scheme:t.protocol.replace(/:$/,'')}}},949,[]);
1050__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.validateURL=function(e){(0,n.default)('string'==typeof e,'Invalid URL: should be a string. Was: '+e),(0,n.default)(e,'Invalid URL: cannot be empty')};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e}},950,[924]);
1051__d(function(g,r,i,a,m,e,d){},951,[]);
1052__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.hasCustomScheme=function(){return!0},e.collectManifestSchemes=function(){return[]},e.hasConstantsManifest=function(){return!1},e.resolveScheme=function(){return'https'}},952,[]);
1053__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return u}}),Object.defineProperty(_e,"SessionUrlProvider",{enumerable:!0,get:function(){return l}});var e,t=r(_d[0]),n=(e=t)&&e.__esModule?e:{default:e},o=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[1])),s=r(_d[2]);class l{static BASE_URL="https://auth.expo.io";static SESSION_PATH='expo-auth-session';getDefaultReturnUrl(e,t){const n=l.getHostAddressQueryParams();let s=l.SESSION_PATH;return e&&(s=[s,l.removeLeadingSlash(e)].filter(Boolean).join('/')),o.createURL(s,{scheme:t?.scheme??o.resolveScheme({isSilent:!0}),queryParams:n,isTripleSlashed:t?.isTripleSlashed})}getStartUrl(e,t,n){if(!s.Platform.isDOMAvailable)return'';const o=new URLSearchParams({authUrl:e,returnUrl:t});return`${this.getRedirectUrl({projectNameForProxy:n})}/start?${o}`}getRedirectUrl(e){return s.Platform.isDOMAvailable?[window.location.origin,e.urlPath].filter(Boolean).join('/'):''}static getHostAddressQueryParams(){let e=n.default.expoConfig?.hostUri;if(e||t.ExecutionEnvironment.StoreClient!==n.default.executionEnvironment&&!o.resolveScheme({})||(e=n.default.linkingUri?l.removeScheme(n.default.linkingUri).replace(/\/--(\/.*)?$/,''):''),!e)return;const s=e?.split('?');try{return Object.fromEntries(new URLSearchParams(s?.[1]))}catch{}}static warnIfAnonymous(e,t){e.startsWith('@anonymous/')&&console.warn(`You are not currently signed in to Expo on your development machine. As a result, the redirect URL for AuthSession will be "${t}". If you are using an OAuth provider that requires adding redirect URLs to an allow list, we recommend that you do not add this URL -- instead, you should sign in to Expo to acquire a unique redirect URL. Additionally, if you do decide to publish this app using Expo, you will need to register an account to do it.`)}static removeScheme(e){return e.replace(/^[a-zA-Z0-9+.-]+:\/\//,'')}static removeLeadingSlash(e){return e.replace(/^\//,'')}}var u=new l},953,[943,946,890]);
1054__d(function(g,r,i,a,m,e,d){},954,[]);
1055__d(function(g,r,i,a,m,e,d){},955,[]);
1056__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LoginForm=function({localAuthEnabled:e,email:s,onEmailChange:u,password:S,onPasswordChange:C,loading:O,onLogin:b,googleConfigStatus:R,isGoogleLoading:x,onGoogleLogin:E,signInNote:G,footer:h}){const y=e;return(0,L.jsxs)(o.default,{style:I.form,children:[e&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(T.AppTextInput,{style:I.input,placeholder:"Email",value:s,onChangeText:u,autoCapitalize:"none",keyboardType:"email-address",autoComplete:"email",accessibilityLabel:"Email address",returnKeyType:"next",onSubmitEditing:b}),(0,L.jsx)(T.AppTextInput,{style:I.input,placeholder:"Password",value:S,onChangeText:C,secureTextEntry:!0,autoComplete:"password",accessibilityLabel:"Password",returnKeyType:"go",onSubmitEditing:b}),(0,L.jsx)(n.default,{style:[I.button,O&&I.buttonDisabled],onPress:b,disabled:O,accessibilityRole:"button",accessibilityLabel:"Sign in",children:O?(0,L.jsx)(l.default,{color:c.COLORS.TEXT_INVERSE}):(0,L.jsx)(t.default,{style:I.buttonText,children:"Sign In"})})]}),y&&(0,L.jsxs)(o.default,{style:I.divider,children:[(0,L.jsx)(o.default,{style:I.dividerLine}),(0,L.jsx)(t.default,{style:I.dividerText,children:"or"}),(0,L.jsx)(o.default,{style:I.dividerLine})]}),f(R,x,E),null!=G&&(0,L.jsx)(o.default,{style:I.signInNote,children:G}),null!=h&&(0,L.jsx)(o.default,{style:I.footer,children:h})]})},r(d[0]);var o=e(r(d[1])),t=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),u=r(d[6]),c=r(d[7]),S=r(d[8]),C=r(d[9]),O=r(d[10]),T=r(d[11]),b=r(d[12]),L=r(d[13]);function f(e,o,s){return{loading:()=>(0,L.jsx)(b.FeatureStatusNotice,{status:"loading",title:"Google Sign-In",message:(0,u.configFeatureMessage)('loading','Google sign-in')}),missing:()=>(0,L.jsx)(b.FeatureStatusNotice,{status:"missing",title:"Google Sign-In",message:(0,u.configFeatureMessage)('missing','Google sign-in')}),ready:()=>(0,L.jsx)(n.default,{style:[I.googleButton,o&&I.buttonDisabled],onPress:s,disabled:o,accessibilityRole:"button",accessibilityLabel:"Sign in with Google",children:o?(0,L.jsx)(l.default,{color:c.COLORS.TEXT_DARK}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(R,{}),(0,L.jsx)(t.default,{style:I.googleButtonText,children:"Sign in with Google"})]})})}[e]()}function R(){return(0,L.jsx)(o.default,{style:I.googleIcon,children:(0,L.jsx)(t.default,{style:I.googleIconText,children:"G"})})}const I=(0,s.createStyles)({form:Object.assign({backgroundColor:c.COLORS.BG_SURFACE,borderRadius:12,maxWidth:400,padding:C.SPACING.XXL,width:'100%'}
1056,S.VIEW_SHADOW_STYLES.LOGIN_CARD),input:{backgroundColor:c.COLORS.BG_SUBTLE,borderColor:c.COLORS.BORDER_LIGHT,borderRadius:8,borderWidth:1,color:c.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.LG,marginBottom:C.SPACING.LG,paddingHorizontal:C.SPACING.LG,paddingVertical:C.SPACING.MD},button:{alignItems:'center',backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:8,marginTop:C.SPACING.MD,padding:C.SPACING.LG},buttonDisabled:{opacity:.7},buttonText:{color:c.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.XL,fontWeight:'600'},divider:{alignItems:'center',flexDirection:'row',marginVertical:C.SPACING.XL},dividerLine:{backgroundColor:c.COLORS.BORDER_SUBTLE,flex:1,height:1},dividerText:{color:c.COLORS.TEXT_SOFT,fontSize:O.FONT_SIZE.MD,marginHorizontal:C.SPACING.MD},googleButton:{alignItems:'center',backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER_STRONG,borderRadius:8,borderWidth:1,flexDirection:'row',justifyContent:'center',padding:C.SPACING.LG},googleButtonText:{color:c.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.LG,fontWeight:'600',marginLeft:C.SPACING.MD},googleIcon:{alignItems:'center',backgroundColor:c.COLORS.GOOGLE_BLUE,borderRadius:12,height:24,justifyContent:'center',width:24},googleIconText:{color:c.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.MD,fontWeight:'bold'},signInNote:{marginTop:C.SPACING.LG},footer:{borderTopColor:c.COLORS.BORDER_SUBTLE,borderTopWidth:1,marginTop:C.SPACING.XXL,paddingTop:C.SPACING.XXL}})},956,[34,276,222,488,410,489,531,490,491,493,494,711,512,104]);
1057__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LOGIN_HELP_TITLE",{enumerable:!0,get:function(){return y}}),_e.LoginAlternateEmailNote=function(){return(0,h.jsxs)(t.default,{style:L.providerNote,children:['Sign in with any email by ',(0,h.jsx)(p.ExternalLink,{href:f,inline:!0,textStyle:L.providerNoteLink,accessibilityLabel:"Linking any email with Google, at Google Account Help",children:"linking it with Google"})]})},_e.LoginHelpContent=function({onRegisterPress:e}={}){return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(t.default,{style:L.text,children:"Register your sensor and view it on the map with any email address. No sign in required."}),(0,h.jsx)(t.default,{style:[L.text,L.paragraph],children:"Signing in with Google lets you more easily view every sensor you own with its latest readings and settings. Additional sign-in options are planned for the future."}),(0,h.jsxs)(n.default,{style:L.links,children:[(0,h.jsx)(u.AppLink,Object.assign({to:"Register",textStyle:L.link,accessibilityLabel:"Register a sensor"},null!=e&&{onPress:e},{children:"Register a sensor"})),(0,h.jsx)(p.ExternalLink,{href:S.REGISTRATION_HELP_LINKS.viewingPrivateSensor,textStyle:L.link,accessibilityLabel:"Viewing a private sensor on the map. Community article",children:"Viewing a private sensor"})]})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=r(d[3]),l=r(d[4]),s=r(d[5]),c=r(d[6]),u=r(d[7]),p=r(d[8]),S=r(d[9]),h=r(d[10]);const f='https://support.google.com/accounts/answer/176347',y='No Google account? An email is all you need';const L=(0,o.createStyles)({link:{color:l.COLORS.BRAND_PRIMARY,fontSize:c.FONT_SIZE.MD,fontWeight:'600'},links:{flexDirection:'row',flexWrap:'wrap',gap:s.SPACING.LG,marginTop:s.SPACING.LG},paragraph:{marginTop:s.SPACING.MD},providerNote:{color:l.COLORS.TEXT_SOFT,fontSize:c.FONT_SIZE.XS,lineHeight:17,textAlign:'center'},providerNoteLink:{color:l.COLORS.BRAND_PRIMARY,fontSize:c.FONT_SIZE.XS,fontWeight:'600'},text:{color:l.COLORS.TEXT_SOFT,fontSize:c.FONT_SIZE.MD,lineHeight:20}})},957,[34,222,276,489,490,493,494,516,519,958,104]);
1058__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"REGISTRATION_HELP_LINKS",{enumerable:!0,get:function(){return c}}),e.RegistrationHelpLink=function({href:t,children:n,accessibilityLabel:o}){return(0,l.jsx)(s.ExternalLink,{href:t,inline:!0,textStyle:p.link,accessibilityLabel:o,children:n})},r(d[0]);var t=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]);const c={emailRoles:'https://community.purpleair.com/t/associated-email-vs-owners-email/643',viewingPrivateSensor:'https://community.purpleair.com/t/can-i-set-my-purpleair-sensor-to-private-and-how-do-i-view-a-private-sensor-on-the-map/819'};const p=(0,t.createStyles)({link:{color:n.COLORS.BRAND_PRIMARY,fontSize:o.FONT_SIZE.SM,fontWeight:'600'}})},958,[34,489,490,494,519,104]);
1059__d(function(g,r,i,a,m,_e,d){"use strict";
1059function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LoginHelpModal=function(){const[e,f]=(0,t.useState)(!1),S=()=>{f(!1)};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(s.default,{style:O.trigger,onPress:()=>{f(!0)},activeOpacity:.7,accessibilityRole:"button",accessibilityLabel:b.LOGIN_HELP_TITLE,children:[(0,x.jsx)(C.ChevronIcon,{direction:"right",size:16,color:u.COLORS.TEXT_DARK}),(0,x.jsx)(o.default,{style:O.triggerText,children:b.LOGIN_HELP_TITLE})]}),(0,x.jsx)(n.default,{visible:e,transparent:!0,animationType:"slide",onRequestClose:S,children:e&&(0,x.jsx)(l.default,{style:O.backdrop,onPress:S,accessibilityLabel:"Dismiss sign-in information",testID:"login-help-backdrop",children:(0,x.jsxs)(l.default,{style:O.panel,role:"dialog",accessibilityLabel:"Email and Google sign-in information",accessibilityViewIsModal:!0,children:[(0,x.jsxs)(c.default,{style:O.header,children:[(0,x.jsx)(o.default,{style:O.title,children:b.LOGIN_HELP_TITLE}),(0,x.jsx)(s.default,{style:O.closeButton,onPress:S,accessibilityRole:"button",accessibilityLabel:"Close sign-in information",children:(0,x.jsx)(o.default,{style:O.closeButtonText,children:"Close"})})]}),(0,x.jsx)(b.LoginHelpContent,{onRegisterPress:S})]})})})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),f=r(d[6]),u=r(d[7]),S=r(d[8]),I=r(d[9]),L=r(d[10]),C=r(d[11]),b=r(d[12]),x=r(d[13]);const O=(0,f.createStyles)({backdrop:{backgroundColor:u.COLORS.OVERLAY_DARK,flex:1,justifyContent:'flex-end'},closeButton:{paddingHorizontal:I.SPACING.MD,paddingVertical:I.SPACING.SM},closeButtonText:{color:u.COLORS.BRAND_PRIMARY,fontSize:L.FONT_SIZE.MD,fontWeight:'600'},header:{alignItems:'flex-start',flexDirection:'row',gap:I.SPACING.MD,justifyContent:'space-between'},panel:Object.assign({alignSelf:'center',backgroundColor:u.COLORS.BG_SURFACE,borderTopLeftRadius:16,borderTopRightRadius:16,maxWidth:560,padding:I.SPACING.XXL,width:'100%'},S.ELEVATION.MEDIUM),title:{color:u.COLORS.TEXT_HEADING,flex:1,fontSize:L.FONT_SIZE.XL,fontWeight:'700',marginBottom:I.SPACING.XL},trigger:{alignItems:'center',flexDirection:'row',gap:I.SPACING.XS,marginHorizontal:-I.SPACING.SM,paddingHorizontal:I.SPACING.SM,paddingVertical:I.SPACING.SM},triggerText:{color:u.COLORS.TEXT_DARK,flexShrink:1,fontSize:L.FONT_SIZE.MD,fontWeight:'600'}})},959,[34,544,369,222,488,276,489,490,503,493,494,554,957,104]);
1060__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.MyAccountScreen=function(){const{user:e}=(0,s.useAuth)(),o=(0,j.useSignOut)(),h=(0,_.useSeoMeta)('MyAccount'),y=(0,t.useCallback)(async()=>{await o()},[o]);return(0,x.jsxs)(S.PageLayout,{children:[(0,x.jsx)(f.WebMeta,Object.assign({},h)),(0,x.jsx)(n.default,{style:M.scrollView,children:(0,x.jsxs)(l.default,{style:M.accountContainer,children:[(0,x.jsx)(l.default,{style:M.header,children:(0,x.jsx)(c.default,{style:M.title,children:"My Account"})}),(0,x.jsx)(u.AccountTab,{user:e,onLogout:()=>{y()}})]})})]})};var t=r(d[0]),n=e(r(d[1])),c=e(r(d[2])),l=e(r(d[3])),o=r(d[4]),s=r(d[5]),u=r(d[6]),S=r(d[7]),f=r(d[8]),h=r(d[9]),y=r(d[10]),A=r(d[11]),_=r(d[12]),j=r(d[13]),x=r(d[14]);const M=(0,o.createStyles)({accountContainer:{alignSelf:'center',maxWidth:1200,padding:y.SPACING.XXL,width:'100%'},header:{alignItems:'center',marginBottom:y.SPACING.XL},scrollView:{backgroundColor:h.COLORS.BG_WASH,flex:1},title:{color:h.COLORS.BRAND_PRIMARY,fontSize:A.FONT_SIZE.DISPLAY_SM,fontWeight:'700'}})},960,[34,283,222,276,489,411,961,568,565,490,493,494,562,495,104]);
1061__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.AccountTab=function({user:e,onLogout:c}){const p=(0,R.useAppNavigation)(),[O,f]=(0,t.useState)(0),{isAdmin:b}=(0,u.useAuth)(),{availableOrgs:A,isLoading:j,memberOrgLoadFailed:N}=(0,L.useOrganization)(),_=(0,C.isRouteEnabledByUnreleasedCapabilities)('SensorConfig',h.ENABLED_UNRELEASED_CAPABILITIES),G=A.find(e=>'member'===e.source)??null,z=(0,t.useCallback)(e=>{f(e.nativeEvent.layout.width)}
1061,[]),M=O<P,k=(0,x.getInitials)(e?.email),B=(0,E.jsx)(l.default,{style:M?v.logoutButtonCompact:v.logoutButton,onPress:c,accessibilityRole:"button",accessibilityLabel:"Sign out",children:(0,E.jsx)(n.default,{style:M?v.logoutTextCompact:v.logoutText,children:"Sign Out"})}),X=D({organizationLoading:j,memberOrgLoadFailed:N,apiOrganization:G});return(0,E.jsxs)(o.default,{style:v.container,children:[(0,E.jsxs)(o.default,{style:v.profileCard,testID:"account-profile-card",onLayout:z,children:[null!=e?.pictureUrl&&''!==e.pictureUrl?(0,E.jsx)(s.default,{source:{uri:e.pictureUrl},style:v.avatarImage}):(0,E.jsx)(o.default,{style:v.avatar,children:(0,E.jsx)(n.default,{style:v.avatarText,children:k})}),(0,E.jsxs)(o.default,{style:v.profileBody,children:[(0,E.jsx)(n.default,{style:v.email,children:e?.email??'Unknown'}),M?(0,E.jsxs)(o.default,{style:v.profileFooter,testID:"account-profile-footer",children:[(0,E.jsx)(n.default,{style:v.role,children:(0,x.formatRole)(e?.role)}),B]}):(0,E.jsx)(n.default,{style:v.role,children:(0,x.formatRole)(e?.role)}),X]}),!M&&B]}),(0,E.jsxs)(o.default,{style:v.section,children:[(0,E.jsx)(n.default,{style:v.sectionTitle,children:"Quick Actions"}),(0,E.jsxs)(I.ResponsiveGrid,{minItemWidth:T,gap:S.SPACING.MD,children:[(0,E.jsx)(y.ActionCard,{icon:"\ud83d\udce1",label:"My Sensors",description:"View and configure your sensors",to:"SensorManagement"}),b&&(0,E.jsx)(y.ActionCard,{icon:"\ud83d\udee0\ufe0f",label:"Admin Panel",description:"Manage users, billing, and settings",to:"Admin"}),b&&(0,E.jsx)(y.ActionCard,{icon:"\ud83d\udd11",label:"API Tokens",description:"Create and manage API access tokens",to:"ApiTokens"}),_&&(0,E.jsx)(y.ActionCard,{icon:"\u2699\ufe0f",label:"Sensor Config",description:"Configure sensor WiFi and settings",onPress:()=>{p.navigate('SensorConfig')},accessibilityLabel:"Sensor Config"}),(0,E.jsx)(y.ActionCard,{icon:"\u2795",label:"Register Sensor",description:"Add a new sensor to your account",to:"Register"})]})]})]})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=r(d[5]),u=r(d[6]),p=r(d[7]),O=r(d[8]),S=r(d[9]),f=r(d[10]),C=r(d[11]),L=r(d[12]),R=r(d[13]),h=r(d[14]),b=r(d[15]),x=r(d[16]),y=r(d[17]),A=r(d[18]),I=r(d[19]),j=r(d[20]),E=r(d[21]);const P=640,T=220;function D({organizationLoading:e,memberOrgLoadFailed:t,apiOrganization:l}){return e?null:null!=l?(0,E.jsx)(o.default,{style:v.apiOrgGroup,testID:"api-organization-card",children:(0,E.jsxs)(n.default,{style:v.apiOrgCaption,children:[(0,E.jsx)(n.default,{style:v.apiOrgLabel,children:"API organization \xb7 "}),(0,E.jsx)(n.default,{style:v.apiOrgValue,children:l.name}),(0,E.jsx)(n.default,{style:v.apiOrgLabel,children:" \xb7 "}),(0,E.jsx)(n.default,{style:v.apiOrgValue,children:`${(0,b.formatPointBalance)(l.balance)} points`}),(0,E.jsx)(n.default,{style:v.apiOrgLabel,children:" \xb7 "}),(0,E.jsx)(j.ServiceExternalLink,{service:"developerPortalUrl",inline:!0,textStyle:v.apiOrgLink,accessibilityLabel:"Open Developer Portal",children:"Manage in Developer Portal"})]})}):t?(0,E.jsx)(o.default,{style:v.apiOrgGroup,testID:"api-organization-error-card",children:(0,E.jsxs)(n.default,{style:v.apiOrgCaption,children:[(0,E.jsx)(n.default,{style:v.apiOrgLabel,children:"API organization: "}),"Details aren't available right now. ",(0,E.jsx)(j.ServiceExternalLink,{service:"developerPortalUrl",inline:!0,textStyle:v.apiOrgLink,accessibilityLabel:"Open Developer Portal",children:"Open the Developer Portal"}),"."]})}):(0,E.jsx)(o.default,{style:v.apiOrgGroup,testID:"api-organization-empty-card",children:(0,E.jsxs)(n.default,{style:v.apiOrgCaption,children:[(0,E.jsx)(n.default,{style:v.apiOrgLabel,children:"API organization: "}),"You're not in one yet. ",(0,E.jsx)(j.ServiceExternalLink,{service:"developerPortalUrl",inline:!0,textStyle:v.apiOrgLink,accessibilityLabel:"Sign up for an API organization",children:"Sign up in the Developer Portal"}),' or ',(0,E.jsx)(A.AppLink,{to:"API",inline:!0,textStyle:v.apiOrgLink,accessibilityLabel:"Learn more about the API",children:"learn how the API works"}),"."]})})}const v=(0,c.createStyles)({apiOrgCaption:{color:p.COLORS.TEXT_SECONDARY,fontSize:f.FONT_SIZE.MD,lineHeight:22},apiOrgGroup:{marginTop:S.SPACING.SM},apiOrgLabel:{color:p.COLORS.TEXT_MUTED},apiOrgLink:{color:p.COLORS.BRAND_PRIMARY,fontWeight:'600'},apiOrgValue:{color:p.COLORS.TEXT_DARK,fontWeight:'600'},avatar:{alignItems:'center',backgroundColor:p.COLORS.BRAND_PRIMARY,borderRadius:32,height:64,justifyContent:'center',width:64},avatarImage:{borderRadius:32,height:64,width:64},avatarText:{color:p.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.XXXL,fontWeight:'600'},container:{gap:S.SPACING.XXL},email:{color:p.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.XL,fontWeight:'600'},logoutButton:{backgroundColor:p.COLORS.BG_SURFACE,borderColor:p.COLORS.ERROR,borderRadius:8,borderWidth:1,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.SM},logoutButtonCompact:{backgroundColor:p.COLORS.BG_SURFACE,borderColor:p.COLORS.ERROR,borderRadius:8,borderWidth:1,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.XS},logoutText:{color:p.COLORS.ERROR,fontSize:f.FONT_SIZE.MD,fontWeight:'600'},logoutTextCompact:{color:p.COLORS.ERROR,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},profileBody:{flex:1,gap:S.SPACING.XS,minWidth:0},profileCard:Object.assign({alignItems:'flex-start',backgroundColor:p.COLORS.BG_SURFACE,borderColor:p.COLORS.BORDER,borderRadius:12,borderWidth:1,flexDirection:'row',gap:S.SPACING.LG,padding:S.SPACING.XL},O.ELEVATION.SUBTLE),profileFooter:{alignItems:'center',flexDirection:'row',gap:S.SPACING.MD,justifyContent:'space-between'},role:{color:p.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.MD},section:{gap:S.SPACING.MD},sectionTitle:{color:p.COLORS.TEXT_DARK,fontSize:f.FONT_SIZE.XL,fontWeight:'600'}})},961,[34,276,222,488,328,489,411,490,503,493,494,506,962,505,507,836,641,964,516,965,522,104]);
1062__d(function(g,r,i,a,m,_e,d){"use strict";
1062Object.defineProperty(_e,'__esModule',{value:!0}),_e.OrganizationProvider=function({children:e}){const{isAuthenticated:t}=(0,s.useAuth)(),[n,o]=(0,l.useState)([]),[c,y]=(0,l.useState)(null),[b,v]=(0,l.useState)(null),[_,p]=(0,l.useState)(!0),[z,A]=(0,l.useState)(!1),[C,G]=(0,l.useState)(!1),L=(0,l.useMemo)(()=>{const e=[...n];if(null!=c){e.some(e=>e.id===c.id)||e.push(c)}return e},[n,c]);(0,l.useEffect)(()=>{let e=!1;return(async function(){p(!0),A(!1),G(!1);const n=await w();let l=[];if(t)try{const t=await u.organizationApi.getMyOrganizations();e||(l=t.map(e=>({id:e.id,name:e.name,balance:e.balance,source:'member'})),o(l))}catch(t){f.logger.warn('Failed to fetch user organizations',t),e||A(!0)}else e||o([]);let s=null;const c=S();if(null!=c)try{const t=await u.organizationApi.resolveOrganization(c);e||null==t?e||(y(null),G(!1)):(s={id:t.id,name:t.name,balance:t.balance,source:'guest'},y(s),G(!0))}catch(t){f.logger.warn('Failed to resolve guest org from query string',t),e||(y(null),G(!1))}else e||(y(null),G(!1));if(!e){const e=[...l];null==s||e.some(e=>e.id===s.id)||e.push(s);const t=null!=n?e.find(e=>e.id===n)??null:null;if(null!=t)v(t);else if(null!=s)v(s),E(s.id);else{const t=e[0]??null;v(t),E(t?.id??null)}p(!1)}})(),()=>{e=!0}},[t]);const R=(0,l.useCallback)(e=>{const t=L.find(t=>t.id===e);null!=t&&(v(t),E(t.id))},[L]),P=(0,l.useCallback)(()=>{v(null),E(null)},[]),T=(0,l.useCallback)((e,t)=>{const n={id:e,name:t,source:'guest'};y(n),v(n),E(n.id)},[]),D=(0,l.useMemo)(()=>({selectedOrg:b,availableOrgs:L,isLoading:_,memberOrgLoadFailed:z,organizationFromDeveloperPortalLink:C,selectOrg:R,clearOrg:P,setGuestOrg:T}),[b,L,_,z,C,R,P,T]);return(0,O.jsx)(h.Provider,{value:D,children:e})},_e.useOrganization=function(){const e=(0,l.useContext)(h);if(null==e)throw new Error('useOrganization must be used within OrganizationProvider');return e};var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e},l=r(d[1]);r(d[2]);var u=r(d[3]),s=r(d[4]),o=r(d[5]),c=r(d[6]),f=r(d[7]),O=r(d[8]);const h=(0,l.createContext)(null);function S(){try{return new URLSearchParams(window.location.search).get('org')}catch{return null}}async function E(e){try{null==e?await n.default.removeItem(o.STORAGE_KEYS.SELECTED_ORG):await n.default.setItem(o.STORAGE_KEYS.SELECTED_ORG,e)}catch(e){f.logger.warn('Failed to persist selected org ID',e)}}async function w(){try{const e=await n.default.getItem(o.STORAGE_KEYS.SELECTED_ORG);if(null==e||''===e)return null;if(e.startsWith('{'))try{const t=JSON.parse(e);return'object'!=typeof t||null===t||Array.isArray(t)?null:(0,c.readOptionalString)(t,'id')??null}catch{return null}return e}catch{return null}}},962,[477,34,95,963,411,484,467,469,104]);
1063__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"organizationApi",{enumerable:!0,get:function(){return o}});var n=r(d[0]),t=r(d[1]);const o={getMyOrganizations:()=>t.organizations.getMyOrganizations(),async resolveOrganization(o){try{return await t.organizations.resolveOrganization({query:{encryptedId:o}})}catch(t){if((0,n.isAxios404)(t))return null;throw t}}}},963,[464,471]);
1064__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ActionCard=function(e){const{icon:n,label:c,description:s,accessibilityLabel:u}=e,{columnCount:f}=(0,x.useResponsiveGridLayout)(),O=1===f,j=b(n,O),v=O?(0,h.jsxs)(l.default,{style:L.horizontalLayout,testID:"action-card-layout-horizontal",children:[j,(0,h.jsxs)(l.default,{style:L.textBlock,children:[(0,h.jsx)(t.default,{style:L.label,children:c}),(0,h.jsx)(t.default,{style:L.description,children:s})]})]}):(0,h.jsxs)(l.default,{style:L.verticalLayout,testID:"action-card-layout-vertical",children:[j,(0,h.jsx)(t.default,{style:L.label,children:c}),(0,h.jsx)(t.default,{style:L.description,children:s})]});if(void 0!==e.to)return(0,h.jsx)(y.AppLink,{to:e.to,style:L.card,children:v});if(void 0!==e.service)return(0,h.jsx)(S.ServiceExternalLink,Object.assign({service:e.service,style:L.card,accessibilityLabel:u??c},void 0!==e.servicePath?{path:e.servicePath}:{},{children:v}));return(0,h.jsx)(o.default,{style:L.card,onPress:e.onPress,accessibilityRole:"button",accessibilityLabel:u??c,children:v})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),n=r(d[4]),c=r(d[5]),s=r(d[6]),u=r(d[7]),f=r(d[8]),y=r(d[9]),x=r(d[10]),S=r(d[11]),h=r(d[12]);function b(e,o){return'string'==typeof e?(0,h.jsx)(t.default,{style:[L.iconText,o&&L.iconNoBottomMargin],children:e}):(0,h.jsx)(l.default,{style:[L.iconBox,o&&L.iconNoBottomMargin],children:e})}const L=(0,n.createStyles)({card:Object.assign({backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER,borderRadius:12,borderWidth:1,flex:1,padding:u.SPACING.LG},s.ELEVATION.SUBTLE),description:{color:c.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.SM,marginTop:u.SPACING.XS},horizontalLayout:{alignItems:'center',flexDirection:'row',gap:u.SPACING.MD},iconBox:{marginBottom:u.SPACING.SM},iconNoBottomMargin:{marginBottom:0},iconText:{fontSize:f.FONT_SIZE.XXXL,marginBottom:u.SPACING.SM},label:{color:c.COLORS.TEXT_DARK,fontSize:f.FONT_SIZE.LG,fontWeight:'600'},textBlock:{flex:1,minWidth:0},verticalLayout:{flexDirection:'column'}})},964,[34,222,488,276,489,490,503,493,494,516,965,522,104]);
1065__d(function(g,r,_i,a,m,_e,d){"use strict";
1065Object.defineProperty(_e,'__esModule',{value:!0}),_e.ResponsiveContainer=function({children:e,style:t,fullWidth:i=!1,centered:n=!0}){const u=(0,s.useResponsive)(),{horizontalPadding:c,contentMaxWidth:p}=u,h=Object.assign({paddingHorizontal:c,width:'100%'},n&&!i?{maxWidth:p,alignSelf:'center'}:{}),f='function'==typeof e?e(u):e;return(0,o.jsx)(l.default,{style:[h,t],children:f})},_e.useResponsiveGridLayout=function(){return(0,e.useContext)(u)},_e.ResponsiveGrid=function({children:t,minItemWidth:i=280,gap:n=16,style:s,testID:p}){const[h,f]=(0,e.useState)(0),y=(0,e.useCallback)(e=>{f(e.nativeEvent.layout.width)},[]),x=h>0,v=x?Math.max(1,Math.floor((h+n)/(i+n))):1,j=e.Children.toArray(t),w=[];for(let e=0;e<j.length;e+=v)w.push(j.slice(e,e+v));const S=(0,e.useMemo)(()=>({columnCount:v}),[v]);{const t={display:'grid',gap:n,gridTemplateColumns:`repeat(auto-fill, minmax(${String(i)}px, 1fr))`};return(0,o.jsx)(u.Provider,{value:S,children:(0,o.jsx)(l.default,{style:[t,s],onLayout:y,testID:p,children:j.map((t,i)=>(0,o.jsx)(l.default,{testID:`responsive-grid-item-${String(i)}`,style:c.webGridItem,children:t},(0,e.isValidElement)(t)&&null!=t.key?t.key:`responsive-grid-${String(i)}`))})})}},_e.SplitView=function({primary:e,secondary:t,ratio:i=.5,gap:n=16,showSecondaryOnPhone:u=!1,style:p}){const{isPhone:h,isPortrait:f}=(0,s.useResponsive)();if(h||f&&!h)return(0,o.jsxs)(l.default,{style:[c.splitVertical,{gap:n},p],children:[(0,o.jsx)(l.default,{style:c.splitFull,children:e}),u&&(0,o.jsx)(l.default,{style:c.splitFull,children:t})]});return(0,o.jsxs)(l.default,{style:[c.splitHorizontal,{gap:n},p],children:[(0,o.jsx)(l.default,{style:{flex:i},children:e}),(0,o.jsx)(l.default,{style:{flex:1-i},children:t})]})},_e.AdaptiveColumns=function({children:t,columns:i={phone:1,tablet:2,desktop:3},gap:n=16,style:u}){const{deviceSize:p,width:h,horizontalPadding:f}=(0,s.useResponsive)(),y='desktop'===p?i.desktop??3:'tablet'===p?i.tablet??2:i.phone??1,x=(h-2*f-n*(y-1))/y,v=e.Children.toArray(t);return(0,o.jsx)(l.default,{style:[c.grid,{gap:n},u],children:v.map((t,i)=>(0,o.jsx)(l.default,{style:{width:x},children:t},(0,e.isValidElement)(t)&&null!=t.key?t.key:`responsive-grid-${String(i)}`))})};var e=r(d[0]);r(d[1]);var t,i=r(d[2]),l=(t=i)&&t.__esModule?t:{default:t},n=r(d[3]),s=r(d[4]),o=r(d[5]);const u=(0,e.createContext)({columnCount:1});const c=(0,n.createStyles)({grid:{flexDirection:'row',flexWrap:'wrap'},gridRow:{flexDirection:'row'},gridItem:{flexShrink:1,minWidth:0},webGridItem:{minWidth:0},splitFull:{width:'100%'},splitHorizontal:{flexDirection:'row',flex:1},splitVertical:{flexDirection:'column',flex:1}})},965,[34,95,276,489,553,104]);
1066__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.NotFoundScreen=function(){const e=(0,y.useAnalyticsEvent)(),{pathname:s,referrer:c}=(0,h.useRequestedUrl)(),f=(0,t.useMemo)(()=>s.length>0?(0,A.suggestClosestRoutes)(s,C):[],[s]);return(0,t.useEffect)(()=>{0!==s.length&&e('page_not_found',{page_path:s,page_referrer:c})},[e,s,c]),(0,I.jsxs)(n.default,{style:_.scroll,contentContainerStyle:_.container,children:[(0,I.jsx)(L.WebMeta,Object.assign({},p)),(0,I.jsxs)(l.default,{style:_.content,children:[(0,I.jsx)(o.default,{style:_.code,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:"404"}),(0,I.jsx)(o.default,{style:_.heading,accessibilityRole:"header",children:"We can't find that page"}),(0,I.jsx)(o.default,{style:_.body,children:"The page you're looking for doesn't exist, or it may have moved."}),s.length>0&&(0,I.jsxs)(l.default,{style:_.panel,children:[(0,I.jsx)(o.default,{style:_.panelLabel,children:"You tried"}),(0,I.jsx)(o.default,{style:[_.path,F],accessibilityLabel:`Requested address ${s}`,children:s}),f.length>0&&(0,I.jsxs)(l.default,{style:_.suggestions,children:[(0,I.jsxs)(o.default,{style:_.suggestionsLabel,children:["Did you mean",f.length>1?' one of these?':'?']}),f.map(e=>(0,I.jsx)(S.AppLink,{href:`/${e.replace(/^\//u,'')}`,accessibilityLabel:`Go to ${e}`,children:(0,I.jsx)(o.default,{style:_.suggestionLink,children:e})},e))]})]}),(0,I.jsx)(S.AppLink,{to:"Home",style:_.primaryButton,accessibilityLabel:"Back to the PurpleAir home page",children:(0,I.jsx)(o.default,{style:_.primaryButtonText,children:"Back to home"})})]}),(0,I.jsxs)(l.default,{style:_.recovery,children:[(0,I.jsx)(o.default,{style:_.recoveryLabel,children:"Or continue to"}),(0,I.jsx)(l.default,{style:_.linkList,children:N.map(({screen:e,label:t})=>(0,I.jsxs)(S.AppLink,{to:e,style:_.linkRow,accessibilityLabel:t,children:[(0,I.jsx)(o.default,{style:_.linkRowText,children:t}),(0,I.jsx)(o.default,{style:_.linkRowChevron,children:"\u203a"})]},e))})]})]})};var t=r(d[0]);r(d[1]);var n=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),S=r(d[7]),L=r(d[8]),f=r(d[9]),O=r(d[10]),u=r(d[11]),h=r(d[12]),T=r(d[13]),y=r(d[14]),A=r(d[15]),I=r(d[16]);const p={title:'Page not found | PurpleAir',description:'',ogType:'website',noIndex:!0},N=[{screen:'AboutMap',label:'Real-time map'},{screen:'Store',label:'Store'},{screen:'Community',label:'Community'},{screen:'Blog',label:'Blog'},{screen:'Contact',label:'Contact us'}];const C=T.ROUTE_DEFINITIONS.filter(e=>'exact'===e.match&&'stable'===e.availability).filter(function(e){return'/'!==e.path&&(0,c.isPublicScreen)(e.name)}).map(e=>e.path),F={wordBreak:'break-word'};const _=(0,s.createStyles)({scroll:{flex:1,backgroundColor:f.COLORS.BG_SURFACE},container:{flexGrow:1,alignItems:'center',justifyContent:'center',paddingVertical:O.SPACING.XXXL,paddingHorizontal:O.SPACING.XL},content:{width:'100%',maxWidth:560,alignItems:'center'},code:{fontSize:u.FONT_SIZE.DISPLAY_XL,lineHeight:u.FONT_SIZE.DISPLAY_XL,fontWeight:'800',letterSpacing:2,color:f.COLORS.BLUE,fontFamily:u.FONT_FAMILY.SANS},heading:{marginTop:O.SPACING.XL,fontSize:u.FONT_SIZE.DISPLAY_SM,fontWeight:'700',textAlign:'center',color:f.COLORS.TEXT_PRIMARY,fontFamily:u.FONT_FAMILY.SANS},body:{marginTop:O.SPACING.MD,fontSize:u.FONT_SIZE.LG,lineHeight:26,textAlign:'center',color:f.COLORS.TEXT_MEDIUM,fontFamily:u.FONT_FAMILY.SANS},panel:{width:'100%',maxWidth:380,marginTop:O.SPACING.XXL,paddingVertical:O.SPACING.LG,paddingHorizontal:O.SPACING.XL,backgroundColor:f.COLORS.BG_SLATE,borderWidth:1,borderColor:f.COLORS.BORDER_SLATE,borderLeftWidth:3,borderLeftColor:f.COLORS.BLUE,borderRadius:10,alignItems:'flex-start'},panelLabel:{fontSize:u.FONT_SIZE.XS,color:f.COLORS.TEXT_MUTED,fontFamily:u.FONT_FAMILY.SANS},path:{marginTop:O.SPACING.MICRO,maxWidth:'100%',color:f.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.MD,fontFamily:u.FONT_FAMILY.MONOSPACE},suggestions:{marginTop:O.SPACING.LG,alignSelf:'stretch',alignItems:'flex-start'},suggestionsLabel:{fontSize:u.FONT_SIZE.XS,color:f.COLORS.TEXT_MUTED,fontFamily:u.FONT_FAMILY.SANS},suggestionLink:{marginTop:O.SPACING.XS,fontSize:u.FONT_SIZE.MD,fontWeight:'600',color:f.COLORS.BLUE,fontFamily:u.FONT_FAMILY.MONOSPACE},primaryButton:{marginTop:O.SPACING.XXXL,backgroundColor:f.COLORS.BLUE,borderRadius:10,paddingVertical:O.SPACING.MD,paddingHorizontal:O.SPACING.XXL},primaryButtonText:{color:f.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.LG,fontWeight:'600',textAlign:'center',fontFamily:u.FONT_FAMILY.SANS},recovery:{width:'100%',maxWidth:420,marginTop:O.SPACING.MASSIVE},recoveryLabel:{fontSize:u.FONT_SIZE.SM,color:f.COLORS.TEXT_MUTED,fontFamily:u.FONT_FAMILY.SANS},linkList:{marginTop:O.SPACING.XS},linkRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingVertical:O.SPACING.MD,borderBottomWidth:1,borderBottomColor:f.COLORS.BORDER_FAINT},linkRowText:{fontSize:u.FONT_SIZE.LG,fontWeight:'400',color:f.COLORS.TEXT_BODY,fontFamily:u.FONT_FAMILY.SANS},linkRowChevron:{fontSize:u.FONT_SIZE.XL,color:f.COLORS.TEXT_PLACEHOLDER,fontFamily:u.FONT_FAMILY.SANS}})},966,[34,95,283,222,276,489,485,516,565,490,493,494,967,666,968,970,104]);
1067__d(function(g,r,i,a,m,e,d){"use strict";
1067Object.defineProperty(e,'__esModule',{value:!0}),e.useRequestedUrl=function(){const[n]=(0,t.useState)(()=>({pathname:window.location.pathname,referrer:document.referrer}));return n};var t=r(d[0])},967,[34]);
1068__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AnalyticsConsentSync=function(){const{consent:s,hasConsented:c}=(0,t.useCookieConsent)();return(0,n.useEffect)(()=>{c&&(s.analytics?l.analyticsService.enable():l.analyticsService.disable())},[s.analytics,c]),null},e.useAnalyticsPageTracker=function(){const t=(0,n.useRef)(void 0);return(0,n.useCallback)(n=>{const s=o(n);null!=s&&s!==t.current&&(t.current=s,l.analyticsService.trackPageView(window.location.pathname,s))},[])},e.useAnalyticsEvent=function(){return(0,n.useCallback)((n,t)=>{l.analyticsService.trackEvent(n,t)},[])};var n=r(d[0]);r(d[1]);var t=r(d[2]),s=r(d[3]),c=r(d[4]),l=r(d[5]);function o(n){if(null==n?.routes)return;const t=n.routes[n.index];return null!=t?null!=t.state?(0,s.isAppNavigationState)(t.state)?o(t.state):(c.logger.error('[Analytics] Nested navigation state is malformed:',t.state),t.name):t.name:void 0}},968,[34,95,587,505,469,969]);
1069__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AnalyticsService",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"analyticsService",{enumerable:!0,get:function(){return l}}),r(d[0]);var t=r(d[1]);const n=''!==t.GA_MEASUREMENT_ID?t.GA_MEASUREMENT_ID:'G-EZVD0DFNJN',o=`ga-disable-${n}`;function c(){null!=window.dataLayer&&window.dataLayer.push(arguments)}class s{initialized=!1;enabled=!1;enable(){this.enabled=!0,window[o]=!1,this.initialized||(this.loadGtagScript(),this.initialized=!0)}disable(){this.enabled=!1,window[o]=!0}trackPageView(t,n){this.enabled&&c('event','page_view',{page_path:t,page_title:n})}trackEvent(t,n){this.enabled&&c('event',t,n)}isEnabled(){return this.enabled&&this.initialized}reset(){this.initialized=!1,this.enabled=!1}loadGtagScript(){if('undefined'==typeof document)return;const t=window.dataLayer??[];window.dataLayer=t,'function'!=typeof window.gtag&&(window.gtag=function(){t.push(arguments)}),c('js',new Date),c('config',n);if(document.querySelector(`script[src*="googletagmanager.com/gtag/js?id=${n}"]`))return;const o=document.createElement('script');o.async=!0,o.src=`https://www.googletagmanager.com/gtag/js?id=${n}`,document.head.appendChild(o)}}const l=new s},969,[95,465]);
1070__d(function(g,r,_i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"editDistance",{enumerable:!0,get:function(){return t.editDistance}}),e.suggestClosestRoutes=function(o,l,h={}){const u=h.maxResults??n,f=h.maxDistance??s,p=h.maxDistanceRatio??i,x=a(o);if(0===x.length)return[];const P=x.split('/'),D=new Set;for(const t of l){const n=a(t);n.length>0&&D.add(n)}const b=new Set,M=[];for(const n of l){const s=a(n);if(0===s.length||b.has(s))continue;b.add(s);const i=s.split('/').length;if(i>P.length)continue;const o=P.slice(0,i).join('/');if(D.has(o))continue;if(Math.abs(o.length-s.length)>f)continue;const l=(0,t.editDistance)(o,s);if(l>f)continue;l/Math.max(o.length,s.length)>p||M.push({path:n,distance:l,sharedPrefix:c(o,s)})}return M.sort((t,n)=>t.distance!==n.distance?t.distance-n.distance:t.sharedPrefix!==n.sharedPrefix?n.sharedPrefix-t.sharedPrefix:t.path.localeCompare(n.path)),M.slice(0,u).map(t=>t.path)};var t=r(d[0]);const n=3,s=3,i=.3;function a(t){return t.trim().toLowerCase().replace(/\/+$/u,'')}function c(t,n){const s=t.split('/'),i=n.split('/'),a=Math.min(s.length,i.length);let c=0;for(let t=0;t<a&&s[t]===i[t];t+=1)c+=1;return c}},970,[971]);
1071__d(function(g,r,_i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.editDistance=function(t,n){if(t===n)return 0;if(0===t.length)return n.length;if(0===n.length)return t.length;const l=n.length+1,h=new Int32Array((t.length+1)*l),i=t=>h[t]??0;for(let n=0;n<=t.length;n+=1)h[n*l]=n;for(let t=0;t<=n.length;t+=1)h[t]=t;for(let f=1;f<=t.length;f+=1)for(let o=1;o<=n.length;o+=1){const u=t[f-1]===n[o-1]?0:1;let c=Math.min(i((f-1)*l+o)+1,i(f*l+(o-1))+1,i((f-1)*l+(o-1))+u);f>1&&o>1&&t[f-1]===n[o-2]&&t[f-2]===n[o-1]&&(c=Math.min(c,i((f-2)*l+(o-2))+1)),h[f*l+o]=c}return i(t.length*l+n.length)}},971,[]);
1072__d(function(g,r,i,a,m,_e,d){"use strict";
1072function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PapersScreen=function(){return(0,y.jsx)(p.CatalogLayout,{seoKey:"Papers",hero:{backgroundColor:u.COLORS.BRAND_PRIMARY,background:{imageUrl:'https://images.unsplash.com/photo-1716730090346-663308dc1847?w=1920&q=80',imagePosition:'center',overlayGradient:S.GRADIENTS.DARK_OVERLAY},minHeight:350,label:'RESEARCH',title:'Scientific Papers',subtitle:`${C.TOTAL_PAPERS} peer-reviewed studies featuring PurpleAir sensors in air quality research, from sensor calibration to environmental justice.`,centered:!0},categories:C.PAPER_CATEGORIES,getItemCount:e=>e.papers.length,sidebarTitle:"Categories",allLabel:"All Categories",itemNoun:{singular:'paper',plural:'papers'},introText:"PurpleAir sensors are widely used in scientific research and have been featured in dozens of peer-reviewed publications. Below is a curated collection of studies organized by research domain. Click any paper to view the full publication.",disclaimerTitle:"About This Collection",disclaimerText:"This is a curated selection of published scientific papers and reports that feature PurpleAir sensors. It is not an exhaustive list. If you have published research using PurpleAir sensors and would like it included here, please contact us.",narrowMaxWidth:900,accordion:!0,renderCategorySection:(e,{isOpen:t,onToggle:o})=>(0,y.jsx)(R,{category:e,isOpen:t,onToggle:o})})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2]));r(d[3]);var n=e(r(d[4])),l=r(d[5]),s=r(d[6]),c=r(d[7]),p=r(d[8]),u=r(d[9]),S=r(d[10]),h=r(d[11]),O=r(d[12]),C=r(d[13]),f=r(d[14]),y=r(d[15]);function T({paper:e}){const{hovered:n,webHoverProps:l}=(0,f.useWebHover)();return(0,y.jsx)(c.ExternalLink,Object.assign({href:e.url},l,{children:(0,y.jsxs)(s.Card,{hoverable:!0,padding:h.SPACING.XL,style:[A.paperCardOverrides,n&&A.paperCardHoveredBorder],children:[(0,y.jsx)(o.default,{style:A.paperTitle,children:e.title}),(0,y.jsx)(o.default,{style:A.paperAuthors,children:e.authors}),(0,y.jsxs)(t.default,{style:A.paperMeta,children:[(0,y.jsx)(o.default,{style:A.paperJournal,children:e.journal}),(0,y.jsx)(o.default,{style:A.paperYear,children:e.year})]}),(0,y.jsx)(o.default,{style:A.paperSummary,children:e.summary}),null!=e.doi&&''!==e.doi?(0,y.jsxs)(o.default,{style:A.paperDoi,children:["DOI: ",e.doi]}):null]})}))}function R({category:e,isOpen:l,onToggle:s}){const{hovered:c,webHoverProps:p}=(0,f.useWebHover)();return(0,y.jsxs)(t.default,{style:A.categorySection,children:[(0,y.jsxs)(n.default,Object.assign({style:[A.categoryHeader,c&&!l&&A.categoryHeaderHovered],onPress:s,activeOpacity:.8},p,{children:[(0,y.jsxs)(t.default,{style:A.categoryHeaderContent,children:[(0,y.jsx)(o.default,{style:A.categoryTitle,children:e.title}),(0,y.jsxs)(o.default,{style:A.categoryCount,children:[e.papers.length," papers"]})]}),(0,y.jsx)(o.default,{style:A.categoryChevron,children:l?'\u2212':'+'})]})),l&&(0,y.jsxs)(t.default,{style:A.categoryBody,children:[(0,y.jsx)(o.default,{style:A.categoryDescription,children:e.description}),(0,y.jsx)(t.default,{style:A.paperList,children:e.papers.map(e=>(0,y.jsx)(T,{paper:e},e.url))})]})]})}const A=(0,l.createStyles)({categoryBody:{paddingBottom:h.SPACING.XXL,paddingHorizontal:h.SPACING.XXL,paddingTop:h.SPACING.SM},categoryChevron:{color:u.COLORS.BRAND_PRIMARY,fontSize:O.FONT_SIZE.XXXL,fontWeight:'300',textAlign:'center',width:28},categoryCount:{color:u.COLORS.TEXT_GHOST,fontSize:O.FONT_SIZE.SM,fontWeight:'500'},categoryDescription:{color:u.COLORS.TEXT_SOFT,fontSize:O.FONT_SIZE.MD,lineHeight:22,marginBottom:h.SPACING.XL},categoryHeader:Object.assign({alignItems:'center',backgroundColor:u.COLORS.BG_LIGHT,flexDirection:'row',justifyContent:'space-between',paddingHorizontal:h.SPACING.XXL,paddingVertical:h.SPACING.XL},{cursor:'pointer'}),categoryHeaderContent:{flex:1,marginRight:h.SPACING.LG},categoryHeaderHovered:{backgroundColor:u.COLORS.BG_MUTED},categorySection:{borderColor:u.COLORS.BORDER,borderRadius:12,borderWidth:1,overflow:'hidden'},categoryTitle:{color:u.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.XXL,fontWeight:'700',marginBottom:h.SPACING.MICRO},paperAuthors:{color:u.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.SM,lineHeight:20,marginBottom:h.SPACING.SM},paperCardHoveredBorder:{borderColor:u.COLORS.BRAND_PRIMARY},paperCardOverrides:Object.assign({borderRadius:10},{transition:'box-shadow 0.2s, border-color 0.2s'}),paperDoi:{color:u.COLORS.TEXT_GHOST,fontSize:O.FONT_SIZE.XS,marginTop:h.SPACING.SM},paperJournal:{color:u.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.SM,fontStyle:'italic',fontWeight:'500'},paperList:{gap:h.SPACING.LG},paperMeta:{alignItems:'center',flexDirection:'row',gap:h.SPACING.MD,marginBottom:h.SPACING.MD},paperSummary:{color:u.COLORS.TEXT_DIM,fontSize:O.FONT_SIZE.MD,lineHeight:22},paperTitle:{color:u.COLORS.BRAND_PRIMARY,fontSize:O.FONT_SIZE.LG,fontWeight:'600',lineHeight:24,marginBottom:h.SPACING.SM},paperYear:{backgroundColor:u.COLORS.BRAND_TINT_SUBTLE,borderRadius:4,color:u.COLORS.BRAND_PRIMARY,fontSize:O.FONT_SIZE.SM,fontWeight:'600',overflow:'hidden',paddingHorizontal:h.SPACING.SM,paddingVertical:h.SPACING.MICRO}})},972,[34,276,222,95,488,489,605,519,973,490,675,493,494,974,609,104]);
1073__d(function(g,r,i,a,m,_e,d){"use strict";
1073function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.CatalogLayout=function({seoKey:e,hero:c,categories:C,getItemCount:S,sidebarTitle:u,allLabel:I,itemNoun:y,introText:N,disclaimerTitle:j,disclaimerText:E,narrowMaxWidth:M,accordion:_=!1,categoryGap:P,renderCategorySection:G}){const X=(0,O.useSeoMeta)(e),[D,v]=(0,t.useState)(null),[B,F]=(0,t.useState)(()=>new Set(C.map(e=>e.id))),z=(0,t.useCallback)(e=>{F(t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o})},[]),W=(0,t.useCallback)(e=>{v(e),_&&F(null!==e?new Set([e]):new Set(C.map(e=>e.id)))},[_,C]),H=(0,t.useMemo)(()=>null===D?C:C.filter(e=>e.id===D),[D,C]),w=(0,t.useMemo)(()=>C.reduce((e,t)=>e+S(t),0),[C,S]),k=(0,t.useMemo)(()=>H.reduce((e,t)=>e+S(t),0),[H,S]),Z=1===k?y.singular:y.plural,U=null!=P?[R.categoryList,{gap:P}]:R.categoryList,V=(0,x.jsxs)(l.default,{style:R.mainContent,children:[(0,x.jsx)(l.default,{style:R.introSection,children:(0,x.jsx)(n.default,{style:R.introText,children:N})}),(0,x.jsxs)(n.default,{style:R.resultCount,children:[k," ",Z,null!==D?` in ${H[0]?.title??''}`:'']}),(0,x.jsx)(l.default,{style:U,children:H.map(e=>(0,x.jsx)(o.default.Fragment,{children:G(e,{isOpen:!_||B.has(e.id),onToggle:_?()=>{z(e.id)}:L})},e.id))}),(0,x.jsxs)(l.default,{style:R.disclaimerSection,children:[(0,x.jsx)(n.default,{style:R.disclaimerTitle,children:j}),(0,x.jsx)(n.default,{style:R.disclaimerText,children:E})]})]});return(0,x.jsxs)(p.PageLayout,{children:[(0,x.jsx)(h.WebMeta,Object.assign({},X)),(0,x.jsxs)(s.default,{style:R.container,children:[(0,x.jsx)(T.HeroSection,Object.assign({},c)),(0,x.jsx)(b.SidebarLayout,Object.assign({sidebar:(0,x.jsx)(A,{title:u,allLabel:I,categories:C,getItemCount:S,selectedCategoryId:D,onSelectCategory:W,totalItemCount:w}),strip:(0,x.jsx)(f,{allLabel:I,categories:C,selectedCategoryId:D,onSelectCategory:W})},void 0!==M?{narrowMaxWidth:M}:{},{children:V}))]})]})};var t=r(d[0]),o=e(t),l=e(r(d[1])),n=e(r(d[2])),s=e(r(d[3])),c=e(r(d[4])),C=r(d[5]),S=r(d[6]),u=r(d[7]),I=r(d[8]),O=r(d[9]),T=r(d[10]),p=r(d[11]),h=r(d[12]),b=r(d[13]),x=r(d[14]);function A({title:e,allLabel:t,categories:o,getItemCount:l,selectedCategoryId:s,onSelectCategory:C,totalItemCount:S}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.default,{style:R.sidebarTitle,children:e}),(0,x.jsxs)(c.default,{style:[R.sidebarItem,null===s&&R.sidebarItemActive],onPress:()=>{C(null)},children:[(0,x.jsx)(n.default,{style:[R.sidebarItemText,null===s&&R.sidebarItemTextActive],children:t}),(0,x.jsx)(n.default,{style:[R.sidebarItemCount,null===s&&R.sidebarItemCountActive],children:S})]}),o.map(e=>(0,x.jsxs)(c.default,{style:[R.sidebarItem,s===e.id&&R.sidebarItemActive],onPress:()=>{C(e.id)},children:[(0,x.jsx)(n.default,{style:[R.sidebarItemText,s===e.id&&R.sidebarItemTextActive],numberOfLines:2,children:e.title}),(0,x.jsx)(n.default,{style:[R.sidebarItemCount,s===e.id&&R.sidebarItemCountActive],children:l(e)})]},e.id))]})}function f({allLabel:e,categories:t,selectedCategoryId:o,onSelectCategory:C}){return(0,x.jsx)(l.default,{style:R.stripContainer,children:(0,x.jsxs)(s.default,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:R.stripContent,children:[(0,x.jsx)(c.default,{style:[R.stripChip,null===o&&R.stripChipActive],onPress:()=>{C(null)},accessibilityRole:"button",accessibilityLabel:e,children:(0,x.jsx)(n.default,{style:[R.stripChipText,null===o&&R.stripChipTextActive],children:e})}),t.map(e=>(0,x.jsx)(c.default,{style:[R.stripChip,o===e.id&&R.stripChipActive],onPress:()=>{C(e.id)},children:(0,x.jsx)(n.default,{style:[R.stripChipText,o===e.id&&R.stripChipTextActive],children:e.title})},e.id))]})})}const L=()=>{};const R=(0,C.createStyles)({categoryList:{gap:u.SPACING.XL},container:{backgroundColor:S.COLORS.BG_SURFACE,flex:1},disclaimerSection:{backgroundColor:S.COLORS.BG_LIGHT,borderColor:S.COLORS.BORDER,borderRadius:12,borderWidth:1,marginTop:u.SPACING.MASSIVE,padding:u.SPACING.XXXL},disclaimerText:{color:S.COLORS.TEXT_SOFT,fontSize:I.FONT_SIZE.MD,lineHeight:22},disclaimerTitle:{color:S.COLORS.TEXT_HEADING,fontSize:I.FONT_SIZE.XL,fontWeight:'600',marginBottom:u.SPACING.SM},introSection:{marginBottom:u.SPACING.XXL},introText:{color:S.COLORS.TEXT_DIM,fontSize:I.FONT_SIZE.LG,lineHeight:26},mainContent:{paddingBottom:u.SPACING.MASSIVE,paddingHorizontal:u.SPACING.XXL,paddingTop:u.SPACING.XXL},resultCount:{color:S.COLORS.TEXT_MUTED,fontSize:I.FONT_SIZE.MD,marginBottom:u.SPACING.LG},sidebarItem:{alignItems:'center',borderRadius:6,flexDirection:'row',justifyContent:'space-between',marginBottom:u.SPACING.MICRO,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM},sidebarItemActive:{backgroundColor:S.COLORS.BRAND_TINT_SUBTLE},sidebarItemCount:{color:S.COLORS.TEXT_PLACEHOLDER,fontSize:I.FONT_SIZE.SM,fontWeight:'500'},sidebarItemCountActive:{color:S.COLORS.ACTION_PRIMARY,fontWeight:'700'},sidebarItemText:{color:S.COLORS.TEXT_MEDIUM,flex:1,fontSize:I.FONT_SIZE.MD,fontWeight:'500',marginRight:u.SPACING.SM},sidebarItemTextActive:{color:S.COLORS.ACTION_PRIMARY,fontWeight:'700'},sidebarTitle:{color:S.COLORS.TEXT_PLACEHOLDER,fontSize:I.FONT_SIZE.SM,fontWeight:'700',letterSpacing:1.5,marginBottom:u.SPACING.LG,paddingTop:u.SPACING.SM,textTransform:'uppercase'},stripChip:{backgroundColor:S.COLORS.BG_SURFACE,borderColor:S.COLORS.BORDER_DEFAULT,borderRadius:16,borderWidth:1,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.SM}
1073,stripChipActive:{backgroundColor:S.COLORS.ACTION_PRIMARY,borderColor:S.COLORS.ACTION_PRIMARY},stripChipText:{color:S.COLORS.TEXT_BODY,fontSize:I.FONT_SIZE.SM,fontWeight:'500'},stripChipTextActive:{color:S.COLORS.TEXT_INVERSE},stripContainer:{backgroundColor:S.COLORS.BG_FAINT,borderBottomColor:S.COLORS.BORDER,borderBottomWidth:1},stripContent:{gap:u.SPACING.SM,paddingHorizontal:u.SPACING.XXL,paddingVertical:u.SPACING.MD}})},973,[34,276,222,283,488,489,490,493,494,562,674,568,565,713,104]);
1074__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PAPER_CATEGORIES",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"TOTAL_PAPERS",{enumerable:!0,get:function(){return o}});const t=[{id:'calibration',title:'Sensor Calibration & Correction',description:'Foundational research on calibrating PurpleAir sensors against regulatory-grade monitors, developing correction equations, and improving measurement accuracy across diverse environmental conditions.',papers:[{title:'Development and Application of a United States-Wide Correction for PM2.5 Data Collected with the PurpleAir Sensor',authors:'Barkjohn, K.K., Gantt, B., Clements, A.L.',journal:'Atmospheric Measurement Techniques',year:2021,doi:'10.5194/amt-14-4617-2021',url:'https://amt.copernicus.org/articles/14/4617/2021/',summary:'Developed the widely-adopted US-wide correction equation for PurpleAir PM2.5 data using nearly 12,000 collocated measurements across 16 states. Reduced RMSE from 8 to 3 \xb5g/m\xb3. This correction is used by the EPA AirNow Fire and Smoke Map.'},{title:'Correction and Accuracy of PurpleAir PM2.5 Measurements for Extreme Wildfire Smoke',authors:'Wallace, L.A., Zhao, T., Klepeis, N.E.',journal:'Sensors',year:2022,doi:'10.3390/s22249669',url:'https://www.mdpi.com/1424-8220/22/24/9669',summary:'Extended the EPA correction to handle extreme wildfire smoke concentrations above 300 \xb5g/m\xb3 using a piecewise equation. Corrected data accurately reported NowCast AQI categories 90% of the time versus 75% for uncorrected data.'},{title:'Calibration of PurpleAir PA-I and PA-II Monitors Using Daily Mean PM2.5 Concentrations Measured in California, Washington, and Oregon from 2017 to 2021',authors:'Wallace, L.A., Zhao, T., Klepeis, N.E.',journal:'Sensors',year:2022,doi:'10.3390/s22134741',url:'https://www.mdpi.com/1424-8220/22/13/4741',summary:'Comprehensive calibration study using daily PM2.5 measurements from three western US states over five years, addressing both PA-I and PA-II monitor variants.'},{title:'Calibration of PurpleAir Low-Cost Particulate Matter Sensors: Model Development for Air Quality Under High Relative Humidity Conditions',authors:'Multiple authors',journal:'Atmospheric Measurement Techniques',year:2024,doi:'10.5194/amt-17-6735-2024',url:'https://amt.copernicus.org/articles/17/6735/2024/',summary:'Developed calibration models specifically addressing PurpleAir sensor accuracy under high relative humidity, a key environmental factor affecting light-scattering particle sensors.'},{title:'Evaluation of PurpleAir PA-II Units Using NO2 as a Calibration Factor',authors:'Ko, Y., Cho, S., Rao, S.',journal:'Atmospheric Measurement Techniques',year:2024,doi:'10.5194/amt-17-3303-2024',url:'https://amt.copernicus.org/articles/17/3303/2024/',summary:'Demonstrated that incorporating NO2 measurements significantly improves PA-II calibration, achieving R\xb2 > 0.819 during winter months.'},{title:'Correction of PM2.5 Underestimation in Low-Cost Sensors Under Elevated Dust Loading Using Only Sensor Measurements',authors:'Multiple authors',journal:'Atmospheric Measurement Techniques',year:2026,doi:'10.5194/amt-19-1077-2026',url:'https://amt.copernicus.org/articles/19/1077/2026/',summary:'Developed correction thresholds for PM2.5 underestimation during dust events using data from 109 sensors compared against EPA sites from 2017\u20132025. Reduced mean bias error by approximately 50%.'},{title:'Seasonally Optimized Calibrations Improve Low-Cost Sensor Performance: Long-Term Field Evaluation of PurpleAir Sensors in Urban and Rural India',authors:'Campmier, M.J. et al.',journal:'Atmospheric Measurement Techniques (preprint)',year:2023,url:'https://amt.copernicus.org/preprints/amt-2023-35/',summary:'Long-term field evaluation in India showing that site-specific and seasonal calibrations improved PA-II performance to normalized RMSE of 20\u201330% and R\xb2 of 0.82\u20130.95.'},{title:"An Evaluation of the U.S. EPA's Correction Equation for PurpleAir Sensor Data in Smoke, Dust, and Wintertime Urban Pollution Events",authors:'Jaffe, D.A. et al.',journal:'Atmospheric Measurement Techniques',year:2023,doi:'10.5194/amt-16-1311-2023',url:'https://amt.copernicus.org/articles/16/1311/2023/',summary:'Evaluated the EPA correction equation across 50 smoke, mineral dust, and winter urban pollution events. Performance varies by aerosol t
1074ype, with the correction performing best for wildfire smoke.'},{title:'Retrieval of Bulk Hygroscopicity from PurpleAir PM2.5 Sensor Measurements',authors:'Friberg, M.D. et al.',journal:'Atmospheric Measurement Techniques',year:2025,doi:'10.5194/amt-18-3135-2025',url:'https://amt.copernicus.org/articles/18/3135/2025/',summary:'Developed an optimal estimation method that simultaneously corrects PurpleAir PM2.5 and retrieves aerosol hygroscopicity. Reduced mean absolute error from 5.58 to 1.68 \xb5g/m\xb3; bulk hygroscopicity estimates (0.33\u20130.40) consistent with atmospheric particulate ranges.'},{title:'Improvement of Surface PM2.5 Diurnal Variation Simulations in East Africa for the MAIA Satellite Mission',authors:'Multiple authors',journal:'Atmosphere',year:2024,doi:'10.3390/atmos15040457',url:'https://pmc.ncbi.nlm.nih.gov/articles/PMC11019548/',summary:'Calibrated PurpleAir sensors against US Embassy reference monitors in Ethiopia for NASA MAIA satellite validation. Correlation between observed and simulated PM2.5 diurnal variation improved from 0.1\u20130.7 to 0.6\u20130.9.'}]},{id:'performance',title:'Sensor Performance & Evaluation',description:'Studies evaluating PurpleAir sensor accuracy, precision, long-term reliability, and degradation characteristics across different environments.',papers:[{title:'Laboratory and Field Performance of Some Low-Cost Sensor Systems for Measuring PM2.5 and PM10',authors:'Ardon-Dryer, K., Dryer, Y., Williams, J.N., Moghimi, N.',journal:'Atmospheric Measurement Techniques',year:2020,doi:'10.5194/amt-13-5441-2020',url:'https://amt.copernicus.org/articles/13/5441/2020/',summary:'Evaluated PA-II performance across four US regions. After multivariate linear regression corrections for temperature and humidity, 75% of comparisons achieved R\xb2 > 0.8 against EPA monitoring stations.'},{title:'Long-Term Assessment of PurpleAir Low-Cost Sensor for PM2.5 in California, USA',authors:'Multiple authors',journal:'Pollutants',year:2023,doi:'10.3390/pollutants3040033',url:'https://www.mdpi.com/2673-4672/3/4/33',summary:'Assessed PurpleAir sensor performance over the 2016\u20132023 period in California. R\xb2 ranged from 0.54 to 0.86 for hourly concentrations. Sensors effectively captured PM2.5 trends and wildfire peaks.'},{title:'Intercomparison of PurpleAir Sensor Performance over Three Years Indoors and Outdoors at a Home: Bias, Precision, and Limit of Detection Using an Improved Algorithm for Calculating PM2.5',authors:'Wallace, L.A., Bi, J., Ott, W.R., Sarnat, J., Liu, Y.',journal:'Atmospheric Environment',year:2022,doi:'10.1016/j.atmosenv.2022.119067',url:'https://pubmed.ncbi.nlm.nih.gov/35408369/',summary:'Three-year intercomparison study documenting PurpleAir sensor performance for bias, precision, and detection limits in both indoor and outdoor residential settings.'},{title:'An Analysis of Degradation in Low-Cost Particulate Matter Sensors',authors:'Multiple authors',journal:'Environmental Science: Atmospheres',year:2023,doi:'10.1039/D2EA00142J',url:'https://pubs.rsc.org/en/content/articlehtml/2023/ea/d2ea00142j',summary:'Quantified PurpleAir sensor degradation: flagged measurements increase to ~4% after 4 years, bias changes by \u22120.12 \xb5g/m\xb3 per year, and hot/humid climates accelerate permanent degradation. Approximately 2% of all sensors experience permanent degradation.'},{title:'Evaluating PurpleAir Sensors: Do They Accurately Reflect Ambient Air Temperature?',authors:'Multiple authors',journal:'Sensors',year:2025,doi:'10.3390/s25103044',url:'https://www.mdpi.com/1424-8220/25/10/3044',summary:'Evaluated PurpleAir temperature measurements, finding average 3.77\xb0C overestimation but moderate correlation with reference data. Eight calibration methods reduced errors by 47\u201351%.'},{title:'Field Evaluation of Low-Cost PM Sensors (Purple Air PA-II) Under Variable Urban Air Quality Conditions, in Greece',authors:'Multiple authors',journal:'Atmosphere',year:2020,doi:'10.3390/atmos11090926',url:'https://www.mdpi.com/2073-4433/11/9/926',summary:'Field evaluation of PurpleAir PA-II under variable urban air quality conditions in Greece, assessing performance against reference monitors across different pollution levels.'},{title:'Fine Particle Mass Monitoring with Low-Cost Sensors: Corrections and Long-Term Performance Evaluation',authors:'Malings, C. et al.',journal:'Atmospheric Measurement Techniques',year:2020,doi:'10.5194/amt-13-3873-2020',url:'https://amt.copernicus.org/articles/13/3873/2020/',summary:'Evaluated low-cost fine particulate sensors with satellite AOD for calibration and long-term performance assessment, including dense PurpleAir-style sensor networks.'},{title:'Evaluating the PurpleAir Monitor as an Aerosol Light Scattering Instrument',authors:'Holder, A.L. et al.',journal:'Atmospheric Measurement Techniques',year:2022,doi:'10.5194/amt-15-655-2022',url:'https://amt.copernicus.org/articles/15/655/2022/',summary:'Demonstrated PurpleAir functions as a cell-reciprocal nephelometer. Validated at NOAA Mauna Loa Observatory and Boulder Table Mountain; R\xb2 = 0.97 against reference scattering coefficients across 0.2\u2013200 \xb5g/m\xb3.'},{title:'Five Years of Accurate PM2.5 Measurements Demonstrate the Value of Low-Cost PurpleAir Monitors in Areas Affected by Woodsmoke',authors:'Multiple authors',journal:'International Journal of Environmental Research and Public Health',year:2023,doi:'10.3390/ijerph20237127',url:'https://www.mdpi.com/1660-4601/20/23/7127',summary:'Five-year validation of PurpleAir monitors in woodsmoke-affected areas demonstrated sustained accuracy and reliability for community-level PM2.5 monitoring, with strong correlation to reference instruments.'},{title:'Measuring Air Quality for Advocacy in Africa (MA3): Feasibility and Practicality of Longitudinal Ambient PM2.5 Measurement Using Low-Cost Sensors',authors:'Multiple authors',journal:'International Journal of Environmental Research and Public Health',year:2020,doi:'10.3390/ijerph17207243',url:'https://www.mdpi.com/1660-4601/17/20/7243',summary:'Deployed PurpleAir-II-SD sensors at 13 locations across 7 sub-Saharan African countries. Achieved 94% median data recovery rate; first longitudinal low-cost PM2.5 monitoring study on the continent.'}]},{id:'spatial',title:'Spatial Analysis & Sensor Networks',description:'Research leveraging the PurpleAir sensor network for spatial analysis of air quality, detecting local pollution variations, and high-resolution pollution mapping.',papers:[{title:'Spatial Variation of PM2.5 Indoors and Outdoors: Results from 261 Regulatory Monitors Compared to 14,000 Low-Cost Monitors in Three Western States over 4.7 Years',authors:'Wallace, L.A., Zhao, T., Klepeis, N.E.',j
1074ournal:'Sensors',year:2023,doi:'10.3390/s23094387',url:'https://www.mdpi.com/1424-8220/23/9/4387',summary:'Compared 261 regulatory monitors with ~14,000 PurpleAir monitors across three western states over 4.7 years. Outdoor PM2.5 spatial variation is homogeneous to at least 10 km; indoor variation is heterogeneous even at distances under 100 meters.'},{title:'Efficacy of Low-Cost Sensor Networks at Detecting Fine-Scale Variations in Particulate Matter in Urban Environments',authors:'Multiple authors',journal:'International Journal of Environmental Research and Public Health',year:2023,doi:'10.3390/ijerph20021934',url:'https://www.mdpi.com/1660-4601/20/3/1934',summary:'Analysis of 25 PurpleAir sensors across Indianapolis revealed substantial fine-scale PM2.5 variations. A 1% increase in tree canopy correlated with ~0.12 \xb5g/m\xb3 decrease in PM2.5.'},{title:'Highly Local Sources and Large Spatial Variations in PM2.5 Across a City: Evidence from a City-Wide Sensor Network in Cork, Ireland',authors:'Multiple authors',journal:'Environmental Science: Atmospheres',year:2023,doi:'10.1039/D2EA00177B',url:'https://pubs.rsc.org/en/content/articlehtml/2023/ea/d2ea00177b',summary:'A network of 16 PurpleAir sensors across Cork demonstrated significant spatial variation, with some areas experiencing daily averages approximately double others, driven primarily by residential heating sources.'},{title:'High Spatio-Temporal Resolution Predictions of PM2.5 Using Low-Cost Sensor Data',authors:'Multiple authors',journal:'Atmospheric Environment',year:2024,doi:'10.1016/j.atmosenv.2024.120414',url:'https://www.sciencedirect.com/science/article/pii/S1352231024001614',summary:'Used PurpleAir sensor networks to generate PM2.5 predictions at 100-meter spatial resolution and hourly temporal resolution across multiple US cities.'},{title:'Using Emerging Sensor Networks to Investigate Impacts of Roadway Activities on PM10 and PM2.5',authors:'Multiple authors',journal:'UC Institute of Transportation Studies',year:2023,url:'https://ucits.org/projects/using-emerging-sensor-networks-to-investigate-impacts-of-roadway-activities-on-pm10-and-pm2-5/',summary:'Analyzed data from ~1,600 PurpleAir sensors within 700 meters of major roadways to explore factors controlling elevated particulate matter around roads.'},{title:'Estimating Hourly PM2.5 Concentrations at the Neighborhood Scale Using a Low-Cost Air Sensor Network: A Los Angeles Case Study',authors:'Multiple authors',journal:'Environmental Research',year:2021,doi:'10.1016/j.envres.2020.110653',url:'https://www.sciencedirect.com/science/article/abs/pii/S0013935120315504',summary:'Used random forest modeling with PurpleAir data in Los Angeles County, achieving R\xb2 = 0.93 for cross-validation and capturing wildfire, holiday, and typical air quality patterns.'},{title:'Estimating PM2.5 Concentrations at Public Schools in North Carolina Using Multiple Data Sources and Interpolation Methods',authors:'Multiple authors',journal:'Scientific Reports',year:2025,doi:'10.1038/s41598-025-26539-3',url:'https://www.nature.com/articles/s41598-025-26539-3',summary:'Combined EPA and PurpleAir data with Kriging and IDW interpolation to estimate PM2.5 at North Carolina schools. PurpleAir improved spatial resolution and prediction accuracy, with findings linked to 8th grade reading scores.'},{title:'PurpleAir Sensor Deployment Trends and Uncertainties',authors:'Multiple authors',journal:'Sensors',year:2025,doi:'10.3390/s26061789',url:'https://www.mdpi.com/1424-8220/26/6/1789',summary:'Comprehensive analysis of PurpleAir network growth: most publicly shared sensors remain deployed 3+ years; high density in western US; deployment disproportionately in higher-income, higher-education census tracts.'},{title:'Skyrocketing Pollution: Assessing the Environmental Fate of July 4th Fireworks in New York City',authors:'Multiple authors',journal:'Journal of Exposure Science & Environmental Epidemiology',year:2024,doi:'10.1038/s41370-024-00692-5',url:'https://www.nature.com/articles/s41370-024-00692-5',summary:'PurpleAir sensor network captured extreme PM2.5 spikes during July 4th fireworks across NYC boroughs; demonstrated the utility of dense low-cost networks for detecting short-duration pollution events.'}]},{id:'indoor',title:'Indoor Air Quality',description:'Studies using PurpleAir sensors to measure indo
1074or air quality, distinguish indoor-generated from outdoor-infiltrated particles, and assess residential exposure.',papers:[{title:'Long-Term Indoor-Outdoor PM2.5 Measurements Using PurpleAir Sensors: An Improved Method of Calculating Indoor-Generated and Outdoor-Infiltrated Contributions to Potential Indoor Exposure',authors:'Wallace, L.A., Zhao, T., Klepeis, N.E.',journal:'Sensors',year:2023,doi:'10.3390/s23031160',url:'https://www.mdpi.com/1424-8220/23/3/1160',summary:'Developed an improved method for separating indoor-generated from outdoor-infiltrated PM2.5 using paired PurpleAir sensors for long-term monitoring.'},{title:'Indoor Contribution to PM2.5 Exposure Using All PurpleAir Sites in Washington, Oregon, and California',authors:'Multiple authors',journal:'Journal of Exposure Science and Environmental Epidemiology',year:2022,doi:'10.1038/s41370-022-00483-0',url:'https://pubmed.ncbi.nlm.nih.gov/36168225/',summary:'Analysis of paired PurpleAir sensors across three states found indoor-generated particles contributed 46\u201352% of total indoor PM2.5 on average, with significant variation by location.'},{title:'Assessment of PM2.5 Concentrations, Transport, and Mitigation in Indoor Environments Using Low-Cost Air Quality Monitors and a Portable Air Cleaner',authors:'Multiple authors',journal:'Environmental Science: Atmospheres',year:2022,doi:'10.1039/D2EA00025C',url:'https://pubs.rsc.org/en/content/articlehtml/2022/ea/d2ea00025c',summary:'Used low-cost sensors to assess indoor PM2.5 transport and evaluate portable air cleaner effectiveness for mitigating indoor particle concentrations.'},{title:'Assessing Residential PM2.5 Concentrations and Infiltration Factors with High Spatiotemporal Resolution Using Crowdsourced Sensors',authors:'Multiple authors',journal:'Proceedings of the National Academy of Sciences',year:2023,url:'https://www.osti.gov/pages/biblio/2352677',summary:'Analyzed paired indoor-outdoor PM2.5 from 3,977 residences using PurpleAir data (over 10,000 monitor-years) to assess residential infiltration at unprecedented scale.'},{title:'Practical Guidance for Using PurpleAir Particle Monitors for Indoor and Outdoor Measurements in Community Field Studies',authors:'Multiple authors',journal:'Aerosol and Air Quality Research',year:2025,url:'https://link.springer.com/article/10.1007/s44408-025-00048-4',summary:'Practical field guide based on California San Joaquin Valley deployments. Over 90% of tested PA-II monitors showed high precision. MicroSD storage achieved >80% data recovery versus <50% for Wi-Fi alone.'},{title:'Wildfire Smoke Impacts on Indoor Air Quality Assessed Using Crowdsourced Data in California',authors:'Delp, W.W., Singer, B.C.',journal:'Proceedings of the National Academy of Sciences',year:2021,doi:'10.1073/pnas.2106478118',url:'https://www.pnas.org/doi/10.1073/pnas.2106478118',summary:'Used crowdsourced PurpleAir indoor/outdoor data across California to quantify building protection from wildfire smoke. Indoor PM2.5 reductions varied widely by building type and age.'},{title:'Assessing Indoor Versus Outdoor PM2.5 Concentrations During the 2025 Los Angeles Fires Using the PurpleAir Sensor Network',authors:'Turner, M. et al.',journal:'EarthArXiv',year:2025,url:'https://eartharxiv.org/repository/view/9692/',summary:'Analyzed co-located indoor/outdoor PurpleAir sensors during the LA fires. Outdoor PM2.5 exceeded 130 \xb5g/m\xb3; indoor levels peaked at ~60 \xb5g/m\xb3. Mean indoor/outdoor ratio of 0.42 during fire events.'}]},{id:'covid',title:'COVID-19 & Public Health',description:'Research using the PurpleAir network to study air quality changes during the COVID-19 pandemic and broader public health implications of particulate matter exposure.',papers:[{title:'Indoor-Generated PM2.5 During COVID-19 Shutdowns Across California: Application of the PurpleAir Indoor\u2013Outdoor Low-Cost Sensor Network',authors:'Multiple authors',journal:'Environmental Science & Technology Letters',year:2021,doi:'10.1021/acs.estlett.1c00237',url:'https://pmc.ncbi.nlm.nih.gov/articles/PMC9033533/',summary:'Found indoor PM2.5 was 17\u201324% higher during California COVID-19 shutdowns compared to 2019 baselines, with indoor-generated PM2.5 reaching 80% of total indoor concentrations. Studied 139 co-located indoor-outdoor PurpleAir sensor pairs.'},{title:'Effects of Indoor Air Pollution Exposure on Lung Function of Children in Selected Schools in Kigali, Rwanda',authors:'Multiple authors',journal:'Scientific Reports',year:2025,doi:'10.1038/s41598-025-92047-z',url:'https://www.nature.com/articles/s41598-025-92047-z',summary:'Used PurpleAir PA-II sensors to monitor classroom PM2.5 and PM10 at six primary schools, finding both pollutant types were associated with reduced lung function in children.'},{title:'The Impact of COVID-19 Public Health Restrictions on Particulate Matter Pollution Measured by a Validated Low-Cost Sensor Network in Oxford, UK',authors:'Multiple authors',journal:'Building and Environment',year:2023,doi:'10.1016/j.buildenv.2023.110578',url:'https://www.sciencedirect.com/science/article/pii/S0360132323003578',summary:'Validated PurpleAir network in Oxford measured PM2.5 changes during UK COVID-19 lockdowns; quantified traffic emission reductions and increased residential heating contributions.'},{title:'Air Quality and Health Impacts of the 2020 Wildfires in California',authors:'Multiple authors',journal:'Fire Ecology',year:2023,doi:'10.1186/s42408-023-00234-y',url:'https://link.springer.com/doi/10.1186/s42408-023-00234-y',summary:'Integrating PurpleAir data with air quality models increased estimates of wildfire-induced PM2.5 mortality by up to 16% compared to using regulatory monitors alone during the 2020 California f
1074ire season.'},{title:'Mortality Associated with Long-Term PM2.5 Exposure Among Overburdened Communities in Washington State',authors:'Multiple authors',journal:'Air Quality, Atmosphere & Health',year:2024,doi:'10.1007/s11869-024-01664-6',url:'https://link.springer.com/article/10.1007/s11869-024-01664-6',summary:'PurpleAir-supplemented exposure modeling found 46 annual PM2.5 deaths per 100,000 in overburdened communities versus 25 statewide. Highest mortality among Hispanic (78) and non-Hispanic Black (56) populations.'},{title:'Disparate Air Pollution Reductions During California\u2019s COVID-19 Economic Shutdown',authors:'Graff Zivin, J., Neidell, M., Sanders, N.J. et al.',journal:'Nature Sustainability',year:2022,doi:'10.1038/s41893-022-00856-1',url:'https://www.nature.com/articles/s41893-022-00856-1',summary:'PurpleAir monitors provided a sevenfold increase in sampled census block groups compared to regulatory monitors alone, revealing that COVID-19 pollution reductions were unevenly distributed across California communities.'}]},{id:'environmental-justice',title:'Environmental Justice & Community Monitoring',description:'Research examining how PurpleAir sensors and low-cost monitoring networks intersect with environmental justice, equitable monitoring access, and community-engaged air quality studies.',papers:[{title:'Community-Engaged Use of Low-Cost Sensors to Assess the Spatial Distribution of PM2.5 Concentrations Across Disadvantaged Communities: Results from a Pilot Study in Santa Ana, CA',authors:'Multiple authors',journal:'University of California eScholarship',year:2022,url:'https://escholarship.org/content/qt33z7k3n6/qt33z7k3n6.pdf',summary:'Community-partnered study deploying sensors in Santa Ana, CA, revealing higher pollution concentrations near industrial corridors in disadvantaged neighborhoods.'},{title:'Data-Driven Placement of PM2.5 Air Quality Sensors in the United States: An Approach to Target Urban Environmental Injustice',authors:'Multiple authors',journal:'GeoHealth',year:2023,doi:'10.1029/2023GH000859',url:'https://pmc.ncbi.nlm.nih.gov/articles/PMC10499371/',summary:'Developed a data-driven approach for prioritizing sensor placement to address environmental injustice, identifying gaps in monitoring coverage for vulnerable communities.'},{title:'Exploring the Distributional Environmental Justice Implications of an Air Quality Monitoring Network in Los Angeles County',authors:'Multiple authors',journal:'Environmental Research',year:2022,doi:'10.1016/j.envres.2021.112319',url:'https://www.sciencedirect.com/science/article/abs/pii/S0013935121019137',summary:'Analyzed PurpleAir network distribution in LA County, finding that census tracts with higher Hispanic/Latino and Black populations and lower incomes had fewer sensors per capita, revealing inequality in the self-organizing monitoring network.'},{title:'Community Air Quality Monitoring in Southern California Disadvantaged Communities',authors:'Multiple authors',journal:'International Journal of Environmental Research and Public Health',year:2022,doi:'10.3390/ijerph19148777',url:'https://www.mdpi.com/1660-4601/19/14/8777',summary:'Recruited 22 households across 8 disadvantaged communities using PurpleAir sensors. Found communities with higher minority populations and lower incomes experienced higher PM2.5 concentrations.'},{title:'On the Distribution of Low-Cost PM2.5 Sensors in the US: Demographic and Air Quality Associations',authors:'Mullen, C. et al.',journal:'Journal of Exposure Science & Environmental Epidemiology',year:2021,doi:'10.1038/s41370-021-00328-2',url:'https://www.nature.com/articles/s41370-021-00328-2',summary:'Published in Nature; PurpleAir sensors disproportionately deployed in higher-income, Whiter, more-educated census tracts. Except in California, sensors located in areas with lower PM2.5 than regulatory monitors.'},{title:'Neighborhood Composition and Air Pollution in Chicago: Monitoring Inequities With a Dense, Low-Cost Sensing Network',authors:'Multiple authors',journal:'International Journal of Environmental Research and Public Health',year:2022,doi:'10.3390/ijerph192215411',url:'https://pmc.ncbi.nlm.nih.gov/articles/PMC9670210/',summary:'Dense PurpleAir network in Chicago revealed PM2.5 disparities by neighborhood racial and economic composition; quantified monitoring inequities and pollution burden mismatches.'},{title:'Measuring Long-Term Exposure to Wildfire PM2.5 in California: Time-Varying Inequities in 
1074Environmental Burden',authors:'Childs, M.L. et al.',journal:'Proceedings of the National Academy of Sciences',year:2024,doi:'10.1073/pnas.2306729121',url:'https://pmc.ncbi.nlm.nih.gov/articles/PMC10895344/',summary:'Used PurpleAir and satellite data to measure decade-scale wildfire PM2.5 exposure in California. Documented time-varying shifts in environmental burden across demographic groups.'}]},{id:'machine-learning',title:'Machine Learning & Data Science',description:'Studies applying machine learning, neural networks, and advanced statistical methods to PurpleAir sensor data for calibration, prediction, and air quality forecasting.',papers:[{title:'A Systematic Study of Popular Software Packages and AI/ML Models for Calibrating In Situ Air Quality Data: An Example with Purple Air Sensors',authors:'Multiple authors',journal:'Sensors',year:2025,doi:'10.3390/s25041028',url:'https://www.mdpi.com/1424-8220/25/4/1028',summary:'Evaluated 11 ML models across 5 software packages for PurpleAir calibration. LSTM neural networks achieved R\xb2 of 0.856\u20130.857 (RMSE 4.25\u20134.26 \xb5g/m\xb3). XGBoost and Random Forest offered faster training with R\xb2 ~0.76.'},{title:'Attention-Based LSTM Neural Network for Air Quality Forecasting Using PurpleAir Sensor Data',authors:'Multiple authors',journal:'Conference paper',year:2022,url:'https://export.arxiv.org/pdf/2210.14759v1.pdf',summary:'Applied attention-based LSTM networks to PurpleAir data from port cities, achieving RMSE of 15.42 \xb5g/m\xb3 and MAE of 4.53 \xb5g/m\xb3 for 1-hour ahead PM2.5 forecasting with interpretable feature importance.'},{title:'Evaluating Machine Learning Methods for Calibrating Low-Cost Particulate Matter Sensors',authors:'Barkjohn, K.K. et al.',journal:'Johns Hopkins Applied Physics Laboratory',year:2023,url:'https://www.jhunewsletter.com/article/2023/04/hopkins-research-team-employs-machine-learning-to-improve-purple-air-sensor-accuracy',summary:'Johns Hopkins research team compared multiple ML approaches for calibrating PurpleAir sensors; found gradient-boosted trees outperformed linear corrections, particularly during wildfire smoke events with high humidity.'}]},{id:'epa-integration',title:'EPA & Regulatory Applications',description:'Official EPA studies and regulatory applications integrating PurpleAir data into public air quality information systems and fire/smoke monitoring tools.',papers:[{title:'EPA Tools & Resources Webinar: AirNow Fire and Smoke Map \u2014 Extension of the US-Wide Correction for PurpleAir PM2.5 Sensors',authors:'EPA Office of Research and Development',journal:'US EPA',year:2021,url:'https://www.epa.gov/sites/default/files/2021-05/documents/toolsresourceswebinar_purpleairsmoke_210519b.pdf',summary:'EPA technical webinar documenting how corrected PurpleAir sensor data was integrated into the AirNow Fire and Smoke Map (fire.airnow.gov) starting August 2020, providing the public validated hyper-local sensor data during fire events.'},{title:'Sensor Data Cleaning and Correction: Application on the AirNow Fire and Smoke Map',authors:'Barkjohn, K.K. et al.',journal:'US EPA Science Inventory',year:2021,url:'https://cfpub.epa.gov/si/si_public_record_report.cfm?Lab=CEMM&dirEntryId=353088',summary:'Describes the data quality assurance pipeline used by EPA to clean and correct PurpleAir data for integration into AirNow, including outlier detection, inter-sensor agreement checks, and the US-wide correction equation.'},{title:'Evaluation of Consumer-Grade PM2.5 Monitors and Their Application in Supplementing the EPA Monitoring Network',authors:'EPA CEMM',journal:'US EPA Science Inventory',year:2020,url:'https://cfpub.epa.gov/si/si_public_record_Report.cfm?dirEntryId=349513&Lab=CEMM',summary:'EPA evaluation of PurpleAir and other consumer PM2.5 monitors. Uncorrected sensors overestimate PM2.5 by ~60%; corrected data accurately reports AQI categories 90% of the time. 12 of 13 ambient sensors met EPA performance targets.'}]}],o=t.reduce((t,o)=>t+o.papers.length,0)},974,[]);
1075__d(function(g,r,i,a,m,e,d){"use strict";
1075Object.defineProperty(e,'__esModule',{value:!0}),e.PaymentMethodsScreen=function(){return(0,o.jsx)(t.DiscoursePage,{errorSurface:s.contentLoad,seoKey:"PaymentMethods",slug:"payment-methods",pageName:"payment methods"})},r(d[0]);var t=r(d[1]),n=r(d[2]),o=r(d[3]);const s=(0,n.defineScreenErrorSurfaces)('PaymentMethods',{contentLoad:{id:'content-load',kind:'page',label:'Payment methods content load error'}})},975,[34,976,557,104]);
1076__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.DiscoursePage=function({errorSurface:x,seoKey:y,slug:b,pageName:M}){const{isDevTriggered:P,surface:h}=(0,n.useErrorSurface)(x),F=(0,o.useSeoMeta)(y),{data:D,loading:p,error:O,retry:_}=(0,s.useAsyncData)(()=>t.community.getDiscoursePage({path:{slug:b}}),[b,M],`Failed to load ${M}.`),v=O??(null!=D||p?null:`${M} content not found.`)??(P?'Content not found.':null);if(p)return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.WebMeta,Object.assign({},F)),(0,f.jsx)(c.MarkdownPageLoading,{})]});if(null!=v||null==D)return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.WebMeta,Object.assign({},F)),(0,f.jsx)(c.MarkdownPageError,{message:v??'Content not found.',onRetry:_,surface:h})]});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.WebMeta,Object.assign({},F)),(0,f.jsx)(c.FullTextPageLayout,{title:D.title,footer:(0,f.jsx)(j.PolicyContactFooter,{policyName:M}),children:(0,f.jsx)(u.DiscourseHtmlBody,{html:D.bodyHtml})})]})},r(d[0]);var t=r(d[1]),n=r(d[2]),s=r(d[3]),o=r(d[4]),u=r(d[5]),l=r(d[6]),c=r(d[7]),j=r(d[8]),f=r(d[9])},976,[34,471,557,561,562,736,565,566,603,104]);
1077__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PersonalScreen=function(){const e=(0,I.useSeoMeta)('Personal');return(0,C.jsxs)(h.PageLayout,{children:[(0,C.jsx)(f.WebMeta,Object.assign({},e)),(0,C.jsxs)(n.default,{style:y.MARKETING.container,children:[(0,C.jsx)(u.HeroSection,{backgroundColor:A.COLORS.BRAND_PRIMARY,background:{imageUrl:'https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?w=1920&q=80',imagePosition:'center 40%'},minHeight:500,label:"FOR HOME",title:'Know the Air\nYour Family Breathes',subtitle:"Monitor indoor and outdoor air quality in real-time. Protect your family from wildfire smoke, pollution, and allergens with affordable, accurate PurpleAir sensors.",children:(0,C.jsxs)(t.default,{style:y.MARKETING.heroActions,children:[(0,C.jsx)(s.AppLink,{to:"Store",style:L.primaryButton,children:(0,C.jsx)(o.default,{style:L.primaryButtonText,children:"Shop Sensors"})}),(0,C.jsx)(S.ServiceExternalLink,{service:"mapBaseUrl",style:L.secondaryButton,children:(0,C.jsx)(o.default,{style:L.secondaryButtonText,children:"Explore the Map"})})]})}),(0,C.jsxs)(t.default,{style:B.whySection,children:[(0,C.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Why Monitor Your Air?"}),(0,C.jsx)(o.default,{style:y.MARKETING.sectionSubtitle,children:"Particulate matter from cooking, wildfires, and nearby activity can spike indoors without warning. Know what you're breathing."}),(0,C.jsx)(t.default,{style:y.MARKETING.grid,children:b.map(e=>(0,C.jsx)(x,Object.assign({},e),e.title))})]}),(0,C.jsxs)(t.default,{style:[y.MARKETING.section,B.productsSection],children:[(0,C.jsx)(o.default,{style:y.MARKETING.sectionTitleLight,children:"Choose Your Sensor"}),(0,C.jsx)(o.default,{style:y.MARKETING.sectionSubtitleLight,children:"PurpleAir offers sensors for every home and budget"}),(0,C.jsx)(t.default,{style:[y.MARKETING.gridWide,{gap:O.SPACING.XL}],children:G.map(e=>(0,C.jsx)(T,Object.assign({},e),e.handle))}),(0,C.jsx)(s.AppLink,{to:"Store",style:B.shopAllButton,children:(0,C.jsx)(o.default,{style:B.shopAllButtonText,children:"View All Products"})})]}),(0,C.jsxs)(t.default,{style:y.MARKETING.section,children:[(0,C.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Smart Home Ready"}),(0,C.jsx)(o.default,{style:y.MARKETING.sectionSubtitle,children:"Integrate PurpleAir with your smart home to automate air purifiers, HVAC, and more"}),(0,C.jsxs)(t.default,{style:[y.MARKETING.grid,{gap:O.SPACING.XL}],children:[j.map(e=>(0,C.jsx)(E,Object.assign({},e),e.name)),(0,C.jsx)(E,{name:"Philips Hue",platform:"SMART LIGHTING",description:"Change your Hue lights based on air quality. Visual alerts when air quality deteriorates.",to:"CommunityTopic",href:"/community/t/purpleair-and-hue-lights-integration/6331"})]})]}),(0,C.jsxs)(t.default,{style:[y.MARKETING.section,B.appsSection],children:[(0,C.jsx)(o.default,{style:y.MARKETING.sectionTitleLight,children:"Stay Informed Anywhere"}),(0,C.jsx)(o.default,{style:y.MARKETING.sectionSubtitleLight,children:"Access your air quality data on iPhone, Apple Watch, and more"}),(0,C.jsx)(t.default,{style:[y.MARKETING.grid,{gap:O.SPACING.XL}],children:M.map(e=>(0,C.jsxs)(c.ExternalLink,{href:e.url,style:B.appCard,accessibilityLabel:`Visit ${e.name} - ${e.platform}`,children:[(0,C.jsx)(o.default,{style:B.appName,children:e.name}),(0,C.jsx)(o.default,{style:B.appPlatform,children:e.platform}),(0,C.jsx)(o.default,{style:B.appDesc,children:e.description}),(0,C.jsx)(o.default,{style:B.appLink,children:e.linkLabel})]},e.name))})]}),(0,C.jsxs)(t.default,{style:y.MARKETING.section,children:[(0,C.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Join the Community"}),(0,C.jsx)(o.default,{style:y.MARKETING.sectionSubtitle,children:"Your sensor data helps create the world's largest real-time air quality network"}),(0,C.jsx)(t.default,{style:B.communityFeatures,children:P.map(e=>(0,C.jsxs)(t.default,{style:B.communityFeature,children:[(0,C.jsx)(o.default,{style:B.communityNumber,children:e.number}),(0,C.jsx)(o.default,{style:B.communityLabel,children:e.label})]},e.label))}),(0,C.jsxs)(t.default,{style:B.communityActions,children:[(0,C.jsx)(S.ServiceExternalLink,{service:"mapBaseUrl",style:B.communityButton,children:(0,C.jsx)(o.default,{style:B.communityButtonText,children:"Explore the Map"})}),(0,C.jsx)(s.AppLink,{to:"Community",style:B.communitySecondaryButton,children:(0,C.jsx)(o.default,{style:B.communitySecondaryButtonText,children:"Join the Forum"})})]})]}),(0,C.jsxs)(t.default,{style:[y.MARKETING.section,B.gettingStartedSection],children:[(0,C.jsx)(o.default,{style:y.MARKETING.sectionTitleCompact,children:"Getting Started is Easy"}),(0,C.jsx)(t.default,{style:B.stepsGrid,children:_.map(e=>(0,C.jsxs)(t.default,{style:B.step,children:[(0,C.jsx)(o.default,{style:B.stepNumber,children:e.step}),(0,C.jsx)(o.default,{style:B.stepTitle,children:e.title}),(0,C.jsx)(o.default,{style:B.stepDesc,children:e.description})]},e.step))})]}),(0,C.jsxs)(t.default,{style:[y.MARKETING.ctaSection,{backgroundColor:A.COLORS.BRAND_PRIMARY}],children:[(0,C.jsx)(o.default,{style:y.MARKETING.ctaTitle,children:"Breathe Easier Today"}),(0,C.jsx)(o.default,{style:y.MARKETING.ctaSubtitle,children:"Start monitoring your air quality with PurpleAir sensors."}),(0,C.jsxs)(t.default,{style:y.MARKETING.ctaActions,children:[(0,C.jsx)(s.AppLink,{to:"Store",style:N.ctaButton,children:(0,C.jsx)(o.default,{style:N.ctaButtonText,children:"Shop Now"})}),(0,C.jsx)(s.AppLink,{to:"Store",style:N.ctaSecondaryButton,children:(0,C.jsx)(o.default,{style:N.ctaSecondaryButtonText,children:"Help Me Choose"})})]})]})]})]})},r(d[0]);
1077var t=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),l=r(d[4]),s=r(d[5]),c=r(d[6]),u=r(d[7]),p=r(d[8]),h=r(d[9]),S=r(d[10]),f=r(d[11]),A=r(d[12]),y=r(d[13]),O=r(d[14]),R=r(d[15]),I=r(d[16]),C=r(d[17]);const L=(0,y.createHeroButtonStyles)(A.COLORS.BG_SURFACE,A.COLORS.ACTION_PRIMARY),N=(0,y.createCTAButtonStyles)(A.COLORS.BG_SURFACE,A.COLORS.ACTION_PRIMARY);function T({name:e,description:n,features:l,handle:c,badge:u}){return(0,C.jsxs)(s.AppLink,{to:"Product",href:`/products/${c}`,style:B.product,children:[null!=u&&''!==u?(0,C.jsx)(t.default,{style:B.productBadge,children:(0,C.jsx)(o.default,{style:B.productBadgeText,children:u})}):null,(0,C.jsx)(o.default,{style:B.productName,children:e}),(0,C.jsx)(o.default,{style:B.productDesc,children:n}),(0,C.jsx)(t.default,{style:B.productFeatures,children:l.map(n=>(0,C.jsxs)(t.default,{style:B.productFeatureItem,children:[(0,C.jsx)(o.default,{style:B.productFeatureBullet,children:"+"}),(0,C.jsx)(o.default,{style:B.productFeatureText,children:n})]},`${e}-${n}`))}),(0,C.jsx)(o.default,{style:B.productLink,children:"View Product"})]})}function x({title:e,description:n,icon:l}){return(0,C.jsxs)(t.default,{style:B.useCase,children:[(0,C.jsx)(p.UseCaseIcon,{name:l}),(0,C.jsx)(o.default,{style:B.useCaseTitle,children:e}),(0,C.jsx)(o.default,{style:B.useCaseDesc,children:n})]})}function E({name:e,platform:n,description:l,url:u,to:p,href:h}){const S=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(o.default,{style:B.integrationPlatform,children:n}),(0,C.jsx)(o.default,{style:B.integrationName,children:e}),(0,C.jsx)(o.default,{style:B.integrationDesc,children:l}),(0,C.jsx)(o.default,{style:B.integrationLink,children:"Learn More"})]});return null!=p?(0,C.jsx)(s.AppLink,Object.assign({to:p},null!=h&&{href:h},{style:B.integration,children:S})):null!=u?(0,C.jsx)(c.ExternalLink,{href:u,style:B.integration,accessibilityLabel:`Learn more about ${e}`,children:S}):(0,C.jsx)(t.default,{style:B.integration,children:S})}const b=[{icon:'fire',title:'Wildfire Smoke',description:'See when smoke affects your area in real time. Know when to close windows and run air purifiers.'},{icon:'home',title:'Indoor Air Quality',description:'Monitor particulate matter from cooking, heating, and household activities. Keep your living spaces healthy.'},{icon:'flower',title:'Allergies & Asthma',description:'Track air quality triggers for sensitive family members. Make informed decisions about outdoor activities.'},{icon:'baby',title:'Protect Your Family',description:'Children, elderly, and those with respiratory conditions are especially vulnerable to poor air quality.'},{icon:'runner',title:'Exercise Safely',description:'Check air quality before outdoor runs, bike rides, or sports. Protect your lungs during exercise.'},{icon:'globe',title:'Contribute to Science',description:'Your sensor data helps researchers and your community understand local air quality patterns.'}],G=[{name:'PurpleAir Flex',description:'Versatile indoor/outdoor sensor with user-replaceable laser counters and SD card logging.',features:['Indoor/Outdoor use','Dual laser counters','User-replaceable lasers','SD card data logging'],handle:'purpleair-flex',badge:'Most Popular'},{name:'PurpleAir Zen',description:'Our flagship sensor with a full-color LED ring showing AQI at a glance, for indoor or outdoor use.',features:['Indoor/Outdoor use','Full-color AQI LED ring','Dual laser counters','SD card data logging'],handle:'purpleair-zen'},{name:'PurpleAir Touch',description:'Indoor monitor with a full-color LED ring for at-a-glance air quality readings across the room.',features:['Indoor use','Full-color AQI LED ring','Temperature & humidity','WiFi connectivity'],handle:'purpleair-touch-indoor-air-quality-monitor'},{name:'PurpleAir PIXEL',description:'Ultra-compact USB sensor with no setup required. Multi-colored LED shows AQI at a glance.',features:['Ultra-compact USB design','No setup required','Silent, no moving parts','Multi-colored AQI LED'],handle:'purpleair-pixel',badge:'New'}],j=[{name:'Home Assistant',platform:'OPEN SOURCE',description:'Native integration with the popular open-source home automation platform. Automate devices based on air quality readings.',url:'https://www.home-assistant.io/integrations/purpleair'},{name:'Apple HomeKit',platform:'HOMEBRIDGE',description:'Add PurpleAir sensors to Apple Home via Homebridge. Monitor air quality on iPhone, iPad, and Mac.',url:'https://www.npmjs.com/package/homebridge-purpleair-sensor'},{name:'Hubitat',platform:'SMART HOME HUB',description:'Local integration for Hubitat users. Access air quality metrics and trigger automations without cloud dependency.',url:'https://community.hubitat.com/t/release-purpleair-local-driver/133591'}],M=[{name:'Paku',platform:'iOS, watchOS, macOS',description:'Beautiful widgets, Apple Watch complications, and push notifications when air quality changes.',linkLabel:'paku.app',url:'https://paku.app'},{name:'Breathable',platform:'iOS, iPadOS, watchOS, macOS',description:'Free, customizable AQI widget. A quick, glanceable answer: Is it safe to go outside?',linkLabel:'breathable.app',url:'https://breathable.app'},{name:'Fresh Air',platform:'iOS, watchOS',description:'Real-time air quality with notifications when conditions worsen. Set alerts for specific AQI levels.',linkLabel:'fresh-air-app.com',url:'https://fresh-air-app.com'},{name:'My PurpleAir',platform:'iOS, iPadOS, watchOS',description:'Monitor your own PurpleAir sensor. Widgets and complications for quick access to your data.',linkLabel:'App Store',url:'https://apps.apple.com/us/app/my-purpleair/id1606538700'}],P=[{number:'35,000+',label:'Sensors Worldwide'},{number:'100+',label:'Countries'},{number:'Real-Time',label:'Data Updates'},{number:'Free Map',label:'Public Access'}],_=[{step:'1',title:'Choose Your Sensor',description:'Select indo
1077or, outdoor, or both. We have options for every budget and use case.'},{step:'2',title:'Connect to WiFi',description:'Simple setup with your home WiFi. Data starts streaming to the map immediately.'},{step:'3',title:'Monitor & Share',description:'View your data on the PurpleAir Map and share with your community.'}];const B=(0,l.createStyles)({whySection:{backgroundColor:A.COLORS.BG_WARM,paddingHorizontal:O.SPACING.XXL,paddingVertical:O.SPACING.JUMBO},useCase:{alignItems:'center',backgroundColor:A.COLORS.BG_SURFACE,borderRadius:12,gap:O.SPACING.MD,padding:O.SPACING.XXL,width:280},useCaseTitle:{color:A.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XL,fontWeight:'600',textAlign:'center'},useCaseDesc:{color:A.COLORS.TEXT_MUTED,fontSize:R.FONT_SIZE.MD,lineHeight:22,textAlign:'center'},productsSection:{backgroundColor:A.COLORS.BRAND_PRIMARY},product:{backgroundColor:A.COLORS.OVERLAY_LIGHT_10,borderRadius:12,padding:O.SPACING.XXL,position:'relative',width:260},productBadge:{backgroundColor:A.COLORS.BG_SURFACE,borderRadius:12,paddingHorizontal:O.SPACING.MD,paddingVertical:O.SPACING.XS,position:'absolute',right:12,top:12},productBadgeText:{color:A.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.XS,fontWeight:'600'},productName:{color:A.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.XXL,fontWeight:'600',marginBottom:O.SPACING.MD},productDesc:{color:A.COLORS.OVERLAY_LIGHT_85,fontSize:R.FONT_SIZE.MD,lineHeight:22,marginBottom:O.SPACING.LG},productFeatures:{marginBottom:O.SPACING.LG},productFeatureItem:{flexDirection:'row',gap:O.SPACING.SM,marginBottom:O.SPACING.SM},productFeatureBullet:{color:A.COLORS.OVERLAY_LIGHT_70,fontSize:R.FONT_SIZE.XS},productFeatureText:{color:A.COLORS.OVERLAY_LIGHT_85,fontSize:R.FONT_SIZE.XS},productLink:{color:A.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.SM,fontWeight:'600'},shopAllButton:{alignSelf:'center',backgroundColor:A.COLORS.BG_SURFACE,borderRadius:8,marginTop:O.SPACING.XXXL,paddingHorizontal:O.SPACING.XXXL,paddingVertical:O.SPACING.LG},shopAllButtonText:{color:A.COLORS.ACTION_PRIMARY,fontSize:R.FONT_SIZE.LG,fontWeight:'600'},integration:{backgroundColor:A.COLORS.BG_SURFACE,borderColor:A.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:O.SPACING.XXL,width:280},integrationPlatform:{color:A.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.XS,fontWeight:'600',letterSpacing:1,marginBottom:O.SPACING.SM},integrationName:{color:A.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XL,fontWeight:'600',marginBottom:O.SPACING.MD},integrationDesc:{color:A.COLORS.TEXT_MUTED,fontSize:R.FONT_SIZE.MD,lineHeight:22,marginBottom:O.SPACING.LG},integrationLink:{color:A.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.SM,fontWeight:'600'},appsSection:{backgroundColor:A.COLORS.BG_NEAR_BLACK},appCard:{backgroundColor:A.COLORS.OVERLAY_LIGHT_05,borderColor:A.COLORS.OVERLAY_LIGHT_10,borderRadius:12,borderWidth:1,padding:O.SPACING.XXL,width:280},appName:{color:A.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.XL,fontWeight:'600',marginBottom:O.SPACING.XS},appPlatform:{color:A.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.XS,fontWeight:'500',marginBottom:O.SPACING.MD},appDesc:{color:A.COLORS.OVERLAY_LIGHT_75,fontSize:R.FONT_SIZE.MD,lineHeight:22,marginBottom:O.SPACING.LG},appLink:{color:A.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.SM,fontWeight:'600'},communityFeatures:{flexDirection:'row',flexWrap:'wrap',gap:O.SPACING.XXXL,justifyContent:'center',marginBottom:O.SPACING.HUGE},communityFeature:{alignItems:'center',minWidth:120},communityNumber:{color:A.COLORS.BRAND_PRIMARY,fontSize:R.FONT_SIZE.DISPLAY_MD,fontWeight:'bold',marginBottom:O.SPACING.XS},communityLabel:{color:A.COLORS.TEXT_MUTED,fontSize:R.FONT_SIZE.MD,textAlign:'center'},communityActions:{flexDirection:'row',flexWrap:'wrap',gap:O.SPACING.LG,justifyContent:'center'},communityButton:{backgroundColor:A.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:O.SPACING.XXXL,paddingVertical:O.SPACING.LG},communityButtonText:{color:A.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.LG,fontWeight:'600'},communitySecondaryButton:{backgroundColor:A.COLORS.TRANSPARENT,borderColor:A.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:2,paddingHorizontal:O.SPACING.XXXL,paddingVertical:O.SPACING.LG},communitySecondaryButtonText:{color:A.COLORS.ACTION_PRIMARY,fontSize:R.FONT_SIZE.LG,fontWeight:'600'},gettingStartedSection:{backgroundColor:A.COLORS.BG_WARM},stepsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:O.SPACING.XXXL,justifyContent:'center',marginTop:O.SPACING.HUGE,maxWidth:900},step:{alignItems:'center',width:250},stepNumber:{backgroundColor:A.COLORS.BRAND_PRIMARY,borderRadius:24,color:A.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.XXL,fontWeight:'bold',height:48,lineHeight:48,marginBottom:O.SPACING.LG,overflow:'hidden',textAlign:'center',width:48},stepTitle:{color:A.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XL,fontWeight:'600',marginBottom:O.SPACING.SM,textAlign:'center'},stepDesc:{color:A.COLORS.TEXT_MUTED,fontSize:R.FONT_SIZE.MD,lineHeight:22,textAlign:'center'}})},977,[34,276,222,283,489,516,519,674,883,568,522,565,490,676,493,494,562,104]);
1078__d(function(g,r,i,a,m,_e,d){"use strict";
1078function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressAdminDetailScreen=function(){const e=(0,b.useToast)(),{id:o,returnTab:c}=(0,G.usePressAdminDetailParams)(),u=(0,M.useSeoMeta)('PressAdminDetail'),S=null!=c&&(0,v.isPressAdminTab)(c)?c:'queue',O=(0,v.buildPressAdminTabPath)(S),[R,I]=(0,t.useState)(0),[N,E]=(0,t.useState)(null),[P,B]=(0,t.useState)(!1),[X,W]=(0,t.useState)(!1),[k,z]=(0,t.useState)(null),[H,V]=(0,t.useState)(!1),{data:q,loading:Q,error:ee,retry:te}=(0,j.useAsyncData)(()=>C.pressAdminApi.getMention(o),[o,R],'Failed to load admin mention detail.'),{data:ae}=(0,j.useAsyncData)(()=>C.pressAdminApi.getAuditLog({mentionId:o,page:0,size:10}),[o,R],'Failed to load mention audit history.'),{isDevTriggered:le,surface:se}=(0,L.useErrorSurface)(w.mentionLoad),oe=ee??(le?'Failed to load admin mention detail.':null);(0,t.useEffect)(()=>{null!=q&&z(Y(q))},[q]);const re=(0,t.useCallback)(t=>{(async()=>{E(t);try{await Z[t](o),e.success(U[t],{id:`press-detail-${o}`}),I(e=>e+1)}catch(t){e.error(t instanceof Error?t.message:'Action failed',{id:`press-detail-${o}`})}finally{E(null)}})()},[o,e]),de=(0,t.useCallback)(()=>{null!=k&&(async()=>{W(!0);try{await C.pressAdminApi.updateMention(o,{category:k.category,keyThemes:k.keyThemes}),e.success('Tags updated',{id:`press-detail-tags-${o}`}),I(e=>e+1)}catch(t){e.error(t instanceof Error?t.message:'Failed to save tags',{id:`press-detail-tags-${o}`})}finally{W(!1)}})()},[o,k,e]),ce=(0,t.useCallback)(()=>{(async()=>{B(!0);try{await C.pressAdminApi.regenerateSummary(o),e.success('AI summary regenerated',{id:`press-detail-ai-${o}`}),I(e=>e+1)}catch(t){e.error(t instanceof Error?t.message:'Failed to regenerate AI summary',{id:`press-detail-ai-${o}`})}finally{B(!1)}})()},[o,e]),ue=null==oe?q:null,Se=null!=k&&null!=ue&&K(k,ue),Ce=ae?.content??[];return(0,F.jsxs)(y.PageLayout,{children:[(0,F.jsx)(x.WebMeta,Object.assign({},u)),(0,F.jsxs)(n.default,{style:ne.adminShell,children:[(0,F.jsxs)(n.default,{style:ne.toolbar,children:[(0,F.jsx)(h.AppLink,{to:"PressAdmin",href:O,textStyle:ne.backLink,inline:!0,children:'queue'===S?'Back to Review Queue':'Back to Press Admin'}),null!=ue&&(0,F.jsxs)(s.default,{style:ne.devButton,onPress:()=>{V(!0)},accessibilityRole:"button",accessibilityLabel:"Open technical details",children:[(0,F.jsx)(l.default,{style:ne.devButtonGlyph,children:'{ }'}),(0,F.jsx)(l.default,{style:ne.devButtonText,children:"Technical details"})]})]}),Q&&(0,F.jsx)(f.LoadingState,{}),!Q&&null==ue&&(0,F.jsx)(f.ErrorState,{message:oe??'Mention not found.',surface:se,onRetry:te}),!Q&&null!=ue&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)($,{detail:ue,busyKey:N,regeneratingSummary:P,onTransition:re,onRegenerateSummary:ce}),(0,F.jsx)(J,{detail:ue}),(0,F.jsxs)(p.Card,{style:ne.sectionCard,children:[(0,F.jsx)(l.default,{style:ne.sectionTitle,children:"Public Preview"}),(0,F.jsx)(T.PressMentionDetailContent,{mention:ue.publicView})]}),null!=k&&(0,F.jsxs)(p.Card,{style:ne.sectionCard,children:[(0,F.jsx)(l.default,{style:ne.sectionTitle,children:"Tags & Category"}),(0,F.jsx)(A.PressTagEditor,{category:k.category,keyThemes:k.keyThemes,onChange:z,disabled:X}),(0,F.jsxs)(n.default,{style:ne.tagActions,children:[(0,F.jsx)(s.default,{style:[ne.saveButton,(!Se||X)&&ne.buttonDisabled],onPress:de,disabled:!Se||X,accessibilityRole:"button",accessibilityLabel:"Save tags",children:(0,F.jsx)(l.default,{style:ne.saveButtonText,children:X?'Saving...':'Save Tags'})}),(0,F.jsx)(s.default,{style:[ne.resetButton,(!Se||X)&&ne.buttonDisabled],onPress:()=>{z(Y(ue))},disabled:!Se||X,accessibilityRole:"button",accessibilityLabel:"Reset tag changes",children:(0,F.jsx)(l.default,{style:ne.resetButtonText,children:"Reset"})})]})]}),(0,F.jsxs)(p.Card,{style:ne.sectionCard,children:[(0,F.jsx)(l.default,{style:ne.sectionTitle,children:"Audit History"}),(0,F.jsx)(D.PressAdminAuditHistory,{entries:Ce,formatTime:_.formatPressAdminDateTime,emptyMessage:"No audit entries for this mention."})]})]})]}),null!=ue&&(0,F.jsx)(ie,{visible:H,detail:ue,onClose:()=>{V(!1)}})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2]));r(d[3]);var s=e(r(d[4])),o=e(r(d[5])),c=e(r(d[6])),u=e(r(d[7])),S=r(d[8]),C=r(d[9]),h=r(d[10]),p=r(d[11]),f=r(d[12]),O=r(d[13]),y=r(d[14]),T=r(d[15]),R=r(d[16]),A=r(d[17]),b=r(d[18]),x=r(d[19]),I=r(d[20]),N=r(d[21]),E=r(
1078d[22]),P=r(d[23]),L=r(d[24]),j=r(d[25]),M=r(d[26]),G=r(d[27]),D=r(d[28]),_=r(d[29]),B=r(d[30]),v=r(d[31]),X=r(d[32]),F=r(d[33]);const w=(0,L.defineScreenErrorSurfaces)('PressAdminDetail',{mentionLoad:{id:'mention-load',kind:'page',label:'Press admin mention detail load error'}}),W={PENDING:I.COLORS.WARNING,APPROVED:I.COLORS.SUCCESS,REJECTED:I.COLORS.ERROR,ARCHIVED:I.COLORS.TEXT_MUTED},k={present:I.COLORS.SUCCESS,missingCore:I.COLORS.WARNING,missingEnhancement:I.COLORS.TEXT_PLACEHOLDER},z={present:I.COLORS.BG_SUBTLE_100,missingCore:I.COLORS.WARNING_BG,missingEnhancement:I.COLORS.BG_SUBTLE_100},H={present:I.COLORS.TEXT_BODY,missingCore:I.COLORS.WARNING_DARK,missingEnhancement:I.COLORS.TEXT_MUTED};function V(e){return e.present?'present':'core'===e.importance?'missingCore':'missingEnhancement'}const Z={approve:e=>C.pressAdminApi.approve(e),reject:e=>C.pressAdminApi.reject(e),archive:e=>C.pressAdminApi.archive(e),restore:e=>C.pressAdminApi.restore(e)},U={approve:'Mention approved',reject:'Mention rejected',archive:'Mention archived',restore:'Mention restored'};function Y(e){return{category:e.publicView.category,keyThemes:e.publicView.aiKeyThemes}}function K(e,t){const n=Y(t);return e.category!==n.category||(e.keyThemes.length!==n.keyThemes.length||e.keyThemes.some((e,t)=>e!==n.keyThemes[t]))}function $({detail:e,busyKey:t,regeneratingSummary:o,onTransition:c,onRegenerateSummary:u}){const S=(0,_.readPressAdminDetailDisplay)(e),C=e.publicView.title??'Untitled mention',f=e.publicView.outletName??e.domain,O=e.discoverySource;return(0,F.jsxs)(p.Card,{style:ne.headerCard,children:[(0,F.jsxs)(n.default,{style:ne.headerTopRow,children:[(0,F.jsx)(l.default,{style:ne.headerEyebrow,numberOfLines:1,children:f}),(0,F.jsx)(ae,{status:e.status})]}),(0,F.jsx)(l.default,{style:ne.headerTitle,children:C}),(0,F.jsxs)(n.default,{style:ne.headerMetaRow,children:[(0,F.jsx)(l.default,{style:ne.headerMeta,children:e.domain}),(0,F.jsx)(l.default,{style:ne.headerMetaDot,children:"\u2022"}),(0,F.jsxs)(l.default,{style:ne.headerMeta,children:["Discovered ",(0,_.formatPressAdminDateTime)(e.discoveredAt)]}),null!=O&&''!==O&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(l.default,{style:ne.headerMetaDot,children:"\u2022"}),(0,F.jsxs)(l.default,{style:ne.headerMeta,children:["via ",O]})]}),null!=S.publicPath&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(l.default,{style:ne.headerMetaDot,children:"\u2022"}),(0,F.jsx)(h.AppLink,{to:"PressDiscoveryDetail",href:S.publicPath,textStyle:ne.publicLink,inline:!0,children:"View public page"})]})]}),(0,F.jsx)(n.default,{style:ne.headerActions,children:(0,F.jsxs)(n.default,{style:ne.headerActionRow,children:[(0,F.jsx)(R.PressStatusActions,{status:e.status,busyKey:t,onTransition:c}),(0,F.jsx)(s.default,{style:[ne.regenerateButton,o&&ne.buttonDisabled],onPress:u,disabled:o,accessibilityRole:"button",accessibilityLabel:"Regenerate AI summary",children:(0,F.jsx)(l.default,{style:ne.regenerateButtonText,children:o?'Regenerating...':'Regenerate AI'})})]})})]})}function J({detail:e}){const t=(0,X.readPressMentionCompleteness)(e),s=t.components.filter(e=>!e.present),o=t.components.filter(e=>e.present),c=q(t.missingCoreCount,s.length);return(0,F.jsxs)(p.Card,{style:ne.sectionCard,children:[(0,F.jsxs)(n.default,{style:ne.completenessHeader,children:[(0,F.jsx)(l.default,{style:ne.sectionTitle,children:"Content Completeness"}),(0,F.jsx)(n.default,{style:[ne.summaryPill,{backgroundColor:c.bg}],children:(0,F.jsx)(l.default,{style:[ne.summaryPillText,{color:c.text}],children:c.label})})]}),(0,F.jsx)(Q,{failureCount:e.metadataFailureCount,lastOutcome:e.metadataLastFailureOutcome}),s.length>0&&(0,F.jsx)(ee,{label:"Missing",components:s}),o.length>0&&(0,F.jsx)(ee,{label:"Captured",components:o})]})}function q(e,t){return e>0?{label:`${e} core missing`,bg:I.COLORS.WARNING_BG,text:I.COLORS.WARNING_DARK}:t>0?{label:'Core complete',bg:I.COLORS.SUCCESS_BG,text:I.COLORS.SUCCESS}:{label:'All captured',bg:I.COLORS.SUCCESS_BG,text:I.COLORS.SUCCESS}}function Q({failureCount:e,lastOutcome:t}){if(e<=0)return null;const s=null!=t&&''!==t?` (${t})`:'';return(0,F.jsxs)(n.default,{style:ne.fetchHealth,children:[(0,F.jsx)(n.default,{style:ne.fetchHealthDot}),(0,F.jsxs)(l.default,{style:ne.fetchHealthText,children:["Metadata fetch failed ",e,1===e?' time':' times',s]})]})}function ee({label:e,components:t}){return(0,F.jsxs)(n.default,{style:ne.chipGroup,children:[(0,F.jsx)(l.default,{style:ne.chipGroupLabel,children:e}),(0,F.jsx)(n.default,{style:ne.chipWrap,children:t.map(e=>(0,F.jsx)(te,{component:e},e.key))})]})}function te({component:e}){const t=V(e),s=(0,F.jsxs)(n.default,{style:[ne.chip,{backgroundColor:z[t]}],children:[(0,F.jsx)(n.default,{style:[ne.chipDot,{backgroundColor:k[t]}]}),(0,F.jsx)(l.default,{style:[ne.chipText,{color:H[t]}],children:e.label})]});
1078return null!=e.note&&''!==e.note?(0,F.jsx)(O.HoverTooltip,{text:e.note,children:s}):s}function ie({visible:e,detail:S,onClose:C}){const h=(0,b.useToast)(),p=(0,B.readPressDeveloperRecord)(S),f=(0,t.useCallback)(()=>{(async()=>{try{await navigator.clipboard.writeText(JSON.stringify(S,null,2)),h.success('Copied technical details',{id:'press-technical-copy'})}catch{h.error('Copy failed',{id:'press-technical-copy'})}})()},[S,h]);return(0,F.jsx)(o.default,{visible:e,transparent:!0,animationType:"fade",onRequestClose:C,children:(0,F.jsx)(c.default,{style:ne.modalBackdrop,onPress:C,accessibilityLabel:"Dismiss technical details",children:(0,F.jsxs)(c.default,{style:ne.modalCard,children:[(0,F.jsxs)(n.default,{style:ne.modalHeader,children:[(0,F.jsx)(l.default,{style:ne.modalTitle,children:"Technical details"}),(0,F.jsxs)(n.default,{style:ne.modalHeaderActions,children:[(0,F.jsx)(s.default,{style:ne.modalCopyButton,onPress:f,accessibilityRole:"button",accessibilityLabel:"Copy technical details as JSON",children:(0,F.jsx)(l.default,{style:ne.modalCopyText,children:"Copy JSON"})}),(0,F.jsx)(s.default,{style:ne.modalCloseButton,onPress:C,accessibilityRole:"button",accessibilityLabel:"Close technical details",children:(0,F.jsx)(l.default,{style:ne.modalCloseText,children:"Close"})})]})]}),(0,F.jsx)(u.default,{style:ne.modalBody,contentContainerStyle:ne.modalBodyContent,children:p.map(e=>(0,F.jsxs)(n.default,{style:ne.devSection,children:[(0,F.jsx)(l.default,{style:ne.devSectionTitle,children:e.title}),e.fields.map(e=>(0,F.jsxs)(n.default,{style:ne.devField,children:[(0,F.jsx)(l.default,{style:ne.devFieldLabel,children:e.label}),(0,F.jsx)(l.default,{style:[ne.devFieldValue,!0===e.mono&&ne.devFieldValueMono],selectable:!0,children:null!=e.value&&''!==e.value?e.value:'None'})]},e.label))]},e.title))})]})})})}function ae({status:e}){return(0,F.jsx)(n.default,{style:[ne.statusBadge,{backgroundColor:W[e]}],children:(0,F.jsx)(l.default,{style:ne.statusBadgeText,children:e.replace(/_/g,' ')})})}const ne=(0,S.createStyles)({adminShell:{paddingBottom:E.SPACING.XXL,paddingTop:E.SPACING.XL,gap:E.SPACING.LG},toolbar:Object.assign({alignSelf:'center',width:'100%',flexDirection:'row',justifyContent:'space-between',alignItems:'center',gap:E.SPACING.MD,paddingHorizontal:E.SPACING.XL},{maxWidth:800}),backLink:{color:I.COLORS.BRAND_PRIMARY,fontSize:P.FONT_SIZE.SM,fontWeight:'600'},devButton:Object.assign({flexDirection:'row',alignItems:'center',gap:E.SPACING.XS,borderWidth:1,borderColor:I.COLORS.BORDER,borderRadius:8,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.XS,backgroundColor:I.COLORS.BG_SURFACE},{cursor:'pointer'}),devButtonGlyph:{color:I.COLORS.TEXT_MUTED,fontFamily:P.FONT_FAMILY.WEB_MONOSPACE,fontSize:P.FONT_SIZE.SM,fontWeight:'700'},devButtonText:{color:I.COLORS.TEXT_BODY,fontSize:P.FONT_SIZE.XS,fontWeight:'600'},publicLink:{color:I.COLORS.BRAND_PRIMARY,fontSize:P.FONT_SIZE.SM,fontWeight:'600'},headerCard:Object.assign({alignSelf:'center',width:'100%',marginHorizontal:E.SPACING.XL,padding:E.SPACING.XL,gap:E.SPACING.SM},{maxWidth:800}),headerTopRow:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',gap:E.SPACING.MD},headerEyebrow:{flex:1,color:I.COLORS.ACTION_PRIMARY,fontSize:P.FONT_SIZE.SM,fontWeight:'700',textTransform:'uppercase'},headerTitle:{color:I.COLORS.TEXT_PRIMARY,fontSize:P.FONT_SIZE.XXL,fontWeight:'700',lineHeight:28},headerMetaRow:{flexDirection:'row',alignItems:'center',flexWrap:'wrap',gap:E.SPACING.SM},headerMeta:{color:I.COLORS.TEXT_MUTED,fontSize:P.FONT_SIZE.SM},headerMetaDot:{color:I.COLORS.TEXT_PLACEHOLDER,fontSize:P.FONT_SIZE.SM},headerActions:{marginTop:E.SPACING.SM,paddingTop:E.SPACING.MD,borderTopWidth:1,borderTopColor:I.COLORS.BORDER_FAINT},headerActionRow:{flexDirection:'row',alignItems:'center',flexWrap:'wrap',gap:E.SPACING.SM},regenerateButton:{backgroundColor:I.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.SM},regenerateButtonText:{color:I.COLORS.TEXT_INVERSE,fontSize:P.FONT_SIZE.SM,fontWeight:'700'},statusBadge:{borderRadius:999,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.XS},statusBadgeText:{color:I.COLORS.TEXT_INVERSE,fontSize:P.FONT_SIZE.XS,fontWeight:'700'},sectionCard:Object.assign({alignSelf:'center',width:'100%',marginHorizontal:E.SPACING.XL,padding:E.SPACING.XL,gap:E.SPACING.MD},{maxWidth:800}),completenessHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',gap:E.SPACING.MD},summaryPill:{borderRadius:999,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.XS},summaryPillText:{fontSize:P.FONT_SIZE.XS,fontWeight:'700'},fetchHealth:{flexDirection:'row',alignItems:'center',gap:E.SPACING.SM,backgroundColor:I.COLORS.WARNING_BG,borderRadius:8,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.SM},fetchHealthDot:{width:8,height:8,borderRadius:999,backgroundColor:I.COLORS.WARNING},fetchHealthText:{flex:1,color:I.COLORS.WARNING_DARK,fontSize:P.FONT_SIZE.SM,fontWeight:'600'},chipGroup:{gap:E.SPACING.XS},chipGroupLabel:{color:I.COLORS.TEXT_MUTED,fontSize:P.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.4,textTransform:'uppercase'},chipWrap:{flexDirection:'row',flexWrap:'wrap',gap:E.SPACING.SM},chip:{flexDirection:'row',alignItems:'center',gap:E.SPACING.XS,borderRadius:999,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.XS},chipDot:{width:8,height:8,borderRadius:999},chipText:{fontSize:P.FONT_SIZE.XS,fontWeight:'600'},sectionTitle:{color:I.COLORS.TEXT_PRIMARY,fontSize:P.FONT_SIZE.LG,fontWeight:'700'},tagActions:{flexDirection:'row',gap:E.SPACING.SM,marginTop:E.SPACING.MD},saveButton:{backgroundColor:I.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:E.SPACING.XL,paddingVertical:E.SPACING.SM},saveButtonText:{color:I.COLORS.TEXT_INVERSE,fontSize:P.FONT_SIZE.SM,fontWeight:'600'},resetButton:{borderColor:I.COLORS.TEXT_MUTED,borderRadius:8,borderWidth:1,paddingHorizontal:E.SPACING.XL,paddingVertical:E.SPACING.SM},resetButtonText:{color:I.COLORS.TEXT_MUTED,fontSize:P.FONT_SIZE.SM,fontWeight:'600'},buttonDisabled:{opacity:.5},modalBackdrop:{flex:1,backgroundColor:I.COLORS.OVERLAY_DARK,alignItems:'center',justifyContent:'center',padding:E.SPACING.LG},modalCard:Object.assign({width:'100%',maxWidth:640,maxHeight:'85%',backgroundColor:I.COLORS.BG_SURFACE,borderRadius:12},N.ELEVATION.MEDIUM),modalHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',gap:E.SPACING.MD,padding:E.SPACING.LG,borderBottomWidth:1,borderBottomColor:I.COLORS.BORDER},modalTitle:{color:I.COLORS.TEXT_PRIMARY,fontSize:P.FONT_SIZE.LG,fontWeight:'700'},modalHeaderActions:{flexDirection:'row',alignItems:'center',gap:E.SPACING.SM},modalCopyButton:{backgroundColor:I.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.XS},modalCopyText:{color:I.COLORS.TEXT_INVERSE,fontSize:P.FONT_SIZE.XS,fontWeight:'700'},modalCloseButton:{borderWidth:1,borderColor:I.COLORS.BORDER,borderRadius:8,paddingHorizontal:E.SPACING.MD,paddingVertical:E.SPACING.XS},modalCloseText:{color:I.COLORS.TEXT_BODY,fontSize:P.FONT_SIZE.XS,fontWeight:'600'},modalBody:{paddingHorizontal:E.SPACING.LG},modalBodyContent:{paddingVertical:E.SPACING.LG,gap:E.SPACING.LG},devSection:{gap:E.SPACING.SM},devSectionTitle:{color:I.COLORS.TEXT_MUTED,fontSize:P.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.5,textTransform:'uppercase'},devField:{gap:E.SPACING.MICRO,paddingVertical:E.SPACING.XS,borderBottomWidth:1,borderBottomColor:I.COLORS.BORDER_FAINT},devFieldLabel:{color:I.COLORS.TEXT_MUTED,fontSize:P.FONT_SIZE.XS},devFieldValue:{color:I.COLORS.TEXT_PRIMARY,fontSize:P.FONT_SIZE.SM}
1078,devFieldValueMono:{fontFamily:P.FONT_FAMILY.WEB_MONOSPACE}})},978,[34,276,222,95,488,544,369,283,489,869,516,605,512,686,568,979,870,871,496,565,490,503,493,494,557,561,562,505,980,983,984,985,986,104]);
1079__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressMentionDetailContent=function({mention:e}){const[s,u]=(0,t.useState)(!1),c=e.title??'Untitled',S=null!=e.category?O[e.category]:'Uncategorized';return(0,T.jsxs)(l.default,{style:I.pageContent,children:[''!==e.ogImageUrl&&!s&&(0,T.jsx)(o.default,{source:{uri:e.ogImageUrl},style:I.heroImage,resizeMode:"cover",onError:()=>{u(!0)}}),(0,T.jsxs)(y.Card,{style:I.mainCard,children:[(0,T.jsxs)(l.default,{style:I.sourceRow,children:[(0,T.jsx)(o.default,{source:{uri:e.faviconUrl},style:I.favicon,defaultSource:{uri:e.faviconUrl}}),(0,T.jsx)(l.default,{style:I.sourceInfo,children:(0,T.jsx)(n.default,{style:I.sourceName,children:e.outletName??'Unknown source'})}),(0,T.jsx)(l.default,{style:I.categoryBadge,children:(0,T.jsx)(n.default,{style:I.categoryText,children:S})})]}),(0,T.jsx)(n.default,{style:I.title,children:c}),null!=e.publishedDate&&''!==e.publishedDate&&(0,T.jsxs)(n.default,{style:I.date,children:["Published ",(0,f.formatDateLong)(e.publishedDate)]}),null!=e.aiSummary&&''!==e.aiSummary&&(0,T.jsxs)(l.default,{style:I.summarySection,children:[(0,T.jsx)(n.default,{style:I.summaryLabel,children:"AI Summary"}),(0,T.jsx)(n.default,{style:I.summaryText,children:e.aiSummary})]}),null!=e.aiSummaryOriginal&&''!==e.aiSummaryOriginal&&(0,T.jsxs)(l.default,{style:I.summarySection,children:[(0,T.jsxs)(n.default,{style:I.summaryLabel,children:["Original (",e.aiOriginalLanguage?.toUpperCase()??'Original',")"]}),(0,T.jsx)(n.default,{style:I.summaryText,children:e.aiSummaryOriginal})]}),e.aiKeyThemes.length>0&&(0,T.jsxs)(l.default,{style:I.themesSection,children:[(0,T.jsx)(n.default,{style:I.metaLabel,children:"Key Themes"}),(0,T.jsx)(l.default,{style:I.themes,children:e.aiKeyThemes.map(e=>(0,T.jsx)(l.default,{style:I.themeTag,children:(0,T.jsx)(n.default,{style:I.themeText,children:e})},e))})]}),null!=e.description&&''!==e.description&&(0,T.jsxs)(l.default,{style:I.summarySection,children:[(0,T.jsx)(n.default,{style:I.summaryLabel,children:"Description"}),(0,T.jsx)(n.default,{style:I.summaryText,children:e.description})]}),(function(e){const t=null!=e&&''!==e?(0,h.readExternalUrlLinkProps)(e):null;return null==t?(0,T.jsx)(n.default,{style:I.unavailableLinkText,children:"Original article link is unavailable."}):(0,T.jsx)(h.ExternalLink,Object.assign({},t,{style:I.readButton,accessibilityLabel:"Read original article",children:(0,T.jsx)(n.default,{style:I.readButtonText,children:"Read Original Article"})}))})(e.url)]})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3]));r(d[4]);var s=r(d[5]),u=r(d[6]),c=r(d[7]),S=r(d[8]),f=r(d[9]),y=r(d[10]),h=r(d[11]),T=r(d[12]);const O={NEWS_MEDIA:'News Media',GOVERNMENT:'Government',ACADEMIC:'Research & Academic',COMMUNITY:'Community',ECOSYSTEM:'Ecosystem',PRODUCT_REVIEW:'Product Review'};const I=(0,s.createStyles)({pageContent:Object.assign({padding:c.SPACING.XL},{maxWidth:800,marginHorizontal:'auto',width:'100%'}),heroImage:{width:'100%',height:300,borderRadius:12,marginBottom:c.SPACING.XL},mainCard:{padding:c.SPACING.XL},sourceRow:{flexDirection:'row',alignItems:'center',marginBottom:c.SPACING.LG},favicon:{width:32,height:32,borderRadius:6},sourceInfo:{flex:1,marginLeft:c.SPACING.MD},sourceName:{color:u.COLORS.TEXT_PRIMARY,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},categoryBadge:{backgroundColor:u.COLORS.BRAND_PRIMARY,borderRadius:12,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.XS},categoryText:{color:u.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.XS,fontWeight:'600'},title:{color:u.COLORS.TEXT_PRIMARY,fontSize:S.FONT_SIZE.XXXL,fontWeight:'700',marginBottom:c.SPACING.MD},date:{color:u.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.MD,marginBottom:c.SPACING.XL},summarySection:{marginBottom:c.SPACING.XL,paddingTop:c.SPACING.LG,borderTopWidth:1,borderTopColor:u.COLORS.BORDER_NEUTRAL},summaryLabel:{color:u.COLORS.BRAND_PRIMARY,fontSize:S.FONT_SIZE.SM,fontWeight:'700',marginBottom:c.SPACING.SM,textTransform:'uppercase'},summaryText:{color:u.COLORS.TEXT_PRIMARY,fontSize:S.FONT_SIZE.MD,lineHeight:24},themesSection:{marginBottom:c.SPACING.XL},metaLabel:{color:u.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.SM,fontWeight:'600',marginBottom:c.SPACING.SM},themes:{flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.SM},themeTag:{backgroundColor:u.COLORS.BRAND_TINT,borderRadius:16,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.XS},themeText:{color:u.COLORS.BRAND_PRIMARY,fontSize:S.FONT_SIZE.SM},readButton:{backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:8,paddingVertical:c.SPACING.MD,paddingHorizontal:c.SPACING.XL,alignSelf:'flex-start'},readButtonText:{color:u.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},unavailableLinkText:{color:u.COLORS.TEXT_MUTED,fontSize:S.FONT_SIZE.SM,fontStyle:'italic'}})},979,[34,276,222,328,95,489,490,493,494,685,605,519,104]);
1080__d(function(g,r,i,a,m,_e,d){"use strict";
1080function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressAdminAuditHistory=function({entries:e,formatTime:l,showActor:n=!1,linkMentions:s=!1,emptyMessage:S="No audit entries yet"}){if(0===e.length)return(0,C.jsx)(t.default,{style:R.emptyText,children:S});return(0,C.jsx)(o.default,{style:R.list,children:e.map(e=>(0,C.jsx)(f,{entry:e,timeLabel:l(e.createdAt),showActor:n,linkMention:s},e.id))})},r(d[0]),r(d[1]);var t=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),n=r(d[5]),s=r(d[6]),S=r(d[7]),c=r(d[8]),u=r(d[9]),O=r(d[10]),C=r(d[11]);function f({entry:e,timeLabel:l,showActor:s,linkMention:S}){const c=(0,u.readAuditLogDisplay)(e),f='failure'===c.tone,T=e.actorIdentifier??('SYSTEM'===e.actorClassification?'System':e.actorClassification),h=S?e.mentionId:null,p=null!=h,x=[R.row,f?R.rowFailure:R.rowSuccess,p&&R.rowInteractive],y=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(o.default,{style:R.header,children:[(0,C.jsxs)(o.default,{style:R.actionLine,children:[(0,C.jsx)(t.default,{style:R.action,children:c.actionLabel}),(0,C.jsx)(o.default,{style:[R.statusBadge,f?R.statusFailed:R.statusSuccess],children:(0,C.jsx)(t.default,{style:[R.statusText,f&&R.statusTextFailed],children:c.statusLabel})})]}),(0,C.jsxs)(o.default,{style:R.meta,children:[s&&(0,C.jsx)(t.default,{style:[R.actor,'SYSTEM'===e.actorClassification&&R.actorSystem],children:T}),(0,C.jsx)(t.default,{style:R.time,children:l}),p&&(0,C.jsx)(o.default,{style:R.openBadge,children:(0,C.jsx)(t.default,{style:R.openBadgeText,children:"Open mention \u2192"})})]})]}),null!=e.mentionTitle&&''!==e.mentionTitle&&(0,C.jsx)(t.default,{style:R.mention,children:e.mentionTitle}),''!==c.detailSummary&&(0,C.jsx)(o.default,{style:R.detailPanel,children:(0,C.jsx)(t.default,{style:R.details,selectable:!0,children:c.detailSummary})})]});return p?(0,C.jsx)(n.AppLink,{to:"PressAdminDetail",href:(0,O.buildPressAdminDetailPath)(h,'dashboard'),style:x,accessibilityLabel:`Review ${e.mentionTitle??'press mention'}`,children:y}):(0,C.jsx)(o.default,{style:x,children:y})}const R=(0,l.createStyles)({list:{gap:S.SPACING.XS},row:{backgroundColor:s.COLORS.BG_SURFACE,borderWidth:1,borderLeftWidth:4,borderColor:s.COLORS.BORDER_NEUTRAL,borderRadius:8,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM,gap:S.SPACING.MICRO},rowSuccess:{borderLeftColor:s.COLORS.SUCCESS},rowFailure:{borderColor:s.COLORS.ERROR_BORDER,borderLeftColor:s.COLORS.ERROR},rowInteractive:Object.assign({},{cursor:'pointer'}),header:{flexDirection:'row',justifyContent:'space-between',alignItems:'flex-start',flexWrap:'wrap',gap:S.SPACING.SM},actionLine:{flexDirection:'row',alignItems:'center',flexWrap:'wrap',gap:S.SPACING.SM,flex:1,minWidth:180},action:{color:s.COLORS.TEXT_PRIMARY,fontSize:c.FONT_SIZE.SM,fontWeight:'700'},statusBadge:{borderRadius:999,paddingHorizontal:S.SPACING.SM,paddingVertical:2},statusSuccess:{backgroundColor:s.COLORS.SUCCESS_BG},statusFailed:{backgroundColor:s.COLORS.ERROR_BG},statusText:{color:s.COLORS.SUCCESS_DARK,fontSize:c.FONT_SIZE.XS,fontWeight:'700'},statusTextFailed:{color:s.COLORS.ERROR},meta:{flexDirection:'row',alignItems:'center',flexWrap:'wrap',gap:S.SPACING.SM},actor:{color:s.COLORS.TEXT_MUTED,fontSize:c.FONT_SIZE.XS},actorSystem:{fontStyle:'italic'},time:{color:s.COLORS.TEXT_CAPTION,fontSize:c.FONT_SIZE.XS},openBadge:{borderWidth:1,borderColor:s.COLORS.ACTION_PRIMARY,borderRadius:999,paddingHorizontal:S.SPACING.SM,paddingVertical:2,backgroundColor:s.COLORS.BG_SUBTLE_100},openBadgeText:{color:s.COLORS.ACTION_PRIMARY,fontSize:c.FONT_SIZE.XS,fontWeight:'700'},mention:{color:s.COLORS.TEXT_SECONDARY,fontSize:c.FONT_SIZE.SM,fontWeight:'600',lineHeight:16},detailPanel:{backgroundColor:s.COLORS.BG_SUBTLE_100,borderRadius:6,paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.MICRO},details:{color:s.COLORS.TEXT_MUTED,fontSize:c.FONT_SIZE.XS,lineHeight:16},emptyText:{color:s.COLORS.TEXT_MUTED,fontSize:c.FONT_SIZE.SM,paddingVertical:S.SPACING.SM}})},980,[34,95,222,276,489,516,490,493,494,981,982,104]);
1081__d(function(g,r,i,a,m,e,d){"use strict";function t(t,n,u){if('success'===n)return'Success';if('json'===u.kind&&c(u.value)){const t=o(u.value,'outcome').replace(/_/g,' ');if(''!==t)return t}
1081return t.endsWith('_ERROR')?'Error':'Failed'}function n(t){if(null==t||''===t)return{kind:'empty'};try{return{kind:'json',value:JSON.parse(t)}}catch{return{kind:'text',value:t}}}function u(t){if('empty'===t.kind)return'';if('text'===t.kind)return t.value;if(!c(t.value))return JSON.stringify(t.value);const n=[o(t.value,'operation').replace(/_/g,' '),o(t.value,'outcome').replace(/_/g,' '),o(t.value,'reason'),o(t.value,'url')].filter(t=>''!==t).join(' - ');return''!==n?n:JSON.stringify(t.value)}function o(t,n){const u=t[n];return'string'==typeof u?u:''}function c(t){return null!=t&&'object'==typeof t&&!Array.isArray(t)}Object.defineProperty(e,'__esModule',{value:!0}),e.readAuditLogDisplay=function(o){const c=(s=o.action,s.endsWith('_FAILED')||s.endsWith('_ERROR')?'failure':'success'),l=n(o.details);var s;return{actionLabel:o.action.replace(/_/g,' '),detailSummary:u(l),statusLabel:t(o.action,c,l),tone:c}}},981,[]);
1082__d(function(g,r,i,a,m,e,d){"use strict";function n(n,t){const l=`/admin/press/${encodeURIComponent(n)}`;return null==t?l:`${l}?returnTab=${encodeURIComponent(t)}`}Object.defineProperty(e,'__esModule',{value:!0}),e.buildPressAdminDetailPath=n,e.readPressQueueItemDisplay=function(t){const l=t.problems.map(n=>({key:n.code,label:n.label,isFailure:'FAILURE'===n.severity}));return{mention:t.publicView,adminDetailPath:n(t.publicView.id),hasProblems:l.length>0,problems:l}}},982,[]);
1083__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return`/press-v2/${encodeURIComponent(t)}`}Object.defineProperty(e,'__esModule',{value:!0}),e.buildPressPublicDetailPath=t,e.readPressAdminDetailDisplay=function(n){return{publicPath:'APPROVED'===n.status?t(n.publicView.id):null}},e.formatPressAdminDateTime=function(t){return new Date(t).toLocaleString()}},983,[]);
1084__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readPressDeveloperRecord=function(o){const n=o.publicView;return[{title:'Identity',fields:[{label:'Mention ID',value:n.id,mono:!0},{label:'Status',value:o.status},{label:'Featured',value:t(o.featured)}]},{title:'Source & Provenance',fields:[{label:'Original URL',value:n.url,mono:!0},{label:'Normalized URL',value:o.normalizedUrl,mono:!0},{label:'Domain',value:o.domain},{label:'og:site_name',value:o.ogSiteName},{label:'Discovery Source',value:o.discoverySource},{label:'Discovered',value:(0,l.formatPressAdminDateTime)(o.discoveredAt)},{label:'Created By',value:o.createdBy}]},{title:'Titles & Descriptions',fields:[{label:'Display Title',value:o.displayTitle},{label:'og:title',value:o.ogTitle},{label:'Display Description',value:o.displayDescription},{label:'og:description',value:o.ogDescription}]},{title:'Classification & AI',fields:[{label:'Category',value:o.category},{label:'Classification Source',value:o.classificationSource},{label:'Category Confidence',value:(s=o.categoryConfidence,null!=s?String(s):null)},{label:'AI Sentiment',value:o.aiSentiment},{label:'AI Reviewed',value:t(o.aiReviewed)},{label:'Original Language',value:n.aiOriginalLanguage},{label:'Key Themes',value:(u=o.aiKeyThemes,u.length>0?u.join(', '):null)}]},{title:'Pipeline Health',fields:[{label:'Metadata Failures',value:String(o.metadataFailureCount)},{label:'Last Metadata Failure',value:o.metadataLastFailureOutcome}]},{title:'Raw Assets',fields:[{label:'Raw og:image',value:o.ogImageUrl,mono:!0},{label:'Raw Favicon',value:o.faviconUrl,mono:!0},{label:'Proxied og:image',value:n.ogImageUrl,mono:!0},{label:'Proxied Favicon',value:n.faviconUrl,mono:!0}]}];var u;var s};var l=r(d[0]);function t(l){return l?'Yes':'No'}},984,[983]);
1085__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isPressAdminTab=s,e.buildPressAdminTabPath=function(n){return`/admin/press?tab=${encodeURIComponent(n)}`},e.resolvePressAdminTab=function(n){return null!=n&&s(n)?n:'dashboard'};const n=new Set(['dashboard','queue','mentions','submit','settings']);function s(s){return n.has(s)}},985,[]);
1086__d(function(g,r,i,a,m,e,d){"use strict";function t(t){return null!=t&&''!==t.trim()}function n(t){const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}function o(n){return t(n.displayTitle)?'Admin override':t(n.ogTitle)?'From page metadata':null}function l(n){return t(n.displayDescription)?'Admin override':t(n.ogDescription)?'From page metadata':null}function c(c){const s=c.publicView;return[{key:'title',label:'Title',importance:'core',present:t(s.title),note:t(s.title)?o(c):'No title found on the page'},{key:'outlet',label:'Outlet name',importance:'core',present:t(s.outletName),note:t(s.outletName)?s.outletName:'No publisher name resolved'},{key:'heroImage',label:'Hero image',importance:'core',present:t(c.ogImageUrl),note:t(c.ogImageUrl)?null:'No og:image on the page'},{key:'favicon',label:'Favicon',importance:'core',present:t(c.faviconUrl),note:t(c.faviconUrl)?null:'No favicon found'},{key:'category',label:'Category',importance:'core',present:null!=s.category,note:null!=s.category?t(c.classificationSource)?`Classified by ${c.classificationSource}`:null:'Not yet categorized'},{key:'aiSummary',label:'AI summary',importance:'core',present:t(s.aiSummary),note:t(s.aiSummary)?null:'Not generated yet'},{key:'description',label:'Description',importance:'enhancement',present:t(s.description),note:t(s.description)?l(c):'No description captured'},{key:'publishedDate',label:'Published date',importance:'enhancement',present:t(s.publishedDate),note:t(s.publishedDate)?s.publishedDate:'No publish date found'},{key:'keyThemes',label:'Key themes',importance:'enhancement',present:s.aiKeyThemes.length>0,note:s.aiKeyThemes.length>0?`${s.aiKeyThemes.length} extracted`:'None extracted'},{key:'sentiment',label:'Sentiment',importance:'enhancement',present:null!=c.aiSentiment,note:null!=c.aiSentiment?n(c.aiSentiment):'Not assessed'}]}
1086Object.defineProperty(e,'__esModule',{value:!0}),e.readPressMentionCompleteness=function(t){const n=c(t);return{components:n,presentCount:n.filter(t=>t.present).length,totalCount:n.length,missingCoreCount:n.filter(t=>'core'===t.importance&&!t.present).length}}},986,[]);
1087__d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressAdminScreen=function(){const e=(0,N.useSeoMeta)('PressAdmin'),l=(0,L.useAppLinkTo)(),o=(0,L.usePressAdminParams)(),c=(0,D.resolvePressAdminTab)(o?.tab),[u,S]=(0,t.useState)(c),[y,C]=(0,t.useState)(null),[b,R]=(0,t.useState)('ANY'),[h,f]=(0,t.useState)(0);(0,t.useEffect)(()=>{S(c)},[c]);const O=(0,t.useCallback)(e=>{S(e),l((0,D.buildPressAdminTabPath)(e))},[l]),x=(0,t.useCallback)((e,t)=>{C(e),R(t),f(0),O('mentions')},[O]),P=(0,t.useCallback)(e=>{C(e),f(0)},[]),E=(0,t.useCallback)(e=>{R(e),f(0)},[]);return(0,_.jsxs)(p.PageLayout,{children:[(0,_.jsx)(A.WebMeta,Object.assign({},e)),(0,_.jsx)(n.default,{style:ee.scrollContainer,children:(0,_.jsxs)(a.default,{style:ee.container,children:[(0,_.jsx)(s.default,{style:ee.title,children:"Press Admin"}),(0,_.jsx)(T.TabBar,{tabs:G,activeTab:u,onTabChange:e=>{(0,D.isPressAdminTab)(e)&&O(e)},variant:"pillSoft"}),'dashboard'===u&&(0,_.jsx)(B,{onBrowse:x}),'queue'===u&&(0,_.jsx)(q,{}),'mentions'===u&&(0,_.jsx)(V,{status:y,category:b,page:h,onStatusChange:P,onCategoryChange:E,onPageChange:f}),'submit'===u&&(0,_.jsx)(K,{}),'settings'===u&&(0,_.jsx)(J,{})]})})]})};var t=r(d[0]),a=e(r(d[1])),s=e(r(d[2])),l=e(r(d[3])),o=e(r(d[4])),n=e(r(d[5])),c=r(d[6]),u=r(d[7]),S=r(d[8]),y=r(d[9]),C=r(d[10]),b=r(d[11]),p=r(d[12]),R=r(d[13]),h=r(d[14]),f=r(d[15]),T=r(d[16]),O=r(d[17]),A=r(d[18]),x=r(d[19]),P=r(d[20]),E=r(d[21]),I=r(d[22]),j=r(d[23]),N=r(d[24]),L=r(d[25]),M=r(d[26]),D=r(d[27]),w=r(d[28]),_=r(d[29]);const G=[{key:'dashboard',label:'Dashboard'},{key:'queue',label:'Review Queue'},{key:'mentions',label:'Mentions'},{key:'submit',label:'Submit URL'},{key:'settings',label:'Settings'}],v=(0,I.defineScreenErrorSurfaces)('PressAdmin',{dashboard:{id:'dashboard',kind:'page',label:'Press admin dashboard error'},queue:{id:'queue',kind:'page',label:'Press admin queue error'},mentions:{id:'mentions',kind:'page',label:'Press admin mentions browser error'},settings:{id:'settings',kind:'page',label:'Press admin settings error'}});function B({onBrowse:e}){const{data:l,loading:o,error:n,retry:c}=(0,j.useAsyncData)(()=>u.pressAdminApi.getDashboard(),[],'Failed to load dashboard.'),{isDevTriggered:S,surface:p}=(0,I.useErrorSurface)(v.dashboard),R=n??(S?'Failed to load dashboard.':null),[h,f]=(0,t.useState)(0),{data:T,loading:O}=(0,j.useAsyncData)(()=>u.pressAdminApi.getAuditLog({page:h,size:15}),[h],'Failed to load audit log.'),[A,P]=(0,t.useState)(()=>Date.now());return(0,t.useEffect)(()=>{const e=setInterval(()=>{P(Date.now())},6e4);return()=>{clearInterval(e)}},[]),o?(0,_.jsx)(C.LoadingState,{}):null!=R||null==l?(0,_.jsx)(C.ErrorState,{message:R??'No data',surface:p,onRetry:c}):(0,_.jsxs)(a.default,{children:[(0,_.jsxs)(a.default,{style:ee.statsRow,children:[(0,_.jsx)(F,{label:"Total",value:l.totalMentions,color:x.COLORS.BRAND_PRIMARY,onPress:()=>{e(null,'ANY')}}),(0,_.jsx)(F,{label:"Pending",value:l.pendingCount,color:x.COLORS.WARNING,onPress:()=>{e('PENDING','ANY')}}),(0,_.jsx)(F,{label:"Approved",value:l.approvedCount,color:x.COLORS.EMERALD_600,onPress:()=>{e('APPROVED','ANY')}}),(0,_.jsx)(F,{label:"Rejected",value:l.rejectedCount,color:x.COLORS.ERROR,onPress:()=>{e('REJECTED','ANY')}})]}),(0,_.jsxs)(a.default,{style:ee.dashSection,children:[(0,_.jsx)(s.default,{style:ee.dashSectionTitle,children:"Approved by Category"}),(0,_.jsx)(s.default,{style:ee.dashSectionSubtitle,children:"Share of published coverage. Select a category to view its mentions."}),(0,_.jsx)(k,{countByCategory:l.countByCategory,onSelectCategory:t=>{e('APPROVED',t)}})]}),(0,_.jsxs)(a.default,{style:ee.dashSection,children:[(0,_.jsx)(s.default,{style:ee.dashSectionTitle,children:"Pipeline Health"}),(0,_.jsxs)(y.Card,{style:ee.pipelineCard,children:[(0,_.jsx)(H,{label:"Discovery",t
1087imestamp:l.lastDiscoveryRun,enabled:l.discoveryEnabled,nowMillis:A}),(0,_.jsx)(H,{label:"Metadata Refresh",timestamp:l.lastMetadataRefresh,enabled:!0,nowMillis:A}),(0,_.jsx)(H,{label:"AI Insights",timestamp:l.lastAiInsightRun,enabled:l.aiEnabled,nowMillis:A})]})]}),(0,_.jsxs)(a.default,{style:ee.dashSection,children:[(0,_.jsx)(s.default,{style:ee.dashSectionTitle,children:"Discovery Sources"}),(0,_.jsxs)(y.Card,{style:ee.pipelineCard,children:[0===l.discoverySources.length&&(0,_.jsx)(s.default,{style:ee.emptyText,children:"No discovery sources configured."}),l.discoverySources.map(e=>(0,_.jsx)(U,{source:e,nowMillis:A},`${e.sourceType}:${e.name}`))]})]}),(0,_.jsxs)(a.default,{style:ee.dashSection,children:[(0,_.jsx)(s.default,{style:ee.dashSectionTitle,children:"Recent Activity"}),(0,_.jsxs)(a.default,{style:ee.activityRow,children:[(0,_.jsxs)(a.default,{style:ee.activityItem,children:[(0,_.jsx)(s.default,{style:ee.activityValue,children:l.mentionsLast24h}),(0,_.jsx)(s.default,{style:ee.activityLabel,children:"Mentions (24h)"})]}),(0,_.jsxs)(a.default,{style:ee.activityItem,children:[(0,_.jsx)(s.default,{style:ee.activityValue,children:l.mentionsLast7d}),(0,_.jsx)(s.default,{style:ee.activityLabel,children:"Mentions (7d)"})]}),(0,_.jsxs)(a.default,{style:ee.activityItem,children:[(0,_.jsx)(s.default,{style:ee.activityValue,children:l.actionsLast24h}),(0,_.jsx)(s.default,{style:ee.activityLabel,children:"Actions (24h)"})]})]})]}),(0,_.jsxs)(a.default,{style:ee.dashSection,children:[(0,_.jsx)(s.default,{style:ee.dashSectionTitle,children:"Audit Log"}),O&&(0,_.jsx)(C.LoadingState,{}),!O&&(0,_.jsx)(M.PressAdminAuditHistory,{entries:T?.content??[],formatTime:e=>Z(e,A),showActor:!0,linkMentions:!0}),T&&T.totalPages>1&&(0,_.jsx)(b.Pagination,{page:h,totalPages:T.totalPages,onPageChange:f,itemLabel:"entries"})]})]})}function F({label:e,value:t,color:a,onPress:o}){return(0,_.jsx)(l.default,{style:ee.statCardPressable,onPress:o,accessibilityRole:"button",accessibilityLabel:`View ${t} ${e} mentions`,children:(0,_.jsxs)(y.Card,{style:ee.statCard,children:[(0,_.jsx)(s.default,{style:[ee.statValue,{color:a}],children:t}),(0,_.jsx)(s.default,{style:ee.statLabel,children:e}),(0,_.jsx)(s.default,{style:ee.statHint,children:"View"})]})})}function k({countByCategory:e,onSelectCategory:t}){const l=Object.entries(e).filter(([,e])=>e>0).sort(([,e],[,t])=>t-e),o=l.reduce((e,[,t])=>e+t,0);return 0===l.length||0===o?(0,_.jsx)(s.default,{style:ee.emptyText,children:"No approved mentions yet"}):(0,_.jsx)(a.default,{style:ee.categoryList,children:l.map(([e,a])=>(0,_.jsx)(X,{categoryKey:e,count:a,total:o,onSelectCategory:t},e))})}function X({categoryKey:e,count:t,total:o,onSelectCategory:n}){const c=(0,R.pressCategoryLabel)(e),u=Math.round(t/o*100),S=(0,_.jsxs)(a.default,{style:ee.categoryRowBody,children:[(0,_.jsxs)(a.default,{style:ee.categoryRowHeader,children:[(0,_.jsx)(s.default,{style:ee.categoryName,children:c}),(0,_.jsxs)(s.default,{style:ee.categoryCount,children:[t,(0,_.jsx)(s.default,{style:ee.categoryPercent,children:`  ${u}%`})]})]}),(0,_.jsx)(a.default,{style:ee.categoryBarTrack,children:(0,_.jsx)(a.default,{style:[ee.categoryBarFill,{width:`${u}%`}]})})]}),y=(0,R.isPressApiCategory)(e)?e:e===R.UNCATEGORIZED_KEY?R.UNCATEGORIZED_KEY:null;return null==y?(0,_.jsx)(a.default,{style:ee.categoryRow,children:S}):(0,_.jsx)(l.default,{style:ee.categoryRow,onPress:()=>{n(y)},accessibilityRole:"button",accessibilityLabel:`View ${t} approved ${c} mentions`,children:S})}const z=[{key:null,label:'All'},{key:'PENDING',label:'Pending'},{key:'APPROVED',label:'Approved'},{key:'REJECTED',label:'Rejected'},{key:'ARCHIVED',label:'Archived'}],W={PENDING:x.COLORS.WARNING,APPROVED:x.COLORS.EMERALD_600,REJECTED:x.COLORS.ERROR,ARCHIVED:x.COLORS.TEXT_MUTED};function V({status:e,category:t,page:o,onStatusChange:n,onCategoryChange:c,onPageChange:S}){const{data:y,loading:p,error:h,retry:f}=(0,j.useAsyncData)(()=>u.pressAdminApi.listMentions(Object.assign({},null!=e?{status:e}:{},{categoryFilter:t,page:o,size:20})),[e,t,o],'Failed to load mentions.'),{isDevTriggered:T,surface:O}=(0,I.useErrorSurface)(v.mentions),A=h??(T?'Failed to load mentions.':null);return(0,_.jsxs)(a.default,{children:[(0,_.jsx)(a.default,{style:ee.browseFilterRow,children:z.map(t=>{const a=t.key===e;return(0,_.jsx)(l.default,{style:[ee.browseChip,a&&ee.browseChipActive],onPress:()=>{n(t.key)},accessibilityRole:"button",accessibilityState:{selected:a},children:(0,_.jsx)(s.default,{style:[ee.browseChipText,a&&ee.browseChipTextActive],children:t.label})},t.label)})}),(0,_.jsxs)(a.default,{style:ee.browseFilterRow,children:[(0,_.jsx)(l.default,{style:[ee.browseChip,'ANY'===t&&ee.browseChipActive],onPress:()=>{c('ANY')},accessibilityRole:"button",accessibilityState:{selected:'ANY'===t},children:(0,_.jsx)(s.default,{style:[ee.browseChipText,'ANY'===t&&ee.browseChipTextActive],children:"All categories"})}),R.PRESS_CATEGORY_OPTIONS.map(e=>{const a=e.key===t;return(0,_.jsx)(l.default,{style:[ee.browseChip,a&&ee.browseChipActive],onPress:()=>{c(e.key)},accessibilityRole:"button",accessibilityState:{selected:a},children:(0,_.jsx)(s.default,{style:[ee.browseChipText,a&&ee.browseChipTextActive],children:e.label})},e.key)}),(0,_.jsx)(l.default,{style:[ee.browseChip,t===R.UNCATEGORIZED_KEY&&ee.browseChipActive],onPress:()=>{c(R.UNCATEGORIZED_KEY)},accessibilityRole:"button",accessibilityState:{selected:t===R.UNCATEGORIZED_KEY},children:(0,_.jsx)(s.default,{style:[ee.browseChipText,t===R.UNCATEGORIZED_KEY&&ee.browseChipTextActive],children:"Uncategorized"})})]}),p&&(0,_.jsx)(C.LoadingState,{}),null!=A&&(0,_.jsx)(C.ErrorState,{message:A,surface:O,onRetry:f}),!p&&null==A&&null!=y&&(0,_.jsxs)(_.Fragment,{children:[0===y.content.length?(0,_.jsx)(C.EmptyState,{message:"No mentions match these filters."}):(0,_.jsx)(a.default,{style:ee.browseList,children:y.content.map(e=>(0,_.jsx)(Y,{mention:e},e.publicView.id))}),y.totalPages>1&&(0,_.jsx)(b.Pagination,{page:o,totalPages:y.totalPages,onPageChange:S,itemLabel:"mentions"})]})]})}function Y({mention:e}){const{publicView:t}=e;return(0,_.jsxs)(S.AppLink,{to:"PressAdminDetail",href:`/admin/press/${t.id}`,style:ee.browseRow,accessibilityLabel:`Review ${t.title??'mention'}`,children:[(0,_.jsxs)(a.default,{style:ee.browseRowHeader,children:[(0,_.jsx)(a.default,{style:[ee.statusPill,{backgroundColor:W[e.status]}],children:(0,_.jsx)(s.default,{style:ee.statusPillText,children:e.status})}),(0,_.jsxs)(s.default,{style:ee.browseRowMeta,numberOfLines:1,children:[t.outletName??'Unknown source',null!=t.category?` \xb7 ${(0,R.pressCategoryLabel)(t.category)}`:'']})]}),(0,_.jsx)(s.default,{style:ee.browseRowTitle,numberOfLines:2,children:t.title??'Untitled'})]})}function H({label:e,timestamp:t,enabled:l,nowMillis:o}){const n=null!=t&&''!==t?Z(t,o):'Never';return(0,_.jsxs)(a.default,{style:ee.pipelineRow,children:[(0,_.jsxs)(a.default,{style:ee.pipelineLabelRow,children:[(0,_.jsx)(a.default,{style:[ee.statusDot,{backgroundColor:l?x.COLORS.EMERALD_600:x.COLORS.TEXT_MUTED}]}),(0,_.jsx)(s.default,{style:ee.pipelineLabel,children:e})]}),(0,_.jsx)(s.default,{style:ee.pipelineTime,children:n})]})}function U({source:e,nowMillis:t}){const l=null!=e.lastError&&''!==e.lastError,o=null!=e.lastPolledAt&&''!==e.lastPolledAt?Z(e.lastPolledAt,t):'Never';return(0,_.jsxs)(a.default,{style:ee.sourceHealthRow,children:[(0,_.jsxs)(a.default,{style:ee.sourceHealthMain,children:[(0,_.jsx)(a.default,{style:[ee.statusDot,{backgroundColor:l?x.COLORS.ERROR:e.enabled?x.COLORS.EMERALD_600:x.COLORS.TEXT_MUTED}]}),(0,_.jsxs)(a.default,{style:ee.sourceHealthText,children:[(0,_.jsx)(s.default,{style:ee.pipelineLabel,children:e.name}),(0,_.jsxs)(s.default,{style:ee.sourceHealthMeta,children:[e.sourceType.replace(/_/g,' ')," - last polled ",o]}),l&&(0,_.jsx)(s.default,{style:ee.sourceHealthError,children:e.lastError})]})]}),(0,_.jsx)(s.default,{style:[ee.sourceHealthStatus,l&&ee.sourceHealthStatusError],children:l?'Degraded':e.enabled?'Healthy':'Disabled'})]})}function Z(e,t){const a=new Date(e),s=t-a.getTime(),l=Math.floor(s/6e4);if(l<1)return'Just now';if(l<60)return`${l}m ago`;const o=Math.floor(l/60);if(o<24)return`${o}h ago`;const n=Math.floor(o/24);return n<30?`${n}d ago`:a.toLocaleDateString()}function q(){const e=(0,O.useToast)(),[l,o]=(0,t.useState)(0),[n,c]=(0,t.useState)(0),{data:S,loading:y,error:p,retry:R}=(0,j.useAsyncData)(()=>u.pressAdminApi.getQueue(l,20),[l,n],'Failed to load review queue.'),{isDevTriggered:h,surface:f}=(0,I.useErrorSurface)(v.queue),T=p??(h?'Failed to load review queue.':null),A=(0,t.useCallback)(async(t,a)=>{try{'approve'===a?await u.pressAdminApi.approve(t):'reject'===a?await u.pressAdminApi.reject(t):await u.pressAdminApi.regenerateSummary(t),c(e
1087=>e+1)}catch(a){const s=a instanceof Error?a.message:'Action failed';e.error(s,{id:`press-queue-${t}`})}},[e]),x=(0,t.useCallback)(async(e,t)=>{await u.pressAdminApi.updateMention(e,{category:t.category,keyThemes:t.keyThemes}),c(e=>e+1)},[]);return y?(0,_.jsx)(C.LoadingState,{}):null!=T?(0,_.jsx)(C.ErrorState,{message:T,surface:f,onRetry:R}):null==S||0===S.content.length?(0,_.jsx)(C.EmptyState,{message:"No pending mentions in the review queue."}):(0,_.jsxs)(a.default,{children:[(0,_.jsxs)(s.default,{style:ee.panelSubtitle,children:[S.totalElements," pending mention",1!==S.totalElements?'s':'']}),S.content.map(e=>(0,_.jsx)($,{queueRow:e,onApprove:()=>{A(e.publicView.id,'approve')},onReject:()=>{A(e.publicView.id,'reject')},onRegenerate:()=>{A(e.publicView.id,'regenerate')},onSaveTags:t=>x(e.publicView.id,t)},e.publicView.id)),S.totalPages>1&&(0,_.jsx)(b.Pagination,{page:l,totalPages:S.totalPages,onPageChange:o,itemLabel:"mentions"})]})}function $({queueRow:e,onApprove:o,onReject:n,onRegenerate:c,onSaveTags:u}){const S=(0,O.useToast)(),y=(0,w.readPressQueueItemDisplay)(e),{mention:C}=y,[b,p]=(0,t.useState)(!1),[R,T]=(0,t.useState)(!1),[A,x]=(0,t.useState)({category:C.category,keyThemes:C.aiKeyThemes}),P=(0,t.useCallback)(()=>{(async()=>{T(!0);try{await u(A),S.success('Tags updated',{id:`press-queue-tags-${C.id}`}),p(!1)}catch(e){S.error(e instanceof Error?e.message:'Failed to save tags',{id:`press-queue-tags-${C.id}`})}finally{T(!1)}})()},[A,u,S,C.id]);return(0,_.jsxs)(a.default,{style:[ee.queueItemWrapper,y.hasProblems&&ee.queueItemWrapperWithProblems],children:[(0,_.jsx)(h.PressMentionCard,{mention:C,to:"PressAdminDetail",href:y.adminDetailPath}),y.hasProblems&&(0,_.jsx)(a.default,{style:ee.queueProblems,children:y.problems.map(e=>(0,_.jsx)(a.default,{style:[ee.queueProblemBadge,e.isFailure?ee.queueProblemFailure:ee.queueProblemWarning],children:(0,_.jsx)(s.default,{style:[ee.queueProblemText,e.isFailure&&ee.queueProblemTextFailure],children:e.label})},e.key))}),b&&(0,_.jsx)(a.default,{style:ee.queueTagEditor,children:(0,_.jsx)(f.PressTagEditor,{category:A.category,keyThemes:A.keyThemes,onChange:x,disabled:R})}),(0,_.jsxs)(a.default,{style:ee.queueActions,children:[(0,_.jsx)(l.default,{style:ee.approveButton,onPress:o,accessibilityLabel:"Approve mention",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.actionButtonText,children:"Approve"})}),(0,_.jsx)(l.default,{style:ee.rejectButton,onPress:n,accessibilityLabel:"Reject mention",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.actionButtonText,children:"Reject"})}),b?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l.default,{style:[ee.approveButton,R&&ee.submitButtonDisabled],onPress:P,disabled:R,accessibilityLabel:"Save tags",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.actionButtonText,children:R?'Saving...':'Save Tags'})}),(0,_.jsx)(l.default,{style:ee.regenerateButton,onPress:()=>{x({category:C.category,keyThemes:C.aiKeyThemes}),p(!1)},disabled:R,accessibilityLabel:"Cancel tag editing",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.regenerateText,children:"Cancel"})})]}):(0,_.jsx)(l.default,{style:ee.regenerateButton,onPress:()=>{p(!0)},accessibilityLabel:"Edit tags",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.regenerateText,children:"Edit Tags"})}),(0,_.jsx)(l.default,{style:ee.regenerateButton,onPress:c,accessibilityLabel:"Regenerate AI summary",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.regenerateText,children:"Regenerate AI"})})]})]})}function K(){const[e,a]=(0,t.useState)(''),[n,c]=(0,t.useState)(''),[S,C]=(0,t.useState)(''),[b,p]=(0,t.useState)(!1),[R,h]=(0,t.useState)(null),f=(0,t.useCallback)(async()=>{if(''!==e.trim()){p(!0),h(null);try{const t={url:e.trim()};''!==n.trim()&&(t.displayTitle=n.trim()),''!==S.trim()&&(t.displayDescription=S.trim());const s=await u.pressAdminApi.submitUrl(t);h(`Created mention: ${s.title??s.url}`),a(''),c(''),C('')}catch(e){h(e instanceof Error?e.message:'Submission failed')}finally{p(!1)}}},[e,n,S]);return(0,_.jsxs)(y.Card,{style:ee.submitCard,children:[(0,_.jsx)(s.default,{style:ee.fieldLabel,children:"URL *"}
1087),(0,_.jsx)(o.default,{style:ee.input,value:e,onChangeText:a,placeholder:"https://example.com/article",placeholderTextColor:x.COLORS.TEXT_CAPTION,autoCapitalize:"none",autoCorrect:!1,keyboardType:"url",accessibilityLabel:"Article URL"}),(0,_.jsx)(s.default,{style:ee.fieldLabel,children:"Display Title (optional)"}),(0,_.jsx)(o.default,{style:ee.input,value:n,onChangeText:c,placeholder:"Override the og:title",placeholderTextColor:x.COLORS.TEXT_CAPTION,accessibilityLabel:"Display title override"}),(0,_.jsx)(s.default,{style:ee.fieldLabel,children:"Display Description (optional)"}),(0,_.jsx)(o.default,{style:[ee.input,ee.textArea],value:S,onChangeText:C,placeholder:"Override the og:description",placeholderTextColor:x.COLORS.TEXT_CAPTION,multiline:!0,numberOfLines:3,accessibilityLabel:"Display description override"}),(0,_.jsx)(l.default,{style:[ee.submitButton,b&&ee.submitButtonDisabled],onPress:()=>{f()},disabled:b||''===e.trim(),accessibilityLabel:"Submit URL",accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.actionButtonText,children:b?'Submitting...':'Submit URL'})}),null!=R&&''!==R&&(0,_.jsx)(s.default,{style:ee.resultText,children:R})]})}function J(){const e=(0,O.useToast)(),[s,l]=(0,t.useState)(0),{data:o,loading:n,error:c,retry:S}=(0,j.useAsyncData)(()=>u.pressAdminApi.getSettings(),[s],'Failed to load moderation settings.'),{isDevTriggered:y,surface:b}=(0,I.useErrorSurface)(v.settings),p=c??(y?'Failed to load moderation settings.':null),R=(0,t.useCallback)(async(t,a)=>{try{await u.pressAdminApi.updateSetting(t,a),l(e=>e+1)}catch(a){const s=a instanceof Error?a.message:'Update failed';e.error(s,{id:`press-settings-${t}`})}},[e]);return n?(0,_.jsx)(C.LoadingState,{}):null!=p?(0,_.jsx)(C.ErrorState,{message:p,surface:b,onRetry:S}):null==o||0===o.length?(0,_.jsx)(C.EmptyState,{message:"No moderation settings configured."}):(0,_.jsx)(a.default,{children:o.map(e=>(0,_.jsx)(Q,{setting:e,onUpdate:R},e.settingKey))})}function Q({setting:e,onUpdate:n}){const[c,u]=(0,t.useState)(e.settingValue),[S,C]=(0,t.useState)(!1),b=(0,t.useCallback)(()=>{n(e.settingKey,c),C(!1)},[e.settingKey,c,n]);return(0,_.jsxs)(y.Card,{style:ee.settingCard,children:[(0,_.jsx)(s.default,{style:ee.settingKey,children:e.settingKey}),''!==e.description&&(0,_.jsx)(s.default,{style:ee.settingDescription,children:e.description}),S?(0,_.jsxs)(a.default,{style:ee.settingEditRow,children:[(0,_.jsx)(o.default,{style:[ee.input,ee.settingInput],value:c,onChangeText:u,accessibilityLabel:`Edit ${e.settingKey}`}),(0,_.jsx)(l.default,{style:ee.saveButton,onPress:b,accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.actionButtonText,children:"Save"})}),(0,_.jsx)(l.default,{style:ee.cancelButton,onPress:()=>{u(e.settingValue),C(!1)},accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.cancelButtonText,children:"Cancel"})})]}):(0,_.jsxs)(a.default,{style:ee.settingValueRow,children:[(0,_.jsx)(s.default,{style:ee.settingValue,children:e.settingValue}),(0,_.jsx)(l.default,{style:ee.editButton,onPress:()=>{C(!0)},accessibilityRole:"button",children:(0,_.jsx)(s.default,{style:ee.editButtonText,children:"Edit"})})]}),''!==e.updatedBy&&(0,_.jsxs)(s.default,{style:ee.settingMeta,children:["Last updated by ",e.updatedBy]})]})}const ee=(0,c.createStyles)({scrollContainer:{backgroundColor:x.COLORS.BG_WASH,flex:1},container:{alignSelf:'center',maxWidth:1200,padding:P.SPACING.XXL,width:'100%'},title:{color:x.COLORS.ACTION_PRIMARY,fontSize:E.FONT_SIZE.DISPLAY_SM,fontWeight:'700',marginBottom:P.SPACING.XL},panelSubtitle:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.MD,marginBottom:P.SPACING.LG},queueItemWrapper:{marginBottom:P.SPACING.MD},queueItemWrapperWithProblems:{backgroundColor:x.COLORS.WARNING_BG,borderColor:x.COLORS.WARNING,borderRadius:8,borderWidth:1},queueProblems:{flexDirection:'row',flexWrap:'wrap',gap:P.SPACING.SM,paddingHorizontal:P.SPACING.LG,paddingBottom:P.SPACING.SM},queueProblemBadge:{borderRadius:999,paddingHorizontal:P.SPACING.SM,paddingVertical:P.SPACING.XS},queueProblemWarning:{backgroundColor:x.COLORS.WARNING_BANNER_BORDER},queueProblemFailure:{backgroundColor:x.COLORS.ERROR_BORDER},queueProblemText:{color:x.COLORS.WARNING_DARK,fontSize:E.FONT_SIZE.XS,fontWeight:'700'},queueProblemTextFailure:{color:x.COLORS.ERROR},queueTagEditor:{paddingHorizontal:P.SPACING.LG,paddingBottom:P.SPACING.SM},queueActions:{flexDirection:'row',flexWrap:'wrap',gap:P.SPACING.SM,paddingHorizontal:P.SPACING.LG,paddingBottom:P.SPACING.SM},approveButton:{backgroundColor:x.COLORS.EMERALD_600,borderRadius:6,paddingHorizontal:P.SPACING.LG,paddingVertical:P.SPACING.SM},rejectButton:{backgroundColor:x.COLORS.ERROR,borderRadius:6,paddingHorizontal:P.SPACING.LG,paddingVertical:P.SPACING.SM},regenerateButton:{borderColor:x.COLORS.ACTION_PRIMARY,borderRadius:6,borderWidth:1,paddingHorizontal:P.SPACING.LG,paddingVertical:P.SPACING.SM},actionButtonText:{color:x.COLORS.TEXT_INVERSE,fontSize:E.FONT_SIZE.SM,fontWeight:'600'},regenerateText:{color:x.COLORS.ACTION_PRIMARY,fontSize:E.FONT_SIZE.SM,fontWeight:'600'},submitCard:{padding:P.SPACING.XL},fieldLabel:{color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.SM,fontWeight:'600',marginBottom:P.SPACING.XS,marginTop:P.SPACING.MD},input:{backgroundColor:x.COLORS.BG_SURFACE,borderColor:x.COLORS.BORDER_NEUTRAL,borderRadius:8,borderWidth:1,color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.MD,paddingHorizontal:P.SPACING.MD,paddingVertical:P.SPACING.SM},textArea:{minHeight:80,textAlignVertical:'top'},submitButton:{backgroundColor:x.COLORS.ACTION_PRIMARY,borderRadius:8,paddingVertical:P.SPACING.MD,alignItems:'center',marginTop:P.SPACING.XL},submitButtonDisabled:{opacity:.6},resultText:{color:x.COLORS.TEXT_SECONDARY,fontSize:E.FONT_SIZE.MD,marginTop:P.SPACING.MD,fontStyle:'italic'},settingCard:{marginBottom:P.SPACING.MD,padding:P.SPACING.LG},settingKey:{color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.MD,fontWeight:'700',marginBottom:P.SPACING.XS},settingDescription:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM,marginBottom:P.SPACING.SM},settingValueRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between'},settingValue:{color:x.COLORS.TEXT_SECONDARY,fontSize:E.FONT_SIZE.MD,fontFamily:E.FONT_FAMILY.MONOSPACE},settingEditRow:{flexDirection:'row',alignItems:'center',gap:P.SPACING.SM},settingInput:{flex:1},editButton:{borderColor:x.COLORS.ACTION_PRIMARY,borderRadius:6,borderWidth:1,paddingHorizontal:P.SPACING.MD,paddingVertical:P.SPACING.XS},editButtonText:{color:x.COLORS.ACTION_PRIMARY,fontSize:E.FONT_SIZE.SM,fontWeight:'600'},saveButton:{backgroundColor:x.COLORS.EMERALD_600,borderRadius:6,paddingHorizontal:P.SPACING.MD,paddingVertical:P.SPACING.SM},cancelButton:{borderColor:x.COLORS.TEXT_MUTED,borderRadius:6,borderWidth:1,paddingHorizontal:P.SPACING.MD,paddingVertical:P.SPACING.SM},cancelButtonText:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM},settingMeta:{color:x.COLORS.TEXT_CAPTION,fontSize:E.FONT_SIZE.XS,marginTop:P.SPACING.SM},statsRow:{flexDirection:'row',gap:P.SPACING.MD,marginBottom:P.SPACING.XL,flexWrap:'wrap'},statCardPressable:{flex:1,minWidth:120},statCard:{flex:1,padding:P.SPACING.LG,alignItems:'center'},statValue:{fontSize:E.FONT_SIZE.DISPLAY_SM,fontWeight:'700'},statLabel:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM,marginTop:P.SPACING.XS},statHint:{color:x.COLORS.ACTION_PRIMARY,fontSize:E.FONT_SIZE.XS,fontWeight:'600',marginTop:P.SPACING.SM},browseFilterRow:{flexDirection:'row',flexWrap:'wrap',gap:P.SPACING.SM,marginBottom:P.SPACING.MD},browseChip:{paddingVertical:P.SPACING.XS,paddingHorizontal:P.SPACING.MD,borderRadius:16,borderWidth:1,borderColor:x.COLORS.BORDER,backgroundColor:x.COLORS.BG_SURFACE},browseChipActive:{backgroundColor:x.COLORS.ACTION_PRIMARY,borderColor:x.COLORS.ACTION_PRIMARY},browseChipText:{color:x.COLORS.TEXT_SECONDARY,fontSize:E.FONT_SIZE.SM,fontWeight:'500'},browseChipTextActive:{color:x.COLORS.TEXT_INVERSE}
1087,browseList:{gap:P.SPACING.SM},browseRow:{paddingVertical:P.SPACING.MD,paddingHorizontal:P.SPACING.MD,backgroundColor:x.COLORS.BG_SURFACE,borderRadius:6,borderWidth:1,borderColor:x.COLORS.BORDER,gap:P.SPACING.XS},browseRowHeader:{flexDirection:'row',alignItems:'center',gap:P.SPACING.SM},statusPill:{borderRadius:10,paddingHorizontal:P.SPACING.SM,paddingVertical:2},statusPillText:{color:x.COLORS.TEXT_INVERSE,fontSize:E.FONT_SIZE.XS,fontWeight:'700'},browseRowMeta:{flex:1,color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.XS},browseRowTitle:{color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.MD,fontWeight:'600'},dashSection:{marginBottom:P.SPACING.XL},dashSectionTitle:{color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.LG,fontWeight:'700',marginBottom:P.SPACING.MD},dashSectionSubtitle:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM,marginTop:-P.SPACING.XS,marginBottom:P.SPACING.MD},categoryList:{gap:P.SPACING.SM},categoryRow:{paddingVertical:P.SPACING.SM,paddingHorizontal:P.SPACING.MD,backgroundColor:x.COLORS.BG_SURFACE,borderRadius:6,borderWidth:1,borderColor:x.COLORS.BORDER},categoryRowBody:{gap:P.SPACING.XS},categoryRowHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},categoryName:{color:x.COLORS.TEXT_SECONDARY,fontSize:E.FONT_SIZE.MD,textTransform:'capitalize'},categoryCount:{color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.MD,fontWeight:'600'},categoryPercent:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM,fontWeight:'400'},categoryBarTrack:{height:6,borderRadius:3,backgroundColor:x.COLORS.BG_MUTED,overflow:'hidden'},categoryBarFill:{height:'100%',borderRadius:3,backgroundColor:x.COLORS.ACTION_PRIMARY},emptyText:{color:x.COLORS.TEXT_CAPTION,fontSize:E.FONT_SIZE.SM,fontStyle:'italic',paddingVertical:P.SPACING.MD},pipelineCard:{padding:P.SPACING.LG,gap:P.SPACING.MD},pipelineRow:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},pipelineLabelRow:{flexDirection:'row',alignItems:'center',gap:P.SPACING.SM},statusDot:{width:8,height:8,borderRadius:4},pipelineLabel:{color:x.COLORS.TEXT_PRIMARY,fontSize:E.FONT_SIZE.MD},pipelineTime:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM},sourceHealthRow:{flexDirection:'row',justifyContent:'space-between',alignItems:'flex-start',gap:P.SPACING.MD},sourceHealthMain:{flex:1,flexDirection:'row',alignItems:'center',gap:P.SPACING.SM},sourceHealthText:{flex:1},sourceHealthMeta:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.XS,marginTop:2},sourceHealthError:{color:x.COLORS.ERROR,fontSize:E.FONT_SIZE.SM,marginTop:P.SPACING.XS},sourceHealthStatus:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM,fontWeight:'600'},sourceHealthStatusError:{color:x.COLORS.ERROR},activityRow:{flexDirection:'row',gap:P.SPACING.MD,flexWrap:'wrap'},activityItem:{flex:1,minWidth:100,backgroundColor:x.COLORS.BG_SURFACE,borderRadius:8,padding:P.SPACING.LG,alignItems:'center'},activityValue:{color:x.COLORS.ACTION_PRIMARY,fontSize:E.FONT_SIZE.DISPLAY_SM,fontWeight:'700'},activityLabel:{color:x.COLORS.TEXT_MUTED,fontSize:E.FONT_SIZE.SM,marginTop:P.SPACING.XS}})},987,[34,276,222,488,394,283,489,869,516,605,512,712,568,872,988,871,732,496,565,490,493,494,557,561,562,505,980,985,982,104]);
1088__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressMentionCard=function({mention:e,to:s,href:u}){const[O,L]=(0,t.useState)(!1),x=e.title??'Untitled',y=e.description??e.aiSummary,_=null!=e.category?R[e.category]:'Uncategorized',A=null!=e.category?N[e.category]:S.COLORS.TEXT_MUTED,M=c.pressApi.getFaviconUrl(e.id),b=''!==e.url?(0,T.readExternalUrlLinkProps)(e.url):null,p=null!=b?(0,C.jsx)(l.default,{style:I.footer,children:(0,C.jsx)(T.ExternalLink,Object.assign({},b,{style:I.sourceLink,accessibilityLabel:`Read the original article at ${e.outletName??'the source'}`,children:(0,C.jsx)(n.default,{style:I.sourceLinkText,children:"Read original \u2197"})}))}):null,j=(0,C.jsxs)(l.default,{style:I.content,children:[(0,C.jsxs)(l.default,{style:I.header,children:[O?(0,C.jsx)(l.default,{style:[I.faviconFallback,{backgroundColor:A}],children:(0,C.jsx)(n.default,{style:I.faviconInitial,children:(e.outletName??'?').charAt(0).toUpperCase()})}):(0,C.jsx)(o.default,{source:{uri:M},style:I.favicon,onError:()=>{L(!0)}}),(0,C.jsxs)(l.default,{style:I.headerText,children:[(0,C.jsx)(n.default,{style:I.outlet,numberOfLines:1,children:e.outletName??'Unknown source'}),null!=e.publishedDate&&''!==e.publishedDate&&(0,C.jsx)(n.default,{style:I.date,children:(0,f.formatDateLong)(e.publishedDate)})]}),(0,C.jsx)(l.default,{style:[I.badge,{backgroundColor:A}],children:(0,C.jsx)(n.default,{style:I.badgeText,children:_})})]}),(0,C.jsx)(n.default,{style:I.title,numberOfLines:2,children:x}),null!=y&&''!==y&&(0,C.jsx)(n.default,{style:I.description,numberOfLines:5,children:y}),e.aiKeyThemes.length>0&&(0,C.jsx)(l.default,{style:I.themes,children:e.aiKeyThemes.slice(0,3).map(e=>(0,C.jsx)(l.default,{style:I.themeTag,children:(0,C.jsx)(n.default,{style:I.themeText,children:e})},e))})]});
1088return(0,C.jsxs)(E.Card,{hoverable:!0,padding:0,style:I.card,children:[(0,C.jsx)(h.AppLink,Object.assign({to:s},null!=u&&{href:u},{accessibilityLabel:`Read: ${x}`,children:j})),p]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),s=r(d[4]),c=r(d[5]),S=r(d[6]),u=r(d[7]),O=r(d[8]),f=r(d[9]),h=r(d[10]),E=r(d[11]),T=r(d[12]),C=r(d[13]);const R={NEWS_MEDIA:'News',GOVERNMENT:'Government',ACADEMIC:'Research',COMMUNITY:'Community',ECOSYSTEM:'Ecosystem',PRODUCT_REVIEW:'Review'},N={NEWS_MEDIA:S.COLORS.BLUE,GOVERNMENT:S.COLORS.EMERALD_600,ACADEMIC:S.COLORS.INFO,COMMUNITY:S.COLORS.WARNING,ECOSYSTEM:S.COLORS.VIOLET_DARK,PRODUCT_REVIEW:S.COLORS.ERROR};const I=(0,s.createStyles)({card:{marginBottom:u.SPACING.LG},content:{padding:u.SPACING.LG},header:{flexDirection:'row',alignItems:'center',marginBottom:u.SPACING.MD},favicon:{width:24,height:24,borderRadius:4},faviconFallback:{width:24,height:24,borderRadius:4,alignItems:'center',justifyContent:'center'},faviconInitial:{color:S.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.XS,fontWeight:'700'},headerText:{flex:1,marginLeft:u.SPACING.SM},outlet:{color:S.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM,fontWeight:'500'},date:{color:S.COLORS.TEXT_CAPTION,fontSize:O.FONT_SIZE.XS},badge:{borderRadius:12,paddingHorizontal:u.SPACING.SM,paddingVertical:u.SPACING.XS},badgeText:{color:S.COLORS.TEXT_INVERSE,fontSize:O.FONT_SIZE.XS,fontWeight:'600'},title:{color:S.COLORS.TEXT_PRIMARY,fontSize:O.FONT_SIZE.LG,fontWeight:'600',marginBottom:u.SPACING.SM},description:{color:S.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,lineHeight:22,marginBottom:u.SPACING.SM},themes:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.XS},themeTag:{backgroundColor:S.COLORS.BG_SUBTLE_100,borderRadius:8,paddingHorizontal:u.SPACING.SM,paddingVertical:u.SPACING.XS},themeText:{color:S.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.XS},footer:{borderTopColor:S.COLORS.BORDER_NEUTRAL,borderTopWidth:1,paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.MD},sourceLink:{alignSelf:'flex-start'},sourceLinkText:{color:S.COLORS.BRAND_PRIMARY,fontSize:O.FONT_SIZE.SM,fontWeight:'600'}})},988,[34,276,222,328,489,989,490,493,494,685,516,605,519,104]);
1089__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"pressApi",{enumerable:!0,get:function(){return n}});var t=r(d[0]),s=r(d[1]);const n={listMentions:async t=>s.press.listMentions({query:Object.assign({},null!=t?.category&&''!==t.category?{category:t.category}:{},null!=t?.page?{page:t.page}:{},null!=t?.search&&''!==t.search?{search:t.search}:{},null!=t?.size?{size:t.size}:{},null!=t?.year?{year:t.year}:{})}),async getMention(n){try{return await s.press.getMention({path:{id:n}})}catch(s){if((0,t.isAxios404)(s))return null;throw s}},getStats:async()=>s.press.getStats(),getFeatured:async(t=6)=>s.press.getFeatured({query:{limit:t}}),getInsights:async t=>s.press.getInsights({query:Object.assign({},null!=t?.limit?{limit:t.limit}:{},null!=t?.type?{type:t.type}:{})}),getFaviconUrl:t=>`/api/v1/proxy/favicon/${t}`,getOgImageUrl:t=>`/api/v1/proxy/og-image/${t}`}},989,[464,471]);
1090__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PressDiscoveryDetailScreen=function(){const{id:S}=(0,D.usePressDiscoveryDetailParams)(),v=(0,f.useSeoMeta)('PressDiscoveryDetail'),[p,A]=(0,s.useState)(0),{data:L,loading:M,error:b,retry:h}=(0,P.useAsyncData)(()=>n.pressApi.getMention(S),[S,p],'Failed to load press mention.'),{isDevTriggered:C,surface:_}=(0,y.useErrorSurface)(x.mentionLoad),E=b??(C?'Failed to load press mention.':null),k=(0,s.useCallback)(()=>{A(s=>s+1)},[]);if(M)return(0,j.jsx)(t.AsyncPageLayout,{status:"loading",children:(0,j.jsx)(o.LoadingState,{})});if(null!=E||null==L)return(0,j.jsx)(t.AsyncPageLayout,{status:"error",children:(0,j.jsx)(o.ErrorState,{message:E??'Mention not found.',surface:_,onRetry:h})});return(0,j.jsxs)(t.AsyncPageLayout,{status:"ready",children:[(0,j.jsx)(c.WebMeta,Object.assign({},v)),(0,j.jsx)(l.PressInlineAdminControls,{mention:L,onChanged:k}),(0,j.jsx)(u.PressMentionDetailContent,{mention:L})]})};var s=r(d[0]),n=r(d[1]),t=r(d[2]),o=r(d[3]),l=r(d[4]),u=r(d[5]),c=r(d[6]),y=r(d[7]),P=r(d[8]),f=r(d[9]),D=r(d[10]),j=r(d[11]);const x=(0,y.defineScreenErrorSurfaces)('PressDiscoveryDetail',{mentionLoad:{id:'mention-load',kind:'page',label:'Press mention detail load error'}})},990,[34,989,567,512,748,979,565,557,561,562,505,104]);
1091__d(function(g,r,i,a,m,_e,d){"use strict";
1091function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressDiscoveryScreen=function(){const e=(0,R.useCurrentRouteSeoMeta)(),[o,A]=(0,t.useState)(null),[b,_]=(0,t.useState)(null),[M,X]=(0,t.useState)(''),[v,F]=(0,t.useState)(0),G=(0,L.useAsyncData)(()=>c.pressApi.getStats(),[],'Failed to load press statistics.'),z=(0,L.useAsyncData)(()=>c.pressApi.getFeatured(6),[],'Failed to load featured mentions.'),B=(0,L.useAsyncData)(()=>c.pressApi.getInsights({limit:3}),[],'Failed to load insights.'),w=(0,L.useAsyncData)(()=>{const e={page:v,size:O};return null!=o&&(e.category=o),null!=b&&(e.year=b),''!==M&&(e.search=M),c.pressApi.listMentions(e)},[o,b,M,v],'Failed to load press mentions.'),{isDevTriggered:Y,surface:k}=(0,I.useErrorSurface)(D.mentionsLoad),W=w.error??(Y?'Failed to load press mentions.':null),Z=(0,t.useCallback)(e=>{A(e),F(0)},[]),H=(0,t.useCallback)(e=>{_(e),F(0)},[]),U=(0,t.useCallback)(e=>{X(e),F(0)},[]),V=G.data,$=z.data??[],q=B.data??[],K=w.data;return(0,T.jsxs)(f.PageLayout,{children:[(0,T.jsx)(x.WebMeta,Object.assign({},e)),(0,T.jsx)(S.HeroSection,{backgroundColor:P.COLORS.BRAND_PRIMARY_DARK,background:{imageUrl:N,imagePosition:'center'},title:"PurpleAir in the Press",subtitle:"Coverage across news, research, government, and community projects.",label:"PRESS COVERAGE",centered:!0}),(0,T.jsxs)(s.default,{style:E.pageContent,children:[null!=V&&(0,T.jsxs)(s.default,{style:E.statsRow,children:[(0,T.jsxs)(s.default,{style:E.statItem,children:[(0,T.jsx)(n.default,{style:E.statNumber,children:V.totalCount}),(0,T.jsx)(n.default,{style:E.statLabel,children:"Total Mentions"})]}),Object.entries(V.countByCategory).slice(0,4).map(([e,t])=>(0,T.jsxs)(s.default,{style:E.statItem,children:[(0,T.jsx)(n.default,{style:E.statNumber,children:t}),(0,T.jsx)(n.default,{style:E.statLabel,children:e.replace('_',' ')})]},e))]}),$.length>0&&(0,T.jsxs)(s.default,{style:E.section,children:[(0,T.jsx)(n.default,{style:E.sectionTitle,children:"Featured"}),(0,T.jsx)(l.default,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:E.featuredScroll,children:$.map(e=>(0,T.jsx)(y.PressFeaturedCard,{mention:e,to:"PressDiscoveryDetail",href:`/press-v2/${e.id}`},e.id))})]}),q.length>0&&(0,T.jsxs)(s.default,{style:E.section,children:[(0,T.jsx)(n.default,{style:E.sectionTitle,children:"Trending Insights"}),q.map(e=>(0,T.jsx)(C.PressInsightCard,{insight:e},e.id))]}),(0,T.jsxs)(s.default,{style:E.section,children:[(0,T.jsx)(n.default,{style:E.sectionTitle,children:"All Coverage"}),(0,T.jsx)(p.PressFilterBar,{selectedCategory:o,onCategoryChange:Z,selectedYear:b,onYearChange:H,availableYears:V?.availableYears??[],searchQuery:M,onSearchChange:U})]}),w.loading&&(0,T.jsx)(u.LoadingState,{}),null!=W&&(0,T.jsx)(u.ErrorState,{message:W,surface:k,onRetry:w.retry}),!w.loading&&null==W&&null!=K&&(0,T.jsxs)(T.Fragment,{children:[0===K.content.length?(0,T.jsx)(u.EmptyState,{message:"No press mentions found matching your filters."}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(n.default,{style:E.resultCount,children:[K.totalElements," ",1===K.totalElements?'mention':'mentions']}),(0,T.jsx)(s.default,{style:E.mentionList,children:K.content.map(e=>(0,T.jsx)(j.PressMentionCard,{mention:e,to:"PressDiscoveryDetail",href:`/press-v2/${e.id}`},e.id))})]}),K.totalPages>1&&(0,T.jsx)(h.Pagination,{page:v,totalPages:K.totalPages,onPageChange:F,itemLabel:"mentions"})]})]})]})};var t=r(d[0]),s=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3]));r(d[4]);var o=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),S=r(d[9]),f=r(d[10]),y=r(d[11]),p=r(d[12]),C=r(d[13]),j=r(d[14]),x=r(d[15]),P=r(d[16]),A=r(d[17]),b=r(d[18]),I=r(d[19]),L=r(d[20]),R=r(d[21]),T=r(d[22]);const N='https://images.unsplash.com/photo-1764195287345-2086f504cb0b?w=1920&q=80',O=20,D=(0,I.defineScreenErrorSurfaces)('PressDiscovery',{mentionsLoad:{id:'mentions-load',kind:'page',label:'Press mentions load error'}});const E=(0,o.createStyles)({pageContent:Object.assign({padding:A.SPACING.XL},{maxWidth:1200,marginHorizontal:'auto',width:'100%'}),statsRow:{flexDirection:'row',flexWrap:'wrap',justifyContent:'center',gap:A.SPACING.XL,marginBottom:A.SPACING.XXXL,paddingVertical:A.SPACING.LG},statItem:{alignItems:'center'},statNumber:{color:P.COLORS.BRAND_PRIMARY,fontSize:b.FONT_SIZE.XXXL,fontWeight:'700'},statLabel:{color:P.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.SM,textTransform:'capitalize'},section:{marginBottom:A.SPACING.XXXL},sectionTitle:{color:P.COLORS.TEXT_PRIMARY,fontSize:b.FONT_SIZE.XXL,fontWeight:'700',marginBottom:A.SPACING.LG},featuredScroll:{paddingBottom:A.SPACING.SM},resultCount:{color:P.COLORS.TEXT_MUTED,fontSize:b.FONT_SIZE.MD,marginBottom:A.SPACING.LG},mentionList:{gap:A.SPACING.SM}})},991,[34,276,222,283,95,489,989,512,712,674,568,992,993,994,988,565,490,493,494,557,561,562,104]);
1092__d(function(g,r,i,a,m,_e,d){"use strict";
1092function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressFeaturedCard=function({mention:e,to:l,href:c}){const[S,f]=(0,t.useState)(!1),L=e.title??'Untitled',R=e.description??e.aiSummary,_=u.pressApi.getOgImageUrl(e.id),C=''!==e.ogImageUrl&&!S,N=(0,b.jsxs)(b.Fragment,{children:[C&&(0,b.jsx)(s.default,{source:{uri:_},style:I.image,resizeMode:"cover",onError:()=>{f(!0)}}),(0,b.jsxs)(n.default,{style:I.content,children:[(0,b.jsx)(o.default,{style:I.source,numberOfLines:1,children:e.outletName??'Unknown source'}),(0,b.jsx)(o.default,{style:I.title,numberOfLines:2,children:L}),null!=R&&''!==R&&(0,b.jsx)(o.default,{style:I.description,numberOfLines:2,children:R}),null!=e.publishedDate&&''!==e.publishedDate&&(0,b.jsx)(o.default,{style:I.date,children:(0,h.formatDateLong)(e.publishedDate)})]})]});return(0,b.jsx)(p.Card,{hoverable:!0,padding:0,style:I.card,children:(0,b.jsx)(O.AppLink,Object.assign({to:l},null!=c&&{href:c},{accessibilityLabel:`Featured: ${L}`,children:N}))})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),s=e(r(d[3]));r(d[4]);var l=r(d[5]),u=r(d[6]),c=r(d[7]),S=r(d[8]),f=r(d[9]),h=r(d[10]),O=r(d[11]),p=r(d[12]),b=r(d[13]);const I=(0,l.createStyles)({card:Object.assign({width:320,marginRight:S.SPACING.LG},{flexShrink:0}),image:{width:'100%',height:180,borderTopLeftRadius:12,borderTopRightRadius:12},content:{padding:S.SPACING.LG},source:{color:c.COLORS.BRAND_PRIMARY,fontSize:f.FONT_SIZE.SM,fontWeight:'600',marginBottom:S.SPACING.XS},title:{color:c.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.LG,fontWeight:'700',marginBottom:S.SPACING.SM},description:{color:c.COLORS.TEXT_SECONDARY,fontSize:f.FONT_SIZE.MD,lineHeight:20,marginBottom:S.SPACING.SM},date:{color:c.COLORS.TEXT_CAPTION,fontSize:f.FONT_SIZE.XS}})},992,[34,276,222,328,95,489,989,490,493,494,685,516,605,104]);
1093__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressFilterBar=function({selectedCategory:e,onCategoryChange:s,selectedYear:S,onYearChange:h,availableYears:C,searchQuery:T,onSearchChange:A}){return(0,u.jsxs)(t.default,{style:p.container,children:[(0,u.jsxs)(t.default,{style:p.categories,children:[(0,u.jsx)(c.default,{style:[p.chip,!e&&p.chipActive],onPress:()=>{s(null)},accessibilityLabel:"All categories",accessibilityRole:"button",children:(0,u.jsx)(l.default,{style:[p.chipText,!e&&p.chipTextActive],children:"All"})}),y.map(({key:t,label:o})=>(0,u.jsx)(c.default,{style:[p.chip,e===t&&p.chipActive],onPress:()=>{s(e===t?null:t)},accessibilityLabel:`Filter by ${o}`,accessibilityRole:"button",children:(0,u.jsx)(l.default,{style:[p.chipText,e===t&&p.chipTextActive],children:o})},t))]}),(0,u.jsxs)(t.default,{style:p.secondRow,children:[C.length>0&&(0,u.jsxs)(t.default,{style:p.years,children:[(0,u.jsx)(c.default,{style:[p.yearChip,null==S&&p.yearChipActive],onPress:()=>{h(null)},accessibilityLabel:"All years",accessibilityRole:"button",children:(0,u.jsx)(l.default,{style:[p.yearText,null==S&&p.yearTextActive],children:"All Years"})}),C.slice(0,6).map(e=>(0,u.jsx)(c.default,{style:[p.yearChip,S===e&&p.yearChipActive],onPress:()=>{h(S===e?null:e)},accessibilityLabel:`Filter by ${e}`,accessibilityRole:"button",children:(0,u.jsx)(l.default,{style:[p.yearText,S===e&&p.yearTextActive],children:e})},e))]}),(0,u.jsx)(o.default,{style:p.searchInput,placeholder:"Search mentions...",placeholderTextColor:n.COLORS.TEXT_CAPTION,value:T,onChangeText:A,accessibilityLabel:"Search press mentions"})]})]})},r(d[0]);var t=e(r(d[1])),l=e(r(d[2])),c=e(r(d[3])),o=e(r(d[4]));r(d[5]);var s=r(d[6]),n=r(d[7]),S=r(d[8]),h=r(d[9]),C=r(d[10]),u=r(d[11]);const y=C.PRESS_CATEGORY_OPTIONS;const p=(0,s.createStyles)({container:{marginBottom:S.SPACING.XL},categories:{flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM,marginBottom:S.SPACING.MD},chip:{backgroundColor:n.COLORS.BG_SUBTLE_100,borderRadius:20,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},chipActive:{backgroundColor:n.COLORS.ACTION_PRIMARY},chipText:{color:n.COLORS.TEXT_SECONDARY,fontSize:h.FONT_SIZE.SM,fontWeight:'500'},chipTextActive:{color:n.COLORS.TEXT_INVERSE},secondRow:{flexDirection:'row',flexWrap:'wrap',alignItems:'center',gap:S.SPACING.MD},years:{flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.XS,flex:1},yearChip:{backgroundColor:n.COLORS.BG_SUBTLE,borderRadius:16,paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.XS},yearChipActive:{backgroundColor:n.COLORS.ACTION_PRIMARY},yearText:{color:n.COLORS.TEXT_MUTED,fontSize:h.FONT_SIZE.XS,fontWeight:'500'},yearTextActive:{color:n.COLORS.TEXT_INVERSE},searchInput:Object.assign({backgroundColor:n.COLORS.BG_SURFACE,borderColor:n.COLORS.BORDER_NEUTRAL,borderRadius:8,borderWidth:1,color:n.COLORS.TEXT_PRIMARY,fontSize:h.FONT_SIZE.MD,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},{minWidth:200,maxWidth:300})})},993,[34,276,222,488,394,95,489,490,493,494,872,104]);
1094__d(function(g,r,i,a,m,_e,d){"use strict";
1094function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.PressInsightCard=function({insight:e}){const l=E[e.insightType]??'Insight';return(0,T.jsxs)(c.Card,{hoverable:!0,style:C.card,children:[(0,T.jsx)(t.default,{style:C.labelRow,children:(0,T.jsx)(t.default,{style:C.labelBadge,children:(0,T.jsx)(o.default,{style:C.labelText,children:l})})}),(0,T.jsx)(o.default,{style:C.title,children:e.title}),(0,T.jsx)(o.default,{style:C.body,children:e.body}),null!=e.periodStart&&''!==e.periodStart&&null!=e.periodEnd&&''!==e.periodEnd&&(0,T.jsxs)(o.default,{style:C.period,children:[e.periodStart," - ",e.periodEnd]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),l=r(d[3]),n=r(d[4]),S=r(d[5]),s=r(d[6]),c=r(d[7]),T=r(d[8]);const E={THEMATIC_CLUSTER:'Trending',TREND:'Trend',CROSS_REFERENCE:'Connection',GEOGRAPHIC_PATTERN:'Geographic'};const C=(0,l.createStyles)({card:{marginBottom:S.SPACING.MD},labelRow:{flexDirection:'row',marginBottom:S.SPACING.SM},labelBadge:{backgroundColor:n.COLORS.BRAND_PRIMARY,borderRadius:8,paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.XS},labelText:{color:n.COLORS.TEXT_INVERSE,fontSize:s.FONT_SIZE.XS,fontWeight:'700',textTransform:'uppercase'},title:{color:n.COLORS.TEXT_PRIMARY,fontSize:s.FONT_SIZE.LG,fontWeight:'600',marginBottom:S.SPACING.XS},body:{color:n.COLORS.TEXT_SECONDARY,fontSize:s.FONT_SIZE.MD,lineHeight:22},period:{color:n.COLORS.TEXT_CAPTION,fontSize:s.FONT_SIZE.XS,marginTop:S.SPACING.SM}})},994,[34,276,222,489,490,493,494,605,104]);
1095__d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"PRESS_CATEGORIES",{enumerable:!0,get:function(){return C}}),_e.PressScreen=function(){const e=(0,b.useSeoMeta)('Press'),[l,u]=(0,t.useState)(null),[f,A]=(0,t.useState)(new Set),P=(0,t.useMemo)(()=>null===l?N:N.filter(e=>e.category===l),[l]),C=(0,t.useMemo)(()=>E(P),[P]),x=(0,t.useMemo)(()=>{const e=new Map;for(const t of P){const o=q(t.publishedDate);e.set(o,(e.get(o)??0)+1)}return e},[P]),S=(0,t.useMemo)(()=>0===f.size?N:N.filter(e=>f.has(q(e.publishedDate))),[f]),k=(0,t.useMemo)(()=>I(S),[S]),L=(0,t.useMemo)(()=>{const e=null===l?[...S]:S.filter(e=>e.category===l);return e.sort((e,t)=>{const o=!e.publishedDate,a=!t.publishedDate;if(o&&a)return e.title.localeCompare(t.title,void 0,{sensitivity:'base'});if(o)return 1;if(a)return-1;const n=t.publishedDate.localeCompare(e.publishedDate);return 0!==n?n:e.title.localeCompare(t.title,void 0,{sensitivity:'base'})}),e},[S,l]),O=e=>{A(t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o})};return(0,v.jsxs)(h.PageLayout,{children:[(0,v.jsx)(y.WebMeta,Object.assign({},e)),(0,v.jsxs)(s.default,{style:j.container,children:[(0,v.jsx)(p.HeroSection,{backgroundColor:w.COLORS.BRAND_PRIMARY,background:{imageUrl:M,imagePosition:'center 40%'},minHeight:280,label:"IN THE NEWS",title:"Press & Media",subtitle:"PurpleAir in the news and partner features.",centered:!1}),(0,v.jsxs)(o.default,{style:j.mainRow,children:[(0,v.jsxs)(o.default,{style:j.yearSidebar,children:[(0,v.jsx)(a.default,{style:j.yearSidebarTitle,children:"Year"}),(0,v.jsx)(n.default,{onPress:()=>{A(new Set)},style:[j.yearChip,0===f.size&&j.yearChipActive],accessibilityRole:"button",accessibilityState:{selected:0===f.size},accessibilityLabel:0===f.size?'All years selected':'Show all years',children:(0,v.jsxs)(a.default,{style:[j.yearChipText,0===f.size&&j.yearChipTextActive],children:["All ",(0,v.jsxs)(a.default,{style:[j.yearChipCount,0===f.size&&j.yearChipTextActive],children:["(",P.length,")"]})]})}),C.map(e=>{const t=f.has(e),o=x.get(e)??0;return(0,v.jsx)(n.default,{onPress:()=>{O(e)},style:[j.yearChip,t&&j.yearChipActive],accessibilityRole:"button",accessibilityState:{selected:t},accessibilityLabel:t?`Filter by ${e}, ${o} articles, tap to deselect`:`Filter by ${e}, ${o} articles`,children:(0,v.jsxs)(a.default,{style:[j.yearChipText,t&&j.yearChipTextActive],children:[e," ",(0,v.jsxs)(a.default,{style:[j.yearChipCount,t&&j.yearChipTextActive],children:["(",o,")"]})]})},e)})]}),(0,v.jsxs)(o.default,{style:j.section,children:[(0,v.jsx)(a.default,{style:j.intro,children:"News coverage, research, and program highlights from media outlets, government agencies, universities, and community organizations around the world that feature PurpleAir."}),(0,v.jsxs)(s.default,{horizontal:!0,showsHorizontalScrollIndicator:!1,contentContainerStyle:j.badgeRow,style:j.badgeScroll,children:[(0,v.jsx)(n.default,{onPress:()=>{u(null)},style:[j.badge,null===l&&j.badgeActive],accessibilityRole:"button",accessibilityState:{selected:null===l},accessibilityLabel:"Show all categories",children:(0,v.jsx)(a.default,{style:[j.badgeText,null===l&&j.badgeTextActive],children:"All"})}),R.map(e=>{const t=k.get(e)?.length??0,o=l===e;return(0,v.jsx)(n.default,{onPress:()=>{u(o?null:e)},style:[j.badge,o&&j.badgeActive],accessibilityRole:"button",accessibilityState:{selected:o},accessibilityLabel:`Filter by ${e}, ${t} articles`,children:(0,v.jsx)(a.default,{style:[j.badgeText,o&&j.badgeTextActive],children:e})},e)})]}),(0,v.jsxs)(a.default,{style:j.articleCount,children:[L.length," ",1===L.length?'article':'articles']}),(0,v.jsx)(o.default,{style:j.entriesList,children:L.map(e=>(0,v.jsxs)(c.ExternalLink,{style:j.entryCard,href:e.url,accessibilityLabel:`${e.title} \u2013 ${e.outlet}`,children:[(0,v.jsx)(o.default,{style:j.entryCardTop,children:(0,v.jsxs)(o.default,{style:j.entryHeader,children:[(0,v.jsx)(D,{outlet:e.outlet,url:e.url,category:e.category}),(0,v.jsxs)(o.default,{style:j.entryHeaderText,children:[(0,v.jsxs)(o.default,{style:j.entryDateAndTagRow,children:[(0,v.jsx)(a.default,{style:j.entryYear,children:T(e.publishedDate)}),(0,v.jsx)(o.default,{style:j.entryTag,children:(0,v.jsx)(a.default,{style:j.entryTagText,children:e.category})})]}),(0,v.jsx)(a.default,{style:j.entryTitle,children:e.title}),(0,v.jsx)(a.default,{style:j.entryOutlet,children:e.outlet})]})]})}),(0,v.jsx)(a.default,{style:j.entryExcerpt,children:e.excerpt}),(0,v.jsx)(a.default,{style:j.entryLink,children:"Read more"})]},e.url))})]})]})]})]})};var t=r(d[0]),o=e(r(d[1])),a=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),l=e(r(d[5])),u=r(d[6]),c=r(d[7]),p=r(d[8]),h=r(d[9]),y=r(d[10]),w=r(
1095d[11]),f=r(d[12]),A=r(d[13]),b=r(d[14]),P=r(d[15]),v=r(d[16]);const M='https://images.unsplash.com/photo-1764195287345-2086f504cb0b?w=1920&q=80',C=['Major Media','Government & Agencies','Research & Academic','Community & Advocacy','Product Reviews'],x=[['Major Media',w.COLORS.BLUE],['Government & Agencies',w.COLORS.EMERALD_600],['Research & Academic',w.COLORS.INFO],['Community & Advocacy',w.COLORS.WARNING],['Product Reviews',w.COLORS.ERROR]],S=new Map(x);function k(e){try{return new URL(e).hostname.replace(/^www\./,'')}catch{return''}}function D({outlet:e,url:n,category:s}){const[u,c]=(0,t.useState)(!1),p=k(n),h=p?`https://www.google.com/s2/favicons?domain=${p}&sz=128`:'',y=S.get(s)??w.COLORS.BRAND_PRIMARY,f=e.charAt(0).toUpperCase();return!h||u?(0,v.jsx)(o.default,{style:[j.outletLogoFallback,{backgroundColor:y}],children:(0,v.jsx)(a.default,{style:j.outletLogoInitial,children:f})}):(0,v.jsx)(o.default,{style:j.outletLogoContainer,children:(0,v.jsx)(l.default,{source:{uri:h},style:j.outletLogoImage,resizeMode:"contain",onError:()=>{c(!0)},accessibilityLabel:`${e} logo`})})}function q(e){if(!e)return 0;const t=parseInt(e.slice(0,4),10);return Number.isNaN(t)?0:t}function T(e){const t=(0,P.formatDateLong)(e);return t===e?e.slice(0,4):t}const R=['Major Media','Government & Agencies','Research & Academic','Community & Advocacy','Product Reviews'],N=[{outlet:'San Francisco Chronicle',title:"Here's where PurpleAir shows Bay Area air quality is poorest \u2014 and when it will improve",url:'https://www.sfchronicle.com/weather/article/where-air-quality-is-worst-according-to-purpleair-18575046.php',publishedDate:'2023-12-26',category:'Major Media',excerpt:'PurpleAir data shows which Bay Area neighborhoods have the worst air quality and when conditions are expected to improve.'},{outlet:'San Francisco Chronicle',title:'Smell smoke? How to track Bay Area air quality using PurpleAir, other tools',url:'https://www.sfchronicle.com/california-wildfires/article/bay-area-air-quality-smoke-how-to-monitor-18376653.php',publishedDate:'2023-01-01',category:'Major Media',excerpt:'How to monitor Bay Area air quality during wildfires using PurpleAir and other tools; data updates about every 10 minutes.'},{outlet:'The New York Times',title:"I Live in California. How Do I Know It's Safe to Go Outside?",url:'https://www.nytimes.com/2020/09/04/opinion/california-wildfires-air-quality.html',publishedDate:'2020-09-04',category:'Major Media',excerpt:'PurpleAir\u2019s community-driven sensor network helps residents check real-time air quality during wildfire season; used by EPA and researchers.'},{outlet:'NPR',title:'3 lessons from the Western U.S. for dealing with wildfire smoke',url:'https://www.npr.org/2023/06/09/1181179929/wildfire-smoke-health-western-tips',publishedDate:'2023-06-09',category:'Major Media',excerpt:'Research using PurpleAir data found indoor air pollution tripled during California wildfires; air purifiers and closed windows helped.'},{outlet:'Fast Company',title:'How this small sensor startup became essential to helping California deal with toxic wildfire smoke',url:'https://www.fastcompany.com/90543956/how-this-small-sensor-startup-became-essential-to-helping-california-deal-with-toxic-wildfire-smoke',publishedDate:'2020-08-27',category:'Major Media',excerpt:'Profile of PurpleAir and founder Adrian Dybwad; Utah startup\u2019s crowdsourced sensors became critical during West Coast wildfires.'},{outlet:'NBC News',title:'High-tech California relies on a startup in Utah to see how smoky its air is',url:'https://www.nbcnews.com/tech/tech-news/high-tech-california-relies-startup-utah-see-how-smoky-its-n1074906',publishedDate:'2019-10-31',category:'Major Media',excerpt:'PurpleAir became the talk of the nation\u2019s tech capital during wildfire season; 600,000 visitors to the map in a single day.'},{outlet:'CNBC',title:"The West Coast is suffering from some of the worst air in the world \u2014 these apps show how bad it is",url:'https://www.cnbc.com/2020/09/12/air-quality-apps-purpleair-airnow-iqair-essential-in-western-us.html',publishedDate:'2020-09-12',category:'Major Media',excerpt:'PurpleAir, AirNow, and IQAir identified as essential tools for tracking air quality during Western wildfires.'},{outlet:'ABC7 San Francisco',title:'Crowdsourced air monitoring data showing alarming numbers',url:'https://abc7ne
1095ws.com/purple-air-crowdsource-crowdsourcing-what-is/4704961/',publishedDate:'2018-11-18',category:'Major Media',excerpt:'PurpleAir\u2019s crowdsourced sensors show real-time numbers; about 600 sensors in the Bay Area at time of report.'},{outlet:'Wired',title:'The Bay Area Just Turned Orange. All Eyes Are on PurpleAir',url:'https://www.wired.com/story/bay-area-just-turned-orange-all-eyes-on-purpleair/',publishedDate:'2020-09-09',category:'Major Media',excerpt:'When the sky turned orange, PurpleAir\u2019s hyperlocal data became a go-to source even for the Bay Area Air Quality Management District.'},{outlet:'Wired',title:'Cheap, Portable Sensors Are Democratizing Air-Quality Data',url:'https://www.wired.com/story/cheap-portable-sensors-are-democratizing-air-quality-data/',publishedDate:'2018-07-11',category:'Major Media',excerpt:'Low-cost sensors like PurpleAir are putting air quality monitoring in the hands of communities and residents.'},{outlet:'The Verge',title:'Google Maps now helps you find fresh air',url:'https://www.theverge.com/2022/6/9/23160948/google-maps-air-pollution-purpleair-wildfire-smoke-smog',publishedDate:'2022-06-09',category:'Major Media',excerpt:'Google Maps integrated PurpleAir\u2019s sensor network into its Air Quality layer alongside EPA data.'},{outlet:'Bay Area Telegraph',title:'Why Is the Air Quality in the Bay Area So Terrible Right Now?',url:'https://bayareatelegraph.com/2026/01/27/why-is-the-air-quality-in-the-bay-area-so-terrible-right-now/',publishedDate:'2026-01-27',category:'Major Media',excerpt:'Uses PurpleAir and other data to explain Bay Area air quality conditions and real-time monitoring.'},{outlet:'Inside Climate News',title:"Millions Left in Air Pollution 'Blind Spots' Despite Stricter EPA Standards",url:'https://insideclimatenews.org/news/18012025/federal-air-pollution-blind-spots/',publishedDate:'2025-01-18',category:'Major Media',excerpt:'UC Berkeley study finds 20M+ Americans in air quality blind spots; Lancaster, PA couple relies on PurpleAir when nearest EPA sensor is 10 miles away.'},{outlet:'Inside Climate News',title:'Mapping Unequal Climate Risks in a Northern California County',url:'https://insideclimatenews.org/news/05022026/northern-california-air-pollution-sensors-climate-risks/',publishedDate:'2026-02-05',category:'Major Media',excerpt:'PSE Healthy Energy and UC Berkeley deployed 50 low-cost PM2.5 sensors in Contra Costa County near oil refineries; 68% of air quality violations from oil and gas operations.'},{outlet:'Daily Breeze',title:'Jolted by the Eaton fire, JPL/Caltech employees turn attention to Earth in new air testing',url:'https://www.dailybreeze.com/2025/03/20/new-air-pollution-monitors-are-placed-on-roofs-and-buildings-in-altadena/',publishedDate:'2025-03-20',category:'Major Media',excerpt:'Eaton fire destroyed nearly all PurpleAir monitors in Altadena; Caltech PHOENIX project installed 25 new sites to fill the blank spot on AirNow and PurpleAir map.'},{outlet:'Wildsight',title:"Something\u2019s in the air in Golden and it\u2019s not just snow",url:'https://wildsight.ca/2026/03/04/somethings-in-the-air-in-golden-and-its-not-just-snow/',publishedDate:'2026-03-04',category:'Community & Advocacy',excerpt:'Seven PurpleAir monitors around Golden, B.C. show PM2.5 heat maps; data shows unhealthy levels during afternoon and evening, especially for children.'},{outlet:'The Worcester Guardian',title:'City looking into installing 5 air quality sensors',url:'https://theworcesterguardian.org/f/city-looking-into-installing-5-air-quality-sensors',publishedDate:'2026-03-02',category:'Community & Advocacy',excerpt:'Worcester exploring installation of five air quality sensors for community monitoring.'},{outlet:'The Temple News',title:'City launches "Breathe Philly" air quality monitoring network',url:'https://temple-news.com/city-launches-breathe-philly-air-quality-monitoring-network/',publishedDate:'2026-03-10',category:'Community & Advocacy',excerpt:'Clean Air Council installed 60 PurpleAir monitors across greater Philadelphia in EPA-backed initiative; Temple uses PurpleAir on campus; city adds 76 Clarity sensors in Breathe Philly network.'}
1095,{outlet:'WRTV',title:'Marion County health officials looking to monitor air pollution with new live data technology',url:'https://www.wrtv.com/news/local-news/marion-county-health-officials-looking-to-monitor-air-pollution-with-new-live-data-technology',publishedDate:'2026-02-26',category:'Community & Advocacy',excerpt:'Marion County Health Department deploying up to ten PurpleAir monitors across Indianapolis, with five on the west side; real-time data for residents.'},{outlet:'Environment America',title:'Why is air pollution spiking in Pittsburgh for weeks this winter?',url:'https://environmentamerica.org/pennsylvania/center/articles/why-is-air-pollution-spiking-in-pittsburgh-for-weeks-this-winter/',publishedDate:'2026-02-11',category:'Community & Advocacy',excerpt:'PennEnvironment on Allegheny County pollution spikes; PurpleAir map and ACHD data show high PM2.5 and hydrogen sulfide in the Mon Valley.'},{outlet:'Air Purifier First',title:'PurpleAir PA-I-Indoor Review: Accuracy Vs Usability',url:'https://www.airpurifierfirst.com/review/purpleair-pa-i-indoor/',publishedDate:'2026-02-11',category:'Product Reviews',excerpt:'Review of the PurpleAir PA-I-Indoor: Plantower PMS1003 sensor, PM2.5 accuracy and trend tracking, LED-only display; data via PurpleAir map and API. Recommends PurpleAir Touch for most users.'},{outlet:'CleanAir Community',title:"I Tested the PurpleAir Pixel. Here's the Good and the Bad",url:'https://cleanair.community/t/i-tested-the-purpleair-pixel-here-s-the-good-and-the-bad/953',publishedDate:'2025-11-15',category:'Product Reviews',excerpt:'Hands-on review of the PurpleAir Pixel; compact PM2.5 monitoring, comparison to traditional optical sensors and newer options like Bosch PM sensors.'},{outlet:'Citizen Portal',title:'Resident researcher finds high nighttime noise, elevated particulates on Melrose Drive; council hears recommendations',url:'https://citizenportal.ai/articles/6384992/california/san-diego-county/vista/Vista/San-Diego-County/California/Resident-researcher-finds-high-nighttime-noise-elevated-particulates-on-Melrose-Drive-council-hears-recommendations',publishedDate:'2025-01-15',category:'Community & Advocacy',excerpt:'Vista, CA: MPH student presented yearlong PurpleAir study on South Melrose Drive; PM and noise exceeded WHO guidelines; council discussed monitoring and traffic policy.'},{outlet:'Hopkinton Independent',title:'Hopkinton Today for Wednesday, Aug. 6: Town issues air quality alert',url:'https://hopkintonindependent.com/hopkinton-today-for-wednesday-aug-6-town-issues-air-quality-alert/',publishedDate:'2025-08-06',category:'Community & Advocacy',excerpt:'Hopkinton, MA Health Department uses PurpleAir and town monitors (MassDEP grant) to track Canadian wildfire smoke; advised residents on unhealthy AQI and limiting outdoor exposure.'},{outlet:'WISH-TV',title:'West Indianapolis to get air quality monitors',url:'https://www.wishtv.com/news/local-news/west-indianapolis-air-monitors/',publishedDate:'2026-02-18',category:'Community & Advocacy',excerpt:'Marion County Health Department installing five PurpleAir Flex monitors in West Indianapolis to track particulate matter.'},{outlet:'WFYI',title:'Health department to track air pollution in West Indianapolis',url:'https://www.wfyi.org/news/articles/health-department-to-track-air-pollution-in-west-indianapolis',publishedDate:'2026-02-19',category:'Community & Advocacy',excerpt:'Marion County pilot installing five PurpleAir monitors in West Indianapolis; data on PurpleAir map; CDC grant for ten PurpleAir Flex units.'},{outlet:'Mirror Indy',title:'Health department tracks West Indianapolis air pollution',url:'https://mirrorindy.org/indianapolis-marion-county-west-side-air-pilot-project/',publishedDate:'2026-02-17',category:'Community & Advocacy',excerpt:'Pilot project deploys PurpleAir monitors in areas with elevated lung cancer and lung disease rates.'},{outlet:'San Francisco Chronicle',title:"Air quality poor again Wednesday in S.F. Bay Area. Here's when it will improve",url:'https://www.sfchronicle.com/weather/article/air-quality-pollution-19971464.php',publishedDate:'2024-12-11',category:'Major Media',excerpt:'Bay Area unhealthy air from inversion, wood smoke, and Central Valley pollution; PurpleAir and regional sensors show conditions by area.'},{outlet:'NPR',title:"What you need to know if you're in the path of wildfire smoke",url:'https://www.npr.org/sections/shots-health-news/2024/07/26/nx-s1-5049828/wildfire-smoke-health-risks-safety-air-quality-index',publishedDate:'2024-0
10957-26',category:'Major Media',excerpt:'Wildfire smoke health risks and safety; recommends checking AirNow.gov and PurpleAir.com; when to limit outdoor activity and use N95s.'},{outlet:'The Press Democrat',title:'Smoke chokes Napa and Sonoma air quality: Here\'s what we know about current conditions',url:'https://www.pressdemocrat.com/article/news/smoke-napa-sonoma-air-quality-wildfires/',publishedDate:'2024-06-18',category:'Major Media',excerpt:'Northern California wildfire smoke and AQI in Napa and Sonoma; PurpleAir cited alongside AirNow and local air districts for monitoring.'},{outlet:'Boston Globe',title:'Massachusetts to deploy hundreds of community air pollution sensors',url:'https://www.bostonglobe.com/2024/04/23/science/massachusetts-community-air-sensors-environmental-justice/',publishedDate:'2024-04-23',category:'Major Media',excerpt:'Healey-Driscoll administration investing in PurpleAir and community air sensors in Environmental Justice communities across Massachusetts.'},{outlet:'MassLive',title:"Mass. to nearly double number of community-based air quality sensors in the state",url:'https://www.masslive.com/news/2024/05/mass-to-nearly-double-number-of-community-based-air-quality-sensors-in-the-state.html',publishedDate:'2024-05-02',category:'Major Media',excerpt:'State to add 200+ PurpleAir sensors; data on PurpleAir.com and EPA Fire and Smoke Map; focus on Environmental Justice areas.'},{outlet:'Hartington.net',title:'Northeast Nebraska Public Health Department installs new tool for local air quality monitoring',url:'https://www.hartington.net/article/6268,northeast-nebraska-public-health-department-installs-new-tool-for-local-air-quality-monitoring',publishedDate:'2024-05-22',category:'Community & Advocacy',excerpt:'Northeast Nebraska Public Health installs PurpleAir sensor in Laurel for PM2.5 monitoring and resident health decisions.'},{outlet:'Sierra Club Pennsylvania',title:"Lancaster Group's PurpleAir Initiative",url:'https://www.sierraclub.org/pennsylvania/blog/2024/04/lancaster-group-s-purpleair-initiative',publishedDate:'2024-04-25',category:'Community & Advocacy',excerpt:'Lancaster Group recruited volunteers to deploy 10 PurpleAir sensors across Lancaster County; county had only two regulatory sensors and received an F for short-term particle pollution from American Lung Association.'},{outlet:'IoT Podcast',title:'Episode 433: Tracking air quality with the IoT',url:'https://iotpodcast.com/2023/07/episode-433-tracking-air-quality-with-the-iot/',publishedDate:'2023-07-27',category:'Major Media',excerpt:'Adrian Dybwad on how PurpleAir started, sensor placement, and how communities use the data for policy advocacy.'},{outlet:'KQED',title:'From PurpleAir to AirNow, Your Air Quality Maps for Wildfire Smoke',url:'https://www.kqed.org/science/1969271/making-sense-of-purple-air-vs-airnow-and-a-new-map-to-rule-them-all',publishedDate:'2021-08-18',category:'Major Media',excerpt:'How PurpleAir and AirNow differ; EPA Fire and Smoke Map combines both. Camp Fire sent users to PurpleAir when AirNow crashed.'},{outlet:'SFGATE',title:'The story behind PurpleAir, which has become a necessity for Bay Area summers',url:'https://www.sfgate.com/news/article/The-story-behind-website-Bay-Area-PurpleAir-16393480.php',publishedDate:'2022-09-09',category:'Major Media',excerpt:'PurpleAir\u2019s founding story, and how its real-time map of 20,000-plus community sensors became a Bay Area summer necessity.'},{outlet:'SFGATE',title:'Why PurpleAir and AirNow show different AQI scores during wildfires',url:'https://www.sfgate.com/news/editorspicks/article/Why-PurpleAir-and-AirNow-show-different-AQI-15514576.php',publishedDate:'2021-08-27',category:'Major Media',excerpt:'PurpleAir\u2019s real-time, hyperlocal data vs. AirNow\u2019s hourly official monitors; why readings differ and how to use both.'},{outlet:'The Bold Italic',title:'Understanding PurpleAir vs. AirNow.gov Measurements of Smoke Pollution',url:'https://thebolditalic.com/understanding-purpleair-vs-airnow-gov-measurements-of-wood-smoke-pollution-562923a55226',publishedDate:'2020-08-21',category:'Major Media',excerpt:'Why PurpleAir and AirNow show different values;
1095 using US EPA correction on PurpleAir for wood smoke.'},{outlet:'Weather Underground',title:"PurpleAir's $250 Air Pollution Monitor Gives Government Equipment Run for Money",url:'https://www.wunderground.com/cat6/purple-airs-250-air-pollution-monitor-gives-government-equipment-run-money',publishedDate:'2017-07-17',category:'Product Reviews',excerpt:'PA-II recommended for outdoor use; SCAQMD testing showed highest correlation with government-grade equipment among low-cost sensors.'},{outlet:'CBC',title:"Kamloops professor calls Ministry of Environment air quality readings 'completely inadequate'",url:'https://www.cbc.ca/news/canada/british-columbia/kamloops-air-quality-1.3976491',publishedDate:'2017-02-10',category:'Major Media',excerpt:'Kamloops professor and community use of alternative air quality monitoring; comparison with official readings.'},{outlet:'IQAir',title:'How to claim your PurpleAir sensor',url:'https://www.iqair.com/newsroom/how-to-claim-your-purpleair-sensor',publishedDate:'2026-02-04',category:'Product Reviews',excerpt:'Steps to claim a PurpleAir sensor on the IQAir platform and create a contributor profile for project visibility.'},{outlet:'ColoradoBoulevard.net',title:'Pasadena Deploys Nine PurpleAir Sensors to Monitor Air Quality in Real Time',url:'https://www.coloradoboulevard.net/pasadena-deploys-nine-purpleair-sensors-to-monitor-air-quality-in-real-time/',publishedDate:'2025-05-09',category:'Community & Advocacy',excerpt:'Pasadena Public Health deployed nine PurpleAir FLEX sensors north of the 210; residents can view real-time PM2.5 on PurpleAir.com.'},{outlet:'ColoradoBoulevard.net',title:'Pasadena Expands Air Quality Monitoring With New Sensor at Health Department',url:'https://www.coloradoboulevard.net/pasadena-expands-air-quality-monitoring-with-new-sensor-at-health-department/',publishedDate:'2025-04-11',category:'Community & Advocacy',excerpt:'Pasadena adds professional and community sensors for post-fire and real-time air quality monitoring.'},{outlet:'DiscoverWeyburn',title:'Leisure Services Director explains closures due to Purple Air Quality monitoring',url:'https://discoverweyburn.com/articles/leisure-services-director-explains-closures-due-to-purple-air-quality-monitoring',publishedDate:'2025-07-31',category:'Community & Advocacy',excerpt:'Weyburn, Saskatchewan uses PurpleAir and AQHI data; outdoor facilities close when air quality reaches unhealthy levels.'},{outlet:'TIME',title:'Adrian Dybwad \u2013 TIME100 Health 2025',url:'https://time.com/collections/time100-health-2025/7279614/adrian-dybwad/',publishedDate:'2025-05-08',category:'Major Media',excerpt:'TIME100 Health 2025: PurpleAir founder for work on community air quality; over 35,000 sensors, integrated into Watch Duty.'},{outlet:'phys.org',title:'Public data reveal extent of air quality impacts during 2025 Los Angeles wildfires',url:'https://phys.org/news/2025-08-reveal-extent-air-quality-impacts.html',publishedDate:'2025-08-08',category:'Major Media',excerpt:'Study comparing EPA monitors, low-cost sensors (e.g. PurpleAir), and satellite data from January 2025 LA fires; combining sources gives the public a more complete picture.'},{outlet:'NPR',title:'Is the air quality index actually useful right now?',url:'https://www.npr.org/2025/01/18/nx-s1-5266139/los-angeles-fires-smoke-air-quality-health-tips',publishedDate:'2025-01-18',category:'Major Media',excerpt:'During Palisades and Eaton fires, experts recommend PurpleAir for hyperlocal PM2.5; thousands of sensors in LA, updates every two minutes vs. hourly official data.'},{outlet:'The Press Democrat',title:'Air quality advisory issued for North Bay due to Oregon wildfire smoke',url:'https://www.pressdemocrat.com/2025/09/28/air-quality-advisory-issued-for-north-bay-due-to-oregon-wildfire-smoke/',publishedDate:'2025-09-28',category:'Major Media',excerpt:'North Bay advisory for Moon Complex Fire smoke; PurpleAir readings for Sonoma and Napa (Santa Rosa, Petaluma, Bodega, St. Helena, Calistoga).'},{outlet:'Bloomberg',title:'Mapping the Wildfire Smoke Choking the Western U.S.',url:'https://www.bloomberg.com/news/articles/2020-09-14/mapping-the-wildfire-smoke-choking-the-western-u-s',publishedDate:'2020-09-14',category:'Major Media',excerpt:'Amateur trackers and low-cost PurpleAir sensors create real-time smoke maps; Camp Fire spurred Bay Area resident to share data.'}
1095,{outlet:'CNET',title:"California fires boost interest in PurpleAir's pollution sensors",url:'https://www.cnet.com/home/smart-home/california-fires-boost-interest-in-purpleair-air-pollution-sensors/',publishedDate:'2018-11-21',category:'Major Media',excerpt:'Camp Fire drove ~500 sensor sales and 100x map traffic; AirNow crashed, PurpleAir\u2019s map filled the gap.'},{outlet:'The New York Times',title:"Do You Know What You're Breathing?",url:'https://www.nytimes.com/2018/11/30/style/air-quality-pollution-monitors.html',publishedDate:'2018-11-30',category:'Major Media',excerpt:'Personal air quality monitors and PurpleAir\u2019s \u201cguerrilla\u201d network; \u201chottest new apocalypse preparation choice for 2019.\u201d'},{outlet:'Fresno Bee',title:"Teen's data shows air quality is worse in South Fresno. He's taking his work to schools",url:'https://www.fresnobee.com/news/local/article222580890.html',publishedDate:'2018-12-18',category:'Community & Advocacy',excerpt:'Student uses air quality data including PurpleAir to document disparities in South Fresno.'},{outlet:'Daily Breeze',title:'San Pedro High School student investigates neighborhood air pollution spewing from nearby refineries and freeways',url:'https://www.dailybreeze.com/2018/08/07/san-pedro-high-school-student-investigates-neighborhood-air-pollution/',publishedDate:'2018-08-07',category:'Community & Advocacy',excerpt:'San Pedro student research on local air pollution using community monitoring tools.'},{outlet:'GCN',title:'Double duty: Utah puts sensors on public transit to monitor air quality',url:'https://gcn.com/',publishedDate:'2025-06-26',category:'Major Media',excerpt:'Utah transit agency deploys air quality sensors on buses; PurpleAir and mobile monitoring.'},{outlet:'KVPR',title:"NASA's JPL Using Fresno As A Test Bed For Air Quality Research",url:'https://www.kvpr.org/science/2018-02-06/nasas-jpl-using-fresno-as-a-test-bed-for-air-quality-research',publishedDate:'2018-02-06',category:'Major Media',excerpt:'JPL and NASA use Fresno for air quality research; comparison of reference monitors and low-cost sensors.'},{outlet:'The Verge',title:'Cheaper air quality sensors arrived just in time for the climate catastrophe',url:'https://www.theverge.com/21440343/air-quality-sensors-wildfire-smoke-pollution-climate-change',publishedDate:'2020-09-16',category:'Major Media',excerpt:'PurpleAir\u2019s 9,700+ sensors and EPA/Forest Service integration on the Fire and Smoke Map; Adrian Dybwad\u2019s origin story.'},{outlet:'Berkeleyside',title:'Air quality monitors report different measurements. What\'s the deal?',url:'https://www.berkeleyside.org/2020/09/08/air-quality-monitors-report-different-measurements-whats-the-deal',publishedDate:'2020-09-08',category:'Major Media',excerpt:'Why PurpleAir and official monitors differ; real-time vs. hourly data; EPA Fire and Smoke Map combined both sources.'},{outlet:'Residential Tech Today',title:'Integrating a PurpleAir Outdoor Air Quality Measurement into a Smart Home',url:'https://www.residentialtechtoday.com/',publishedDate:'2024-10-21',category:'Product Reviews',excerpt:'Using PurpleAir outdoor air quality data in smart home and automation setups.'},{outlet:'Daily Sentinel',title:'Citizens group organizes multiple air quality detectors',url:'https://www.gjsentinel.com/news/western_colorado/citizens-group-organizes-multiple-air-quality-detectors/article_21b96a44-4394-11e8-941d-10604b9f1ff5.html',publishedDate:'2018-04-01',category:'Community & Advocacy',excerpt:'Citizens for Clean Air deployed 25 PurpleAir monitors across the Grand Valley; real-time data on PurpleAir dashboard; ozone and PM2.5 monitoring.'},{outlet:'Medium',title:'Breathing Easy \u2014 Scientists Praise a Grassroots Movement as Air Quality Sensors Arrive At Our Doorstep',url:'https://perrybrissette.medium.com/breathing-easy-scientists-praise-a-grassroots-movement-as-air-quality-senors-arrive-at-our-76dd94f4d330',publishedDate:'2020-12-17',category:'Community & Advocacy',excerpt:'Scientists and grassroots use of low-cost air quality sensors including PurpleAir.'}
1095,{outlet:'Mountain View Voice',title:'Monitor air quality along the Midpeninsula in real time',url:'https://www.mv-voice.com/',publishedDate:'2023-10-19',category:'Community & Advocacy',excerpt:'Real-time air quality monitoring on the Midpeninsula using PurpleAir and other tools.'},{outlet:'Berkeley Lab',title:'Low-Cost Home Air Quality Monitors Prove Useful for Wildfire Smoke',url:'https://newscenter.lbl.gov/2020/08/18/low-cost-home-air-quality-monitors-prove-useful-for-wildfire-smoke/',publishedDate:'2020-08-18',category:'Research & Academic',excerpt:'LBNL research: low-cost monitors including PurpleAir showed strong correlation with reference monitors and provided actionable wildfire smoke information.'},{outlet:'San Francisco Chronicle',title:'Why is air quality data for the Bay Area so confusing?',url:'https://www.sfchronicle.com/health/article/Why-is-air-quality-data-for-the-Bay-Area-so-15538940.php',publishedDate:'2020-09-03',category:'Major Media',excerpt:'Explaining differing Bay Area air quality readings and how to use PurpleAir and official sources.'},{outlet:'Denverite',title:'How to keep tabs on Denver air quality and figure out when to maybe stay inside',url:'https://denverite.com/',publishedDate:'2024-06-20',category:'Major Media',excerpt:'Denver residents use PurpleAir and other tools to track wildfire smoke and decide when to stay indoors.'},{outlet:'Insider',title:'An ominous map shows the entire West Coast with the worst air quality on Earth as historic wildfires spew smoke',url:'https://www.businessinsider.com/west-coast-hazardous-air-quality-worst-on-earth-wildfire-smoke-2020-9',publishedDate:'2020-09-09',category:'Major Media',excerpt:'West Coast air quality maps and role of crowd-sourced sensors during historic wildfires.'},{outlet:'SFIST',title:'Smoke To Sit Over Entire Bay Area All Day Friday As Air Quality Readings Hit 300+',url:'https://sfist.com/2020/09/11/smoke-to-sit-over-entire-bay-area-with-very-unhealthy-air-all-day-friday/',publishedDate:'2020-09-11',category:'Major Media',excerpt:'Bay Area smoke and extreme AQI; PurpleAir and other real-time readings; very unhealthy air through Friday.'},{outlet:'Berkeleyside',title:'Air quality maps can show different measurements during wildfires. Why?',url:'https://berkeleyside.org/2023/09/21/air-quality-monitors-aqi-airnow-purpleair',publishedDate:'2023-09-21',category:'Major Media',excerpt:'Why PurpleAir and AirNow differ; EPA correction, when to use which tool during wildfire smoke.'},{outlet:'San Francisco Chronicle',title:'PurpleAir vs. AirNow: How to track air quality readings near you',url:'https://www.sfchronicle.com/california-wildfires/article/PurpleAir-vs-AirNow-How-to-track-the-air-16411544.php',publishedDate:'2023-01-01',category:'Major Media',excerpt:'Key differences between the two tools; Fire and Smoke Map combines both; when to use each.'},{outlet:'KQED',title:'Californians Turn to Low-Cost Sensors for Highly Local Air Quality Data',url:'https://www.kqed.org/science/1950648/californians-turn-to-low-cost-sensors-for-highly-local-air-quality-info',publishedDate:'2019-11-05',category:'Major Media',excerpt:'After Camp Fire, AirNow crashed; PurpleAir saw 200x traffic. Hyperlocal sensors vs. sparse regulatory network.'},{outlet:'The Washington Post',title:"When the power went out during California's wildfires, the air quality monitors turned off, too",url:'https://www.washingtonpost.com/technology/2019/11/04/when-power-went-out-during-californias-wildfires-air-quality-monitors-turned-off-too/',publishedDate:'2019-11-04',category:'Major Media',excerpt:'PG&E shutoffs took official monitors offline; gaps in coverage and role of community sensors like PurpleAir.'},{outlet:'San Francisco Examiner',title:'Community-led efforts to monitor air quality in Bayview, Eastern neighborhoods gain traction',url:'https://www.sfexaminer.com/archives/community-led-efforts-to-monitor-air-quality-in-bayview-eastern-neighborhoods-gain-traction/article_63ea41ac-fd5f-5c7b-b555-c75928d29c59.html',publishedDate:'2019-08-18',category:'Community & Advocacy',excerpt:'Bayview and E
1095astern neighborhoods deploy community air monitoring including PurpleAir.'},{outlet:'Desert Sun',title:'Mexican air regulators are installing more monitors to track pollution in Mexicali',url:'https://www.desertsun.com/story/news/environment/border-pollution/poisoned-cities/2019/03/15/mexican-air-regulators-installing-more-monitors-track-pollution-mexicali/3140901002/',publishedDate:'2019-03-15',category:'Community & Advocacy',excerpt:'Cross-border air quality monitoring and expansion of sensor networks in the Mexicali region.'},{outlet:'Bay Area Monitor',title:'All Particulate is Local: New Tech Helps Map Community Air Quality',url:'https://bayareamonitor.org/',publishedDate:'2025-01-24',category:'Community & Advocacy',excerpt:'Hyperlocal air quality mapping and community sensors including PurpleAir in the Bay Area.'},{outlet:'See The Air',title:'Review: PurpleAir II',url:'https://www.seetheair.org/',publishedDate:'2026-03-04',category:'Product Reviews',excerpt:'Review of the PurpleAir PA-II sensor and its performance for citizen air quality monitoring.'},{outlet:'Energy Institute at Haas',title:'My New Pollution Monitor: Gimmick or Game Changer?',url:'https://energyathaas.wordpress.com/2019/01/02/my-new-pollution-monitor-gimmick-or-game-changer/',publishedDate:'2019-01-02',category:'Research & Academic',excerpt:'Meredith Fowlie on low-cost air monitors; PurpleAir adoption in Northern California, Camp Fire, and filling gaps in the regulatory monitoring network.'},{outlet:'Chrome Unboxed',title:'Google Maps for Android, iOS adds an air quality layer in collaboration with PurpleAir and the EPA',url:'https://chromeunboxed.com/google-maps-air-quality-layer-android-ios',publishedDate:'2022-06-09',category:'Major Media',excerpt:'Google Maps Air Quality layer combines EPA data and PurpleAir\u2019s street-level sensors.'},{outlet:'Six Colors',title:'Getting a handle on outdoor air quality',url:'https://sixcolors.com/member/2021/07/getting-a-handle-on-outdoor-air-quality/',publishedDate:'2021-07-01',category:'Product Reviews',excerpt:'iOS apps and PurpleAir; air quality is \u201cextremely local\u201d; Paku and Miasma for PurpleAir data.'},{outlet:'Breathe Safe Air',title:'PurpleAir Flex & PurpleAir Zen Review',url:'https://breathesafeair.com/purpleair-flex-and-purpleair-zen-review/',publishedDate:'2024-06-27',category:'Product Reviews',excerpt:'PurpleAir Zen wins Best Outdoor air quality monitor award; dual laser PM sensors emphasize accuracy; month-long testing of design, connectivity, and map integration.'},{outlet:'Houston Public Media',title:"Community air monitoring is growing in Houston as accessibility to local data expands",url:'https://www.houstonpublicmedia.org/articles/news/in-depth/2021/12/22/416123/we-dont-know-what-were-breathing-community-air-monitoring-grows-in-houston-as-residents-want-access-to-their-own-data/',publishedDate:'2021-12-22',category:'Community & Advocacy',excerpt:'PurpleAir monitors in Sunnyside, Pleasantville, Fort Bend, Galena Park, Pasadena; residents advocate with data.'},{outlet:'WeatherBoy',title:'Air Quality "Harmful" in Hawaii',url:'https://weatherboy.com/air-quality-harmful-in-hawaii/',publishedDate:'2021-01-04',category:'Major Media',excerpt:'Hawaii air quality reached harmful levels from volcanic activity; PurpleAir and other resources provided real-time measurements for residents.'},{outlet:'New Haven Independent',title:'Eyeing Asthma, Dwight Tracks Pollution',url:'https://www.newhavenindependent.org/',publishedDate:'2025-09-03',category:'Community & Advocacy',excerpt:'Dwight neighborhood deploys PurpleAir sensors with Yale and EPA support to monitor PM2.5 and address asthma and environmental justice.'},{outlet:'Lancaster Eagle Gazette',title:'MORPC report shows jump in air quality alerts across region',url:'https://www.lancastereaglegazette.com/story/news/local/2026/03/12/morpc-report-shows-jump-in-air-quality-alerts-across-region-ozone-pm25-trends/89084831007/',publishedDate:'2026-03-12',category:'Community & Advocacy',excerpt:'Central Ohio air quality alerts more than doubled in 2025; MORPC deployed 36 PurpleAir sensors across Franklin County for neighborhood-level PM2.5 monitoring.'},{outlet:'FOX19',title:"Air pollution has long been an issue in Cincinnati. Here's one way the city is fighting back.",url:'https://www.fox19.com/2025/08/27/cincinnati-installs-air-monitors-across-city-fight-long-battle-with-pollution/',publishedDate:'2025-08-27',category:'Community & Advocacy',excerpt:'Cincy Air Watch Project installed 37 PurpleAir Flex monitors across Cincinnati; targeting priority neighborhoods with high asthma prevalence; goal to cover all 52 neighborhoods.'},{outlet:'EPA Science Matters',title:'EPA Research Improves Air Quality Information for the Public: AirNow, Fire and Smoke Map',url:'https://www.epa.gov/sciencematters/epa-research-improves-air-quality-information-public-airnow-fire-and-smoke-map',publishedDate:'2022-07-05',category:'Government & Agencies',excerpt:'EPA research improves air quality information for the public through tools like the Fire and Smoke Map.'},{outlet:'EPA',title:'Technical Approaches for the Sensor Data on the AirNow Fire and Smoke Map',url:'https://www.epa.gov/air-sensor-toolbox/technical-approaches-sensor-data-airnow-fire-and-smoke-map',publishedDate:'2020-10-16',category:'Government & Agencies',excerpt:'How PurpleAir and other sensor data are corrected and displayed on the EPA\u2019s Fire and Smoke Map.'},{outlet:'Minnesota Pollution Control Agency',title:"How's the air there? Minneapolis sensor network tracks air quality at the neighborhood level",url:'https://www.pca.state.mn.us/news-and-stories/community-air-monitoring-grants',publishedDate:'2024-0
10957-02',category:'Government & Agencies',excerpt:'Minneapolis deployed 80 PurpleAir sensors with residents; MPCA grants fund more community air sensor networks in the metro area.'},{outlet:'CBS2 Iowa',title:"Clearing the air: Linn County's commitment to environmental health, monitoring air quality",url:'https://cbs2iowa.com/news/local/clearing-the-air-linn-countys-commitment-to-environmental-health',publishedDate:'2024-06-11',category:'Government & Agencies',excerpt:'Linn County Public Health deploys PurpleAir sensors at nine locations; real-time PM2.5 data on PurpleAir map and AirNow Fire and Smoke Map for resident health decisions.'},{outlet:'EPA Science Matters',title:'Air Sensor Loan Programs: Promoting Air Quality Education by Bringing Sensors to You!',url:'https://www.epa.gov/sciencematters/air-sensor-loan-programs-promoting-air-quality-education-bringing-sensors-you',publishedDate:'2023-02-14',category:'Government & Agencies',excerpt:'EPA loan programs with PurpleAir PA-II-SD and others; libraries, tribes, museums; Region 3 and nationwide expansion.'},{outlet:'Santa Barbara County APCD',title:'APCD Offering Air Quality Sensors to be Hosted at Schools, Nonprofits, and Government Buildings',url:'https://www.ourair.org/091025-news/',publishedDate:'2025-09-10',category:'Government & Agencies',excerpt:'APCD offering ~150 PurpleAir-style sensors at schools, nonprofits, and government buildings countywide; adds to ~50 existing PurpleAir sensors; data on EPA Fire & Smoke Map.'},{outlet:'USF College of Public Health',title:'Award-winning community air monitoring network hosted annual summit in Tampa',url:'https://www.usf.edu/health/public-health/news/2026/award-winning-community-air-monitoring-network-hosted-annual-summit-in-tampa.aspx',publishedDate:'2026-02-23',category:'Research & Academic',excerpt:'Hillsborough Community Air Monitoring Network (CAMN), with PurpleAir sensors, earned Florida APA Award of Excellence; USF-led summit and resident training.'},{outlet:'Virginia State University',title:'VSU Research to Reveal Impact of Heat and Air Quality in Local Communities',url:'https://www.vsu.edu/news/2024/vsu-research-to-reveal-impact-of-heat-and-air-quality-in-local-communities.php',publishedDate:'2024-09-19',category:'Research & Academic',excerpt:'Faculty and students use PurpleAir monitors to collect temperature and air quality data in local communities.'},{outlet:'Ohio University',title:'PurpleAir Air Quality Project Aims to Increase Health Information, Data Collection Across Region',url:'https://www.ohio.edu/news/2023/12/purpleair-air-quality-project-aims-increase-health-information-data-collection-across',publishedDate:'2023-12-06',category:'Research & Academic',excerpt:'DOE-funded project installing sensors in libraries, schools, and government buildings across southeast Ohio.'},{outlet:'UC Davis',title:'PurpleAir Supports New Undergrad Air Pollution Course with PA-II Donations',url:'https://airquality.ucdavis.edu/news/purpleair-supports-new-undergrad-air-pollution-course-pa-ii-donations',publishedDate:'2019-07-23',category:'Research & Academic',excerpt:'PurpleAir donated PA-II instruments to support a new undergraduate laboratory with hands-on sensor technology.'},{outlet:'University of Arizona',title:'University of Arizona Air Pollution Sensor Network: Monitoring and Mapping PM2.5',url:'https://sustainability.arizona.edu/featured-story/university-arizona-air-pollution-sensor-network-monitoring-and-mapping-pm-25',publishedDate:'2022-12-15',category:'Research & Academic',excerpt:'Twenty PurpleAir sensors installed across campus to monitor air pollution for students, faculty, and staff.'},{outlet:'University of Montana',title:'REACH Program Equipment: Air Quality and Climate Research',url:'https://www.umt.edu/reach/equipment/',publishedDate:'2023-01-01',category:'Research & Academic',excerpt:'Research Education on Air and Climate Change Health provides students with PurpleAir sensors for research projects.'},{outlet:'University of Montana',title:'Air Alert: UM, Tribes Join Forces to Protect Air Quality',url:'https://www.umt.edu/news/2025/03/031925purp.php',publishedDate:'2025-03-19',category:'Research & Academic',excerpt:'UM and Confederated Salish and Kootenai Tribes deploy first comprehensive PurpleAir network on Flathead Reservation for wildfire smoke.'},{outlet:'Lehigh University',title:'Lehigh Student, Professors Partner with PurpleAir to Monitor Local Air Quality',url:'https://news.lehigh.edu/lehigh-student-professors-p
1095artner-with-purpleair-to-monitor-local-air-quality',publishedDate:'2022-04-28',category:'Research & Academic',excerpt:'Five PurpleAir monitors in north Bethlehem; student research on PM2.5 trends in Lehigh Valley; later expanded to Lehigh Valley Breathes.'},{outlet:'UC Davis',title:'Making Sense of Air Quality Sensors: An AQI Explainer',url:'https://www.ucdavis.edu/climate/what-can-i-do/making-sense-of-air-quality-sensors-an-aqi-explainer',publishedDate:'2018-11-15',category:'Research & Academic',excerpt:'UC Davis explainer on air quality sensors and AQI; context for low-cost sensors including PurpleAir.'},{outlet:'Star Tribune',title:'Minneapolis expands its network of sensors sniffing for toxic air',url:'https://www2.startribune.com/minneapolis-expands-its-network-of-sensors-sniffing-for-toxic-air/600241626/',publishedDate:'2022-12-01',category:'Major Media',excerpt:'Minneapolis deployed 70+ PurpleAir monitors at homes and businesses; AQMesh sensors added for VOCs; community-driven monitoring in neighborhoods like East Phillips.'},{outlet:'Star Tribune',title:'Minneapolis will deploy air pollution monitors with grant from Biden administration',url:'https://www2.startribune.com/minneapolis-will-deploy-air-pollution-monitors-with-grant-from-biden-administration/600221732/',publishedDate:'2022-01-01',category:'Major Media',excerpt:'Minneapolis received $411,000 EPA grant to expand PurpleAir sensor network for neighborhood-level air quality monitoring.'},{outlet:'KSL TV',title:'Sandy installs air monitors to give residents clearer picture of quality',url:'https://ksltv.com/local-news/sandy-installs-air-monitors-to-give-residents-clearer-picture-of-quality/712347/',publishedDate:'2024-10-01',category:'Major Media',excerpt:'Sandy, Utah is the first municipality to partner with PurpleAir; 13 of 20 monitors installed at city-owned sites including three inside City Hall.'},{outlet:'Sandy Journal',title:'Sandy City to install air quality monitors to keep residents informed',url:'https://www.sandyjournal.com/2024/10/07/508620/sandy-city-to-install-air-quality-monitors-to-keep-residents-informed',publishedDate:'2024-10-07',category:'Major Media',excerpt:'20 PurpleAir monitors costing $5,000 total; partnership initiated by City Councilmember to fill a gap on air quality maps; expected to last 2-4 years.'},{outlet:'Las Vegas Review-Journal',title:'This Vegas neighborhood is known for poor air quality. New sensors may help',url:'https://reviewjournal.com/local/east-valley/this-vegas-neighborhood-is-known-for-poor-air-quality-new-sensors-may-help-2617855',publishedDate:'2025-01-01',category:'Major Media',excerpt:'Buen Aire Para Todos project deploys 40 PurpleAir monitors in East Las Vegas: 20 indoor, 10 outdoor, 10 mobile on food trucks; EPA grant with ImpactNV and Desert Research Institute.'},{outlet:'SF Public Press',title:'New Air Quality Monitoring App Aims to Protect Students in Polluted Bay Area Communities',url:'https://sfpublicpress.org/new-air-quality-monitoring-app-aims-to-protect-students-in-polluted-bay-area-communities',publishedDate:'2025-01-01',category:'Major Media',excerpt:'UC Berkeley Bay Area Community Air Quality Map built on PurpleAir sensor network; helps schools decide when to keep children indoors during poor air quality.'},{outlet:'Pasadena Now',title:'Caltech Team Launches Air Quality Monitor Network in Altadena to Monitor Dust, Ash Levels',url:'https://pasadenanow.com/main/caltech-team-launches-air-quality-monitor-network-in-altadena-to-monitor-dust-ash-levels',publishedDate:'2025-03-01',category:'Major Media',excerpt:'PHOENIX post-fire monitoring network of 25 sites in Altadena after the Eaton fire destroyed existing PurpleAir monitors; PM1.0, PM2.5, and PM10 tracking.'},{outlet:'Alaska Public Media',title:'Alaskans breathe a lot of wildfire smoke. Scientists are finding new ways to track the hazard.',url:'https://alaskapublic.org/news/alaska-desk/2025-07-29/alaskans-breathe-a-lot-of-wildfire-smoke-scientists-are-finding-new-ways-to-track-the-hazard',publishedDate:'2025-07-29',category:'Major Media',excerpt:'PurpleAir sensors in Alaska expanded from 41 in 2019 to 106 in 2022; UAF researchers combine PurpleAir data with satellite observations to estimate wildfire PM2.5.'},{outlet:'Daily News',title:'Air quality monitoring not equipped to measure full dangers from Eaton, Palisades fires, experts say',url:'https://www.dailynews.com/2025/01/17/air-quality-monitoring-not-equipped-to-measure-full-dangers-from-eaton-palisades-fires-experts-say/',publishedDate:'2025-01-17',category:'Major Media',excerpt:'PurpleAir PM2.5 data useful during LA fires but traditional monitors miss toxic metals and VOCs from burned electronics and vehicles in urban fires.'},{outlet:'La Grande Observer',title:'Wildfire smoke worsens air quality in La Grande',url:'https://lagrandeobserver.com/2026/03/18/wildfire-smoke-worsens-air-quality-in-la-grande/',publishedDate:'2026-03-18',category:'Major Media',excerpt:'Oregon unhealthy air days increased 300% since 2013; PurpleAir network provides real-time data alongside the AirNow Fire and Smoke Map for smoke monitoring.'},{outlet:'WUWM',title:"They tracked Beloit's air quality. A global report put their bad air on the map.",url:'https://www.wuwm.com/environment/2024-04-05/they-tracked-beloits-air-quality-a-global-report-put-their-bad-air-on-the-map',publishedDate:'2024-04-05',category:'Community & Advocacy',excerpt:'Six PurpleAir monitors in Beloit, Wisconsin revealed it as the most polluted U.S. city in the IQAir global report; PM2.5 two to three times WHO standards.'},{outlet:'Wisconsin Examiner',title:'Volunteers monitored the air pollution in Beloit. A new worldwide report shows how bad it is.',url:'https://wisconsinexaminer.com/2024/03/21/volunteers-monitored-the-air-pollution-in-beloit-a-new-worldwide-report-shows-how-bad-it-is/',publishedDate:'2024-03-21',category:'Community & Advocacy',excerpt:'Community-deployed PurpleAir monitors at schools and community centers captured data that led IQAir to rank Beloit 14th worst in North America for PM2.5.'},{outlet:'WPR',title:'Beloit residents, environmental groups want state to monitor city for harmful soot pollution',url:'https://www.wpr.org/news/beloit-residents-environmental-groups-want-state-to-monitor-city-for-harmful-soot-pollution',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'PurpleAir data showing PM2.5 above EPA standards drives demand for official Wisconsin DNR monitor in Beloit;
1095 Rock County has fifth-highest asthma hospitalization rate.'},{outlet:'Houston Public Media',title:"We had no way of verifying it: Houston residents install their own air monitors to hold polluters accountable",url:'https://www.houstonpublicmedia.org/articles/news/health-science/2023/05/30/453072/houston-residents-air-monitors-hold-polluters-accountable/',publishedDate:'2023-05-30',category:'Community & Advocacy',excerpt:'Pleasantville residents deployed PurpleAir monitors since 2019 near industrial facilities; community data helped secure an official TCEQ regulatory monitor.'},{outlet:'Houston Public Media',title:'Fort Bend environmental organization to install air monitors to share data with EPA',url:'https://houstonpublicmedia.org/articles/news/energy-environment/2024/06/25/491794/fort-bend-environmental-organization-to-share-air-quality-data-with-epa/',publishedDate:'2024-06-25',category:'Community & Advocacy',excerpt:'Fort Bend County Environmental Org installed three PurpleAir monitors in Missouri City, Richmond, and Rosenberg near the W.A. Parish power plant; data shared with EPA.'},{outlet:'Appalachian Voices',title:'Upper South and Appalachia Citizen Air Monitoring Project begins data collection',url:'https://appvoices.org/2024/02/22/usacamp-monitoring-begins/',publishedDate:'2024-02-22',category:'Community & Advocacy',excerpt:'EPA-funded USACAMP deployed 40+ PurpleAir monitors across Virginia, West Virginia, Kentucky, Tennessee, and Pennsylvania to track coal dust and industrial soot.'},{outlet:'Appalachian Voices',title:'Residents Across Five States Benefit From Local Air Quality Monitoring',url:'https://appvoices.org/2024/05/12/residents-monitor-air-quality/',publishedDate:'2024-05-12',category:'Community & Advocacy',excerpt:'USACAMP quarterly reports from PurpleAir data show PM2.5 patterns across five Appalachian states; 16 community partners and two university collaborators.'},{outlet:'Boise State Public Radio',title:'Nez Perce Tribe secures EPA grant to shield community buildings from wildfire smoke',url:'https://www.boise
1095statepublicradio.org/news/2024-02-26/nez-perce-tribe-epa-wildfire-smoke',publishedDate:'2024-02-26',category:'Community & Advocacy',excerpt:'$1.3 million EPA grant to upgrade nine libraries, four youth centers, and three community centers with air filters and PurpleAir indoor/outdoor air monitoring.'},{outlet:'Local Headline News',title:"Sensors installed in town provide real-time access to data on town's air quality",url:'https://localheadlinenews.com/north-reading-sensors-installed-in-town-provide-real-time-access-to-data-on-towns-air-quality/',publishedDate:'2024-10-01',category:'Community & Advocacy',excerpt:'North Reading, MA received 10 PurpleAir sensors from MassDEP; installed by volunteers at schools and residences; brush fire validated usefulness immediately.'},{outlet:'Heart of the Rockies Radio',title:'CCPH Officially Launches Purple Air Quality Monitoring Program',url:'https://heartoftherockiesradio.com/ccph-officially-launches-purple-air-quality-monitoring-program/',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'Chaffee County Public Health launched four PurpleAir monitors in Poncha Springs, Salida, and Buena Vista for real-time wildfire smoke data.'},{outlet:'Mountain Mail',title:'Chaffee has four air quality monitors',url:'https://www.themountainmail.com/news/chaffee-has-four-air-quality-monitors/article_46abecfb-3fbf-4604-8f37-4511fe033a19.html',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'PurpleAir monitors in Salida, Buena Vista, and Poncha Springs track PM2.5 for resident health decisions during wildfire events in Colorado.'},{outlet:'CBS2 Iowa',title:'New air-quality sensor installed in Linn County to improve monitoring in Cedar Rapids',url:'https://cbs2iowa.com/news/local/new-air-quality-sensor-installed-in-linn-county-to-improve-monitoring-in-cedar-rapids',publishedDate:'2025-11-01',category:'Community & Advocacy',excerpt:'Third PurpleAir sensor installed at McKinley STEAM Academy in Cedar Rapids; fills downtown coverage gap; five-year funding for fine particulate monitoring.'},{outlet:'The Gazette',title:'Linn County monitoring air quality with neighborhood sensors',url:'https://www.thegazette.com/environment-nature/linn-county-monitoring-air-quality-with-neighborhood-sensors/',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'Linn County Public Health uses PurpleAir sensors and regulatory monitors to track PM2.5 and alert residents to unhealthy wildfire smoke conditions.'},{outlet:'KPAX',title:"Researchers and high schools team up to monitor Montana's air quality",url:'https://www.kpax.com/news/ravalli-county/researchers-and-high-schools-team-up-to-monitor-montanas-air-quality',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'Montana DEQ and University of Montana partner to install PurpleAir sensors at high schools statewide; addresses wildfire smoke monitoring gaps in rural areas.'},{outlet:'News-Journal',title:'University of Montana and CSKT develop air quality monitor network on Flathead Reservation',url:'https://www.news-journal.com/university-of-montana-and-cskt-develop-air-quality-monitor-network-on-flathead-reservation/article_3c5ec876-aea4-5d46-b0cb-98fc1981c13a.html',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'First comprehensive PurpleAir network on a tribal reservation; 30 monitors at schools, clinics, and fitness centers integrating Western science with tribal knowledge.'},{outlet:'PW Perspective',title:'Upper Mattaponi Indian Tribe to begin air quality monitoring',url:'https://pwperspective.com/upper-mattaponi-indian-tribe-to-begin-air-quality-monitoring/',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'EPA awarded $449,988 to Upper Mattaponi Tribe for PurpleAir community monitoring near Superfund sites and mining operations; partnership with Virginia Tech and George Mason.'},{outlet:'Sonoma Index-Tribune',title:"Where is Sonoma's Purple Air sensor?",url:'https://www.sonomanews.com/article/news/where-is-sonomas-purple-air-sensor/',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'Sonoma County Library system hosts PurpleAir sensors at all 15 branches; residents check PM2.5 data on PurpleAir map with real-time color-coded readings.'},{outlet:'WHYY',title:'Philadelphia air quality: Community network tracks pollution',url:'https://whyy.org/articles/philadelphia-air-quality-pollution-monitoring/',publishedDate:'2025-01-01',category:'Community & Advocacy',excerpt:'Clean Air Council installed 60 PurpleAir monitors across Delaware County and South/Southwest Philadelphia along the I-95 corridor for community air quality tracking.'},{outlet:'Valley Vision',title:'Air Quality Data Now Monitored in Sacramento Frontline Neighborhoods',url:'https://www.valleyvision.org/air-quality-data-now-monitored-in-sacramento-frontline-neighborhoods/',publishedDate:'2021-06-01',category:'Community & Advocacy',excerpt:'SNAAQ coalition installed 20+ rooftop solar-powered PurpleAir monitors in North Sacramento and Oak Park; CARB grant for environmental justice monitoring.'},{outlet:'Sacramento City Express',title:'Free portable air quality sensors available for residents, businesses, and schools',url:'https://sacramentocityexpress.com/2022/12/12/free-portable-air-quality-sensors-available-for-residents-businesses-and-schools-in-high-need-underserved-sacramento-neighborhoods/',publishedDate:'2022-12-12',category:'Community & Advocacy',excerpt:'City of Sacramento distributed 200 free PurpleAir sensors to underserved neighborhoods; second phase added 100 more sensors in North and South Sacramento.'},{outlet:'KGUN9',title:'Corona de Tucson residents monitor air quality ahead of new mining operations',url:'https://www.kgun9.com/news/community-inspired-journalism/southeast-side-news/corona-de-tucson-residents-monitor-air-quality-ahead-of-new-mining-operations',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'University of Arizona and residents installed PurpleAir monitors including on Copper Ridge Elementary roof to baseline air quality before Copper World Mine.'},{outlet:'Progress-Index',title:'Petersburg advocates to track air quality, pollution near compressor station, other sites',url:'https://www.progress-index.com/story/news/local/2025/01/13/petersburg-community-air-monitoring-program-virginia-quality-pollution-compressor-station/77584201007/',publishedDate:'2025-01-13',category:'Community & Advocacy',excerpt:'Petersburg, Virginia launched Community Air Monitoring Program using PurpleAir sensors near industrial facilities including a compressor station expansion.'},{outlet:'Spokane Regional Clean Air Agency',title:'Spokane Clean Air deploys PurpleAir sensors',url:'https://spokanecleanair.org/spokane-clean-air-deploys-purpleair-sensors/',publishedDate:'2024-01-01',category:'Community & Advocacy',excerpt:'Spokane air agency deployed three PurpleAir sensors to measure PM2.5 and PM10; LRAPA correction equation applied for more accurate readings during wildfire season.'},{outlet:'Armidale Express',title:"Breathe easy: Monitors being rolled out to measure city's air quality",url:'https://www.armidaleexpress.com.au/story/8993644/armidales-new-solar-air-quality-monitors-enhance-data/',publishedDate:'2025-01-01',category:'Community & Advocacy',excerpt:'Armidale Regional Council deploying 10 solar-powered PurpleAir monitors across the region; measures PM1.0, PM2.5, and PM10 with real-time public data.'},{outlet:'Milenio',title:'Sensores reportan en linea buena calidad del aire en San Pedro',url:'https://milenio.com/comunidad/sensores-reportan-en-linea-buena-calidad-aire-san-pedro-garza-garcia',publishedDate:'2026-01-01',category:'Community & Advocacy',excerpt:'39 PurpleAir sensors in San Pedro Garza Garcia, Mexico; PM2.5 readings of 4-6 micrograms; data on purpleair.com and aireclaro.com.'},{outlet:'ABC Noticias',title:'San Pedro instala 16 sensores para medir la calidad del aire de su municipio',url:'https://abcnoticias.mx/local/2025/10/16/san-pedro-instala-16-sensores-p
1095ara-medir-la-calidad-del-aire-de-su-municipio-263404.html',publishedDate:'2025-10-16',category:'Community & Advocacy',excerpt:'San Pedro Garza Garcia installed initial 16 PurpleAir sensors with plans for 50 total; citizen Adopta un Sensor program for schools, parks, and homes.'},{outlet:'ABC Noticias',title:'Crisis de contaminacion obliga a municipios a crear su propio monitoreo del aire',url:'https://abcnoticias.mx/local/2025/12/18/crisis-de-contaminacion-obliga-municipios-crear-su-propio-monitoreo-del-aire-268832.html',publishedDate:'2025-12-18',category:'Community & Advocacy',excerpt:'Monterrey area municipalities deploy PurpleAir sensors independently; Escobedo announces 10 environmental monitoring stations for community air quality data.'},{outlet:'El Heraldo de Mexico',title:'Aire limpio en San Pedro Garza? Asi puedes ayudar a medir las emisiones contaminantes',url:'https://www.heraldodemexico.com.mx/nacional/2025/10/17/aire-limpio-en-san-pedro-garza-asi-puedes-ayudar-medir-las-emisiones-contaminantes-738350.html',publishedDate:'2025-10-17',category:'Community & Advocacy',excerpt:'San Pedro PurpleAir sensors use dual laser counters; data transmitted via WiFi every two minutes; residents invited to host sensors at their properties.'},{outlet:'EPA Science Matters',title:'EPA Partners with Tribes to Deploy Air Sensors in Communities',url:'https://www.epa.gov/sciencematters/epa-partners-tribes-deploy-air-sensors-communities',publishedDate:'2024-01-01',category:'Government & Agencies',excerpt:'EPA partnered with Nez Perce Tribe, Heritage University on Yakama Reservation, and ITEP in Alaska to deploy PurpleAir sensors at rural libraries, schools, and cultural centers.'},{outlet:'NHDES',title:'New NHDES Program Helps Citizen Scientists Track Air Quality',url:'https://www.des.nh.gov/news-and-media/blog/commissioners-column-new-nhdes-program-helps-citizen-scientists-track-air-quality',publishedDate:'2024-01-01',category:'Government & Agencies',excerpt:'New Hampshire DES Community Air Monitoring Program registers PurpleAir monitors with state scientists; real-time data supplements six regulatory PM2.5 stations statewide.'},{outlet:'Armidale Regional Council',title:'New air quality monitors rolling out across Armidale',url:'https://www.armidale.nsw.gov.au/News-articles/New-air-quality-monitors-rolling-out-across-Armidale',publishedDate:'2025-01-01',category:'Government & Agencies',excerpt:'Australian council deploying 10 solar-powered PurpleAir monitors at sports facilities, parks, and community buildings; selected for population spread and topographic variation.'},{outlet:'AirQualityNews',title:'100 hosts needed for Wiltshire Community Air Network',url:'https://airqualitynews.com/local-government/100-hosts-needed-for-wiltshire-community-air-network/',publishedDate:'2025-01-01',category:'Government & Agencies',excerpt:'Wiltshire Council deploying 100 PurpleAir Zen sensors across 18 community areas; hosts needed at schools, NHS facilities, and near pollution sources; sensors retained after one year.'},{outlet:'NSW EPA',title:'Warringah freeway upgrade: air quality monitoring',url:'https://www.epa.nsw.gov.au/Working-together/Community-engagement/updates-on-issues/Warringah-freeway-air-monitoring',publishedDate:'2024-10-01',category:'Government & Agencies',excerpt:'NSW EPA deployed 10 PurpleAir monitors between Wollstonecraft and Middle Harbour for construction air quality monitoring; replaced KOALA devices after 3G network shutdown.'},{outlet:'European Commission',title:'Air pollution data from citizen-operated sensors improved by novel quality control system',url:'https://environment.ec.europa.eu/news/air-pollution-data-citizen-operated-sensors-improved-novel-quality-control-system-2025-11-06_en',publishedDate:'2025-11-06',category:'Research & Academic',excerpt:'FILTER framework applied to PurpleAir and sensor.community data across Europe; 13.2 billion observations from 38,294 locations between 2018-2023 standardized for accuracy.'},{outlet:'Science Northwest',title:'Fire and Smoke Map vs Purple Air map: Comparing smoke distributions',url:'https://sciencenorthwest.com/fire-and-smoke-map-vs-purple-air-map-comparing-smoke-distributions/',publishedDate:'2024-01-01',category:'Research & Academic',excerpt:'Comparison of EPA Fire and Smoke Map with PurpleAir data for tracking wildfire smoke in the Pacific N
1095orthwest; spatial coverage and update frequency differences.'},{outlet:'The New York Times',title:"In 'Cancer Alley,' a Battle Over Who Gets to Measure Air Pollution",url:'https://www.nytimes.com/2025/05/23/climate/cancer-alley-air-pollution-free-speech.html',publishedDate:'2025-05-23',category:'Major Media',excerpt:'New Louisiana law restricts community groups from publicly discussing data or filing complaints using PurpleAir sensor readings near petrochemical facilities in Cancer Alley.'},{outlet:'The New York Times',title:"Fires Are Intensifying. Here's How to Protect Your Health.",url:'https://www.nytimes.com/explain/2022/08/01/well/wildfire-smoke-safety',publishedDate:'2022-08-01',category:'Major Media',excerpt:'Wildfire safety guide recommends PurpleAir alongside AirNow and IQAir for hyperlocal air quality checks during fire season.'},{outlet:'The Washington Post',title:'The best air quality index apps to check wildfire smoke near you',url:'https://www.washingtonpost.com/technology/2023/06/07/best-air-quality-apps-wildfire-smoke/',publishedDate:'2023-06-07',category:'Major Media',excerpt:'During Canadian wildfire smoke, recommends AirNow Fire and Smoke Map which uses regulatory-grade readings to adjust PurpleAir data for more accurate measurements.'},{outlet:'The Washington Post',title:'As wildfire smoke becomes a part of life on the West Coast, so do its health risks',url:'https://www.washingtonpost.com/nation/2020/09/16/smoke-air-west/',publishedDate:'2020-09-16',category:'Major Media',excerpt:'Profile of PurpleAir as a Utah-based company using low-cost sensors to map air quality; shares data with other companies and agencies as wildfire smoke becomes a recurring hazard.'},{outlet:'The Washington Post',title:'Rarefied air: Taking a healthy breath is now a luxury in California',url:'https://www.washingtonpost.com/technology/2020/09/18/wildfires-climate-wealth-gap-california/',publishedDate:'2020-09-18',category:'Major Media',excerpt:'PurpleAir sensor demand surged during 2020 wildfires; explores the growing wealth gap in air quality awareness and access to monitoring technology in California.'},{outlet:'The Washington Post',title:'The best apps to check air quality near you',url:'https://www.washingtonpost.com/technology/2021/09/08/air-quality-apps/',publishedDate:'2021-09-08',category:'Major Media',excerpt:'Recommends combining EPA AirNow data with PurpleAir at-home sensor measurements for a comprehensive picture of local air quality during wildfire smoke events.'},{outlet:'Bloomberg',title:"Amid Wildfire Smoke, Here's How to Gauge Air Quality in Your Area",url:'https://www.bloomberg.com/news/articles/2023-06-07/amid-wildfire-smoke-here-s-how-to-gauge-air-quality-in-your-area',publishedDate:'2023-06-07',category:'Major Media',excerpt:'EPA and Forest Service Fire and Smoke Map uses adjusted PurpleAir data; explains how the public can gauge air quality during Canadian wildfire smoke events.'},{outlet:'Bloomberg',title:'The Best Maps to Track Air Quality, Wildfire Smoke',url:'https://www.bloomberg.com/news/articles/2021-08-16/the-best-maps-to-track-air-quality-wildfire-smoke',publishedDate:'2021-08-16',category:'Major Media',excerpt:'PurpleAir private sensor network roughly doubled since EPA and Forest Service integrated its data into the Fire and Smoke Map in 2020.'},{outlet:'TIME',title:'How Simple Monitors Can Prevent Air Pollution-Related Illness',url:'https://time.com/7013463/air-pollution-monitors-health/',publishedDate:'2024-08-22',category:'Major Media',excerpt:'Economists propose a PurpleAir monitor in every U.S. elementary school; research shows monitors cluster in affluent neighborhoods while underserved communities lack air quality data.'},{outlet:'TIME',title:'How to Tell If Your Outdoor Air Is Safe',url:'https://time.com/7315621/air-quality-outdoor-monitor-aqi/',publishedDate:'2025-09-10',category:'Major Media',excerpt:"PurpleAir's online AQI map displays real-time readouts from at-home sensors, providing more localized pollution information than regional monitoring stations."},{outlet:'Wired',title:'Why You Need an Outdoor Air Quality Monitor',url:'https://www.wired.com/story/why-you-need-an-outdoor-air-quality-monitor/',publishedDate:'2025-08-09',category:'Major Media',excerpt:'PurpleAir monitors recommended for hyperlocal tracking; nearby sensors revealed higher pollution near a concrete recycling center that broader monitoring missed.'},{outlet:'Wired',title:"It's Easy to Check the Air Quality. Meet the People Collecting That Data for You",url:'https://www.wired.com/story/the-people-collecting-air-quality-sensor-data/',publishedDate:'2023-08-25',category:'Major Media',excerpt:'Profiles the citizen scientists behind PurpleAir and IQAir tracking networks; PurpleAir has built one of the most reliable air quality monitoring networks from consumer-owned sensors.'},{outlet:'Wired',title:"Why It's So Confusing to Determine Air Quality in Los Angeles Right Now",url:'https://www.wired.com/story/confusing-air-quality-los-angeles-aqi/',publishedDate:'2025-01-17',category:'Major Media',excerpt:'During Palisades and E
1095aton fires, different platforms report varying AQI from the same PurpleAir sensors due to different correction calculations and processing delays.'},{outlet:'Slate',title:'The wildfire safety apps I use to check air quality and prepare for disaster',url:'https://slate.com/technology/2023/09/wildfire-safety-apps-oregon-air-quality.html',publishedDate:'2023-09-18',category:'Major Media',excerpt:"Author's first daily action is checking PurpleAir; dark maroon dots across southern Oregon valley guide decisions on when to stay indoors during wildfire smoke season."},{outlet:'USA Today',title:"California's air quality is worse than India's. That's not good in a pandemic",url:'https://www.usatoday.com/story/news/nation/2020/08/24/california-wildfires-air-quality-increasingly-unhealthy/3431014001/',publishedDate:'2020-08-24',category:'Major Media',excerpt:'PurpleAir reading of 548 west of San Jose was three times higher than the closest global figure; California wildfire air quality exceeded India during August 2020.'},{outlet:'Lifehacker',title:'Assess Your Air Quality With This Mashup of Sensors',url:'https://lifehacker.com/assess-your-air-quality-with-this-mashup-of-sensors-1845091896',publishedDate:'2020-09-17',category:'Major Media',excerpt:'Recommends EPA Fire and Smoke Map combining AirNow accuracy with PurpleAir density; PurpleAir provides hundreds of monitors with real-time 10-minute updates.'},{outlet:'Heatmap News',title:'Air Quality Data for the Rich',url:'https://heatmap.news/sparks/purpleair-air-quality-california-study',publishedDate:'2024-04-25',category:'Major Media',excerpt:'NBER study of PurpleAir monitors in California found sensors clustered in wealthy, white neighborhoods; Bakersfield (400K people) had 15 sensors while Pacific Heights (20K) had 13.'},{outlet:'Houston Chronicle',title:"Houston's booming suburbs lack official air-quality monitors. Why?",url:'https://www.houstonchronicle.com/projects/2025/houston-suburbs-air-pollution-monitoring-gaps-texas/',publishedDate:'2025-10-02',category:'Major Media',excerpt:'PurpleAir monitors near the W.A. Parish power plant showed particulate matter levels exceeding newly tightened EPA health standards; highlights monitoring gaps in suburban Texas.'},{outlet:'AP News',title:'New sensor in Mississippi helps with air quality monitoring',url:'https://apnews.com/article/science-health-business-mississippi-air-quality-6d4333a6675249b0bb8fa3053c23087f',publishedDate:'2022-04-24',category:'Major Media',excerpt:'One of three PurpleAir sensors installed in Mississippi as part of a NASA Langley initiative led by the University of Toledo for community air quality monitoring.'},{outlet:'CBS News',title:'Massachusetts expands network of air quality sensors to underserved, low-income communities',url:'https://www.cbsnews.com/boston/news/massachusetts-air-quality-sensors-environmental-justice-communities/',publishedDate:'2024-04-23',category:'Major Media',excerpt:'Massachusetts deploying affordable PurpleAir sensors in environmental justice communities; smaller footprint and lower cost than traditional monitoring equipment.'},{outlet:'Grist',title:'Wildfire smoke is choking Indigenous communities',url:'https://grist.org/indigenous/wildfire-smoke-indigenous-communities-aqi-air-monitor/',publishedDate:'2022-08-24',category:'Community & Advocacy',excerpt:'Mille Lacs Band installing 23 PurpleAir sensors across tribal lands; Indigenous communities face disproportionate wildfire smoke exposure with limited monitoring infrastructure.'},{outlet:'Grist',title:'Low-cost sensors are helping communities find gaps in air quality data',url:'https://grist.org/health/low-cost-sensors-are-helping-communities-find-gaps-in-air-quality-data/',publishedDate:'2022-06-24',category:'Community & Advocacy',excerpt:'Communities deployed 60 PurpleAir sensors to monitor pollution near industrial facilities; low-cost networks fill gaps where regulatory monitors are sparse or absent.'},{outlet:'Inside Climate News',title:'Monitoring Air Quality as a Lesson in Climate Change, Civic Engagement and Latino Leadership',url:'https://insideclimatenews.org/news/10082023/madison-latino-leadership-air-monitoring/',publishedDate:'2023-08-10',category:'Community & Advocacy',excerpt:'Latino students in Madison installed PurpleAir monitors as part of a climate education program combining air quality science with civic engagement and community leadership.'},{outlet:'CBC',title:'Parents of B.C. boy who died of asthma say reliable air quality monitors could have saved his life',url:'https://www.cbc.ca/news/canada/british-columbia/parents-focus-on-air-quality-monitors-following-sons-death-due-to-asthma-1.7017126',publishedDate:'2023-11-04',category:'Community & Advocacy',excerpt:"B.C. Lung Foundation fully subsidizing 100 PurpleAir monitors after a child's asthma death; parents advocate for accessible real-time air quality data in communities."},{outlet:'CBC',title:"The N.W.T. wants help measuring air quality, so it's giving out free sensors",url:'https://www.cbc.ca/news/canada/north/n-w-t-free-air-quality-sensors-1.6586182',publishedDate:'2022-09-17',category:'Community & Advocacy',excerpt:'Northwest Territories government distributing free PurpleAir sensors to communities; only five official monitoring stations exist territory-wide for wildfire smoke tracking.'}];function I(e){const t=new Map;for(const e of R)t.set(e,[]);for(const o of e){const e=t.get(o.category);e&&e.push(o)}for(const e of t.values())e.sort((e,t)=>
1095{const o=t.publishedDate.localeCompare(e.publishedDate);return 0!==o?o:e.title.localeCompare(t.title,void 0,{sensitivity:'base'})});return t}function E(e){const t=new Set;for(const o of e){const e=q(o.publishedDate);0!==e&&t.add(e)}return Array.from(t).sort((e,t)=>t-e)}const j=(0,u.createStyles)({articleCount:{color:w.COLORS.TEXT_SOFT,fontSize:A.FONT_SIZE.MD,marginBottom:f.SPACING.LG},badge:{backgroundColor:w.COLORS.TEXT_INVERSE,borderColor:w.COLORS.BORDER_MUTED,borderRadius:16,borderWidth:1,paddingHorizontal:f.SPACING.MD,paddingVertical:f.SPACING.SM},badgeActive:{backgroundColor:w.COLORS.ACTION_PRIMARY,borderColor:w.COLORS.ACTION_PRIMARY},badgeRow:{flexDirection:'row',gap:f.SPACING.SM,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.XS},badgeScroll:{marginBottom:f.SPACING.XXL,marginHorizontal:-f.SPACING.XXL},badgeText:{color:w.COLORS.TEXT_DIM,fontSize:A.FONT_SIZE.SM,fontWeight:'500'},badgeTextActive:{color:w.COLORS.TEXT_INVERSE},container:{flex:1},entriesList:{gap:f.SPACING.LG},entryCard:{backgroundColor:w.COLORS.BG_LIGHT,borderColor:w.COLORS.BORDER,borderRadius:12,borderWidth:1,padding:f.SPACING.XL},entryCardTop:{marginBottom:f.SPACING.MD},entryDateAndTagRow:{alignItems:'center',flexDirection:'row',gap:f.SPACING.SM,marginBottom:f.SPACING.XS},entryExcerpt:{color:w.COLORS.TEXT_DIM,fontSize:A.FONT_SIZE.LG,fontStyle:'italic',lineHeight:22,marginBottom:f.SPACING.MD},entryHeader:{alignItems:'flex-start',flexDirection:'row',gap:f.SPACING.MD,marginBottom:f.SPACING.MD},entryHeaderText:{flex:1},outletLogoContainer:{alignItems:'center',backgroundColor:w.COLORS.BG_MUTED,borderRadius:10,height:48,justifyContent:'center',width:48},outletLogoFallback:{alignItems:'center',borderRadius:10,height:48,justifyContent:'center',width:48},outletLogoImage:{borderRadius:4,height:28,width:28},outletLogoInitial:{color:w.COLORS.TEXT_INVERSE,fontSize:A.FONT_SIZE.XXL,fontWeight:'700'},entryLink:{color:w.COLORS.BRAND_PRIMARY,fontSize:A.FONT_SIZE.MD,fontWeight:'600',textDecorationLine:'underline'},entryOutlet:{color:w.COLORS.TEXT_SOFT,fontSize:A.FONT_SIZE.MD},entryTag:{backgroundColor:w.COLORS.ACTION_PRIMARY,borderRadius:4,paddingHorizontal:f.SPACING.SM,paddingVertical:f.SPACING.MICRO},entryTagText:{color:w.COLORS.TEXT_INVERSE,fontSize:A.FONT_SIZE.MICRO,fontWeight:'600'},entryTitle:{color:w.COLORS.TEXT_NEAR_BLACK,fontSize:A.FONT_SIZE.LG,fontWeight:'600',marginBottom:f.SPACING.XS},entryYear:{color:w.COLORS.ACTION_PRIMARY,fontSize:A.FONT_SIZE.XS,fontWeight:'700'},intro:{color:w.COLORS.TEXT_DIM,fontSize:A.FONT_SIZE.LG,lineHeight:26,marginBottom:f.SPACING.XXL},mainRow:{alignItems:'flex-start',alignSelf:'center',flexDirection:'row',maxWidth:960,width:'100%'},section:{flex:1,minWidth:0,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.HUGE},yearChip:{alignSelf:'stretch',backgroundColor:w.COLORS.TEXT_INVERSE,borderColor:w.COLORS.BORDER_MUTED,borderRadius:8,borderWidth:1.5,marginBottom:f.SPACING.SM,paddingHorizontal:f.SPACING.MD,paddingVertical:f.SPACING.SM},yearChipActive:{backgroundColor:w.COLORS.ACTION_PRIMARY,borderColor:w.COLORS.ACTION_PRIMARY},yearChipCount:{fontSize:A.FONT_SIZE.MICRO,fontWeight:'500'},yearChipText:{color:w.COLORS.TEXT_DIM,fontSize:A.FONT_SIZE.MD,fontWeight:'700'},yearChipTextActive:{color:w.COLORS.TEXT_INVERSE},yearSidebar:{paddingLeft:f.SPACING.XXL,paddingRight:f.SPACING.LG,paddingTop:f.SPACING.HUGE,width:150},yearSidebarTitle:{color:w.COLORS.TEXT_SOFT,fontSize:A.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,marginBottom:f.SPACING.MD,textTransform:'uppercase'}})},995,[34,276,222,488,283,328,489,519,674,568,565,490,493,494,562,685,104]);
1096__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.PrivacyPolicyScreen=function(){return(0,n.jsx)(c.ShopifyPolicyPage,{errorSurface:y.contentLoad,seoKey:"PrivacyPolicy",handle:"privacy-policy",policyName:"Privacy Policy"})},r(d[0]);
1096var c=r(d[1]),o=r(d[2]),n=r(d[3]);const y=(0,o.defineScreenErrorSurfaces)('PrivacyPolicy',{contentLoad:{id:'content-load',kind:'page',label:'Privacy policy content load error'}})},996,[34,997,557,104]);
1097__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ShopifyPolicyPage=function({errorSurface:y,seoKey:x,handle:h,policyName:P}){const{isDevTriggered:b,surface:p}=(0,n.useErrorSurface)(y),M=(0,s.useSeoMeta)(x),{data:F,loading:S,error:O,retry:_}=(0,o.useAsyncData)(()=>t.storeApi.getShopPolicy(h),[h,P],`Failed to load ${P}.`),v=O??(null!=F||S?null:`${P} content not found.`)??(b?'Content not found.':null);if(S)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l.WebMeta,Object.assign({},M)),(0,j.jsx)(c.MarkdownPageLoading,{})]});if(null!=v||null==F)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l.WebMeta,Object.assign({},M)),(0,j.jsx)(c.MarkdownPageError,{message:v??'Content not found.',onRetry:_,surface:p})]});return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l.WebMeta,Object.assign({},M)),(0,j.jsx)(c.FullTextPageLayout,{title:F.title,footer:(0,j.jsx)(u.PolicyContactFooter,{policyName:P}),children:(0,j.jsx)(f.ShopifyPolicyHtml,{html:F.bodyHtml})})]})},r(d[0]);var t=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),j=r(d[9])},997,[34,618,557,561,562,565,566,603,998,104]);
1098__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sanitizeShopifyPolicyHtml=y,e.ShopifyPolicyHtml=function({html:t}){return(0,s.jsx)(f.RichTextHtml,{html:y(t),variant:"shopify-policy",fallbackText:(0,o.stripHtml)(t),fallbackStyle:h.nativeFallback})},r(d[0]);var t=r(d[1]),l=r(d[2]),c=r(d[3]),n=r(d[4]),o=r(d[5]),f=r(d[6]),s=r(d[7]);function y(t){return(0,n.sanitizeHtml)(t,'shopify-policy')}const h=(0,t.createStyles)({nativeFallback:{color:l.COLORS.NAVY_MID,fontSize:c.FONT_SIZE.XL,lineHeight:28}})},998,[34,489,490,494,737,740,741,104]);
1099__d(function(_g,r,_i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(_e,"HOUSING_ROW_VALUE_TEST_ID",{enumerable:!0,get:function(){return ae}}),_e.ProductScreen=ue;var t=r(d[0]),i=e(t),l=e(r(d[1])),n=e(r(d[2])),a=e(r(d[3])),o=e(r(d[4])),s=e(r(d[5]));r(d[6]);var c=e(r(d[7])),u=r(d[8]),S=r(d[9]),g=r(d[10]),p=r(d[11]),f=r(d[12]),b=r(d[13]),O=r(d[14]),h=r(d[15]),P=r(d[16]),y=r(d[17]),C=r(d[18]),T=r(d[19]),I=r(d[20]),A=r(d[21]),x=r(d[22]),L=r(d[23]),R=r(d[24]),v=r(d[25]),N=r(d[26]),M=r(d[27]),E=r(d[28]),j=r(d[29]),_=r(d[30]),G=r(d[31]),D=r(d[32]),F=r(d[33]),X=r(d[34]),V=r(d[35]),B=r(d[36]),H=r(d[37]),k=r(d[38]),w=r(d[39]),W=r(d[40]),z=r(d[41]),$=r(d[42]),U=r(d[43]),Z=r(d[44]),Y=r(d[45]),q=r(d[46]),Q=r(d[47]),K=r(d[48]),J=r(d[49]),ee=r(d[50]),te=r(d[51]),ie=r(d[52]);const le=(0,q.requireCartLineQuantity)(1),ne=[{lead:'Renews monthly.',body:"Subscription points reset to your chosen amount each month. Unused points do not carry over."},{lead:'Separate from purchased points.',body:"API usage draws on subscription points first, then on any points you have purchased. Purchased points are never reset."},{lead:'Cancel any time.',body:'Subscription points stay available through the end of the paid month.'}],ae='housing-variants-value',oe=30;function re(e){return'description'===e||'specs'===e}const se=(0,W.defineScreenErrorSurfaces)('Product',{productLoad:{id:'product-load',kind:'page',label:'Product detail error'},apiPointsPricing:{id:'api-points-pricing',kind:'local-banner',label:'API points pricing error'}});function de(e){const t=(e.recurringBillingInterval??'').toUpperCase(),i=e.recurringBillingIntervalCount??1;return'YEAR'===t||'MONTH'===t&&12===i}function ce(e,t,i){if(null==t)return e;const l=i?.sellingPlanAllocations?.find(e=>e.sellingPlanId===t.id);return null!=l?.planPrice?parseFloat(l.planPrice.amount):null!=t.recurringPrice?parseFloat(t.recurringPrice.amount):null!=t.fixedAmountOff?Math.max(0,e-parseFloat(t.fixedAmountOff.amount)):t.discountPercentage>0?Math.round(e*(1-t.discountPercentage/100)*100)/100:e}function ue(){const{handle:e,fitSensor:t}
1099=(0,K.useProductParams)();return(0,ie.jsx)(Se,{},`${e}::${t??''}`)}function Se(){const{handle:e,fitSensor:u}=(0,K.useProductParams)(),k=(0,K.useAppNavigation)(),{addItem:w,items:ue}=(0,Y.useCart)(),Se=(0,Q.useOrganization)(),{orgOverride:pe}=(0,G.useOrgDevOverrides)(),{selectedOrg:fe,isLoading:me}='none'!==pe.mode?{selectedOrg:pe.selectedOrg,isLoading:!1}:Se,{width:be}=(0,c.default)(),Oe=be>=768,{product:he,loading:Pe,error:ye}=(0,$.useProductDetail)(e),{data:Ce}=(0,Z.useStoreData)(),{data:Te,loading:Ie,error:Ae,retry:xe}=(0,z.useApiPointsTiers)(),{applyOverrides:Le,apiPointsTierStateOverride:Re,reviewStateOverride:ve}=(0,D.useProductDisplayDevOverrides)(),Ne=Le(he),Me=(0,W.useErrorSurface)(se.productLoad),Ee=(0,W.useErrorSurface)(se.apiPointsPricing),je=null!=ye||Me.isDevTriggered?'Product Not Found':null,Ge=(0,t.useMemo)(()=>Ne?.images??[],[Ne]),De=(0,t.useMemo)(()=>Ne?.variants??[],[Ne]),Fe=(0,t.useMemo)(()=>Ne?.options??[],[Ne]),Xe=(0,t.useMemo)(()=>Ne?.specs??[],[Ne]),Ve=(0,t.useMemo)(()=>(0,y.selectClearHousingHeroImage)(Ge),[Ge]),Be=Ne?.reviewCount??0,He=Ne?.averageRating??0,ke=null!=Ne?.averageRating,we=(0,t.useMemo)(()=>null!=Ne?{productTitle:Ne.title,productDescription:Ne.description??''}:void 0,[Ne]),We=(0,U.useSeoMeta)('Product',we),ze=(0,t.useMemo)(()=>(Ne?.sellingPlanGroups??[]).flatMap(e=>e.sellingPlans),[Ne]),$e=ze.length>0,[Ue,Ze]=(0,t.useState)(null),Ye=null!=Ne&&(0,A.shouldUseSensorVariantPicker)(Ne),qe=(0,t.useMemo)(()=>Ye?(0,A.buildSensorPickerOptions)((0,M.getProductSensorModels)(Ne),De):[],[Ye,Ne,De]),Qe=Ye&&null!=u&&qe.some(e=>e.memberHandles.includes(u))?u:null,Ke=Ue??Qe,Je=Ye&&null==Ke,et=null==Ke?void 0:qe.find(e=>e.memberHandles.includes(Ke)),tt=et?.handle??null,it=et?.name??null,lt=(0,t.useMemo)(()=>Ye?null==Ke?[]:(0,M.filterProductsBySensorModel)(De,Ke):De,[Ye,Ke,De]),nt=(0,F.useProductSelection)(Ne,Ye?Ke:u),at=Je?null:nt.variant.variant,ot=Ye&&null!=at&&!lt.some(e=>e.id===at.id)?null:at,rt=nt.sellingPlan.plan,st=nt.variant.status,dt=nt.sellingPlan.status,ct=nt.selectVariant,ut=nt.selectSellingPlan,St=(0,t.useMemo)(()=>Xe.some(e=>(0,y.isHousingVariantsSpec)(e.label))?(0,y.buildHousingVariantChoices)(De,Fe):[],[Xe,De,Fe]),{celebrating:gt,celebrate:pt,stop:ft}=(0,_.useClearPixelCelebration)(),mt=(0,t.useCallback)(e=>{ct(e.variant),pt()},[ct,pt]),bt=(0,t.useCallback)(e=>{Ze(e);const t=(0,M.filterProductsBySensorModel)(De,e),i=(0,A.resolveVariantSelection)(null,t,e).variant;null!=i&&ct(i)},[De,ct]),Ot=nt.bundleIds,ht=nt.toggleBundle,Pt=nt.selectAccessoryVariant,yt=(0,t.useMemo)(()=>{const e=Ne?.sensorModel?.handle;if(null==e||''===e)return[];const t=Ce?.products??[];return[...(0,M.filterProductsBySensorModel)(t,e)].filter(e=>e.handle!==Ne?.handle).sort((e,t)=>(e.sortOrder??Number.MAX_SAFE_INTEGER)-(t.sortOrder??Number.MAX_SAFE_INTEGER))},[Ce?.products,Ne?.sensorModel?.handle,Ne?.handle]),Ct=(0,t.useMemo)(()=>(0,M.resolveSensorFitment)(Ne?.compatibleSensorModels,ot?.compatibleSensorModels),[Ne,ot]),Tt=(0,t.useMemo)(()=>{const e=ot?.image??null;if(null==e)return Ge;return Ge.some(t=>(0,te.imageUrlsEquivalent)(t.url,e.url))?Ge:[e,...Ge]},[Ge,ot]),It=(0,t.useMemo)(()=>Tt.map((e,t)=>({accessibilityLabel:e.altText??Ne?.title??'Product image',displayUrl:e.detailUrl,fullSizeUrl:e.zoomUrl,id:e.url,thumbnailAccessibilityLabel:e.altText??`${Ne?.title??'Product'} image ${t+1}`,thumbnailUrl:e.thumbnailUrl})),[Tt,Ne?.title]),At=(0,t.useMemo)(()=>`${ot?.id??''}\0${Tt.map(e=>e.url).join('\x01')}\0${ot?.image?.url??''}`,[Tt,ot?.id,ot?.image?.url]),xt=(0,t.useMemo)(()=>{const e=new Map;for(const[t,i]of nt.accessoryVariants)null!=i.variant&&e.set(t,i.variant);return e},[nt.accessoryVariants]),Lt=(0,t.useMemo)(()=>(0,A.collectBundleSelectionIssues)(Ne?.bundleAccessories??[],nt.accessoryVariants,nt.bundleIds),[Ne,nt.accessoryVariants,nt.bundleIds]),[Rt,vt]=(0,t.useState)('description'),[Nt,Mt]=(0,t.useState)(()=>({input:(0,q.cartLineQuantityInput)(le),lastValidQuantity:le})),Et=Nt.lastValidQuantity,jt='invalid'===Nt.input.kind,[_t,Gt]=(0,t.useState)(null),Dt=(0,t.useCallback)(e=>{Gt(null),Mt(t=>({input:e,lastValidQuantity:'valid'===e.kind?e.quantity:t.lastValidQuantity}))},[]),Ft=null!=ot?parseFloat(ot.price.amount):null!=Ne?.priceRange?.minVariantPrice?parseFloat(Ne.priceRange.minVariantPrice.amount):0,Xt=$e?ce(Ft,rt,ot):Ft,Vt=null!=ot||null!=Ne?.priceRange?.minVariantPrice,Bt=null!=rt&&de(rt),Ht=Bt?'':'/mo',kt=Bt?'per billing year':'per month',wt=Vt?$e?`${(0,ee.formatMoney)(Xt)}${Ht}`:(0,ee.formatMoney)(Xt):'Price unavailable',Wt=$e&&Ft>Xt+.001,zt=(0,t.useMemo)(()=>
1099Ne?.bundleAccessories??[],[Ne]),$t=nt.sensorUsbType,Ut=(0,t.useMemo)(()=>zt.filter(e=>Ot.has(e.id)).reduce((e,t)=>{const i=xt.get(t.id);return!0!==i?.availableForSale?e:e+parseFloat(i.price.amount)},0),[zt,Ot,xt]),Zt=(Xt+Ut)*Et,Yt=!0===Ne?.requiresOrganization,qt=Yt&&!$e,Qt=Yt&&$e,Kt=qt||Qt,Jt=qt&&('loading'===Re||Ie),ei=qt&&'error'===Re||qt&&Ee.isDevTriggered?'Development override: API points pricing unavailable.':qt&&null==Re?Ae:null,ti=null!=ei,ii=Jt||ti?null:Te,[li,ni]=(0,t.useState)(null),[ai,oi]=(0,t.useState)(!1),ri=Qt?ai:null!=ii,si=null!=li&&(0,q.isCartLineQuantity)(li.dollars)?li.dollars:null,di=Yt&&null==fe,ci=nt.hasInvalidSelection,ui=!1!==Ne?.availableForSale,Si=(0,t.useMemo)(()=>qt&&null!=ot&&null!=fe?ue.find(e=>e.merchandiseId===ot.id&&e.orgId===fe.id&&null!=e.pointsTotal&&null==e.sellingPlanId)??null:null,[ue,qt,fe,ot]),gi=null==ot||di||ci||jt||Jt||ti||Kt&&null==li||Kt&&null!=li&&null==si||Yt&&me,pi=(0,t.useCallback)(async()=>{if(null!=Ne&&null!=ot&&!gi){Gt(null);try{if(Kt&&null!=li&&null!=si&&null!=fe){const e=[{key:'For',value:fe.name},{key:'ID',value:fe.id},{key:'Points',value:li.formattedPoints}],t={merchandiseId:ot.id,quantity:si,attributes:e};Qt&&null!=rt&&(t.sellingPlanId=rt.id),await w(t)}else{const e={merchandiseId:ot.id,quantity:Et};Yt&&null!=fe&&(e.attributes=[{key:'For',value:fe.name},{key:'ID',value:fe.id}]),null!=rt&&(e.sellingPlanId=rt.id),await w(e);for(const e of zt)if(Ot.has(e.id)){const t=nt.accessoryVariants.get(e.id);if(null==t||'invalid'===t.status)continue;const i=t.variant??e.variants?.[0];if(!0!==i?.availableForSale)continue;await w({merchandiseId:i.id,quantity:Et})}}k.navigate('Cart')}catch(e){Gt((0,J.errorMessage)(e,'Unable to add this item to the cart'))}}},[w,gi,zt,Kt,Qt,k,li,si,Ne,Yt,nt,Ot,fe,Et,rt,ot]);if(Pe)return(0,ie.jsx)(g.AsyncPageLayout,{status:"loading",children:(0,ie.jsx)(p.LoadingState,{message:"Loading product..."})});if(null!=je||null==Ne)return(0,ie.jsx)(g.AsyncPageLayout,{status:"error",children:(0,ie.jsx)(p.ErrorState,{message:je??'Product Not Found',surface:Me.surface,detail:ye??"The product you're looking for doesn't exist or has been removed.",onRetry:()=>{k.navigate('Store')},retryLabel:"Back to Store"})});const fi=Xe.length>0,mi=Ne.sensorModel??null,bi='Air Quality Sensors'===Ne.productType,Oi=null!=mi;return(0,ie.jsxs)(g.AsyncPageLayout,{status:"ready",children:[(0,ie.jsx)(B.WebMeta,Object.assign({},We)),(0,ie.jsxs)(o.default,{style:ge.container,children:[(0,ie.jsxs)(n.default,{style:[ge.productLayout,Oe&&ge.productLayoutWide],children:[(0,ie.jsx)(n.default,{style:[ge.imageColumn,Oe&&ge.imageColumnWide],children:(0,ie.jsx)(p.ImageGallery,{images:It,layout:"primary-with-thumbnails",preferredImageUrl:ot?.image?.url??null,viewerLabel:"Product image viewer"},At)}),(0,ie.jsxs)(n.default,{style:Oe?ge.detailsColumnWide:void 0,children:[null!=Ne.tier&&''!==Ne.tier&&(0,ie.jsxs)(a.default,{style:ge.tierLabel,children:[Ne.tier," TIER"]}),(0,ie.jsx)(a.default,{style:ge.productName,children:Ne.title}),null!=Ne.tagline&&''!==Ne.tagline&&(0,ie.jsx)(a.default,{style:ge.productTagline,children:Ne.tagline}),Be>0&&ke&&(0,ie.jsx)(n.default,{style:ge.ratingSection,children:(0,ie.jsx)(N.StarRating,{averageRating:He,reviewCount:Be,variant:"full"})}),!Kt&&(0,ie.jsxs)(n.default,{style:ge.priceRow,children:[(0,ie.jsx)(a.default,{style:ge.price,children:wt}),Wt&&(0,ie.jsx)(a.default,{style:ge.priceOriginal,children:`${(0,ee.formatMoney)(Ft)}${Bt?'':'/mo'}`}),Ut>0&&(0,ie.jsxs)(a.default,{style:ge.bundlePrice,children:["+ $",Ut," accessories"]})]}),bi&&(0,ie.jsx)(j.TrustBar,{variant:"compact",showPlantowerCorrelation:Oi}),null!=Ne.productNotice&&''!==Ne.productNotice&&(0,ie.jsxs)(n.default,{style:ge.productNotice,testID:"product-notice",children:[(0,ie.jsx)(f.AlertCircleIcon,{size:oe,color:H.COLORS.WARNING_DARK}),(0,ie.jsx)(a.default,{style:ge.productNoticeText,children:Ne.productNotice})]}),qt&&Jt&&(0,ie.jsxs)(n.default,{style:ge.apiPointsPricingLoadingPanel,children:[(0,ie.jsx)(l.default,{accessibilityLabel:"Loading API points pricing",color:H.COLORS.BRAND_PRIMARY}),(0,ie.jsx)(a.default,{style:ge.apiPointsPricingLoadingText,children:"Loading API points pricing..."})]}),qt&&ti&&(0,ie.jsx)(p.LocalErrorBanner,Object.assign({surface:Ee.surface,message:"API points pricing is unavailable.",detail:ei,retryLabel:"Retry pricing",style:ge.apiPointsPricingError},Ee.isDevTriggered||'error'===Re?{}:{onRetry:xe})),qt&&null!=ii&&(0,ie.jsx)(O.ApiPointsCalculator,{onChange:ni,tiers:ii.tiers,minimumDollars:ii.minimumPurchaseDollars,maximumDollars:S.cartLineQuantityConstraints.maximum}),Qt&&(0,ie.jsx)(E.SubscriptionAmountSection,{onChange:ni,onAvailabilityChange:oi}),!qt&&Ye&&(0,ie.jsxs)(n.default,{style:ge.configuratorCard,children:[(0,ie.jsxs)(n.default,{style:ge.configStep,children:[(0,ie.jsxs)(a.default,{style:ge.configStepLabel,children:["Your sensor",null!=it&&(0,ie.jsx)(a.default,{style:ge.configStepValue,children:`: ${it}`})]}),(0,ie.jsx)(v.SensorPicker,{appearance:"inline",models:qe,selectedHandle:tt,onSelect:bt,accessibilityLabelForModel:e=>`My sensor is ${e.name}`})]}),Je?(0,ie.jsx)(a.default,{style:ge.configHint,children:"Select your sensor to see the compatible board."}):0===lt.length?(0,ie.jsx)(a.default,{style:ge.configHint,children:"No replacement board is available for this sensor yet. Please contact support."}):(0,ie.jsx)(n.default,{style:ge.configStep,children:(0,ie.jsx)(X.VariantSelector,{variants:lt,options:Fe,selectedVariantId:ot?.id??null,onSelect:ct})})]}),!qt&&!Ye&&De.length>1&&(0,ie.jsx)(n.default,{style:ge.variantSection,children:(0,ie.jsx)(X.VariantSelector,{variants:De,options:Fe,selectedVariantId:ot?.id??null,onSelect:ct})}
1099),'invalid'===st&&(0,ie.jsx)(a.default,{style:ge.invalidSelectionMessage,children:null!=ot?`${ot.title} is currently out of stock.`:'Your previous selection is no longer available. Please choose another option above.'}),!qt&&!Ye&&(0,ie.jsx)(R.SensorFitment,{fitment:Ct,linkToBrowse:!0}),ui&&$e&&(0,ie.jsxs)(n.default,{style:ge.sellingPlanSection,children:[(0,ie.jsx)(a.default,{style:ge.sellingPlanLabel,children:"Billing period"}),(0,ie.jsx)(n.default,{style:ge.sellingPlanOptions,children:ze.map(e=>{const t=rt?.id===e.id;return(0,ie.jsxs)(b.RadioOption,{checked:t,style:[ge.sellingPlanOption,t&&ge.sellingPlanOptionSelected],onPress:()=>{ut(e)},accessibilityLabel:e.name,children:[(0,ie.jsx)(a.default,{style:[ge.sellingPlanOptionText,t&&ge.sellingPlanOptionTextSelected],children:e.option??e.name}),e.discountPercentage>0&&(0,ie.jsxs)(a.default,{style:ge.sellingPlanDiscount,children:["Save ",Math.round(e.discountPercentage),"%"]})]},e.id)})})]}),ui&&$e&&'invalid'===dt&&(0,ie.jsx)(a.default,{style:ge.invalidSelectionMessage,children:"Your previous billing period is no longer offered. Please pick one above."}),ui&&$e&&(0,ie.jsx)(n.default,{style:ge.subscriptionFootnote,children:ne.map(({lead:e,body:t})=>(0,ie.jsxs)(a.default,{style:ge.subscriptionFootnoteText,children:[(0,ie.jsx)(a.default,{style:ge.subscriptionFootnoteLead,children:e})," ",t]},e))}),ui&&!qt&&!$e&&null!=ot&&(0,ie.jsxs)(n.default,{style:ge.quantitySection,children:[(0,ie.jsx)(a.default,{style:ge.quantityLabel,children:"Quantity"}),(0,ie.jsx)(x.QuantityStepper,{value:Nt.input,onChange:Dt,itemLabel:Ne.title})]}),(0,ie.jsx)(h.BundleSection,{accessories:zt,selectedIds:Ot,selectedVariants:xt,sensorUsbType:$t,quantity:Et,onToggle:ht,onVariantSelect:Pt}),Lt.usbIncompatibleNames.length>
10990&&(0,ie.jsx)(a.default,{style:ge.invalidSelectionMessage,children:`${Lt.usbIncompatibleNames.join(', ')} is not compatible with your sensor's USB type. Please pick a compatible variant above or remove it from your bundle.`}),Lt.unavailableNames.length>0&&(0,ie.jsx)(a.default,{style:ge.invalidSelectionMessage,children:`${Lt.unavailableNames.join(', ')} is not available for purchase. Please pick an available variant above or remove it from your bundle.`}),Yt&&(0,ie.jsx)(I.ProductOrgPicker,{cadence:Qt?'monthly':'one-time',devOverride:'none'!==pe.mode?{selectedOrg:pe.selectedOrg,availableOrgs:pe.availableOrgs,organizationFromDeveloperPortalLink:pe.organizationFromDeveloperPortalLink,isAuthenticated:'signed-in-with-orgs'===pe.mode||'signed-in-no-orgs'===pe.mode}:void 0,purchaseResult:null!=li?{totalPoints:li.totalPoints,pointsPerDollar:li.pointsPerDollar}:null}),null!=_t&&(0,ie.jsx)(a.default,{style:ge.invalidSelectionMessage,accessibilityRole:"alert",children:_t}),ui?(0,ie.jsx)(s.default,{style:[ge.addToCartButton,gi&&ge.addToCartDisabled],onPress:()=>{pi()},disabled:gi,accessibilityRole:"button",accessibilityLabel:Yt&&me?'Add to cart disabled - loading organizations':jt?'Add to cart disabled - enter a valid quantity':Jt?'Add to cart disabled - loading API points pricing':ti?'Add to cart disabled - API points pricing unavailable':di?'Add to cart disabled - select an organization first':Qt&&!ai?'Add to cart disabled - subscription pricing unavailable':Kt&&null==li?'Add to cart disabled - enter a dollar amount first':ci?'Add to cart disabled - resolve incompatible selections first':Kt&&null!=li?null!=Si?`Update cart to ${li.formattedPoints} points - ${(0,ee.formatMoney)(li.dollars)}`:Qt?`Subscribe for ${li.formattedPoints} points a month - ${(0,ee.formatMoney)(li.dollars)} ${kt}`:`Add ${li.formattedPoints} points to cart - ${(0,ee.formatMoney)(li.dollars)}`:Vt?$e?`Add ${Ne.title} to cart - ${(0,ee.formatMoney)(Xt)} ${kt}`:`Add ${Ne.title} to cart - ${(0,ee.formatMoney)(Zt)}`:`Add ${Ne.title} to cart`,children:(0,ie.jsx)(a.default,{style:ge.addToCartText,children:Kt?null!=li?null!=Si?`Update Cart - ${(0,ee.formatMoney)(li.dollars)}`:Qt?`Subscribe - ${(0,ee.formatMoney)(li.dollars)}${Ht}`:`Add to Cart - ${(0,ee.formatMoney)(li.dollars)}`:ri?'Enter an Amount':'Add to Cart':Vt?jt?'Enter a Valid Quantity':$e?`Subscribe - ${(0,ee.formatMoney)(Xt)}${Ht}`:`Add to Cart - ${(0,ee.formatMoney)(Zt)}`:'Add to Cart'})}):(0,ie.jsx)(n.default,{accessible:!0,accessibilityLabel:"Product sold out",style:ge.outOfStockBanner,children:(0,ie.jsx)(a.default,{style:ge.outOfStockText,children:"Sold Out"})})]})]}),(0,ie.jsxs)(n.default,{style:ge.tabSection,children:[(0,ie.jsx)(V.TabBar,{tabs:[{key:'description',label:'Description'},...fi?[{key:'specs',label:'Specifications'}]:[]],activeTab:Rt,onTabChange:e=>{re(e)&&vt(e)},variant:"underline",style:ge.tabDivider}),(0,ie.jsxs)(n.default,{style:ge.tabContent,children:['description'===Rt&&(null!=Ne.descriptionHtml&&''!==Ne.descriptionHtml?(0,ie.jsx)(T.ProductDescriptionHtml,{html:Ne.descriptionHtml,fallbackText:Ne.description??''}):(0,ie.jsx)(a.default,{style:ge.descriptionText,children:Ne.description})),'specs'===Rt&&fi&&(0,ie.jsx)(n.default,{style:ge.specsTable,children:Xe.map((e,t)=>{const l=(0,y.isHousingVariantsSpec)(e.label)&&St.length>0;return(0,ie.jsxs)(n.default,{style:[ge.specRow,t%2==0&&ge.specRowEven],children:[(0,ie.jsx)(a.default,{style:ge.specLabel,children:(0,M.getProductSpecLabel)(e.label,t)}),l?(0,ie.jsx)(n.default,{style:ge.housingValues,testID:ae,accessible:!0,accessibilityRole:"text",accessibilityLabel:St.map(e=>e.value).join(y.HOUSING_VARIANT_VALUES_SEPARATOR),children:St.map((e,t)=>(0,ie.jsxs)(i.default.Fragment,{children:[t>0&&(0,ie.jsx)(a.default,{style:ge.housingValueText,children:y.HOUSING_VARIANT_VALUES_SEPARATOR}),e.celebrates?(0,ie.jsx)(P.ClearPixelTeaser,{label:e.value,onPress:()=>{mt(e)},textStyle:ge.housingValueText}):(0,ie.jsx)(a.default,{style:ge.housingValueText,children:e.value})]},e.value))}):(0,ie.jsx)(a.default,{style:ge.specValue,children:(0,M.getProductSpecValue)(e.value)})]},(0,M.getProductSpecKey)(e.label,t))})}),(0,ie.jsx)(P.ClearPixelCelebration,{visible:gt,onDismiss:ft,productImageUrl:Ve?.detailUrl??null,productImageAlt:Ve?.altText??y.CLEAR_HOUSING_HERO_ALT_TEXT})]})]}),(0,ie.jsx)(L.ReviewSection,{handle:e,averageRating:ke?He:null,reviewCount:Be,reviewStateOverride:ve}),null!=mi&&yt.length>0&&(0,ie.jsxs)(n.default,{style:ge.partsSection,testID:"replacement-parts-section",children:[(0,ie.jsx)(a.default,{style:ge.partsTitle,children:"Replacement parts & accessories"}),(0,ie.jsx)(a.default,{style:ge.partsSubtitle,children:`Genuine parts and accessories that fit your ${mi.name}.`}),(0,ie.jsx)(n.default,{style:ge.partsGrid,children:yt.map(e=>(0,ie.jsx)(C.ProductCard,{product:e,fitSensorHandle:mi.handle},e.handle))})]}),bi&&(0,ie.jsx)(j.TrustBar,{variant:"full",showPlantowerCorrelation:Oi})]})]})}const ge=(0,u.createStyles)({apiPointsPricingError:{marginTop:k.SPACING.LG},apiPointsPricingLoadingPanel:{alignItems:'center',backgroundColor:H.COLORS.BG_MUTED,borderColor:H.COLORS.BORDER_LIGHT,borderRadius:12,borderWidth:1,marginTop:k.SPACING.LG,padding:k.SPACING.LG},apiPointsPricingLoadingText:{color:H.COLORS.TEXT_DIM,fontSize:w.FONT_SIZE.MD,marginTop:k.SPACING.SM},container:{backgroundColor:H.COLORS.TEXT_INVERSE,flex:1},productLayout:{alignSelf:'center',maxWidth:1100,padding:k.SPACING.XXL,width:'100%'},productLayoutWide:{flexDirection:'row',gap:k.SPACING.MASSIVE,paddingVertical:k.SPACING.HUGE},imageColumn:{marginBottom:k.SPACING.XXL},imageColumnWide:{flex:1,marginBottom:0},detailsColumnWide:{flex:1,maxWidth:480},tierLabel:{color:H.COLORS.ACTION_PRIMARY,fontSize:w.FONT_SIZE.XS,fontWeight:'700',letterSpacing:2,marginBottom:k.SPACING.SM},productName:Object.assign({color:H.COLORS.TEXT_HEADING,fontSize:w.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:k.SPACING.SM},{fontSize:w.FONT_SIZE.DISPLAY_MD}),productTagline:Object.assign({color:H.COLORS.TEXT_SECONDARY,fontSize:w.FONT_SIZE.LG,lineHeight:24,marginBottom:k.SPACING.XL},{fontSize:w.FONT_SIZE.XL,lineHeight:28}),ratingSection:{marginBottom:k.SPACING.LG},priceRow:{alignItems:'baseline',flexDirection:'row',gap:k.SPACING.SM,marginBottom:k.SPACING.XL},price:{color:H.COLORS.TEXT_HEADING,fontSize:w.FONT_SIZE.DISPLAY_MD,fontWeight:'bold'},priceOriginal:{color:H.COLORS.TEXT_GHOST,fontSize:w.FONT_SIZE.LG,fontWeight:'500',textDecorationLine:'line-through'},bundlePrice:{color:H.COLORS.ACTION_PRIMARY,fontSize:w.FONT_SIZE.MD,fontWeight:'500'},subscriptionFootnote:{gap:k.SPACING.XS,marginTop:k.SPACING.MD},subscriptionFootnoteText:{color:H.COLORS.TEXT_SOFT,fontSize:w.FONT_SIZE.XS,lineHeight:18},subscriptionFootnoteLead:{fontWeight:'600'},productNotice:{alignItems:'center',backgroundColor:H.COLORS.WARNING_BANNER_BG,borderColor:H.COLORS.AMBER_400,borderRadius:8,borderWidth:1,flexDirection:'row',gap:k.SPACING.MD,marginBottom:k.SPACING.XL,marginTop:k.SPACING.XL,paddingHorizontal:k.SPACING.LG,paddingVertical:14},productNoticeText:{color:H.COLORS.AMBER_900,flexShrink:1,fontSize:15,fontWeight:'500',lineHeight:22},invalidSelectionMessage:{color:H.COLORS.RED_MUTED,fontSize:w.FONT_SIZE.SM,lineHeight:20,marginTop:k.SPACING.MD},variantSection:{marginTop:k.SPACING.XL},configuratorCard:{backgroundColor:H.COLORS.BG_LIGHT,borderColor:H.COLORS.BORDER_SUBTLE,borderRadius:12,borderWidth:1,gap:k.SPACING.LG,marginTop:k.SPACING.XL,padding:k.SPACING.LG},configStep:{gap:k.SPACING.MD},configStepLabel:{color:H.COLORS.TEXT_DARK,fontSize:w.FONT_SIZE.MD,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},configStepValue:{color:H.COLORS.TEXT_SOFT,fontWeight:'400',letterSpacing:0,textTransform:'none'},configHint:{color:H.COLORS.TEXT_SOFT,fontSize:w.FONT_SIZE.SM,lineHeight:20},sellingPlanSection:{marginTop:k.SPACING.XL},sellingPlanLabel:{color:H.COLORS.TEXT_DARK,fontSize:w.FONT_SIZE.SM,fontWeight:'600',marginBottom:k.SPACING.SM},sellingPlanOptions:{flexDirection:'row',gap:k.SPACING.SM},sellingPlanOption:{alignItems:'center',borderColor:H.COLORS.BORDER,borderRadius:8,borderWidth:2,flex:1,paddingHorizontal:k.SPACING.MD,paddingVertical:k.SPACING.MD},sellingPlanOptionSelected:{backgroundColor:H.COLORS.BG_NEAR_WHITE,borderColor:H.COLORS.ACTION_PRIMARY},sellingPlanOptionText:{color:H.COLORS.TEXT_DIM,fontSize:w.FONT_SIZE.MD,fontWeight:'600'},sellingPlanOptionTextSelected:{color:H.COLORS.ACTION_PRIMARY},sellingPlanDiscount:{color:H.COLORS.SUCCESS,fontSize:w.FONT_SIZE.XS,fontWeight:'700',marginTop:2},quantitySection:{alignItems:'flex-start',gap:k.SPACING.SM,marginTop:k.SPACING.XL},quantityLabel:{color:H.COLORS.TEXT_DARK,fontSize:w.FONT_SIZE.SM,fontWeight:'600'},outOfStockBanner:{alignItems:'center',backgroundColor:H.COLORS.BG_LIGHT,borderColor:H.COLORS.BORDER,borderRadius:10,borderWidth:1,marginTop:k.SPACING.XXL,paddingVertical:k.SPACING.LG},outOfStockText:{color:H.COLORS.TEXT_GHOST,fontSize:w.FONT_SIZE.LG,fontWeight:'600'},addToCartButton:{alignItems:'center',backgroundColor:H.COLORS.ACTION_PRIMARY,borderRadius:10,marginTop:k.SPACING.XXL,paddingVertical:k.SPACING.MD},addToCartDisabled:{opacity:.6},addToCartText:{color:H.COLORS.TEXT_INVERSE,fontSize:w.FONT_SIZE.XL,fontWeight:'700'},tabSection:{alignSelf:'center',maxWidth:800,paddingHorizontal:k.SPACING.XXL,paddingVertical:k.SPACING.HUGE,width:'100%'},tabDivider:{borderBottomColor:H.COLORS.BORDER,borderBottomWidth:1},tabContent:{paddingVertical:k.SPACING.SM},partsSection:{alignSelf:'center',backgroundColor:H.COLORS.BG_LIGHT,maxWidth:1200,paddingHorizontal:k.SPACING.XXL,paddingVertical:k.SPACING.MASSIVE,width:'100%'},partsTitle:{color:H.COLORS.TEXT_HEADING,fontSize:w.FONT_SIZE.XXL,fontWeight:'bold',marginBottom:k.SPACING.SM,textAlign:'center'},partsSubtitle:{color:H.COLORS.TEXT_SOFT,fontSize:w.FONT_SIZE.LG,marginBottom:k.SPACING.XXL,textAlign:'center'},partsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:k.SPACING.XXL,justifyContent:'center',maxWidth:1200,width:'100%'},descriptionText:{color:H.COLORS.TEXT_DIM,fontFamily:w.FONT_FAMILY.SANS,fontSize:w.FONT_SIZE.LG,lineHeight:28},specsTable:{borderColor:H.COLORS.BORDER,borderRadius:8,borderWidth:1,overflow:'hidden'},specRow:{flexDirection:'row',paddingHorizontal:k.SPACING.LG,paddingVertical:k.SPACING.MD},specRowEven:{backgroundColor:H.COLORS.BG_LIGHT},specLabel:{color:H.COLORS.TEXT_DARK,flex:1,fontFamily:w.FONT_FAMILY.SANS,fontSize:w.FONT_SIZE.MD,fontWeight:'600'},specValue:{color:H.COLORS.TEXT_SECONDARY,flex:2,fontFamily:w.FONT_FAMILY.SANS,fontSize:w.FONT_SIZE.MD},housingValues:{flex:2,flexDirection:'row',flexWrap:'wrap'},housingValueText:{color:H.COLORS.TEXT_SECONDARY,fontFamily:w.FONT_FAMILY.SANS,fontSize:w.FONT_SIZE.MD}});var pe=ue},999,[34,410,276,222,283,488,95,552,489,471,567,512,1000,820,1001,1003,1007,1023,1024,1027,1028,1025,721,1029,1032,1033,1026,1004,1034,1036,1037,1038,1040,1042,1006,732,565,490,493,494,557,1043,1044,562,1045,617,620,962,505,468,722,540,104]);
1100__d(function(g,r,i,a,m,_e,d){"use strict";
1100Object.defineProperty(_e,'__esModule',{value:!0}),_e.AlertCircleIcon=function(t){const{size:e=24,color:l}=t,c=l??n.COLORS.WARNING_DARK,h=e/u;return(0,s.jsxs)(o.default,{accessibilityElementsHidden:!0,style:y(e),children:[(0,s.jsx)(o.default,{style:R(e,h,c)}),(0,s.jsx)(o.default,{style:j(h,c)}),(0,s.jsx)(o.default,{style:C(h,c)})]})},r(d[0]);var t,e=r(d[1]),o=(t=e)&&t.__esModule?t:{default:t},n=r(d[2]),s=r(d[3]);const u=24,l=2,c=2.8,h=4.2,b=9,f=.3333333333333333,_=4.2,p=15.6;function y(t){return{alignItems:'center',height:t,width:t}}function R(t,e,o){return{borderColor:o,borderRadius:t/2,borderWidth:l*e,height:t,position:'absolute',width:t}}function j(t,e){const o=c*t;return{backgroundColor:e,borderRadius:o*f,height:b*t,position:'absolute',top:h*t,width:o}}function C(t,e){const o=_*t;return{backgroundColor:e,borderRadius:o/2,height:o,position:'absolute',top:p*t,width:o}}},1000,[34,276,490,104]);
1101__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ApiPointsCalculator=function({onChange:e,tiers:u,minimumDollars:S,maximumDollars:T,variant:C="one-time"}){const h=f[C],p=(0,t.useId)(),[y,E]=(0,t.useState)(()=>String(S)),A=(0,t.useMemo)(()=>(0,s.parseCartLineQuantityInput)(y),[y]),x='valid'===A.kind?A.quantity:A.adjustableQuantity,D=null!=x&&x<S,I=null!=x&&x>T||'invalid'===A.kind&&'above-maximum'===A.reason,P='invalid'===A.kind&&'not-whole-number'===A.reason?'Enter a whole dollar amount':I?`${h.maximumLabel} is $${T.toLocaleString('en-US')}`:D?`${h.minimumLabel} is $${S}`:null,_=(0,t.useMemo)(()=>'valid'!==A.kind||A.quantity>T?null:(0,b.calculateApiPoints)(A.quantity,u,S),[A,u,S,T]);(0,t.useEffect)(()=>{e(null==_?null:{dollars:_.dollars,formattedPoints:R(_.totalPoints),totalPoints:_.totalPoints,pointsPerDollar:_.pointsPerDollar})},[_,e]);const M=(0,t.useCallback)(e=>{E((0,s.parseCartLineQuantityInput)(e).text)},[]);return(0,O.jsxs)(n.default,{style:L.container,children:[(0,O.jsx)(l.default,{style:L.sectionTitle,children:h.title}),(0,O.jsxs)(l.default,{style:L.sectionSubtitle,children:["Enter ",h.amountNoun," ($",S," minimum). Higher amounts unlock better rates."]}),(0,O.jsxs)(n.default,{style:L.inputRow,children:[(0,O.jsx)(l.default,{style:L.dollarSign,children:"$"}),(0,O.jsx)(o.default,{style:[L.input,null!=P&&L.inputError],value:y,onChangeText:M,keyboardType:"number-pad",placeholder:`${S}`,placeholderTextColor:c.COLORS.TEXT_PLACEHOLDER,accessibilityLabel:h.accessibilityLabel,accessibilityHint:`Enter a whole dollar amount from ${S} to ${T} dollars`,"aria-describedby":null==P?void 0:p,"aria-invalid":null!=P}),(0,O.jsx)(l.default,{style:L.currencyLabel,children:"USD"})]}),null!=P&&(0,O.jsx)(l.default,{nativeID:p,style:L.errorText,accessibilityRole:"alert",children:P}),(0,O.jsxs)(n.default,{style:L.tierTable,children:[(0,O.jsx)(l.default,{style:L.tierTableTitle,children:h.tierTableTitle}),u.map(e=>{const t=_?.pointsPerDollar===e.pointsPerDollar;return(0,O.jsxs)(n.default,{style:[L.tierRow,t&&L.tierRowActive],children:[(0,O.jsx)(l.default,{style:[L.tierLabel,t&&L.tierLabelActive],children:e.label}),(0,O.jsxs)(l.default,{style:[L.tierRate,t&&L.tierRateActive],children:[R(e.pointsPerDollar)," pts/$"]})]},e.minSpendDollars)})]})]})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3])),s=r(d[4]),u=r(d[5]),c=r(d[6]),S=r(d[7]),T=r(d[8]),b=r(d[9]),O=r(d[10]);function R(e){return e.toLocaleString('en-US')}const f={'one-time':{accessibilityLabel:'Dollar amount for API points purchase',amountNoun:'a dollar amount',maximumLabel:'Maximum purchase',minimumLabel:'Minimum purchase',tierTableTitle:'Volume pricing tiers',title:'Purchase Amount'},subscription:{accessibilityLabel:'Monthly dollar amount for API points subscription',amountNoun:'a monthly amount',maximumLabel:'Maximum monthly amount',minimumLabel:'Minimum monthly amount',tierTableTitle:'Monthly subscription rates',title:'Monthly Amount'}};const L=(0,u.createStyles)({container:{marginTop:S.SPACING.LG},currencyLabel:{color:c.COLORS.TEXT_SOFT,fontSize:T.FONT_SIZE.MD,fontWeight:'600',marginLeft:S.SPACING.SM},dollarSign:{color:c.COLORS.TEXT_DARK,fontSize:T.FONT_SIZE.XL,fontWeight:'700',marginRight:4},errorText:{color:c.COLORS.ERROR,fontSize:T.FONT_SIZE.SM,marginTop:S.SPACING.XS}
1101,input:{borderColor:c.COLORS.BORDER,borderRadius:8,borderWidth:2,color:c.COLORS.TEXT_DARK,flex:1,fontSize:T.FONT_SIZE.XL,fontWeight:'700',paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},inputError:{borderColor:c.COLORS.ERROR},inputRow:{alignItems:'center',flexDirection:'row',marginTop:S.SPACING.SM},sectionSubtitle:{color:c.COLORS.TEXT_DIM,fontSize:T.FONT_SIZE.SM,lineHeight:20,marginTop:2},sectionTitle:{color:c.COLORS.TEXT_DARK,fontSize:T.FONT_SIZE.MD,fontWeight:'700'},tierLabel:{color:c.COLORS.TEXT_SOFT,flex:1,fontSize:T.FONT_SIZE.MD},tierLabelActive:{color:c.COLORS.TEXT_DARK,fontWeight:'700'},tierRate:{color:c.COLORS.TEXT_SOFT,fontSize:T.FONT_SIZE.MD,textAlign:'right'},tierRateActive:{color:c.COLORS.TEXT_DARK,fontWeight:'700'},tierRow:{borderBottomColor:c.COLORS.BORDER,borderBottomWidth:1,borderLeftColor:c.COLORS.TRANSPARENT,borderLeftWidth:3,flexDirection:'row',paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.SM},tierRowActive:{backgroundColor:c.COLORS.SUCCESS_BG,borderLeftColor:c.COLORS.SUCCESS,borderRadius:4},tierTable:{marginTop:S.SPACING.LG},tierTableTitle:{color:c.COLORS.TEXT_SOFT,fontSize:T.FONT_SIZE.MD,fontWeight:'600',marginBottom:S.SPACING.SM}})},1001,[34,222,394,276,620,489,490,493,494,1002,104]);
1102__d(function(g,r,i,a,m,e,d){"use strict";function l(l,n,t){if(l<t)return null;let o=null;for(const t of n)l>=t.minSpendDollars&&(o=t);return o}Object.defineProperty(e,'__esModule',{value:!0}),e.getApiPointsTier=l,e.calculateApiPoints=function(n,t,o){if(!Number.isInteger(n)||n<o)return null;const u=l(n,t,o);if(null===u)return null;return{dollars:n,pointsPerDollar:u.pointsPerDollar,totalPoints:n*u.pointsPerDollar,tierLabel:u.label}}},1002,[]);
1103__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BundleOption=T,_e.BundleSection=function({accessories:e,selectedIds:l,selectedVariants:n,sensorUsbType:s,quantity:c,onToggle:S,onVariantSelect:u}){if(0===e.length)return null;return(0,h.jsxs)(t.default,{style:R.section,children:[(0,h.jsx)(o.default,{style:R.sectionTitle,children:"Complete Your Setup"}),(0,h.jsx)(o.default,{style:R.sectionSubtitle,children:"Add these accessories for a ready-to-install package"}),(0,h.jsx)(t.default,{style:R.optionsList,children:e.map(e=>{const t=e.variants??[],o=e.options??[],O=o.findIndex(e=>e.name===b),C=null!=s&&-1!==O?t.filter(e=>(0,f.getVariantUsbType)(e,o,O)===s):t;if(0===C.length)return null;const R=n.get(e.id)??C[0];if(null==R)return null;const p=Object.assign({},e,{variants:C,options:o});return(0,h.jsx)(T,{accessory:p,isSelected:l.has(e.id),selectedVariant:R,quantity:c,onToggle:S,onVariantSelect:u},e.id)})})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),n=e(r(d[4]));r(d[5]);var s=r(d[6]),c=r(d[7]),S=r(d[8]),u=r(d[9]),O=r(d[10]),f=r(d[11]),C=r(d[12]),h=r(d[13]);function T({accessory:e,isSelected:s,selectedVariant:c,quantity:S,onToggle:u,onVariantSelect:f}){const T=parseFloat(c.price.amount),b=T*S,p=S>1,I=e.variants??[],y=e.options??[],x=I.length>1,L=!c.availableForSale,_=I.some(e=>e.availableForSale),E=!s&&!_;return(0,h.jsxs)(t.default,{style:[R.card,s&&!L&&R.cardSelected,L&&R.cardSoldOut],children:[(0,h.jsxs)(n.default,{style:[R.cardToggle,E&&R.cardToggleDisabled],onPress:()=>{E||u(e.id)},disabled:E,accessibilityRole:"checkbox",accessibilityState:{checked:s,disabled:E},accessibilityLabel:L?`${e.name} - Sold Out`:p?`${e.name} - ${(0,O.formatMoney)(T)} each, ${S} for ${(0,O.formatMoney)(b)}`:`${e.name} - ${(0,O.formatMoney)(T)}`,children:[(0,h.jsx)(l.default,{source:{uri:e.imageUrl},style:[R.image,L&&R.imageSoldOut],resizeMode:"contain"}),(0,h.jsxs)(t.default,{style:R.info,children:[(0,h.jsxs)(t.default,{style:R.headerLine,children:[(0,h.jsx)(o.default,{style:[R.name,L&&R.textSoldOut],children:e.name}),(0,h.jsxs)(t.default,{style:R.priceColumn,children:[p&&(0,h.jsx)(o.default,{style:R.priceMultiplier,children:`\xd7 ${S}`}),(0,h.jsx)(o.default,{style:[R.price,L&&R.textSoldOut],children:`+ ${(0,O.formatMoney)(b)}`})]})]}),null!=e.description&&''!==e.description&&(0,h.jsx)(o.default,{style:R.description,children:e.description})]}),(0,h.jsx)(t.default,{style:[R.checkbox,s&&R.checkboxSelected,E&&R.checkboxDisabled],children:(0,h.jsx)(o.default,{style:R.checkmark,children:s?'\u2713':''})})]}),s&&x&&(0,h.jsx)(t.default,{style:R.variantSection,children:(0,h.jsx)(C.VariantSelector,{compact:!0,variants:I,options:y,selectedVariantId:c.id,onSelect:t=>{f(e.id,t)}})}),L&&(0,h.jsx)(o.default,{style:R.soldOutWarning,children:"This combination is currently sold out."})]})}const b='USB Type';const R=(0,s.createStyles)({card:{backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER,borderRadius:12,borderWidth:2,overflow:'hidden'},cardSelected:{backgroundColor:c.COLORS.BRAND_BG_SELECTED,borderColor:c.COLORS.ACTION_PRIMARY},cardSoldOut:{backgroundColor:c.COLORS.BG_FAINT,borderColor:c.COLORS.BORDER}
1103,cardToggle:Object.assign({alignItems:'flex-start',flexDirection:'row',gap:S.SPACING.MD,padding:S.SPACING.LG},{cursor:'pointer'}),cardToggleDisabled:Object.assign({},{cursor:'default'}),checkbox:{alignItems:'center',borderColor:c.COLORS.BORDER_SUBTLE,borderRadius:6,borderWidth:2,height:24,justifyContent:'center',width:24},checkboxDisabled:{backgroundColor:c.COLORS.BG_CHIP,borderColor:c.COLORS.BORDER},checkboxSelected:{backgroundColor:c.COLORS.ACTION_PRIMARY,borderColor:c.COLORS.ACTION_PRIMARY},checkmark:{color:c.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.MD,fontWeight:'bold'},description:{color:c.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.SM,lineHeight:18,marginBottom:S.SPACING.XS},headerLine:{alignItems:'flex-start',flexDirection:'row',gap:S.SPACING.SM,justifyContent:'space-between'},image:{backgroundColor:c.COLORS.BG_SUBTLE,borderRadius:8,height:56,width:56},imageSoldOut:{opacity:.5},info:{flex:1},name:{color:c.COLORS.TEXT_HEADING,flex:1,fontSize:u.FONT_SIZE.LG,fontWeight:'600',marginBottom:S.SPACING.MICRO},optionsList:{gap:S.SPACING.MD},price:{color:c.COLORS.ACTION_PRIMARY,fontSize:u.FONT_SIZE.MD,fontWeight:'600'},priceColumn:{alignItems:'flex-end',flexShrink:0},priceMultiplier:{color:c.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.XS,fontWeight:'600'},section:{marginTop:S.SPACING.XXL},sectionSubtitle:{color:c.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.MD,marginBottom:S.SPACING.LG},sectionTitle:{color:c.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.XL,fontWeight:'700',marginBottom:S.SPACING.XS},soldOutWarning:{color:c.COLORS.RED_MUTED,fontSize:u.FONT_SIZE.XS,paddingBottom:S.SPACING.MD,paddingHorizontal:S.SPACING.LG},textSoldOut:{color:c.COLORS.TEXT_CAPTION},variantSection:{paddingBottom:S.SPACING.LG,paddingHorizontal:S.SPACING.LG}})},1003,[34,276,222,328,488,95,489,490,493,494,722,1004,1006,104]);
1104__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.getVariantUsbType=o,e.isVariantCompatibleWithUsbType=function(n,u,l){const c=u.options??[],s=c.findIndex(n=>n.name===t);if(-1===s)return!0;return o(n,c,s)===l},e.getProductOptionName=function(n,t){return null!=n&&''!==n?n:`Option ${t+1}`},e.getProductOptionKey=function(n,t){return null!=n&&''!==n?`${n}-${t}`:`option-${t}`},e.getProductSpecLabel=function(n,t){return null!=n&&''!==n?n:`Specification ${t+1}`},e.getProductSpecKey=function(n,t){return null!=n&&''!==n?`${n}-${t}`:`spec-${t}`},e.getProductSpecValue=function(n){return null!=n&&''!==n?n:'N/A'},e.resolveSensorFitment=function(n,t){if(null!=t&&t.length>0)return{models:t,scope:'variant'};if(null!=n&&n.length>0)return{models:n,scope:'product'};return{models:[],scope:'none'}},e.getProductSensorModels=l,e.collectSensorModels=function(n){const t=[];for(const o of n)t.push(...l(o));return u(t).sort((n,t)=>n.name.localeCompare(t.name))},e.productFitsSensorModel=c,e.filterProductsBySensorModel=function(n,t){return n.filter(n=>c(n,t))};var n=r(d[0]);const t='USB Type';function o(t,o,u){if(null!=t.effectiveUsbType&&''!==t.effectiveUsbType)return t.effectiveUsbType;if(-1===u)return null;return(0,n.getVariantOptionValuesOrdered)(t,o)[u]??null}function u(n){const t=new Set,o=[];for(const u of n)t.has(u.handle)||(t.add(u.handle),o.push(u));return o}function l(n){const t=[];null!=n.compatibleSensorModels&&t.push(...n.compatibleSensorModels);for(const o of n.variants??[])null!=o.compatibleSensorModels&&t.push(...o.compatibleSensorModels);return u(t)}function c(n,t){return l(n).some(n=>n.handle===t)}},1004,[1005]);
1105__d(function(g,r,_i,a,m,e,d){"use strict";function n(n){return n.split(' / ').map(n=>n.trim())}function t(n,t){const l=n.selectedOptions;if(null==l)return null;const u=l.find(n=>n.name===t);return u?.value??null}Object.defineProperty(e,'__esModule',{value:!0}),e.parseVariantTitle=n,e.getVariantOptionValuesOrdered=function(l,u){if(0===u.length)return[];const i=l.selectedOptions;if(null!=i&&i.length>0){const n=u.map(n=>{const u=n.name;return null==u||''===u?null:t(l,u)});if(n.every(n=>null!=n))return n}const s=n(l.title);return u.map((n,t)=>s[t]??null)}},1005,[]);
1106__d(function(g,r,_i,a,m,_e,d){"use strict";
1106function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.VariantSelector=function({variants:e,options:u,selectedVariantId:i,onSelect:c,compact:s=!1}){const R=u.length,x=(0,t.useMemo)(()=>{const t=e.find(e=>e.id===i);return null==t?new Array(R).fill(null):(0,S.getVariantOptionValuesOrdered)(t,u)},[e,i,R,u]),[A,_]=(0,t.useState)(x);(0,t.useEffect)(()=>{_(x)},[x]);const N=(0,t.useCallback)((t,l)=>{_(o=>{const n=[...o];n[t]=l;for(let l=t+1;l<R;l++){const t=u[l];if(null==t)continue;const o=n[l];null!=o&&T(e,u,l,o,n)||(n[l]=L(t,e,u,l,n))}const i=n.filter(e=>null!=e);if(i.length===R){const t=C(e,u,i);null!=t&&c(t)}return n})},[e,u,R,c]);if(0===R)return(0,p.jsx)(l.default,{});const B=u[0];if(1===R&&null!=B&&B.values.length<=1)return(0,p.jsx)(l.default,{});const M=(0,f.getProductOptionName)(B?.name??null,0);return(0,p.jsx)(l.default,{style:[h.container,s&&h.containerCompact],children:u.map((t,i)=>{const c=(0,f.getProductOptionName)(t.name,i),S=R>1?`${i+1}. ${c}`:c,C=I(i,A),L=A.slice(0,i).filter(e=>null!=e).join(' + '),x=t.values.filter(t=>b(e,u,i,t)),_=C?x.filter(t=>T(e,u,i,t,A)):[],B=i>0&&C&&1===x.length&&1===_.length,E=A[i];return(0,p.jsxs)(l.default,{style:[h.optionGroup,s&&h.optionGroupCompact],children:[(0,p.jsxs)(o.default,{style:[h.optionLabel,s&&h.optionLabelCompact],children:[S,!B&&null!=E&&(0,p.jsx)(o.default,{style:h.selectedValueLabel,children:`: ${E}`})]}),!C&&(0,p.jsx)(o.default,{style:[h.stepHint,s&&h.stepHintCompact],children:`Select ${M} first`}),B&&null!=_[0]?(0,p.jsx)(n.default,{disabled:!0,style:[h.valueButton,s&&h.valueButtonCompact,h.valueButtonSelected,s&&h.valueButtonSelectedCompact],accessibilityRole:"text",accessibilityLabel:`${c}: ${_[0]} (only option)`,children:(0,p.jsx)(o.default,{style:[h.valueText,h.valueTextSelected,s&&h.valueTextSelectedCompact],numberOfLines:s?1:2,children:_[0]})}):(0,p.jsx)(l.default,{style:h.valuesRow,children:x.map(t=>{const l=E===t,n=C&&T(e,u,i,t,A),S=n&&v(e,u,i,t,A),f=C&&!n,R=n&&!S,b=!C,I=C&&n,x=R||f||b;let _;_=b?`${t} - Select ${M} first`:f?`${t} - Not available with ${L}`:R?`${t} - Sold Out${l?', selected':''}`:`${c}: ${t}`;const B=f?'Unavailable':R?'Sold Out':null;return(0,p.jsxs)(O.RadioOption,{checked:l,disabled:!I,style:[h.valueButton,s&&h.valueButtonCompact,l&&h.valueButtonSelected,s&&l&&h.valueButtonSelectedCompact,x&&h.valueButtonMuted,l&&R&&h.valueButtonSelectedSoldOut],onPress:()=>{N(i,t)},accessibilityLabel:_,children:[(0,p.jsx)(o.default,{style:[h.valueText,l&&h.valueTextSelected,s&&l&&h.valueTextSelectedCompact,x&&h.valueTextMuted,s&&R&&h.valueTextStrikethrough,l&&R&&h.valueTextSelectedSoldOut],numberOfLines:s?1:2,children:t}),null!=B&&!s&&(0,p.jsx)(o.default,{style:h.captionLabel,children:B})]},t)})})]},(0,f.getProductOptionKey)(t.name,i))})})};var t=r(d[0]),l=e(r(d[1])),o=e(r(d[2])),n=e(r(d[3]));r(d[4]);var u=r(d[5]),i=r(d[6]),c=r(d[7]),s=r(d[8]),S=r(d[9]),O=r(d[10]),f=r(d[11]),p=r(d[12]);function C(e,t,l){return e.find(e=>{const o=(0,S.getVariantOptionValuesOrdered)(e,t);return l.every((e,t)=>o[t]===e)})}function R(e,t,l){for(let o=0;o<t;o++)if(null!=l[o]&&e[o]!==l[o])return!1;return!0}function T(e,t,l,o,n){return e.some(e=>{const u=(0,S.getVariantOptionValuesOrdered)(e,t);return u[l]===o&&R(u,l,n)})}function v(e,t,l,o,n){return e.some(e=>{if(!e.availableForSale)return!1;const u=(0,S.getVariantOptionValuesOrdered)(e,t);return u[l]===o&&R(u,l,n)})}function b(e,t,l,o){return e.some(e=>(0,S.getVariantOptionValuesOrdered)(e,t)[l]===o)}function L(e,t,l,o,n){let u=null;for(const i of e.values){if(v(t,l,o,i,n))return i;null==u&&T(t,l,o,i,n)&&(u=i)}return u}function I(e,t){for(let l=0;l<e;l++)if(null==t[l])return!1;return!0}const h=(0,u.createStyles)({container:{gap:c.SPACING.XL},containerCompact:{gap:c.SPACING.MD},optionGroup:{gap:c.SPACING.MD},optionGroupCompact:{gap:c.SPACING.SM},optionLabel:{color:i.COLORS.TEXT_DARK,fontSize:s.FONT_SIZE.MD,fontWeight:'600',letterSpacing:.5,textTransform:'uppercase'},optionLabelCompact:{fontSize:s.FONT_SIZE.SM},selectedValueLabel:{color:i.COLORS.TEXT_SOFT,fontWeight:'400',letterSpacing:0,textTransform:'none'},stepHint:{color:i.COLORS.TEXT_SOFT,fontSize:s.FONT_SIZE.SM},stepHintCompact:{fontSize:s.FONT_SIZE.XS},captionLabel:{color:i.COLORS.TEXT_CAPTION,fontSize:s.FONT_SIZE.MICRO,marginTop:c.SPACING.MICRO},valueButton:Object.assign({alignItems:'center',backgroundColor:i.COLORS.BG_SURFACE,borderColor:i.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:2,justifyContent:'center',minWidth:60,paddingHorizontal:c.SPACING.LG,paddingVertical:c.SPACING.MD},{cursor:'pointer'}),valueButtonCompact:{borderRadius:999,borderWidth:1,minHeight:40,minWidth:0,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.SM},valueButtonSelected:{backgroundColor:i.COLORS.BRAND_BG_SELECTED,borderColor:i.COLORS.ACTION_PRIMARY},valueButtonSelectedCompact:{backgroundColor:i.COLORS.ACTION_PRIMARY,borderColor:i.COLORS.ACTION_PRIMARY},valueButtonSelectedSoldOut:{borderColor:i.COLORS.ACTION_PRIMARY},valueButtonMuted:Object.assign({backgroundColor:i.COLORS.BG_SUBTLE,borderColor:i.COLORS.BORDER_FAINT},{cursor:'not-allowed'}),valueText:{color:i.COLORS.TEXT_DARK,fontSize:s.FONT_SIZE.SM,fontWeight:'500',textAlign:'center'},valueTextSelected:{color:i.COLORS.ACTION_PRIMARY,fontWeight:'600'},valueTextSelectedCompact:{color:i.COLORS.TEXT_INVERSE,fontWeight:'600'},valueTextSelectedSoldOut:{color:i.COLORS.ACTION_PRIMARY,fontWeight:'600'},valueTextMuted:{color:i.COLORS.BORDER_DISABLED},valueTextStrikethrough:{textDecorationLine:'line-through'},valuesRow:{flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.SM}})},1006,[34,276,222,488,95,489,490,493,494,1005,820,1004,104]);
1107__d(function(g,r,i,a,m,e,d){"use strict";
1107Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CELEBRATION_DISMISS_TEST_ID",{enumerable:!0,get:function(){return E.CELEBRATION_DISMISS_TEST_ID}}),Object.defineProperty(e,"CELEBRATION_STOP_TEST_ID",{enumerable:!0,get:function(){return E.CELEBRATION_STOP_TEST_ID}}),Object.defineProperty(e,"CELEBRATION_TEST_ID",{enumerable:!0,get:function(){return E.CELEBRATION_TEST_ID}}),Object.defineProperty(e,"ClearPixelCelebration",{enumerable:!0,get:function(){return E.ClearPixelCelebration}}),Object.defineProperty(e,"CELEBRATION_TEASER_TEST_ID",{enumerable:!0,get:function(){return t.CELEBRATION_TEASER_TEST_ID}}),Object.defineProperty(e,"CELEBRATION_TEASER_TRIGGER_TEST_ID",{enumerable:!0,get:function(){return t.CELEBRATION_TEASER_TRIGGER_TEST_ID}}),Object.defineProperty(e,"ClearPixelTeaser",{enumerable:!0,get:function(){return t.ClearPixelTeaser}}),Object.defineProperty(e,"CELEBRATION_EYEBROW",{enumerable:!0,get:function(){return n.CELEBRATION_EYEBROW}}),Object.defineProperty(e,"CELEBRATION_HEADLINE",{enumerable:!0,get:function(){return n.CELEBRATION_HEADLINE}}),Object.defineProperty(e,"CELEBRATION_MESSAGE",{enumerable:!0,get:function(){return n.CELEBRATION_MESSAGE}}),Object.defineProperty(e,"CELEBRATION_PRODUCT_NAME",{enumerable:!0,get:function(){return n.CELEBRATION_PRODUCT_NAME}}),Object.defineProperty(e,"CELEBRATION_SHADES_CAPTION",{enumerable:!0,get:function(){return n.CELEBRATION_SHADES_CAPTION}}),Object.defineProperty(e,"CELEBRATION_STOP_LABEL",{enumerable:!0,get:function(){return n.CELEBRATION_STOP_LABEL}}),Object.defineProperty(e,"CELEBRATION_TAGLINE",{enumerable:!0,get:function(){return n.CELEBRATION_TAGLINE}}),Object.defineProperty(e,"CELEBRATION_TEASER_BODY",{enumerable:!0,get:function(){return n.CELEBRATION_TEASER_BODY}}),Object.defineProperty(e,"CELEBRATION_TEASER_TITLE",{enumerable:!0,get:function(){return n.CELEBRATION_TEASER_TITLE}}),Object.defineProperty(e,"CELEBRATION_TICKER_LINES",{enumerable:!0,get:function(){return n.CELEBRATION_TICKER_LINES}}),Object.defineProperty(e,"CELEBRATION_VISIBLE_MILLIS",{enumerable:!0,get:function(){return T.CELEBRATION_VISIBLE_MILLIS}});var E=r(d[0]),t=r(d[1]),n=r(d[2]),T=r(d[3])},1007,[1008,1022,1009,1012]);
1108__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CELEBRATION_TEST_ID",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"CELEBRATION_DISMISS_TEST_ID",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_e,"CELEBRATION_HERO_TEST_ID",{enumerable:!0,get:function(){return G}}),Object.defineProperty(_e,"CELEBRATION_STOP_TEST_ID",{enumerable:!0,get:function(){return M}}),_e.ClearPixelCelebration=function({visible:e,onDismiss:S,productImageUrl:u=null,productImageAlt:p=null}){const C=!(0,I.useReduceMotion)(),{width:E,height:D}=(0,s.default)(),X=(0,A.isCompactCelebrationViewport)(E),W=(0,A.isShortCelebrationViewport)(D);if((0,t.useEffect)(()=>{if(!e)return;const t=setTimeout(S,N.CELEBRATION_VISIBLE_MILLIS);return()=>{clearTimeout(t)}},[e,S]),!e)return null;return(0,R.jsx)(o.default,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:S,children:(0,R.jsxs)(c.default,{testID:j,style:B.overlay,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[(0,R.jsx)(n.default,{testID:F,style:B.backdrop,onPress:S,accessible:!1}),(0,R.jsx)(T.CircuitBoardBackdrop,{animate:C}),C&&(0,R.jsx)(P.SpotlightRays,{}),C&&(0,R.jsx)(x.ConfettiRain,{}),(0,R.jsx)(O.CelebrationTicker,{animate:C,short:W}),!W&&(0,R.jsx)(f.CelebrationReadouts,{}),(0,R.jsxs)(c.default,{testID:G,style:[B.hero,X?B.heroCompact:null,W?B.heroShort:null],children:[(0,R.jsx)(b.MarqueeBulbs,{animate:C}),(0,R.jsxs)(c.default,{style:[B.copy,X?B.copyCompact:null,W?B.copyShort:null],children:[(0,R.jsx)(l.default,{style:[B.eyebrow,W?B.eyebrowShort:null],children:h.CELEBRATION_EYEBROW}),(0,R.jsx)(y.NeonHeadline,{text:h.CELEBRATION_HEADLINE,animate:C}),(0,R.jsxs)(c.default,{style:B.productLockup,children:[(0,R.jsx)(l.default,{style:[B.productName,W?B.productNameShort:null],children:h.CELEBRATION_PRODUCT_NAME}),(0,R.jsx)(l.default,{style:[B.tagline,W?B.taglineShort:null],children:h.CELEBRATION_TAGLINE})]}),(0,R.jsx)(l.default,{style:[B.message,W?B.messageShort:null],children:h.CELEBRATION_MESSAGE})]}),(0,R.jsxs)(c.default,{style:[B.productStage,X?B.productStageCompact:null,W?B.productStageShort:null],children:[!W&&(0,R.jsx)(l.default,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:B.backgroundWordmark,children:"CLEAR"}),(0,R.jsx)(_.ClearPixelHardware,{animate:C,productImageUrl:u,productImageAlt:p})]})]}),C&&(0,R.jsx)(L.ConfettiBurst,{}),(0,R.jsx)(n.default,{testID:M,style:[B.stopButton,W?B.stopButtonShort:null],onPress:S,accessible:!1,
1108children:(0,R.jsx)(l.default,{style:B.stopButtonText,children:h.CELEBRATION_STOP_LABEL})})]})})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),S=r(d[6]),u=r(d[7]),p=r(d[8]),C=r(d[9]),E=r(d[10]),I=r(d[11]),h=r(d[12]),f=r(d[13]),O=r(d[14]),N=r(d[15]),A=r(d[16]),T=r(d[17]),_=r(d[18]),L=r(d[19]),x=r(d[20]),b=r(d[21]),y=r(d[22]),P=r(d[23]),R=r(d[24]);const j='clear-pixel-celebration',F='clear-pixel-celebration-dismiss',G='clear-pixel-celebration-hero',M='clear-pixel-celebration-stop';const B=(0,S.createStyles)({overlay:{alignItems:'center',flex:1,justifyContent:'center',overflow:'hidden'},backdrop:{backgroundColor:u.COLORS.NAVY_DARK,bottom:0,left:0,opacity:.93,position:'absolute',right:0,top:0},hero:{alignItems:'center',flexDirection:'row',gap:C.SPACING.XXXL,justifyContent:'space-between',maxWidth:1360,minHeight:'66%',paddingHorizontal:C.SPACING.XXXL,pointerEvents:'box-none',width:'88%'},heroCompact:{flexDirection:'column',gap:C.SPACING.LG,justifyContent:'center',minHeight:'74%',paddingHorizontal:C.SPACING.LG,width:'94%'},heroShort:{gap:C.SPACING.SM,minHeight:0,paddingHorizontal:C.SPACING.MD,width:'96%'},copy:{alignItems:'flex-start',flexBasis:520,flexGrow:1,gap:C.SPACING.LG,maxWidth:620,pointerEvents:'none'},copyCompact:{alignItems:'center',flexBasis:'auto',gap:C.SPACING.MD,maxWidth:560},copyShort:{gap:C.SPACING.XS,maxWidth:560},eyebrow:{color:u.COLORS.STAR_GOLD,fontFamily:E.FONT_FAMILY.MONOSPACE,fontSize:E.FONT_SIZE.LG,fontWeight:'700',letterSpacing:6},eyebrowShort:{fontSize:E.FONT_SIZE.XS,letterSpacing:2},productLockup:{borderLeftColor:u.COLORS.CYAN_ACCENT,borderLeftWidth:5,gap:C.SPACING.XS,paddingLeft:C.SPACING.LG},productName:Object.assign({color:u.COLORS.TEXT_INVERSE,fontFamily:E.FONT_FAMILY.MONOSPACE,fontSize:E.FONT_SIZE.DISPLAY_XL,fontWeight:'700',letterSpacing:8},p.TEXT_SHADOW_STYLES.NEON_CYAN_TEXT),productNameShort:{fontSize:E.FONT_SIZE.XL,letterSpacing:1},tagline:{color:u.COLORS.STAR_GOLD,fontFamily:E.FONT_FAMILY.MONOSPACE,fontSize:E.FONT_SIZE.SM,fontWeight:'700',letterSpacing:2},taglineShort:{fontSize:E.FONT_SIZE.XS,letterSpacing:1},message:{color:u.COLORS.TEXT_INVERSE,fontFamily:E.FONT_FAMILY.MONOSPACE,fontSize:E.FONT_SIZE.XL,lineHeight:28,maxWidth:560},messageShort:{fontSize:E.FONT_SIZE.SM,lineHeight:18},productStage:{alignItems:'center',flexBasis:480,flexGrow:1,height:560,justifyContent:'center',maxWidth:600,pointerEvents:'none'},productStageCompact:{flexBasis:'auto',height:340,maxWidth:420,width:'100%'},productStageShort:{height:200,maxWidth:260},backgroundWordmark:{color:u.COLORS.CYAN_ACCENT,fontFamily:E.FONT_FAMILY.MONOSPACE,fontSize:E.FONT_SIZE.DISPLAY_GIANT,fontWeight:'700',letterSpacing:-12,opacity:.08,position:'absolute'},stopButton:Object.assign({backgroundColor:u.COLORS.TEXT_INVERSE,borderRadius:999,bottom:C.SPACING.XXL,paddingHorizontal:C.SPACING.LG,paddingVertical:C.SPACING.SM,position:'absolute',right:C.SPACING.XXL},p.VIEW_SHADOW_STYLES.NEON_CYAN_SURFACE),stopButtonShort:{bottom:C.SPACING.MD,paddingVertical:C.SPACING.XS,right:C.SPACING.MD},stopButtonText:{color:u.COLORS.TEXT_PRIMARY,fontFamily:E.FONT_FAMILY.MONOSPACE,fontSize:E.FONT_SIZE.MD,fontWeight:'700',letterSpacing:1}})},1008,[34,544,369,222,552,276,489,490,491,493,494,595,1009,1010,1011,1012,1013,1014,1015,1017,1018,1019,1020,1021,104]);
1109__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CELEBRATION_TEASER_EYEBROW",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"CELEBRATION_TEASER_TITLE",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"CELEBRATION_TEASER_BODY",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"CELEBRATION_TEASER_FOOTER",{enumerable:!0,get:function(){return O}}),Object.defineProperty(e,"CELEBRATION_EYEBROW",{enumerable:!0,get:function(){return T}}),Object.defineProperty(e,"CELEBRATION_HEADLINE",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"CELEBRATION_PRODUCT_NAME",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"CELEBRATION_MESSAGE",{enumerable:!0,get:function(){return L}}),Object.defineProperty(e,"CELEBRATION_TAGLINE",{enumerable:!0,get:function(){return A}}
1109),Object.defineProperty(e,"CELEBRATION_STOP_LABEL",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"CELEBRATION_SHADES_CAPTION",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"CELEBRATION_DEVICE_LABEL",{enumerable:!0,get:function(){return N}}),Object.defineProperty(e,"CELEBRATION_TICKER_ROWS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"CELEBRATION_TICKER_LINES",{enumerable:!0,get:function(){return C}}),Object.defineProperty(e,"CELEBRATION_READOUTS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"CELEBRATION_BOARD_CHIP_LABELS",{enumerable:!0,get:function(){return c}});const E='HOUSING ADVISORY',t='CLEAR IS THE\nSUPERIOR CHOICE',n="Identical hardware inside, and the only housing that lets anyone see it. Engineers stop mid-sentence. Visitors ask what it is. The circuit board finally gets the credit it has been earning all along.",O='PRESS TO BE FULLY CONVINCED',T='THE VERDICT IS IN',I='EXCELLENT\nCHOICE.',R='CLEAR PIXEL',L="You picked the version that shows its work. The circuit board approves. Engineering is trying to act normal about it.",A='THE INSIDE IS THE OUTSIDE. THAT\u2019S THE POINT.',u='Stop the celebration',S='DEAL WITH IT',N='CIRCUITRY ON DISPLAY',o=[['CLEAR PIXEL APPRECIATION PARADE NOW IN PROGRESS','THE CIRCUIT BOARD WOULD LIKE TO THANK YOU','YOUR EXCELLENT TASTE HAS BEEN LOGGED','NO BLACK BOXES. ONLY CLEAR ONES.'],['YOU CHOSE THE ONE THAT SHOWS ITS WORK','FULL-STACK VISIBILITY, NOW LITERAL','EVERY ENGINEER ASKS TO SEE THE BOARD. THIS ONE OBLIGES.','THE PCB IS READY FOR ITS CLOSE-UP'],['PEER REVIEWED BY EVERYONE WHO WALKS PAST IT','CLEARLY THE RIGHT DECISION','THE SENSOR HAS NOTHING TO HIDE','THIS IS THE ONE THE ENGINEERS TAKE HOME']],C=o.flat(),l=[{label:'HOUSING',value:'CLEAR'},{label:'TASTE LEVEL',value:'EXCELLENT'},{label:'BOARD VISIBILITY',value:'GLORIOUS'},{label:'ENGINEERING',value:'DELIGHTED'},{label:'COOL FACTOR',value:'CONFIRMED'},{label:'REGRETS',value:'ZERO'}],c=['PA-CLR-01','LASER PM','MCU','RH/TEMP']},1009,[]);
1110__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CELEBRATION_READOUT_TEST_ID",{enumerable:!0,get:function(){return f}}),_e.CelebrationReadouts=function(){return(0,E.jsxs)(t.default,{style:_.panel,children:[(0,E.jsx)(t.default,{style:_.column,children:C.map(e=>(0,E.jsx)(T,{label:e.label,value:e.value},e.label))}),(0,E.jsx)(t.default,{style:_.column,children:S.map(e=>(0,E.jsx)(T,{label:e.label,value:e.value},e.label))})]})},r(d[0]);var l=e(r(d[1])),t=e(r(d[2])),n=r(d[3]),o=r(d[4]),u=r(d[5]),s=r(d[6]),c=r(d[7]),E=r(d[8]);const f='clear-pixel-readout',O='::',p=Math.ceil(c.CELEBRATION_READOUTS.length/2),C=c.CELEBRATION_READOUTS.slice(0,p),S=c.CELEBRATION_READOUTS.slice(p);function T({label:e,value:t}){return(0,E.jsxs)(l.default,{testID:f,style:_.readout,children:[(0,E.jsx)(l.default,{style:_.readoutLabel,children:`${e} ${O} `}),t]})}const _=(0,n.createStyles)({panel:{flexDirection:'row',justifyContent:'space-between',left:0,pointerEvents:'none',position:'absolute',right:0,top:0,paddingHorizontal:u.SPACING.LG,paddingTop:u.SPACING.LG},column:{gap:u.SPACING.MICRO},readout:{color:o.COLORS.TEXT_INVERSE,fontFamily:s.FONT_FAMILY.MONOSPACE,fontSize:s.FONT_SIZE.XS,fontWeight:'700',letterSpacing:1},readoutLabel:{color:o.COLORS.CYAN_ACCENT}})},1010,[34,222,276,489,490,493,494,1009,104]);
1111__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TICKER_ROW_TEST_ID",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"TICKER_ROW_LOOPS",{enumerable:!0,get:function(){return b}}),_e.CelebrationTicker=function({animate:e,short:t=!1}){const o=t?A:N;return(0,L.jsx)(u.default,{style:M.ticker,children:_.CELEBRATION_TICKER_ROWS.map((t,n)=>{const l=o[n];return null==l?null:(0,L.jsx)(F,{lines:t,motion:l,animate:e},t[0]??`ticker-row-${n}`)})})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=e(r(d[5])),c=r(d[6]),f=r(d[7
1111]),p=r(d[8]),O=r(d[9]),S=r(d[10]),C=r(d[11]),_=r(d[12]),T=r(d[13]),L=r(d[14]);const y='clear-pixel-ticker-row',E='\u2726',N=[{positionStyle:{top:'9%'},crossingMillis:15e3,entersFromLeft:!1},{positionStyle:{top:'21%'},crossingMillis:19e3,entersFromLeft:!0},{positionStyle:{top:'85%'},crossingMillis:17e3,entersFromLeft:!1}],A=[{positionStyle:{top:10},crossingMillis:15e3,entersFromLeft:!1},{positionStyle:{bottom:100},crossingMillis:19e3,entersFromLeft:!0},{positionStyle:{bottom:58},crossingMillis:17e3,entersFromLeft:!1}],b=N.map(e=>(0,T.loopCoveringWindow)(e.crossingMillis));function h(e,t,o,n){const l=-o;return{transform:[{translateX:e.interpolate({inputRange:[0,1],outputRange:n?[l,t]:[t,l]})}]}}function F({lines:e,motion:c,animate:f}){const p=(0,C.useStableAnimatedValue)(0),{width:O}=(0,s.default)(),[S,_]=(0,t.useState)(0),{crossingMillis:N,entersFromLeft:A,positionStyle:b}=c,F=(0,t.useCallback)(e=>{_(e.nativeEvent.layout.width)},[]);(0,t.useEffect)(()=>{if(!f||0===S)return;p.setValue(0);const e=o.default.loop(o.default.timing(p,{toValue:1,duration:N,easing:n.default.linear,useNativeDriver:!0}),{iterations:(0,T.loopCoveringWindow)(N).iterations});return e.start(),()=>{e.stop()}},[f,S,N,p]);const R=f?h(p,O,S,A):null;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(u.default,{style:[M.rowStrip,b]}),(0,L.jsx)(u.default,{style:[M.rowTrack,b],children:(0,L.jsx)(o.default.View,{testID:y,style:[M.row,R],onLayout:F,children:e.map((e,t)=>(0,L.jsxs)(u.default,{style:M.lineGroup,children:[(0,L.jsx)(l.default,{style:t%2==0?M.lineCyan:M.lineGold,numberOfLines:1,children:e}),(0,L.jsx)(l.default,{style:M.separator,numberOfLines:1,children:E})]},e))})})]})}const M=(0,c.createStyles)({ticker:{bottom:0,left:0,overflow:'hidden',pointerEvents:'none',position:'absolute',right:0,top:0},rowTrack:{left:0,position:'absolute'},rowStrip:{backgroundColor:f.COLORS.OVERLAY_DARK_50,borderBottomColor:f.COLORS.CYAN_ACCENT,borderBottomWidth:1,borderTopColor:f.COLORS.CYAN_ACCENT,borderTopWidth:1,height:38,left:0,marginTop:-6,position:'absolute',right:0},row:{alignItems:'center',flexDirection:'row',gap:O.SPACING.MD},lineGroup:{alignItems:'center',flexDirection:'row',flexShrink:0,gap:O.SPACING.MD},lineCyan:Object.assign({color:f.COLORS.CYAN_ACCENT,fontFamily:S.FONT_FAMILY.MONOSPACE,fontSize:S.FONT_SIZE.LG,fontWeight:'700',letterSpacing:2},p.TEXT_SHADOW_STYLES.NEON_CYAN_TEXT),lineGold:{color:f.COLORS.STAR_GOLD,fontFamily:S.FONT_FAMILY.MONOSPACE,fontSize:S.FONT_SIZE.LG,fontWeight:'700',letterSpacing:2},separator:{color:f.COLORS.CYAN_ACCENT,fontFamily:S.FONT_FAMILY.MONOSPACE,fontSize:S.FONT_SIZE.LG}})},1011,[34,271,355,222,552,276,489,490,491,493,494,504,1009,1012,104]);
1112__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CELEBRATION_VISIBLE_MILLIS",{enumerable:!0,get:function(){return n}}),e.loopCoveringWindow=function(t){if(!Number.isFinite(t)||t<=0)throw new RangeError(`Animation cycle must be a positive finite duration in milliseconds, got ${t}`);const o=Math.ceil(n/t);return{iterations:o,coverageMillis:o*t}};const n=3e4},1012,[]);
1113__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"COMPACT_CELEBRATION_MAX_WIDTH_PX",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"SHORT_CELEBRATION_MAX_HEIGHT_PX",{enumerable:!0,get:function(){return n}}),e.isCompactCelebrationViewport=o,e.isShortCelebrationViewport=u,e.celebrationStage=function(t,n){if(u(n))return'short';if(o(t))return'compact';return'wide'};const t=760,n=700;function o(n){return n<t}function u(t){return t<n}},1013,[]);
1114__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CIRCUIT_BOARD_TEST_ID",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"CIRCUIT_PULSE_TEST_ID",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"CIRCUIT_PULSE_LOOP",{enumerable:!0,get:function(){return A}}),_e.CircuitBoardBackdrop=function({animate:t}){return(0,_.jsxs)(p.default,{testID:h,style:x.board,children:[(0,_.jsx)(p.default,{style:x.solderMask}),T.map(t=>(0,_.jsx)(p.default,{style:[x.horizontalTrace,t.positionStyle]},t.id)),L.map(t=>(0,_.jsx)(p.default,{style:[x.verticalTrace,t.positionStyle]},t.id)),M.map(t=>(0,_.jsx)(p.default,{style:[x.solderPad,t.positionStyle]},t.id)),N.map(t=>(0,_.jsx)(p.default,{style:[x.chip,t.positionStyle],children:(0,_.jsx)(n.default,{style:x.chipLabel,children:t.label})},t.id)),t&&I.map(t=>(0,_.jsx)(P,{positionStyle:t.positionStyle,delayMillis:t.delayMillis},t.id))]})};var e=r(d[0]),o=t(r(d[1])),l=t(r(d[2])),n=t(r(d[3])),s=t(r(d[4])),p=t(r(d[5])),u=r(d[6]),c=r(d[7]),y=r(d[8]),S=r(d[9]),f=r(d[10]),C=r(d[11]),b=r(d[12]),O=r(d[13]),_=r(d[14]);const h='clear-pixel-circuit-board',E='clear-pixel-circuit-pulse',R=2600,A=(0,O.loopCoveringWindow)(R),T=['8%','20%','32%','44%','56%','68%','80%','92%'].map(t=>({id:`trace-horizontal-${t}
1114`,positionStyle:{top:t}})),L=['6%','18%','30%','42%','54%','66%','78%','90%'].map(t=>({id:`trace-vertical-${t}`,positionStyle:{left:t}})),M=[['8%','18%'],['20%','66%'],['32%','30%'],['44%','90%'],['56%','6%'],['56%','54%'],['68%','42%'],['80%','78%'],['92%','30%']].map(([t,e])=>({id:`pad-${t}-${e}`,positionStyle:{left:e,top:t}})),N=[['14%','8%'],['26%','72%'],['62%','16%'],['74%','64%']].flatMap(([t,e],o)=>{const l=b.CELEBRATION_BOARD_CHIP_LABELS[o];return null==l?[]:[{id:`chip-${l}`,label:l,positionStyle:{left:e,top:t}}]}),I=[{id:'pulse-20',positionStyle:{top:'20%'},delayMillis:0},{id:'pulse-44',positionStyle:{top:'44%'},delayMillis:650},{id:'pulse-68',positionStyle:{top:'68%'},delayMillis:1300},{id:'pulse-92',positionStyle:{top:'92%'},delayMillis:1950}];function j(t,e){return{opacity:t.interpolate({inputRange:[0,.08,.9,1],outputRange:[0,1,1,0]}),transform:[{translateX:t.interpolate({inputRange:[0,1],outputRange:[-140,e]})}]}}function P({positionStyle:t,delayMillis:n}){const p=(0,C.useStableAnimatedValue)(0),{width:u}=(0,s.default)();return(0,e.useEffect)(()=>{p.setValue(0);const t=o.default.sequence([o.default.delay(n),o.default.loop(o.default.timing(p,{toValue:1,duration:R,easing:l.default.linear,useNativeDriver:!0}),{iterations:A.iterations})]);return t.start(),()=>{t.stop()}},[p,n]),(0,_.jsx)(o.default.View,{testID:E,style:[x.pulse,t,j(p,u)]})}const x=(0,u.createStyles)({board:{bottom:0,left:0,overflow:'hidden',pointerEvents:'none',position:'absolute',right:0,top:0},solderMask:{backgroundColor:c.COLORS.MAP_GREEN,bottom:0,left:0,opacity:.05,position:'absolute',right:0,top:0},horizontalTrace:{backgroundColor:c.COLORS.MAP_GREEN,height:2,left:0,opacity:.7,position:'absolute',right:0},verticalTrace:{backgroundColor:c.COLORS.MAP_GREEN,bottom:0,opacity:.5,position:'absolute',top:0,width:2},solderPad:Object.assign({borderColor:c.COLORS.STAR_GOLD,borderRadius:999,borderWidth:3,height:14,marginLeft:-7,marginTop:-7,opacity:.9,position:'absolute',width:14},y.VIEW_SHADOW_STYLES.NEON_AMBER_SURFACE),chip:{alignItems:'center',borderColor:c.COLORS.CYAN_ACCENT,borderRadius:4,borderWidth:1,height:54,justifyContent:'center',opacity:.6,paddingHorizontal:S.SPACING.SM,position:'absolute'},chipLabel:{color:c.COLORS.CYAN_ACCENT,fontFamily:f.FONT_FAMILY.MONOSPACE,fontSize:f.FONT_SIZE.MICRO,letterSpacing:1},pulse:Object.assign({backgroundColor:c.COLORS.CYAN_ACCENT,borderRadius:3,height:5,left:0,position:'absolute',width:140},y.VIEW_SHADOW_STYLES.NEON_CYAN_SURFACE)})},1014,[34,271,355,222,552,276,489,490,491,493,494,504,1009,1012,104]);
1115__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CELEBRATION_DEVICE_TEST_ID",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"CELEBRATION_SHADES_TEST_ID",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"CELEBRATION_SHOCKWAVE_TEST_ID",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"CELEBRATION_PHOTO_SHEEN_TEST_ID",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"SHADES_SWAY_LOOP",{enumerable:!0,get:function(){return I}}),Object.defineProperty(_e,"SHOCKWAVE_LOOP",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"HALO_PULSE_LOOP",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(_e,"PHOTO_SHEEN_LOOP",{enumerable:!0,get:function(){return W}}),Object.defineProperty(_e,"HERO_FLOAT_LOOP",{enumerable:!0,get:function(){return G}}),_e.ClearPixelHardware=function({animate:e,productImageUrl:l=null,productImageAlt:c=null}){const p=(0,b.useStableAnimatedValue)(0),f=(0,b.useStableAnimatedValue)(0),O=(0,b.useStableAnimatedValue)(0),C=(0,b.useStableAnimatedValue)(0),A=(0,b.useStableAnimatedValue)(0),y=(0,b.useStableAnimatedValue)(0),{width:j,height:x}=(0,u.default)(),k=(0,S.celebrationStage)(j,x);(0,t.useEffect)(()=>{if(!e)return;p.setValue(0),f.setValue(0),O.setValue(0),C.setValue(0),A.setValue(0),y.setValue(0);const t=e=>o.default.timing(f,{toValue:e,duration:N,easing:n.default.inOut(n.default.quad),useNativeDriver:!0}),l=e=>o.default.timing(y,{toValue:e,duration:M,easing:n.default.inOut(n.default.sin),useNativeDriver:!0}),s=e=>o.default.timing(O,{toValue:e,duration:v,easing:n.default.inOut(n.default.sin),useNativeDriver:!0}),u=o.default.parallel([o.default.sequence([o.default.timing(p,{toValue:1,duration:T,easing:n.default.bounce,useNativeDriver:!0}),o.default.loop(o.default.sequence([t(1),t(-1),t(0)]),{iterations:I.iterations})]),o.default.loop(o.default.sequence([s(1),s(0)]),{iterations:Y.iterations}),o.default.loop(o.default.timing(C,{toValue:1,duration:V,easing:n.default.out(n.default.quad),useNativeDriver:!0}),{iterations:P.iterations}),o.default.loop(o.default.timing(A,{toValue:1,duration:H,easing:n.default.linear,useNativeDriver:!0}),{iterations:W.iterations}),o.default.loop(o.default.sequence([l(1),l(0)]),{iterations:G.iterations})]);return u.start(),()=>{u.stop()}},[e,p,f,O,C,A,y]);const B=(0,t.useMemo)(()=>U(p,f),[p,f]),F=(0,t.useMemo)(()=>K(p),[p]),J=(0,t.useMemo)(()=>{return{opacity:(e=O).interpolate({inputRange:[0,1],outputRange:[.65,1]}),transform:[{scale:e.interpolate({inputRange:[0,1],outputRange:[.92,1.12]})}]};var e},[O]),Q=(0,t.useMemo)(()=>q(A),[A]),ee=(0,t.useMemo)(()=>X(y),[y]);return(0,L.jsx)(h.default,{style:[ae.showcase,oe[k]],children:(0,L.jsxs)(h.default,{style:[ae.hardware,ne[k]],children:[(0,L.jsxs)(o.default.View,{style:[ae.stage,null!=l?ae.stagePhoto:null,e?ee:null],children:[e?(0,L.jsx)(o.default.View,{style:[ae.halo,J],children:(0,L.jsx)(_.GlowOrb,{diameterPx:te,hue:"cyan"})}):(0,L.jsx)(h.default,{style:ae.halo,children:(0,L.jsx)(_.GlowOrb,{diameterPx:te,hue:"cyan"})}),e&&D.map(e=>(0,L.jsx)(o.default.View,{testID:w,style:[ae.shockwave,$(C,e)]},`shockwave-${e}`)),(0,L.jsx)(z,{productImageUrl:l,productImageAlt:c,sheenStyle:e?Q:null}),e?(0,L.jsx)(o.default.View,{testID:E,style:[ae.shadesAnchor,null!=l?ae.shadesAnchorPhoto:null,B],children:(0,L.jsx)(h.default,{style:null!=l?ae.shadesOnPhoto:null,children:(0,L.jsx)(Z,{})})}):(0,L.jsx)(h.default,{testID:E,style:[ae.shadesAnchor,null!=l?ae.shadesAnchorPhoto:null],children:(0,L.jsx)(h.default,{style:null!=l?ae.shadesOnPhoto:null,children:(0,L.jsx)(Z,{})})})]}),(0,L.jsx)(s.default,{style:ae.deviceLabel,children:R.CELEBRATION_DEVICE_LABEL}),e?(0,L.jsx)(o.default.Text,{style:[ae.shadesCaption,F],children:R.CELEBRATION_
1115SHADES_CAPTION}):(0,L.jsx)(s.default,{style:ae.shadesCaption,children:R.CELEBRATION_SHADES_CAPTION})]})})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=e(r(d[5])),h=e(r(d[6])),c=r(d[7]),p=r(d[8]),f=r(d[9]),O=r(d[10]),C=r(d[11]),b=r(d[12]),R=r(d[13]),A=r(d[14]),S=r(d[15]),_=r(d[16]),L=r(d[17]);const y='clear-pixel-device',E='clear-pixel-shades',w='clear-pixel-shockwave',j='clear-pixel-photo-sheen',T=1500,N=900,I=(0,A.loopCoveringWindow)(2700),x=5,V=1800,P=(0,A.loopCoveringWindow)(V),D=[0,.34,.67],v=1100,Y=(0,A.loopCoveringWindow)(2200),H=3600,W=(0,A.loopCoveringWindow)(H),k=.42,B=16,M=2400,G=(0,A.loopCoveringWindow)(4800),F=9;function U(e,t){return{opacity:e.interpolate({inputRange:[0,.1,1],outputRange:[0,1,1]}),transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:[-420,0]})},{rotate:t.interpolate({inputRange:[-1,1],outputRange:[`-${x}deg`,`${x}deg`]})}]}}function K(e){return{opacity:e.interpolate({inputRange:[0,.82,1],outputRange:[0,0,1]})}}function q(e){const t=Q+ee;return{opacity:e.interpolate({inputRange:[0,.04,.38,k,1],outputRange:[0,1,1,0,0]}),transform:[{translateX:e.interpolate({inputRange:[0,k,1],outputRange:[-ee,t,t]})},{rotate:`${B}deg`}]}}function X(e){return{transform:[{translateY:e.interpolate({inputRange:[0,1],outputRange:[F,-9]})}]}}function $(e,t){const o=e.interpolate({inputRange:[t,1],outputRange:[0,1],extrapolate:'clamp'});return{opacity:o.interpolate({inputRange:[0,.15,1],outputRange:[0,.7,0]}),transform:[{scale:o.interpolate({inputRange:[0,1],outputRange:[.4,2.6]})}]}}function z({productImageUrl:e,productImageAlt:t,sheenStyle:n}){return null!=e&&''!==e?(0,L.jsxs)(h.default,{style:ae.photoFrame,children:[(0,L.jsx)(l.default,{testID:y,source:{uri:e},style:ae.photo,resizeMode:"cover",accessibilityLabel:t??'Clear PurpleAir PIXEL'}),null!=n?(0,L.jsx)(o.default.View,{testID:j,style:[ae.photoSheen,n]}):null]}):(0,L.jsxs)(h.default,{testID:y,style:ae.case,children:[(0,L.jsx)(h.default,{style:ae.sensorInlet}),(0,L.jsxs)(h.default,{style:ae.innerBoard,children:[(0,L.jsx)(h.default,{style:ae.innerTraceUpper}),(0,L.jsx)(h.default,{style:ae.innerTraceLower}),(0,L.jsx)(h.default,{style:ae.innerTraceVerticalLeft}),(0,L.jsx)(h.default,{style:ae.innerTraceVerticalRight}),(0,L.jsx)(h.default,{style:ae.innerChipLarge}),(0,L.jsx)(h.default,{style:ae.innerChipSmall})]}),(0,L.jsx)(h.default,{style:ae.caseHighlight})]})}function Z(){return(0,L.jsxs)(h.default,{style:ae.shades,children:[(0,L.jsx)(h.default,{style:ae.shadesBar}),(0,L.jsxs)(h.default,{style:ae.shadesLenses,children:[(0,L.jsx)(h.default,{style:ae.shadesLens,children:(0,L.jsx)(h.default,{style:ae.shadesGlint})}),(0,L.jsx)(h.default,{style:ae.shadesBridge}),(0,L.jsx)(h.default,{style:ae.shadesLens,children:(0,L.jsx)(h.default,{style:ae.shadesGlint})})]})]})}const J=196,Q=182,ee=56,te=520,ae=(0,c.createStyles)({showcase:{alignItems:'center',height:500,justifyContent:'center',width:430},showcaseCompact:{height:330,width:300},showcaseShort:{height:200,width:200},hardware:{alignItems:'center',gap:O.SPACING.XS},hardwareCompact:{transform:[{scale:1.25}]},hardwareShort:{transform:[{scale:.65}]},hardwareWide:{transform:[{scale:1.8}]},stage:{alignItems:'center',height:J,justifyContent:'center',width:156},stagePhoto:{height:260,width:Q},halo:{alignItems:'center',height:te,justifyContent:'center',position:'absolute',width:te},shockwave:{borderColor:p.COLORS.CYAN_ACCENT,borderRadius:999,borderWidth:3,height:J,position:'absolute',width:J},case:Object.assign({backgroundColor:p.COLORS.OVERLAY_LIGHT_20,borderColor:p.COLORS.OVERLAY_LIGHT_60,borderRadius:22,borderWidth:2,height:J,overflow:'hidden',width:156},f.VIEW_SHADOW_STYLES.NEON_CYAN_SURFACE),photoFrame:Object.assign({borderColor:p.COLORS.CYAN_ACCENT,borderRadius:18,borderWidth:2,height:260,overflow:'hidden',position:'absolute',width:Q},f.VIEW_SHADOW_STYLES.NEON_CYAN_SURFACE),photo:{height:'100%',transform:[{translateX:-0},{translateY:-8.104904051172715},{scale:1.8336886993603412}],width:'100%'},photoSheen:{backgroundColor:p.COLORS.OVERLAY_LIGHT_40,height:520,left
1115:0,position:'absolute',top:-130,width:ee},caseHighlight:{backgroundColor:p.COLORS.OVERLAY_LIGHT_30,borderRadius:999,bottom:22,left:10,position:'absolute',top:22,width:4},sensorInlet:{alignSelf:'center',borderColor:p.COLORS.OVERLAY_LIGHT_60,borderRadius:999,borderWidth:2,height:24,marginTop:12,width:24},innerBoard:{backgroundColor:p.COLORS.MAP_GREEN,borderRadius:8,bottom:12,left:12,opacity:.85,position:'absolute',right:12,top:52},innerTraceUpper:{backgroundColor:p.COLORS.CYAN_ACCENT,height:2,left:10,position:'absolute',right:10,top:30},innerTraceLower:{backgroundColor:p.COLORS.CYAN_ACCENT,height:2,left:10,opacity:.7,position:'absolute',right:10,top:74},innerTraceVerticalLeft:{backgroundColor:p.COLORS.CYAN_ACCENT,bottom:8,left:30,opacity:.55,position:'absolute',top:8,width:2},innerTraceVerticalRight:{backgroundColor:p.COLORS.CYAN_ACCENT,bottom:8,opacity:.55,position:'absolute',right:34,top:8,width:2},innerChipLarge:{backgroundColor:p.COLORS.NAVY_DARK,borderRadius:3,height:30,left:16,position:'absolute',top:40,width:48},innerChipSmall:{backgroundColor:p.COLORS.NAVY_DARK,borderRadius:3,height:18,position:'absolute',right:16,top:84,width:30},shadesAnchor:{alignItems:'center',left:0,position:'absolute',right:0,top:54},shadesAnchorPhoto:{top:73.05714285714285},shadesOnPhoto:{transform:[{scale:.4534628804031789}]},shades:{alignItems:'center',width:176},shadesBar:{backgroundColor:p.COLORS.NAVY_DARK,borderRadius:3,height:13,width:176},shadesLenses:{flexDirection:'row',marginTop:-1},shadesLens:{backgroundColor:p.COLORS.NAVY_DARK,borderBottomLeftRadius:8,borderBottomRightRadius:8,height:38,width:74},shadesBridge:{backgroundColor:p.COLORS.NAVY_DARK,height:7,width:12},shadesGlint:{backgroundColor:p.COLORS.OVERLAY_LIGHT_40,height:4,marginLeft:10,marginTop:9,transform:[{rotate:'-24deg'}],width:20},deviceLabel:{color:p.COLORS.CYAN_ACCENT,fontFamily:C.FONT_FAMILY.MONOSPACE,fontSize:C.FONT_SIZE.SM,fontWeight:'700',letterSpacing:3,marginTop:O.SPACING.SM},shadesCaption:{color:p.COLORS.STAR_GOLD,fontFamily:C.FONT_FAMILY.MONOSPACE,fontSize:C.FONT_SIZE.MD,fontWeight:'700',letterSpacing:6}}),oe={compact:ae.showcaseCompact,short:ae.showcaseShort,wide:null},ne={compact:ae.hardwareCompact,short:ae.hardwareShort,wide:ae.hardwareWide}},1015,[34,271,355,328,222,552,276,489,490,491,493,494,504,1009,1012,1013,1016,104]);
1116__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.GlowOrb=function({diameterPx:e,hue:t}){return(0,u.jsx)(n.default,{style:c.orb,children:l.map(o=>{return(0,u.jsx)(n.default,{style:[c.ring,b[t],(s=e*o,{borderRadius:s/2,height:s,width:s})]},`glow-ring-${o}`);var s})})},r(d[0]);var e,t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[2]),s=r(d[3]),u=r(d[4]);const l=[1,.76,.55,.36,.2];const c=(0,o.createStyles)({orb:{alignItems:'center',justifyContent:'center',pointerEvents:'none',position:'absolute'},ring:{opacity:.09,position:'absolute'},cyan:{backgroundColor:s.COLORS.CYAN_ACCENT},magenta:{backgroundColor:s.COLORS.BRAND_PRIMARY}}),b={cyan:c.cyan,magenta:c.magenta}},1016,[34,276,489,490,104]);
1117__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CONFETTI_PARTICLE_TEST_ID",{enumerable:!0,get:function(){return C}}),Object.defineProperty(_e,"CELEBRATION_CONFETTI_PARTICLE_COUNT",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"CONFETTI_LOOP",{enumerable:!0,get:function(){return y}}),_e.ConfettiBurst=function(){const t=(0,f.useStableAnimatedValue)(0),{width:l,height:s}=(0,u.default)(),p=Math.min(l,s)/A;return(0,e.useEffect)(()=>{t.setValue(0);const e=n.default.loop(n.default.sequence([n.default.timing(t,{toValue:1,duration:h,easing:o.default.out(o.default.cubic),useNativeDriver:!0}),n.default.delay(_)]),{iterations:y.iterations});return e.start(),()=>{e.stop()}},[t]),(0,R.jsx)(c.default,{style:E.origin,children:N.map(e=>(0,R.jsx)(n.default.View,{testID:C,style:[E.particle,e.isOuterRing?E.particleRibbon:E.particleSquare,I[e.colorName],T(e,t,p)]},e.id))})};var e=r(d[0]),n=t(r(d[1])),o=t(r(d[2])),u=t(r(d[3])),c=t(r(d[4])),l=r(d[5]),s=r(d[6]),f=r(d[7
1117]),p=r(d[8]),R=r(d[9]);const C='clear-pixel-confetti-particle',O=['brand','cyan','gold','accent','green','info'],b=9*O.length,h=1400,_=220,y=(0,p.loopCoveringWindow)(1620),A=720,N=O.flatMap((t,e)=>Array.from({length:9},(n,o)=>{const u=9*e+o,c=Math.round(360/b*u),l=u%2==0,s=l?420:Math.round(243.6),f=c*Math.PI/180;return{id:`confetti-${c}deg-${s}px`,translateXPx:Math.round(Math.cos(f)*s),translateYPx:Math.round(Math.sin(f)*s)+180,rotationDegrees:l?900:-720,startFraction:u%6*.05,colorName:t,isOuterRing:l}}));function T(t,e,n){const{startFraction:o}=t,u=e.interpolate({inputRange:[o,1],outputRange:[0,1],extrapolate:'clamp'});return{opacity:e.interpolate({inputRange:[o,o+.1,.8,1],outputRange:[0,1,1,0],extrapolate:'clamp'}),transform:[{translateX:u.interpolate({inputRange:[0,1],outputRange:[0,t.translateXPx*n]})},{translateY:u.interpolate({inputRange:[0,1],outputRange:[0,t.translateYPx*n]})},{rotate:u.interpolate({inputRange:[0,1],outputRange:['0deg',`${t.rotationDegrees}deg`]})}]}}const E=(0,l.createStyles)({origin:{alignItems:'center',height:0,justifyContent:'center',pointerEvents:'none',position:'absolute',width:0},particle:{borderRadius:2,position:'absolute'},particleRibbon:{height:26,width:9},particleSquare:{height:13,width:13},confettiBrand:{backgroundColor:s.COLORS.BRAND_PRIMARY},confettiCyan:{backgroundColor:s.COLORS.CYAN_ACCENT},confettiGold:{backgroundColor:s.COLORS.STAR_GOLD},confettiAccent:{backgroundColor:s.COLORS.BRAND_ACCENT},confettiGreen:{backgroundColor:s.COLORS.MAP_GREEN},confettiInfo:{backgroundColor:s.COLORS.INFO}}),I={brand:E.confettiBrand,cyan:E.confettiCyan,gold:E.confettiGold,accent:E.confettiAccent,green:E.confettiGreen,info:E.confettiInfo}},1017,[34,271,355,552,276,489,490,504,1012,104]);
1118__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CONFETTI_RAIN_PIECE_TEST_ID",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"CONFETTI_RAIN_LOOP",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"CONFETTI_RAIN_PIECE_COUNT",{enumerable:!0,get:function(){return _}}),_e.ConfettiRain=function(){const e=(0,p.useStableAnimatedValue)(0),{height:c}=(0,u.default)();return(0,t.useEffect)(()=>{e.setValue(0);const t=n.default.loop(n.default.timing(e,{toValue:1,duration:C,easing:o.default.linear,useNativeDriver:!0}),{iterations:O.iterations});return t.start(),()=>{t.stop()}},[e]),(0,R.jsx)(l.default,{style:I.field,children:y.map((t,o)=>(0,R.jsx)(n.default.View,{testID:b,style:[I.piece,t.isRibbon?I.pieceRibbon:I.pieceSquare,S[t.colorName],N[o],E(t,e,c)]},t.id))})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),u=e(r(d[3])),l=e(r(d[4])),c=r(d[5]),s=r(d[6]),p=r(d[7]),f=r(d[8]),R=r(d[9]);const b='clear-pixel-confetti-rain-piece',C=4200,O=(0,f.loopCoveringWindow)(C),_=44,h=['cyan','magenta','gold','green','violet','white'],y=Array.from({length:_},(e,t)=>{const n=t%3!=0;return{id:`rain-${t}`,leftFraction:.618033*t%1,startFraction:t%11/11,spinDegrees:n?540+t%4*180:-360-t%3*180,swayPx:t%2==0?60:-60,colorName:h[t%h.length]??'cyan',isRibbon:n}});function E(e,t,o){const u=n.default.modulo(n.default.add(t,e.startFraction),1);return{opacity:u.interpolate({inputRange:[0,.06,.94,1],outputRange:[0,1,1,0]}),transform:[{translateY:u.interpolate({inputRange:[0,1],outputRange:[-80,o+80]})},{translateX:u.interpolate({inputRange:[0,.5,1],outputRange:[0,e.swayPx,0]})},{rotate:u.interpolate({inputRange:[0,1],outputRange:['0deg',`${e.spinDegrees}deg`]})}]}}const N=y.map(e=>({left:`${Math.round(100*e.leftFraction)}%`}));const I=(0,c.createStyles)({field:{bottom:0,left:0,overflow:'hidden',pointerEvents:'none',position:'absolute',right:0,top:0},piece:{position:'absolute',top:0},pieceRibbon:{borderRadius:2,height:22,width:7},pieceSquare:{borderRadius:2,height:12,width:12},rainCyan:{backgroundColor:s.COLORS.CYAN_ACCENT},rainMagenta:{backgroundColor:s.COLORS.BRAND_PRIMARY},rainGold:{backgroundColor:s.COLORS.STAR_GOLD},rainGreen:{backgroundColor:s.COLORS.MAP_GREEN},rainViolet:{backgroundColor:s.COLORS.INFO},rainWhite:{backgroundColor:s.COLORS.TEXT_INVERSE}}),S={cyan:I.rainCyan,magenta:I.rainMagenta,gold:I.rainGold,green:I.rainGreen,violet:I.rainViolet,white:I.rainWhite}},1018,[34,271,355,552,276,489,490,504,1012,104]);
1119__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}
1119Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"MARQUEE_BULB_TEST_ID",{enumerable:!0,get:function(){return _}}),Object.defineProperty(_e,"MARQUEE_CHASE_LOOP",{enumerable:!0,get:function(){return E}}),_e.MarqueeBulbs=function({animate:t}){const l=(0,c.useStableAnimatedValue)(0);return(0,e.useEffect)(()=>{if(!t)return;l.setValue(0);const e=o.default.loop(o.default.timing(l,{toValue:1,duration:h,easing:n.default.linear,useNativeDriver:!0}),{iterations:E.iterations});return e.start(),()=>{e.stop()}},[t,l]),(0,p.jsx)(u.default,{style:L.ring,children:A.map(e=>(0,p.jsx)(o.default.View,{testID:_,style:[L.bulb,e.positionStyle,t?v(e.phase,l):null]},e.id))})};var e=r(d[0]),o=t(r(d[1])),n=t(r(d[2])),u=t(r(d[3])),l=r(d[4]),s=r(d[5]),f=r(d[6]),c=r(d[7]),b=r(d[8]),p=r(d[9]);const _='clear-pixel-marquee-bulb',h=2400,E=(0,b.loopCoveringWindow)(h),O=.22;function S(t){return Array.from({length:t},(e,o)=>`${Math.round(100/(t-1)*o)}%`)}const y=S(9),R=S(5),A=(()=>{const t=[],e=(e,o)=>{t.push({id:e,positionStyle:o,phase:0})};for(const t of y)e(`bulb-top-${t}`,{left:t,marginLeft:-6.5,marginTop:-6.5,top:0});for(const t of R.slice(1,-1))e(`bulb-right-${t}`,{marginRight:-6.5,marginTop:-6.5,right:0,top:t});for(const t of[...y].reverse())e(`bulb-bottom-${t}`,{bottom:0,left:t,marginBottom:-6.5,marginLeft:-6.5});for(const t of[...R.slice(1,-1)].reverse())e(`bulb-left-${t}`,{left:0,marginLeft:-6.5,marginTop:-6.5,top:t});return t.map((e,o)=>Object.assign({},e,{phase:o/t.length}))})();function v(t,e){return{opacity:o.default.modulo(o.default.add(e,1-t),1).interpolate({inputRange:[0,.11,O,.78,.89,1],outputRange:[1,.6,.25,.25,.6,1]})}}const L=(0,l.createStyles)({ring:{bottom:-6,left:-6,pointerEvents:'none',position:'absolute',right:-6,top:-6},bulb:Object.assign({backgroundColor:s.COLORS.STAR_GOLD,borderRadius:999,height:13,position:'absolute',width:13},f.VIEW_SHADOW_STYLES.NEON_AMBER_SURFACE)})},1019,[34,271,355,276,489,490,491,504,1012,104]);
1120__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"NEON_HEADLINE_TEST_ID",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"NEON_HEADLINE_HUE_LOOP",{enumerable:!0,get:function(){return S}}),_e.NeonHeadline=function({text:e,animate:s}){const c=(0,E.useStableAnimatedValue)(0),f=(0,E.useStableAnimatedValue)(0),{width:_}=(0,u.default)(),O=_>=y?C.headlineWide:C.headlineCompact;(0,t.useEffect)(()=>{if(!s)return;c.setValue(0),f.setValue(0);const e=e=>n.default.timing(f,{toValue:e,duration:h,easing:l.default.inOut(l.default.sin),useNativeDriver:!0}),t=n.default.parallel([n.default.spring(c,{toValue:1,friction:5,tension:90,useNativeDriver:!0}),n.default.loop(n.default.sequence([e(1),e(0)]),{iterations:S.iterations})]);return t.start(),()=>{t.stop()}},[s,c,f]);const b=(0,t.useMemo)(()=>A(c),[c]),D=(0,t.useMemo)(()=>T(f),[f]);if(!s)return(0,p.jsx)(o.default,{testID:N,style:[C.headlineCyan,O],children:e});return(0,p.jsxs)(n.default.View,{style:b,children:[(0,p.jsx)(o.default,{testID:N,style:[C.headlineCyan,O],children:e}),(0,p.jsx)(n.default.Text,{accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",style:[C.headlineMagenta,O,D],children:e})]})};var t=r(d[0]),n=e(r(d[1])),l=e(r(d[2])),o=e(r(d[3])),u=e(r(d[4])),s=r(d[5]),c=r(d[6]),f=r(d[7]),_=r(d[8]),E=r(d[9]),O=r(d[10]),p=r(d[11]);const N='clear-pixel-headline',h=1200,S=(0,O.loopCoveringWindow)(2400);function A(e){return{opacity:e.interpolate({inputRange:[0,.4,1],outputRange:[0,1,1]}),transform:[{scale:e.interpolate({inputRange:[0,1],outputRange:[1.7,1]})}]}}function T(e){return{opacity:e}}const y=900,b={fontFamily:_.FONT_FAMILY.MONOSPACE,fontWeight:'700',letterSpacing:-3},C=(0,s.createStyles)({headlineCyan:Object.assign({},b,{color:c.COLORS.CYAN_ACCENT},f.TEXT_SHADOW_STYLES.NEON_CYAN_TEXT),headlineMagenta:Object.assign({},b,{color:c.COLORS.BRAND_PRIMARY,bottom:0,left:0,position:'absolute',right:0,top:0},f.TEXT_SHADOW_STYLES.NEON_MAGENTA_TEXT),headlineCompact:{fontSize:_.FONT_SIZE.DISPLAY_XXL,lineHeight:62,textAlign:'center'},headlineWide:{fontSize:_.FONT_SIZE.DISPLAY_HERO,lineHeight:84}})},1020,[34,271,355,222,552,489,490,491,494,504,1012,104]);
1121__d(function(g,r,i,a,m,_e,d){"use strict";
1121function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SPOTLIGHT_RAY_TEST_ID",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"SPOTLIGHT_GLOW_TEST_ID",{enumerable:!0,get:function(){return b}}),Object.defineProperty(_e,"SPOTLIGHT_SWEEP_LOOP",{enumerable:!0,get:function(){return _}}),Object.defineProperty(_e,"SPOTLIGHT_GLOW_LOOP",{enumerable:!0,get:function(){return P}}),_e.SpotlightRays=function(){const e=(0,c.useStableAnimatedValue)(0),l=(0,c.useStableAnimatedValue)(0);(0,t.useEffect)(()=>{e.setValue(0),l.setValue(0);const t=e=>n.default.timing(l,{toValue:e,duration:S,easing:o.default.inOut(o.default.sin),useNativeDriver:!0}),u=n.default.parallel([n.default.loop(n.default.timing(e,{toValue:1,duration:h,easing:o.default.linear,useNativeDriver:!0}),{iterations:_.iterations}),n.default.loop(n.default.sequence([t(1),t(0)]),{iterations:C.iterations})]);return u.start(),()=>{u.stop()}},[e,l]);const s=(0,t.useMemo)(()=>T(e),[e]),f=(0,t.useMemo)(()=>I(l),[l]);return(0,y.jsxs)(u.default,{style:w.stage,children:[(0,y.jsx)(n.default.View,{testID:b,style:[w.glow,f],children:(0,y.jsx)(p.GlowOrb,{diameterPx:R,hue:"cyan"})}),(0,y.jsx)(n.default.View,{style:[w.rig,s],children:j.map(e=>(0,y.jsx)(u.default,{testID:O,style:[w.ray,e.isMagenta?w.rayMagenta:w.rayCyan,e.rotationStyle]},e.id))})]})};var t=r(d[0]),n=e(r(d[1])),o=e(r(d[2])),u=e(r(d[3])),l=r(d[4]),s=r(d[5]),c=r(d[6]),f=r(d[7]),p=r(d[8]),y=r(d[9]);const O='clear-pixel-spotlight-ray',b='clear-pixel-spotlight-glow',h=18e3,_=(0,f.loopCoveringWindow)(h),S=1300,C=(0,f.loopCoveringWindow)(2600),P=C,R=900,j=Array.from({length:10},(e,t)=>{const n=Math.round(18*t);return{id:`ray-${n}deg`,rotationStyle:{transform:[{rotate:`${n}deg`}]},isMagenta:t%2==1}});function T(e){return{transform:[{rotate:e.interpolate({inputRange:[0,1],outputRange:['0deg','360deg']})}]}}function I(e){return{opacity:e.interpolate({inputRange:[0,1],outputRange:[.6,1]}),transform:[{scale:e.interpolate({inputRange:[0,1],outputRange:[.9,1.15]})}]}}const w=(0,l.createStyles)({stage:{alignItems:'center',bottom:0,justifyContent:'center',left:0,pointerEvents:'none',position:'absolute',right:0,top:0},glow:{alignItems:'center',height:R,justifyContent:'center',position:'absolute',width:R},rig:{alignItems:'center',height:0,justifyContent:'center',position:'absolute',width:0},ray:{borderRadius:45,height:2600,position:'absolute',width:90},rayCyan:{backgroundColor:s.COLORS.CYAN_ACCENT,opacity:.13},rayMagenta:{backgroundColor:s.COLORS.BRAND_PRIMARY,opacity:.16}})},1021,[34,271,355,276,489,490,504,1012,1016,104]);
1122__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CELEBRATION_TEASER_TEST_ID",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"CELEBRATION_TEASER_TRIGGER_TEST_ID",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"CELEBRATION_TEASER_TITLE_TEST_ID",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"CELEBRATION_TEASER_SWATCH_TEST_ID",{enumerable:!0,get:function(){return N}}),Object.defineProperty(_e,"CELEBRATION_TEASER_HUES",{enumerable:!0,get:function(){return I}}),_e.ClearPixelTeaser=function({label:e,onPress:c,textStyle:E}){const[S,_]=(0,t.useState)(!1),[L,x]=(0,t.useState)(!1),[P,F]=(0,t.useState)(null),{width:j,height:D}=(0,s.default)(),M=(0,t.useRef)(null),w=S||L,Y=null===P?null:(0,T.computePopoverPosition)(P,j,D,b),B=Y?.width??(0,T.computePopoverPosition)({top:0,bottom:0,left:0},j).width,G=()=>{const e=M.current;if(null===e)return;const t=e.getBoundingClientRect();F({top:t.top,bottom:t.bottom,left:t.left})},v=(0,C.jsx)(n.default,{testID:R,onPress:c,onHoverIn:()=>{G(),_(!0)},onHoverOut:()=>{_(!1)},onFocus:()=>{G(),x(!0)},onBlur:()=>{x(!1)},accessible:!1,focusable:!1,style:p.trigger,children:(0,C.jsx)(l.default,{style:E,children:e})}),H=(0,C.jsxs)(u.default,{testID:A,style:[p.panel,O.VIEW_SHADOW_STYLES.NEON_CYAN_SURFACE,{width:B}],accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",children:[(0,C.jsx)(u.default,{style:p.swatchRow,children:I.map(e=>(0,C.jsx)(u.default,{testID:N,style:[p.swatch,y[e]]},e))}),(0,C.jsx)(l.default,{style:p.eyebrow,children:f.CELEBRATION_TEASER_EYEBROW}),(0,C.jsx)(l.default,{style:p.title,testID:h,children:f.CELEBRATION_TEASER_TITLE}),(0,C.jsx)(l.default,{style:p.body,children:f.CELEBRATION_TEASER_BODY}),(0,C.jsx)(l.default,{style:p.footer,children:f.CELEBRATION_TEASER_FOOTER})]}),W={left:Y?.left??0,maxHeight:Y?.maxHeight,position:'fixed',top:Y?.top??0,zIndex:9999};return(0,C.jsxs)("div",{ref:M,children:[v,w&&null!==Y&&'undefined'!=typeof document&&(0,o.createPortal)((0,C.jsx)("div",{style:W,children:H}),document.body)]})};var t=r(d[0]),o=r(d[1]);r(d[2]);var n=e(r(d[3])),l=e(r(d[4])),s=e(r(d[5])),u=e(r(d[6])),c=r(d[7]),E=r(d[8]),O=r(d[9]),S=r(d[10]),_=r(d[11]),T=r(d[12]),f=r(d[13]),C=r(d[14]);const A='clear-pixel-teaser',R='clear-pixel-teaser-trigger',h='clear-pixel-teaser-title',N='clear-pixel-teaser-swatch',I=['cyan','magenta','gold','green','violet'],b=240;const p=(0,c.createStyles)({anchor:{position:'relative',zIndex:10},nativePanel:{position:'absolute',top:'100%',zIndex:9999},trigger:Object.assign({},{cursor:'pointer'}),panel:{backgroundColor:E.COLORS.NAVY_DARK,borderColor:E.COLORS.CYAN_ACCENT,borderRadius:10,borderWidth:1,gap:S.SPACING.SM,padding:S.SPACING.MD},swatchRow:{flexDirection:'row',gap:S.SPACING.XS},swatch:{borderRadius:2,height:6,width:26},eyebrow:{color:E.COLORS.STAR_GOLD,fontFamily:_.FONT_FAMILY.MONOSPACE,fontSize:_.FONT_SIZE.XS,fontWeight:'700',letterSpacing:3},title:Object.assign({color:E.COLORS.CYAN_ACCENT,fontFamily:_.FONT_FAMILY.MONOSPACE,fontSize:_.FONT_SIZE.LG,fontWeight:'700',letterSpacing:1},O.TEXT_SHADOW_STYLES.NEON_CYAN_TEXT),body:{color:E.COLORS.TEXT_INVERSE,fontFamily:_.FONT_FAMILY.MONOSPACE,fontSize:_.FONT_SIZE.SM,lineHeight:19},footer:{color:E.COLORS.STAR_GOLD,fontFamily:_.FONT_FAMILY.MONOSPACE,fontSize:_.FONT_SIZE.XS,fontWeight:'700',letterSpacing:2},hueCyan:{backgroundColor:E.COLORS.CYAN_ACCENT},hueMagenta:{backgroundColor:E.COLORS.BRAND_PRIMARY},hueGold:{backgroundColor:E.COLORS.STAR_GOLD},hueGreen:{backgroundColor:E.COLORS.MAP_GREEN},hueViolet:{backgroundColor:E.COLORS.INFO}}),y={cyan:p.hueCyan,magenta:p.hueMagenta,gold:p.hueGold,green:p.hueGreen,violet:p.hueViolet}},1022,[34,36,95,369,222,552,276,489,490,491,493,494,698,1009,104]);
1123__d(function(g,r,i,a,m,e,d){"use strict";
1123Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PIXEL_PRODUCT_HANDLE",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"HOUSING_VARIANTS_SPEC_LABEL",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"HOUSING_VARIANT_VALUES",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"CELEBRATED_HOUSING_VALUE",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"HOUSING_VARIANT_VALUES_SEPARATOR",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"CLEAR_HOUSING_HERO_ALT_TEXT",{enumerable:!0,get:function(){return f}}),e.selectClearHousingHeroImage=function(n){for(const t of s){const u=n.find(n=>n.url.toLowerCase().includes(t));if(null!=u)return u}return null},e.isHousingVariantsSpec=function(n){return _(n)===b},e.buildHousingVariantChoices=function(t,u){if(0===u.length)return[];const l=[];for(const s of o){const o=t.find(t=>(0,n.getVariantOptionValuesOrdered)(t,u).includes(s));null!=o&&l.push({value:s,variant:o,celebrates:s===c})}return l};var n=r(d[0]);const t='purpleair-pixel',u='Housing variants',o=['White','Clear'],c='Clear',l=' or ',s=['0i8a6115'],f="Clear PurpleAir PIXEL standing upright, its circuit board and sensor visible through the transparent housing";function _(n){return null==n?'':n.trim().toLowerCase()}const b=_(u)},1023,[1005]);
1124__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ProductCard",{enumerable:!0,get:function(){return I}});var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3]));r(d[4]);var s=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),f=r(d[9]),O=r(d[10]),h=r(d[11]),T=r(d[12]),p=r(d[13]),x=r(d[14]);function C({product:e,fitSensorHandle:t}){const s=null!=t&&''!==t?t:null,c=null!=s?`/products/${e.handle}?fitSensor=${encodeURIComponent(s)}`:`/products/${e.handle}`,u=(0,T.resolveSensorVariant)(e,s),S=(0,T.variantPrimaryImage)(e,u),C=!0===e.requiresOrganization&&(null==e.sellingPlanGroups||0===e.sellingPlanGroups.length),I=u?.price.amount??e.priceRange?.minVariantPrice?.amount??null,y=C?`From ${(0,f.formatMoney)(10)}`:null==I?'Price unavailable':(0,f.formatMoney)(I),b=e.reviewCount??0,L=e.averageRating??0,N=null!=e.tier&&''!==e.tier,P=null!=e.tagline&&''!==e.tagline,j=b>0&&null!=e.averageRating,E=null!=u?!1===u.availableForSale:!1===e.availableForSale,_=E?`View ${e.title} - Sold Out - ${y}`:`View ${e.title} - ${y}`;return(0,x.jsx)(h.Card,{hoverable:!0,style:R.cardLayout,padding:0,children:(0,x.jsxs)(O.AppLink,{to:"Product",href:c,accessibilityLabel:_,style:E?[R.cardTouchable,R.cardDimmed]:R.cardTouchable,children:[(0,x.jsxs)(l.default,{style:R.imageContainer,children:[N&&(0,x.jsx)(l.default,{style:R.tierBadge,children:(0,x.jsx)(n.default,{style:R.tierBadgeText,children:e.tier})}),E&&(0,x.jsx)(l.default,{style:R.soldOutBadge,children:(0,x.jsx)(n.default,{style:R.soldOutBadgeText,children:"Sold Out"})}),null!=S?(0,x.jsx)(o.default,{source:{uri:S.cardUrl},style:R.image,resizeMode:"contain",accessibilityLabel:S.altText??void 0}):(0,x.jsx)(l.default,{style:R.imagePlaceholder,children:(0,x.jsx)(n.default,{style:R.imagePlaceholderText,children:"No image"})})]}),(0,x.jsxs)(l.default,{style:R.info,children:[(0,x.jsx)(n.default,{style:R.name,numberOfLines:2,children:e.title}),P&&(0,x.jsx)(n.default,{style:R.tagline,numberOfLines:2,children:e.tagline}),j&&(0,x.jsx)(l.default,{style:R.ratingRow,children:(0,x.jsx)(p.StarRating,{averageRating:L,reviewCount:b,variant:"compact"})}),(0,x.jsxs)(l.default,{style:R.bottomRow,children:[(0,x.jsxs)(l.default,{style:R.priceRow,children:[(0,x.jsx)(n.default,{style:R.price,children:y}),!C&&(0,x.jsx)(n.default,{style:R.priceLabel,children:"USD"})]}),(0,x.jsx)(l.default,{style:R.cta,children:(0,x.jsx)(n.default,{style:R.ctaText,children:"View Details"})})]})]})]})})}const I=(0,t.memo)(C),R=(0,s.createStyles)({bottomRow:{marginTop:'auto'},cardDimmed:{opacity:.6},cardTouchable:{flex:1},cardLayout:Object.assign({flexBasis:280,flexGrow:1,flexShrink:0,maxWidth:400,overflow:'hidden'},{cursor:'pointer',transition:'box-shadow 0.25s ease'}),cta:{alignItems:'center',backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:8,paddingVertical:u.SPACING.MD},ctaText:{color:c.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'}
1124,image:{aspectRatio:1,maxWidth:240,width:'100%'},imageContainer:{alignItems:'center',backgroundColor:c.COLORS.BG_SUBTLE,justifyContent:'center',paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.XL},imagePlaceholder:{alignItems:'center',height:240,justifyContent:'center',width:'100%'},imagePlaceholderText:{color:c.COLORS.BORDER_SOFT,fontSize:S.FONT_SIZE.MD},info:{flex:1,justifyContent:'space-between',padding:u.SPACING.XL},name:{color:c.COLORS.TEXT_HEADING,fontSize:S.FONT_SIZE.XL,fontWeight:'700',marginBottom:u.SPACING.SM},price:{color:c.COLORS.TEXT_HEADING,fontSize:S.FONT_SIZE.XXXL,fontWeight:'700'},priceLabel:{color:c.COLORS.TEXT_GHOST,fontSize:S.FONT_SIZE.MD},priceRow:{alignItems:'baseline',flexDirection:'row',gap:u.SPACING.XS,marginBottom:u.SPACING.LG},ratingRow:{marginBottom:u.SPACING.MD},tagline:{color:c.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.MD,lineHeight:20,marginBottom:u.SPACING.SM},soldOutBadge:{backgroundColor:c.COLORS.TEXT_GHOST,borderRadius:12,left:12,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.XS,position:'absolute',top:12,zIndex:1},soldOutBadgeText:{color:c.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.5},tierBadge:{backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:12,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.XS,position:'absolute',right:12,top:12,zIndex:1},tierBadgeText:{color:c.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.5,textTransform:'uppercase'}})},1024,[34,276,222,328,95,489,490,493,494,722,516,605,1025,1026,104]);
1125__d(function(g,r,i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveSellingPlanSelection=function(n,t){if(null==n)return{plan:t[0]??null,status:'default'};const l=t.find(t=>t.id===n);if(null!=l)return{plan:l,status:'ok'};return{plan:null,status:'invalid'}},e.resolveVariantSelection=t,e.shouldUseSensorVariantPicker=function(t){const l=t.variants??[];if(!l.some(n=>n.defaultForSensorModels.length>0))return!1;return(0,n.getProductSensorModels)(t).length>=2},e.buildSensorPickerOptions=function(n,t,o=l){const u=n=>t.filter(t=>t.compatibleSensorModels.some(t=>t.handle===n)).map(n=>n.id).sort().join('\0'),c=[],f=new Map;for(const t of n){const n=u(t.handle),l=f.get(n);void 0===l?(f.set(n,[t]),c.push(n)):l.push(t)}const v=[];for(const n of c){const t=f.get(n)??[],l=t[0];if(void 0===l)continue;const u=t.map(n=>n.handle),c=1===t.length?l.name:o.get(s(u))??t.map(n=>n.name).join(' / ');v.push({handle:l.handle,name:c,memberHandles:u})}return v},e.variantPrimaryImage=o,e.resolveSensorVariant=u,e.resolveSensorVariantImage=function(n,t){return o(n,u(n,t))},e.resolveAccessoryVariantSelection=function(t,l,s){const o=l.variants??[],u=t=>null==s||(0,n.isVariantCompatibleWithUsbType)(t,l,s);if(null==t){const n=o.find(n=>n.id===l.defaultVariantId&&u(n)&&n.availableForSale);if(null!=n)return{variant:n,status:'default'};return{variant:o.find(n=>u(n)&&n.availableForSale)??null,status:'default'}}const c=o.find(n=>n.id===t)??null;if(null==c)return{variant:null,status:'invalid',invalidReason:'unavailable'};if(!u(c))return{variant:c,status:'invalid',invalidReason:'incompatible'};if(!c.availableForSale)return{variant:c,status:'invalid',invalidReason:'sold-out'};return{variant:c,status:'ok'}},e.collectBundleSelectionIssues=function(n,t,l){const s=[],o=[];for(const u of n){if(!l.has(u.id))continue;const n=t.get(u.id);'invalid'===n?.status&&('incompatible'===n.invalidReason?s.push(u.name):o.push(u.name))}return{usbIncompatibleNames:s,unavailableNames:o}};var n=r(d[0]);function t(n,t,l){if(null==n){if(null!=l&&''!==l){const n=t.find(n=>n.availableForSale&&n.defaultForSensorModels.some(n=>n.handle===l)),s=t.find(n=>n.availableForSale&&n.compatibleSensorModels.some(n=>n.handle===l)),o=n??s;if(null!=o)return{variant:o,status:'default'};const u=t.find(n=>n.defaultForSensorModels.some(n=>n.handle===l))??t.find(n=>n.compatibleSensorModels.some(n=>n.handle===l));if(null!=u)return{variant:u,status:'invalid'}}return{variant:t.find(n=>n.availableForSale)??null,status:'default'}}const s=t.find(t=>t.id===n);return null==s?{variant:null,status:'invalid'}:s.availableForSale?{variant:s,status:'ok'}:{variant:s,status:'invalid'}}const l=new Map([[s(['classic-pa-ii','classic-pa-ii-sd']),'PurpleAir Classic (PA-II / PA-II-SD)']]);function s(n){return[...n].sort().join('\0')}function o(n,t){return t?.image??n.images?.[0]??null}
1125function u(n,l){return null==l||''===l?null:t(null,n.variants??[],l).variant}},1025,[1004]);
1126__d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.StarRating=function({averageRating:e,reviewCount:l,variant:s="full",starSize:n}){const o=n??('compact'===s?16:18),u=[];for(let t=1;t<=5;t++)e>=t?u.push('full'):e>=t-.5?u.push('half'):u.push('empty');const S=e.toFixed(1),y=`${S} out of 5 stars, ${l} review${1===l?'':'s'}`;return(0,c.jsxs)(t.default,{style:h.container,accessibilityRole:"text",accessibilityLabel:y,children:[(0,c.jsx)(t.default,{style:h.starsRow,children:[1,2,3,4,5].map(e=>(0,c.jsx)(f,{fillState:u[e-1]??'empty',size:o,testID:`rating-star-${e}`},e))}),'full'===s&&(0,c.jsxs)(i.default,{style:h.reviewText,children:[S," (",l,' ',1===l?'review':'reviews',")"]}),'compact'===s&&l>0&&(0,c.jsxs)(i.default,{style:h.compactCount,children:["(",l,")"]})]})},r(d[0]);var t=e(r(d[1])),i=e(r(d[2])),l=r(d[3]),s=r(d[4]),n=r(d[5]),o=r(d[6]),c=r(d[7]);function f({fillState:e,size:l,testID:n}){const o=Math.ceil(1.2*l);return'empty'===e?(0,c.jsx)(i.default,{style:{fontSize:l,lineHeight:o,c
1126olor:s.COLORS.BORDER_DEFAULT},accessibilityElementsHidden:!0,testID:n,children:'\u2605'}):'half'===e?(0,c.jsx)(t.default,{style:[h.halfStarClip,{width:l,height:o}],testID:n,children:(0,c.jsxs)(t.default,{style:[h.halfStarContainer,{width:l,height:o}],children:[(0,c.jsx)(i.default,{style:{fontSize:l,lineHeight:o,color:s.COLORS.BORDER_DEFAULT},accessibilityElementsHidden:!0,children:'\u2605'}),(0,c.jsx)(t.default,{style:[h.halfStarOverlay,{width:l/2}],children:(0,c.jsx)(i.default,{style:{fontSize:l,lineHeight:o,color:s.COLORS.STAR_GOLD},accessibilityElementsHidden:!0,children:'\u2605'})})]})}):(0,c.jsx)(i.default,{style:{fontSize:l,lineHeight:o,color:s.COLORS.STAR_GOLD},accessibilityElementsHidden:!0,testID:n,children:'\u2605'})}const h=(0,l.createStyles)({compactCount:{color:s.COLORS.TEXT_GHOST,fontSize:o.FONT_SIZE.SM},container:{alignItems:'center',flexDirection:'row',gap:n.SPACING.SM},halfStarClip:{overflow:'hidden'},halfStarContainer:{position:'relative'},halfStarOverlay:{height:'100%',left:0,overflow:'hidden',position:'absolute',top:0},reviewText:{color:s.COLORS.TEXT_SECONDARY,fontSize:o.FONT_SIZE.MD,fontWeight:'500'},starsRow:{alignItems:'center',flexDirection:'row',gap:1}})},1026,[34,276,222,489,490,493,494,104]);
1127__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.sanitizeProductDescriptionHtml=f,e.ProductDescriptionHtml=function({html:t,fallbackText:l}){return(0,u.jsx)(s.RichTextHtml,{html:f(t),variant:"product-description",fallbackText:''!==l?l:(0,o.stripHtml)(t),fallbackStyle:p.nativeFallback})},r(d[0]);var t=r(d[1]),l=r(d[2]),c=r(d[3]),n=r(d[4]),o=r(d[5]),s=r(d[6]),u=r(d[7]);function f(t){return(0,n.sanitizeHtml)(t,'product-description')}const p=(0,t.createStyles)({nativeFallback:{color:l.COLORS.TEXT_DIM,fontSize:c.FONT_SIZE.LG,lineHeight:28}})},1027,[34,489,490,494,737,740,741,104]);
1128__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ProductOrgPicker=function({cadence:e,devOverride:s,purchaseResult:u}){const f=(0,O.useOrganization)(),{isAuthenticated:h}=(0,c.useAuth)(),y=s?.selectedOrg??f.selectedOrg,T=s?.availableOrgs??f.availableOrgs,I=null==s&&f.isLoading,R=null==s&&f.memberOrgLoadFailed,_=s?.organizationFromDeveloperPortalLink??f.organizationFromDeveloperPortalLink,P=null!=s?s.isAuthenticated:h;if((0,n.useEffect)(()=>{T.length>1&&L.logger.warn("Multiple organizations available (%d) but v1 only supports single-org. Using selectedOrg or first available.",T.length)},[T.length]),I)return(0,p.jsxs)(l.default,{style:x.container,children:[(0,p.jsx)(t.default,{accessibilityLabel:"Loading organizations",color:S.COLORS.BRAND_PRIMARY}),(0,p.jsx)(o.default,{style:x.loadingText,children:"Loading organizations\u2026"})]});if(_&&null!=y)return N(y,e,u);if(R)return(0,p.jsxs)(l.default,{style:x.container,children:[(0,p.jsx)(o.default,{style:x.label,children:"Organization"}),(0,p.jsx)(o.default,{style:x.errorBody,children:"Unable to load your organizations. Please try refreshing the page."})]});if(!P)return(0,p.jsxs)(l.default,{style:[x.container,x.containerNotice],children:[(0,p.jsx)(o.default,{style:x.noticeLabel,children:"Organization required"}),(0,p.jsx)(o.default,{style:x.missingBody,children:"Sign in to purchase API points. Your account must be linked to an organization in order to receive points."}),(0,p.jsx)(C.AppLink,{to:"Login",accessibilityLabel:"Sign in to your account",style:x.inlineLinkContainer,children:(0,p.jsx)(o.default,{style:x.inlineLink,children:"Sign in"})})]});const j=y??T[0];if(null==j)return(0,p.jsxs)(l.default,{style:[x.container,x.containerNotice],children:[(0,p.jsx)(o.default,{style:x.noticeLabel,children:"No organization linked"}),(0,p.jsxs)(o.default,{style:x.missingBody,children:["Your account is not linked to an organization. Sign in to the",' ',(0,p.jsx)(b.ServiceExternalLink,{service:"developerPortalUrl",inline:!0,accessibilityLabel:"Open Developer Portal",textStyle:x.inlineLink,children:"Developer Portal"}),' ',"to link your account."]})]});return N(j,e,u)};var n=r(d[0]),t=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),s=r(d[4]),c=r(d[5]),S=r(d[6]),u=r(d[7]),f=r(d[8]),O=r(d[9]),L=r(d[10]),h=r(d[11]),
1128C=r(d[12]),b=r(d[13]),p=r(d[14]);const y={monthly:{pointsLabel:'points per month'},'one-time':{pointsLabel:'points'}};function N(e,n,t){const s=e.balance,c=null!=t&&t.totalPoints>0,S=c&&'one-time'===n,u='one-time'===n;return(0,p.jsxs)(l.default,{style:[x.container,x.containerLinked],children:[(0,p.jsxs)(l.default,{style:x.orgHeader,children:[(0,p.jsx)(o.default,{style:x.orgName,children:e.name}),(0,p.jsx)(b.ServiceExternalLink,{service:"developerPortalUrl",inline:!0,accessibilityLabel:"Open Developer Portal",textStyle:x.portalLink,children:"Developer Portal"})]}),c&&(0,p.jsxs)(l.default,{style:x.pointsHero,children:[(0,p.jsxs)(o.default,{style:x.pointsHeroValue,children:["+",(0,h.formatPointBalance)(t.totalPoints)]}),(0,p.jsx)(o.default,{style:x.pointsHeroLabel,children:y[n].pointsLabel})]}),null!=s&&u&&(0,p.jsx)(l.default,{style:x.balanceRow,children:S?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(o.default,{style:x.balanceValue,children:(0,h.formatPointBalance)(s)}),(0,p.jsx)(o.default,{style:x.balanceArrow,children:" \u2192 "}),(0,p.jsx)(o.default,{style:x.balanceValueNew,children:(0,h.formatPointBalance)(s+t.totalPoints)})]}):(0,p.jsxs)(o.default,{style:x.balanceText,children:["Balance: ",(0,h.formatPointBalance)(s)," points"]})})]})}const x=(0,s.createStyles)({balanceArrow:{color:S.COLORS.TEXT_DIM,fontSize:f.FONT_SIZE.SM},balanceRow:{alignItems:'center',flexDirection:'row',justifyContent:'center',marginTop:u.SPACING.XS},balanceText:{color:S.COLORS.TEXT_DIM,fontSize:f.FONT_SIZE.SM},balanceValue:{color:S.COLORS.TEXT_DIM,fontSize:f.FONT_SIZE.SM},balanceValueNew:{color:S.COLORS.SUCCESS,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},container:{backgroundColor:S.COLORS.BG_MUTED,borderRadius:8,marginTop:u.SPACING.LG,padding:u.SPACING.MD},containerLinked:{backgroundColor:S.COLORS.SUCCESS_BG,borderLeftColor:S.COLORS.SUCCESS,borderLeftWidth:3,paddingHorizontal:u.SPACING.LG,paddingVertical:u.SPACING.MD},containerNotice:{backgroundColor:S.COLORS.WARNING_BG,borderLeftColor:S.COLORS.WARNING,borderLeftWidth:3},errorBody:{color:S.COLORS.WARNING,fontSize:f.FONT_SIZE.MD,lineHeight:22,marginTop:u.SPACING.SM},inlineLink:{color:S.COLORS.BRAND_PRIMARY,fontWeight:'600',textDecorationLine:'underline'},inlineLinkContainer:{alignSelf:'flex-start',marginTop:u.SPACING.XS},label:{color:S.COLORS.TEXT_SOFT,fontSize:f.FONT_SIZE.SM,fontWeight:'600',marginBottom:4},loadingText:{color:S.COLORS.TEXT_DIM,fontSize:f.FONT_SIZE.SM,marginTop:u.SPACING.SM},missingBody:{color:S.COLORS.TEXT_DIM,fontSize:f.FONT_SIZE.SM,lineHeight:20,marginTop:u.SPACING.XS},noticeLabel:{color:S.COLORS.WARNING_DARK,fontSize:f.FONT_SIZE.SM,fontWeight:'600',marginBottom:4},orgHeader:{alignItems:'baseline',flexDirection:'row',justifyContent:'space-between'},orgName:{color:S.COLORS.TEXT_SOFT,fontSize:f.FONT_SIZE.SM,fontWeight:'600'},pointsHero:{alignItems:'baseline',flexDirection:'row',gap:6,justifyContent:'center',marginTop:u.SPACING.SM},pointsHeroLabel:{color:S.COLORS.SUCCESS_DARK,fontSize:f.FONT_SIZE.SM,fontWeight:'500'},pointsHeroValue:{color:S.COLORS.SUCCESS,fontSize:f.FONT_SIZE.XL,fontWeight:'700'},portalLink:{color:S.COLORS.BRAND_PRIMARY,fontSize:f.FONT_SIZE.SM,fontWeight:'500'}})},1028,[34,410,222,276,489,411,490,493,494,962,469,836,516,522,104]);
1129__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ReviewSection=function({handle:e,averageRating:c,reviewCount:u,reviewStateOverride:h=null}){const{isPhone:O}=(0,R.useResponsive)(),[C,T]=(0,t.useState)(null),[x,w]=(0,t.useState)(1),[E,v]=(0,t.useState)(null),[j,M]=(0,t.useState)(null),[B,F]=(0,t.useState)('NEWEST'),[z,W]=(0,t.useState)(!1),[Z,k]=(0,t.useState)(!1),[H,$]=(0,t.useState)(null),U=(0,t.useRef)(!0),Y=(0,t.useRef)(0);(0,t.useEffect)(()=>()=>{U.current=!1},[]);const V=(0,t.useCallback)(async t=>{const l=Y.current+1;Y.current=l,k(!0),$(null);try{const n=await S.storeApi.getProductReviews(e,t,b,E,B);if(!U.current||l!==Y.current)return;T(n),M(E)}catch(e){if(!U.current||l!==Y.current)return;$((0,y.errorMessage)(e,'Unable to load reviews'))}finally{U.current&&l===Y.current&&k(!1)}},[e,E,B]);(0,t.useEffect)(()=>{V(x)},[x,V]);const K=(0,t.useCallback)(e=>{w(e+1)},[]),q=(0,t.useCallback)(e=>{w(1),v(e)},[]),J=(0,t.useCallback)(e=>{w(1),F(e)},[]),Q={live:{page:C,loading:Z,error:H},'initial-loading':{page:null,loading:!0,error:null},refreshing:{page:C,loading:!0,error:null},error:{page:null,loading:!1,error:'Development override: review loading failed.'},empty:{page:D,loading:!1,error:null}}[h??'live'],ee=Q.page,te=ee?.reviews??[],re=ee?.totalReviewCount??u,le=ee?.matchingReviewCount??re,
1129ie=ee?.totalPages??0,ne=ee?.ratingCounts.reduce((e,t)=>e+t.count,0)??0,ae=ee?.ratingCounts.reduce((e,t)=>e+t.rating*t.count,0)??0,oe=c??(ne>0?ae/ne:null),se=z?null:(0,L.jsx)(o.default,{accessibilityLabel:"Write a review",accessibilityRole:"button",onPress:()=>{W(!0)},style:X.writeReviewButton,children:(0,L.jsx)(n.default,{style:X.writeReviewButtonText,children:"Write a review"})}),de=null==Q.error&&null!=ee&&0===re&&!z,ce=null==Q.error&&null!=ee&&re>0&&0===te.length;return(0,L.jsxs)(l.default,{style:X.container,children:[(0,L.jsx)(n.default,{style:[X.heading,O&&X.headingCentered],children:"Customer Reviews"}),re>0&&(0,L.jsxs)(l.default,{style:[X.summary,O&&X.summaryStacked],testID:"review-summary",children:[(0,L.jsx)(l.default,{style:[X.summaryLeft,O&&X.summaryLeftCentered],testID:"review-summary-primary",children:null!=oe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(n.default,{style:X.ratingBig,children:oe.toFixed(1)}),(0,L.jsx)(A.StarRating,{averageRating:oe,reviewCount:re,variant:"full"})]})}),null!=ee&&(0,L.jsx)(l.default,{style:[X.summaryRight,O&&X.summaryRightFullWidth],children:(0,L.jsx)(P,{ratingCounts:ee.ratingCounts,selectedRating:E,onSelectRating:q})})]}),re>0&&(0,L.jsxs)(l.default,{style:X.reviewToolbar,testID:"review-controls-toolbar",children:[(0,L.jsxs)(l.default,{style:X.sortControls,children:[(0,L.jsx)(n.default,{style:X.sortLabel,children:"Sort by date"}),(0,L.jsx)(l.default,{accessibilityRole:"radiogroup",style:X.sortOptions,children:_.map(e=>(0,L.jsx)(I.RadioOption,{checked:B===e.value,accessibilityLabel:`Sort reviews: ${e.label.toLowerCase()}`,onPress:()=>{J(e.value)},style:[X.sortButton,B===e.value&&X.sortButtonSelected],children:(0,L.jsx)(n.default,{style:[X.sortButtonText,B===e.value&&X.sortButtonTextSelected],children:e.label})},e.value))})]}),se]}),z&&(0,L.jsx)(N.ReviewSubmissionForm,{handle:e,onCancel:()=>{W(!1)}}),null!=ee&&re>0&&(0,L.jsxs)(l.default,{style:X.resultMeta,testID:"review-results-meta",children:[(0,L.jsx)(n.default,{style:X.matchingCount,children:null==j?`${re} ${1===re?'review':'reviews'}`:`${le} ${j}-star ${1===le?'review':'reviews'}`}),Q.loading&&(0,L.jsxs)(l.default,{accessibilityLabel:"Updating reviews",style:X.refreshStatus,children:[(0,L.jsx)(s.default,{color:f.COLORS.ACTION_PRIMARY,size:"small"}),(0,L.jsx)(n.default,{style:X.refreshStatusText,children:"Updating\u2026"})]})]}),Q.loading&&null==ee&&null==Q.error&&(0,L.jsx)(s.default,{accessibilityLabel:"Loading reviews",size:"small",color:f.COLORS.BRAND_PRIMARY,style:X.loader}),(0,L.jsxs)(l.default,{accessibilityState:{busy:Q.loading},children:[null!=Q.error&&(0,L.jsx)(n.default,{style:X.errorText,children:Q.error}),te.map(e=>(0,L.jsx)(G,{review:e},e.id)),de&&(0,L.jsxs)(l.default,{style:X.emptyState,testID:"review-empty-state",children:[(0,L.jsx)(n.default,{accessibilityElementsHidden:!0,style:X.emptyStars,children:"\u2605\u2605\u2605\u2605\u2605"}),(0,L.jsx)(n.default,{style:X.emptyTitle,children:"Be the first to review this product"}),(0,L.jsx)(n.default,{style:X.emptyBody,children:"Share your experience to help other customers make an informed decision."}),se]}),ce&&(0,L.jsxs)(n.default,{style:X.emptyText,children:["No ",j,"-star reviews yet."]}),ie>1&&(0,L.jsx)(p.Pagination,{page:(ee?.currentPage??x)-1,totalPages:ie,onPageChange:K,itemLabel:"reviews"})]})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),S=r(d[7]),f=r(d[8]),h=r(d[9]),O=r(d[10]),R=r(d[11]),C=r(d[12]),y=r(d[13]),T=r(d[14]),x=r(d[15]),p=r(d[16]),I=r(d[17]),N=r(d[18]),A=r(d[19]),L=r(d[20]);const b=5,w=r(d[21]),E=(0,T.resolveImageUri)(w,'official review response'),v=null==E?w:{uri:E},_=[{value:'NEWEST',label:'Newest first'},{value:'OLDEST',label:'Oldest first'}],D={currentPage:1,matchingReviewCount:0,perPage:b,ratingCounts:[1,2,3,4,5].map(e=>({rating:e,count:0})),reviews:[],totalPages:0,totalReviewCount:0};function P({ratingCounts:e,selectedRating:t,onSelectRating:o}){const s=new Map(e.map(e=>[e.rating,e.count])),c=e.reduce((e,t)=>e+t.count,0),u=Math.max(...s.values(),1);return(0,L.jsxs)(l.default,{accessibilityRole:"radiogroup",style:B.container,children:[(0,L.jsxs)(l.default,{style:B.header,children:[(0,L.jsx)(n.default,{style:B.heading,children:"Filter by rating"}),(0,L.jsx)(I.RadioOption,{checked:null==t,accessibilityLabel:"Filter reviews: all ratings",onPress:()=>{o(null)},children:(0,L.jsxs)(n.default,{style:[B.allRatingsText,null==t&&B.selectedText],children:["All reviews (",c,")"]})})]}),[5,4,3,2,1].map(e=>{const c=s.get(e)??0,S=t===e;return(0,L.jsxs)(I.RadioOption,{checked:S,accessibilityLabel:`Filter reviews: ${e} ${1===e?'star':'stars'} (${c} ${1===c?'review':'reviews'})`,onPress:()=>{o(e)},style:[B.row,S&&B.selectedRow],testID:`rating-filter-${e}`,children:[(0,L.jsxs)(n.default,{style:[B.label,S&&B.selectedText],children:[e," star"]}),(0,L.jsx)(l.default,{style:B.barTrack,children:(0,L.jsx)(l.default,{style:[B.barFill,S&&B.barFillSelected,{width:c/u*100+"%"}]})}),(0,L.jsx)(n.default,{style:[B.count,S&&B.selectedText],children:c})]},e)})]})}function j({rating:e}){return(0,L.jsx)(l.default,{style:F.starsRow,children:[1,2,3,4,5].map(t=>(0,L.jsx)(n.default,{style:t<=e?F.starFull:F.starEmpty,children:'\u2605'},t))})}function M({review:e}){const t=e.pictures,o=t.map((e,l)=>({accessibilityLabel:`Expanded review photo ${l+1} of ${t.length}`,displayUrl:null,fullSizeUrl:e.fullSizeUrl,id:`${e.thumbnailUrl}|${e.fullSizeUrl}`,thumbnailAccessibilityLabel:`Open review photo ${l+1} of ${t.length}`,thumbnailUrl:e.thumbnailUrl}));return(0,L.jsxs)(l.default,{style:F.container,children:[(0,L.jsxs)(l.default,{style:F.header,children:[(0,L.jsx)(j,{rating:e.rating}),(0,L.jsxs)(l.default,{style:F.meta,children:[(0,L.jsx)(n.default,{style:F.reviewerName,children:e.reviewerName}),e.verified&&(0,L.jsx)(l.default,{style:F.verifiedBadge,children:(0,L.jsx)(n.default,{style:F.verifiedText,children:"Verified Buyer"})})]}),(0,L.jsx)(n.default,{style:F.date,children:(s=e.createdAt,null==s?'':(0,C.formatIsoDateShort)(s))})]}),e.title.length>0&&(0,L.jsx)(n.default,{style:F.title,children:e.title}),e.body.length>0&&(0,L.jsx)(n.default,{style:F.body,children:e.body}),t.length>0&&(0,L.jsx)(x.ImageGallery,{images:o,layout:"thumbnails-only",viewerLabel:"Review photo viewer"}),null!=e.merchantReply&&''!==e.merchantReply&&(0,L.jsxs)(l.default,{style:F.reply,testID:`merchant-reply-${e.id}`,children:[(0,L.jsxs)(l.default,{style:F.replyHeader,children:[(0,L.jsx)(c.default,{accessibilityLabel:"PurpleAir logo",resizeMode:"contain",source:v,style:F.replyLogo}),(0,L.jsx)(n.default,{style:F.replyHeading,children:"PurpleAir replied"})]}),(0,L.jsx)(n.default,{style:F.replyBody,children:e.merchantReply})]})]});var s}const G=(0,t.memo)(M);const X=(0,u.createStyles)({container:{alignSelf:'center',maxWidth:800,paddingHorizontal:h.SPACING.XXL,paddingVertical:h.SPACING.XXXL,width:'100%'},emptyText:{color:f.COLORS.TEXT_SOFT,fontSize:O.FONT_SIZE.MD,marginVertical:h.SPACING.XL,textAlign:'center'},emptyBody:{color:f.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.MD,lineHeight:22,maxWidth:480,textAlign:'center'},emptyStars:{color:f.COLORS.BORDER_DEFAULT,fontSize:O.FONT_SIZE.XXL,letterSpacing:3},emptyState:{alignItems:'center',backgroundColor:f.COLORS.BRAND_BG_FAINT,borderColor:f.COLORS.BORDER_BRAND,borderRadius:12,borderWidth:1,gap:h.SPACING.MD,padding:h.SPACING.XXXL},emptyTitle:{color:f.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.XL,fontWeight:'700',textAlign:'center'},errorText:{color:f.COLORS.ERROR,fontSize:O.FONT_SIZE.MD,marginVertical:h.SPACING.LG,textAlign:'center'},heading:{color:f.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.XXXL,fontWeight:'bold',marginBottom:h.SPACING.XXL},headingCentered:{textAlign:'center'},loader:{marginVertical:h.SPACING.XXL},matchingCount:{color:f.COLORS.TEXT_SOFT,fontSize:O.FONT_SIZE.SM},refreshStatus:{alignItems:'center',flexDirection:'row',gap:h.SPACING.SM},refreshStatusText:{color:f.COLORS.TEXT_MUTED,fontSize:O.FONT_SIZE.SM},resultMeta:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginBottom:h.SPACING.MD,minHeight:32},reviewToolbar:{alignItems:'flex-end',flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.XXL,justifyContent:'space-between',marginBottom:h.SPACING.XXL},ratingBig:{color:f.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.DISPLAY_XL,fontWeight:'bold',lineHeight:52,textAlign:'center'},summary:{flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.XXXL,marginBottom:h.SPACING.XXXL},summaryStacked:{alignItems:'center',flexDirection:'column'},summaryLeft:{alignItems:'center',gap:h.SPACING.SM,minWidth:120,paddingTop:h.SPACING.SM},summaryLeftCentered:{minWidth:0,width:'100%'},summaryRight:{flex:1,minWidth:200},summaryRightFullWidth:{flexGrow:0,minWidth:0,width:'100%'},sortButton:{borderColor:f.COLORS.BORDER,borderRadius:8,borderWidth:1,paddingHorizontal:h.SPACING.MD,paddingVertical:h.SPACING.SM},sortButtonSelected:{backgroundColor:f.COLORS.ACTION_PRIMARY,borderColor:f.COLORS.ACTION_PRIMARY},sortButtonText:{color:f.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},sortButtonTextSelected:{color:f.COLORS.TEXT_INVERSE},sortControls:{flexGrow:1,gap:h.SPACING.SM}
1129,sortLabel:{color:f.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},sortOptions:{flexDirection:'row',flexWrap:'wrap',gap:h.SPACING.SM},writeReviewButton:{borderColor:f.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:1,paddingHorizontal:h.SPACING.XL,paddingVertical:h.SPACING.MD},writeReviewButtonText:{color:f.COLORS.ACTION_PRIMARY,fontSize:O.FONT_SIZE.MD,fontWeight:'700'}}),B=(0,u.createStyles)({allRatingsText:{color:f.COLORS.TEXT_SOFT,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},barFill:{backgroundColor:f.COLORS.STAR_GOLD,borderRadius:5,height:'100%'},barFillSelected:{backgroundColor:f.COLORS.ACTION_PRIMARY},barTrack:{backgroundColor:f.COLORS.BG_SUBTLE_100,borderRadius:5,flex:1,height:10,overflow:'hidden'},container:{gap:h.SPACING.XS},count:{color:f.COLORS.TEXT_GHOST,fontSize:O.FONT_SIZE.SM,textAlign:'right',width:32},heading:{color:f.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.SM,fontWeight:'600'},header:{alignItems:'center',flexDirection:'row',justifyContent:'space-between',marginBottom:h.SPACING.XS},label:{color:f.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.SM,fontWeight:'600',width:52},row:{alignItems:'center',borderRadius:6,flexDirection:'row',gap:h.SPACING.SM,paddingHorizontal:h.SPACING.SM,paddingVertical:h.SPACING.XS},selectedRow:{backgroundColor:f.COLORS.BRAND_TINT},selectedText:{color:f.COLORS.BRAND_PRIMARY_DARK,fontWeight:'700'}}),F=(0,u.createStyles)({body:{color:f.COLORS.TEXT_SECONDARY,fontSize:O.FONT_SIZE.MD,lineHeight:22},container:{borderTopColor:f.COLORS.BORDER,borderTopWidth:1,paddingVertical:h.SPACING.XL},date:{color:f.COLORS.TEXT_CAPTION,fontSize:O.FONT_SIZE.SM},header:{marginBottom:h.SPACING.SM},meta:{alignItems:'center',flexDirection:'row',gap:h.SPACING.SM,marginBottom:h.SPACING.MICRO},reply:{backgroundColor:f.COLORS.BRAND_BG_FAINT,borderColor:f.COLORS.BORDER_BRAND,borderRadius:12,borderWidth:1,marginLeft:h.SPACING.LG,marginTop:h.SPACING.LG,padding:h.SPACING.LG},replyBody:{color:f.COLORS.TEXT_BODY,fontSize:O.FONT_SIZE.MD,lineHeight:22},replyHeader:{alignItems:'center',flexDirection:'row',gap:h.SPACING.SM,marginBottom:h.SPACING.MD},replyHeading:{color:f.COLORS.TEXT_HEADING,fontSize:O.FONT_SIZE.SM,fontWeight:'700'},replyLogo:{height:34,width:38},reviewerName:{color:f.COLORS.TEXT_DARK,fontSize:O.FONT_SIZE.MD,fontWeight:'600'},starEmpty:{color:f.COLORS.BORDER_DEFAULT,fontSize:O.FONT_SIZE.MD},starFull:{color:f.COLORS.STAR_GOLD,fontSize:O.FONT_SIZE.MD},starsRow:{flexDirection:'row',gap:1,marginBottom:h.SPACING.SM},title:{color:f.COLORS.TEXT_NEAR_BLACK,fontSize:O.FONT_SIZE.LG,fontWeight:'600',marginBottom:h.SPACING.XS},verifiedBadge:{backgroundColor:f.COLORS.EMERALD_50,borderRadius:4,paddingHorizontal:h.SPACING.SM,paddingVertical:h.SPACING.MICRO},verifiedText:{color:f.COLORS.EMERALD_600,fontSize:O.FONT_SIZE.XS,fontWeight:'600'}})},1029,[34,276,222,488,410,328,489,618,490,493,494,553,685,468,716,539,712,820,1030,1026,104,1031]);
1130__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ReviewSubmissionForm=function({handle:e,onCancel:c}){const[b,R]=(0,t.useState)(''),[p,h]=(0,t.useState)(''),[I,L]=(0,t.useState)(5),[E,N]=(0,t.useState)(''),[A,_]=(0,t.useState)(''),[v,P]=(0,t.useState)(!1),[j,B]=(0,t.useState)(null),[M,G]=(0,t.useState)(!1),D=(0,t.useCallback)(async()=>{const t=b.trim(),l=p.trim(),n=E.trim(),o=A.trim();if(''!==t&&''!==l&&''!==o)if((0,O.isValidEmail)(l)){P(!0),B(null);try{await u.storeApi.submitProductReview(e,{name:t,email:l,rating:I,title:n,body:o}),G(!0)}catch(e){B((0,C.errorMessage)(e,'Unable to submit review'))}finally{P(!1)}}else B('Please enter a valid email address.');else B('Name, email, and review are required.')},[A,p,e,b,I,E]);if(M)return(0,f.jsx)(s.default,{accessibilityRole:"alert",style:y.successPanel,children:(0,f.jsx)(n.default,{style:y.successText,children:"Review received. Check your email if Judge.me asks you to verify it; publication may require moderation."})});return(0,f.jsxs)(s.default,{style:y.form,children:[(0,f.jsx)(n.default,{style:y.formHeading,children:"Write a review"}),(0,f.jsx)(n.default,{style:y.label,children:"Rating"}),(0,f.jsx)(s.default,{accessibilityRole:"radiogroup",style:y.ratingButtons,children:[1,2,3,4,5].map(e=>(0,f.jsx)(T.RadioOption,{checked:I===e,accessibilityLabel:`Review rating: ${e} ${1===e?'star':'stars'}`,onPress:()=>{L(e)},style:[y.ratingButton,I===e&&y.ratingButtonSelected],children:(0,f.jsxs)(n.default,{style:[y.ratingButtonText,I===e&&y.ratingButtonTextSelected],children:[e," \u2605"]})},e))}),(0,f.jsx)(n.default,{style:y.label,children:"Name"}),(0,f.jsx)(x.AppTextInput,{accessibilityLabel:"Reviewer name",autoComplete:"name",maxLength:100,onChangeText:R,value:b}),(0,f.jsx)(n.default,{style:y.label,children:"Email"}),(0,f.jsx)(x.AppTextInput,{accessibilityLabel:"Reviewer email",autoCapitalize:"none",autoComplete:"email",inputMode:"email",keyboardType:"email-address",maxLength:254,onChangeText:h,value:p}),(0,f.jsx)(n.default,{style:y.privacyText,children:"Your email is sent securely to Judge.me for verification and is not displayed publicly."}),(0,f.jsx)(n.default,{style:y.label,children:"Title (optional)"}),(0,f.jsx)(x.AppTextInput,{accessibilityLabel:"Review title",maxLength:150,onChangeText:N,value:E}),(0,f.jsx)(n.default,{style:y.label,children:"Review"}),(0,f.jsx)(x.AppTextInput,{accessibilityLabel:"Review body",maxLength:5e3,multiline:!0,onChangeText:_,style:y.bodyInput,textAlignVertical:"top",value:A}),null!=j&&(0,f.jsx)(n.default,{accessibilityRole:"alert",style:y.errorText,children:j}),(0,f.jsxs)(s.default,{style:y.actions,children:[(0,f.jsx)(o.default,{accessibilityLabel:"Cancel review",accessibilityRole:"button",disabled:v,onPress:c,style:y.cancelButton,children:(0,f.jsx)(n.default,{style:y.cancelButtonText,children:"Cancel"})}),(0,f.jsx)(o.default,{accessibilityLabel:"Submit review",accessibilityRole:"button",disabled:v,onPress:()=>{D()},style:[y.submitButton,v&&y.disabledButton],children:v?(0,f.jsx)(l.default,{color:S.COLORS.TEXT_INVERSE}):(0,f.jsx)(n.default,{style:y.submitButtonText,children:"Submit review"})})]})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),s=e(r(d[4])),c=r(d[5]),u=r(d[6]),S=r(d[7]),b=r(d[8]),R=r(d[9]),C=r(d[10]),O=r(d[11]),x=r(d[12]),T=r(d[13]),f=r(d[14]);const y=(0,c.createStyles)({actions:{flexDirection:'row',gap:b.SPACING.MD,justifyContent:'flex-end',marginTop:b.SPACING.MD},bodyInput:{minHeight:120},cancelButton:{borderColor:S.COLORS.BORDER,borderRadius:8,borderWidth:1,paddingHorizontal:b.SPACING.LG,paddingVertical:b.SPACING.MD},cancelButtonText:{color:S.COLORS.TEXT_SECONDARY,fontSize:R.FONT_SIZE.MD,fontWeight:'600'},disabledButton:{opacity:.6},errorText:{color:S.COLORS.ERROR,fontSize:R.FONT_SIZE.SM},form:{backgroundColor:S.COLORS.BG_LIGHT,borderColor:S.COLORS.BORDER,borderRadius:12,borderWidth:1,gap:b.SPACING.SM,marginBottom:b.SPACING.XXL,padding:b.SPACING.XL},formHeading:{color:S.COLORS.TEXT_HEADING,fontSize:R.FONT_SIZE.XL,fontWeight:'700'},label:{color:S.COLORS.TEXT_DARK,fontSize:R.FONT_SIZE.SM,fontWeight:'600',marginTop:b.SPACING.SM},privacyText:{color:S.COLORS.TEXT_CAPTION,fontSize:R.FONT_SIZE.XS,lineHeight:18},ratingButton:{borderColor:S.COLORS.BORDER,borderRadius:8,borderWidth:1,paddingHorizontal:b.SPACING.MD,paddingVertical:b.SPACING.SM},ratingButtonSelected:{backgroundColor:S.COLORS.ACTION_PRIMARY,borderColor:S.COLORS.ACTION_PRIMARY},ratingButtonText:{color:S.COLORS.TEXT_SECONDARY,fontSize:R.FONT_SIZE.MD,fontWeight:'600'},ratingButtonTextSelected:{color:S.COLORS.TEXT_INVERSE},ratingButtons:{flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.SM},submitButton:{alignItems:'center',backgroundColor:S.COLORS.ACTION_PRIMARY,borderRadius:8,minWidth:130,paddingHorizontal:b.SPACING.LG,paddingVertical:b.SPACING.MD},submitButtonText:{color:S.COLORS.TEXT_INVERSE,fontSize:R.FONT_SIZE.MD,fontWeight:'700'},successPanel:{backgroundColor:S.COLORS.EMERALD_50,borderRadius:8,marginBottom:b.SPACING.XXL,padding:b.SPACING.LG},successText:{color:S.COLORS.EMERALD_600,fontSize:R.FONT_SIZE.MD,lineHeight:22}})},1030,[34,410,222,488,276,489,618,490,493,494,468,746,711,820,104]);
1131__d(function(g,r,i,a,m,e,d){m.exports={uri:"/assets/assets/purpleair-official.6df5737563ba4cb8bbf7008149729276.png",width:140,height:124}},1031,[]);
1132__d(function(g,r,i,a,m,_e,d){"use strict";
1132function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorFitment=function({fitment:e,linkToBrowse:o=!1}){if('none'===e.scope)return null;const l=u[e.scope],c=`${l}: ${e.models.map(e=>e.name).join(', ')}`,p=o?{}:{accessibilityRole:'text',accessibilityLabel:c};return(0,f.jsxs)(t.default,Object.assign({style:C.container},p,{children:[(0,f.jsx)(n.default,{style:C.label,children:l}),(0,f.jsx)(t.default,{style:C.chipRow,children:e.models.map(e=>o?(0,f.jsx)(S.AppLink,{to:"StoreCategory",href:(0,h.getScreenPath)('StoreCategory',{category:s.REPLACEMENT_PARTS_CATEGORY_SLUG,sensor:e.handle}),style:C.chip,accessibilityLabel:`See all parts for ${e.name}`,children:(0,f.jsx)(n.default,{style:C.chipText,children:e.name})},e.handle):(0,f.jsx)(t.default,{style:C.chip,children:(0,f.jsx)(n.default,{style:C.chipText,children:e.name})},e.handle))})]}))},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=r(d[3]),l=r(d[4]),c=r(d[5]),s=r(d[6]),p=r(d[7]),S=r(d[8]),h=r(d[9]),f=r(d[10]);const u={variant:'This option fits',product:'Compatible with'};const C=(0,o.createStyles)({chip:{backgroundColor:l.COLORS.BG_LIGHT,borderColor:l.COLORS.BORDER_DEFAULT,borderRadius:16,borderWidth:1,paddingHorizontal:c.SPACING.MD,paddingVertical:c.SPACING.XS},chipRow:{flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.SM},chipText:{color:l.COLORS.TEXT_SECONDARY,fontSize:p.FONT_SIZE.SM,fontWeight:'600'},container:{gap:c.SPACING.SM,marginTop:c.SPACING.MD},label:{color:l.COLORS.TEXT_SECONDARY,fontSize:p.FONT_SIZE.SM,fontWeight:'700',letterSpacing:.5,textTransform:'uppercase'}})},1032,[34,276,222,489,490,493,631,494,516,518,104]);
1133__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorPicker=function({models:e,selectedHandle:n,onSelect:c,accessibilityLabelForModel:l=e=>`Show parts for ${e.name}`,appearance:S="chips"}){const p='inline'===S?R:O;return(0,C.jsx)(t.default,{style:p.row,accessibilityRole:"radiogroup",children:e.map(e=>{const t=e.handle===n;return(0,C.jsx)(s.RadioOption,{checked:t,style:[p.chip,t&&p.chipSelected],onPress:()=>{c(e.handle)},accessibilityLabel:l(e),children:(0,C.jsx)(o.default,{style:[p.chipText,t&&p.chipTextSelected],children:e.name})},e.handle)})})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2]));r(d[3]);var n=r(d[4]),c=r(d[5]),l=r(d[6]),S=r(d[7]),s=r(d[8]),C=r(d[9]);const O=(0,n.createStyles)({chip:{alignItems:'center',backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER_DEFAULT,borderRadius:24,borderWidth:1,justifyContent:'center',minHeight:44,paddingHorizontal:l.SPACING.LG,paddingVertical:l.SPACING.SM},chipSelected:{backgroundColor:c.COLORS.ACTION_PRIMARY,borderColor:c.COLORS.ACTION_PRIMARY},chipText:{color:c.COLORS.TEXT_SECONDARY,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},chipTextSelected:{color:c.COLORS.TEXT_INVERSE},row:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:l.SPACING.SM,justifyContent:'center',maxWidth:900}}),R=(0,n.createStyles)({chip:Object.assign({alignItems:'center',backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:2,justifyContent:'center',minHeight:44,paddingHorizontal:l.SPACING.LG,paddingVertical:l.SPACING.SM},{cursor:'pointer'}),chipSelected:{backgroundColor:c.COLORS.BRAND_BG_SELECTED,borderColor:c.COLORS.ACTION_PRIMARY},chipText:{color:c.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.SM,fontWeight:'500',textAlign:'center'},chipTextSelected:{color:c.COLORS.ACTION_PRIMARY,fontWeight:'600'},row:{flexDirection:'row',flexWrap:'wrap',gap:l.SPACING.SM}})},1033,[34,276,222,95,489,490,493,494,820,104]);
1134__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SubscriptionAmountSection=function({onChange:t,onAvailabilityChange:o}){const{data:c,loading:f,error:O}=(0,S.useSubscriptionOffer)(),_=!f&&null==O&&null!=c;if((0,e.useEffect)(()=>{o(_)},[_,o]),f)return(0,R.jsxs)(s.default,{style:p.statusRow,children:[(0,R.jsx)(n.default,{size:"small",color:u.COLORS.BRAND_PRIMARY}),(0,R.jsx)(l.default,{style:p.statusText,children:"Loading subscription pricing..."})]});if(null!=O||null==c)return(0,R.jsx)(s.default,{style:p.statusRow,children:(0,R.jsx)(l.default,{style:p.errorText,children:"Subscription pricing is unavailable."})});return(0,R.jsx)(x.ApiPointsCalculator,{onChange:t,tiers:c.tiers,minimumDollars:c.minimumMonthlyDollars,maximumDollars:c.maximumMonthlyDollars,variant:"subscription"})};var e=r(d[0]),n=t(r(d[1])),l=t(r(d[2])),s=t(r(d[3])),o=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7
1134]),S=r(d[8]),x=r(d[9]),R=r(d[10]);const p=(0,o.createStyles)({errorText:{color:u.COLORS.ERROR,fontSize:f.FONT_SIZE.SM},statusRow:{alignItems:'center',flexDirection:'row',gap:c.SPACING.SM,marginTop:c.SPACING.LG},statusText:{color:u.COLORS.TEXT_DIM,fontSize:f.FONT_SIZE.SM}})},1034,[34,410,222,276,489,490,493,494,1035,1001,104]);
1135__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useSubscriptionOffer=function(){return(0,n.useAsyncData)(async()=>{const n=await l.storeApi.getSubscriptionOffer();return{tiers:n.tiers.map(l=>({minSpendDollars:l.minSpendDollars,pointsPerDollar:l.pointsPerDollar,label:l.label})),minimumMonthlyDollars:n.minimumMonthlyDollars,maximumMonthlyDollars:n.maximumMonthlyDollars}},[],'Failed to load subscription pricing.')};var l=r(d[0]),n=r(d[1])},1035,[618,561]);
1136__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.TrustBar=function({variant:e="full",showPlantowerCorrelation:n=!1}){if('compact'===e)return(0,u.jsxs)(t.default,{style:h.compactContainer,children:[(0,u.jsxs)(t.default,{style:h.compactStats,children:[(0,u.jsx)(p,{value:f,label:"Citing Publications",compact:!0}),n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(t.default,{style:h.compactDivider}),(0,u.jsx)(p,{value:"Up to 97%",label:"Tested Correlation",compact:!0})]}),(0,u.jsx)(t.default,{style:h.compactDivider}),(0,u.jsx)(p,{value:"35,000+",label:"Sensors Worldwide",compact:!0})]}),(0,u.jsx)(S.ExternalLink,{href:"https://www.epa.gov/sciencematters/epa-research-improves-air-quality-information-public-airnow-fire-and-smoke-map",accessibilityLabel:"Learn about PurpleAir data in the EPA Fire and Smoke Map",children:(0,u.jsx)(o.default,{style:h.compactLearnMore,children:"As found on the EPA Fire and Smoke Map"})})]});return(0,u.jsx)(t.default,{style:h.container,children:(0,u.jsxs)(t.default,{style:h.inner,children:[(0,u.jsx)(o.default,{style:h.heading,children:"Trusted Where It Matters Most"}),(0,u.jsx)(o.default,{style:h.subheading,children:"Community sensors that help power the EPA's official Fire and Smoke Map"}),(0,u.jsxs)(t.default,{style:h.stats,children:[(0,u.jsx)(p,{value:"EPA",label:"Integrated into the federal Fire and Smoke Map"}),n&&(0,u.jsx)(p,{value:"Up to 97%",label:"Correlation with reference monitors"}),(0,u.jsx)(p,{value:"35,000+",label:"Sensors deployed in 100+ countries"}),(0,u.jsx)(p,{value:f,label:"Publications cite studies using PurpleAir"})]}),(0,u.jsxs)(t.default,{style:h.pressSection,children:[(0,u.jsx)(o.default,{style:h.pressLabel,children:"FEATURED IN"}),(0,u.jsx)(t.default,{style:h.pressLogos,children:C.map(e=>(0,u.jsx)(O,{name:e},e))})]})]})})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2]));r(d[3]);var n=r(d[4]),l=r(d[5]),s=r(d[6]),c=r(d[7]),S=r(d[8]),u=r(d[9]);function p({value:e,label:n,compact:l=!1}){return(0,u.jsxs)(t.default,{style:l?h.compactStat:h.stat,children:[(0,u.jsx)(o.default,{style:l?h.compactStatValue:h.statValue,children:e}),(0,u.jsx)(o.default,{style:l?h.compactStatLabel:h.statLabel,children:n})]})}function O({name:e}){return(0,u.jsx)(t.default,{style:h.pressLogo,children:(0,u.jsx)(o.default,{style:h.pressLogoText,children:e})})}const C=['WIRED','The New York Times','NPR','Bloomberg','Washington Post','The Verge'],f='1,000+';const h=(0,n.createStyles)({container:{backgroundColor:l.COLORS.BRAND_BG_SURFACE,borderBottomColor:l.COLORS.BORDER_BRAND,borderBottomWidth:1,borderTopColor:l.COLORS.BORDER_BRAND,borderTopWidth:1,paddingHorizontal:s.SPACING.XXL,paddingVertical:s.SPACING.JUMBO},heading:Object.assign({color:l.COLORS.TEXT_HEADING,fontSize:c.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:s.SPACING.MD,textAlign:'center'},{fontSize:c.FONT_SIZE.DISPLAY_MD}),inner:{alignItems:'center',alignSelf:'center',maxWidth:960,width:'100%'},stats:{flexDirection:'row',flexWrap:'wrap',gap:s.SPACING.XXL,justifyContent:'center',marginBottom:s.SPACING.MASSIVE},stat:{alignItems:'center',backgroundColor:l.COLORS.BG_SURFACE,borderColor:l.COLORS.BORDER_BRAND,borderRadius:12,borderWidth:1,minWidth:160,paddingHorizontal:s.SPACING.XXL,paddingVertical:s.SPACING.XL},statValue:Object.assign({color:l.COLORS.ACTION_PRIMARY,fontSize:c.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:s.SPACING.SM},{fontSize:c.FONT_SIZE.DISPLAY_MD}),statLabel:{color:l.COLORS.TEXT_SOFT,fontSize:c.FONT_SIZE.SM,lineHeight:18,maxWidth:160,textAlign:'center'},subheading:Object.assign({color:l.COLORS.TEXT_SECONDARY,fontSize:c.FONT_SIZE.LG,lineHeight:24,marginBottom:s.SPACING.HUGE,maxWidth:600,textAlign:'center'},{fontSize:c.FONT_SIZE.XL,lineHeight:28}),pressSection:{alignItems:'center'},pressLabel:{color:l.COLORS.TEXT_CAPTION,fontSize:c.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:s.SPACING.XL},pressLogos:{flexDirection:'row',flexWrap:'wrap',gap:s.SPACING.LG,justifyContent:'center'},pressLogo:{backgroundColor:l.COLORS.BG_SURFACE,borderColor:l.COLORS.BORDER_LIGHT,borderRadius:8,borderWidth:1,paddingHorizontal:s.SPACING.LG,paddingVertical:s.SPACING.SM},pressLogoText:{color:l.COLORS.TEXT_GHOST,fontSize:c.FONT_SIZE.SM,fontWeight:'600'},compactContainer:{alignItems:'center',backgroundColor:l.COLORS.BRAND_BG_FAINT,borderColor:l.COLORS.BORDER_BRAND,borderRadius:12,borderWidth:1,paddingHorizontal:s.SPACING.XL,paddingVertical:s.SPACING.LG},compactStats:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:s.SPACING.XS,justifyContent:'center',marginBottom:s.SPACING.SM},compactStat:{alignItems:'center',paddingHorizontal:s.SPACING.MD},compactStatValue:{color:l.COLORS.ACTION_PRIMARY,fontSize:c.FONT_SIZE.XL,fontWeight:'bold'},compactStatLabel:{color:l.COLORS.TEXT_GHOST,fontSize:c.FONT_SIZE.XS,textAlign:'center'},compactDivider:{backgroundColor:l.COLORS.BORDER_SUBTLE,height:28,width:1},compactLearnMore:{color:l.COLORS.ACTION_PRIMARY,fontSize:c.FONT_SIZE.XS,fontWeight:'500'}})},1036,[34,276,222,95,489,490,493,494,519,104]);
1137__d(function(g,r,i,a,m,e,d){"use strict";
1137Object.defineProperty(e,'__esModule',{value:!0}),e.useClearPixelCelebration=function(){const[l,u]=(0,t.useState)(!1),c=(0,t.useCallback)(()=>{u(!0)},[]),n=(0,t.useCallback)(()=>{u(!1)},[]);return{celebrating:l,celebrate:c,stop:n}};var t=r(d[0])},1037,[34]);
1138__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useOrgDevOverrides=function(){return t()};var n=r(d[0]);const o={orgOverride:{mode:'none'}};const t=(0,n.loadOrgDevOverrides)()??function(){return o}},1038,[1039]);
1139__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.loadOrgDevOverrides=function(){return null}},1039,[614]);
1140__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useProductDisplayDevOverrides=function(){return u()};var t=r(d[0]);const n={apiPointsTierStateOverride:null,reviewStateOverride:null,applyOverrides:t=>t};const u=(0,t.loadProductDisplayDevOverrides)()??function(){return n}},1040,[1041]);
1141__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.loadProductDisplayDevOverrides=function(){return null}},1041,[614]);
1142__d(function(_g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useProductSelection=function(t,v){const[p,S]=(0,n.useState)(null),[M,b]=(0,n.useState)(null),[g,y]=(0,n.useState)(()=>new Map),[w,P]=(0,n.useState)(()=>new Set),V=(0,n.useMemo)(()=>t?.variants??[],[t]),T=(0,n.useMemo)(()=>(t?.sellingPlanGroups??[]).flatMap(n=>n.sellingPlans),[t]),U=(0,n.useMemo)(()=>t?.bundleAccessories??[],[t]),h=(0,n.useMemo)(()=>null==t?s:(0,l.resolveVariantSelection)(p,V,v),[t,p,V,v]),k=(0,n.useMemo)(()=>null==t?u:(0,l.resolveSellingPlanSelection)(M,T),[t,M,T]),C=(0,n.useMemo)(()=>f(h.variant,t?.options??[]),[h.variant,t]),_=(0,n.useMemo)(()=>{if(0===U.length)return o;const n=new Map;for(const t of U){const s=g.get(t.id)??null;n.set(t.id,(0,l.resolveAccessoryVariantSelection)(s,t,C))}return n},[U,g,C]),A=(0,n.useMemo)(()=>{if('invalid'===h.status)return!0;if('invalid'===k.status)return!0;for(const[n,t]of _)if('invalid'===t.status&&w.has(n))return!0;return!1},[h,k,_,w]),I=(0,n.useCallback)(n=>{S(n.id)},[]),O=(0,n.useCallback)(n=>{b(n?.id??null)},[]),B=(0,n.useCallback)((n,t)=>{y(l=>{const s=new Map(l);return s.set(n,t.id),s})},[]),j=(0,n.useCallback)(n=>{P(t=>{const l=new Set(t);return l.has(n)?l.delete(n):l.add(n),l})},[]);return{variant:h,sellingPlan:k,accessoryVariants:_,bundleIds:null==t?c:w,sensorUsbType:C,hasInvalidSelection:A,selectVariant:I,selectSellingPlan:O,selectAccessoryVariant:B,toggleBundle:j}};var n=r(d[0]),t=r(d[1]),l=r(d[2]);const s={variant:null,status:'default'},u={plan:null,status:'default'},o=new Map,c=new Set;function f(n,l){if(null==n)return null;if(null!=n.effectiveUsbType&&''!==n.effectiveUsbType)return n.effectiveUsbType;const s=l??[],u=s.findIndex(n=>'USB Type'===n.name);if(-1===u)return null;return(0,t.getVariantOptionValuesOrdered)(n,s)[u]??null}},1042,[34,1005,1025]);
1143__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useApiPointsTiers=function(){return(0,s.useAsyncData)(async()=>{const s=await n.storeApi.getApiPointsTiers();return{tiers:s.tiers.map(n=>({minSpendDollars:n.minSpendDollars,pointsPerDollar:n.pointsPerDollar,label:n.label})),minimumPurchaseDollars:s.minimumPurchaseDollars}},[],'Failed to load pricing information.')};var n=r(d[0]),s=r(d[1])},1043,[618,561]);
1144__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useProductDetail=function(l){const{setActiveCategorySlug:s}=(0,u.useActiveStoreCategory)(),{data:n,loading:p,error:y,retry:f}=(0,c.useAsyncData)(async()=>{const[t,u]=await Promise.all([o.storeApi.getProductByHandle(l),o.storeApi.getCategories()]);return{product:t,categories:u}},[l],'Failed to load product'),v=n?.product??null,A=(0,t.useMemo)(()=>n?.categories??[],[n?.categories]),C=(0,t.useMemo)(()=>null==v?null:A.find(t=>t.productType===v.productType)??null,[v,A]);return(0,t.useEffect)(()=>{if(null!=C)return s(C.slug),()=>{s(null)}},[C,s]),{product:v,categories:A,activeCategory:C,loading:p,error:y,retry:f}};var t=r(d[0]),o=r(d[1]),u=r(d[2]),c=r(d[3])},1044,[34,618,616,561]);
1145__d(function(g,r,i,a,m,e,d){"use strict";
1145Object.defineProperty(e,'__esModule',{value:!0}),e.useStoreData=function(){return(0,o.useAsyncData)(async()=>{const[o,s]=await Promise.all([t.storeApi.getProducts(),t.storeApi.getCategories()]);return{products:o,categories:s}},[],'Failed to load products')};var t=r(d[0]),o=r(d[1])},1045,[618,561]);
1146__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ProjectsAndIntegrationsScreen=function(){return(0,y.jsx)(f.CatalogLayout,{seoKey:"ProjectsAndIntegrations",hero:{backgroundColor:h.COLORS.BRAND_PRIMARY,background:{imageUrl:x.HERO_IMAGE_URL,imagePosition:'center',overlayGradient:S.GRADIENTS.DARK_OVERLAY},minHeight:350,label:'ECOSYSTEM',title:'Projects & Integrations',subtitle:`${x.TOTAL_PROJECTS} programs, tools, and platforms using PurpleAir sensors for air quality monitoring and public health.`,centered:!0},categories:x.PROJECT_CATEGORIES,getItemCount:e=>e.projects.length,sidebarTitle:"Type",allLabel:"All Types",itemNoun:{singular:'project',plural:'projects'},introText:"PurpleAir sensor data is used by government agencies, universities, and platform providers around the world. Below is a curated collection of programs and tools that integrate PurpleAir data.",disclaimerTitle:"About This Collection",disclaimerText:"This is a curated selection of projects, programs, and tools that integrate PurpleAir sensor data. It is not an exhaustive list. If your organization uses PurpleAir sensors and you would like to be included here, please contact us.",narrowMaxWidth:960,categoryGap:p.SPACING.MASSIVE,renderCategorySection:e=>(0,y.jsx)(A,{category:e})})};var t=r(d[0]),o=e(r(d[1])),n=e(r(d[2])),l=e(r(d[3])),c=r(d[4]),s=r(d[5]),u=r(d[6]),f=r(d[7]),h=r(d[8]),S=r(d[9]),p=r(d[10]),j=r(d[11]),x=r(d[12]),y=r(d[13]);function C(e){try{return new URL(e).hostname.replace(/^www\./,'')}catch{return''}}function I({organization:e,url:c,accent:s}){const[u,f]=(0,t.useState)(!1),h=C(c),S=h?`https://www.google.com/s2/favicons?domain=${h}&sz=128`:'',p=e.charAt(0).toUpperCase();return!S||u?(0,y.jsx)(o.default,{style:[O.orgFaviconFallback,{backgroundColor:s}],children:(0,y.jsx)(n.default,{style:O.orgFaviconInitial,children:p})}):(0,y.jsx)(o.default,{style:O.orgFaviconContainer,children:(0,y.jsx)(l.default,{source:{uri:S},style:O.orgFaviconImage,resizeMode:"contain",onError:()=>{f(!0)},accessibilityLabel:`${e} logo`})})}function T({project:e,accent:t}){const c=(0,u.readExternalUrlLinkProps)(e.url),f=(0,y.jsxs)(s.Card,{hoverable:null!=c,padding:0,style:O.projectCardInner,children:[(0,y.jsx)(o.default,{style:[O.cardAccent,{backgroundColor:t}]}),(0,y.jsxs)(o.default,{style:O.cardBody,children:[null!=e.imageUrl&&''!==e.imageUrl?(0,y.jsx)(o.default,{style:O.cardImageContainer,children:(0,y.jsx)(l.default,{source:{uri:e.imageUrl},style:O.cardImage,resizeMode:"cover",accessibilityLabel:e.imageAlt??e.title})}):null,(0,y.jsxs)(o.default,{style:O.cardContent,children:[(0,y.jsxs)(o.default,{style:[O.orgBadge,{backgroundColor:`${t}14`}],children:[(0,y.jsx)(I,{organization:e.organization,url:e.url,accent:t}),(0,y.jsx)(n.default,{style:[O.orgBadgeText,{color:t}],children:e.organization})]}),(0,y.jsx)(n.default,{style:O.projectTitle,children:e.title}),(0,y.jsx)(n.default,{style:O.projectDescription,children:e.description}),(0,y.jsx)(o.default,{style:O.projectLinkRow,children:null!=c?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n.default,{style:[O.projectLink,{color:t}],children:"Visit resource"}),(0,y.jsx)(n.default,{style:[O.projectLinkArrow,{color:t}],children:'\u2192'})]}):(0,y.jsx)(n.default,{style:O.projectLinkUnavailable,children:"Resource link unavailable"})})]})]})]});return null==c?(0,y.jsx)(o.default,{style:O.projectCard,children:f}):(0,y.jsx)(u.ExternalLink,Object.assign({},c,{style:O.projectCard,children:f}))}function A({category:e}){const t=x.CATEGORY_ACCENTS[e.id]??h.COLORS.BRAND_PRIMARY;return(0,y.jsxs)(o.default,{children:[(0,y.jsxs)(o.default,{style:O.categoryHeader,children:[(0,y.jsx)(o.default,{style:[O.categoryDot,{backgroundColor:t}]}),(0,y.jsxs)(o.default,{style:O.categoryHeaderText,children:[(0,y.jsx)(n.default,{style:O.categoryTitle,children:e.title}),(0,y.jsx)(n.default,{style:O.categoryDescription,children:e.description})]})]}),(0,y.jsx)(o.default,{style:O.projectGrid,children:e.projects.map(e=>(0,y.jsx)(T,{project:e,accent:t},e.url))})]})}const O=(0,c.createStyles)({cardAccent:{width:5},cardBody:{flex:1},cardContent:{flex:1,padding:18},cardImage:{height:'100%',width:'100%'},cardImageContainer:{backgroundColor:h.COLORS.BG_SUBTLE_100,height:140,width:'100%'},categoryDescription:{color:h.COLORS.TEXT_SOFT,fontSize:j.FONT_SIZE.MD,lineHeight:22},categoryDot:{borderRadius:5,flexShrink:0,height:10,marginTop:p.SPACING.SM,width:10},categoryHeader:{alignItems:'flex-start',flexDirection:'row',gap:p.SPACING.LG,marginBottom:p.SPACING.XL},categoryHeaderText:{flex:1},categoryTitle:{color:h.COLORS.TEXT_HEADING,fontSize:j.FONT_SIZE.XXXL,fontWeight:'700',marginBottom:p.SPACING.SM},orgBadge:{alignItems:'center',alignSelf:'flex-start',borderRadius:6,flexDirection:'row',gap:p.SPACING.SM,marginBottom:p.SPACING.MD,paddingHorizontal:p.SPACING.MD,paddingVertical:p.SPACING.XS},orgBadgeText:{fontSize:j.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.3,textTransform:'uppercase'},orgFaviconContainer:{borderRadius:3,height:16,overflow:'hidden',width:16},orgFaviconFallback:{alignItems:'center',borderRadius:3,height:16,justifyContent:'center',width:16},orgFaviconImage:{height:16,width:16},orgFaviconInitial:{color:h.COLORS.TEXT_INVERSE,fontSize:j.FONT_SIZE.MICRO,fontWeight:'700'},projectCard:{flexBasis:280,flexGrow:1,flexShrink:0,maxWidth:460},projectCardInner:{flex:1,flexDirection:'row',overflow:'hidden'},projectDescription:{color:h.COLORS.TEXT_SECONDARY,fontSize:j.FONT_SIZE.SM,lineHeight:20,marginBottom:p.SPACING.LG},projectGrid:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.LG},projectLink:{fontSize:j.FONT_SIZE.SM,fontWeight:'600'},projectLinkArrow:{fontSize:j.FONT_SIZE.LG,fontWeight:'600'},projectLinkUnavailable:{color:h.COLORS.TEXT_MUTED,fontSize:j.FONT_SIZE.SM,fontStyle:'italic'},projectLinkRow:{alignItems:'center',flexDirection:'row',gap:p.SPACING.SM},projectTitle:{color:h.COLORS.TEXT_HEADING,fontSize:j.FONT_SIZE.LG,fontWeight:'600',lineHeight:22,marginBottom:p.SPACING.SM}})},1046,[34,276,222,328,489,605,519,973,490,675,493,494,1047,104]);
1147__d(function(g,r,i,a,m,e,d){"use strict";
1147Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HERO_IMAGE_URL",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"PROJECT_CATEGORIES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"CATEGORY_ACCENTS",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"TOTAL_PROJECTS",{enumerable:!0,get:function(){return l}});var t=r(d[0]);const o='https://images.unsplash.com/photo-1446776709462-d6b525c57bd3?w=1920&q=80',n=[{id:'government-programs',title:'Government Programs',description:'Federal, state, and local government programs that deploy PurpleAir sensors for community air quality monitoring, public health, and environmental protection.',projects:[{organization:'DOEE Washington D.C.',title:'PurpleAir Sensor Project',url:'https://doee.dc.gov/service/purpleair-sensor-project',description:'District program deploying PurpleAir sensors to monitor and share local air quality data.',imageUrl:'https://doee.dc.gov/sites/default/files/dc/sites/doee/service_content/images/purpleAir%20pic2.jpg',imageAlt:'PurpleAir sensor deployed in Washington D.C.'},{organization:'National Park Service',title:'A Low-cost Air Quality Sensor for Measuring Particulate Matter',url:'https://www.nps.gov/articles/000/a-low-cost-air-quality-sensor-for-measuring-particulate-matter.htm',description:'NPS field evaluation of PurpleAir vs. GRIMM at I-25 Denver; CF_ATM, regression, AQI categories; survey use in parks without reference monitors.',imageUrl:'https://www.nps.gov/articles/000/images/imageAQ002Mod.jpg',imageAlt:'PurpleAir sensor installed at NPS air quality monitoring station'},{organization:'Santa Barbara County APCD',title:'Air Sensors',url:'https://www.ourair.org/sensors/',description:'Low-cost sensors including PurpleAir; community partners, Fire & Smoke Map; District-owned sensors at schools and organizations countywide.'},{organization:'South Coast AQMD',title:'Development of a Cloud-Based Application to Ingest, Validate, Analyze, and Map Data from a Large PM Sensor Network',url:'https://www.aqmd.gov/aq-spec/special-projects/airsensor',description:'South Coast AQMD cloud-based PM sensor network including PurpleAir data ingestion and mapping.'},{organization:'Lower Niobrara NRD',title:'Purple Air Monitor',url:'https://lnnrd.org/purple-air-monitor/',description:"NCDHD and Lower Niobrara NRD PurpleAir monitors in O'Neill, Butte, and Ainsworth; real-time PM2.5, PM10, temperature, humidity; links to AirNow Fire and Smoke Map."},{organization:'MassDEP',title:'Air Sensor Grant Program',url:'https://www.mass.gov/how-to/apply-for-a-massdep-air-sensor-grant',description:'Provides up to 5 free PurpleAir sensors to municipalities, nonprofits, and tribes; over 460 sensors awarded across Massachusetts, primarily in Environmental Justice areas.'},{organization:'Montana DEQ',title:'PurpleAirs in Schools Project',url:'https://deq.mt.gov/air/Programs/monitoring',description:'Partnership with University of Montana installing free PurpleAir sensors at every Montana high school; indoor classroom and outdoor sensors for wildfire smoke decisions.'},{organization:'New Hampshire DES',title:'Community Air Monitoring Program',url:'https://www.des.nh.gov/home-and-recreation/air-quality/community-air-monitoring-program',description:'Statewide PurpleAir deployment supplementing six regulatory stations; captures neighborhood-level PM2.5 differences with data uploaded every 10 minutes.'},{organization:'City of Minneapolis',title:'Community Air Monitoring Program',url:'https://minneapolismn.gov/government/programs-initiatives/environmental-programs/air-quality',description:'Environmental justice-focused program placing PurpleAir sensors in every neighborhood; operated by the Minneapolis Health Department with a public dashboard.'},{organization:'City of Sacramento',title:'Air Quality Monitoring Pilot',url:'https://www.cityofsacramento.gov/public-works/mobility-and-sustainability/climate/Initiatives/air-quality.html',description:'200 free portable PurpleAir sensors distributed to residents, businesses, schools, and public facilities in underserved North and South Sacramento neighborhoods.'},{organization:'Oregon DEQ',title:'Air Quality Monitoring Community Outreach',url:'https://www.oregon.gov/deq/aq/Pages/AQ-Monitoring-Community-Outreach.aspx',description:'Technical guidance for communities deploying low-cost sensors; includes the SensOR Site Selection Project with 20 new PM2.5 monitoring sites across Oregon.'},{organization:'MORPC / Franklin County Public Health',title:'Neighborhood Air Quality Monitoring Program',url:'https://www.morpc.org/programs-services/neighborhood-air-quality-monitoring-program/',description:'36 PurpleAir sensors across Franklin County, Ohio; placement prioritized by community input and vulnerable population demographics; collaborative dashboard with Ramboll pollution source analysis.'},{organization:'City of Cincinnati',title:'Cincy Air Watch Project',url:'https://www.cincinnati-oh.gov/oes/natural-environment/air-quality/cincy-air-watch/',description:'37 PurpleAir Flex monitors targeting priority neighborhoods with high asthma prevalence; goal of one monitor in every neighborhood (52 total); part of 2023 Green Cincinnati Plan.'},{organization:'Sandy City, Utah',title:'Citywide Air Quality Monitoring Partnership',url:'https://ksltv.com/local-news/sandy-installs-air-monitors-to-give-residents-clearer-picture-of-quality/712347/',description:'First municipality to partner with PurpleAir; 20 monitors at city-owned facilities including City Hall; real-time data viewable on PurpleAir map.'},{organization:'Marion County Health Dept',title:'West Side Air Quality Pilot',url:'https://www.wfyi.org/news/articles/health-department-to-track-air-pollution-in-we
1147st-indianapolis',description:'10 PurpleAir Flex monitors in west Indianapolis neighborhoods funded by CDC; evaluating correlation between PM2.5 exposure and respiratory outcomes.'},{organization:'Linn County Public Health',title:'Air Quality Sensor Network',url:'https://cbs2iowa.com/news/local/clearing-the-air-linn-countys-commitment-to-environmental-health',description:'PurpleAir sensors at schools and public sites in Cedar Rapids; real-time PM2.5 data on PurpleAir map and AirNow Fire and Smoke Map for resident health decisions.'},{organization:'Chaffee County Public Health',title:'Purple Air Quality Monitoring Program',url:'https://heartoftherockiesradio.com/ccph-officially-launches-purple-air-quality-monitoring-program/',description:'Four PurpleAir monitors in Poncha Springs, Salida, and Buena Vista; real-time wildfire smoke data for residents in the upper Arkansas River valley.'},{organization:'Pasadena Public Health Dept',title:'Post-Fire Air Quality Monitoring',url:'https://www.coloradoboulevard.net/pasadena-deploys-nine-purpleair-sensors-to-monitor-air-quality-in-real-time/',description:'Nine PurpleAir Flex sensors deployed after the Eaton fire; real-time PM2.5 monitoring for cleanup health decisions in affected neighborhoods.'},{organization:'Wiltshire Council',title:'Wiltshire Community Air Network',url:'https://airqualitynews.com/local-government/100-hosts-needed-for-wiltshire-community-air-network/',description:'100 PurpleAir Zen sensors across 18 community areas in England; hosts at schools, NHS facilities, and near pollution sources; sensors retained after one year.'},{organization:'San Pedro Garza Garcia',title:'Adopta un Sensor Citizen Program',url:'https://www.telediario.mx/comunidad/san-pedro-instala-sensores-ciudadanos-para-calidad-de-aire',description:'Up to 200 PurpleAir sensors across the municipality in Monterrey, Mexico; citizen adoption program for schools, parks, and homes; data on aireclaro.com.'},{organization:'Armidale Regional Council',title:'Community Air Quality Monitoring',url:'https://www.armidale.nsw.gov.au/News-articles/New-air-quality-monitors-rolling-out-across-Armidale',description:'10 solar-powered PurpleAir monitors at sports facilities, parks, and community buildings in Armidale, Australia; sites selected for population spread and topographic variation.'},{organization:'Hawaii DOH',title:'Community Air Quality Monitoring with PurpleAir',url:'https://governor.hawaii.gov/newsroom/doh-news-release-validated-epa-air-sampling-data-shows-good-air-quality/',description:'Hawaii DOH uses PurpleAir monitors for widespread community air monitoring, increasing geographical coverage; real-time data complements EPA sampling during volcanic and fire events.'},{organization:'Michigan EGLE',title:'Air Sensors for Citizen Scientists',url:'https://www.michigan.gov/egle/newsroom/mi-environment/2023/05/05/for-the-citizen-scientist-air-sensors-can-be-a-tool-to-understand-air-quality-conditions',description:'Michigan EGLE guidance on PurpleAir and other low-cost sensors for citizen scientists, community groups, and local governments to supplement regulatory monitoring.'},{organization:'City of Framingham, MA',title:'Air Quality Monitoring Grant',url:'https://www.framinghamma.gov/CivicAlerts.aspx?AID=3185',description:'Five PurpleAir Flex sensors deployed by the Framingham Public Health Department; grant-funded real-time fine particulate matter data for community health decisions.'}]},{id:'satellite-volcanic',title:'Satellite & Volcanic Monitoring',description:'Programs using PurpleAir sensors as ground-truth for satellite-based air quality measurements and for monitoring volcanic emissions.',projects:[{organization:'NASA Earthdata / CSESP',title:'Can Citizen Science and Low-Cost Sensors Help Improve Earth System Data?',url:'https://www.earthdata.nasa.gov/esds/competitive-programs/csesp/improve-earth-system-data',description:'Nearly 180 PurpleAir sensors across Los Angeles, Raleigh, and Delhi providing ground-level PM2.5 measurements to validate satellite aerosol optical depth from TEMPO and MAIA missions.'},{organization:'NASA JPL',title:'MAIA Mission',url:'https://maia.jpl.nasa.gov/mission/',description:'Multi-Angle Imager for Aerosols satellite mission studying how particulate matter affects health; uses PurpleAir as part of a ground sensor network across the southeastern 
1147U.S.'},{organization:'IVHHN / USGS / NPS',title:'Hawaii Interagency Vog Information Dashboard',url:'https://vog.ivhhn.org/',description:'Multi-agency volcanic air quality dashboard for Hawaii; lists PurpleAir as a data source for real-time particle concentrations alongside satellite SO2 observations.'},{organization:'University of Leeds',title:'Montserrat Volcanic Air Pollution Study',url:'https://environment.leeds.ac.uk/see/pgr/11238/rosie-lewis',description:'11 PurpleAir monitors deployed across Montserrat island near Soufriere Hills volcano; network calibrated against reference-grade monitors for volcanic emission tracking.'},{organization:'NOAA Global Monitoring Laboratory',title:'PurpleAir as Aerosol Light Scattering Instrument',url:'https://gml.noaa.gov/news/purpleair.html',description:'PurpleAir sensors deployed at Mauna Loa Observatory and Table Mountain, Boulder for evaluation as aerosol light scattering instruments alongside reference nephelometers.'}]},{id:'community-fenceline',title:'Community & Fenceline Monitoring',description:'Grassroots and environmental justice initiatives deploying PurpleAir sensors near pollution sources and in disadvantaged communities.',projects:[{organization:'Citizens for Clean Air',title:'Purple Air Monitoring Project',url:'https://www.citizensforcleanair.org/purple-air-monitoring-project/',description:'Over 30 PurpleAir monitors across the Grand Valley in Mesa County, Colorado since 2018; includes "Tri-sensors" combining PurpleAir with ozone and VOC measurement.'},{organization:'Yolo-Solano AQMD',title:'AB 617 Community Air Sensor Program (CASP)',url:'https://www.ysaqmd.org/plans-data/ab-617/casp/',description:'PurpleAir sensors in underserved and rural communities since 2017; real-time PM2.5 in Winters, Vacaville, South Davis, and other areas; wildfire smoke focus.'},{organization:'BluePrint Geneva',title:'Fenceline Community Air Quality Monitoring Program',url:'https://sites.google.com/blueprintgeneva.org/welcome/project-areas/environmental-justice-and-urban-agriculture/air-quality-monitoring-program',description:'PurpleAir sensors in NYS-designated disadvantaged communities near known pollution emitters in Geneva, NY; partnership with Hobart and William Smith Colleges and Cornell.'},{organization:'Strathcona Residents Association / Port Vancouver',title:'Strathcona Area Air Quality Study',url:'https://portvancouver.civilspace.io/en/projects/strathcona-area-air-quality-study',description:'18 air quality monitors including PurpleAir near port terminals in Vancouver, BC; fenceline study of diesel emissions from truck, train, and ship traffic.'},{organization:'GASP Pittsburgh',title:'Allegheny County Community Air Monitoring Project',url:'https://www.gasp-pgh.org/monitoring',description:'EPA-funded PurpleAir network near industrial facilities in Allegheny County; fenceline monitoring of coke plants, steel mills, and glass manufacturing.'},{organization:'ImpactNV / Make the Road Nevada',title:'Buen Aire Para Todos',url:'https://reviewjournal.com/local/east-valley/this-vegas-neighborhood-is-known-for-poor-air-quality-new-sensors-may-help-2617855',description:'40 PurpleAir monitors in East Las Vegas: 20 indoor, 10 outdoor, 10 mobile on food trucks; EPA grant with Desert Research Institute for environmental justice monitoring.'},{organization:'Philly Community Wireless / Temple University',title:'Act on Air: Philly Air Monitor Project',url:'https://phillycommunitywireless.org/airmonitor/',description:'12+ PurpleAir sensors in North Philadelphia integrated with community mesh WiFi network; real-time air quality data for neighborhoods near I-95 and industrial zones.'},{organization:'Clean Air Council',title:'I-95 Corridor PurpleAir Network',url:'https://whyy.org/articles/philadelphia-air-quality-pollution-monitoring/',description:'60 PurpleAir monitors across Delaware County and South/Southwest Philadelphia along the I-95 corridor; EPA-backed community air quality tracking initiative.'},{organization:'Del Amo Action Committee',title:'Community Air Quality Monitoring',url:'https://delamoactioncommittee.org/air-quality-monitoring-data/',description:'12 PurpleAir sensors in the Del Amo/Montrose Superfund area of southwest Los Angeles; fenceline monitoring near former chemical manufacturing sites.'},{organization:'Appalachian Voices',title:'USACAMP',url:'https://appvoices.org/coal-impacts/epa-dust-monitoring/',de
1147scription:'80 PurpleAir monitors across Virginia, West Virginia, Kentucky, Tennessee, and Pennsylvania; tracks coal dust and industrial soot in Appalachian communities.'},{organization:'Fort Bend County Environmental Org',title:'Community Air Monitoring',url:'https://houstonpublicmedia.org/articles/news/energy-environment/2024/06/25/491794/fort-bend-environmental-organization-to-share-air-quality-data-with-epa/',description:'PurpleAir monitors in Missouri City, Richmond, and Rosenberg near the W.A. Parish power plant; community data shared directly with EPA.'},{organization:'Oxford Friends of the Earth',title:'Oxford Particulates Monitoring Project',url:'https://www.oxfoe.co.uk/oxford-friends-of-the-earth/air-quality/oxford-particulates-monitoring-project/',description:'Community-operated PurpleAir monitoring network across Oxford, England; tracks PM2.5 near schools, residential streets, and major traffic corridors.'}]},{id:'university-community',title:'University & Community Projects',description:'Academic research programs and community-led initiatives using PurpleAir sensors for air quality studies, environmental justice, and public engagement.',projects:[{organization:'UASRA / UCLA Fielding School',title:'Air Monitoring Project at University Village',url:'https://www.uasra.org/air',description:'UCLA Fielding School and SCAQMD collaboration with University Village residents; PurpleAir sensors outdoors and in apartments; real-time data on PurpleAir; reports and resources.'},{organization:'Caltech / JPL',title:'PHOENIX Post-Fire Air Monitoring',url:'https://breathe.caltech.edu/phoenix/',description:'25 air monitoring sites deployed in Altadena after the Eaton fire destroyed the PurpleAir network; solar-powered sensors at 1 km spacing measure PM10 during debris cleanup.'},{organization:'Cornell Cooperative Extension',title:'NY Wildfire Smoke Sensor Network',url:'https://www2.purpleair.com/blogs/collaborations/case-study-how-purpleair-helps-monitor-new-york-air-quality',description:'PurpleAir Flex sensors deployed in all 28 unmonitored New York counties; wildfire smoke detection network filling gaps in state regulatory monitoring.'},{organization:'University of Montana / CSKT',title:'Flathead Reservation Air Quality Network',url:'https://www.umt.edu/news/2025/03/031925purp.php',description:'30 PurpleAir monitors at schools, clinics, and fitness centers on the Flathead Reservation; integrates Western air quality science with tribal ecological knowledge.'},{organization:'RISE Communities',title:'EJ Sensor Training Program',url:'https://www.ejsensors.com/program-and-community-outcomes',description:'Cincinnati Children\'s Hospital and UC program providing free PurpleAir sensors and training to environmental justice research teams across the United States.'},{organization:'Sonoma County Library',title:'Library Branch Air Quality Sensors',url:'https://sonomalibrary.org/index.php/stayinformed/purpleair',description:'PurpleAir sensors at all 15 Sonoma County Library branches; wildfire smoke monitoring with real-time data on the PurpleAir map for community health decisions.'},{organization:'University of Toronto / Wunch Group',title:'GTA Air Quality Project',url:'https://www.atmosp.physics.utoronto.ca/GTA-Emissions/About/purpleair/',description:'27 PurpleAir sensors across Toronto, Mississauga, and Scarborough; atmospheric physics research correlating ground-level PM2.5 with satellite observations.'},{organization:'GeoHealth Hub Peru',title:'Nationwide Air Quality Sensor Network',url:'http://www.geohealthperu.org/research-phase-2.html',description:'176 PurpleAir monitors across all 24 regions of Peru; largest national low-cost sensor network in Latin America; health impact research on PM2.5 exposure.'},{organization:'Clean Air One Atmosphere',title:'Yakokoe Air Quality App',url:'https://www2.purpleair.com/blogs/collaborations/how-clean-air-one-atmosphere-is-redefining-clean-air-in-africa',description:'Africa-focused air quality awareness platform connecting to PurpleAir Map data; community education and policy advocacy across West and East African cities.'},{organization:'Nez Perce Tribe',title:'Air Sensor Loan Project',url:'https://www.epa.gov/sciencematters/epa-partners-tribes-deploy-air-sensors-communities',description:'PurpleAir sensors at nine rural libraries on the Nez Perce Reservation; patron lending program for indoor air quality assessment during wildfire smoke events.'},{organization:'Upper Mattaponi Indian Tribe',title:'Community Air Monitoring',url:'https://pwperspective.com/upper-mattaponi-indian-tribe-to-begin-air-quality-monitoring/',de
1147scription:'$450K EPA grant for PurpleAir sensors near Superfund sites and mining operations in Virginia; partnership with Virginia Tech and George Mason University.'},{organization:'Beloit Environmental Justice',title:'Community Air Quality Monitoring',url:'https://www2.purpleair.com/blogs/collaborations/air-quality-in-wisconsin-beloit-air-quality-program',description:'Six EPA-provided PurpleAir monitors revealed Beloit as the most polluted U.S. city in the IQAir global report; data drove demand for state regulatory monitoring.'},{organization:'Rochester Air Quality Network',title:'Student-Led City Monitoring',url:'https://www2.purpleair.com/blogs/collaborations/how-a-student-started-the-rochester-air-quality-network',description:'16 PurpleAir sensors across Rochester, Minnesota; student-initiated network providing hyperlocal PM2.5 data for the Mayo Clinic community.'},{organization:'EPA / Maricopa County',title:'Phoenix Testbed for Air Quality Sensors (PTAQS)',url:'https://cfpub.epa.gov/si/si_public_record_report.cfm?Lab=CEMM&dirEntryId=349966',description:'30+ PurpleAir sensors in the Phoenix metropolitan area; EPA research testbed evaluating low-cost sensor performance against federal reference monitors.'},{organization:'ACCA',title:'8-Country PM2.5 Monitoring Study',url:'https://www2.purpleair.com/blogs/collaborations/how-researchers-are-studying-air-quality-in-africa',description:'PurpleAir sensors at 15 locations across 8 sub-Saharan African countries; first comprehensive low-cost PM2.5 monitoring network on the continent.'},{organization:'NSW EPA',title:'Warringah Freeway Construction Monitoring',url:'https://www.epa.nsw.gov.au/Working-together/Community-engagement/updates-on-issues/Warringah-freeway-air-monitoring',description:'10 PurpleAir monitors between Wollstonecraft and Middle Harbour in Sydney; construction air quality monitoring for Western Harbour Tunnel project.'},{organization:'USC Environmental Health Centers',title:'PM2.5 PurpleAir Data Visualization Project',url:'https://envhealthcenters.usc.edu/pm-2-5-shiny',description:'Interactive visualization of PurpleAir PM2.5 data for Long Beach and South/Southeast Los Angeles; maps sensor readings alongside demographic and health data.'}]},{id:'tools-maps',title:'Tools & Maps',description:'Public tools, maps, and platforms that integrate PurpleAir sensor data to provide real-time air quality information.',projects:[{organization:'AirNow / EPA / USFS',title:'Fire and Smoke Map',url:'https://fire.airnow.gov/',description:'Real-time air quality and smoke map; includes PurpleAir and other monitors; EPA and Forest Service.',imageUrl:'https://www.airnow.gov/sites/default/files/download-images/airnow-logos/airnow-logo-250x133.jpg',imageAlt:'AirNow logo'},{organization:'EPA',title:'Air Sensor Toolbox',url:'https://www.epa.gov/air-sensor-toolbox',description:'EPA guidance on air sensors for community monitoring; includes PurpleAir perspectives, correction equations for Fire and Smoke Map, and data tools.',imageUrl:'https://www.epa.gov/sites/default/files/styles/gallery_medium/public/2019-08/epa-banner-images/rtp_air_monitoring_site_091.jpg',imageAlt:'EPA air quality monitoring site with sensors and equipment'},{organization:'CARB',title:'AB 617 Community Air Monitoring Systems',url:'https://ww2.arb.ca.gov/capp-resource-center/community-air-monitoring/existing-community-monitoring-systems',description:"California's statewide framework cataloging community air monitoring systems deployed under AB 617, including PurpleAir sensor networks across multiple air districts."},{organization:'UC Berkeley',title:'Bay Area Community Air Quality Map',url:'https://sfpublicpress.org/new-air-quality-monitoring-app-aims-to-protect-students-in-polluted-bay-area-communities',description:'Interactive map built on PurpleAir sensor data to help Bay Area schools decide when to keep students indoors; developed by UC Berkeley researchers.'}]},{id:'platforms-integrations',title:'Platforms & Integrations',description:'Commercial platforms, apps, and smart-home systems that incorporate PurpleAir sensor data for air quality awareness and automation.',projects:[{organization:'IQAir',title:'AirVisual Platform',url:'https://www.iqair.com/us/profile/purpleair',description:'Ingests 12,600+ PurpleAir stations with proprietary calibration; sensor owners can claim profiles and contribute to the IQAir global air quality map.'},{organization:'Google',title:'Maps Air Quality Layer',url:'https://support.google.com/maps/answer/11270845',description:'Street-level AQI overlay in Google Maps using PurpleAir data with EPA correction equations; available on iOS and Android.'},{organization:'Home Assistant',title:'PurpleAir Integration',url:'https://www.home-assistant.io/integrations/purpleair/',description:'Official built-in integration for the open-source home automation platform; tracks multiple sensors and automates actions based on air quality thresholds.'},{organization:'Windy.com',title:'Air Quality Stations',url:'https://www.windy.com',description:'Approximately 12,000 PurpleAir sensors integrated into the global weather platform; real-time PM1.0, PM2.5, and PM10 data alongside forecast models.'}]}],s={'government-programs':t.COLORS.BLUE,'satellite-volcanic':t.COLORS.INFO,'community-fenceline':t.COLORS.ERROR,'university-community':t.COLORS.EMERALD_600,'tools-maps':t.COLORS.WARNING,'platforms-integrations':t.COLORS.CYAN_600},l=n.reduce((t,o)=>t+o.projects.length,0)},1047,[490]);
1148__d(function(g,r,i,a,m,e,d){"use strict";
1148Object.defineProperty(e,'__esModule',{value:!0}),e.PurchasingScreen=function(){return(0,o.jsx)(n.DiscoursePage,{errorSurface:t.contentLoad,seoKey:"Purchasing",slug:"purchasing",pageName:"purchasing information"})},r(d[0]);var n=r(d[1]),c=r(d[2]),o=r(d[3]);const t=(0,c.defineScreenErrorSurfaces)('Purchasing',{contentLoad:{id:'content-load',kind:'page',label:'Purchasing content load error'}})},1048,[34,976,557,104]);
1149__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.RecallScreen=function(){const{page:e,loading:t,error:o,retry:u}=(0,x.usePageContent)('recall'),f=(0,C.useSeoMeta)('Recall'),{isDevTriggered:S,surface:L}=(0,j.useErrorSurface)(R.contentLoad),M=o??(null==e||S?'Content not found.':null);if(t)return(0,b.jsx)(l.MarkdownPageLoading,{});if(null!=M||null==e)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.WebMeta,Object.assign({},f)),(0,b.jsx)(l.MarkdownPageError,{message:M??'Content not found.',onRetry:u,surface:L})]});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.WebMeta,Object.assign({},f)),(0,b.jsx)(l.MarkdownPage,{title:e.title,body:e.body,footer:(0,b.jsx)(c.AppLink,{to:"Contact",style:y.contactButton,children:(0,b.jsx)(n.default,{style:y.contactButtonText,children:"Contact Us"})})})]})},r(d[0]);var e,t=r(d[1]),n=(e=t)&&e.__esModule?e:{default:e},o=r(d[2]),c=r(d[3]),l=r(d[4]),s=r(d[5]),u=r(d[6]),f=r(d[7]),S=r(d[8]),j=r(d[9]),x=r(d[10]),C=r(d[11]),b=r(d[12]);const R=(0,j.defineScreenErrorSurfaces)('Recall',{contentLoad:{id:'content-load',kind:'page',label:'Safety recall content load error'}});const y=(0,o.createStyles)({contactButton:{backgroundColor:u.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.LG},contactButtonText:{color:u.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'}})},1049,[34,222,489,516,566,565,490,493,494,557,559,562,104]);
1150__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.RefundPolicyScreen=function(){return(0,c.jsx)(n.ShopifyPolicyPage,{errorSurface:t.contentLoad,seoKey:"RefundPolicy",handle:"refund-policy",policyName:"Refund Policy"})},r(d[0]);var n=r(d[1]),o=r(d[2]),c=r(d[3]);const t=(0,o.defineScreenErrorSurfaces)('RefundPolicy',{contentLoad:{id:'content-load',kind:'page',label:'Refund policy content load error'}})},1050,[34,997,557,104]);
1151__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return z}}),_e.RegisterScreen=F,r(d[0]);var t=e(r(d[1])),s=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5]));r(d[6]);var c=e(r(d[7])),u=r(d[8]),S=r(d[9]),f=r(d[10]),C=r(d[11]),y=r(d[12]),x=r(d[13]),h=r(d[14]),O=r(d[15]),R=r(d[16]),L=r(d[17]),I=r(d[18]),T=r(d[19]),N=r(d[20]),p=r(d[21]),A=r(d[22]),b=r(d[23]),j=r(d[24]),P=r(d[25]),E=r(d[26]),G=r(d[27]),_=r(d[28]),B=r(d[29]),M=r(d[30]),D=r
1151(d[31]),W=r(d[32]),X=r(d[33]),k=r(d[34]);const w=480;function F(){const{width:e}=(0,c.default)(),u=e<=w,{wizard:_,tokenLoading:B,draftLoading:M,tokenResumeFailure:F,showDraftPrompt:z,associationStatus:Z,isSubmitting:H,submissionResult:U,ownerCheckLoading:Y,configLoading:V,isModifyingCurrentRegistration:K,registrationSourceConflictPrompt:$,canReopenRegistrationSourceConflict:Q,legacyRegistrationUrlIssues:q,onResumeDraft:J,onStartFresh:ee,onDismissTokenError:te,onRetryTokenResume:se,onResetAfterSuccess:re,onSubmit:ie,onNextStep:ne,onRetryAssociation:oe,onContinueWithSelectedRegistrationSources:ae,onReopenRegistrationSourceConflict:le,onDismissRegistrationSourceConflict:ce,onDismissLegacyRegistrationUrlIssues:de}=(0,D.useRegisterScreenOrchestration)(),ue=(0,X.useSeoMeta)('Register');if(B||M)return(0,k.jsxs)(f.AsyncPageLayout,{status:"loading",children:[(0,k.jsx)(P.WebMeta,Object.assign({},ue)),(0,k.jsx)(t.default,{style:v.centerContainer,children:(0,k.jsx)(y.LoadingState,{message:"Loading registration data..."})})]});if(null!=F)return(0,k.jsxs)(x.PageLayout,{children:[(0,k.jsx)(P.WebMeta,Object.assign({},ue)),(0,k.jsx)(t.default,{style:v.centerContainer,children:(0,k.jsxs)(C.Card,{style:v.errorBox,padding:32,children:[(0,k.jsx)(s.default,{style:v.errorTitle,children:"Registration Link Error"}),(0,k.jsx)(s.default,{style:v.errorMessage,children:F.message}),(0,k.jsxs)(t.default,{style:v.draftPromptButtons,children:[F.retryable&&(0,k.jsx)(n.default,{style:v.primaryButton,onPress:se,accessibilityRole:"button",accessibilityLabel:"Retry registration link",children:(0,k.jsx)(s.default,{style:v.primaryButtonText,children:"Try Again"})}),(0,k.jsx)(n.default,{style:F.retryable?v.secondaryButton:v.primaryButton,onPress:te,accessibilityRole:"button",accessibilityLabel:"Start new registration",children:(0,k.jsx)(s.default,{style:F.retryable?v.secondaryButtonText:v.primaryButtonText,children:"Start New Registration"})})]})]})})]});if(z)return(0,k.jsxs)(x.PageLayout,{children:[(0,k.jsx)(P.WebMeta,Object.assign({},ue)),(0,k.jsx)(t.default,{style:v.centerContainer,children:(0,k.jsxs)(t.default,{style:v.draftPromptBox,children:[(0,k.jsx)(s.default,{style:v.draftPromptTitle,children:"Resume Registration?"}),(0,k.jsx)(s.default,{style:v.draftPromptText,children:"You have an unfinished registration. Would you like to continue where you left off?"}),(0,k.jsxs)(t.default,{style:v.draftPromptButtons,children:[(0,k.jsx)(n.default,{style:v.secondaryButton,onPress:ee,accessibilityRole:"button",accessibilityLabel:"Start fresh registration",children:(0,k.jsx)(s.default,{style:v.secondaryButtonText,children:"Start Fresh"})}),(0,k.jsx)(n.default,{style:v.primaryButton,onPress:J,accessibilityRole:"button",accessibilityLabel:"Resume saved registration",children:(0,k.jsx)(s.default,{style:v.primaryButtonText,children:"Resume"})})]})]})})]});if('success'===U?.type||'warning'===U?.type){const e=U.submitted,n=e?.sensorName.trim(),l=null!=n&&''!==n?n:e?.mac??'your sensor',c=null!=e?(0,N.buildMapLinkSensor)(U,e):null,u=(0,N.buildConfirmationEmailNote)(e?.email??'',e?.associated??'');return(0,k.jsxs)(x.PageLayout,{children:[(0,k.jsx)(P.WebMeta,Object.assign({},ue)),(0,k.jsx)(o.default,{style:v.container,children:(0,k.jsx)(t.default,{style:v.content,children:(0,k.jsxs)(C.Card,{style:v.successCard,padding:40,children:[(0,k.jsx)(t.default,{style:v.successIconCircle,children:(0,k.jsx)(s.default,{style:v.successCheckmark,children:"\u2713"})}),(0,k.jsx)(s.default,{style:v.successTitle,children:"Registration Complete"}),(0,k.jsxs)(s.default,{style:v.successMessage,children:["You've registered ",(0,k.jsx)(s.default,{style:v.successSensorName,children:l}),"."]}),(0,k.jsx)(N.SensorStatusSection,{reporting:U.sensorReporting}),(0,k.jsx)(N.PrivateSensorAccessNote,{isPrivate:'private'===e?.visibility}),'warning'===U.type&&U.message?(0,k.jsx)(t.default,{style:[v.successDetail,v.warningDetail],children:(0,k.jsx)(s.default,{style:[v.successDetailText,v.warningDetailText],children:U.message})}):null,(0,k.jsxs)(t.default,{style:v.successActions,children:[null!=c?(0,k.jsx)(b.SensorMapLink,{sensor:c,label:"View your sensor on the map",style:v.successPrimaryAction,textStyle:v.successPrimaryActionText,testID:"registration-view-on-map"}):(0,k.jsx)(j.ServiceExternalLink,{service:"mapBaseUrl",style:v.successPrimaryAction,accessibilityLabel:"View the Map",children:(0,k.jsx)(s.default,{style:v.successPrimaryActionText,children:"View the Map"})}),(0,k.jsx)(S.AppLink,{to:"Register",style:v.registerAnotherLink,textStyle:v.registerAnotherText,onPress:re,accessibilityLabel:"Register another sensor",children:"Register another"})]}),(0,k.jsxs)(t.default,{style:v.successHelpSection,children:[(0,k.jsx)(s.default,{style:v.successHelpText,testID:"registration-email-note",children:u}),(0,k.jsxs)(s.default,{style:[v.successHelpText,v.successHelpSpacing],children:["Questions? Contact us at",' ',(0,k.jsx)(s.default,{style:v.emailLink,onPress:()=>{window.location.href=`mailto:${G.CONTACT.EMAIL}`},children:G.CONTACT.EMAIL})]})]})]})})})]})}if(null!=$)return(0,k.jsxs)(x.PageLayout,{children:[(0,k.jsx)(P.WebMeta,Object.assign({},ue)),(0,k.jsx)(o.default,{style:v.container,children:(0,k.jsx)(t.default,{style:v.content,children:(0,k.jsx)(T.RegistrationSourceConflict,{prompt:$,onContinue:ae,onCancel:ce})})})]});const Se=_.currentStep===_.totalSteps-1,ge=0===_.currentStep,fe=1===_.currentStep&&K?'Modify Current Registration':'Next',Ce=ge?null:(0,k.jsx)(n.default,{style:[v.secondaryButton,u&&v.navigationButtonStacked],onPress:_.prevStep,accessibilityRole:"button",accessibilityLabel:"Go to previous step",children:(0,k.jsx)(s.default,{style:v.secondaryButtonText,children:"Back"})}),ye=(0,k.jsx)(n.default,{style:[v.primaryButton,u&&v.navigationButtonStacked,(!_.canProceed||Y)&&v.buttonDisabled],onPress:()=>{ne()},disabled:!_.canProceed||Y,accessibilityRole:"button",accessibilityLabel:"Go to next step",children:Y?(0,k.jsx)(l.default,{size:"small",color:E.COLORS.TEXT_INVERSE}):(0,k.jsx)(s.default,{style:v.primaryButtonText,children:fe})});return(0,k.jsxs)(x.PageLayout,{children:[(0,k.jsx)(P.WebMeta,Object.assign({},ue)),(0,k.jsx)(o.default,{style:v.container,children:(0,k.jsxs)(t.default,{style:v.content,children:[(0,k.jsxs)(t.default,{style:v.header,children:[(0,k.jsx)(s.default,{style:v.title,children:"Register Your Sensor"}),(0,k.jsx)(s.default,{style:v.subtitle,children:"Place your sensor on the PurpleAir Map"})]}),(0,k.jsx)(A.StepProgressBar,{currentStep:_.currentStep,totalSteps:_.totalSteps,stepLabels:W.STEP_LABELS}),Q&&(0,k.jsxs)(n.default,{style:v.reopenNotice,onPress:le,accessibilityRole:"button",accessibilityLabel:"Review which values to keep from your modify link or saved registration",children:[(0,k.jsx)(s.default,{style:v.reopenNoticeIcon,children:'\u2139'}),(0,k.jsx)(s.default,{style:v.reopenNoticeText,children:"Your modify link and saved registration had different values."}),(0,k.jsx)(s.default,{style:v.reopenNoticeAction,children:'Review your choices \u203a'})]}),q.length>0&&(0,k.jsxs)(t.default,{style:v.legacyIssuesBox,children:[(0,k.jsxs)(t.default,{style:v.legacyIssuesHeader,children:[(0,k.jsx)(s.default,{style:v.legacyIssuesTitle,children:"Some values from your modify link couldn't be used:"}),(0,k.jsx)(n.default,{style:v.legacyIssuesDismiss,onPress:de,accessibilityRole:"button",accessibilityLabel:"Dismiss notice about unused modify-link values",children:(0,k.jsx)(s.default,{style:v.legacyIssuesDismissText,children:'\xd7'})})]}),q.map(e=>(0,k.jsx)(s.default,{style:v.legacyIssuesItem,children:`${e.label}: ${e.value}`},e.field))]}),(0,k.jsxs)(t.default,{style:v.form,children:[(()=>{switch(_.currentStep){case 0:return(0,k.jsx)(O.DeviceStep,{form:_.form,associationStatus:Z,onRetryAssociation:oe});case 1:return(0,k.jsx)(I.OwnerStep,{form:_.form,isLoadingConfig:V});case 2:return(0,k.jsx)(L.LocationStep,{form:_.form});case 3:return(0,k.jsx)(R.LedStep,{form:_.form});case 4:return(0,k.jsx)(h.DataProvidersStep,{form:_.form});case 5:return(0,k.jsx)(p.ReviewStep,{form:_.form,onBack:_.prevStep,onSubmit:()=>{ie()},isSubmitting:H,submissionResult:U});default:return null}})(),null!=_.draftPersistenceWarning&&(0,k.jsxs)(t.default,{style:v.draftWarningBox,children:[(0,k.jsx)(s.default,{style:v.draftWarningTitle,children:"Draft Saving Paused"}),(0,k.jsx)(s.default,{style:v.draftWarningText,children:_.draftPersistenceWarning})]}),!Se&&(0,k.jsx)(t.default,{style:[v.navigationButtons,u&&v.navigationButtonsStacked],children:u?(0,k.jsxs)(k.Fragment,{children:[ye,Ce]}):(0,k.jsxs)(k.Fragment,{children:[Ce,ge&&(0,k.jsx)(t.default,{}),ye]})})]}),(0,k.jsx)(t.default,{style:v.footerNote,children:(0,k.jsxs)(s.default,{style:v.footerNoteText,children:["Need help? Contact us at",' ',(0,k.jsx)(s.default,{style:v.emailLink,onPress:()=>{window.location.href=`mailto:${G.CONTACT.EMAIL}`},children:G.CONTACT.EMAIL})]})})]})})]})}const v=(0,u.createStyles)({buttonDisabled:{opacity:.5},centerContainer:{alignItems:'center',flex:1,justifyContent:'center',padding:B.SPACING.XL},container:{backgroundColor:E.COLORS.BG_COOL,flex:1},content:{alignSelf:'center',maxWidth:800,padding:B.SPACING.XL,width:'100%'},draftPromptBox:Object.assign({alignItems:'center',backgroundColor:E.COLORS.BG_SURFACE,borderRadius:12,maxWidth:500,padding:B.SPACING.XXXL,width:'100%'},_.ELEVATION.MEDIUM),draftPromptButtons:{flexDirection:'row',gap:B.SPACING.MD},draftPromptText:{color:E.COLORS.TEXT_SOFT,fontSize:M.FONT_SIZE.LG,lineHeight:22,marginBottom:B.SPACING.XXL,textAlign:'center'},draftPromptTitle:{color:E.COLORS.BG_DARK,fontSize:M.FONT_SIZE.XXL,fontWeight:'600',marginBottom:B.SPACING.MD},emailLink:{color:E.COLORS.BRAND_PRIMARY,textDecorationLine:'underline'},draftWarningBox:{backgroundColor:E.COLORS.BG_AMBER_TINT,borderColor:E.COLORS.AMBER_200,borderRadius:10,borderWidth:1,marginTop:B.SPACING.LG,padding:B.SPACING.LG},draftWarningText:{color:E.COLORS.WARNING,fontSize:M.FONT_SIZE.MD,lineHeight:20},draftWarningTitle:{color:E.COLORS.WARNING,fontSize:M.FONT_SIZE.LG,fontWeight:'700',marginBottom:B.SPACING.XS},errorBox:{alignItems:'center',borderLeftColor:E.COLORS.RED_600,borderLeftWidth:4,maxWidth:500,width:'100%'},errorMessage:{color:E.COLORS.TEXT_SOFT,fontSize:M.FONT_SIZE.LG,lineHeight:22,marginBottom:B.SPACING.XXL,textAlign:'center'},errorTitle:{color:E.COLORS.RED_600,fontSize:M.FONT_SIZE.XXL,fontWeight:'600',marginBottom:B.SPACING.MD},footerNote:{alignItems:'center',marginTop:B.SPACING.XXL,padding:B.SPACING.LG},footerNoteText:{color:E.COLORS.TEXT_SOFT,fontSize:M.FONT_SIZE.MD},form:Object.assign({backgroundColor:E.COLORS.BG_SURFACE,borderRadius:12,marginTop:B.SPACING.LG,padding:B.SPACING.XXL},_.ELEVATION.MEDIUM),header:{marginBottom:B.SPACING.XXL},legacyIssuesBox:{backgroundColor:E.COLORS.WARNING_BANNER_BG,borderColor:E.COLORS.WARNING_BANNER_BORDER,borderRadius:10,borderWidth:1,marginTop:B.SPACING.MD,padding:B.SPACING.LG},legacyIssuesDismiss:{marginLeft:B.SPACING.SM,paddingHorizontal:B.SPACING.SM},legacyIssuesDismissText:{color:E.COLORS.WARNING_BANNER_TEXT,fontSize:M.FONT_SIZE.XL,fontWeight:'700',lineHeight:M.FONT_SIZE.XL},legacyIssuesHeader:{alignItems:'flex-start',flexDirection:'row',justifyContent:'space-between'},legacyIssuesItem:{color:E.COLORS.WARNING_BANNER_TEXT,fontSize:M.FONT_SIZE.SM,marginTop:B.SPACING.XS},legacyIssuesTitle:{color:E.COLORS.WARNING_BANNER_TEXT,flexShrink:1,fontSize:M.FONT_SIZE.MD,fontWeight:'700'},navigationButtons:{flexDirection:'row',justifyContent:'space-between',marginTop:B.SPACING.LG},navigationButtonStacked:{width:'100%'},navigationButtonsStacked:{flexDirection:'column',gap:B.SPACING.MD},primaryButton:{alignItems:'center',backgroundColor:E.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:B.SPACING.XXXL,paddingVertical:B.SPACING.LG},primaryButtonText:{color:E.COLORS.TEXT_INVERSE,fontSize:M.FONT_SIZE.LG,fontWeight:'600'},reopenNotice:{alignItems:'center',backgroundColor:E.COLORS.BLUE_50,borderColor:E.COLORS.BLUE_400,borderRadius:8,borderWidth:1,flexDirection:'row',flexWrap:'wrap',gap:B.SPACING.SM,marginBottom:B.SPACING.LG,marginTop:B.SPACING.SM,paddingHorizontal:B.SPACING.LG,paddingVertical:B.SPACING.MD},reopenNoticeAction:{color:E.COLORS.ACTION_PRIMARY,fontSize:M.FONT_SIZE.MD,fontWeight:'700'},reopenNoticeIcon:{color:E.COLORS.BLUE_400,fontSize:M.FONT_SIZE.XL,fontWeight:'700'},reopenNoticeText:{color:E.COLORS.TEXT_PRIMARY,flexGrow:1,flexShrink:1,fontSize:M.FONT_SIZE.MD,fontWeight:'500'},secondaryButton:{alignItems:'center',backgroundColor:E.COLORS.BG_SUBTLE,borderColor:E.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,paddingHorizontal:B.SPACING.XXXL,paddingVertical:B.SPACING.LG},secondaryButtonText:{color:E.COLORS.TEXT_DARK,fontSize:M.FONT_SIZE.LG,fontWeight:'600'},subtitle:{color:E.COLORS.TEXT_SOFT,fontSize:M.FONT_SIZE.XL},registerAnotherLink:{alignItems:'center',alignSelf:'center',paddingHorizontal:B.SPACING.SM,paddingVertical:B.SPACING.SM},registerAnotherText:{color:E.COLORS.ACTION_PRIMARY,fontSize:M.FONT_SIZE.MD,fontWeight:'600'},successActions:{gap:B.SPACING.SM,marginBottom:B.SPACING.XL,maxWidth:360,width:'100%'},successCard:{alignItems:'center',borderTopColor:E.COLORS.SUCCESS,borderTopWidth:4,marginTop:B.SPACING.HUGE},successCheckmark:{color:E.COLORS.SUCCESS,fontSize:M.FONT_SIZE.DISPLAY_ML,fontWeight:'700',lineHeight:M.FONT_SIZE.DISPLAY_ML},successDetail:{backgroundColor:E.COLORS.SUCCESS_BG,borderRadius:8,marginBottom:B.SPACING.XXL,maxWidth:480,padding:B.SPACING.MD,width:'100%'},successDetailText:{color:E.COLORS.SUCCESS,fontSize:M.FONT_SIZE.MD,lineHeight:20,textAlign:'center'},successHelpSection:{borderTopColor:E.COLORS.BORDER_FAINT,borderTopWidth:1,maxWidth:480,paddingTop:B.SPACING.XL,width:'100%'},successHelpSpacing:{marginTop:B.SPACING.MD},successHelpText:{color:E.COLORS.TEXT_GHOST,fontSize:M.FONT_SIZE.MD,lineHeight:20,textAlign:'center'},successIconCircle:{alignItems:'center',backgroundColor:E.COLORS.SUCCESS_BG,borderColor:E.COLORS.SUCCESS,borderRadius:36,borderWidth:3,height:72,justifyContent:'center',marginBottom:B.SPACING.LG,width:72},successMessage:{color:E.COLORS.TEXT_SECONDARY,fontSize:M.FONT_SIZE.LG,lineHeight:24,marginBottom:B.SPACING.XL,maxWidth:480,textAlign:'center'},successPrimaryAction:{alignItems:'center',backgroundColor:E.COLORS.ACTION_PRIMARY,borderRadius:10,paddingVertical:B.SPACING.LG},successPrimaryActionText:{color:E.COLORS.TEXT_INVERSE,fontSize:M.FONT_SIZE.LG,fontWeight:'700'},successSensorName:{color:E.COLORS.TEXT_DARK,fontWeight:'700'},successTitle:{color:E.COLORS.BG_DARK,fontSize:M.FONT_SIZE.DISPLAY_SM,fontWeight:'700',marginBottom:B.SPACING.MD,textAlign:'center'},title:{color:E.COLORS.BG_DARK,fontSize:M.FONT_SIZE.DISPLAY_MD,fontWeight:'700',marginBottom:B.SPACING.SM},warningDetail:{backgroundColor:E.COLORS.BG_AMBER_TINT,borderColor:E.COLORS.AMBER_200,borderWidth:1},warningDetailText:{color:E.COLORS.WARNING}});var z=F},1051,[34,276,222,488,283,410,95,552,489,516,567,605,512,568,1052,1062,1063,1065,1074,1075,1076,1077,1078,1079,522,565,490,745,503,493,494,1082,1091,562,104]);
1152__d(function(g,r,i,a,m,_e,d){"use strict";
1152function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DataProvidersStep=function({form:e}){const o=(0,c.useField)(e,'provider1'),n=(0,c.useField)(e,'create_wu_1'),s=(0,c.useField)(e,'key3_1'),u=(0,c.useField)(e,'key4_1'),h=(0,c.useField)(e,'method1'),F=(0,c.useField)(e,'provider2'),O=(0,c.useField)(e,'key3_2'),T=(0,c.useField)(e,'key4_2'),y=(0,c.useField)(e,'method2'),_='2'===o.value,v='0'===o.value,f='0'===F.value;return(0,b.jsxs)(t.default,{style:P.container,children:[(0,b.jsx)(l.default,{style:P.title,children:"Third Party Data Services"}),(0,b.jsx)(l.default,{style:P.subtitle,children:"Optionally share your sensor data with third-party services."}),(0,b.jsxs)(t.default,{style:P.providerCard,children:[(0,b.jsx)(l.default,{style:P.providerHeading,children:"Data Processor #1"}),(0,b.jsx)(p.FormSelect,{label:"Provider",binding:o,options:S.PROVIDER1_OPTIONS}),_&&(0,b.jsx)(p.FormCheckbox,{label:"Automatically create a Weather Underground station",binding:n}),!_&&!v&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p.FormInput,{label:"API Key",binding:s,placeholder:"API key"}),(0,b.jsx)(p.FormInput,{label:"Endpoint / ID",binding:u,placeholder:"Endpoint URL or ID"})]}),!v&&!_&&(0,b.jsx)(p.FormSelect,{label:"HTTP Method",binding:h,options:I})]}),(0,b.jsxs)(t.default,{style:P.providerCard,children:[(0,b.jsx)(l.default,{style:P.providerHeading,children:"Data Processor #2"}),(0,b.jsx)(p.FormSelect,{label:"Provider",binding:F,options:S.PROVIDER2_OPTIONS}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(p.FormInput,{label:"API Key",binding:O,placeholder:"API key"}),(0,b.jsx)(p.FormInput,{label:"Endpoint / ID",binding:T,placeholder:"Endpoint URL or ID"}),(0,b.jsx)(p.FormSelect,{label:"HTTP Method",binding:y,options:I})]})]})]})},r(d[0]);var t=e(r(d[1])),l=e(r(d[2])),o=r(d[3]),n=r(d[4]),s=r(d[5]),u=r(d[6]),c=r(d[7]),S=r(d[8]),p=r(d[9]),b=r(d[10]);const I=[{value:'POST',label:'POST'},{value:'GET',label:'GET'},{value:'PUT',label:'PUT'}];const P=(0,o.createStyles)({container:{paddingVertical:s.SPACING.SM},providerCard:{backgroundColor:n.COLORS.BG_NEAR_WHITE,borderColor:n.COLORS.BORDER_FAINT,borderRadius:10,borderWidth:1,marginBottom:s.SPACING.LG,padding:s.SPACING.LG},providerHeading:{color:n.COLORS.TEXT_DIM,fontSize:u.FONT_SIZE.LG,fontWeight:'600',marginBottom:s.SPACING.MD},subtitle:{color:n.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.SM,fontStyle:'italic',marginBottom:s.SPACING.LG},title:{color:n.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.XL,fontWeight:'700',marginBottom:s.SPACING.XS}})},1052,[34,276,222,489,490,493,494,1053,1060,1061,104]);
1153__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0});var t=r(d[0]);Object.keys(t).forEach(function(n){'default'===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})});var n=r(d[1]);Object.keys(n).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})});var c=r(d[2]);Object.keys(c).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}})});var o=r(d[3]);Object.keys(o).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})})},1053,[1054,1055,1056,1057]);
1154__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ok=function(n){return{ok:!0,value:n}},e.err=function(n){return{ok:!1,error:n}}},1054,[]);
1155__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useForm=function(u,f={}){const v=f.crossField??[],[b,h]=(0,t.useState)(()=>a(u,f.initial)),[y,k]=(0,t.useReducer)(c,void 0,()=>({values:b,touched:{}})),{errors:O,parsed:j}=n(u,y.values,v),p=(0,s.useLatestRef)(j),V=(0,s.useLatestRef)(O),C=(0,s.useLatestRef)(u),R=(0,s.useLatestRef)(b),w=0===Object.keys(O).length,A=!l(y.values,b),L=(0,t.useCallback)((t,s)=>{k({type:'setValue',field:t,value:s})},[]),_=(0,t.useCallback)((t,s=!0)=>{k({type:'setTouched',field:t,touched:s})},[]),S=(0,t.useCallback)(t=>{k({type:'setValues',values:t})},[]),T=(0,t.useCallback)(t=>
1155{const s=void 0!==t?Object.assign({},R.current,t):R.current;h(s),k({type:'reset',values:s})},[R]),F=(0,t.useCallback)(()=>o(V.current,p.current),[V,p]),M=(0,t.useCallback)(()=>{const t=Object.keys(C.current);return k({type:'touchAll',keys:t}),o(V.current,p.current)},[V,p,C]);return(0,t.useMemo)(()=>({values:y.values,errors:O,touched:y.touched,isValid:w,isDirty:A,setValue:L,setTouched:_,setValues:S,reset:T,validate:F,submit:M}),[y.values,y.touched,O,w,A,L,_,S,T,F,M])};var t=r(d[0]),s=r(d[1]);function u(t){throw new Error(`Unhandled form action: ${JSON.stringify(t)}`)}function c(t,s){switch(s.type){case'setValue':{const u=Object.assign({},t.values,{[s.field]:s.value});return Object.assign({},t,{values:u})}case'setTouched':{const u=Object.assign({},t.touched,{[s.field]:s.touched});return Object.assign({},t,{touched:u})}case'setValues':{const u=Object.assign({},t.values,s.values);return Object.assign({},t,{values:u})}case'reset':return{values:s.values,touched:{}};case'touchAll':{const u={};for(const t of s.keys)u[t]=!0;return Object.assign({},t,{touched:u})}default:return u(s)}}function n(t,s,u){const c={},n={},o=new Set,a=s;for(const s of Object.keys(t)){const u=t[s];if(void 0===u)continue;if(void 0!==u.isActive&&!u.isActive(a))continue;o.add(s);const l=a[s],f=u.parse(l);f.ok?n[s]=f.value:c[s]=f.error}for(const t of u){const u=t(s,n);for(const{field:t,error:s}of u)o.has(t)&&(t in c||(c[t]=s))}return{errors:c,parsed:n,activeKeys:o}}function o(t,s){return Object.keys(t).length>0?{ok:!1,errors:t}:{ok:!0,value:s}}function a(t,s){const u={};for(const s of Object.keys(t)){const c=t[s];void 0!==c&&(u[s]=c.initial)}if(void 0!==s)for(const t of Object.keys(s)){const c=s[t];u[t]=c}return u}function l(t,s){const u=Object.keys(t),c=Object.keys(s);if(u.length!==c.length)return!1;for(const c of u)if(t[c]!==s[c])return!1;return!0}},1055,[34,498]);
1156__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useField=o,e.Field=function(u){const t=o(u.form,u.name);return u.children(t)};var u=r(d[0]);function o(o,t){const l=o.values[t],n=o.touched[t]??!1,s=o.errors[t],c=n?s:void 0,f=(0,u.useCallback)(u=>{o.setValue(t,u)},[o,t]),v=(0,u.useCallback)(()=>{o.setTouched(t,!0)},[o,t]);return(0,u.useMemo)(()=>({value:l,touched:n,error:c,rawError:s,setValue:f,onBlur:v}),[l,n,c,s,f,v])}},1056,[34]);
1157__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.requiredText=function(n={}){return{initial:'',parse:t=>{const u=t.trim();return''===u?(0,s.err)(n.requiredMessage??o):(0,s.ok)(u)}}},e.optionalText=function(n={}){return{initial:n.initial??'',parse:n=>(0,s.ok)(n.trim())}},e.emailField=function(n={}){return{initial:'',parse:t=>{const l=t.trim();return''===l?(0,s.err)(n.requiredMessage??o):u.EMAIL_REGEX.test(l)?(0,s.ok)(l):(0,s.err)(n.message??f)}}},e.latitudeField=function(t={}){return{initial:'',parse:u=>{if(''===u.trim())return(0,s.err)(t.requiredMessage??o);const c=(0,n.parseLatitude)(u);return null===c?(0,s.err)(t.message??l):(0,s.ok)(c)}}},e.optionalLatitudeField=function(t={}){return{initial:'',parse:u=>{if(''===u.trim())return(0,s.ok)(null);const o=(0,n.parseLatitude)(u);return null===o?(0,s.err)(t.message??l):(0,s.ok)(o)}}},e.longitudeField=function(t={}){return{initial:'',parse:u=>{if(''===u.trim())return(0,s.err)(t.requiredMessage??o);const l=(0,n.parseLongitude)(u);return null===l?(0,s.err)(t.message??c):(0,s.ok)(l)}}},e.optionalLongitudeField=function(t={}){return{initial:'',parse:u=>{if(''===u.trim())return(0,s.ok)(null);const o=(0,n.parseLongitude)(u);return null===o?(0,s.err)(t.message??c):(0,s.ok)(o)}}},e.integerField=function(n={}){const t=n.message??M(n.min,n.max);return{initial:'',parse:u=>{const l=u.trim();if(''===l)return(0,s.err)(n.requiredMessage??o);const c=k(l,n.min,n.max);return null===c?(0,s.err)(t):(0,s.ok)(c)}}},e.optionalIntegerField=function(n={}){const t=n.message??M(n.min,n.max);return{initial:n.initial??'',parse:u=>{const o=u.trim();if(''===o)return(0,s.ok)(null);const l=k(o,n.min,n.max);return null===l?(0,s.err)(t):(0,s.ok)(l)}}},e.macField=function(n={}){return{initial:'',parse:u=>{const l=(0,t.normalizeMac)(u);return''===l?(0,s.err)(n.requiredMessage??o):(0,t.isValidMac)(l)?(0,s.ok)(l):(0,s.err)(n.message??p)}}},e.booleanField=function(n=!1){return{initial:n,parse:n=>(0,s.ok)(n)}},e.choiceField=function(n,t={}){const u=new Set(n);return{initial:t.initial??'',parse:n=>''===n?(0,s.err)(t.requiredMessage??o):u.has(n)?(0,s.ok)(n):(0,s.err)(t.message??b)}},e.optionalChoiceField=function(n,t={}){const u=new Set(n);return{initial:'',parse:n=>''===n?(0,s.ok)(null):u.has(n)?(0,s.ok)(n):(0,s.err)(t.message??b)}};
1157var n=r(d[0]),t=r(d[1]),u=r(d[2]),s=r(d[3]);const o='Required.',l='Latitude must be a number in [-90, 90].',c='Longitude must be a number in [-180, 180].',f='Enter a valid email address.',p='Enter a valid Device-Id (x:x:x:x:x:x).',b='Invalid selection.';function k(n,t,u){if(!/^-?\d+$/.test(n))return null;const s=Number(n);return Number.isFinite(s)?void 0!==t&&s<t||void 0!==u&&s>u?null:s:null}function M(n,t){return void 0!==n&&void 0!==t?`Must be a whole number between ${n} and ${t}.`:void 0!==n?`Must be a whole number greater than or equal to ${n}.`:void 0!==t?`Must be a whole number less than or equal to ${t}.`:'Must be a whole number.'}},1057,[1058,1059,746,1054]);
1158__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"LATITUDE_MIN",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"LATITUDE_MAX",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"LONGITUDE_MIN",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"LONGITUDE_MAX",{enumerable:!0,get:function(){return o}}),e.toLatitude=l,e.toLongitude=c,e.parseLatitude=f,e.parseLongitude=b,e.makeCoord=function(n,t){return{lat:n,lon:t}},e.toCoord=function(n,t){if(null==n||null==t)return null;const u=l(n),o=c(t);if(null===u||null===o)return null;return{lat:u,lon:o}},e.parseCoord=function(n,t){const u=f(n),o=b(t);if(null===u||null===o)return null;return{lat:u,lon:o}},e.coordToLngLat=function(n){return[n.lon,n.lat]},e.formatCoord=function(n,t=6){return`${n.lat.toFixed(t)}, ${n.lon.toFixed(t)}`};const n=-90,t=90,u=-180,o=180;function l(u){return Number.isFinite(u)?u<n||u>t?null:u:null}function c(n){return Number.isFinite(n)?n<u||n>o?null:n:null}function f(n){const t=n.trim();if(''===t)return null;return l(Number(t))}function b(n){const t=n.trim();if(''===t)return null;return c(Number(t))}},1058,[]);
1159__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isValidMac=function(n){return t.test(n)},e.normalizeMac=function(t){if(''===t)return t;return t.toLowerCase().split(':').map(t=>t.length>1&&'0'===t[0]?t.substring(1):t).join(':')};const t=/^([0-9A-Fa-f]{1,2}:){5}[0-9A-Fa-f]{1,2}$/},1059,[]);
1160__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PROVIDER1_OPTIONS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"PROVIDER2_OPTIONS",{enumerable:!0,get:function(){return u}}),e.providerLabel=function(l,u){return l.find(l=>l.value===u)?.label??u};const l=[{value:'0',label:'None'},{value:'2',label:'Weather Underground'},{value:'3',label:'Microsoft Power-Bi'},{value:'4',label:'Microsoft Azure'},{value:'5',label:'Custom'}],u=[{value:'0',label:'None'},{value:'3',label:'Microsoft Power-Bi'},{value:'4',label:'Microsoft Azure'},{value:'5',label:'Custom'}]},1060,[]);
1161__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.FormInput=function({label:e,binding:n,transform:s,placeholder:S,keyboardType:C,required:h,helpText:R,disabled:T}){const{value:x,error:f,setValue:p,onBlur:L}=n,_=(0,o.useRef)(null),E=(0,o.useCallback)(e=>{p(s?s(e):e)},[p,s]),A=(0,o.useCallback)(()=>{if(null!==_.current){const e=_.current.value??'';e!==x&&p(s?s(e):e)}L()},[x,p,L,s]),I=void 0!==f&&''!==f;return(0,O.jsxs)(l.default,{style:b.formGroup,children:[(0,O.jsxs)(t.default,{style:b.label,children:[e,!0===h&&(0,O.jsx)(t.default,{style:b.required,children:" *"})]}),void 0!==R&&''!==R&&(0,O.jsx)(t.default,{style:b.helpText,children:R}),(0,O.jsx)(c.default,{ref:_,style:[b.input,I?b.inputError:null,!0===T?b.inputDisabled:null],value:x,onChangeText:E,onBlur:A,placeholder:S,placeholderTextColor:u.COLORS.TEXT_CAPTION,keyboardType:C,editable:!0!==T,autoCapitalize:"none"}),I&&(0,O.jsx)(t.default,{style:b.errorText,children:f})]})},_e.FormRadioGroup=function({label:e,binding:o,options:c,required:s,helpText:u}){const{value:S,error:C,setValue:h,onBlur:R}=o,T=void 0!==C&&''!==C;return(0,O.jsxs)(l.default,{style:b.formGroup,children:[(0,O.jsxs)(t.default,{style:b.label,children:[e,!0===s&&(0,O.jsx)(t.default,{style:b.required,
1161children:" *"})]}),void 0!==u&&''!==u&&(0,O.jsx)(t.default,{style:b.helpText,children:u}),(0,O.jsx)(l.default,{style:b.radioGroup,children:c.map(e=>(0,O.jsxs)(n.default,{style:[b.radioButton,S===e.value&&b.radioButtonSelected],onPress:()=>{h(e.value),R()},children:[e.icon,(0,O.jsx)(t.default,{style:[b.radioButtonText,S===e.value&&b.radioButtonTextSelected],children:e.label})]},e.value))}),T&&(0,O.jsx)(t.default,{style:b.errorText,children:C})]})},_e.FormSelect=function({label:e,binding:n,options:c,helpText:s}){const{value:u,setValue:S,onBlur:C}=n,[R,T]=(0,o.useState)(!1);return(0,O.jsxs)(l.default,{style:b.formGroup,children:[(0,O.jsx)(t.default,{style:b.label,children:e}),void 0!==s&&''!==s&&(0,O.jsx)(t.default,{style:b.helpText,children:s}),(0,O.jsxs)(l.default,{style:[b.selectWebContainer,R&&b.selectWebContainerFocused],children:[(0,O.jsx)("select",{"aria-label":e,style:h,value:u,onChange:e=>{S(e.target.value)},onFocus:()=>{T(!0)},onBlur:()=>{T(!1),C()},children:c.map(e=>(0,O.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,O.jsx)(l.default,{style:b.selectChevronContainer,children:(0,O.jsx)(l.default,{style:b.selectChevron})})]})]})},_e.FormCheckbox=function({label:e,binding:o,required:c,helpText:s,disabled:u}){const{value:S,error:C,setValue:h,onBlur:R}=o,T=void 0!==C&&''!==C;return(0,O.jsxs)(l.default,{style:b.formGroup,children:[(0,O.jsx)(l.default,{style:b.checkboxLine,children:(0,O.jsxs)(n.default,{style:[b.checkboxContainer,!0===u?b.checkboxContainerDisabled:null],accessibilityRole:"checkbox",accessibilityLabel:e,accessibilityState:{checked:S,disabled:!0===u},disabled:!0===u,onPress:()=>{h(!S),R()},children:[(0,O.jsx)(l.default,{style:[b.checkbox,S&&b.checkboxChecked,!0===u?b.checkboxDisabled:null],children:S&&(0,O.jsx)(t.default,{style:b.checkmark,children:"\u2713"})}),(0,O.jsxs)(t.default,{style:[b.checkboxLabel,!0===u?b.checkboxLabelDisabled:null],children:[e,!0===c&&(0,O.jsx)(t.default,{style:b.required,children:" *"})]})]})}),void 0!==s&&''!==s&&(0,O.jsx)(t.default,{style:b.checkboxHelpText,children:s}),T&&(0,O.jsx)(t.default,{style:b.errorText,children:C})]})};var o=r(d[0]),l=e(r(d[1])),t=e(r(d[2])),n=e(r(d[3])),c=e(r(d[4]));r(d[5]);var s=r(d[6]),u=r(d[7]),S=r(d[8]),C=r(d[9]),O=r(d[10]);const b=(0,s.createStyles)({checkbox:{alignItems:'center',backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER_SUBTLE,borderRadius:4,borderWidth:2,height:24,justifyContent:'center',marginRight:S.SPACING.MD,width:24},checkboxChecked:{backgroundColor:u.COLORS.ACTION_PRIMARY,borderColor:u.COLORS.ACTION_PRIMARY},checkboxContainer:{alignItems:'center',flexDirection:'row',flexShrink:1,marginVertical:S.SPACING.SM},checkboxContainerDisabled:{opacity:.65},checkboxDisabled:{backgroundColor:u.COLORS.BG_SUBTLE,borderColor:u.COLORS.BORDER_DISABLED},checkboxHelpText:{color:u.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.XS,fontStyle:'italic',marginTop:S.SPACING.XS},checkboxLabel:{color:u.COLORS.TEXT_DARK,flexShrink:1,fontSize:C.FONT_SIZE.MD},checkboxLabelDisabled:{color:u.COLORS.TEXT_CAPTION},checkmark:{color:u.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.MD,fontWeight:'bold'},errorText:{color:u.COLORS.RED_600,fontSize:C.FONT_SIZE.XS,marginTop:S.SPACING.XS},formGroup:{marginBottom:S.SPACING.LG},helpText:{color:u.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.XS,fontStyle:'italic',marginBottom:S.SPACING.SM},input:{backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,color:u.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.LG,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.MD},inputDisabled:{backgroundColor:u.COLORS.BG_SUBTLE,color:u.COLORS.TEXT_CAPTION},inputError:{borderColor:u.COLORS.RED_600},checkboxLine:{alignItems:'center',flexDirection:'row',gap:S.SPACING.SM},label:{color:u.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.MD,fontWeight:'600',marginBottom:S.SPACING.XS},radioButton:{alignItems:'center',backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,flexDirection:'row',gap:S.SPACING.SM,paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},radioButtonSelected:{backgroundColor:u.COLORS.BRAND_BG_HOVER,borderColor:u.COLORS.ACTION_PRIMARY},radioButtonText:{color:u.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.MD},radioButtonTextSelected:{color:u.COLORS.ACTION_PRIMARY,fontWeight:'600'},radioGroup:{flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},required:{color:u.COLORS.RED_600},selectChevron:{borderBottomColor:u.COLORS.TEXT_SLATE_DARK,borderBottomWidth:2,borderRightColor:u.COLORS.TEXT_SLATE_DARK,borderRightWidth:2,height:8,transform:[{rotate:'45deg'}],width:8},selectChevronContainer:{alignItems:'center',bottom:0,justifyContent:'center',pointerEvents:'none',position:'absolute',right:0,top:0,width:44},selectWebContainer:{backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,overflow:'hidden',position:'relative',width:'100%'},selectWebContainerFocused:{borderColor:u.COLORS.ACTION_PRIMARY},selectNative:{flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM},selectOption:{backgroundColor:u.COLORS.BG_SURFACE,borderColor:u.COLORS.BORDER_SUBTLE,borderRadius:6,borderWidth:1,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},selectOptionSelected:{backgroundColor:u.COLORS.BRAND_BG_HOVER,borderColor:u.COLORS.ACTION_PRIMARY},selectOptionText:{color:u.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.SM},selectOptionTextSelected:{color:u.COLORS.ACTION_PRIMARY,fontWeight:'600'}}),h={appearance:'none',backgroundColor:u.COLORS.TRANSPARENT,border:0,color:u.COLORS.TEXT_DARK,cursor:'pointer',fontSize:C.FONT_SIZE.LG,height:44,outlineStyle:'none',paddingLeft:S.SPACING.MD,paddingRight:S.SPACING.XXXL,width:'100%',WebkitAppearance:'none'}},1061,[34,276,222,488,394,95,489,490,493,494,104]);
1162__d(function(g,r,i,a,m,_e,d){"use strict";
1162function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DeviceStep=function({form:e,associationStatus:c,onRetryAssociation:u}){const S=(0,R.useField)(e,'mac'),x=(0,R.useField)(e,'associated');return(0,y.jsxs)(t.default,{style:h.container,children:[(0,y.jsx)(s.default,{style:h.title,children:"Device Identification"}),(0,y.jsx)(O.FormInput,{label:"Device-Id",binding:S,transform:C.normalizeMac,required:!0,placeholder:"x:x:x:x:x:x",helpText:"Printed on your device label above the barcode. Leading zeros are removed automatically."}),(0,y.jsx)(O.FormInput,{label:"Associated Email",binding:x,required:!0,keyboardType:"email-address",placeholder:"[email protected]",helpText:"The email used when purchasing this device."}),c&&(0,y.jsxs)(t.default,{style:[h.statusContainer,'checking'===c.type&&h.statusChecking,'success'===c.type&&h.statusSuccess,'error'===c.type&&h.statusError],children:['checking'===c.type&&(0,y.jsx)(o.default,{size:"small",color:l.COLORS.BLUE_400,style:h.statusSpinner}),(0,y.jsx)(s.default,{style:[h.statusText,'checking'===c.type&&h.statusTextChecking,'success'===c.type&&h.statusTextSuccess,'error'===c.type&&h.statusTextError],children:c.message}),'error'===c.type&&c.retryable&&(0,y.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:"Retry association check",onPress:u,style:h.retryButton,children:(0,y.jsx)(s.default,{style:h.retryButtonText,children:"Retry"})})]})]})},r(d[0]);var t=e(r(d[1])),s=e(r(d[2])),o=e(r(d[3])),n=e(r(d[4])),c=r(d[5]),l=r(d[6]),u=r(d[7]),S=r(d[8]),R=r(d[9]),C=r(d[10]),O=r(d[11]),y=r(d[12]);const h=(0,c.createStyles)({container:{paddingVertical:u.SPACING.SM},statusChecking:{backgroundColor:l.COLORS.BLUE_50,borderColor:l.COLORS.BLUE_200,borderWidth:1},retryButton:{borderColor:l.COLORS.ERROR,borderRadius:6,borderWidth:1,marginLeft:u.SPACING.SM,paddingHorizontal:u.SPACING.MD,paddingVertical:u.SPACING.XS},retryButtonText:{color:l.COLORS.ERROR,fontSize:S.FONT_SIZE.SM,fontWeight:'600'},statusContainer:{alignItems:'center',borderRadius:8,flexDirection:'row',marginTop:u.SPACING.XS,padding:u.SPACING.MD},statusError:{backgroundColor:l.COLORS.ERROR_BG,borderColor:l.COLORS.ERROR_BORDER,borderWidth:1},statusSpinner:{marginRight:u.SPACING.SM},statusSuccess:{backgroundColor:l.COLORS.SUCCESS_BG,borderColor:l.COLORS.GREEN_200,borderWidth:1},statusText:{flex:1,fontSize:S.FONT_SIZE.MD},statusTextChecking:{color:l.COLORS.BLUE_400},statusTextError:{color:l.COLORS.ERROR},statusTextSuccess:{color:l.COLORS.SUCCESS},title:{color:l.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.XL,fontWeight:'700',marginBottom:u.SPACING.LG}})},1062,[34,276,222,410,369,489,490,493,494,1053,1059,1061,104]);
1163__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LedStep=function({form:e}){const t=(0,p.useField)(e,'led_mode'),o=(0,p.useField)(e,'led_tap_enabled'),n=(0,p.useField)(e,'led_brightness'),c=(0,f.isLedBrightnessActive)(t.value),O=(
1163h=t.value,f.LED_MODE_OPTIONS.some(e=>e.value===h)?h:'');var h;return(0,T.jsxs)(u.default,{style:v.container,children:[(0,T.jsx)(l.default,{style:v.title,children:"LED Settings"}),(0,T.jsx)(l.default,{style:v.subtitle,children:"Configure how your sensor uses its LEDs to show air quality and device status."}),(0,T.jsxs)(u.default,{style:v.section,children:[(0,T.jsx)(l.default,{style:v.sectionLabel,children:"Display Mode"}),(0,T.jsx)(D,{value:O,onChange:e=>{t.setValue(e),t.onBlur(),'0'===e&&o.setValue(!0)}})]}),(0,T.jsx)(u.default,{style:v.divider}),(0,T.jsxs)(u.default,{style:v.section,children:[(0,T.jsxs)(u.default,{style:v.brightnessHeader,children:[(0,T.jsx)(l.default,{style:v.sectionLabel,children:"Max Brightness"}),(0,T.jsxs)(u.default,{style:v.brightnessReadout,children:[(0,T.jsx)(s.default,{style:[v.brightnessInput,!c&&v.brightnessInputDisabled],value:n.value,onChangeText:e=>{n.setValue(w(e))},onBlur:n.onBlur,keyboardType:"numeric",placeholder:_,placeholderTextColor:b.COLORS.TEXT_CAPTION,editable:c,maxLength:3}),(0,T.jsx)(l.default,{style:[v.brightnessUnit,!c&&v.brightnessUnitDisabled],children:"%"})]})]}),(0,T.jsx)(I,{value:n.value,disabled:!c,onChange:e=>{n.setValue(w(e))},onCommit:n.onBlur}),(0,T.jsxs)(u.default,{style:v.brightnessRange,children:[(0,T.jsx)(l.default,{style:v.brightnessRangeLabel,children:"0%"}),(0,T.jsx)(l.default,{style:v.brightnessRangeLabel,children:"100%"})]}),(0,T.jsxs)(u.default,{style:v.tapRow,children:[(0,T.jsx)(B,{value:o.value,disabled:!c,onChange:e=>{o.setValue(e),o.onBlur()}}),(0,T.jsx)(L.InfoTip,{intro:x,text:E,accessibilityLabel:`${x} ${E}`})]})]})]})};var t=r(d[0]),o=r(d[1]);r(d[2]);var n=e(r(d[3])),l=e(r(d[4])),s=e(r(d[5])),c=e(r(d[6])),u=e(r(d[7])),O=r(d[8]),b=r(d[9]),h=r(d[10]),S=r(d[11]),C=r(d[12]),p=r(d[13]),f=r(d[14]),L=r(d[15]),R=r(d[16]),T=r(d[17]);const E="When enabled, double-tapping the sensor cycles through brightness levels up to the configured max brightness. Disable this if the brightness is changing unintentionally due to bumps or vibrations near the sensor.",x='Applies to Touch and Zen sensors only.',_='35';function w(e){const t=e.replace(/[^0-9]/g,'');if(''===t)return'';const o=Math.min(100,Math.max(0,Number.parseInt(t,10)));return String(o)}function y(e){const t=Number.parseInt(''===e?_:e,10);return Number.isFinite(t)?Math.min(100,Math.max(0,t)):Number.parseInt(_,10)}function D({value:e,onChange:s}){const[c,O]=(0,t.useState)(!1),[b,h]=(0,t.useState)(null),S=(0,t.useRef)(null),C=(0,t.useRef)(null),p=f.LED_MODE_OPTIONS.find(t=>t.value===e),L=p?.label??'Select a mode',E=()=>{if('undefined'==typeof window)return;const e=S.current;if(null===e)return;const t=e.getBoundingClientRect();h({top:t.bottom+4,left:t.left,width:t.width})};(0,t.useEffect)(()=>{if(!c||'undefined'==typeof window)return;const e=()=>{const e=S.current;if(null===e)return;const t=e.getBoundingClientRect();h({top:t.bottom+4,left:t.left,width:t.width})};return window.addEventListener('resize',e),window.addEventListener('scroll',e,!0),()=>{window.removeEventListener('resize',e),window.removeEventListener('scroll',e,!0)}},[c]),(0,t.useEffect)(()=>{if(!c||'undefined'==typeof document)return;const e=e=>{const t=S.current,o=C.current,n=e.target;if(null===n)return;const l=!0===t?.contains(n),s=!0===o?.contains(n);l||s||O(!1)};return document.addEventListener('mousedown',e),()=>{document.removeEventListener('mousedown',e)}},[c]);const x=c&&null!==b,_=x?{left:b.left,position:'fixed',top:b.top,width:b.width,zIndex:9999}:null;return(0,T.jsxs)(u.default,{ref:S,style:v.dropdownWrapper,children:[(0,T.jsxs)(n.default,{style:e=>[v.dropdownTrigger,Boolean(e.hovered)&&v.dropdownTriggerHovered,c&&v.dropdownTriggerOpen],onPress:()=>{c||E(),O(e=>!e)},accessibilityRole:"button",accessibilityLabel:`LED display mode: ${L}`,accessibilityState:{expanded:c},children:[(0,T.jsx)(l.default,{style:v.dropdownTriggerText,numberOfLines:1,children:L}),(0,T.jsx)(u.default,{style:[v.dropdownChevron,c&&v.dropdownChevronOpen]})]}),c&&(()=>{const t=(0,T.jsx)(u.default,{ref:C,style:[v.dropdownMenu,_],children:f.LED_MODE_OPTIONS.map(t=>{const o=t.value===e;return(0,T.jsxs)(R.RadioOption,{checked:o,interaction:"pressable",style:e=>[v.dropdownOption,Boolean(e.hovered)&&v.dropdownOptionHovered,o&&v.dropdownOptionSelected],onPress:()=>{s(t.value),O(!1)},accessibilityLabel:t.label,children:[(0,T.jsx)(l.default,{style:[v.dropdownOptionText,o&&v.dropdownOptionTextSelected],numberOfLines:1,children:t.label}),o&&(0,T.jsx)(l.default,{style:v.dropdownCheckmark,children:'\u2713'})]},t.value)})});return x&&'undefined'!=typeof document?(0,o.createPortal)(t,document.body):t})()]})}function I({value:e,disabled:t,onChange:o,onCommit:n}){const l=y(e),s=t?`linear-gradient(to right, ${b.COLORS.BORDER_DISABLED} 0%, ${b.COLORS.BORDER_DISABLED} 100%)`:`linear-gradient(to right, ${b.COLORS.BLUE_400} 0%, ${b.COLORS.BLUE_400} ${l}%, ${b.COLORS.BORDER_SUBTLE} ${l}%, ${b.COLORS.BORDER_SUBTLE} 100%)`,c=Object.assign({},v.slider,{background:s,cursor:t?'not-allowed':'pointer',opacity:t?.6:1});return(0,T.jsx)("input",{type:"range",min:0,max:100,step:1,value:String(l),disabled:t,onChange:e=>{o(e.target.value)},onMouseUp:()=>{n()},onTouchEnd:()=>{n()},onKeyUp:()=>{n()},"aria-label":"Max LED brightness percentage",style:c}
1163)}function B({value:e,disabled:t,onChange:o}){return(0,T.jsxs)(c.default,{style:[v.checkboxContainer,t&&v.checkboxContainerDisabled],accessibilityRole:"checkbox",accessibilityLabel:"Enable tap to change brightness",accessibilityState:{checked:e,disabled:t},disabled:t,onPress:()=>{o(!e)},children:[(0,T.jsx)(u.default,{style:[v.checkbox,e&&v.checkboxChecked,t&&v.checkboxDisabled],children:e&&(0,T.jsx)(l.default,{style:v.checkmark,children:"\u2713"})}),(0,T.jsx)(l.default,{style:[v.checkboxLabel,t&&v.checkboxLabelDisabled],children:"Enable double-tap to cycle brightness"})]})}const v=(0,O.createStyles)({brightnessHeader:{alignItems:'center',flexDirection:'row',justifyContent:'space-between'},brightnessInput:{backgroundColor:b.COLORS.BG_SURFACE,borderColor:b.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,color:b.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.LG,fontWeight:'700',paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.XS,textAlign:'right',width:60},brightnessInputDisabled:{backgroundColor:b.COLORS.BG_SUBTLE,color:b.COLORS.TEXT_CAPTION},brightnessRange:{flexDirection:'row',justifyContent:'space-between',marginTop:S.SPACING.MICRO},brightnessRangeLabel:{color:b.COLORS.TEXT_CAPTION,fontSize:C.FONT_SIZE.XS,letterSpacing:.4,textTransform:'uppercase'},brightnessReadout:{alignItems:'center',flexDirection:'row',gap:S.SPACING.XS},brightnessUnit:{color:b.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.LG,fontWeight:'700'},brightnessUnitDisabled:{color:b.COLORS.TEXT_CAPTION},checkbox:{alignItems:'center',backgroundColor:b.COLORS.BG_SURFACE,borderColor:b.COLORS.BORDER_SUBTLE,borderRadius:5,borderWidth:2,height:22,justifyContent:'center',width:22},checkboxChecked:{backgroundColor:b.COLORS.BLUE_400,borderColor:b.COLORS.BLUE_400},checkboxContainer:{alignItems:'center',flexDirection:'row',flexShrink:1,gap:S.SPACING.SM},checkboxContainerDisabled:{opacity:.65},checkboxDisabled:{backgroundColor:b.COLORS.BG_SUBTLE,borderColor:b.COLORS.BORDER_DISABLED},checkboxLabel:{color:b.COLORS.TEXT_DARK,flexShrink:1,fontSize:C.FONT_SIZE.MD},checkboxLabelDisabled:{color:b.COLORS.TEXT_CAPTION},checkmark:{color:b.COLORS.TEXT_INVERSE,fontSize:C.FONT_SIZE.SM,fontWeight:'bold'},container:{paddingVertical:S.SPACING.SM},divider:{backgroundColor:b.COLORS.BORDER_SUBTLE,height:1,marginVertical:S.SPACING.XL},dropdownChevron:Object.assign({alignSelf:'center',borderBottomColor:b.COLORS.TEXT_CAPTION,borderBottomWidth:2,borderRightColor:b.COLORS.TEXT_CAPTION,borderRightWidth:2,height:8,marginLeft:S.SPACING.SM,transform:[{rotate:'45deg'}],width:8},{transitionDuration:'160ms',transitionProperty:'transform, border-color'}),dropdownChevronOpen:{borderBottomColor:b.COLORS.TEXT_SOFT,borderRightColor:b.COLORS.TEXT_SOFT,transform:[{rotate:'225deg'}]},dropdownCheckmark:{color:b.COLORS.BLUE_400,fontSize:C.FONT_SIZE.MD,fontWeight:'500',marginLeft:S.SPACING.SM},dropdownMenu:Object.assign({backgroundColor:b.COLORS.BG_SURFACE,borderColor:b.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,overflow:'hidden'},h.VIEW_SHADOW_STYLES.DROPDOWN_PANEL),dropdownOption:Object.assign({alignItems:'center',backgroundColor:b.COLORS.BG_SURFACE,flexDirection:'row',justifyContent:'space-between',paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},{cursor:'pointer'}),dropdownOptionHovered:{backgroundColor:b.COLORS.BLUE_50},dropdownOptionSelected:{backgroundColor:b.COLORS.BLUE_50},dropdownOptionText:{color:b.COLORS.TEXT_BODY,flexShrink:1,fontSize:C.FONT_SIZE.MD,fontWeight:'400'},dropdownOptionTextSelected:{color:b.COLORS.TEXT_PRIMARY,fontWeight:'500'},dropdownTrigger:Object.assign({alignItems:'center',backgroundColor:b.COLORS.BG_SURFACE,borderColor:b.COLORS.BORDER_SUBTLE,borderRadius:8,borderWidth:1,flexDirection:'row',justifyContent:'space-between',paddingHorizontal:S.SPACING.LG,paddingVertical:S.SPACING.MD},{cursor:'pointer',transitionDuration:'120ms',transitionProperty:'border-color, background-color'}),dropdownTriggerHovered:{borderColor:b.COLORS.BLUE_200},dropdownTriggerOpen:{borderColor:b.COLORS.BLUE_300},dropdownTriggerText:{color:b.COLORS.TEXT_BODY,flexShrink:1,fontSize:C.FONT_SIZE.MD,fontWeight:'400'},dropdownWrapper:{flexDirection:'column'},section:{gap:S.SPACING.SM},sectionLabel:{color:b.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.XS,fontWeight:'700',letterSpacing:.8,textTransform:'uppercase'},slider:{appearance:'none',borderRadius:999,borderWidth:0,height:6,margin:0,outlineStyle:'none',padding:0,width:'100%'},subtitle:{color:b.COLORS.TEXT_SOFT,fontSize:C.FONT_SIZE.SM,lineHeight:20,marginBottom:S.SPACING.XL},tapRow:{alignItems:'center',flexDirection:'row',gap:S.SPACING.SM,marginTop:S.SPACING.MD},title:{color:b.COLORS.TEXT_DARK,fontSize:C.FONT_SIZE.XL,fontWeight:'700',marginBottom:S.SPACING.XS}})},1063,[34,36,95,369,222,394,488,276,489,490,491,493,494,1053,1064,697,820,104]);
1164__d(function(g,r,i,a,m,e,d){"use strict";
1164Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"LED_BASE_MODES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"LED_MODE_OPTIONS",{enumerable:!0,get:function(){return t}}),e.composeLedMode=function(n,t){if(!l(n))return null;const o=Number(n);return t?o:o|u},e.parseLedMode=function(n){if(null==n||''===n)return null;const t=Number(n);if(!Number.isInteger(t))return null;const o=String(-9&t);if(!l(o))return null;return{baseMode:o,tapEnabled:0===(t&u)}},e.isLedBrightnessActive=function(n){return'0'!==n},e.ledModeLabel=function(n){return t.find(t=>t.value===n)?.label??'Unknown'};const n=['0','1','4','5'],t=[{value:'0',label:"Off, NO LED's"},{value:'1',label:'Full Color AQI Only'},{value:'4',label:'Power, SD Status Only (FLEX Sensors)'},{value:'5',label:'Power, SD Status and Full Color AQI'}],u=8;function l(t){for(const u of n)if(u===t)return!0;return!1}},1064,[]);
1165__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LocationStep=function({form:e}){const n=(0,p.useField)(e,'locationtype'),s=(0,p.useField)(e,'sensorname'),u=(0,p.useField)(e,'visibility'),c=(0,p.useField)(e,'setlocation'),F=(0,p.useField)(e,'lat'),T=(0,p.useField)(e,'lon'),j=(0,o.useMemo)(()=>(0,h.parseCoord)(F.value,T.value),[F.value,T.value]);return(0,v.jsxs)(t.default,{style:f.container,children:[(0,v.jsx)(l.default,{style:f.title,children:"Location Settings"}),(0,v.jsx)(b.FormRadioGroup,{label:"Location Type",binding:n,required:!0,options:[{value:'outside',label:'Outside',icon:(0,v.jsx)(y.SensorMarkerSwatch,{locationType:"outside"})},{value:'inside',label:'Inside',icon:(0,v.jsx)(y.SensorMarkerSwatch,{locationType:"inside"})}],helpText:"Whether the sensor is installed outdoors or indoors. Both appear on the PurpleAir Map; indoor sensors have a black border around the marker."}),(0,v.jsx)(b.FormInput,{label:"Sensor Name",binding:s,required:!0,placeholder:"My PurpleAir Sensor",helpText:"Visible when your sensor is selected on the PurpleAir Map."}),(0,v.jsx)(b.FormRadioGroup,{label:"Visibility",binding:u,required:!0,options:[{value:'public',label:'Public'},{value:'private',label:'Private'}],helpText:(0,v.jsxs)(v.Fragment,{children:['Public sensors appear on the map for everyone. Viewing a private sensor requires ','either using a special link emailed to you after registration, or signing in with ','the owner\u2019s Google or Google-associated email. ',(0,v.jsx)(x.RegistrationHelpLink,{href:x.REGISTRATION_HELP_LINKS.viewingPrivateSensor,accessibilityLabel:"Read the community article about setting a sensor to private and viewing a private sensor on the map",children:"Read here for more information"})]})}),(0,v.jsx)(b.FormCheckbox,{label:"Set a location on the map",binding:c}),c.value&&(0,v.jsxs)(t.default,{style:f.locationFields,children:[(0,v.jsxs)(t.default,{style:f.coordRow,children:[(0,v.jsx)(t.default,{style:f.coordField,children:(0,v.jsx)(b.FormInput,{label:"Latitude",binding:F,required:!0,keyboardType:"numeric",placeholder:"e.g. 40.689"})}),(0,v.jsx)(t.default,{style:f.coordField,children:(0,v.jsx)(b.FormInput,{label:"Longitude",binding:T,required:!0,keyboardType:"numeric",placeholder:"e.g. -111.825"})})]}),(0,v.jsx)(S.LocationPickerMap,{coord:j,onLocationChange:e=>{F.setValue(e.lat.toFixed(6)),T.setValue(e.lon.toFixed(6))}})]})]})};var o=r(d[0]),t=e(r(d[1])),l=e(r(d[2]));r(d[3]);var n=r(d[4]),s=r(d[5]),u=r(d[6]),c=r(d[7]),p=r(d[8]),h=r(d[9]),b=r(d[10]),S=r(d[11]),x=r(d[12]),y=r(d[13]),v=r(d[14]);const f=(0,n.createStyles)({container:{paddingVertical:u.SPACING.SM},coordField:{flex:1},coordRow:{flexDirection:'row',gap:u.SPACING.MD},coordsDisplay:{backgroundColor:s.COLORS.BG_SUBTLE,borderRadius:8,marginTop:u.SPACING.SM,padding:u.SPACING.MD},coordsDisplayText:{color:s.COLORS.TEXT_SECONDARY,fontSize:c.FONT_SIZE.MD},locationFields:{marginTop:u.SPACING.SM},title:{color:s.COLORS.TEXT_DARK,fontSize:c.FONT_SIZE.XL,fontWeight:'700',marginBottom:u.SPACING.LG}})},1065,[34,276,222,95,489,490,493,494,1053,1058,1061,1066,958,1073,104]);
1166__d(function(g,r,i,a,m,_e,d){"use strict";
1166function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.LocationPickerMap=function({coord:e,onLocationChange:u}){const L=(0,s.useMapClientConfig)(),O=(0,n.useRef)(null),E=(0,n.useRef)(null),A=(0,n.useRef)(null),P=(0,n.useRef)(null!==e?I(e):null),[z,U]=(0,n.useState)('starting'),N=(0,y.isMapStartupFailure)(z)?z:null,G=(0,n.useSyncExternalStore)(p.subscribeMapRendererDevOverrides,p.readForceWebGlInitializationFailure,()=>!1),W=(0,h.useLatestRef)(e),$=(0,h.useLatestRef)(u),q=(0,n.useCallback)((e,t)=>{const n=(0,T.toLatitude)(t),o=(0,T.toLongitude)(e);return null===n||null===o?null:(0,T.makeCoord)(n,o)},[]),B=(0,n.useCallback)((e,n)=>{const o=(0,T.coordToLngLat)(n);if(A.current)A.current.setLngLat(o);else{const n=new t.Marker({draggable:!0,color:f.COLORS.BRAND_PRIMARY}).setLngLat(o).addTo(e);n.on('dragend',()=>{const e=n.getLngLat(),t=q(e.lng,e.lat);null!==t&&$.current(t)}),A.current=n}},[q,$]),D=(0,n.useCallback)((e,t)=>{const n=(0,T.coordToLngLat)(t);B(e,t),e.jumpTo({center:n,zoom:_})},[B]);return(0,n.useEffect)(()=>{if(!O.current||E.current)return;if('ready'!==L.status)return;const e=W.current,n=null!==e?[e.lon,e.lat]:[C,R],o=null!==e?_:k;let l;try{if((0,t.setWorkerUrl)('/maplibre/maplibre-gl-worker.mjs'),G)throw new t.GPUInitializationError({},null);l=new t.Map({container:O.current,style:(0,v.getMapStyleUrl)(L.maptilerKey,'streets'),center:n,zoom:o})}catch(e){b.logger.error('Location picker map initialization failed:',e);const t=(0,y.classifyMapStartupFailure)(e),n=window.setTimeout(()=>{U(t)},0);return()=>{window.clearTimeout(n)}}l.addControl(new t.NavigationControl({showCompass:!1}),'top-right');let u=!1;const s=window.setTimeout(()=>{b.logger.error(`Location picker map initialization timed out after ${y.MAP_STARTUP_TIMEOUT_MILLIS} ms.`),U('required-resource')},y.MAP_STARTUP_TIMEOUT_MILLIS),c=e=>{var t;b.logger.error('Location picker map renderer error:',e.error),u||(t=(0,y.classifyMapStartupFailure)(e.error),window.clearTimeout(s),U(t))};return l.on('error',c),l.on('load',()=>{u=!0,window.clearTimeout(s),U('ready');const e=W.current;null!==e&&(D(l,e),P.current=I(e))}),l.on('click',e=>{const t=q(e.lngLat.lng,e.lngLat.lat);null!==t&&(B(l,t),$.current(t))}),E.current=l,()=>{window.clearTimeout(s),l.off('error',c),A.current?.remove(),A.current=null,l.remove(),E.current=null}},[q,G,W,L,$,B,D]),(0,n.useEffect)(()=>{const t=E.current;if(!t)return;if(null===e)return void(P.current=null);const n=I(e);n!==P.current&&(x(A.current,e)||D(t,e),P.current=n)},[e,D,B]),(0,M.jsxs)(o.default,{style:j.wrapper,children:[(0,M.jsx)("div",{ref:O,style:F.map}),'ready'!==L.status&&(0,M.jsx)(o.default,{style:j.stateOverlay,children:(0,M.jsx)(w.FeatureStatusNotice,{status:L.status,message:(0,c.configFeatureMessage)(L.status,'the location picker')})}),'ready'===L.status&&null!==N&&(0,M.jsx)(o.default,{style:j.stateOverlay,children:(0,M.jsx)(w.FeatureStatusNotice,{presentation:"card",status:"missing",title:"Interactive map unavailable",message:S[N]})}),'ready'===L.status&&'ready'===z&&(0,M.jsx)(l.default,{style:j.hint,children:"Click the map to set the sensor location"})]})},r(d[0]);var t=r(d[1]),n=r(d[2]),o=e(r(d[3])),l=e(r(d[4])),u=r(d[5]),s=r(d[6]),c=r(d[7]),p=r(d[8]),f=r(d[9]),L=r(d[10]),h=r(d[11]),T=r(d[12]),b=r(d[13]),w=r(d[14]),y=r(d[15]),v=r(d[16]),M=r(d[17]);const S={'webgl2-unavailable':"This browser could not initialize WebGL 2, so the interactive location picker is unavailable. Enter latitude and longitude above to continue.",'required-resource':"The interactive location picker did not finish loading. Enter latitude and longitude above to continue."},C=-111.825,R=40.689,k=4,_=14,O=1e-6;function I(e){return`${e.lat.toFixed(6)}:${e.lon.toFixed(6)}`}function x(e,t){if(null===e)return!1;const n=e.getLngLat();return Math.abs(n.lat-t.lat)<=O&&Math.abs(n.lng-t.lon)<=O}const F={map:{width:'100%',height:'100%',borderRadius:'8px',overflow:'hidden'}},j=(0,u.createStyles)({hint:{color:f.COLORS.TEXT_CAPTION,fontSize:L.FONT_SIZE.SM,paddingTop:4,textAlign:'center'},wrapper:{height:300,marginTop:8,position:'relative'},stateOverlay:{alignItems:'center',backgroundColor:f.COLORS.BG_SURFACE,borderRadius:8,bottom:24,gap:8,justifyContent:'center',left:0,position:'absolute',right:0,top:0}})},1066,[1067,1068,34,276,222,489,524,531,1070,490,494,498,1058,469,512,1071,1072,104]);
1167__d(function(g,r,i,a,m,e,d){},1067,[]);
1168__d(function(e,t,i,r,a,o,n){"use strict";var s,l,h;
1169/**
1170  * MapLibre GL JS
1171  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.8.0/LICENSE.txt
1172  */Object.defineProperty(o,'__esModule',{value:!0}),Object.defineProperty(o,"AJAXError",{enumerable:!0,get:function(){return c.bn}}),Object.defineProperty(o,"AttributionControl",{enumerable:!0,get:function(){return eh}}),Object.defineProperty(o,"BoxZoomHandler",{enumerable:!0,get:function(){return hl}}),Object.defineProperty(o,"CanvasSource",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(o,"CooperativeGesturesHandler",{enumerable:!0,get:function(){return ql}}),Object.defineProperty(o,"DoubleClickZoomHandler",{enumerable:!0,get:function(){return Zl}}),Object.defineProperty(o,"DragPanHandler",{enumerable:!0,get:function(){return Gl}}),Object.defineProperty(o,"DragRotateHandler",{enumerable:!0,get:function(){return Vl}}),Object.defineProperty(o,"EXTENT",{enumerable:!0,get:function(){return c.Rr}}),Object.defineProperty(o,"EdgeInsets",{enumerable:!0,get:function(){return kr}}),Object.defineProperty(o,"ErrorEvent",{enumerable:!0,get:function(){return c._n}}),Object.defineProperty(o,"Event",{enumerable:!0,get:function(){return c.vn}}),Object.defineProperty(o,"Evented",{enumerable:!0,get:function(){return c.yn}}),Object.defineProperty(o,"FullscreenControl",{enumerable:!0,get:function(){return Zh}}),Object.defineProperty(o,"FullscreenEvent",{enumerable:!0,get:function(){return Bh}}),Object.defineProperty(o,"GPUInitializationError",{enumerable:!0,get:function(){return Xs}}),Object.defineProperty(o,"GeoJSONSource",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(o,"GeolocateControl",{enumerable:!0,get:function(){return Ah}}),Object.defineProperty(o,"GeolocateErrorEvent",{enumerable:!0,get:function(){return zh}}),Object.defineProperty(o,"GeolocateEvent",{enumerable:!0,get:function(){return Sh}}),Object.defineProperty(o,"GeolocatePositionEvent",{enumerable:!0,get:function(){return Eh}}),Object.defineProperty(o,"GlobeControl",{enumerable:!0,get:function(){return Nh}}),Object.defineProperty(o,"Hash",{enumerable:!0,get:function(){return Ys}}),Object.defineProperty(o,"ImageSource",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(o,"KeyboardHandler",{enumerable:!0,get:function(){return kl}}),Object.defineProperty(o,"LngLat",{enumerable:!0,get:function(){return c.st}}),Object.defineProperty(o,"LngLatBounds",{enumerable:!0,get:function(){return et}}),Object.defineProperty(o,"LogoControl",{enumerable:!0,get:function(){return th}}),Object.defineProperty(o,"Map",{enumerable:!0,get:function(){return hh}}),Object.defineProperty(o,"MapLibreMap",{enumerable:!0,get:function(){return hh}}),Object.defineProperty(o,"MapBoxZoomEvent",{enumerable:!0,get:function(){return k}}),Object.defineProperty(o,"MapContextEvent",{enumerable:!0,get:function(){return B}}),Object.defineProperty(o,"MapLibreEvent",{enumerable:!0,get:function(){return R}}),Object.defineProperty(o,"MapMouseEvent",{enumerable:!0,get:function(){return D}}),Object.defineProperty(o,"MapMovementEvent",{enumerable:!0,get:function(){return S}}),Object.defineProperty(o,"MapProjectionEvent",{enumerable:!0,get:function(){return j}}),Object.defineProperty(o,"MapSourceDataEvent",{enumerable:!0,get:function(){return A}}),Object.defineProperty(o,"MapStyleDataEvent",{enumerable:!0,get:function(){return z}}),Object.defineProperty(o,"MapStyleImageMissingEvent",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(o,"MapStyleLoadEvent",{enumerable:!0,get:function(){return E}}),Object.defineProperty(o,"MapTerrainEvent",{enumerable:!0,get:function(){return O}}),Object.defineProperty(o,"MapTouchEvent",{enumerable:!0,get:function(){return L}}),Object.defineProperty(o,"MapWheelEvent",{enumerable:!0,get:function(){return F}}),Object.defineProperty(o,"Marker",{enumerable:!0,get:function(){return Mh}}),Object.defineProperty(o,"MarkerClickEvent",{enumerable:!0,get:function(){return Ph}}),Object.defineProperty(o,"MarkerDragEvent",{enumerable:!0,get:function(){return Th}}),Object.defineProperty(o,"MercatorCoordinate",{enumerable:!0,get:function(){return c.et}}),Object.defineProperty(o,"NavigationControl",{enumerable:!0,get:function(){return uh}}),Object.defineProperty(o,"Point",{enumerable:!0,get:function(){return c.Ri}}),Object.defineProperty(o,"Popup",{enumerable:!0,get:function(){return qh}}),Object.defineProperty(o,"PopupEvent",{enumerable:!0,get:function(){return Wh}}),Object.defineProperty(o,"RasterDEMTileSource",{enumerable:!0,get:function(){return at}}),Object.defineProperty(o,"RasterTileSource",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(o,"ScaleControl",{enumerable:!0,get:function(){return Lh}}),Object.defineProperty(o,"ScrollZoomHandler",{enumerable:!0,get:function(){return Bl}}),Object.defineProperty(o,"Style",{enumerable:!0,get:function(){return Va}}),Object.defineProperty(o,"TerrainControl",{enumerable:!0,get:function(){return Uh}}),Object.defineProperty(o,"TwoFingersTouchPitchHandler",{enumerable:!0,get:function(){return Ll}}),Object.defineProperty(o,"TwoFingersTouchRotateHandler",{enumerable:!0,get:function(){return Al}}),Object.defineProperty(o,"TwoFingersTouchZoomHandler",{enumerable:!0,get:function(){return El}}),Object.defineProperty(o,"TwoFingersTouchZoomRotateHandler",{enumerable:!0,get:function(){return Wl}}),Object.defineProperty(o,"VectorTileSource",{enumerable:!0,get:function(){return it}}),Object.defineProperty(o,"VideoSource",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(o,"addProtocol",{enumerable:!0,get:function(){return c.On}}),Object.defineProperty(o,"addSourceType",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(o,"clearPrewarmedResources",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(o,"config",{enumerable:!0,get:function(){return c.jn}}),Object.defineProperty(o,"createTileMesh",{enumerable:!0,get:function(){return St}}),Object.defineProperty(o,"getGlobalDispatcher",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(o,"getMaxParallelImageRequests",{enumerable:!0,get:function(){return tc}}),Object.defineProperty(o,"getRTLTextPluginStatus",{enumerable:!0,get:function(){return Yh}}),Object.defineProperty(o,"getVersion",{enumerable:!0,get:function(){return Jh}}),Object.defineProperty(o,"getWorkerCount",{enumerable:!0,get:function(){return Qh}}),Object.defineProperty(o,"getWorkerUrl",{enumerable:!0,get:function(){return rc}}),Object.defineProperty(o,"importScriptInWorkers",{enumerable:!0,get:function(){return oc}}),Object.defineProperty(o,"isTimeFrozen",{enumerable:!0,get:function(){return P}}),Object.defineProperty(o,"now",{enumerable:!0,get:function(){return x}}),Object.defineProperty(o,"prewarm",{enumerable:!0,get:function(){return je}}),Object.defineProperty(o,"removeProtocol",{enumerable:!0,get:function(){return c.An}}),Object.defineProperty(o,"restoreNow",{enumerable:!0,get:function(){return T}}),Object.defineProperty(o,"setMaxParallelImageRequests",{enumerable:!0,get:function(){return ic}}),Object.defineProperty(o,"setNow",{enumerable:!0,get:function(){return w}}),Object.defineProperty(o,"setRTLTextPlugin",{enumerable:!0,get:function(){return Kh}}),Object.defineProperty(o,"setWorkerCount",{enumerable:!0,get:function(){return ec}}),Object.defineProperty(o,"setWorkerUrl",{enumerable:!0,get:function(){return ac}});var c=t(n[0]),u="6.8.0";function d(){var e=new c.Fi(4);return c.Fi!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function _(e,t){var i=t[0],r=t[1],a=t[2],o=t[3],n=i*o-a*r;return n?(n=1/n,e[0]=o*n,e[1]=-r*n,e[2]=-a*n,e[3]=i*n,e):null}function p(e){return e[0]*e[3]-e[2]*e[1]}function m(e,t,i){var r=t[0],a=t[1],o=t[2],n=t[3],s=Math.sin(i),l=Math.cos(i);return e[0]=r*l+o*s,e[1]=a*l+n*s,e[2]=r*-s+o*l,e[3]=a*-s+n*l,e}let f,g,v;const y={frame(e,t,i,r){let a=r||window,o=a.requestAnimationFrame(e=>{n(),t(e)}),{unsubscribe:n}=(0,c.Ar)(e.signal,"abort",()=>{n(),a.cancelAnimationFrame(o),i(new c.Mn(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((i,r)=>{this.frame(e,i,r,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),i=t.getContext("2d",{willReadFrequently:!0});if(!i)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,i.drawImage(e,0,0,e.width,e.height),i},resolveURL:e=>(f||=document.createElement("a"),f.href=e,f.href),get hardwareConcurrency(){return typeof navigator<"u"&&navigator.hardwareConcurrency||4},get prefersReducedMotion(){return void 0===v?!!matchMedia&&(g??=matchMedia("(prefers-reduced-motion: reduce)"),g.matches):v},set prefersReducedMotion(e){v=e}},b=new class{constructor(){this._frozenAt=null}getCurrentTime(){return null===this._frozenAt?performance.now():this._frozenAt}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};function x(){return b.getCurrentTime()}function w(e){b.setNow(e)}function T(){b.restoreNow()}function P(){return b.isFrozen()}var M=((s=class e{static create(e,t,i){let r=window.document.createElement(e);return void 0!==t&&(r.className=t),i&&i.appendChild(r),r}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){e.docStyle&&e.selectProp&&(e.userSelect=e.docStyle[e.selectProp],e.docStyle[e.selectProp]="none")}static enableDrag(){e.docStyle&&e.selectProp&&(e.docStyle[e.selectProp]=e.userSelect)}static suppressClickInternal(t){t.preventDefault(),t.stopPropagation(),window.removeEventListener("click",e.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",e.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",e.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}
1172static getPoint(e,t,i){let r=t.boundingClientRect;return new c.Ri((i.clientX-r.left)/t.x-e.clientLeft,(i.clientY-r.top)/t.y-e.clientTop)}static mousePos(t,i){let r=e.getScale(t);return e.getPoint(t,r,i)}static touchPos(t,i){let r=[],a=e.getScale(t);for(let o of i)r.push(e.getPoint(t,a,o));return r}static sanitize(t){let i=(new DOMParser).parseFromString(t,"text/html").body||document.createElement("body"),r=i.querySelectorAll("script");for(let e of r)e.remove();return e.clean(i),i.innerHTML}static isPossiblyDangerous(e,t){let i=t.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(e)&&(i.includes("javascript:")||i.includes("data:"))||e.startsWith("on"))return!0}static clean(t){let i=t.children;for(let t of i)e.removeAttributes(t),e.clean(t)}static removeAttributes(t){for(let{name:i,value:r}of Array.from(t.attributes))e.isPossiblyDangerous(i,r)&&t.removeAttribute(i)}}).docStyle=typeof window<"u"&&window.document?.documentElement.style,s.selectProp=!s.docStyle||"userSelect"in s.docStyle?"userSelect":"webkitUserSelect",s);let C;(function(e){let t,i,r,a;e.resetRequestQueue=()=>{t=[],i=0,r=0,a={}},e.addThrottleControl=e=>{let t=r++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],l()};let o=()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1};e.transformAndGetImage=async function(e,t,i,r,a=!0,o){let n=await e.transformRequest(t,i);return(0,c.Pn)(r.signal),C.getImage(n,r,a,o)},e.getImage=(e,i,r=!0,a)=>new Promise((o,n)=>{e.headers||={},e.headers.accept="image/webp,*/*",(0,c.tr)(e,{type:"image"});let s={abortController:i,requestParameters:e,supportImageRefresh:r,imageBitmapOptions:a,state:"queued",onError:e=>{n(e)},onSuccess:e=>{o(e)}};t.push(s),l()});let n=(e,t)=>"function"==typeof createImageBitmap?(0,c.zn)(e,t):(0,c.Rn)(e),s=async e=>{e.state="running";let{requestParameters:t,supportImageRefresh:r,imageBitmapOptions:a,onError:o,onSuccess:s,abortController:u}=e,d=!1===r&&!a&&!(0,c.mr)(self)&&!(0,c.kn)(t.url)&&(!t.headers||Object.keys(t.headers).reduce((e,t)=>e&&"accept"===t,!0));i++;let _=d?h(t,u):(0,c.En)(t,u);try{let t=await _;delete e.abortController,e.state="completed",t.data instanceof HTMLImageElement||(0,c.lr)(t.data)?s(t):t.data&&0!==t.data.byteLength?s({data:await n(t.data,a),cacheControl:t.cacheControl,expires:t.expires}):s({data:null,cacheControl:t.cacheControl,expires:t.expires})}catch(t){delete e.abortController,o((0,c.$n)(t))}finally{i--,l()}},l=()=>{let e=o()?c.jn.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:c.jn.MAX_PARALLEL_IMAGE_REQUESTS;for(let r=i;r<e&&t.length>0;r++){let e=t.shift();e.abortController.signal.aborted?r--:s(e)}},h=(e,t)=>new Promise((i,r)=>{let a=new Image,o=e.url,n=e.credentials;n&&"include"===n?a.crossOrigin="use-credentials":(n&&"same-origin"===n||!(0,c.Dn)(o))&&(a.crossOrigin="anonymous"),t.signal.addEventListener("abort",()=>{a.src="",r(new c.Mn(t.signal.reason))}),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,i({data:a})},a.onerror=()=>{a.onerror=a.onload=null,!t.signal.aborted&&r(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},a.src=o})})(C||={}),C.resetRequestQueue();var I=class{constructor(e){this._transformRequestFn=e??null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}},R=class extends c.vn{},S=class extends R{},E=class extends R{constructor(e={}){super("style.load",e)}},z=class extends R{constructor(e,t={}){super(e,t),this.dataType="style"}},A=class extends R{constructor(e,t={}){super(e,t),this.dataType="source"}},D=class extends R{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,i,r={}){i=i instanceof MouseEvent?i:new MouseEvent(e,i);let a=M.mousePos(t.getCanvas(),i),o=t.unproject(a);super(e,(0,c.tr)({point:a,lngLat:o,originalEvent:i},r)),this._defaultPrevented=!1,this.target=t}},L=class extends R{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,i){let r="touchend"===e?i.changedTouches:i.touches,a=M.touchPos(t.getCanvasContainer(),r),o=a.map(e=>t.unproject(e)),n=a.reduce((e,t,i,r)=>e.add(t.div(r.length)),new c.Ri(0,0));super(e,{points:a,point:n,lngLats:o,lngLat:t.unproject(n),originalEvent:i}),this._defaultPrevented=!1}},F=class extends R{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t){super("wheel",{originalEvent:t}),this._defaultPrevented=!1}},k=class extends R{},O=class extends R{constructor(e={}){super("terrain",e)}},j=class extends R{constructor(e={}){super("projectiontransition",e)}},B=class extends R{},Z=class extends R{constructor(e={}){super("styleimagemissing",e)}};function U(e,t){let i={};for(let t in e)"ref"!==t&&(i[t]=e[t]);
1172return c.hn.forEach(e=>{e in t&&(i[e]=t[e])}),i}function N(e){e=e.slice();let t=Object.create(null);for(let i=0;i<e.length;i++)t[e[i].id]=e[i];for(let i=0;i<e.length;i++)"ref"in e[i]&&(e[i]=U(e[i],t[e[i].ref]));return e}function G(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!G(e[i],t[i]))return!1;return!0}if("object"==typeof e&&e&&null!==t){if("object"!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(!G(e[i],t[i]))return!1;return!0}return e===t}function V(e,t){e.push(t)}function W(e,t,i){V(i,{command:"addSource",args:[e,t[e]]})}function q(e,t,i){V(t,{command:"removeSource",args:[e]}),i[e]=!0}function $(e,t,i,r){q(e,i,r),W(e,t,i)}function H(e,t,i){let r;for(r in e[i])if(Object.prototype.hasOwnProperty.call(e[i],r)&&"data"!==r&&!G(e[i][r],t[i][r]))return!1;for(r in t[i])if(Object.prototype.hasOwnProperty.call(t[i],r)&&"data"!==r&&!G(e[i][r],t[i][r]))return!1;return!0}function X(e,t,i,r){let a;for(a in e||={},t||={},e)Object.prototype.hasOwnProperty.call(e,a)&&(Object.prototype.hasOwnProperty.call(t,a)||q(a,i,r));for(a in t)Object.prototype.hasOwnProperty.call(t,a)&&(Object.prototype.hasOwnProperty.call(e,a)?G(e[a],t[a])||("geojson"===e[a].type&&"geojson"===t[a].type&&H(e,t,a)?V(i,{command:"setGeoJSONSourceData",args:[a,t[a].data]}):$(a,t,i,r)):W(a,t,i))}function K(e,t,i,r,a,o){e||={},t||={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(G(e[n],t[n])||i.push({command:o,args:[r,n,t[n],a]}));for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&!Object.prototype.hasOwnProperty.call(e,n)&&(G(e[n],t[n])||i.push({command:o,args:[r,n,t[n],a]}))}function Y(e){return e.id}function J(e,t){return e[t.id]=t,e}function Q(e,t,i){e||=[],t||=[];let r,a,o,n,s,l=e.map(Y),h=t.map(Y),c=e.reduce(J,{}),u=t.reduce(J,{}),d=l.slice(),_=Object.create(null);for(let e=0,t=0;e<l.length;e++)r=l[e],Object.prototype.hasOwnProperty.call(u,r)?t++:(V(i,{command:"removeLayer",args:[r]}),d.splice(d.indexOf(r,t),1));for(let e=0,t=0;e<h.length;e++)r=h[h.length-1-e],d[d.length-1-e]!==r&&(Object.prototype.hasOwnProperty.call(c,r)?(V(i,{command:"removeLayer",args:[r]}),d.splice(d.lastIndexOf(r,d.length-t),1)):t++,n=d[d.length-e],V(i,{command:"addLayer",args:[u[r],n]}),d.splice(d.length-e,0,r),_[r]=!0);for(let e=0;e<h.length;e++)if(r=h[e],a=c[r],o=u[r],!_[r]&&!G(a,o)){if(!G(a.source,o.source)||!G(a["source-layer"],o["source-layer"])||!G(a.type,o.type)){V(i,{command:"removeLayer",args:[r]}),n=d[d.lastIndexOf(r)+1],V(i,{command:"addLayer",args:[o,n]});continue}for(s in K(a.layout,o.layout,i,r,null,"setLayoutProperty"),K(a.paint,o.paint,i,r,null,"setPaintProperty"),G(a.filter,o.filter)||V(i,{command:"setFilter",args:[r,o.filter]}),(!G(a.minzoom,o.minzoom)||!G(a.maxzoom,o.maxzoom))&&V(i,{command:"setLayerZoomRange",args:[r,o.minzoom,o.maxzoom]}),a)Object.prototype.hasOwnProperty.call(a,s)&&"layout"!==s&&"paint"!==s&&"filter"!==s&&"metadata"!==s&&"minzoom"!==s&&"maxzoom"!==s&&(0===s.indexOf("paint.")?K(a[s],o[s],i,r,s.slice(6),"setPaintProperty"):G(a[s],o[s])||V(i,{command:"setLayerProperty",args:[r,s,o[s]]}));for(s in o)Object.prototype.hasOwnProperty.call(o,s)&&!Object.prototype.hasOwnProperty.call(a,s)&&"layout"!==s&&"paint"!==s&&"filter"!==s&&"metadata"!==s&&"minzoom"!==s&&"maxzoom"!==s&&(0===s.indexOf("paint.")?K(a[s],o[s],i,r,s.slice(6),"setPaintProperty"):G(a[s],o[s])||V(i,{command:"setLayerProperty",args:[r,s,o[s]]}))}}function ee(e,t){if(!e)return[{command:"setStyle",args:[t]}];let i=[];try{if(!G(e.version,t.version))return[{command:"setStyle",args:[t]}];G(e.center,t.center)||i.push({command:"setCenter",args:[t.center]}),G(e.state,t.state)||i.push({command:"setGlobalState",args:[t.state]}),G(e.centerAltitude,t.centerAltitude)||i.push({command:"setCenterAltitude",args:[t.centerAltitude]}),G(e.zoom,t.zoom)||i.push({command:"setZoom",args:[t.zoom]}),G(e.bearing,t.bearing)||i.push({command:"setBearing",args:[t.bearing]}),G(e.pitch,t.pitch)||i.push({command:"setPitch",args:[t.pitch]}),G(e.roll,t.roll)||i.push({command:"setRoll",args:[t.roll]}),G(e.sprite,t.sprite)||i.push({command:"setSprite",args:[t.sprite]}),G(e.glyphs,t.glyphs)||i.push({command:"setGlyphs",args:[t.glyphs]}),G(e["font-faces"],t["font-faces"])||i.push({command:"setFontFaces",args:[t["font-faces"]]}),G(e.transition,t.transition)||i.push({command:"setTransition",args:[t.transition]}),G(e.light,t.light)||i.push({command:"setLight",args:[t.light]}),G(e.terrain,t.terrain)||i.push({command:"setTerrain",args:[t.terrain]}),G(e.sky,t.sky)||i.push({command:"setSky",args:[t.sky]}),G(e.projection,t.projection)||i.push({command:"setProjection",args:[t.projection]});let r={},a=[];X(e.sources,t.sources,a,r);let o=[];
vendor: 5,312 bytes, line 1172
1172e.layers&&e.layers.forEach(e=>{"source"in e&&r[e.source]?i.push({command:"removeLayer",args:[e.id]}):o.push(e)}),i=i.concat(a),Q(o,t.layers,i)}catch(e){console.warn("Unable to compute style diff:",e),i=[{command:"setStyle",args:[t]}]}return i}function te(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let i=[];for(let{id:r,url:a}of e){let e=`${r}${a}`;i.includes(e)||(i.push(e),t.push({id:r,url:a}))}}return t}function ie(e,t,i){try{let r=new URL(e);return r.pathname+=`${t}${i}`,r.toString()}catch{throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}async function re(e,t,i,r){let a=te(e),o=i>1?"@2x":"",n={},s={};for(let{id:e,url:i}of a){let a=await t.transformRequest(ie(i,o,".json"),"SpriteJSON");n[e]=(0,c.Cn)(a,r);let l=await t.transformRequest(ie(i,o,".png"),"SpriteImage");s[e]=C.getImage(l,r)}return await Promise.all([...Object.values(n),...Object.values(s)]),ae(n,s)}async function ae(e,t){let i={};for(let r in e){i[r]={};let a=(await t[r]).data;if(!a)throw Error(`Could not load sprite image for ${r}: the response is empty`);let o=y.getImageCanvasContext(a),n=(await e[r]).data;for(let e in n){let{width:t,height:a,x:s,y:l,sdf:h,pixelRatio:c,stretchX:u,stretchY:d,content:_,textFitWidth:p,textFitHeight:m}=n[e],f={width:t,height:a,x:s,y:l,context:o};i[r][e]={data:null,pixelRatio:c,sdf:h,stretchX:u,stretchY:d,content:_,textFitWidth:p,textFitHeight:m,spriteData:f}}}return i}var oe=class extends c.yn{constructor(){super(),this.images={},this.updateVersion=0,this.loaded=!1,this.requestors=[],this.missingImageResolver=null,this._spriteImagesIds={},this._imagesIds=null,this._renderCallbacksDispatchedThisFrame={}}destroy(){for(let e of Object.keys(this.images))this.removeImage(e);this._spriteImagesIds={}}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let t=this.images[e];if(t&&!t.data&&t.spriteData){let e=t.spriteData;t.data=new c.Tt({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),t.spriteData=null}return t}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t,this._imagesIds=null,t.isWebGLImage&&this.updateImage(e,t,!1))}_validate(e,t){let i=!0,r=t.data||t.spriteData;return this._validateStretch(t.stretchX,r?.width)||(this.fire(new c._n(Error(`Image "${e}" has invalid "stretchX" value`))),i=!1),this._validateStretch(t.stretchY,r?.height)||(this.fire(new c._n(Error(`Image "${e}" has invalid "stretchY" value`))),i=!1),this._validateContent(t.content,t)||(this.fire(new c._n(Error(`Image "${e}" has invalid "content" value`))),i=!1),i}_validateStretch(e,t){if(!e)return!0;let i=0;for(let r of e){if(r[0]<i||r[1]<r[0]||t<r[1])return!1;i=r[1]}return!0}_validateContent(e,t){if(!e)return!0;if(4!==e.length)return!1;let i=t.spriteData,r=i?.width||t.data.width,a=i?.height||t.data.height;return!(e[0]<0||r<e[0]||e[1]<0||a<e[1]||e[2]<0||r<e[2]||e[3]<0||a<e[3]||e[2]<e[0])&&e[3]>=e[1]}updateImage(e,t,i=!0){let r=this.images[e];if(i){let e=r.data||r.spriteData;if(e.width!==t.data.width||e.height!==t.data.height)throw Error(`size mismatch between old image (${e.width}x${e.height}) and new image (${t.data.width}x${t.data.height}).`)}t.version=(r.version??0)+1,this.images[e]=t,this.updateVersion++}removeImage(e){let t=this.images[e];t&&(delete this.images[e],this._imagesIds=null,t.userImage?.onRemove&&t.userImage.onRemove())}listImages(){return this._imagesIds??=Object.keys(this.images),this._imagesIds}_getSpriteImageId(e,t){return"default"===e?t:`${e}:${t}`}setSpriteImages(e,t){let i=this._spriteImagesIds[e]??[],r=[];for(let i in t){let a=this._getSpriteImageId(e,i);r.push(a),a in this.images?this.updateImage(a,t[i],!1):this.addImage(a,t[i])}let a=new Set(r),o=i.filter(e=>!a.has(e));for(let e of o)this.removeImage(e);return this._spriteImagesIds[e]=r,{loaded:r,removed:o}}removeSpriteImages(e){let t=this._spriteImagesIds[e]??[];for(let e of t)this.removeImage(e);return delete this._spriteImagesIds[e],t}removeAllSpriteImages(){let e=Object.values(this._spriteImagesIds).flat();for(let t of e)this.removeImage(t);return this._spriteImagesIds={},e}setMissingImageResolver(e){this.missingImageResolver=e}getImages(e){return new Promise((t,i)=>{let r=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(r=!1);this.isLoaded()||r?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}async _getImagesForIds(e){let t=new Set(e.filter(e=>!this.getImage(e))),i=this.missingImageResolver;i&&await Promise.allSettled(Array.from(t,e=>i(e)));let r={};for(let i of e){let e=this.getImage(i);e&&(t.delete(i),r[i]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!!e.userImage?.render,isWebGLImage:e.isWebGLImage})}for(let e of t)this.fire(new Z({id:e})),(0,c.Pr)(`Image "${e}" could not be loaded. Please make sure you have added the image before it is needed with map.addImage(), resolved 
1172it with map.setMissingStyleImageResolver(), or included it in a "sprite" property in your style.`);return r}beginFrame(){this._renderCallbacksDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let t of e){if(this._renderCallbacksDispatchedThisFrame[t])continue;this._renderCallbacksDispatchedThisFrame[t]=!0;let e=this.getImage(t);e||(0,c.Pr)(`Image with ID: "${t}" was not found`),(0,c.L)(e)&&this.updateImage(t,e)}}cloneImages(){let e={};for(let t in this.images){let i=this.images[t];e[t]=Object.assign({},i,{data:i.data?i.data.clone():null})}return e}},ne=class{constructor(e){this._imageManager=e,this._entries={},this._image=new c.Tt({width:1,height:1}),this._dirty=!0}destroy(){this._texture&&=(this._texture.destroy(),null),this._entries={},this._image=new c.Tt({width:1,height:1}),this._dirty=!0}getPixelSize(){let{width:e,height:t}=this._image;return{width:e,height:t}}getPattern(e){let t=this._imageManager.getImage(e);if(!t)return null;let i=this._entries[e];if(i?.image!==t){let i={w:t.data.width+2,h:t.data.height+2,x:0,y:0};this._entries[e]={bin:i,position:new c.P(i,t),image:t}}else{if(i.position.version===t.version)return i.position;i.position.version=t.version}return this._update(),this._entries[e].position}bind(e){let t=e.gl;this._texture?this._dirty&&=(this._texture.update(this._image),!1):(this._texture=new c.yt(e,this._image,t.RGBA),this._dirty=!1),this._texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_update(){for(let e in this._entries)this._imageManager.getImage(e)||delete this._entries[e];let e=[];for(let t in this._entries)e.push(this._entries[t].bin);let{w:t,h:i}=(0,c.F)(e),r=this._image;r.resize({width:t||1,height:i||1});for(let e in this._entries){let{bin:t}=this._entries[e],i=t.x+1,a=t.y+1,o=this._entries[e].image.data,n=o.width,s=o.height;c.Tt.copy(o,r,{x:0,y:0},{x:i,y:a},{width:n,height:s}),c.Tt.copy(o,r,{x:0,y:s-1},{x:i,y:a-1},{width:n,height:1}),c.Tt.copy(o,r,{x:0,y:0},{x:i,y:a+s},{width:n,height:1}),c.Tt.copy(o,r,{x:n-1,y:0},{x:i-1,y:a},{width:1,height:s}),c.Tt.copy(o,r,{x:0,y:0},{x:i+n,y:a},{width:1,height:s})}this._dirty=!0}};const se=1114111,le={start:0,end:se};let he=0;function ce(e){let t=/^u\+([0-9a-f]*)(\?+)$/i.exec(e);if(t){let[,e,i]=t;return e.length+i.length>6?null:ue(parseInt(`${e}${"0".repeat(i.length)}`,16),parseInt(`${e}${"f".repeat(i.length)}`,16))}let i=/^u\+([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?$/i.exec(e);if(!i)return null;let r=parseInt(i[1],16);return ue(r,void 0===i[2]?r:parseInt(i[2],16))}function ue(e,t){return e>t||e>se?null:{start:e,end:Math.min(t,se)}}function de(e,t){return e.ranges.some(({start:e,end:i})=>t>=e&&t<=i)}var _e=class{constructor(e){this.requestManager=e,this._faces={},this._registered=new Set}setFontFaces(e){this._unregisterAll(),this._faces={};for(let[t,i]of Object.entries(e??{})){let e=Array.isArray(i)?i:[i];this._faces[t]=e.map(e=>this._declareFontFace(t,e)).filter(e=>null!==e)}}hasFontFaces(){return Object.keys(this._faces).length>0}async getFontFamily(e,t){for(let i of e.split(","))for(let e of this._faces[i.trim()]??[])if(de(e,t)&&(e.loaded??=this._loadFontFace(e),await e.loaded))return e.family;return null}_declareFontFace(e,t){let i="string"==typeof t?{url:t}:t;if("string"!=typeof i?.url)return(0,c.Pr)(`Ignoring the font face declared for "${e}": it has no URL.`),null;let r="maplibre-gl-font-face-"+he++,a=i["unicode-range"];if(!a?.length)return{url:i.url,ranges:[le],family:r};let o=[];for(let e of a){let t=ce(e);t?o.push(t):(0,c.Pr)(`Ignoring the unicode range "${e}" of the font face at ${i.url}: it is not a valid range.`)}return o.length?{url:i.url,ranges:o,family:r}:null}async _loadFontFace(e){if(typeof FontFace>"u"||typeof document>"u"||!document.fonts)return(0,c.Pr)(`Ignoring the font face at ${e.url}: this environment has no CSS Font Loading API.`),!1;let t;try{return t=new FontFace(e.family,await this._downloadFontFile(e.url)),!!Object.values(this._faces).some(t=>t.includes(e))&&(document.fonts.add(t),this._registered.add(t),await t.load(),!0)}catch(i){return t&&this._unregister(t),(0,c.Pr)(`Ignoring the font face at ${e.url}: ${(0,c.$n)(i).message}`),!1}}
vendor: 5,067 bytes, line 1172
1172async _downloadFontFile(e){let t=await this.requestManager.transformRequest(e,"Glyphs"),i=await(0,c.Sn)(t,new AbortController);if(!i?.data)throw Error(`the response was empty for the font file at ${e}`);return i.data}_unregister(e){document.fonts?.delete(e),this._registered.delete(e)}_unregisterAll(){for(let e of this._registered)document.fonts?.delete(e);this._registered.clear()}destroy(){this._unregisterAll(),this._faces={}}};const pe=1e20,me=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-(e/255)**.45454545454545453;me[e]=t*Math.abs(t)}me[255]=-1e20;var fe=class{constructor({fontSize:e=24,buffer:t=3,radius:i=8,cutoff:r=.25,fontFamily:a="sans-serif",fontWeight:o="normal",fontStyle:n="normal",lang:s=null}={}){this.buffer=t,this.radius=i,this.cutoff=r,this.lang=s;let l=this.size=e+4*t,h=this._createCanvas(l),c=this.ctx=h.getContext("2d",{willReadFrequently:!0});c.font=`${n} ${o} ${e}px ${a}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:i,actualBoundingBoxDescent:r,actualBoundingBoxLeft:a,actualBoundingBoxRight:o}=this.ctx.measureText(e),n=Math.ceil(i),s=Math.floor(-a),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o)-s)),h=Math.max(0,Math.min(this.size-this.buffer,n+Math.ceil(r))),c=l+2*this.buffer,u=h+2*this.buffer,d=Math.max(c*u,0),_=new Uint8ClampedArray(d),p={data:_,width:c,height:u,glyphWidth:l,glyphHeight:h,glyphTop:n,glyphLeft:s,glyphAdvance:t};if(0===l||0===h)return p;let{ctx:m,buffer:f,gridInner:g,gridOuter:v}=this;this.lang&&(m.lang=this.lang),m.clearRect(f,f,l,h),m.fillText(e,f-s,f+n);let y=m.getImageData(f,f,l,h);v.fill(pe,0,d),g.fill(0,0,d);let b=3;for(let e=0;e<h;e++){let t=(e+f)*c+f;for(let e=0;e<l;e++,b+=4,t++){let e=y.data[b];if(0===e)continue;let i=me[e];v[t]=Math.max(0,i),g[t]=Math.max(0,-i)}}ge(v,0,0,c,u,c,this.f,this.v,this.z);let x=Math.min(f,1);ge(g,f-x,f-x,l+2*x,h+2*x,c,this.f,this.v,this.z);let w=255/this.radius,T=255*(1-this.cutoff);for(let e=0;e<d;e++){let t=Math.sqrt(v[e])-Math.sqrt(g[e]);_[e]=Math.round(T-w*t)}return p}};function ge(e,t,i,r,a,o,n,s,l){for(let h=t;h<t+r;h++)ve(e,i*o+h,o,a,n,s,l);for(let h=i;h<i+a;h++)ve(e,h*o+t,1,r,n,s,l)}function ve(e,t,i,r,a,o,n){o[0]=0,n[0]=-1e20,n[1]=pe,a[0]=e[t];for(let s=1,l=0,h=0;s<r;s++){a[s]=e[t+s*i];let r=s*s;do{let e=o[l];h=(a[s]-a[e]+r-e*e)/(s-e)/2}while(h<=n[l]&&--l>-1);l++,o[l]=s,n[l]=h,n[l+1]=pe}for(let s=0,l=0;s<r;s++){for(;n[l+1]<s;)l++;let r=o[l],h=s-r;e[t+s*i]=a[r]+h*h}}const ye=c.gn.layout_symbol["text-font"].default.join(","),be=(e,t)=>{let i=new fe(e);return i.buffer=t,i};var xe=class{constructor(e,t,i,r=be){this.requestManager=e,this.localIdeographFontFamily=t,this.entries={},this.lang=i,this.fontFaceManager=new _e(e),this.createRasterizer=r}setURL(e){this.url=e}setFontFaces(e){this.fontFaceManager.setFontFaces(e),this.entries={}}async getGlyphs(e){let t=[];for(let i in e)for(let r of e[i])t.push(this._getAndCacheGlyphsPromise(i,r));let i=await Promise.all(t),r={};for(let{stack:e,id:t,glyph:a}of i)r[e]||={},r[e][t]=a&&{id:a.id,bitmap:a.bitmap.clone(),metrics:a.metrics};return r}async _getAndCacheGlyphsPromise(e,t){this.entries[e]??={glyphs:{},requests:{},ranges:{}};let i=this.entries[e],r=i.glyphs[t];if(void 0!==r)return{stack:e,id:t,glyph:r};let a=t.codePointAt(0),o=this.fontFaceManager.hasFontFaces()?await this.fontFaceManager.getFontFamily(e,a):null;return o?(r=i.glyphs[t]=await this._drawGlyph(i,e,t,o),{stack:e,id:t,glyph:r}):(0,c.B)(t)?(r=i.glyphs[t]=null,{stack:e,id:t,glyph:r}):!this.url||this._charUsesLocalIdeographFontFamily(a)?(r=i.glyphs[t]=await this._drawGlyph(i,e,t),{stack:e,id:t,glyph:r}):await this._downloadAndCacheRangePromise(e,t)}async _downloadAndCacheRangePromise(e,t){let i=t.codePointAt(0),r=this.entries[e],a=Math.floor(i/256);if(r.ranges[a])return{stack:e,id:t,glyph:null};r.requests[a]||=this._loadGlyphRange(e,a);try{let o=await r.requests[a];for(let e in o)r.glyphs[String.fromCodePoint(+e)]=o[+e];return r.ranges[a]=!0,{stack:e,id:t,glyph:o[i]||null}}catch(o){let n=r.glyphs[t]=await this._drawGlyph(r,e,t);return this._warnOnMissingGlyphRange(n,a,i,(0,c.$n)(o)),{stack:e,id:t,glyph:n}}}async _loadGlyphRange(e,t){let i=256*t,r=i+255,a=await this.requestManager.transformRequest(this.url.replace("{fontstack}",e).replace("{range}",`${i}-${r}`),"Glyphs"),o=await(0,c.Sn)(a,new AbortController);if(!o?.data)throw Error(`Could not load glyph range. range: ${t}, ${i}-${r}`);let n={};for(let e of(0,c.R)(o.data))n[e.id]=e;return n}_warnOnMissingGlyphRange(e,t,i,r){let a=256*t,o=a+255,n=i.toString(16).padStart(4,"0").toUpperCase();(0,c.Pr)(`Unable to load glyph range ${t}, ${a}-${o}. Rendering codepoint U+${n} locally instead. ${r}`)}_charUsesLocalIdeographFontFamily(e){return!!this.localIdeographFontFamily&&
1172(0,c.tn)(e)}async _drawGlyph(e,t,i,r){let a=(await this._getTinySDF(e,t,i,r)).draw(i),o=/^\p{gc=Cf}+$/u.test(i);return{id:i.codePointAt(0),bitmap:new c.wt({width:a.width||60,height:a.height||60},a.data),metrics:{width:o?0:a.glyphWidth/2||24,height:a.glyphHeight/2||24,left:a.glyphLeft/2+.5||0,top:a.glyphTop/2-27.5||-8,advance:o?0:a.glyphAdvance/2||24,isDoubleResolution:!0}}}_getTinySDF(e,t,i,r){if(r){let t=(0,c.B)(i),a=t?"clusterTinySDFs":"fontFaceTinySDFs";return e[a]??={},e[a][r]||=this._createTinySDF(r,!1,t?3:1),e[a][r]}let a=t===ye&&""!==this.localIdeographFontFamily&&this._charUsesLocalIdeographFontFamily(i.codePointAt(0)),o=a?"ideographTinySDF":"tinySDF";return e[o]||=this._createTinySDF(a?this.localIdeographFontFamily:t),e[o]}async _createTinySDF(e,t=!0,i=1){let r=e?e.split(","):[];r.push("sans-serif");let a=r.map(e=>/[-\w]+/.test(e)?e:`'${CSS.escape(e)}'`).join(","),o=t?this._fontWeight(r[0]):void 0,n=t?this._fontStyle(r[0]):"normal";if(typeof document<"u"&&document.fonts?.load)try{await document.fonts.load(`${n} ${o||"normal"} 48px ${a}`)}catch(e){(0,c.Pr)(`Failed to load font "${a}": ${(0,c.$n)(e).message}`)}return this.createRasterizer({fontSize:48,buffer:Math.max(6,Math.ceil(48*(i-1)/4)),radius:16,cutoff:.25,fontFamily:a,fontWeight:o,fontStyle:n,lang:this.lang},6)}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t,i={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950};for(let[r,a]of Object.entries(i))RegExp(`\\b${r}\\b`,"i").test(e)&&(t=`${a}`);return t}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.fontFaceTinySDFs={},t.glyphs={},t.requests={},t.ranges={}}this.entries={},this.fontFaceManager.destroy()}};let we;var Te=class extends c.yn{constructor(e,t){super(),this._transitionable=new c.Qt(we||=new c.Xt({anchor:new c.Yt(c.gn.light.anchor,"anchor"),position:new c.Yt(c.gn.light.position,"position"),color:new c.Yt(c.gn.light.color,"color"),intensity:new c.Yt(c.gn.light.intensity,"intensity")}),"light",t),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}getCartesianPosition(){return(0,c.kr)(this.properties.get("position"))}setLight(e,t={}){if(!this._validate(c.sn.light,e,t))for(let t in e){let i=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-c.Zt.length),i):this._transitionable.setValue(t,i)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,i){return(0,c.on)(this,e,{value:t},i)}};let Pe;var Me=class extends c.yn{constructor(e,t){super(),this._transitionable=new c.Qt(Pe||=new c.Xt({"sky-color":new c.Yt(c.gn.sky["sky-color"],"sky-color"),"horizon-color":new c.Yt(c.gn.sky["horizon-color"],"horizon-color"),"fog-color":new c.Yt(c.gn.sky["fog-color"],"fog-color"),"fog-ground-blend":new c.Yt(c.gn.sky["fog-ground-blend"],"fog-ground-blend"),"horizon-fog-blend":new c.Yt(c.gn.sky["horizon-fog-blend"],"horizon-fog-blend"),"sky-horizon-blend":new c.Yt(c.gn.sky["sky-horizon-blend"],"sky-horizon-blend"),"atmosphere-blend":new c.Yt(c.gn.sky["atmosphere-blend"],"atmosphere-blend")}),"sky",t),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new c.$t(0))}setSky(e,t={}){if(!this._validate(c.sn.sky,e,t)){e||={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0};for(let t in e){let i=e[t];t.endsWith("-transition")?this._transitionable.setTransition(t.slice(0,-c.Zt.length),i):this._transitionable.setValue(t,i)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,t,i={}){return(0,c.on)(this,e,{value:t},i)}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}},Ce=class{constructor(e,t){this.width=e,this.height=t,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,t){let i=e.join(",")+String(t);return this.dashEntry[i]||=this.addDash(e,t),this.dashEntry[i]}getDashRanges(e,t,i){let r=[],a=e.length%2==1?-e[e.length-1]*i:0,o=e[0]*i,n=!0;r.push({left:a,right:o,isDash:n,zeroLength:0===e[0]});let s=e[0];for(let t=1;t<e.length;t++){n=!n;let l=e[t];a=s*i,s+=l,o=s*i,r.push({left:a,right:o,isDash:n,zeroLength:0===l})}return r}addRoundDash(e,t,i){let r=t/2;for(let t=-i;t<=i;t++){let a=this.nextRow+i+t,o=this.width*a,n=0,s=e[n];for(let a=0;a<this.width;a++){a/s.right>1&&(s=e[++n]);let l,h=Math.abs(a-s.left),c=Math.abs(a-s.right),u=Math.min(h,c),d=t/i*(r+1);if(s.isDash){let e=r-Math.abs(d);l=Math.sqrt(u*u+e*e)}else l=r-Math.sqrt(u*u+d*d);this.data[o+a]=Math.max(0,Math.min(255,l+128))}}}
1172addRegularDash(e){for(let t=e.length-1;t>=0;--t){let i=e[t],r=e[t+1];i.zeroLength?e.splice(t,1):r?.isDash===i.isDash&&(r.left=i.left,e.splice(t,1))}let t=e[0],i=e[e.length-1];t.isDash===i.isDash&&(t.left=i.left-this.width,i.right=t.right+this.width);let r=this.width*this.nextRow,a=0,o=e[a];for(let t=0;t<this.width;t++){t/o.right>1&&(o=e[++a]);let i=Math.abs(t-o.left),n=Math.abs(t-o.right),s=Math.min(i,n),l=o.isDash?s:-s;this.data[r+t]=Math.max(0,Math.min(255,l+128))}}addDash(e,t){let i=t?7:0,r=2*i+1;if(this.nextRow+r>this.height)return(0,c.Pr)("LineAtlas out of space"),null;let a=0;for(let t of e)a+=t;if(0!==a){let r=this.width/a,o=this.getDashRanges(e,this.width,r);t?this.addRoundDash(o,r,i):this.addRegularDash(o)}let o={y:this.nextRow+i,height:2*i,width:a};return this.nextRow+=r,this.dirty=!0,o}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}};function Ie(e){if(!e)return!1;let t=globalThis.location;if(!t)return!1;try{return new URL(e,t.href).origin!==t.origin}catch{return!1}}function Re(){let e=globalThis.__ExpoImportMetaRegistry.url;if(!/^https?:/.test(e))return"";let t=e.endsWith("-dev.mjs")?"maplibre-gl-worker-dev.mjs":"maplibre-gl-worker.mjs";return new URL(`./${t}`,e).href}function Se(e,t){if(t)try{return new Worker(e,{type:"module"})}catch(e){console.warn("Module worker not supported, falling back to classic worker",e)}return new Worker(e)}async function Ee(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch worker script (${t.status}): ${e}`);let i=await t.text(),r=new Blob([i],{type:"text/javascript"});return URL.createObjectURL(r)}function ze(e){let t=new Blob([`import ${JSON.stringify(new URL(e,globalThis.__ExpoImportMetaRegistry.url).href)}`],{type:"text/javascript"});return URL.createObjectURL(t)}async function Ae(){let e=c.jn.WORKER_URL||Re(),t=!e?.endsWith(".cjs");if(!Ie(e))return Se(e,t);if(t){let i=ze(e);try{return Se(i,t)}finally{URL.revokeObjectURL(i)}}let i=await Ee(e);try{return Se(i,t)}finally{URL.revokeObjectURL(i)}}const De="maplibre_preloaded_worker_pool";var Le=class e{constructor(){this.active={},this.workersPromise=null}async acquire(t){if(this.active[t]=!0,!this.workersPromise){let t=[];for(;t.length<e.workerCount;)t.push(Ae());this.workersPromise=Promise.all(t)}return(await this.workersPromise).slice()}release(e){if(delete this.active[e],0===this.numActive()&&this.workersPromise){let e=this.workersPromise;this.workersPromise=null,e.then(e=>{for(let t of e)t.terminate()})}}isPreloaded(){return!!this.active[De]}numActive(){return Object.keys(this.active).length}};const Fe=Math.floor(y.hardwareConcurrency/2);let ke;function Oe(){return ke||=new Le,ke}function je(){Oe().acquire(De)}function Be(){let e=ke;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(De),ke=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))}Le.workerCount=(0,c.dr)(globalThis)?Math.max(Math.min(Fe,3),1):1;var Ze=class{constructor(e,t){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=t,this.removed=!1,this.actorsPromise=this.initActors(t)}async initActors(e){let t=await this.workerPool.acquire(e);if(this.removed)return[];if(this.actors=t.map((t,i)=>{let r=new c.g(t,e);return r.name=`Worker ${i}`,r}),!this.actors.length)throw Error("No actors found");return this.actors}async broadcast(e,t){let i=await this.actorsPromise;return Promise.all(i.map(i=>i.sendAsync({type:e,data:t})))}async getActor(){let e=await this.actorsPromise;return this.currentActor=(this.currentActor+1)%e.length,e[this.currentActor]}async waitForInitComplete(){0===this.actors.length&&await this.actorsPromise}getReadyActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.removed=!0;for(let e of this.actors)e.remove();
1172this.actors=[],e&&this.workerPool.release(this.id)}async registerMessageHandler(e,t){let i=await this.actorsPromise;for(let r of i)r.registerMessageHandler(e,t)}async unregisterMessageHandler(e){let t=await this.actorsPromise;for(let i of t)i.unregisterMessageHandler(e)}};let Ue;function Ne(){return Ue||(Ue=new Ze(Oe(),c.xn),Ue.registerMessageHandler("GR",(e,t,i)=>(0,c.En)(t,i))),Ue}function Ge(e,t){let i=(0,c.yi)();return(0,c.Mi)(i,i,[1,1,0]),(0,c.ji)(i,i,[.5*e.width,.5*e.height,1]),e.calculatePosMatrix?(0,c.Ti)(i,i,e.calculatePosMatrix(t.toUnwrapped())):i}function Ve(e,t,i){if(e)for(let r of e){let e=t[r];if(e?.source===i&&"fill-extrusion"===e.type)return!0}else for(let e in t){let r=t[e];if(r.source===i&&"fill-extrusion"===r.type)return!0}return!1}function We(e,t,i,r,a,o,n){let s=Ve(a?.layers??null,t,e.id),l=o.maxPitchScaleFactor(),h=e.tilesIn(r,l,s);h.sort(He);let c=[];for(let r of h)c.push({wrappedTileID:r.tileID.wrapped().key,queryResults:r.tile.queryRenderedFeatures(t,i,e.getState(),r.queryGeometry,r.cameraQueryGeometry,r.scale,a,o,l,Ge(o,r.tileID),n?(e,t)=>n(r.tileID,e,t):void 0)});return Ke(Xe(c),e)}function qe(e,t,i,r,a,o,n){let s={},l=o.queryRenderedSymbols(r),h=[];for(let e of Object.keys(l).map(Number))h.push(n[e]);h.sort(He);for(let i of h){let r=i.featureIndex.lookupSymbolFeatures(l[i.bucketInstanceId],t,i.bucketIndex,i.sourceLayerIndex,{filterSpec:a.filter,globalState:a.globalState},a.layers,a.availableImages,e);for(let e in r){s[e]||=[];let t=r[e];t.sort((e,t)=>{let r=i.featureSortOrder;if(r){let i=r.indexOf(e.featureIndex);return r.indexOf(t.featureIndex)-i}return t.featureIndex-e.featureIndex});for(let i of t)s[e].push(i)}}return Ye(s,e,i)}function $e(e,t){let i=e.getRenderableIds().map(t=>e.getTileByID(t)),r=[],a={};for(let e of i){let i=e.tileID.canonical.key;a[i]||(a[i]=!0,e.querySourceFeatures(r,t))}return r}function He(e,t){let i=e.tileID,r=t.tileID;return i.overscaledZ-r.overscaledZ||i.canonical.y-r.canonical.y||i.wrap-r.wrap||i.canonical.x-r.canonical.x}function Xe(e){let t={},i={};for(let{queryResults:r,wrappedTileID:a}of e){i[a]||={};let e=i[a];for(let i in r){let a=r[i];e[i]||={};let o=e[i];t[i]||=[];for(let e of a)o[e.featureIndex]||(o[e.featureIndex]=!0,t[i].push(e))}}return t}function Ke(e,t){for(let i in e)for(let r of e[i])Je(r,t);return e}function Ye(e,t,i){for(let r in e)for(let a of e[r]){Je(a,i[t[r].source])}return e}function Je(e,t){let i=e.feature,r=t.getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=r}async function Qe(e,t,i,r){let a=e;if(e.url?a=(await(0,c.Cn)(await t.transformRequest(e.url,"Source"),i)).data:await y.frameAsync(i,r),!a)return null;let o=(0,c.br)((0,c.tr)(a,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(o.vectorLayerIds=a.vector_layers.map(e=>e.id)),o}var et=class e{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof c.st?new c.st(e.lng,e.lat):c.st.convert(e),this}setSouthWest(e){return this._sw=e instanceof c.st?new c.st(e.lng,e.lat):c.st.convert(e),this}extend(t){let i,r,a=this._sw,o=this._ne;if(t instanceof c.st)i=t,r=t;else{if(!(t instanceof e)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){let i=t;return this.extend(e.convert(i))}{let e=t;return this.extend(c.st.convert(e))}}return t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(c.st.convert(t)):this}if(i=t._sw,r=t._ne,!i||!r)return this}return a||o?(a.lng=Math.min(i.lng,a.lng),a.lat=Math.min(i.lat,a.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this._sw=new c.st(i.lng,i.lat),this._ne=new c.st(r.lng,r.lat)),this}getCenter(){return new c.st((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new c.st(this.getWest(),this.getNorth())}
1172getSouthEast(){return new c.st(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:t,lat:i}=c.st.convert(e),r=this._sw.lat<=i&&i<=this._ne.lat,a=this._sw.lng<=t&&t<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=t&&t>=this._ne.lng),r&&a}intersects(t){if(!((t=e.convert(t)).getNorth()>=this.getSouth()&&t.getSouth()<=this.getNorth()))return!1;let i=Math.abs(this.getEast()-this.getWest()),r=Math.abs(t.getEast()-t.getWest());if(i>=360||r>=360)return!0;let a=(0,c.Fr)(this.getWest(),-180,180),o=(0,c.Fr)(this.getEast(),-180,180),n=(0,c.Fr)(t.getWest(),-180,180),s=(0,c.Fr)(t.getEast(),-180,180),l=a>o,h=n>s;return!(!l||!h)||(l?s>=a||n<=o:h?o>=n||a<=s:n<=o&&s>=a)}static convert(t){return t instanceof e||!t?t:new e(t)}static fromLngLat(t,i=0){let r=360*i/40075017,a=r/Math.cos(Math.PI/180*t.lat);return new e(new c.st(t.lng-a,t.lat-r),new c.st(t.lng+a,t.lat+r))}adjustAntiMeridian(){let t=new c.st(this._sw.lng,this._sw.lat),i=new c.st(this._ne.lng,this._ne.lat);return t.lng>i.lng?new e(t,new c.st(i.lng+360,i.lat)):new e(t,i)}},tt=class{constructor(e,t,i){this.bounds=et.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=i||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let t=2**e.z,i=Math.floor((0,c.it)(this.bounds.getWest())*t),r=Math.floor((0,c.at)(this.bounds.getNorth())*t),a=Math.ceil((0,c.it)(this.bounds.getEast())*t),o=Math.ceil((0,c.at)(this.bounds.getSouth())*t);return e.x>=i&&e.x<a&&e.y>=r&&e.y<o}},it=class extends c.yn{constructor(e,t,i,r){if(super(),this.id=e,this.dispatcher=i,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,(0,c.tr)(this,(0,c.br)(t,["url","scheme","tileSize","promoteId","encoding"])),this._options=(0,c.tr)({type:"vector"},t),this._collectResourceTiming=t.collectResourceTiming,512!==this.tileSize)throw Error("vector tile sources must have a tileSize of 512");this.setEventedParent(r)}async load(e=!1){this._loaded=!1,this.fire(new A("dataloading")),this._tileJSONRequest=new AbortController;try{let t=await Qe(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,t&&((0,c.tr)(this,t),t.bounds&&(this.tileBounds=new tt(t.bounds,this.minzoom,this.maxzoom)),this.fire(new A("data",{sourceDataType:"metadata"})),this.fire(new A("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,(0,c.Nn)(e)||this.fire(new c._n((0,c.$n)(e)))}}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&=(this._tileJSONRequest.abort(),null)}serialize(){return(0,c.tr)({},this._options)}async loadTile(e){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i={request:await this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.t
1172ype,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:await this._getOverzoomParameters(e),etag:e.etag};i.request.collectResourceTiming=this._collectResourceTiming,await this.dispatcher.waitForInitComplete();let r="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,i)=>{e.reloadPromise={resolve:t,reject:i}})}else e.actor=this.dispatcher.getReadyActor(),r="LT";e.abortController=new AbortController;try{let t=await e.actor.sendAsync({type:r,data:i},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t);let a={};return t?.etagUnmodified&&(a.unmodified=!0),a}catch(t){if(delete e.abortController,e.aborted||(0,c.Nn)(t))return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}}async _getOverzoomParameters(e){if(e.tileID.canonical.z<=this.maxzoom||void 0===this.map._zoomLevelsToOverscale)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,i=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:await this.map._requestManager.transformRequest(i,"Tile")}}_afterTileLoadWorkerResponse(e,t){if(t?.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t?.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}async abortTile(e){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&await e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.t
1172ype,source:this.id}})}async unloadTile(e){e.unloadVectorData(),e.actor&&await e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})}hasTransition(){return!1}},rt=class extends c.yn{constructor(e,t,i,r){super(),this.id=e,this.dispatcher=i,this.setEventedParent(r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._premultiplyAlpha=!0,this._options=(0,c.tr)({type:"raster"},t),(0,c.tr)(this,(0,c.br)(t,["url","scheme","tileSize"]))}async load(e=!1){this._loaded=!1,this.fire(new A("dataloading")),this._tileJSONRequest=new AbortController;try{let t=await Qe(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,t&&((0,c.tr)(this,t),t.bounds&&(this.tileBounds=new tt(t.bounds,this.minzoom,this.maxzoom)),this.fire(new A("data",{sourceDataType:"metadata"})),this.fire(new A("data",{sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,(0,c.Nn)(e)||this.fire(new c._n((0,c.$n)(e)))}}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&=(this._tileJSONRequest.abort(),null)}setSourceProperty(e){this._tileJSONRequest&&=(this._tileJSONRequest.abort(),null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this.tiles=e,this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return(0,c.tr)({},this._options)}setPremultiplyAlpha(e){return this._premultiplyAlpha===e||this.setSourceProperty(()=>{this._premultiplyAlpha=e}),this}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}async loadTile(e){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i=this._premultiplyAlpha,r=i?void 0:{premultiplyAlpha:"none"};e.abortController=new AbortController;try{let a=await C.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,r);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(a){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});let t=this.map.painter.context,r=t.gl,o=a.data??new c.Tt({width:1,height:1},new Uint8Array(4));e.texture=this.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0,premultiply:i}):(e.texture=new c.yt(t,o,r.RGBA,{useMipmap:!0,premultiply:i}),e.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE,r.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}async abortTile(e){e.abortController&&(e.abortController.abort(),delete e.abortController)}async unloadTile(e){e.texture&&this.map.painter.saveTileTexture(e.texture)}hasTransition(){return!1}},at=class extends rt{constructor(e,t,i,r){super(e,t,i,r),this.type="raster-dem",this.maxzoom=22,this._options=(0,c.tr)({type:"raster-dem"},t),this.encoding=t.encoding||"mapbox",this.redFactor=t.redFactor,this.greenFactor=t.greenFactor,this.blueFactor=t.blueFactor,this.baseShift=t.baseShift}async loadTile(e){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let i=await C.transformAndGetImage(this.map._requestManager,t,"Tile",e.abortController,this.map._refreshExpiredTiles,{colorSpaceConversion:"none"});if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(i){if(this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires}),!i.data)return void(e.state="loaded");let t=i.data,r=(0,c.lr)(t)&&(0,c.Li)()?t:await this.readImageNow(t),a={type:this.type,uid:e.uid,source:this.id,rawImageData:r,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&"expired"!==e.state&&"reloading"!==e.state)return;await this.dispatcher.waitForInitComplete(),(!e.actor||"expired"===e.state)&&(e.actor=this.dispatcher.getReadyActor()),e.dem=await e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}}async readImageNow(e){if(typeof VideoFrame<"u"&&(0,c.Ii)()){let t=e.width+4,i=e.height+4;try{return new c.Tt({width:t,height:i},await(0,c.wr)(e,-2,-2,t,i))}catch{}}return y.getImageData(e,2)}_getNeighboringTiles(e){let t=e.canonical,i=2**t.z,r=(t.x-1+i)%i,a=0===t.x?e.wrap-1:e.wrap,o=(t.x+1+i)%i,n=t.x+1===i?e.wrap+1:e.wrap,s={};return s[new c.d(e.overscaledZ,a,t.z,r,t.y).key]={backfilled:!1},s[new c.d(e.overscaledZ,n,t.z,o,t.y).key]={backfilled:!1},t.y>0&&(s[new c.d(e.overscaledZ,a,t.z,r,t.y-1).key]={backfilled:!1},s[new c.d(e.overscaledZ,e.wrap,t.z,t.x,t.y-1).key]={backfilled:!1},s[new c.d(e.overscaledZ,n,t.z,o,t.y-1).key]={backfilled:!1}),t.y+1<i&&(s[new c.d(e.overscaledZ,a,t.z,r,t.y+1).key]={backfilled:!1},s[new c.d(e.overscaledZ,e.wrap,t.z,t.x,t.y+1).key]={backfilled:!1},s[new c.d(e.overscaledZ,n,t.z,o,t.y+1).key]={backfilled:!1}),s}async unloadTile(e){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&await e.actor.sendAsync({type:"RDT",data:{type:this.t
1172ype,uid:e.uid,source:this.id}})}};function ot(e,t){return t?e.properties[t]:e.id}function nt(e,t){let i=new Map;if(null==e||null==e.type)return i;if("Feature"===e.type){let r=ot(e,t);return null==r?void 0:(i.set(r,e),i)}if("FeatureCollection"===e.type){let r=new Set;for(let a of e.features){let e=ot(a,t);if(null==e||r.has(e))return;r.add(e),i.set(e,a)}return i}}function st(e,t,i){let r=[];if(t.removeAll)e.clear();else if(t.remove)for(let i of t.remove){let t=e.get(i);t&&(r.push(t.geometry),e.delete(i))}if(t.add)for(let a of t.add){let t=ot(a,i);if(null==t)continue;let o=e.get(t);o&&r.push(o.geometry),r.push(a.geometry),e.set(t,a)}if(t.update)for(let i of t.update){let t=e.get(i.id);if(!t)continue;let a=!!i.newGeometry,o=i.removeAllProperties||i.removeProperties?.length>0||i.addOrUpdateProperties?.length>0;if(!a&&!o)continue;r.push(t.geometry);let n=Object.assign({},t);if(e.set(i.id,n),a&&(r.push(i.newGeometry),n.geometry=i.newGeometry),o){if(n.properties=i.removeAllProperties?{}:Object.assign({},n.properties||{}),i.removeProperties)for(let e of i.removeProperties)delete n.properties[e];if(i.addOrUpdateProperties)for(let{key:e,value:t}of i.addOrUpdateProperties)n.properties[e]=t}}return r}function lt(e,t,i){if(!e)return t||{};if(!t)return e||{};i&&(ut(e.add,i),ut(t.add,i));let r=_t(e),a=_t(t);ht(r,a);let o={};if((r.removeAll||a.removeAll)&&(o.removeAll=!0),o.remove=new Set([...r.remove,...a.remove]),o.add=new Map([...r.add,...a.add]),o.update=new Map([...r.update,...a.update]),o.remove.size&&o.add.size)for(let e of o.add.keys())o.remove.delete(e);let n=pt(o);return i&&dt(n.add,i),n}function ht(e,t){t.removeAll&&(e.add.clear(),e.update.clear(),e.remove.clear(),t.remove.clear());for(let i of t.remove)e.add.delete(i),e.update.delete(i);for(let[i,r]of t.update){let a=e.update.get(i);a&&(t.update.set(i,ct(a,r)),e.update.delete(i))}}function ct(e,t){let i={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties)for(let i of t.removeProperties){let t=e.addOrUpdateProperties.findIndex(e=>e.key===i);t>-1&&e.addOrUpdateProperties.splice(t,1)}return(e.removeAllProperties||t.removeAllProperties)&&(i.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(i.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(i.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(i.newGeometry=t.newGeometry||e.newGeometry),i}function ut(e,t){if(e)for(let i of e){let e=ot(i,t);null!=e&&(i.id=e)}}function dt(e,t){if(e)for(let i of e)null!=ot(i,t)&&delete i.id}function _t(e){if(!e)return{};let t={};return t.removeAll=e.removeAll,t.remove=new Set(e.remove||[]),t.add=new Map(e.add?.map(e=>[e.id,e])),t.update=new Map(e.update?.map(e=>[e.id,e])),t}function pt(e){let t={};return e.removeAll&&(t.removeAll=e.removeAll),e.remove&&(t.remove=Array.from(e.remove)),e.add&&(t.add=Array.from(e.add.values())),e.update&&(t.update=Array.from(e.update.values())
1172),t}function mt(e){return e&&0!==e.length?"number"==typeof e[0]?[e]:e.flatMap(e=>mt(e)):[]}function ft(e){return"GeometryCollection"===e.type?e.geometries.flatMap(e=>ft(e)):mt(e.coordinates)}function gt(e){let t,i=new et;switch(e.type){case"FeatureCollection":t=e.features.flatMap(e=>ft(e.geometry));break;case"Feature":t=ft(e.geometry);break;default:t=ft(e)}if(0===t.length)return i;for(let e of t){let[t,r]=e;i.extend([t,r])}return i}function vt({x:e,y:t,z:i},r=0){let a=(0,c.rt)((e-r)/2**i),o=(0,c.nt)((t+1+r)/2**i),n=(0,c.rt)((e+1+r)/2**i),s=(0,c.nt)((t-r)/2**i);return new et([a,o],[n,s])}var yt=class extends c.yn{constructor(e,t,i,r){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:t.data},this.actorPromise=i.getActor(),this.setEventedParent(r),this._data="string"==typeof t.data?{url:t.data}:{geojson:t.data},this._options=(0,c.tr)({},t),this._collectResourceTiming=t.collectResourceTiming,void 0!==t.maxzoom&&(this.maxzoom=t.maxzoom),t.type&&(this.type=t.type),t.attribution&&(this.attribution=t.attribution),this.promoteId=t.promoteId,void 0!==t.clusterMaxZoom&&this.maxzoom<=t.clusterMaxZoom&&(0,c.Pr)(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${t.clusterMa
1172xZoom}".`),this.workerOptions=(0,c.tr)({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0===t.buffer?128:t.buffer),tolerance:this._pixelsToTileUnits(void 0===t.tolerance?.375:t.tolerance),extent:c.Rr,maxZoom:this.maxzoom,lineMetrics:t.lineMetrics||!1,generateId:t.generateId||!1,promoteId:"string"==typeof t.promoteId?t.promoteId:void 0,cluster:t.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(t.clusterMaxZoom),minPoints:Math.max(2,t.clusterMinPoints||2),extent:c.Rr,radius:this._pixelsToTileUnits(t.clusterRadius||50),log:!1,generateId:t.generateId||!1}},clusterProperties:t.clusterProperties,filter:t.filter},t.workerOptions)}_hasPendingWorkerUpdate(){return void 0!==this._pendingWorkerUpdate.data||void 0!==this._pendingWorkerUpdate.diff||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(e){return e*(c.Rr/this.tileSize)}_tileUnitsToPixels(e){return e/(c.Rr/this.tileSize)}_getClusterMaxZoom(e){let t=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||void 0===e||(0,c.Pr)(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${t}"`),t}async load(){await this._updateWorkerData()}onAdd(e){this.map=e,this.load()}setData(e){return this._data="string"==typeof e?{url:e}:{geojson:e},this._pendingWorkerUpdate={data:e},this._updateWorkerData()}
1172updateData(e){return this._pendingWorkerUpdate.diff=lt(this._pendingWorkerUpdate.diff,e),this._updateWorkerData()}async getData(){return this._data.url&&await this.once("data"),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}}async getBounds(){return gt(await this.getData())}setClusterOptions(e){return this.workerOptions.geojsonVtOptions.cluster=e.cluster,void 0!==e.clusterRadius&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),void 0!==e.clusterMaxZoom&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData()}getClusterOptions(){let{cluster:e,clusterOptions:t}=this.workerOptions.geojsonVtOptions;return{cluster:e,clusterMaxZoom:t.maxZoom,clusterRadius:this._tileUnitsToPixels(t.radius)}}async getClusterExpansionZoom(e){return(await this.actorPromise).sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}async getClusterChildren(e){return(await this.actorPromise).sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}async getClusterLeaves(e,t,i){return(await this.actorPromise).sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:i}})}async _updateWorkerData(){if(this._isUpdatingWorker)return this._updatePromise;if(!this._hasPendingWorkerUpdate())return void(0,c.Pr)(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:e,diff:t,updateCluster:i}=this._pendingWorkerUpdate,r=this._getLoadGeoJSONParameters(e,t,i);void 0===e?t?this._pendingWorkerUpdate.diff=void 0:i&&(this._pendingWorkerUpdate.updateCluster=void 0):this._pendingWorkerUpdate.data=void 0,this._updatePromise=this._dispatchWorkerUpdate(r),await this._updatePromise}async _getLoadGeoJSONParameters(e,t,i){let r=(0,c.tr)({type:this.type,source:this.id},this.workerOptions);return"string"==typeof e?(r.request=await this.map._requestManager.transformRequest(y.resolveURL(e),"Source"),r.request.collectResourceTiming=this._collectResourceTiming,r):void 0!==e?(r.data=e,r):t?(r.dataDiff=t,r):i?(r.updateCluster=!0,r):void 0}async _dispatchWorkerUpdate(e){this._isUpdatingWorker=!0,this.fire(new A("dataloading"));try{let t=await e,i=await(await this.actorPromise).sendAsync({type:"LD",data:t});if(this._isUpdatingWorker=!1,this._removed||i.abandoned)return void this.fire(new A("dataabort"));i.data&&(this._data={geojson:i.data});let r=this._applyDiffToSource(t.dataDiff),a=this._getShouldReloadTileOptions(r),o={};this._applyResourceTiming(o,i),this.fire(new A("data",Object.assign({},o,{sourceDataType:"metadata"}))),this.fire(new A("data",Object.assign({},o,{sourceDataType:"content",shouldReloadTileOptions:a})))}catch(e){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new A("dataabort"));this.fire(new c._n((0,c.$n)(e)))}finally{this._hasPendingWorkerUpdate()&&await this._updateWorkerData()}}_applyResourceTiming(e,t){if(!this._collectResourceTiming)return;let i=t.resourceTiming?.[this.id];if(!i)return;let r=i.slice(0);r?.length&&(0,c.tr)(e,{resourceTiming:r})}_applyDiffToSource(e){if(!e)return;let t="string"==typeof this.promoteId?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let e=nt(this._data.geojson,t);if(!e)throw Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:e}}if(!this._data.updateable)return;let i=st(this._data.updateable,e,t);return e.removeAll||this._options.cluster?void 0:i}_getShouldReloadTileOptions(e){if(e)return{affectedBounds:e.filter(Boolean).map(e=>gt(e))}}shouldReloadTile(e,{affectedBounds:t}){if("loading"===e.state)return!0;if("unloaded"===e.state)return!1;let{buffer:i,extent:r}=this.workerOptions.geojsonVtOptions,a=vt(e.tileID.canonical,i/r);for(let e of t)if(a.intersects(e))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}async loadTile(e){let t=e.actor?"RT":"LT";e.actor=await this.actorPromise;let i={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;try{let r=await(await this.actorPromise).sendAsync({type:t,data:i},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(r,this.map.painter,"RT"===t)}catch(t){if(delete e.abortController,e.aborted||(0,c.Nn)(t))return;throw t}}async abortTile(e){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0}async unloadTile(e){e.unloadVectorData(),await(await this.actorPromise).sendAsync({type:"RMT",data:{uid:e.uid,type:this.t
1172ype,source:this.id}})}onRemove(){this._removed=!0,this.actorPromise.then(e=>e.sendAsync({type:"RS",data:{type:this.type,source:this.id}}))}serialize(){return(0,c.tr)({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}};const bt=[0,0,1],xt=(e,t,i,r,a,o)=>({u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_image_warp:o,u_fade_t:i.mix,u_opacity:i.opacity*r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:r.paint.get("raster-brightness-min"),u_brightness_high:r.paint.get("raster-brightness-max"),u_saturation_factor:Pt(r.paint.get("raster-saturation")),u_contrast_factor:Tt(r.paint.get("raster-contrast")),u_spin_weights:wt(r.paint.get("raster-hue-rotate")),u_coords_top:[a[0].x,a[0].y,a[1].x,a[1].y],u_coords_bottom:[a[3].x,a[3].y,a[2].x,a[2].y]});function wt(e){e*=Math.PI/180;let t=Math.sin(e),i=Math.cos(e);return[(2*i+1)/3,(-Math.sqrt(3)*t-i+1)/3,(Math.sqrt(3)*t-i+1)/3]}function Tt(e){return e>0?1/(1-e):1+e}function Pt(e){return e>0?1-1/(1.001-e):-e}var Mt=class{constructor(e,t,i){this.vertexBuffer=e,this.indexBuffer=t,this.segments=i}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}};const Ct=(0,c.qt)([{name:"a_pos",type:"Int16",components:2}]),It=c.Rr/128;function Rt(e,t){let i=St(t,"16bit"),r=c.Ut.deserialize({arrayBuffer:i.vertices,length:i.vertices.byteLength/2/2}),a=c.Kt.deserialize({arrayBuffer:i.indices,length:i.indices.byteLength/2/3});return new Mt(e.createVertexBuffer(r,Ct.members),e.createIndexBuffer(a),c.Rt.simpleSegment(0,0,r.length,a.length))}function St(e,t){let i=void 0===e.granularity?1:Math.max(e.granularity,1),r=i+(e.generateBorders?2:0),a=i+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=r+1,n=a+1,s=e.generateBorders?-1:0,l=e.generateBorders||e.extendToNorthPole?-1:0,h=i+ +!!e.generateBorders,u=i+(e.generateBorders||e.extendToSouthPole?1:0),d=o*n,_=r*a*6,p=o*n>65536;if(p&&"16bit"===t)throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let m=p||"32bit"===t,f=new Int16Array(2*d),g=0;for(let t=l;t<=u;t++)for(let r=s;r<=h;r++){let a=r/i*c.Rr;-1===r&&(a=-It),r===i+1&&(a=c.Rr+It);let o=t/i*c.Rr;-1===t&&(o=e.extendToNorthPole?c.pt:-It),t===i+1&&(o=e.extendToSouthPole?c.mt:c.Rr+It),f[g++]=a,f[g++]=o}let v=m?new Uint32Array(_):new Uint16Array(_),y=0;for(let e=0;e<a;e++)for(let t=0;t<r;t++){let i=t+e*o,r=t+1+e*o,a=t+(e+1)*o,n=t+1+(e+1)*o;v[y++]=i,v[y++]=a,v[y++]=r,v[y++]=r,v[y++]=a,v[y++]=n}return{vertices:f.buffer.slice(0),indices:v.buffer.slice(0),uses32bitIndices:m}}var Et=class extends c.yn{constructor(e,t,i,r){super(),this.imageWarp=bt,this.flippedWindingOrder=!1,this._warp="auto",this._imageDirty=!1,this._subdividedQuad=!1,this._subdividedMesh=null,this.id=e,this.dispatcher=i,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(r),this.options=t}async load(e){if(void 0===this.options.url)return this._loaded=!0,void this._finishLoading();this._loaded=!1,this.fire(new A("dataloading")),this.url=this.options.url,this._abortController=new AbortController;try{let t=await C.transformAndGetImage(this.map._requestManager,this.url,"Image",this._abortController);this._abortController=null,this._loaded=!0,t?.data?(this._setImage(t.data),e&&(this.coordinates=e),this._finishLoading()):this.fire(new c._n(Error(`Could not load image ${this.url}: the response is empty`)))}catch(e){if((0,c.Nn)(e))return;this._abortController=null,this._loaded=!0,this.fire(new c._n((0,c.$n)(e)))}}loaded(){return this._loaded}updateImage(e){return this._abortController&&=(this._abortController.abort(),null),"image"in e?(this._loaded=!0,this._setImage(e.image),e.coordinates&&(this.coordinates=e.coordinates),this._finishLoading(),this):e.url?(this.options.url=e.url,this.load(e.coordinates),this):this}_setImage(e){this.image=e,this._imageDirty=!0}getMesh(e,t){return!this._subdividedQuad||t?null:(this._subdividedMesh??=Rt(e,{granularity:16}),this._subdividedMesh)}_disposeTexture(){this.texture?.destroy(),this.texture=null}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new A("data",{sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._abortController&&=(this._abortController.abort(),null),this._disposeTexture(),this._subdividedMesh?.destroy(),this._subdividedMesh=null,this.image=null,this.tiles={}}setWarp(e){return this._warp===e||(this._warp=e,this.tileCoords&&this.setCoordinates(this.coordinates)),this}getWarp(){return this._warp}setCoordinates(e){this.coordinates=e;let t=e.map(c.et.fromLngLat);return this.tileID=zt(t),this.terrainTileRanges=this._getOverlappingTileRanges(t),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=t.map(e=>this.tileID.getTilePoint(e)._round()),this.imageWarp=Dt(this.tileCoords,this._warp),this._subdividedQuad=this.imageWarp[2]>0&&!Ft(this.tileCoords),this.flippedWindingOrder=At(this.tileCoords),this.fire(new A("data",{sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,t=e.gl;this.texture?this._imageDirty&&(this.texture.update(this.image),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)):(this.texture=new c.yt(e,this.image,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE)),this._imageDirty=!1;let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new A("data",{sourceDataType:"idle",sourceId:this.id}))}async loadTile(e){this.tileID?.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"}serialize(){let e={type:"image",coordinates:this.coordinates};return void 0!==this.options.url&&(e.url=this.options.url),e}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:t,minY:i,maxX:r,maxY:a}=c.dt.fromPoints(e),o={};for(let e=0;e<=25;e++){let n=2**e,s=Math.floor(t*n),l=Math.floor(i*n),h=Math.floor(r*n),c=Math.floor(a*n),u=(s%n+n)%n,d=h%n,_=Math.floor(s/n),p=Math.floor(h/n);o[e]={minWrap:_,maxWrap:p,minTileXWrapped:u,maxTileXWrapped:d,minTileY:l,maxTileY:c}}return o}};function zt(e){let t=c.dt.fromPoints(e),i=t.width(),r=t.height(),a=Math.max(0,Math.floor(-Math.log(Math.max(i,r))/Math.LN2)),o=2**a;return new c.u(a,Math.floor((t.minX+t.maxX)/2*o),Math.floor((t.minY+t.maxY)/2*o))}function At(e){let t=e[1].x-e[0].x,i=e[1].y-e[0].y,r=e[2].x-e[0].x;return t*(e[2].y-e[0].y)-i*r<0}function Dt(e,t){if("flat"===t||Ft(e))return bt;let[i,r,a,o]=e,n=i.x-r.x+a.x-o.x,s=i.y-r.y+a.y-o.y,l=[r.x-a.x,r.y-a.y,o.x-a.x,o.y-a.y],[h,c,u,d]=l,_=p(l),m=(n*d-u*s)/_,f=(
1172h*s-n*c)/_,g=[1,1+m,1+m+f,1+f],v=Math.max(...g)/Math.min(...g),y="perspective"===t?0:Lt(v);return!(v>=1&&v<=512)||y>=1?bt:[m,f,y]}function Lt(e){let t=(1-4/e)/.9921875;return Math.max(0,t)}function Ft(e){let[t,i,r,a]=e;return t.x+r.x===i.x+a.x&&t.y+r.y===i.y+a.y}var kt=class extends Et{constructor(e,t,i,r){super(e,t,i,r),this._onPlayingHandler=()=>{this.map?.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}async load(){this._loaded=!1;let e=this.options;this.urls=[];for(let t of e.urls)this.urls.push((await this.map._requestManager.transformRequest(t,"Source")).url);try{let e=await(0,c.Tn)(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new c._n((0,c.$n)(e)))}}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let t=this.video.seekable;e<t.start(0)||e>t.end(0)?this.fire(new c._n(new c.mn(`sources.${this.id}`,null,`Playback for this video can be set only between the ${t.start(0)} and ${t.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,t=e.gl;this.texture?this.video.paused||(this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE),t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,this.video)):(this.texture=new c.yt(e,this.video,t.RGBA),this.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new A("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},Ot=class extends Et{constructor(e,t,i,r){super(e,t,i,r),t.coordinates?(!Array.isArray(t.coordinates)||4!==t.coordinates.length||t.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e)))&&this.fire(new c._n(new c.mn(`sources.${e}`,null,"\"coordinates\" property must be an array of 4 longitude/latitude array pairs"))):this.fire(new c._n(new c.mn(`sources.${e}`,null,"missing required property \"coordinates\""))),t.animate&&"boolean"!=typeof t.animate&&this.fire(new c._n(new c.mn(`sources.${e}`,null,"optional \"animate\" property must be a boolean value"))),t.canvas?"string"!=typeof t.canvas&&!(t.canvas instanceof HTMLCanvasElement)&&this.fire(new c._n(new c.mn(`sources.${e}`,null,"\"canvas\" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance"))):this.fire(new c._n(new c.mn(`sources.${e}`,null,"missing required property \"canvas\""))),this.options=t,this.animate=void 0===t.animate||t.animate}async load(){this._loaded=!0,this.canvas||=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new c._n(Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&=(this.prepare(),!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this._playing=!1,super.onRemove()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||0===Object.keys(this.tiles).length)return;let t=this.map.painter.context,i=t.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new c.yt(t,this.canvas,i.RGBA,{premultiply:!0}),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let r=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,r=!0)}r&&this.fire(new A("data",{sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}};const jt={},Bt=(e,t,i,r)=>{let a=new(Zt(t.type))(e,t,i,r);if(a.id!==e)throw Error(`Expected Source id to be ${e} instead of ${a.id}`);return a},Zt=e=>{switch(e){case"geojson":return yt;case"image":return Et;case"raster":return rt;case"raster-dem":return at;case"vector":return it;case"video":return kt;case"canvas":return Ot}return jt[e]},Ut=(e,t)=>
1172{jt[e]=t},Nt=async(e,t)=>{if(Zt(e))throw Error(`A source type called "${e}" already exists.`);Ut(e,t)};function Gt(e,t){let i={};if(!t)return i;for(let r of e){let e=r.layerIds.map(e=>t.getLayer(e)).filter(Boolean);if(0!==e.length){r.layers=e,r.stateDependentLayerIds&&(r.stateDependentLayers=r.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0]));for(let t of e)i[t.id]=r}}return i}const Vt="RTLPluginLoaded";var Wt=class extends c.yn{constructor(...e){super(...e),this.status="unavailable",this.url=null,this.dispatcher=Ne()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}async setRTLTextPlugin(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=y.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}async _requestImport(){await this._syncState("loading"),this.status="loaded",this.fire(new c.vn(Vt))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}};let qt=null;function $t(){return qt||=new Wt,qt}var Ht=class{constructor(e,t){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=(0,c.Nr)(),this.uses=0,this.tileSize=t,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rttObjects=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading",this.featureStateRevision=-1}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:i,fadeEndTime:r}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=i,this.fadeEndTime=r}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=x(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}getRTT(e){return this.rttObjects[e]}acquireRTT(e,t,i){return this.rttObjects[t]=e.acquireRTT(i)}releaseRTT(e){if(0!==this.rttObjects.length){for(let t of this.rttObjects)t&&e.releaseRTT(t);this.rttObjects.length=0}}loadVectorData(e,t,i){if(!0!==e?.etagUnmodified)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=Gt(e.buckets,t?.style),this.hasSymbolBuckets=!1;for(let e in this.buckets){let t=this.buckets[e];if(t instanceof c.S){if(this.hasSymbolBuckets=!0,!i)break;t.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let t=this.buckets[e];if(t instanceof c.S&&t.hasRTLText){this.hasRTLText=!0,$t().lazyLoad();break}}this.queryPadding=0;for(let e in this.buckets){let i=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,t.style.getLayer(e).queryRadius(i))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}else this.collisionBoxArray=new c.zt;else this.state="loaded"}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let i=this.buckets[t];i.uploadPending()&&i.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new c.yt(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&=(this.glyphAtlasTexture=new c.yt(e,this.glyphAtlasImage,t.ALPHA),null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,i,r,a,o,n,s,l,h,c){return this.latestFeatureIndex?.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:a,scale:o,tileSize:this.tileSize,pixelPosMatrix:h,transform:s,params:n,queryPadding:this.queryPadding*l,getElevation:c},e,t,i):{}}querySourceFeatures(e,t){let i=this.latestFeatureIndex;if(!i?.rawTileData)return;let r=i.loadVTLayers(),a=t?.sourceLayer?t.sourceLayer:"",o=r._geojsonTileLayer||r[a];if(!o)return;let n=(0,c.ln)(t?.filter,`querySourceFeatures[${a}].filter`,t?.globalState),{z:s,x:l,y:h}=this.tileID.canonical,u={z:s,x:l,y:h};for(let t=0;t<o.length;t++){let r=o.feature(t);if(n.needGeometry){let e=(0,c.Ot)(r,!0);
1172if(!n.filter(new c.$t(this.tileID.overscaledZ),e,this.tileID.canonical))continue}else if(!n.filter(new c.$t(this.tileID.overscaledZ),r))continue;let d=i.getId(r,a),_=new c.a(r,s,l,h,d);_.tile=u,e.push(_)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){let t=this.expirationTime;if(e.cacheControl){let t=(0,c.yr)(e.cacheControl);t["max-age"]&&(this.expirationTime=Date.now()+1e3*t["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){let e=Date.now(),i=!1;if(this.expirationTime>e)i=!1;else if(t)if(this.expirationTime<t)i=!0;else{let r=this.expirationTime-t;r?this.expirationTime=e+Math.max(r,3e4):i=!0}else i=!0;i?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),2147483647)}setFeatureState(e,t,i){if(!this.latestFeatureIndex?.rawTileData||0===Object.keys(e).length||this.featureStateRevision===i)return;this.featureStateRevision=i;let r=this.latestFeatureIndex.loadVTLayers();for(let i in this.buckets){if(!t.style.hasLayer(i))continue;let a=this.buckets[i],o=a.layers[0].sourceLayer||"_geojsonTileLayer",n=r[o],s=e[o];if(!n||!s||0===s.length)continue;a.update(s,n,this.imageAtlas?.patternPositions||{},this.dashPositions||{});let l=t?.style?.getLayer(i);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(a)))}}holdingForSymbolFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<x()}clearSymbolFadeHold(){this.symbolFadeHoldUntil=void 0}setSymbolHoldDuration(e){this.symbolFadeHoldUntil=x()+e}setDependencies(e,t){let i={};for(let e of t)i[e]=!0;this.dependencies[e]=i}hasDependency(e,t){for(let i of e){let e=this.dependencies[i];if(e)for(let i of t)if(e[i])return!0}return!1}};function Xt(e){let t=[];for(let i in e)t.push({id:i,state:e[i]});return t}var Kt=class{constructor(){this.state={},this.stateChanges={},this.deletedStates={},this.revision=0}updateState(e,t,i){let r=String(t);if(this.stateChanges[e]||={},this.stateChanges[e][r]||={},(0,c.tr)(this.stateChanges[e][r],i),null===this.deletedStates[e]){this.deletedStates[e]={};for(let t in this.state[e])if(t===r){this.deletedStates[e][r]={};for(let a in this.state[e][t])void 0===i[a]&&(this.deletedStates[e][r][a]=null)}else this.deletedStates[e][t]=null}else if(null===this.deletedStates[e]?.[r]){this.deletedStates[e][r]={};for(let t in this.state[e][r])void 0===i[t]&&(this.deletedStates[e][r][t]=null)}else for(let t in i)null===this.deletedStates[e]?.[r]?.[t]&&delete this.deletedStates[e][r][t]}removeFeatureState(e,t,i){if(null===this.deletedStates[e])return;let r=String(t);if(this.deletedStates[e]||={},i&&void 0!==t)null!==this.deletedStates[e][r]&&(this.deletedStates[e][r]||={},this.deletedStates[e][r][i]=null);else if(void 0!==t)if(this.stateChanges[e]?.[r])for(i in this.deletedStates[e][r]={},this.stateChanges[e][r])this.deletedStates[e][r][i]=null;else this.deletedStates[e][r]=null;else this.deletedStates[e]=null}getState(e,t){let i=String(t),r=this.state[e]||{},a=this.stateChanges[e]||{},o=(0,c.tr)({},r[i],a[i]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){let i=this.deletedStates[e][t];if(null===i)return{};for(let e in i)delete o[e]}return o}initializeTileState(e,t){let i={};for(let e in this.state)i[e]=Xt(this.state[e]);e.setFeatureState(i,t,this.revision)}coalesceChanges(e,t){let i={};for(let e in this.stateChanges){this.state[e]||={},i[e]||={};for(let t in this.stateChanges[e])this.state[e][t]||={},(0,c.tr)(this.state[e][t],this.stateChanges[e][t]),i[e][t]=this.state[e][t]}for(let e in this.deletedStates)if(this.state[e]||={},i[e]||={},null===this.deletedStates[e])for(let t in this.state[e])this.state[e][t]={},i[e][t]={};else for(let t in this.deletedStates[e]){if(null===this.deletedStates[e][t])this.state[e][t]={};else for(let i of Object.keys(this.deletedStates[e][t]))delete this.state[e][t][i];i[e][t]=this.state[e][t]}if(this.stateChanges={},this.deletedStates={},0===Object.keys(i).length)return;this.revision++;let r={};for(let e in i)r[e]=Xt(i[e]);e.setFeatureState(r,t,this.revision)}},Yt=class e{constructor(e,t){this.min=e,this.max=t,this.center=(0,c.li)([],(0,c.Zr)([],this.min,this.max),.5)}quadrant(t){let i=[t%2==0,t<2],r=(0,c.Qr)(this.min),a=(0,c.Qr)(this.max);for(let e=0;e<i.length;e++)r[e]=i[e]?this.min[e]:this.center[e],a[e]=i[e]?this.center[e]:this.max[e];return a[2]=this.max[2],new e(r,a)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let t=!0;for(let i of e.planes){let e=this.intersectsPlane(i);if(0===e)return 0;1===e&&(t=!1)}return t?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let t=e[3],i=e[3];for(let r=0;r<3;r++)e[r]>0?(t+=e[r]*this.min[r],i+=e[r]*this.max[r]):(i+=e[r]*this.min[r],t+=e[r]*this.max[r]);return t>=0?2:i<0?0:1}},Jt=class e{constructor(e,t,i){this.points=e,this.planes=t,this.aabb=i}static fromInvProjectionMatrix(t,i=1,r=0,a,o){let n=o?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],s=2**r,l=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(e=>Qt(e,t,i,s));a&&ei(l,n[0],a,o);let h=n.map(e=>{let t=(0,c.di)([],l[e[0]],l[e[1]]),i=(0,c.di)([],l[e[2]],l[e[1]]),r=(0,c.ai)([],(0,c.$r)([],t,i)),a=-(0,c.ti)(r,l[e[1]]);return r.concat(a)}),u=[1/0,1/0,1/0],d=[-1/0,-1/0,-1/0];for(let e of l)for(let t=0;t<3;t++)u[t]=Math.min(u[t],e[t]),d[t]=Math.max(d[t],e[t]);return new e(l,h,new Yt(u,d))}};function Qt(e,t,i,r){let a=(0,c.Xr)([],e,t),o=1/a[3]/i*r;return(0,c.Jr)(a,a,[o,o,1/a[3],o])}function ei(e,t,i,r){let a=r?4:0,o=r?0:4,n=0,s=[],l=[];for(let t=0;t<4;t++){let i=(0,c.di)([],e[t+o],e[t+a]),r=(0,c.ri)(i);(0,c.li)(i,i,1/r),s.push(r),l.push(i)}for(let t=0;t<4;t++){let r=(0,c.Cr)(e[t+a],l[t],i);n=null!==r&&r>=0?Math.max(n,r):Math.max(n,s[t])}let h=ti(e,t),u=ii(i,h);if(null!==u){let e=u/(0,c.ti)(l[0],h);n=Math.min(n,e)}for(let t=0;t<4;t++){let i=Math.min(n,s[t]);e[t+o]=[e[t+a][0]+l[t][0]*i,e[t+a][1]+l[t][1]*i,e[t+a][2]+l[t][2]*i,1]}}function ti(e,t){let i=(0,c.di)([],e[t[0]],e[t[1]]),r=(0,c.di)([],e[t[2]],e[t[1]]),a=[0,0,0,0];return(0,c.ai)(a,(0,c.$r)([],i,r)),a[3]=-(0,c.ti)(a,e[t[0]]),a}function ii(e,t){let i=(0,c.ni)(e),r=(0,c.Yr)([],e,1/i),a=(0,c.di)([],t,(0,c.li)([],r,(0,c.ti)(t,r))),o=(0,c.ni)(a);if(o>0){let e=Math.sqrt(1-r[3]*r[3]),i=(0,c.li)([],r,-r[3]),n=(0,c.Zr)([],i,(0,c.li)([],a,e/o));return(0,c.xr)(t,n)}return null}function ri(e,t,i){let r=t.intersectsFrustum(e);if(!i||0===r)return r;let a=t.intersectsPlane(i);return 0===a?0:2===r&&2===a?2:1}function ai(e,t,i){let r=0,a=(i-t)/10;for(let o=0;o<10;o++){let n=t+(o+.5)/10*(i-t);r+=a*Math.cos(n)**+e}return r}function oi(e,t){return function(i,r,a,o,n){let s=2*((e-1)/(0,c.Or)(Math.cos((0,c.Xn)(c.X-n))/Math.cos((0,c.Xn)(c.X)))-1),l=Math.acos(a/o),h=2*ai(s-1,0,(0,c.Xn)(n/2)),u=Math.min((0,c.Xn)(c.X),l+(0,c.Xn)(n/2)),d=ai(s-1,Math.min(u,l-(0,c.Xn)(n/2)),u),_=Math.atan(r/a),p=Math.hypot(r,a),m=i;return m+=(0,c.Or)(o/p/Math.max(.5,Math.cos((0,c.Xn)(n/2)))),m+=s*(0,c.Or)(Math.cos(_))/2,m-=(0,c.Or)(Math.max(1,d/h/t))/2,m}}const ni=oi(9.314,3);function si(e,t){let i=(t.roundZoom?Math.round:Math.floor)(e.zoom+(0,c.Or)(e.tileSize/t.tileSize));return Math.max(0,i)}function li(e,t){let i=c.X-e.pitch-e.fov/2,r=(0,c.Vn)((15-i)/15,0,1),a=Math.max(500,t??0);return e.elevation+r*a}function hi(e,t,i){let r=e.planes[1],a=e.points.map(e=>{let a=r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3];if(Math.abs(a)>1e-6)return e;let o=[e[0]-i[0],e[1]-i[1],e[2]-i[2]],n=r[0]*o[0]+r[1]*o[1]+r[2]*o[2];if(n>=-1e-9)return e;let s=t/-n;return[e[0]+o[0]*s,e[1]+o[1]*s,e[2]+o[2]*s,e[3]]}
1172),o=e.planes.map((e,i)=>1===i?[e[0],e[1],e[2],e[3]+t]:e),n=[1/0,1/0,1/0],s=[-1/0,-1/0,-1/0];for(let e of a)for(let t=0;t<3;t++)n[t]=Math.min(n[t],e[t]),s[t]=Math.max(s[t],e[t]);return new Jt(a,o,new Yt(n,s))}function ci(e,t){let i=e.getCameraFrustum(),r=e.getClippingPlane();if(r&&t.maxContentElevation>0){let a=Math.hypot(r[0],r[1],r[2]);if(a>0){let o=1+t.maxContentElevation/c.ct,n=(0,c.Vn)(-r[3]/a,-1,1),s=Math.cos(Math.acos(n)+Math.acos(1/o));r=[r[0],r[1],r[2],-s*a],i=hi(i,Math.sqrt(o*o-1),e.cameraPosition)}}let a=(0,c.q)(e),o=c.et.fromLngLat(e.center,e.elevation),n=li(e,t.maxContentElevation),s=e.getCoveringTilesDetailsProvider(),l=s.allowVariableZoom(e,t),h=si(e,t),u=t.minzoom||0,d=void 0===t.maxzoom?e.maxZoom:t.maxzoom,_=Math.min(Math.max(0,h),d),p=2**_,m=[p*a.x,p*a.y,0],f=[p*o.x,p*o.y,0],g=Math.hypot(o.x-a.x,o.y-a.y),v=Math.abs(o.z-a.z),y=Math.hypot(g,v),b=e=>({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),x=[],w=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let e=1;e<=3;e++)x.push(b(-e)),x.push(b(e));for(x.push(b(0));x.length>0;){let p=x.pop(),g=p.x,b=p.y,T=p.fullyVisible,P={x:g,y:b,z:p.zoom},M=s.getTileBoundingVolume(P,p.wrap,n,t);if(!T){let e=ri(i,M,r);if(0===e)continue;T=2===e}let C=s.distanceToTile2d(a.x,a.y,P,M),I=h;l&&(I=(t.calculateTileZoom||ni)(e.zoom+(0,c.Or)(e.tileSize/t.tileSize),C,v,y,e.fov)),I=(t.roundZoom?Math.round:Math.floor)(I),I=Math.max(0,I);let R=Math.min(I,d);if(p.wrap=s.getWrap(o,P,p.wrap),p.zoom>=R){if(p.zoom<u)continue;let e=_-p.zoom,i=m[0]-.5-(g<<e),r=m[1]-.5-(b<<e),a=t.reparseOverscaled?Math.max(p.zoom,I):p.zoom;w.push({tileID:new c.d(p.zoom===d?a:p.zoom,p.wrap,p.zoom,g,b),distanceSq:(0,c.Hr)([f[0]-.5-g,f[1]-.5-b]),tileDistanceToCamera:Math.sqrt(i*i+r*r)});continue}for(let e=0;e<4;e++){let t=(g<<1)+e%2,i=(b<<1)+(e>>1),r=p.zoom+1;x.push({zoom:r,x:t,y:i,wrap:p.wrap,fullyVisible:T})}}return w.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}function ui(e){return"raster"===e||"image"===e||"video"===e}function di(e,t,i,r,a,o,n){let s=x(),l=(0,c.or)(t);for(let h of t){let t=e.getTileById(h.key);(0===t.fadingDirection||0===t.fadeOpacity)&&t.resetFadeLogic(),!_i(e,t,i,s,r,a,n)&&(pi(e,t,i,s,o,n)||fi(t,l,s,n)||t.resetFadeLogic())}}function _i(e,t,i,r,a,o,n){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:h,fadingParentID:c}=t;if(0===l&&1===h&&c)return i[c.key]=c,!0;let u=Math.max(s.overscaledZ-a,o);for(let a=s.overscaledZ-1;a>=u;a--){let o=s.scaledTo(a),l=e.getLoadedTile(o);if(l)return t.setCrossFadeLogic({fadingRole:0,fadingDirection:1,fadingParentID:l.tileID,fadeEndTime:r+n}),l.setCrossFadeLogic({fadingRole:1,fadingDirection:0,fadeEndTime:r+n}),i[o.key]=o,!0}return!1}function pi(e,t,i,r,a,o){if(!t.hasData())return!1;let n=t.tileID.children(a),s=mi(e,t,n,i,r,a,o);if(s)return!0;for(let l of n)mi(e,t,l.children(a),i,r,a,o)&&(s=!0);return s}function mi(e,t,i,r,a,o,n){if(i[0].overscaledZ>=o)return!1;let s=!1;for(let o of i){let i=e.getLoadedTile(o);if(!i)continue;let{fadingRole:l,fadingDirection:h,fadingParentID:c}=i;(0!==l||0!==h||!c)&&(i.setCrossFadeLogic({fadingRole:0,fadingDirection:0,fadingParentID:t.tileID,fadeEndTime:a+n}),t.setCrossFadeLogic({fadingRole:1,fadingDirection:1,fadeEndTime:a+n})),r[o.key]=o,s=!0}return s}function fi(e,t,i,r){let a=e.tileID;if(e.selfFading)return!0;if(e.hasData())return!1;if(t.has(a)){let t=i+r;return e.setSelfFadeLogic(t),!0}return!1}function gi(e,t){if(t<=0)return!1;let i=x();for(let t of e.getAllTiles())if(t.fadeEndTime>=i)return!0;return!1}function vi(e,t){let i=t.getRenderableIds();for(let r of i){if(!e.neighboringTiles?.[r])continue;let i=t.getTileById(r);e.neighboringTiles[r].backfilled||yi(e,i),!i.neighboringTiles?.[e.tileID.key]?.backfilled&&yi(i,e)}}function yi(e,t){e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.needsColorReliefPrepare=!0;let i=t.tileID.canonical.x-e.tileID.canonical.x,r=t.tileID.canonical.y-e.tileID.canonical.y,a=2**e.tileID.canonical.z,o=t.tileID.key;(0!==i||0!==r)&&(Math.abs(r)>1||(Math.abs(i)>1&&(1===Math.abs(i+a)?i+=a:1===Math.abs(i-a)&&(i-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,i,r),e.neighboringTiles?.[o]&&
1172(e.neighboringTiles[o].backfilled=!0))))}var bi=class{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let i in this._tiles){let r=this._tiles[i];r.tileID=r.tileID.unwrapTo(r.tileID.wrap+e),t[r.tileID.key]=r}this._tiles=t}setFeatureState(e,t,i){for(let r in this._tiles)this._tiles[r].setFeatureState(e,t,i)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(e=>e.tileID).sort(c.m).map(e=>e.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return t?.hasData()?t:null}isIdRenderable(e,t=!1){return this.getTileById(e)?.isRenderable(t)}getRenderableIds(e=0,t){let i=[];for(let e of this.getAllIds())this.isIdRenderable(e,t)&&i.push(this.getTileById(e));return t?i.sort((t,i)=>{let r=t.tileID,a=i.tileID,o=new c.Ri(r.canonical.x,r.canonical.y)._rotate(-e),n=new c.Ri(a.canonical.x,a.canonical.y)._rotate(-e);return r.overscaledZ-a.overscaledZ||n.y-o.y||n.x-o.x}).map(e=>e.tileID.key):i.map(e=>e.tileID).sort(c.m).map(e=>e.key)}},xi=((l=class e extends c.yn{constructor(e,t,i){super(),this._maxContentElevationSeen=0,this.id=e,this.dispatcher=i,this.on("data",e=>{this._dataHandler(e)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=Bt(e,t,i,this),this._inViewTiles=new bi,this._outOfViewCache=new c.n(0,e=>this._unloadTile(e)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new Kt,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source?.onAdd&&this._source.onAdd(e)}onRemove(e){for(let e of this._inViewTiles.getAllTiles())e.unloadVectorData();this.clearTiles(),this._source?.onRemove&&this._source.onRemove(e),this._inViewTiles=new bi}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}async _loadTile(e,t,i,r){try{let a=await this._source.loadTile(e);this._tileLoaded(e,t,i,r,a)}catch(t){e.state="errored",404===t.status?this.update(this.transform,this.terrain):this._source.fire(new c._n((0,c.$n)(t),{tile:e}))}}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new A("dataabort",{tile:e,coord:e.tileID}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let t of this._inViewTiles.getAllTiles())t.upload(e),t.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){return this._inViewTiles.getRenderableIds(this.transform?.bearingInRadians,e)}hasRenderableParent(e){let t=e.overscaledZ-1;if(t>=this._source.minzoom){let i=this.getLoadedTile(e.scaledTo(t));if(i)return this._inViewTiles.isIdRenderable(i.tileID.key)}return!1}reload(e,t=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let i of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(i);(!t||this._source.shouldReloadTile(r,t))&&(e?this._reloadTile(i,"errored"===r.state?"loading":"expired"):"errored"!==r.state&&this._reloadTile(i,"reloading"))}}}async _reloadTile(e,t){let i=this._inViewTiles.getTileById(e);if(!i)return;let r=i.hasData();"loading"!==i.state&&(i.state=t),await this._loadTile(i,e,t,r)}_tileLoaded(e,t,i,r,a){r||(e.timeAdded=x(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration)),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(t,e),!a?.unmodified&&("raster-dem"===this.getSource().type&&e.dem&&vi(e,this._inViewTiles),e.featureStateRevision=-1,this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new A("data",{tile:e,coord:e.tileID})))}
1172getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(t,i){let r=this._getLoadedDescendents(i),a=new Set;for(let o of i){let i=r[o.key];if(!i?.length){a.add(o);continue}let n=o.overscaledZ+e.maxOverzooming,s=i.filter(e=>e.tileID.overscaledZ<=n);if(!s.length){a.add(o);continue}let l=Math.min(...s.map(e=>e.tileID.overscaledZ)),h=s.filter(e=>e.tileID.overscaledZ===l).map(e=>e.tileID);for(let e of h)t[e.key]=e;this._areDescendentsComplete(h,l,o.overscaledZ)||a.add(o)}return a}_getLoadedDescendents(e){let t={};for(let i of this._inViewTiles.getAllTiles().filter(e=>e.hasData()))for(let r of e)i.tileID.isChildOf(r)&&(t[r.key]||=[],t[r.key].push(i));return t}_areDescendentsComplete(e,t,i){return 1===e.length&&e[0].isOverscaled()?e[0].overscaledZ===t:4**(t-i)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let t=(Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1),i=null===this._maxTileCacheZoomLevels?c.jn.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels,r=Math.floor(t*i),a="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._outOfViewCache.setMaxSize(a)}handleWrapJump(e){let t=(e-(void 0===this._prevLng?e:this._prevLng))/360,i=Math.round(t);this._prevLng=e,i&&(this._inViewTiles.handleWrapJump(i),this._resetTileReloadTimers())}_updateMaxContentElevation(){let e=this._maxContentElevationSeen,t=this.map?.style?._layers;if(!t)return e;let i=this._inViewTiles.getAllTiles();for(let r in t){let a=t[r];if("symbol"!==a.type||a.source!==this.id||a.isHidden(this.transform.zoom))continue;let o=a;if(o.layout){e=Math.max(e,o.layout.get("symbol-height-offset").constantOr(0));for(let t of i){let i=t.getBucket(a);i&&i.maxHeightOffset>e&&(e=i.maxHeightOffset)}}}return this._maxContentElevationSeen=e,e}update(e,t){if(!this._sourceLoaded||this._paused)return;let i;this.transform=e,this.terrain=t,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new c.d(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(i=ci(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?Math.max(this._source.maxzoom,e.maxZoom-this.map._zoomLevelsToOverscale):this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:t,calculateTileZoom:this._source.calculateTileZoom,maxContentElevation:this._updateMaxContentElevation()}),this._source.hasTile&&(i=i.filter(e=>this._source.hasTile(e)))):i=[],this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let r=0===i.length&&!this._updated&&this._didEmitContent;this._updated=!0,r&&this.fire(new A("data",{sourceDataType:"idle",sourceId:this.id}));let a=si(e,this._source),o=this._updateRetainedTiles(i,a),n=ui(this._source.type);n&&this._rasterFadeDuration>0&&!t&&di(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),n?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(e){for(let t of this._inViewTiles.getAllIds())e[t]||this._removeTile(t)}_cleanUpVectorTiles(e){for(let t of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(t);e[t]?i.clearSymbolFadeHold():i.hasSymbolBuckets?i.holdingForSymbolFade()?i.symbolFadeFinished()&&this._removeTile(t):i.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(t)}}_addTerrainIdealTiles(e){let t=[];for(let i of e)if(i.canonical.z>this._source.minzoom){let e=i.scaledTo(i.canonical.z-1);t.push(e);let r=i.scaledTo(Math.max(this._source.minzoom,Math.min(i.canonical.z,5)));t.push(r)}return e.concat(t)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(t,i){let r=new Set;for(let e of t)this._addTile(e).hasData()||r.add(e);let a=t.reduce((e,t)=>
1172(e[t.key]=t,e),{}),o=this._retainLoadedChildren(a,r),n={},s=Math.max(i-e.maxUnderzooming,this._source.minzoom);for(let e of o){let t=this._inViewTiles.getTileById(e.key),i=t?.wasRequested();for(let r=e.overscaledZ-1;r>=s;--r){let o=e.scaledTo(r);if(n[o.key])break;if(n[o.key]=!0,t=this.getTile(o),!t&&i&&(t=this._addTile(o)),t){let e=t.hasData();if((e||!this.map?.cancelPendingTileRequestsWhileZooming||i)&&(a[o.key]=o),i=t.wasRequested(),e)break}}}return a}_addTile(e){let t=this._inViewTiles.getTileById(e.key);if(t)return t;t=this._outOfViewCache.getAndRemove(e),t&&(t.resetFadeLogic(),this._setTileReloadTimer(e.key,t),t.tileID=e,this._state.initializeTileState(t,this.map?this.map.painter:null));let i=t;return t||(t=new Ht(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(t,e.key,t.state,!1)),t.uses++,this._inViewTiles.setTile(e.key,t),i||this._source.fire(new A("dataloading",{tile:t,coord:t.tileID})),t}_setTileReloadTimer(e,t){this._clearTileReloadTimer(e);let i=t.getExpiryTimeout();if(i){let t=()=>{this._reloadTile(e,"expired"),delete this._timers[e]};this._timers[e]=setTimeout(t,i)}}_clearTileReloadTimer(e){let t=this._timers[e];t&&(clearTimeout(t),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,t)}}refreshTiles(e){for(let t of this._inViewTiles.getAllIds()){let i=this._inViewTiles.getTileById(t);(this._inViewTiles.isIdRenderable(t)||"errored"==i.state)&&e.some(e=>e.equals(i.tileID.canonical))&&this._reloadTile(t,"expired")}}_removeTile(e){let t=this._inViewTiles.getTileById(e);t&&(t.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),!(t.uses>0)&&(t.hasData()&&"reloading"!==t.state?this._outOfViewCache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){if("source"===e.dataType){if("metadata"===e.sourceDataType)return void(this._sourceLoaded=!0);"content"===e.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}}resetMaxContentElevation(){this._maxContentElevationSeen=0}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1,this.resetMaxContentElevation();for(let e of this._inViewTiles.getAllIds())this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,t,i){let r=[],a=this.transform;if(!a)return r;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),n=i?a.getCameraQueryGeometry(e):e,s=e=>a.screenPointToMercatorCoordinate(e,this.terrain),l=this.transformBbox(e,s,!o),h=this.transformBbox(n,s,!o),u=this.getIds(),d=c.dt.fromPoints(h);for(let e of u){let i=this._inViewTiles.getTileById(e);if(i.holdingForSymbolFade())continue;let n=o?[i.tileID]:[i.tileID.unwrapTo(-1),i.tileID.unwrapTo(0)],s=2**(a.zoom-i.tileID.overscaledZ),u=t*i.queryPadding*c.Rr/i.tileSize/s;for(let e of n){let t=d.map(t=>e.getTilePoint(new c.et(t.x,t.y)));if(t.expandBy(u),t.intersects(c.ut)){let t=l.map(t=>e.getTilePoint(t)),a=h.map(t=>e.getTilePoint(t));r.push({tile:i,tileID:o?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:a,scale:s})}}}return r}transformBbox(e,t,i){let r=e.map(t);if(i){let i=c.dt.fromPoints(e);i.shrinkBy(.001*Math.min(i.width(),i.height()));let a=i.map(t);c.dt.fromPoints(r).covers(a)||(r=r.map(e=>e.x>.5?new c.et(e.x-1,e.y,e.z):e))}return r}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._inViewTiles.getTileById(e).tileID);return this.transform&&this.transform.populateCache(t),t}hasTransition(){return!!this._source.hasTransition()||ui(this._source.type)&&gi(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,t,i){e||=c.s,this._state.updateState(e,t,i)}removeFeatureState(e,t,i){e||=c.s,this._state.removeFeatureState(e,t,i)}getFeatureState(e,t){return e||=c.s,this._state.getState(e,t)}
1172setDependencies(e,t,i){let r=this._inViewTiles.getTileById(e);r&&r.setDependencies(t,i)}reloadTilesForDependencies(e,t){for(let i of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(i).hasDependency(e,t)&&this._reloadTile(i,"reloading");this._outOfViewCache.filter(i=>!i.hasDependency(e,t))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}}).maxUnderzooming=10,l.maxOverzooming=3,l),wi=class{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e<this.points.length;e++)this._distances[e]=this._distances[e-1]+this.points[e].dist(this.points[e-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(t||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(1===this.points.length)return this.points[0];e=(0,c.Vn)(e,0,1);let t=1,i=this._distances[t],r=e*this.paddedLength+this.padding;for(;i<r&&t<this._distances.length;)i=this._distances[++t];let a=t-1,o=this._distances[a],n=i-o,s=n>0?(r-o)/n:0;return this.points[a].mult(1-s).add(this.points[t].mult(s))}};function Ti(e,t,i,r,a){return a?e?e(t,i)+r:0===r?void 0:r:r}function Pi(e,t){let i=!0;return"always"===e||("never"===e||"never"===t)&&(i=!1),i}var Mi=class{constructor(e,t,i){let r=this.boxCells=[],a=this.circleCells=[];this.xCellCount=Math.ceil(e/i),this.yCellCount=Math.ceil(t/i);for(let e=0;e<this.xCellCount*this.yCellCount;e++)r.push([]),a.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=t,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/t,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,t,i,r,a){this._forEachCell(t,i,r,a,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(i),this.bboxes.push(r),this.bboxes.push(a)}insertCircle(e,t,i,r){this._forEachCell(t-r,i-r,t+r,i+r,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(t),this.circles.push(i),this.circles.push(r)}_insertBoxCell(e,t,i,r,a,o){this.boxCells[a].push(o)}_insertCircleCell(e,t,i,r,a,o){this.circleCells[a].push(o)}_query(e,t,i,r,a,o,n){if(i<0||e>this.width||r<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=r){if(a)return[{key:null,x1:e,y1:t,x2:i,y2:r}];for(let e=0;e<this.boxKeys.length;e++)s.push({key:this.boxKeys[e],x1:this.bboxes[4*e],y1:this.bboxes[4*e+1],x2:this.bboxes[4*e+2],y2:this.bboxes[4*e+3]});for(let e=0;e<this.circleKeys.length;e++){let t=this.circles[3*e],i=this.circles[3*e+1],r=this.circles[3*e+2];s.push({key:this.circleKeys[e],x1:t-r,y1:i-r,x2:t+r,y2:i+r})}}else{let l={hitTest:a,overlapMode:o,seenUids:{box:{},circle:{}}};this._forEachCell(e,t,i,r,this._queryCell,s,l,n)}return s}query(e,t,i,r){return this._query(e,t,i,r,!1,null)}hitTest(e,t,i,r,a,o){return this._query(e,t,i,r,!0,a,o).length>0}hitTestCircle(e,t,i,r,a){let o=e-i,n=e+i,s=t-i,l=t+i;if(n<0||o>this.width||l<0||s>this.height)return!1;let h=[],c={hitTest:!0,overlapMode:r,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,n,l,this._queryCellCircle,h,c,a),h.length>0}_queryCell(e,t,i,r,a,o,n,s){let{seenUids:l,hitTest:h,overlapMode:c}=n,u=this.boxCells[a],d=1e-6;if(null!==u){let a=this.bboxes;for(let n of u)if(!l.box[n]){l.box[n]=!0;let u=4*n,_=this.boxKeys[n];if(e<=a[u+2]+d&&t<=a[u+3]+d&&i>=a[u+0]-d&&r>=a[u+1]-d&&(!s||s(_))&&(!h||!Pi(c,_.overlapMode))&&(o.push({key:_,x1:a[u],y1:a[u+1],x2:a[u+2],y2:a[u+3]}),h))return!0}}let _=this.circleCells[a];if(null!==_){let a=this.circles;for(let n of _)if(!l.circle[n]){l.circle[n]=!0;let u=3*n,d=this.circleKeys[n];if(this._circleAndRectCollide(a[u],a[u+1],a[u+2],e,t,i,r)&&(!s||s(d))&&(!h||!Pi(c,d.overlapMode))){let e=a[u],t=a[u+1],i=a[u+2];if(o.push({key:d,x1:e-i,y1:t-i,x2:e+i,y2:t+i}),h)return!0}}}return!1}_queryCellCircle(e,t,i,r,a,o,n,s){let{circle:l,seenUids:h,overlapMode:c}=n,u=this.boxCells[a];if(null!==u){let e=this.bboxes;for(let t of u)if(!h.box[t]){h.box[t]=!0;let i=4*t,r=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[i+0],e[i+1],e[i+2],e[i+3])&&(!s||s(r))&&!Pi(c,r.overlapMode))return o.push(!0),!0}}let d=this.circleCells[a];if(null!==d){let e=this.circles;for(let t of d)if(!h.circle[t]){h.circle[t]=!0;let i=3*t,r=this.circleKeys[t];
1172if(this._circlesCollide(e[i],e[i+1],e[i+2],l.x,l.y,l.radius)&&(!s||s(r))&&!Pi(c,r.overlapMode))return o.push(!0),!0}}}_forEachCell(e,t,i,r,a,o,n,s){let l=this._convertToXCellCoord(e),h=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),u=this._convertToYCellCoord(r);for(let d=l;d<=c;d++)for(let l=h;l<=u;l++){let h=this.xCellCount*l+d;if(a.call(this,e,t,i,r,h,o,n,s))return}}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,i,r,a,o){let n=r-e,s=a-t,l=i+o;return l*l>n*n+s*s}_circleAndRectCollide(e,t,i,r,a,o,n){let s=(o-r)/2,l=Math.abs(e-(r+s));if(l>s+i)return!1;let h=(n-a)/2,c=Math.abs(t-(a+h));if(c>h+i)return!1;if(l<=s||c<=h)return!0;let u=l-s,d=c-h;return u*u+d*d<=i*i}};function Ci(e,t){let i=1/(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]),r=1/(t[8]*t[8]+t[9]*t[9]+t[10]*t[10]),a=t[0]*i,o=t[4]*i,n=t[8]*r,s=t[1]*i,l=t[5]*i,h=t[9]*r,c=t[2]*i,u=t[6]*i,d=t[10]*r;e[0]=a,e[1]=o,e[2]=n,e[4]=s,e[5]=l,e[6]=h,e[8]=c,e[9]=u,e[10]=d;let _=t[12],p=t[13],m=t[14];return e[12]=-a*_-s*p-c*m,e[13]=-o*_-l*p-u*m,e[14]=-n*_-h*p-d*m,e[3]=0,e[7]=0,e[11]=0,e[15]=1,e}function Ii(e,t){return e[0]=1/t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/t[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/t[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=t[10]/t[14],e}function Ri(e,t){let i=1/(t[0]*t[5]-t[1]*t[4]);return e[0]=t[5]*i,e[1]=-t[1]*i,e[2]=0,e[3]=0,e[4]=-t[4]*i,e[5]=t[0]*i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1/t[10],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1/t[15],e}const Si=(0,c.yi)();function Ei(e,t,i){let r=(0,c.yi)();if(!e){let{vecSouth:e,vecEast:i}=Ai(t),a=d();a[0]=i[0],a[1]=i[1],a[2]=e[0],a[3]=e[1],_(a,a),r[0]=a[0],r[1]=a[1],r[4]=a[2],r[5]=a[3]}return(0,c.ji)(r,r,[1/i,1/i,1]),r}function zi(e,t,i,r){if(e){let e=(0,c.yi)();if(!t){let{vecSouth:t,vecEast:r}=Ai(i);e[0]=r[0],e[1]=r[1],e[4]=t[0],e[5]=t[1]}return(0,c.ji)(e,e,[r,r,1]),e}return i.pixelsToClipSpaceMatrix}function Ai(e){let t=Math.cos(e.rollInRadians),i=Math.sin(e.rollInRadians),r=Math.cos(e.pitchInRadians),a=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),n=(0,c.zr)();n[0]=-a*r*i-o*t,n[1]=-o*r*i+a*t;let s=(0,c.Br)(n);s<1e-9?(0,c.Ur)(n):(0,c.Vr)(n,n,1/s);let l=(0,c.zr)();l[0]=a*r*t-o*i,l[1]=o*r*t+a*i;let h=(0,c.Br)(l);return h<1e-9?(0,c.Ur)(l):(0,c.Vr)(l,l,1/h),{vecEast:l,vecSouth:n}}function Di(e,t,i){return Ti(e.getElevation,t,i,e.heightOffset??0,e.heightAnchorGround??!0)}function Li(e,t,i,r){let a;null==r?(a=[e,t,0,1],Yi(a,a,i)):(a=[e,t,r,1],(0,c.Xr)(a,a,i));let o=a[3];return{point:new c.Ri(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function Fi(e,t){return.5+e/t*.5}function ki(e,t){return e.x>=-t[0]&&e.x<=t[0]&&e.y>=-t[1]&&e.y<=t[1]}function Oi(e,t,i,r,a,o,n,s,l,h,u,d,_){let p=i?e.textSizeData:e.iconSizeData,m=(0,c.A)(p,t.transform.zoom),f=[256/t.width*2+1,256/t.height*2+1],g=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;g.clear();let v=e.lineVertexArray,y=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=t.transform.width/t.transform.height,x=!1;for(let i=0;i<y.length;i++){let w=y.get(i);if(w.hidden||2===w.writingMode&&!x){Ki(w.numGlyphs,g);continue}x=!1;let T=new c.Ri(w.anchorX,w.anchorY),P={getElevation:_,pitchedLabelPlaneMatrix:r,lineVertexArray:v,pitchWithMap:o,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:t.transform,tileAnchorPoint:T,unwrappedTileID:l,width:h,height:u,translation:d},M=Wi(w.anchorX,w.anchorY,P);if(!ki(M.point,f)){Ki(w.numGlyphs,g);continue}let C=M.signedDistanceFromCamera,I=Fi(t.transform.cameraToCenterDistance,C),R=(0,c.k)(p,m,w),S=o?R*t.transform.getPitchedTextCorrection(w.anchorX,w.anchorY,l)/I:R*I,E=Zi({projectionContext:P,pitchedLabelPlaneMatrixInverse:a,symbol:w,fontSize:S,flip:!1,keepUpright:n,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:g,aspectRatio:b,rotateToLine:s});x=E.useVertical,(E.notEnoughRoom||x||E.needsFlipping&&Zi({projectionContext:P,pitchedLabelPlaneMatrixInverse:a,symbol:w,fontSize:S,flip:!0,keepUpright:n,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:g,aspectRatio:b,rotateToLine:s}).notEnoughRoom)&&Ki(w.numGlyphs,g)}i?e.text.dynamicLayoutVertexBuffer.updateData(g):e.icon.dynamicLayoutVertexBuffer.updateData(g)}function ji(e,t,i,r,a,o,n,s){let l=o.glyphStartIndex+o.numGlyphs,h=o.lineStartIndex,c=o.lineStartIndex+o.lineLength,u=t.getoffsetX(o.glyphStartIndex),d=t.getoffsetX(l-1),_=Hi(e*u,i,r,a,o.segment,h,c,s,n);if(!_)return null;let p=Hi(e*d,i,r,a,o.segment,h,c,s,n);return!p||s.projectionCache.anyProjectionOccluded?null:{first:_,last:p}}function Bi(e,t,i,r){return 1===e&&Math.abs(i.y-t.y)>Math.abs(i.x-t.x)*r?{useVertical:!0}:(2===e?t.y<i.y:t.x>i.x)?{needsFlipping:!0}:null}
1172function Zi(e){let t,{projectionContext:i,pitchedLabelPlaneMatrixInverse:r,symbol:a,fontSize:o,flip:n,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:h,aspectRatio:u,rotateToLine:d}=e,_=o/24,p=a.lineOffsetX*_,m=a.lineOffsetY*_;if(a.numGlyphs>1){let e=a.glyphStartIndex+a.numGlyphs,o=a.lineStartIndex,h=a.lineStartIndex+a.lineLength,c=ji(_,l,p,m,n,a,d,i);if(!c)return{notEnoughRoom:!0};let f=Vi(c.first.point.x,c.first.point.y,i,r),g=Vi(c.last.point.x,c.last.point.y,i,r);if(s&&!n){let e=Bi(a.writingMode,f,g,u);if(e)return e}t=[c.first];for(let r=a.glyphStartIndex+1;r<e-1;r++){let e=Hi(_*l.getoffsetX(r),p,m,n,a.segment,o,h,i,d);if(!e)return{notEnoughRoom:!0};t.push(e)}t.push(c.last)}else{if(s&&!n){let e=Gi(i.tileAnchorPoint.x,i.tileAnchorPoint.y,i).point,t=a.lineStartIndex+a.segment+1,o=new c.Ri(i.lineVertexArray.getx(t),i.lineVertexArray.gety(t)),n=Gi(o.x,o.y,i),s=n.signedDistanceFromCamera>0?n.point:Ui(i.tileAnchorPoint,o,e,1,i),l=Vi(e.x,e.y,i,r),h=Vi(s.x,s.y,i,r),d=Bi(a.writingMode,l,h,u);if(d)return d}let e=Hi(_*l.getoffsetX(a.glyphStartIndex),p,m,n,a.segment,a.lineStartIndex,a.lineStartIndex+a.lineLength,i,d);if(!e||i.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};t=[e]}for(let e of t)(0,c.C)(h,e.point,e.angle);return{}}function Ui(e,t,i,r,a){let o=e.add(e.sub(t)._unit()),n=Gi(o.x,o.y,a).point,s=i.sub(n);return i.add(s._mult(r/s.mag()))}function Ni(e,t,i){let r=t.projectionCache;if(r.projections[e])return r.projections[e];let a=new c.Ri(t.lineVertexArray.getx(e),t.lineVertexArray.gety(e)),o=Gi(a.x,a.y,t);if(o.signedDistanceFromCamera>0)return r.projections[e]=o.point,r.anyProjectionOccluded||=o.isOccluded,o.point;let n=e-i.direction,s=0===i.distanceFromAnchor?t.tileAnchorPoint:new c.Ri(t.lineVertexArray.getx(n),t.lineVertexArray.gety(n)),l=i.absOffsetX-i.distanceFromAnchor+1;return Ui(s,a,i.previousVertex,l,t)}function Gi(e,t,i){let r,a=e+i.translation[0],o=t+i.translation[1];return i.pitchWithMap?(r=Li(a,o,i.pitchedLabelPlaneMatrix,Di(i,a,o)),r.isOccluded=!1):(r=i.transform.projectTileCoordinates(a,o,i.unwrappedTileID,Di(i,a,o)),r.point.x=(.5*r.point.x+.5)*i.width,r.point.y=(.5*-r.point.y+.5)*i.height),r}function Vi(e,t,i,r){if(i.pitchWithMap){let a=[e,t,0,1];(0,c.Xr)(a,a,r);let o=a[0]/a[3],n=a[1]/a[3];return i.transform.projectTileCoordinates(o,n,i.unwrappedTileID,Di(i,o,n)).point}return{x:e/i.width*2-1,y:1-t/i.height*2}}function Wi(e,t,i){return i.transform.projectTileCoordinates(e,t,i.unwrappedTileID,Di(i,e,t))}function qi(e,t,i){return e._unit()._perp()._mult(t*i)}function $i(e,t,i,r,a,o,n,s,l){if(s.projectionCache.offsets[e])return s.projectionCache.offsets[e];let h=i.add(t);if(e+l.direction<r||e+l.direction>=a)return s.projectionCache.offsets[e]=h,h;let u=Ni(e+l.direction,s,l),d=qi(u.sub(i),n,l.direction),_=i.add(d),p=u.add(d);return s.projectionCache.offsets[e]=(0,c.rr)(o,h,_,p)||h,s.projectionCache.offsets[e]}function Hi(e,t,i,r,a,o,n,s,l){let h=r?e-t:e+t,c=h>0?1:-1,u=0;r&&(c*=-1,u=Math.PI),c<0&&(u+=Math.PI);let d,_=c>0?o+a:o+a+1;s.projectionCache.cachedAnchorPoint?d=s.projectionCache.cachedAnchorPoint:(d=Gi(s.tileAnchorPoint.x,s.tileAnchorPoint.y,s).point,s.projectionCache.cachedAnchorPoint=d);let p,m,f,g=d,v=d,y=0,b=0,x=Math.abs(h),w=[];for(;y+b<=x;){if(_+=c,_<o||_>=n)return null;y+=b,v=g,m=p;let e={absOffsetX:x,direction:c,distanceFromAnchor:y,previousVertex:v};if(g=Ni(_,s,e),0===i)w.push(v),f=g.sub(v);else{let t,r=g.sub(v);t=0===r.mag()?qi(Ni(_+c,s,e).sub(g),i,c):qi(r,i,c),m||=v.add(t),p=$i(_,t,g,o,n,m,i,s,e),w.push(m),f=p.sub(m)}b=f.mag()}let T=(x-y)/b,P=f._mult(T)._add(m||v),M=u+Math.atan2(g.y-v.y,g.x-v.x);return w.push(P),{point:P,angle:l?M:0,path:w}}const Xi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ki(e,t){for(let i=0;i<e;i++){let e=t.length;t.resize(e+4),t.float32.set(Xi,3*e)}}function Yi(e,t,i){let r=t[0],a=t[1];return e[0]=i[0]*r+i[4]*a+i[12],e[1]=i[1]*r+i[5]*a+i[13],e[3]=i[3]*r+i[7]*a+i[15],e}function Ji(e,t){let i=Si;return Ri(i,t.pitchedLabelPlaneMatrix),e.map(e=>{let r=Li(e.x,e.y,i,Di(t,e.x,e.y)),a=t.transform.projectTileCoordinates(r.point.x,r.point.y,t.unwrappedTileID,Di(t,r.point.x,r.point.y));return a.point.x=(.5*a.point.x+.5)*t.width,a.point.y=(.5*-a.point.y+.5)*t.height,a})}function Qi(e){let t=0,i=0,r=0,a=0;for(let o=0;o<e.length;o++)e[o].isOccluded?(r=o+1,a=0):(a++,a>i&&(i=a,t=r));return e.slice(t,t+i)}var er=class{constructor(e,t=new Mi(e.width+200,e.height+200,25),i=new Mi(e.width+200,e.height+200,25)){this.transform=e,this.grid=t,this.ignoredGrid=i,this.pitchFactor=Math.cos(e.pitch
1172*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+100,this.screenBottomBoundary=e.height+100,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,t,i,r,a,o,n,s,l,h,c,u,d=0,_=!0){let p,m=e.anchorPointX+s[0],f=e.anchorPointY+s[1],g=this.projectAndGetPerspectiveRatio(m,f,a,Ti(h,m,f,d,_),u),v=i*g.perspectiveRatio;if(o||n)p=this._projectCollisionBox(e,v,r,a,o,n,s,g,h,c,u,d,_);else{let t=g.x+(c?c.x*v:0),i=g.y+(c?c.y*v:0);p={allPointsOccluded:!1,box:[t+e.x1*v,i+e.y1*v,t+e.x2*v,i+e.y2*v]}}let[y,b,x,w]=p.box,T=o?p.allPointsOccluded:g.isOccluded,P=T;return P||=g.perspectiveRatio<this.perspectiveRatioCutoff,P||=!this.isInsideGrid(y,b,x,w),P||"always"!==t&&this.grid.hitTest(y,b,x,w,t,l)?{box:[y,b,x,w],placeable:!1,offscreen:!1,occluded:T}:{box:[y,b,x,w],placeable:!0,offscreen:this.isOffscreen(y,b,x,w),occluded:T}}placeCollisionCircles(e,t,i,r,a,o,n,s,l,h,u,d,_,p){let m=[],f=new c.Ri(t.anchorX,t.anchorY),g=this.getPerspectiveRatio(f.x,f.y,o,p?.(f.x,f.y)),v=(l?a*this.transform.getPitchedTextCorrection(t.anchorX,t.anchorY,o)/g:a*g)/24,y={projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},b=t.lineOffsetX*v,x=t.lineOffsetY*v,w={getElevation:p,pitchedLabelPlaneMatrix:n,lineVertexArray:i,pitchWithMap:l,projectionCache:y,transform:this.transform,tileAnchorPoint:f,unwrappedTileID:o,width:this.transform.width,height:this.transform.height,translation:_},T=ji(v,r,b,x,!1,t,!1,w),P=!1,M=!1,C=!0;if(T){let t=.5*u*g+d,i=new c.Ri(-100,-100),r=new c.Ri(this.screenRightBoundary,this.screenBottomBoundary),a=new wi,o=T.first,n=T.last,_=[];for(let e=o.path.length-1;e>=1;e--)_.push(o.path[e]);for(let e=1;e<n.path.length;e++)_.push(n.path[e]);let p=2.5*t;if(l){let e=this.projectPathToScreenSpace(_,w);_=e.some(e=>e.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let f=[];if(_.length>0){let e=_[0].clone(),t=_[0].clone();for(let i=1;i<_.length;i++)e.x=Math.min(e.x,_[i].x),e.y=Math.min(e.y,_[i].y),t.x=Math.max(t.x,_[i].x),t.y=Math.max(t.y,_[i].y);f=e.x>=i.x&&t.x<=r.x&&e.y>=i.y&&t.y<=r.y?[_]:t.x<i.x||e.x>r.x||t.y<i.y||e.y>r.y?[]:(0,c.O)([_],i.x,i.y,r.x,r.y)}for(let i of f){a.reset(i,.25*t);let r=0;r=a.length<=.5*t?1:Math.ceil(a.paddedLength/p)+1;for(let i=0;i<r;i++){let o=i/Math.max(r-1,1),n=a.lerp(o),l=n.x+100,c=n.y+100;m.push(l,c,t,0);let u=l-t,d=c-t,_=l+t,p=c+t;if(C&&=this.isOffscreen(u,d,_,p),M||=this.isInsideGrid(u,d,_,p),"always"!==e&&this.grid.hitTestCircle(l,c,t,e,h)&&(P=!0,!s))return{circles:[],offscreen:!1,collisionDetected:P}}}}return{circles:!s&&P||!M||g<this.perspectiveRatioCutoff?[]:m,offscreen:C,collisionDetected:P}}projectPathToScreenSpace(e,t){return Qi(Ji(e,t))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let t=[],i=new c.dt;for(let r of e){let e=new c.Ri(r.x+100,r.y+100);i.extend(e),t.push(e)}let{minX:r,minY:a,maxX:o,maxY:n}=i,s=this.grid.query(r,a,o,n).concat(this.ignoredGrid.query(r,a,o,n)),l={},h={};for(let e of s){let i=e.key;if(void 0===l[i.bucketInstanceId]&&(l[i.bucketInstanceId]={}),l[i.bucketInstanceId][i.featureIndex])continue;let r=[new c.Ri(e.x1,e.y1),new c.Ri(e.x2,e.y1),new c.Ri(e.x2,e.y2),new c.Ri(e.x1,e.y2)];(0,c.Dt)(t,r)&&(l[i.bucketInstanceId][i.featureIndex]=!0,void 0===h[i.bucketInstanceId]&&(h[i.bucketInstanceId]=[]),h[i.bucketInstanceId].push(i.featureIndex))}return h}insertCollisionBox(e,t,i,r,a,o){let n={bucketInstanceId:r,featureIndex:a,collisionGroupID:o,overlapMode:t};(i?this.ignoredGrid:this.grid).insert(n,e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,i,r,a,o){let n=i?this.ignoredGrid:this.grid,s={bucketInstanceId:r,featureIndex:a,collisionGroupID:o,overlapMode:t};for(let t=0;t<e.length;t+=4)n.insertCircle(s,e[t],e[t+1],e[t+2])}projectAndGetPerspectiveRatio(e,t,i,r,a){if(a){let i;null==r?(i=[e,t,0,1],Yi(i,i,a)):(i=[e,t,r,1],(0,c.Xr)(i,i,a));let o=i[3];return{x:(i[0]/o+1)/2*this.transform.width+100,y:(-i[1]/o+1)/2*this.transform.height+100,perspectiveRatio:.5+this.transform.cameraToCenterDistance/o*.5,isOccluded:!1,signedDistanceFromCamera:o}}{let a=this.transform.projectTileCoordinates(e,t,i,r);return{x:(a.point.x+1)/2*this.transform.width+100,y:(1-a.point.y)/2*this.transform.height+100,perspectiveRatio:.5+this.transform.cameraToCenterDistance/a.signedDistanceFromCamera*.5,isOccluded:a.isOccluded,signedDistanceFromCamera:a.signedDistanceFromCamera}}}getPerspectiveRatio(e,t,i,r){let a=this.transform.projectTileCoordinates(e,t,i,r);return.5+this.transform.cameraToCenterDistance/a.signedDistanceFromCamera*.5}isOffscreen(e,t,i,r){return i<100||e>=this.screenRightBoundary||r<100||t>this.screenBottomBoundary}isInsideGrid(e,t,i,r){return i>=0&&e<this.gridRightBoundary&&r>=0&&t<this.gridBottomBoundary}getViewportMatrix(){let e=(0,c.Ci)([]);return(0,c.Mi)(e,e,[-100,-100,0]),e}_projectCollisionBox(e,t,i,r,a,o,n,s,l,h,u,d=0,_=!0){let p=1,m=0,f=0,g=1,v=e.anchorPointX+n[0],y=e.anchorPointY+n[1];if(o&&!a){let e=this.projectAndGetPerspectiveRatio(v+1,y,r,Ti(l,v+1,y,d,_),u),t=e.x-s.x,i=e.y-s.y,a=Math.atan(i/t)+(t<0?Math.PI:0),o=Math.sin(a),n=Math.cos(a);p=n,m=o,f=-o,g=n}else if(!o&&a){let e=Ai(this.transform);p=e.vecEast[0],m=e.vecEast[1],f=e.vecSouth[0],g=e.vecSouth[1]}let b=s.x,x=s.y,w=t;
1172if(a&&(b=v,x=y,w=2**-(this.transform.zoom-i.overscaledZ),w*=this.transform.getPitchedTextCorrection(v,y,r),!h)){let e=s.signedDistanceFromCamera/this.transform.cameraToCenterDistance;w*=(0,c.Vn)(.5+.5*e,0,4)}h&&(b+=p*h.x*w+f*h.y*w,x+=m*h.x*w+g*h.y*w);let T=e.x1*w,P=e.x2*w,M=(T+P)/2,C=e.y1*w,I=e.y2*w,R=(C+I)/2,S=[{offsetX:T,offsetY:C},{offsetX:M,offsetY:C},{offsetX:P,offsetY:C},{offsetX:P,offsetY:R},{offsetX:P,offsetY:I},{offsetX:M,offsetY:I},{offsetX:T,offsetY:I},{offsetX:T,offsetY:R}],E=[];for(let{offsetX:e,offsetY:t}of S)E.push(new c.Ri(b+p*e+f*t,x+m*e+g*t));let z=!1;if(a){let e=E.map(e=>this.projectAndGetPerspectiveRatio(e.x,e.y,r,Ti(l,e.x,e.y,d,_),u));z=e.some(e=>!e.isOccluded),E=e.map(e=>new c.Ri(e.x,e.y))}else z=!0;return{box:(0,c.ir)(E),allPointsOccluded:!z}}},tr=class{constructor(e,t,i,r){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):r&&i?1:0,this.placed=i}isHidden(){return 0===this.opacity&&!this.placed}},ir=class{constructor(e,t,i,r,a){this.text=new tr(e?e.text:null,t,i,a),this.icon=new tr(e?e.icon:null,t,r,a)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}},rr=class{constructor(e,t,i){this.text=e,this.icon=t,this.skipFade=i}},ar=class{constructor(e,t,i,r,a){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=i,this.bucketIndex=r,this.tileID=a}},or=class{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}};function nr(e,t,i,r,a){let{horizontalAlign:o,verticalAlign:n}=(0,c.M)(e),s=-(o-.5)*t,l=-(n-.5)*i;return new c.Ri(s+r[0]*a,l+r[1]*a)}var sr=class{constructor(e,t,i,r,a){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new er(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=i,this.retainedQueryData={},this.collisionGroups=new or(r),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=a,a&&(a.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;if(t)return(i,r)=>t.getElevation(e,i,r)}getBucketParts(e,t,i,r){let a=i.getBucket(t),o=i.latestFeatureIndex;if(!a||!o||t.id!==a.layerIds[0])return;let n=i.collisionBoxArray,s=a.layers[0].layout,l=a.layers[0].paint,h=2**(this.transform.zoom-i.tileID.overscaledZ),u=i.tileSize/c.Rr,d=i.tileID.toUnwrapped(),_="map"===s.get("text-rotation-alignment"),p=(0,c.Lr)(i,1,this.transform.zoom),m=(0,c.Mr)(this.collisionIndex.transform,i,l.get("text-translate"),l.get("text-translate-anchor")),f=(0,c.Mr)(this.collisionIndex.transform,i,l.get("icon-translate"),l.get("icon-translate-anchor")),g=Ei(_,this.transform,p);this.retainedQueryData[a.bucketInstanceId]=new ar(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,i.tileID);let v={bucket:a,layout:s,translationText:m,translationIcon:f,unwrappedTileID:d,pitchedLabelPlaneMatrix:g,scale:h,textPixelRatio:u,holdingForFade:i.holdingForSymbolFade(),collisionBoxArray:n,partiallyEvaluatedTextSize:(0,c.A)(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(r)for(let t of a.sortKeyRanges){let{sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:a}=t;e.push({sortKey:i,symbolInstanceStart:r,symbolInstanceEnd:a,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:v})}attemptAnchorPlacement(e,t,i,r,a,o,n,s,l,h,u,d,_,p,m,f,g,v,y,b,x,w){let T=c.E[e.textAnchor],P=[e.textOffset0,e.textOffset1],M=nr(T,i,r,P,a),C=this.collisionIndex.placeCollisionBox(t,d,s,l,h,n,o,f,u.predicate,y,M,b,x,w);if((!v||this.collisionIndex.placeCollisionBox(v,d,s,l,h,n,o,g,u.predicate,y,M,b,x,w).placeable)&&C.placeable){let e;if(this.prevPlacement?.variableOffsets[_.crossTileID]&&this.prevPlacement?.placements[_.crossTileID]?.text&&(e=this.prevPlacement.variableOffsets[_.crossTileID].anchor),0===_.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[_.crossTileID]={textOffset:P,width:i,height:r,anchor:T,textBoxScale:a,prevAnchor:e},this.markUsedJustification(p,T,_,m),p.allowVerticalPlacement&&(this.markUsedOrientation(p,m,_),this.placedOrientations[_.crossTileID]=m),{shift:M,placedGlyphBoxes:C}}}placeLayerBucketPart(e,t,i){let{bucket:r,layout:a,translationText:o,translationIcon:n,unwrappedTileID:s,pitchedLabelPlaneMatr
1172ix:l,textPixelRatio:h,holdingForFade:u,collisionBoxArray:d,partiallyEvaluatedTextSize:_,collisionGroup:p}=e.parameters,m=a.get("text-optional"),f=a.get("icon-optional"),g=(0,c.w)(a,"text-overlap","text-allow-overlap"),v="always"===g,y=(0,c.w)(a,"icon-overlap","icon-allow-overlap"),b="always"===y,x="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),T="none"!==a.get("icon-text-fit"),P="viewport-y"===a.get("symbol-z-order"),M="ground"===a.get("symbol-height-anchor"),C=v&&(b||!r.hasIconData()||f),I=b&&(v||!r.hasTextData()||m);!r.collisionArrays&&d&&r.deserializeCollisionBoxes(d);let R=this.retainedQueryData[r.bucketInstanceId].tileID,S=this._getTerrainElevationFunc(R),E=this.transform.getFastPathSimpleProjectionMatrix(R),z=(e,d,b)=>{if(t[e.crossTileID])return;if(u)return void(this.placements[e.crossTileID]=new rr(!1,!1,!1));let P=e.heightOffset,z=!1,A=!1,D=!0,L=null,F={box:null,placeable:!1,offscreen:null,occluded:!1},k={box:null,placeable:!1,offscreen:null},O=null,j=null,B=null,Z=0,U=0,N=0;d.textFeatureIndex?Z=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(Z=e.featureIndex),d.verticalTextFeatureIndex&&(U=d.verticalTextFeatureIndex);let G=d.textBox;if(G){let t=t=>{let i=1;if(r.allowVerticalPlacement&&!t&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,i=t,this.markUsedOrientation(r,i,e))}return i},a=(t,i)=>{if(r.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of r.writingModes)if(2===e?(F=i(),k=F):F=t(),F?.placeable)break}else F=t()},l=e.textAnchorOffsetStartIndex,u=e.textAnchorOffsetEndIndex;if(u===l){let i=(t,i)=>{let a=this.collisionIndex.placeCollisionBox(t,g,h,R,s,w,x,o,p.predicate,S,void 0,E,P,M);return a?.placeable&&(this.markUsedOrientation(r,i,e),this.placedOrientations[e.crossTileID]=i),a};a(()=>i(G,1),()=>{let t=d.verticalTextBox;return r.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&t?i(t,2):{box:null,offscreen:null}}),t(F?.placeable)}else{let _=c.E[this.prevPlacement?.variableOffsets[e.crossTileID]?.anchor],m=(t,a,c)=>{let d=t.x2-t.x1,m=t.y2-t.y1,f=e.textBoxScale,v=T&&"never"===y?a:null,b=null,C="never"===g?1:2,I="never";_&&C++;for(let i=0;i<C;i++){for(let i=l;i<u;i++){let a=r.textAnchorOffsets.get(i);if(_&&a.textAnchor!==_)continue;let l=this.attemptAnchorPlacement(a,t,d,m,f,x,w,h,R,s,p,I,e,r,c,o,n,v,S,E,P,M);if(l&&(b=l.placedGlyphBoxes,b?.placeable))return z=!0,L=l.shift,b}_?_=null:I=g}return i&&!b&&(b={box:this.collisionIndex.placeCollisionBox(G,"always",h,R,s,w,x,o,p.predicate,S,void 0,E,P,M).box,offscreen:!1,placeable:!1,occluded:!1}),b};a(()=>m(G,d.iconBox,1),()=>{let t=d.verticalTextBox,i=F?.placeable;return r.allowVerticalPlacement&&!i&&e.numVerticalGlyphVertices>0&&t?m(t,d.verticalIconBox,2):{box:null,occluded:!0,offscreen:null}}),F&&(z=F.placeable,D=F.offscreen);let f=t(F?.placeable);if(!z&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(r,t.anchor,e,f))}}}if(O=F,z=O?.placeable,D=O?.offscreen,e.useRuntimeCollisionCircles&&e.centerJustifiedTextSymbolIndex>=0){let t=r.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),n=(0,c.k)(r.textSizeData,_,t),h=a.get("text-padding"),u=e.collisionCircleDiameter;j=this.collisionIndex.placeCollisionCircles(g,t,r.lineVertexArray,r.glyphOffsetArray,n,s,l,i,w,p.predicate,u,h,o,S),j.circles.length&&j.collisionDetected&&!i&&(0,c.Pr)("Collisions detected, but collision boxes are not shown"),z=v||j.circles.length>0&&!j.collisionDetected,D&&=j.offscreen}if(d.iconFeatureIndex&&(N=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,y,h,R,s,w,x,n,p.predicate,S,T&&L?L:void 0,E,P,M);k&&k.placeable&&d.verticalIconBox?(B=e(d.verticalIconBox),A=B.placeable):(B=e(d.iconBox),A=B.placeable),D&&=B.offscreen}let V=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,W=f||0===e.numIconVertices;V||W?W?V||(A&&=z):z=A&&z:A=z=A&&z;let q=z&&O.placeable,$=A&&B.placeable;if(q&&(k&&k.placeable&&U?this.collisionIndex.insertCollisionBox(O.box,g,a.get("text-ignore-placement"),r.bucketInstanceId,U,p.ID):this.collisionIndex.insertCollisionBox(O.box,g,a.get("text-ignore-placement"),r.bucketInstanceId,Z,p.ID)),$&&this.collisionIndex.insertCollisionBox(B.box,y,a.get("icon-ignore-placement"),r.bucketInstanceId,N,p.ID),j&&z&&this.collisionIndex.insertCollisionCircles(j.circles,g,a.get("text-ignore-placement"),r.bucketInstanceId,Z,p.ID),i&&this.storeCollisionData(r.bu
1172cketInstanceId,b,d,O,B,j),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===r.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");let H=(z||C)&&!O?.occluded,X=(A||I)&&!B?.occluded;this.placements[e.crossTileID]=new rr(H,X,D||r.justReloaded),t[e.crossTileID]=!0};if(P){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");let t=r.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){let i=t[e];z(r.symbolInstances.get(i),r.collisionArrays[i],i)}}else for(let t=e.symbolInstanceStart;t<e.symbolInstanceEnd;t++)z(r.symbolInstances.get(t),r.collisionArrays[t],t);r.justReloaded=!1}storeCollisionData(e,t,i,r,a,o){if(i.textBox||i.iconBox){let o,n;this.collisionBoxArrays.has(e)?o=this.collisionBoxArrays.get(e):(o=new Map,this.collisionBoxArrays.set(e,o)),o.has(t)?n=o.get(t):(n={text:null,icon:null},o.set(t,n)),i.textBox&&(n.text=r.box),i.iconBox&&(n.icon=a.box)}if(o){let t=this.collisionCircleArrays[e];void 0===t&&(t=this.collisionCircleArrays[e]=[]);for(let e=0;e<o.circles.length;e+=4)t.push(o.circles[e+0]-100),t.push(o.circles[e+1]-100),t.push(o.circles[e+2]),t.push(+!!o.collisionDetected)}}markUsedJustification(e,t,i,r){let a,o={left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex};a=2===r?i.verticalPlacedTextSymbolIndex:o[(0,c.T)(t)];let n=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex];for(let t of n)t>=0&&(e.text.placedSymbolArray.get(t).crossTileID=a>=0&&t!==a?0:i.crossTileID)}markUsedOrientation(e,t,i){let r=1===t||3===t?t:0,a=2===t?t:0,o=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];for(let t of o)e.text.placedSymbolArray.get(t).placedOrientation=r;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,i=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let r=t?t.symbolFadeChange(e):1,a=t?t.opacities:{},o=t?t.variableOffsets:{},n=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],o=a[e];o?(this.opacities[e]=new ir(o,r,t.text,t.icon),i||=t.text!==o.text.placed,i||=t.icon!==o.icon.placed):(this.opacities[e]=new ir(null,r,t.text,t.icon,t.skipFade),i||=t.text||t.icon)}for(let e in a){let t=a[e];if(!this.opacities[e]){let a=new ir(t,r,!1,!1);a.isHidden()||(this.opacities[e]=a,i||=t.text.placed,i||=t.icon.placed)}}for(let e in o)!this.variableOffsets[e]&&this.opacities[e]&&!this.opacities[e].isHidden()&&(this.variableOffsets[e]=o[e]);for(let e in n)!this.placedOrientations[e]&&this.opacities[e]&&!this.opacities[e].isHidden()&&(this.placedOrientations[e]=n[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");i?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let i={};for(let r of t){let t=r.getBucket(e);t&&r.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,r.tileID,i,r.collisionBoxArray)}}updateBucketOpacities(e,t,i,r){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,n=new ir(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),h=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),u="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),_="none"!==o.get("icon-text-fit"),p=new ir(null,0,s&&(l||!e.hasIconData()||o.get("icon-optional")),l&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&r&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(r);let m=(e,t,i)=>{for(let r=0;r<t/4;r++)e.opacityVertexArray.emplaceBack(i);e.hasVisibleVertices||=i!==pr},f=this.collisionBoxArrays.get(e.bucketInstanceId);for(let t=0;t<e.symbolInstances.length;t++){let r=e.symbolInstances.get(t),{numHorizontalGlyphVertices:a,numVerticalGlyphVertices:o,crossTileID:s}=r,l=i[s],g=this.opacities[s];l?g=n:g||(g=p,this.opacities[s]=g),i[s]=!0;let v=a>0||o>0,y=r.numIconVertices>0,b=this.placedOrientations[r.crossTileID],x=2===b,w=1===b||3===b;if(v){let t=_r(g.text),i=x?pr:t;m(e.text,a,i);let n=w?pr:t;m(e.text,o,n);let s=g.text.isHidden(),l=[r.rightJustifiedTextSymbolIndex,r.centerJustifiedTextSymbolIndex,r.leftJustifiedTextSymbolIndex];for(let t of l)t>=0&&(e.text.placedSymbolArray.get(t).hidden=s||x?1:0);r.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(r.verticalPlacedTextSymbolIndex).hidden=s||w?1:0);let h=this.variableOffsets[r.crossTileID];
1172h&&this.markUsedJustification(e,h.anchor,r,b);let c=this.placedOrientations[r.crossTileID];c&&(this.markUsedJustification(e,"left",r,c),this.markUsedOrientation(e,c,r))}if(y){let t=_r(g.icon),i=!(_&&r.verticalPlacedIconSymbolIndex&&x);if(r.placedIconSymbolIndex>=0){let a=i?t:pr;m(e.icon,r.numIconVertices,a),e.icon.placedSymbolArray.get(r.placedIconSymbolIndex).hidden=g.icon.isHidden()}if(r.verticalPlacedIconSymbolIndex>=0){let a=i?pr:t;m(e.icon,r.numVerticalIconVertices,a),e.icon.placedSymbolArray.get(r.verticalPlacedIconSymbolIndex).hidden=g.icon.isHidden()}}let T=f?.has(t)?f.get(t):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let i=e.collisionArrays[t];if(i){let t=new c.Ri(0,0);if(i.textBox||i.verticalTextBox){let r=!0;if(h){let e=this.variableOffsets[s];e?(t=nr(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),u&&t._rotate(d?-this.transform.bearingInRadians:this.transform.bearingInRadians)):r=!1}if(i.textBox||i.verticalTextBox){let a;i.textBox&&(a=x),i.verticalTextBox&&(a=w),lr(e.textCollisionBox.collisionVertexArray,g.text.placed,!r||a,T.text,t.x,t.y)}}if(i.iconBox||i.verticalIconBox){let r,a=!(w||!i.verticalIconBox);i.iconBox&&(r=a),i.verticalIconBox&&(r=!a),lr(e.iconCollisionBox.collisionVertexArray,g.icon.placed,r,T.icon,_?t.x:0,_?t.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,t){let i=this.zoomAtLastRecencyCheck===t?1-this.zoomAdjustment(t):1;return this.zoomAtLastRecencyCheck=t,this.commitTime+this.fadeDuration*i>e}setStale(){this.stale=!0}};function lr(e,t,i,r,a,o){(!r||0===r.length)&&(r=[0,0,0,0]);let n=r[0]-100,s=r[1]-100,l=r[2]-100,h=r[3]-100;e.emplaceBack(+!!t,+!!i,a||0,o||0,n,s),e.emplaceBack(+!!t,+!!i,a||0,o||0,l,s),e.emplaceBack(+!!t,+!!i,a||0,o||0,l,h),e.emplaceBack(+!!t,+!!i,a||0,o||0,n,h)}const hr=33554432,cr=16777216,ur=131072,dr=65536;function _r(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 4294967295;let t=+!!e.placed,i=Math.floor(127*e.opacity);return i*hr+t*cr+i*ur+t*dr+512*i+256*t+2*i+t}const pr=0;var mr=class{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,i,r,a){let o=this._bucketParts;for(;this._currentTileIndex<e.length;){let i=e[this._currentTileIndex];if(t.getBucketParts(o,r,i,this._sortAcrossTiles),this._currentTileIndex++,a())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort((e,t)=>
1172e.sortKey-t.sortKey));this._currentPartIndex<o.length;){let e=o[this._currentPartIndex];if(t.placeLayerBucketPart(e,this._seenCrossTileIDs,i),this._currentPartIndex++,a())return!0}return!1}},fr=class{constructor(e,t,i,r,a,o,n,s){this.placement=new sr(e,t,o,n,s),this._currentPlacementIndex=i.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=a,this._done=!1}isDone(){return this._done}continuePlacement(e,t,i){let r=x(),a=()=>!this._forceFullPlacement&&x()-r>2;for(;this._currentPlacementIndex>=0;){let r=t[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if((0,c.x)(r)&&r.layout&&(!r.minzoom||r.minzoom<=o)&&(!r.maxzoom||r.maxzoom>o)){if(this._inProgressLayer||=new mr(r),this._inProgressLayer.continuePlacement(i[r.source],this.placement,this._showCollisionBoxes,r,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}};const gr=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],vr=new Uint32Array(96);var yr=class e{static from(t){if(!t||void 0===t.byteLength||t.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[i,r]=new Uint8Array(t,0,2);if(219!==i)throw Error("Data does not appear to be in a KDBush format.");let a=r>>4;if(1!==a)throw Error(`Got v${a} data when expected v1.`);let o=gr[15&r];if(!o)throw Error("Unrecognized array type.");
vendor: 2,614 bytes, line 1172
1172let[n]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new e(s,n,o,void 0,t)}constructor(e,t=64,i=Float64Array,r=ArrayBuffer,a){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=i,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let o=gr.indexOf(this.ArrayType),n=2*e*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-s%8)%8;if(o<0)throw Error(`Unexpected typed array class: ${i}.`);if(a)this.data=a,this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+s+l,2*e),this._pos=2*e,this._finished=!0;else{let a=this.data=new r(8+n+s+l);this.ids=new this.IndexArrayType(a,8,e),this.coords=new i(a,8+s+l,2*e),this._pos=0,this._finished=!1,new Uint8Array(a,0,2).set([219,16+o]),new Uint16Array(a,2,1)[0]=t,new Uint32Array(a,4,1)[0]=e}}add(e,t){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=e,this.coords[this._pos++]=t,i}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return br(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,i,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:n}=this;vr[0]=0,vr[1]=a.length-1,vr[2]=0;let s=3,l=[];for(;s>0;){let h=vr[--s],c=vr[--s],u=vr[--s];if(c-u<=n){for(let n=u;n<=c;n++){let s=o[2*n],h=o[2*n+1];s>=e&&s<=i&&h>=t&&h<=r&&l.push(a[n])}continue}let d=u+c>>1,_=o[2*d],p=o[2*d+1];_>=e&&_<=i&&p>=t&&p<=r&&l.push(a[d]),(0===h?e<=_:t<=p)&&(vr[s++]=u,vr[s++]=d-1,vr[s++]=1-h),(0===h?i>=_:r>=p)&&(vr[s++]=d+1,vr[s++]=c,vr[s++]=1-h)}return l}within(e,t,i){let r=[];return this.withinInto(e,t,i,r),r}withinInto(e,t,i,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:n}=this;vr[0]=0,vr[1]=a.length-1,vr[2]=0;let s=3,l=0,h=i*i;for(;s>0;){let c=vr[--s],u=vr[--s],d=vr[--s];if(u-d<=n){for(let i=d;i<=u;i++)Pr(o[2*i],o[2*i+1],e,t)<=h&&(r[l++]=a[i]);continue}let _=d+u>>1,p=o[2*_],m=o[2*_+1];Pr(p,m,e,t)<=h&&(r[l++]=a[_]),(0===c?e-i<=p:t-i<=m)&&(vr[s++]=d,vr[s++]=_-1,vr[s++]=1-c),(0===c?e+i>=p:t+i>=m)&&(vr[s++]=_+1,vr[s++]=u,vr[s++]=1-c)}return l}};function br(e,t,i,r,a,o){if(a-r<=i)return;let n=r+a>>1;xr(e,t,n,r,a,o),br(e,t,i,r,n-1,1-o),br(e,t,i,n+1,a,1-o)}function xr(e,t,i,r,a,o){for(;a>r;){if(a-r>600){let n=a-r+1,s=i-r+1,l=Math.log(n),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(n-h)/n)*(s-n/2<0?-1:1);xr(e,t,i,Math.max(r,Math.floor(i-s*h/n+c)),Math.min(a,Math.floor(i+(n-s)*h/n+c)),o)}let n=t[2*i+o],s=r,l=a;
1172for(wr(e,t,r,i),t[2*a+o]>n&&wr(e,t,r,a);s<l;){for(wr(e,t,s,l),s++,l--;t[2*s+o]<n;)s++;for(;t[2*l+o]>n;)l--}t[2*r+o]===n?wr(e,t,r,l):(l++,wr(e,t,l,a)),l<=i&&(r=l+1),i<=l&&(a=l-1)}}function wr(e,t,i,r){Tr(e,i,r),Tr(t,2*i,2*r),Tr(t,2*i+1,2*r+1)}function Tr(e,t,i){let r=e[t];e[t]=e[i],e[i]=r}function Pr(e,t,i,r){let a=e-i,o=t-r;return a*a+o*o}const Mr=512/c.Rr/2;var Cr=class{constructor(e,t,i){this.tileID=e,this.bucketInstanceId=i,this._symbolsByKey={};let r=new Map;for(let e=0;e<t.length;e++){let i=t.get(e),a=i.key,o=r.get(a);o?o.push(i):r.set(a,[i])}for(let[e,t]of r){let i={positions:t.map(e=>({x:Math.floor(e.anchorX*Mr),y:Math.floor(e.anchorY*Mr)})),crossTileIDs:t.map(e=>e.crossTileID)};if(i.positions.length>128){let e=new yr(i.positions.length,16,Uint16Array);for(let{x:t,y:r}of i.positions)e.add(t,r);e.finish(),delete i.positions,i.index=e}this._symbolsByKey[e]=i}}getScaledCoordinates(e,t){let{x:i,y:r,z:a}=this.tileID.canonical,{x:o,y:n,z:s}=t.canonical,l=Mr/2**(s-a),h=(o*c.Rr+e.anchorX)*l,u=(n*c.Rr+e.anchorY)*l,d=i*c.Rr*Mr,_=r*c.Rr*Mr;return{x:Math.floor(h-d),y:Math.floor(u-_)}}
vendor: 5,176 bytes, line 1172
1172findMatches(e,t,i){let r=this.tileID.canonical.z<t.canonical.z?1:2**(this.tileID.canonical.z-t.canonical.z);for(let a=0;a<e.length;a++){let o=e.get(a);if(o.crossTileID)continue;let n=this._symbolsByKey[o.key];if(!n)continue;let s=this.getScaledCoordinates(o,t);n.index?this.findMatchesForIndexedEntry(n,o,s,r,i):n.positions&&this.findMatchesForNonIndexedEntry(n,o,s,r,i)}}findMatchesForIndexedEntry(e,t,i,r,a){let o=e.index.range(i.x-r,i.y-r,i.x+r,i.y+r),n=1/0;for(let t of o)t<n&&!a[e.crossTileIDs[t]]&&(n=t);if(n!==1/0){let i=e.crossTileIDs[n];a[i]=!0,t.crossTileID=i}}findMatchesForNonIndexedEntry(e,t,i,r,a){for(let o=0;o<e.positions.length;o++){let n=e.positions[o],s=e.crossTileIDs[o];if(Math.abs(n.x-i.x)<=r&&Math.abs(n.y-i.y)<=r&&!a[s]){a[s]=!0,t.crossTileID=s;break}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}},Ir=class{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}},Rr=class{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let i=this.indexes[e],r={};for(let e in i){let a=i[e];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+t),r[a.tileID.key]=a}this.indexes[e]=r}this.lng=e}addBucket(e,t,i){if(this.indexes[e.overscaledZ]?.[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;e<t.symbolInstances.length;e++){t.symbolInstances.get(e).crossTileID=0}this.usedCrossTileIDs[e.overscaledZ]||={};let r=this.usedCrossTileIDs[e.overscaledZ];for(let i in this.indexes){let a=this.indexes[i];if(Number(i)>e.overscaledZ)for(let i in a){let o=a[i];o.tileID.isChildOf(e)&&o.findMatches(t.symbolInstances,e,r)}else{let o=a[e.scaledTo(Number(i)).key];o&&o.findMatches(t.symbolInstances,e,r)}}for(let e=0;e<t.symbolInstances.length;e++){let a=t.symbolInstances.get(e);a.crossTileID||(a.crossTileID=i.generate(),r[a.crossTileID]=!0)}return void 0===this.indexes[e.overscaledZ]&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new Cr(e,t.symbolInstances,t.bucketInstanceId),!0}removeBucketCrossTileIDs(e,t){for(let i of t.getCrossTileIDsLists())for(let t of i)delete this.usedCrossTileIDs[e][t]}removeStaleBuckets(e){let t=!1;for(let i in this.indexes){let r=this.indexes[i];for(let a in r)e[r[a].bucketInstanceId]||(this.removeBucketCrossTileIDs(i,r[a]),delete r[a],t=!0)}return t}},Sr=class{constructor(){this.layerIndexes={},this.crossTileIDs=new Ir,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,t,i){let r=this.layerIndexes[e.id];void 0===r&&(r=this.layerIndexes[e.id]=new Rr);let a=!1,o={};r.handleWrapJump(i);for(let i of t){let t=i.getBucket(e);e.id===t?.layerIds[0]&&(t.bucketInstanceId||=(this.maxBucketInstanceId+=1,this.maxBucketInstanceId),r.addBucket(i.tileID,t,this.crossTileIDs)&&(a=!0),o[t.bucketInstanceId]=!0)}return r.removeStaleBuckets(o)&&(a=!0),a}pruneUnusedLayers(e){let t={};for(let i of e)t[i]=!0;for(let e in this.layerIndexes)t[e]||delete this.layerIndexes[e]}},Er="void main() {fragColor=vec4(1.0);}";const zr={prelude:Ar("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nout highp vec4 fragColor;layout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const uint packedOpacity) {return vec2(float(packedOpacity >> 1u)/127.0,float(packedOpacity & 1u));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);
1172return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+      c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+    c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+    c\n);}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform highp sampler2D u_depth;layout(std140) uniform TerrainUBO {highp mat4 u_terrain_matrix;highp vec4 u_terrain_unpack;highp float u_terrain_dim;highp float u_terrain_exaggeration;};\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(ivec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texelFetch(u_terrain,pos,0)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\n#ifdef GLOBE\nif ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}\n#endif\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+2.0;vec2 f=fract(coord);ivec2 c=ivec2(floor(coord));ivec2 hi=textureSize(u_terrain,0)-1;float tl=ele(clamp(c,ivec2(0),hi));float tr=ele(clamp(c+ivec2(1,0),ivec2(0),hi));float bl=ele(clamp(c+ivec2(0,1),ivec2(0),hi));float br=ele(clamp(c+ivec2(1,1),ivec2(0),hi));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}const float PI=3.141592653589793;\n#define PROJECTION_UBO\nlayout(std140) uniform ProjectionUBO {highp mat4 u_projection_matrix;highp mat4 u_projection_fallback_matrix;highp vec4 u_projection_tile_mercator_coords;highp vec4 u_projection_clipping_plane;highp float u_projection_transition;highp int u_projection_clip_antimeridian;};layout(std140) uniform FrameUBO {highp vec2 u_units_to_pixels;highp vec2 u_world_size;highp float u_camera_to_center_distance;highp float u_symbol_fade_change;highp float u_aspect_ratio;highp float u_device_pixel_ratio;highp vec2 u_viewport_size;highp vec2 u_pixel_extrude_scale;highp float u_pitch;};"),projectionMercator:Ar("\nvoid clipAntimeridian() {}","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Ar("in highp float v_projection_tile_x;void clipAntimeridian() {if (u_projection_clip_antimeridian !=0 && (v_projection_tile_x < 0.0 || v_projection_tile_x >=8192.0)) {discard;}}","#define GLOBE_RADIUS 6371008.8\n#ifndef PROJECTION_UBO\nuniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;\n#endif\nout highp float v_projection_tile_x;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos\n);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float t=exp(PI-(mercator_pos_y*PI*2.0));return (2.0*t)/(t*t+1.0);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;float spherical_x=mercator_pos.x*PI*2.0+PI;float t=exp(PI-(mercator_pos.y*PI*2.0));
1172float t2=t*t;float denom=t2+1.0;float sin_sy=(t2-1.0)/denom;float cos_sy=(2.0*t)/denom;vec3 pos=vec3(sin(spherical_x)*cos_sy,sin_sy,cos(spherical_x)*cos_sy\n);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {v_projection_tile_x=posInTile.x;vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}"),background:Ar("uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Ar("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ar("in vec3 v_data;flat in float v_visibility;\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define mediump float radius\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define highp vec4 stroke_color\n#pragma maplibre: define mediump float stroke_width\n#pragma maplibre: define lowp float stroke_opacity\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize mediump float radius\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize highp vec4 stroke_color\n#pragma maplibre: initialize mediump float stroke_width\n#pragma maplibre: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius
1172/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform vec2 u_translate;layout(location=0) in ivec2 a_pos;out vec3 v_data;flat out float v_visibility;\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define mediump float radius\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define highp vec4 stroke_color\n#pragma maplibre: define mediump float stroke_width\n#pragma maplibre: define lowp float stroke_opacity\nvoid main(void) {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize mediump float radius\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize highp vec4 stroke_color\n#pragma maplibre: initialize mediump float stroke_width\n#pragma maplibre: initialize lowp float stroke_opacity\nivec2 pos_raw=a_pos+32768;vec2 extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;vec2 circle_center=vec2(pos_raw >> 3)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {\n#ifdef GLOBE\nvec3 center_vector=projectToSphere(circle_center);\n#endif\nfloat angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {\n#ifdef GLOBE\nvec4 projected_center=interpolateProjection(circle_center,center_vector,ele);\n#else\nvec4 projected_center=projectTileWithElevation(circle_center,ele);\n#endif\ncorner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}\n#ifdef GLOBE\nvec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);\n#else\ngl_Position=projectTileWithElevation(corner_position,ele);\n#endif\n} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:Ar(Er,"layout(location=0) in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Ar("uniform highp float u_intensity;in vec2 v_extrude;\n#pragma maplibre: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma maplibre: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;layout(location=0) in ivec2 a_pos;out vec2 v_extrude;\n#pragma maplibre: define highp float weight\n#pragma maplibre: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma maplibre: initialize highp float weight\n#pragma maplibre: initialize mediump float radius\nivec2 pos_raw=a_pos+32768;vec2 unscaled_extrude=vec2(pos_raw & 7)/7.0*2.0-1.0;float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=vec2(pos_raw >> 3);\n#ifdef GLOBE\nvec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);\n#else\ngl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));\n#endif\n}"),heatmapTexture:Ar("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world_size,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ar("flat in float v_placed;flat in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","layout(location=0) in vec2 a_anchor_pos;layout(location=1) in vec2 a_placed;layout(location=2) in vec2 a_box_real;flat out float v_placed;flat out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ar("flat in float v_radius;in vec2 v_extrude;flat in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","layout(location=0) in vec2 a_pos;layout(location=1) in float a_radius;layout(location=2) in vec2 a_flags;flat out float v_radius;out vec2 v_extrude;flat out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:Ar("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {vec4 data=texelFetch(u_elevation_stops,ivec2(stop,0),0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else\n{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=2.0/u_dimension;float scale=(u_dimension.x-4.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:Ar("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","layout(location=0) in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Ar(Er,"layout(location=0) in vec2 a_pos;void main() {\n#ifdef GLOBE\ngl_Position=projectTileFor3D(a_pos,0.0);\n#else\ngl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);\n#endif\n}"),fill:Ar("#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize lowp float opacity\nfragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize lowp float opacity\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}"),fillOutline:Ar("in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define highp vec4 outline_color\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize highp vec4 outline_color\n#pragma maplibre: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define highp vec4 outline_color\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize highp vec4 outline_color\n#pragma maplibre: initialize lowp float opacity\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillOutlinePattern:Ar("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;uniform bool u_sdf_pattern;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\nvoid main() {\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*alpha*opacity;} else {fragColor=mix(color1,color2,u_fade)*alpha*opacity;}\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\n#pragma maplibre: define lowp float pixel_ratio_from\n#pragma maplibre: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\n#pragma maplibre: initialize lowp float pixel_ratio_from\n#pragma maplibre: initialize lowp float pixel_ratio_to\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world_size;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n}"),fillPattern:Ar("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform bool u_sdf_pattern;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\nvoid main() {\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);if (u_sdf_pattern) {highp float sdf_edge=(256.0-64.0)/256.0;highp float sdf_gamma_a=max(fwidth(color1.a)*0.5,1.0/255.0/16.0);highp float sdf_gamma_b=max(fwidth(color2.a)*0.5,1.0/255.0/16.0);float sdf_alpha_a=smoothstep(sdf_edge-sdf_gamma_a,sdf_edge+sdf_gamma_a,color1.a);float sdf_alpha_b=smoothstep(sdf_edge-sdf_gamma_b,sdf_edge+sdf_gamma_b,color2.a);fragColor=mix(color*sdf_alpha_a,color*sdf_alpha_b,u_fade)*opacity;} else {fragColor=mix(color1,color2,u_fade)*opacity;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\n#pragma maplibre: define lowp float pixel_ratio_from\n#pragma maplibre: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\n#pragma maplibre: initialize lowp float pixel_ratio_from\n#pragma maplibre: initialize lowp float pixel_ratio_to\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;
1172vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:Ar("in vec4 v_color;void main() {fragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed;\n#ifdef TERRAIN3D\nlayout(location=2) in vec2 a_centroid;\n#endif\nout vec4 v_color;\n#pragma maplibre: define highp float base\n#pragma maplibre: define highp float height\n#pragma maplibre: define highp vec4 color\nvoid main() {\n#pragma maplibre: initialize highp float base\n#pragma maplibre: initialize highp float height\n#pragma maplibre: initialize highp vec4 color\nvec3 normal=vec3(a_normal_ed.xyz);\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nfloat colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);\n#ifdef GLOBE\nmat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);\n#endif\ndirectional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:Ar("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;\n#pragma maplibre: define lowp float base\n#pragma maplibre: define lowp float height\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\n#pragma maplibre: define lowp float pixel_ratio_from\n#pragma maplibre: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maplibre: initialize lowp float base\n#pragma maplibre: initialize lowp float height\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\n#pragma maplibre: initialize lowp float pixel_ratio_from\n#pragma maplibre: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;layout(location=0) in vec2 a_pos;layout(location=1) in ivec4 a_normal_ed;\n#ifdef TERRAIN3D\nlayout(location=2) in vec2 a_centroid;\n#endif\n#ifdef GLOBE\nout vec3 v_sphere_pos;\n#endif\nout vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;\n#pragma maplibre: define lowp float base\n#pragma maplibre: define lowp float height\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\n#pragma maplibre: define lowp float pixel_ratio_from\n#pragma maplibre: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maplibre: initialize lowp float base\n#pragma maplibre: initialize lowp float height\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\n#pragma maplibre: initialize lowp float pixel_ratio_from\n#pragma maplibre: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=vec3(a_normal_ed.xyz);float edgedistance=float(a_normal_ed.w);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=float(a_normal_ed.x & 1);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;\n#ifdef GLOBE\nvec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);\n#else\ngl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);\n#endif\nvec2 pos=a_normal_ed.x==1 && a_normal_ed.y==0 && a_normal_ed.z==16384\n? a_pos\n: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:Ar("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(ivec2 texel) {vec4 data=texelFetch(u_image,texel,0)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {ivec2 pos=ivec2(gl_FragCoord.xy)+ivec2(1);float tileSize=u_dimension.x-4.0;float a=getElevation(pos+ivec2(-1,-1));float b=getElevation(pos+ivec2(0,-1));float c=getElevation(pos+ivec2(1,-1));float d=getElevation(pos+ivec2(-1,0));float e=getElevation(pos);float f=getElevation(pos+ivec2(1,0));float g=getElevation(pos+ivec2(-1,1));float h=getElevation(pos+ivec2(0,1));float i=getElevation(pos+ivec2(1,1));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/p
1172ow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;layout(location=0) in vec2 a_pos;layout(location=1) in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Ar("uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];\n#define PI 3.141592653589793\n#define STANDARD 0\n#define COMBINED 1\n#define IGOR 2\n#define MULTIDIRECTIONAL 3\n#define BASIC 4\nfloat get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else\n{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else\n{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec2 size=vec2(textureSize(u_image,0));vec2 texturePos=(v_pos*(size-2.0)+1.0)/size;vec4 pixel=texture(u_image,texturePos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Ar("flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\nclipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nlayout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define mediump float gapwidth\n#pragma maplibre: define lowp float offset\n#pragma maplibre: define mediump float width\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize mediump float gapwidth\n#pragma maplibre: initialize lowp float offset\n#pragma maplibre: initialize mediump float width\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);v_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*2.0;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
1172float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:Ar("uniform sampler2D u_image;flat in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\nclipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nlayout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define mediump float gapwidth\n#pragma maplibre: define lowp float offset\n#pragma maplibre: define mediump float width\nvoid main() {\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize mediump float gapwidth\n#pragma maplibre: initialize lowp float offset\n#pragma maplibre: initialize mediump float width\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:Ar("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;flat in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;flat in float v_width;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\n#pragma maplibre: define lowp float pixel_ratio_from\n#pragma maplibre: define lowp float pixel_ratio_to\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\n#pragma maplibre: initialize lowp float pixel_ratio_from\n#pragma maplibre: initialize lowp float pixel_ratio_to\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\nclipAntimeridian();vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nlayout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;out vec2 v_normal;flat out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;flat out float v_width;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define lowp float offset\n#pragma maplibre: define mediump float gapwidth\n#pragma maplibre: define mediump float width\n#pragma maplibre: define lowp float floorwidth\n#pragma maplibre: define lowp vec4 pattern_from\n#pragma maplibre: define lowp vec4 pattern_to\n#pragma maplibre: define lowp float pixel_ratio_from\n#pragma maplibre: define lowp float pixel_ratio_to\nvoid main() {\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize lowp float offset\n#pragma maplibre: initialize mediump float gapwidth\n#pragma maplibre: initialize mediump float width\n#pragma maplibre: initialize lowp float floorwidth\n#pragma maplibre: initialize mediump vec4 pattern_from\n#pragma maplibre: initialize mediump vec4 pattern_to\n#pragma maplibre: initialize lowp float pixel_ratio_from\n#pragma maplibre: initialize lowp float pixel_ratio_to\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
1172float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:Ar("uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define mediump float width\n#pragma maplibre: define lowp float floorwidth\n#pragma maplibre: define mediump vec4 dasharray_from\n#pragma maplibre: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize mediump float width\n#pragma maplibre: initialize lowp float floorwidth\n#pragma maplibre: initialize mediump vec4 dasharray_from\n#pragma maplibre: initialize mediump vec4 dasharray_to\nclipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);
1172float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nlayout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define highp vec4 color\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define mediump float gapwidth\n#pragma maplibre: define lowp float offset\n#pragma maplibre: define mediump float width\n#pragma maplibre: define lowp float floorwidth\n#pragma maplibre: define mediump vec4 dasharray_from\n#pragma maplibre: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maplibre: initialize highp vec4 color\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize mediump float gapwidth\n#pragma maplibre: initialize lowp float offset\n#pragma maplibre: initialize mediump float width\n#pragma maplibre: initialize lowp float floorwidth\n#pragma maplibre: initialize mediump vec4 dasharray_from\n#pragma maplibre: initialize mediump vec4 dasharray_to\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),lineGradientSDF:Ar("uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;flat in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;\n#ifdef GLOBE\nin float v_depth;\n#endif\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define mediump float width\n#pragma maplibre: define lowp float floorwidth\n#pragma maplibre: define mediump vec4 dasharray_from\n#pragma maplibre: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize mediump float width\n#pragma maplibre: initialize lowp float floorwidth\n#pragma maplibre: initialize mediump vec4 dasharray_from\n#pragma maplibre: initialize mediump vec4 dasharray_to\nclipAntimeridian();float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);
1172float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);\n#ifdef GLOBE\nif (v_depth > 1.0) {discard;}\n#endif\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nlayout(location=0) in ivec2 a_pos_normal;layout(location=1) in uvec4 a_data;layout(location=2) in float a_uv_x;layout(location=3) in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;flat out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;\n#ifdef GLOBE\nout float v_depth;\n#endif\n#pragma maplibre: define lowp float blur\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define mediump float gapwidth\n#pragma maplibre: define lowp float offset\n#pragma maplibre: define mediump float width\n#pragma maplibre: define lowp float floorwidth\n#pragma maplibre: define mediump vec4 dasharray_from\n#pragma maplibre: define mediump vec4 dasharray_to\nvoid main() {\n#pragma maplibre: initialize lowp float blur\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize mediump float gapwidth\n#pragma maplibre: initialize lowp float offset\n#pragma maplibre: initialize mediump float width\n#pragma maplibre: initialize lowp float floorwidth\n#pragma maplibre: initialize mediump vec4 dasharray_from\n#pragma maplibre: initialize mediump vec4 dasharray_to\nif (opacity < 0.01) {gl_Position=vec4(-2.0,-2.0,-2.0,1.0);return;}float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=vec2(ivec2(a_data.xy)-128);float a_direction=float(int(a_data.z & 3u)-1);float a_linesofar=float((a_data.z >> 2u)+a_data.w*64u)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=vec2(a_pos_normal >> 1);mediump vec2 normal=vec2(a_pos_normal & 1);normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;\n#ifdef GLOBE\nv_depth=gl_Position.z/gl_Position.w;\n#endif\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nfloat u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}"),layerOpacity:Ar("uniform sampler2D u_image;uniform float u_opacity;in vec2 v_pos;void main() {fragColor=texture(u_image,v_pos)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(0.0);\n#endif\n}","layout(location=0) in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=vec4(a_pos.x*2.0-1.0,1.0-a_pos.y*2.0,0.0,1.0);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),raster:Ar("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec3 v_pos0;in vec3 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0.xy/v_pos0.z);vec4 color1=texture(u_image1,v_pos1.xy/v_pos1.z);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec3 u_image_warp;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;layout(location=0) in vec2 a_pos;out vec3 v_pos0;out vec3 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 topLeft=u_coords_top.xy;vec2 topRight=u_coords_top.zw;vec2 bottomLeft=u_coords_bottom.xy;vec2 bottomRight=u_coords_bottom.zw;
1172vec2 bilinearPos=mix(mix(topLeft,topRight,fractionalPos.x),mix(bottomLeft,bottomRight,fractionalPos.x),fractionalPos.y);float denominator=dot(u_image_warp.xy,fractionalPos)+1.0;vec2 acrossTop=topRight-topLeft+u_image_warp.x*topRight;vec2 downLeft=bottomLeft-topLeft+u_image_warp.y*bottomLeft;vec2 projectivePos=(acrossTop*fractionalPos.x+downLeft*fractionalPos.y+topLeft)/denominator;vec2 position=mix(projectivePos,bilinearPos,u_image_warp.z);gl_Position=projectTile(position,position);vec2 texturePos=((fractionalPos-0.5)/u_buffer_scale)+0.5;\n#ifdef GLOBE\nif (a_pos.y <-32767.5) {texturePos.y=0.0;}if (a_pos.y > 32766.5) {texturePos.y=1.0;}\n#endif\nfloat perspectiveRatio=mix(1.0/denominator,1.0,u_image_warp.z);v_pos0=vec3(texturePos*perspectiveRatio,perspectiveRatio);vec2 parentPos=(texturePos*u_scale_parent)+u_tl_parent;v_pos1=vec3(parentPos*perspectiveRatio,perspectiveRatio);}"),symbolIcon:Ar("uniform sampler2D u_texture;in vec2 v_tex;flat in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform bool u_rotate_symbol;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_tex;flat out float v_total_opacity;\n#pragma maplibre: define lowp float opacity\nvoid main() {\n#pragma maplibre: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}"),symbolSDF:Ar("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;\n#pragma maplibre: define highp vec4 fill_color\n#pragma maplibre: define highp vec4 halo_color\n#pragma maplibre: define lowp float halo_width\n#pragma maplibre: define lowp float halo_blur\nvoid main() {\n#pragma maplibre: initialize highp vec4 fill_color\n#pragma maplibre: initialize highp vec4 halo_color\n#pragma maplibre: initialize lowp float halo_width\n#pragma maplibre: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec4 a_pixeloffset;layout(location=3) in vec3 a_projected_pos;layout(location=4) in uint a_fade_opacity;layout(location=5) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec2 v_data0;out vec3 v_data1;\n#pragma maplibre: define highp vec4 fill_color\n#pragma maplibre: define highp vec4 halo_color\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define lowp float halo_width\n#pragma maplibre: define lowp float halo_blur\nvoid main() {\n#pragma maplibre: initialize highp vec4 fill_color\n#pragma maplibre: initialize highp vec4 halo_color\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize lowp float halo_width\n#pragma maplibre: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}"),symbolTextAndIcon:Ar("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;in vec4 v_data0;in vec3 v_data1;flat in float v_is_sdf;\n#pragma maplibre: define highp vec4 fill_color\n#pragma maplibre: define highp vec4 halo_color\n#pragma maplibre: define lowp float halo_width\n#pragma maplibre: define lowp float halo_blur\nvoid main() {\n#pragma maplibre: initialize highp vec4 fill_color\n#pragma maplibre: initialize highp vec4 halo_color\n#pragma maplibre: initialize lowp float halo_width\n#pragma maplibre: initialize lowp float halo_blur\nfloat total_opacity=v_data1[2];if (v_is_sdf==ICON) {vec2 tex_icon=v_data0.zw;
1172fragColor=texture(u_texture_icon,tex_icon)*total_opacity;\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;}\n#ifdef OVERDRAW_INSPECTOR\nfragColor=vec4(1.0);\n#endif\n}","layout(location=0) in vec4 a_pos_offset;layout(location=1) in uvec4 a_data;layout(location=2) in vec3 a_projected_pos;layout(location=3) in uint a_fade_opacity;layout(location=4) in float a_height_offset;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;uniform bool u_is_offset;uniform bool u_height_anchor_ground;out vec4 v_data0;out vec3 v_data1;flat out float v_is_sdf;\n#pragma maplibre: define highp vec4 fill_color\n#pragma maplibre: define highp vec4 halo_color\n#pragma maplibre: define lowp float opacity\n#pragma maplibre: define lowp float halo_width\n#pragma maplibre: define lowp float halo_blur\nvoid main() {\n#pragma maplibre: initialize highp vec4 fill_color\n#pragma maplibre: initialize highp vec4 halo_color\n#pragma maplibre: initialize lowp float opacity\n#pragma maplibre: initialize lowp float halo_width\n#pragma maplibre: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=vec2(a_data.xy);vec2 a_size=vec2(a_data.zw);float a_size_min=float(a_data.z >> 1u);float is_sdf=float(a_data.z & 1u);float ele=a_height_offset+(u_height_anchor_ground ? get_elevation(a_pos) : 0.0);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_symbol_fade_change :-u_symbol_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);if (!u_is_offset) {size*=perspective_ratio;}float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;\n#ifdef GLOBE\nif(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}\n#endif\nvec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec3(gamma_scale,size,total_opacity);v_is_sdf=is_sdf;}"),terrain:Ar("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
1172float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","layout(location=0) in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ar("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","layout(location=0) in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),atmosphere:Ar("#ifdef GL_ES\nprecision highp float;\n#endif\nin vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758\n);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Ar("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;uniform vec3 u_globe_position;uniform float u_globe_radius;in vec3 v_view_direction;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (u_sky_blend > 0.0) {vec3 ray=normalize(v_view_direction);float globe_distance=length(u_globe_position);float angle_to_globe_center=acos(clamp(dot(ray,u_globe_position)/globe_distance,-1.0,1.0));float horizon_angle=asin(min(u_globe_radius/globe_distance,1.0));blend=mix(blend,(angle_to_globe_center-horizon_angle)*u_camera_to_center_distance*u_device_pixel_ratio,u_sky_blend);}if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","layout(location=0) in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 v_view_direction;void main() {v_view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,1.0,1.0);}")};function Ar(e,t){let i=/#pragma maplibre: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,r=t.match(/in ([\w]+) ([\w]+)/g),a=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),n=o?o.concat(a):a,s=r?r.length:0,l={};return e=e.replace(i,(e,t,i,r,a)=>(l[a]=!0,"define"===t?`\n#ifndef HAS_UNIFORM_u_${a}\nin ${i} ${r} ${a};\n#else\nuniform ${i} ${r} u_${a};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${a}\n    ${i} ${r} ${a} = u_${a};\n#endif\n`)),t=t.replace(i,(e,t,i,r,a)=>{let o="float"===r?"vec2":"vec4",n=a.match(/color/)?"color":o;return l[a]?"define"===t?`\n#ifndef HAS_UNIFORM_u_${a}\nuniform lowp float u_${a}_t;\nlayout(location = ${s++}) in ${i} ${o} a_${a};
1172\nout ${i} ${r} ${a};\n#else\nuniform ${i} ${r} u_${a};\n#endif\n`:"vec4"===n?`\n#ifndef HAS_UNIFORM_u_${a}\n    ${a} = a_${a};\n#else\n    ${i} ${r} ${a} = u_${a};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${a}\n    ${a} = unpack_mix_${n}(a_${a}, u_${a}_t);\n#else\n    ${i} ${r} ${a} = u_${a};\n#endif\n`:"define"===t?`\n#ifndef HAS_UNIFORM_u_${a}\nuniform lowp float u_${a}_t;\nlayout(location = ${s++}) in ${i} ${o} a_${a};\n#else\nuniform ${i} ${r} u_${a};\n#endif\n`:"vec4"===n?`\n#ifndef HAS_UNIFORM_u_${a}\n    ${i} ${r} ${a} = a_${a};\n#else\n    ${i} ${r} ${a} = u_${a};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${a}\n    ${i} ${r} ${a} = unpack_mix_${n}(a_${a}, u_${a}_t);\n#else\n    ${i} ${r} ${a} = u_${a};\n#endif\n`}),{fragmentSource:e,vertexSource:t,staticAttributes:r,staticUniforms:n}}const Dr="#define PROJECTION_MERCATOR",Lr="mercator";var Fr=class{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Lr}get shaderDefine(){return Dr}get shaderPreludeCode(){return zr.projectionMercator}get vertexShaderPreludeCode(){return zr.projectionMercator.vertexSource}get subdivisionGranularity(){return c.gt.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}destroy(){}getMeshFromTileID(e,t,i,r,a){if(this._cachedMesh)return this._cachedMesh;let o=new c.Ut;o.emplaceBack(0,0),o.emplaceBack(c.Rr,0),o.emplaceBack(0,c.Rr),o.emplaceBack(c.Rr,c.Rr);let n=e.createVertexBuffer(o,Ct.members),s=c.Rt.simpleSegment(0,0,4,2),l=new c.Kt;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3);let h=e.createIndexBuffer(l);return this._cachedMesh=new Mt(n,h,s),this._cachedMesh}recalculate(){}hasTransition(){return!1}},kr=class e{constructor(e=0,t=0,i=0,r=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(i)||i<0||isNaN(r)||r<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=i,this.right=r}interpolate(e,t,i){return null!=t.top&&null!=e.top&&(this.top=c.dn.number(e.top,t.top,i)),null!=t.bottom&&null!=e.bottom&&(this.bottom=c.dn.number(e.bottom,t.bottom,i)),null!=t.left&&null!=e.left&&(this.left=c.dn.number(e.left,t.left,i)),null!=t.right&&null!=e.right&&(this.right=c.dn.number(e.right,t.right,i)),this}getCenter(e,t){let i=(0,c.Vn)((this.left+e-this.right)/2,0,e),r=(0,c.Vn)((this.top+t-this.bottom)/2,0,t);return new c.Ri(i,r)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new e(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}};function Or(e,t){if(!e.renderWorldCopies||e.lngRange)return;let i=t.lng-e.center.lng;t.lng+=i>180?-360:i<-180?360:0}function jr(e){return Math.max(0,Math.floor(e))}var Br=class{constructor(e,t){this.applyConstrain=(e,t)=>null===this._constrainOverride?this._callbacks.defaultConstrain(e,t):this._constrainOverride(e,t),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=void 0===t?.renderWorldCopies||!!t?.renderWorldCopies,this._minZoom=t?.minZoom||0,this._maxZoom=t?.maxZoom||22,this._minPitch=null==t?.minPitch?0:t?.minPitch,this._maxPitch=null==t?.maxPitch?60:t?.maxPitch,this._constrainOverride=t?.constrainOverride??null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new c.st(0,0),this._elevation=0,this._zoom=0,this._tileZoom=jr(this._zoom),this._scale=(0,c.Ir)(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new kr,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,t,i){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=jr(this._zoom),this._scale=(0,c.Ir)(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new kr(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!i&&e.autoCalculateNearFarZ,t&&this.constrainInternal(),this._calcMatrices()}
1172get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){if(this._minZoom===e)return;this._minZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get maxZoom(){return this._maxZoom}setMaxZoom(e){if(this._maxZoom===e)return;this._maxZoom=e;let t=this._unmodified;this.setZoom(this.applyConstrain(this._center,this.zoom).zoom),this._unmodified=t}get minPitch(){return this._minPitch}setMinPitch(e){if(this._minPitch===e)return;this._minPitch=e;let t=this._unmodified;this.setPitch(Math.max(this.pitch,e)),this._unmodified=t}get maxPitch(){return this._maxPitch}setMaxPitch(e){if(this._maxPitch===e)return;this._maxPitch=e;let t=this._unmodified;this.setPitch(Math.min(this.pitch,e)),this._unmodified=t}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){void 0===e&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new c.Ri(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){let t=(0,c.Fr)(e,-180,180)*Math.PI/180;this._bearingInRadians!==t&&(this._unmodified=!1,this._bearingInRadians=t,this._calcMatrices(),this._rotationMatrix=d(),m(this._rotationMatrix,this._rotationMatrix,-this._bearingInRadians))}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let t=(0,c.Vn)(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==t&&(this._unmodified=!1,this._pitchInRadians=t,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return(0,c.Sr)(this._fovInRadians)}setFov(e){e=(0,c.Vn)(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=(0,c.Xn)(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let t=this.applyConstrain(this._center,e).zoom;this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this._tileZoom=Math.max(0,Math.floor(t)),this._scale=(0,c.Ir)(t),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){(e.lat!==this._center.lat||e.lng!==this._center.lng)&&(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,i){this._unmodified=!1,this._edgeInsets.interpolate(e,t,i),this.constrainInternal(),this._calcMatrices()}resize(e,t,i=!0){this._width=e,this._height=t,i&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){return 2!==this._latRange?.length||2!==this._lngRange?.length?null:new et([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-c.In,c.In])}getCameraQueryGeometry(e,t){if(1===t.length)return[t[0],e];{let{minX:i,minY:r,maxX:a,maxY:o}=c.dt.fromPoints(t).extend(e);return[new c.Ri(i,r),new c.Ri(a,r),new c.Ri(a,o),new c.Ri(i,o),new c.Ri(i,r)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:i}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(i),this._unmodified=e,this._constraining=!1}
1172_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=(0,c.Ci)(new Float64Array(16));(0,c.ji)(e,e,[this._width/2,-this._height/2,1]),(0,c.Mi)(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=(0,c.Ci)(new Float64Array(16)),(0,c.ji)(e,e,[1,-1,1]),(0,c.Mi)(e,e,[-1,-1,0]),(0,c.ji)(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e;let t=this.fovInRadians/2;this._cameraToCenterDistance=.5/Math.tan(t)*this._height}this._pixelPerMeter=(0,c.ot)(1,this.center.lat)*this.worldSize,this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,t,i,r){let a,o,n=void 0===i?this.bearing:i,s=r=void 0===r?this.pitch:r,{distanceToCenter:l,clampedElevation:h}=this._distanceToCenterFromAltElevationPitch(t,this.elevation,s),{x:u,y:d}=(0,c.K)(s,n),_=c.et.fromLngLat(e,t),p=(0,c.tt)(1,_.y),m=0;do{if(m+=1,m>10)break;o=l/p;let e=u*o,t=d*o;a=new c.et(_.x+e,_.y+t),p=1/a.meterInMercatorCoordinateUnits()}while(Math.abs(l-o*p)>1e-12);return{center:a.toLngLat(),elevation:h,zoom:(0,c.Or)(this.height/2/Math.tan(this.fovInRadians/2)/o/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e===0)return;let t=1/this.worldSize,i=(0,c.ot)(1,this.center.lat)*this.worldSize,r=c.et.fromLngLat(this.center,this.elevation),a=r.x/t,o=r.y/t,n=r.z/t,s=this.pitch,l=this.bearing,{x:h,y:u,z:d}=(0,c.K)(s,l),_=this.cameraToCenterDistance,p=a+_*-h,m=o+_*-u,f=n+_*d,{distanceToCenter:g,clampedElevation:v}=this._distanceToCenterFromAltElevationPitch(f/i,e,s),y=g*i,b=p+h*y,x=m+u*y,w=new c.et(b*t,x*t,0).toLngLat(),T=(0,c.ot)(1,w.lat),P=(0,c.Or)(this.height/2/Math.tan(this.fovInRadians/2)/g/T/this.tileSize);this._elevation=v,this._center=w,this.setZoom(P)}_distanceToCenterFromAltElevationPitch(e,t,i){let r,a=-Math.cos((0,c.Xn)(i)),o=e-t,n=t;return a*o>=0||Math.abs(a)<.1?(r=1e4,n=e+r*a):r=-o/a,{distanceToCenter:r,clampedElevation:n}}getCameraPoint(){let e=this.pitchInRadians,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new c.Ri(t*Math.sin(this.rollInRadians),t*Math.cos(this.rollInRadians)))}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let t=e.canonical.z>=0?1<<e.canonical.z:2**e.canonical.z;return[e.canonical.x/t,e.canonical.y/t,1/t/c.Rr,1/t/c.Rr]}},Zr=class{distanceToTile2d(e,t,i,r){let a=r,o=a.distanceX([e,t]),n=a.distanceY([e,t]);return Math.hypot(o,n)}getWrap(e,t,i){return i}getTileBoundingVolume(e,t,i,r){let a=Math.min(0,i),o=Math.max(0,i);if(r?.terrain){let i=new c.d(e.z,t,e.z,e.x,e.y),n=r.terrain.getMinMaxElevation(i);a=n.minElevation??a,o=n.maxElevation??o}let n=1<<e.z;return new Yt([t+e.x/n,e.y/n,a],[t+(e.x+1)/n,(e.y+1)/n,o])}allowVariableZoom(e,t){let i=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,r=(0,c.Vn)(78.5-i/2,0,60);return!!t.terrain||e.pitch>r}allowWorldCopies(){return!0}prepareNextFrame(){}};const Ur=(0,c.qt)([{name:"a_pos3d",type:"Int16",components:3}]);var Nr=class extends c.yn{constructor(e){super(),this._lastTilesetChange=x(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null,this.releaseAllRTT()}getSource(){return this.tileManager._source}update(e,t){this.tileManager.update(e,t),this._renderableTilesKeys=[];let i={},r=!1;for(let a of ci(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:t,calculateTileZoom:this.tileManager._source.calculateTileZoom}))i[a.key]=!0,this._renderableTilesKeys.push(a.key),this._tiles[a.key]||(a.terrainRttPosMatrix32f=new Float32Array(16),(0,c.Ei)(a.terrainRttPosMatrix32f,0,c.Rr,c.Rr,0,0,1),this._tiles[a.key]=new Ht(a,this.tileSize),this._lastTilesetChange=x(),r=!0);for(let e in this._tiles)i[e]||(this._tiles[e].releaseRTT(this.tileManager.map.painter),delete this._tiles[e],r=!0);return r}releaseRTT(e){for(let t in this._tiles){let i=this._tiles[t];(i.tileID.equals(e)||i.tileID.isChildOf(e)||e.isChildOf(i.tileID))&&i.releaseRTT(this.tileManager.map.painter)}}releaseAllRTT(){for(let e in this._tiles)this._tiles[e].releaseRTT(this.tileManager.map.painter)}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let t={};for(let i of this._renderableTilesKeys){let r=this._tiles[i].tileID,a=e.clone(),o=(0,c.Gn)();if(r.canonical.equals(e.canonical))(0,c.Ei)(o,0,c.Rr,c.Rr,0,0,1);else if(r.canonical.isChildOf(e.canonical)){let t=r.canonical.z-e.canonical.z,i=r.canonical.x-(r.canonical.x>>t<<t),a=r.canonical.y-(r.canonical.y>>t<<t),n=c.Rr>>t;(0,c.Ei)(o,0,n,n,0,0,1),(0,c.Mi)(o,o,[-i*n,-a*n,0])}else{if(!e.canonical.isChildOf(r.canonical))continue;{let t=e.canonical.z-r.canonical.z,i=e.canonical.x-(e.canonical.x>>t<<t),a=e.canonical.y-(e.canonical.y>>t<<t),n=c.Rr>>t;(0,c.Ei)(o,0,c.Rr,c.Rr,0,0,1),(0,c.Mi)(o,o,[i*n,a*n,0]),(0,c.ji)(o,o,[1/2**t,1/2**t,0])}}a.terrainRttPosMatrix32f=new Float32Array(o),t[i]=a}return t}_getTerrainCoordsForTileRanges(e,t){let i={};for(let r of this._renderableTilesKeys){let a=this._tiles[r].tileID;if(!this._isWithinTileRanges(a,t))continue;let o=e.clone(),n=(0,c.Gn)();if(a.canonical.z===e.canonical.z){let t=e.canonical.x-a.canonical.x+e.wrap*(1<<e.canonical.z),i=e.canonical.y-a.canonical.y;(0,c.Ei)(n,0,c.Rr,c.Rr,0,0,1),(0,c.Mi)(n,n,[t*c.Rr,i*c.Rr,0])}else if(a.canonical.z>e.canonical.z){let t=a.canonical.z-e.canonical.z,i=a.canonical.x-(a.canonical.x>>
1172t<<t)+e.wrap*(1<<a.canonical.z),r=a.canonical.y-(a.canonical.y>>t<<t),o=e.canonical.x-(a.canonical.x>>t),s=e.canonical.y-(a.canonical.y>>t),l=c.Rr>>t;(0,c.Ei)(n,0,l,l,0,0,1),(0,c.Mi)(n,n,[-i*l+o*c.Rr,-r*l+s*c.Rr,0])}else{let t=e.canonical.z-a.canonical.z,i=e.canonical.x-(e.canonical.x>>t<<t)+e.wrap*(1<<e.canonical.z),r=e.canonical.y-(e.canonical.y>>t<<t),o=(e.canonical.x>>t)-a.canonical.x,s=(e.canonical.y>>t)-a.canonical.y,l=c.Rr<<t;(0,c.Ei)(n,0,l,l,0,0,1),(0,c.Mi)(n,n,[i*c.Rr+o*l,r*c.Rr+s*l,0])}o.terrainRttPosMatrix32f=new Float32Array(n),i[r]=o}return i}getSourceTile(e,t){let i=this.tileManager._source,r=e.overscaledZ-this.deltaZoom;if(r>i.maxzoom&&(r=i.maxzoom),r<i.minzoom)return;this._sourceTileCache[e.key]||=e.scaledTo(r).key;let a=this.findTileInCaches(this._sourceTileCache[e.key]);if(!a?.dem&&t)for(;r>=i.minzoom&&!a?.dem;)a=this.findTileInCaches(e.scaledTo(r--).key);return a}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e),t)}anyTilesAfterTime(e=x()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let i=t[e.canonical.z];return!!i&&(e.wrap>i.minWrap||e.wrap<i.maxWrap||e.canonical.x>=i.minTileXWrapped&&e.canonical.x<=i.maxTileXWrapped&&e.canonical.y>=i.minTileY&&e.canonical.y<=i.maxTileY)}};const Gr=.999999999999*c.Rr;var Vr=class{constructor(e,t,i,r="auto"){this._meshCache={},this.painter=e,this.tileManager=new Nr(t),this.options=i,this.exaggeration="number"==typeof i.exaggeration?i.exaggeration:1,this._terrainSkirtLength=r,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache=new Map,this._elevationSamplerCache=new Map}destroy(){this._fbo&&=(this._fbo.destroy(),null),this._fboDepthTexture&&=(this._fboDepthTexture.destroy(),null),this._emptyDemTexture&&=(this._emptyDemTexture.destroy(),null),this._emptyDepthTexture&&=(this._emptyDepthTexture.destroy(),null);for(let e in this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,t,i,r=c.Rr){let a=e.normalizeCoordinates(t,i,r);if(!a)return 0;let o=this.getElevationSampler(a.tileID);return o?o(a.x,a.y,r):0}getElevationForLngLatZoom(e,t){if(!(0,c.h)(t,e.wrap()))return 0;let{tileID:i,mercatorX:r,mercatorY:a}=this._getOverscaledTileIDFromLngLatZoom(e,t);return this.getElevation(i,r%c.Rr,a%c.Rr,c.Rr)}getElevationForLngLat(e,t){let i=this.getCoverageIndex();if(i){let t=c.et.fromLngLat(e),r=qr(i,this.exaggeration,t.x,t.y);if(r.demLoaded)return r.elevation}let r=ci(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),a=0;for(let e of r)e.canonical.z>a&&(a=Math.min(e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,a)}getElevation(e,t,i,r=c.Rr){return this.getDEMElevation(e,t,i,r)*this.exaggeration}resetElevationCache(){this._elevationSamplerCache.clear(),this._coverageIndex=void 0}getCoverageIndex(){return void 0===this._coverageIndex&&(this._coverageIndex=this._buildCoverageIndex()),this._coverageIndex}_buildCoverageIndex(){let e=[],t=new Map,i=0,r=0;for(let a of this.tileManager.getRenderableTiles()){if(!a)continue;let{canonical:o,wrap:n}=a.tileID;e.includes(o.z)||e.push(o.z);let s=this.getElevationSampler(a.tileID);t.set(`${n}/${o.z}/${o.x}/${o.y}`,s);let{minElevation:l,maxElevation:h}=this.getMinMaxElevation(a.tileID);i=Math.min(i,l??0),r=Math.max(r,h??0)}return 0===t.size?null:(e.sort((e,t)=>t-e),{zooms:e,samplerPerTile:t,minElevation:i-10,maxElevation:r+10})}getElevationSampler(e){let t=e.key,i=this._elevationSamplerCache.get(t);if(i)return i;let r=this.tileManager.getSourceTile(e,!0),a=r?.dem;if(!r||!a)return null;let o=this._getDEMTileMatrix(e,r),n=o[0]*a.dim,s=o[5]*a.dim,l=o[12]*a.dim,h=o[13]*a.dim,u=(e,t,i)=>{let r=8192===i?1:c.Rr/i;return a.sampleBilinear(e*r*n+l,t*r*s+h)};return this._elevationSamplerCache.set(t,u),u}_getDEMTileMatrix(e,t){let i=`${t.tileID.key}/${e.key}`,r=this._demMatrixCache.get(i);if(r)return r;let a=this.tileManager.getSource().maxzoom,o=e.canonical.z-t.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=a?o=e.canonical.z-a:(0,c.Pr)("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let n=e.canonical.x-(e.canonical.x>>o<<o),s=e.canonical.y-(e.canonical.y>>o<<o),l=(0,c.Si)(new Float64Array(16),[1/(c.Rr<<o),1/(c.Rr<<o),0]);return(0,c.Mi)(l,l,[n*c.Rr,s*c.Rr,0]),this._demMatrixCache.set(i,l),l}getTerrainData(e){if(!this._emptyDemTexture){let e=this.painter.context,t=new c.Tt({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new c.yt(e,t,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new c.yt(e,new c.Tt({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=(0,c.Ci)([])}let t=this.tileManager.getSourceTile(e,!0);if(t?.dem&&(!t.demTexture||t.needsTerrainPrepare)){let e=this.painter.context;t.demTexture||=this.painter.getTileTexture(t.dem.stride),t.demTexture?t.demTexture.update(t.dem.getPixels(),{premultiply:!1}):t.demTexture=new c.yt(e,t.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),t.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),t.needsTerrainPrepare=!1}let i=t?this._getDEMTileMatrix(e,t):this._emptyDemMatrix;return{u_depth:2,u_terrain:3,u_terrain_dim:t?.dem?.dim||1,u_terrain_matrix:i,u_terrain_unpack:t?.dem?.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(t?.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:t}}getFramebuffer(){let e=this.painter,t=e.width/devicePixelRatio,i=e.height/devicePixelRatio;return this._fbo&&(this._fbo.width!==t||this._fbo.height!==i)&&(this._fbo.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture),this._fboDepthTexture||(this._fboDepthTexture=new c.yt(e.context,{width:t,height:i,data:null},e.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(e.context.gl.NEAREST,e.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=e.context.createFramebuffer(t,i,!0,!1),this._fbo.depthAttachment.set(e.context.createRenderbuffer(e.context.gl.DEPTH_COMPONENT16,t,i))),this._fbo.colorAttachment.set(this._fboDepthTexture.texture),this._fbo}depthAtPoint(e){let t=new Uint8Array(4),i=this.painter.context,r=i.gl;return i.bindFramebuffer.set(this.getFramebuffer().framebuffer),r.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,r.RGBA,r.UNSIGNED_BYTE,t),i.bindFramebuffer.set(null),(t[0]/16777216+t[1]/65536+t[2]/256+t[3])/256}getTerrainMesh(e){let t=this.painter.style.projection?.transitionState>0,i=t&&0===e.canonical.y,r=t&&e.canonical.y===(1<<e.canonical.z)-1,a=`m_${i?"n":""}_${r?"s":""}`;if(this._meshCache[a])return this._meshCache[a];let o=this.painter.context,n=new c.Ht,s=new c.Kt,l=this.meshSize,h=c.Rr/l,u=l*l;for(let e=0;e<=l;e++)for(let t=0;t<=l;t++)n.emplaceBack(t*h,e*h,0);for(let e=0;e<u;e+=l+1)for(let t=0;t<l;t++)s.emplaceBack(t+e,l+t+e+1,l+t+e+2),s.emplaceBack(t+e,l+t+e+2,t+e+1);"none"!==this._terrainSkirtLength&&this._buildSkirts(n,s,l,h,i,r);let d=new Mt(o.createVertexBuffer(n,Ur.members),o.createIndexBuffer(s),c.Rt.simpleSegment(0,0,n.length,s.length));return this._meshCache[a]=d,d}getSkirtLength(e){return 2*Math.PI*c.ct/2**Math.max(e,0)/5}getMinTileElevationForLngLatZoom(e,t){if(!(0,c.h)(t,e.wrap()))return 0;let{tileID:i}=this._getOverscaledTileIDFromLngLatZoom(e,t);return this.getMinMaxElevation(i).minElevation??0}getMinMaxElevation(e){let t=this.tileManager.getSourceTile(e,!0),i={minElevation:null,maxElevation:null};return t?.dem&&(i.minElevation=t.dem.min*this.exaggeration,i.maxElevation=t.dem.max*this.exaggeration),i}_getOverscaledTileIDFromLngLatZoom(e,t){let i=c.et.fromLngLat(e.wrap()),r=(1<<t)*c.Rr,a=i.x*r,o=i.y*r,n=Math.floor(a/c.Rr),s=Math.floor(o/c.Rr);return{tileID:new c.d(t,0,t,n,s),mercatorX:a,mercatorY:o}}_buildSkirts(e,t,i,r,a,o){let n=e.length,s=n+(i+1),l=(i+1)*i,h=a?c.pt:0,u=+!a,d=o?c.mt:c.Rr,_=+!o;for(let t=0;t<=i;t++)e.emplaceBack(t*r,h,u);for(let t=0;t<=i;t++)e.emplaceBack(t*r,d,_);for(let e=0;e<i;e++)t.emplaceBack(l+e,s+e,s+e+1),t.emplaceBack(l+e,s+e+1,l+e+1),t.emplaceBack(0+e,n+e+1,n+e),t.emplaceBack(0+e,0+e+1,n+e+1);let p=e.length,m=p+2*(i+1);for(let t of[0,1])for(let a=0;a<=i;a++)for(let i of[0,1])e.emplaceBack(t*c.Rr,a*r,i);for(let e=0;e<2*i;e+=2)t.emplaceBack(p+e,p+e+1,p+e+3),t.emplaceBack(p+e,p+e+3,p+e+2),t.emplaceBack(m+e,m+e+3,m+e+1),t.emplaceBack(m+e,m+e+2,m+e+3)}};const Wr={covered:!1,demLoaded:!1,elevation:0};function qr(e,t,i,r){if(r<0||r>=1)return Wr;let a=Math.floor(i),o=i-a;for(let i of e.zooms){let n=1<<i,s=o*n,l=r*n,h=Math.floor(s),u=Math.floor(l),d=`${a}/${i}/${h}/${u}`;if(!e.samplerPerTile.has(d))continue;let _=e.samplerPerTile.get(d);return _?{covered:!0,demLoaded:!0,elevation:_(Math.min((s-h)*c.Rr,Gr),Math.min((l-u)*c.Rr,Gr),c.Rr)*t}:{covered:!0,demLoaded:!1,elevation:0}}return Wr}function $r(e,t){return e.covered&&t<=e.elevation+1e-6}function Hr(e,t,i,r,a){for(let o=0;o<40&&r-i>a;o++){let a=(i+r)/2;t(e,a)?r=a:i=a}return{lo:i,hi:r}}
1172var Xr=class e{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,i){this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,i=!0){this._helper.resize(e,t,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(e){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(e,t)=>{t=(0,c.Vn)(+t,this.minZoom,this.maxZoom);let i={center:new c.st(e.lng,e.lat),zoom:t},r=this._helper._lngRange;!this._helper._renderWorldCopies&&null===r&&(r=[-179.9999999999,179.9999999999]);let a=this.tileSize*(0,c.Ir)(i.zoom),o=0,n=a,s=0,l=a,h=0,u=0,{x:d,y:_}=this.size;if(this._helper._latRange){let e=this._helper._latRange;o=(0,c.at)(e[1])*a,n=(0,c.at)(e[0])*a,n-o<_&&(h=_/(n-o))}r&&(s=(0,c.Fr)((0,c.it)(r[0])*a,0,a),l=(0,c.Fr)((0,c.it)(r[1])*a,0,a),l<s&&(l+=a),l-s<d&&(u=d/(l-s)));let p,m,{x:f,y:g}=(0,c.Z)(a,e),v=Math.max(u||0,h||0);if(v){let e=new c.Ri(u?(l+s)/2:f,h?(n+o)/2:g);return i.center=(0,c.$)(a,e).wrap(),i.zoom+=(0,c.Or)(v),i}if(this._helper._latRange){let e=_/2;g-e<o&&(m=o+e),g+e>n&&(m=n-e)}if(r){let e=(s+l)/2,t=f;
1172this._helper._renderWorldCopies&&(t=(0,c.Fr)(f,e-a/2,e+a/2));let i=d/2;t-i<s&&(p=s+i),t+i>l&&(p=l-i)}if(void 0!==p||void 0!==m){let e=new c.Ri(p??f,m??g);i.center=(0,c.$)(a,e).wrap()}return i},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new Br({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new Zr}clone(){let t=new e;return t.apply(this,!1),t}apply(e,t,i){this._helper.apply(e,t,i)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){let t=[new c.f(0,e)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new c.Ri(0,0)),r=this.screenPointToMercatorCoordinate(new c.Ri(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new c.Ri(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new c.Ri(0,this._helper._height)),n=Math.floor(Math.min(i.x,r.x,a.x,o.x)),s=Math.floor(Math.max(i.x,r.x,a.x,o.x));for(let i=n-1;i<=s+1;i++)0!==i&&t.push(new c.f(i,e))}return t}getCameraFrustum(){return Jt.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let t=this.screenPointToLocation(this.centerPoint,e),i=e?e.getElevationForLngLat(t,this):0;this._helper.recalculateZoomAndCenter(i)}setLocationAtPoint(e,t,i=this.elevation){let r=i-this.elevation,a=this.screenPointToMercatorCoordinateAtZ(t,r),o=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,0),n=c.et.fromLngLat(e),s=new c.et(n.x-(a.x-o.x),n.y-(a.y-o.y));this.setCenter(s?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,t){return t?this.coordinatePoint(c.et.fromLngLat(e),t.getElevationForLngLat(e,this),this._pixelMatrix3D):this.coordinatePoint(c.et.fromLngLat(e))}screenPointToLocation(e,t){return this.screenPointToMercatorCoordinate(e,t)?.toLngLat()}screenPointToLocationAtElevation(e,t){return this.screenPointToMercatorCoordinateAtZ(e,t-this.elevation)?.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){let i=this.screenTerrainPointToMercatorCoordinate(e,t);if(null!=i)return i}return this.screenPointToMercatorCoordinateAtZ(e)}screenTerrainPointToMercatorCoordinate(e,t){let i=t.getCoverageIndex();if(!i)return null;let{near:r,far:a}=this.getRaySegmentFromPixel(e),o=this.worldSize,n=a[0]-r[0],s=a[1]-r[1],l=a[2]-r[2],h={index:i,exaggeration:t.exaggeration,near:r,dx:n,dy:s,dz:l,worldSize:o},u=0,d=1;if(0===l){if(r[2]>i.maxElevation||r[2]<i.minElevation)return null}else{let e=(i.maxElevation-r[2])/l,t=(i.minElevation-r[2])/l;if(u=Math.max(u,Math.min(e,t)),d=Math.min(d,Math.max(e,t)),u>d)return null}let _=Math.hypot(n,s),p=(0,c.Vn)(Math.ceil(_*(d-u)/4),1,512),m=0,f=!Yr(h,0);for(let e=0;e<=p;e++){let t=u+(d-u)*e/p;if(f){if(Yr(h,t)){let{lo:e,hi:i}=Hr(h,Yr,m,t,.001/_),a=Kr(h,e),u=Kr(h,i),d=r[2]+e*l-a.elevation,p=r[2]+i*l-u.elevation,f=a.covered&&d>p?(0,c.Vn)(e+d*(i-e)/(d-p),e,i):i;return new c.et((r[0]+f*n)/o,(r[1]+f*s)/o,Kr(h,f).elevation)}}else f=!Yr(h,t);m=t}return null}getRaySegmentFromPixel(e){let t=[e.x,e.y,0,1],i=[e.x,e.y,1,1];(0,c.Xr)(t,t,this._pixelMatrixInverse),(0,c.Xr)(i,i,this._pixelMatrixInverse);let r=t[3],a=i[3],o=this.elevation;return{near:[t[0]/r,t[1]/r,t[2]/r+o],far:[i[0]/a,i[1]/a,i[2]/a+o]}}screenPointToMercatorCoordinateAtZ(e,t){let i=t||0,{near:r,far:a}=this.getRaySegmentFromPixel(e),o=r[2]===a[2]?0:(i+this.elevation-r[2])/(a[2]-r[2]);return new c.et(c.dn.number(r[0],a[0],o)/this.worldSize,c.dn.number(r[1],a[1],o)/this.worldSize,i)}coordinatePoint(e,t=0,i=this._pixelMatrix){let r=[e.x*this.worldSize,e.y*this.worldSize,t,1];return(0,c.Xr)(r,r,i),new c.Ri(r[0]/r[3],r[1]/r[3])}getBounds(){let e=Math.max(0,this._helper._height/2-(0,c.Y)(this));return(new et).extend(this.screenPointToLocation(new c.Ri(0,e))).extend(this.screenPointToLocation(new c.Ri(this._helper._width,e))).extend(this.screenPointToLocation(new c.Ri(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new c.Ri(0,this._helper._height)))}
1172isPointOnMapSurface(e,t){return t?null!=this.screenTerrainPointToMercatorCoordinate(e,t):e.y>this.height/2-(0,c.Y)(this)}calculatePosMatrix(e,t=!1,i=!1){let r=e.key??(0,c.p)(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),a=t?this._alignedPosMatrixCache:this._posMatrixCache;if(a.has(r)){let e=a.get(r);return i?e.f32:e.f64}let o=(0,c.G)(e,this.worldSize);(0,c.Ti)(o,t?this._alignedProjMatrix:this._viewProjMatrix,o);let n={f64:o,f32:new Float32Array(o)};return a.set(r,n),i?n.f32:n.f64}calculateFogMatrix(e){let t=e.key,i=this._fogMatrixCacheF32;if(i.has(t))return i.get(t);let r=(0,c.G)(e,this.worldSize);return(0,c.Ti)(r,this._fogMatrix,r),i.set(t,new Float32Array(r)),i.get(t)}calculateCenterFromCameraLngLatAlt(e,t,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,r)}calculateCameraOptionsFromTo(e,t,i,r){let a=c.et.fromLngLat(e,t),o=c.et.fromLngLat(i,r),n=o.x-a.x,s=o.y-a.y,l=o.z-a.z,h=Math.hypot(n,s,l);if(0===h)throw Error("Can't calculate camera options with same From and To");let u=Math.hypot(n,s),d=(0,c.Or)(this.cameraToCenterDistance/h/this.tileSize),_=(0,c.Sr)(Math.atan2(n,-s)),p=(0,c.Sr)(Math.acos(u/h));return p=l<0?90-p:90+p,{center:o.toLngLat(),elevation:r,zoom:d,pitch:p,bearing:_}}_calculateNearFarZIfNeeded(e,t,i){if(!this._helper.autoCalculateNearFarZ)return;let r=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=e-r*this._helper._pixelPerMeter/Math.cos(t),o=r<0?a:e,n=Math.PI/2+this.pitchInRadians,s=(0,c.Xn)(this.fov)*(Math.abs(Math.cos((0,c.Xn)(this.roll)))*this.height+Math.abs(Math.sin((0,c.Xn)(this.roll)))*this.width)/this.height*(.5+i.y/this.height),l=Math.sin(s)*o/Math.sin((0,c.Vn)(Math.PI-n-s,.01,Math.PI-.01)),h=(0,c.Y)(this),u=Math.atan(h/this._helper.cameraToCenterDistance),d=(0,c.Xn)(90-c.X),_=u>d?2*u*(.5+i.y/(2*h)):d,p=Math.sin(_)*o/Math.sin((0,c.Vn)(Math.PI-n-_,.01,Math.PI-.01)),m=Math.min(l,p);this._helper._farZ=1.01*(Math.cos(Math.PI/2-t)*m+o),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let e,t=this.centerOffset,i=(0,c.Z)(this.worldSize,this.center),r=i.x,a=i.y,o=(0,c.Xn)(Math.min(this.pitch,c.X)),n=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(o));this._calculateNearFarZIfNeeded(n,o,t),e=new Float64Array(16),(0,c.Di)(e,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),Ii(this._invProjMatrix,e),e[8]=2*-t.x/this._helper._width,e[9]=2*t.y/this._helper._height,this._projectionMatrix=(0,c._i)(e),(0,c.ji)(e,e,[1,-1,1]),(0,c.Mi)(e,e,[0,0,-this._helper.cameraToCenterDistance]),(0,c.Ai)(e,e,-this.rollInRadians),(0,c.Oi)(e,e,this.pitchInRadians),(0,c.Ai)(e,e,-this.bearingInRadians),(0,c.Mi)(e,e,[-r,-a,0]),this._mercatorMatrix=(0,c.ji)([],e,[this.worldSize,this.worldSize,this.worldSize]),(0,c.ji)(e,e,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=(0,c.Ti)(new Float64Array(16),this.clipSpaceToPixelsMatrix,e),(0,c.Mi)(e,e,[0,0,-this.elevation]),this._viewProjMatrix=e,this._invViewProjMatrix=(0,c.wi)([],e);let s=[0,0,-1,1];(0,c.Xr)(s,s,this._invViewProjMatrix),this._cameraPosition=[s[0]/s[3],s[1]/s[3],s[2]/s[3]],this._fogMatrix=new Float64Array(16),(0,c.Di)(this._fogMatrix,this.fovInRadians,this.width/this.height,n,this._helper._farZ),this._fogMatrix[8]=2*-t.x/this.width,this._fogMatrix[9]=2*t.y/this.height,(0,c.ji)(this._fogMatrix,this._fogMatrix,[1,-1,1]),(0,c.Mi)(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),(0,c.Ai)(this._fogMatrix,this._fogMatrix,-this.rollInRadians),(0,c.Oi)(this._fogMatrix,this._fogMatrix,this.pitchInRadians),(0,c.Ai)(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),(0,c.Mi)(this._fogMatrix,this._fogMatrix,[-r,-a,0]),(0,c.ji)(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),(0,c.Mi)(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=(0,c.Ti)(new Float64Array(16),this.clipSpaceToPixelsMatrix,e);let l=this._helper._width%2/2,h=this._helper._height%2/2,u=Math.cos(this.bearingInRadians),d=Math.sin(-this.bearingInRadians),_=r-Math.round(r)+u*l+d*h,p=a-Math.round(a)+u*h+d*l,m=new Float64Array(e);if((0,c.Mi)(m,m,[_>.5?_-1:_,p>
1172.5?p-1:p,0]),this._alignedProjMatrix=m,e=(0,c.wi)(new Float64Array(16),this._pixelMatrix),!e)throw Error("failed to invert matrix");this._pixelMatrixInverse=e,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new c.Ri(0,0)),t=[e.x*this.worldSize,e.y*this.worldSize,0,1];return(0,c.Xr)(t,t,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this.cameraToCenterDistance/this.pixelsPerMeter+this.elevation}getCameraLngLat(){let e=(0,c.ot)(1,this.center.lat)*this.worldSize,t=this._helper.cameraToCenterDistance/e;return(0,c.J)(this.center,this.elevation,this.pitch,this.bearing,t).toLngLat()}lngLatToCameraDepth(e,t){let i=c.et.fromLngLat(e),r=[i.x*this.worldSize,i.y*this.worldSize,t,1];return(0,c.Xr)(r,r,this._viewProjMatrix),r[2]/r[3]}getProjectionData(e){let t,{overscaledTileID:i,aligned:r,applyTerrainMatrix:a}=e,o=this._helper.getMercatorTileCoordinates(i),n=i?this.calculatePosMatrix(i,r,!0):null;return t=i?.terrainRttPosMatrix32f&&a?i.terrainRttPosMatrix32f:n||(0,c.Un)(),{mainMatrix:t,tileMercatorCoords:o,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:t,clipAntimeridian:!1}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,i){return 1}transformLightDirection(e){return(0,c.Qr)(e)}getRayDirectionFromPixel(e){throw Error("Not implemented.")}projectTileCoordinates(e,t,i,r){let a,o=this.calculatePosMatrix(i);null==r?(a=[e,t,0,1],Yi(a,a,o)):(a=[e,t,r,1],(0,c.Xr)(a,a,o));let n=a[3];return{point:new c.Ri(a[0]/n,a[1]/n),signedDistanceFromCamera:n,isOccluded:!1}}populateCache(e){for(let t of e)this.calculatePosMatrix(t)}getProjectionDataForCustomLayer(e=!0){let t=new c.d(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:t,applyGlobeMatrix:e}),r=(0,c.G)(t,this.worldSize);(0,c.Ti)(r,this._viewProjMatrix,r);let a=[c.Rr,c.Rr,this.worldSize/this._helper.pixelsPerMeter],o=(0,c.Gn)();return(0,c.ji)(o,r,a),Object.assign({},i,{tileMercatorCoords:[0,0,1,1],fallbackMatrix:o,mainMatrix:o})}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}};function Kr(e,t){return qr(e.index,e.exaggeration,(e.near[0]+t*e.dx)/e.worldSize,(e.near[1]+t*e.dy)/e.worldSize)}function Yr(e,t){return $r(Kr(e,t),e.near[2]+t*e.dz)}function Jr(){(0,c.Pr)("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Qr(e){if(e.useSlerp)if(e.k<1){let t=(0,c.Dr)(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),i=(0,c.Dr)(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),r=new Float64Array(4);(0,c.qr)(r,t,i,e.k);let a=(0,c.cr)(r);e.tr.setRoll(a.roll),e.tr.setPitch(a.pitch),e.tr.setBearing(a.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(c.dn.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(c.dn.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(c.dn.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function ea(e,t,i,r,a){let o=a.padding,n=(0,c.Z)(a.worldSize,i.getNorthWest()),s=(0,c.Z)(a.worldSize,i.getNorthEast()),l=(0,c.Z)(a.worldSize,i.getSouthEast()),h=(0,c.Z)(a.worldSize,i.getSouthWest
1172()),u=(0,c.Xn)(-r),d=n.rotate(u),_=s.rotate(u),p=l.rotate(u),m=h.rotate(u),f=new c.Ri(Math.max(d.x,_.x,m.x,p.x),Math.max(d.y,_.y,m.y,p.y)),g=new c.Ri(Math.min(d.x,_.x,m.x,p.x),Math.min(d.y,_.y,m.y,p.y)),v=f.sub(g),y=a.width-(o.left+o.right+t.left+t.right),b=a.height-(o.top+o.bottom+t.top+t.bottom),x=y/v.x,w=b/v.y;if(w<0||x<0)return void Jr();let T=Math.min((0,c.Or)(a.scale*Math.min(x,w)),e.maxZoom),P=c.Ri.convert(e.offset),M=(t.left-t.right)/2,C=(t.top-t.bottom)/2,I=new c.Ri(M,C).rotate((0,c.Xn)(r)),R=P.add(I).mult(a.scale/(0,c.Ir)(T));return{center:(0,c.$)(a.worldSize,n.add(l).div(2).sub(R)),zoom:T,bearing:r}}var ta=class{get useGlobeControls(){return!1}handlePanInertia(e,t){let i=e.mag(),r=Math.abs((0,c.Y)(t));return{easingOffset:e.mult(Math.min(.75*r/i,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,i){e.around.distSqr(t.centerPoint)<.01||t.setLocationAtPoint(i,e.around,e.aroundElevation)}cameraForBoxAndBearing(e,t,i,r,a){return ea(e,t,i,r,a)}handleJumpToCenterZoom(e,t){let i=void 0===t.zoom?e.zoom:+t.zoom;e.zoom!==i&&e.setZoom(+t.zoom),void 0!==t.center&&e.setCenter(c.st.convert(t.center))}handleEaseTo(e,t){let i=e.zoom,r=e.padding,a={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:void 0===t.roll?e.roll:t.roll,pitch:void 0===t.pitch?e.pitch:t.pitch,bearing:void 0===t.bearing?e.bearing:t.bearing},n=void 0!==t.zoom,s=!e.isPaddingEqual(t.padding),l=!1,h=n?+t.zoom:e.zoom,u=e.centerPoint.add(t.offsetAsPoint),d=e.screenPointToLocation(u),{center:_,zoom:p}=e.applyConstrain(c.st.convert(t.center||d),h??i);Or(e,_);let m=(0,c.Z)(e.worldSize,d),f=(0,c.Z)(e.worldSize,_).sub(m),g=(0,c.Ir)(p-i);return l=p!==i,{easeFunc:n=>{if(l&&e.setZoom(c.dn.number(i,p,n)),(0,c.Er)(a,o)||Qr({startEulerAngles:a,endEulerAngles:o,tr:e,k:n,useSlerp:a.roll!=o.roll}),s&&(e.interpolatePadding(r,t.padding,n),u=e.centerPoint.add(t.offsetAsPoint)),t.around)e.setLocationAtPoint(t.around,t.aroundPoint);else{let t=(0,c.Ir)(e.zoom-i),r=(p>i?Math.min(2,g):Math.max(.5,g))**(1-n),a=(0,c.$)(e.worldSize,m.add(f.mult(n*r)).mult(t));e.setLocationAtPoint(e.renderWorldCopies?a.wrap():a,u)}},isZooming:l,elevationCenter:_}}handleFlyTo(e,t){let i=void 0!==t.zoom,r=e.zoom,a=e.applyConstrain(c.st.convert(t.center||t.locationAtOffset),i?+t.zoom:r),o=a.center,n=a.zoom;Or(e,o);let s=e.worldSize,l=(0,c.Z)(s,t.locationAtOffset),h=(0,c.Z)(s,o).sub(l),u=h.mag(),d=(0,c.Ir)(n-r),_=void 0===t.minZoom?e.minZoom:+t.minZoom,p=Math.max(_,e.minZoom),m=Math.min(p,r,n),f=e.applyConstrain(o,m).zoom;return{easeFunc:(t,i,a,u)=>{e.setZoom(1===t?n:r+(0,c.Or)(i));let d=1===t?o:(0,c.$)(s,l.add(h.mult(a)));e.setLocationAtPoint(e.renderWorldCopies?d.wrap():d,u)},scaleOfZoom:d,targetCenter:o,scaleOfMinZoom:(0,c.Ir)(f-r),pixelPathLength:u}}};let ia;const ra=new c.gt({fill:new c.ht(128,2),line:new c.ht(512,0),tile:new c.ht(128,32),stencil:new c.ht(128,1),circle:3});var aa=class{constructor(){this._tileMeshCache={}}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return zr.projectionGlobe}get vertexShaderPreludeCode(){return zr.projectionMercator.vertexSource}get subdivisionGranularity(){return ra}get useGlobeControls(){return!0}destroy(){}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,t,i,r,a){let o=("stencil"===a?ra.stencil:ra.tile).getGranularityForZoomLevel(t.z),n=0===t.y&&r,s=t.y===(1<<t.z)-1&&r;return this._getMesh(e,{granularity:o,generateBorders:i,extendToNorthPole:n,extendToSouthPole:s})}_getMesh(e,t){let i=this._getMeshKey(t);if(i in this._tileMeshCache)return this._tileMeshCache[i];let r=Rt(e,t);return this._tileMeshCache[i]=r,r}recalculate(e){}hasTransition(){return!1}},oa=class extends c.yn{constructor(e,t){super(),this._transitionable=new c.Qt(ia||=ne
1172w c.Xt({type:new c.Yt(c.gn.projection.type,"type")}),"projection",t),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new c.$t(0)),this._mercatorProjection=new Fr,this._verticalPerspectiveProjection=new aa}get transitionState(){let e=this.properties.get("type");if("string"==typeof e&&"mercator"===e)return 0;if("string"==typeof e&&"vertical-perspective"===e)return 1;if(e instanceof c.fn){if(e.from===e.to)return"mercator"===e.from?0:1;if("vertical-perspective"===e.from&&"mercator"===e.to)return 1-e.transition;if("mercator"===e.from&&"vertical-perspective"===e.to)return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}getMeshFromTileID(e,t,i,r,a){return this.currentProjection.getMeshFromTileID(e,t,i,r,a)}setProjection(e){this._transitionable.setValue("type",e?.type||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}};function na(e){let t=da(e.worldSize,e.center.lat);return 2*Math.PI*t}function sa(e,t,i){let r=ua(t),a=ua(i),o=(0,c.ti)(r,a),n=Math.acos(o),s=na(e);return n/(2*Math.PI)*s}function la(e,t){return[(0,c._r)(e*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-t*Math.PI*2))-.5*Math.PI]}function ha(e,t){let i=Math.cos(t),r=new Float64Array(3);return r[0]=Math.sin(e)*i,r[1]=Math.sin(t),r[2]=Math.cos(e)*i,r}function ca(e,t,i,r,a){let o=1/(1<<a),n=e/c.Rr*o+i*o,s=t/c.Rr*o+r*o,l=(0,c._r)(n*Math.PI*2+Math.PI,2*Math.PI),h=2*Math.atan(Math.exp(Math.PI-s*Math.PI*2))-.5*Math.PI,u=Math.cos(h),d=new Float64Array(3);return d[0]=Math.sin(l)*u,d[1]=Math.sin(h),d[2]=Math.cos(l)*u,d}function ua(e){return ha(e.lng*Math.PI/180,e.lat*Math.PI/180)}function da(e,t){return e/(2*Math.PI)/Math.cos(t*Math.PI/180)}function _a(e){let t=(0,c.Xr)((0,c.qn)(),[0,0,0,1],e.modelViewProjectionMatrix);return(0,c.Xr)(t,t,e.inverseProjectionMatrix),[t[0]/t[3],t[1]/t[3],t[2]/t[3]]}function pa(e){let t=Math.asin(e[1])/Math.PI*180,i=Math.sqrt(e[0]*e[0]+e[2]*e[2]);if(i>1e-6){let r=e[0]/i,a=e[2]/i,o=Math.acos(a),n=(r>0?o:-o)/Math.PI*180;return new c.st((0,c.Fr)(n,-180,180),t)}return new c.st(0,t)}function ma(e,t){return(0,c.Wr)((0,c.qn)(),-e.lng,-e.lat,t)}function fa(e){let t=e[0],i=e[1],r=e[2],a=e[3];return{lng:180*-Math.atan2(2*(a*t+i*r),1-2*(t*t+i*i))/Math.PI,lat:180*-Math.asin((0,c.Vn)(2*(a*i-r*t),-1,1))/Math.PI,bearing:180*Math.atan2(2*(a*r+t*i),1-2*(i*i+r*r))/Math.PI}}const ga=.98*Math.PI;function va(e,t){let i=e.cameraPosition,r=(0,c.ri)(i);if(r<=1)return e.screenPointToLocation(t);let a=(0,c.Kn)();(0,c.ai)(a,i);let o=e.getRayDirectionFromPixel(t),n=-(0,c.ti)(o,a),s=(0,c.Kn)();(0,c.ui)(s,o,a,n);let l=(0,c.ri)(s);if(l<1e-9)return e.screenPointToLocation(t);let h=Math.atan2(l,n),u=.9*Math.asin(1/r);if(h<u)return e.screenPointToLocation(t);let d=r*Math.sin(u),_=Math.asin((0,c.Vn)(d,-1,1))-u,p=r*Math.cos(u)/Math.sqrt(Math.max(1-d*d,1e-12))-1,m=ga-_,f=h-u,g=_+p*f*m/(m+p*f),v=(0,c.Kn)();(0,c.li)(v,s,1/l);let y=(0,c.Kn)();return(0,c.li)(y,a,Math.cos((0,c.Vn)(g,0,ga))),(0,c.ui)(y,y,v,Math.sin((0,c.Vn)(g,0,ga))),(0,c.ai)(y,y),pa(y)}function ya(e,t,i,r,a=!0){let o=va(e,i),n=t;if(r)n=va(e,i.sub(r));else if(!e.isPointOnMapSurface(i))return;let s=ua(o),l=ua(n),h=ma(e.center,e.bearing),u=(0,c.$r)((0,c.Kn)(),l,s),d=Math.sqrt((0,c.ti)(u,u)),_=Math.acos((0,c.Vn)((0,c.ti)(l,s),-1,1))/2,p=Math.sin(_),m=d?(0,c.Gr)(u[1]/d*p,-u[0]/d*p,u[2]/d*p,Math.cos(_)):(0,c.Gr)(0,0,0,1),{lng:f,lat:g,bearing:v}=fa((0,c.Kr)((0,c.qn)(),h,m)),y=e.center.lat,b=e.zoom,x=(0,c.Vn)(g,-90,90),w=a?ba(e,i,r,f):f;e.setCenter(new c.st((0,c.Fr)(w,-180,180),x)),a||e.setBearing(v),e.setZoom(b+Pa(y,e.center.lat))}function ba(e,t,i,r){let a=e.center.lng,o=e.center.lat,n=o>=0?90:-90,s=e.locationToScreenPoint(new c.st(0,n)),l=t.x-s.x,h=t.y-s.y,u=l*l+h*h,d=(0,c.Vn)(1-(c.In-Math.abs(o))/12,0,1),_=d*d*(3-2*d),p=(0,c._r)(r-a+180,360)-180,m=0;if(_>0&&i){m=(n>0?1:-1)*((l*i.y-h*i.x)/Math.max(u,400))*180/Math.PI}return a+(1-_)*p+_*m}function xa(e){let t=(0,c.Kn)();return t[0]=e[0]*-e[3],t[1]=e[1]*-e[3],t[2]=e[2]*-e[3],{center:t,radius:Math.sqrt(1-e[3]*e[3])}}function wa(e,t,i){let r=(0,c.Kn)();(0,c.di)(r,i,e);let a=(0,c.Kn)();return(0,c.ui)(a,e,r,t/(0,c.ni)(r)),a}function Ta(e){return Math.cos(e*Math.PI/180)}function Pa(e,t){let i=Ta(e),r=Ta(t);return(0,c.Or)(r/i)}function Ma(e,t){return 360/na({worldSize:e,center:{lat:t}})}function Ca(e,t){let i=e.rotate(t.bearingInRadians),r=t.zoom+Pa(t.center.lat,0),a=(0,c.hr)(1/Ta(t.center.lat),1/Ta(Math.min(Math.abs(t.center.lat),60)),(0,c.Tr)(r,7,3,0,1)),o=Ma(t.worldSize,t.center.lat);return new c.st(t.center.lng-i.x*o*a,(0,c.Vn)(t.center.lat+i.y*o,-c.In,c.In))}function Ia(e){let t=.5*e,i=Math.sin(t),r=Math.cos(t);return Math.log(i+r)-Math.log(r-i)}function Ra(e,t,i,r){let a=e.lat+i*r;if(Math.abs(i)>1){let o=e.lat+i,n=(Math.sign(o)===Math.sign(e.lat)?Math.abs(e.lat):-Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+i)*Math.PI/180,l=Ia(n+r*(s-n)),h=Ia(n),u=(l-h)/(Ia(s)-h),d=e.lng+t*u;return new c.st(d,a)}{let i=e.lng+t*r;return new c.st(i,a)}}function Sa(e,t,i=1){let r=(0,c.ti)(e,t),a=i*i,o=(0,c.Kn)(),n=(0,c.Kn)();(0,c.li)(n,t,r),(0,c.di)(o,e,n);let s=a-(0,c.ti)(o,o);if(s<0)return null;let l=(0,c.ti)(e,e)-a,h=-r+(r<0?1:-1)*Math.sqrt(s),u=l/h,d=h;return{tMin:Math.min(u,d),tMax:Math.max(u,d)}}var Ea=class{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,i,r){let a=`${e.z}_${e.x}_${e.y}_${r?.terrain?"t":""}_${Math.round(i)}`,o=this._cache.get(a);if(o)return o;let n=this._cachePrevious.get(a);if(n)return this._cache.set(a,n),n;let s=this._boundingVolumeFactory(e,t,i,r);return this._cache.set(a,s),this._hadAnyChanges=!0,s}},za=class e{constructor(e,t,i,r){this.min=i,this.max=r,this.points=e,this.planes=t}static fromAabb(t,i){let r=[];for(let e=0;e<8;e++)r.push([1&~e?t[0]:i[0],1==(e>>1&1)?i[1]:t[1],1==(e>>
11722&1)?i[2]:t[2]]);return new e(r,[[-1,0,0,i[0]],[1,0,0,-t[0]],[0,-1,0,i[1]],[0,1,0,-t[1]],[0,0,-1,i[2]],[0,0,1,-t[2]]],t,i)}static fromCenterSizeAngles(t,i,r){let a=(0,c.Wr)([],r[0],r[1],r[2]),o=(0,c.hi)([],[i[0],0,0],a),n=(0,c.hi)([],[0,i[1],0],a),s=(0,c.hi)([],[0,0,i[2]],a),l=[...t],h=[...t];for(let e=0;e<8;e++)for(let i=0;i<3;i++){let r=t[i]+o[i]*(1&~e?-1:1)+n[i]*(1==(e>>1&1)?1:-1)+s[i]*(1==(e>>2&1)?1:-1);l[i]=Math.min(l[i],r),h[i]=Math.max(h[i],r)}let u=[];for(let e=0;e<8;e++){let i=[...t];(0,c.Zr)(i,i,(0,c.li)([],o,1&~e?-1:1)),(0,c.Zr)(i,i,(0,c.li)([],n,1==(e>>1&1)?1:-1)),(0,c.Zr)(i,i,(0,c.li)([],s,1==(e>>2&1)?1:-1)),u.push(i)}return new e(u,[[...o,-(0,c.ti)(o,u[0])],[...n,-(0,c.ti)(n,u[0])],[...s,-(0,c.ti)(s,u[0])],[-o[0],-o[1],-o[2],-(0,c.ti)(o,u[7])],[-n[0],-n[1],-n[2],-(0,c.ti)(n,u[7])],[-s[0],-s[1],-s[2],-(0,c.ti)(s,u[7])]],l,h)}intersectsFrustum(e){let t=!0,i=this.points.length,r=this.planes.length,a=e.planes.length,o=e.points.length;for(let r=0;r<a;r++){let a=e.planes[r],o=0;for(let e=0;e<i;e++){let t=this.points[e];a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]>=0&&o++}if(0===o)return 0;o<i&&(t=!1)}if(t)return 2;for(let t=0;t<r;t++){let i=this.planes[t],r=0;for(let t=0;t<o;t++){let a=e.points[t];i[0]*a[0]+i[1]*a[1]+i[2]*a[2]+i[3]>=0&&r++}if(0===r)return 0}return 1}intersectsPlane(e){let t=this.points.length,i=0;for(let r=0;r<t;r++){let t=this.points[r];e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]>=0&&i++}return i===t?2:0===i?0:1}};function Aa(e,t,i){let r=e-t;return r<0?-r:Math.max(0,r-i)}function Da(e,t,i,r,a){let o,n=e-i;return o=n<0?Math.min(-n,1+n-a):n>a?Math.min(Math.max(n-a,0),1-n):0,Math.max(o,Aa(t,r,a))}var La=class{constructor(){this._boundingVolumeCache=new Ea(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,i,r){let a=1<<i.z,o=1/a,n=i.x/a,s=i.y/a,l=2;return l=Math.min(l,Da(e,t,n,s,o)),l=Math.min(l,Da(e,t,n+.5,-s-o,o)),l=Math.min(l,Da(e,t,n+.5,2-s-o,o)),l}getWrap(e,t,i){let r=1<<t.z,a=1/r,o=t.x/r,n=Aa(e.x,o,a),s=Aa(e.x,o-1,a),l=Aa(e.x,o+1,a),h=Math.min(n,s,l);return h===l?1:h===s?-1:0}allowVariableZoom(e,t){return si(e,t)>4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,i,r){return this._boundingVolumeCache.getTileBoundingVolume(e,t,i,r)}_computeTileBoundingVolume(e,t,i,r){let a=Math.min(0,i),o=Math.max(0,i);if(r?.terrain){let i=new c.d(e.z,t,e.z,e.x,e.y),n=r.terrain.getMinMaxElevation(i);a=n.minElevation??a,o=Math.max(n.maxElevation??o,o)}if(a/=c.ct,o/=c.ct,a+=1,o+=1,e.z<=0)return za.fromAabb([-o,-o,-o],[o,o,o]);if(1===e.z)return za.fromAabb([0===e.x?-o:0,0===e.y?0:-o,-o],[0===e.x?0:o,0===e.y?o:0,o]);{let t=[ca(0,0,e.x,e.y,e.z),ca(c.Rr,0,e.x,e.y,e.z),ca(c.Rr,c.Rr,e.x,e.y,e.z),ca(0,c.Rr,e.x,e.y,e.z)],i=[];for(let e of t)i.push((0,c.li)([],e,o));if(o!==a)for(let e of t)i.push((0,c.li)([],e,a));0===e.y&&i.push([0,1,0]),e.y===(1<<e.z)-1&&i.push([0,-1,0]);let r=[1,1,1],n=[-1,-1,-1];for(let e of i)for(let t=0;t<3;t++)r[t]=Math.min(r[t],e[t]),n[t]=Math.max(n[t],e[t]);let s=ca(c.Rr/2,c.Rr/2,e.x,e.y,e.z),l=(0,c.$r)([],[0,1,0],s);(0,c.ai)(l,l);let h=(0,c.$r)([],s,l);(0,c.ai)(h,h);let u=(0,c.$r)([],t[2],t[1]);(0,c.ai)(u,u);let d=(0,c.$r)([],t[0],t[3]);(0,c.ai)(d,d),i.push((0,c.li)([],s,o)),e.y>=(1<<e.z)/2&&i.push((0,c.li)([],ca(c.Rr/2,0,e.x,e.y,e.z),o)),e.y<(1<<e.z)/2&&i.push((0,c.li)([],ca(c.Rr/2,c.Rr,e.x,e.y,e.z),o));let _=Fa(s,i),p=Fa(h,i),m=[-s[0],-s[1],-s[2],_.max],f=[s[0],s[1],s[2],-_.min],g=[-h[0],-h[1],-h[2],p.max],v=[h[0],h[1],h[2],-p.min],y=[...u,0],b=[...d,0],x=[];return 0===e.y?x.push((0,c.jr)(b,y,m),(0,c.jr)(b,y,f)):x.push((0,c.jr)(g,y,m),(0,c.jr)(g,y,f),(0,c.jr)(g,b,m),(0,c.jr)(g,b,f)),e.y===(1<<e.z)-1?x.push((0,c.jr)(b,y,m),(0,c.jr)(b,y,f)):x.push((0,c.jr)(v,y,m),(0,c.jr)(v,y,f),(0,c.jr)(v,b,m),(0,c.jr)(v,b,f)),new za(x,[m,f,g,v,y,b],r,n)}}};function Fa(e,t){let i=1/0,r=-1/0;for(let a of t){let t=(0,c.ti)(e,a);i=Math.min(i,t),r=Math.max(r,t)}return{min:i,max:r}}var ka=class e{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,i){this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t){this._helper.resize(e,t)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(e){this._cachedClippingPlane=(0,c.qn)(),this._projectionMatrix=(0,c.Wn)(),this._globeViewProjMatrix32f=(0,c.Un)(),this._globeViewProjMatrixF64=(0,c.Wn)(),this._globeViewProjMatrixF64Inverted=(0,c.Wn)(),this._globeProjMatrixInverted=(0,c.Wn)(),this._cameraPosition=(0,c.Kn)(),this.defaultConstrain=(e,t)=>{let i=(0,c.Vn)(e.lat,-c.In,c.In),r=(0,c.Vn)(+t,this.minZoom+Pa(0,i),this.maxZoom);return{center:new c.st(e.lng,i),zoom:r}},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new Br({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new La}clone(){let t=new e;return t.apply(this,!1),t}apply(e,t){this._helper.apply(e,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixF64}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=(0,c.Kn)();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:t,applyGlobeMatrix:i}=e,r=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:r,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!i,fallbackMatrix:this._globeViewProjMatrix32f,clipAntimeridian:0===t?.canonical.z}}_computeClippingPlane(e){let t=this.pitchInRadians,i=this.cameraToCenterDistance/e,r=Math.sin(t)*i,a=Math.cos(t)*i+1,o=1/Math.sqrt(r*r+a*a)*1,n=-r,s=a,l=Math.sqrt(n*n+s*s);n/=l,s/=l;let h=[0,n,s];(0,c.ci)(h,h,[0,0,0],-this.bearingInRadians),(0,c.oi)(h,h,[0,0,0],-1*this.center.lat*Math.PI/180),(0,c.si)(h,h,[0,0,0],this.center.lng*Math.PI/180);let u=1/(0,c.ri)(h);return(0,c.li)(h,h,u),[...h,-o*u]}isLocationOccluded(e){return!this.isSurfacePointVisible(ua(e))}transformLightDirection(e){let t=this._helper._center.lng*Math.PI/180,i=this._helper._center.lat*Math.PI/180,r=Math.cos(i),a=[Math.sin(t)*r,Math.sin(i),Math.cos(t)*r],o=[a[2],0,-a[0]],n=[0,0,0];(0,c.$r)(n,o,a),(0,c.ai)(o,o),(0,c.ai)(n,n);let s=[o[0]*e[0]+n[0]*e[1]+a[0]*e[2],o[1]*e[0]+n[1]*e[1]+a[1]*e[2],o[2]*e[0]+n[2]*e[1]+a[2]*e[2]],l=[0,0,0];return(0,c.ai)(l,s),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,t,i){let r=(0,c.Q)(e,t,i.canonical),a=la(r.x,r.y);return this.getCircleRadiusCorrection()/Math.cos(a[1])}projectTileCoordinates(e,t,i,r){let a,o=i.canonical,n=ca(e,t,o.x,o.y,o.z),s=1+(r??0)/c.ct,l=n[0]*s,h=n[1]*s,u=n[2]*s,d=[l,h,u,1];if((0,c.Xr)(d,d,this._globeViewProjMatrixF64),s<=1){let e=this._cachedClippingPlane;a=e[0]*n[0]+e[1]*n[1]+e[2]*n[2]+e[3]<0}else a=this._isLineOfSightBlocked(l,h,u);return{point:new c.Ri(d[0]/d[3],d[1]/d[3]),signedDistanceFromCamera:d[3],isOccluded:a}}_isLineOfSightBlocked(e,t,i){let r=this._cameraPosition,a=e-r[0],o=t-r[1],n=i-r[2],s=a*a+o*o+n*n;if(0===s)return!1;let l=(0,c.Vn)(-(r[0]*a+r[1]*o+r[2]*n)/s,0,1),h=r[0]+l*a,u=r[1]+l*o,d=r[2]+l*n;return h*h+u*u+d*d<1}
1172_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=da(this.worldSize,this.center.lat),t=(0,c.Gn)();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),(0,c.Di)(t,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let i=this.centerOffset;t[8]=2*-i.x/this._helper._width,t[9]=2*i.y/this._helper._height,this._projectionMatrix=(0,c._i)(t),this._globeProjMatrixInverted=(0,c.Gn)(),(0,c.wi)(this._globeProjMatrixInverted,t),(0,c.Mi)(t,t,[0,0,-this.cameraToCenterDistance]),(0,c.Ai)(t,t,this.rollInRadians),(0,c.Oi)(t,t,-this.pitchInRadians),(0,c.Ai)(t,t,this.bearingInRadians),(0,c.Mi)(t,t,[0,0,-e]);let r=(0,c.Kn)();r[0]=e,r[1]=e,r[2]=e,(0,c.Oi)(t,t,this.center.lat*Math.PI/180),(0,c.ki)(t,t,-this.center.lng*Math.PI/180),(0,c.ji)(t,t,r),this._globeViewProjMatrixF64=t,this._globeViewProjMatrix32f=new Float32Array(t),this._globeViewProjMatrixF64Inverted=(0,c.Gn)(),(0,c.wi)(this._globeViewProjMatrixF64Inverted,t);let a=(0,c.Kn)();this._cameraPosition=(0,c.Kn)(),this._cameraPosition[2]=this.cameraToCenterDistance/e,(0,c.ci)(this._cameraPosition,this._cameraPosition,a,-this.rollInRadians),(0,c.oi)(this._cameraPosition,this._cameraPosition,a,this.pitchInRadians),(0,c.ci)(this._cameraPosition,this._cameraPosition,a,-this.bearingInRadians),(0,c.Zr)(this._cameraPosition,this._cameraPosition,[0,0,1]),(0,c.oi)(this._cameraPosition,this._cameraPosition,a,-this.center.lat*Math.PI/180),(0,c.si)(this._cameraPosition,this._cameraPosition,a,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let o=(0,c._i)(this._globeViewProjMatrixF64Inverted);(0,c.ji)(o,o,[1,1,-1]),this._cachedFrustum=Jt.fromInvProjectionMatrix(o,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){(0,c.Pr)("calculateFogMatrix is not supported on globe projection.");let t=(0,c.Gn)();return(0,c.Ci)(t),t}getVisibleUnwrappedCoordinates(e){return[new c.f(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e?(0,c.Pr)("terrain is not fully supported on vertical perspective projection."):this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return((0,c.ri)(this._cameraPosition)-1)*c.ct}getCameraLngLat(){let e=(0,c.Kn)();return(0,c.ai)(e,this._cameraPosition),pa(e)}lngLatToCameraDepth(e,t){let i=ua(e);(0,c.li)(i,i,1+t/c.ct);let r=(0,c.qn)();return(0,c.Xr)(r,[i[0],i[1],i[2],1],this._globeViewProjMatrixF64),r[2]/r[3]}populateCache(e){}getBounds(){let e=.5*this.width,t=.5*this.height,i=[new c.Ri(0,0),new c.Ri(e,0),new c.Ri(this.width,0),new c.Ri(this.width,t),new c.Ri(this.width,this.height),new c.Ri(e,this.height),new c.Ri(0,this.height),new c.Ri(0,t)],r=[];for(let e of i)r.push(this.unprojectScreenPoint(e));let a=0,o=0,n=0,s=0,l=this.center;for(let e of r){let t=(0,c.Zn)(l.lng,e.lng),i=(0,c.Zn)(l.lat,e.lat);t<o&&(o=t),t>a&&(a=t),i<s&&(s=i),i>n&&(n=i)}let h=[l.lng+o,l.lat+s,l.lng+a,l.lat+n];return this.isSurfacePointOnScreen([0,1,0])&&(h[3]=90,h[0]=-180,h[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(h[1]=-90,h[0]=-180,h[2]=180),new et(h)}calculateCenterFromCameraLngLatAlt(e,t,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,r)}calculateCameraOptionsFromTo(e,t,i,r){let a=c.st.convert(i),o=ua(c.st.convert(e));(0,c.li)(o,o,1+t/c.ct);let n=ua(a),s=(0,c.li)((0,c.Kn)(),n,1+r/c.ct),l=(0,c.fi)((0,c.Kn)(),o,n),h=(0,c.ri)(l);if(h<1e-12||(0,c.ei)(o,s)<1e-12)throw Error("Can't calculate camera options with same From and To");let u=(0,c.Kn)();(0,c.si)(l,l,u,-(0,c.Xn)(a.lng)),(0,c.oi)(l,l,u,(0,c.Xn)(a.lat));let d=(0,c.Sr)(Math.acos((0,c.Vn)(l[2]/h,-1,1))),_=Math.hypot(l[0],l[1])<1e-9*h?this.bearing:(0,c.Sr)(Math.atan2(-l[0],-l[1]));return{center:a,elevation:r,zoom:(0,c.Or)(this.cameraToCenterDistance/h/da(this.tileSize,a.lat)),pitch:d,bearing:_}}setLocationAtPoint(e,t,i){let r=ua(this.unprojectScreenPoint(t)),a=ua(e),o=(0,c.Kn)();(0,c.gi)(o);let n=(0,c.Kn)();(0,c.si)(n,r,o,-this.center.lng*Math.PI/180),(0,c.oi)(n,n,o,this.center.lat*Math.PI/180);let s=a[0]*a[0]+a[2]*a[2],l=n[0]*n[0];if(s<l)return;let h=Math.sqrt(s-l),u=-h,d=(0,c.Ln)(a[0],a[2],n[0],h),_=(0,c.Ln)(a[0],a[2],n[0],u),p=(0,c.Kn)();(0,c.si)(p,a,o,-d);let m=(0,c.Ln)(p[1],p[2],n[1],n[2]),f=(0,c.Kn)();(0,c.si)(f,a,o,-_);let g,v,y=(0,c.Ln)(f[1],f[2],n[1],n[2]),b=.5*Math.PI,x=m>=-b&&m<=b,w=y>=-b&&y<=b;if(x&&w){let e=this.center.lng*Math.PI/180,t=this.center.lat*Math.PI/180;(0,c.Qn)(d,e)+(0,c.Qn)(m,t)<(0,c.Qn)(_,e)+(0,c.Qn)(y,t)?(g=d,v=m):(g=_,v=y)}else if(x)g=d,v=m;else{if(!w)return;g=_,v=y}let T=g/Math.PI*180,P=v/Math.PI*180,M=this.center.lat;this.setCenter(new c.st(T,(0,c.Vn)(P,-90,90))),this.setZoom(this.zoom+Pa(M,this.center.lat))}locationToScreenPoint(e,t){let i=ua(e);if(t){let r=t.getElevationForLngLatZoom(e,this._helper._tileZoom);(0,c.li)(i,i,1+r/c.ct)}return this._projectSurfacePointToScreen(i)}_projectSurfacePointToScreen(e){let t=(0,c.qn)();return(0,c.Xr)(t,[...e,1],this._globeViewProjMatrixF64),t[0]/=t[3],t[1]/=t[3],new c.Ri((.5*t[0]+.5)*this.width,(.5*-t[1]+.5)*this.height)}screenPointToMercatorCoordinate(e,t){if(t){let i=this.screenTerrainPointToMercatorCoordinate(e,t);if(i)return i}return c.et.fromLngLat(this.unprojectScreenPoint(e))}screenTerrainPointToMercatorCoordinate(e,t){let i=t.getCoverageIndex();if(!i)return null;let r=this.cameraPosition,a=this.getRayDirectionFromPixel(e),o=Sa(r,a,1+i.maxElevation/c.ct);if(!o)return null;let n=Sa(r,a,1+i.minElevation/c.ct),s=Math.max(o.tMin,0),l=n?n.tMin:o.tMax;if(l<=s)return null;let h={index:i,exaggeration:t.exaggeration,origin:r,direction:a},u=0;for(let e=0;e<=256;e++){let t=s+(l-s)*e/256;if(ja(h,t)){let{hi:e}=Hr(h,ja,u,t,1e-12),{sample:i,mercator:r}=Oa(h,e);return new c.et(r.x,r.y,i.elevation)}u=t}return null}screenPointToLocation(e,t){return this.screenPointToMercatorCoordinate(e,t)?.toLngLat()}screenPointToLocationAtElevation(e,t){return this.screenPointToLocation(e)}
1172isPointOnMapSurface(e,t){return!!Sa(this._cameraPosition,this.getRayDirectionFromPixel(e))}getRayDirectionFromPixel(e){let t=(0,c.qn)();t[0]=e.x/this.width*2-1,t[1]=-1*(e.y/this.height*2-1),t[2]=1,t[3]=1,(0,c.Xr)(t,t,this._globeViewProjMatrixF64Inverted),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3];let i=(0,c.Kn)();i[0]=t[0]-this._cameraPosition[0],i[1]=t[1]-this._cameraPosition[1],i[2]=t[2]-this._cameraPosition[2];let r=(0,c.Kn)();return(0,c.ai)(r,i),r}isSurfacePointVisible(e){let t=this._cachedClippingPlane;return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let t=(0,c.qn)();return(0,c.Xr)(t,[...e,1],this._globeViewProjMatrixF64),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3],t[0]>-1&&t[0]<1&&t[1]>-1&&t[1]<1&&t[2]>-1&&t[2]<1}unprojectScreenPoint(e){let t=this._cameraPosition,i=this.getRayDirectionFromPixel(e),r=Sa(t,i);if(r){let e=(0,c.Kn)();(0,c.Zr)(e,t,[i[0]*r.tMin,i[1]*r.tMin,i[2]*r.tMin]);let a=(0,c.Kn)();return(0,c.ai)(a,e),pa(a)}let a=this._cachedClippingPlane,o=a[0]*i[0]+a[1]*i[1]+a[2]*i[2],n=-(0,c.xr)(a,t)/o,s=(0,c.Kn)();if(n>0)(0,c.Zr)(s,t,[i[0]*n,i[1]*n,i[2]*n]);else{let e=(0,c.Kn)();(0,c.Zr)(e,t,[2*i[0],2*i[1],2*i[2]]);let r=(0,c.xr)(this._cachedClippingPlane,e);(0,c.di)(s,e,[this._cachedClippingPlane[0]*r,this._cachedClippingPlane[1]*r,this._cachedClippingPlane[2]*r])}let l=xa(a);return pa(wa(l.center,l.radius,s))}getProjectionDataForCustomLayer(e=!0){let t=this.getProjectionData({overscaledTileID:new c.d(0,0,0,0,0),applyGlobeMatrix:e});return t.tileMercatorCoords=[0,0,1,1],t}getFastPathSimpleProjectionMatrix(e){}};function Oa(e,t){let i=(0,c.Kn)();(0,c.ui)(i,e.origin,e.direction,t);let r=(0,c.ri)(i),a=(0,c.Kn)();(0,c.li)(a,i,1/r);let o=pa(a),n=c.et.fromLngLat(o),s=new c.et(n.x,(0,c.Vn)(n.y,0,.999999999)),l=qr(e.index,e.exaggeration,s.x,s.y),h=Math.abs(o.lat)>85.051129?0:l.elevation;return{sample:Object.assign({},l,{elevation:h}),radius:r,mercator:s}}function ja(e,t){let{sample:i,radius:r}=Oa(e,t);return $r(i,(r-1)*c.ct)}var Ba=class e{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,i){this._helper.interpolatePadding(e,t,i)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,i=!0){this._helper.resize(e,t,i)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e){this._globeness=e,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(e){this._globeness=1,this.defaultConstrain=(e,t)=>this.currentTransform.defaultConstrain(e,t),this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new Br({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._globeness=1,this._mercatorTransform=new Xr,this._verticalPerspectiveTransform=new ka}clone(){let t=new e;return t._globeness=this._globeness,t.apply(this,!1),t}apply(e,t){this._helper.apply(e,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let t=this._mercatorTransform.getProjectionData(e),i=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?i.mainMatrix:t.mainMatrix,clippingPlane:i.clippingPlane,tileMercatorCoords:i.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix,clipAntimeridian:i.clipAntimeridian}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return(0,c.hr)(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return(0,c.hr)(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,t,i){let r=this._mercatorTransform.getPitchedTextCorrection(e,t,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,t,i);return(0,c.hr)(r,a,this._globeness)}projectTileCoordinates(e,t,i,r){return this.currentTransform.projectTileCoordinates(e,t,i,r)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this.currentTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this.currentTransform.getCameraAltitude()}getCameraLngLat(){return this.currentTransform.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(e,t,i,r){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,i,r)}calculateCameraOptionsFromTo(e,t,i,r){return this.currentTransform.calculateCameraOptionsFromTo(e,t,i,r)}setLocationAtPoint(e,t,i){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,t,i),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(e,t,i),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenTerrainPointToMercatorCoordinate(e,t){return this.currentTransform.screenTerrainPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}screenPointToLocationAtElevation(e,t){return this.currentTransform.screenPointToLocationAtElevation(e,t)}
1172isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getProjectionDataForCustomLayer(e=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;let i=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return i.fallbackMatrix=t.mainMatrix,i.projectionTransition=this._globeness,i}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}},Za=class e{get useGlobeControls(){return!0}handlePanInertia(e,t){let i=Ca(e,t);return Math.abs(i.lng-t.center.lng)>180&&(i.lng=t.center.lng+179.5*Math.sign(i.lng-t.center.lng)),{easingCenter:i,easingOffset:new c.Ri(0,0)}}handleMapControlsRollPitchBearingZoom(e,t){let i=e.around,r=t.screenPointToLocation(i);e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta);let a=t.zoom;e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta);let o=t.zoom-a;if(0===o)return;let n=(0,c.Zn)(t.center.lng,r.lng),s=n/(Math.abs(n/180)+1),l=(0,c.Zn)(t.center.lat,r.lat),h=t.getRayDirectionFromPixel(i),u=t.cameraPosition,d=-1*(0,c.ti)(u,h),_=(0,c.Kn)();(0,c.Zr)(_,u,[h[0]*d,h[1]*d,h[2]*d]);let p=(0,c.ri)(_),m=p-1,f=Math.exp(.5*-Math.max(m-.3,0)),g=(0,c.Tr)(p,.95,.999,0,1),v=da(t.worldSize,t.center.lat)/Math.min(t.width,t.height),y=(0,c.Tr)(v,.9,.5,1,.25),b=Math.min(f,(0,c.hr)(1,y,g)),x=(1-(0,c.Ir)(-o))*b,w=t.center.lat,T=t.zoom,P=new c.st(t.center.lng+s*
1172x,(0,c.Vn)(t.center.lat+l*x,-c.In,c.In));t.setLocationAtPoint(r,i);let M=t.center,C=(0,c.Tr)(Math.abs(n),45,85,0,1),I=Math.max(C,g)**.25,R=(0,c.Zn)(M.lng,P.lng),S=(0,c.Zn)(M.lat,P.lat);t.setCenter(new c.st(M.lng+R*I,M.lat+S*I).wrap()),t.setZoom(T+Pa(w,t.center.lat))}handleMapControlsPan(e,t,i){e.panDelta&&ya(t,i,t.isPointOnMapSurface(e.around)?e.around:t.centerPoint,e.panDelta)}cameraForBoxAndBearing(t,i,r,a,o){let n=ea(t,i,r,a,o),s=i.left/o.width*2-1,l=(o.width-i.right)/o.width*2-1,h=i.top/o.height*-2+1,u=(o.height-i.bottom)/o.height*-2+1,d=(0,c.Zn)(r.getWest(),r.getEast())<0,_=d?r.getEast():r.getWest(),p=d?r.getWest():r.getEast(),m=Math.max(r.getNorth(),r.getSouth()),f=Math.min(r.getNorth(),r.getSouth()),g=_+.5*(0,c.Zn)(_,p),v=m+.5*(0,c.Zn)(m,f),y=o.clone();y.setCenter(n.center),y.setBearing(n.bearing),y.setPitch(0),y.setRoll(0),y.setZoom(n.zoom);let b=y.modelViewProjectionMatrix,x=[ua(r.getNorthWest()),ua(r.getNorthEast()),ua(r.getSouthWest()),ua(r.getSouthEast()),ua(new c.st(p,v)),ua(new c.st(_,v)),ua(new c.st(g,m)),ua(new c.st(g,f))],w=ua(n.center),T=1/0;for(let t of x)s<0&&(T=e.getLesserNonNegativeNonNull(T,e.solveVectorScale(t,w,b,"x",s))),l>0&&(T=e.getLesserNonNegativeNonNull(T,e.solveVectorScale(t,w,b,"x",l))),h>0&&(T=e.getLesserNonNegativeNonNull(T,e.solveVectorScale(t,w,b,"y",h))),u<0&&(T=e.getLesserNonNegativeNonNull(T,e.solveVectorScale(t,w,b,"y",u)));if(Number.isFinite(T)&&0!==T)return n.zoom=Math.min(y.zoom+(0,c.Or)(T),t.maxZoom),n;Jr()}handleJumpToCenterZoom(e,t){let i=e.center.lat,r=e.applyConstrain(t.center?c.st.convert(t.center):e.center,e.zoom).center;e.setCenter(r.wrap());let a=void 0===t.zoom?e.zoom+Pa(i,r.lat):+t.zoom;e.zoom!==a&&e.setZoom(a)}handleEaseTo(e,t){let i=e.zoom,r=e.center,a=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},n={roll:void 0===t.roll?e.roll:t.roll,pitch:void 0===t.pitch?e.pitch:t.pitch,bearing:void 0===t.bearing?e.bearing:t.bearing},s=void 0!==t.zoom,l=!e.isPaddingEqual(t.padding),h=!1,u=t.center?c.st.convert(t.center):r,d=e.applyConstrain(u,i).center;Or(e,d);let _=e.clone();_.setCenter(d),_.setZoom(s?+t.zoom:i+Pa(r.lat,u.lat)),_.setBearing(t.bearing);let p=new c.Ri((0,c.Vn)(e.centerPoint.x+t.offsetAsPoint.x,0,e.width),(0,c.Vn)(e.centerPoint.y+t.offsetAsPoint.y,0,e.height));_.setLocationAtPoint(d,p);let m=(t.offset&&t.offsetAsPoint.mag())>0?_.center:d,f=s?+t.zoom:i+Pa(r.lat,m.lat),g=i+Pa(r.lat,0),v=f+Pa(m.lat,0),y=(0,c.Zn)(r.lng,m.lng),b=(0,c.Zn)(r.lat,m.lat),x=(0,c.Ir)(v-g);return h=f!==i,{easeFunc:i=>{if((0,c.Er)(o,n)||Qr({startEulerAngles:o,endEulerAngles:n,tr:e,k:i,useSlerp:o.roll!=n.roll}),l&&e.interpolatePadding(a,t.padding,i),t.around)(0,c.Pr)("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(t.around,t.aroundPoint);else{let t=i*(v>g?Math.min(2,x):Math.max(.5,x))**(1-i),a=Ra(r,y,b,t);e.setCenter(a.wrap())}if(h){let t=c.dn.number(g,v,i)+Pa(0,e.center.lat);e.setZoom(t)}},isZooming:h,elevationCenter:m}}handleFlyTo(e,t){let i=void 0!==t.zoom,r=e.center,a=e.zoom,o=e.padding,n=!e.isPaddingEqual(t.padding),s=e.applyConstrain(c.st.convert(t.center||t.locationAtOffset),a).center,l=i?+t.zoom:e.zoom+Pa(e.center.lat,s.lat),h=e.clone();h.setCenter(s),h.setZoom(l),h.setBearing(t.bearing);let u=new c.Ri((0,c.Vn)(e.centerPoint.x+t.offsetAsPoint.x,0,e.width),(0,c.Vn)(e.centerPoint.y+t.offsetAsPoint.y,0,e.height));h.setLocationAtPoint(s,u);let d=h.center;Or(e,d);let _=sa(e,r,d),p=a+Pa(r.lat,0),m=l+Pa(d.lat,0),f=(0,c.Ir)(m-p),g="number"==typeof t.minZoom?+t.minZoom:e.minZoom,v=Math.max(g,e.minZoom)+Pa(d.lat,0),y=Math.min(v,p,m)+Pa(0,d.lat),b=e.applyConstrain(d,y).zoom+Pa(d.lat,0),x=(0,c.Ir)(b-p),w=(0,c.Zn)(r.lng,d.lng),T=(0,c.Zn)(r.lat,d.lat);return{easeFunc:(i,a,s,h)=>{let u=Ra(r,w,T,s);n&&e.interpolatePadding(o,t.padding,i);let _=1===i?d:u;e.setCenter(_.wrap());let m=p+(0,c.Or)(a);e.setZoom(1===i?l:m+Pa(0,_.lat))},scaleOfZoom:f,targetCenter:d,scaleOfMinZoom:x,pixelPathLength:_}}static solveVectorScale(e,t,i,r,a){let o=a,n="x"===r?[i[0],i[4],i[8],i[12]]:[i[1],i[5],i[9],i[13]],s=[i[3],i[7],i[11],i[15]],l=e[0]*n[0]+e[1]*n[1]+e[2]*n[2],h=e[0]*s[0]+e[1]*s[1]+e[2]*s[2],c=t[0]*n[0]+t[1]*n[1]+t[2]*n[2],u=t[0]*s[0]+t[1]*s[1]+t[2]*s[2];return c+o*h===l+o*u||s[3]*(l-c)+n[3]*(u-h)+l*u===c*h?null:(c+n[3]-o*u-o*s[3])/(c-l-o*u+o*h)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&t<e?t:e}}
1172,Ua=class{constructor(e){this._globe=e,this._mercatorCameraHelper=new ta,this._verticalPerspectiveCameraHelper=new Za}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,t){return this.currentHelper.handlePanInertia(e,t)}handleMapControlsRollPitchBearingZoom(e,t){this.currentHelper.handleMapControlsRollPitchBearingZoom(e,t)}handleMapControlsPan(e,t,i){this.currentHelper.handleMapControlsPan(e,t,i)}cameraForBoxAndBearing(e,t,i,r,a){return this.currentHelper.cameraForBoxAndBearing(e,t,i,r,a)}handleJumpToCenterZoom(e,t){this.currentHelper.handleJumpToCenterZoom(e,t)}handleEaseTo(e,t){return this.currentHelper.handleEaseTo(e,t)}handleFlyTo(e,t){return this.currentHelper.handleFlyTo(e,t)}};function Na(e,t,i){let r={constrainOverride:t};if(Array.isArray(e)){let t=new oa({type:e},i);return{projection:t,transform:new Ba(r),cameraHelper:new Ua(t)}}switch(e){case"mercator":return{projection:new Fr,transform:new Xr(r),cameraHelper:new ta};case"globe":{let e=new oa({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]},{});return{projection:e,transform:new Ba(r),cameraHelper:new Ua(e)}}case"vertical-perspective":return{projection:new aa,transform:new ka(r),cameraHelper:new Za};default:return(0,c.Pr)(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new Fr,transform:new Xr(r),cameraHelper:new ta}}}const Ga=(function(){let e={},t=c.gn.$version;for(let i in c.gn.$root){let r=c.gn.$root[i];if(r.required){let a=null;a="version"===i?t:"array"===r.type?[]:{},null!=a&&(e[i]=a)}}return e})();var Va=class extends c.yn{constructor(e,t={}){super(),this._rtlPluginLoaded=()=>{for(let e in this.tileManagers){let t=this.tileManagers[e].getSource().type;("vector"===t||"geojson"===t)&&this.tileManagers[e].reload()}},this.map=e,this.dispatcher=new Ze(Oe(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.dispatcher.registerMessageHandler("GDA",(e,t)=>this.getDashes(e,t)),this.imageManager=new oe,this.imageManager.setEventedParent(this),this.imageManager.setMissingImageResolver(e._missingStyleImageResolver),this.patternAtlas=new ne(this.imageManager);let i=e._container?.lang||typeof document<"u"&&document.documentElement?.lang||void 0;this.glyphManager=new xe(e._requestManager,t.localIdeographFontFamily,i),this.lineAtlas=new Ce(256,512),this.crossTileSymbolIndex=new Sr,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",(0,c.wn)()),$t().on(Vt,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.tileManagers[e.sourceId];if(!t)return;let i=t.getSource();if(i?.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===i.id&&this._validateLayer(t)}})}_setInitialValues(){this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new c.nn,this._imagesListDirty=!1,this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this._symbolPlacementTriggered=!1,this._placedProjectionTransition=void 0,this.crossTileSymbolIndex=new(this.crossTileSymbolIndex?.constructor||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,t){this._checkLoaded();let i=null===t?this.stylesheet.state?.[e]?.default??null:t;if((0,c.Jn)(i,this._globalState[e]))return this;this._globalState[e]=i,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let t=[];for(let i in e)(0,c.Jn)(this._globalState[i],e[i].default)||(t.push(i),this._globalState[i]=e[i].default);this._applyGlobalStateChanges(t)}_applyGlobalStateChanges(e){if(0===e.length)return;let t=new Set,i={};for(let r of e){i[r]=this._globalState[r];for(let e in this._layers){let i=this._layers[e],a=i.getLayoutAffectingGlobalStateRefs(),o=i.getPaintAffectingGlobalStateRefs(),n=i.getVisibilityAffectingGlobalStateRefs();if(a.has(r)&&t.add(i.source),o.has(r))for(let{name:e,value:t}of o.get(r))this._updatePaintProperty(i,e,t);n?.has(r)&&(i.recalculateVisibility(),this._updateLayer(i))}}this.dispatcher.broadcast("UGS",i);for(let e in this.tileManagers)t.has(e)&&(this._reloadSource(e),this._changed=!0)}async loadURL(e,t={},i){this.fire(new z("dataloading")),t.validate="boolean"!=typeof t.validate||t.validate,this._loadStyleRequest=new AbortController;let r=this._loadStyleRequest;try{let a=await this.map._requestManager.transformRequest(e,"Style");
1172(0,c.Pn)(r.signal);let o=await(0,c.Cn)(a,r);this._loadStyleRequest===r&&(this._loadStyleRequest=null),this._load(o.data,t,i)}catch(e){this._loadStyleRequest===r&&(this._loadStyleRequest=null),e&&!r.signal.aborted&&this.fire(new c._n((0,c.$n)(e)))}}loadJSON(e,t={},i){this.fire(new z("dataloading")),this._frameRequest=new AbortController,y.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,t.validate=!1!==t.validate,this._load(e,t,i)}).catch(()=>{})}loadEmpty(){this.fire(new z("dataloading")),this._load(Ga,{validate:!1})}_load(e,t,i){let r=t.transformStyle?t.transformStyle(i,e):e;if(!t.validate||!(0,c.cn)(this,r)){r=Object.assign({},r),this._loaded=!0,this.stylesheet=r;for(let e in r.sources)this.addSource(e,r.sources[e],{validate:!1});r.sprite?this._loadSprite(r.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(r.glyphs),this.glyphManager.setFontFaces(r["font-faces"]),this._createLayers(),this.light=new Te(this.stylesheet.light??{},this._globalState),this._setProjectionInternal(this.stylesheet.projection?.type||"mercator"),this.sky=new Me(this.stylesheet.sky,this._globalState),this.map.setTerrain(this.stylesheet.terrain??null,{validate:!1}),this.fire(new z("data")),this.fire(new E)}}_createLayers(){let e=N(this.stylesheet.layers);this.setGlobalState(this.stylesheet.state??null),this.dispatcher.broadcast("SL",e),this._order=e.map(e=>e.id),this._layers={},this._serializedLayers=null;for(let t of e){let e=(0,c._)(t,this._globalState);if(e.setEventedParent(this,{layer:{id:t.id}}),this._layers[t.id]=e,(0,c.Jt)(e)&&this.tileManagers[e.source]){let i=t.paint?.["raster-fade-duration"]??e.paint.get("raster-fade-duration");this.tileManagers[e.source].setRasterFadeDuration(i)}}}async _loadSprite(e,t=!1,i=void 0){this.imageManager.setLoaded(!1);let r,a=new AbortController;this._spriteRequest=a;try{let i=await re(e,this.map._requestManager,this.map.getPixelRatio(),a);if(!i)return;for(let e in i){let{loaded:r,removed:a}=this.imageManager.setSpriteImages(e,i[e]);this._markImagesChanged(a),t&&this._markImagesChanged(r)}}catch(e){r=e,a.signal.aborted||this.fire(new c._n(r))}finally{this._spriteRequest=null,this.imageManager.setLoaded(!0),t&&(this._changed=!0),this.dispatcher.broadcast("SI",this.imageManager.listImages()),this.fire(new z("data")),i?.(r)}}_unloadSprite(){this._markImagesChanged(this.imageManager.removeAllSpriteImages()),this._imagesListDirty=!0,this._changed=!0,this.fire(new z("data"))}_validateLayer(e){let t=this.tileManagers[e.source];if(!t)return;let i=e.sourceLayer;if(!i)return;let r=t.getSource();("geojson"===r.type||r.vectorLayerIds&&!r.vectorLayerIds.includes(i))&&this.fire(new c._n(Error(`Source layer "${i}" does not exist on source "${r.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,t=!1){let i=this._serializedAllLayers();if(!e||0===e.length)return Object.values(t?(0,c.Hn)(i):i);let r=[];for(let a of e)if(i[a]){let e=t?(0,c.Hn)(i[a]):i[a];r.push(e)}return r}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};let t=Object.keys(this._layers);for(let i of t){let t=this._layers[i];"custom"!==t.type&&(e[i]=t.serialize())}return e}hasTransitions(){if(this.light?.hasTransition()||this.sky?.hasTransition()||this.projection?.hasTransition())return!0;for(let e in this.tileManagers)if(this.tileManagers[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let t=this._changed;if(t){this._imagesListDirty&&=(this.dispatcher.broadcast("SI",this.imageManager.listImages()),!1);let t=Object.keys(this._updatedLayers),i=Object.keys(this._removedLayers);(t.length||i.length)&&this._updateWorkerLayers(t,i);for(let e in this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let t in this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let i={};for(let e in this.tileManagers){let t=this.tileManagers[e];i[e]=t.used,t.used=!1}let r=this.imageManager.listImages();for(let t of this._order){let i=this._layers[t];
1172i.recalculate(e,r),!i.isHidden(e.zoom)&&i.source&&(this.tileManagers[i.source].used=!0)}for(let e in i){let t=this.tileManagers[e];!!i[e]!=!!t.used&&t.fire(new A("data",{sourceDataType:"visibility",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,t&&this.fire(new z("data"))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,t={}){this._checkLoaded();let i=this.serialize();if(e=t.transformStyle?t.transformStyle(i,e):e,(t.validate??1)&&(0,c.cn)(this,e))return!1;(e=(0,c.Hn)(e)).layers=N(e.layers);let r=ee(i,e),a=this._getOperationsToPerform(r);if(a.unimplemented.length>0)throw Error(`Unimplemented: ${a.unimplemented.join(", ")}.`);if(0===a.operations.length)return!1;for(let e of a.operations)e();return this.stylesheet=e,this._serializedLayers=null,this.fire(new E({style:this})),!0}_getOperationsToPerform(e){let t=[],i=[];for(let r of e)switch(r.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,r.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,r.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,r.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,r.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,r.args));break;case"addSource":t.push(()=>this.addSource.apply(this,r.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,r.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,r.args));break;case"setLight":t.push(()=>this.setLight.apply(this,r.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,r.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,r.args));break;case"setFontFaces":t.push(()=>this.setFontFaces.apply(this,r.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,r.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,r.args));break;case"setSky":t.push(()=>this.setSky.apply(this,r.args));break;case"setProjection":this.setProjection.apply(this,r.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,r.args));break;case"setTransition":t.push(()=>{});break;default:i.push(r.command)}return{operations:t,unimplemented:i}}addImage(e,t){this.getImage(e)?this.fire(new c._n(Error(`An image named "${e}" already exists.`))):(this.imageManager.addImage(e,t),this._afterImageUpdated(e))}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}setMissingImageResolver(e){this.imageManager.setMissingImageResolver(e)}removeImage(e){this.getImage(e)?(this.imageManager.removeImage(e),this._afterImageUpdated(e)):this.fire(new c._n(Error(`An image named "${e}" does not exist.`)))}_markImagesChanged(e){for(let t of e)this._changedImages[t]=!0}_afterImageUpdated(e){this._changedImages[e]=!0,this._imagesListDirty=!0,this._changed=!0,this.fire(new z("data"))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,t,i={}){if(this._checkLoaded(),void 0!==this.tileManagers[e])throw Error(`Source "${e}" already exists.`);if(!t.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(t).join(", ")}.`);if(c.in.has(t.type)&&this._validate(c.sn.source,`sources.${e}`,t,null,i))return;this.map?._collectResourceTiming&&(t.collectResourceTiming=!0);let r=this.tileManagers[e]=new xi(e,t,this.dispatcher);r.style=this,r.setEventedParent(this,()=>({isSourceLoaded:r.loaded(),source:r.serialize(),sourceId:e})),r.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);for(let t in this._layers)if(this._layers[t].source===e)return this.fire(new c._n(Error(`Source "${e}" cannot be removed while layer "${t}" is using it.`)));let t=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],t.fire(new A("data",{sourceDataType:"metadata",sourceId:e})),t.setEventedParent(null),t.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);let i=this.tileManagers[e].getSource();if("geojson"!==i.type)throw Error(`geojsonSource.type is ${i.type}, which is !== 'geojson`);i.setData(t),this._changed=!0}getSource(e){return this.tileManagers[e]?.getSource()}addLayer(e,t,i={}){this._checkLoaded();let r,a=e.id;if(this.getLayer(a))return void this.fire(new c._n(Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if((0,c.an)(this,(0,c.y)(e)))return;r=(0,c._)(e,this._globalState)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=(0,c.Hn)(e),e=(0,c.tr)(e,{source:a}
1172)),this._validate(c.sn.layer,`layers.${a}`,e,{arrayIndex:-1},i))return;r=(0,c._)(e,this._globalState),this._validateLayer(r),r.setEventedParent(this,{layer:{id:a}})}let o=t?this._order.indexOf(t):this._order.length;if(t&&-1===o)this.fire(new c._n(Error(`Cannot add layer "${a}" before non-existing layer "${t}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=r,this._removedLayers[a]&&r.source&&"custom"!==r.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.type===r.type?(this._updatedSources[r.source]="reload",this.tileManagers[r.source].pause()):this._updatedSources[r.source]="clear"}this._updateLayer(r),r.onAdd&&r.onAdd(this.map)}}moveLayer(e,t){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new c._n(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===t)return;if(t&&!this._order.includes(t))return void this.fire(new c._n(Error(`Cannot move layer "${e}" before non-existing layer "${t}".`)));let i=this._order.indexOf(e);this._order.splice(i,1);let r=t?this._order.indexOf(t):this._order.length;this._order.splice(r,0,e),this._layerOrderChanged=!0}removeLayer(e){this._checkLoaded();let t=this._layers[e];if(!t)return void this.fire(new c._n(Error(`Cannot remove non-existing layer "${e}".`)));t.setEventedParent(null);let i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=t,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],"symbol"===t.type&&t.source&&this.tileManagers[t.source]?.resetMaxContentElevation(),t.onRemove&&t.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,t,i){this._checkLoaded();let r=this.getLayer(e);r?(r.minzoom!==t||r.maxzoom!==i)&&(null!=t&&(r.minzoom=t),null!=i&&(r.maxzoom=i),this._updateLayer(r)):this.fire(new c._n(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,t,i={}){this._checkLoaded();let r=this.getLayer(e);if(r){if(!(0,c.Jn)(r.filter,t)){if(null==t)return r.setFilter(void 0),void this._updateLayer(r);this._validate(c.sn.filter,`layers.${r.id}.filter`,t,null,i)||(r.setFilter((0,c.Hn)(t)),this._updateLayer(r))}}else this.fire(new c._n(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return(0,c.Hn)(this.getLayer(e).filter)}setLayoutProperty(e,t,i,r={}){this._checkLoaded();let a=this.getLayer(e);a?(0,c.Jn)(a.getLayoutProperty(t),i)||(a.setLayoutProperty(t,i,r),this._updateLayer(a)):this.fire(new c._n(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,t){let i=this.getLayer(e);if(i)return i.getLayoutProperty(t);this.fire(new c._n(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,t,i,r={}){this._checkLoaded();let a=this.getLayer(e);a?(0,c.Jn)(a.getPaintProperty(t),i)||this._updatePaintProperty(a,t,i,r):this.fire(new c._n(Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,t,i,r={}){e.setPaintProperty(t,i,r)&&this._updateLayer(e),(0,c.Jt)(e)&&"raster-fade-duration"===t&&this.tileManagers[e.source].setRasterFadeDuration(i),this._changed=!0,this._updatedPaintProps[e.id]=!0,"symbol"===e.type&&this.triggerSymbolPlacement(),this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,t){this._checkLoaded();let i=e.source,r=e.sourceLayer,a=this.tileManagers[i];if(void 0===a)return void this.fire(new c._n(Error(`The source '${i}' does not exist in the map's style.`)));let o=a.getSource().type;if("geojson"===o&&r)return void this.fire(new c._n(Error("GeoJSON sources cannot have a sourceLayer parameter.")));if("vector"===o&&!r)return void this.fire(new c._n(Error("The sourceLayer parameter must be provided for vector source types.")));if(void 0===e.id)return void this.fire(new c._n(Error("The feature id parameter must be provided.")));let n=["__proto__","constructor","prototype"];t&&Object.keys(t).some(e=>n.includes(e))?this.fire(new c._n(Error(`The feature state should not include one of the following keys: ${n}`))):a.setFeatureState(r,e.id,t)}removeFeatureState(e,t){this._checkLoaded();let i=e.source,r=this.tileManagers[i];if(void 0===r)return void this.fire(new c._n(Error(`The source '${i}' does not exist in the map's style.`)));let a=r.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?t&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new c._n(Error("A feature id is required to remove its specific state property."))):r.removeFeatureState(
1172o,e.id,t):this.fire(new c._n(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let t=e.source,i=e.sourceLayer,r=this.tileManagers[t];if(void 0!==r){if("vector"!==r.getSource().type||i)return void 0===e.id&&this.fire(new c._n(Error("The feature id parameter must be provided."))),r.getFeatureState(i,e.id);this.fire(new c._n(Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new c._n(Error(`The source '${t}' does not exist in the map's style.`)))}getTransition(){return(0,c.tr)({duration:300,delay:0},this.stylesheet?.transition)}serialize(){if(!this._loaded)return;let e=(0,c.gr)(this.tileManagers,e=>e.serialize()),t=this._serializeByIds(this._order,!0),i=this.map.getTerrain()||void 0,r=this.stylesheet;return(0,c.nr)({version:r.version,name:r.name,metadata:r.metadata,light:r.light,sky:r.sky,center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch,sprite:r.sprite,glyphs:r.glyphs,"font-faces":r["font-faces"],transition:r.transition,projection:r.projection,state:r.state,sources:e,layers:t,terrain:i},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.tileManagers[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,i={},r=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o)){i[o]=a;for(let t of e){let e=t[o];if(e)for(let t of e)r.push(t)}}}r.sort((e,t)=>t.intersectionZ-e.intersectionZ);let a=[];for(let o=this._order.length-1;o>=0;o--){let n=this._order[o];if(t(n))for(let e=r.length-1;e>=0;e--){let t=r[e].feature;if(i[t.layer.id]<o)break;a.push(t),r.pop()}else for(let t of e){let e=t[n];if(e)for(let t of e)a.push(t.feature)}}return a}queryRenderedFeatures(e,t,i){t?.filter&&this._validate(c.sn.filter,"queryRenderedFeatures.filter",t.filter,null,t);let r={};if(t?.layers){if(!(Array.isArray(t.layers)||t.layers instanceof Set))return this.fire(new c._n(Error("parameters.layers must be an Array or a Set of strings"))),[];for(let e of t.layers){let t=this._layers[e];if(!t)return this.fire(new c._n(Error(`The layer '${e}' does not exist in the map's style and cannot be queried for features.`))),[];r[t.source]=!0}}let a=[];t.availableImages=this.imageManager.listImages();let o=this._serializedAllLayers(),n=t.layers instanceof Set?t.layers:Array.isArray(t.layers)?new Set(t.layers):null,s=Object.assign({},t,{layers:n,globalState:this._globalState});for(let n in this.tileManagers)(!t.layers||r[n])&&a.push(We(this.tileManagers[n],this._layers,o,e,s,i,this.map.terrain?(e,t,i)=>this.map.terrain.getElevation(e,t,i):void 0));return this.placement&&a.push(qe(this._layers,o,this.tileManagers,e,s,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,t){t?.filter&&this._validate(c.sn.filter,"querySourceFeatures.filter",t.filter,null,t);let i=this.tileManagers[e];return i?$e(i,t?Object.assign({},t,{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,t={}){this._checkLoaded();let i=this.light.getLight(),r=!1;for(let t in e)if(!(0,c.Jn)(e[t],i[t])){r=!0;break}if(!r)return;let a={now:x(),transition:(0,c.tr)({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,t),this.light.updateTransitions(a)}getProjection(){return this.stylesheet?.projection}setProjection(e){this._checkLoaded();let t=e??{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){return this.stylesheet?.sky}setSky(e,t={}){this._checkLoaded();let i=this.getSky(),r=!1;if(!e&&!i)return;if(e&&!i)r=!0;else if(!e&&i)r=!0;else for(let t in e)if(!(0,c.Jn)(e[t],i[t])){r=!0;break}if(!r)return;let a={now:x(),transition:(0,c.tr)({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,t),this.sky.updateTransitions(a)}_setProjectionInternal(e){let t=Na(e,this.map._camera?.transform.constrainOverride,this._globalState);this.projection=t.projection,this.map.migrateProjection(t.transform,t.cameraHelper);for(let e in this.tileManagers)this.tileManagers[e].reload()}_validate(e,t,i,r,a={}
1172){return!1!==a.validate&&(0,c.on)(this,e,Object.assign({key:t,style:this.serialize(),value:i},r),a)}_remove(e=!0){this._frameRequest&&=(this._frameRequest.abort(),null),this._loadStyleRequest&&=(this._loadStyleRequest.abort(),null),this._spriteRequest&&=(this._spriteRequest.abort(),null),$t().off(Vt,this._rtlPluginLoaded);for(let e in this._layers)this._layers[e].setEventedParent(null);for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}triggerSymbolPlacement(){this._symbolPlacementTriggered=!0}_placementInputsChanged(e,t,i){let r=this.pauseablePlacement;return!r||this._symbolPlacementTriggered||this._placedProjectionTransition!==this.projection?.transitionState||r._showCollisionBoxes!==t||r.placement.collisionGroups.crossSourceCollisions!==i||r.placement.transform.renderWorldCopies!==e.renderWorldCopies||!(0,c.xi)(r.placement.transform.modelViewProjectionMatrix,e.modelViewProjectionMatrix)}_updatePlacement(e,t,i,r,a=!1){let o=!1,n=!1,s={};for(let t of this._order){let i=this._layers[t];if("symbol"!==i.type)continue;if(!s[i.source]){let e=this.tileManagers[i.source];s[i.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let r=this.crossTileSymbolIndex.addLayer(i,s[i.source],e.center.lng);o||=r}this.crossTileSymbolIndex.pruneUnusedLayers(this._order),a||=this._layerOrderChanged||0===i;let l=o||this._placementInputsChanged(e,t,r),h=this.pauseablePlacement?.isDone()&&!this.placement.stillRecent(x(),e.zoom);if((a||!this.pauseablePlacement||h&&(l||this.placement.stale))&&(this._symbolPlacementTriggered=!1,this._placedProjectionTransition=this.projection?.transitionState,this.pauseablePlacement=new fr(e,this.map.terrain,this._order,a,t,i,r,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?l&&this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(x()),n=!0),o&&this.pauseablePlacement.placement.setStale()),n||o)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,s[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(x())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}async getImages(e,t){let i=await this.imageManager.getImages(t.icons);this._updateTilesForChangedImages();let r=this.tileManagers[t.source];return r&&r.setDependencies(t.tileID.key,t.type,t.icons),i}async getGlyphs(e,t){let i=await this.glyphManager.getGlyphs(t.stacks),r=this.tileManagers[t.source];return r&&r.setDependencies(t.tileID.key,t.type,[""]),i}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,t={}){this._checkLoaded(),(!e||!this._validate(c.sn.glyphs,"glyphs",e,null,t))&&(this._changed=!0,this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getFontFaces(){return this.stylesheet["font-faces"]||null}setFontFaces(e){this._checkLoaded(),this._changed=!0,this._glyphsDidChange=!0,this.stylesheet["font-faces"]=e,this.glyphManager.setFontFaces(e)}async getDashes(e,t){let i={};for(let[e,r]of Object.entries(t.dashes))i[e]=this.lineAtlas.getDash(r.dasharray,r.round);return i}addSprite(e,t,i={},r){this._checkLoaded();let a=[{id:e,url:t}],o=[...te(this.stylesheet.sprite),...a];this._validate(c.sn.sprite,"sprite",o,null,i)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,r))}removeSprite(e){this._checkLoaded();let t=te(this.stylesheet.sprite);if(!t.find(t=>
1172t.id===e))return void this.fire(new c._n(Error(`Sprite "${e}" doesn't exists on this map.`)));let i=this.imageManager.removeSpriteImages(e);this._markImagesChanged(i),t.splice(t.findIndex(t=>t.id===e),1),this.stylesheet.sprite=t.length>0?t:void 0,this._imagesListDirty=!0,this._changed=!0,this.fire(new z("data"))}getSprite(){return te(this.stylesheet.sprite)}setSprite(e,t={},i){this._checkLoaded(),(!e||!this._validate(c.sn.sprite,"sprite",e,null,t))&&(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,i):(this._unloadSprite(),i&&i(null)))}destroy(){this._frameRequest&&=(this._frameRequest.abort(),null),this._loadStyleRequest&&=(this._loadStyleRequest.abort(),null),this._spriteRequest&&=(this._spriteRequest.abort(),null);for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this.patternAtlas.destroy()),this.glyphManager&&this.glyphManager.destroy();for(let e in this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}};const Wa=(0,c.qt)([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);var qa=class{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,i,r,a,o,n,s,l){this.context=e;let h=this.boundPaintVertexBuffers.length!==r.length;for(let e=0;!h&&e<r.length;e++)this.boundPaintVertexBuffers[e]!==r[e]&&(h=!0);!this.vao||this.boundProgram!==t||this.boundLayoutVertexBuffer!==i||h||this.boundIndexBuffer!==a||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==n||this.boundDynamicVertexBuffer2!==s||this.boundDynamicVertexBuffer3!==l?this.freshBind(t,i,r,a,o,n,s,l):(e.bindVertexArray.set(this.vao),n&&n.bind(),a?.dynamicDraw&&a.bind(),s&&s.bind(),l&&l.bind())}freshBind(e,t,i,r,a,o,n,s){let l=e.numAttributes,h=this.context,c=h.gl;this.vao&&this.destroy(),this.vao=h.createVertexArray(),h.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=t,this.boundPaintVertexBuffers=i,this.boundIndexBuffer=r,this.boundVertexOffset=a,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=n,this.boundDynamicVertexBuffer3=s,t.enableAttributes(c,e);for(let t of i)t.enableAttributes(c,e);o&&o.enableAttributes(c,e),n&&n.enableAttributes(c,e),s&&s.enableAttributes(c,e),t.bind(),t.setVertexAttribPointers(c,e,a);for(let t of i)t.bind(),t.setVertexAttribPointers(c,e,a);o&&(o.bind(),o.setVertexAttribPointers(c,e,a)),r&&r.bind(),n&&(n.bind(),n.setVertexAttribPointers(c,e,a)),s&&(s.bind(),s.setVertexAttribPointers(c,e,a)),h.currentNumAttributes=l}destroy(){this.vao&&=(this.context.deleteVertexArray(this.vao),null)}};const $a=(e,t)=>({u_depth:new c.At(e,t.u_depth),u_terrain:new c.At(e,t.u_terrain)}),Ha=(e,t,i,r,a)=>({u_texture:0,u_ele_delta:e,u_fog_matrix:t,u_fog_color:i?i.properties.get("fog-color"):c.pn.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:a?0:i?i.calculateFogBlendOpacity(r):0,u_horizon_color:i?i.properties.get("horizon-color"):c.pn.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!a}),Xa=e=>({u_ele_delta:e}),Ka={ProjectionUBO:0,TerrainUBO:1,FrameUBO:2};function Ya(e,t){for(let[i,r]of Object.entries(Ka)){let a=e.getUniformBlockIndex(t,i);a!==e.INVALID_INDEX&&e.uniformBlockBinding(t,a,r)}}const Ja={float:[1,1],int:[1,1],vec2:[2,2],vec4:[4,4],mat4:[16,4]};function Qa(e){let t={},i=0;for(let{name:r,type:a}of e){let[e,o]=Ja[a];i=Math.ceil(i/o)*o,t[r]=i,i+=e}return{offsets:t,contentWords:i,sizeWords:4*Math.ceil(i/4)}}var eo=class{constructor(e,t,i){this.context=e,this.binding=t,this.contentWords=i.contentWords;let r=e.gl;this.buffer=r.createBuffer(),r.bindBuffer(r.UNIFORM_BUFFER,this.buffer),r.bufferData(r.UNIFORM_BUFFER,4*i.sizeWords,r.DYNAMIC_DRAW),r.b
vendor: 6,012 bytes, line 1172
1172indBufferBase(r.UNIFORM_BUFFER,t,this.buffer),this.uploaded=new Float32Array(i.sizeWords),this.pending=new Float32Array(i.sizeWords),this.uploadedWords=new Uint32Array(this.uploaded.buffer),this.pendingWords=new Uint32Array(this.pending.buffer),this.hasData=!1,this.bindingDirty=!1}upload(){let e=this.context.gl,t=!this.hasData;if(!t){let e=this.pendingWords,i=this.uploadedWords;for(let r=0;r<this.contentWords;r++)if(e[r]!==i[r]){t=!0;break}}this.bindingDirty&&=(e.bindBufferBase(e.UNIFORM_BUFFER,this.binding,this.buffer),!1),t&&(e.bindBuffer(e.UNIFORM_BUFFER,this.buffer),e.bufferSubData(e.UNIFORM_BUFFER,0,this.pending),this.uploaded.set(this.pending),this.hasData=!0)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}};const to=Qa([{name:"u_projection_matrix",type:"mat4"},{name:"u_projection_fallback_matrix",type:"mat4"},{name:"u_projection_tile_mercator_coords",type:"vec4"},{name:"u_projection_clipping_plane",type:"vec4"},{name:"u_projection_transition",type:"float"},{name:"u_projection_clip_antimeridian",type:"int"}]),io=to.offsets;function ro(e){return new eo(e,Ka.ProjectionUBO,to)}function ao(e,t){let i=e.pending;i.set(t.mainMatrix,io.u_projection_matrix),i.set(t.fallbackMatrix,io.u_projection_fallback_matrix),i.set(t.tileMercatorCoords,io.u_projection_tile_mercator_coords),i.set(t.clippingPlane,io.u_projection_clipping_plane),i[io.u_projection_transition]=t.projectionTransition,e.pendingWords[io.u_projection_clip_antimeridian]=+!!t.clipAntimeridian,e.upload()}const oo=Qa([{name:"u_terrain_matrix",type:"mat4"},{name:"u_terrain_unpack",type:"vec4"},{name:"u_terrain_dim",type:"float"},{name:"u_terrain_exaggeration",type:"float"}]),no=oo.offsets;function so(e){return new eo(e,Ka.TerrainUBO,oo)}function lo(e,t){let i=e.pending;i.set(t.u_terrain_matrix,no.u_terrain_matrix),i.set(t.u_terrain_unpack,no.u_terrain_unpack),i[no.u_terrain_dim]=t.u_terrain_dim,i[no.u_terrain_exaggeration]=t.u_terrain_exaggeration,e.upload()}function ho(e){let t=[];for(let i of e){if(null===i)continue;let e=i.split(" ");t.push(e.pop())}return t}function co(e,t){let i=new Set([e.INT,e.INT_VEC2,e.INT_VEC3,e.INT_VEC4,e.UNSIGNED_INT,e.UNSIGNED_INT_VEC2,e.UNSIGNED_INT_VEC3,e.UNSIGNED_INT_VEC4]),r=new Set,a=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let o=0;o<a;o++){let a=e.getActiveAttrib(t,o);a&&i.has(a.type)&&r.add(a.name)}return r}var uo=class{constructor(e,t,i,r,a,o,n,s,l=[]){let h=e.gl;this.program=h.createProgram();let c=ho(t.staticAttributes),u=i?i.getBinderAttributes():[],d=c.concat(u),_=zr.prelude.staticUniforms?ho(zr.prelude.staticUniforms):[],p=t.staticUniforms?ho(t.staticUniforms):[],m=i?i.getBinderUniforms():[],f=_.concat(p).concat(m),g=[];for(let e of f)g.includes(e)||g.push(e);let v=i?i.defines():[];v.unshift("#version 300 es"),a&&v.push("#define OVERDRAW_INSPECTOR;"),o&&v.push("#define TERRAIN3D;"),s&&v.push(s),l&&v.push(...l);let y=v.concat(zr.prelude.fragmentSource,n.fragmentSource,t.fragmentSource).join("\n"),b=v.concat(zr.prelude.vertexSource,n.vertexSource,t.vertexSource).join("\n"),x=h.createShader(h.FRAGMENT_SHADER);if(h.isContextLost())return void(this.failedToCreate=!0);h.shaderSource(x,y),h.compileShader(x),h.attachShader(this.program,x);let w=h.createShader(h.VERTEX_SHADER);if(h.isContextLost())return void(this.failedToCreate=!0);h.shaderSource(w,b),h.compileShader(w),h.attachShader(this.program,w),this.attributes={};let T={};if(this.numAttributes=d.length,h.linkProgram(this.program),!h.getProgramParameter(this.program,h.LINK_STATUS)){if(h.isContextLost())return void(this.failedToCreate=!0);throw h.getShaderParameter(x,h.COMPILE_STATUS)?h.getShaderParameter(w,h.COMPILE_STATUS)?Error(`Program failed to link: ${h.getProgramInfoLog(this.program)}`):Error(`Could not compile vertex shader: ${h.getShaderInfoLog(w)}`):Error(`Could not compile fragment shader: ${h.getShaderInfoLog(x)}`)}Ya(h,this.program);let P=co(h,this.program);for(let e of d){if(!e)continue;let t=h.getAttribLocation(this.program,e);t>=0&&(this.attributes[e]={location:t,isInteger:P.has(e)})}h.deleteShader(w),h.deleteShader(x);for(let e of g)if(e&&!T[e]){let t=h.getUniformLocation(this.program,e);t&&(T[e]=t)}this.fixedUniforms=r(e,T),this.terrainUniforms=$a(e,T),this.binderUniforms=i?i.getUniforms(e,T):[]}draw(e,t,i,r,a,o,n,s,l,h,c,u,d,_,p,m,f,g,v){let y=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(i),e.setStencilMode(r),e.setColorMode(a),e.setCullFace(o),s){e.activeTexture.set(y.TEXTURE2),y.bindTexture(y.TEXTURE_2D,s.depthTexture),e.activeTexture.set(y.TEXTURE3),y.bindTexture(y.TEXTURE_2D,s.texture);for(let e in this.terrainUniforms)this.terrainUniforms[e].set(s[e]);lo(e.terrainUniformBuffer,s)}if(l&&ao(e.projectionUniformBuffer,l),n)for(let e in this.fixedUniforms)this.fixedUniforms[e].set(n[e]);m&&m.setUniforms(e,this.binderUniforms,_,{zoom:p});let b=0;switch(t){case y.LINES:b=2;break;case y.TRIANGLES:b=3;break;case y.LINE_STRIP:b=1}for(let i of d.get())i.vaos||={},i.vaos[h]||=new qa,i.vaos[h].bind(e,this,c,m?m.getPaintVertexBuffers():[],u,i.vertexOffset,f,g,v),y.drawElements(t,i.primitiveLength*b,y.UNSIGNED_SHORT,i.primitiveOffset*b*2)}};function _o(e,t,i){let r=1/(0,c.Lr)(i,1,t.transform.tileZoom),a=2**i.tileID.overscaledZ,o=i.tileSize*2**t.transform.tileZoom/a,n=o*(i.tileID.canonical.x+i.tileID.wrap*a),s=o*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[r,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[n>>16,s>>16],u_pixel_coord_lower:[65535&n,65535&s]}}function po(e,t,i,r){let a=i.patternAtlas.getPattern(e.from.toString()),o=i.patternAtlas.getPattern(e.to.toString()),{width:n,height:s}=i.patternAtlas.getPixelSize(),l=2**r.tileID.overscaledZ,h=r.tileSize*2**i.transform.tileZoom/l,u=h*(r.tileID.canonical.x+r.tileID.wrap*l),d=h*r.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:a.tl,u_pattern_br_a:a.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[n,s],u_mix:t.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:
1172o.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/(0,c.Lr)(r,1,i.transform.tileZoom),u_pixel_coord_upper:[u>>16,d>>16],u_pixel_coord_lower:[65535&u,65535&d]}}const mo=(e,t,i,r)=>{let a=e.style.light,o=a.getCartesianPosition(),n=(0,c.Ni)();"viewport"===a.properties.get("anchor")&&(0,c.Pi)(n,e.transform.bearingInRadians),(0,c.pi)(o,o,n);let s=e.transform.transformLightDirection(o),l=a.properties.get("color");return{u_lightpos:o,u_lightpos_globe:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+t,u_opacity:i,u_fill_translate:r}},fo=(e,t,i,r,a,o,n)=>(0,c.tr)(mo(e,t,i,r),_o(o,e,n),{u_height_factor:-(2**a.overscaledZ)/n.tileSize/8}),go=(e,t,i,r,a)=>(0,c.tr)(_o(t,e,i),{u_fill_translate:r,u_sdf_pattern:+!!a}),vo=e=>({u_fill_translate:e}),yo=e=>({u_fill_translate:e}),bo=(e,t,i,r,a)=>go(e,t,i,r,a),xo=(e,t,i,r,a)=>{let o,n,s=e.transform,l=0;if("map"===i.paint.get("circle-pitch-alignment")){let e=(0,c.Lr)(t,1,s.zoom);o=!0,n=[e,e],l=e/(c.Rr*2**t.tileID.overscaledZ)*2*Math.PI*a}else o=!1,n=s.pixelsToGLUnits;return{u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_pitch_with_map:+o,u_extrude_scale:n,u_globe_extrude_scale:l,u_translate:r}},wo=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),To=(e,t,i,r)=>{let a=(0,c.Lr)(e,1,t)/(c.Rr*2**e.tileID.overscaledZ)*2*Math.PI*r;return{u_extrude_scale:(0,c.Lr)(e,1,t),u_intensity:i,u_globe_extrude_scale:a}},Po=(e,t,i,r)=>{let a=(0,c.yi)();return(0,c.Ei)(a,0,e.width,e.height,0,0,1),{u_matrix:a,u_image:i,u_color_ramp:r,u_opacity:t.paint.get("heatmap-opacity")}},Mo=(e,t,i)=>{let r,a=i.paint.get("hillshade-accent-color");switch(i.paint.get("hillshade-method")){case"basic":r=4;break;case"combined":r=1;break;case"igor":r=2;break;case"multidirectional":r=3;break;default:r=0}let o=i.getIlluminationProperties();for(let t=0;t<o.directionRadians.length;t++)"viewport"===i.paint.get("hillshade-illumination-anchor")&&(o.directionRadians[t]+=e.transform.bearingInRadians);return{u_image:0,u_latrange:Io(e,t.tileID),u_exaggeration:i.paint.get("hillshade-exaggeration"),u_altitudes:o.altitudeRadians,u_azimuths:o.directionRadians,u_accent:a,u_method:r,u_highlights:o.highlightColor,u_shadows:o.shadowColor}},Co=(e,t)=>{let i=t.stride,r=(0,c.yi)();return(0,c.Ei)(r,0,c.Rr,-c.Rr,0,0,1),(0,c.Mi)(r,r,[0,-c.Rr,0]),{u_matrix:r,u_image:1,u_dimension:[i,i],u_zoom:e.overscaledZ,u_unpack:t.getUnpackVector()}};function Io(e,t){let i=2**t.canonical.z,r=t.canonical.y;return[new c.et(0,r/i).toLngLat().lat,new c.et(0,(r+1)/i).toLngLat().lat]}const Ro=(e,t,i=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:i,u_opacity:e.paint.get("color-relief-opacity")}),So=(e,t,i,r)=>{let a=e.transform;return{u_translation:Fo(e,t,i),u_ratio:r/(0,c.Lr)(t,1,a.zoom)}},Eo=(e,t,i,r,a)=>(0,c.tr)(So(e,t,i,r),{u_image:0,u_image_height:a}),zo=(e,t,i,r,a)=>{let o=e.transform,n=Lo(t,o);return{u_translation:Fo(e,t,i),u_texsize:t.imageAtlasTexture.size,u_ratio:r/(0,c.Lr)(t,1,o.zoom),u_image:0,u_scale:[n,a.fromScale,a.toScale],u_fade:a.t}},Ao=(e,t,i,r,a)=>{let o=Lo(t,e.transform);return(0,c.tr)(So(e,t,i,r),{u_tileratio:o,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image:0,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},Do=(e,t,i,r,a,o)=>{let n=Lo(t,e.transform);return(0,c.tr)(So(e,t,i,r),{u_image:0,u_image_height:o,u_tileratio:n,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image_dash:1,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};function Lo(e,t){return 1/(0,c.Lr)(e,1,t.tileZoom)}function Fo(e,t,i){return(0,c.Mr)(e.transform,t,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}const ko=(e,t)=>({u_image:t,u_opacity:e}),Oo=(e,t,i,r,a,o,n,s,l,h,c,u,d,_,p)=>({u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_rotate_symbol:+i,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+c,u_pitch_with_map:+r,u_is_along_line:a,u_is_variable_anchor:o,u_texsize:u,u_texture:0,u_translation:h,u_pitched_scale:d,u_is_offset:_,u_height_anchor_ground:+p}),jo=(e,t,i,r,a,o,n,s,l,h,u,d,_,p,m,f)=>{let g=n.transform;return(0,c.tr)(Oo(e,t,i,r,a,o,0,s,l,h,u,d,p,m,f),{u_gamma_scale:r?Math.cos(g.pitch*Math.PI/180)*g.cameraToCenterDistance:1,u_is_halo:+!!_,u_is_plain:1})},Bo=(e,t,i,r,a,o,n,s,l,h,u,d,_,p,m)=>(0,c.tr)(jo(e,t,i,r,a,o,n,s,l,h,!0,u,!0,_,p,m),{u_texsize_icon:d,u_texture_icon:1}),Zo=(e,t)=>({u_opacity:e,u_color:t}),Uo=(e,t,i,r,a)=>(0,c.tr)(po(i,a,t,r),{u_opacity:e}),No=(e,t,i,r,a)=>({u_sun_pos:e,u_atmosphere_blend:t,u_globe_position:i,u_globe_radius:r,u_inv_proj_matrix:a}),Go=(e,t,i)=>{let r=Math.cos(t.rollInRadians),a=Math.sin(t.rollInRadians),o=(0,c.Y)(t),n=t.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:e.properties.get("sky-color"),u_horizon_color:e.properties.get("horizon-color"),u_horizon:[(t.width/2-o*
1172a)*i,(t.height/2+o*r)*i],u_horizon_normal:[-a,r],u_sky_horizon_blend:e.properties.get("sky-horizon-blend")*t.height/2*i,u_sky_blend:n,u_inv_proj_matrix:t.inverseProjectionMatrix,u_globe_position:_a(t),u_globe_radius:da(t.worldSize,t.center.lat)}},Vo=(e,t)=>({}),Wo={fillExtrusion:(e,t)=>({u_lightpos:new c.Mt(e,t.u_lightpos),u_lightpos_globe:new c.Mt(e,t.u_lightpos_globe),u_lightintensity:new c.kt(e,t.u_lightintensity),u_lightcolor:new c.Mt(e,t.u_lightcolor),u_vertical_gradient:new c.kt(e,t.u_vertical_gradient),u_opacity:new c.kt(e,t.u_opacity),u_fill_translate:new c.jt(e,t.u_fill_translate)}),fillExtrusionPattern:(e,t)=>({u_lightpos:new c.Mt(e,t.u_lightpos),u_lightpos_globe:new c.Mt(e,t.u_lightpos_globe),u_lightintensity:new c.kt(e,t.u_lightintensity),u_lightcolor:new c.Mt(e,t.u_lightcolor),u_vertical_gradient:new c.kt(e,t.u_vertical_gradient),u_height_factor:new c.kt(e,t.u_height_factor),u_opacity:new c.kt(e,t.u_opacity),u_fill_translate:new c.jt(e,t.u_fill_translate),u_image:new c.At(e,t.u_image),u_texsize:new c.jt(e,t.u_texsize),u_pixel_coord_upper:new c.jt(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.jt(e,t.u_pixel_coord_lower),u_scale:new c.Mt(e,t.u_scale),u_fade:new c.kt(e,t.u_fade)}),fill:(e,t)=>({u_fill_translate:new c.jt(e,t.u_fill_translate)}),fillPattern:(e,t)=>({u_image:new c.At(e,t.u_image),u_texsize:new c.jt(e,t.u_texsize),u_pixel_coord_upper:new c.jt(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.jt(e,t.u_pixel_coord_lower),u_scale:new c.Mt(e,t.u_scale),u_fade:new c.kt(e,t.u_fade),u_sdf_pattern:new c.At(e,t.u_sdf_pattern),u_fill_translate:new c.jt(e,t.u_fill_translate)}),fillOutline:(e,t)=>({u_fill_translate:new c.jt(e,t.u_fill_translate)}),fillOutlinePattern:(e,t)=>({u_image:new c.At(e,t.u_image),u_texsize:new c.jt(e,t.u_texsize),u_pixel_coord_upper:new c.jt(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.jt(e,t.u_pixel_coord_lower),u_scale:new c.Mt(e,t.u_scale),u_fade:new c.kt(e,t.u_fade),u_sdf_pattern:new c.At(e,t.u_sdf_pattern),u_fill_translate:new c.jt(e,t.u_fill_translate)}),circle:(e,t)=>({u_scale_with_map:new c.At(e,t.u_scale_with_map),u_pitch_with_map:new c.At(e,t.u_pitch_with_map),u_extrude_scale:new c.jt(e,t.u_extrude_scale),u_globe_extrude_scale:new c.kt(e,t.u_globe_extrude_scale),u_translate:new c.jt(e,t.u_translate)}),collisionBox:Vo,collisionCircle:Vo,debug:(e,t)=>({u_color:new c.Pt(e,t.u_color),u_overlay:new c.At(e,t.u_overlay),u_overlay_scale:new c.kt(e,t.u_overlay_scale)}),depth:Vo,clippingMask:Vo,heatmap:(e,t)=>({u_extrude_scale:new c.kt(e,t.u_extrude_scale),u_intensity:new c.kt(e,t.u_intensity),u_globe_extrude_scale:new c.kt(e,t.u_globe_extrude_scale)}),heatmapTexture:(e,t)=>({u_matrix:new c.Lt(e,t.u_matrix),u_image:new c.At(e,t.u_image),u_color_ramp:new c.At(e,t.u_color_ramp),u_opacity:new c.kt(e,t.u_opacity)}),hillshade:(e,t)=>({u_image:new c.At(e,t.u_image),u_latrange:new c.jt(e,t.u_latrange),u_exaggeration:new c.kt(e,t.u_exaggeration),u_altitudes:new c.It(e,t.u_altitudes),u_azimuths:new c.It(e,t.u_azimuths),u_accent:new c.Pt(e,t.u_accent),u_method:new c.At(e,t.u_method),u_shadows:new c.Ft(e,t.u_shadows),u_highlights:new c.Ft(e,t.u_highlights)}),hillshadePrepare:(e,t)=>({u_matrix:new c.Lt(e,t.u_matrix),u_image:new c.At(e,t.u_image),u_dimension:new c.jt(e,t.u_dimension),u_zoom:new c.kt(e,t.u_zoom),u_unpack:new c.Nt(e,t.u_unpack)}),colorRelief:(e,t)=>({u_image:new c.At(e,t.u_image),u_unpack:new c.Nt(e,t.u_unpack),u_dimension:new c.jt(e,t.u_dimension),u_elevation_stops:new c.At(e,t.u_elevation_stops),u_color_stops:new c.At(e,t.u_color_stops),u_color_ramp_size:new c.At(e,t.u_color_ramp_size),u_opacity:new c.kt(e,t.u_opacity)}),line:(e,t)=>({u_translation:new c.jt(e,t.u_translation),u_ratio:new c.kt(e,t.u_ratio)}),lineGradient:(e,t)=>({u_translation:new c.jt(e,t.u_translation),u_ratio:new c.kt(e,t.u_ratio),u_image:new c.At(e,t.u_image),u_image_height:new c.kt(e,t.u_image_height)}),linePattern:(e,t)=>({u_translation:new c.jt(e,t.u_translation),u_texsize:new c.jt(e,t.u_texsize),u_ratio:new c.kt(e,t.u_ratio),u_image:new c.At(e,t.u_image),u_scale:new c.Mt(e,t.u_scale),u_fade:new c.kt(e,t.u_fade)}),lineSDF:(e,t)=>({u_translation:new c.jt(e,t.u_translation),u_ratio:new c.kt(e,t.u_ratio),u_image:new c.At(e,t.u_image),u_mix:new c.kt(e,t.u_mix),u_tileratio:new c.kt(e,t.u_tileratio),u_crossfade_from:new c.kt(e,t.u_crossfade_from),u_crossfade_to:new c.kt(e,t.u_crossfade_to),u_lineatlas_width:new c.kt(e,t.u_lineatlas_width),u_lineatlas_height:new c.kt(e,t.u_lineatlas_height)}),lineGradientSDF:(e,t)=>({u_translation:new c.jt(e,t.u_translation),u_ratio:new c.kt(e,t.u_ratio),u_image:new c.At(e,t.u_image),u_image_height:new c.kt(e,t.u_image_height),u_tileratio:new c.kt(e,t.u_tileratio),u_crossfade_from:new c.kt(e,t.u_crossfade_from),u_crossfade_to:new c.kt(e,t.u_crossfade_to),u_image_dash:new c.At(e,t.u_image_dash),u_mix:new c.kt(e,t.u_mix),u_lineatlas_width:new c.kt(e,t.u_lineatlas_width),u_lineatlas_height:new c.kt(e,t.u_lineatlas_height)}),layerOpacity:(e,t)=>({u_image:new c.At(e,t.u_image),u_opacity:new c.kt(e,t.u_opacity)}),raster:(e,t)=>({u_tl_parent:new c.jt(e,t.u_tl_parent),u_scale_parent:new c.kt(e,t.u_scale_parent),u_buffer_scale:new c.kt(e,t.u_buffer_scale),u_image_warp:new c.Mt(e,t.u_image_warp),u_fade_t:new c.kt(e,t.u_fade_t),u_opacity:new c.kt(e,t.u_opacity),u_image0:new c.At(e,t.u_image0),u_image1:new c.At(e,t.u_image1),u_brightness_low:new c.kt(e,t.u_brightness_low),u_brightness_high:new c.kt(e,t.u_brightness_high),u_saturation_factor:new c.kt(e,t.u_saturation_factor),u_contrast_factor:new c.kt(e,t.u_contrast_factor),u_spin_weights:new c.Mt(e,t.u_spin_weights),u_coords_top:new c.Nt(e,t.u_coords_top),u_coords_bottom:new c.Nt(e,t.u_coords_bottom)}),symbolIcon:(e,t)=>({u_is_size_zoom_constant:new c.At(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new c.At(e,t.u_is_size_feature_constant),u_size_t:new c.kt(e,t.u_size_t),u_size:new c.kt(e,t.u_size),u_rotate_symbol:new c.At(e,t.u_rotate_symbol),u_label_plane_matrix:new c.Lt(e,t.u_label_plane_matrix
vendor: 12,799 bytes, line 1172
1172),u_coord_matrix:new c.Lt(e,t.u_coord_matrix),u_is_text:new c.At(e,t.u_is_text),u_pitch_with_map:new c.At(e,t.u_pitch_with_map),u_is_along_line:new c.At(e,t.u_is_along_line),u_is_variable_anchor:new c.At(e,t.u_is_variable_anchor),u_texsize:new c.jt(e,t.u_texsize),u_texture:new c.At(e,t.u_texture),u_translation:new c.jt(e,t.u_translation),u_pitched_scale:new c.kt(e,t.u_pitched_scale),u_is_offset:new c.At(e,t.u_is_offset),u_height_anchor_ground:new c.At(e,t.u_height_anchor_ground)}),symbolSDF:(e,t)=>({u_is_size_zoom_constant:new c.At(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new c.At(e,t.u_is_size_feature_constant),u_size_t:new c.kt(e,t.u_size_t),u_size:new c.kt(e,t.u_size),u_rotate_symbol:new c.At(e,t.u_rotate_symbol),u_label_plane_matrix:new c.Lt(e,t.u_label_plane_matrix),u_coord_matrix:new c.Lt(e,t.u_coord_matrix),u_is_text:new c.At(e,t.u_is_text),u_pitch_with_map:new c.At(e,t.u_pitch_with_map),u_is_along_line:new c.At(e,t.u_is_along_line),u_is_variable_anchor:new c.At(e,t.u_is_variable_anchor),u_texsize:new c.jt(e,t.u_texsize),u_texture:new c.At(e,t.u_texture),u_gamma_scale:new c.kt(e,t.u_gamma_scale),u_is_halo:new c.At(e,t.u_is_halo),u_is_plain:new c.At(e,t.u_is_plain),u_translation:new c.jt(e,t.u_translation),u_pitched_scale:new c.kt(e,t.u_pitched_scale),u_is_offset:new c.At(e,t.u_is_offset),u_height_anchor_ground:new c.At(e,t.u_height_anchor_ground)}),symbolTextAndIcon:(e,t)=>({u_is_size_zoom_constant:new c.At(e,t.u_is_size_zoom_constant),u_is_size_feature_constant:new c.At(e,t.u_is_size_feature_constant),u_size_t:new c.kt(e,t.u_size_t),u_size:new c.kt(e,t.u_size),u_rotate_symbol:new c.At(e,t.u_rotate_symbol),u_label_plane_matrix:new c.Lt(e,t.u_label_plane_matrix),u_coord_matrix:new c.Lt(e,t.u_coord_matrix),u_is_text:new c.At(e,t.u_is_text),u_pitch_with_map:new c.At(e,t.u_pitch_with_map),u_is_along_line:new c.At(e,t.u_is_along_line),u_is_variable_anchor:new c.At(e,t.u_is_variable_anchor),u_texsize:new c.jt(e,t.u_texsize),u_texsize_icon:new c.jt(e,t.u_texsize_icon),u_texture:new c.At(e,t.u_texture),u_texture_icon:new c.At(e,t.u_texture_icon),u_gamma_scale:new c.kt(e,t.u_gamma_scale),u_is_halo:new c.At(e,t.u_is_halo),u_translation:new c.jt(e,t.u_translation),u_pitched_scale:new c.kt(e,t.u_pitched_scale),u_is_offset:new c.At(e,t.u_is_offset),u_height_anchor_ground:new c.At(e,t.u_height_anchor_ground)}),background:(e,t)=>({u_opacity:new c.kt(e,t.u_opacity),u_color:new c.Pt(e,t.u_color)}),backgroundPattern:(e,t)=>({u_opacity:new c.kt(e,t.u_opacity),u_image:new c.At(e,t.u_image),u_pattern_tl_a:new c.jt(e,t.u_pattern_tl_a),u_pattern_br_a:new c.jt(e,t.u_pattern_br_a),u_pattern_tl_b:new c.jt(e,t.u_pattern_tl_b),u_pattern_br_b:new c.jt(e,t.u_pattern_br_b),u_texsize:new c.jt(e,t.u_texsize),u_mix:new c.kt(e,t.u_mix),u_pattern_size_a:new c.jt(e,t.u_pattern_size_a),u_pattern_size_b:new c.jt(e,t.u_pattern_size_b),u_scale_a:new c.kt(e,t.u_scale_a),u_scale_b:new c.kt(e,t.u_scale_b),u_pixel_coord_upper:new c.jt(e,t.u_pixel_coord_upper),u_pixel_coord_lower:new c.jt(e,t.u_pixel_coord_lower),u_tile_units_to_pixels:new c.kt(e,t.u_tile_units_to_pixels)}),terrain:(e,t)=>({u_texture:new c.At(e,t.u_texture),u_ele_delta:new c.kt(e,t.u_ele_delta),u_fog_matrix:new c.Lt(e,t.u_fog_matrix),u_fog_color:new c.Pt(e,t.u_fog_color),u_fog_ground_blend:new c.kt(e,t.u_fog_ground_blend),u_fog_ground_blend_opacity:new c.kt(e,t.u_fog_ground_blend_opacity),u_horizon_color:new c.Pt(e,t.u_horizon_color),u_horizon_fog_blend:new c.kt(e,t.u_horizon_fog_blend),u_is_globe_mode:new c.kt(e,t.u_is_globe_mode)}),terrainDepth:(e,t)=>({u_ele_delta:new c.kt(e,t.u_ele_delta)}),atmosphere:(e,t)=>({u_sun_pos:new c.Mt(e,t.u_sun_pos),u_atmosphere_blend:new c.kt(e,t.u_atmosphere_blend),u_globe_position:new c.Mt(e,t.u_globe_position),u_globe_radius:new c.kt(e,t.u_globe_radius),u_inv_proj_matrix:new c.Lt(e,t.u_inv_proj_matrix)}),sky:(e,t)=>({u_sky_color:new c.Pt(e,t.u_sky_color),u_horizon_color:new c.Pt(e,t.u_horizon_color),u_horizon:new c.jt(e,t.u_horizon),u_horizon_normal:new c.jt(e,t.u_horizon_normal),u_sky_horizon_blend:new c.kt(e,t.u_sky_horizon_blend),u_sky_blend:new c.kt(e,t.u_sky_blend),u_inv_proj_matrix:new c.Lt(e,t.u_inv_proj_matrix),u_globe_position:new c.Mt(e,t.u_globe_position),u_globe_radius:new c.kt(e,t.u_globe_radius)})};var qo=class{constructor(e,t,i){this.context=e;let r=e.gl;this.buffer=r.createBuffer(),this.dynamicDraw=!!i,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),r.bufferData(r.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?r.DYNAMIC_DRAW:r.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}};const $o={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};var Ho=class{constructor(e,t,i,r){this.length=t.length,this.attributes=i,this.itemSize=t.bytesPerElement,this.dynamicDraw=r,this.context=e;let a=e.gl;this.buffer=a.createBuffer(),e.bindVertexBuffer.set(this.buffer),a.bufferData(a.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?a.DYNAMIC_DRAW:a.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let i of this.attributes){let r=t.attributes[i.name];void 0!==r&&e.enableVertexAttribArray(r.location)}}setVertexAttribPointers(e,t,i){for(let r of this.attributes){let a=t.attributes[r.name];if(void 0!==a){let t=r.offset+this.itemSize*(i||0);a.isInteger?e.vertexAttribIPointer(a.location,r.components,e[$o[r.type]],this.itemSize,t):e.vertexAttribPointer(a.location,r.components,e[$o[r.type]],!1,this.itemSize,t)}}}destroy(){let e=this.context.gl;this.buffer&&(e.deleteBuffer(this.buffer),delete this.buffer)}},Xo=class{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}},Ko=class extends Xo{getDefault(){return c.pn.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},Yo=class extends Xo{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}},Jo=class extends Xo{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}},Qo=class extends Xo{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},en=class extends Xo{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}},tn=class extends Xo{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}},rn=class extends Xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}},an=class extends Xo{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}},on=class extends Xo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}},nn=class extends Xo{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}},sn=class extends Xo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}},ln=class extends Xo{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}},hn=class extends Xo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}},cn=class extends Xo{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}},un=class extends Xo{getDefault(){return c.pn.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}},dn=class extends Xo{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}},_n=class extends Xo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}},pn=class extends Xo{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}},mn=class extends Xo{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}},fn=class extends Xo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}},gn=class extends Xo{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}},vn=class extends Xo{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}},yn=class extends Xo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}},bn=class extends Xo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},xn=class extends Xo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}},wn=class extends Xo{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Tn=class extends Xo{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}},Pn=class extends Xo{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.bindVertexArray(e),this.current=e,this.dirty=!1)}},Mn=class extends Xo{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}},Cn=class extends Xo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}},In=class extends Xo{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}},Rn=class extends Xo{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}},Sn=class extends Rn{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}},En=class extends Rn{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},zn=class extends Rn{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}},An=class{constructor(e,t,i,r,a){this.context=e,this.width=t,this.height=i;let o=e.gl,n=this.framebuffer=o.createFramebuffer();
1172if(this.colorAttachment=new Sn(e,n),r)this.depthAttachment=a?new zn(e,n):new En(e,n);else if(a)throw Error("Stencil cannot be set without depth")}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}};const Dn=Qa([{name:"u_units_to_pixels",type:"vec2"},{name:"u_world_size",type:"vec2"},{name:"u_camera_to_center_distance",type:"float"},{name:"u_symbol_fade_change",type:"float"},{name:"u_aspect_ratio",type:"float"},{name:"u_device_pixel_ratio",type:"float"},{name:"u_viewport_size",type:"vec2"},{name:"u_pixel_extrude_scale",type:"vec2"},{name:"u_pitch",type:"float"}]),Ln=Dn.offsets;function Fn(e){return new eo(e,Ka.FrameUBO,Dn)}function kn(e,t){let i=e.pending,{transform:r}=t,a=t.context.gl;i[Ln.u_units_to_pixels]=1/r.pixelsToGLUnits[0],i[Ln.u_units_to_pixels+1]=1/r.pixelsToGLUnits[1],i[Ln.u_world_size]=a.drawingBufferWidth,i[Ln.u_world_size+1]=a.drawingBufferHeight,i[Ln.u_camera_to_center_distance]=r.cameraToCenterDistance,i[Ln.u_symbol_fade_change]=t.options.fadeDuration?t.symbolFadeChange:1,i[Ln.u_aspect_ratio]=r.width/r.height,i[Ln.u_device_pixel_ratio]=t.pixelRatio,i[Ln.u_viewport_size]=r.width,i[Ln.u_viewport_size+1]=r.height,i[Ln.u_pixel_extrude_scale]=1/r.width,i[Ln.u_pixel_extrude_scale+1]=1/r.height,i[Ln.u_pitch]=r.pitch/360*2*Math.PI,e.upload()}var On=class{constructor(e,t,i){this.blendFunction=e,this.blendColor=t,this.mask=i}};On.Replace=[1,0],On.disabled=new On(On.Replace,c.pn.transparent,[!1,!1,!1,!1]),On.unblended=new On(On.Replace,c.pn.transparent,[!0,!0,!0,!0]),On.alphaBlended=new On([1,771],c.pn.transparent,[!0,!0,!0,!0]);var jn=class{constructor(e){this.gl=e,this.clearColor=new Ko(this),this.clearDepth=new Yo(this),this.clearStencil=new Jo(this),this.colorMask=new Qo(this),this.depthMask=new en(this),this.stencilMask=new tn(this),this.stencilFunc=new rn(this),this.stencilOp=new an(this),this.stencilTest=new on(this),this.depthRange=new nn(this),this.depthTest=new sn(this),this.depthFunc=new ln(this),this.blend=new hn(this),this.blendFunc=new cn(this),this.blendColor=new un(this),this.blendEquation=new dn(this),this.cullFace=new _n(this),this.cullFaceSide=new pn(this),this.frontFace=new mn(this),this.program=new fn(this),this.activeTexture=new gn(this),this.viewport=new vn(this),this.bindFramebuffer=new yn(this),this.bindRenderbuffer=new bn(this),this.bindTexture=new xn(this),this.bindVertexBuffer=new wn(this),this.bindElementBuffer=new Tn(this),this.bindVertexArray=new Pn(this),this.pixelStoreUnpack=new Mn(this),this.pixelStoreUnpackPremultiplyAlpha=new Cn(this),this.pixelStoreUnpackFlipY=new In(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),e.getExtension("EXT_color_buffer_half_float"),e.getExtension("EXT_color_buffer_float"),this.projectionUniformBuffer=ro(this),this.terrainUniformBuffer=so(this),this.frameUniformBuffer=Fn(this)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0,this.projectionUniformBuffer.bindingDirty=!0,this.terrainUniformBuffer.bindingDirty=!0,this.frameUniformBuffer.bindingDirty=!0}setCustomLayerDefaults(){this.unbindVAO(),this.cullFace.setDefault(),this.activeTexture.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}createIndexBuffer(e,t){return new qo(this,e,t)}createVertexBuffer(e,t,i){return new Ho(this,e,t,i)}createRenderbuffer(e,t,i){let r=this.gl,a=r.createRenderbuffer();return this.bindRenderbuffer.set(a),r.renderbufferStorage(r.RENDERBUFFER,e,t,i),this.bindRenderbuffer.set(null),a}createFramebuffer(e,t,i,r){return new An(this,e,t,i,r)}clear({color:e,depth:t,stencil:i}){let r=this.gl,a=0;e&&(a|=r.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(a|=r.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==i&&(a|=r.STENCIL_BUFFER_BIT,this.clearStencil.set(i),this.stencilMask.set(255)),r.clear(a)}setCullFace(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){(0,c.Jn)(e.blendFunction,On.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){return this.gl.createVertexArray()}deleteVertexArray(e){this.gl.deleteVertexArray(e)}unbindVAO(){this.bindVertexArray.set(null)}},Bn=class{constructor(e,t,i){this.func=e,this.mask=t,this.range=i}};Bn.ReadOnly=!1,Bn.ReadWrite=!0,Bn.disabled=new Bn(519,Bn.ReadOnly,[0,1]);const Zn=7680;var Un=class{constructor(e,t,i,r,a,o){this.test=e,this.ref=t,this.mask=i,this.fail=r,this.depthFail=a,this.pass=o}};Un.disabled=new Un({func:519,mask:0},0,0,Zn,Zn,Zn);const Nn=2305;var Gn=class{constructor(e,t,i){this.enable=e,this.mode=t,this.frontFace=i}};let Vn;function Wn(e,t,i,r,a){let o=e.context,n=e.transform,s=o.gl,l=e.useProgram("collisionBox"),h=[],u=0,d=0;for(let c of r){let r=t.getTile(c).getBucket(i);if(!r)continue;let _=a?r.textCollisionBox:r.iconCollisionBox,p=r.collisionCircleArray;p.length>0&&(h.push({circleArray:p,circleOffset:d,coord:c}),u+=p.length/4,d=u),_&&l.draw(o,s.LINES,Bn.disabled,Un.disabled,e.colorModeForRenderPass(),Gn.disabled,null,e.style.map.terrain?.getTerrainData(c),n.getProjectionData({overscaledTileID:c,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),i.id,_.layoutVertexBuffer,_.indexBuffer,_.segments,null,e.transform.zoom,null,null,_.collisionVertexBuffer)}if(!a||!h.length)return;let _=e.useProgram("collisionCircle"),p=new c.Bt;p.resize(4*u),p._trim();let m=0;for(let e of h)for(let t=0;t<e.circleArray.length/4;
1172t++){let i=4*t,r=e.circleArray[i+0],a=e.circleArray[i+1],o=e.circleArray[i+2],n=e.circleArray[i+3];p.emplace(m++,r,a,o,n,0),p.emplace(m++,r,a,o,n,1),p.emplace(m++,r,a,o,n,2),p.emplace(m++,r,a,o,n,3)}(!Vn||Vn.length<2*u)&&(Vn=qn(u));let f=o.createIndexBuffer(Vn,!0),g=o.createVertexBuffer(p,c.V.members,!0);for(let t of h)_.draw(o,s.TRIANGLES,Bn.disabled,Un.disabled,e.colorModeForRenderPass(),Gn.disabled,null,e.style.map.terrain?.getTerrainData(t.coord),null,i.id,g,f,c.Rt.simpleSegment(0,2*t.circleOffset,t.circleArray.length,t.circleArray.length/2),null,e.transform.zoom,null,null,null);g.destroy(),f.destroy()}function qn(e){let t=2*e,i=new c.Wt;i.resize(t),i._trim();for(let e=0;e<t;e++){let t=6*e;i.uint16[t+0]=4*e+0,i.uint16[t+1]=4*e+1,i.uint16[t+2]=4*e+2,i.uint16[t+3]=4*e+2,i.uint16[t+4]=4*e+3,i.uint16[t+5]=4*e+0}return i}Gn.disabled=new Gn(!1,1029,Nn),Gn.backCCW=new Gn(!0,1029,Nn),Gn.frontCCW=new Gn(!0,1028,Nn);const $n=(0,c.Ci)(new Float32Array(16));function Hn(e,t,i,r,a,o){let{horizontalAlign:n,verticalAlign:s}=(0,c.M)(e),l=-(n-.5)*t,h=-(s-.5)*i;return new c.Ri((l/a+r[0])*o,(h/a+r[1])*o)}function Xn(e,t,i,r,a,o,n,s,l){let h=t.transform,u=t.style.map.terrain,d="map"===a,_="map"===o;for(let a of e){let e=r.getTile(a),o=e.getBucket(i);if(!o?.text?.segments.get().length)continue;let p=o.textSizeData,m=(0,c.A)(p,h.zoom),f=(0,c.Lr)(e,1,t.transform.zoom),g=Ei(d,t.transform,f),v="none"!==i.layout.get("icon-text-fit")&&o.hasIconData();if(m){let t=2**(h.zoom-e.tileID.overscaledZ),r=u?(e,t)=>u.getElevation(a,e,t):void 0;Yn(o,d,_,l,h,g,t,m,v,(0,c.Mr)(h,e,n,s),a.toUnwrapped(),r,"ground"===i.layout.get("symbol-height-anchor"))}}}function Kn(e,t,i,r,a,o){let n=t.tileAnchorPoint.add(new c.Ri(t.translation[0],t.translation[1]));if(t.pitchWithMap){let e=r.mult(o);i||(e=e.rotate(-a));let s=n.add(e);return Li(s.x,s.y,t.pitchedLabelPlaneMatrix,Di(t,s.x,s.y)).point}if(i){let i=Gi(t.tileAnchorPoint.x+1,t.tileAnchorPoint.y,t).point.sub(e),a=Math.atan(i.y/i.x)+(i.x<0?Math.PI:0);return e.add(r.rotate(a))}return e.add(r)}function Yn(e,t,i,r,a,o,n,s,l,h,u,d,_){let p=e.text.placedSymbolArray,m=e.text.dynamicLayoutVertexArray,f=e.icon.dynamicLayoutVertexArray,g={};m.clear();for(let f=0;f<p.length;f++){let v=p.get(f),y=e.allowVerticalPlacement&&!v.placedOrientation,b=v.hidden||!v.crossTileID||y?null:r[v.crossTileID];if(b){let r=new c.Ri(v.anchorX,v.anchorY),p={getElevation:d,heightOffset:v.heightOffset,heightAnchorGround:_,width:a.width,height:a.height,pitchedLabelPlaneMatrix:o,lineVertexArray:null,pitchWithMap:i,transform:a,projectionCache:null,tileAnchorPoint:r,translation:h,unwrappedTileID:u},f=i?Wi(r.x,r.y,p):Gi(r.x,r.y,p),y=Fi(a.cameraToCenterDistance,f.signedDistanceFromCamera),x=(0,c.k)(e.textSizeData,s,v)*y/24;i&&(x*=e.tilePixelRatio/n);let{width:w,height:T,anchor:P,textOffset:M,textBoxScale:C}=b,I=Hn(P,w,T,M,C,x),R=a.getPitchedTextCorrection(r.x+h[0],r.y+h[1],u),S=Kn(f.point,p,t,I,-a.bearingInRadians,R),E=e.allowVerticalPlacement&&2===v.placedOrientation?Math.PI/2:0;for(let e=0;e<v.numGlyphs;e++)(0,c.C)(m,S,E);l&&v.associatedIconIndex>=0&&(g[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else Ki(v.numGlyphs,m)}if(l){f.clear();let t=e.icon.placedSymbolArray;for(let e=0;e<t.length;e++){let i=t.get(e);if(i.hidden)Ki(i.numGlyphs,f);else{let t=g[e];if(t)for(let e=0;e<i.numGlyphs;e++)(0,c.C)(f,t.shiftedAnchor,t.angle);else Ki(i.numGlyphs,f)}}e.icon.dynamicLayoutVertexBuffer.updateData(f)}e.text.dynamicLayoutVertexBuffer.updateData(m)}function Jn(e,t,i){return i.iconsInText&&t?"symbolTextAndIcon":e?"symbolSDF":"symbolIcon"}function Qn(e,t,i,r,a,o,n,s,l,h,u,d,_){let p=e.context,m=p.gl,f=e.transform,g="map"===s,v="map"===l,y="viewport"!==s&&"point"!==i.layout.get("symbol-placement"),b=g&&!v&&!y,x=!i.layout.get("symbol-sort-key").isConstant(),w=!1,T=e.getDepthModeForSublayer(0,Bn.ReadOnly),P=i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"),M=[],C=f.getCircleRadiusCorrection();for(let s of r){let r=t.getTile(s),l=r.getBucket(i);if(!l)continue;let u=a?l.text:l.icon;if(!u?.segments.get().length||!u.hasVisibleVertices)continue;let d,p,T,I,R=u.programConfigurations.get(i.id),S=a||l.sdfIcons,E=a?l.textSizeData:l.iconSizeData,z=v||0!==f.pitch,A=e.useProgram(Jn(S,a,l),R),D=(0,c.A)(E,f.zoom),L=e.style.map.terrain?.getTerrainData(s),F=[0,0],k=null;if(a){if(p=r.glyphAtlasTexture,T=m.LINEAR,d=r.glyphAtlasTexture.size,l.iconsInText){F=r.imageAtlasTexture.size,k=r.imageAtlasTexture;let t="composite"===E.kind||"camera"===E.kind;I=z||e.options.rotating||e.options.zooming||t?m.LINEAR:m.NEAREST}}else{let t=1!==i.layout.get("icon-size").constantOr(0)||l.iconsNeedLinear;p=r.imageAtlasTexture,T=S||e.options.rotating||e.options.zooming||t||z?m.LINEAR:m.NEAREST,d=r.imageAtlasTexture.size}let O=(0,c.Lr)(r,1,e.transform.zoom),j=Ei(g,e.transform,O),B=zi(v,g,e.transform,O),Z=(0,c.Mr)(f,r,o,n),U=f.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!_,applyTerrainMatrix:!0}),N=P&&l.hasTextData(),G="none"!==i.layout.get("icon-text-fit")&&N&&l.hasIconData(),V=i._unevaluatedLayout.hasValue("icon-offset"),W="ground"===i.layout.get("symbol-height-anchor");if(y){let t=(0,c.yi)();Ci(t,j);let r=e.style.map.terrain?(t,i)=>e.style.map.terrain.getElevation(s,t,i):void 0;Oi(l,e,a,j,t,v,h,"map"===i.layout.get("text-rotation-alignment"),s.toUnwrapped(),f.width,f.height,Z,r)}let q,$=a&&P||G,H=v?j:e.transform.clipSpaceToPixelsMatrix,X=y||$?$n:H,K=S&&0!==i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1);q=S?l.iconsInText?Bo(E.kind,D,b,v,y,$,e,X,B,Z,d,F,C,V,W):jo(E.kind,D,b,v,y,$,e,X,B,Z,a,d,K,C,V,W):Oo(E.kind,D,b,v,y,$,0,X,B,Z,a,d,C,V,W);let Y={program:A,buffers:u,uniformValues:q,projectionData:U,atlasTexture:p,atlasTextureIcon:k,atlasInterpolation:T,atlasInterpolationIcon:I,isSDF:S,hasHalo:K};if(x&&l.canOverlap){w=!0;let e=u.segments.get();for(let t of e)M.push({segments:new c.Rt([t]),sortKey:t.sortKey,state:Y,terrainData:L})}else M.push({segments:u.segments,sortKey:0,state:Y,terrainData:L})}w&&M.sort((e,t)=>
1172e.sortKey-t.sortKey);let I=i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(null)??1/0,R=24*i.layout.get("text-letter-spacing").constantOr(0)<0||I>1;for(let t of M){let r=t.state;p.activeTexture.set(m.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,m.CLAMP_TO_EDGE),r.atlasTextureIcon&&(p.activeTexture.set(m.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,m.CLAMP_TO_EDGE));let a=r.isSDF&&r.hasHalo;if(a){let a=r.uniformValues;a.u_is_halo=1,R&&(a.u_is_plain=0,es(r.buffers,t.segments,i,e,r.program,T,u,d,a,r.projectionData,t.terrainData),a.u_is_halo=0,a.u_is_plain=1)}es(r.buffers,t.segments,i,e,r.program,T,u,d,r.uniformValues,r.projectionData,t.terrainData),a&&!R&&(r.uniformValues.u_is_halo=0)}}function es(e,t,i,r,a,o,n,s,l,h,c){let u=r.context,d=u.gl;a.draw(u,d.TRIANGLES,o,n,s,Gn.backCCW,l,c,h,i.id,e.layoutVertexBuffer,e.indexBuffer,t,i.paint,r.transform.zoom,e.programConfigurations.get(i.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function ts(e,t,i,r){let a=e.context,o=a.gl,n=e.transform,s=Un.disabled,l=new On([o.ONE,o.ONE],c.pn.transparent,[!0,!0,!0,!0]);os(a,e,i),a.clear({color:c.pn.transparent});for(let h of r){if(t.hasRenderableParent(h))continue;let r=t.getTile(h),c=r.getBucket(i);if(!c)continue;let u=c.programConfigurations.get(i.id),d=e.useProgram("heatmap",u),_=n.getProjectionData({overscaledTileID:h,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),p=n.getCircleRadiusCorrection();d.draw(a,o.TRIANGLES,Bn.disabled,s,l,Gn.backCCW,To(r,n.zoom,i.paint.get("heatmap-intensity"),p),null,_,i.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,i.paint,n.zoom,u)}a.viewport.set([0,0,e.width,e.height])}function is(e,t){let i=e.context,r=i.gl;i.setColorMode(e.colorModeForRenderPass());let a=t.heatmapFbos.get(c.xt);a&&(i.activeTexture.set(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,a.colorAttachment.get()),i.activeTexture.set(r.TEXTURE1),ss(i,t).bind(r.LINEAR,r.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(i,r.TRIANGLES,Bn.disabled,Un.disabled,e.colorModeForRenderPass(),Gn.disabled,Po(e,t,0,1),null,null,t.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,t.paint,e.transform.zoom))}function rs(e,t,i,r,a){let o=e.context,n=o.gl,s=Un.disabled,l=new On([n.ONE,n.ONE],c.pn.transparent,[!0,!0,!0,!0]),h=t.getBucket(i);if(!h)return;let u=r.key,d=i.heatmapFbos.get(u);d||(d=ns(o,t.tileSize,t.tileSize),i.heatmapFbos.set(u,d)),o.bindFramebuffer.set(d.framebuffer),o.viewport.set([0,0,t.tileSize,t.tileSize]),o.clear({color:c.pn.transparent});let _=h.programConfigurations.get(i.id),p=e.useProgram("heatmap",_,!a),m=e.transform.getProjectionData({overscaledTileID:t.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),f=e.style.map.terrain.getTerrainData(r);p.draw(o,n.TRIANGLES,Bn.disabled,s,l,Gn.disabled,To(t,e.transform.zoom,i.paint.get("heatmap-intensity"),1),f,m,i.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,i.paint,e.transform.zoom,_)}function as(e,t,i,r,a){let o=e.context,n=o.gl,s=e.transform;o.setColorMode(e.colorModeForRenderPass());let l=ss(o,t),h=i.key,c=t.heatmapFbos.get(h);if(!c)return;o.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,c.colorAttachment.get()),o.activeTexture.set(n.TEXTURE1),l.bind(n.LINEAR,n.CLAMP_TO_EDGE);let u=s.getProjectionData({overscaledTileID:i,applyTerrainMatrix:a,applyGlobeMatrix:!r});e.useProgram("heatmapTexture").draw(o,n.TRIANGLES,Bn.disabled,Un.disabled,e.colorModeForRenderPass(),Gn.disabled,Po(e,t,0,1),null,u,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),c.destroy(),t.heatmapFbos.delete(h)}function os(e,t,i){let r=e.gl;e.activeTexture.set(r.TEXTURE1),e.viewport.set([0,0,t.width/4,t.height/4]);let a=i.heatmapFbos.get(c.xt);a?(r.bindTexture(r.TEXTURE_2D,a.colorAttachment.get()),e.bindFramebuffer.set(a.framebuffer)):(a=ns(e,t.width/4,t.height/4),i.heatmapFbos.set(c.xt,a))}function ns(e,t,i){let r=e.gl,a=r.createTexture();r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texStorage2D(r.TEXTURE_2D,1,r.RGBA16F,t,i);let o=e.createFramebuffer(t,i,!1,!1);return o.colorAttachment.set(a),o}function ss(e,t){return t.colorRampTexture||=new c.yt(e,t.colorRamp,e.gl.RGBA),t.colorRampTexture}function ls(e,t,i,r){let a=e.context,o=a.bindFramebuffer.get(),n=a.viewport.get(),[,,s,l]=n;return hs(e,s,l),a.viewport.set([0,0,s,l]),a.clear({color:c.pn.transparent,depth:1,stencil:0}),e.currentStencilSource=void 0,e.renderTileClippingMasks(t,i,r),{compositeTarget:o,compositeViewport:n}}function hs(e,t,i){let r=e.context.gl;if(!e.layerOpacityFbo){let a=e.context.createFramebuffer(t,i,!0,!0),o=r.createTexture();return r.bindTexture(r.TEXTURE_2D,o),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,t,i,0,r.RGBA,r.UNSIGNED_BYTE,null),a.colorAttachment.set(o),a.depthAttachment.set(e.context.createRenderbuffer(r.DEPTH_STENCIL,t,i)),e.layerOpacityFbo=a,void e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer)}if(e.layerOpacityFbo.width===t&&e.layerOpacityFbo.height===i)return void e.context.bindFramebuffer.set(e.layerOpacityFbo.framebuffer);let a=e.layerOpacityFbo;r.bindTexture(r.TEXTURE_2D,a.colorAttachment.get()),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,t,i,0,r.RGBA,r.UNSIGNED_BYTE,null),e.context.bindRenderbuffer.set(a.depthAttachment.get()),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,i),e.context.bindRenderbuffer.set(null),a.width=t,a.height=i,e.context.bindFramebuffer.set(a.framebuffer)}function cs(e,t,i,r){let a=e.context,o=a.gl;a.bindFramebuffer.set(i.compositeTarget),a.viewport.set(i.compositeViewport),a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,e.layerOpacityFbo.colorAttachment.get()),e.useProgram("layerOpacity").draw(a,o.TRIANGLES,Bn.disabled,Un.disabled,e.colorModeForRenderPass(),Gn.disabled,ko(t,0),null,null,r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom),e.currentStencilSource=void 0}function us(e,t,i,r,a,o,n,s){let l=256;if(a.stepInterpolant){let r=t.getSource().maxzoom,a=n.canonical.z===r?Math.ceil(1<<e.transform.maxZoom-n.canonical.z):1,s=o.maxLineLength/c.Rr*1024*a;l=(0,c.Vn)((0,c.vr)(s),256,i.maxTextureSize)}
1172return s.gradient=(0,c.Ct)({expression:a.gradientExpression(),evaluationKey:"lineProgress",resolution:l,image:s.gradient||void 0,clips:o.lineClipsArray}),s.texture?s.texture.update(s.gradient):s.texture=new c.yt(i,s.gradient,r.RGBA),s.version=a.gradientVersion,s.texture}function ds(e,t,i,r,a){e.activeTexture.set(t.TEXTURE0),i.imageAtlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE),r.updatePaintBuffers(a)}function _s(e,t,i,r,a,o){(a||e.lineAtlas.dirty)&&(t.activeTexture.set(i.TEXTURE0),e.lineAtlas.bind(t)),r.updatePaintBuffers(o)}function ps(e,t,i,r,a,o,n){let s=o.gradients[a.id],l=s.texture;a.gradientVersion!==s.version&&(l=us(e,t,i,r,a,o,n,s)),i.activeTexture.set(r.TEXTURE0),l.bind(a.stepInterpolant?r.NEAREST:r.LINEAR,r.CLAMP_TO_EDGE)}function ms(e,t,i,r,a,o,n,s,l){let h=o.gradients[a.id],c=h.texture;a.gradientVersion!==h.version&&(c=us(e,t,i,r,a,o,n,h)),i.activeTexture.set(r.TEXTURE0),c.bind(a.stepInterpolant?r.NEAREST:r.LINEAR,r.CLAMP_TO_EDGE),i.activeTexture.set(r.TEXTURE1),e.lineAtlas.bind(i),s.updatePaintBuffers(l)}function fs(e,t,i,r,a,o){let n,{isRenderingToTexture:s}=a,l=e.getDepthModeForSublayer(0,Bn.ReadOnly),h=e.colorModeForRenderPass(),c=i.paint.get("line-dasharray"),u=c.constantOr(1),d=i.paint.get("line-pattern"),_=d.constantOr(1),p=i.paint.get("line-gradient"),m=i.getCrossfadeParameters();n=_?"linePattern":u&&p?"lineGradientSDF":u?"lineSDF":p?"lineGradient":"line";let f=e.context,g=f.gl,v=e.transform,y=!0;for(let a of r){let r=t.getTile(a);if(_&&!r.patternsLoaded())continue;let b=r.getBucket(i);if(!b)continue;let x=b.programConfigurations.get(i.id),w=e.context.program.get(),T=e.useProgram(n,x),P=y||T.program!==w,M=o?e.getTerrainDataForTile(a,s):null,C=d.constantOr(null),I=c?.constantOr(null);if(C&&r.imageAtlas){let e=r.imageAtlas,t=e.patternPositions[C.to.toString()],i=e.patternPositions[C.from.toString()];t&&i&&x.setConstantPatternPositions(t,i)}else if(I){let t="round"===i.layout.get("line-cap").constantOr(null),r=e.lineAtlas.getDash(I.to,t),a=e.lineAtlas.getDash(I.from,t);x.setConstantDashPositions(r,a)}let R,S=v.getProjectionData({overscaledTileID:a,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),E=v.getPixelScale();_?(R=zo(e,r,i,E,m),ds(f,g,r,x,m)):u&&p?(R=Do(e,r,i,E,m,b.lineClipsArray.length),ms(e,t,f,g,i,b,a,x,m)):u?(R=Ao(e,r,i,E,m),_s(e,f,g,x,P,m)):p?(R=Eo(e,r,i,E,b.lineClipsArray.length),ps(e,t,f,g,i,b,a)):R=So(e,r,i,E);let z=e.stencilModeForClipping(a);T.draw(f,g.TRIANGLES,l,z,h,Gn.disabled,R,M,S,i.id,b.layoutVertexBuffer,b.indexBuffer,b.segments,i.paint,e.transform.zoom,x,b.layoutVertexBuffer2),y=!1}}function gs(e,t,i,r,a){if(!i||!r?.imageAtlas)return;let o=r.imageAtlas.patternPositions,n=o[i.to.toString()],s=o[i.from.toString()];if(!n&&s&&(n=s),!s&&n&&(s=n),!n||!s){let e=a.getPaintProperty(t);n=o[e],s=o[e]}n&&s&&e.setConstantPatternPositions(n,s)}function vs(e,t,i,r,a){let{isRenderingToTexture:o}=a,n=e.colorModeForRenderPass();bs(e,t,i,r,e.getDepthModeForSublayer(1,Bn.ReadOnly),n,!1,o),ys(e,t,i,r,a)}function ys(e,t,i,r,a){if(!i.paint.get("fill-antialias"))return;let{isRenderingToTexture:o}=a,n=e.colorModeForRenderPass();bs(e,t,i,r,e.getDepthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,Bn.ReadOnly),n,!0,o)}function bs(e,t,i,r,a,o,n,s){let l,h,u,d,_,p=e.context.gl,m="fill-pattern",f=i.paint.get(m),g=f?.constantOr(1),v=i.getCrossfadeParameters(),y=e.transform,b=i.paint.get("fill-translate"),x=i.paint.get("fill-translate-anchor");n?(h=g&&!i.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",l=p.LINES):(h=g?"fillPattern":"fill",l=p.TRIANGLES);let w=f.constantOr(null);for(let f of r){let r=t.getTile(f);if(g&&!r.patternsLoaded())continue;let T=r.getBucket(i);if(!T)continue;let P=T.sdfPatterns[i.id]??!1,M=T.programConfigurations.get(i.id),C=e.useProgram(h,M),I=e.getTerrainDataForTile(f,s);g&&(e.context.activeTexture.set(p.TEXTURE0),r.imageAtlasTexture.bind(p.LINEAR,p.CLAMP_TO_EDGE),M.updatePaintBuffers(v)),gs(M,m,w,r,i);let R=y.getProjectionData({overscaledTileID:f,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),S=(0,c.Mr)(y,r,b,x);n?(d=T.indexBuffer2,_=T.segments2,u="fillOutlinePattern"===h&&g?bo(e,v,r,S,P):yo(S)):(d=T.indexBuffer,_=T.segments,u=g?go(e,v,r,S,P):vo(S));let E=e.stencilModeForClipping(f);C.draw(e.context,l,a,E,o,Gn.backCCW,u,I,R,i.id,T.layoutVertexBuffer,d,_,i.paint,e.transform.zoom,M)}}function xs(e,t,i,r,a,o,n,s){let l=e.context,h=l.gl,u="fill-extrusion-pattern",d=i.paint.get(u),_=d.constantOr(1),p=i.getCrossfadeParameters(),m=i.paint.get("fill-extrusion-opacity"),f=d.constantOr(null),g=e.transform;
1172for(let d of r){let r=t.getTile(d),v=r.getBucket(i);if(!v)continue;let y=e.style.map.terrain?.getTerrainData(d),b=v.programConfigurations.get(i.id),x=e.useProgram(_?"fillExtrusionPattern":"fillExtrusion",b);_&&(e.context.activeTexture.set(h.TEXTURE0),r.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePaintBuffers(p));let w=g.getProjectionData({overscaledTileID:d,applyGlobeMatrix:!s,applyTerrainMatrix:!0});gs(b,u,f,r,i);let T=(0,c.Mr)(g,r,i.paint.get("fill-extrusion-translate"),i.paint.get("fill-extrusion-translate-anchor")),P=i.paint.get("fill-extrusion-vertical-gradient"),M=_?fo(e,P,m,T,d,p,r):mo(e,P,m,T);x.draw(l,l.gl.TRIANGLES,a,o,n,Gn.backCCW,M,y,w,i.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,i.paint,e.transform.zoom,b,e.style.map.terrain&&v.centroidVertexBuffer)}}function ws(e,t,i,r,a,o,n,s,l){let h=e.style.projection,c=e.context,u=e.transform,d=c.gl,_=[`#define NUM_ILLUMINATION_SOURCES ${i.paint.get("hillshade-highlight-color").values.length}`],p=e.useProgram("hillshade",null,!1,_),m=!e.options.moving;for(let _ of r){let r=t.getTile(_),f=r.fbo;if(!f)continue;let g=h.getMeshFromTileID(c,_.canonical,s,!0,"raster"),v=e.getTerrainDataForTile(_,l);c.activeTexture.set(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,f.colorAttachment.get());let y=u.getProjectionData({overscaledTileID:_,aligned:m,applyGlobeMatrix:!l,applyTerrainMatrix:!0});p.draw(c,d.TRIANGLES,o,a[_.overscaledZ],n,Gn.backCCW,Mo(e,r,i),v,y,i.id,g.vertexBuffer,g.indexBuffer,g.segments)}}function Ts(e,t,i,r,a,o,n){let s=e.context,l=s.gl,h="nearest"===r.paint.get("resampling")?l.NEAREST:l.LINEAR;for(let u of i){let i=t.getTile(u),d=i.dem;if(!d?.data||!i.needsHillshadePrepare)continue;let _=d.dim+2,p=d.stride,m=d.getPixels();if(s.activeTexture.set(l.TEXTURE1),s.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture||=e.getTileTexture(p),i.demTexture){let e=i.demTexture;e.update(m,{premultiply:!1}),e.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else i.demTexture=new c.yt(s,m,l.RGBA,{premultiply:!1}),i.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);s.activeTexture.set(l.TEXTURE0);let f=i.fbo;if(!f){let e=new c.yt(s,{width:_,height:_,data:null},l.RGBA);e.bind(h,l.CLAMP_TO_EDGE),f=i.fbo=s.createFramebuffer(_,_,!0,!1),f.colorAttachment.set(e.texture)}s.bindFramebuffer.set(f.framebuffer),s.viewport.set([0,0,_,_]),e.useProgram("hillshadePrepare").draw(s,l.TRIANGLES,a,o,n,Gn.disabled,Co(i.tileID,d),null,null,r.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}}let Ps=0;function Ms(e,t,i,r,a,o,n,s,l){let h=e.style.projection,u=e.context,d=e.transform,_=u.gl,p=e.useProgram("colorRelief"),m=!e.options.moving,f="nearest"===i.paint.get("resampling")?_.NEAREST:_.LINEAR,g=!0,v=0;for(let y of r){let r=t.getTile(y),b=r.dem;if(!b?.data)continue;if(g){Ps||=_.getParameter(_.MAX_TEXTURE_SIZE);let e=Ps,{elevationTexture:t,colorTexture:r}=i.getColorRampTextures(u,e,b.getUnpackVector());u.activeTexture.set(_.TEXTURE1),t.bind(_.NEAREST,_.CLAMP_TO_EDGE),u.activeTexture.set(_.TEXTURE4),r.bind(_.LINEAR,_.CLAMP_TO_EDGE),g=!1,v=t.size[0]}let x=b.stride;u.activeTexture.set(_.TEXTURE0),(!r.demTexture||r.needsColorReliefPrepare)&&(u.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture||=e.getTileTexture(x)??new c.yt(u,{width:x,height:x,data:null},_.RGBA),r.demTexture.update(b.getPixels(),{premultiply:!1}),r.needsColorReliefPrepare=!1),r.demTexture.bind(f,_.CLAMP_TO_EDGE);let w=h.getMeshFromTileID(u,y.canonical,s,!0,"raster"),T=e.getTerrainDataForTile(y,l),P=d.getProjectionData({overscaledTileID:y,aligned:m,applyGlobeMatrix:!l,applyTerrainMatrix:!0});p.draw(u,_.TRIANGLES,o,a[y.overscaledZ],n,Gn.backCCW,Ro(i,r.dem,v),T,P,i.id,w.vertexBuffer,w.indexBuffer,w.segments)}}const Cs=[new c.Ri(0,0),new c.Ri(c.Rr,0),new c.Ri(c.Rr,c.Rr),new c.Ri(0,c.Rr)];function Is(e,t,i,r,a,o,n,s,l,h=!1,c=!1,u=null){let d=r[r.length-1].overscaledZ,_=e.context,p=_.gl,m=e.useProgram("raster"),f=e.transform,g=e.style.projection,v=e.colorModeForRenderPass(),y=!e.options.moving,b=i.paint.get("raster-opacity"),x="nearest"===i.paint.get("resampling")||"nearest"===i.paint.get("raster-resampling")?p.NEAREST:p.LINEAR,w=i.paint.get("raster-fade-duration"),T=!!e.style.map.terrain;for(let P of r){let r=e.getDepthModeForSublayer(P.overscaledZ-d,1===b?Bn.ReadWrite:Bn.ReadOnly,p.LESS),M=t.getTile(P);_.activeTexture.set(p.TEXTURE0),M.texture.bind(x,p.CLAMP_TO_EDGE,p.LINEAR_MIPMAP_NEAREST),_.activeTexture.set(p.TEXTURE1);let{parentTile:C,parentScaleBy:I,parentTopLeft:R,fadeValues:S}=Rs(M,t,w,T);M.fadeOpacity=S.tileOpacity,C?(C.fadeOpacity=S.parentTileOpacity,C.texture.bind(x,p.CLAMP_TO_EDGE,p.LINEAR_MIPMAP_NEAREST)):M.texture.bind(x,p.CLAMP_TO_EDGE,p.LINEAR_MIPMAP_NEAREST),M.texture.useMipmap&&_.extTextureFilterAnisotropic&&e.transform.pitch>e.options.anisotropicFilterPitch&&p.texParameterf(p.TEXTURE_2D,_.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,_.extTextureFilterAnisotropicMax);let E=e.getTerrainDataForTile(P,c),z=f.getProjectionData({overscaledTileID:P,aligned:y,applyGlobeMatrix:!c,applyTerrainMatrix:!0}
1172),A=xt(R,I,S.fadeMix,i,s,l),D=u??g.getMeshFromTileID(_,P.canonical,o,n,"raster"),L=a?a[P.overscaledZ]:Un.disabled;m.draw(_,p.TRIANGLES,r,L,v,h?Gn.frontCCW:Gn.backCCW,A,E,z,i.id,D.vertexBuffer,D.indexBuffer,D.segments)}}function Rs(e,t,i,r){let a={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(0===i||r)return a;if(e.fadingParentID){let r=t.getLoadedTile(e.fadingParentID);if(!r)return a;let o=2**(r.tileID.overscaledZ-e.tileID.overscaledZ);return{parentTile:r,parentScaleBy:o,parentTopLeft:[e.tileID.canonical.x*o%1,e.tileID.canonical.y*o%1],fadeValues:Ss(e,r,i)}}return e.selfFading?{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:Es(e,i)}:a}function Ss(e,t,i){let r=x(),a=(r-e.timeAdded)/i,o=(r-t.timeAdded)/i,n=1===e.fadingDirection,s=(0,c.Vn)(a,0,1),l=(0,c.Vn)(1-o,0,1),h=n?s:l;return{tileOpacity:h,parentTileOpacity:n?l:s,fadeMix:{opacity:1,mix:1-h}}}function Es(e,t){let i=(x()-e.timeAdded)/t,r=(0,c.Vn)(i,0,1);return{tileOpacity:r,fadeMix:{opacity:r,mix:0}}}const zs=new c.pn(1,0,0,1),As=new c.pn(0,1,0,1),Ds=new c.pn(0,0,1,1),Ls=new c.pn(1,0,1,1),Fs=new c.pn(0,1,1,1);function ks(e,t,i,r){Bs(e,t-1,i-10,2,20,r),Bs(e,t-10,i-1,20,2,r)}function Os(e,t,i,r){Bs(e,0,t+i/2,e.transform.width,i,r)}function js(e,t,i,r){Bs(e,t-i/2,0,i,e.transform.height,r)}function Bs(e,t,i,r,a,o){let n=e.context,s=n.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,i*e.pixelRatio,r*e.pixelRatio,a*e.pixelRatio),n.clear({color:o}),s.disable(s.SCISSOR_TEST)}function Zs(e,t,i){let r=e.context,a=r.gl,o=e.useProgram("debug"),n=Bn.disabled,s=Un.disabled,l=e.colorModeForRenderPass(),h="$debug",u=e.style.map.terrain?.getTerrainData(i);r.activeTexture.set(a.TEXTURE0);let d=t.getTileByID(i.key).latestRawTileData?.byteLength||0,_=Math.floor(d/1024),p=t.getTile(i).tileSize,m=512/Math.min(p,512)*(i.overscaledZ/e.transform.zoom)*.5,f=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(f+=` => ${i.overscaledZ}`),Us(e,`${f} ${_}kB`);let g=e.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});o.draw(r,a.TRIANGLES,n,s,On.alphaBlended,Gn.disabled,wo(c.pn.transparent,m),null,g,h,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),o.draw(r,a.LINE_STRIP,n,s,l,Gn.disabled,wo(c.pn.red),u,g,h,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}function Us(e,t){e.initDebugOverlayCanvas();let i=e.debugOverlayCanvas,r=e.context.gl,a=e.debugOverlayCanvas.getContext("2d");a.clearRect(0,0,i.width,i.height),a.shadowColor="white",a.shadowBlur=2,a.lineWidth=1.5,a.strokeStyle="white",a.textBaseline="top",a.font="bold 36px Open Sans, sans-serif",a.fillText(t,5,5),a.strokeText(t,5,5),e.debugOverlayTexture.update(i),e.debugOverlayTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}function Ns(e,t){let i=null,r=Object.values(e._layers).flatMap(i=>i.source&&!i.isHidden(t)?[e.tileManagers[i.source]]:[]),a=r.filter(e=>"vector"===e.getSource().type),o=r.filter(e=>"vector"!==e.getSource().type),n=e=>{(!i||i.getSource().maxzoom<e.getSource().maxzoom)&&(i=e)};for(let e of a)n(e);if(!i)for(let e of o)n(e);return i}function Gs(e,t,i,r){let{isRenderingGlobe:a}=r,o=e.context,n=o.gl,s=e.transform,l=e.colorModeForRenderPass(),h=e.getDepthModeFor3D(),c=e.useProgram("terrain");o.bindFramebuffer.set(null),o.viewport.set([0,0,e.width,e.height]);for(let r of i){let i=t.getTerrainMesh(r.tileID),u=e.renderToTexture.getTexture(r),d=t.getTerrainData(r.tileID);o.activeTexture.set(n.TEXTURE0),u.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_LINEAR);let _=t.getSkirtLength(s.zoom),p=s.calculateFogMatrix(r.tileID.toUnwrapped()),m=Ha(_,p,e.style.sky,s.pitch,a),f=s.getProjectionData({overscaledTileID:r.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});c.draw(o,n.TRIANGLES,h,Un.disabled,l,Gn.backCCW,m,d,f,"terrain",i.vertexBuffer,i.indexBuffer,i.segments)}}function Vs(e,t){if(!t.mesh){let i=new c.Ut;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let r=new c.Kt;r.emplaceBack(0,1,2),r.emplaceBack(0,2,3),t.mesh=new Mt(e.createVertexBuffer(i,Ct.members),e.createIndexBuffer(r),c.Rt.simpleSegment(0,0,i.length,r.length))}return t.mesh}function Ws(e,t){let i=e.getCartesianPosition();(0,c.ii)(i,i);let r=(0,c.Ci)(new Float64Array(16));return"map"===e.properties.get("anchor")&&((0,c.Ai)(r,r,t.rollInRadians),(0,c.Oi)(r,r,-t.pitchInRadians),(0,c.Ai)(r,r,t.bearingInRadians),(0,c.Oi)(r,r,t.center.lat*Math.PI/180),(0,c.ki)(r,r,-t.center.lng*Math.PI/180)
1172),(0,c.mi)(i,i,r),i}const qs={symbol:function(e,t,i,r,a,o){if("translucent"!==o.currentPass)return;let{isRenderingToTexture:n}=o,s=Un.disabled,l=e.colorModeForRenderPass();(i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&Xn(r,e,i,t,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),a),0!==i.paint.get("icon-opacity").constantOr(1)&&Qn(e,t,i,r,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment").constantOr("viewport"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),s,l,n),0!==i.paint.get("text-opacity").constantOr(1)&&Qn(e,t,i,r,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),s,l,n),t.map.showCollisionBoxes&&(Wn(e,t,i,r,!0),Wn(e,t,i,r,!1))},circle:function(e,t,i,r,a){if("translucent"!==a.currentPass)return;let{isRenderingToTexture:o}=a,n=i.paint.get("circle-opacity"),s=i.paint.get("circle-stroke-width"),l=i.paint.get("circle-stroke-opacity"),h=!i.layout.get("circle-sort-key").isConstant();if(0===n.constantOr(1)&&(0===s.constantOr(1)||0===l.constantOr(1)))return;let u=e.context,d=u.gl,_=e.transform,p=e.getDepthModeForSublayer(0,Bn.ReadOnly),m=Un.disabled,f=e.colorModeForRenderPass(),g=[],v=_.getCircleRadiusCorrection();for(let a of r){let r=t.getTile(a),n=r.getBucket(i);if(!n)continue;let s=i.paint.get("circle-translate"),l=i.paint.get("circle-translate-anchor"),u=(0,c.Mr)(_,r,s,l),d=n.programConfigurations.get(i.id),p=e.useProgram("circle",d),m=n.layoutVertexBuffer,f=n.indexBuffer,y=e.style.map.terrain?.getTerrainData(a),b={programConfiguration:d,program:p,layoutVertexBuffer:m,indexBuffer:f,uniformValues:xo(e,r,i,u,v),terrainData:y,projectionData:_.getProjectionData({overscaledTileID:a,applyGlobeMatrix:!o,applyTerrainMatrix:!0})};if(h){let e=n.segments.get();for(let t of e)g.push({segments:new c.Rt([t]),sortKey:t.sortKey,state:b})}else g.push({segments:n.segments,sortKey:0,state:b})}h&&g.sort((e,t)=>
1172e.sortKey-t.sortKey);for(let t of g){let{programConfiguration:r,program:a,layoutVertexBuffer:o,indexBuffer:n,uniformValues:s,terrainData:l,projectionData:h}=t.state,c=t.segments;a.draw(u,d.TRIANGLES,p,m,f,Gn.backCCW,s,l,h,i.id,o,n,c,i.paint,e.transform.zoom,r)}},heatmap:function(e,t,i,r,a){if(0===i.paint.get("heatmap-opacity"))return;let o=e.context,{isRenderingToTexture:n,isRenderingGlobe:s}=a;if(e.style.map.terrain){for(let o of r){let r=t.getTile(o);t.hasRenderableParent(o)||("offscreen"===a.currentPass?rs(e,r,i,o,s):"translucent"===a.currentPass&&as(e,i,o,n,s))}o.viewport.set([0,0,e.width,e.height])}else"offscreen"===a.currentPass?ts(e,t,i,r):"translucent"===a.currentPass&&is(e,i)},line:function(e,t,i,r,a){if("translucent"!==a.currentPass)return;let o=i.paint.get("line-opacity"),n=i.paint.get("line-width"),s=i.paint.get("line-layer-opacity");if(0===o.constantOr(1)||0===n.constantOr(1)||0===s)return;let l=!!e.style.map.terrain;if(s<1){let o=ls(e,i,r,l);return fs(e,t,i,r,a,l),void cs(e,s,o,i)}fs(e,t,i,r,a,l)},fill:function(e,t,i,r,a){let o=i.paint.get("fill-color"),n=i.paint.get("fill-opacity"),s=i.paint.get("fill-layer-opacity");if(0===n.constantOr(1)||0===s)return;if(s<1){if("translucent"!==a.currentPass)return;let o=ls(e,i,r,!!e.style.map.terrain);return vs(e,t,i,r,a),void cs(e,s,o,i)}let l=i.paint.get("fill-pattern"),h=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(c.pn.transparent).a&&1===n.constantOr(0);if(h&&"opaque"===a.currentPass){let{isRenderingToTexture:o}=a,n=e.colorModeForRenderPass();return void bs(e,t,i,r,e.getDepthModeForSublayer(1,Bn.ReadWrite),n,!1,o)}h&&"translucent"===a.currentPass?ys(e,t,i,r,a):"translucent"===a.currentPass&&vs(e,t,i,r,a)},fillExtrusion:function(e,t,i,r,a){let o=i.paint.get("fill-extrusion-opacity");if(0===o)return;let{isRenderingToTexture:n}=a;if("translucent"===a.currentPass){let s=new Bn(e.context.gl.LEQUAL,Bn.ReadWrite,a.depthRangeFor3D);if(1!==o||i.paint.get("fill-extrusion-pattern").constantOr(1))xs(e,t,i,r,s,Un.disabled,On.disabled,n),xs(e,t,i,r,s,e.stencilModeFor3D(),e.colorModeForRenderPass(),n);else{let a=e.colorModeForRenderPass();xs(e,t,i,r,s,Un.disabled,a,n)}}},hillshade:function(e,t,i,r,a){if("offscreen"!==a.currentPass&&"translucent"!==a.currentPass)return;let{isRenderingToTexture:o}=a,n=e.context,s=e.style.projection.useSubdivision,l=e.getDepthModeForSublayer(0,Bn.ReadOnly),h=e.colorModeForRenderPass();if("offscreen"===a.currentPass)Ts(e,t,r,i,l,Un.disabled,h),n.viewport.set([0,0,e.width,e.height]);else if("translucent"===a.currentPass)if(s){let[a,n,s]=e.stencilConfigForOverlapTwoPass(r);ws(e,t,i,s,a,l,h,!1,o),ws(e,t,i,s,n,l,h,!0,o)}else{let[a,n]=e.getStencilConfigForOverlapAndUpdateStencilID(r);ws(e,t,i,n,a,l,h,!1,o)}},colorRelief:function(e,t,i,r,a){if("translucent"!==a.currentPass||!r.length)return;let{isRenderingToTexture:o}=a,n=e.style.projection.useSubdivision,s=e.getDepthModeForSublayer(0,Bn.ReadOnly),l=e.colorModeForRenderPass();if(n){let[a,n,h]=e.stencilConfigForOverlapTwoPass(r);Ms(e,t,i,h,a,s,l,!1,o),Ms(e,t,i,h,n,s,l,!0,o)}else{let[a,n]=e.getStencilConfigForOverlapAndUpdateStencilID(r);Ms(e,t,i,n,a,s,l,!1,o)}},raster:function(e,t,i,r,a){if("translucent"!==a.currentPass||0===i.paint.get("raster-opacity")||!r.length)return;let{isRenderingToTexture:o}=a,n=t.getSource(),s=e.style.projection.useSubdivision;if(n instanceof Et)Is(e,t,i,r,null,!1,!1,n.tileCoords,n.imageWarp,n.flippedWindingOrder,o,n.getMesh(e.context,s));else if(s){let[a,n,s]=e.stencilConfigForOverlapTwoPass(r);Is(e,t,i,s,a,!1,!0,Cs,bt,!1,o),Is(e,t,i,s,n,!0,!0,Cs,bt,!1,o)}else{let[a,n]=e.getStencilConfigForOverlapAndUpdateStencilID(r);Is(e,t,i,n,a,!1,!0,Cs,bt,!1,o)}},background:function(e,t,i,r,a){let o=i.paint.get("background-color"),n=i.paint.get("background-opacity");if(0===n)return;let{isRenderingToTexture:s}=a,l=e.context,h=l.gl,c=e.style.projection,u=e.transform,d=u.tileSize,_=i.paint.get("background-pattern");if(e.isPatternMissing(_))return;let p=!_&&1===o.a&&1===n&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(a.currentPass!==p)return;let m=Un.disabled,f=e.getDepthModeForSublayer(0,"opaque"===p?Bn.ReadWrite:Bn.ReadOnly),g=e.colorModeForRenderPass(),v=e.useProgram(_?"backgroundPattern":"background"),y=r||ci(u,{tileSize:d,terrain:e.style.map.terrain});_&&(l.activeTexture.set(h.TEXTURE0),e.patternAtlas.bind(e.context));let b=i.getCrossfadeParameters();for(let t of y){let r=u.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!s,applyTerrainMatrix:!0}),a=_?Uo(n,e,_,{tileID:t,tileSize:d},b):Zo(n,o),p=e.getTerrainDataForTile(t,s),y=c.getMeshFromTileID(l,t.canonical,!1,!0,"raster");v.draw(l,h.TRIANGLES,f,m,g,Gn.backCCW,a,p,r,i.id,y.vertexBuffer,y.indexBuffer,y.segments)}},sky:function(e,t){let i=e.context,r=i.gl,a=Go(t,e.transform,e.pixelRatio),o=new Bn(r.LEQUAL,Bn.ReadWrite,[0,1]),n=Un.disabled,s=e.colorModeForRenderPass(),l=e.useProgram("sky"),h=Vs(i,t);l.draw(i,r.TRIANGLES,o,n,s,Gn.disabled,a,null,void 0,"sky",h.vertexBuffer,h.indexBuffer,h.segments)},atmosphere:function(e,t,i){let r=e.context,a=r.gl,o=e.useProgram("atmosphere"),n=new Bn(a.LEQUAL,Bn.ReadOnly,[0,1]),s=e.transform,l=Ws(i,e.transform),h=s.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),c=t.properties.get("atmosphere-blend")*h.projectionTransition;if(0===c)return;let u=da(s.worldSize,s.center.lat),d=_a(s),_=No(l,c,d,u,s.inverseProjectionMatrix),p=Vs(r,t);o.draw(r,a.TRIANGLES,n,Un.disabled,On.alphaBlended,Gn.disabled,_,null,null,"atmosphere",p.vertexBuffer,p.indexBuffer,p.segments)},custom:function(e,t,i,r){let{isRenderingGlobe:a}=r,o=e.context,n=i.implementation,s=e.style.projection,l=e.transform,h=l.getProjectionDataForCustomLayer(a),u={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;\nuniform mat4 u_projection_matrix;\n${s.shaderPreludeCode.vertexSource}`,define:s.shaderDefine},defaultProjectionData:h,getProjectionData:e=>l.getProjectionData({overscaledTileID:new c.d(e.tileID.canonical.z,e.tileID.wrap??0,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),aligned:e.aligned,applyGlobeMatrix:e.applyGlobeMatrix,applyTerrainMatrix:e.applyTerrainMatrix})},d=n.renderingMode?n.renderingMode:"2d";if("offscreen"===r.currentPass){let t=n.prerender;t&&(e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),t.call(n,o.gl,u),o.setDirty(),e.setBaseState())}else if("translucent"===r.currentPass){e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),o.setStencilMode(Un.disabled);let t="3d"===d?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,Bn.ReadOnly);o.setDepthMode(t),n.render(o.gl,u),o.setDirty(),e.setBaseState(),o.bindFramebuffer.set(null)}},debug:function(e,t,i){for(let r of i)Zs(e,t,r)},debugPadding:function(e){let t=e.transform.padding;
1172Os(e,e.transform.height-(t.top||0),3,zs),Os(e,t.bottom||0,3,As),js(e,t.left||0,3,Ds),js(e,e.transform.width-(t.right||0),3,Ls);let i=e.transform.centerPoint;ks(e,i.x,e.transform.height-i.y,Fs)},terrainDepth:function(e,t){let i=e.context,r=i.gl,a=e.transform,o=On.unblended,n=new Bn(r.LEQUAL,Bn.ReadWrite,[0,1]),s=t.tileManager.getRenderableTiles(),l=e.useProgram("terrainDepth");i.bindFramebuffer.set(t.getFramebuffer().framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:c.pn.white,depth:1});for(let e of s){let s=t.getTerrainMesh(e.tileID),h=t.getTerrainData(e.tileID),c=a.getProjectionData({overscaledTileID:e.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),u=Xa(t.getSkirtLength(a.zoom));l.draw(i,r.TRIANGLES,n,Un.disabled,o,Gn.backCCW,u,h,c,"terrain",s.vertexBuffer,s.indexBuffer,s.segments)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])}};function $s(e,t,i){let r=t?.transitionState??0;return{currentPass:"offscreen",currentLayer:0,opaquePassCutoff:1/0,depthRangeFor3D:[0,1],isRenderingToTexture:!1,transform:e,terrain:i,projectionTransition:r,isRenderingGlobe:r>0}}var Hs=((h=class e{constructor(e,t){this.drawFunctions=qs,this.context=new jn(e),this.transform=t,this.layerOpacityFbo=null,this._tileTextures={},this._rttObjectRecyclePool=[],this._rttSharedFbo=null,this.terrainFacilitator={depthDirty:!0,matrix:(0,c.Ci)(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=xi.maxOverzooming+xi.maxUnderzooming+1,this.depthEpsilon=152587890625e-16,this.crossTileSymbolIndex=new Sr}resize(e,t,i){if(this.width=Math.floor(e*i),this.height=Math.floor(t*i),this.pixelRatio=i,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,t=new c.Ut;t.emplaceBack(0,0),t.emplaceBack(c.Rr,0),t.emplaceBack(0,c.Rr),t.emplaceBack(c.Rr,c.Rr),this.tileExtentBuffer=e.createVertexBuffer(t,Ct.members),this.tileExtentSegments=c.Rt.simpleSegment(0,0,4,2);let i=new c.Ut;i.emplaceBack(0,0),i.emplaceBack(c.Rr,0),i.emplaceBack(0,c.Rr),i.emplaceBack(c.Rr,c.Rr),this.debugBuffer=e.createVertexBuffer(i,Ct.members),this.debugSegments=c.Rt.simpleSegment(0,0,4,5);let r=new c.Gt;r.emplaceBack(0,0,0,0),r.emplaceBack(c.Rr,0,c.Rr,0),r.emplaceBack(0,c.Rr,0,c.Rr),r.emplaceBack(c.Rr,c.Rr,c.Rr,c.Rr),this.rasterBoundsBuffer=e.createVertexBuffer(r,Wa.members),this.rasterBoundsSegments=c.Rt.simpleSegment(0,0,4,2);let a=new c.Ut;a.emplaceBack(0,0),a.emplaceBack(c.Rr,0),a.emplaceBack(0,c.Rr),a.emplaceBack(c.Rr,c.Rr),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(a,Ct.members),this.rasterBoundsSegmentsPosOnly=c.Rt.simpleSegment(0,0,4,5);let o=new c.Ut;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Ct.members),this.viewportSegments=c.Rt.simpleSegment(0,0,4,2);let n=new c.Vt;n.emplaceBack(0),n.emplaceBack(1),n.emplaceBack(3),n.emplaceBack(2),n.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(n);let s=new c.Kt;s.emplaceBack(1,0,2),s.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);let l=this.context.gl;this.stencilClearMode=new Un({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO),this.tileExtentMesh=new Mt(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,t=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=(0,c.yi)();(0,c.Ei)(i,0,this.width,this.height,0,0,1),(0,c.ji)(i,i,[t.drawingBufferWidth,t.drawingBufferHeight,0]);let r={mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i,clipAntimeridian:!1};this.useProgram("clippingMask",null,!0).draw(e,t.TRIANGLES,Bn.disabled,this.stencilClearMode,On.disabled,Gn.disabled,null,null,r,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}renderTileClippingMasks(e,t,i){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t?.length)return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();let r=this.context;r.setColorMode(On.disabled),r.setDepthMode(Bn.disabled);let a={};for(let e of t)a[e.key]=this.nextStencilID++;this.style.projection.useSubdivision&&this._renderTileMasks(a,t,i,!0),this._renderTileMasks(a,t,i,!1),this._tileClippingMaskIDs=a}_renderTileMasks(e,t,i,r){let a=this.context,o=a.gl,n=this.style.projection,s=this.transform,l=this.useProgram("clippingMask");for(let h of t){let t=e[h.key],c=this.getTerrainDataForTile(h,i),u=n.getMeshFromTileID(this.context,h.canonical,r,!0,"stencil"),d=s.getProjectionData({overscaledTileID:h,applyGlobeMatrix:!i,applyTerrainMatrix:!0});l.draw(a,o.TRIANGLES,Bn.disabled,new Un({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),On.disabled,i?Gn.disabled:Gn.backCCW,null,c,d,"$clipping",u.vertexBuffer,u.indexBuffer,u.segments)}}getTerrainDataForTile(e,t){return t&&"mercator"===this.style.projection?.name?null:this.style.map.terrain?.getTerrainData(e)||null}_renderTilesDepthBuffer(){let e=this.context,t=e.gl,i=this.style.projection,r=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D(),n=ci(r,{tileSize:r.tileSize});for(let s of n){let n=this.style.map.terrain?.getTerrainData(s),l=i.getMeshFromTileID(this.context,s.canonical,!0,!0,"raster"),h=r.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(e,t.TRIANGLES,o,Un.disabled,On.disabled,Gn.backCCW,null,n,h,"$clipping",l.vertexBuffer,l.indexBuffer,l.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new Un({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new Un({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let t=this.context.gl,i=e.sort((e,t)=>
1172t.overscaledZ-e.overscaledZ),r=i[i.length-1].overscaledZ,a=i[0].overscaledZ-r+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();let e={};for(let i=0;i<a;i++)e[i+r]=new Un({func:t.GEQUAL,mask:255},i+this.nextStencilID,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID+=a,[e,i]}return[{[r]:Un.disabled},i]}stencilConfigForOverlapTwoPass(e){let t=this.context.gl,i=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),r=i[i.length-1].overscaledZ,a=i[0].overscaledZ-r+1;if(this.clearStencil(),a>1){let e={},o={};for(let i=0;i<a;i++)e[i+r]=new Un({func:t.GREATER,mask:255},a+1+i,255,t.KEEP,t.KEEP,t.REPLACE),o[i+r]=new Un({func:t.GREATER,mask:255},1+i,255,t.KEEP,t.KEEP,t.REPLACE);return this.nextStencilID=2*a+1,[e,o,i]}return this.nextStencilID=3,[{[r]:new Un({func:t.GREATER,mask:255},2,255,t.KEEP,t.KEEP,t.REPLACE)},{[r]:new Un({func:t.GREATER,mask:255},1,255,t.KEEP,t.KEEP,t.REPLACE)},i]}colorModeForRenderPass(){let e=this.context.gl;if(this._showOverdrawInspector){let t=.125;return new On([e.CONSTANT_COLOR,e.ONE],new c.pn(t,t,t,0),[!0,!0,!0,!0])}return"opaque"===this.renderOptions.currentPass?On.unblended:On.alphaBlended}getDepthModeForSublayer(e,t,i){if(!this.opaquePassEnabledForLayer())return Bn.disabled;let r=1-((1+this.renderOptions.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new Bn(i||this.context.gl.LEQUAL,t,[r,r])}getDepthModeFor3D(){return new Bn(this.context.gl.LEQUAL,Bn.ReadWrite,this.renderOptions.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.renderOptions.currentLayer<this.renderOptions.opaquePassCutoff}render(e,t){this.style=e,this.options=t;let i=this.renderOptions=$s(this.transform,e.projection,e.map.terrain??null);this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.patternAtlas=e.patternAtlas,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(x()),kn(this.context.frameUniformBuffer,this),this.imageManager.beginFrame();let r=this.style._order,a=this.style.tileManagers,o={},n={},s={};for(let e in a){let t=a[e];t.used&&t.prepare(this.context),o[e]=t.getVisibleCoordinates(!1),n[e]=o[e].slice().reverse(),s[e]=t.getVisibleCoordinates(!0).reverse()}i.opaquePassCutoff=1/0;for(let e=0;e<r.length;e++){let t=r[e];if(this.style._layers[t].is3D()){i.opaquePassCutoff=e;break}}this.maybeDrawDepth(),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),i.opaquePassCutoff=0),i.currentPass="offscreen";for(let e of r){let t=this.style._layers[e];if(!t.hasOffscreenPass()||t.isHidden(this.transform.zoom))continue;let r=n[t.source];("custom"===t.type||r.length)&&this.renderLayer(this,a[t.source],t,r,i)}if(this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:t.showOverdrawInspector?c.pn.black:c.pn.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=t.showOverdrawInspector,i.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(i.currentPass="opaque",i.currentLayer=r.length-1;i.currentLayer>=0;i.currentLayer--){let e=this.style._layers[r[i.currentLayer]],t=a[e.source],n=o[e.source];this.renderTileClippingMasks(e,n,!1),this.renderLayer(this,t,e,n,i)}i.currentPass="translucent";let l=!1;for(i.currentLayer=0;i.currentLayer<r.length;i.currentLayer++){let e=this.style._layers[r[i.currentLayer]],t=a[e.source];if(this.renderToTexture?.renderLayer(e,i))continue;!this.opaquePassEnabledForLayer()&&!l&&(l=!0,i.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());let h=("symbol"===e.type?s:n)[e.source];this.renderTileClippingMasks(e,o[e.source],!!this.renderToTexture),this.renderLayer(this,t,e,h,i)}if(i.isRenderingGlobe&&this.drawFunctions.atmosphere(this,this.style.sky,this.style.light),this.options.showTileBoundaries){let e=Ns(this.style,this.transform.zoom);e&&this.drawFunctions.debug(this,e,e.getVisibleCoordinates())}this.options.showPadding&&this.drawFunctions.debugPadding(this),this.context.setDefault()}maybeDrawDepth(){if(!this.style?.map?.terrain)return;let e=this.terrainFacilitator.matrix,t=this.transform.modelViewProjectionMatrix,i=this.terrainFacilitator.depthDirty;i||=!(0,c.bi)(e,t),i||=this.style.map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator.renderTime),i&&((0,c.vi)(e,t),this.terrainFacilitator.renderTime=x(),this.terrainFacilitator.depthDirty=!1,this.drawFunctions.terrainDepth(this,this.style.map.terrain))}renderLayer(e,t,i,r,a){if(i.isHidden(this.transform.zoom)||"background"!==i.type&&"custom"!==i.t
1172ype&&!(r||[]).length)return;this.id=i.id;let o=this.drawFunctions;(0,c.x)(i)?o.symbol(e,t,i,r,this.style.placement.variableOffsets,a):(0,c.Et)(i)?o.circle(e,t,i,r,a):(0,c.St)(i)?o.heatmap(e,t,i,r,a):(0,c.H)(i)?o.line(e,t,i,r,a):(0,c.ft)(i)?o.fill(e,t,i,r,a):(0,c.W)(i)?o.fillExtrusion(e,t,i,r,a):(0,c.bt)(i)?o.hillshade(e,t,i,r,a):(0,c._t)(i)?o.colorRelief(e,t,i,r,a):(0,c.Jt)(i)?o.raster(e,t,i,r,a):(0,c.b)(i)?o.background(e,t,i,r,a):(0,c.v)(i)&&o.custom(e,t,i,a)}saveTileTexture(t){let i=this._tileTextures[t.size[0]];i?i.length<e.MAX_TEXTURE_POOL_SIZE_PER_BUCKET?i.push(t):t.destroy():this._tileTextures[t.size[0]]=[t]}getTileTexture(e){let t=this._tileTextures[e];return t&&t.length>0?t.pop():null}acquireRTT(e){let t=this.context.gl,i=this._rttObjectRecyclePool.pop();if(i)return i.size!==e&&(i.texture.update({width:e,height:e,data:null},{premultiply:!1,useMipmap:!0}),i.texture.bind(t.LINEAR,t.CLAMP_TO_EDGE,t.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&t.texParameterf(t.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),i.size=e),i;let r=new c.yt(this.context,{width:e,height:e,data:null},t.RGBA,{premultiply:!1,useMipmap:!0});return r.bind(t.LINEAR,t.CLAMP_TO_EDGE,t.LINEAR_MIPMAP_LINEAR),this.context.extTextureFilterAnisotropic&&t.texParameterf(t.TEXTURE_2D,this.context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this.context.extTextureFilterAnisotropicMax),{texture:r,size:e}}bindRTT(e){let t=this.context.gl,i=e.size;if(!this._rttSharedFbo){let e=this.context.createFramebuffer(i,i,!0,!0),r=this.context.createRenderbuffer(t.DEPTH_STENCIL,i,i);e.depthAttachment.set(r),this._rttSharedFbo={fbo:e,depthRenderbuffer:r,size:i}}this._rttSharedFbo.size!==i&&(this.context.bindRenderbuffer.set(this._rttSharedFbo.depthRenderbuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,i,i),this.context.bindRenderbuffer.set(null),this._rttSharedFbo.fbo.width=i,this._rttSharedFbo.fbo.height=i,this._rttSharedFbo.size=i),this._rttSharedFbo.fbo.colorAttachment.set(e.texture.texture),this.context.bindFramebuffer.set(this._rttSharedFbo.fbo.framebuffer)}releaseRTT(e){this._rttObjectRecyclePool.push(e)}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.patternAtlas.getPattern(e.from.toString()),i=this.patternAtlas.getPattern(e.to.toString());return!t||!i}useProgram(e,t,i=!1,r=[]){this.cache||={};let a=!!this.style.map.terrain,o=this.style.projection,n=i?zr.projectionMercator:o.shaderPreludeCode,s=i?Dr:o.shaderDefine,l=`/${i?Lr:o.shaderVariantName}`,h=e+(t?t.cacheKey:"")+l+(this._showOverdrawInspector?"/overdraw":"")+(a?"/terrain":"")+(r?`/${r.join("/")}`:"");return this.cache[h]||=new uo(this.context,zr[e],t,Wo[e],this._showOverdrawInspector,a,n,s,r),this.cache[h]}setCustomLayerDefaults(){this.context.setCustomLayerDefaults()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;let e=this.context.gl;this.debugOverlayTexture=new c.yt(this.context,this.debugOverlayCanvas,e.RGBA)}}destroy(){if(this._tileTextures){for(let e in this._tileTextures){let t=this._tileTextures[e];if(t)for(let e of t)e.destroy()}this._tileTextures={}}for(let e of this._rttObjectRecyclePool)e.texture.destroy();if(this._rttObjectRecyclePool=[],this._rttSharedFbo){this._rttSharedFbo.fbo.colorAttachment.set(null),this._rttSharedFbo.fbo.depthAttachment.set(null);let e=this.context.gl;e.deleteRenderbuffer(this._rttSharedFbo.depthRenderbuffer),e.deleteFramebuffer(this._rttSharedFbo.fbo.framebuffer),this._rttSharedFbo=null}if(this.layerOpacityFbo?.destroy(),this.layerOpacityFbo=null,this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&this.tileExtentMesh.vertexBuffer?.destroy(),this.tileExtentMesh&&this.tileExtentMesh.indexBuffer?.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.context.projectionUniformBuffer.destroy(),this.context.terrainUniformBuffer.destroy(),this.context.frameUniformBuffer.destroy(),this.cache){for(let e in this.cache){let t=this.cache[e];t?.program&&this.context.gl.deleteProgram(t.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}
1172).MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50,h),Xs=class extends Error{constructor(e,t){super("WebGL2 is required to display this map. We are sorry, but it seems that your browser does not support WebGL2, a technology for rendering 3D graphics on the web. Read more on https://wiki.openstreetmap.org/wiki/This_map_requires_WebGL"),this.name="GPUInitializationError",this.requestedAttributes=e,this.statusMessage=t?.statusMessage??null}};function Ks(e,t){let i,r=!1,a=null,o=()=>{a=null,r&&=(e(...i),a=setTimeout(o,t),!1)};return(...e)=>(r=!0,i=e,a||o(),a)}var Ys=class{constructor(e){this._getHashParams=()=>new URLSearchParams(window.location.hash.replace("#","")),this._getCurrentHash=()=>{let e=this._getHashParams();return this._hashName?(e.get(this._hashName)||"").split("/"):([...e.keys()][0]??"").split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(!this._isValidHash(e))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getHashParams();if(this._hashName)e.delete(this._hashName);else{let t=Array.from(e.keys());t.length>0&&e.delete(t[0])}let t=decodeURIComponent(e.toString()).replace(/=&/g,"&").replace(/=$/g,""),i=t?`#${t}`:"",r=window.location.href.replace(/(#.+)?$/,i);r=r.replace("&&","&"),window.history.replaceState(window.history.state,null,r)},this._updateHash=Ks(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,r=10**Math.ceil((i*Math.LN2+Math.log(2.8444444444444446))/Math.LN10),a=Math.round(t.lng*r)/r,o=Math.round(t.lat*r)/r,n=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${a}/${o}/${i}`:`${i}/${o}/${a}`,(n||s)&&(l+="/"+Math.round(10*n)/10),s&&(l+=`/${Math.round(s)}`),this._hashName){let e=this._getHashParams();return e.set(this._hashName,l),`#${decodeURIComponent(e.toString()).replace(/=&/g,"&").replace(/=$/g,"")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(e=>isNaN(+e)))return!1;try{new c.st(+e[2],+e[1])}catch{return!1}let t=+e[0],i=+(e[3]||0),r=+(e[4]||0);return t>=this._map.getMinZoom()&&t<=this._map.getMaxZoom()&&i>=-180&&i<=180&&r>=this._map.getMinPitch()&&r<=this._map.getMaxPitch()}};const Js={linearity:.3,easing:(0,c.Bn)(0,0,.3,1)},Qs=(0,c.tr)({deceleration:2500,maxSpeed:1400},Js),el=(0,c.tr)({deceleration:20,maxSpeed:1400},Js),tl=(0,c.tr)({deceleration:1e3,maxSpeed:360},Js),il=(0,c.tr)({deceleration:1e3,maxSpeed:90},Js),rl=(0,c.tr)({deceleration:1e3,maxSpeed:360},Js);var al=class{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:x(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=x();for(;e.length>0&&t-e[0].time>160;)e.shift()}_getVelocityEntries(){let e=this._inertiaBuffer,t=x()-60,i=Math.max(0,e.length-2);for(;i>0&&e[i-1].time>=t;)i--;return e.slice(i)}_onMoveEnd(e){this._drainInertiaBuffer();let t=this._getVelocityEntries();if(t.length<2)return void this.clear();let i={zoom:0,bearing:0,pitch:0,roll:0,pan:new c.Ri(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of t)e.around&&(i.around=e.around),e.pinchAround&&(i.pinchAround=e.pinchAround);for(let{settings:e}of t.slice(1))i.zoom+=e.zoomDelta||0,i.bearing+=e.bearingDelta||0,i.pitch+=e.pitchDelta||0,i.roll+=e.rollDelta||0,e.panDelta&&i.pan._add(e.panDelta);if(!(i.pan.mag()||i.zoom||i.bearing||i.pitch||i.roll))return void this.clear();let r=x()-t[0].time,a={};if(i.pan.mag()){let t=nl(i.pan.mag(),r,(0,c.tr)({},Qs,e||{})),o=i.pan.mult(t.amount/i.pan.mag()),n=this._map._camera.cameraHelper.handlePanInertia(o,this._map._camera.transform);a.center=n.easingCenter,a.offset=n.easingOffset,ol(a,t)}if(i.zoom){let e=nl(i.zoom,r,el);a.zoom=(0,c.er)(this._map.getZoom()+e.amount,this._map.getZoomSnap(),e.amount),ol(a,e)}if(i.bearing){let e=nl(i.bearing,r,tl);
1172a.bearing=this._map.getBearing()+(0,c.Vn)(e.amount,-179,179),ol(a,e)}if(i.pitch){let e=nl(i.pitch,r,il);a.pitch=this._map.getPitch()+e.amount,ol(a,e)}if(i.roll){let e=nl(i.roll,r,rl);a.roll=this._map.getRoll()+(0,c.Vn)(e.amount,-179,179),ol(a,e)}if(a.zoom||a.bearing){let e=void 0===i.pinchAround?i.around:i.pinchAround;a.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),(0,c.tr)(a,{noMoveStart:!0})}};function ol(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function nl(e,t,i){let{maxSpeed:r,linearity:a,deceleration:o}=i,n=(0,c.Vn)(e*a/(t/1e3),-r,r),s=Math.abs(n)/(o*a);return{easing:i.easing,duration:1e3*s,amount:s/2*n}}var sl=class{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new F(this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new D(e.type,this._map,e))}mouseup(e){this._map.fire(new D(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new D(e.type,this._map,e))}dblclick(e){return this._firePreventable(new D(e.type,this._map,e))}mouseover(e){this._map.fire(new D(e.type,this._map,e))}mouseout(e){this._map.fire(new D(e.type,this._map,e))}touchstart(e){return this._firePreventable(new L(e.type,this._map,e))}touchmove(e){this._map.fire(new L(e.type,this._map,e))}touchend(e){this._map.fire(new L(e.type,this._map,e))}touchcancel(e){this._map.fire(new L(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},ll=class{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new D(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new D("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new D(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}},hl=class{constructor(e,t,i){this._map=e,this._tr=i,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&"object"==typeof t.boxZoom&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(M.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active)return;let i=t;if(this._lastPos.equals(i)||!this._box&&i.dist(this._startPos)<this._clickTolerance)return;let r=this._startPos;this._lastPos=i,this._box||(this._box=M.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));let a=Math.min(r.x,i.x),o=Math.max(r.x,i.x),n=Math.min(r.y,i.y),s=Math.max(r.y,i.y);this._box.style.transform=`translate(${a}px,${n}px)`,this._box.style.width=o-a+"px",this._box.style.height=s-n+"px"}mouseupWindow(e,t){if(!this._active||0!==e.button)return;let i=this._startPos,r=t;if(this.reset(),M.suppressClick(),i.x!==r.x||i.y!==r.y)return this._map.fire(new k("boxzoomend",{originalEvent:e})),this._boxZoomEnd?void this._boxZoomEnd(this._map,i,r,e):{cameraAnimation:e=>e.fitScreenCoordinates(i,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&=(this._box.remove(),null),M.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,t){return this._map.fire(new k(e,{originalEvent:t}))}};function cl(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let i={};for(let r=0;r<e.length;r++)i[e[r].identifier]=t[r];return i}function ul(e){let t=new c.Ri(0,0);for(let i of e)t._add(i);return t.div(e.length)}var dl=class{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,t,i){(this.centroid||i.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=ul(t),this.touches=cl(i,t)))}touchmove(e,t,i){if(this.aborted||!this.centroid)return;let r=cl(i,t);for(let e in this.touches){let t=this.touches[e],i=r[e];(!i||i.dist(t)>30)&&(this.aborted=!0)}}touchend(e,t,i){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===i.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}},_l=class{constructor(e){this.singleTap=new dl(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,i){this.singleTap.touchstart(e,t,i)}touchmove(e,t,i){this.singleTap.touchmove(e,t,i)}touchend(e,t,i){let r=this.singleTap.touchend(e,t,i);if(r){let t=e.timeStamp-this.lastTime<500,i=!this.lastTap||this.lastTap.dist(r)<30;if((!t||!i)&&this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}},pl=class{constructor(e,t){this._tr=t,this._zoomIn=new _l({numTouches:1,numTaps:2}),this._zoomOut=new _l({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,i){this._zoomIn.touchstart(e,t,i),this._zoomOut.touchstart(e,t,i)}touchmove(e,t,i){this._zoomIn.touchmove(e,t,i),this._zoomOut.touchmove(e,t,i)}touchend(e,t,i){let r=this._zoomIn.touchend(e,t,i),a=this._zoomOut.touchend(e,t,i),o=this._tr;return r?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:(0,c.er)(o.zoom+1,t.getZoomSnap()),around:o.unproject(r)},{originalEvent:e})}):a?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:(0,c.er)(o.zoom-1,t.getZoomSnap()),around:o.unproject(a)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},ml=class{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let i=this._lastPoint;if(!i)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let r=Array.isArray(t)?t[0]:t;return!this._moved&&r.dist(i)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=r,this._move(i,r))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&M.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}};const fl={0:1,2:2};function gl(e,t){let i=fl[t];return void 0===e.buttons||(e.buttons&i)!==i}var vl=class{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){this._eventButton=e.button}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!gl(e,this._eventButton)}isValidEndEvent(e){return e.button===this._eventButton}},yl=class{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return 1===e.targetTouches.length}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}},bl=class{constructor(e=new vl({checkCorrectEvent:()=>!0}),t=new yl){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,i){return e instanceof MouseEvent?t(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?i(e):void 0}startMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.startMove(e)},e=>{this.oneFingerTouchMoveStateManager.startMove(e)})}endMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.endMove(e)},e=>{this.oneFingerTouchMoveStateManager.endMove(e)})}isValidStartEvent(e){return!!this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidStartEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e))}isValidMoveEvent(e){return!!this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidMoveEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e))}isValidEndEvent(e){return!!this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidEndEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e))}};const xl=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}};function wl({enable:e,clickTolerance:t}){return new ml({clickTolerance:t,move:(e,t)=>
1172({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new vl({checkCorrectEvent:e=>0===e.button&&!e.ctrlKey}),enable:e,assignEvents:xl})}function Tl({enable:e,clickTolerance:t,aroundCenter:i=!0,minPixelCenterThreshold:r=100,rotateSpeed:a=.8},o){return new ml({clickTolerance:t,move:(e,t)=>{let n=o();if(i&&Math.abs(n.y-e.y)>r)return{bearingDelta:(0,c.ar)(new c.Ri(e.x,t.y),t,n)};let s=(t.x-e.x)*a;return i&&t.y<n.y&&(s=-s),{bearingDelta:s}},moveStateManager:new vl({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button&&!e.ctrlKey}),enable:e,assignEvents:xl})}function Pl({enable:e,clickTolerance:t,pitchSpeed:i=-.5}){return new ml({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*i}),moveStateManager:new vl({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button}),enable:e,assignEvents:xl})}function Ml({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:i=.3},r){return new ml({clickTolerance:t,move:(e,t)=>{let a=r(),o=(t.x-e.x)*i;return t.y<a.y&&(o=-o),{rollDelta:o}},moveStateManager:new vl({checkCorrectEvent:e=>2===e.button&&e.ctrlKey}),enable:e,assignEvents:xl})}var Cl=class{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new c.Ri(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,i){return this._calculateTransform(e,t,i)}touchmove(e,t,i){if(this._active)return this._shouldBePrevented(i.length)?void this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e):(e.preventDefault(),this._calculateTransform(e,t,i))}touchend(e,t,i){this._calculateTransform(e,t,i),this._active&&this._shouldBePrevented(i.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,t,i){i.length>0&&(this._active=!0);let r=cl(i,t),a=new c.Ri(0,0),o=new c.Ri(0,0),n=0;for(let e in r){let t=r[e],i=this._touches[e];i&&(a._add(t),o._add(t.sub(i)),n++,r[e]=t)}if(this._touches=r,this._shouldBePrevented(n)||!o.mag())return;let s=o.div(n);return this._sum._add(s),this._sum.mag()<this._clickTolerance?void 0:{around:a.div(n),panDelta:s}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},Il=class{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,t,i){this._firstTwoTouches||i.length<2||(this._firstTwoTouches=[i[0].identifier,i[1].identifier],this._start([t[0],t[1]]))}touchmove(e,t,i){if(!this._firstTwoTouches)return;e.preventDefault();let[r,a]=this._firstTwoTouches,o=Rl(i,t,r),n=Rl(i,t,a);if(!o||!n)return;let s=this._aroundCenter?null:o.add(n).div(2);return this._move([o,n],s,e)}touchend(e,t,i){if(!this._firstTwoTouches)return;let[r,a]=this._firstTwoTouches,o=Rl(i,t,r),n=Rl(i,t,a);o&&n||(this._active&&M.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}};function Rl(e,t,i){for(let r=0;r<e.length;r++)if(e[r].identifier===i)return t[r]}function Sl(e,t){return Math.log(e/t)/Math.LN2}var El=class extends Il{constructor(){super(),this._zoomRate=1,this._zoomThreshold=.1}setZoomRate(e){this._zoomRate=e??1}setZoomThreshold(e){this._zoomThreshold=e??.1}reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,t){let i=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(Sl(this._distance,this._startDistance))<this._zoomThreshold))return this._active=!0,{zoomDelta:Sl(this._distance,i)*this._zoomRate,pinchAround:t}}};function zl(e,t){return 180*e.angleWith(t)/Math.PI}var Al=class extends Il{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t,i){let r=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:zl(this._vector,r),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());let t=25/(Math.PI*this._minDiameter)*360,i=zl(e,this._startVector);return Math.abs(i)<t}};function Dl(e){return Math.abs(e.y)>Math.abs(e.x)}var Ll=class extends Il{constructor(e){super(),this._currentTouchCount=0,this._map=e}
1172reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,i){super.touchstart(e,t,i),this._currentTouchCount=i.length}_start(e){this._lastPoints=e,Dl(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,i){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let r=e[0].sub(this._lastPoints[0]),a=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(r,a,i.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(r.y+a.y)/2*-.5}):void 0}gestureBeginsVertically(e,t,i){if(void 0!==this._valid)return this._valid;let r=e.mag()>=2,a=t.mag()>=2;if(!r&&!a)return;if(!r||!a)return void 0===this._firstMove&&(this._firstMove=i),i-this._firstMove<100&&void 0;let o=e.y>0==t.y>0;return Dl(e)&&Dl(t)&&o}};const Fl={panStep:100,bearingStep:15,pitchStep:10};var kl=class{constructor(e,t){this._tr=t;let i=Fl;this._panStep=i.panStep,this._bearingStep=i.bearingStep,this._pitchStep=i.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,i=0,r=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?i=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?r=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?r=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,r=0),{cameraAnimation:n=>{let s=this._tr;n.easeTo({duration:300,easeId:"keyboardHandler",easing:Ol,zoom:t?(0,c.er)(s.zoom+t*(e.shiftKey?2:1),n.getZoomSnap()):s.zoom,bearing:s.bearing+i*this._bearingStep,pitch:s.pitch+r*this._pitchStep,offset:[-a*this._panStep,-o*this._panStep],center:s.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}};function Ol(e){return e*(2-e)}const jl=4.000244140625;var Bl=class{constructor(e,t,i){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=i,this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=x(),r=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==t&&t%jl==0?this._type="wheel":0!==t&&Math.abs(t)<4?this._type="trackpad":r>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(r*t)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let t=M.mousePos(this._map.getCanvas(),e),i=this._tr;this._aroundPoint=this._aroundCenter?i.transform.locationToScreenPoint(c.st.convert(i.center)):t,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if("number"==typeof this._lastExpectedZoom){let t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t)}if(0!==this._delta){let t="wheel"===this._type&&Math.abs(this._delta)>jl?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==i&&(i=1/i);let r="number"==typeof this._targetZoom?(0,c.Ir)(this._targetZoom):e.scale,a=e.applyConstrain(e.getCameraLngLat(),(0,c.Or)(r*i)).zoom,o=this._map.getZoomSnap();if("wheel"===this._type&&o>0){let t=(0,c.er)(e.zoom,o);this._targetZoom=(0,c.er)(a,o,a-t)}else this._targetZoom=a;"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let t,i="number"==typeof this._targetZoom?this._targetZoom:e.zoom,r=this._startZoom,a=this._easing,o=!1;if("wheel"===this._type&&r&&a){let e=x()-this._lastWheelEventTime,n=Math.min((e+5)/200,1),s=a(n);t=c.dn.number(r,i,s),n<1?this._needsRerender=!0:o=!0}else t=i,o=!0;return this._active=!0,o&&(this._active=!1,this._finishTimeout=setTimeout(()=>
1172{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=t,{noInertia:!0,needsRenderFrame:!o,zoomDelta:t-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let t=c.Yn;if(this._prevEase){let e=this._prevEase,i=(x()-e.start)/e.duration,r=e.easing(i+.01)-e.easing(i),a=.27/Math.sqrt(r*r+1e-4)*.01,o=Math.sqrt(.0729-a*a);t=(0,c.Bn)(a,o,.25,1)}return this._prevEase={start:x(),duration:e,easing:t},t}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}},Zl=class{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}},Ul=class{constructor(e,t){this._tr=t,this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:(0,c.er)(this._tr.zoom+(e.shiftKey?-1:1),i.getZoomSnap()),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},Nl=class{constructor(){this._tap=new _l({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,i){if(!this._swipePoint)if(this._tapTime){let r=t[0],a=e.timeStamp-this._tapTime<500,o=this._tapPoint.dist(r)<30;a&&o?i.length>0&&(this._swipePoint=r,this._swipeTouch=i[0].identifier):this.reset()}else this._tap.touchstart(e,t,i)}touchmove(e,t,i){if(this._tapTime){if(this._swipePoint){if(i[0].identifier!==this._swipeTouch)return;let r=t[0],a=r.y-this._swipePoint.y;return this._swipePoint=r,e.preventDefault(),this._active=!0,{zoomDelta:a/128*this._zoomRate}}}else this._tap.touchmove(e,t,i)}touchend(e,t,i){if(this._tapTime)this._swipePoint&&0===i.length&&this.reset();else{let r=this._tap.touchend(e,t,i);r&&(this._tapTime=e.timeStamp,this._tapPoint=r)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}},Gl=class{constructor(e,t,i){this._el=e,this._mousePan=t,this._touchPan=i}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}},Vl=class{constructor(e,t,i,r){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=i,this._mouseRoll=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}},Wl=class{constructor(e,t,i,r){this._el=e,this._touchZoom=t,this._touchRotate=i,this._tapDragZoom=r,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}},ql=class{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=M.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let i=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),r=document.createElement("div");r.className="maplibregl-desktop-message",r.textContent=t,this._container.appendChild(r);let a=document.createElement("div");a.className="maplibregl-mobile-message",a.textContent=i,this._container.appendChild(a),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,t){this._enabled&&(this._map.fire(new R("cooperativegestureprevented",{gestureType:e,originalEvent:t})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}},$l=class{constructor(e){this._camera=e}get transform(){return this._camera._requestedCameraState||this._camera.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(c.Ri.convert(e),this._camera.terrain)}};const Hl=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;var Xl=class extends c.vn{};function Kl(e){return e.panDelta?.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}var Yl=class{get _ownerDocument(){return this._el?.ownerDocument||document}get _ownerWindow(){return this._el?.ownerDocument?.defaultView||window}constructor(e,t,i){this._terrainGestureAnchorElevation=null,this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,t)=>
1172{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let i="renderFrame"===e.type?void 0:e,r={needsRenderFrame:!1},a={},o={};for(let{handlerName:n,handler:s,allowed:l}of this._handlers){if(!s.isEnabled())continue;let h;if(this._blockedByActive(o,l,n))s.reset();else if(s[t||e.type]){if((0,c.ur)(e,t||e.type)){let i=M.mousePos(this._map.getCanvas(),e);h=s[t||e.type](e,i)}else if((0,c.fr)(e,t||e.type)){let i=e.touches,r=this._getMapTouches(i),a=M.touchPos(this._map.getCanvas(),r);h=s[t||e.type](e,a,r)}else(0,c.pr)(t||e.type)||(h=s[t||e.type](e));this.mergeHandlerResult(r,a,h,n,i),h?.needsRenderFrame&&this._triggerRenderFrame()}(h||s.isActive())&&(o[n]=s)}let n={};for(let e in this._previousActiveHandlers)o[e]||(n[e]=i);this._previousActiveHandlers=o,(Object.keys(n).length||Kl(r))&&(this._changes.push([r,a,n]),this._triggerRenderFrame()),(Object.keys(o).length||Kl(r))&&this._camera.stop(!0),this._updatingCamera=!1;let{cameraAnimation:s}=r;s&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],s(this._map))},this._map=e,this._camera=t,this._transformProvider=new $l(this._camera),this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new al(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i);let r=this._el;this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[e,t,i]of this._listeners)e.addEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,i)}destroy(){for(let[e,t,i]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,i)}_addDefaultHandlers(e){let t=this._map,i=t.getCanvasContainer();this._add("mapEvent",new sl(t,e));let r=t.boxZoom=new hl(t,e,this._transformProvider);this._add("boxZoom",r),e.interactive&&e.boxZoom&&r.enable();let a=t.cooperativeGestures=new ql(t,e.cooperativeGestures);this._add("cooperativeGestures",a),e.cooperativeGestures&&a.enable();let o=new pl(t,this._transformProvider),n=new Ul(t,this._transformProvider);t.doubleClickZoom=new Zl(n,o),this._add("tapZoom",o),this._add("clickZoom",n),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let s=new Nl;this._add("tapDragZoom",s);let l=t.touchPitch=new Ll(t);this._add("touchPitch",l),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let h=()=>t.project(t.getCenter()),c=Tl(e,h),u=Pl(e),d=Ml(e,h);t.dragRotate=new Vl(e,c,u,d),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",u,["mouseRotate","mouseRoll"]),this._add("mouseRoll",d,["mousePitch"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let _=wl(e),p=new Cl(e,t);t.dragPan=new Gl(i,_,p),this._add("mousePan",_),this._add("touchPan",p,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let m=new Al,f=new El;t.touchZoomRotate=new Wl(i,f,m,s),this._add("touchRotate",m,["touchPan","touchZoom"]),this._add("touchZoom",f,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new ll(t));let g=t.scrollZoom=new Bl(t,()=>this._triggerRenderFrame(),this._transformProvider);this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let v=t.keyboard=new kl(t,this._transformProvider);this._add("keyboard",v),e.interactive&&e.keyboard&&t.keyboard.enable()}_add(e,t,i){this._handlers.push({handlerName:e,handler:t,allowed:i}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Hl(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,i){for(let r in e)if(r!==i&&!t?.includes(r))return!0;return!1}_getMapTouches(e){let t=[];for(let i of e){let e=i.target;this._el.contains(e)&&t.push(i)}return t}mergeHandlerResult(e,t,i,r,a){if(!i)return;(0,c.tr)(e,i);let o={handlerName:r,originalEvent:i.originalEvent||a};void 0!==i.zoomDelta&&(t.zoom=o),void 0!==i.panDelta&&(t.drag=o),void 0!==i.rollDelta&&(t.roll=o),void 0!==i.pitchDelta&&(t.pitch=o),void 0!==i.bearingDelta&&(t.rotate=o)}_applyChanges(){let e={},t={},i={};for(let[r,a,o]of this._changes)r.panDelta&&(e.panDelta=(e.panDelta||new c.Ri(0,0))._add(r.panDelta)),r.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+r.zoomDelta),r.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+r.bearingDelta),r.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+r.pitchDelta),r.rollDelta&&(e.rollDelta=(e.rollDelta||0)+r.rollDelta),void 0!==r.around&&(e.around=r.around),void 0!==r.pinchAround&&(e.pinchAround=r.pinchAround),r.noInertia&&(e.noInertia=r.noInertia),(0,c.tr)(t,a),(0,c.tr)(i,o);this._updateMapTransform(e,t,i),this._changes=[]}_updateMapTransform(e,t,i){let r=this._map,a=this._camera.getTransformForUpdate(),o=r.terrain;if(!(Kl(e)||o&&this._terrainMovement))return void this._fireEvents(t,i,!0);this._camera.stop(!0);let{panDelta:n,zoomDelta:s,bearingDelta:l,pitchDelta:h,rollDelta:c}=e,{around:u,aroundOnSurface:d}=this._resolveAround(e,o,a),_=o?this._terrainGestureElevation(o,u,d,a,t):void 0,p={panDelta:n,zoomDelta:s,rollDelta:c,pitchDelta:h,bearingDelta:l,around:u,aroundElevation:_};
1172this._camera.cameraHelper.useGlobeControls&&!a.isPointOnMapSurface(u)&&(u=a.centerPoint);let m=this._computePreZoomAroundLoc(a,u,n,_);this._handleMapControls({terrain:o,tr:a,deltasForHelper:p,preZoomAroundLoc:m,combinedEventsInProgress:t,panDelta:n}),this._camera.applyUpdatedTransform(a),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,i,!0)}_resolveAround(e,t,i){let r=void 0===e.pinchAround?e.around:e.pinchAround;return r||=this._camera.transform.centerPoint,t&&!i.isPointOnMapSurface(r)?{around:i.centerPoint,aroundOnSurface:!1}:{around:r,aroundOnSurface:!0}}_terrainGestureElevation(e,t,i,r,a){if(!i)return;if(!this._terrainMovement&&(a.drag||a.zoom)){let i=r.screenTerrainPointToMercatorCoordinate(t,e);this._terrainGestureAnchorElevation=i?i.z:null}if(null===this._terrainGestureAnchorElevation)return;let o=this._terrainGestureAnchorElevation;return t.distSqr(r.centerPoint)<.01||o-r.elevation>=.9*(r.getCameraAltitude()-r.elevation)?void 0:o}_computePreZoomAroundLoc(e,t,i,r){if(t.distSqr(e.centerPoint)<.01)return e.center;let a=i?t.sub(i):t;return void 0===r?e.screenPointToLocation(a):e.screenPointToLocationAtElevation(a,r)}_handleMapControls({terrain:e,tr:t,deltasForHelper:i,preZoomAroundLoc:r,combinedEventsInProgress:a,panDelta:o}){let n=this._camera.cameraHelper;if(n.handleMapControlsRollPitchBearingZoom(i,t),e)return n.useGlobeControls?(!this._terrainMovement&&(a.drag||a.zoom)&&(this._terrainMovement=!0,this._camera.elevationFreeze=!0),void n.handleMapControlsPan(i,t,r)):this._terrainMovement||!a.drag&&!a.zoom?void(void 0===i.aroundElevation&&a.drag&&this._terrainMovement&&o?t.setCenter(t.screenPointToLocation(t.centerPoint.sub(o))):n.handleMapControlsPan(i,t,r)):(this._terrainMovement=!0,this._camera.elevationFreeze=!0,void n.handleMapControlsPan(i,t,r));n.handleMapControlsPan(i,t,r)}_fireEvents(e,t,i){let r=Hl(this._eventsInProgress),a=Hl(e),o={};for(let t in e){let{originalEvent:i}=e[t];this._eventsInProgress[t]||(o[`${t}start`]=i),this._eventsInProgress[t]=e[t]}!r&&a&&this._fireEvent("movestart",a.originalEvent);for(let e in o)this._fireEvent(e,o[e]);a&&this._fireEvent("move",a.originalEvent);for(let t in e){let{originalEvent:i}=e[t];this._fireEvent(t,i)}let n,s={};for(let e in this._eventsInProgress){let{handlerName:i,originalEvent:r}=this._eventsInProgress[e];this._handlersById[i].isActive()||(delete this._eventsInProgress[e],n=t[i]||r,s[`${e}end`]=n)}for(let e in s)this._fireEvent(e,s[e]);let l=Hl(this._eventsInProgress),h=(r||a)&&!l;if(h&&this._terrainMovement){this._camera.elevationFreeze=!1,this._terrainMovement=!1,this._terrainGestureAnchorElevation=null;let e=this._camera.getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._camera.applyUpdatedTransform(e)}if(i&&h){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),t=e=>0!==e&&-this._bearingSnap<e&&e<this._bearingSnap;!e||!e.essential&&y.prefersReducedMotion?(this._map.fire(new S("moveend",{originalEvent:n})),t(this._map.getBearing())&&this._map.resetNorth()):(t(e.bearing||this._map.getBearing())&&(e.bearing=0),e.freezeElevation=!0,this._map.easeTo(e,{originalEvent:n})),this._updatingCamera=!1}}_fireEvent(e,t){this._map.fire(new S(e,t?{originalEvent:t}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new Xl("renderFrame",{timeStamp:e})),this._applyChanges()})}
1172_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}},Jl=class extends c.yn{constructor(e){super(),this._renderFrameCallback=()=>{let e=Math.min((x()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this.transform=new Xr,this.cameraHelper=new ta,void 0!==e.minZoom&&this.transform.setMinZoom(e.minZoom),void 0!==e.maxZoom&&this.transform.setMaxZoom(e.maxZoom),void 0!==e.minPitch&&this.transform.setMinPitch(e.minPitch),void 0!==e.maxPitch&&this.transform.setMaxPitch(e.maxPitch),void 0!==e.renderWorldCopies&&this.transform.setRenderWorldCopies(e.renderWorldCopies),null!==e.transformConstrain&&this.transform.setConstrainOverride(e.transformConstrain),this._moving=!1,this._zooming=!1,this._bearingSnap=e.bearingSnap,this._zoomSnap=e.zoomSnap,this._requestRenderFrame=e.requestRenderFrame,this._cancelRenderFrame=e.cancelRenderFrame,this.terrain=e.terrain,this._centerClampedToGround=e.centerClampedToGround??!0,this.transformCameraUpdate=e.transformCameraUpdate??null,this._stopHandlers=e.stopHandlers??(()=>{}),this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t}getCenter(){return new c.st(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,t,i){return e=c.Ri.convert(e).mult(-1),this.panTo(this.transform.center,(0,c.tr)({offset:e},t),i)}panTo(e,t,i){return this.easeTo((0,c.tr)({center:e},t),i)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,t,i){return this.easeTo((0,c.tr)({zoom:e},t),i)}zoomIn(e,t){return this.zoomTo((0,c.er)(this.getZoom()+1,this._zoomSnap),e,t),this}zoomOut(e,t){return this.zoomTo((0,c.er)(this.getZoom()-1,this._zoomSnap),e,t),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,t){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new S("movestart",t)).fire(new S("move",t)).fire(new S("moveend",t))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,t,i){return this.easeTo((0,c.tr)({bearing:e},t),i)}resetNorth(e,t){return this.rotateTo(0,(0,c.tr)({duration:1e3},e),t),this}resetNorthPitch(e,t){return this.easeTo((0,c.tr)({bearing:0,pitch:0,roll:0,duration:1e3},e),t),this}snapToNorth(e,t){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,t):this}getPitch(){return this.transform.pitch}setPitch(e,t){return this.jumpTo({pitch:e},t),this}getRoll(){return this.transform.roll}setRoll(e,t){return this.jumpTo({roll:e},t),this}cameraForBounds(e,t){e=et.convert(e).adjustAntiMeridian();let i=t?.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),i,t)}_cameraForBoxAndBearing(e,t,i,r){let a={top:0,bottom:0,right:0,left:0};if("number"==typeof(r=(0,c.tr)({padding:a,offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){let e=r.padding;r.padding={top:e,bottom:e,right:e,left:e}}let o=(0,c.tr)(a,r.padding);r.padding=o;let n=this.transform,s=new et(e,t),l=this.cameraHelper.cameraForBoxAndBearing(r,o,s,i,n);return l&&this._zoomSnap&&(l.zoom=(0,c.er)(l.zoom,this._zoomSnap,-1)),l}fitBounds(e,t,i){return this._fitInternal(this.cameraForBounds(e,t),t,i)}fitScreenCoordinates(e,t,i,r,a){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(c.Ri.convert(e)),this.transform.screenPointToLocation(c.Ri.convert(t)),i,r),r,a)}_fitInternal(e,t,i){return e?(delete(t=(0,c.tr)(e,t)).padding,t.linear?this.easeTo(t,i):this.flyTo(t,i)):this}jumpTo(e,t){this.stop(),"zoom"in e&&this._zoomSnap&&(e.zoom=(0,c.er)(e.zoom,this._zoomSnap));let i=this.getTransformForUpdate(),r=!1,a=!1,o=!1,n=i.zoom;this.terrain&&i.setElevation(this.terrain.getElevationForLngLat(e.center?c.st.convert(e.center):i.center,i)),this.cameraHelper.handleJumpToCenterZoom(i,e);let s=i.zoom!==n;return"elevation"in e&&i.elevation!==+e.elevation&&i.setElevation(+e.elevation),"bearing"in e&&i.bearing!==+e.bearing&&(r=!0,i.setBearing(+e.bearing)),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.setPitch(+e.pitch)),"roll"in e&&i.roll!==+e.roll&&(o=!0,i.setRoll(+e.roll)),null!=e.padding&&!i.isPaddingEqual(e.padding)&&i.setPadding(e.padding),this.applyUpdatedTransform(i),this.fire(new S("movestart",t)).fire(new S("move",t)),s&&this.fire(new S("zoomstart",t)).fire(new S("zoom",t)).fire(new S("zoomend",t)),r&&this.fire(new S("rotatestart",t)).fire(new S("rotate",t)).fire(new S("rotateend",t)),a&&this.fire(new S("pitchstart",t)).fire(new S("pitch",t)).fire(new S("pitchend",t)),o&&this.fire(new S("rollstart",t)).fire(new S("roll",t)).fire(new S("rollend",t)),this.fire(new S("moveend",t))}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,i,r,a){let o=this.transform.calculateCenterFromCameraLngLatAlt(e,t,i,r);return{center:o.center,elevation:o.elevation,zoom:o.zoom,bearing:i,pitch:r,roll:a}}easeTo(e,t){this._stop(!1,e.easeId),"zoom"in(e=(0,c.tr)({offset:[0,0],duration:500,easing:c.Yn},e))&&this._zoomSnap&&(e.zoom=(0,c.er)(e.zoom,this._zoomSnap)),(!1===e.animate||!e.essential&&y.prefersReducedMotion)&&(e.duration=0);let i,r,a=this.getTransformForUpdate(),o=this.getBearing(),n=a.pitch,s=a.roll,l="bearing"in e?this._normalizeBearing(e.bearing,o):o,h="pitch"in e?+e.pitch:n,u="roll"in e?this._normalizeBearing(e.roll,s):s,d="padding"in e?e.padding:a.padding,_=c.Ri.convert(e.offset);e.around&&(i=c.st.convert(e.around),r=a.locationToScreenPoint(i));let p={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},m=this.cameraHelper.handleEaseTo(a,{bearing:l,pitch:h,roll:u,padding:d,around:i,aroundPoint:r,offsetAsPoint:_,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating||=o!==l,this._pitching||=h!==n,this._rolling||=u!==s,this._padding=!a.isPaddingEqual(d),this._zooming||=m.isZooming,this._easeId=e.easeId,this._prepareEase(t,e.noMoveStart,p),this.terrain&&this._prepareElevation(m.elevationCenter),this._ease(i=>
1172{m.easeFunc(i),this.terrain&&!e.freezeElevation&&this._updateElevation(i),this.applyUpdatedTransform(a),this._fireMoveEvents(t)},i=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(t,i)},e),this}_prepareEase(e,t,i={}){this._moving=!0,!t&&!i.moving&&this.fire(new S("movestart",e)),this._zooming&&!i.zooming&&this.fire(new S("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new S("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new S("pitchstart",e)),this._rolling&&!i.rolling&&this.fire(new S("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLat(e,this.transform),this.elevationFreeze=!0}_updateElevation(e){(void 0===this._elevationStart||void 0===this._elevationCenter)&&this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let t=this.terrain.getElevationForLngLat(this._elevationCenter,this.transform);if(e<1&&t!==this._elevationTarget){let i=this._elevationTarget-this._elevationStart,r=(t-(i*e+this._elevationStart))/(1-e);this._elevationStart+=e*(i-r),this._elevationTarget=t}this.transform.setElevation(c.dn.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this.elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||=this.transform.clone(),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),i=e.getCameraAltitude(),r=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(i<r){let i=e.calculateCameraOptionsFromTo(t,r,e.center,e.elevation);return{pitch:i.pitch,zoom:i.zoom}}return{}}applyUpdatedTransform(e){let t=[];if(t.push(e=>this._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let i=e.clone();for(let e of t){let t=i.clone(),{center:r,zoom:a,roll:o,pitch:n,bearing:s,elevation:l}=e(t);r&&t.setCenter(r),void 0!==l&&t.setElevation(l),void 0!==a&&t.setZoom(a),void 0!==o&&t.setRoll(o),void 0!==n&&t.setPitch(n),void 0!==s&&t.setBearing(s),i.apply(t,!1)}this.transform.apply(i,!1)}_fireMoveEvents(e){this.fire(new S("move",e)),this._zooming&&this.fire(new S("zoom",e)),this._rotating&&this.fire(new S("rotate",e)),this._pitching&&this.fire(new S("pitch",e)),this._rolling&&this.fire(new S("roll",e))}_afterEase(e,t){if(this._easeId&&t&&this._easeId===t)return;delete this._easeId;let i=this._zooming,r=this._rotating,a=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,i&&this.fire(new S("zoomend",e)),r&&this.fire(new S("rotateend",e)),a&&this.fire(new S("pitchend",e)),o&&this.fire(new S("rollend",e)),this.fire(new S("moveend",e))}flyTo(e,t){if(!e.essential&&y.prefersReducedMotion){let i=(0,c.br)(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(i,t)}this.stop(),"zoom"in(e=(0,c.tr)({offset:[0,0],speed:1.2,curve:1.42,easing:c.Yn},e))&&this._zoomSnap&&(e.zoom=(0,c.er)(e.zoom,this._zoomSnap));let i=this.getTransformForUpdate(),r=i.bearing,a=i.pitch,o=i.roll,n=i.padding,s="bearing"in e?this._normalizeBearing(e.bearing,r):r,l="pitch"in e?+e.pitch:a,h="roll"in e?this._normalizeBearing(e.roll,o):o,u="padding"in e?e.padding:i.padding,d=c.Ri.convert(e.offset),_=i.centerPoint.add(d),p=i.screenPointToLocation(_),m=this.cameraHelper.handleFlyTo(i,{bearing:s,pitch:l,roll:h,padding:u,locationAtOffset:p,offsetAsPoint:d,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),f=e.curve,g=Math.max(i.width,i.height),v=g/m.scaleOfZoom,b=m.pixelPathLength,x=g/m.scaleOfMinZoom;f=Math.min(f,Math.sqrt(x/b*2));let w=f*f;function T(e){let t=(v*v-g*g+(e?-1:1)*w*w*b*b)/(2*(e?v:g)*w*b);return Math.log(Math.sqrt(t*t+1)-t)}function P(e){return(Math.exp(e)-Math.exp(-e))/2}function M(e){return(Math.exp(e)+Math.exp(-e))/2}function C(e){return P(e)/M(e)}let I=T(!1),R=function(e){return M(I)/M(I+f*e)},S=function(e){return g*((M(I)*C(I+f*e)-P(I))/w)/b},E=(T(!0)-I)/f;
1172if(Math.abs(b)<2e-6||!isFinite(E)){if(Math.abs(g-v)<1e-6)return this.easeTo(e,t);let i=v<g?-1:1;E=Math.abs(Math.log(v/g))/f,S=()=>0,R=e=>Math.exp(i*f*e)}if("duration"in e)e.duration=+e.duration;else{let t="screenSpeed"in e?+e.screenSpeed/f:+e.speed;e.duration=1e3*E/t}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=r!==s,this._pitching=l!==a,this._rolling=h!==o,this._padding=!i.isPaddingEqual(u),this._prepareEase(t,!1),this.terrain&&this._prepareElevation(m.targetCenter),this._ease(p=>{let f=p*E,g=1/R(f),v=S(f);this._rotating&&i.setBearing(c.dn.number(r,s,p)),this._pitching&&i.setPitch(c.dn.number(a,l,p)),this._rolling&&i.setRoll(c.dn.number(o,h,p)),this._padding&&(i.interpolatePadding(n,u,p),_=i.centerPoint.add(d)),m.easeFunc(p,g,v,_),this.terrain&&!e.freezeElevation&&this._updateElevation(p),this.applyUpdatedTransform(i),this._fireMoveEvents(t)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(t)},e),this}isEasing(){return!!this._easeFrameId}stop(e){return this._stop(e)}_stop(e,t){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||this._stopHandlers(),this}_ease(e,t,i){!1===i.animate||0===i.duration?(e(1),t()):(this._easeStart=x(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,t){e=(0,c.Fr)(e,-180,180);let i=Math.abs(e-t);return Math.abs(e-360-t)<i&&(e-=360),Math.abs(e+360-t)<i&&(e+=360),e}isMoving(){return this._moving}isZooming(){return this._zooming}isRotating(){return this._rotating}};const Ql={compact:!0,customAttribution:"<a href=\"https://maplibre.org/\" target=\"_blank\">MapLibre</a>"};var eh=class{constructor(e=Ql){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{e&&("terrain"===e.type||"style"===e.dataType||"source"===e.dataType&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType))&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):!this._container.classList.contains("maplibregl-compact")&&!this._container.classList.contains("maplibregl-attrib-empty")&&(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=M.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=M.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=M.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let i=this._map._getUIString(`AttributionControl.${t}`);e.title=i,e.setAttribute("aria-label",i)}_updateAttributions(){if(!this._map.style)return;let e=[];
1172if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"==typeof e?e:"")):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.tileManagers;for(let i in t){let r=t[i];if(r.used||r.usedForTerrain){let t=r.getSource();t.attribution&&!e.includes(t.attribution)&&e.push(t.attribution)}}e=e.filter(e=>String(e).trim()),e.sort((e,t)=>e.length-t.length),e=e.filter((t,i)=>{for(let r=i+1;r<e.length;r++)if(e[r].includes(t))return!1;return!0});let i=e.join(" | ");i!==this._attribHTML&&(this._attribHTML=i,e.length?(this._innerContainer.innerHTML=M.sanitize(i),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}},th=class{constructor(e={}){this._updateCompact=()=>{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options?.compact,this._container=M.create("div","maplibregl-ctrl");let t=M.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}},ih=class{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning,i=t?this._queue.concat(t):this._queue;for(let t of i)if(t.id===e)return void(t.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;this._queue=[];let i,r=!1;for(let a of t)if(!a.cancelled){try{a.callback(e)}catch(e){r||(r=!0,i=e)}if(this._cleared)break}if(this._cleared=!1,this._currentlyRunning=!1,r)throw i}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}},rh=class{constructor(e,t,i){this._tileKeys=e.map(e=>e.key).sort().join(),this._revision=t,this._zoom=i}equals(e){return this.equalsIgnoringZoom(e)&&this._zoom===e._zoom}equalsIgnoringZoom(e){return void 0!==e&&this._tileKeys===e._tileKeys&&this._revision===e._revision}};const ah={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};var oh=class{constructor(e,t){this.needsFollowUpFrame=!1,this.painter=e,this.terrain=t,this.rttSize=t.tileManager.tileSize*t.qualityFactor}getTexture(e){return e.getRTT(this._stacks.length-1).texture}
1172prepareForRender(e,t){let i=t!==this._lastPrepareZoom;this._lastPrepareZoom=t,this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(i=>!e._layers[i].isHidden(t));let r=new Set;for(let t of this._renderableLayerIds){let i=e._layers[t],a=i.source;a&&ah[i.type]&&r.add(a)}this._coordsAscending={},this._rttFingerprints={};for(let i of r){let r=e.tileManagers[i];if(!r)continue;this._coordsAscending[i]={};let a=this._coordsAscending[i],o=r.getSource(),n=o instanceof Et?o.terrainTileRanges:null;for(let e of r.getVisibleCoordinates()){let t=this.terrain.tileManager.getTerrainCoords(e,n);for(let e in t)a[e]||=[],a[e].push(t[e])}this._rttFingerprints[i]={};let s=this._rttFingerprints[i],l=r.getState().revision;for(let e in a)s[e]=new rh(a[e],l,t)}this.needsFollowUpFrame=!1;for(let e of this._renderableTiles)for(let t in this._rttFingerprints){let r=this._rttFingerprints[t][e.tileID.key],a=e.rttFingerprint[t];r&&!r.equals(a)&&(i&&r.equalsIgnoringZoom(a)?this.needsFollowUpFrame=!0:e.releaseRTT(this.painter))}}renderLayer(e,t){if(e.isHidden(this.painter.transform.zoom))return!1;let i=Object.assign({},t,{isRenderingToTexture:!0}),r=e.type,a=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(ah[r]&&((!this._prevType||!ah[this._prevType])&&this._stacks.push([]),this._prevType=r,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(ah[this._prevType]||ah[r]&&o){this._prevType=r;let e=this._stacks.length-1,t=this._stacks[e]||[];for(let r of this._renderableTiles){if(this._rttTiles.push(r),r.getRTT(e))continue;let o=r.acquireRTT(a,e,this.rttSize);a.bindRTT(o),a.context.clear({color:c.pn.transparent,stencil:0}),a.currentStencilSource=void 0;for(let e of t){let t=a.style._layers[e],o=t.source?this._coordsAscending[t.source][r.tileID.key]:[r.tileID];a.context.viewport.set([0,0,this.rttSize,this.rttSize]),a.renderTileClippingMasks(t,o,!0),a.renderLayer(a,a.style.tileManagers[t.source],t,o,i),t.source&&(r.rttFingerprint[t.source]=this._rttFingerprints[t.source][r.tileID.key])}o.texture.generateMipmap()}return Gs(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],ah[r]}return!1}};const nh={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},sh=u,lh={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:Ql,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:c.jn.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,rotateSpeed:.8,pitchSpeed:-.5,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGroun
1172d:!0,terrainSkirtLength:"auto",zoomLevelsToOverscale:4,anisotropicFilterPitch:20};var hh=class extends c.yn{get _ownerWindow(){return this._container?.ownerDocument?.defaultView||window}constructor(e){super(),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new ih,this._controls=[],this._mapId=(0,c.Nr)(),this._styleUrl=null,this._missingStyleImageResolver=null,this._lostContextStyle={style:null,images:null},this._contextLost=e=>{if(e.preventDefault(),this._frameRequest&&=(this._frameRequest.abort(),null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let e of Object.values(this.style._layers))if("custom"===e.type&&console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),e._listeners)for(let[t]of Object.entries(e._listeners))console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new B("webglcontextlost",{originalEvent:e}))}else this.fire(new B("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{if(this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style){this.style.imageManager.images=this._lostContextStyle.images;for(let e in this._lostContextStyle.images){let t=this._lostContextStyle.images[e];t.isWebGLImage&&this.style.imageManager.updateImage(e,t,!1)}}this._lostContextStyle={style:null,images:null};try{this._setupPainter()}catch(e){return void this.fire(new c._n(e))}this.resize(),this._update(),this._resizeInternal(),this.fire(new B("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()};let t=Object.assign({},lh,e,{canvasContextAttributes:Object.assign({},lh.canvasContextAttributes,e.canvasContextAttributes)});if(null!=t.minZoom&&null!=t.maxZoom&&t.minZoom>t.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=t.minPitch&&null!=t.maxPitch&&t.minPitch>t.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=t.minPitch&&t.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=t.maxPitch&&t.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");this._camera=new Jl({minZoom:t.minZoom,maxZoom:t.maxZoom,minPitch:t.minPitch,maxPitch:t.maxPitch,bearingSnap:t.bearingSnap,zoomSnap:t.zoomSnap,renderWorldCopies:t.renderWorldCopies,centerClampedToGround:t.centerClampedToGround,terrain:this.terrain,transformConstrain:t.transformConstrain,requestRenderFrame:e=>this._requestRenderFrame(e),cancelRenderFrame:e=>this._cancelRenderFrame(e),transformCameraUpdate:t.transformCameraUpdate,stopHandlers:()=>this._handlers?.stop(!1)}),this._camera.setEventedParent(this),this._interactive=t.interactive,this._maxTileCacheSize=t.maxTileCacheSize,this._maxTileCacheZoomLevels=t.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},t.canvasContextAttributes),this._trackResize=!0===t.trackResize,this._terrainSkirtLength=t.terrainSkirtLength,this._refreshExpiredTiles=!0===t.refreshExpiredTiles,this._fadeDuration=t.fadeDuration,this._crossSourceCollisions=!0===t.crossSourceCollisions,this._collectResourceTiming=!0===t.collectResourceTiming,this._locale=Object.assign({},nh,t.locale),this._clickTolerance=t.clickTolerance,this._overridePixelRatio=t.pixelRatio,this._maxCanvasSize=t.maxCanvasSize,this._zoomLevelsToOverscale=t.zoomLevelsToOverscale,this.cancelPendingTileRequestsWhileZooming=!0===t.cancelPendingTileRequestsWhileZooming,this.setAnisotropicFilterPitch(t.anisotropicFilterPitch),void 0!==t.reduceMotion&&(y.prefersReducedMotion=t.reduceMotion),this._requestManager=new I(t.transformRequest),this._container=this._resolveContainer(t.container),t.maxBounds&&this.setMaxBounds(t.maxBounds),this._setupContainer();try{this._setupPainter()}catch(e){throw this._cleanupContainer(),e}this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),this._handlers=new Yl(this,this._camera,t),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver());let i="string"==typeof t.hash&&t.hash||void 0;this._hash=t.hash?new Ys(i).addTo(this):void 0,this._hash?._onHashChange()||(this.jumpTo({center:t.center,elevation:t.elevation,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch,roll:t.roll}),t.bounds&&(this.resize(),this.fitBounds(t.bounds,(0,c.tr)({},t.fitBoundsOptions,{duration:0}))));let r="string"==typeof t.style||"globe"!==t.style?.projection?.type;this.resize(null,r),this._localIdeographFontFamily=t.localIdeographFontFamily,this._val
1172idateStyle=t.validateStyle,t.style&&this.setStyle(t.style,{localIdeographFontFamily:t.localIdeographFontFamily}),t.attributionControl&&this.addControl(new eh("boolean"==typeof t.attributionControl?void 0:t.attributionControl)),t.maplibreLogo&&this.addControl(new th,t.logoPosition),this.on("style.load",()=>{if(r||this._resizeTransform(),this._camera.transform.unmodified){let e=(0,c.br)(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e)}}),this.on("data",e=>{this._update("style"===e.dataType),this.fire("style"===e.dataType?new z("styledata",e):new A("sourcedata",e))}),this.on("dataloading",e=>{this.fire("style"===e.dataType?new z("styledataloading",e):new A("sourcedataloading",e))}),this.on("dataabort",e=>{this.fire(new A("sourcedataabort",e))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,t){if(void 0===t&&(t=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e?.onAdd)return this.fire(new c._n(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=e.onAdd(this);this._controls.push(e);let r=this._controlPositions[t];return t.includes("bottom")?r.insertBefore(i,r.firstChild):r.appendChild(i),this}removeControl(e){if(!e?.onRemove)return this.fire(new c._n(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let t=this._controls.indexOf(e);return t>-1&&this._controls.splice(t,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return ci(this._camera.transform,e)}setTransformCameraUpdate(e){this._camera.transformCameraUpdate=e}getCenter(){return new c.st(this._camera.transform.center.lng,this._camera.transform.center.lat)}setCenter(e,t){return this._camera.setCenter(e,t),this}getCenterElevation(){return this._camera.transform.elevation}setCenterElevation(e,t){return this._camera.setCenterElevation(e,t),this}setCenterClampedToGround(e){this._camera.setCenterClampedToGround(e)}panBy(e,t,i){return this._camera.panBy(e,t,i),this}panTo(e,t,i){return this._camera.panTo(e,t,i),this}getZoom(){return this._camera.transform.zoom}setZoom(e,t){return this._camera.setZoom(e,t),this}zoomTo(e,t,i){return this._camera.zoomTo(e,t,i),this}zoomIn(e,t){return this._camera.zoomIn(e,t),this}zoomOut(e,t){return this._camera.zoomOut(e,t),this}getVerticalFieldOfView(){return this._camera.transform.fov}setVerticalFieldOfView(e,t){return this._camera.setVerticalFieldOfView(e,t),this}getBearing(){return this._camera.transform.bearing}setBearing(e,t){return this._camera.setBearing(e,t),this}getZoomSnap(){return this._camera.getZoomSnap()}setZoomSnap(e){return this._camera.setZoomSnap(e),this}getPadding(){return this._camera.transform.padding}setPadding(e,t){return this._camera.setPadding(e,t),this}rotateTo(e,t,i){return this._camera.rotateTo(e,t,i),this}resetNorth(e,t){return this._camera.resetNorth(e,t),this}resetNorthPitch(e,t){return this._camera.resetNorthPitch(e,t),this}snapToNorth(e,t){return this._camera.snapToNorth(e,t),this}getPitch(){return this._camera.transform.pitch}setPitch(e,t){return this._camera.setPitch(e,t),this}getRoll(){return this._camera.transform.roll}setRoll(e,t){return this._camera.setRoll(e,t),this}cameraForBounds(e,t){return this._camera.cameraForBounds(e,t)}fitBounds(e,t,i){return this._camera.fitBounds(e,t,i),this}fitScreenCoordinates(e,t,i,r,a){return this._camera.fitScreenCoordinates(e,t,i,r,a),this}jumpTo(e,t){return this._camera.jumpTo(e,t),this}calculateCameraOptionsFromCameraLngLatAltRotation(e,t,i,r,a){return this._camera.calculateCameraOptionsFromCameraLngLatAltRotation(e,t,i,r,a)}easeTo(e,t){return this._camera.easeTo(e,t),this}flyTo(e,t){return this._camera.flyTo(e,t),this}stop(){return this._camera.stop(),this}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLat(c.st.convert(e),this._camera.transform):null}getCenterClampedToGround(){return this._camera.getCenterClampedToGroun
vendor: 4,914 bytes, line 1172
1172d()}calculateCameraOptionsFromTo(e,t,i,r){return null==r&&this.terrain&&(r=this.terrain.getElevationForLngLat(i,this._camera.transform)),this._camera.transform.calculateCameraOptionsFromTo(e,t,i,r??0)}resize(e,t=!0){if(null!==this._lostContextStyle.style)return this;this._resizeInternal(t);let i=!this._camera._moving;return i&&(this.stop(),this.fire(new S("movestart",e)).fire(new S("move",e))),this.fire(new R("resize",e)),i&&this.fire(new S("moveend",e)),this}_resizeInternal(e=!0){let[t,i]=this._containerDimensions(),r=this._getClampedPixelRatio(t,i);if(this._resizeCanvas(t,i,r),this.painter.resize(t,i,r),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let r=this._getClampedPixelRatio(t,i);this._resizeCanvas(t,i,r),this.painter.resize(t,i,r)}this._resizeTransform(e)}_resizeTransform(e=!0){let[t,i]=this._containerDimensions();this._camera.transform.resize(t,i,e),this._camera._requestedCameraState?.resize(t,i,e)}_getClampedPixelRatio(e,t){let{0:i,1:r}=this._maxCanvasSize,a=this.getPixelRatio(),o=e*a,n=t*a,s=o>i?i/o:1,l=n>r?r/n:1,h=Math.min(s,l);return h<1&&(0,c.Pr)("The canvas is larger than maxCanvasSize and is rendered at a lower pixel ratio to fit. Increase maxCanvasSize, within MAX_TEXTURE_SIZE, to render at full resolution."),h*a}getPixelRatio(){return this._overridePixelRatio??devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this._camera.transform.getBounds()}getMaxBounds(){return this._camera.transform.getMaxBounds()}setMaxBounds(e){return this._camera.transform.setMaxBounds(et.convert(e)),this._update()}setMinZoom(e){if(e??=-2,e>=-2&&e<=this._camera.transform.maxZoom){let t=this._camera.transform.zoom,i=this._camera.getTransformForUpdate();return i.setMinZoom(e),this._camera.applyUpdatedTransform(i),this._update(),t!==this._camera.transform.zoom&&this.fire(new S("zoomstart")).fire(new S("zoom")).fire(new S("zoomend")).fire(new S("movestart")).fire(new S("move")).fire(new S("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(e=!1){let t=this._camera.transform;return e?t.applyConstrain(t.center,t.minZoom).zoom:t.minZoom}setMaxZoom(e){if(e??=22,e>=this._camera.transform.minZoom){let t=this._camera.transform.zoom,i=this._camera.getTransformForUpdate();return i.setMaxZoom(e),this._camera.applyUpdatedTransform(i),this._update(),t!==this._camera.transform.zoom&&this.fire(new S("zoomstart")).fire(new S("zoom")).fire(new S("zoomend")).fire(new S("movestart")).fire(new S("move")).fire(new S("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this._camera.transform.maxZoom}setMinPitch(e){if(e??=0,e<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this._camera.transform.maxPitch){let t=this._camera.transform.pitch,i=this._camera.getTransformForUpdate();return i.setMinPitch(e),this._camera.applyUpdatedTransform(i),this._update(),t!==this._camera.transform.pitch&&this.fire(new S("pitchstart")).fire(new S("pitch")).fire(new S("pitchend")).fire(new S("movestart")).fire(new S("move")).fire(new S("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this._camera.transform.minPitch}setMaxPitch(e){if(e??=60,e>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this._camera.transform.minPitch){let t=this._camera.transform.pitch,i=this._camera.getTransformForUpdate();return i.setMaxPitch(e),this._camera.applyUpdatedTransform(i),this._update(),t!==this._camera.transform.pitch&&this.fire(new S("pitchstart")).fire(new S("pitch")).fire(new S("pitchend")).fire(new S("movestart")).fire(new S("move")).fire(new S("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this._camera.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if(e??=20,e>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this._camera.transform.renderWorldCopies}setRenderWorldCopies(e){return this._camera.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this._camera.transform.setConstrainOverride(e),this._update()}project(e){return this._camera.transform.locationToScreenPoint(c.st.convert(e),this.style&&this.terrain)}unproject(e){return this._camera.transform.screenPointToLocation(c.Ri.convert(e),this.terrain)}isMoving(){return this._camera.isMoving()||this._handlers?.isMoving()||!1}isZooming(){return this._camera.isZooming()||this._handlers?.isZooming()||!1}isRotating(){return this._camera.isRotating()||this._handlers?.isRotating()||!1}
1172_createDelegatedListener(e,t,i){if("mouseenter"===e||"mouseover"===e){let r=!1;return{layers:t,listener:i,delegates:{mousemove:a=>{let o=t.filter(e=>this.getLayer(e)),n=0===o.length?[]:this.queryRenderedFeatures(a.point,{layers:o});n.length?r||(r=!0,i.call(this,new D(e,this,a.originalEvent,{features:n}))):r=!1},mouseout:()=>{r=!1}}}}if("mouseleave"===e||"mouseout"===e){let r=!1;return{layers:t,listener:i,delegates:{mousemove:a=>{let o=t.filter(e=>this.getLayer(e));(0===o.length?[]:this.queryRenderedFeatures(a.point,{layers:o})).length?r=!0:r&&(r=!1,i.call(this,new D(e,this,a.originalEvent)))},mouseout:t=>{r&&(r=!1,i.call(this,new D(e,this,t.originalEvent)))}}}}{let r=e=>{let r=t.filter(e=>this.getLayer(e)),a=0===r.length?[]:this.queryRenderedFeatures(e.point,{layers:r});a.length&&(e.features=a,i.call(this,e),delete e.features)};return{layers:t,listener:i,delegates:{[e]:r}}}}_saveDelegatedListener(e,t){this._delegatedListeners||={},this._delegatedListeners[e]||=[],this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,i){if(!this._delegatedListeners?.[e])return;let r=this._delegatedListeners[e];for(let e=0;e<r.length;e++){let a=r[e];if(a.listener===i&&a.layers.length===t.length&&a.layers.every(e=>t.includes(e))){for(let e in a.delegates)this.off(e,a.delegates[e]);return void r.splice(e,1)}}}on(e,t,i){if(void 0===i)return super.on(e,t);let r="string"==typeof t?[t]:t,a=this._createDelegatedListener(e,r,i);this._saveDelegatedListener(e,a);for(let e in a.delegates)this.on(e,a.delegates[e]);return{unsubscribe:()=>{this._removeDelegatedListener(e,r,i)}}}once(e,t,i){if(void 0===i)return super.once(e,t);let r="string"==typeof t?[t]:t,a=this._createDelegatedListener(e,r,i);for(let t in a.delegates){let o=a.delegates[t];a.delegates[t]=(...t)=>{this._removeDelegatedListener(e,r,i),o(...t)}}this._saveDelegatedListener(e,a);for(let e in a.delegates)this.once(e,a.delegates[e]);return this}off(e,t,i){if(void 0===i)return super.off(e,t);let r="string"==typeof t?[t]:t;return this._removeDelegatedListener(e,r,i),this}queryRenderedFeatures(e,t){if(!this.style)return[];let i,r=e instanceof c.Ri||Array.isArray(e),a=r?e:[[0,0],[this._camera.transform.width,this._camera.transform.height]];if(t||=(r?{}:e)||{},a instanceof c.Ri||"number"==typeof a[0])i=[c.Ri.convert(a)];else{let e=c.Ri.convert(a[0]),t=c.Ri.convert(a[1]);i=[e,new c.Ri(t.x,e.y),t,new c.Ri(e.x,t.y),e]}return this.style.queryRenderedFeatures(i,t,this._camera.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,t){return t=(0,c.tr)({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._val
1172idateStyle},t),this._styleUrl="string"==typeof e?e:null,!1!==t.diff&&t.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,t),this):(this._localIdeographFontFamily=t.localIdeographFontFamily,this._updateStyle(e,t))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){if(this._diffStyleRequest?.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let i=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new Va(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,i):this.style.loadJSON(e,t,i),this):(this._frameRequest&&=(this._frameRequest.abort(),null),this.style?.projection?.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Va(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}async _diffStyle(e,t){if(this._diffStyleRequest?.abort(),"string"==typeof e){let i=e;this._diffStyleRequest=new AbortController;let r=this._diffStyleRequest;try{let e=await this._requestManager.transformRequest(i,"Style");if(r.signal.aborted)return void(this._diffStyleRequest=null);let a=await(0,c.Cn)(e,r);this._diffStyleRequest=null,this._updateDiff(a.data,t)}catch(e){this._diffStyleRequest=null,(0,c.Nn)(e)||this.fire(new c._n((0,c.$n)(e)))}}else"object"==typeof e&&(this._diffStyleRequest=null,this._updateDiff(e,t))}_updateDiff(e,t){try{this.style.setState(e,t)&&this._update(!0)}catch(i){(0,c.Pr)(`Unable to perform style diff: ${(0,c.$n)(i).message}.  Rebuilding the style from scratch.`),this._updateStyle(e,t)}}getStyle(){if(this.style)return this.style.serialize()}getStyleUrl(){return this._styleUrl}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();(0,c.Pr)("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){let t=this.style?.tileManagers[e];if(void 0!==t)return t.loaded();this.fire(new c._n(Error(`There is no tile manager with ID '${e}'`)))}setTerrain(e,t={}){if(this.style._checkLoaded(),e&&(0,c.on)(this,c.sn.terrain,{value:e},t))return this;if(this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let t=this.style.tileManagers[e.source];if(!t)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);null===this.terrain&&t.reload();for(let t in this.style._layers){let i=this.style._layers[t];"hillshade"===i.type&&i.source===e.source&&(0,c.Pr)("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===i.type&&i.source===e.source&&(0,c.Pr)("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain&&this.terrain.destroy(),this.terrain=new Vr(this.painter,t,e,this._terrainSkirtLength),this.painter.renderToTexture=new oh(this.painter,this.terrain),this._camera.terrain=this.terrain,this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform)),this._terrainDataCallback=t=>this._handleTerrainDataEvent(t,e.source),this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture=null,this._camera.terrain=null,this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGroun
1172d()&&this._camera.transform.setElevation(0);return this.style.triggerSymbolPlacement(),this.fire(new O({terrain:e})),this}_handleTerrainDataEvent(e,t){if("style"===e.dataType)return void this.terrain.tileManager.releaseAllRTT();let i=e.sourceId===t;if(i&&(this.terrain.resetElevationCache(),this.style.triggerSymbolPlacement()),i&&e.tile&&!this._camera.elevationFreeze&&(this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))),e.tile){if("image"===e.source?.type)return void this.terrain.tileManager.releaseAllRTT();this.terrain.tileManager.releaseRTT(e.tile.tileID)}}getTerrain(){return this.terrain?.options??null}areTilesLoaded(){let e=this.style?.tileManagers;for(let t of Object.values(e))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style?.getSource(e)}setSourceTileLodParams(e,t,i){if(i){let r=this.getSource(i);if(!r)throw Error(`There is no source with ID "${i}", cannot set LOD parameters`);r.calculateTileZoom=oi(Math.max(1,e),Math.max(1,t))}else for(let i in this.style.tileManagers)this.style.tileManagers[i].getSource().calculateTileZoom=oi(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,t){let i=this.style.tileManagers[e];if(!i)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);void 0===t?i.reload(!0):i.refreshTiles(t.map(e=>new c.u(e.z,e.x,e.y)))}addImage(e,t,i={}){this._lazyInitEmptyStyle();let r=this._createStyleImage(t,i);return r?(this.style.addImage(e,r),r.userImage?.onAdd&&r.userImage.onAdd(this,e),this):this}setMissingStyleImageResolver(e){return this._missingStyleImageResolver=e,this.style?.setMissingImageResolver(e),this}_createStyleImage(e,t={}){let{pixelRatio:i=1,sdf:r=!1,stretchX:a,stretchY:o,content:n,textFitWidth:s,textFitHeight:l}=t;if(e instanceof HTMLImageElement||(0,c.lr)(e)){let{width:t,height:h,data:u}=y.getImageData(e);return{data:new c.Tt({width:t,height:h},u),pixelRatio:i,stretchX:a,stretchY:o,content:n,textFitWidth:s,textFitHeight:l,sdf:r,version:0}}if(void 0===e.width||void 0===e.height)return this.fire(new c._n(Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))),null;{let{width:t,height:h,data:u}=e,d=e,_=(0,c.I)(d.data);return{data:_?new c.Tt({width:t,height:h}):new c.Tt({width:t,height:h},new Uint8Array(u)),pixelRatio:i,stretchX:a,stretchY:o,content:n,textFitWidth:s,textFitHeight:l,sdf:r,version:0,isWebGLImage:_,userImage:d}}}updateImage(e,t){let i=this.style.getImage(e);if(!i)return this.fire(new c._n(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:r,height:a,data:o}=t instanceof HTMLImageElement||(0,c.lr)(t)?y.getImageData(t):t;if(void 0===r||void 0===a)return this.fire(new c._n(Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(r!==i.data.width||a!==i.data.height)return this.fire(new c._n(Error("The width and height of the updated image must be that same as the previous version of the image")));
1172if(i.isWebGLImage=(0,c.I)(o),i.isWebGLImage)i.userImage=t;else{let e=!(t instanceof HTMLImageElement||(0,c.lr)(t));i.data.replace(o,e)}return this.style.updateImage(e,i),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new c._n(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}async loadImage(e){let t=await C.getImage(await this._requestManager.transformRequest(e,"Image"),new AbortController);if(!t.data)throw Error(`Could not load image ${e}: the response is empty`);return t}listImages(){return this.style?.listImages()??[]}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style?.getLayer(e)}getLayersOrder(){return this.style?.getLayersOrder()??[]}setLayerZoomRange(e,t,i){return this.style.setLayerZoomRange(e,t,i),this._update(!0)}setFilter(e,t,i={}){return this.style?.setFilter(e,t,i),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,i,r={}){return this.style?.setPaintProperty(e,t,i,r),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,i,r={}){return this.style.setLayoutProperty(e,t,i,r),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}setFontFaces(e){return this._lazyInitEmptyStyle(),this.style.setFontFaces(e),this._update(!0)}getFontFaces(){return this.style.getFontFaces()}addSprite(e,t,i={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,i,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupResizeObserver(){let e=!1,t=Ks(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50),i=this._ownerWindow.ResizeObserver??ResizeObserver;this._resizeObserver=new i(i=>{e?t(i):e=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if("string"==typeof e){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&"object"==typeof e&&1===e.nodeType)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=M.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=M.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let i=this._containerDimensions(),r=this._getClampedPixelRatio(i[0],i[1]);this._resizeCanvas(i[0],i[1],r);let a=this._controlContainer=M.create("div","maplibregl-control-container",e),o=this._controlPositions={};
vendor: 6,894 bytes, line 1172
1172for(let e of["top-left","top-right","bottom-left","bottom-right"])o[e]=M.create("div",`maplibregl-ctrl-${e} `,a);this._container.addEventListener("scroll",this._onMapScroll,!1)}_cleanupContainer(){this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map")}_resizeCanvas(e,t,i){this._canvas.width=Math.floor(i*e),this._canvas.height=Math.floor(i*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=Object.assign({},this._canvasContextAttributes,{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",e=>{t=e},{once:!0});let i=this._canvas.getContext("webgl2",e);if(!i)throw new Xs(e,t);this.painter=new Hs(i,this._camera.transform)}migrateProjection(e,t){this._camera.migrateProjection(e,t),this.painter.transform=e,this.fire(new j({newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style?._loaded?(this._styleDirty||=e,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){let t=this._idleTriggered?this._fadeDuration:0,i=this.style.projection?.transitionState>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let r=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this._camera.transform.zoom,i=x();this.style.zoomHistory.update(e,i);let a=new c.$t(e,{now:i,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=a.crossFadingFactor();(1!==o||o!==this._crossFadingFactor)&&(r=!0,this._crossFadingFactor=o),this.style.update(a)}let a=this.style.projection?.transitionState>0!==i;this._camera.transform.setTransitionState(this.style.projection?.transitionState),this.style&&(this._sourcesDirty||a)&&(this._sourcesDirty=!1,this.style._updateSources(this._camera.transform)),this.terrain?(this.terrain.tileManager.update(this._camera.transform,this.terrain)&&this.terrain.resetElevationCache(),this._camera.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._camera.transform.center,this._camera.transform.tileZoom)),!this._camera.elevationFreeze&&this.getCenterClampedToGround()&&this._camera.transform.setElevation(this.terrain.getElevationForLngLat(this._camera.transform.center,this._camera.transform))):(this._camera.transform.setMinElevationForCurrentTile(0),this.getCenterClampedToGround()&&this._camera.transform.setElevation(0)),this._placementDirty=this.style?._updatePlacement(this._camera.transform,this.showCollisionBoxes,t,this._crossSourceCollisions,a),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new R("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new R("load"))),this.style&&(this.style.hasTransitions()||r)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let o=this._sourcesDirty||this._styleDirty||this._placementDirty||this.painter.renderToTexture?.needsFollowUpFrame;return o||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new R("idle")),this._loaded&&!this._fullyLoaded&&!o&&(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&=(this._frameRequest.abort(),null),this._render(0)),this}remove(){this._hash&&this._hash.remove();for(let e of this._controls)e.onRemove(this);this._controls=[],this._frameRequest&&=(this._frameRequest.abort(),null),this._renderTaskQueue.clear(),this._diffStyleRequest?.abort(),this.painter.destroy(),this._handlers.destroy(),this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),C.removeThrottleControl(this._imageQueueHandle),this._resizeObserver?.disconnect();let e=this.painter.context.gl.getExtension("WEBGL_lose_context");e?.loseContext&&e.loseContext(),this._cleanupContainer(),this._removed=!0,this.fire(new R("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,y.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(e){if(!(0,c.Nn)(e))throw e}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return sh}getCameraTargetElevation(){return this._camera.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}};const ch={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};var uh=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),i=e===this._map.getMinZoom(!0);this._zoomInButton.disabled=t,this._zoomOutButton.disabled=i,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",i.toString())},this._rotateCompassArrow=()=>{let e=this._map.getPitch(),t=this._map.getRoll(),i=this._map.getBearing(),r=1/Math.cos((0,c.Xn)(e))**.5;this.options.visualizePitch&&this.options.visualizeRoll?this._compassIcon.style.transform=`scale(${r}) rotateZ(${-t}deg) rotateX(${e}deg) rotateZ(${-i}deg)`:this.options.visualizePitch?this._compassIcon.style.transform=`scale(${r}) rotateX(${e}deg) rotateZ(${-i}deg)`:this.options.visualizeRoll?this._compassIcon.style.transform=`rotate(${-i-t}deg)`:this._compassIcon.style.transform=`rotate(${-i}deg)`},this._setButtonTitle=(e,t)=>
1172{let i=this._map._getUIString(`NavigationControl.${t}`);e.title=i,e.setAttribute("aria-label",i)},this.options=(0,c.tr)({},ch,e),this._container=M.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),M.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),M.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=M.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("move",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new dh(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("move",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let i=M.create("button",e,this._container);return i.type="button",i.addEventListener("click",t),i}},dh=class{constructor(e,t,i=!1){this.mousedown=e=>{this.startMove(e,M.mousePos(this.element,e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.move(e,M.mousePos(this.element,e))},this.mouseup=e=>{this._rotatePitchHandler.dragEnd(e),this.offTemp()},this.touchstart=e=>{1===e.targetTouches.length?(this._startPos=this._lastPos=M.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend)):this.reset()},this.touchmove=e=>{1===e.targetTouches.length?(this._lastPos=M.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos)):this.reset()},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=t;let r=new bl;this._rotatePitchHandler=new ml({clickTolerance:3,move:(e,r)=>{let a=t.getBoundingClientRect(),o=new c.Ri((a.bottom-a.top)/2,(a.right-a.left)/2);return{bearingDelta:(0,c.ar)(new c.Ri(e.x,r.y),r,o),pitchDelta:i?-.5*(r.y-e.y):void 0}},moveStateManager:r,enable:!0,assignEvents:()=>{}}),this.map=e,t.addEventListener("mousedown",this.mousedown),t.addEventListener("touchstart",this.touchstart,{passive:!1}),t.addEventListener("touchcancel",this.reset)}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),M.disableDrag()}move(e,t){let i=this.map,{bearingDelta:r,pitchDelta:a}=this._rotatePitchHandler.dragMove(e,t)||{};r&&i.setBearing(i.getBearing()+r),a&&i.setPitch(i.getPitch()+a)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){M.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}};let _h;async function ph(e=!1){if(void 0!==_h&&!e)return _h;if(void 0===window.navigator.permissions)return _h=!!window.navigator.geolocation,_h;try{_h="denied"!==(await window.navigator.permissions.query({name:"geolocation"})).state}catch{_h=!!window.navigator.geolocation}return _h}function mh(e,t,i,r=!1){if(r||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return e?.wrap();let a=new c.st(e.lng,e.lat);if(e=new c.st(e.lng,e.lat),t){let r=new c.st(e.lng-360,e.lat),a=new c.st(e.lng+360,e.lat),o=i.locationToScreenPoint(e).distSqr(t);i.locationToScreenPoint(r).distSqr(t)<o?e=r:i.locationToScreenPoint(a).distSqr(t)<o&&(e=a)}for(;Math.abs(e.lng-i.center.lng)>180;){let t=i.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=i.width&&t.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}
1172return e.lng!==a.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(e))?e:a}const fh={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function gh(e,t,i){let r=e.classList;for(let e in fh)r.remove(`maplibregl-${i}-anchor-${e}`);r.add(`maplibregl-${i}-anchor-${t}`)}const vh={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]},yh="#3FB1CE";function bh(e,t,i=[]){let r=M.createNS("http://www.w3.org/2000/svg",e);for(let e in t)r.setAttributeNS(null,e,t[e]);for(let e of i)r.appendChild(e);return r}let xh;function wh(e){return e.firstElementChild.children[1]}var Th=class extends c.vn{},Ph=class extends c.vn{},Mh=class extends c.yn{constructor(e){if(super(),this._onClick=e=>{this.fire(new Ph("click",{originalEvent:e}))},this._onKeyPress=e=>{("Space"===e.code||"Enter"===e.code)&&this.togglePopup()},this._onKeyDown=e=>{if(!this._defaultMarker||!this._draggable||!this._map||!this._lngLat||e.composedPath()[0]!==this._element||e.altKey||e.ctrlKey||e.metaKey)return;let t=vh[e.key];if(!t)return;e.preventDefault(),e.stopPropagation();let i=e.shiftKey?10:1,r=this._map.project(this._lngLat);this.setLngLat(this._map.unproject(new c.Ri(r.x+t[0]*i,r.y+t[1]*i))),this._keyboardDragActive||(this._keyboardDragActive=!0,this.fire(new Th("dragstart"))),this.fire(new Th("drag"))},this._onKeyUp=e=>{vh[e.key]&&this._endKeyboardDrag()},this._onBlur=()=>{this._endKeyboardDrag()},this._onMapClick=e=>{let t=e.originalEvent.target,i=this._element;this._popup&&(t===i||i.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();("terrain"===e?.type||"render"===e?.type&&!t)&&this._map.once("render",this._update),this._lngLat=mh(this._lngLat,this._flatPos,this._map._camera.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map._camera.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let i="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?i=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(i=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?r="rotateX(0deg)":"map"===this._pitchAlignment&&(r=`rotateX(${this._map.getPitch()}deg)`),!this._subpixelPositioning&&(!e||"moveend"===e.type)&&(this._pos=this._pos.round()),this._element.style.transform=`${fh[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${r} ${i}`,y.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity("moveend"===e?.type)}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new Th("dragstart"))),this.fire(new Th("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new Th("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e?.anchor||"center",this._color=e?.color||yh,this._scale=e?.scale||1,this._draggable=e?.draggable||!1,this._clickTolerance=e?.clickTolerance||0,this._subpixelPositioning=e?.subpixelPositioning||!1,this._isDragging=!1,this._roleManaged=!1,this._tabIndexManaged=!1,this._keyboardDragActive=!1,this._state="inactive",this._rotation=e?.rotation||0,this._rotationAlignment=e?.rotationAlignment||"auto",this._pitchAlignment=e?.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e?.element)this._element=e.element,this._offset=c.Ri.convert(e?.offset||[0,0]);else{this._defaultMarker=!0,this._element=M.create("div");let t=(xh||(xh=bh("svg",{display:"block",height:"41px",width:"27px",viewBox:"0 0 27 41"},[bh("g",{"fill-rule":"nonzero"},[bh("g",{transform:"translate(3.0, 29.0)",fill:"#000000"},[["10.5","5.25002273"],["10.5","5.25002273"],["9.5","4.77275007"],["8.5","4.29549936"],["7.5","3.81822308"],["6.5","3.34094679"],["5.5","2.86367051"],["4.5","2.38636864"]].map(([e,t])=>bh("ellipse",{opacity:"0.04",cx:"10.5",cy:"5.80029008",rx:e,ry:t}
1172))),bh("g",{fill:yh},[bh("path",{d:"M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"})]),bh("g",{opacity:"0.25",fill:"#000000"},[bh("path",{d:"M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"})]),bh("g",{transform:"translate(6.0, 7.0)",fill:"#FFFFFF"}),bh("g",{transform:"translate(8.0, 8.0)"},[bh("circle",{fill:"#000000",opacity:"0.25",cx:"5.5",cy:"5.5",r:"5.4999962"}),bh("circle",{fill:"#FFFFFF",cx:"5.5",cy:"5.5",r:"5.4999962"})])])]),xh)).cloneNode(!0);t.setAttributeNS(null,"height",41*this._scale+"px"),t.setAttributeNS(null,"width",27*this._scale+"px"),wh(t).setAttributeNS(null,"fill",this._color),this._element.appendChild(t),this._offset=c.Ri.convert(e?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),gh(this._element,this._anchor,"marker"),e?.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._defaultMarker&&!this._element.hasAttribute("aria-label")&&this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._updateAccessibilityRole(),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._element.removeEventListener("keypress",this._onKeyPress),this._keyboardDragActive=!1,this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=c.st.convert(e),this._pos=null,this._update(),this._popup&&this._popup.setLngLat(this._lngLat),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress)),e){if(!("offset"in e.options)){let t=13.5/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._element.addEventListener("keypress",this._onKeyPress)}return this._updateTabIndex(),this._updateAccessibilityRole(),this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}_endKeyboardDrag(){this._keyboardDragActive&&(this._keyboardDragActive=!1,this.fire(new Th("dragend")))}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){let t=this._map?.terrain,i=this._map._camera.transform.isLocationOccluded(this._lngLat);if(!t||i){let e=i?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e,this._element.classList.toggle("maplibregl-marker-covered",i)))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let r=this._map,a=r.terrain.depthAtPoint(this._pos),o=r.terrain.getElevationForLngLat(this._lngLat,r._camera.transform);if(r._camera.transform.lngLatToCameraDepth(this._lngLat,o)-a<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let n=-this._offset.y/r._camera.transform.pixelsPerMeter,s=Math.sin(r.getPitch()*Math.PI/180)*n,l=r.terrain.depthAtPoint(new c.Ri(this._pos.x,this._pos.y-this._offset.y)),h=r._camera.transform.lngLatToCameraDepth(this._lngLat,o+s)-l>.006;this._popup?.isOpen()&&h&&this._popup.remove(),this._element.style.opacity=h?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",h)}getOffset(){return this._offset}setOffset(e){return this._offset=c.Ri.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._element.classList.toggle("maplibregl-marker-draggable",this._draggable),this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this._defaultMarker&&(this._draggable?(this._element.addEventListener("keydown",this._onKeyDown),this._element.addEventListener("keyup",this._onKeyUp),this._element.addEventListener("blur",this._onBlur)):(this._element.removeEventListener("keydown",this._onKeyDown),this._element.removeEventListener("keyup",this._onKeyUp),this._element.removeEventListener("blur",this._onBlur),this._endKeyboardDrag())),this._updateTabIndex(),this._updateAccessibilityRole(),this}isDraggable(){return this._draggable}_updateTabIndex(){this._popup||this._defaultMarker&&this._draggable?this._element.hasAttribute("tabindex")||(this._element.setAttribute("tabindex","0"),this._tabIndexManaged=!0):this._tabIndexManaged&&=("0"===this._element.getAttribute("tabindex")&&this._element.removeAttribute("tabindex"),!1)}_updateAccessibilityRole(){if(!this._defaultMarker||this._element.hasAttribute("role")&&!this._roleManaged)return;let e=this._draggable||this._popup?"button":"img";this._element.setAttribute("role",e),this._roleManaged=!0}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=String(e)),void 0!==t&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}};const Ch={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0}
1172;let Ih=0,Rh=!1;var Sh=class extends c.vn{},Eh=class extends c.vn{},zh=class extends c.vn{},Ah=class extends c.yn{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new Eh("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),(!this.options.trackUserLocation||"ACTIVE_LOCK"===this._watchState)&&this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new Eh("geolocate",e)),this._finish()}},this._updateCamera=e=>{let t=new c.st(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,r=this._map.getBearing(),a=(0,c.tr)({bearing:r},this.options.fitBoundsOptions),o=et.fromLngLat(t,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let t=new c.st(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(t).addTo(this._map),this._userLocationDotMarker.setLngLat(t).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Rh)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new zh("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=e=>{if(!this._map)return;let t=e?.[0]instanceof ResizeObserverEntry;!e.geolocateSource&&"ACTIVE_LOCK"===this._watchState&&!t&&!this._map.isZooming()&&(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Sh("trackuserlocationend")),this.fire(new Sh("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>{e.preventDefault()}),this._geolocateButton=M.create("button","maplibregl-ctrl-geolocate",this._container),M.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){(0,c.Pr)("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","fal
1172se"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=M.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Mh({element:this._dotElement}),this._circleElement=M.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Mh({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=(0,c.tr)({},Ch,e)}onAdd(e){return this._map=e,this._container=M.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),ph().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ih=0,Rh=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),i=e.coords;return t&&(i.longitude<t.getWest()||i.longitude>t.getEast()||i.latitude<t.getSouth()||i.latitude>t.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&e))return;let t=this._map.project(e),i=this._map.unproject([t.x+100,t.y]),r=e.distanceTo(i)/100,a=2*this._accuracy/r;this._circleElement.style.width=`${a.toFixed(2)}px`,this._circleElement.style.height=`${a.toFixed(2)}px`}trigger(){if(!this._setup)return(0,c.Pr)("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new Sh("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ih--,Rh=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new Sh("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new Sh("trackuserlocationstart")),this.fire(new Sh("userlocationfocus"));break;default:throw Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ih++,Ih>1?(e={maximumAge:6e5,timeout:0},Rh=!0):(e=this.options.positionOptions,Rh=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","fal
1172se"),this.options.showUserLocation&&this._updateMarker(null)}};const Dh={maxWidth:100,unit:"metric"};var Lh=class{constructor(e){this._onMove=()=>{Fh(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Fh(this._map,this._container,this.options)},this.options=Object.assign({},Dh,e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=M.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}};function Fh(e,t,i){let r=i?.maxWidth||100,a=e._container.clientHeight/2,o=e._container.clientWidth/2,n=e.unproject([o-r/2,a]),s=e.unproject([o+r/2,a]),l=Math.round(e.project(s).x-e.project(n).x),h=Math.min(r,l,e._container.clientWidth),c=n.distanceTo(s);if("imperial"===i?.unit){let i=3.2808*c;i>5280?kh(t,h,i/5280,e._getUIString("ScaleControl.Miles")):kh(t,h,i,e._getUIString("ScaleControl.Feet"))}else"nautical"===i?.unit?kh(t,h,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?kh(t,h,c/1e3,e._getUIString("ScaleControl.Kilometers")):kh(t,h,c,e._getUIString("ScaleControl.Meters"))}function kh(e,t,i,r){let a=jh(i),o=a/i;e.style.width=t*o+"px",e.innerHTML=`${a}&nbsp;${r}`}function Oh(e){let t=10**Math.ceil(-Math.log(e)/Math.LN10);return Math.round(e*t)/t}function jh(e){let t=10**(`${Math.floor(e)}`.length-1),i=e/t;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:i>=1?1:Oh(i),t*i}var Bh=class extends c.vn{},Zh=class extends c.yn{constructor(e={}){super(),this._onFullscreenChange=()=>{let e=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;e?.shadowRoot?.fullscreenElement;)e=e.shadowRoot.fullscreenElement;e===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=e.pseudo??!1,e?.container&&(e.container instanceof HTMLElement?this._container=e.container:(0,c.Pr)("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||=this._map.getContainer(),this._controlContainer=M.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=M.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);M.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new Bh("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new Bh("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},Uh=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=e}onAdd(e){return this._map=e,this._container=M.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=M.create("button","maplibregl-ctrl-terrain",this._container),M.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.t
1172ype="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},Nh=class{constructor(){this._toggleProjection=()=>{let e=this._map.getProjection()?.type;"mercator"!==e&&e?this._map.setProjection({type:"mercator"}):this._map.setProjection({type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),"globe"===this._map.getProjection()?.type?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=M.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=M.create("button","maplibregl-ctrl-globe",this._container),M.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}};const Gh={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Vh=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");var Wh=class extends c.vn{},qh=class extends c.yn{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._map._camera.transform.isLocationOccluded(this.getLngLat())?this._container.style.opacity=`${this.options.locationOccludedOpacity}`:this._container.style.opacity="")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new Wh("close"))),this),this._update=e=>{let t,i=this._lngLat||this._trackPointer;if(!this._map||!i||!this._content)return;if(!this._container){if(this._container=M.create("div","maplibregl-popup",this._map.getContainer()),this._tip=M.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=mh(this._lngLat,this._flatPos,this._map._camera.transform,this._trackPointer),e&&"point"in e&&e.point&&(t=e.point),this._trackPointer&&!t)return;let r=this._flatPos=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&t?t:this._map._camera.transform.locationToScreenPoint(this._lngLat));let a=this.options.anchor,o=$h(this.options.offset);if(!a){let e,t=this._container.offsetWidth,i=this._container.offsetHeight,n=Hh(this.options.padding);e=r.y+o.bottom.y<i+n.top?["top"]:r.y>this._map._camera.transform.height-i-n.bottom?["bottom"]:[],r.x<t/2+n.left?e.push("left"):r.x>this._map._camera.transform.width-t/2-n.right&&e.push("right"),a=0===e.length?"bottom":e.join("-")}let n=r.add(o[a]);this.options.subpixelPositioning||(n=n.round()),this._container.style.transform=`${fh[a]} translate(${n.x}px,${n.y}px)`,gh(this._container,a,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=(0,c.tr)(Object.create(Gh),e)}
1172addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new Wh("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=c.st.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t,i=document.createDocumentFragment(),r=document.createElement("body");for(r.innerHTML=e;t=r.firstChild,t;)i.appendChild(t);return this.setDOMContent(i)}getMaxWidth(){return this._container?.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=M.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=M.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let e=this._container.querySelector(Vh);e&&e.focus()}};function $h(e){if(!e)return $h(new c.Ri(0,0));if("number"==typeof e){let t=Math.round(Math.abs(e)/Math.SQRT2);return{center:new c.Ri(0,0),top:new c.Ri(0,e),"top-left":new c.Ri(t,t),"top-right":new c.Ri(-t,t),bottom:new c.Ri(0,-e),"bottom-left":new c.Ri(t,-t),"bottom-right":new c.Ri(-t,-t),left:new c.Ri(e,0),right:new c.Ri(-e,0)}}if(e instanceof c.Ri||Array.isArray(e)){let t=c.Ri.convert(e);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:c.Ri.convert(e.center||[0,0]),top:c.Ri.convert(e.top||[0,0]),"top-left":c.Ri.convert(e["top-left"]||[0,0]),"top-right":c.Ri.convert(e["top-right"]||[0,0]),bottom:c.Ri.convert(e.bottom||[0,0]),"bottom-left":c.Ri.convert(e["bottom-left"]||[0,0]),"bottom-right":c.Ri.convert(e["bottom-right"]||[0,0]),left:c.Ri.convert(e.left||[0,0]),right:c.Ri.convert(e.right||[0,0])}}function Hh(e){return e?{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}:{top:0,right:0,bottom:0,left:0}}const Xh=u;function Kh(e,t){return $t().setRTLTextPlugin(e,t)}function Yh(){return $t().getRTLTextPluginStatus()}function Jh(){return Xh}function Qh(){return Le.workerCount}function ec(e){Le.workerCount=e}function tc(){return c.jn.MAX_PARALLEL_IMAGE_REQUESTS}function ic(e){c.jn.MAX_PARALLEL_IMAGE_REQUESTS=e}function rc(){return c.jn.WORKER_URL}function ac(e){c.jn.WORKER_URL=e}async function oc(e){await Ne().broadcast("IS",e)}},1068,[1069]);
1173__d(function(e,t,r,n,i,a,o){"use strict";var s,l,u;Object.defineProperty(a,'__esModule',{value:!0}),Object.defineProperty(a,"$",{enumerable:!0,get:function(){return Df}}),Object.defineProperty(a,"$n",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(a,"$r",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(a,"$t",{enumerable:!0,get:function(){return il}}),Object.defineProperty(a,"A",{enumerable:!0,get:function(){return fg}}),Object.defineProperty(a,"Ai",{enumerable:!0,get:function(){return $}}),Object.defineProperty(a,"An",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(a,"Ar",{enumerable:!0,get:function(){return It}}),Object.defineProperty(a,"At",{enumerable:!0,get:function(){return Ju}}
1173),Object.defineProperty(a,"B",{enumerable:!0,get:function(){return Yy}}),Object.defineProperty(a,"Bn",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(a,"Br",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(a,"Bt",{enumerable:!0,get:function(){return Iu}}),Object.defineProperty(a,"C",{enumerable:!0,get:function(){return ox}}),Object.defineProperty(a,"Ci",{enumerable:!0,get:function(){return I}}),Object.defineProperty(a,"Cn",{enumerable:!0,get:function(){return or}}),Object.defineProperty(a,"Cr",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(a,"Ct",{enumerable:!0,get:function(){return fh}}),Object.defineProperty(a,"D",{enumerable:!0,get:function(){return Sg}}),Object.defineProperty(a,"Di",{enumerable:!0,get:function(){return R}}),Object.defineProperty(a,"Dn",{enumerable:!0,get:function(){return lr}}),Object.defineProperty(a,"Dr",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(a,"Dt",{enumerable:!0,get:function(){return Pc}}),Object.defineProperty(a,"E",{enumerable:!0,get:function(){return Gg}}),Object.defineProperty(a,"Ei",{enumerable:!0,get:function(){return N}}),Object.defineProperty(a,"En",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(a,"Er",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(a,"Et",{enumerable:!0,get:function(){return rh}}),Object.defineProperty(a,"F",{enumerable:!0,get:function(){return Im}}),Object.defineProperty(a,"Fi",{enumerable:!0,get:function(){return D}}),Object.defineProperty(a,"Fn",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(a,"Fr",{enumerable:!0,get:function(){return et}}),Object.defineProperty(a,"Ft",{enumerable:!0,get:function(){return ic}}),Object.defineProperty(a,"G",{enumerable:!0,get:function(){return Ef}}),Object.defineProperty(a,"Gn",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(a,"Gr",{enumerable:!0,get:function(){return we}}),Object.defineProperty(a,"Gt",{enumerable:!0,get:function(){return vu}}),Object.defineProperty(a,"H",{enumerable:!0,get:function(){return Ty}}),Object.defineProperty(a,"Hn",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(a,"Hr",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(a,"Ht",{enumerable:!0,get:function(){return bu}}),Object.defineProperty(a,"I",{enumerable:!0,get:function(){return Tm}}),Object.defineProperty(a,"Ii",{enumerable:!0,get:function(){return A}}),Object.defineProperty(a,"In",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(a,"Ir",{enumerable:!0,get:function(){return st}}),Object.defineProperty(a,"It",{enumerable:!0,get:function(){return ac}}),Object.defineProperty(a,"J",{enumerable:!0,get:function(){return Ff}}),Object.defineProperty(a,"Jn",{enumerable:!0,get:function(){return pt}}),Object.defineProperty(a,"Jr",{enumerable:!0,get:function(){return me}}),Object.defineProperty(a,"Jt",{enumerable:!0,get:function(){return Pl}}),Object.defineProperty(a,"K",{enumerable:!0,get:function(){return kf}}),Object.defineProperty(a,"Kn",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(a,"Kr",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(a,"Kt",{enumerable:!0,get:function(){return Bu}}),Object.defineProperty(a,"L",{enumerable:!0,get:function(){return Mm}}),Object.defineProperty(a,"Li",{enumerable:!0,get:function(){return _}}),Object.defineProperty(a,"Ln",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(a,"Lr",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(a,"Lt",{enumerable:!0,get:function(){return sc}}),Object.defineProperty(a,"M",{enumerable:!0,get:function(){return Um}}),Object.defineProperty(a,"Mi",{enumerable:!0,get:function(){return B}}),Object.defineProperty(a,"Mn",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(a,"Mr",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(a,"Mt",{enumerable:!0,get:function(){return tc}}),Object.defineProperty(a,"N",{enumerable:!0,get:function(){return Om}}),Object.defineProperty(a,"Ni",{enumerable:!0,get:function(){return S}}),Object.defineProperty(a,"Nn",{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(a,"Nr",{enumerable:!0,get:function(){return it}}),Object.defineProperty(a,"Nt",{enumerable:!0,get:function(){return rc}}),Object.defineProperty(a,"O",{enumerable:!0,get:function(){return Dg}}),Object.defineProperty(a,"Oi",{enumerable:!0,get:function(){return V}}),Object.defineProperty(a,"On",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(a,"Or",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(a,"Ot",{enumerable:!0,get:function(){return Dc}}),Object.defineProperty(a,"P",{enumerable:!0,get:function(){return Cm}}),Object.defineProperty(a,"Pi",{enumerable:!0,get:function(){return F}}),Object.defineProperty(a,"Pn",{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(a,"Pr",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(a,"Pt",{enumerable:!0,get:function(){return nc}}),Object.defineProperty(a,"Q",{enumerable:!0,get:function(){return wf}}),Object.defineProperty(a,"Qn",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(a,"Qr",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(a,"Qt",{enumerable:!0,get:function(){return ul}}),Object.defineProperty(a,"R",{enumerable:!0,get:function(){return km}}),Object.defineProperty(a,"Ri",{enumerable:!0,get:function(){return x}}),Object.defineProperty(a,"Rn",{enumerable:!0,get:function(){return St}}),Object.defineProperty(a,"Rr",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(a,"Rt",{enumerable:!0,get:function(){return ju}}),Object.defineProperty(a,"S",{enumerable:!0,get:function(){return cx}}),Object.defineProperty(a,"Si",{enumerable:!0,get:function(){return j}}),Object.defineProperty(a,"Sn",{enumerable:!0,get:function(){return sr}}),Object.defineProperty(a,"Sr",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(a,"St",{enumerable:!0,get:function(){return yh}}),Object.defineProperty(a,"T",{enumerable:!0,get:function(){return Hg}}),Object.defineProperty(a,"Ti",{enumerable:!0,get:function(){return O}}),Object.defineProperty(a,"Tn",{enumerable:!0,get:function(){return ur}}),Object.defineProperty(a,"Tr",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(a,"Tt",{enumerable:!0,get:function(){return hh}}),Object.defineProperty(a,"U",{enumerable:!0,get:function(){return xy}}),Object.defineProperty(a,"Un",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(a,"Ur",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(a,"Ut",{enumerable:!0,get:function(){return xu}}),Object.defineProperty(a,"V",{enumerable:!0,get:function(){return Vy}}),Object.defineProperty(a,"Vn",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(a,"Vr",{enumerable:!0,get:function(){return De}}),Object.defineProperty(a,"Vt",{enumerable:!0,get:function(){return Vu}}),Object.defineProperty(a,"W",{enumerable:!0,get:function(){return Nf}}),Object.defineProperty(a,"Wn",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(a,"Wr",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(a,"Wt",{enumerable:!0,get:function(){return Ou}}),Object.defineProperty(a,"X",{enumerable:!0,get:function(){return vf}}),Object.defineProperty(a,"Xn",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(a,"Xr",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(a,"Xt",{enumerable:!0,get:function(){return _l}}),Object.defineProperty(a,"Y",{enumerable:!0,get:function(){return Sf}}),Object.defineProperty(a,"Yn",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(a,"Yr",{enumerable:!0,get:function(){return de}}),Object.defineProperty(a,"Yt",{enumerable:!0,get:function(){return gl}}),Object.defineProperty(a,"Z",{enumerable:!0,get:function(){return Af}}),Object.defineProperty(a,"Zn",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(a,"Zr",{enumerable:!0,get:function(){return W}}),Object.defineProperty(a,"Zt",{enumerable:!0,get:function(){return ol}}),Object.defineProperty(a,"_",{enumerable:!0,get:function(){return Ex}}),Object.defineProperty(a,"_i",{enumerable:!0,get:function(){return T}}),Object.defineProperty(a,"_n",{enumerable:!0,get:function(){return fr}}),Object.defineProperty(a,"_r",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(a,"_t",{enumerable:!0,get:function(){return Fh}}),Object.defineProperty(a,"a",{enumerable:!0,get:function(){return eb}}),Object.defineProperty(a,"ai",{enumerable:!0,get:function(){return te}}),Object.defineProperty(a,"an",{enumerable:!0,get:function(){return Ds}}),Object.defineProperty(a,"ar",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(a,"at",{enumerable:!0,get:function(){return ff}}),Object.defineProperty(a,"b",{enumerable:!0,get:function(){return wx}}),Object.defineProperty(a,"bi",{enumerable:!0,get:function(){return q}}),Object.defineProperty(a,"bn",{enumerable:!0,get:function(){return er}}),Object.defineProperty(a,"br",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(a,"bt",{enumerable:!0,get:function(){return bh}}),Object.defineProperty(a,"c",{enumerable:!0,get:function(){return Ux}}),Object.defineProperty(a,"ci",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(a,"cn",{enumerable:!0,get:function(){return As}}),Object.defineProperty(a,"cr",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(a,"ct",{enumerable:!0,get:function(){return lf}}),Object.defineProperty(a,"d",{enumerable:!0,get:function(){return Ox}}),Object.defineProperty(a,"di",{enumerable:!0,get:function(){return he}}),Object.defineProperty(a,"dn",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(a,"dr",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(a,"dt",{enumerable:!0,get:function(){return Kp}}),Object.defineProperty(a,"ei",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(a,"en",{enumerable:!0,get:function(){return nl}}),Object.defineProperty(a,"er",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(a,"et",{enumerable:!0,get:function(){return bf}}),Object.defineProperty(a,"f",{enumerable:!0,get:function(){return Cx}}),Object.defineProperty(a,"fi",{enumerable:!0,get:function(){return H}}),Object.defineProperty(a,"fn",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(a,"fr",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(a,"ft",{enumerable:!0,get:function(){return Yp}}),Object.defineProperty(a,"g",{enumerable:!0,get:function(){return kx}}),Object.defineProperty(a,"gi",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(a,"gn",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(a,"gr",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(a,"gt",{enumerable:!0,get:function(){return kp}}),Object.defineProperty(a,"h",{enumerable:!0,get:function(){return Mx}}),Object.defineProperty(a,"hi",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(a,"hn",{enumerable:!0,get:function(){return gr}}),Object.defineProperty(a,"hr",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(a,"ht",{enumerable:!0,get:function(){return Pp}}),Object.defineProperty(a,"i",{enumerable:!0,get:function(){return qA}}),Object.defineProperty(a,"ii",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(a,"in",{enumerable:!0,get:function(){return ws}}),Object.defineProperty(a,"ir",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(a,"it",{enumerable:!0,get:function(){return pf}}),Object.defineProperty(a,"j",{enumerable:!0,get:function(){return Bm}}),Object.defineProperty(a,"ji",{enumerable:!0,get:function(){return z}}),Object.defineProperty(a,"jn",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(a,"jr",{enumerable:!0,get:function(){return je}}),Object.defineProperty(a,"jt",{enumerable:!0,get:function(){return ec}}),Object.defineProperty(a,"k",{enumerable:!0,get:function(){return pg}}),Object.defineProperty(a,"ki",{enumerable:!0,get:function(){return L}}),Object.defineProperty(a,"kn",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(a,"kr",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(a,"kt",{enumerable:!0,get:function(){return Qu}}),Object.defineProperty(a,"l",{enumerable:!0,get:function(){return qx}}),Object.defineProperty(a,"li",{enumerable:!0,get:function(){return K}}),Object.defineProperty(a,"ln",{enumerable:!0,get:function(){return wo}}),Object.defineProperty(a,"lr",{enumerable:!0,get:function(){return At}}),Object.defineProperty(a,"lt",{enumerable:!0,get:function(){return sf}}),Object.defineProperty(a,"m",{enumerable:!0,get:function(){return jx}}),Object.defineProperty(a,"mi",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(a,"mn",{enumerable:!0,get:function(){return xr}}),Object.defineProperty(a,"mr",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(a,"mt",{enumerable:!0,get:function(){return Mp}}),Object.defineProperty(a,"n",{enumerable:!0,get:function(){return WA}}),Object.defineProperty(a,"ni",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(a,"nn",{enumerable:!0,get:function(){return Bs}}),Object.defineProperty(a,"nr",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(a,"nt",{enumerable:!0,get:function(){return mf}}),Object.defineProperty(a,"o",{enumerable:!0,get:function(){return Qx}}),Object.defineProperty(a,"oi",{enumerable:!0,get:function(){return se}}),Object.defineProperty(a,"on",{enumerable:!0,get:function(){return Ss}
1173}),Object.defineProperty(a,"or",{enumerable:!0,get:function(){return We}}),Object.defineProperty(a,"ot",{enumerable:!0,get:function(){return df}}),Object.defineProperty(a,"p",{enumerable:!0,get:function(){return Bx}}),Object.defineProperty(a,"pi",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(a,"pn",{enumerable:!0,get:function(){return mn}}),Object.defineProperty(a,"pr",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(a,"pt",{enumerable:!0,get:function(){return Tp}}),Object.defineProperty(a,"q",{enumerable:!0,get:function(){return Pf}}),Object.defineProperty(a,"qn",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(a,"qr",{enumerable:!0,get:function(){return be}}),Object.defineProperty(a,"qt",{enumerable:!0,get:function(){return Cl}}),Object.defineProperty(a,"r",{enumerable:!0,get:function(){return GA}}),Object.defineProperty(a,"ri",{enumerable:!0,get:function(){return X}}),Object.defineProperty(a,"rn",{enumerable:!0,get:function(){return Ps}}),Object.defineProperty(a,"rr",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(a,"rt",{enumerable:!0,get:function(){return yf}}),Object.defineProperty(a,"s",{enumerable:!0,get:function(){return Nx}}),Object.defineProperty(a,"si",{enumerable:!0,get:function(){return le}}),Object.defineProperty(a,"sn",{enumerable:!0,get:function(){return vs}}),Object.defineProperty(a,"sr",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(a,"st",{enumerable:!0,get:function(){return uf}}),Object.defineProperty(a,"t",{enumerable:!0,get:function(){return HA}}),Object.defineProperty(a,"ti",{enumerable:!0,get:function(){return re}}),Object.defineProperty(a,"tn",{enumerable:!0,get:function(){return zs}}),Object.defineProperty(a,"tr",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(a,"tt",{enumerable:!0,get:function(){return gf}}),Object.defineProperty(a,"u",{enumerable:!0,get:function(){return Ix}}),Object.defineProperty(a,"ui",{enumerable:!0,get:function(){return J}}),Object.defineProperty(a,"un",{enumerable:!0,get:function(){return Ja}}),Object.defineProperty(a,"ur",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(a,"ut",{enumerable:!0,get:function(){return Jp}}),Object.defineProperty(a,"v",{enumerable:!0,get:function(){return Dx}}),Object.defineProperty(a,"vi",{enumerable:!0,get:function(){return M}}),Object.defineProperty(a,"vn",{enumerable:!0,get:function(){return pr}}),Object.defineProperty(a,"vr",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(a,"vt",{enumerable:!0,get:function(){return Sh}}),Object.defineProperty(a,"w",{enumerable:!0,get:function(){return nx}}),Object.defineProperty(a,"wi",{enumerable:!0,get:function(){return C}}),Object.defineProperty(a,"wn",{enumerable:!0,get:function(){return tr}}),Object.defineProperty(a,"wr",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(a,"wt",{enumerable:!0,get:function(){return ch}}),Object.defineProperty(a,"x",{enumerable:!0,get:function(){return mx}}),Object.defineProperty(a,"xi",{enumerable:!0,get:function(){return U}}),Object.defineProperty(a,"xn",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(a,"xr",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(a,"xt",{enumerable:!0,get:function(){return dh}}),Object.defineProperty(a,"y",{enumerable:!0,get:function(){return Ax}}),Object.defineProperty(a,"yi",{enumerable:!0,get:function(){return k}}),Object.defineProperty(a,"yn",{enumerable:!0,get:function(){return dr}}),Object.defineProperty(a,"yr",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(a,"yt",{enumerable:!0,get:function(){return Dh}}),Object.defineProperty(a,"z",{enumerable:!0,get:function(){return sm}}),Object.defineProperty(a,"zn",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(a,"zr",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(a,"zt",{enumerable:!0,get:function(){return su}});
1174/**
1175  * MapLibre GL JS
1176  * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.8.0/LICENSE.txt
1177  */
1178var c=Object.create,h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,d=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty,m=(e,t)=>
1178()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),g=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var i,a=f(t),o=0,s=a.length;o<s;o++)i=a[o],!y.call(e,i)&&i!==r&&h(e,i,{get:(e=>t[e]).bind(null,i),enumerable:!(n=p(t,i))||n.enumerable});return e};function x(e,t){this.x=e,this.y=t}function b(e,t,r,n){let i=3*e,a=3*(r-e)-i,o=1-i-a,s=3*t,l=3*(n-t)-s,u=1-s-l;return function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let r=e;for(let n=0;n<8;n++){let n=((o*r+a)*r+i)*r-e;if(Math.abs(n)<t)return((u*r+l)*r+s)*r;let c=(3*o*r+2*a)*r+i;if(Math.abs(c)<1e-6)break;r-=n/c}let n=0,c=1;r=e;for(let s=0;s<20;s++){let s=((o*r+a)*r+i)*r;if(Math.abs(s-e)<t)break;e>s?n=r:c=r,r=.5*(n+c)}return((u*r+l)*r+s)*r}}let v,w;function _(){return v??=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap,v}function A(){if(null==w&&(w=!1,_())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){w=!0;break}}}return w||!1}x.prototype={clone(){return new x(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this},_rotateAround(e,t){let r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),a=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:x},x.convert=function(e){if(e instanceof x)return e;if(Array.isArray(e))return new x(+e[0],+e[1]);if(void 0!==e.x&&void 0!==e.y)return new x(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};var D=typeof Float32Array<"u"?Float32Array:Array;function S(){var e=new D(9);return D!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function E(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*(u*a-o*l)+r*(-u*i+o*s)+n*(l*i-a*s)}function F(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=-r,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function P(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,h=n*s,p=i*o,f=i*s,d=i*l,y=a*o,m=a*s,g=a*l;return e[0]=1-h-d,e[3]=c-g,e[6]=p+m,e[1]=c+g,e[4]=1-u-d,e[7]=f-y,e[2]=p-m,e[5]=f+y,e[8]=1-u-h,e}function k(){var e=new D(16);return D!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function T(e){var t=new D(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function I(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10
vendor: 6,486 bytes, line 1178
1178]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function C(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],p=t[10],f=t[11],d=t[12],y=t[13],m=t[14],g=t[15],x=r*s-n*o,b=r*l-i*o,v=r*u-a*o,w=n*l-i*s,_=n*u-a*s,A=i*u-a*l,D=c*y-h*d,S=c*m-p*d,E=c*g-f*d,F=h*m-p*y,P=h*g-f*y,k=p*g-f*m,T=x*k-b*P+v*F+w*E-_*S+A*D;return T?(T=1/T,e[0]=(s*k-l*P+u*F)*T,e[1]=(i*P-n*k-a*F)*T,e[2]=(y*A-m*_+g*w)*T,e[3]=(p*_-h*A-f*w)*T,e[4]=(l*E-o*k-u*S)*T,e[5]=(r*k-i*E+a*S)*T,e[6]=(m*v-d*A-g*b)*T,e[7]=(c*A-p*v+f*b)*T,e[8]=(o*P-s*E+u*D)*T,e[9]=(n*E-r*P-a*D)*T,e[10]=(d*_-y*v+g*x)*T,e[11]=(h*v-c*_-f*x)*T,e[12]=(s*S-o*F-l*D)*T,e[13]=(r*F-n*S+i*D)*T,e[14]=(y*b-d*w-m*x)*T,e[15]=(c*w-h*b+p*x)*T,e):null}function O(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],p=t[9],f=t[10],d=t[11],y=t[12],m=t[13],g=t[14],x=t[15],b=r[0],v=r[1],w=r[2],_=r[3];return e[0]=b*n+v*s+w*h+_*y,e[1]=b*i+v*l+w*p+_*m,e[2]=b*a+v*u+w*f+_*g,e[3]=b*o+v*c+w*d+_*x,b=r[4],v=r[5],w=r[6],_=r[7],e[4]=b*n+v*s+w*h+_*y,e[5]=b*i+v*l+w*p+_*m,e[6]=b*a+v*u+w*f+_*g,e[7]=b*o+v*c+w*d+_*x,b=r[8],v=r[9],w=r[10],_=r[11],e[8]=b*n+v*s+w*h+_*y,e[9]=b*i+v*l+w*p+_*m,e[10]=b*a+v*u+w*f+_*g,e[11]=b*o+v*c+w*d+_*x,b=r[12],v=r[13],w=r[14],_=r[15],e[12]=b*n+v*s+w*h+_*y,e[13]=b*i+v*l+w*p+_*m,e[14]=b*a+v*u+w*f+_*g,e[15]=b*o+v*c+w*d+_*x,e}function B(e,t,r){var n,i,a,o,s,l,u,c,h,p,f,d,y=r[0],m=r[1],g=r[2];return t===e?(e[12]=t[0]*y+t[4]*m+t[8]*g+t[12],e[13]=t[1]*y+t[5]*m+t[9]*g+t[13],e[14]=t[2]*y+t[6]*m+t[10]*g+t[14],e[15]=t[3]*y+t[7]*m+t[11]*g+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],p=t[9],f=t[10],d=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=h,e[9]=p,e[10]=f,e[11]=d,e[12]=n*y+s*m+h*g+t[12],e[13]=i*y+l*m+p*g+t[13],e[14]=a*y+u*m+f*g+t[14],e[15]=o*y+c*m+d*g+t[15]),e}function z(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function V(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],p=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=o*i+c*n,e[6]=s*i+h*n,e[7]=l*i+p*n,e[8]=u*i-a*n,e[9]=c*i-o*n,e[10]=h*i-s*n,e[11]=p*i-l*n,e}function L(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],h=t[10],p=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=o*i-c*n,e[2]=s*i-h*n,e[3]=l*i-p*n,e[8]=a*n+u*i,e[9]=o*n+c*i,e[10]=s*n+h*i,e[11]=l*n+p*i,e}function $(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],h=t[6],p=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=o*i+c*n,e[2]=s*i+h*n,e[3]=l*i+p*n,e[4]=u*i-a*n,e[5]=c*i-o*n,e[6]=h*i-s*n,e[7]=p*i-l*n,e}function j(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.PI,Math.PI;var R=function(e,t,r,n,i){var a=1/Math.tan(t/2);if(e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0){var o=1/(n-i);e[10]=(i+n)*o,e[14]=2*i*n*o}else e[10]=-1,e[14]=-2*n;return e};var N=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),u=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*u,e[15]=1,e};function U(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function q(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],f=e[11],d=e[12],y=e[13],m=e[14],g=e[15],x=t[0],b=t[1],v=t[2],w=t[3],_=t[4],A=t[5],D=t[6],S=t[7],E=t[8],F=t[9],P=t[10],k=t[11],T=t[12],M=t[13],I=t[14],C=t[15];return Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(i-v)<=1e-6*Math.max(1,Math.abs(i),Math.abs(v))&&Math.abs(a-w)<=1e-6*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(o-_)<=1e-6*Math.max(1,Math.abs(o),Math.abs(_))&&Math.abs(s-A)<=1e-6*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(l-D)<=1e-6*Math.max(1,Math.abs(l),Math.abs(D))&&Math.abs(u-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-E)<=1e-6*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(h-F)<=1e-6*Math.max(1,Math.abs(h),Math.abs(F))&&Math.abs(p-P)<=1e-6*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(f-k)<=1e-6*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(d-T)<=1e-6*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(y-M)<=1e-6*Math.max(1,Math.abs(y),Math.abs(M))&&Math.abs(m-I)<=1e-6*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))}function G(){var e=new D(3);return D!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Y(e){var t=new D(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function X(e){var t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function Z(e,t,r){var n=new D(3);return n[0]=e,n[1]=t,n[2]=r,n}function W(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function H(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function K(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function J(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function Q(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}function ee(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function te(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function re(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ne(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e}function ie(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o||=1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}function ae(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}function oe(e,t,r){var n=r[0],i=r[1],a=r[2],o=r[3],s=t[0],l=t[1],u=t[2],c=i*u-a*l,h=a*s-n*u,p=n*l-i*s;
1178return c+=c,h+=h,p+=p,e[0]=s+o*c+i*p-a*h,e[1]=l+o*h+a*c-n*p,e[2]=u+o*p+n*h-i*c,e}function se(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function le(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function ue(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e}function ce(e){return e[0]=0,e[1]=0,e[2]=0,e}var he=H,pe=X;function fe(){var e=new D(4);return D!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function de(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function ye(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}!(function(){var e=G()})();var me=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e};function ge(){var e=new D(4);return D!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function xe(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=r[0],l=r[1],u=r[2],c=r[3];return e[0]=n*c+o*s+i*u-a*l,e[1]=i*c+o*l+a*s-n*u,e[2]=a*c+o*u+n*l-i*s,e[3]=o*c-n*s-i*l-a*u,e}function be(e,t,r,n){var i,a,o,s,l=t[0],u=t[1],c=t[2],h=t[3],p=r[0],f=r[1],d=r[2],y=r[3],m=l*p+u*f+c*d+h*y;return m<0&&(m=-m,p=-p,f=-f,d=-d,y=-y),1-m>1e-6?(i=Math.acos(m),a=Math.sin(i),o=Math.sin((1-n)*i)/a,s=Math.sin(n*i)/a):(o=1-n,s=n),e[0]=o*l+s*p,e[1]=o*u+s*f,e[2]=o*c+s*d,e[3]=o*h+s*y,e}function ve(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",a=Math.PI/360;t*=a,n*=a,r*=a;var o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),u=Math.cos(r),c=Math.sin(n),h=Math.cos(n);switch(i){case"xyz":e[0]=o*u*h+s*l*c,e[1]=s*l*h-o*u*c,e[2]=s*u*c+o*l*h,e[3]=s*u*h-o*l*c;break;case"xzy":e[0]=o*u*h-s*l*c,e[1]=s*l*h-o*u*c,e[2]=s*u*c+o*l*h,e[3]=s*u*h+o*l*c;break;case"yxz":e[0]=o*u*h+s*l*c,e[1]=s*l*h-o*u*c,e[2]=s*u*c-o*l*h,e[3]=s*u*h+o*l*c;break;case"yzx":e[0]=o*u*h+s*l*c,e[1]=s*l*h+o*u*c,e[2]=s*u*c-o*l*h,e[3]=s*u*h-o*l*c;break;case"zxy":e[0]=o*u*h-s*l*c,e[1]=s*l*h+o*u*c,e[2]=s*u*c+o*l*h,e[3]=s*u*h-o*l*c;break;case"zyx":e[0]=o*u*h-s*l*c,e[1]=s*l*h+o*u*c,e[2]=s*u*c-o*l*h,e[3]=s*u*h+o*l*c;break;default:throw Error("Unknown angle order "+i)}return e}!(function(){var e=fe()})();var we=function(e,t,r,n){var i=new D(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i};function _e(){var e=new D(2);return D!=Float32Array&&(e[0]=0,e[1]=0),e}function Ae(e,t){var r=new D(2);return r[0]=e,r[1]=t,r}function De(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function Se(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function Ee(e,t){return e[0]*t[0]+e[1]*t[1]}function Fe(e){return e[0]=0,e[1]=0,e}(function(){var e=G(),t=Z(1,0,0),r=Z(0,1,0)})(),(function(){var e=ge(),t=ge()})(),(function(){var e=S()})();var Pe=function(e){var t=e[0],r=e[1];return t*t+r*r};!(function(){var e=_e()})();const ke=8192;function Te(e,t,r){return t*(ke/(e.tileSize*2**(r-e.tileID.overscaledZ)))}const Me="__$json__:";function Ie(e){return e instanceof Error?e:Error("string"==typeof e?e:String(e))}function Ce(){return new Float64Array(4)}function Oe(){return new Float64Array(3)}function Be(){return new Float64Array(16)}function ze(){let e=new Float64Array(16);return I(e),e}function Ve(){let e=new Float32Array(16);return I(e),e}function Le(e,t,r,n,i=!1){if(!r[0]&&!r[1])return[0,0];let a=i?"map"===n?-e.bearingInRadians:0:"viewport"===n?e.bearingInRadians:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[i?r[0]:Te(t,r[0],e.zoom),i?r[1]:Te(t,r[1],e.zoom)]}function $e(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]}function je(e,t,r){let n=E([e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]]);if(0===n)return null;let i=ne([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),a=ne([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),o=ne([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),s=K([],i,-e[3]);return W(s,s,K([],a,-t[3])),W(s,s,K([],o,-r[3])),K(s,s,1/n),s}function Re(e,t,r){let n=e[0]*r[0]+e[1]*r[1]+e[2]*r[2],i=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return 0===i?null:(-n-r[3])/i}function Ne(e,t,r,n){let i=Math.sqrt(e*e+t*t),a=Math.sqrt(r*r+n*n),o=(e/=i)*(r/=a)+(t/=i)*(n/=a),s=Math.acos(o);return-t*r+e*n>0?s:-s}function Ue(e,t){let r=Ge(e,360),n=Ge(t,360),i=n-r,a=n>r?i-360:i+360;return Math.abs(i)<Math.abs(a)?i:a}function qe(e,t){let r=Ge(e,2*Math.PI),n=Ge(t,2*Math.PI);return Math.min(Math.abs(r-n),Math.abs(r-n+2*Math.PI),Math.abs(r-n-2*Math.PI))}function Ge(e,t){return(e%t+t)%t}
1178function Ye(e,t,r,n,i){return Xe(n,i,Qe((e-t)/(r-t),0,1))}function Xe(e,t,r){return e*(1-r)+t*r}function Ze(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return[t,r,n,i]}function We(e){if(!e.length)return new Set;let t=Math.max(...e.map(e=>e.canonical.z)),r=1/0,n=-1/0,i=1/0,a=-1/0,o=[];for(let s of e){let{x:e,y:l,z:u}=s.canonical,c=2**(t-u),h=e*c,p=l*c;o.push({id:s,x:h,y:p}),h<r&&(r=h),h>n&&(n=h),p<i&&(i=p),p>a&&(a=p)}let s=new Set;for(let e of o)(e.x===r||e.x===n||e.y===i||e.y===a)&&s.add(e.id);return s}function He(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function Ke(e,t,r,n){return b(e,t,r,n)}const Je=Ke(.25,.1,.25,1);function Qe(e,t,r){return Math.min(r,Math.max(t,e))}function et(e,t,r){let n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function tt(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}function rt(e,t){let r={};for(let n of t)n in e&&(r[n]=e[n]);return r}let nt=1;function it(){return nt++}function at(e){return Math.log(e)/Math.LN2%1==0}function ot(e){return e<=1?1:2**Math.ceil(Math.log(e)/Math.LN2)}function st(e){return 2**e}function lt(e){return Math.log(e)/Math.LN2}function ut(e,t,r){if(t<=0)return e;let n=1/t;return void 0===r||Math.abs(r)<1e-10?Math.round(e*n)/n:(r>0?Math.ceil(e*n-1e-9):Math.floor(e*n+1e-10))/n}function ct(e,t,r){let n={};for(let i in e)n[i]=t.call(r||this,e[i],i,e);return n}function ht(e,t,r){let n={};for(let i in e)t.call(r||this,e[i],i,e)&&(n[i]=e[i]);return n}function pt(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!pt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&e&&null!==t){if("object"!=typeof t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(!pt(e[r],t[r]))return!1;return!0}return e===t}function ft(e){return Array.isArray(e)?e.map(ft):"object"==typeof e&&e?ct(e,ft):e}const dt={};function yt(e){dt[e]||(typeof console<"u"&&console.warn(e),dt[e]=!0)}function mt(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function gt(e,t,r,n){let i=t.y-e.y,a=t.x-e.x,o=n.y-r.y,s=n.x-r.x,l=o*a-s*i;if(0===l)return null;let u=(s*(e.y-r.y)-o*(e.x-r.x))/l;return new x(e.x+u*a,e.y+u*i)}function xt([e,t,r]){return t+=90,t*=Math.PI/180,r*=Math.PI/180,[e*Math.cos(t)*Math.sin(r),e*Math.sin(t)*Math.sin(r),e*Math.cos(r)]}function bt(e){return typeof WorkerGlobalScope<"u"&&void 0!==e&&e instanceof WorkerGlobalScope}function vt(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,n,i)=>{let a=n||i;return t[r]=!a||a.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t}let wt=null;function _t(e){if(null==wt){let t=e.navigator?e.navigator.userAgent:null;wt=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return wt}function At(e){return typeof ImageBitmap<"u"&&e instanceof ImageBitmap}const Dt=async(e,t)=>{let r=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(r,t)}catch(e){throw Error(`Could not load image because of ${Ie(e).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}},St=e=>new Promise((t,r)=>{let n=new Image;n.onload=()=>{t(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame(()=>n.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=")},n.onerror=()=>r(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let i=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=URL.createObjectURL(i)});function Et(e,t,r,n,i){let a=4*Math.max(-t,0),o=(Math.max(0,r)-r)*n*4+a,s=4*n,l=Math.max(0,t),u=Math.max(0,r);return{rect:{x:l,y:u,width:Math.min(e.width,t+n)-l,height:Math.min(e.height,r+i)-u},layout:[{offset:o,stride:s}]}}async function Ft(e,t,r,n,i){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o=a?.format;if(!o||!o.startsWith("BGR")&&!o.startsWith("RGB"))throw Error(`Unrecognized format ${o}`);let s=o.startsWith("BGR"),l=new Uint8ClampedArray(n*i*4);
1178if(await a.copyTo(l,Et(e,t,r,n,i)),s)for(let e=0;e<l.length;e+=4){let t=l[e];l[e]=l[e+2],l[e+2]=t}return l}finally{a.close()}}let Pt,kt;function Tt(e,t,r,n,i){let a=e.width,o=e.height;(!Pt||!kt)&&(Pt=new OffscreenCanvas(a,o),kt=Pt.getContext("2d",{willReadFrequently:!0})),Pt.width=a,Pt.height=o,kt.drawImage(e,0,0,a,o);let s=kt.getImageData(t,r,n,i);return kt.clearRect(0,0,a,o),s.data}async function Mt(e,t,r,n,i){if(A())try{return await Ft(e,t,r,n,i)}catch{}return Tt(e,t,r,n,i)}function It(e,t,r,n){return e.addEventListener(t,r,n),{unsubscribe:()=>{e.removeEventListener(t,r,n)}}}function Ct(e){return e*Math.PI/180}function Ot(e){return e/Math.PI*180}function Bt(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing}function zt(e){let t=new Float64Array(9);P(t,e);let r,n,i=Ot(-Math.asin(Qe(t[2],-1,1)));return Math.hypot(t[5],t[8])<.001?(r=0,n=-Ot(Math.atan2(t[3],t[4]))):(r=Ot(0===t[5]&&0===t[8]?0:Math.atan2(t[5],t[8])),n=Ot(0===t[1]&&0===t[0]?0:Math.atan2(t[1],t[0]))),{roll:r,pitch:i+90,bearing:n}}function Vt(e,t,r){let n=Ae(t.x-r.x,t.y-r.y),i=Ae(e.x-r.x,e.y-r.y),a=n[0]*i[1]-n[1]*i[0];return Ot(Math.atan2(a,Ee(n,i)))}function Lt(e,t,r){let n=new Float64Array(4);return ve(n,e,t-90,r),n}const $t=85.051129,jt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Rt={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0};function Nt(e,t){return jt[t]&&"touches"in e}function Ut(e,t){if(!Rt[t])return!1;let r=e,n=r?.target?.ownerDocument?.defaultView||window;return r instanceof n.MouseEvent||r instanceof n.WheelEvent}function qt(e){return jt[e]||Rt[e]}const Gt="AbortError";var Yt=class extends Error{constructor(e=Gt){super(e instanceof Error?e.message:e),this.name=Gt,e instanceof Error&&e.stack&&(this.stack=e.stack)}};function Xt(e){return e instanceof Error&&"AbortError"===e.name}function Zt(e){if(e.aborted)throw new Yt(e.reason)}const Wt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Ht(e){return Wt.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}function Kt(e,t){Wt.REGISTERED_PROTOCOLS[e]=t}function Jt(e){delete Wt.REGISTERED_PROTOCOLS[e]}const Qt="global-dispatcher";var er=class extends Error{constructor(e,t,r,n){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=n}};function tr(){if(bt(self))return self.worker?.referrer;if("blob:"===window.location.protocol)try{return window.parent.location.href}catch{}return window.location.href}const rr=e=>e.startsWith("file:")||tr()?.startsWith("file:")&&!/^\w+:/.test(e);async function nr(e,t){let r,n,i=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:tr(),referrerPolicy:e.referrerPolicy,signal:t.signal});"json"===e.type&&!i.headers.has("Accept")&&i.headers.set("Accept","application/json");try{r=await fetch(i)}catch(t){throw Xt(t)?t:new er(0,Ie(t).message,e.url,new Blob)}if(!r.ok){let t=await r.blob();throw new er(r.status,r.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?r.arrayBuffer():"json"===e.type?r.json():r.text();let a=await n;return Zt(t.signal),{data:a,cacheControl:r.headers.get("Cache-Control"),expires:r.headers.get("Expires"),etag:r.headers.get("ETag")}}function ir(e,t){return new Promise((r,n)=>{let i=new XMLHttpRequest;i.open(e.method||"GET",e.url,!0),("arrayBuffer"===e.type||"image"===e.type)&&(i.responseType="arraybuffer");for(let t in e.headers)i.setRequestHeader(t,e.headers[t]);"json"===e.type&&(i.responseType="text",e.headers?.Accept||i.setRequestHeader("Accept","application/json")),i.withCredentials="include"===e.credentials,i.onerror=()=>{n(Error(i.statusText))},i.onload=()=>{if(!t.signal.aborted)if((i.status>=200&&i.status<300||0===i.status)&&null!==i.response){let t=i.response;if("json"===e.type)try{t=JSON.parse(i.response)}catch(e){return void n(e)}r({data:t,cacheControl:i.getResponseHeader("Cache-Control"),expires:i.getResponseHeader("Expires"),etag:i.getResponseHeader("ETag")})}else{let t=new Blob([i.response],{type:i.getResponseHeader("Content-Type")});n(new er(i.status,i.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{i.abort(),n(new Yt(t.signal.reason))}),i.send(e.body)})}const ar=async function(e,t){if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let r=Ht(e.url);if(r){let n=await r(e,t);return n.data||"arrayBuffer"!==e.type?n:tt(n,{data:new ArrayBuffer(0)})}if(bt(self)&&self.worker?.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:Qt},t)}if(!rr(e.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return nr(e,t);if(bt(self)&&self.worker?.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:Qt},t)}return ir(e,t)},or=(e,t)=>
vendor: 31,725 bytes, line 1178
1178ar(tt(e,{type:"json"}),t),sr=(e,t)=>ar(tt(e,{type:"arrayBuffer"}),t);function lr(e){if(!e||e.startsWith("data:image/"))return!0;if(e.startsWith("blob:")&&(e=e.slice(5)).startsWith("null"))return!1;if(e.indexOf("://")<=0)return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}const ur=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{t.onloadstart=()=>{r(t)};for(let r of e){let e=window.document.createElement("source");lr(r)||(t.crossOrigin="Anonymous"),e.src=r,t.appendChild(e)}})};function cr(e,t,r){r[e]?.includes(t)||(r[e]||=[],r[e].push(t))}function hr(e,t,r){if(r?.[e]){let n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}var pr=class{constructor(e,t={}){tt(this,t),this.type=e}},fr=class extends pr{constructor(e,t={}){super("error",tt({error:e},t))}},dr=class{on(e,t){return this._listeners||={},cr(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return hr(e,t,this._listeners),hr(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||={},cr(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){let r="string"==typeof e?new pr(e,t||{}):e,n=r.type;if(this.listens(n)){r.target=this;let e=this._listeners?.[n]?.slice()??[];for(let t of e)t.call(this,r);let t=this._oneTimeListeners?.[n]?.slice()??[];for(let e of t)hr(n,e,this._oneTimeListeners),e.call(this,r);let i=this._eventedParent;i&&(tt(r,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),i.fire(r))}else r instanceof fr&&console.error(r.error);return this}listens(e){return!!(this._listeners?.[e]?.length||this._oneTimeListeners?.[e]?.length||this._eventedParent?.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}},yr={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}
1178,"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};const mr=yr,gr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];var xr=class{constructor(e,t,r,n,i="error"){this.message=(e?`${e}: `:"")+r,n&&(this.identifier=n),this.severity=i,null!=t&&t.__line__&&(this.line=t.__line__)}};const br={kind:"null"},vr={kind:"number"},wr={kind:"string"},_r={kind:"boolean"},Ar={kind:"color"},Dr={kind:"projectionDefinition"},Sr={kind:"object"},Er={kind:"value"},Fr={kind:"error"},Pr={kind:"collator"},kr={kind:"formatted"},Tr={kind:"padding"},Mr={kind:"colorArray"},Ir={kind:"numberArray"},Cr={kind:"resolvedImage"},Or={kind:"variableAnchorOffsetCollection"};function Br(e,t){return{kind:"array",itemType:e,N:t}}function zr(e){if("array"===e.kind){let t=zr(e.itemType);return"number"==typeof e.N?`array<${t}, ${e.N}>`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}const Vr=[br,vr,wr,_r,Ar,Dr,kr,Sr,Br(Er),Tr,Ir,Mr,Cr,Or];function Lr(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!Lr(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind)for(let e of Vr)if(!Lr(e,t))return null}return`Expected ${zr(e)} but found ${zr(t)} instead.`}function $r(e,t){return t.some(t=>t.kind===e.kind)}function jr(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function Rr(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}const Nr=.96422,Ur=.82521,qr=.13793103448275862,Gr=.12841854934601665,Yr=Math.PI/180,Xr=180/Math.PI;function Zr(e){return(e%=360)<0&&(e+=360),e}function Wr([e,t,r,n]){let i,a,o=Kr((.2225045*(e=Hr(e))+.7168786*(t=Hr(t))+.0606169*(r=Hr(r)))/1);
1178e===t&&t===r?i=a=o:(i=Kr((.4360747*e+.3850649*t+.1430804*r)/Nr),a=Kr((.0139322*e+.0971045*t+.7141733*r)/Ur));let s=116*o-16;return[s<0?0:s,500*(i-o),200*(o-a),n]}function Hr(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Kr(e){return e>.008856451679035631?e**.3333333333333333:e/Gr+qr}function Jr([e,t,r,n]){let i=(e+16)/116,a=isNaN(t)?i:i+t/500,o=isNaN(r)?i:i-r/200;return i=1*en(i),a=Nr*en(a),o=Ur*en(o),[Qr(3.1338561*a-1.6168667*i-.4906146*o),Qr(-.9787684*a+1.9161415*i+.033454*o),Qr(.0719453*a-.2289914*i+1.4052427*o),n]}function Qr(e){return(e=e<=.00304?12.92*e:1.055*e**.4166666666666667-.055)<0?0:e>1?1:e}function en(e){return e>.20689655172413793?e*e*e:Gr*(e-qr)}function tn(e){let[t,r,n,i]=Wr(e),a=Math.sqrt(r*r+n*n);return[Math.round(1e4*a)?Zr(Math.atan2(n,r)*Xr):NaN,a,t,i]}function rn([e,t,r,n]){return e=isNaN(e)?0:e*Yr,Jr([r,Math.cos(e)*t,Math.sin(e)*t,n])}function nn([e,t,r,n]){function i(n){let i=(n+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return e=Zr(e),t/=100,r/=100,[i(0),i(8),i(4),n]}const an=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function on(e,t){return an(e,t)?e[t]:void 0}function sn(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=on(pn,e);if(t){let[e,r,n]=t;return[e/255,r/255,n/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[ln(e.slice(r,r+=t)),ln(e.slice(r,r+=t)),ln(e.slice(r,r+=t)),ln(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,n,i,a,o,s,l,u,c,h,p]=t,f=[i||" ",s||" ",c].join("");if("  "===f||"  /"===f||",,"===f||",,,"===f){let e=[n,o,u].join(""),t="%%%"===e?100:""===e?255:0;if(t){let e=[cn(+r/t,0,1),cn(+a/t,0,1),cn(+l/t,0,1),h?un(+h,p):1];if(hn(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,n,i,a,o,s,l,u]=r,c=[n||" ",a||" ",s].join("");if("  "===c||"  /"===c||",,"===c||",,,"===c){let e=[+t,cn(+i,0,100),cn(+o,0,100),l?un(+l,u):1];if(hn(e))return nn(e)}}}function ln(e){return parseInt(e.padEnd(2,e),16)/255}function un(e,t){return cn(t?e/100:e,0,1)}function cn(e,t,r){return Math.min(Math.max(t,e),r)}function hn(e){return!e.some(Number.isNaN)}const pn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
1178ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function fn(e,t,r){return e+r*(t-e)}function dn(e,t,r){return e.map((e,n)=>fn(e,t[n],r))}function yn(e){return"rgb"===e||"hcl"===e||"lab"===e}var mn=(s=class e{constructor(e,t,r,n=1,i=!0){this.r=e,this.g=t,this.b=r,this.a=n,i||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,t,r,n]))}static parse(t){if(t instanceof e)return t;if("string"!=typeof t)return;let r=sn(t);return r?new e(...r,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:n}=this,i=n||1/0;return this.overwriteGetter("rgb",[e/i,t/i,r/i,n])}get hcl(){return this.overwriteGetter("hcl",tn(this.rgb))}get lab(){return this.overwriteGetter("lab",Wr(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,n]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${n})`}static interpolate(t,r,n,i="rgb"){switch(i){case"rgb":{let[i,a,o,s]=dn(t.rgb,r.rgb,n);return new e(i,a,o,s,!1)}case"hcl":{let i,a,[o,s,l,u]=t.hcl,[c,h,p,f]=r.hcl;if(isNaN(o)||isNaN(c))isNaN(o)?isNaN(c)?i=NaN:(i=c,(1===l||0===l)&&(a=h)):(i=o,(1===p||0===p)&&(a=s));else{let e=c-o;c>o&&e>180?e-=360:c<o&&o-c>180&&(e+=360),i=o+n*e}let[d,y,m,g]=rn([i,a??fn(s,h,n),fn(l,p,n),fn(u,f,n)]);return new e(d,y,m,g,!1)}case"lab":{let[i,a,o,s]=Jr(dn(t.lab,r.lab,n));return new e(i,a,o,s,!1)}}}},s.black=new s(0,0,0,1),s.white=new s(1,1,1,1),s.transparent=new s(0,0,0,0),s.red=new s(1,0,0,1),s);const gn=["bottom","center","top"];var xn=class{constructor(e,t,r,n,i,a){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i,this.verticalAlign=a}},bn=class e{constructor(e){this.sections=e}static fromString(t){return new e([new xn(t,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(t){return t instanceof e?t:e.fromString(t)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}},vn=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if("number"==typeof t)return new e([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(let e of t)if("number"!=typeof e)return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new e(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n){return new e(dn(t.values,r.values,n))}},wn=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if("number"==typeof t)return new e([t]);if(Array.isArray(t)){for(let e of t)if("number"!=typeof e)return;return new e(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n){return new e(dn(t.values,r.values,n))}},_n=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if("string"==typeof t){let r=mn.parse(t);return r?new e([r]):void 0}if(!Array.isArray(t))return;let r=[];for(let e of t){if("string"!=typeof e)return;let t=mn.parse(e);if(!t)return;r.push(t)}return new e(r)}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n,i="rgb"){let a=[];if(t.values.length!=r.values.length)throw Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${r.values.length}), cannot interpolate.`);for(let e=0;e<t.values.length;e++)a.push(mn.interpolate(t.values[e],r.values[e],n,i));return new e(a)}}
1178,An=class extends Error{constructor(e,t){super(e),this.name="RuntimeError",this.path=t}toJSON(){return this.message}};const Dn=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);var Sn=class e{constructor(e){this.values=e.slice()}static parse(t){if(t instanceof e)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let e=0;e<t.length;e+=2){let r=t[e],n=t[e+1];if("string"!=typeof r||!Dn.has(r)||!Array.isArray(n)||2!==n.length||"number"!=typeof n[0]||"number"!=typeof n[1])return}return new e(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,r,n,i){let a=t.values,o=r.values;if(a.length!==o.length)throw new An(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${r.toString()}`,i);let s=[];for(let e=0;e<a.length;e+=2){if(a[e]!==o[e])throw new An(`Cannot interpolate values containing mismatched anchors. from[${e}]: ${a[e]}, to[${e}]: ${o[e]}`,i);s.push(a[e]);let[t,r]=a[e+1],[l,u]=o[e+1];s.push([fn(t,l,n),fn(r,u,n)])}return new e(s)}},En=class e{constructor(e){this.name=e.name,this.available=e.available}toString(){return this.name}static fromString(t){return t?new e({name:t,available:!1}):null}},Fn=class e{constructor(e,t,r){this.from=e,this.to=t,this.transition=r}toString(){return this.from===this.to&&1===this.transition?this.from:JSON.stringify([this.from,this.to,this.transition])}static interpolate(t,r,n){return new e(t,r,n)}static parse(t){return t instanceof e?t:Array.isArray(t)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]?new e(t[0],t[1],t[2]):"object"==typeof t&&"string"==typeof t.from&&"string"==typeof t.to&&"number"==typeof t.transition?new e(t.from,t.to,t.transition):"string"==typeof t?new e(t,t,1):void 0}},Pn=class{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};function kn(e,t,r,n){return"number"==typeof e&&e>=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Tn(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof Fn||e instanceof mn||e instanceof Pn||e instanceof bn||e instanceof vn||e instanceof wn||e instanceof _n||e instanceof Sn||e instanceof En)return!0;if(Array.isArray(e)){for(let t of e)if(!Tn(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!Tn(e[t]))return!1;return!0}return!1}function Mn(e){if(null===e)return br;if("string"==typeof e)return wr;if("boolean"==typeof e)return _r;if("number"==typeof e)return vr;if(e instanceof mn)return Ar;if(e instanceof Fn)return Dr;if(e instanceof Pn)return Pr;if(e instanceof bn)return kr;if(e instanceof vn)return Tr;if(e instanceof wn)return Ir;if(e instanceof _n)return Mr;if(e instanceof Sn)return Or;if(e instanceof En)return Cr;if(Array.isArray(e)){let t,r=e.length;for(let r of e){let e=Mn(r);if(t){if(t===e)continue;t=Er;break}t=e}return Br(t||Er,r)}return Sr}function In(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof mn||e instanceof Fn||e instanceof bn||e instanceof vn||e instanceof wn||e instanceof _n||e instanceof Sn||e instanceof En?e.toString():JSON.stringify(e)}var Cn=class e{constructor(e,t){this.type=e,this.value=t}static parse(t,r){if(2!==t.length)return r.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Tn(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let n=t[1],i=Mn(n),a=r.expectedType;return"array"===i.kind&&0===i.N&&a&&"array"===a.kind&&("number"!=typeof a.N||0===a.N)&&(i=a),new e(i,n)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}};const On=["Unknown","Point","LineString","Polygon"];var Bn=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?On[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache.get(e);return t||(t=mn.parse(e),this._parseColorCache.set(e,t)),t}};function zn(e,t,r){let n,i,a=e.length-1,o=0,s=a,l=0;for(;o<=s;)if(l=Math.floor((o+s)/2),n=e[l],i=e[l+1],n<=t){if(l===a||t<i)return l;o=l+1}else{if(!(n>t))throw new An("Input is not a number.",r);s=l-1}return 0}var Vn=class e{constructor(e,t,r,n){this.type=e,this.input=t,this.key=n,this.labels=[],this.outputs=[];for(let[e,t]of r)this.labels.push(e),this.outputs.push(t)}static parse(t,r){if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");let n=r.parse(t[1],1,vr);if(!n)return null;let i=[],a=null;r.expectedType&&"value"!==r.expectedType.kind&&(a=r.expectedType);for(let e=1;e<t.length;e+=2){let n=1===e?-1/0:t[e],o=t[e+1],s=e,l=e+1;
1178if("number"!=typeof n)return r.error("Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.",s);if(i.length&&i[i.length-1][0]>=n)return r.error("Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.",s);let u=r.parse(o,l,a);if(!u)return null;a||=u.type,i.push([n,u])}return new e(a,n,i,r.key)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[zn(t,n,this.key)].evaluate(e)}eachChild(e){e(this.input);for(let t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function Ln(e,t,r,n){let i=3*e,a=3*(r-e)-i,o=1-i-a,s=3*t,l=3*(n-t)-s,u=1-s-l;return function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let r=e;for(let n=0;n<8;n++){let n=((o*r+a)*r+i)*r-e;if(Math.abs(n)<t)return((u*r+l)*r+s)*r;let c=(3*o*r+2*a)*r+i;if(Math.abs(c)<1e-6)break;r-=n/c}let n=0,c=1;r=e;for(let s=0;s<20;s++){let s=((o*r+a)*r+i)*r;if(Math.abs(s-e)<t)break;e>s?n=r:c=r,r=.5*(n+c)}return((u*r+l)*r+s)*r}}var $n=class e{constructor(e,t,r,n,i,a){this.type=e,this.operator=t,this.interpolation=r,this.input=n,this.key=a,this.labels=[],this.outputs=[];for(let[e,t]of i)this.labels.push(e),this.outputs.push(t)}static interpolationFactor(e,t,r,n){let i=0;if("exponential"===e.name)i=jn(t,e.base,r,n);else if("linear"===e.name)i=jn(t,1,r,n);else if("cubic-bezier"===e.name){let a=e.controlPoints;i=Ln(a[0],a[1],a[2],a[3])(jn(t,1,r,n))}return i}static parse(t,r){let[n,i,a,...o]=t;if(!Array.isArray(i)||0===i.length)return r.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){let e=i[1];if("number"!=typeof e)return r.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return r.error(`Unknown interpolation type ${String(i[0])}`,1,0);{let e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}}if(t.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(a=r.parse(a,2,vr),!a)return null;let s=[],l=null;"interpolate-hcl"!==n&&"interpolate-lab"!==n||r.expectedType==Mr?r.expectedType&&"value"!==r.expectedType.kind&&(l=r.expectedType):l=Ar;for(let e=0;e<o.length;e+=2){let t=o[e],n=o[e+1],i=e+3,a=e+4;if("number"!=typeof t)return r.error("Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.",i);if(s.length&&s[s.length-1][0]>=t)return r.error("Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.",i);let u=r.parse(n,a,l);if(!u)return null;l||=u.type,s.push([t,u])}return Rr(l,vr)||Rr(l,Dr)||Rr(l,Ar)||Rr(l,Tr)||Rr(l,Ir)||Rr(l,Mr)||Rr(l,Or)||Rr(l,Br(vr))?new e(l,n,i,a,s,r.key):r.error(`Type ${zr(l)} is not interpolatable.`)}evaluate(t){let r=this.labels,n=this.outputs;if(1===r.length)return n[0].evaluate(t);let i=this.input.evaluate(t);if(i<=r[0])return n[0].evaluate(t);let a=r.length;if(i>=r[a-1])return n[a-1].evaluate(t);let o=zn(r,i,this.key),s=r[o],l=r[o+1],u=e.interpolationFactor(this.interpolation,i,s,l),c=n[o].evaluate(t),h=n[o+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return fn(c,h,u);case"color":return mn.interpolate(c,h,u);case"padding":return vn.interpolate(c,h,u);case"colorArray":return _n.interpolate(c,h,u);case"numberArray":return wn.interpolate(c,h,u);case"variableAnchorOffsetCollection":return Sn.interpolate(c,h,u,this.key);case"array":return dn(c,h,u);case"projectionDefinition":return Fn.interpolate(c,h,u)}case"interpolate-hcl":switch(this.type.kind){case"color":return mn.interpolate(c,h,u,"hcl");case"colorArray":return _n.interpolate(c,h,u,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return mn.interpolate(c,h,u,"lab");case"colorArray":return _n.interpolate(c,h,u,"lab")}}}eachChild(e){e(this.input);for(let t of this.outputs)e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}};function jn(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(t**+a-1)/(t**+i-1)}const Rn={color:mn.interpolate,number:fn,padding:vn.interpolate,numberArray:wn.interpolate,colorArray:_n.interpolate,variableAnchorOffsetCollection:Sn.interpolate,array:dn};var Nn=class e{constructor(e){this.type=kr,this.sections=e}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=t[1];if(!Array.isArray(n)&&"object"==typeof n)return r.error("First argument must be an image or text section.");let i=[],a=!1;for(let e=1;e<=t.length-1;++e){let n=t[e];if(a&&"object"==typeof n&&!Array.isArray(n)){a=!1;let e=null;if(n["font-scale"]&&(e=r.parse(n["font-scale"],1,vr),!e))return null;let t=null;if(n["text-font"]&&(t=r.parse(n["text-font"],1,Br(wr)),!t))return null;let o=null;if(n["text-color"]&&(o=r.parse(n["text-color"],1,Ar),!o))return null;let s=null;if(n["vertical-align"]){if("string"==typeof n["vertical-align"]&&!gn.includes(n["vertical-align"]))return r.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${n["vertical-align"]}' instead.`);if(s=r.parse(n["vertical-align"],1,wr),!s)return null}let l=i[i.length-1];l.scale=e,l.font=t,l.textColor=o,l.verticalAlign=s}else{let n=r.parse(t[e],1,Er);if(!n)return null;let o=n.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");a=!0,i.push({content:n,scale:null,font:null,textColor:null,verticalAlign:null})}}return new e(i)}evaluate(e){return new bn(this.sections.map(t=>{let r=t.content.evaluate(e);return Mn(r)===Cr?new xn("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new xn(In(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}};function Un(e,t,r=0,n=e.length-1,i=Gn){for(;n>r;){if(n-r>600){let a=n-r+1,o=t-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);Un(e,t,Math.max(r,Math.floor(t-o*l/a+u)),Math.min(n,Math.floor(t+(a-o)*l/a+u)),i)}let a=e[t],o=r,s=n;for(qn(e,r,t),i(e[n],a)>0&&qn(e,r,n);o<s;){for(qn(e,o,s),o++,s--;i(e[o],a)<0;)o++;for(;i(e[s],a)>0;)s--}0===i(e[r],a)?qn(e,r,s):(s++,qn(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}}function qn(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Gn(e,t){return e<t?-1:+(e>t)}function Yn(e,t){if(e.length<=1)return[e];let r,n,i=[];for(let t of e){let e=Zn(t);0!==e&&(t.area=Math.abs(e),void 0===n&&(n=e<0),n===e<0?(r&&i.push(r),r=[t]):r.push(t))}if(r&&i.push(r),t>1)for(let e=0;e<i.length;e++)i[e].length<=t||(Un(i[e],t,1,i[e].length-1,Xn),i[e]=i[e].slice(0,t));return i}function Xn(e,t){return t.area-e.area}function Zn(e){let t=0;for(let r,n,i=0,a=e.length,o=a-1;i<a;o=i++)r=e[i],n=e[o],t+=(n.x-r.x)*(r.y+n.y);return t}const Wn={string:wr,number:vr,boolean:_r,object:Sr};var Hn=class e{constructor(e,t,r){this.type=e,this.args=t,this.key=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n,i=1,a=t[0];if("array"===a){let e,a;if(t.length>2){let n=t[1];if("string"!=typeof n||!(n in Wn)||"object"===n)return r.error("The item type argument of \"array\" must be one of string, number, boolean",1);e=Wn[n],i++}else e=Er;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return r.error("The length argument to \"array\" must be a positive integer literal",2);a=t[2],i++}n=Br(e,a)}else{if(!Wn[a])throw Error(`Types doesn't contain name = ${a}`);n=Wn[a]}let o=[];for(;i<t.length;i++){let e=r.parse(t[i],i,Er);
vendor: 4,874 bytes, line 1178
1178if(!e)return null;o.push(e)}return new e(n,o,r.key)}evaluate(e){for(let t=0;t<this.args.length;t++){let r=this.args[t].evaluate(e);if(!Lr(this.type,Mn(r)))return r;if(t===this.args.length-1)throw new An(`Expected value to be of type ${zr(this.type)}, but found ${zr(Mn(r))} instead.`,this.key)}throw Error()}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};const Kn={"to-boolean":_r,"to-color":Ar,"to-number":vr,"to-string":wr};var Jn=class e{constructor(e,t,r){this.type=e,this.args=t,this.key=r}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=t[0];if(!Kn[n])throw Error(`Can't parse ${n} as it is not part of the known types`);if(("to-boolean"===n||"to-string"===n)&&2!==t.length)return r.error("Expected one argument.");let i=Kn[n],a=[];for(let e=1;e<t.length;e++){let n=r.parse(t[e],e,Er);if(!n)return null;a.push(n)}return new e(i,a,r.key)}evaluate(e){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(e);case"color":{let t,r;for(let n of this.args){if(t=n.evaluate(e),r=null,t instanceof mn)return t;if("string"==typeof t){let r=e.parseColor(t);if(r)return r}else if(Array.isArray(t)&&(r=t.length<3||t.length>4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:kn(t[0],t[1],t[2],t[3]),!r))return new mn(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new An(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let n=vn.parse(t);if(n)return n}throw new An(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let n=wn.parse(t);if(n)return n}throw new An(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let n=_n.parse(t);if(n)return n}throw new An(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let n=Sn.parse(t);if(n)return n}throw new An(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}case"number":{let t=null;for(let r of this.args){if(t=r.evaluate(e),null===t)return 0;let n=Number(t);if(!isNaN(n))return n}throw new An(`Could not convert ${JSON.stringify(t)} to number.`,this.key)}case"formatted":return bn.fromString(In(this.args[0].evaluate(e)));case"resolvedImage":return En.fromString(In(this.args[0].evaluate(e)));case"projectionDefinition":{let t=this.args[0].evaluate(e);if(Fn.parse(t))return t;throw new An(`Could not parse projectionDefinition from value '${"string"==typeof t?t:JSON.stringify(t)}'`,this.key)}default:return In(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}},Qn=class e{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);let n=[];for(let e=1;e<t.length-1;e+=2){let i=t[e];if("string"!=typeof i)return r.error(`Expected string, but found ${typeof i} instead.`,e);if(/[^a-zA-Z0-9_]/.test(i))return r.error("Variable names must contain only alphanumeric characters or '_'.",e);let a=r.parse(t[e+1],e+1);if(!a)return null;n.push([i,a])}let i=r.parse(t[t.length-1],t.length-1,r.expectedType,n);return i?new e(n,i):null}outputDefined(){return this.result.outputDefined()}},ei=class e{constructor(e,t){this.type=t.type,this.name=e,this.boundExpression=t}static parse(t,r){if(2!==t.length||"string"!=typeof t[1])return r.error("'var' expression requires exactly one string literal argument.");let n=t[1];return r.scope.has(n)?new e(n,r.scope.get(n)):r.error(`Unknown variable "${n}". Make sure "${n}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(e){return this.boundExpression.evaluate(e)}eachChild(){}outputDefined(){return!1}},ti=class e{constructor(e,t){this.type=e,this.args=t}static parse(t,r){if(t.length<2)return r.error("Expected at least one argument.");let n=null,i=r.expectedType;i&&"value"!==i.kind&&(n=i);let a=[];for(let e of t.slice(1)){let t=r.parse(e,1+a.length,n,void 0,{typeAnnotation:"omit"});if(!t)return null;n||=t.type,a.push(t)}if(!n)throw Error("No output type");return i&&a.some(e=>Lr(i,e.type))?new e(Er,a):new e(n,a)}evaluate(e){let t,r=null,n=0;for(let i of this.args)if(n++,r=i.evaluate(e),r&&r instanceof En&&!r.available&&(t||=r.name,r=null,n===this.args.length&&(r=t)),null!==r)break;return r}
1178eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}};function ri(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function ni(e,t,r,n){return 0===n.compare(t,r)}function ii(e,t,r){let n="=="!==e&&"!="!==e;return class i{constructor(e,t,r,n){this.lhs=e,this.rhs=t,this.key=r,this.collator=n,this.type=_r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,Er);if(!a)return null;if(!ri(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${zr(a.type)}'.`);let o=t.parse(e[2],2,Er);if(!o)return null;if(!ri(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${zr(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${zr(a.type)}' and '${zr(o.type)}'.`);n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new Hn(o.type,[a],t.key):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new Hn(a.type,[o],t.key)));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(s=t.parse(e[3],3,Pr),!s)return null}return new i(a,o,t.key,s)}evaluate(i){let a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){let t=Mn(a),r=Mn(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new An(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`,this.key)}if(this.collator&&!n&&this.hasUntypedArgument){let e=Mn(a),r=Mn(o);if("string"!==e.kind||"string"!==r.kind)return t(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):t(i,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}const ai=ii("==",function(e,t,r){return t===r},ni),oi=ii("!=",function(e,t,r){return t!==r},function(e,t,r,n){return!ni(0,t,r,n)}),si=ii("<",function(e,t,r){return t<r},function(e,t,r,n){return n.compare(t,r)<0}),li=ii(">",function(e,t,r){return t>r},function(e,t,r,n){return n.compare(t,r)>0}),ui=ii("<=",function(e,t,r){return t<=r},function(e,t,r,n){return n.compare(t,r)<=0}),ci=ii(">=",function(e,t,r){return t>=r},function(e,t,r,n){return n.compare(t,r)>=0});var hi=class e{constructor(e,t,r){this.type=Pr,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(t,r){if(2!==t.length)return r.error("Expected one argument.");let n=t[1];if("object"!=typeof n||Array.isArray(n))return r.error("Collator options argument must be an object.");let i=r.parse(void 0!==n["case-sensitive"]&&n["case-sensitive"],1,_r);if(!i)return null;let a=r.parse(void 0!==n["diacritic-sensitive"]&&n["diacritic-sensitive"],1,_r);if(!a)return null;let o=null;return n.locale&&(o=r.parse(n.locale,1,wr),!o)?null:new e(i,a,o)}evaluate(e){return new Pn(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}};const pi=8192;function fi(e,t){let r=yi(e[0]),n=gi(e[1]),i=2**t.z;return[Math.round(r*i*pi),Math.round(n*i*pi)]}function di(e,t){let r=2**t.z,n=(e[0]/pi+t.x)/r,i=(e[1]/pi+t.y)/r;return[mi(n),xi(i)]}function yi(e){return(180+e)/360}function mi(e){return 360*e-180}function gi(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function xi(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function bi(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function vi(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function wi(e,t,r){return t[1]>e[1]!=r[1]>e[1]&&e[0]<(r[0]-t[0])*(e[1]-t[1])/(r[1]-t[1])+t[0]}function _i(e,t,r){let n=e[0]-t[0],i=e[1]-t[1],a=e[0]-r[0],o=e[1]-r[1];return n*o-a*i===0&&n*a<=0&&i*o<=0}function Ai(e,t,r,n){let i=[t[0]-e[0],t[1]-e[1]];return 0!==ki([n[0]-r[0],n[1]-r[1]],i)&&!(!Ti(e,t,r,n)||!Ti(r,n,e,t))}function Di(e,t,r){for(let n of r)for(let r=0;r<n.length-1;++r)if(Ai(e,t,n[r],n[r+1]))return!0;return!1}function Si(e,t,r=!1){let n=!1;for(let i of t)for(let t=0;t<i.length-1;t++){if(_i(e,i[t],i[t+1]))return r;wi(e,i[t],i[t+1])&&(n=!n)}return n}function Ei(e,t){for(let r of t)if(Si(e,r))return!0;return!1}function Fi(e,t){for(let r of e)if(!Si(r,t))return!1;for(let r=0;r<e.length-1;++r)if(Di(e[r],e[r+1],t))return!1;return!0}function Pi(e,t){for(let r of t)if(Fi(e,r))return!0;return!1}function ki(e,t){return e[0]*t[1]-e[1]*t[0]}function Ti(e,t,r,n){let i=e[0]-r[0],a=e[1]-r[1],o=t[0]-r[0],s=t[1]-r[1],l=n[0]-r[0],u=n[1]-r[1],c=i*u-l*a,h=o*u-l*s;return c>0&&h<0||c<0&&h>0}function Mi(e,t,r){let n=[];for(let i=0;i<e.length;i++){let a=[];for(let n=0;n<e[i].length;n++){let o=fi(e[i][n],r);bi(t,o),a.push(o)}n.push(a)}return n}function Ii(e,t,r){let n=[];for(let i=0;i<e.length;i++){let a=Mi(e[i],t,r);n.push(a)}return n}function Ci(e,t,r,n){if(e[0]<r[0]||e[0]>r[2]){let t=.5*n,i=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===i&&(i=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=i}bi(t,e)}function Oi(e){e[0]=e[1]=1/0,e[2]=e[3]=-1/0}function Bi(e,t,r,n){let i=2**n.z*pi,a=[n.x*pi,n.y*pi],o=[];for(let n of e)for(let e of n){let n=[e.x+a[0],e.y+a[1]];Ci(n,t,r,i),o.push(n)}return o}function zi(e,t,r,n){let i=2**n.z*pi,a=[n.x*pi,n.y*pi],o=[];for(let r of e){let e=[];for(let n of r){let r=[n.x+a[0],n.y+a[1]];bi(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=i/2){Oi(t);for(let e of o)for(let n of e)Ci(n,t,r,i)}return o}function Vi(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=Mi(t.coordinates,n,i),o=Bi(e.geometry(),r,n,i);if(!vi(r,n))return!1;for(let e of o)if(!Si(e,a))return!1}if("MultiPolygon"===t.type){let a=Ii(t.coordinates,n,i),o=Bi(e.geometry(),r,n,i);if(!vi(r,n))return!1;for(let e of o)if(!Ei(e,a))return!1}return!0}function Li(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=Mi(t.coordinates,n,i),o=zi(e.geometry(),r,n,i);if(!vi(r,n))return!1;for(let e of o)if(!Fi(e,a))return!1}if("MultiPolygon"===t.type){let a=Ii(t.coordinates,n,i),o=zi(e.geometry(),r,n,i);if(!vi(r,n))return!1;for(let e of o)if(!Pi(e,a))return!1}return!0}var $i=class e{constructor(e,t){this.type=_r,this.geojson=e,this.geometries=t}static parse(t,r){if(2!==t.length)return r.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Tn(t[1])){let r=t[1];if("FeatureCollection"===r.type){let t=[];for(let e of r.features){let{type:r,coordinates:n}=e.geometry;"Polygon"===r&&t.push(n),"MultiPolygon"===r&&t.push(...n)}if(t.length)return new e(r,{type:"MultiPolygon",coordinates:t})}else if("Feature"===r.type){let t=r.geometry.type;if("Polygon"===t||"MultiPolygon"===t)return new e(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new e(r,r)}return r.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return Vi(e,this.geometries);if("LineString"===e.geometryType())return Li(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},ji=class{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e<n;){let n=1+(e<<1),a=n+1;if(a<this.length&&r(t[a],t[n])<0&&(n=a),r(t[n],i)>=0)break;t[e]=t[n],e=n}t[e]=i}};const Ri=Math.PI/180;var Ni=class{constructor(e){let t=6378.137*Ri*1e3,r=Math.cos(e*Ri),n=1/(1-.0066943799901413165*(1-r*r)),i=Math.sqrt(n);this.kx=t*i*r,this.ky=t*i*n*.9933056200098587}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,n=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+n*n)}pointOnLine(e,t){let r,n,i,a,o=1/0;for(let s=0;s<e.length-1;s++){let l=e[s][0],u=e[s][1],c=this.wrap(e[s+1][0]-l)*this.kx,h=(e[s+1][1]-u)*this.ky,p=0;
1178(0!==c||0!==h)&&(p=(this.wrap(t[0]-l)*this.kx*c+(t[1]-u)*this.ky*h)/(c*c+h*h),p>1?(l=e[s+1][0],u=e[s+1][1]):p>0&&(l+=c/this.kx*p,u+=h/this.ky*p)),c=this.wrap(t[0]-l)*this.kx,h=(t[1]-u)*this.ky;let f=c*c+h*h;f<o&&(o=f,r=l,n=u,i=s,a=p)}return{point:[r,n],index:i,t:Math.max(0,Math.min(1,a))}}wrap(e){for(;e<-180;)e+=360;for(;e>180;)e-=360;return e}};function Ui(e,t){return t[0]-e[0]}function qi(e){return e[1]-e[0]+1}function Gi(e,t){return e[1]>=e[0]&&e[1]<t}function Yi(e,t){if(e[0]>e[1])return[null,null];let r=qi(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let n=Math.floor(r/2)-1;return[[e[0],e[0]+n],[e[0]+n+1,e[1]]]}function Xi(e,t){if(!Gi(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)bi(r,e[n]);return r}function Zi(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)bi(t,e);return t}function Wi(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function Hi(e,t,r){if(!Wi(e)||!Wi(t))return NaN;let n=0,i=0;return e[2]<t[0]&&(n=t[0]-e[2]),e[0]>t[2]&&(n=e[0]-t[2]),e[1]>t[3]&&(i=e[1]-t[3]),e[3]<t[1]&&(i=t[1]-e[3]),r.distance([0,0],[n,i])}function Ki(e,t,r){let n=r.pointOnLine(t,e);return r.distance(e,n.point)}function Ji(e,t,r,n,i){let a=Math.min(Ki(e,[r,n],i),Ki(t,[r,n],i)),o=Math.min(Ki(r,[e,t],i),Ki(n,[e,t],i));return Math.min(a,o)}function Qi(e,t,r,n,i){if(!Gi(t,e.length)||!Gi(n,r.length))return 1/0;let a=1/0;for(let o=t[0];o<t[1];++o){let t=e[o],s=e[o+1];for(let e=n[0];e<n[1];++e){let n=r[e],o=r[e+1];if(Ai(t,s,n,o))return 0;a=Math.min(a,Ji(t,s,n,o,i))}}return a}function ea(e,t,r,n,i){if(!Gi(t,e.length)||!Gi(n,r.length))return NaN;let a=1/0;for(let o=t[0];o<=t[1];++o)for(let t=n[0];t<=n[1];++t)if(a=Math.min(a,i.distance(e[o],r[t])),0===a)return a;return a}function ta(e,t,r){if(Si(e,t,!0))return 0;let n=1/0;for(let i of t){let t=i[0],a=i[i.length-1];if(t!==a&&(n=Math.min(n,Ki(e,[a,t],r)),0===n))return n;let o=r.pointOnLine(i,e);if(n=Math.min(n,r.distance(e,o.point)),0===n)return n}return n}function ra(e,t,r,n){if(!Gi(t,e.length))return NaN;for(let n=t[0];n<=t[1];++n)if(Si(e[n],r,!0))return 0;let i=1/0;for(let a=t[0];a<t[1];++a){let t=e[a],o=e[a+1];for(let e of r)for(let r=0,a=e.length,s=a-1;r<a;s=r++){let a=e[s],l=e[r];if(Ai(t,o,a,l))return 0;i=Math.min(i,Ji(t,o,a,l,n))}}return i}function na(e,t){for(let r of e)for(let e of r)if(Si(e,t,!0))return!0;return!1}function ia(e,t,r,n=1/0){let i=Zi(e),a=Zi(t);if(n!==1/0&&Hi(i,a,r)>=n)return n;if(vi(i,a)){if(na(e,t))return 0}else if(na(t,e))return 0;let o=1/0;for(let n of e)for(let e=0,i=n.length,a=i-1;e<i;a=e++){let i=n[a],s=n[e];for(let e of t)for(let t=0,n=e.length,a=n-1;t<n;a=t++){let n=e[a],l=e[t];if(Ai(i,s,n,l))return 0;o=Math.min(o,Ji(i,s,n,l,r))}}return o}function aa(e,t,r,n,i,a){if(!a)return;let o=Hi(Xi(n,a),i,r);o<t&&e.push([o,a,[0,0]])}function oa(e,t,r,n,i,a,o){if(!a||!o)return;let s=Hi(Xi(n,a),Xi(i,o),r);s<t&&e.push([s,a,o])}function sa(e,t,r,n,i=1/0){let a=Math.min(n.distance(e[0],r[0][0]),i);if(0===a)return a;let o=new ji([[0,[0,e.length-1],[0,0]]],Ui),s=Zi(r);for(;o.length>0;){let i=o.pop();if(i[0]>=a)continue;let l=i[1],u=t?50:100;if(qi(l)<=u){if(!Gi(l,e.length))return NaN;if(t){let t=ra(e,l,r,n);if(isNaN(t)||0===t)return t;a=Math.min(a,t)}else for(let t=l[0];t<=l[1];++t){let i=ta(e[t],r,n);if(a=Math.min(a,i),0===a)return 0}}else{let r=Yi(l,t);aa(o,a,n,e,s,r[0]),aa(o,a,n,e,s,r[1])}}return a}function la(e,t,r,n,i,a=1/0){let o=Math.min(a,i.distance(e[0],r[0]));if(0===o)return o;let s=new ji([[0,[0,e.length-1],[0,r.length-1]]],Ui);for(;s.length>0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],u=a[2],c=t?50:100,h=n?50:100;if(qi(l)<=c&&qi(u)<=h){if(!Gi(l,e.length)&&Gi(u,r.length))return NaN;let a;if(t&&n)a=Qi(e,l,r,u,i),o=Math.min(o,a);else if(t&&!n){let t=e.slice(l[0],l[1]+1);for(let e=u[0];e<=u[1];++e)if(a=Ki(r[e],t,i),o=Math.min(o,a),0===o)return o}else if(!t&&n){let t=r.slice(u[0],u[1]+1);for(let r=l[0];r<=l[1];++r)if(a=Ki(e[r],t,i),o=Math.min(o,a),0===o)return o}else a=ea(e,l,r,u,i),o=Math.min(o,a)}else{let a=Yi(l,t),c=Yi(u,n);oa(s,o,i,e,r,a[0],c[0]),oa(s,o,i,e,r,a[0],c[1]),oa(s,o,i,e,r,a[1],c[0]),oa(s,o,i,e,r,a[1],c[1])}}return o}function ua(e,t){let r=e.geometry(),n=r.flat().map(t=>di([t.x,t.y],e.canonical));if(0===r.length)return NaN;let i=new Ni(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,la(n,!1,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,la(n,!1,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,sa(n,!1,e.coordinates,i,a))}if(0===a)return a}return a}function ca(e,t){let r=e.geometry(),n=r.flat().map(t=>di([t.x,t.y],e.canonical));if(0===r.length)return NaN;let i=new Ni(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,la(n,!0,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,la(n,!0,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,sa(n,!0,e.coordinates,i,a))}if(0===a)return a}return a}function ha(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let n=Yn(r,0).map(t=>t.map(t=>t.map(t=>di([t.x,t.y],e.canonical)))),i=new Ni(n[0][0][0][1]),a=1/0;for(let e of t)for(let t of n){switch(e.type){case"Point":a=Math.min(a,sa([e.coordinates],!1,t,i,a));break;case"LineString":a=Math.min(a,sa(e.coordinates,!0,t,i,a));break;case"Polygon":a=Math.min(a,ia(t,e.coordinates,i,a))}if(0===a)return a}return a}function pa(e){return"MultiPolygon"===e.type?e.coordinates.map(e=>({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}var fa=class e{constructor(e,t){this.type=vr,this.geojson=e,this.geometries=t}static parse(t,r){if(2!==t.length)return r.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Tn(t[1])){let r=t[1];if("FeatureCollection"===r.type)return new e(r,r.features.map(e=>pa(e.geometry)).flat());if("Feature"===r.type)return new e(r,pa(r.geometry));if("type"in r&&"coordinates"in r)return new e(r,pa(r))}return r.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return ua(e,this.geometries);if("LineString"===e.geometryType())return ca(e,this.geometries);if("Polygon"===e.geometryType())return ha(e,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},da=class e{constructor(e){this.key=e,this.type=Er}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=t[1];return null==n?r.error("Global state property must be defined."):"str
1178ing"==typeof n?new e(n):r.error(`Global state property must be string, but found ${typeof t[1]} instead.`)}evaluate(e){let t=e.globals?.globalState;return t&&0!==Object.keys(t).length?on(t,this.key)??null:null}eachChild(){}outputDefined(){return!1}};const ya={"==":ai,"!=":oi,">":li,"<":si,">=":ci,"<=":ui,array:Hn,at:class e{constructor(e,t,r,n){this.type=e,this.index=t,this.input=r,this.key=n}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,vr),i=r.parse(t[2],2,Br(r.expectedType||Er));if(!n||!i)return null;let a=i.type;return new e(a.itemType,n,i,r.key)}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new An(`Array index out of bounds: ${t} < 0.`,this.key);if(t>=r.length)throw new An(`Array index out of bounds: ${t} > ${r.length-1}.`,this.key);if(t!==Math.floor(t))throw new An(`Array index must be an integer, but found ${t} instead.`,this.key);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},boolean:Hn,case:class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");let n;r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let i=[];for(let e=1;e<t.length-1;e+=2){let a=r.parse(t[e],e,_r);if(!a)return null;let o=r.parse(t[e+1],e+1,n);if(!o)return null;i.push([a,o]),n||=o.type}let a=r.parse(t[t.length-1],t.length-1,n);if(!a)return null;if(!n)throw Error("Can't infer output type");return new e(n,i,a)}evaluate(e){for(let[t,r]of this.branches)if(t.evaluate(e))return r.evaluate(e);return this.otherwise.evaluate(e)}eachChild(e){for(let[t,r]of this.branches)e(t),e(r);e(this.otherwise)}outputDefined(){return this.branches.every(([e,t])=>t.outputDefined())&&this.otherwise.outputDefined()}},coalesce:ti,collator:hi,format:Nn,image:class e{constructor(e){this.type=Cr,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let n=r.parse(t[1],1,wr);return n?new e(n):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=En.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},in:class e{constructor(e,t,r){this.needle=e,this.haystack=t,this.key=r,this.type=_r}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,Er),i=r.parse(t[2],2,Er);return n&&i?$r(n.type,[_r,wr,vr,br,Er])?new e(n,i,r.key):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${zr(n.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!jr(t,["boolean","string","number","null"]))throw new An(`Expected first argument to be of type boolean, string, number or null, but found ${zr(Mn(t))} instead.`,this.key);if(!jr(r,["string","array"]))throw new An(`Expected second argument to be of type array or string, but found ${zr(Mn(r))} instead.`,this.key);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},"index-of":class e{constructor(e,t,r,n){this.needle=e,this.haystack=t,this.key=r,this.fromIndex=n,this.type=vr}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,Er),i=r.parse(t[2],2,Er);if(!n||!i)return null;if(!$r(n.type,[_r,wr,vr,br,Er]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${zr(n.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,vr);return a?new e(n,i,r.key,a):null}return new e(n,i,r.key)}evaluate(e){let t,r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!jr(r,["boolean","string","number","null"]))throw new An(`Expected first argument to be of type boolean, string, number or null, but found ${zr(Mn(r))} instead.`,this.key);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),jr(n,["string"])){let e=n.indexOf(r,t);return-1===e?-1:[...n.slice(0,e)].length}if(jr(n,["array"]))return n.indexOf(r,t);throw new An(`Expected second argument to be of type array or string, but found ${zr(Mn(n))} instead.`,this.key)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},interpolate:$n,"interpolate-hcl":$n,"interpolate-lab":$n,length:class e{constructor(e,t){this.input=e,this.key=t,this.type=vr}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=r.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?r.error(`Expected argument of type string or array, but found ${zr(n.type)} instead.`):new e(n,r.key):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new An(`Expected value to be of type string or array, but found ${zr(Mn(t))} instead.`,this.key)}eachChild(e){e(this.input)}outputDefined(){return!1}},let:Qn,literal:Cn,match:class e{constructor(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(t,r){if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");let n,i;r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let a={},o=[];for(let e=2;e<t.length-1;e+=2){let s=t[e],l=t[e+1];Array.isArray(s)||(s=[s]);let u=r.concat(e);
1178if(0===s.length)return u.error("Expected at least one branch label.");for(let e of s){if("number"!=typeof e&&"string"!=typeof e)return u.error("Branch labels must be numbers or strings.");if("number"==typeof e&&Math.abs(e)>9007199254740991)return u.error("Branch labels must be integers no larger than 9007199254740991.");if("number"==typeof e&&Math.floor(e)!==e)return u.error("Numeric branch labels must be integer values.");if(n){if(u.checkSubtype(n,Mn(e)))return null}else n=Mn(e);if(void 0!==a[String(e)])return u.error("Branch labels must be unique.");a[String(e)]=o.length}let c=r.parse(l,e,i);if(!c)return null;i||=c.type,o.push(c)}let s=r.parse(t[1],1,Er);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,i);return!l||"value"!==s.type.kind&&r.concat(1).checkSubtype(n,s.type)?null:new e(n,i,s,a,o,l)}evaluate(e){let t=this.input.evaluate(e);return(Mn(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},number:Hn,"number-format":class e{constructor(e,t,r,n,i,a){this.type=wr,this.number=e,this.locale=t,this.currency=r,this.unit=n,this.minFractionDigits=i,this.maxFractionDigits=a}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let n=r.parse(t[1],1,vr);if(!n)return null;let i=t[2];if("object"!=typeof i||Array.isArray(i))return r.error("NumberFormat options argument must be an object.");let a=null;if(i.locale&&(a=r.parse(i.locale,1,wr),!a))return null;let o=null;if(i.currency&&(o=r.parse(i.currency,1,wr),!o))return null;let s=null;if(i.unit&&(s=r.parse(i.unit,1,wr),!s))return null;if(o&&s)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(i["min-fraction-digits"]&&(l=r.parse(i["min-fraction-digits"],1,vr),!l))return null;let u=null;return i["max-fraction-digits"]&&(u=r.parse(i["max-fraction-digits"],1,vr),!u)?null:new e(n,a,o,s,l,u)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},object:Hn,semiliteral:class e{constructor(e){let t=null;for(let r of e){if(t){if(t===r.type)continue;t=Er;break}t=r.type}this.type=Br(t??Er,e.length),this.arr=e}static parse(t,r){if(2!==t.length)return r.error(`'semiliteral' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Tn(t[1]))return r.error(`invalid value of type "${typeof t[1]}"`);let n=t[1],i=Mn(n);if("array"===i.kind){let t=n.map(e=>r.parse(e,null,Er));return new e(t)}return new Cn(i,n)}evaluate(e){return this.arr.map(t=>t.evaluate(e))}eachChild(e){this.arr.forEach(e)}outputDefined(){return this.arr.every(e=>e.outputDefined())}},slice:class e{constructor(e,t,r,n,i){this.type=e,this.input=t,this.beginIndex=r,this.key=n,this.endIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,Er),i=r.parse(t[2],2,vr);if(!n||!i)return null;if(!$r(n.type,[Br(Er),wr,Er]))return r.error(`Expected first argument to be of type array or string, but found ${zr(n.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,vr);return a?new e(n.type,n,i,r.key,a):null}return new e(n.type,n,i,r.key)}evaluate(e){let t,r=this.input.evaluate(e),n=this.beginIndex.evaluate(e);if(this.endIndex&&(t=this.endIndex.evaluate(e)),jr(r,["string"]))return[...r].slice(n,t).join("");if(jr(r,["array"]))return r.slice(n,t);throw new An(`Expected first argument to be of type array or string, but found ${zr(Mn(r))} instead.`,this.key)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},step:Vn,string:Hn,"to-boolean":Jn,"to-color":Jn,"to-number":Jn,"to-string":Jn,var:ei,within:$i,distance:fa,"global-state":da};
1178var ma=class extends Error{constructor(e,t){super(t),this.message=t,this.key=e}},ga=class e{constructor(e,t=[]){this.parent=e,this.bindings={};for(let[e,r]of t)this.bindings[e]=r}concat(t){return new e(this,t)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}},xa=class e{constructor(e,t,r=[],n,i=new ga,a=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=i,this.errors=a,this.expectedType=n,this._isConstant=t}parse(e,t,r,n,i={}){return t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)}_parse(e,t){(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e)&&(e=["literal",e]);let r=this.key;function n(e,t,n){return"assert"===n?new Hn(t,[e],r):"coerce"===n?new Jn(t,[e],r):e}if(Array.isArray(e)){if(0===e.length)return this.error("Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].");let r=e[0];if("string"!=typeof r)return this.error(`Expression name must be a string, but found ${typeof r} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let i=this.registry[r];if(i){let r=i.parse(e,this);if(!r)return null;if(this.expectedType){let e=this.expectedType,i=r.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind){if("projectionDefinition"===e.kind&&["string","array","value"].includes(i.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(i.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(i.kind)||"colorArray"===e.kind&&["value","string","array"].includes(i.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(i.kind))r=n(r,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,i))return null}else r=n(r,e,t.typeAnnotation||"assert")}if(!(r instanceof Cn)&&"resolvedImage"!==r.type.kind&&this._isConstant(r)){let t=new Bn;try{r=new Cn(r.type,r.evaluate(t))}catch(e){return this.error(e.message),null}}return r}return this.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0)}return void 0===e?this.error("'undefined' value invalid. Use null instead."):"object"==typeof e?this.error("Bare objects invalid. Use [\"literal\", {...}] instead."):this.error(`Expected an array, but found ${typeof e} instead.`)}concat(t,r,n){let i="number"==typeof t?this.path.concat(t):this.path,a=n?this.scope.concat(n):this.scope;return new e(this.registry,this._isConstant,i,r||null,a,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new ma(r,e))}checkSubtype(e,t){let r=Lr(e,t);return r&&this.error(r),r}},ba=class e{constructor(e,t,r,n,i){this.name=e,this.type=t,this._evaluate=r,this.args=n,this.key=i}evaluate(e){return this._evaluate(e,this.args,this.key)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(t,r){let n=t[0],i=e.definitions[n];if(!i)return r.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0);let a=Array.isArray(i)?i[0]:i.type,o=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,s=o.filter(([e])=>!Array.isArray(e)||e.length===t.length-1),l=null;for(let[i,o]of s){l=new xa(r.registry,Ea,r.path,null,r.scope);let s=[],u=!1;for(let e=1;e<t.length;e++){let r=t[e],n=Array.isArray(i)?i[e-1]:i.type,a=l.parse(r,1+s.length,n);if(!a){u=!0;break}s.push(a)}if(!u){if(Array.isArray(i)&&i.length!==s.length){l.error(`Expected ${i.length} arguments, but found ${s.length} instead.`);continue}for(let e=0;e<s.length;e++){let t=Array.isArray(i)?i[e]:i.type,r=s[e];l.concat(e+1).checkSubtype(t,r.type)}if(0===l.errors.length)return new e(n,a,o,s,r.key)}}if(1===s.length)r.errors.push(...l.errors);else{let e=(s.length?s:o).map(([e])=>Sa(e)).join(" | "),n=[];for(let e=1;e<t.length;e++){let i=r.parse(t[e],1+n.length);if(!i)return null;n.push(zr(i.type))}r.error(`Expected arguments of type ${e}, but found (${n.join(", ")}) instead.`)}return null}static register(t,r){e.definitions=r;for(let n in r)t[n]=e}};function va(e,[t,r,n,i],a){t=t.evaluate(e),r=r.evaluate(e),n=n.evaluate(e);let o=i?i.evaluate(e):1,s=kn(t,r,n,o);if(s)throw new An(s,a);return new mn(t/255,r/255,n/255,o,!1)}function wa(e,t){return e in t&&void 0!==t[e]}function _a(e,t){let r=t[e];return void 0===r?null:r}function Aa(e,t,r,n){for(;r<=n;){let i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1}function Da(e){return{type:e}}function Sa(e){return Array.isArray(e)?`(${e.map(zr).join(", ")})`:`(${zr(e.type)}...)`}function Ea(e){if(e instanceof ei)return Ea(e.boundExpression);if(e instanceof ba&&"error"===e.name||e instanceof hi||e instanceof $i||e instanceof fa||e instanceof da)return!1;let t=e instanceof Jn||e instanceof Hn,r=!0;return e.eachChild(e=>{r&&=t?Ea(e):e instanceof Cn}),!!r&&(Fa(e)&&ka(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]))}function Fa(e){if(e instanceof ba&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof $i||e instanceof fa)return!1;let t=!0;return e.eachChild(e=>{t&&!Fa(e)&&(t=!1)}),t}function Pa(e){if(e instanceof ba&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!Pa(e)&&(t=!1)}),t}function ka(e,t){if(e instanceof ba&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!ka(e,t)&&(r=!1)}),r}function Ta(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function Ma(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function Ia(e){return!!e.expression&&e.expression.interpolated}function Ca(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}function Oa(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function Ba(e){return"object"==typeof e&&!!e&&!Array.isArray(e)&&Mn(e)===Sr}function za(e){return e}function Va(e){switch(e.type){case"color":return mn.parse;case"padding":return vn.parse;case"numberArray":return wn.parse;case"colorArray":return _n.parse;default:return null}}function La(e){switch(e){case"exponential":return Ua;case"interval":return Na;case"categorical":return Ra;case"identity":return qa;default:throw Error(`Unknown function type "${e}"`)}}function $a(e,t){let r=e.stops&&"object"==typeof e.stops[0][0],n=r||void 0!==e.property,i=r||!n,a=e.type||(Ia(t)?"exponential":"interval"),o=Va(t);
1178if(o&&((e=Ca({},e)).stops&&(e.stops=e.stops.map(e=>[e[0],o(e[1])])),e.default?e.default=o(e.default):e.default=o(t.default)),e.colorSpace&&!yn(e.colorSpace))throw Error(`Unknown color space: "${e.colorSpace}"`);let s,l,u=La(a);if("categorical"===a){s=Object.create(null);for(let t of e.stops)s[t[0]]=t[1];l=typeof e.stops[0][0]}if(r){let r={},n=[];for(let t=0;t<e.stops.length;t++){let i=e.stops[t],a=i[0].zoom;void 0===r[a]&&(r[a]={zoom:a,type:e.type,property:e.property,default:e.default,stops:[]},n.push(a)),r[a].stops.push([i[0].value,i[1]])}let i=[];for(let e of n)i.push([r[e].zoom,$a(r[e],t)]);let a={name:"linear"};return{kind:"composite",interpolationType:a,interpolationFactor:$n.interpolationFactor.bind(void 0,a),zoomStops:i.map(e=>e[0]),evaluate:({zoom:r},n)=>Ua({stops:i,base:e.base},t,r).evaluate(r,n)}}if(i){let r="exponential"===a?{name:"exponential",base:void 0===e.base?1:e.base}:null;return{kind:"camera",interpolationType:r,interpolationFactor:$n.interpolationFactor.bind(void 0,r),zoomStops:e.stops.map(e=>e[0]),evaluate:({zoom:r})=>u(e,t,r,s,l)}}return{kind:"source",evaluate(r,n){let i=n&&n.properties?n.properties[e.property]:void 0;return void 0===i?ja(e.default,t.default):u(e,t,i,s,l)}}}function ja(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function Ra(e,t,r,n,i){return ja(typeof r===i?n[r]:void 0,e.default,t.default)}function Na(e,t,r){if("number"!==Oa(r))return ja(e.default,t.default);let n=e.stops.length;if(1===n||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let i=zn(e.stops.map(e=>e[0]),r,"");return e.stops[i][1]}function Ua(e,t,r){let n=void 0===e.base?1:e.base;if("number"!==Oa(r))return ja(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let a=zn(e.stops.map(e=>e[0]),r,""),o=Ga(r,n,e.stops[a][0],e.stops[a+1][0]),s=e.stops[a][1],l=e.stops[a+1][1],u=Rn[t.type]||za;return"function"==typeof s.evaluate?{evaluate(...t){let r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return u(r,n,o,e.colorSpace)}}:u(s,l,o,e.colorSpace)}function qa(e,t,r){switch(t.type){case"color":r=mn.parse(r);break;case"formatted":r=bn.fromString(r.toString());break;case"resolvedImage":r=En.fromString(r.toString());break;case"padding":r=vn.parse(r);break;case"colorArray":r=_n.parse(r);break;case"numberArray":r=wn.parse(r);break;default:Oa(r)!==t.type&&("enum"!==t.type||!t.values[r])&&(r=void 0)}return ja(r,e.default,t.default)}function Ga(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(t**+a-1)/(t**+i-1)}function Ya(e){return{result:"success",value:e}}function Xa(e){return{result:"error",value:e}}ba.register(ya,{error:[Fr,[wr],(e,[t],r)=>{throw new An(t.evaluate(e),r)}],typeof:[wr,[Er],(e,[t])=>zr(Mn(t.evaluate(e)))],"to-rgba":[Br(vr,4),[Ar],(e,[t])=>{let[r,n,i,a]=t.evaluate(e).rgb;return[255*r,255*n,255*i,a]}],rgb:[Ar,[vr,vr,vr],va],rgba:[Ar,[vr,vr,vr,vr],va],has:{type:_r,overloads:[[[wr],(e,[t])=>wa(t.evaluate(e),e.properties())],[[wr,Sr],(e,[t,r])=>wa(t.evaluate(e),r.evaluate(e))]]},get:{type:Er,overloads:[[[wr],(e,[t])=>_a(t.evaluate(e),e.properties())],[[wr,Sr],(e,[t,r])=>_a(t.evaluate(e),r.evaluate(e))]]},"feature-state":[Er,[wr],(e,[t])=>_a(t.evaluate(e),e.featureState||{})],properties:[Sr,[],e=>e.properties()],"geometry-type":[wr,[],e=>e.geometryType()],id:[Er,[],e=>e.id()],zoom:[vr,[],e=>e.globals.zoom],"heatmap-density":[vr,[],e=>e.globals.heatmapDensity||0],elevation:[vr,[],e=>e.globals.elevation||0],"line-progress":[vr,[],e=>e.globals.lineProgress||0],accumulated:[Er,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[vr,Da(vr),(e,t)=>{let r=0;for(let n of t)r+=n.evaluate(e);return r}],"*":[vr,Da(vr),(e,t)=>{let r=1;for(let n of t)r*=n.evaluate(e);return r}],"-":{type:vr,overloads:[[[vr,vr],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[vr],(e,[t])=>-t.evaluate(e)]]},"/":[vr,[vr,vr],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[vr,[vr,vr],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[vr,[],()=>Math.LN2],pi:[vr,[],()=>Math.PI],e:[vr,[],()=>Math.E],"^":[vr,[vr,vr],(e,[t,r])=>t.evaluate(e)**+r.evaluate(e)],sqrt:[vr,[vr],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[vr,[vr],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[vr,[vr],(e,[t])=>Math.log(t.evaluate(e))],log2:[vr,[vr],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[vr,[vr],(e,[t])=>Math.sin(t.evaluate(e))],cos:[vr,[vr],(e,[t])=>Math.cos(t.evaluate(e))],tan:[vr,[vr],(e,[t])=>Math.tan(t.evaluate(e))],asin:[vr,[vr],(e,[t])=>Math.asin(t.evaluate(e))],acos:[vr,[vr],(e,[t])=>Math.acos(t.evaluate(e))],atan:[vr,[vr],(e,[t])=>Math.atan(t.evaluate(e))],min:[vr,Da(vr),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[vr,Da(vr),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[vr,[vr],(e,[t])=>Math.abs(t.evaluate(e))],round:[vr,[vr],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[vr,[vr],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[vr,[vr],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[_r,[wr,Er],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[_r,[Er],(e,[t])=>e.id()===t.value],"filter-type-==":[_r,[wr],(e,[t])=>e.geometryType()===t.value],"filter-<":[_r,[wr,Er],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<i}],"filter-id-<":[_r,[Er],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<n}],"filter->":[_r,[wr,Er],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[_r,[Er],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[_r,[wr,Er],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[_r,[Er],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[_r,[wr,Er],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[_r,[Er],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[_r,[Er],(e,[t])=>{let r=t.value,n=e.properties();return r in n&&void 0!==n[r]}],"filter-has-id":[_r,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[_r,[Br(wr)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[_r,[Br(Er)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[_r,[wr,Br(Er)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[_r,[wr,Br(Er)],(e,[t,r])=>Aa(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:_r,overloads:[[[_r,_r],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[Da(_r),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:_r,overloads:[[[_r,_r],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[Da(_r),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[_r,[_r],(e,[t])=>!t.evaluate(e)],"is-supported-script":[_r,[wr],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[wr,[wr],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[wr,[wr],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[wr,Da(Er),(e,t)=>t.map(t=>In(t.evaluate(e))).join("")],split:[Br(wr),[wr,wr],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[wr,[Br(wr),wr],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[wr,[Pr],(e,[t])=>t.evaluate(e).resolvedLocale()]});var Za=class{constructor(e,t,r,n){this.expression=e,this._warningHistory={},this._evaluator=new Bn,this._defaultValue=r?lo(r):null,this._enumValues=r&&"enum"===r.type?r.values:null,this._globalState=n,this._rootKey=t}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._globalState&&(e=uo(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,i,a){this._globalState&&(e=uo(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new An(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`,"");return e}catch(e){let t=e instanceof An?e.path:"",r=`${t}|${e.message}`;return this._warningHistory[r]||(this._warningHistory[r]=!0,typeof console<"u"&&console.warn(Wa(this._rootKey,t,e.message,this._defaultValue))),this._defaultValue}}};function Wa(e,t,r,n){return`${e}${t}: ${r}${null==n?"":` Falling back to ${String(n)}.`}`}function Ha(e){if(!e)throw Error("rootKey must identify the location of the expression in the style JSON, e.g. \"layers[3].paint.line-width\".")}function Ka(e){return Array.isArray(e)&&e.length>
11780&&"string"==typeof e[0]&&e[0]in ya}function Ja(e,t,r,n){Ha(t);let i=new xa(ya,Ea,[],r?so(r):void 0),a=i.parse(e,void 0,void 0,void 0,r&&"string"===r.type?{typeAnnotation:"coerce"}:void 0);return a?Ya(new Za(a,t,r,n)):Xa(i.errors)}var Qa=class{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!Pa(t.expression),this.globalStateRefs=oo(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._globalState&&(e=uo(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._globalState&&(e=uo(e,this._globalState)),this._styleExpression.evaluate(e,t,r,n,i,a)}},eo=class{constructor(e,t,r,n,i){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!Pa(t.expression),this.globalStateRefs=oo(t.expression),this.interpolationType=n,this._globalState=i}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._globalState&&(e=uo(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._globalState&&(e=uo(e,this._globalState)),this._styleExpression.evaluate(e,t,r,n,i,a)}interpolationFactor(e,t,r){return this.interpolationType?$n.interpolationFactor(this.interpolationType,e,t,r):0}};function to(e){return void 0!==e._styleExpression}function ro(e,t,r,n){let i=Ja(e,t,r,n);if("error"===i.result)return i;let a=i.value.expression,o=Fa(a);if(!o&&!Ta(r))return Xa([new ma("","data expressions not supported")]);let s=ka(a,["zoom"]);if(!s&&!Ma(r))return Xa([new ma("","zoom expressions not supported")]);let l=ao(a);if(!l&&!s)return Xa([new ma("","\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.")]);if(l instanceof ma)return Xa([l]);if(l instanceof $n&&!Ia(r))return Xa([new ma("","\"interpolate\" expressions cannot be used with this property")]);if(!l)return Ya(new Qa(o?"constant":"source",i.value,n));let u=l instanceof $n?l.interpolation:void 0;return Ya(new eo(o?"camera":"composite",i.value,l.labels,u,n))}var no=class e{constructor(e,t,r){this.isStateDependent=!1,this.globalStateRefs=new Set,this._globalState=null,Ha(t),this._parameters=e,this._specification=r,this._rootKey=t,this._defaultValue=lo(r),this._warningHistory={};let n=$a(this._parameters,this._specification);this.kind=n.kind,this.interpolationFactor=n.interpolationFactor,this.zoomStops=n.zoomStops,this.interpolationType=n.interpolationType,this._innerEvaluate=n.evaluate}evaluate(e,t){try{return this._innerEvaluate(e,t)}catch(e){let t=e instanceof Error?e.message:String(e),r=`|${t}`;return this._warningHistory[r]||(this._warningHistory[r]=!0,typeof console<"u"&&console.warn(Wa(this._rootKey,"",t,this._defaultValue))),this._defaultValue}}static deserialize(t){return new e(t._parameters,t._rootKey,t._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification,_rootKey:e._rootKey}}};function io(e,t,r,n){if(Ba(e))return new no(e,t,r);if(Ka(e)){let i=ro(e,t,r,n);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let t=e;return"color"===r.type&&"string"==typeof e?t=mn.parse(e):"padding"!==r.type||"number"!=typeof e&&!Array.isArray(e)?"numberArray"!==r.type||"number"!=typeof e&&!Array.isArray(e)?"colorArray"!==r.type||"string"!=typeof e&&!Array.isArray(e)?"variableAnchorOffsetCollection"===r.type&&Array.isArray(e)?t=Sn.parse(e):"projectionDefinition"===r.type&&"string"==typeof e&&(t=Fn.parse(e)):t=_n.parse(e):t=wn.parse(e):t=vn.parse(e),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>t}}}function ao(e){let t=null;if(e instanceof Qn)t=ao(e.result);else if(e instanceof ti){for(let r of e.args)if(t=ao(r),t)break}else(e instanceof Vn||e instanceof $n)&&e.input instanceof ba&&"zoom"===e.input.name&&(t=e);return t instanceof ma||e.eachChild(e=>{let r=ao(e);r instanceof ma?t=r:!t&&r?t=new ma("","\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression."):t&&r&&t!==r&&(t=new ma("","Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression."))}),t}function oo(e,t=new Set){return e instanceof da&&t.add(e.key),e.eachChild(e=>{oo(e,t)}),t}function so(e){let t={color:Ar,string:wr,number:vr,enum:wr,boolean:_r,formatted:kr,padding:Tr,numberArray:Ir,colorArray:Mr,projectionDefinition:Dr,resolvedImage:Cr,variableAnchorOffsetCollection:Or};return"array"===e.type?Br(t[e.value]||Er,e.length):t[e.type]}function lo(e){if("color"===e.type&&Ba(e.default))return new mn(0,0,0,0);switch(e.type){case"color":return mn.parse(e.default)||null;case"padding":return vn.parse(e.default)||null;case"numberArray":return wn.parse(e.default)||null;case"colorArray":return _n.parse(e.default)||null;case"variableAnchorOffsetCollection":return Sn.parse(e.default)||null;case"projectionDefinition":return Fn.parse(e.default)||null;default:return void 0===e.default?null:e.default}}function uo(e,t){let{zoom:r,heatmapDensity:n,elevation:i,lineProgress:a,isSupportedScript:o,accumulated:s}=e??{};return{zoom:r,heatmapDensity:n,elevation:i,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function co(e){let t=!1;for(let r of e){let e=ho(r);if("expression"===e)return"expression";"legacy"===e&&(t=!0)}return t?"legacy":"neutral"}function ho(e){if("boolean"==typeof e)return"neutral";if(!Array.isArray(e)||0===e.length)return"legacy";switch(e[0]){case"has":return e.length<2||"$id"===e[1]||"$type"===e[1]?"legacy":2===e.length?"neutral":"expression";case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]))?"expression":"legacy";case"!in":case"!has":case"none":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2])?"expression":"legacy";case"any":case"all":return co(e.slice(1));default:return"expression"}}function po(e){return"legacy"!==ho(e)}function fo(e){return"$type"===e?["geometry-type"]:"$id"===e?["id"]:["get",e]}function yo(e){switch(e[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return 3!==e.length||"string"!=typeof e[1]?null:[e[0],fo(e[1]),e[2]];case"in":case"!in":{if(e.length<2||"string"!=typeof e[1])return null;let t=["in",fo(e[1]),["literal",e.slice(2)]];return"!in"===e[0]?["!",t]:t}case"has":case"!has":{if(2!==e.length||"string"!=typeof e[1]||"$type"===e[1]||"$id"===e[1])return null;let t=["has",e[1]];return"!has"===e[0]?["!",t]:t}default:return null}}function mo(e){if(("<"===e[0]||"<="===e[0]||">"===e[0]||">="===e[0])&&"$type"===e[1])return`"$type" cannot be use with operator "${e[0]}"`;let t=yo(e);return t?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(e)} with ${JSON.stringify(t)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(e)} to expression syntax.`}function go(e,t,r){let n=r[e];return Array.isArray(n)?po(n)?xo(n,t.concat(e)):{path:t.concat(e),legacyFilter:n}:null}function xo(e,t=[]){if(!Array.isArray(e)||e.length<1)return null;switch(e[0]){case"all":case"any":case"none":for(let r=1;r<e.length;r++){let n=go(r,t,e);if(n)return n}break;case"!":{let r=go(1,t,e);if(r)return r;break}case"case":for(let r=1;r<e.length-1;r+=2){let n=go(r,t,e);if(n)return n}}return null}function bo(e,t){let r=xo(e);if(!r||typeof console>"u")return;let n=r.path.map(e=>`[${e}]`).join("");console.warn(`${t}${n}: ${mo(r.legacyFilter)}`)}const vo={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function wo(e,t,r){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};po(e)?bo(e,t):e=Do(e);let n=Ja(e,t,vo,r);if("error"===n.result)throw Error(n.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,t,r)=>n.value.evaluate(e,t,{},r),needGeometry:Ao(e),getGlobalStateRefs:()=>oo(n.value.expression)}}function _o(e,t){return e<t?-1:+(e>t)}function Ao(e){if(!Array.isArray(e))return!1;if("within"===e[0]||"distance"===e[0])return!0;for(let t=1;t<e.length;t++)if(Ao(e[t]))return!0;return!1}function Do(e){if(!e)return!0;let t=e[0];return e.length<=1?"any"!==t:"=="===t?So(e[1],e[2],"=="):"!="===t?ko(So(e[1],e[2],"==")):"<"===t||">"===t||"<="===t||">="===t?So(e[1],e[2],t):"any"===t?Eo(e.slice(1)):"all"===t?["all"].concat(e.slice(1).map(Do)):"none"===t?["all"].concat(e.slice(1).map(Do).map(ko)):"in"===t?Fo(e[1],e.slice(2)):"!in"===t?ko(Fo(e[1],e.slice(2))):"has"===t?Po(e[1]):"!has"!==t||ko(Po(e[1]))}function So(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function Eo(e){return["any"].concat(e.map(Do))}function Fo(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(_o)]]:["filter-in-small",e,["literal",t]]}}function Po(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function ko(e){return["!",e]}function To(e){let t=e.key,r=e.value;return r?[new xr(t,r,"constants have been deprecated as of v8")]:[]}function Mo(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function Io(e){if(Array.isArray(e))return e.map(Io);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=Io(e[r]);return t}return Mo(e)}function Co(e){let t=e.key,r=e.value,n=e.valueSpec||{},i=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],u=Oa(r);if("object"!==u)return[new xr(t,r,`object expected, ${u}
1178 found`)];for(let e in r){let u,c=e.split(".")[0],h=on(n,c)||n["*"];if(on(i,c))u=i[c];else if(on(n,c)){if(void 0===r[e])continue;u=s}else if(i["*"])u=i["*"];else{if(!n["*"]){l.push(new xr(t,r[e],`unknown property "${e}"`));continue}u=s}l=l.concat(u({key:(t&&`${t}.`)+e,value:r[e],valueSpec:h,style:a,styleSpec:o,object:r,objectKey:e,validateSpec:s},r))}for(let e in n)i[e]||n[e].required&&void 0===n[e].default&&void 0===r[e]&&l.push(new xr(t,r,`missing required property "${e}"`));return l}function Oo(e){let t=e.value,r=e.valueSpec,n=e.validateSpec,i=e.style,a=e.styleSpec,o=e.key,s=e.arrayElementValidator||n;if("array"!==Oa(t))return[new xr(o,t,`array expected, ${Oa(t)} found`)];if(r.length&&t.length!==r.length)return[new xr(o,t,`array length ${r.length} expected, length ${t.length} found`)];let l={type:r.value,values:r.values};a.$version<7&&(l.function=r.function),"object"===Oa(r.value)&&(l=r.value);let u=[];for(let r=0;r<t.length;r++)u=u.concat(s({array:t,arrayIndex:r,value:t[r],valueSpec:l,validateSpec:e.validateSpec,style:i,styleSpec:a,key:`${o}[${r}]`}));return u}function Bo(e){let t=e.key,r=e.value,n=e.valueSpec,i=Oa(r);return"number"===i&&r!=r&&(i="NaN"),"number"===i?"minimum"in n&&r<n.minimum?[new xr(t,r,`${r} is less than the minimum value ${n.minimum}`)]:"maximum"in n&&r>n.maximum?[new xr(t,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]:[new xr(t,r,`number expected, ${i} found`)]}function zo(e){let t,r,n,i=e.valueSpec,a=Mo(e.value.type),o={},s="categorical"!==a&&void 0===e.value.property,l=!s,u="array"===Oa(e.value.stops)&&"array"===Oa(e.value.stops[0])&&"object"===Oa(e.value.stops[0][0]),c=Co({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===a)return[new xr(e.key,e.value,"identity function may not have a \"stops\" property")];let t=[],r=e.value;return t=t.concat(Oo({key:e.key,value:r,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:h})),"array"===Oa(r)&&0===r.length&&t.push(new xr(e.key,r,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:i,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===a&&s&&c.push(new xr(e.key,e.value,"missing required property \"property\"")),"identity"!==a&&!e.value.stops&&c.push(new xr(e.key,e.value,"missing required property \"stops\"")),"exponential"===a&&e.valueSpec.expression&&!Ia(e.valueSpec)&&c.push(new xr(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(l&&!Ta(e.valueSpec)?c.push(new xr(e.key,e.value,"property functions not supported")):s&&!Ma(e.valueSpec)&&c.push(new xr(e.key,e.value,"zoom functions not supported"))),("categorical"===a||u)&&void 0===e.value.property&&c.push(new xr(e.key,e.value,"\"property\" property is required")),c;function h(e){let t=[],a=e.value,s=e.key;if("array"!==Oa(a))return[new xr(s,a,`array expected, ${Oa(a)} found`)];if(2!==a.length)return[new xr(s,a,`array length 2 expected, length ${a.length} found`)];if(u){if("object"!==Oa(a[0]))return[new xr(s,a,`object expected, ${Oa(a[0])} found`)];if(void 0===a[0].zoom)return[new xr(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new xr(s,a,"object stop key must have value")];if(n&&n>Mo(a[0].zoom))return[new xr(s,a[0].zoom,"stop zoom values must appear in ascending order")];Mo(a[0].zoom)!==n&&(n=Mo(a[0].zoom),r=void 0,o={}),t=t.concat(Co({key:`${s}[0]`,value:a[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:Bo,value:p}}))}else t=t.concat(p({key:`${s}[0]`,value:a[0],valueSpec:{},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},a));return Ka(Io(a[1]))?t.concat([new xr(`${s}[1]`,a[1],"expressions are not allowed in function stops.")]):t.concat(e.validateSpec({key:`${s}[1]`,value:a[1],valueSpec:i,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function p(e,n){let s=Oa(e.value),l=Mo(e.value),u=null===e.value?n:e.value;if(t){if(s!==t)return[new xr(e.key,u,`${s} stop domain type must match previous stop domain type ${t}`)]}else t=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new xr(e.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){let t=`number expected, ${s} found`;return Ta(i)&&void 0===a&&(t+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xr(e.key,u,t)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l<r?[new xr(e.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===a&&l in o?[new xr(e.key,u,"stop domain values must be unique")]:(o[l]=!0,[])):[new xr(e.key,u,`integer expected, found ${l}`)]}}function Vo(e){let t=("property"===e.expressionContext?ro:Ja)(Io(e.value),e.key,e.valueSpec);if("error"===t.result)return t.value.map(t=>new xr(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new xr(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!Pa(r))return[new xr(e.key,e.value,"\"feature-state\" data expressions are not supported with layout properties.")];if("filter"===e.expressionContext&&!Pa(r))return[new xr(e.key,e.value,"\"feature-state\" data expressions are not supported with filters.")];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!ka(r,["zoom","feature-state"]))return[new xr(e.key,e.value,"\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.")];if("cluster-initial"===e.expressionContext&&!Fa(r))return[new xr(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Lo(e){let t=e.key,r=e.value,n=Oa(r);return"string"===n?mn.parse(String(r))?[]:[new xr(t,r,`color expected, "${r}" found`)]:[new xr(t,r,`color expected, ${n} found`)]}function $o(e){let t=e.key,r=e.value,n=e.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(Mo(r))&&i.push(new xr(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(Mo(r))&&i.push(new xr(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function jo(e,t){let r=e;for(let e of t)r=r[e];return r}function Ro(e,t){let r=xo(t);return r?[new xr(`${e.key}${r.path.map(e=>`[${e}]`).join("")}
1178`,jo(e.value,r.path),mo(r.legacyFilter),null,"warning")]:[]}function No(e){let t=Io(e.value);return po(t)?[...Ro(e,t),...Vo(Ca({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}}))]:Uo(e)}function Uo(e){let t=e.value,r=e.key;if("array"!==Oa(t))return[new xr(r,t,`array expected, ${Oa(t)} found`)];let n,i=e.styleSpec,a=[];if(t.length<1)return[new xr(r,t,"filter array must have at least 1 element")];switch(a=a.concat($o({key:`${r}[0]`,value:t[0],valueSpec:i.filter_operator,style:e.style,styleSpec:e.styleSpec})),Mo(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&"$type"===Mo(t[1])&&a.push(new xr(r,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":3!==t.length&&a.push(new xr(r,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(n=Oa(t[1]),"string"!==n&&a.push(new xr(`${r}[1]`,t[1],`string expected, ${n} found`)));for(let o=2;o<t.length;o++)n=Oa(t[o]),"$type"===Mo(t[1])?a=a.concat($o({key:`${r}[${o}]`,value:t[o],valueSpec:i.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new xr(`${r}[${o}]`,t[o],`string, number, or boolean expected, ${n} found`));break;case"any":case"all":case"none":for(let n=1;n<t.length;n++)a=a.concat(Uo({key:`${r}[${n}]`,value:t[n],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Oa(t[1]),2===t.length?"string"!==n&&a.push(new xr(`${r}[1]`,t[1],`string expected, ${n} found`)):a.push(new xr(r,t,`filter array for "${t[0]}" operator must have 2 elements`))}return a}function qo(e,t){let r=e.key,n=e.validateSpec,i=e.style,a=e.styleSpec,o=e.value,s=e.objectKey,l=a[`${t}_${e.layerType}`];if(!l)return[];let u=s.match(/^(.*)-transition$/);if("paint"===t&&u&&l[u[1]]&&l[u[1]].transition)return n({key:r,value:o,valueSpec:a.transition,style:i,styleSpec:a});let c,h=e.valueSpec||l[s];if(!h)return[new xr(r,o,`unknown property "${s}"`)];if("string"===Oa(o)&&Ta(h)&&!h.tokens&&(c=/^{([^}]+)}$/.exec(o)))return[new xr(r,o,`"${s}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(c[1])} }\`.`)];let p=[];return"symbol"===e.layerType&&"text-font"===s&&Ba(Io(o))&&"identity"===Mo(o.type)&&p.push(new xr(r,o,"\"text-font\" does not support identity functions")),p.concat(n({key:e.key,value:o,valueSpec:h,style:i,styleSpec:a,expressionContext:"property",propertyType:t,propertyKey:s}))}function Go(e){return qo(e,"paint")}function Yo(e){return qo(e,"layout")}function Xo(e){let t=[],r=e.value,n=e.key,i=e.style,a=e.styleSpec;if("object"!==Oa(r))return[new xr(n,r,`object expected, ${Oa(r)} found`)];!r.type&&!r.ref&&t.push(new xr(n,r,"either \"type\" or \"ref\" is required"));let o=Mo(r.type),s=Mo(r.ref);if(r.id){let a=Mo(r.id);for(let o=0;o<e.arrayIndex;o++){let e=i.layers[o];Mo(e.id)===a&&t.push(new xr(n,r.id,`duplicate layer id "${r.id}", previously used at line ${e.id.__line__}`))}}if("ref"in r){let e;["type","source","source-layer","filter","layout"].forEach(e=>{e in r&&t.push(new xr(n,r[e],`"${e}" is prohibited for ref layers`))}),i.layers.forEach(t=>{Mo(t.id)===s&&(e=t)}),e?e.ref?t.push(new xr(n,r.ref,"ref cannot reference another ref layer")):o=Mo(e.type):t.push(new xr(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==o)if(r.source){let e=i.sources&&i.sources[r.source],a=e&&Mo(e.type);e?"vector"===a&&"raster"===o?t.push(new xr(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==a&&"hillshade"===o||"raster-dem"!==a&&"color-relief"===o?t.push(new xr(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===a&&"raster"!==o?t.push(new xr(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==a||r["source-layer"]?"raster-dem"===a&&"hillshade"!==o&&"color-relief"!==o?t.push(new xr(n,r.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===o&&r.paint&&r.paint["line-gradient"]&&("geojson"!==a||!e.lineMetrics)&&t.push(new xr(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new xr(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new xr(n,r.source,`source "${r.source}" not found`))}else t.push(new xr(n,r,"missing required property \"source\""));return"raster"===o&&r.paint?.resampling&&r.paint?.["raster-resampling"]&&t.push(new xr(n,r.paint,`layer "${r.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),t=t.concat(Co({key:n,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${n}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"}),filter:No,layout:e=>Co({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>Yo(Ca({layerType:o},e))}}),paint:e=>Co({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>Go(Ca({layerType:o},e))}})}})),t}function Zo(e){let t=e.value,r=e.key,n=Oa(t);return"string"===n?[]:[new xr(r,t,`string expected, ${n} found`)]}function Wo(e){let t=e.sourceName??"",r=e.value,n=e.styleSpec,i=n.source_raster_dem,a=e.style,o=[],s=Oa(r);if(void 0===r)return o;if("object"!==s)return o.push(new xr("source_raster_dem",r,`object expected, ${s} found`)),o;let l="custom"===Mo(r.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],c=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let s in r)!l&&u.includes(s)?o.push(new xr(s,r[s],`In "${t}": "${s}" is only valid when "encoding" is set to "custom". ${c} encoding found`)):i[s]?o=o.concat(e.validateSpec({key:s,value:r[s],valueSpec:i[s],validateSpec:e.validateSpec,style:a,styleSpec:n})):o.push(new xr(s,r[s],`unknown property "${s}"`));return o}const Ho={promoteId:function({key:e,value:t}
1178){if("string"===Oa(t))return Zo({key:e,value:t});{let r=[];for(let n in t)r.push(...Zo({key:`${e}.${n}`,value:t[n]}));return r}}};function Ko(e){let t=e.value,r=e.key,n=e.styleSpec,i=e.style,a=e.validateSpec;if(!t.type)return[new xr(r,t,"\"type\" is required")];let o,s=Mo(t.type);switch(s){case"vector":case"raster":return o=Co({key:r,value:t,valueSpec:n[`source_${s.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:Ho,validateSpec:a}),o;case"raster-dem":return o=Wo({sourceName:r,value:t,style:e.style,styleSpec:n,validateSpec:a}),o;case"geojson":if(o=Co({key:r,value:t,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:a,objectElementValidators:Ho}),t.cluster)for(let e in t.clusterProperties){let[n,i]=t.clusterProperties[e],s="string"==typeof n?[n,["accumulated"],["get",e]]:n;o.push(...Vo({key:`${r}.${e}.map`,value:i,validateSpec:a,expressionContext:"cluster-map"})),o.push(...Vo({key:`${r}.${e}.reduce`,value:s,validateSpec:a,expressionContext:"cluster-reduce"}))}return o;case"video":return Co({key:r,value:t,valueSpec:n.source_video,style:i,validateSpec:a,styleSpec:n});case"image":return Co({key:r,value:t,valueSpec:n.source_image,style:i,validateSpec:a,styleSpec:n});case"canvas":return[new xr(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return $o({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:a,styleSpec:n})}}function Jo(e){let t=e.value,r=e.styleSpec,n=r.light,i=e.style,a=[],o=Oa(t);if(void 0===t)return a;
1178if("object"!==o)return a=a.concat([new xr("light",t,`object expected, ${o} found`)]),a;for(let o in t){let s=o.match(/^(.*)-transition$/);a=s&&n[s[1]]&&n[s[1]].transition?a.concat(e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:i,styleSpec:r})):n[o]?a.concat(e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r})):a.concat([new xr(o,t[o],`unknown property "${o}"`)])}return a}function Qo(e){let t=e.value,r=e.styleSpec,n=r.sky,i=e.style,a=Oa(t);if(void 0===t)return[];if("object"!==a)return[new xr("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=n[a]?o.concat(e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r})):o.concat([new xr(a,t[a],`unknown property "${a}"`)]);return o}function es(e){let t=e.value,r=e.styleSpec,n=r.terrain,i=e.style,a=[],o=Oa(t);if(void 0===t)return a;if("object"!==o)return a=a.concat([new xr("terrain",t,`object expected, ${o} found`)]),a;for(let o in t)a=n[o]?a.concat(e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r})):a.concat([new xr(o,t[o],`unknown property "${o}"`)]);return a}function ts(e){let t=[],r=e.value,n=e.key;if(Array.isArray(r)){let i=[],a=[];for(let o in r)r[o].id&&i.includes(r[o].id)&&t.push(new xr(n,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),i.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new xr(n,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(Co({key:`${n}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return Zo({key:n,value:r})}function rs(e){return!!["interpolate","step","literal"].includes(e[0])}function ns(e){return Array.isArray(e)&&3===e.length&&"string"==typeof e[0]&&"string"==typeof e[1]&&"number"==typeof e[2]}function is(e){return!!e&&e.constructor===Object}function as(e){return is(e.value)?[]:[new xr(e.key,e.value,`object expected, ${Oa(e.value)} found`)]}const os=1114111,ss=/^u\+(?:([0-9a-f]{1,6})(?:-([0-9a-f]{1,6}))?|([0-9a-f]{0,5}\?{1,6}))$/i;function ls(e,t){if("string"!==Oa(t))return[];let r=`${t}`,n=()=>[new xr(e,t,"invalid unicode range, expected a value such as \"U+26\", \"U+0-10FFFF\" or \"U+4??\"")],i=r.match(ss);if(!i)return n();let[,a,o,s]=i;if(void 0!==s)return s.length>6?n():[];let l=parseInt(a,16),u=void 0===o?l:parseInt(o,16);return l>os||u>os?[new xr(e,t,"unicode range is out of bounds, the maximum code point is U+10FFFF")]:l>u?[new xr(e,t,`unicode range start must not be greater than its end, but ${r} is`)]:[]}function us(e){let t=e.key??"font-faces",r=e.value,n=e.validateSpec,i=e.styleSpec??yr,a=e.style;if(!is(r))return[new xr(t,r,`object expected, ${Oa(r)} found`)];let o=[];for(let e in r){let s=r[e],l=Oa(s);if("string"===l)o.push(...Zo({key:`${t}.${e}`,value:s}));else if("array"===l){let r={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(let[l,u]of s.entries()){let s=`${t}.${e}[${l}]`;o.push(...Co({key:s,value:u,valueSpec:r,styleSpec:i,style:a,validateSpec:n}));let c=is(u)?u["unicode-range"]:void 0;if("array"===Oa(c))for(let[e,t]of c.entries())o.push(...ls(`${s}.unicode-range[${e}]`,t))}}else o.push(new xr(`${t}.${e}`,s,`string or array expected, ${l} found`))}return o}const cs={"*":()=>[],array:Oo,boolean:function(e){let t=e.value,r=e.key,n=Oa(t);return"boolean"===n?[]:[new xr(r,t,`boolean expected, ${n} found`)]},number:Bo,color:Lo,constants:To,enum:$o,filter:No,function:zo,layer:Xo,object:Co,source:Ko,light:Jo,sky:Qo,terrain:es,projection:function(e){let t=e.value,r=e.styleSpec,n=r.projection,i=e.style,a=Oa(t);if(void 0===t)return[];if("object"!==a)return[new xr("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=n[a]?o.concat(e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r})):o.concat([new xr(a,t[a],`unknown property "${a}"`)]);return o},projectionDefinition:function(e){let t=e.key,r=e.value;r=r instanceof String?r.valueOf():r;let n=Oa(r);return"array"!==n||ns(r)||rs(r)?["array","string"].includes(n)?[]:[new xr(t,r,`projection expected, invalid type "${n}" found`)]:[new xr(t,r,`projection expected, invalid array ${JSON.stringify(r)} found`)]},string:Zo,formatted:function(e){return 0===Zo(e).length?[]:Vo(e)},resolvedImage:function(e){return 0===Zo(e).length?[]:Vo(e)},padding:function(e){let t=e.key,r=e.value;if("array"===Oa(r)){if(r.length<1||r.length>4)return[new xr(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let n={type:"number"},i=[];for(let a=0;a<r.length;a++)i=i.concat(e.validateSpec({key:`${t}[${a}
1178]`,value:r[a],validateSpec:e.validateSpec,valueSpec:n}));return i}return Bo({key:t,value:r,valueSpec:{}})},numberArray:function(e){let t=e.key,r=e.value;if("array"===Oa(r)){let n={type:"number"};if(r.length<1)return[new xr(t,r,"array length at least 1 expected, length 0 found")];let i=[];for(let a=0;a<r.length;a++)i=i.concat(e.validateSpec({key:`${t}[${a}]`,value:r[a],validateSpec:e.validateSpec,valueSpec:n}));return i}return Bo({key:t,value:r,valueSpec:{}})},colorArray:function(e){let t=e.key,r=e.value;if("array"===Oa(r)){if(r.length<1)return[new xr(t,r,"array length at least 1 expected, length 0 found")];let e=[];for(let n=0;n<r.length;n++)e=e.concat(Lo({key:`${t}[${n}]`,value:r[n],valueSpec:{}}));return e}return Lo({key:t,value:r,valueSpec:{}})},variableAnchorOffsetCollection:function(e){let t=e.key,r=e.value,n=Oa(r),i=e.styleSpec;if("array"!==n||r.length<1||r.length%2!=0)return[new xr(t,r,"variableAnchorOffsetCollection requires a non-empty array of even length")];let a=[];for(let n=0;n<r.length;n+=2)a=a.concat($o({key:`${t}[${n}]`,value:r[n],valueSpec:i.layout_symbol["text-anchor"]})),a=a.concat(Oo({key:`${t}[${n+1}]`,value:r[n+1],valueSpec:{length:2,value:"number"},validateSpec:e.validateSpec,style:e.style,styleSpec:i}));return a},sprite:ts,state:as,fontFaces:us};function hs(e){let t=e.value,r=e.valueSpec,n=e.styleSpec;return e.validateSpec=hs,r.expression&&Ba(Mo(t))?zo(e):r.expression&&Ka(Io(t))?Vo(e):r.type&&cs[r.type]?cs[r.type](e):Co(Ca({},e,{valueSpec:r.type?n[r.type]:r}))}function ps(e){let t=e.value,r=e.key,n=Zo(e);return n.length||(-1===t.indexOf("{fontstack}")&&n.push(new xr(r,t,"\"glyphs\" url must include a \"{fontstack}\" token")),-1===t.indexOf("{range}")&&n.push(new xr(r,t,"\"glyphs\" url must include a \"{range}\" token"))),n}function fs(e,t=mr){let r=[];return r=r.concat(hs({key:"",value:e,valueSpec:t.$root,styleSpec:t,style:e,validateSpec:hs,objectElementValidators:{glyphs:ps,"*":()=>[]}})),e.constants&&(r=r.concat(To({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:hs}))),ys(r)}function ds(e){return function(t){return e(Object.assign({},t,{validateSpec:hs}))}}function ys(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function ms(e){return function(...t){return ys(e.apply(this,t))}}fs.source=ms(ds(Ko)),fs.sprite=ms(ds(ts)),fs.glyphs=ms(ds(ps)),fs.fontFaces=ms(ds(us)),fs.light=ms(ds(Jo)),fs.sky=ms(ds(Qo)),fs.terrain=ms(ds(es)),fs.state=ms(ds(as)),fs.layer=ms(ds(Xo)),fs.filter=ms(ds(No)),fs.paintProperty=ms(ds(Go)),fs.layoutProperty=ms(ds(Yo));const gs={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};var xs=class{constructor(e,t,r){this._rootKey=t,this._globalState=r,this.setValue(e)}evaluate(){return this._literalValue??this._compiledValue.evaluate({})}setValue(e){if(null==e||"visible"===e||"none"===e)return this._literalValue="none"===e?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let t=Ja(e,this._rootKey,gs,this._globalState);if("error"===t.result)throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=oo(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}};function bs(e,t,r){return new xs(e,t,r)}const vs=fs,ws=new Set(Object.keys(mr).filter(e=>e.startsWith("source_")).map(e=>e.slice(7).replaceAll("_","-")));function _s(e){return Object.entries(e.sources??{}).filter(([,e])=>!ws.has(e.type)).map(([e])=>`sources.${e}`)}function As(e,t){let r=_s(t);return Ds(e,vs(t).filter(({message:e})=>!r.some(t=>e.startsWith(`${t}:`)||e.startsWith(`${t}.`))))}function Ds(e,t){let r=!1;for(let n of t)"warning"!==n.severity?(e.fire(new fr(Error(n.message))),r=!0):yt(n.message);return r}function Ss(e,t,r,n){return!1!==n?.validate&&Ds(e,t(Object.assign({styleSpec:mr},r)))}var Es=class e{constructor(e,t,r){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let i=new Int32Array(this.arrayBuffer);e=i[0],t=i[1],r=i[2],this.d=t+2*r;for(let e=0;e<this.d*this.d;e++){let t=i[3+e],r=i[3+e+1];n.push(t===r?null:i.subarray(t,r))}let a=i[3+n.length],o=i[3+n.length+1];this.keys=i.subarray(a,o),this.bboxes=i.subarray(o),this.insert=this._insertReadonly}else{this.d=t+2*r;for(let e=0;e<this.d*this.d;e++)n.push([]);this.keys=[],this.bboxes=[]}this.n=t,this.extent=e,this.padding=r,this.scale=t/e,this.uid=0;let i=r/t*e;this.min=-i,this.max=e+i}
1178insert(e,t,r,n,i){this._forEachCell(t,r,n,i,this._insertCell,this.uid++,void 0,void 0),this.keys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)}_insertReadonly(){throw Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(e,t,r,n,i,a){this.cells[i].push(a)}query(e,t,r,n,i){let a=this.min,o=this.max;if(e<=a&&t<=a&&o<=r&&o<=n&&!i)return[...this.keys];{let a=[];return this._forEachCell(e,t,r,n,this._queryCell,a,{},i),a}}_queryCell(e,t,r,n,i,a,o,s){let l=this.cells[i];if(null!==l){let i=this.keys,u=this.bboxes;for(let c of l)if(void 0===o[c]){let l=4*c;(s?s(u[l+0],u[l+1],u[l+2],u[l+3]):e<=u[l+2]&&t<=u[l+3]&&r>=u[l+0]&&n>=u[l+1])?(o[c]=!0,a.push(i[c])):o[c]=!1}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToCellCoord(e),u=this._convertToCellCoord(t),c=this._convertToCellCoord(r),h=this._convertToCellCoord(n);for(let p=l;p<=c;p++)for(let l=u;l<=h;l++){let u=this.d*l+p;if((!s||s(this._convertFromCellCoord(p),this._convertFromCellCoord(l),this._convertFromCellCoord(p+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,r,n,u,a,o,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e of this.cells)r+=e.length;let n=new Int32Array(t+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;let i=t;for(let t=0;t<e.length;t++){let r=e[t];n[3+t]=i,n.set(r,i),i+=r.length}return n[3+e.length]=i,n.set(this.keys,i),i+=this.keys.length,n[3+e.length+1]=i,n.set(this.bboxes,i),i+=this.bboxes.length,n.buffer}static serialize(e,t){let r=e.toArrayBuffer();return t&&t.push(r),{buffer:r}}static deserialize(t){return new e(t.buffer)}};const Fs={};function Ps(e,t,r={}){if(Fs[e])throw Error(`${e} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:e,writeable:!1}),Fs[e]={klass:t,omit:r.omit||[],shallow:r.shallow||[]}}Ps("Object",Object),Ps("Set",Set),Ps("TransferableGridIndex",Es),Ps("Color",mn),Ps("Error",Error),Ps("AJAXError",er),Ps("ResolvedImage",En),Ps("StylePropertyFunction",no),Ps("StyleExpression",Za,{omit:["_evaluator"]}),Ps("ZoomDependentExpression",eo),Ps("ZoomConstantExpression",Qa),Ps("CompoundExpression",ba,{omit:["_evaluate"]});for(let e in ya)ya[e]._classRegistryKey||Ps(`Expression_${e}`,ya[e]);function ks(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||"ArrayBuffer"===e.constructor?.name)}function Ts(e){let t=e.constructor;return e.$name||t._classRegistryKey}function Ms(e){if("object"!=typeof e||!e)return!1;let t=Ts(e);return t&&"Object"!==t}function Is(e){return!Ms(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||ks(e)||At(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function Cs(e,t){if(Is(e))return(ks(e)||At(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let n of e)r.push(Cs(n,t));return r}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let r=Ts(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!Fs[r])throw Error(`${r} is not registered.`);let{klass:n}=Fs[r],i=n.serialize?n.serialize(e,t):{};if(n.serialize){if(i===t?.[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let n in e){if(!e.hasOwnProperty(n)||Fs[r].omit.includes(n))continue;let a=e[n];void 0!==a&&(i[n]=Fs[r].shallow.includes(n)?a:Cs(a,t))}e instanceof Error&&(i.message=e.message)}if(i.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}function Os(e){if(Is(e))return e;if(Array.isArray(e))return e.map(Os);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=Ts(e)||"Object";if(!Fs[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=Fs[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let n=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let i=e[r];n[r]=Fs[t].shallow.includes(r)?i:Os(i)}return n}var Bs=class{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=t),e!==this.lastZoom&&(this.lastZoom=e,this.lastFloorZoom=r,!0))}};function zs(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function Vs(e){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function Ls(e){return/[\u02EA\u02EB\u1100-\u11FF\u1400-\u167F\u18B0-\u18F5\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3007\u3012\u3013\u3020-\u302F\u3031-\u303F\u3041-\u3096\u309D-\u30FB\u30FD-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFE4\uDFF0-\uDFF6]|[\uD81C-\uD822\uD83D\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD30-\uDEFB]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83C[\uDC00-\uDE00\uDF00-\uDFFF]|\uD83E[\uDD00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))}function $s(e){return/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e))}function js(e){return/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(e))}
1178function Rs(e){return/[\r\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0600-\u0605\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DD\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0890\u0891\u0897-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E33-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB3-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1037\u1039-\u103E\u1056-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1084-\u1086\u108D\u109D\u1100-\u11FF\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60\u1A62\u1A65-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA960-\uA97C\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCBD\uDCC2\uDCCD\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC2\uDDC3\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF1F\uDF22-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE84-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00-\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDD63\uDD67-\uDD6A\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDDE6-\uDDFF\uD
1178FFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF]/.test(e)}function Ns(e){return/[\u0E01-\u0E3A\u0E40-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA\u1000-\u109F\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF\u1B00-\u1B4C\u1B4E-\u1B7F\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE-\uA9FE\uAA60-\uAA7F]|\uD805[\uDED0-\uDEE3]/gim.test(String.fromCodePoint(e))}function Us(e,t){return/(?:[\u1039\u17D2\u1A60\u1BAB\u200D\uAAF6]|\uD802\uDE3F|\uD804[\uDD33\uDFD0]|\uD806[\uDD3E\uDE47\uDE99]|\uD807[\uDD45\uDD97\uDF42])$/.test(e)||/^\p{gc=Mc}/u.test(t)}function qs(e){return/\s/u.test(String.fromCodePoint(e))}function Gs(e){for(let t of e)if(Ls(t.codePointAt(0)))return!0;return!1}function Ys(e){for(let t of e)if(!Ws(t.codePointAt(0)))return!1;return!0}function Xs(e){let t=e.map(e=>{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}}).filter(e=>e);return new RegExp(t.join("|"),"u")}const Zs=Xs(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ws(e){return!Zs.test(String.fromCodePoint(e))}function Hs(e){return!(Ls(e)||$s(e))}function Ks(e){return/\p{sc=Arab}/u.test(String.fromCodePoint(e))}const Js=Xs("Adlm.Arab.Armi.Avst.Chrs.Cprt.Egyp.Elym.Gara.Hatr.Hebr.Hung.Khar.Lydi.Mand.Mani.Mend.Merc.Mero.Narb.Nbat.Nkoo.Orkh.Palm.Phli.Phlp.Phnx.Prti.Rohg.Samr.Sarb.Sogo.Syrc.Thaa.Todr.Yezi".split("."));function Qs(e){return Js.test(String.fromCodePoint(e))}function el(e,t){return!(!t&&Qs(e))&&!js(e)}function tl(e){for(let t of e)if(Qs(t.codePointAt(0)))return!0;return!1}function rl(e,t){for(let r of e)if(!el(r.codePointAt(0),t))return!1;return!0}const nl=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(nl.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}async syncState(e,t){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let r=e.pluginURL,n=new Promise(e=>{this.loadScriptResolve=e}),i=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(await t(r),await Promise.race([n,i]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:r};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)}};var il=class{constructor(e,t){this.isSupportedScript=al,this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new Bs,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bs,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}};function al(e){return rl(e,"loaded"===nl.getRTLTextPluginStatus())}const ol="-transition";var sl=class{constructor(e,t,r,n){this.property=e,this.value=t,this.expression=io(void 0===t?e.specification.default:t,r,e.specification,n)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}},ll=class{constructor(e,t,r){this.property=e,this.value=new sl(e,void 0,t,r)}transitioned(e,t){return new cl(this.property,this.value,t,tt({},e.transition,this.transition),e.now)}
1178untransitioned(){return new cl(this.property,this.value,null,{},0)}},ul=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return ft(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new ll(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].value=new sl(this._values[e].property,null===t?void 0:ft(t),this._propertyRootKey(e),this._globalState)}getTransition(e){return ft(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new ll(this._values[e].property,this._propertyRootKey(e),this._globalState)),this._values[e].transition=ft(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let n=this.getTransition(t);void 0!==n&&(e[`${t}${ol}`]=n)}return e}transitioned(e,t){let r=new hl(this._properties);for(let n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){let e=new hl(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}},cl=class{constructor(e,t,r,n,i){this.property=e,this.value=t,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let n=e.now||0,i=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(!a)return i;if(n>this.end||this.value.isDataDriven())return this.prior=null,i;if(n<this.begin)return a.possiblyEvaluate(e,t,r);{let o=(n-this.begin)/(this.end-this.begin);return this.property.interpolate(a.possiblyEvaluate(e,t,r),i,He(o))}}},hl=class{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let n=new dl(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}},pl=class{constructor(e,t,r){this._properties=e,this._values=Object.create(e.defaultPropertyValues),this._globalState=r,this._rootKey=t}_propertyRootKey(e){return`${this._rootKey}.${String(e)}`}hasValue(e){return void 0!==this._values[e].value}hasProperty(e){return e in this._properties.defaultPropertyValues}getValue(e){return ft(this._values[e].value)}setValue(e,t){this._values[e]=new sl(this._values[e].property,null===t?void 0:ft(t),this._propertyRootKey(e),this._globalState)}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let n=new dl(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}},fl=class{constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,r,n){return this.property.evaluate(this.value,this.parameters,e,t,r,n)}},dl=class{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}};function yl(e){if(Array.isArray(e))return e.length;let t=e?.values;return Array.isArray(t)?t.length:void 0}function ml(e,t){let r=yl(e),n=yl(t);return void 0!==r&&void 0!==n&&r!==n}var gl=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t){if(e.isDataDriven())throw Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){if(ml(e,t))return yt(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may 'jump'.`),t;let n=this.specification.type,i=Rn[n];return i?i(e,t,r):e}},xl=class{constructor(e,t,r){this.specification=e,this.name=t,this.overrides=r}possiblyEvaluate(e,t,r,n){return"constant"===e.expression.kind||"camera"===e.expression.kind?new fl(this,{kind:"constant",value:e.expression.evaluate(t,null,{},r,n)},t):new fl(this,e.expression,t)}interpolate(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new fl(this,{kind:"constant",value:void 0},e.parameters);if(ml(e.value.value,t.value.value))return yt(`Property "${this.name}" is trying to interpolate arrays of different lengths. Rendering may 'jump'.`),t;let n=this.specification.type,i=Rn[n];if(i){let n=i(e.value.value,t.value.value,r);return new fl(this,{kind:"constant",value:n},e.parameters)}return e}evaluate(e,t,r,n,i,a){return"constant"===e.kind?e.value:e.evaluate(t,r,n,i,a)}},bl=class extends xl{possiblyEvaluate(e,t,r,n){if(void 0===e.value)return new fl(this,{kind:"constant",value:void 0},t);
1178if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n),a="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i,o=this._calculate(a,a,a,t);return new fl(this,{kind:"constant",value:o},t)}if("camera"===e.expression.kind){let r=this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t);return new fl(this,{kind:"constant",value:r},t)}return new fl(this,e.expression,t)}evaluate(e,t,r,n,i,a){if("source"===e.kind){let o=e.evaluate(t,r,n,i,a);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,n),e.evaluate({zoom:Math.floor(t.zoom)},r,n),e.evaluate({zoom:Math.floor(t.zoom)+1},r,n),t):e.value}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},vl=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new il(Math.floor(t.zoom-1),t)),e.expression.evaluate(new il(Math.floor(t.zoom),t)),e.expression.evaluate(new il(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}},wl=class{constructor(e,t){this.specification=e,this.name=t}possiblyEvaluate(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)}interpolate(){return!1}},_l=class{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let t in e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let n=this.defaultPropertyValues[t]=new sl(r,void 0,r.name,void 0),i=this.defaultTransitionablePropertyValues[t]=new ll(r,r.name,void 0);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}}};Ps("DataDrivenProperty",xl),Ps("DataConstantProperty",gl),Ps("CrossFadedDataDrivenProperty",bl),Ps("CrossFadedProperty",vl),Ps("ColorRampProperty",wl);const Al=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",Dl=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";var Sl=class extends dr{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=bs(this.visibility,`layers[${this.id}].layout.visibility`,r),"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter,this._featureFilter=wo(e.filter,`layers[${this.id}].filter`,r)),t.layout&&(this._unevaluatedLayout=new pl(t.layout,`layers[${this.id}].layout`,r)),t.paint)){this._transitionablePaint=new ul(t.paint,`layers[${this.id}].paint`,r);for(let t in e.paint)this.setPaintProperty(t,e.paint[t],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new dl(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=wo(e,`layers[${this.id}].filter`,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){if("visibility"===e)return this.visibility;if(this._transitionablePaint?.hasProperty(e))throw Error(e+Al);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values){let r=this._unevaluatedLayout._values[t];for(let t of r.getGlobalStateRefs())e.add(t)}for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){let e=new globalThis.Map;if(this._transitionablePaint)for(let t in this._transitionablePaint._values){let r=this._transitionablePaint._values[t].value;for(let n of r.getGlobalStateRefs()){let i=e.get(n)??[];i.push({name:t,value:r.value}),e.set(n,i)}}return e}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){if("visibility"===e)return this.visibility=t,this._visibilityExpression.setValue(t),void this.recalculateVisibility();this._transitionablePaint?.hasProperty(e)?this.fire(new fr(Error(e+Al))):null!=t&&this._val
1178idate(vs.layoutProperty,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){if(e.endsWith("-transition")){let t=e.slice(0,-11);if("visibility"===t||this._unevaluatedLayout?.hasProperty(t))throw Error(e+Dl);return this._transitionablePaint.getTransition(t)}if("visibility"===e||this._unevaluatedLayout?.hasProperty(e))throw Error(e+Dl);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if("visibility"===e||this._unevaluatedLayout?.hasProperty(e))return this.fire(new fr(Error(e+Dl))),!1;if(null!=t&&this._validate(vs.paintProperty,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith("-transition"))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return!!(this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom)||this.maxzoom&&e>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}
vendor: 15,498 bytes, line 1178
1178serialize(){let e={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout?.serialize(),paint:this._transitionablePaint?.serialize()};return this.visibility&&(e.layout||={},e.layout.visibility=this.visibility),ht(e,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,n,i={}){return Ss(this,e,{key:t,layerType:this.type,objectKey:r,value:n},i)}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof fl&&Ta(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}};let El;var Fl={get paint(){return El||=new _l({"raster-opacity":new gl(mr.paint_raster["raster-opacity"],"raster-opacity"),"raster-hue-rotate":new gl(mr.paint_raster["raster-hue-rotate"],"raster-hue-rotate"),"raster-brightness-min":new gl(mr.paint_raster["raster-brightness-min"],"raster-brightness-min"),"raster-brightness-max":new gl(mr.paint_raster["raster-brightness-max"],"raster-brightness-max"),"raster-saturation":new gl(mr.paint_raster["raster-saturation"],"raster-saturation"),"raster-contrast":new gl(mr.paint_raster["raster-contrast"],"raster-contrast"),resampling:new gl(mr.paint_raster.resampling,"resampling"),"raster-resampling":new gl(mr.paint_raster["raster-resampling"],"raster-resampling"),"raster-fade-duration":new gl(mr.paint_raster["raster-fade-duration"],"raster-fade-duration")})}};const Pl=e=>"raster"===e.type;var kl=class extends Sl{constructor(e,t){super(e,Fl,t)}};const Tl={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};var Ml=class{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}},Il=class{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}};function Cl(e,t=1){let r=0,n=0;return{members:e.map(e=>{let i=Ol(e.type),a=r=Bl(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}}),size:Bl(r,Math.max(n,t)),alignment:t}}function Ol(e){return Tl[e].BYTES_PER_ELEMENT}function Bl(e,t){return Math.ceil(e/t)*t}var zl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}};zl.prototype.bytesPerElement=4,Ps("StructArrayLayout2i4",zl);var Vl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e}};Vl.prototype.bytesPerElement=6,Ps("StructArrayLayout3i6",Vl);var Ll=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e}};Ll.prototype.bytesPerElement=8,Ps("StructArrayLayout4i8",Ll);var $l=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e}};$l.prototype.bytesPerElement=12,Ps("StructArrayLayout2i4i12",$l);var jl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,e}};jl.prototype.bytesPerElement=8,Ps("StructArrayLayout2i4ub8",jl);var Rl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}};Rl.prototype.bytesPerElement=8,Ps("StructArrayLayout2f8",Rl);var Nl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,u){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l,u)}emplace(e,t,r,n,i,a,o,s,l,u,c){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=u,this.uint16[h+9]=c,e}};Nl.prototype.bytesPerElement=20,Ps("StructArrayLayout10ui20",Nl);var Ul=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,n,i,a,o,s)}emplace(e,t,r,n,i,a,o,s,l){let u=8*e;return this.uint16[u+0]=t,this.uint16[u+1]=r,this.uint16[u+2]=n,this.uint16[u+3]=i,this.uint16[u+4]=a,this.uint16[u+5]=o,this.uint16[u+6]=s,this.uint16[u+7]=l,e}};Ul.prototype.bytesPerElement=16,Ps("StructArrayLayout8ui16",Ul);var ql=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,u,c,h,p){let f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,o,s,l,u,c,h,p)}emplace(e,t,r,n,i,a,o,s,l,u,c,h,p,f){let d=14*e,y=7*e;return this.int16[d+0]=t,this.int16[d+1]=r,this.int16[d+2]=n,this.int16[d+3]=i,this.uint16[d+4]=a,this.uint16[d+5]=o,this.uint16[d+6]=s,this.uint16[d+7]=l,this.int16[d+8]=u,this.int16[d+9]=c,this.int16[d+10]=h,this.int16[d+11]=p,this.float32[y+6]=f,e}};ql.prototype.bytesPerElement=28,Ps("StructArrayLayout4i4ui4i1f28",ql);var Gl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}};Gl.prototype.bytesPerElement=12,Ps("StructArrayLayout3f12",Gl);var Yl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=1*e;return this.uint32[r+0]=t,e}};Yl.prototype.bytesPerElement=4,Ps("StructArrayLayout1ul4",Yl);var Xl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l)}emplace(e,t,r,n,i,a,o,s,l,u){let c=10*e,h=5*e;return this.int16[c+0]=t,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[h+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,e}};Xl.prototype.bytesPerElement=20,Ps("StructArrayLayout6i1ul2ui20",Xl);var Zl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,e}};Zl.prototype.bytesPerElement=12,Ps("StructArrayLayout2i2i2i12",Zl);var Wl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)}emplace(e,t,r,n,i,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e}};Wl.prototype.bytesPerElement=16,Ps("StructArrayLayout2f1f2i16",Wl);var Hl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=16*e,l=4*e,u=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=n,this.float32[l+2]=i,this.int16[u+6]=a,this.int16[u+7]=o,e}};Hl.prototype.bytesPerElement=16,Ps("StructArrayLayout2ub2f2i16",Hl);var Kl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e}};Kl.prototype.bytesPerElement=6,Ps("StructArrayLayout3ui6",Kl);var Jl=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g){let x=this.length;return this.resize(x+1),this.emplace(x,e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g)}emplace(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g,x){let b=26*e,v=13*e,w=52*e;return this.int16[b+0]=t,this.int16[b+1]=r,this.uint16[b+2]=n,this.uint16[b+3]=i,this.uint32[v+2]=a,this.uint32[v+3]=o,this.uint32[v+4]=s,this.uint16[b+10]=l,this.uint16[b+11]=u,this.uint16[b+12]=c,this.float32[v+7]=h,this.float32[v+8]=p,this.uint8[w+36]=f,this.uint8[w+37]=d,this.uint8[w+38]=y,this.uint32[v+10]=m,this.int16[b+22]=g,this.float32[v+12]=x,e}};Jl.prototype.bytesPerElement=52,Ps("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i1f52",Jl);var Ql=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g,x,b,v,w,_,A,D,S,E,F,P){let k=this.length;return this.resize(k+1),this.emplace(k,e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g,x,b,v,w,_,A,D,S,E,F,P)}emplace(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g,x,b,v,w,_,A,D,S,E,F,P,k){let T=34*e,M=17*e;return this.int16[T+0]=t,this.int16[T+1]=r,this.int16[T+2]=n,this.int16[T+3]=i,this.int16[T+4]=a,this.int16[T+5]=o,this.int16[T+6]=s,this.int16[T+7]=l,this.uint16[T+8]=u,this.uint16[T+9]=c,this.uint16[T+10]=h,this.uint16[T+11]=p,this.uint16[T+12]=f,this.uint16[T+13]=d,this.uint16[T+14]=y,this.uint16[T+15]=m,this.uint16[T+16]=g,this.uint16[T+17]=x,this.uint16[T+18]=b,this.uint16[T+19]=v,this.uint16[T+20]=w,this.uint16[T+21]=_,this.uint16[T+22]=A,this.uint32[M+12]=D,this.float32[M+13]=S,this.float32[M+14]=E,this.uint16[T+30]=F,this.uint16[T+31]=P,this.float32[M+16]=k,e}};Ql.prototype.bytesPerElement=68,Ps("StructArrayLayout8i15ui1ul2f2ui1f68",Ql);var eu=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=1*e;return this.float32[r+0]=t,e}};eu.prototype.bytesPerElement=4,Ps("StructArrayLayout1f4",eu);var tu=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=6*e,a=3*e;return this.uint16[i+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,e}};tu.prototype.bytesPerElement=12,Ps("StructArrayLayout1ui2f12",tu);var ru=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=2*e,a=4*e;return this.uint32[i+0]=t,this.uint16[a+2]=r,this.uint16[a+3]=n,e}};ru.prototype.bytesPerElement=8,Ps("StructArrayLayout1ul2ui8",ru);var nu=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}};nu.prototype.bytesPerElement=4,Ps("StructArrayLayout2ui4",nu);var iu=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){let r=1*e;return this.uint16[r+0]=t,e}};iu.prototype.bytesPerElement=2,Ps("StructArrayLayout1ui2",iu);var au=class extends Il{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e}};au.prototype.bytesPerElement=16,Ps("StructArrayLayout4f16",au);var ou=class extends Ml{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}
1178get anchorPoint(){return new x(this.anchorPointX,this.anchorPointY)}};ou.prototype.size=20;var su=class extends Xl{get(e){return new ou(this,e)}};Ps("CollisionBoxArray",su);var lu=class extends Ml{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}get heightOffset(){return this._structArray.float32[this._pos4+12]}};lu.prototype.size=52;var uu=class extends Jl{get(e){return new lu(this,e)}};Ps("PlacedSymbolArray",uu);var cu=class extends Ml{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}get heightOffset(){return this._structArray.float32[this._pos4+16]}};cu.prototype.size=68;var hu=class extends Ql{get(e){return new cu(this,e)}};Ps("SymbolInstanceArray",hu);var pu=class extends eu{getoffsetX(e){return this.float32[1*e+0]}};Ps("GlyphOffsetArray",pu);var fu=class extends Vl{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}};Ps("SymbolLineVertexArray",fu);var du=class extends Ml{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}};du.prototype.size=12;var yu=class extends tu{get(e){return new du(this,e)}};Ps("TextAnchorOffsetArray",yu);var mu=class extends Ml{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}};mu.prototype.size=8;var gu=class extends ru{get(e){return new mu(this,e)}};Ps("FeatureIndexArray",gu);var xu=class extends zl{},bu=class extends Vl{},vu=class extends Ll{},wu=class extends zl{},_u=class extends zl{},Au=class extends $l{},Du=class extends jl{},Su=class extends Rl{},Eu=class extends Nl{},Fu=class extends Ul{},Pu=class extends ql{},ku=class extends Gl{},Tu=class extends Yl{},Mu=class extends Zl{}
1178,Iu=class extends Wl{},Cu=class extends Hl{},Ou=class extends Kl{},Bu=class extends Kl{},zu=class extends nu{},Vu=class extends iu{};const Lu=Cl([{name:"a_pos",components:2,type:"Int16"}],4),$u=Lu.members;Lu.size,Lu.alignment;var ju=class e{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(t,r,n,i){let a=this.segments[this.segments.length-1];return t>e.MAX_VERTEX_ARRAY_LENGTH&&yt(`Max vertices per segment is ${e.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${e.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!a||a.vertexLength+t>e.MAX_VERTEX_ARRAY_LENGTH||a.sortKey!==i?this.createNewSegment(r,n,i):a}createNewSegment(e,t,r){let n={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(n.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(n),n}getOrCreateLatestSegment(e,t,r){return this.prepareSegment(0,e,t,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(t,r,n,i){return new e([{vertexOffset:t,primitiveOffset:r,vertexLength:n,primitiveLength:i,vaos:{},sortKey:0}])}};function Ru(e,t){return 256*(e=Qe(Math.floor(e),0,255))+(t=Qe(Math.floor(t),0,255))}ju.MAX_VERTEX_ARRAY_LENGTH=65535,Ps("SegmentVector",ju);const Nu=Cl([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Uu=Cl([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var qu=m((e,t)=>{void 0!==t&&(t.exports=function(e,t){for(var r,n,i=3&e.length,a=e.length-i,o=t,s=3432918353,l=461845907,u=0;u<a;)n=255&e.charCodeAt(u)|(255&e.charCodeAt(++u))<<8|(255&e.charCodeAt(++u))<<16|(255&e.charCodeAt(++u))<<24,++u,o=27492+(65535&(r=5*(65535&(o=(o^=n=(65535&(n=(n=(65535&n)*s+(((n>>>16)*s&65535)<<16)&4294967295)<<15|n>>>17))*l+(((n>>>16)*l&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+(((r>>>16)+58964&65535)<<16);switch(n=0,i){case 3:n^=(255&e.charCodeAt(u+2))<<16;case 2:n^=(255&e.charCodeAt(u+1))<<8;case 1:o^=n=(65535&(n=(n=(65535&(n^=255&e.charCodeAt(u)))*s+(((n>>>16)*s&65535)<<16)&4294967295)<<15|n>>>17))*l+(((n>>>16)*l&65535)<<16)&4294967295}return o^=e.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0})}),Gu=m((e,t)=>{t.exports=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=1540483477*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}}),Yu=((e,t,r)=>(r=null==e?{}:c(d(e)),g(!t&&e&&e.__esModule&&y.call(e,"default")?r:h(r,"default",{value:e,enumerable:!0}),e)))(m((e,t)=>{var r=qu(),n=Gu();t.exports=r,t.exports.murmur3=r,t.exports.murmur2=n})(),1),Xu=class e{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(Zu(e)),this.positions.push(t,r,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=Zu(e),r=0,n=this.ids.length-1;for(;r<n;){let e=r+n>>1;this.ids[e]>=t?n=e:r=e+1}let i=[];for(;this.ids[r]===t;){let e=this.positions[3*r],t=this.positions[3*r+1],n=this.positions[3*r+2];i.push({index:e,start:t,end:n}),r++}return i}static serialize(e,t){let r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return Wu(r,n,0,r.length-1),t&&t.push(r.buffer,n.buffer),{ids:r,positions:n}}static deserialize(t){let r=new e;return r.ids=t.ids,r.positions=t.positions,r.indexed=!0,r}};function Zu(e){let t=+e;return!isNaN(t)&&t<=9007199254740991?t:(0,Yu.default)(String(e))}function Wu(e,t,r,n){for(;r<n;){let i=e[r+n>>1],a=r-1,o=n+1;for(;;){do{a++}while(e[a]<i);do{o--}while(e[o]>i);if(a>=o)break;Hu(e,a,o),Hu(t,3*a,3*o),Hu(t,3*a+1,3*o+1),Hu(t,3*a+2,3*o+2)}o-r<n-o?(Wu(e,t,r,o),r=o+1):(Wu(e,t,o+1,n),n=o)}}function Hu(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Ps("FeaturePositionMap",Xu);var Ku=class{constructor(e,t){this.gl=e.gl,this.location=t}},Ju=class extends Ku{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1i(this.location,e))}},Qu=class extends Ku{constructor(e,t){super(e,t),this.current=0}set(e){this.current!==e&&(this.current=e,this.gl.uniform1f(this.location,e))}},ec=class extends Ku{constructor(e,t){super(e,t),this.current=[0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1])&&(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},tc=class extends Ku{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2])&&(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},rc=class extends Ku{constructor(e,t){super(e,t),this.current=[0,0,0,0]}set(e){(e[0]!==this.current[0]||e[1]!==this.current[1]||e[2]!==this.current[2]||e[3]!==this.current[3])&&(this.current=e,this.gl.uniform4f(this.location,e[0],e[1],e[2],e[3]))}},nc=class extends Ku{constructor(e,t){super(e,t),this.current=mn.transparent}set(e){(e.r!==this.current.r||e.g!==this.current.g||e.b!==this.current.b||e.a!==this.current.a)&&(this.current=e,this.gl.uniform4f(this.location,e.r,e.g,e.b,e.a))}},ic=class extends Ku{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let r=0;r<e.length;r++)t[4*r]=e[r].r,t[4*r+1]=e[r].g,t[4*r+2]=e[r].b,t[4*r+3]=e[r].a;this.gl.uniform4fv(this.location,t)}}},ac=class extends Ku{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(e);this.gl.uniform1fv(this.location,t)}}};const oc=new Float32Array(16);var sc=class extends Ku{constructor(e,t){super(e,t),this.current=oc}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}};function lc(e){return[Ru(255*e.r,255*e.g),Ru(255*e.b,255*e.a)]}var uc=class{constructor(e,t,r){this.value=e,this.uniformNames=t.map(e=>`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new nc(e,t):new Qu(e,t)}},cc=class{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,n){let i=null;"u_pattern_to"===n?i=this.patternTo:"u_pattern_from"===n?i=this.patternFrom:"u_dasharray_to"===n?i=this.dashTo:"u_dasharray_from"===n?i=this.dashFrom:"u_pixel_ratio_to"===n?i=this.pixelRatioTo:"u_pixel_ratio_from"===n&&(i=this.pixelRatioFrom),null!==i&&e.set(i)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new rc(e,t):new Qu(e,t)}},hc=class{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new n}populatePaintArray(e,t,r){let n=this.paintVertexArray.length,i=this.expression.evaluate(new il(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(n,e,i)}updatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new il(0,i),r,n);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if("color"===this.type){let n=lc(r);for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,n[0],n[1])}else{for(let n=e;n<t;n++)this.paintVertexArray.emplace(n,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}}upload(e){this.paintVertexArray?.arrayBuffer.byteLength&&(this.paintVertexBuffer?.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}},pc=class{constructor(e,t,r,n,i,a){this.expression=e,this.uniformNames=t.map(e=>`u_${e}_t`),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let n=this.expression.evaluate(new il(this.zoom,r),t,{},r.canonical,[],r.formattedSection),i=this.expression.evaluate(new il(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,n,i)}updatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new il(this.zoom,i),r,n),o=this.expression.evaluate(new il(this.zoom+1,i),r,n);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,n){if("color"===this.type){let i=lc(r),a=lc(n);for(let r=e;r<t;r++)this.paintVertexArray.emplace(r,i[0],i[1],a[0],a[1])}else{for(let i=e;i<t;i++)this.paintVertexArray.emplace(i,r,n);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(n))}}upload(e){this.paintVertexArray?.arrayBuffer.byteLength&&(this.paintVertexBuffer?.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=e.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(e,t){let r=this.useIntegerZoom?Math.floor(t.zoom):t.zoom,n=Qe(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);e.set(n)}getBinding(e,t,r){return new Qu(e,t)}},fc=class{constructor(e,t,r,n,i,a){this.expression=e,this.type=t,this.useIntegerZoom=r,this.zoom=n,this.layerId=a,this.zoomInPaintVertexArray=new i,this.zoomOutPaintVertexArray=new i}populatePaintArray(e,t,r){let n=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(e),this.zoomOutPaintVertexArray.resize(e),this._setPaintValues(n,e,this.getPositionIds(t),r)}updatePaintArray(e,t,r,n,i){this._setPaintValues(e,t,this.getPositionIds(r),i)}_setPaintValues(e,t,r,n){let i=this.getPositions(n);if(!i||!r)return;let a=i[r.min],o=i[r.mid],s=i[r.max];if(a&&o&&s)for(let r=e;r<t;r++)this.emplace(this.zoomInPaintVertexArray,r,a,o),this.emplace(this.zoomOutPaintVertexArray,r,s,o)}upload(e){if(this.zoomInPaintVertexArray?.arrayBuffer.byteLength&&this.zoomOutPaintVertexArray?.arrayBuffer.byteLength){let t=this.getVertexAttributes();this.zoomInPaintVertexBuffer=e.createVertexBuffer(this.zoomInPaintVertexArray,t,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=e.createVertexBuffer(this.zoomOutPaintVertexArray,t,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}},dc=class extends fc{getPositions(e){return e.imagePositions}getPositionIds(e){return e.patterns?.[this.layerId]}getVertexAttributes(){return Nu.members}emplace(e,t,r,n){e.emplace(t,r.tlbr[0],r.tlbr[1],r.tlbr[2],r.tlbr[3],n.tlbr[0],n.tlbr[1],n.tlbr[2],n.tlbr[3],r.pixelRatio,n.pixelRatio)}},yc=class extends fc{getPositions(e){return e.dashPositions}getPositionIds(e){return e.dashes?.[this.layerId]}getVertexAttributes(){return Uu.members}emplace(e,t,r,n){e.emplace(t,0,r.y,r.height,r.width,0,n.y,n.height,n.width)}},mc=class{constructor(e,t,r){this.binders={},this._buffers=[];let n=[];for(let i in e.paint._values){if(!r(i))continue;let a=e.paint.get(i);if(!(a instanceof fl&&Ta(a.property.specification)))continue;let o=xc(i,e.type),s=a.value,l=a.property.specification.type,u=a.property.useIntegerZoom,c=a.property.specification["property-type"],h="cross-faded"===c||"cross-faded-data-driven"===c;if("constant"===s.kind)this.binders[i]=h?new cc(s.value,o):new uc(s.value,o,l),n.push(`/u_${i}`);else if("source"===s.kind||h){let r=vc(i,l,"source");this.binders[i]=h?"line-dasharray"===i?new yc(s,l,u,t,r,e.id):new dc(s,l,u,t,r,e.id):new hc(s,o,l,r),n.push(`/a_${i}`)}else{let e=vc(i,l,"composite");this.binders[i]=new pc(s,o,l,u,t,e),n.push(`/z_${i}`)}}this.cacheKey=n.sort().join("")}getMaxValue(e){let t=this.binders[e];return t instanceof hc||t instanceof pc?t.maxValue:0}populatePaintArrays(e,t,r){for(let n in this.binders){let i=this.binders[n];(i instanceof hc||i instanceof pc||i instanceof fc)&&i.populatePaintArray(e,t,r)}}setConstantPatternPositions(e,t){for(let r in this.binders){let n=this.binders[r];n instanceof cc&&n.setConstantPatternPositions(e,t)}}setConstantDashPositions(e,t){for(let r in this.binders){let n=this.binders[r];n instanceof cc&&n.setConstantDashPositions(e,t)}}updatePaintArrays(e,t,r,n,i){let a=!1;for(let o of e){let e=t.getPositions(o.id);for(let t of e){let e=r.feature(t.index);for(let r in this.binders){let s=this.binders[r];(s instanceof hc||s instanceof pc||s instanceof fc)&&!0===s.expression.isStateDependent&&(s.expression=n.paint.get(r).value,s.updatePaintArray(t.start,t.end,e,o.state,i),a=!0)}}}return a}defines(){let e=[];for(let t in this.binders){let r=this.binders[t];(r instanceof uc||r instanceof cc)&&e.push(...r.uniformNames.map(e=>`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof hc||r instanceof pc)for(let t of r.paintVertexAttributes)e.push(t.name);else if(r instanceof fc){let t=r.getVertexAttributes();for(let r of t)e.push(r.name)}}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof uc||r instanceof cc||r instanceof pc)for(let t of r.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let n in this.binders){let i=this.binders[n];if(i instanceof uc||i instanceof cc||i instanceof pc)for(let a of i.uniformNames)if(t[a]){let o=i.getBinding(e,t[a],a);
vendor: 4,365 bytes, line 1178
1178r.push({name:a,property:n,binding:o})}}return r}setUniforms(e,t,r,n){for(let{name:e,property:i,binding:a}of t)this.binders[i].setUniform(a,n,r.get(i),e)}updatePaintBuffers(e){this._buffers=[];for(let t in this.binders){let r=this.binders[t];if(e&&r instanceof fc){let t=2===e.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(r instanceof hc||r instanceof pc)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof hc||r instanceof pc||r instanceof fc)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof hc||t instanceof pc||t instanceof fc)&&t.destroy()}}},gc=class{constructor(e,t,r=()=>!0){this.programConfigurations={};for(let n of e)this.programConfigurations[n.id]=new mc(n,t,r);this.needsUpload=!1,this._featureMap=new Xu,this._bufferOffset=0}populatePaintArrays(e,t,r,n){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n){for(let i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}};function xc(e,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[e]||[e.replace(`${t}-`,"").replace(/-/g,"_")]}function bc(e){return{"line-pattern":{source:Eu,composite:Eu},"fill-pattern":{source:Eu,composite:Eu},"fill-extrusion-pattern":{source:Eu,composite:Eu},"line-dasharray":{source:Fu,composite:Fu}}[e]}function vc(e,t,r){let n={color:{source:Rl,composite:au},number:{source:eu,composite:Rl}};return bc(e)?.[r]||n[t][r]}Ps("ConstantBinder",uc),Ps("CrossFadedConstantBinder",cc),Ps("SourceExpressionBinder",hc),Ps("CrossFadedPatternBinder",dc),Ps("CrossFadedDasharrayBinder",yc),Ps("CompositeExpressionBinder",pc),Ps("ProgramConfiguration",mc,{omit:["_buffers"]}),Ps("ProgramConfigurationSet",gc);const wc=16383,_c=-16384;function Ac(e){let t=ke/e.extent,r=e.loadGeometry();for(let e of r)for(let r of e){let e=Math.round(r.x*t),n=Math.round(r.y*t);r.x=Qe(e,_c,wc),r.y=Qe(n,_c,wc),(e<r.x||e>r.x+1||n<r.y||n>r.y+1)&&yt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function Dc(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?Ac(e):[]}}const Sc=-32768;function Ec(e,t,r,n,i){e.emplaceBack(Sc+8*t+n,Sc+8*r+i)}var Fc=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new wu,this.indexArray=new Bu,this.segments=new ju,this.programConfigurations=new gc(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let n=this.layers[0],i=[],a=null,o=!1,s="heatmap"===n.type;if("circle"===n.type){let e=n;a=e.layout.get("circle-sort-key"),o=!a.isConstant(),s||="map"===e.paint.get("circle-pitch-alignment")}let l=s?t.subdivisionGranularity.circle:1,u=new il(this.zoom),c=this.layers[0]._featureFilter.needGeometry;for(let{feature:t,id:n,index:s,sourceLayerIndex:l}of e){let e=Dc(t,c);if(!this.layers[0]._featureFilter.filter(u,e,r))continue;let h=o?a.evaluate(e,{},r):void 0,p={id:n,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:c?e.geometry:Ac(t),patterns:{},sortKey:h};i.push(p)}o&&i.sort((e,t)=>
1178e.sortKey-t.sortKey);for(let n of i){let{geometry:i,index:a,sourceLayerIndex:o}=n,s=e[a].feature;this.addFeature(n,i,a,r,l),t.featureIndex.insert(s,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e){}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,$u),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,n,i=1){let a;switch(i){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${i}; valid values are 1, 3, 5, 7.`)}let o=a.length;for(let r of t)for(let t of r){let r=t.x,n=t.y;if(r<0||r>=8192||n<0||n>=8192)continue;let i=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),s=i.vertexLength;for(let e=0;e<o;e++)for(let t=0;t<o;t++)Ec(this.layoutVertexArray,r,n,a[t],a[e]);for(let e=0;e<o-1;e++)for(let t=0;t<o-1;t++){let r=s+e*o+t,n=s+(e+1)*o+t;this.indexArray.emplaceBack(r,n+1,r+1),this.indexArray.emplaceBack(r,n,n+1)}i.vertexLength+=o*o,i.primitiveLength+=(o-1)*(o-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:{},canonical:n})}};function Pc(e,t){for(let r of e)if(Lc(t,r))return!0;for(let r of t)if(Lc(e,r))return!0;return Cc(e,t)}function kc(e,t,r){return!!Lc(e,t)||Bc(t,e,r)}function Tc(e,t){if(1===e.length)return Vc(t,e[0]);for(let r of t)for(let t of r)if(Lc(e,t))return!0;for(let r of e)if(Vc(t,r))return!0;for(let r of t)if(Cc(e,r))return!0;return!1}function Mc(e,t,r){for(let n of t){if(e.length>=3)for(let t of n)if(Lc(e,t))return!0;if(Ic(e,n,r))return!0}return!1}function Ic(e,t,r){if(e.length>1){if(Cc(e,t))return!0;for(let n of t)if(Bc(n,e,r))return!0}for(let n of e)if(Bc(n,t,r))return!0;return!1}function Cc(e,t){if(0===e.length||0===t.length)return!1;for(let r=0;r<e.length-1;r++){let n=e[r],i=e[r+1];for(let e=0;e<t.length-1;e++){if(Oc(n,i,t[e],t[e+1]))return!0}}return!1}function Oc(e,t,r,n){return mt(e,r,n)!==mt(t,r,n)&&mt(e,t,r)!==mt(e,t,n)}function Bc(e,t,r){let n=r*r;if(1===t.length)return e.distSqr(t[0])<n;for(let r=1;r<t.length;r++){if(zc(e,t[r-1],t[r])<n)return!0}return!1}function zc(e,t,r){let n=t.distSqr(r);if(0===n)return e.distSqr(t);let i=((e.x-t.x)*(r.x-t.x)+(e.y-t.y)*(r.y-t.y))/n;return i<0?e.distSqr(t):i>1?e.distSqr(r):e.distSqr(r.sub(t)._mult(i)._add(t))}function Vc(e,t){let r,n,i,a=!1;for(let o of e){r=o;for(let e=0,o=r.length-1;e<r.length;o=e++)n=r[e],i=r[o],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function Lc(e,t){let r=!1;for(let n=0,i=e.length-1;n<e.length;i=n++){let a=e[n],o=e[i];a.y>t.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function $c(e,t,r,n,i){for(let a of e)if(t<=a.x&&r<=a.y&&n>=a.x&&i>=a.y)return!0;let a=[new x(t,r),new x(t,i),new x(n,i),new x(n,r)];if(e.length>2)for(let t of a)if(Lc(e,t))return!0;for(let t=0;t<e.length-1;t++){if(jc(e[t],e[t+1],a))return!0}return!1}function jc(e,t,r){let n=r[0],i=r[2];if(e.x<n.x&&t.x<n.x||e.x>i.x&&t.x>i.x||e.y<n.y&&t.y<n.y||e.y>i.y&&t.y>i.y)return!1;let a=mt(e,t,r[0]);return a!==mt(e,t,r[1])||a!==mt(e,t,r[2])||a!==mt(e,t,r[3])}function Rc(e,t,r){let n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function Nc(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Uc(e,t,r,n,i){if(!t[0]&&!t[1])return e;let a=x.convert(t)._mult(i);"viewport"===r&&a._rotate(-n);let o=[];for(let t of e)o.push(t.sub(a));return o}function qc(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],i=t.at(-1);(0===r||i&&!n.equals(i))&&t.push(n)}return t}function Gc(e,t){let r=[];for(let n of e){let e=qc(n),i=[];for(let r=0;r<e.length;r++){let n=e[r],a=e[r-1],o=e[r+1],s=0===r?new x(0,0):n.sub(a)._unit()._perp(),l=r===e.length-1?new x(0,0):o.sub(n)._unit()._perp(),u=s._add(l)._unit(),c=u.x*l.x+u.y*l.y;0!==c&&u._mult(1/c),i.push(u._mult(t)._add(n))}r.push(i)}return r}function Yc({queryGeometry:e,size:t},r){return kc(e,r,t)}function Xc({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i},a){return kc(e,a,t*(r.projectTileCoordinates(a.x,a.y,n,i?.(a.x,a.y)).signedDistanceFromCamera/r.cameraToCenterDistance))}function Zc({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i},a){let o=r.projectTileCoordinates(a.x,a.y,n,i?.(a.x,a.y)).signedDistanceFromCamera,s=t*(r.cameraToCenterDistance/o);return kc(e,Kc(a,r,n,i),s)}function Wc({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i},a){return kc(e,Kc(a,r,n,i),t)}function Hc({queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i,pitchAlignment:a="map",pitchScale:o="map"},s){let l="map"===a?"map"===o?Yc:Xc:"map"===o?Zc:Wc,u={queryGeometry:e,size:t,transform:r,unwrappedTileID:n,getElevation:i};for(let e of s)for(let t of e)if(l(u,t))return!0;return!1}function Kc(e,t,r,n){let i=t.projectTileCoordinates(e.x,e.y,r,n?.(e.x,e.y)).point;return new x((.5*i.x+.5)*t.width,(.5*-i.y+.5)*t.height)}
1178function Jc(e,t,r,n){return e.map(e=>Kc(e,t,r,n))}let Qc;Ps("CircleBucket",Fc,{omit:["layers"]});let eh;var th={get paint(){return eh||=new _l({"circle-radius":new xl(mr.paint_circle["circle-radius"],"circle-radius"),"circle-color":new xl(mr.paint_circle["circle-color"],"circle-color"),"circle-blur":new xl(mr.paint_circle["circle-blur"],"circle-blur"),"circle-opacity":new xl(mr.paint_circle["circle-opacity"],"circle-opacity"),"circle-translate":new gl(mr.paint_circle["circle-translate"],"circle-translate"),"circle-translate-anchor":new gl(mr.paint_circle["circle-translate-anchor"],"circle-translate-anchor"),"circle-pitch-scale":new gl(mr.paint_circle["circle-pitch-scale"],"circle-pitch-scale"),"circle-pitch-alignment":new gl(mr.paint_circle["circle-pitch-alignment"],"circle-pitch-alignment"),"circle-stroke-width":new xl(mr.paint_circle["circle-stroke-width"],"circle-stroke-width"),"circle-stroke-color":new xl(mr.paint_circle["circle-stroke-color"],"circle-stroke-color"),"circle-stroke-opacity":new xl(mr.paint_circle["circle-stroke-opacity"],"circle-stroke-opacity")})},get layout(){return Qc||=new _l({"circle-sort-key":new xl(mr.layout_circle["circle-sort-key"],"circle-sort-key")})}};const rh=e=>"circle"===e.type;var nh=class extends Sl{constructor(e,t){super(e,th,t)}createBucket(e){return new Fc(e)}queryRadius(e){let t=e;return Rc("circle-radius",this,t)+Rc("circle-stroke-width",this,t)+Nc(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l,u,c=Uc(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-i.bearingInRadians,a),h=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),p=this.paint.get("circle-pitch-scale"),f=this.paint.get("circle-pitch-alignment");return"map"===f?(l=c,u=h*a):(l=Jc(c,i,o,s),u=h),Hc({queryGeometry:l,size:u,transform:i,unwrappedTileID:o,getElevation:s,pitchAlignment:f,pitchScale:p},n)}},ih=class extends Fc{};let ah;Ps("HeatmapBucket",ih,{omit:["layers"]});var oh={get paint(){return ah||=new _l({"heatmap-radius":new xl(mr.paint_heatmap["heatmap-radius"],"heatmap-radius"),"heatmap-weight":new xl(mr.paint_heatmap["heatmap-weight"],"heatmap-weight"),"heatmap-intensity":new gl(mr.paint_heatmap["heatmap-intensity"],"heatmap-intensity"),"heatmap-color":new wl(mr.paint_heatmap["heatmap-color"],"heatmap-color"),"heatmap-opacity":new gl(mr.paint_heatmap["heatmap-opacity"],"heatmap-opacity")})}};function sh(e,{width:t,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*r*n)throw RangeError(`mismatched image size. expected: ${i.length} but got: ${t*r*n}`)}else i=new Uint8Array(t*r*n);return e.width=t,e.height=r,e.data=i,e}function lh(e,{width:t,height:r},n){if(t===e.width&&r===e.height)return;let i=sh({},{width:t,height:r},n);uh(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},n),e.width=t,e.height=r,e.data=i.data}function uh(e,t,r,n,i,a){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l<i.height;l++){let u=((r.y+l)*e.width+r.x)*a,c=((n.y+l)*t.width+n.x)*a;for(let e=0;e<i.width*a;e++)s[c+e]=o[u+e]}return t}var ch=class e{constructor(e,t){sh(this,e,1,t)}resize(e){lh(this,e,1)}clone(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,r,n,i){uh(e,t,r,n,i,1)}},hh=class e{constructor(e,t){sh(this,e,4,t)}resize(e){lh(this,e,4)}replace(e,t){t?this.data.set(e):this.data=e instanceof Uint8ClampedArray?new Uint8Array(e.buffer):e}clone(){return new e({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(e,t,r,n,i){uh(e,t,r,n,i,4)}setPixel(e,t,r){let n=4*(e*this.width+t);this.data[n+0]=Math.round(255*r.r/r.a),this.data[n+1]=Math.round(255*r.g/r.a),this.data[n+2]=Math.round(255*r.b/r.a),this.data[n+3]=Math.round(255*r.a)}};function ph(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=4){let n=e[r+3];t[r+0]=Math.round(e[r+0]*n/255),t[r+1]=Math.round(e[r+1]*n/255),t[r+2]=Math.round(e[r+2]*n/255),t[r+3]=n}return t}function fh(e){let t={},r=e.resolution||256,n=e.clips?e.clips.length:1,i=e.image||new hh({width:r,height:n});if(!at(r))throw Error(`width is not a power of 2 - ${r}`);let a=(n,a,o)=>{t[e.evaluationKey]=o;let s=e.expression.evaluate(t);i.setPixel(n/4/r,a/4,s)};if(e.clips)for(let t=0,i=0;t<n;++t,i+=4*r)for(let n=0,o=0;n<r;n++,o+=4){let s=n/(r-1),{start:l,end:u}=e.clips[t];a(i,o,l*(1-s)+u*s)}else for(let e=0,t=0;e<r;e++,t+=4){a(0,t,e/(r-1))}return i}
1178Ps("AlphaImage",ch),Ps("RGBAImage",hh);const dh="big-fb",yh=e=>"heatmap"===e.type;var mh=class extends Sl{createBucket(e){return new ih(e)}constructor(e,t){super(e,oh,t),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(e){"heatmap-color"===e&&this._updateColorRamp()}_updateColorRamp(){let e=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=fh({expression:e,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has("big-fb")&&this.heatmapFbos.delete(dh)}queryRadius(e){return Rc("heatmap-radius",this,e)}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){return Hc({queryGeometry:e,size:this.paint.get("heatmap-radius").evaluate(t,r)*a,transform:i,unwrappedTileID:o,getElevation:s},n)}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&!this.isHidden()}};let gh;var xh={get paint(){return gh||=new _l({"hillshade-illumination-direction":new gl(mr.paint_hillshade["hillshade-illumination-direction"],"hillshade-illumination-direction"),"hillshade-illumination-altitude":new gl(mr.paint_hillshade["hillshade-illumination-altitude"],"hillshade-illumination-altitude"),"hillshade-illumination-anchor":new gl(mr.paint_hillshade["hillshade-illumination-anchor"],"hillshade-illumination-anchor"),"hillshade-exaggeration":new gl(mr.paint_hillshade["hillshade-exaggeration"],"hillshade-exaggeration"),"hillshade-shadow-color":new gl(mr.paint_hillshade["hillshade-shadow-color"],"hillshade-shadow-color"),"hillshade-highlight-color":new gl(mr.paint_hillshade["hillshade-highlight-color"],"hillshade-highlight-color"),"hillshade-accent-color":new gl(mr.paint_hillshade["hillshade-accent-color"],"hillshade-accent-color"),"hillshade-method":new gl(mr.paint_hillshade["hillshade-method"],"hillshade-method"),resampling:new gl(mr.paint_hillshade.resampling,"resampling")})}};const bh=e=>"hillshade"===e.type;var vh=class extends Sl{constructor(e,t){super(e,xh,t),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let e=this.paint.get("hillshade-illumination-direction").values,t=this.paint.get("hillshade-illumination-altitude").values,r=this.paint.get("hillshade-highlight-color").values,n=this.paint.get("hillshade-shadow-color").values,i=Math.max(e.length,t.length,r.length,n.length);e=e.concat(Array(i-e.length).fill(e.at(-1))),t=t.concat(Array(i-t.length).fill(t.at(-1))),r=r.concat(Array(i-r.length).fill(r.at(-1))),n=n.concat(Array(i-n.length).fill(n.at(-1)));let a=t.map(Ct);return{directionRadians:e.map(Ct),altitudeRadians:a,shadowColor:n,highlightColor:r}}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&!this.isHidden()}};let wh;var _h={get paint(){return wh||=new _l({"color-relief-opacity":new gl(mr["paint_color-relief"]["color-relief-opacity"],"color-relief-opacity"),"color-relief-color":new wl(mr["paint_color-relief"]["color-relief-color"],"color-relief-color"),resampling:new gl(mr["paint_color-relief"].resampling,"resampling")})}};function Ah(e){return"data"in e}var Dh=class{constructor(e,t,r,n){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this._ownedHandle=this.texture,this.update(t,n)}update(e,t,r){let{width:n,height:i}=e,a=(this.size?.[0]!==n||this.size[1]!==i)&&!r,{context:o}=this,{gl:s}=o;this.useMipmap=!!t?.useMipmap,a&&this.size&&this.format===s.RGBA&&(s.deleteTexture(this.texture),this.texture=s.createTexture(),this._ownedHandle=this.texture,this.magFilter=void 0,this.minFilter=void 0,this.wrap=void 0),s.bindTexture(s.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1);let l=this.format===s.RGBA&&!1!==t?.premultiply;if(a)if(this.size=[n,i],this.format===s.RGBA&&n>0&&i>0){let t=this.useMipmap?Math.floor(Math.log2(Math.max(n,i)))+1:1;if(s.texStorage2D(s.TEXTURE_2D,t,s.RGBA8,n,i),Ah(e)){o.pixelStoreUnpackPremultiplyAlpha.set(!1);let{data:t}=e;l&&t&&(t=ph(t)),t&&s.texSubImage2D(s.TEXTURE_2D,0,0,0,n,i,s.RGBA,s.UNSIGNED_BYTE,t)}else o.pixelStoreUnpackPremultiplyAlpha.set(l),s.texSubImage2D(s.TEXTURE_2D,0,0,0,s.RGBA,s.UNSIGNED_BYTE,e)}else Ah(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(e,l,n,i,s)
1178):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._uploadDomImage(e,s));else{let{x:t,y:a}=r||{x:0,y:0};Ah(e)?(o.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(e,l,t,a,n,i,s)):(o.pixelStoreUnpackPremultiplyAlpha.set(l),this._updateDomImage(e,t,a,s))}this.useMipmap&&!(Ah(e)&&null===e.data)&&s.generateMipmap(s.TEXTURE_2D),o.pixelStoreUnpackFlipY.setDefault(),o.pixelStoreUnpack.setDefault(),o.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(e,t){t.texImage2D(t.TEXTURE_2D,0,this.format,this.format,t.UNSIGNED_BYTE,e)}_uploadRawData(e,t,r,n,i){let{data:a}=e;t&&a&&(a=ph(a)),i.texImage2D(i.TEXTURE_2D,0,this.format,r,n,0,this.format,i.UNSIGNED_BYTE,a)}_updateDomImage(e,t,r,n){n.texSubImage2D(n.TEXTURE_2D,0,t,r,n.RGBA,n.UNSIGNED_BYTE,e)}_updateRawData(e,t,r,n,i,a,o){let{data:s}=e;t&&s&&(s=ph(s)),o.texSubImage2D(o.TEXTURE_2D,0,r,n,i,a,o.RGBA,o.UNSIGNED_BYTE,s)}bind(e,t,r){let{context:n}=this,{gl:i}=n;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),i.bindTexture(i.TEXTURE_2D,this.texture),(r===i.LINEAR_MIPMAP_NEAREST||r===i.LINEAR_MIPMAP_LINEAR)&&!this.useMipmap&&(r=i.LINEAR);let a=r||e;e!==this.magFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),this.magFilter=e),a!==this.minFilter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,a),this.minFilter=a),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}generateMipmap(){if(!this.useMipmap)return;let{gl:e}=this.context;e.bindTexture(e.TEXTURE_2D,this.texture),e.generateMipmap(e.TEXTURE_2D)}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}},Sh=(l=class e{constructor(t,r,n,i=1,a=1,o=1,s=0){if(this.uid=t,r.height!==r.width)throw RangeError("DEM tiles must be square");if(n&&!["mapbox","terrarium","custom"].includes(n))return void yt(`"${n}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=r.height;let l=this.dim=r.height-4;switch(this.data=new Uint32Array(r.data.buffer),e.byteViewCache.set(this,new Uint8Array(this.data.buffer)),n){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=.00390625,this.baseShift=32768;break;case"custom":this.redFactor=i,this.greenFactor=a,this.blueFactor=o,this.baseShift=s;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let e=-2;e<l+2;e++){let t=this._idx(0,Math.max(0,Math.min(l-1,e)));(e<0||e>=l)&&this.data.copyWithin(this._idx(0,e),t,t+l),this.data.fill(this.data[t],this._idx(-2,e),this._idx(0,e)),this.data.fill(this.data[t+l-1],this._idx(l,e),this._idx(l+1,e)+1)}let u=this._getByteView();this.min=9007199254740991,this.max=-9007199254740991;for(let e=0;e<l;e++)for(let t=0;t<l;t++){let r=4*this._idx(e,t),n=this._unpackAtIndex(u,r);n>this.max&&(this.max=n),n<this.min&&(this.min=n)}}get(e,t){let r=this._getByteView(),n=4*this._idx(e,t);return this._unpackAtIndex(r,n)}sampleBilinear(e,t){let r=Math.floor(e),n=Math.floor(t);if(r<-1||r>=this.dim||n<-1||n>=this.dim)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);let i=this._getByteView(),a=4*((n+2)*this.stride+r+2),o=4*this.stride,s=e-r,l=t-n;return this._unpackAtIndex(i,a)*(1-s)*(1-l)+this._unpackAtIndex(i,a+4)*s*(1-l)+this._unpackAtIndex(i,a+o)*(1-s)*l+this._unpackAtIndex(i,a+o+4)*s*l}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(e,t){if(e<-2||e>=this.dim+2||t<-2||t>=this.dim+2)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);return(t+2)*this.stride+(e+2)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}pack(e){return Eh(e,this.getUnpackVector())}getPixels(){return new hh({width:this.stride,height:this.stride},this._getByteView())}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case-1:n=i-2;break;case 1:i=n+2}switch(r){case-1:a=o-2;break;case 1:o=a+2}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t<o;t++)for(let r=n;r<i;r++)this.data[this._idx(r,t)]=e.data[this._idx(r+s,t+l)]}_getByteView(){let t=e.byteViewCache.get(this);return t?.buffer!==this.data.buffer&&(t=new Uint8Array(this.data.buffer),e.byteViewCache.set(this,t)),t}_unpackAtIndex(e,t){return this.unpack(e[t],e[t+1],e[t+2])}},l.byteViewCache=new WeakMap,l);function Eh(e,t){let r=t[0],n=t[1],i=t[2],a=t[3],o=Math.min(r,n,i),s=Math.round((e+a)/o);return{r:Math.floor(s*o/r)%256,g:Math.floor(s*o/n)%256,b:Math.floor(s*o/i)%256}}Ps("DEMData",Sh);const Fh=e=>"color-relief"===e.type;var Ph=class extends Sl{constructor(e,t){super(e,_h,t)}_createColorRamp(e){let t={elevationStops:[],colorStops:[]},r=this._transitionablePaint._values["color-relief-color"].value.expression;if(r instanceof Qa&&r._styleExpression.expression instanceof $n){this.colorRampExpression=r;let e=r._styleExpression.expression;t.elevationStops=e.labels,t.colorStops=[];for(let r of t.elevationStops)t.colorStops.push(e.evaluate({globals:{elevation:r}}))}if(t.elevationStops.length<1&&(t.elevationStops=[0],t.colorStops=[mn.transparent]),t.elevationStops.length<2&&(t.elevationStops.push(t.elevationStops[0]+1),t.colorStops.push(t.colorStops[0])),t.elevationStops.length<=e)return t;let n={elevationStops:[],colorStops:[]},i=(t.elevationStops.length-1)/(e-1);for(let e=0;e<t.elevationStops.length-.5;e+=i)n.elevationStops.push(t.elevationStops[Math.round(e)]),n.colorStops.push(t.colorStops[Math.round(e)]);return yt(`Too many colors in specification of ${this.id}
1178 color-relief layer, may not render properly. Max possible colors: ${e}, provided: ${t.elevationStops.length}`),n}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(e,t,r){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;let n=this._createColorRamp(t),i=new hh({width:n.colorStops.length,height:1}),a=new hh({width:n.colorStops.length,height:1});for(let e=0;e<n.elevationStops.length;e++){let t=Eh(n.elevationStops[e],r);a.setPixel(0,e,new mn(t.r/255,t.g/255,t.b/255,1)),i.setPixel(0,e,n.colorStops[e])}return this.colorRampTextures={elevationTexture:new Dh(e,a,e.gl.RGBA),colorTexture:new Dh(e,i,e.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}};const kh=Cl([{name:"a_pos",components:2,type:"Int16"}],4),Th=kh.members;function Mh(e,t,r){let n=r.patternDependencies,i=!1;for(let r of t){let t=r.paint.get(`${e}-pattern`);t.isConstant()||(i=!0);let a=t.constantOr(null);a&&(i=!0,n[a.to]=!0,n[a.from]=!0)}return i}function Ih(e,t,r,n,i){let{zoom:a}=n,o=i.patternDependencies;for(let n of t){let t=n.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:a-1},r,{},i.availableImages),s=t.evaluate({zoom:a},r,{},i.availableImages),l=t.evaluate({zoom:a+1},r,{},i.availableImages);e=e?.name?e.name:e,s=s?.name?s.name:s,l=l?.name?l.name:l,o[e]=!0,o[s]=!0,o[l]=!0,r.patterns[n.id]={min:e,mid:s,max:l}}}return r}kh.size,kh.alignment;const Ch=new Set;let Oh=!1;function Bh(e,t,r=2){let n=t&&t.length,i=n?t[0]*r:e.length;Ch.size&&Ch.clear();let a=zh(e,0,i,r,!0),o=[];if(!a||a.next===a.prev)return o;let s=0,l=0,u=0;if(n&&(a=qh(e,t,a,r)),e.length>80*r){s=e[0],l=e[1];let t=s,n=l;for(let a=r;a<i;a+=r){let r=e[a],i=e[a+1];r<s&&(s=r),i<l&&(l=i),r>t&&(t=r),i>n&&(n=i)}u=Math.max(t-s,n-l),u=0===u?0:32767/u}return Lh(a,o,s,l,u),o}function zh(e,t,r,n,i){let a=null;if(i===Fp(e,t,r,n)>0)for(let i=t;i<r;i+=n)a=Dp(i/n|0,e[i],e[i+1],a);else for(let i=r-n;i>=t;i-=n)a=Dp(i/n|0,e[i],e[i+1],a);return a&&gp(a,a.next)&&(Sp(a),a=a.next),a}function Vh(e,t=e){let r,n=t===e,i=e;do{r=!1,i===i.next||0!==Ch.size&&Ch.has(i)||!gp(i,i.next)&&0!==mp(i.prev,i,i.next)?(n||i!==t)&&(i=i.next,r=!n):((n||i===t)&&(t=i.prev),Oh=!0,Sp(i),i=i.prev,r=!0)}while(r||i!==t);return t}function Lh(e,t,r,n,i){i&&up(e,r,n,i);let a=e,o=!1;for(;e.prev!==e.next;){let s=e.prev,l=e.next;if(mp(s,e,l)<0&&(i?jh(e,r,n,i):$h(e)))t.push(s.i,e.i,l.i),Sp(e),e=l,a=l;else if((e=l)===a){if(Oh=!1,e=Vh(e),Oh){a=e;continue}if(!o){a=e=Rh(e,t),o=!0;continue}Nh(e,t,r,n,i);break}}}function $h(e){let t=e.prev,r=e,n=e.next,i=t.x,a=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=Math.min(i,a,o),h=Math.min(s,l,u),p=Math.max(i,a,o),f=Math.max(s,l,u),d=n.next;for(;d!==t;){if(d.x>=c&&d.x<=p&&d.y>=h&&d.y<=f&&(i!==d.x||s!==d.y)&&dp(i,s,a,l,o,u,d.x,d.y)&&mp(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function jh(e,t,r,n){let i=e.prev,a=e,o=e.next,s=i.x,l=a.x,u=o.x,c=i.y,h=a.y,p=o.y,f=Math.min(s,l,u),d=Math.min(c,h,p),y=Math.max(s,l,u),m=Math.max(c,h,p),g=pp(f,d,t,r,n),x=pp(y,m,t,r,n),b=e.prevZ;for(;b&&b.z>=g;){if(b.x>=f&&b.x<=y&&b.y>=d&&b.y<=m&&b!==o&&(s!==b.x||c!==b.y)&&dp(s,c,l,h,u,p,b.x,b.y)&&mp(b.prev,b,b.next)>=0)return!1;b=b.prevZ}let v=e.nextZ;for(;v&&v.z<=x;){if(v.x>=f&&v.x<=y&&v.y>=d&&v.y<=m&&v!==o&&(s!==v.x||c!==v.y)&&dp(s,c,l,h,u,p,v.x,v.y)&&mp(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function Rh(e,t){let r=e,n=!1;do{let i=r.prev,a=r.next.next;xp(i,r,r.next,a,!1)&&wp(i,a)&&wp(a,i)&&(t.push(i.i,r.i,a.i),Sp(r),Sp(r.next),r=e=a,n=!0),r=r.next}while(r!==e);return n?Vh(r):r}function Nh(e,t,r,n,i){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&yp(a,e)){let o=Ap(a,e);return a=Vh(a,a.next),o=Vh(o,o.next),Lh(a,t,r,n,i),void Lh(o,t,r,n,i)}e=e.next}a=a.next}while(a!==e)}let Uh=!1;function qh(e,t,r,n){let i=[];for(let r=0,a=t.length;r<a;r++){let o=zh(e,t[r]*n,r<a-1?t[r+1]*n:e.length,n,!1);o===o.next&&Ch.add(o),i.push(fp(o))}i.sort(Gh),Kh(e.length/n,t.length),Jh(r,r),Uh=!0;for(let e=0;e<i.length;e++)r=Yh(i[e],r);return Uh=!1,Vh(r)}function Gh(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function Yh(e,t){let r=rp(e,t);if(!r)return t;let n=Ap(r,e);return Jh(r,n.next.next),Vh(n,n.next),Vh(r,r.next)}let Xh=new Float64Array,Zh=0;const Wh=[],Hh=[];function Kh(e,t){let r=Math.ceil((e+2*t)/16)+t+2;Xh.length<4*r&&(Xh=new Float64Array(4*r)),Zh=0}function Jh(e,t){let r=e;do{let e=Zh++;Wh[e]=r;let n=1/0,i=1/0,a=-1/0,o=-1/0,s=0;do{let t=r.next;r.z=e,r.x<n&&(n=r.x),r.x>
1178a&&(a=r.x),r.y<i&&(i=r.y),r.y>o&&(o=r.y),t.x<n&&(n=t.x),t.x>a&&(a=t.x),t.y<i&&(i=t.y),t.y>o&&(o=t.y),r=t}while(++s<16&&r!==t);Hh[e]=r;let l=4*e;Xh[l]=n,Xh[l+1]=i,Xh[l+2]=a,Xh[l+3]=o}while(r!==t)}function Qh(e,t){let r=4*e.z;t.x<Xh[r]&&(Xh[r]=t.x),t.y<Xh[r+1]&&(Xh[r+1]=t.y),t.x>Xh[r+2]&&(Xh[r+2]=t.x),t.y>Xh[r+3]&&(Xh[r+3]=t.y)}function ep(e){let t=Hh[e];for(;t.prev.next!==t;)t=t.next;return Hh[e]=t,t}function tp(e){let t=Wh[e];for(;t.prev.next!==t;)t=t.next;return Wh[e]=t,t}function rp(e,t){let r,n=t,i=e.x,a=e.y,o=-1/0;if(gp(e,n))return n;for(let t=0,s=0;t<Zh;t++,s+=4){if(a<Xh[s+1]||a>Xh[s+3]||Xh[s]>i||Xh[s+2]<=o)continue;let l=ep(t);n=tp(t);do{if(n.prev.next===n){if(gp(e,n.next))return n.next;if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){let e=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=i&&e>o&&(o=e,r=n.x<n.next.x?n:n.next,e===i))return r}}n=n.next}while(n!==l)}if(!r)return null;let s=r.x,l=r.y,u=Math.min(a,l),c=Math.max(a,l),h=1/0;for(let t=0,p=0;t<Zh;t++,p+=4){if(Xh[p+2]<s||Xh[p]>i||Xh[p+3]<u||Xh[p+1]>c)continue;let f=ep(t);n=tp(t);do{if(n.prev.next===n&&i>=n.x&&n.x>=s&&i!==n.x&&dp(a<l?i:o,a,s,l,a<l?o:i,a,n.x,n.y)){let t=Math.abs(a-n.y)/(i-n.x);(wp(n,e)||n.y===a&&n.next.y===a&&n.next.x>i)&&(t<h||t===h&&(n.x>r.x||n.x===r.x&&np(r,n)))&&(r=n,h=t)}n=n.next}while(n!==f)}return r}function np(e,t){return mp(e.prev,e,t.prev)<0&&mp(t.next,e,e.next)<0}const ip=[];let ap=[],op=new Uint32Array,sp=new Uint32Array;const lp=new Uint32Array(256);function up(e,t,r,n){let i=e,a=0;do{i.z=pp(i.x,i.y,t,r,n),ip[a++]=i,i=i.next}while(i!==e);cp(a);let o=null;for(let e=0;e<a;e++){let t=ip[e];t.prevZ=o,o&&(o.nextZ=t),o=t}o.nextZ=null}function cp(e){if(e<=32)for(let t=1;t<e;t++){let e=ip[t],r=e.z,n=t-1;for(;n>=0&&ip[n].z>r;)ip[n+1]=ip[n],n--;ip[n+1]=e}else{op.length<e&&(op=new Uint32Array(e),sp=new Uint32Array(e),ap=Array(e));for(let t=0;t<e;t++)op[t]=ip[t].z;hp(e,ip,op,ap,sp,0),hp(e,ap,sp,ip,op,8),hp(e,ip,op,ap,sp,16),hp(e,ap,sp,ip,op,24)}}function hp(e,t,r,n,i,a){lp.fill(0);for(let t=0;t<e;t++)lp[r[t]>>>a&255]++;let o=0;for(let e=0;e<256;e++){let t=lp[e];lp[e]=o,o+=t}for(let o=0;o<e;o++){let e=r[o],s=lp[e>>>a&255]++;n[s]=t[o],i[s]=e}}function pp(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function fp(e){let t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function dp(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function yp(e,t){let r=gp(e,t)&&mp(e.prev,e,e.next)>0&&mp(t.prev,t,t.next)>0;return e.next.i!==t.i&&(r||wp(e,t)&&wp(t,e)&&(0!==mp(e.prev,e,t.prev)||0!==mp(e,t.prev,t)))&&!vp(e,t)&&(r||_p(e,t))}function mp(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function gp(e,t){return e.x===t.x&&e.y===t.y}function xp(e,t,r,n,i=!0){let a=mp(e,t,r),o=mp(e,t,n),s=mp(r,n,e),l=mp(r,n,t);return(a>0&&o<0||a<0&&o>0)&&(s>0&&l<0||s<0&&l>0)||!!i&&!!(0===a&&bp(e,r,t)||0===o&&bp(e,n,t)||0===s&&bp(r,e,n)||0===l&&bp(r,t,n))}function bp(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function vp(e,t){let r=Math.min(e.x,t.x),n=Math.max(e.x,t.x),i=Math.min(e.y,t.y),a=Math.max(e.y,t.y),o=e;do{let s=o.next;if(o.x>n&&s.x>n||o.x<r&&s.x<r||o.y>a&&s.y>a||o.y<i&&s.y<i)o=s;else{if(o.i!==e.i&&s.i!==e.i&&o.i!==t.i&&s.i!==t.i&&xp(o,s,e,t))return!0;o=s}}while(o!==e);return!1}function wp(e,t){return mp(e.prev,e,e.next)<0?mp(e,t,e.next)>=0&&mp(e,e.prev,t)>=0:mp(e,t,e.prev)<0||mp(e,e.next,t)<0}function _p(e,t){let r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{let e=r.next;r.y>a!=e.y>a&&i<(e.x-r.x)*(a-r.y)/(e.y-r.y)+r.x&&(n=!n),r=e}while(r!==e);return n}function Ap(e,t){let r=Ep(e.i,e.x,e.y),n=Ep(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Dp(e,t,r,n){let i=Ep(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Sp(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),Uh&&Qh(e.prev,e.
1178next)}function Ep(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Fp(e,t,r,n){let i=0;for(let a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}var Pp=class{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){let t=1<<e;return Math.max(Math.floor(this._baseZoomGranularity/t),this._minGranularity,1)}},kp=(u=class{constructor(e){this.fill=e.fill,this.line=e.line,this.tile=e.tile,this.stencil=e.stencil,this.circle=e.circle}},u.noSubdivision=new u({fill:new Pp(0,0),line:new Pp(0,0),tile:new Pp(0,0),stencil:new Pp(0,0),circle:1}),u);Ps("SubdivisionGranularityExpression",Pp),Ps("SubdivisionGranularitySetting",kp);const Tp=-32768,Mp=32767;var Ip=class{constructor(e,t){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=e,this._granularityCellSize=ke/e,this._canonical=t}_getKey(e,t){return(e+=32768)<<16|(t+=32768)}_vertexToIndex(e,t){if(e<-32768||t<-32768||e>32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=0|Math.round(e),n=0|Math.round(t),i=this._getKey(r,n);if(this._vertexDictionary.has(i))return this._vertexDictionary.get(i);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(i,a),this._vertexBuffer.push(r,n),a}_subdivideTrianglesScanline(e){if(this._granularity<2)return zp(this._vertexBuffer,e);let t=[],r=e.length;for(let n=0;n<r;n+=3){let r=[e[n+0],e[n+1],e[n+2]],i=[this._vertexBuffer[2*e[n+0]+0],this._vertexBuffer[2*e[n+0]+1],this._vertexBuffer[2*e[n+1]+0],this._vertexBuffer[2*e[n+1]+1],this._vertexBuffer[2*e[n+2]+0],this._vertexBuffer[2*e[n+2]+1]],a=1/0,o=1/0,s=-1/0,l=-1/0;for(let e=0;e<3;e++){let t=i[2*e],r=i[2*e+1];a=Math.min(a,t),s=Math.max(s,t),o=Math.min(o,r),l=Math.max(l,r)}if(a===s||o===l)continue;let u=Math.floor(a/this._granularityCellSize),c=Math.ceil(s/this._granularityCellSize),h=Math.floor(o/this._granularityCellSize),p=Math.ceil(l/this._granularityCellSize);if(u!==c||h!==p)for(let e=h;e<p;e++){let n=this._scanlineGenerateVertexRingForCellRow(e,i,r);Vp(this._vertexBuffer,n,t)}else t.push(...r)}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let n=e*this._granularityCellSize,i=n+this._granularityCellSize,a=[];for(let e=0;e<3;e++){let o=t[2*e],s=t[2*e+1],l=t[2*(e+1)%6],u=t[(2*(e+1)+1)%6],c=t[2*(e+2)%6],h=t[(2*(e+2)+1)%6],p=l-o,f=u-s,d=0===p,y=0===f,m=(n-s)/f,g=(i-s)/f,x=Math.min(m,g),b=Math.max(m,g);if(!y&&(x>=1||b<=0)||y&&(s<n||s>i)){u>=n&&u<=i&&a.push(r[(e+1)%3]);continue}if(!y&&x>0){let e=o+p*x,t=s+f*x;a.push(this._vertexToIndex(e,t))}let v=o+p*Math.max(x,0),w=o+p*Math.min(b,1);if(d||this._generateIntraEdgeVertices(a,o,s,l,u,v,w),!y&&b<1){let e=o+p*b,t=s+f*b;a.push(this._vertexToIndex(e,t))}(y||u>=n&&u<=i)&&a.push(r[(e+1)%3]),!y&&(u<=n||u>=i)&&this._generateInterEdgeVertices(a,o,s,l,u,c,h,w,n,i)}return a}_generateIntraEdgeVertices(e,t,r,n,i,a,o){let s=n-t,l=i-r,u=0===l,c=u?Math.min(t,n):Math.min(a,o),h=u?Math.max(t,n):Math.max(a,o),p=Math.floor(c/this._granularityCellSize)+1,f=Math.ceil(h/this._granularityCellSize)-1;if(u?t<n:a<o)for(let n=p;n<=f;n++){let i=n*this._granularityCellSize,a=r+l*(i-t)/s;e.push(this._vertexToIndex(i,a))}else for(let n=f;n>=p;n--){let i=n*this._granularityCellSize,a=r+l*(i-t)/s;e.push(this._vertexToIndex(i,a))}}_generateInterEdgeVertices(e,t,r,n,i,a,o,s,l,u){let c=i-r,h=a-n,p=o-i,f=(l-i)/p,d=(u-i)/p,y=Math.min(f,d),m=Math.max(f,d),g=n+h*y,x=Math.floor(Math.min(g,s)/this._granularityCellSize)+1,b=Math.ceil(Math.max(g,s)/this._granularityCellSize)-1,v=s<g,w=0===p;if(w&&(o===l||o===u))return;if(w||y>=1||m<=0){let e=r-o,n=(l-o)/e,i=(u-o)/e,c=a+(t-a)*Math.min(n,i);x=Math.floor(Math.min(c,s)/this._granularityCellSize)+1,b=Math.ceil(Math.max(c,s)/this._granularityCellSize)-1,v=s<c}let _=c>0?u:l;if(v)for(let t=x;t<=b;t++){let r=t*this._granularityCellSize;e.push(this._vertexToIndex(r,_))}else for(let t=b;t>=x;t--){let r=t*this._granularityCellSize;e.push(this._vertexToIndex(r,_))}}_generateOutline(e){let t=[];for(let r of e){let e=Op(r,this._granularity,!0),n=this._pointArrayToIndices(e),i=[];for(let e=1;e<n.length;e++)i.push(n[e-1]),i.push(n[e]);t.push(i)}return t}_handlePoles(e){let t=!1,r=!1;this._canonical&&(0===this._canonical.y&&(t=!0),this._canonical.y===(1<<this._canonical.z)-1&&(r=!0)),(t||r)&&this._fillPoles(e,t,r)}_ensureNoPoleVertices(){let e=this._vertexBuffer;for(let t=0;t<e.length;t+=2){let r=e[t+1];-32768===r&&(e[t+1]=-32767),32767===r&&(e[t+1]=32766)}}_generatePoleQuad(e,t,r,n,i,a){n>
1178i==(-32768===a)?(e.push(r),e.push(t),e.push(this._vertexToIndex(n,a)),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a))):(e.push(t),e.push(r),e.push(this._vertexToIndex(n,a)),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(this._vertexToIndex(n,a)))}_fillPoles(e,t,r){let n=this._vertexBuffer,i=ke,a=e.length;for(let o=2;o<a;o+=3){let a=e[o-2],s=e[o-1],l=e[o],u=n[2*a],c=n[2*a+1],h=n[2*s],p=n[2*s+1],f=n[2*l],d=n[2*l+1];t&&(0===c&&0===p&&this._generatePoleQuad(e,a,s,u,h,Tp),0===p&&0===d&&this._generatePoleQuad(e,s,l,h,f,Tp),0===d&&0===c&&this._generatePoleQuad(e,l,a,f,u,Tp)),r&&(c===i&&p===i&&this._generatePoleQuad(e,a,s,u,h,Mp),p===i&&d===i&&this._generatePoleQuad(e,s,l,h,f,Mp),d===i&&c===i&&this._generatePoleQuad(e,l,a,f,u,Mp))}}_initializeVertices(e){for(let t=0;t<e.length;t+=2)this._vertexToIndex(e[t],e[t+1])}subdividePolygonInternal(e,t){if(this._used)throw Error("Subdivision: multiple use not allowed.");this._used=!0;let r,{flattened:n,holeIndices:i}=Bp(e);this._initializeVertices(n);try{let e=Bh(n,i),t=this._convertIndices(n,e);r=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let a=[];return t&&(a=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(r),this._granularity>=2&&0===this._canonical?.z&&(r=this._removeTrianglesOutsideTileX(r),a=a.map(e=>this._removeLinesOutsideTileX(e))),{verticesFlattened:this._vertexBuffer,indicesTriangles:r,indicesLineList:a}}_vertexOutsideTileX(e){let t=this._vertexBuffer[2*e];return t<0||t>8192}_removeTrianglesOutsideTileX(e){let t=[];for(let r=0;r<e.length;r+=3)this._vertexOutsideTileX(e[r])||this._vertexOutsideTileX(e[r+1])||this._vertexOutsideTileX(e[r+2])||t.push(e[r],e[r+1],e[r+2]);return t}_removeLinesOutsideTileX(e){let t=[];for(let r=0;r<e.length;r+=2)this._vertexOutsideTileX(e[r])||this._vertexOutsideTileX(e[r+1])||t.push(e[r],e[r+1]);return t}_convertIndices(e,t){let r=[];for(let n of t){let t=e[2*n],i=e[2*n+1];r.push(this._vertexToIndex(t,i))}return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}};function Cp(e,t,r,n=!0){return new Ip(r,t).subdividePolygonInternal(e,n)}function Op(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let n=e[0],i=e[e.length-1],a=r&&(n.x!==i.x||n.y!==i.y);if(t<2)return a?[...e,e[0]]:[...e];let o=Math.floor(ke/t),s=[];s.push(new x(e[0].x,e[0].y));let l=e.length,u=a?l:l-1;for(let t=0;t<u;t++){let r=e[t],n=t<l-1?e[t+1]:e[0],i=r.x,a=r.y,u=n.x,c=n.y,h=i!==u,p=a!==c;if(!h&&!p)continue;let f=u-i,d=c-a,y=Math.abs(f),m=Math.abs(d),g=i,b=a;for(;;){let e=f>0?(Math.floor(g/o)+1)*o:(Math.ceil(g/o)-1)*o,t=d>0?(Math.floor(b/o)+1)*o:(Math.ceil(b/o)-1)*o,r=Math.abs(g-e),n=Math.abs(b-t),i=Math.abs(g-u),a=Math.abs(b-c),l=h?r/y:1/0,v=p?n/m:1/0;if((i<=r||!h)&&(a<=n||!p))break;if(l<v&&h||!p){g=e,b+=d*l;let t=new x(g,Math.round(b));(s[s.length-1].x!==t.x||s[s.length-1].y!==t.y)&&s.push(t)}else{g+=f*v,b=t;let e=new x(Math.round(g),b);(s[s.length-1].x!==e.x||s[s.length-1].y!==e.y)&&s.push(e)}}let v=new x(u,c);(s[s.length-1].x!==v.x||s[s.length-1].y!==v.y)&&s.push(v)}return s}function Bp(e){let t=[],r=[];for(let n of e)if(0!==n.length){n!==e[0]&&t.push(r.length/2);for(let e of n)r.push(e.x),r.push(e.y)}return{flattened:r,holeIndices:t}}function zp(e,t){let r=[];for(let n=0;n<t.length;n+=3){let i=t[n],a=t[n+1],o=t[n+2],s=e[2*i],l=e[2*i+1],u=e[2*a],c=e[2*a+1],h=e[2*o];(u-s)*(e[2*o+1]-l)-(c-l)*(h-s)>0?(r.push(i),r.push(o),r.push(a)):(r.push(i),r.push(a),r.push(o))}return r}function Vp(e,t,r){if(0===t.length)throw Error("Subdivision vertex ring is empty.");let n=0,i=e[2*t[0]];for(let r=1;r<t.length;r++){let a=e[2*t[r]];a<i&&(i=a,n=r)}let a=t.length,o=n,s=(o+1)%a;for(;;){let n=o-1>=0?o-1:a-1,i=(s+1)%a,l=e[2*t[n]],u=e[2*t[n]+1],c=e[2*t[i]],h=e[2*t[i]+1],p=e[2*t[o]],f=e[2*t[o]+1],d=e[2*t[s]],y=e[2*t[s]+1],m=!1;if(l<c)m=!0;else if(l>c)m=!1;else{let e=y-f,t=-(d-p),r=f<y?1:-1;((l-p)*e+(u-f)*t)*r>((c-p)*e+(h-f)*t)*r&&(m=!0)}if(m){let e=t[n],i=t[o],l=t[s];e!==i&&e!==l&&i!==l&&r.push(l,i,e),o--,o<0&&(o=a-1)}else{let e=t[i],n=t[o],l=t[s];e!==n&&e!==l&&n!==l&&r.push(l,n,e),s++,s>=a&&(s=0)}if(n===i)break}}function Lp(e,t,r,n,i,a,o,s,l){let u=i.length/2,c=o&&s&&l;if(u<ju.MAX_VERTEX_ARRAY_LENGTH){let h,p,f=t.prepareSegment(u,r,n),d=f.vertexLength;for(let e=0;e<a.length;e+=3)n.emplaceBack(d+a[e],d+a[e+1],d+a[e+2]);f.vertexLength+=u,f.primitiveLength+=a.length/3,c&&(p=o.prepareSegment(u,r,s),h=p.vertexLength,p.vertexLength+=u);for(let t=0;t<i.length;t+=2)e(i[t],i[t+1]);if(c)for(let e of l){for(let t=1;t<e.length;t+=2)s.emplaceBack(h+e[t-1],h+e[t]);p.primitiveLength+=e.length/2}}else jp(t,r,n,i,a,e),c&&Rp(o,r,s,i,l,e),t.forceNewSegmentOnNextPrepare(),o?.forceNewSegmentOnNextPrepare()}function $p(e,t,r,n,i,a,o){if(a){let a=n.count;return r(t[2*i],t[2*i+1]),e[i]=n.count,n.count++,o.vertexLength++,a}return e[i]}function jp(e,t,r,n,i,a){let o=[];for(let e=0;e<n.length/2;e++)o.push(-1);let s={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),c=u.vertexLength;for(let h=2;h<i.length;h+=3){let p=i[h-2],f=i[h-1],d=i[h],y=o[p]<l,m=o[f]<l,g=o[d]<l,x=+!!y+ +!!m+ +!!g;u.vertexLength+x>ju.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,y=!0,m=!0,g=!0,c=0);let b=$p(o,n,a,s,p,y,u),v=$p(o,n,a,s,f,m,u),w=$p(o,n,a,s,d,g,u);r.emplaceBack(c+b-l,c+v-l,c+w-l),u.primitiveLength++}}function Rp(e,t,r,n,i,a){let o=[];for(let e=0;e<n.length/2;e++)o.push(-1);let s={count:0},l=0,u=e.getOrCreateLatestSegment(t,r),c=u.vertexLength;for(let h of i)for(let i=1;i<h.length;i+=2){let p=h[i-1],f=h[i],d=o[p]<l,y=o[f]<l,m=+!!d+ +!!y;u.vertexLength+m>ju.MAX_VERTEX_ARRAY_LENGTH&&(u=e.createNewSegment(t,r),l=s.count,d=!0,y=!0,c=0);let g=$p(o,n,a,s,p,d,u),x=$p(o,n,a,s,f,y,u);r.emplaceBack(c+g-l,c+x-l),u.primitiveLength++}}var Np=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.sdfPatterns={},this.patternFeatures=[],this.layoutVertexArray=new _u,this.indexArray=new Bu,this.indexArray2=new zu,this.programConfigurations=new gc(e.layers,e.zoom),this.segments=new ju,this.segments2=new ju,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=Mh("fill",this.layers,t);let n=this.layers[0].layout.get("fill-sort-key"),i=!n.isConstant(),a=[],o=new il(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:l,id:u,index:c,sourceLayerIndex:h}of e){let e=Dc(l,s);if(!this.layers[0]._featureFilter.filter(o,e,r))continue;let p=i?n.evaluate(e,{},r,t.availableImages):void 0,f={id:u,properties:l.properties,type:l.type,sourceLayerIndex:h,index:c,geometry:s?e.geometry:Ac(l),patterns:{},sortKey:p};a.push(f)}i&&a.sort((e,t)=>
1178e.sortKey-t.sortKey);for(let n of a){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasDependencies){let e=Ih("fill",this.layers,n,{zoom:this.zoom},t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{},t.subdivisionGranularity);let s=e[a].feature;t.featureIndex.insert(s,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures({options:e,canonical:t,patternPositions:r,patternMap:n}){this.detectSdfPatterns(n);for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,e.subdivisionGranularity)}detectSdfPatterns(e){for(let t of this.patternFeatures)for(let r in t.patterns){let n=t.patterns[r];this.recordSdfPattern(r,e[n.min]),this.recordSdfPattern(r,e[n.mid]),this.recordSdfPattern(r,e[n.max])}for(let t of this.layers){let r=t.paint.get("fill-pattern").constantOr(null);r&&(this.recordSdfPattern(t.id,e[r.from.toString()]),this.recordSdfPattern(t.id,e[r.to.toString()]))}}recordSdfPattern(e,t){if(!t)return;let r=!0===t.sdf,n=this.sdfPatterns[e];void 0===n?this.sdfPatterns[e]=r:n!==r&&yt(`Style sheet warning: Cannot mix SDF and non-SDF fill patterns in layer "${e}"`)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Th),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,n,i,a){for(let e of Yn(t,500)){let t=Cp(e,n,a.fill.getGranularityForZoomLevel(n.z)),r=this.layoutVertexArray;Lp((e,t)=>{r.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:i,canonical:n})}};let Up;Ps("FillBucket",Np,{omit:["layers","patternFeatures"]});let qp;var Gp={get paint(){return qp||=new _l({"fill-antialias":new gl(mr.paint_fill["fill-antialias"],"fill-antialias"),"fill-opacity":new xl(mr.paint_fill["fill-opacity"],"fill-opacity"),"fill-layer-opacity":new gl(mr.paint_fill["fill-layer-opacity"],"fill-layer-opacity"),"fill-color":new xl(mr.paint_fill["fill-color"],"fill-color"),"fill-outline-color":new xl(mr.paint_fill["fill-outline-color"],"fill-outline-color"),"fill-translate":new gl(mr.paint_fill["fill-translate"],"fill-translate"),"fill-translate-anchor":new gl(mr.paint_fill["fill-translate-anchor"],"fill-translate-anchor"),"fill-pattern":new bl(mr.paint_fill["fill-pattern"],"fill-pattern")})},get layout(){return Up||=new _l({"fill-sort-key":new xl(mr.layout_fill["fill-sort-key"],"fill-sort-key")})}};const Yp=e=>"fill"===e.type;var Xp=class extends Sl{constructor(e,t){super(e,Gp,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new Np(e)}queryRadius(){return Nc(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:n}){return Tc(Uc(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,n),t)}isTileClipped(){return!0}};const Zp=Cl([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Wp=Cl([{name:"a_centroid",components:2,type:"Int16"}],4),Hp=Zp.members;Zp.size,Zp.alignment;var Kp=class e{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(e){return this.minX=Math.min(this.minX,e.x),this.minY=Math.min(this.minY,e.y),this.maxX=Math.max(this.maxX,e.x),this.maxY=Math.max(this.maxY,e.y),this}expandBy(e){return this.minX-=e,this.minY-=e,this.maxX+=e,this.maxY+=e,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(t){let r=new e;return r.extend(t(new x(this.minX,this.minY))),r.extend(t(new x(this.maxX,this.minY))),r.extend(t(new x(this.minX,this.maxY))),r.extend(t(new x(this.maxX,this.maxY))),r}static fromPoints(t){let r=new e;for(let e of t)r.extend(e);return r}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}};const Jp=Kp.fromPoints([new x(0,0),new x(ke,ke)]);function Qp(e,t){return e.x===t.x&&(e.x<0||e.x>8192)||e.y===t.y&&(e.y<0||e.y>8192)}function ef(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}var tf=class{constructor(e,t,r,n,i){for(this.properties=Object.create(null),this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=i;e.pos<t;){let t=e.readVarint();if(8===t)this.id=e.readVarint();else if(18===t){let t=e.readVarint()+e.pos;for(;e.pos<t;){let t=n[e.readVarint()],r=i[e.readVarint()];this.properties[t]=r}}else 24===t?this.type=e.readVarint():(34===t&&(this._geometry=e.pos),e.skip(t))}}loadGeometry(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t,r=e.readVarint()+e.pos,n=[],i=1,a=0,o=0,s=0;for(;e.pos<r;){if(a<=0){let t=e.readVarint();if(i=7&t,a=t>>3,0===a)continue}if(a--,1===i)o+=e.readSVarint(),s+=e.readSVarint(),t&&n.push(t),t=[new x(o,s)];else if(2===i)o+=e.readSVarint(),s+=e.readSVarint(),t&&t.push(new x(o,s));else{if(7!==i)throw Error(`unknown command ${i}`);t&&t.push(t[0].clone())}}return t&&n.push(t),n}bbox(){if(this._geometry<0)throw Error("feature has no geometry");let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;for(;e.pos<t;){if(n<=0){let t=e.readVarint();if(r=7&t,n=t>>
11783,0===n)continue}if(n--,1===r||2===r)i+=e.readSVarint(),a+=e.readSVarint(),i<o&&(o=i),i>s&&(s=i),a<l&&(l=a),a>u&&(u=a);else if(7!==r)throw Error(`unknown command ${r}`)}return[o,l,s,u]}toGeoJSON(e,t,r){let n,i=this.extent*2**r,a=this.extent*e,o=this.extent*t,s=this.loadGeometry();function l(e){return[360*(e.x+a)/i-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+o)/i)*Math.PI))-90]}function u(e){return e.map(l)}if(1===this.type){let e=[];for(let t of s)e.push(t[0]);let t=u(e);n=1===e.length?{type:"Point",coordinates:t[0]}:{type:"MultiPoint",coordinates:t}}else if(2===this.type){let e=s.map(u);n=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}}else{if(3!==this.type)throw Error("unknown feature type");{let e=rf(s),t=[];for(let r of e)t.push(r.map(u));n=1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}}let c={type:"Feature",geometry:n,properties:this.properties};return null!=this.id&&(c.id=this.id),c}};function rf(e){let t=e.length;if(t<=1)return[e];let r,n,i=[];for(let a=0;a<t;a++){let t=nf(e[a]);0!==t&&(void 0===n&&(n=t<0),n===t<0?(r&&i.push(r),r=[e[a]]):r&&r.push(e[a]))}return r&&i.push(r),i}function nf(e){let t=0;for(let r,n,i=0,a=e.length,o=a-1;i<a;o=i++)r=e[i],n=e[o],t+=(n.x-r.x)*(r.y+n.y);return t}tf.types=["Unknown","Point","LineString","Polygon"];var af=class{constructor(e,t){for(this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],void 0===t&&(t=e.length);e.pos<t;){let t=e.readVarint();10===t?this.name=e.readString():18===t?(this._features.push(e.pos),e.skip(t)):26===t?this._keys.push(e.readString()):34===t?this._values.push(of(e)):40===t?this.extent=e.readVarint():120===t?this.version=e.readVarint():e.skip(t)}this.length=this._features.length}feature(e){if(e<0||e>=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new tf(this._pbf,t,this.extent,this._keys,this._values)}};function of(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos<r;){let r=e.readVarint();t=10===r?e.readString():21===r?e.readFloat():25===r?e.readDouble():32===r?e.readVarint(!0):40===r?e.readVarint():48===r?e.readSVarint():56===r?e.readBoolean():(e.skip(r),null)}if(null==t)throw Error("unknown feature value");return t}var sf=class{constructor(e,t=e.length){let r=Object.create(null);for(;e.pos<t;){let t=e.readVarint();if(26===t){let t=new af(e,e.readVarint()+e.pos);t.length&&(r[t.name]=t)}else e.skip(t)}this.layers=r}};const lf=6371008.8;var uf=class e{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new e(et(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return lf*Math.acos(Math.min(i,1))}static convert(t){if(t instanceof e)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new e(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&t)return new e(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}};const cf=2*Math.PI*lf;function hf(e){return cf*Math.cos(e*Math.PI/180)}function pf(e){return(180+e)/360}function ff(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function df(e,t){return e/hf(t)}function yf(e){return 360*e-180}function mf(e){let t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}function gf(e,t){return e*hf(mf(t))}function xf(e){return 1/Math.cos(e*Math.PI/180)}var bf=class e{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(t,r=0){let n=uf.convert(t);return new e(pf(n.lng),ff(n.lat),df(r,n.lat))}toLngLat(){return new uf(yf(this.x),mf(this.y))}toAltitude(){return gf(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/cf*xf(mf(this.y))}};const vf=89.25;function wf(e,t,r){let n=1/(1<<r.z);return new bf(e/ke*n+r.x*n,t/ke*n+r.y*n)}function _f(e,t,r){return wf(e,t,r).toLngLat()}function Af(e,t){let r=Qe(t.lat,-85.051129,$t);return new x(pf(t.lng)*e,ff(r)*e)}function Df(e,t){return new bf(t.x/e,t.y/e).toLngLat()}function Sf(e){return e.cameraToCenterDistance*Math.min(.85*Math.tan(Ct(90-e.pitch)),Math.tan(Ct(vf-e.pitch)))}function Ef(e,t){let r=e.canonical,n=t/st(r.z),i=r.x+2**r.z*e.wrap,a=new Float64Array(16);return I(a),B(a,a,[i*n,r.y*n,0]),z(a,a,[n/ke,n/ke,1]),a}function Ff(e,t,r,n,i){let a=bf.fromLngLat(e,t),o=i*df(1,e.lat),{x:s,y:l,z:u}=kf(r,n),c=o*-s,h=o*-l,p=o*u;return new bf(a.x+c,a.y+h,a.z+p)}function Pf(e){let t=df(1,e.center.lat)*e.worldSize;return Ff(e.center,e.elevation,e.pitch,e.bearing,e.cameraToCenterDistance/t)}function kf(e,t){let r=Ct(e),n=Ct(t),i=Math.cos(-r),a=Math.sin(r);return{x:a*Math.sin(n),y:-a*Math.cos(n),z:i}}function Tf(e,t,r){if(t<=0||!e||0===e.length)return e;let n=Mf(t,r);return e.map(e=>
1178If(e,n))}function Mf(e,t){let r=_f(4096,4096,t);return e*bf.fromLngLat(r).meterInMercatorCoordinateUnits()*((1<<t.z)*ke)}function If(e,t){if(!e||e.length<3)return e;let r=e[0].x===e[e.length-1].x&&e[0].y===e[e.length-1].y,n=r?e.length-1:e.length;if(n<3)return e;let i=[];for(let r=0;r<n;r++){let a=e[(r-1+n)%n],o=e[r],s=e[(r+1)%n];Qp(a,o)||Qp(o,s)?i.push(o.clone()):Of(i,a,o,s,t)}let a=Cf(i);return a.length<3?e:(r&&a.push(a[0].clone()),a)}function Cf(e){let t=[];for(let r of e){let e=r.round(),n=t[t.length-1];(n?.x!==e.x||n?.y!==e.y)&&t.push(e)}for(;t.length>1&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y;)t.pop();return t}function Of(e,t,r,n,i){let a=t.sub(r),o=n.sub(r),s=a.mag(),l=o.mag();if(s<1e-6||l<1e-6)return void e.push(r.clone());a._div(s),o._div(l);let u=a.x*o.x+a.y*o.y;if(Math.abs(u)>Math.cos(5*Math.PI/180))return void e.push(r.clone());let c=Math.min(i,.2*s,.2*l),h=r.add(a.mult(c)),p=r.add(o.mult(c)),f=Math.sqrt((1+u)/2),d=r.add(a.add(o)._unit()._mult(c/f)),y=h.sub(d).angleWith(p.sub(d)),m=Math.max(2,Math.ceil(Math.abs(y)/(Math.PI/6)-1e-6));for(let t=0;t<=m;t++)e.push(h.rotateAround(t/m*y,d))}const Bf=8192;function zf(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(n*Bf)+o,i*Bf*2,a*Bf*2,Math.round(s))}var Vf=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new Au,this.centroidVertexArray=new xu,this.indexArray=new Bu,this.programConfigurations=new gc(e.layers,e.zoom),this.segments=new ju,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.features=[],this.hasDependencies=Mh("fill-extrusion",this.layers,t);let n=new il(this.zoom),i=this.layers[0],a=i.layout.get("fill-extrusion-rounded-corner-distance"),o=i._featureFilter.needGeometry;for(let{feature:s,id:l,index:u,sourceLayerIndex:c}of e){let e=Dc(s,o);if(!i._featureFilter.filter(n,e,r))continue;let h=o?e.geometry:Ac(s),p={id:l,sourceLayerIndex:c,index:u,geometry:a>0?Tf(h,a,r):h,properties:s.properties,type:s.type,patterns:{}};this.hasDependencies?this.features.push(Ih("fill-extrusion",this.layers,p,{zoom:this.zoom},t)):this.addFeature(p,p.geometry,u,r,{},t.subdivisionGranularity),t.featureIndex.insert(s,p.geometry,u,c,this.index,!0)}}addFeatures({options:e,canonical:t,patternPositions:r}){for(let n of this.features){let{geometry:i}=n;this.addFeature(n,i,n.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Hp),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,Wp.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,n,i,a){let o=this.layers[0],s=o.layout?o.layout.get("fill-extrusion-rounded-corner-distance"):0,l=s>0?Tf(t,s,n):t;for(let t of Yn(l,500)){let r={x:0,y:0,sampleCount:0},i=this.layoutVertexArray.length;this.processPolygon(r,n,e,t,a);let o=this.layoutVertexArray.length-i,s=Math.floor(r.x/r.sampleC
1178ount),l=Math.floor(r.y/r.sampleCount);for(let e=0;e<o;e++)this.centroidVertexArray.emplaceBack(s,l)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:i,canonical:n})}processPolygon(e,t,r,n,i){if(n.length<1||ef(n[0]))return;for(let t of n)0!==t.length&&Lf(e,t);let a={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},o=i.fill.getGranularityForZoomLevel(t.z),s="Polygon"===tf.types[r.type];for(let e of n){if(0===e.length||ef(e))continue;let t=Op(e,o,s);this._generateSideFaces(t,a)}if(!s)return;let l=Cp(n,t,o,!1),u=this.layoutVertexArray;Lp((e,t)=>{zf(u,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let n=1;n<e.length;n++){let i=e[n],a=e[n-1];if(Qp(i,a))continue;t.segment.vertexLength+4>ju.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let o=i.sub(a)._perp()._unit(),s=a.dist(i);r+s>32768&&(r=0),zf(this.layoutVertexArray,i.x,i.y,o.x,o.y,0,0,r),zf(this.layoutVertexArray,i.x,i.y,o.x,o.y,0,1,r),r+=s,zf(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,0,r),zf(this.layoutVertexArray,a.x,a.y,o.x,o.y,0,1,r);let l=t.segment.vertexLength;this.indexArray.emplaceBack(l,l+2,l+1),this.indexArray.emplaceBack(l+1,l+2,l+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}};function Lf(e,t){for(let r=0;r<t.length;r++){let n=t[r];(r!==t.length-1||t[0].x!==n.x||t[0].y!==n.y)&&(e.x+=n.x,e.y+=n.y,e.sampleCount++)}}let $f;Ps("FillExtrusionBucket",Vf,{omit:["layers","features"]});let jf;var Rf={get paint(){return jf||=new _l({"fill-extrusion-opacity":new gl(mr["paint_fill-extrusion"]["fill-extrusion-opacity"],"fill-extrusion-opacity"),"fill-extrusion-color":new xl(mr["paint_fill-extrusion"]["fill-extrusion-color"],"fill-extrusion-color"),"fill-extrusion-translate":new gl(mr["paint_fill-extrusion"]["fill-extrusion-translate"],"fill-extrusion-translate"),"fill-extrusion-translate-anchor":new gl(mr["paint_fill-extrusion"]["fill-extrusion-translate-anchor"],"fill-extrusion-translate-anchor"),"fill-extrusion-pattern":new bl(mr["paint_fill-extrusion"]["fill-extrusion-pattern"],"fill-extrusion-pattern"),"fill-extrusion-height":new xl(mr["paint_fill-extrusion"]["fill-extrusion-height"],"fill-extrusion-height"),"fill-extrusion-base":new xl(mr["paint_fill-extrusion"]["fill-extrusion-base"],"fill-extrusion-base"),"fill-extrusion-vertical-gradient":new gl(mr["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"],"fill-extrusion-vertical-gradient")})},get layout(){return $f||=new _l({"fill-extrusion-rounded-corner-distance":new gl(mr["layout_fill-extrusion"]["fill-extrusion-rounded-corner-distance"],"fill-extrusion-rounded-corner-distance")})}};const Nf=e=>"fill-extrusion"===e.type;var Uf=class extends Sl{constructor(e,t){super(e,Rf,t)}createBucket(e){return new Vf(e)}queryRadius(){return Nc(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a,pixelPosMatrix:o}){let s=Uc(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-i.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),u=this.paint.get("fill-extrusion-base").evaluate(t,r),c=Zf(s,o,0),h=Xf(n,u,l,o);return Yf(h[0],h[1],c)}};function qf(e,t){return e.x*t.x+e.y*t.y}function Gf(e,t){if(1===e.length){let r,n=0,i=t[n++];for(;!r||i.equals(r);)if(r=t[n++],!r)return 1/0;for(;n<t.length;n++){let a=t[n],o=e[0],s=r.sub(i),l=a.sub(i),u=o.sub(i),c=qf(s,s),h=qf(s,l),p=qf(l,l),f=qf(u,s),d=qf(u,l),y=c*p-h*h,m=(p*f-h*d)/y,g=(c*d-h*f)/y,x=1-m-g,b=i.z*x+r.z*m+a.z*g;if(isFinite(b))return b}return 1/0}{let e=1/0;for(let r of t)e=Math.min(e,r.z);return e}}function Yf(e,t,r){let n=1/0;Tc(r,t)&&(n=Gf(r,t[0]));for(let i=0;i<t.length;i++){let a=t[i],o=e[i];for(let e=0;e<a.length-1;e++){let t=a[e],i=a[e+1],s=o[e],l=[t,i,o[e+1],s,t];Pc(r,l)&&(n=Math.min(n,Gf(r,l)))}}return n!==1/0&&n}function Xf(e,t,r,n){let i=[],a=[],o=n[8]*t,s=n[9]*t,l=n[10]*t,u=n[11]*t,c=n[8]*r,h=n[9]*r,p=n[10]*r,f=n[11]*r;for(let t of e){let e=[],r=[];for(let i of t){let t=i.x,a=i.y,d=n[0]*t+n[4]*a+n[12],y=n[1]*t+n[5]*a+n[13],m=n[2]*t+n[6]*a+n[14],g=n[3]*t+n[7]*a+n[15],b=m+l,v=g+u,w=d+c,_=y+h,A=m+p,D=g+f,S=new x((d+o)/v,(y+s)/v);S.z=b/v,e.push(S);let E=new x(w/D,_/D);E.z=A/D,r.push(E)}i.push(e),a.push(r)}return[i,a]}function Zf(e,t,r){let n=[];for(let i of e){let e=[i.x,i.y,r,1];ye(e,e,t),n.push(new x(e[0]/e[3],e[1]/e[3]))}return n}function Wf(e,t,r,n){let i,a=n,o=t+(r-t>>1),s=r-t,l=e[t],u=e[t+1],c=e[r],h=e[r+1];
vendor: 4,274 bytes, line 1178
1178for(let n=t+3;n<r;n+=3){let t=Hf(e[n],e[n+1],l,u,c,h);if(t>a)i=n,a=t;else if(t===a){let e=Math.abs(n-o);e<s&&(i=n,s=e)}}a>n&&(i-t>3&&Wf(e,t,i,n),e[i+2]=a,r-i>3&&Wf(e,i,r,n))}function Hf(e,t,r,n,i,a){let o=i-r,s=a-n;if(0!==o||0!==s){let l=((e-r)*o+(t-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return o=e-r,s=t-n,o*o+s*s}function Kf(e,t,r,n){let i={type:t,geom:r},a={id:e??null,type:i.type,geometry:i.geom,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(i.type){case"Point":case"MultiPoint":Qf(a,i.geom);break;case"LineString":Qf(a,i.geom.points);break;case"Polygon":Qf(a,i.geom[0].points);break;case"MultiLineString":for(let e of i.geom)Qf(a,e.points);break;case"MultiPolygon":for(let e of i.geom)Qf(a,e[0].points)}return a}function Jf(e){let t=e;e.points.length>64&&(t.points=new Float64Array(e.points))}function Qf(e,t){for(let r=0;r<t.length;r+=3)e.minX=Math.min(e.minX,t[r]),e.minY=Math.min(e.minY,t[r+1]),e.maxX=Math.max(e.maxX,t[r]),e.maxY=Math.max(e.maxY,t[r+1])}function ed(e,t){let r=[];switch(e.type){case"FeatureCollection":for(let n=0;n<e.features.length;n++)td(r,e.features[n],t,n);break;case"Feature":td(r,e,t);break;default:td(r,{type:"Feature",geometry:e,properties:void 0},t)}return r}function td(e,t,r,n,i=0){if(!t.geometry)return;if(i>1024)throw Error("GeometryCollection nesting exceeds supported depth: 1024");if("GeometryCollection"===t.geometry.type)return void nd(e,t,t.geometry,r,n,i+1);if(!t.geometry.coordinates?.length)return;let a=rd(t,r,n),o=(r.tolerance/((1<<r.maxZoom)*r.extent))**2;switch(t.geometry.type){case"Point":return void id(e,a,t.geometry,t.properties);case"MultiPoint":return void ad(e,a,t.geometry,t.properties);case"LineString":return void od(e,a,t.geometry,o,t.properties);case"MultiLineString":return void sd(e,a,t.geometry,o,r,t.properties);case"Polygon":return void ld(e,a,t.geometry,o,t.properties);case"MultiPolygon":return void ud(e,a,t.geometry,o,t.properties);default:throw Error("Input data is not a valid GeoJSON object.")}}function rd(e,t,r){return t.promoteId?e.properties?.[t.promoteId]:t.generateId?r||0:e.id}function nd(e,t,r,n,i,a=0){for(let o of r.geometries)td(e,{id:t.id,type:"Feature",geometry:o,properties:t.properties},n,i,a)}function id(e,t,r,n){let i=[];i.push(pd(r.coordinates[0]),fd(r.coordinates[1]),0),e.push(Kf(t,"Point",i,n))}function ad(e,t,r,n){let i=[];for(let e of r.coordinates)i.push(pd(e[0]),fd(e[1]),0);e.push(Kf(t,"MultiPoint",i,n))}function od(e,t,r,n,i){let a={points:[]};cd(r.coordinates,a,n,!1),e.push(Kf(t,"LineString",a,i))}function sd(e,t,r,n,i,a){if(i.lineMetrics)for(let i of r.coordinates){let r={points:[]};cd(i,r,n,!1),e.push(Kf(t,"LineString",r,a))}else{let i=[];hd(r.coordinates,i,n,!1),e.push(Kf(t,"MultiLineString",i,a))}}function ld(e,t,r,n,i){let a=[];hd(r.coordinates,a,n,!0),e.push(Kf(t,"Polygon",a,i))}function ud(e,t,r,n,i){let a=[];for(let e of r.coordinates){let t=[];hd(e,t,n,!0),a.push(t)}e.push(Kf(t,"MultiPolygon",a,i))}function cd(e,t,r,n){let i,a,o=0;for(let r=0;r<e.length;r++){let s=pd(e[r][0]),l=fd(e[r][1]);t.points.push(s,l,0),r>0&&(o+=n?(i*l-s*a)/2:Math.sqrt((s-i)**2+(l-a)**2)),i=s,a=l}let s=t.points.length-3;t.points[2]=1,r>0&&Wf(t.points,0,s,r),t.points[s+2]=1,Jf(t),t.size=Math.abs(o),t.start=0,t.end=t.size}function hd(e,t,r,n){for(let i=0;i<e.length;i++){let a={points:[]};cd(e[i],a,r,n),t.push(a)}}function pd(e){return e/360+.5}function fd(e){let t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function dd(e){return{type:"FeatureCollection",features:e.map(e=>yd(e))}}function yd(e){let t={type:"Feature",geometry:md(e),properties:e.tags};return null!=e.id&&(t.id=e.id),t}function md(e){let{type:t,geometry:r}=e;switch(t){case"Point":return{type:t,coordinates:xd(r[0],r[1])};case"MultiPoint":return{type:t,coordinates:gd(r)};case"LineString":return{type:t,coordinates:gd(r.points)};case"MultiLineString":case"Polygon":return{type:t,coordinates:r.map(e=>gd(e.points))};case"MultiPolygon":return{type:t,coordinates:r.map(e=>e.map(e=>gd(e.points)))}}}function gd(e){let t=[];for(let r=0;r<e.length;r+=3)t.push(xd(e[r],e[r+1]));return t}function xd(e,t){return[bd(e),vd(t)]}function bd(e){return 360*(e-.5)}function vd(e){let t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}
1178function wd(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o<n)return e;if(o<r||a>=n)return null;let l=[];for(let t of e){let e=0===i?t.minX:t.minY,a=0===i?t.maxX:t.maxY;if(e>=r&&a<n)l.push(t);else if(!(a<r||e>=n))switch(t.type){case"Point":case"MultiPoint":_d(t,l,r,n,i);continue;case"LineString":Ad(t,l,r,n,i,s);continue;case"MultiLineString":Dd(t,l,r,n,i);continue;case"Polygon":Sd(t,l,r,n,i);continue;case"MultiPolygon":Ed(t,l,r,n,i);continue}}return l.length?l:null}function _d(e,t,r,n,i){let a=[];if(Fd(e.geometry,a,r,n,i),!a.length)return;let o=3===a.length?"Point":"MultiPoint";t.push(Kf(e.id,o,a,e.tags))}function Ad(e,t,r,n,i,a){let o=[];if(Pd(e.geometry,o,r,n,i,!1,a.lineMetrics),o.length){if(a.lineMetrics){for(let r of o)t.push(Kf(e.id,"LineString",r,e.tags));return}if(o.length>1)return void t.push(Kf(e.id,"MultiLineString",o,e.tags));t.push(Kf(e.id,"LineString",o[0],e.tags))}}function Dd(e,t,r,n,i){let a=[];if(Td(e.geometry,a,r,n,i,!1),a.length){if(1===a.length)return void t.push(Kf(e.id,"LineString",a[0],e.tags));t.push(Kf(e.id,"MultiLineString",a,e.tags))}}function Sd(e,t,r,n,i){let a=[];Td(e.geometry,a,r,n,i,!0),a.length&&t.push(Kf(e.id,"Polygon",a,e.tags))}function Ed(e,t,r,n,i){let a=[];for(let t of e.geometry){let e=[];Td(t,e,r,n,i,!0),e.length&&a.push(e)}a.length&&t.push(Kf(e.id,"MultiPolygon",a,e.tags))}function Fd(e,t,r,n,i){for(let a=0;a<e.length;a+=3){let o=e[a+i];o>=r&&o<=n&&Md(t,e[a],e[a+1],e[a+2])}}function Pd(e,t,r,n,i,a,o){let s,l,u=kd(e),c=0===i?Id:Cd,h=e.start;for(let p=0;p<e.points.length-3;p+=3){let f=e.points[p],d=e.points[p+1],y=e.points[p+2],m=e.points[p+3],g=e.points[p+4],x=0===i?f:d,b=0===i?m:g,v=!1;o&&(s=Math.sqrt((f-m)**2+(d-g)**2)),x<r?b>r&&(l=c(u,f,d,m,g,r),o&&(u.start=h+s*l)):x>n?b<n&&(l=c(u,f,d,m,g,n),o&&(u.start=h+s*l)):Md(u.points,f,d,y),b<r&&x>=r&&(l=c(u,f,d,m,g,r),v=!0),b>n&&x<=n&&(l=c(u,f,d,m,g,n),v=!0),!a&&v&&(o&&(u.end=h+s*l),t.push(u),u=kd(e)),o&&(h+=s)}let p=e.points.length-3,f=e.points[p],d=e.points[p+1],y=e.points[p+2],m=0===i?f:d;m>=r&&m<=n&&Md(u.points,f,d,y),p=u.points.length-3,a&&p>=3&&(u.points[p]!==u.points[0]||u.points[p+1]!==u.points[1])&&Md(u.points,u.points[0],u.points[1],u.points[2]),u.points.length&&(Jf(u),t.push(u))}function kd(e){return{points:[],size:e.size,start:e.start,end:e.end}}function Td(e,t,r,n,i,a){for(let o of e)Pd(o,t,r,n,i,a,!1)}function Md(e,t,r,n){e.push(t,r,n)}function Id(e,t,r,n,i,a){let o=(a-t)/(n-t);return Md(e.points,a,r+(i-r)*o,1),o}function Cd(e,t,r,n,i,a){let o=(a-r)/(i-r);return Md(e.points,t+(n-t)*o,a,1),o}function Od(e,t){let r=t.buffer/t.extent,n=e,i=wd(e,1,-1-r,r,0,-1,2,t),a=wd(e,1,1-r,2+r,0,-1,2,t);return i||a?(n=wd(e,1,-r,1+r,0,-1,2,t)||[],i&&(n=Bd(i,1).concat(n)),a&&(n=n.concat(Bd(a,-1))),n):n}function Bd(e,t){let r=[];for(let n of e)switch(n.type){case"Point":case"MultiPoint":{let e=zd(n.geometry,t);r.push(Kf(n.id,n.type,e,n.tags));continue}case"LineString":{let e=Vd(n.geometry,t);r.push(Kf(n.id,n.type,e,n.tags));continue}case"MultiLineString":case"Polygon":{let e=[];for(let r of n.geometry)e.push(Vd(r,t));r.push(Kf(n.id,n.type,e,n.tags));continue}case"MultiPolygon":{let e=[];for(let r of n.geometry){let n=[];for(let e of r)n.push(Vd(e,t));e.push(n)}r.push(Kf(n.id,n.type,e,n.tags));continue}}return r}function zd(e,t){let r=[];for(let n=0;n<e.length;n+=3)r.push(e[n]+t,e[n+1],e[n+2]);return r}function Vd(e,t){let r={points:[],size:e.size};void 0!==e.start&&(r.start=e.start,r.end=e.end);for(let n=0;n<e.points.length;n+=3)r.points.push(e.points[n]+t,e.points[n+1],e.points[n+2]);return Jf(r),r}function Ld(e,t,r){let n=Rd(t,r),i=[];if(n.removeAll&&(i=e,e=[]),n.remove.size||n.add.size){let t=[];for(let r of e)(n.remove.has(r.id)||n.add.has(r.id))&&t.push(r);if(t.length){i=i.concat(t);let r=new Set(t.map(e=>e.id));e=e.filter(e=>!r.has(e.id))}if(n.add.size){let t=ed({type:"FeatureCollection",features:Array.from(n.add.values())},r);t=Od(t,r),i=i.concat(t),e=e.concat(t)}}if(n.update.size){let t=new Map,a=[];for(let r of e)n.update.has(r.id)?t.set(r.id,[...t.get(r.id)||[],r]):a.push(r);for(let[e,o]of n.update){let n=t.get(e);if(!n||0===n.length)continue;let s=$d(n,o,r);i=i.concat(n,s),a=a.concat(s)}e=a}return{affected:i,source:e}}function $d(e,t,r){let n=!!t.newGeometry,i=t.removeAllProperties||t.removeProperties?.length>0||t.addOrUpdateProperties?.length>0;if(n){let n=e[0],a=ed({type:"FeatureCollection",features:[{type:"Feature",id:n.id,geometry:t.newGeometry,properties:i?jd(n.tags,t):n.tags}]},r);return a=Od(a,r),a}if(i){let r=[];for(let n of e){let e=Object.assign({},n);e.tags=jd(e.tags,t),r.push(e)}return r}return e}
vendor: 5,211 bytes, line 1178
1178function jd(e,t){if(t.removeAllProperties)return{};let r=Object.assign({},e||{});if(t.removeProperties)for(let e of t.removeProperties)delete r[e];if(t.addOrUpdateProperties)for(let{key:e,value:n}of t.addOrUpdateProperties)r[e]=n;return r}function Rd(e,t){return e?{removeAll:e.removeAll,remove:new Set(e.remove||[]),add:new Map(e.add?.map(e=>[t.promoteId?e.properties[t.promoteId]:e.id,e])),update:new Map(e.update?.map(e=>[e.id,e]))}:{remove:new Set,add:new Map,update:new Map}}const Nd=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Ud=new Uint32Array(96);var qd=class e{static from(t){if(!t||void 0===t.byteLength||t.buffer)throw Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[r,n]=new Uint8Array(t,0,2);if(219!==r)throw Error("Data does not appear to be in a KDBush format.");let i=n>>4;if(1!==i)throw Error(`Got v${i} data when expected v1.`);let a=Nd[15&n];if(!a)throw Error("Unrecognized array type.");let[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new e(s,o,a,void 0,t)}constructor(e,t=64,r=Float64Array,n=ArrayBuffer,i){if(isNaN(e)||e<0)throw Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let a=Nd.indexOf(this.ArrayType),o=2*e*this.ArrayType.BYTES_PER_ELEMENT,s=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-s%8)%8;if(a<0)throw Error(`Unexpected typed array class: ${r}.`);if(i)this.data=i,this.ids=new this.IndexArrayType(i,8,e),this.coords=new r(i,8+s+l,2*e),this._pos=2*e,this._finished=!0;else{let i=this.data=new n(8+o+s+l);this.ids=new this.IndexArrayType(i,8,e),this.coords=new r(i,8+s+l,2*e),this._pos=0,this._finished=!1,new Uint8Array(i,0,2).set([219,16+a]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return Gd(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:a,nodeSize:o}=this;Ud[0]=0,Ud[1]=i.length-1,Ud[2]=0;let s=3,l=[];for(;s>0;){let u=Ud[--s],c=Ud[--s],h=Ud[--s];if(c-h<=o){for(let o=h;o<=c;o++){let s=a[2*o],u=a[2*o+1];s>=e&&s<=r&&u>=t&&u<=n&&l.push(i[o])}continue}let p=h+c>>1,f=a[2*p],d=a[2*p+1];f>=e&&f<=r&&d>=t&&d<=n&&l.push(i[p]),(0===u?e<=f:t<=d)&&(Ud[s++]=h,Ud[s++]=p-1,Ud[s++]=1-u),(0===u?r>=f:n>=d)&&(Ud[s++]=p+1,Ud[s++]=c,Ud[s++]=1-u)}return l}within(e,t,r){let n=[];return this.withinInto(e,t,r,n),n}withinInto(e,t,r,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:a,nodeSize:o}=this;Ud[0]=0,Ud[1]=i.length-1,Ud[2]=0;let s=3,l=0,u=r*r;for(;s>0;){let c=Ud[--s],h=Ud[--s],p=Ud[--s];if(h-p<=o){for(let r=p;r<=h;r++)Wd(a[2*r],a[2*r+1],e,t)<=u&&(n[l++]=i[r]);continue}let f=p+h>>1,d=a[2*f],y=a[2*f+1];Wd(d,y,e,t)<=u&&(n[l++]=i[f]),(0===c?e-r<=d:t-r<=y)&&(Ud[s++]=p,Ud[s++]=f-1,Ud[s++]=1-c),(0===c?e+r>=d:t+r>=y)&&(Ud[s++]=f+1,Ud[s++]=h,Ud[s++]=1-c)}return l}};function Gd(e,t,r,n,i,a){if(i-n<=r)return;let o=n+i>>1;Yd(e,t,o,n,i,a),Gd(e,t,r,n,o-1,1-a),Gd(e,t,r,o+1,i,1-a)}function Yd(e,t,r,n,i,a){for(;i>n;){if(i-n>600){let o=i-n+1,s=r-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);Yd(e,t,r,Math.max(n,Math.floor(r-s*u/o+c)),Math.min(i,Math.floor(r+(o-s)*u/o+c)),a)}let o=t[2*r+a],s=n,l=i;for(Xd(e,t,n,r),t[2*i+a]>o&&Xd(e,t,n,i);s<l;){for(Xd(e,t,s,l),s++,l--;t[2*s+a]<o;)s++;for(;t[2*l+a]>o;)l--}t[2*n+a]===o?Xd(e,t,n,l):(l++,Xd(e,t,l,i)),l<=r&&(n=l+1),r<=l&&(i=l-1)}}function Xd(e,t,r,n){Zd(e,r,n),Zd(t,2*r,2*n),Zd(t,2*r+1,2*n+1)}function Zd(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function Wd(e,t,r,n){let i=e-r,a=t-n;return i*i+a*a}const Hd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e};var Kd=class{constructor(e){this.options=Object.assign(Object.create(Hd),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(e){let t=[];for(let r of e){if(!r.geometry)continue;let[e,n]=r.geometry.coordinates,[i,a]=[pd(e),fd(n)],o={id:r.id,type:"Point",geometry:[i,a],tags:r.properties};t.push(o)}this.createIndex(t)}initialize(e){let t=[];for(let r of e)"Point"===r.type&&t.push(r);this.createIndex(t)}updateIndex(e,t,r){this.options=Object.assign(Object.create(Hd),r.clusterOptions),this.initialize(e)}createIndex(e){let{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");let i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;let a=[];for(let t=0;t<e.length;t++){let r=e[t];if(!r?.geometry)continue;let[n,i]=r.geometry;n=Math.fround(n),i=Math.fround(i),a.push(n,i,1/0,t,-1,1),this.options.reduce&&a.push(0)}let o=this.trees[n+1]=this.createTree(a);t&&console.timeEnd(i);for(let e=n;e>=r;e--){let r=Date.now();o=this.trees[e]=this.createTree(this.cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,Date.now()-r)}
1178t&&console.timeEnd("total time")}getClusters(e,t){return this.getClustersInternal(e,t).map(e=>yd(e))}getClustersInternal(e,t){let r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){let e=this.getClustersInternal([r,n,180,a],t),o=this.getClustersInternal([-180,n,i,a],t);return e.concat(o)}let o=this.trees[this.limitZoom(t)],s=o.range(pd(r),fd(a),pd(i),fd(n)),l=o.flatData,u=[];for(let e of s){let t=this.stride*e;u.push(l[t+5]>1?Jd(l,t,this.clusterProps):this.points[l[t+3]])}return u}getChildren(e){let t=this.getOriginId(e),r=this.getOriginZoom(e),n=Error("No cluster with the specified id: "+e),i=this.trees[r];if(!i)throw n;let a=i.flatData;if(t*this.stride>=a.length)throw n;let o=this.options.radius/(this.options.extent*2**(r-1)),s=a[t*this.stride],l=a[t*this.stride+1],u=i.within(s,l,o),c=[];for(let t of u){let r=t*this.stride;a[r+4]===e&&c.push(a[r+5]>1?Qd(a,r,this.clusterProps):yd(this.points[a[r+3]]))}if(0===c.length)throw n;return c}getLeaves(e,t,r){t||=10,r||=0;let n=[];return this.appendLeaves(n,e,t,r,0),n}getTile(e,t,r){let n=this.trees[this.limitZoom(e)];if(!n)return null;let i=2**e,{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/i,u=(r+1+s)/i,c={transformed:!0,features:[],source:null,x:t,y:r,z:e};return this.addTileFeatures(n.range((t-s)/i,l,(t+1+s)/i,u),n.flatData,t,r,i,c),0===t&&this.addTileFeatures(n.range(1-s/i,l,1,u),n.flatData,i,r,i,c),t===i-1&&this.addTileFeatures(n.range(0,l,s/i,u),n.flatData,-1,r,i,c),c}getClusterExpansionZoom(e){return this.getOriginZoom(e)}appendLeaves(e,t,r,n,i){let a=this.getChildren(t);for(let t of a){let a=t.properties;if(a?.cluster?i+a.point_count<=n?i+=a.point_count:i=this.appendLeaves(e,a.cluster_id,r,n,i):i<n?i++:e.push(t),e.length===r)break}return i}createTree(e){let t=new qd(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.flatData=e,t.data=null,t}addTileFeatures(e,t,r,n,i,a){for(let o of e){let e,s,l,u=o*this.stride,c=t[u+5]>1;if(c)e=ey(t,u,this.clusterProps),s=t[u],l=t[u+1];else{let r=this.points[t[u+3]];e=r.tags,[s,l]=r.geometry}let h,p={type:1,geometry:[[Math.round(this.options.extent*(s*i-r)),Math.round(this.options.extent*(l*i-n))]],tags:e};h=c||this.options.generateId?t[u+3]:this.points[t[u+3]].id,void 0!==h&&(p.id=h),a.features.push(p)}}limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}cluster(e,t){let{radius:r,extent:n,reduce:i,minPoints:a}=this.options,o=r/(n*2**t),s=e.flatData,l=[],u=this.stride;for(let r=0;r<s.length;r+=u){if(s[r+2]<=t)continue;s[r+2]=t;let n=s[r],c=s[r+1],h=e.within(s[r],s[r+1],o),p=s[r+5],f=p;for(let e of h){let r=e*u;s[r+2]>t&&(f+=s[r+5])}if(f>p&&f>=a){let e,a=n*p,o=c*p,d=-1,y=(r/u<<5)+(t+1)+this.points.length;for(let n of h){let l=n*u;if(s[l+2]<=t)continue;s[l+2]=t;let c=s[l+5];a+=s[l]*c,o+=s[l+1]*c,s[l+4]=y,i&&(e||(e=this.map(s,r,!0),d=this.clusterProps.length,this.clusterProps.push(e)),i(e,this.map(s,l)))}s[r+4]=y,l.push(a/f,o/f,1/0,y,-1,f),i&&l.push(d)}else{for(let e=0;e<u;e++)l.push(s[r+e]);if(f>1)for(let e of h){let r=e*u;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e<u;e++)l.push(s[r+e])}}}}return l}getOriginId(e){return e-this.points.length>>5}getOriginZoom(e){return(e-this.points.length)%32}map(e,t,r){if(e[t+5]>1){let n=this.clusterProps[e[t+6]];return r?Object.assign({},n):n}let n=this.points[e[t+3]].tags,i=this.options.map(n);return r&&i===n?Object.assign({},i):i}};function Jd(e,t,r){return{id:e[t+3],type:"Point",tags:ey(e,t,r),geometry:[e[t],e[t+1]]}}function Qd(e,t,r){return{type:"Feature",id:e[t+3],properties:ey(e,t,r),geometry:{type:"Point",coordinates:[bd(e[t]),vd(e[t+1])]}}}function ey(e,t,r){let n=e[t+5],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,a=e[t+6],o=-1===a?{}:Object.assign({},r[a]);return Object.assign(o,{cluster:!0,cluster_id:e[t+3],point_count:n,point_count_abbreviated:i})}const ty="geojsonvt_clip_start",ry="geojsonvt_clip_end";function ny(e,t,r,n,i){let a=t===i.maxZoom?0:i.tolerance/((1<<t)*i.extent),o={transformed:!1,features:[],source:null,x:r,y:n,z:t,minX:2,minY:1,maxX:-1,maxY:0,numPoints:0,numSimplified:0,numFeatures:e.length};for(let t of e)iy(o,t,a,i);return o}function iy(e,t,r,n){switch(e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),t.type){case"Point":case"MultiPoint":return void ay(e,t);case"LineString":return void oy(e,t,r,n);case"MultiLineString":case"Polygon":return void sy(e,t,r);case"MultiPolygon":return void ly(e,t,r)}}function ay(e,t){let r=[];for(let n=0;n<t.geometry.length;n+=3)r.push(t.geometry[n],t.geometry[n+1]),e.numPoints++,e.numSimplified++;if(!r.length)return;let n={type:1,tags:t.tags||null,geometry:r};null!==t.id&&(n.id=t.id),e.features.push(n)}function oy(e,t,r,n){let i=[];if(uy(i,t.geometry,e,r,!1,!1),!i.length)return;let a=t.tags||null;if(n.lineMetrics){a={};for(let e in t.tags)a[e]=t.tags[e];a[ty]=t.geometry.start/t.geometry.size,a[ry]=t.geometry.end/t.geometry.size}let o={type:2,tags:a,geometry:i};null!==t.id&&(o.id=t.id),e.features.push(o)}function sy(e,t,r){let n=[];for(let i=0;i<t.geometry.length;i++)uy(n,t.geometry[i],e,r,"Polygon"===t.type,0===i);if(!n.length)return;let i={type:"Polygon"===t.type?3:2,tags:t.tags||null,geometry:n};null!==t.id&&(i.id=t.id),e.features.push(i)}function ly(e,t,r){let n=[];for(let i=0;i<t.geometry.length;i++){let a=t.geometry[i];for(let t=0;t<a.length;t++)uy(n,a[t],e,r,!0,0===t)}if(!n.length)return;let i={type:3,tags:t.tags||null,geometry:n};null!==t.id&&(i.id=t.id),e.features.push(i)}function uy(e,t,r,n,i,a){let o=n*n;if(n>0&&t.size<(i?o:n))return void(r.numPoints+=t.points.length/3);let s=[];for(let e=0;e<t.points.length;e+=3)(0===n||t.points[e+2]>o)&&(r.numSimplified++,s.push(t.points[e],t.points[e+1])),r.numPoints++;i&&cy(s,a),e.push(s)}function cy(e,t){let r=0;for(let t=0,n=e.length,i=n-2;t<n;i=t,t+=2)r+=(e[t]-e[i])*(e[t+1]+e[i+1]);if(r>0===t)for(let t=0,r=e.length;t<r/2;t+=2){let n=e[t],i=e[t+1];
1178e[t]=e[r-2-t],e[t+1]=e[r-1-t],e[r-2-t]=n,e[r-1-t]=i}}function hy(e,t){if(e.transformed)return e;let r=1<<e.z,n=e.x,i=e.y;for(let a of e.features)1===a.type?py(a,t,r,n,i):fy(a,t,r,n,i);return e.transformed=!0,e}function py(e,t,r,n,i){let a=e,o=e.geometry,s=[];for(let e=0;e<o.length;e+=2)s.push(dy(o[e],o[e+1],t,r,n,i));return a.geometry=s,a}function fy(e,t,r,n,i){let a=e,o=e.geometry,s=[];for(let e of o){let a=[];for(let o=0;o<e.length;o+=2)a.push(dy(e[o],e[o+1],t,r,n,i));s.push(a)}return a.geometry=s,a}function dy(e,t,r,n,i,a){return[Math.round(r*(e*n-i)),Math.round(r*(t*n-a))]}var yy=class{constructor(e){this.options=e,this.total=0,this.stats={},this.tiles={},this.tileCoords=[],this.stats={},this.total=0}initialize(e){this.splitTile(e,0,0,0),this.options.debug&&(e.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}updateIndex(e,t,r){r.debug>1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(t),r.debug>1&&console.timeEnd("invalidating");let[n,i,a]=[0,0,0],o=ny(e,n,i,a,r);o.source=e;let s=my(n,i,a);if(this.tiles[s]=o,this.tileCoords.push({z:n,x:i,y:a,id:s}),r.debug){let e=`z${n}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}}getClusterExpansionZoom(e){return null}getChildren(e){return null}getLeaves(e,t,r){return null}getTile(e,t,r){let{extent:n,debug:i}=this.options,a=1<<e,o=my(e,t=t+a&a-1,r);if(this.tiles[o])return hy(this.tiles[o],n);i>1&&console.log("drilling down to z%d-%d-%d",e,t,r);let s,l=e,u=t,c=r;for(;!s&&l>0;)l--,u>>=1,c>>=1,s=this.tiles[my(l,u,c)];return s?.source&&(i>1&&(console.log("found parent tile z%d-%d-%d",l,u,c),console.time("drilling down")),this.splitTile(s.source,l,u,c,e,t,r),i>1&&console.timeEnd("drilling down"),this.tiles[o])?hy(this.tiles[o],n):null}splitTile(e,t,r,n,i,a,o){let s=[e,t,r,n],l=this.options,u=l.debug;for(;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();let c=1<<t,h=my(t,r,n),p=this.tiles[h];if(!p&&(u>1&&console.time("creation"),p=this.tiles[h]=ny(e,t,r,n,l),this.tileCoords.push({z:t,x:r,y:n,id:h}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(p.source=e,null==i){if(t===l.indexMaxZoom||p.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===i)continue;if(null!=i){let e=i-t;if(r!==a>>e||n!==o>>e)continue}}if(p.source=null,!e.length)continue;u>1&&console.time("clipping");let f=.5*l.buffer/l.extent,d=.5-f,y=.5+f,m=1+f,g=null,x=null,b=null,v=null,w=wd(e,c,r-f,r+y,0,p.minX,p.maxX,l),_=wd(e,c,r+d,r+m,0,p.minX,p.maxX,l);w&&(g=wd(w,c,n-f,n+y,1,p.minY,p.maxY,l),x=wd(w,c,n+d,n+m,1,p.minY,p.maxY,l)),_&&(b=wd(_,c,n-f,n+y,1,p.minY,p.maxY,l),v=wd(_,c,n+d,n+m,1,p.minY,p.maxY,l)),u>1&&console.timeEnd("clipping"),s.push(g||[],t+1,2*r,2*n),s.push(x||[],t+1,2*r,2*n+1),s.push(b||[],t+1,2*r+1,2*n),s.push(v||[],t+1,2*r+1,2*n+1)}}invalidateTiles(e){if(!e.length)return;let t=this.options,{debug:r}=t,n=1/0,i=-1/0,a=1/0,o=-1/0;for(let t of e)n=Math.min(n,t.minX),i=Math.max(i,t.maxX),a=Math.min(a,t.minY),o=Math.max(o,t.maxY);let s=t.buffer/t.extent,l=new Set;for(let t in this.tiles){let u=this.tiles[t],c=1<<u.z,h=(u.x-s)/c,p=(u.x+1+s)/c,f=(u.y-s)/c,d=(u.y+1+s)/c;if(i<h||n>=p||o<f||a>=d)continue;let y=!1;for(let t of e)if(t.maxX>=h&&t.minX<p&&t.maxY>=f&&t.minY<d){y=!0;break}if(y){if(r){r>1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",u.z,u.x,u.y,u.numFeatures,u.numPoints,u.numSimplified);let e=`z${u.z}`;this.stats[e]=(this.stats[e]||0)-1,this.total--}delete this.tiles[t],l.add(t)}}l.size&&(this.tileCoords=this.tileCoords.filter(e=>!l.has(e.id)))}};function my(e,t,r){return 32*((1<<e)*r+t)+e}const gy={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,updateable:!1,cluster:!1,clusterOptions:Hd,debug:0};var xy=class{constructor(e,t){let r=(t=this.options=Object.assign({},gy,t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let n=ed(e,t);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles")),n=Od(n,t),t.updateable&&(this.source=n),this.initializeIndex(n,t)}initializeIndex(e,t){this.tileIndex=t.cluster?new Kd(t.clusterOptions):new yy(t),e.length&&this.tileIndex.initialize(e)}getTile(e,t,r){return t=+t,r=+r,(e=+e)<0||e>24?null:this.tileIndex.getTile(e,t,r)}updateData(e,t){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:n,source:i}=Ld(this.source,e,r);t&&({affected:n,source:i}=this.filterUpdate(i,n,t)),n.length&&(this.source=i,this.tileIndex.updateIndex(i,n,r))}filterUpdate(e,t,r){let n=new Set;for(let i of e)null!=i.id&&(r(yd(i))||(t.push(i),n.add(i.id)));return{affected:t,source:e=e.filter(e=>!n.has(e.id))}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return dd(this.source)}updateClusterOptions(e,t){let r=this.options.cluster;this.options.cluster=e,this.options.clusterOptions=t,r!=e?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(e){return this.tileIndex.getClusterExpansionZoom(e)}getClusterChildren(e){return this.tileIndex.getChildren(e)}getClusterLeaves(e,t,r){return this.tileIndex.getLeaves(e,t,r)}};const by=Cl([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),vy=by.members;by.size,by.alignment;const wy=Cl([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),_y=wy.members;wy.size,wy.alignment;const Ay=Math.cos(Math.PI/180*37.5);var Dy=class{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let e of this.layers)this.gradients[e.id]={};this.layoutVertexArray=new Du,this.layoutVertexArray2=new Su,this.indexArray=new Bu,this.programConfigurations=new gc(e.layers,e.zoom),this.segments=new ju,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=Mh("line",this.layers,t)||this.hasLineDasharray(this.layers);let n=this.layers[0].layout.get("line-sort-key"),i=!n.isConstant(),a=[],o=new il(this.zoom),s=this.layers[0]._featureFilter.needGeometry;for(let{feature:t,id:l,index:u,sourceLayerIndex:c}of e){let e=Dc(t,s);if(!this.layers[0]._featureFilter.filter(o,e,r))continue;let h=i?n.evaluate(e,{},r):void 0,p={id:l,properties:t.properties,type:t.type,sourceLayerIndex:c,index:u,geometry:s?e.geometry:Ac(t),patterns:{},dashes:{},sortKey:h};a.push(p)}i&&a.sort((e,t)=>
1178e.sortKey-t.sortKey);for(let n of a){let{geometry:i,index:a,sourceLayerIndex:o}=n;this.hasDependencies?(Mh("line",this.layers,t)?Ih("line",this.layers,n,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,n,this.zoom,t),this.patternFeatures.push(n)):this.addFeature(n,i,a,r,{},{},t.subdivisionGranularity);let s=e[a].feature;t.featureIndex.insert(s,i,a,o,this.index)}}update(e,t,r,n){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:n})}addFeatures({options:e,canonical:t,patternPositions:r,dashPositions:n}){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,r,n,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,_y)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,vy),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,"geojsonvt_clip_start")&&Object.hasOwn(e.properties,"geojsonvt_clip_end"))return{start:+e.properties[ty],end:+e.properties[ry]}}addFeature(e,t,r,n,i,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),u=s.get("line-cap").evaluate(e,{}),c=s.get("line-miter-limit").evaluate(e,{}),h=s.get("line-round-limit").evaluate(e,{});this.lineClips=this.lineFeatureClips(e);for(let r of t)this.addLine(r,e,l,u,c,h,n,o);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:i,dashPositions:a,canonical:n})}addLine(e,t,r,n,i,a,o,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=Op(e,o?s.line.getGranularityForZoomLevel(o.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t<e.length-1;t++)this.totalDistance+=e[t].dist(e[t+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let l="Polygon"===tf.types[t.type],u=e.length;for(;u>=2&&e[u-1].equals(e[u-2]);)u--;let c=0;for(;c<u-1&&e[c].equals(e[c+1]);)c++;if(u-c<(l?3:2))return;"bevel"===r&&(i=1.05);let h,p,f,d,y,m=this.overscaling<=16?122880/(512*this.overscaling):0,g=this.segments.prepareSegment(10*u,this.layoutVertexArray,this.indexArray);this.e1=this.e2=-1,l&&(h=e[u-2],y=e[c].sub(h)._unit()._perp());for(let t=c;t<u;t++){if(f=t===u-1?l?e[c+1]:void 0:e[t+1],f&&e[t].equals(f))continue;y&&(d=y),h&&(p=h),h=e[t],y=f?f.sub(h)._unit()._perp():d,d||=y;let o=d.add(y);(0!==o.x||0!==o.y)&&o._unit();let s=d.x*y.x+d.y*y.y,x=o.x*y.x+o.y*y.y,b=0===x?1/0:1/x,v=2*Math.sqrt(2-2*x),w=x<Ay&&p&&f,_=d.x*y.y-d.y*y.x>0;if(w&&t>c){let e=h.dist(p);if(e>2*m){let t=h.sub(h.sub(p)._mult(m/e)._round());this.updateDistance(p,t),this.addCurrentVertex(t,d,0,0,g),p=t}}let A=p&&f,D=A?r:l?"butt":n;if(A&&"round"===D&&(b<a?D="miter":b<=2&&(D="fakeround")),"miter"===D&&b>i&&(D="bevel"),"bevel"===D&&(b>2&&(D="flipbevel"),b<i&&(D="miter")),p&&this.updateDistance(p,h),"miter"===D)o._mult(b),this.addCurrentVertex(h,o,0,0,g);else if("flipbevel"===D){if(b>100)o=y.mult(-1);else{let e=b*d.add(y).mag()/d.sub(y).mag();o._perp()._mult(e*(_?-1:1))}this.addCurrentVertex(h,o,0,0,g),this.addCurrentVertex(h,o.mult(-1),0,0,g)}else if("bevel"===D||"fakeround"===D){let e=-Math.sqrt(b*b-1),t=_?e:0,r=_?0:e;if(p&&this.addCurrentVertex(h,d,t,r,g),"fakeround"===D){let e=Math.round(180*v/Math.PI/20);for(let t=1;t<e;t++){let r=t/e;if(.5!==r){let e=r-.5;r+=r*e*(r-1)*((1.0904+s*(s*(3.55645-1.43519*s)-3.2452))*e*e+(.848013+s*(.215638*s-1.06021)))}let n=y.sub(d)._mult(r)._add(d)._unit()._mult(_?-1:1);this.addHalfVertex(h,n.x,n.y,!1,_,0,g)}}f&&this.addCurrentVertex(h,y,-t,-r,g)}else if("butt"===D)this.addCurrentVertex(h,o,0,0,g);else if("square"===D){let e=p?1:-1;this.addCurrentVertex(h,o,e,e,g)}else"round"===D&&(p&&(this.addCurrentVertex(h,d,0,0,g),this.addCurrentVertex(h,d,1,1,g,!0)),f&&(this.addCurrentVertex(h,y,-1,-1,g,!0),this.addCurrentVertex(h,y,0,0,g)));if(w&&t<u-1){let e=h.dist(f);if(e>2*m){let t=h.add(f.sub(h)._mult(m/e)._round());this.updateDistance(h,t),this.addCurrentVertex(t,y,0,0,g),h=t}}}}addCurrentVertex(e,t,r,n,i,a=!1){let o=t.x+t.y*r,s=t.y-t.x*r,l=-t.x+t.y*n,u=-t.y-t.x*n;this.addHalfVertex(e,o,s,a,!1,r,i),this.addHalfVertex(e,l,u,a,!0,-n,i),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,n,i,a))}addHalfVertex({x:e,y:t},r,n,i,a,o,s){let l=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);if(this.layoutVertexArray.emplaceBack(+!!i+(e<<1),+!!a+(t<<1),Math.round(63*r)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips){let e=(this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start);this.layoutVertexArray2.emplaceBack(e,this.lineClipsArray.length)}let u=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,u,this.e2),s.primitiveLength++),a?this.e2=u:this.e1=u}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let e=t.paint.get("line-dasharray");
1178if(e&&!e.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,n){for(let i of e){let e=i.paint.get("line-dasharray");if(!e||"constant"===e.value.kind)continue;let a="round"===i.layout.get("line-cap").evaluate(t,{}),o={dasharray:e.value.evaluate({zoom:r-1},t,{}),round:a},s={dasharray:e.value.evaluate({zoom:r},t,{}),round:a},l={dasharray:e.value.evaluate({zoom:r+1},t,{}),round:a},u=`${o.dasharray.join(",")},${o.round}`,c=`${s.dasharray.join(",")},${s.round}`,h=`${l.dasharray.join(",")},${l.round}`;n.dashDependencies[u]=o,n.dashDependencies[c]=s,n.dashDependencies[h]=l,t.dashes[i.id]={min:u,mid:c,max:h}}}};let Sy;Ps("LineBucket",Dy,{omit:["layers","patternFeatures"]});let Ey;var Fy={get paint(){return Ey||=new _l({"line-opacity":new xl(mr.paint_line["line-opacity"],"line-opacity"),"line-layer-opacity":new gl(mr.paint_line["line-layer-opacity"],"line-layer-opacity"),"line-color":new xl(mr.paint_line["line-color"],"line-color"),"line-translate":new gl(mr.paint_line["line-translate"],"line-translate"),"line-translate-anchor":new gl(mr.paint_line["line-translate-anchor"],"line-translate-anchor"),"line-width":new xl(mr.paint_line["line-width"],"line-width"),"line-gap-width":new xl(mr.paint_line["line-gap-width"],"line-gap-width"),"line-offset":new xl(mr.paint_line["line-offset"],"line-offset"),"line-blur":new xl(mr.paint_line["line-blur"],"line-blur"),"line-dasharray":new bl(mr.paint_line["line-dasharray"],"line-dasharray"),"line-pattern":new bl(mr.paint_line["line-pattern"],"line-pattern"),"line-gradient":new wl(mr.paint_line["line-gradient"],"line-gradient")})},get layout(){return Sy||=new _l({"line-cap":new xl(mr.layout_line["line-cap"],"line-cap"),"line-join":new xl(mr.layout_line["line-join"],"line-join"),"line-miter-limit":new xl(mr.layout_line["line-miter-limit"],"line-miter-limit"),"line-round-limit":new xl(mr.layout_line["line-round-limit"],"line-round-limit"),"line-sort-key":new xl(mr.layout_line["line-sort-key"],"line-sort-key")})}},Py=class extends xl{possiblyEvaluate(e,t){return t=new il(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=tt({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}};let ky;const Ty=e=>"line"===e.type;var My=class extends Sl{constructor(e,t){super(e,Fy,t),this.gradientVersion=0,ky||(ky=new Py(Fy.paint.properties["line-width"].specification,"line-floorwidth"),ky.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=!!to(e)&&e._styleExpression.expression instanceof Vn,this.gradientVersion=(this.gradientVersion+1)%9007199254740991}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=ky.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Dy(e)}queryRadius(e){let t=e,r=Iy(Rc("line-width",this,t),Rc("line-gap-width",this,t)),n=Rc("line-offset",this,t);return r/2+Math.abs(n)+Nc(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:n,transform:i,pixelsToTileUnits:a}){let o=Uc(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-i.bearingInRadians,a),s=a/2*Iy(this.paint.get("line-width").evaluate(t,r),this.paint.get("line-gap-width").evaluate(t,r)),l=this.paint.get("line-offset").evaluate(t,r);return l&&(n=Gc(n,l*a)),Mc(o,n,s)}isTileClipped(){return!0}};function Iy(e,t){return t>0?t+2*e:e}const Cy=Cl([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"},{name:"a_height_offset",components:1,type:"Float32"}],4),Oy=Cl([{name:"a_projected_pos",components:3,type:"Float32"}],4);Cl([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const By=Cl([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Cl([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const zy=Cl([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vy=Cl([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Ly(e,t,r){let n=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?e=e.toLocaleUpperCase():"lowercase"===n&&(e=e.toLocaleLowerCase()),nl.applyArabicShaping&&(e=nl.applyArabicShaping(e)),e}function $y(e,t,r){for(let n of e.sections)n.text=Ly(n.text,t,r);return e}function jy(e){let t={},r={},n=[],i=0;function a(t){n.push(e[t]),i++}function o(e,t,i){let a=r[e];return delete r[e],r[t]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}
1178function s(e,r,i){let a=t[r];return delete t[r],t[e]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(e,t,r){let n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let u=0;u<e.length;u++){let c=e[u],h=c.geometry,p=c.text?c.text.toString():null;if(!p){a(u);continue}let f=l(p,h),d=l(p,h,!0);if(f in r&&d in t&&r[f]!==t[d]){let e=s(f,d,h),i=o(f,d,n[e].geometry);delete t[f],delete r[d],r[l(p,n[i].geometry,!0)]=i,n[e].geometry=null}else f in r?o(f,d,h):d in t?s(f,d,h):(a(u),t[f]=i-1,r[d]=i-1)}return n.filter(e=>e.geometry)}Cl([{name:"triangle",components:3,type:"Uint16"}]),Cl([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Float32",name:"heightOffset"}]),Cl([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"},{type:"Float32",name:"heightOffset"}]),Cl([{type:"Float32",name:"offsetX"}]),Cl([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Cl([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Ry=typeof Intl<"u"&&"Segmenter"in Intl;let Ny,Uy;function qy(e){if(!Ry||!Rs(e))return[...e];Ny??=new Intl.Segmenter(void 0,{granularity:"grapheme"});let t=[];for(let{segment:r}of Ny.segment(e)){let e=t.length-1;e>=0&&Us(t[e],r)?t[e]+=r:t.push(r)}return t}function Gy(e){let t=new Set;if(Ry){Uy??=new Intl.Segmenter(void 0,{granularity:"word"});for(let{index:r}of Uy.segment(e))t.add(r);return t}let r=0;for(let n of e.split(/\b|(?=\p{Ideo})/u))t.add(r),r+=n.length;return t}function Yy(e){let t=e.codePointAt(0);return e.length>(t>65535?2:1)}const Xy={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u22ef":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"};function Zy(e){let t="",r={premature:!0,value:void 0},n=e[Symbol.iterator](),i=n.next(),a=e[Symbol.iterator]();a.next();let o=a.next();for(;!i.done;)!o.done&&Hs(o.value.codePointAt(0))&&!Xy[o.value]||!r.premature&&Hs(r.value.codePointAt(0))&&!Xy[r.value]||!Xy[i.value]?t+=i.value:t+=Xy[i.value],r={value:i.value,premature:!1},i=n.next(),o=a.next();return t}const Wy={10:!0,13:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Hy={40:!0};function Ky(e,t,r,n,i,a){if("fontStack"in t){let n=r[t.fontStack],a=n?.[e];if(a)return a.metrics.advance*t.scale+i;let o=0;for(let r of e){let e=n?.[r];e&&(o+=e.metrics.advance*t.scale+i)}return o}{let e=n[t.imageName];return e?e.displaySize[0]*t.scale*24/a+i:0}}function Jy(e,t,r,n){let i=(e-t)**2;return n?e<t?i/2:2*i:i+Math.abs(r)*r}function Qy(e){return/^\s+$/u.test(e)}function em(e,t,r){let n=0;return(10===e||13===e)&&(n-=1e4),r&&(n+=150),(40===e||65288===e)&&(n+=50),(41===t||65289===t)&&(n+=50),n}function tm(e,t,r,n,i,a){let o=null,s=Jy(t,r,i,a);for(let e of n){let n=Jy(t-e.x,r,i,a)+e.badness;n<=s&&(o=e,s=n)}return{index:e,x:t,priorBreak:o,badness:s}}function rm(e){return e?rm(e.priorBreak).concat(e.index):[]}var nm=class e{constructor(e="",t=[],r=[]){this.text=e,this.sections=t,this.sectionIndex=r,this.imageSectionID=null,this._graphemes=null}graphemes(){return this._graphemes??=qy(this.text),this._graphemes}static fromFeature(t,r){let n=new e;for(let e of t.sections)e.image?n.addImageSection(e):n.addTextSection(e,r);return n}length(){return this.graphemes().length}getSection(e){return this.sections[this.sectionIndex[e]]}getSectionIndex(e){return this.sectionIndex[e]}verticalizePunctuation(){this.text=Zy(this.text),this._graphemes=null}hasZeroWidthSpaces(){return this.text.includes("\u200b")}trim(){let e=this.graphemes(),t=0;for(;t<e.length&&Qy(e[t]);)t++;let r=e.length;for(;r>t&&Qy(e[r-1]);)r--;this.text=e.slice(t,r).join(""),this.sectionIndex=this.sectionIndex.slice(t,r),this._graphemes=null}substring(t,r){let n=this.graphemes().slice(t,r).join(""),i=this.sectionIndex.slice(t,r);return new e(n,this.sections,i)}toCodeUnitIndex(e){return this.graphemes().slice(0,e).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>
1178Math.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,r=0;for(let n=0;n<this.length();n++){let i=this.getSection(n);if("imageName"in i){let n=e[i.imageName];if(!n)continue;let a=n.displaySize;t=Math.max(t,a[0]),r=Math.max(r,a[1])}}return{maxImageWidth:t,maxImageHeight:r}}_appendSection(e,t){let r=this.graphemes(),n=r.length>0?r[r.length-1]:"",i=qy(n+e);this.text+=e,this._graphemes=r.slice(0,n?-1:void 0).concat(i);let a=i.length-+!!n;for(let e=0;e<a;e++)this.sectionIndex.push(t)}addTextSection(e,t){this.sections.push({scale:e.scale||1,verticalAlign:e.verticalAlign||"bottom",fontStack:e.fontStack||t}),this._appendSection(e.text,this.sections.length-1)}addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void yt("Can't add FormattedSection with an empty image.");let r=this.getNextImageSectionCharCode();r?(this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:t}),this._appendSection(String.fromCharCode(r),this.sections.length-1)):yt("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,t,r,n,i){let a=[],o=this.determineAverageLineWidth(e,t,r,n,i),s=this.hasZeroWidthSpaces(),l=this.graphemes(),u=null,c=0,h=0;for(let t=0;t<l.length;t++){let p=l[t];if(t>0){let e=l[t-1].codePointAt(0),r=p.codePointAt(0),n=Vs(e),i=Ns(e)&&Ns(r);(Wy[e]||n||"imageName"in this.getSection(t-1)||void 0!==l[t+1]&&Hy[r]||i&&(u??=Gy(this.text)).has(h))&&a.push(tm(t,c,o,a,em(e,r,n&&s),!1))}qs(p.codePointAt(0))||(c+=Ky(p,this.getSection(t),r,n,e,i)),h+=p.length}return rm(tm(this.length(),c,o,a,0,!0))}determineAverageLineWidth(e,t,r,n,i){let a=0,o=0;for(let t of this.graphemes()){a+=Ky(t,this.getSection(o),r,n,e,i),o++}return a/Math.max(1,Math.ceil(a/t))}};const im=4294967296,am=2.3283064365386963e-10,om=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");var sm=class{constructor(e){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(e,t,r=this.length){let n;for(;n=this.nextField(r);)e(n,t,this);return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*im;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*im;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let t=this.buf,r=t[this.pos++];if(r<128)return r;let n,i=127&r;return n=t[this.pos++],i|=(127&n)<<7,n<128||(n=t[this.pos++],i|=(127&n)<<14,n<128)||(n=t[this.pos++],i|=(127&n)<<21,n<128)?i:(n=t[this.pos],i|=(15&n)<<28,um(i,e,this))}readSVarint(){let e=this.readVarint();return e%2==1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&om?om.decode(this.buf.subarray(t,e)):Dm(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return 2===this.type?this.readVarint()+this.pos:this.pos+1}nextField(e=this.length){if(this.pos===this._valueStart&&this.skip(this.type),this.pos>=e)return 0;let t=this.readVarint();return this.type=7&t,this._valueStart=this.pos,t>>>3}skip(e){let t=7&e;if(0===t)for(;this.buf[this.pos++]>127;);else if(2===t)this.pos=this.readVarint()+this.pos;else if(5===t)this.pos+=4;else{if(1!==t)throw Error(`Unimplemented type: ${t}`);this.pos+=8}}},lm=class{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.length=this.buf.length}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t<this.pos+e;)t*=2;if(t!==this.length){let e=new Uint8Array(t);e.set(this.buf),this.buf=e,this.dataView=new DataView(e.buffer),this.length=t}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}
1178writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,-1&e,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*am),!0),this.pos+=8}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,-1&e,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*am),!0),this.pos+=8}writeVarint(e){if((e=+e||0)>=0&&e<128)return this.pos>=this.length&&this.realloc(1),void(this.buf[this.pos++]=e);e>268435455||e<0?hm(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127))))}writeSVarint(e){this.writeVarint(e<0?2*-e-1:2*e)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(4*e.length),this.pos++;let t=this.pos;this.pos=Sm(this.buf,e,this.pos);let r=this.pos-t;r>=128&&dm(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t),this.buf.set(e,this.pos),this.pos+=t}writeRawMessage(e,t){this.pos++;let r=this.pos;e(t,this);let n=this.pos-r;n>=128&&dm(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n}writeMessage(e,t,r){this.writeTag(e,2),this.writeRawMessage(t,r)}writePackedVarint(e,t){t.length&&this.writeMessage(e,ym,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,mm,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,bm,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,gm,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,xm,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,vm,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,wm,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,_m,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,Am,t)}writeBytesField(e,t){this.writeTag(e,2),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,5),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,5),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,1),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,1),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,0),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,0),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,2),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,5),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,1),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}};function um(e,t,r){let n,i,a=r.buf;if(i=a[r.pos++],n=(112&i)>>4,i<128||(i=a[r.pos++],n|=(127&i)<<3,i<128)||(i=a[r.pos++],n|=(127&i)<<10,i<128)||(i=a[r.pos++],n|=(127&i)<<17,i<128)||(i=a[r.pos++],n|=(127&i)<<24,i<128)||(i=a[r.pos++],n|=(1&i)<<31,i<128))return cm(e,n,t);throw Error("Expected varint not more than 10 bytes")}function cm(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function hm(e,t){let r,n;if(e>=0?(r=e%4294967296|0,n=e/4294967296|0):(r=~(-e%4294967296),n=~(-e/4294967296),4294967295^r?r=r+1|0:(r=0,n=n+1|0)),e>=0x10000000000000000||e<-0x10000000000000000)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),pm(r,n,t),fm(n,t)}function pm(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}function fm(e,t){let r=(7&e)<<4;t.buf[t.pos++]|=r|((e>>>=3)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),e&&(t.buf[t.pos++]=127&e)))))}function dm(e,t,r){let n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n),r.buf.copyWithin(e+n,e,r.pos)}function ym(e,t){let r=e.length,n=t.buf,i=t.pos,a=t.length;for(let o=0;o<r;o++){let r=e[o];if(r<0||i+10>a)t.pos=i,t.writeVarint(r),n=t.buf,i=t.pos,a=t.length;else{for(;r>127;)n[i++]=r%128|128,r=Math.floor(r/128);n[i++]=r}}t.pos=i}function mm(e,t){for(let r=0;r<e.length;r++)t.writeSVarint(e[r])}function gm(e,t){for(let r=0;r<e.length;r++)t.writeFloat(e[r])}function xm(e,t){for(let r=0;r<e.length;r++)t.writeDouble(e[r])}function bm(e,t){for(let r=0;r<e.length;r++)t.writeBoolean(e[r])}function vm(e,t){for(let r=0;r<e.length;r++)t.writeFixed32(e[r])}function wm(e,t){for(let r=0;r<e.length;r++)t.writeSFixed32(e[r])}function _m(e,t){for(let r=0;r<e.length;
1178r++)t.writeFixed64(e[r])}function Am(e,t){for(let r=0;r<e.length;r++)t.writeSFixed64(e[r])}function Dm(e,t,r){let n="",i=t;for(;i<r;){let t,a,o,s=e[i],l=null,u=s>239?4:s>223?3:s>191?2:1;if(i+u>r)break;1===u?s<128&&(l=s):2===u?(t=e[i+1],128==(192&t)&&(l=(31&s)<<6|63&t,l<=127&&(l=null))):3===u?(t=e[i+1],a=e[i+2],128==(192&t)&&128==(192&a)&&(l=(15&s)<<12|(63&t)<<6|63&a,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===u&&(t=e[i+1],a=e[i+2],o=e[i+3],128==(192&t)&&128==(192&a)&&128==(192&o)&&(l=(15&s)<<18|(63&t)<<12|(63&a)<<6|63&o,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u}return n}function Sm(e,t,r){for(let n,i,a=0;a<t.length;a++){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&=(e[r++]=239,e[r++]=191,e[r++]=189,null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}function Em(e,t,r){1===e&&r.readMessage(Fm,t)}function Fm(e,t,r){if(3===e){let{id:e,bitmap:n,width:i,height:a,left:o,top:s,advance:l}=r.readMessage(Pm,{});t.push({id:e,bitmap:new ch({width:i+6,height:a+6},n),metrics:{width:i,height:a,left:o,top:s,advance:l}})}}function Pm(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function km(e){return new sm(e).readFields(Em,[])}function Tm(e){return"function"==typeof e?.renderWithWebGL}function Mm(e){let{userImage:t}=e;return!(!t?.render||!t.render())&&(Tm(t.data)||e.data.replace(new Uint8Array(t.data.buffer)),!0)}function Im(e){let t=0,r=0;for(let n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort((e,t)=>t.h-e.h);let n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],i=0,a=0;for(let t of e)for(let e=n.length-1;e>=0;e--){let r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===r.w&&t.h===r.h){let t=n.pop();t&&e<n.length&&(n[e]=t)}else t.h===r.h?(r.x+=t.w,r.w-=t.w):t.w===r.w?(r.y+=t.h,r.h-=t.h):(n.push({x:r.x+t.w,y:r.y,w:r.w-t.w,h:t.h}),r.y+=t.h,r.h-=t.h);break}}return{w:i,h:a,fill:t/(i*a)||0}}var Cm=class{constructor(e,{pixelRatio:t,version:r,isWebGLImage:n=!1,stretchX:i,stretchY:a,content:o,textFitWidth:s,textFitHeight:l}){this.paddedRect=e,this.pixelRatio=t,this.stretchX=i,this.stretchY=a,this.content=o,this.version=r,this.needsFirstWebGLRender=n,this.textFitWidth=s,this.textFitHeight=l}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}},Om=class{constructor(e,t){let r={},n={};this.haveRenderCallbacks=[],this.patchedUpdateVersion=-1;let i=[];this.addImages(e,r,i),this.addImages(t,n,i);let{w:a,h:o}=Im(i),s=new hh({width:a||1,height:o||1});for(let t in e){let n=e[t];if(n.isWebGLImage)continue;let i=r[t].paddedRect;hh.copy(n.data,s,{x:0,y:0},{x:i.x+1,y:i.y+1},n.data)}for(let e in t){let r=t[e],i=n[e].paddedRect,a=i.x+1,o=i.y+1,l=r.data.width,u=r.data.height;hh.copy(r.data,s,{x:0,y:0},{x:a,y:o},r.data),hh.copy(r.data,s,{x:0,y:u-1},{x:a,y:o-1},{width:l,height:1}),hh.copy(r.data,s,{x:0,y:0},{x:a,y:o+u},{width:l,height:1}),hh.copy(r.data,s,{x:l-1,y:0},{x:a-1,y:o},{width:1,height:u}),hh.copy(r.data,s,{x:0,y:0},{x:a+l,y:o},{width:1,height:u})}this.image=s,this.iconPositions=r,this.patternPositions=n}addImages(e,t,r){for(let n in e){let i=e[n],a={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(a),t[n]=new Cm(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}}patchUpdatedImages(e,t){if(e.dispatchRenderCallbacks(this.haveRenderCallbacks),this.patchedUpdateVersion!==e.updateVersion){this.patchedUp
1178dateVersion=e.updateVersion;for(let r in this.iconPositions)this.patchUpdatedImage(this.iconPositions[r],e.getImage(r),t);for(let r in this.patternPositions)this.patchUpdatedImage(this.patternPositions[r],e.getImage(r),t)}}patchUpdatedImage(e,t,r){if(!e||!t||!e.needsFirstWebGLRender&&e.version===t.version)return;e.needsFirstWebGLRender=!1,e.version=t.version;let[n,i]=e.tl,a=t.userImage?.data;if(!Tm(a))return void r.update(t.data,void 0,{x:n,y:i});let{width:o,height:s}=t.data;r.context.setCustomLayerDefaults(),a.renderWithWebGL({gl:r.context.gl,texture:r.texture,x:n,y:i,width:o,height:s}),r.context.setDirty()}};Ps("ImagePosition",Cm),Ps("ImageAtlas",Om);var Bm=(function(e){return e[e.none=0]="none",e[e.horizontal=1]="horizontal",e[e.vertical=2]="vertical",e[e.horizontalOnly=3]="horizontalOnly",e})(Bm||{});function zm(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}function Vm(e,t){let r=[],n=0;for(let i of t)r.push(e.substring(n,i)),n=i;return n<e.length()&&r.push(e.substring(n,e.length())),r}const Lm=/^\p{gc=M}$/u;function $m(e){let t=[],r=0;for(;r<e.length;){if(!Lm.test(e[r])){t.push(r),r++;continue}let n=r;for(;n<e.length&&Lm.test(e[n]);)n++;let i=e[n];if(void 0!==i&&Qs(i.codePointAt(0))){t.push(n);for(let e=n-1;e>=r;e--)t.push(e);r=n+1}else{for(let e=r;e<n;e++)t.push(e);r=n}}return t}function jm(e){let t=[],r=0;for(let n of e.graphemes())t.push(...Array(n.length).fill(e.sectionIndex[r])),r++;return t}function Rm(e,t,r){let n=[...e],i=[],a=0;for(let e of n)i.push(a),a+=e.length;let o=$m(n),s=new nm(o.map(e=>n[e]).join(""),t,[]),l=o.map(e=>r[i[e]]??0),u=0;for(let e of s.graphemes())s.sectionIndex.push(l[u]??0),u+=[...e].length;return s}function Nm(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d){let y=nm.fromFeature(e,i);2===h&&y.verticalizePunctuation();let m,g=y.determineLineBreaks(u,a,t,n,f),{processBidirectionalText:x,processStyledBidirectionalText:b}=nl;if(x&&1===y.sections.length){m=[],g=g.map(e=>y.toCodeUnitIndex(e));let e=x(y.toString(),g);for(let t of e)m.push(Rm(t,y.sections,[...t].map(()=>0)))}else if(b){m=[],g=g.map(e=>y.toCodeUnitIndex(e));let e=jm(y),t=b(y.text,e,g);for(let e of t)m.push(Rm(e[0],y.sections,e[1]))}else m=Vm(y,g);let v=[],w={positionedLines:v,text:y.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:h,iconsInText:!1,verticalizable:!1};return tg(w,t,r,n,m,o,s,l,h,u,p,d),!zm(v)&&w}function Um(e){let t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:t,verticalAlign:r}}function qm(e,t,r){let n=24*t.getMaxScale(),{maxImageWidth:i,maxImageHeight:a}=t.getMaxImageSize(e),o=Math.max(n,a*r);return{verticalLineContentWidth:Math.max(n,i*r),horizontalLineContentHeight:o}}function Gm(e){switch(e){case"top":return 0;case"center":return.5;default:return 1}}function Ym(e,t,r,n){if(e?.rect)return e;let i=t[r.fontStack]?.[n];return i?{rect:null,metrics:i.metrics}:null}function Xm(e,t,r){return!(1===e||!t&&!Ls(r)||t&&(qs(r)||Ks(r)))}function Zm(e){return/\p{Nd}/u.test(String.fromCodePoint(e))}function Wm(e){return/\p{Lu}/u.test(String.fromCodePoint(e))}function Hm(e){return/[\p{P}\p{S}]/u.test(String.fromCodePoint(e))}function Km(e){let t=e.some(Zm)&&e.every(e=>Zm(e)||Hm(e)),r=e.length<=3&&e.every(e=>Wm(e)||Zm(e));return t||r}function Jm(e){return(Zm(e)||Wm(e))&&!Ks(e)}function Qm(e,t){let r=!1;for(let n=0;n<e.length;n++){if(t[n])continue;let i=Xy[e[n]];i&&(0===n||t[n-1])&&(n===e.length-1||t[n+1])&&(e[n]=i,t[n]=!0,r=!0)}return r}function eg(e){let t=e.graphemes().slice(),r=t.map(e=>e.codePointAt(0)),n=r.map(Ls),i=t=>!n[t]&&!qs(r[t])&&!("imageName"in e.getSection(t));for(let e=0;e<r.length;e++){if(!i(e))continue;let t=e;for(;t+1<r.length&&i(t+1);)t++;if(Km(r.slice(e,t+1)))for(let i=e;i<=t;i++)n[i]=Jm(r[i]);e=t}return Qm(t,n)&&(e.text=t.join(""),e._graphemes=null),n}function tg(e,t,r,n,i,a,o,s,l,u,c,h){let p=0,f=0,d=0,y=0,m="right"===s?1:"left"===s?0:.5,g=24/h,x=0;for(let o of i){o.trim();let i=o.getMaxScale(),s={positionedGlyphs:[],lineOffset:0};e.positionedLines[x]=s;let h=s.positionedGlyphs,b=0;if(!o.length()){f+=a,++x;continue}let v=qm(n,o,g),w=2!==l||c?null:eg(o),_=o.graphemes();for(let a=0;a<_.length;a++){let s=o.getSection(a),d=_[a],y=d.codePointAt(0),m=w?w[a]:Xm(l,c,y),x="fontStack"in s&&Yy(d)&&!t[s.fontStack]?.[d]?[...d]:[d];for(let l of x){let c,d={glyph:l.codePointAt(0),grapheme:l,imageName:null,x:p,y:f+-17,vertical:m,scale:1,fontStack:"",sectionIndex:o.getSectionIndex(a),metrics:null,rect:null};if("fontStack"in s){if(c=rg(s,l,m,v,t,r),!c)continue;d.fontStack=s.fontStack}else{if(e.iconsInText=!0,s.scale*=g,c=ng(s,m,i,v,n),!c)continue;b=Math.max(b,c.imageOffset),d.imageName=s.imageName}let{rect:y,metrics:x,baselineOffset:w}=c;if(d.y+=w,d.scale=s.scale,d.metrics=x,d.rect=y,h.push(d),m){e.verticalizable=!0,p+=("imageName"in s?x.advance:24)*s.scale+u}else p+=x.advance*s.scale+u}}if(0!==h.length){let e=p-u;d=Math.max(e,d),ig(h,0,h.length-1,m)}p=0;let A=24*(i-1);s.lineOffset=Math.max(b,A);let D=a*i+b;f+=D,y=Math.max(D,y),++x}let{horizontalAlign:b,verticalAlign:v}=Um(o);ag(e.positionedLines,m,b,v,d,y,a,f,i.length),e.top+=-v*f,e.bottom=e.top+f,e.left+=-b*d,e.right=e.left+d}function rg(e,t,r,n,i,a){let o,s=a[e.fontStack]?.[t],l=Ym(s,i,e,t);if(null===l)return null;if(r)o=n.verticalLineContentWidth-24*e.scale;else{let t=Gm(e.verticalAlign);o=(n.horizontalLineContentHeight-24*e.scale)*t}return{rect:l.rect,metrics:l.metrics,baselineOffset:o}}function ng(e,t,r,n,i){let a=i[e.imageName];if(!a)return null;let o,s=a.paddedRect,l=a.displaySize,u={width:l[0],height:l[1],left:1,top:-3,advance:t?l[1]:l[0]};if(t)o=n.verticalLineContentWidth-l[1]*e.scale;else{let t=Gm(e.verticalAlign);o=(n.horizontalLineContentHeight-l[1]*e.scale)*t}return{rect:s,metrics:u,baselineOffset:o,imageOffset:(t?l[0]:l[1])*e.scale-24*r}}function ig(e,t,r,n){if(0===n)return;let i=e[r],a=i.metrics.advance*i.scale,o=(e[r].x+a)*n;for(let n=t;n<=r;n++)e[n].x-=o}function ag(e,t,r,n,i,a,o,s,l){let u=(t-r)*i,c=0;c=a===o?-n*l*o+.5*o:-s*n- -17;for(let t of e)for(let e of t.positionedGlyphs)e.x+=u,e.y+=c}function og(e,t,r){let{horizontalAlign:n,verticalAlign:i}=Um(r),a=t[0],o=t[1],s=a-e.displaySize[0]*n,l=s+e.displaySize[0],u=o-e.displaySize[1]*i;return{image:e,top:u,bottom:u+e.displaySize[1],left:s,right:l}}function sg(e){let t=e.left,r=e.top,n=e.right-t,i=e.bottom-r,a=e.image.content[2]-e.image.content[0],o=e.image.content[3]-e.image.content[1],s=e.image.textFitWidth??"stretchOrShrink",l=e.image.textFitHeight??"stretchOrShrink",u=a/o;if("proportional"===l){if("stretchOnly"===s&&n/i<u||"proportional"===s){let e=Math.ceil(i*u);t*=e/n,n=e}}else if("proportional"===s&&"stretchOnly"===l&&0!==u&&n/i>u){let e=Math.ceil(n/u);r*=e/i,i=e}return{x1:t,y1:r,x2:t+n,y2:r+i}}function lg(e,t,r,n,i,a){let o,s=e.image;if(s.content){let e=s.content,t=s.pixelRatio||1;o=[e[0]/t,e[1]/t,s.displaySize[0]-e[2]/t,s.displaySize[1]-e[3]/t]}let l,u,c,h,p=t.left*a,f=t.right*a;"width"===r||"both"===r?(h=i[0]+p-n[3],u=i[0]+f+n[1]):(h=i[0]+(p+f-s.displaySize[0])/2,u=h+s.displaySize[0]);
vendor: 6,715 bytes, line 1178
1178let d=t.top*a,y=t.bottom*a;return"height"===r||"both"===r?(l=i[1]+d-n[0],c=i[1]+y+n[2]):(l=i[1]+(d+y-s.displaySize[1])/2,c=l+s.displaySize[1]),{image:s,top:l,right:u,bottom:c,left:h,collisionPadding:o}}function ug(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new il(e+1))};if("source"===r.kind)return{kind:"source"};if("composite"===r.kind){let{minZoom:t,maxZoom:n}=cg(r.zoomStops,e);return{kind:"composite",minZoom:t,maxZoom:n,interpolationType:r.interpolationType}}{let t=hg(r),n=r.evaluate(new il(e+1));return{kind:"camera",zoomStops:r.zoomStops,sizes:t,layoutSize:n,interpolationType:r.interpolationType}}}function cg(e,t){let r=0;for(;r<e.length&&e[r]<=t;)r++;r=Math.max(0,r-1);let n=r;for(;n<e.length&&e[n]<t+1;)n++;return n=Math.min(e.length-1,n),{minZoom:e[r],maxZoom:e[n]}}function hg(e){return e.zoomStops.map(t=>e.evaluate(new il(t===-1/0?e.zoomStops[1]-1:t)))}function pg(e,{uSize:t,uSizeT:r},{lowerSize:n,upperSize:i}){return"source"===e.kind?n/128:"composite"===e.kind?Rn.number(n/128,i/128,r):t}function fg(e,t){let r=0,n=0;return"constant"===e.kind?n=e.layoutSize:"camera"===e.kind?n=dg(e,t):"composite"===e.kind&&(r=yg(e,t)),{uSizeT:r,uSize:n}}function dg({zoomStops:e,sizes:t,layoutSize:r,interpolationType:n},i){let a=e.length-1;for(;a>0&&e[a]>i;)a--;let o=Math.min(a+1,e.length-1),s=n?Qe($n.interpolationFactor(n,i,e[a],e[o]),0,1):0;return Math.min(Rn.number(t[a],t[o],s),r)}function yg({interpolationType:e,minZoom:t,maxZoom:r},n){return e?Qe($n.interpolationFactor(e,n,t,r),0,1):0}var mg=class e extends x{constructor(e,t,r,n){super(e,t),this.angle=r,void 0!==n&&(this.segment=n)}clone(){return new e(this.x,this.y,this.angle,this.segment)}};function gg(e,t,r,n,i){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(o--,o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],u=0;for(;s<r/2;){let t=e[o-1],r=e[o],a=e[o+1];if(!a)return!1;let c=t.angleTo(r)-r.angleTo(a);for(c=Math.abs((c+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:c}),u+=c;s-l[0].distance>n;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=r.dist(a)}return!0}function xg(e){let t=0;for(let r=0;r<e.length-1;r++)t+=e[r].dist(e[r+1]);return t}function bg(e,t,r){return e?.6*t*r:0}function vg(e,t){return Math.max(e?e.right-e.left:0,t?t.right-t.left:0)}function wg(e,t,r,n,i,a){let o=bg(r,i,a),s=vg(r,n)*a,l=0,u=xg(e)/2;for(let r=0;r<e.length-1;r++){let n=e[r],i=e[r+1],a=n.dist(i);if(l+a>u){let c=(u-l)/a,h=new mg(Rn.number(n.x,i.x,c),Rn.number(n.y,i.y,c),i.angleTo(n),r);return h._round(),!o||gg(e,h,s,o,t)?h:void 0}l+=a}}function _g(e,t,r,n,i,a,o,s,l){let u=bg(n,a,o),c=vg(n,i),h=c*o,p=0===e[0].x||e[0].x===l||0===e[0].y||e[0].y===l;return t-h<t/4&&(t=h+t/4),Ag(e,p?t/2*s%t:(c/2+2*a)*o*s%t,t,u,r,h,p,!1,l)}function Ag(e,t,r,n,i,a,o,s,l){let u=a/2,c=xg(e),h=0,p=t-r,f=[];for(let t=0;t<e.length-1;t++){let o=e[t],s=e[t+1],d=o.dist(s),y=s.angleTo(o);for(;p+r<h+d;){p+=r;let m=(p-h)/d,g=Rn.number(o.x,s.x,m),x=Rn.number(o.y,s.y,m);if(g>=0&&g<l&&x>=0&&x<l&&p-u>=0&&p+u<=c){let r=new mg(g,x,y,t);r._round(),(!n||gg(e,r,a,n,i))&&f.push(r)}}h+=d}return!s&&!f.length&&!o&&(f=Ag(e,h/2,r,n,i,a,o,!0,l)),f}function Dg(e,t,r,n,i){let a=[];for(let o of e){let e;for(let s=0;s<o.length-1;s++){let l=o[s],u=o[s+1];l.x<t&&u.x<t||(l.x<t?l=new x(t,l.y+(u.y-l.y)*((t-l.x)/(u.x-l.x)))._round():u.x<t&&(u=new x(t,l.y+(u.y-l.y)*((t-l.x)/(u.x-l.x)))._round()),!(l.y<r&&u.y<r)&&(l.y<r?l=new x(l.x+(u.x-l.x)*((r-l.y)/(u.y-l.y)),r)._round():u.y<r&&(u=new x(l.x+(u.x-l.x)*((r-l.y)/(u.y-l.y)),r)._round()),!(l.x>=n&&u.x>=n)&&(l.x>=n?l=new x(n,l.y+(u.y-l.y)*((n-l.x)/(u.x-l.x)))._round():u.x>=n&&(u=new x(n,l.y+(u.y-l.y)*((n-l.x)/(u.x-l.x)))._round()),!(l.y>=i&&u.y>=i)&&(l.y>=i?l=new x(l.x+(u.x-l.x)*((i-l.y)/(u.y-l.y)),i)._round():u.y>=i&&(u=new x(l.x+(u.x-l.x)*((i-l.y)/(u.y-l.y)),i)._round()),(!e||!l.equals(e[e.length-1]))&&(e=[l],a.push(e)),e.push(u)))))}}return a}function Sg(e,t,r,n,i,a){let o=Eg(e,t,r,i,0);return o=Eg(o,t,n,a,1),o}function Eg(e,t,r,n,i){switch(t){case 1:return Fg(e,r,n,i);case 2:return kg(e,r,n,i,!1);case 3:return kg(e,r,n,i,!0)}return[]}function Fg(e,t,r,n){let i=[];for(let a of e)for(let e of a){let a=0===n?e.x:e.y;a>=t&&a<=r&&i.push([e])}return i}function Pg(e,t,r,n,i){let a=0===n?Tg:Mg,o=[],s=[];for(let l=0;l<e.length-1;l++){let u=e[l],c=e[l+1],h=0===n?u.x:u.y,p=0===n?c.x:c.y,f=!1;h<t?p>t&&o.push(a(u,c,t)):h>r?p<r&&o.push(a(u,c,r)):o.push(u),p<t&&h>=t&&(o.push(a(u,c,t)),f=!0),p>r&&h<=r&&(o.push(a(u,c,r)),f=!0),!i&&f&&(s.push(o),o=[])}let l=e.length-1,u=0===n?e[l].x:e[l].y;return u>=t&&u<=r&&o.push(e[l]),i&&o.length>0&&!o[0].equals(o[o.length-1])&&o.push(new x(o[0].x,o[0].y)),o.length>0&&s.push(o),s}function kg(e,t,r,n,i){let a=[];for(let o of e){let e=Pg(o,t,r,n,i);e.length>0&&a.push(...e)}return a}function Tg(e,t,r){let n=(r-e.x)/(t.x-e.x);return new x(r,e.y+(t.y-e.y)*n)}function Mg(e,t,r){let n=(r-e.y)/(t.y-e.y);return new x(e.x+(t.x-e.x)*n,r)}function Ig(e,t,r,n){let i=[],a=e.image,o=a.pixelRatio,s=a.paddedRect.w-2,l=a.paddedRect.h-2,u={x1:e.left,y1:e.top,x2:e.right,y2:e.bottom},c=a.stretchX||[[0,s]],h=a.stretchY||[[0,l]],p=(e,t)=>e+t[1]-t[0],f=c.reduce(p,0),d=h.reduce(p,0),y=s-f,m=l-d,g=0,b=f,v=0,w=d,_=0,A=y,D=0,S=m;if(a.content&&n){let t=a.content,r=t[2]-t[0],n=t[3]-t[1];(a.textFitWidth||a.textFitHeight)&&(u=sg(e)),g=Cg(c,0,t[0]),v=Cg(h,0,t[1]),b=Cg(c,t[0],t[2]),w=Cg(h,t[1],t[3]),_=t[0]-g,D=t[1]-v,A=r-b,S=n-w}let E=u.x1,F=u.y1,P=u.x2-E,k=u.y2-F,T=(e,n,i,s)=>{let l=Bg(e.stretch-g,b,P,E),u=zg(e.fixed-_,A,e.stretch,f),c=Bg(n.stretch-v,w,k,F),h=zg(n.fixed-D,S,n.stretch,d),p=Bg(i.stretch-g,b,P,E),y=zg(i.fixed-_,A,i.stretch,f),m=Bg(s.stretch-v,w,k,F),T=zg(s.fixed-D,S,s.stretch,d),M=new x(l,c),I=new x(p,c),C=new x(p,m),O=new x(l,m),B=new x(u/o,h/o),z=new x(y/o,T/o),V=t*Math.PI/180;if(V){let e=Math.sin(V),t=Math.cos(V),r=[t,-e,e,t];M._matMult(r),I._matMult(r),O._matMult(r),C._matMult(r)}let L=e.stretch+e.fixed,$=i.stretch+i.fixed,j=n.stretch+n.fixed,R=s.stretch+s.fixed;return{tl:M,tr:I,bl:O,br:C,tex:{x:a.paddedRect.x+1+L,y:a.paddedRect.y+1+j,w:$-L,h:R-j},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:B,pixelOffsetBR:z,minFontScaleX:A/o/P,minFontScaleY:S/o/k,isSDF:r}};if(n&&(a.stretchX||a.stretchY)){let e=Og(c,y,f),t=Og(h,m,d);for(let r=0;r<e.length-1;r++){let n=e[r],a=e[r+1];for(let e=0;e<t.length-1;e++){let r=t[e],o=t[e+1];i.push(T(n,r,a,o))}}}else i.push(T({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:s+1},{fixed:0,stretch:l+1}));return i}function Cg(e,t,r){let n=0;for(let i of e)n+=Math.max(t,Math.min(r,i[1]))-Math.max(t,Math.min(r,i[0]));return n}function Og(e,t,r){let n=[{fixed:-1,stretch:0}];for(let[t,r]of e){let e=n[n.length-1];
1178n.push({fixed:t-e.stretch,stretch:e.stretch}),n.push({fixed:t-e.stretch,stretch:e.stretch+(r-t)})}return n.push({fixed:t+1,stretch:r}),n}function Bg(e,t,r,n){return e/t*r+n}function zg(e,t,r,n){return e-t*r/n}function Vg(e,t,r,n,i,a,o,s){let l=n.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,u=[];for(let e of t.positionedLines)for(let n of e.positionedGlyphs){if(!n.rect)continue;let a=n.rect||{},c=4,h=!0,p=1,f=0,d=(i||s)&&n.vertical,y=n.metrics.advance*n.scale/2;if(s&&t.verticalizable){let t=24*(n.scale-1),r=(24-n.metrics.width*n.scale)/2;f=e.lineOffset/2-(n.imageName?-r:t)}if(n.imageName){let e=o[n.imageName];h=e.sdf,p=e.pixelRatio,c=1/p}let m=i?[n.x+y,n.y]:[0,0],g=i?[0,0]:[n.x+y+r[0],n.y+r[1]-f],b=[0,0];d&&(b=g,g=[0,0]);let v=n.metrics.isDoubleResolution?2:1,w=(n.metrics.left-c)*n.scale-y+g[0],_=(-n.metrics.top-c)*n.scale+g[1],A=w+a.w/v*n.scale/p,D=_+a.h/v*n.scale/p,S=new x(w,_),E=new x(A,_),F=new x(w,D),P=new x(A,D);if(d){let e=new x(-y,y- -17),t=-Math.PI/2,r=12-y,i=new x(22-r,-(n.imageName?r:0)),a=new x(...b);S._rotateAround(t,e)._add(i)._add(a),E._rotateAround(t,e)._add(i)._add(a),F._rotateAround(t,e)._add(i)._add(a),P._rotateAround(t,e)._add(i)._add(a)}if(l){let e=Math.sin(l),t=Math.cos(l),r=[t,-e,e,t];S._matMult(r),E._matMult(r),F._matMult(r),P._matMult(r)}let k=new x(0,0),T=new x(0,0);u.push({tl:S,tr:E,bl:F,br:P,tex:a,writingMode:t.writingMode,glyphOffset:m,sectionIndex:n.sectionIndex,isSDF:h,pixelOffsetTL:k,pixelOffsetBR:T,minFontScaleX:0,minFontScaleY:0})}return u}Ps("Anchor",mg);var Lg=class{constructor(e,t,r,n,i,a,o,s,l,u){if(this.boxStartIndex=e.length,l){let e=a.top,t=a.bottom,r=a.collisionPadding;r&&(e-=r[1],t+=r[3]);let n=t-e;n>0&&(n=Math.max(10,n),this.circleDiameter=n)}else{let l=a.image?.content&&(a.image.textFitWidth||a.image.textFitHeight)?sg(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};l.y1=l.y1*o-s[0],l.y2=l.y2*o+s[2],l.x1=l.x1*o-s[3],l.x2=l.x2*o+s[1];let c=a.collisionPadding;if(c&&(l.x1-=c[0]*o,l.y1-=c[1]*o,l.x2+=c[2]*o,l.y2+=c[3]*o),u){let e=new x(l.x1,l.y1),t=new x(l.x2,l.y1),r=new x(l.x1,l.y2),n=new x(l.x2,l.y2),i=u*Math.PI/180;e._rotate(i),t._rotate(i),r._rotate(i),n._rotate(i),l.x1=Math.min(e.x,t.x,r.x,n.x),l.x2=Math.max(e.x,t.x,r.x,n.x),l.y1=Math.min(e.y,t.y,r.y,n.y),l.y2=Math.max(e.y,t.y,r.y,n.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,n,i)}this.boxEndIndex=e.length}},$g=class{constructor(e=[],t=(e,t)=>e<t?-1:+(e>t)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;e<n;){let n=1+(e<<1),a=n+1;if(a<this.length&&r(t[a],t[n])<0&&(n=a),r(t[n],i)>=0)break;t[e]=t[n],e=n}t[e]=i}};function jg(e,t=1){let r=Kp.fromPoints(e[0]),n=Math.min(r.width(),r.height()),i=n/2,a=new $g([],Rg),{minX:o,minY:s,maxX:l,maxY:u}=r;if(0===n)return new x(o,s);for(let t=o;t<l;t+=n)for(let r=s;r<u;r+=n)a.push(new Ng(t+i,r+i,i,e));let c=qg(e),h=c;for(;a.length;){let r=a.pop();(r.d>h.d||!h.d)&&(h=r),!(r.max-h.d<=t)&&(i=r.h/2,a.push(new Ng(r.p.x-i,r.p.y-i,i,e)),a.push(new Ng(r.p.x+i,r.p.y-i,i,e)),a.push(new Ng(r.p.x-i,r.p.y+i,i,e)),a.push(new Ng(r.p.x+i,r.p.y+i,i,e)))}return c.d>0&&h.d-c.d<=t?c.p:h.p}function Rg(e,t){return t.max-e.max}var Ng=class{constructor(e,t,r,n){this.p=new x(e,t),this.h=r,this.d=Ug(this.p,n),this.max=this.d+this.h*Math.SQRT2}};function Ug(e,t){let r=!1,n=1/0;for(let i of t)for(let t=0,a=i.length,o=a-1;t<a;o=t++){let a=i[t],s=i[o];a.y>e.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r),n=Math.min(n,zc(e,a,s))}return(r?1:-1)*Math.sqrt(n)}function qg(e){let t=0,r=0,n=0,i=e[0];for(let e=0,a=i.length,o=a-1;e<a;o=e++){let a=i[e],s=i[o],l=a.x*s.y-s.x*a.y;r+=(a.x+s.x)*l,n+=(a.y+s.y)*l,t+=3*l}return new Ng(r/t,n/t,0,e)}let Gg=(function(e){return e[e.center=1]="center",e[e.left=2]="left",e[e.right=3]="right",e[e.top=4]="top",e[e.bottom=5]="bottom",e[e["top-left"]=6]="top-left",e[e["top-right"]=7]="top-right",e[e["bottom-left"]=8]="bottom-left",e[e["bottom-right"]=9]="bottom-right",e})({});const Yg=1/0;function Xg(e,t){return t[1]===Yg?(function(e,t){let r=0,n=0;t<0&&(t=0);let i=t/Math.SQRT2;switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-t;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]})(e,t[0]):(function(e,t,r){let n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]})(e,t[0],t[1])}function Zg(e,t,r){let n=e.layout,i=n.get("text-variable-anchor-offset")?.evaluate(t,{},r);if(i){let e=i.values,t=[];for(let r=0;r<e.length;r+=2){let n=t[r]=e[r],i=e[r+1].map(e=>24*e);n.startsWith("top")?i[1]-=7:n.startsWith("bottom")&&(i[1]+=7),t[r+1]=i}return new Sn(t)}let a=n.get("text-variable-anchor");if(a){let i;i=void 0===e._unevaluatedLayout.getValue("text-radial-offset")?n.get("text-offset").evaluate(t,{},r).map(e=>24*e):[24*n.get("text-radial-offset").evaluate(t,{},r),Yg];let o=[];for(let e of a)o.push(e,Xg(e,i));return new Sn(o)}return null}function Wg(e){e.bucket.createArrays();let t=512*e.bucket.overscaling;e.bucket.tilePixelRatio=ke/t,e.bucket.compareText={},e.bucket.iconsNeedLinear=!1;let r=e.bucket.layers[0],n=r.layout,i=r._unevaluatedLayout._values,a={layoutIconSize:i["icon-size"].possiblyEvaluate(new il(e.bucket.zoom+1),e.canonical),layoutTextSize:i["text-size"].possiblyEvaluate(new il(e.bucket.zoom+1),e.canonical),textMaxSize:i["text-size"].possiblyEvaluate(new il(18))};
1178if("composite"===e.bucket.textSizeData.kind){let{minZoom:t,maxZoom:r}=e.bucket.textSizeData;a.compositeTextSizes=[i["text-size"].possiblyEvaluate(new il(t),e.canonical),i["text-size"].possiblyEvaluate(new il(r),e.canonical)]}if("composite"===e.bucket.iconSizeData.kind){let{minZoom:t,maxZoom:r}=e.bucket.iconSizeData;a.compositeIconSizes=[i["icon-size"].possiblyEvaluate(new il(t),e.canonical),i["icon-size"].possiblyEvaluate(new il(r),e.canonical)]}let o=24*n.get("text-line-height"),s="viewport"!==n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement"),l=n.get("text-keep-upright"),u=n.get("text-size");for(let t of e.bucket.features){let i=n.get("text-font").evaluate(t,{},e.canonical).join(","),c=u.evaluate(t,{},e.canonical),h=a.layoutTextSize.evaluate(t,{},e.canonical),p=a.layoutIconSize.evaluate(t,{},e.canonical),f={horizontal:{},vertical:void 0},d=t.text,y=[0,0];if(d){let a=d.toString(),u=24*n.get("text-letter-spacing").evaluate(t,{},e.canonical),p=Ys(a)?u:0,m=n.get("text-anchor").evaluate(t,{},e.canonical),g=Zg(r,t,e.canonical);if(!g){let r=n.get("text-radial-offset").evaluate(t,{},e.canonical);y=r?Xg(m,[24*r,Yg]):n.get("text-offset").evaluate(t,{},e.canonical).map(e=>24*e)}let x=s?"center":n.get("text-justify").evaluate(t,{},e.canonical),b="point"===n.get("symbol-placement")?24*n.get("text-max-width").evaluate(t,{},e.canonical):1/0,v=()=>{e.bucket.allowVerticalPlacement&&Gs(a)&&(f.vertical=Nm(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,b,o,m,"left",p,y,2,!0,h,c))};if(!s&&g){let t=new Set;if("auto"===x)for(let e=0;e<g.values.length;e+=2)t.add(Hg(g.values[e]));else t.add(x);let r=!1;for(let n of t)if(!f.horizontal[n])if(r)f.horizontal[n]=f.horizontal[0];else{let t=Nm(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,b,o,"center",n,p,y,1,!1,h,c);t&&(f.horizontal[n]=t,r=1===t.positionedLines.length)}v()}else{"auto"===x&&(x=Hg(m));let t=Nm(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,b,o,m,x,p,y,1,!1,h,c);t&&(f.horizontal[x]=t),v(),Gs(a)&&s&&l&&(f.vertical=Nm(d,e.glyphMap,e.glyphPositions,e.imagePositions,i,b,o,m,x,p,y,2,!1,h,c))}}let m,g=!1;if(t.icon?.name){let r=e.imageMap[t.icon.name];r&&(m=og(e.imagePositions[t.icon.name],n.get("icon-offset").evaluate(t,{},e.canonical),n.get("icon-anchor").evaluate(t,{},e.canonical)),g=!!r.sdf,void 0===e.bucket.sdfIcons?e.bucket.sdfIcons=g:e.bucket.sdfIcons!==g&&yt("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),r.pixelRatio===e.bucket.pixelRatio?0!==n.get("icon-rotate").constantOr(1)&&(e.bucket.iconsNeedLinear=!0):e.bucket.iconsNeedLinear=!0)}let x=ex(f.horizontal)||f.vertical;e.bucket.iconsInText||=!!x&&x.iconsInText,(x||m)&&Kg(e.bucket,t,f,m,e.imageMap,a,h,p,y,g,e.canonical,e.subdivisionGranularity)}e.showCollisionBoxes&&e.bucket.generateCollisionDebugBuffers()}function Hg(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Kg(e,t,r,n,i,a,o,s,l,u,c,h){let p=a.textMaxSize.evaluate(t,{});void 0===p&&(p=o);let f,d=e.layers[0].layout,y=d.get("icon-offset").evaluate(t,{},c),m=ex(r.horizontal),g=o/24,x=e.tilePixelRatio*g,b=e.tilePixelRatio*p/24,v=e.tilePixelRatio*s,w=e.tilePixelRatio*d.get("symbol-spacing"),_=d.get("text-padding")*e.tilePixelRatio,A=xx(d,t,c,e.tilePixelRatio),D=d.get("text-max-angle")/180*Math.PI,S="viewport"!==d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),E="map"===d.get("icon-rotation-alignment").constantOr("viewport")&&"point"!==d.get("symbol-placement"),F=d.get("symbol-placement"),P=w/2,k=d.get("icon-text-fit");n&&"none"!==k&&(e.allowVerticalPlacement&&r.vertical&&(f=lg(n,r.vertical,k,d.get("icon-text-fit-padding"),y,g)),m&&(n=lg(n,m,k,d.get("icon-text-fit-padding"),y,g)));let T=c?h.line.getGranularityForZoomLevel(c.z):1,M=(s,h)=>{h.x<0||h.x>=8192||h.y<0||h.y>=8192||tx(e,h,s,r,n,i,f,e.layers[0],e.collisionBoxArray,t.index,t.sourceLayerIndex,e.index,x,[_,_,_,_],S,l,v,A,E,y,t,a,u,c,o)};if("line"===F)for(let i of Dg(t.geometry,0,0,ke,ke)){let t=Op(i,T),a=_g(t,w,D,r.vertical||m,n,24,b,e.overscaling,ke);for(let r of a){(!m||!rx(e,m.text,P,r))&&M(t,r)}}else if("line-center"===F){for(let e of t.geometry)if(e.length>1){let t=Op(e,T),i=wg(t,D,r.vertical||m,n,24,b);i&&M(t,i)}}else if("Polygon"===t.type)for(let e of Yn(t.geometry,0)){let t=jg(e,16);M(Op(e[0],T,!0),new mg(t.x,t.y,0))}else if("LineString"===t.type)for(let e of t.geometry){let t=Op(e,T);M(t,new mg(t[0].x,t[0].y,0))}else if("Point"===t.type)for(let e of t.geometry)for(let t of e)M([t],new mg(t.x,t.y,0))}function Jg(e,t){let r=e.length,n=t?.values;if(n?.length>0)for(let t=0;t<n.length;t+=2){let r=Gg[n[t]],i=n[t+1];e.emplaceBack(r,i[0],i[1])}return[r,e.length]}function Qg(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y){let m=Vg(0,r,s,i,a,o,n,e.allowVerticalPlacement),g=e.textSizeData,x=null;"source"===g.kind?(x=[128*i.layout.get("text-size").evaluate(o,{})],x[0]>32640&&yt(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):"composite"===g.kind&&(x=[128*d.compositeTextSizes[0].evaluate(o,{},y),128*d.compositeTextSizes[1].evaluate(o,{},y)],(x[0]>32640||x[1]>32640)&&yt(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),e.addSymbols(e.text,m,x,s,a,o,c,t,u.lineStartIndex,u.lineLength,f,y,l);for(let t of h)p[t]=e.text.placedSymbolArray.length-1;return 4*m.length}function ex(e){for(let t in e)return e[t];return null}function tx(e,t,r,n,i,a,o,s,l,u,c,h,p,f,d,y,m,g,x,b,v,w,_,A,D){let S=e.addToLineVertexArray(t,r),E=s.layout.get("symbol-height-offset").evaluate(v,{},A);E>e.maxHeightOffset&&(e.maxHeightOffset=E);let F,P,k,T,M=0,I=0,C=0,O=0,B=-1,z=-1,V={},L=(0,Yu.default)("");if(e.allowVerticalPlacement&&n.vertical){let e=s.layout.get("text-rotate").evaluate(v,{},A)+90,r=n.vertical;k=new Lg(l,t,u,c,h,r,p,f,d,e),o&&(T=new Lg(l,t,u,c,h,o,m,g,d,e))}if(i){let r=s.layout.get("icon-rotate").evaluate(v,{}),n="none"!==s.layout.get("icon-text-fit"),a=Ig(i,r,_,n),p=o?Ig(o,r,_,n):void 0;P=new Lg(l,t,u,c,h,i,m,g,!1,r),M=4*a.length;let f=e.iconSizeData,d=null;"source"===f.kind?(d=[128*s.layout.get("icon-size").evaluate(v,{})],d[0]>32640&&yt(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):"composite"===f.kind&&(d=[128*w.compositeIconSizes[0].evaluate(v,{},A),128*w.compositeIconSizes[1].evaluate(v,{},A)],(d[0]>32640||d[1]>32640)&&yt(`${e.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),e.addSymbols(e.icon,a,d,b,x,v,0,t,S.lineStartIndex,S.lineLength,-1,A,E),B=e.icon.placedSymbolArray.length-1,p&&(I=4*p.length,e.addSymbols(e.icon,p,d,b,x,v,2,t,S.lineStartIndex,S.lineLength,-1,A,E),z=e.icon.placedSymbolArray.length-1)}let $=Object.keys(n.horizontal);for(let r of $){let i=n.horizontal[r];F||=(L=(0,Yu.default)(i.text),new Lg(l,t,u,c,h,i,p,f,d,s.layout.get("text-rotate").evaluate(v,{},A)));let o=1===i.positionedLines.length;if(C+=Qg(e,t,i,a,s,d,v,y,E,S,n.vertical?1:3,o?$:[r],V,B,w,A),o)break}n.vertical&&(O+=Qg(e,t,n.vertical,a,s,d,v,y,E,S,2,["vertical"],V,z,w,A));let j=F?F.boxStartIndex:e.collisionBoxArray.length,R=F?F.boxEndIndex:e.collisionBoxArray.length,N=k?k.boxStartIndex:e.collisionBoxArray.length,U=k?k.boxEndIndex:e.collisionBoxArray.length,q=P?P.boxStartIndex:e.collisionBoxArray.length,G=P?P.boxEndIndex:e.collisionBoxArray.length,Y=T?T.boxStartIndex:e.collisionBoxArray.length,X=T?T.boxEndIndex:e.collisionBoxArray.length,Z=-1,W=(e,t)=>e?.circleDiameter?Math.max(e.circleDiameter,t):t;Z=W(F,Z),Z=W(k,Z),Z=W(P,Z),Z=W(T,Z);let H=+(Z>-1);H&&(Z*=D/24),e.glyphOffsetArray.length>=e.maxGlyphs&&yt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==v.sortKey&&e.addToSortKey
1178Ranges(e.symbolInstances.length,v.sortKey);let K=Zg(s,v,A),[J,Q]=Jg(e.textAnchorOffsets,K);e.symbolInstances.emplaceBack(t.x,t.y,V.right>=0?V.right:-1,V.center>=0?V.center:-1,V.left>=0?V.left:-1,V.vertical||-1,B,z,L,j,R,N,U,q,G,Y,X,u,C,O,M,I,H,0,p,Z,J,Q,E)}function rx(e,t,r,n){let i=e.compareText;if(t in i){let e=i[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])<r)return!0}else i[t]=[];return i[t].push(n),!1}function nx(e,t,r){let n="never",i=e.get(t);return i?n=i:e.get(r)&&(n="always"),n}const ix=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ax(e,t,r,n,i,a,o,s,l,u,c,h,p,f){let d=s?Math.min(32640,Math.round(s[0])):0,y=s?Math.min(32640,Math.round(s[1])):0;e.emplaceBack(t,r,Math.round(32*n),Math.round(32*i),a,o,+!!l+(d<<1),y,16*u,16*c,256*h,256*p,f)}function ox(e,t,r){e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r),e.emplaceBack(t.x,t.y,r)}function sx(e){for(let t of e.sections)if(tl(t.text))return!0;return!1}var lx=class{constructor(e){this.layoutVertexArray=new Pu,this.indexArray=new Bu,this.programConfigurations=e,this.segments=new ju,this.dynamicLayoutVertexArray=new ku,this.opacityVertexArray=new Tu,this.hasVisibleVertices=!1,this.placedSymbolArray=new uu}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(e,t,r,n){this.isEmpty()||(r&&(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Cy.members),this.indexBuffer=e.createIndexBuffer(this.indexArray,t),this.dynamicLayoutVertexBuffer=e.createVertexBuffer(this.dynamicLayoutVertexArray,Oy.members,!0),this.opacityVertexBuffer=e.createVertexBuffer(this.opacityVertexArray,ix,!0),this.opacityVertexBuffer.itemSize=1),(r||n)&&this.programConfigurations.upload(e))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}};Ps("SymbolBuffers",lx);var ux=class{constructor(e,t,r){this.layoutVertexArray=new e,this.layoutAttributes=t,this.indexArray=new r,this.segments=new ju,this.collisionVertexArray=new Cu}upload(e){this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=e.createVertexBuffer(this.collisionVertexArray,By.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}};Ps("CollisionBuffers",ux);var cx=class{constructor(e){this.collisionBoxArray=e.collisionBoxArray,this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasDependencies=!0,this.hasRTLText=!1,this.maxHeightOffset=0,this.sortKeyRanges=[],this.collisionCircleArray=[],this.maxGlyphs=65535;let t=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ug(this.zoom,t["text-size"]),this.iconSizeData=ug(this.zoom,t["icon-size"]);let r=this.layers[0].layout,n=r.get("symbol-sort-key"),i=r.get("symbol-z-order");this.canOverlap="never"!==nx(r,"text-overlap","text-allow-overlap")||"never"!==nx(r,"icon-overlap","icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==i&&!n.isConstant();let a="viewport-y"===i||"auto"===i&&!this.sortFeaturesByKey;this.sortFeaturesByY=a&&this.canOverlap,"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(e=>Bm[e])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=e.sourceID}createArrays(){this.text=new lx(new gc(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new lx(new gc(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new pu,this.lineVertexArray=new fu,this.symbolInstances=new hu,this.textAnchorOffsets=new yu}calculateGlyphDependencies(e,t,r,n,i){let a=(n||this.allowVerticalPlacement)&&i,o=nm.fromFeature(e,r),s=o.graphemes();for(let e=0;e<s.length;e++){let r=o.getSection(e);if("imageName"in r)continue;let n=t[r.fontStack]||={},i=s[e];Yy(i)&&(n[i]=!0);for(let e of i){if(n[e]=!0,!a)continue;let t=Xy[e];t&&(n[t]=!0)}}}populate(e,t,r){let n=this.layers[0],i=n.layout,a=i.get("text-font"),o=i.get("text-field"),s=i.get("icon-image"),l=("constant"!==o.value.kind||o.value.value instanceof bn&&!o.value.value.isEmpty()||o.value.value.toString().length>0)&&("constant"!==a.value.kind||a.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],!l&&!u)return;let h=t.iconDependencies,p=t.glyphDependencies,f=t.availableImages,d=new il(this.zoom);for(let{feature:t,id:o,index:s,sourceLayerIndex:y}of e){let e,m,g=n._featureFilter.needGeometry,x=Dc(t,g);if(!n._featureFilter.filter(d,x,r))continue;if(g||(x.geometry=Ac(t)),l){let t=n.getValueAndResolveTokens("text-field",x,r,f),i=bn.factory(t);this.hasRTLText||=sx(i),(!this.hasRTLText||"unavailable"===nl.getRTLTextPluginStatus()||this.hasRTLText&&nl.isParsed())&&(e=$y(i,n,x))}if(u){let e=n.getValueAndResolveTokens("icon-image",x,r,f);m=e instanceof En?e:En.fromString(e)}if(!e&&!m)continue;let b=this.sortFeaturesByKey?c.evaluate(x,{},r):void 0,v={id:o,text:e,icon:m,index:s,sourceLayerIndex:y,geometry:x.geometry,properties:t.properties,type:tf.types[t.type],sortKey:b};if(this.features.push(v),m&&(h[m.name]=!0),e){let t=a.evaluate(x,{},r).join(","),n="viewport"!==i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement");this.allowVerticalPlacement=this.writingModes?.includes(2);let o=Gs(e.toString());this.calculateGlyphDependencies(e,p,t,n,o);for(let t of e.sections)t.image&&(h[t.image.name]=!0)}}"line"===i.get("symbol-placement")&&(this.features=jy(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>
vendor: 6,169 bytes, line 1178
1178e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}addFeatures({options:e,canonical:t,glyphMap:r,glyphPositions:n,iconMap:i,iconPositions:a,showCollisionBoxes:o}){Wg({bucket:this,glyphMap:r,glyphPositions:n,imageMap:i,imagePositions:a,showCollisionBoxes:o,canonical:t,subdivisionGranularity:e.subdivisionGranularity})}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),i={};for(let n=e.segment+1;n<t.length;n++)i[n]={x:t[n].x,y:t[n].y,tileUnitDistanceFromAnchor:r},n<t.length-1&&(r+=t[n+1].dist(t[n]));for(let r=e.segment||0;r>=0;r--)i[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:n},r>0&&(n+=t[r-1].dist(t[r]));for(let e=0;e<t.length;e++){let t=i[e];this.lineVertexArray.emplaceBack(t.x,t.y,t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}}addSymbols(e,t,r,n,i,a,o,s,l,u,c,h,p){let f=e.indexArray,d=e.layoutVertexArray,y=e.segments.prepareSegment(4*t.length,d,f,this.canOverlap?a.sortKey:void 0),m=this.glyphOffsetArray.length,g=y.vertexLength,x=this.allowVerticalPlacement&&2===o?Math.PI/2:0,b=a.text&&a.text.sections;for(let n=0;n<t.length;n++){let{tl:i,tr:o,bl:l,br:u,tex:c,pixelOffsetTL:m,pixelOffsetBR:g,minFontScaleX:v,minFontScaleY:w,glyphOffset:_,isSDF:A,sectionIndex:D}=t[n],S=y.vertexLength,E=_[1];ax(d,s.x,s.y,i.x,E+i.y,c.x,c.y,r,A,m.x,m.y,v,w,p),ax(d,s.x,s.y,o.x,E+o.y,c.x+c.w,c.y,r,A,g.x,m.y,v,w,p),ax(d,s.x,s.y,l.x,E+l.y,c.x,c.y+c.h,r,A,m.x,g.y,v,w,p),ax(d,s.x,s.y,u.x,E+u.y,c.x+c.w,c.y+c.h,r,A,g.x,g.y,v,w,p),ox(e.dynamicLayoutVertexArray,s,x),f.emplaceBack(S,S+2,S+1),f.emplaceBack(S+1,S+2,S+3),y.vertexLength+=4,y.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_[0]),(n===t.length-1||D!==t[n+1].sectionIndex)&&e.programConfigurations.populatePaintArrays(d.length,a,a.index,{imagePositions:{},canonical:h,formattedSection:b?.[D]})}e.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,g,l,u,s.segment,r?r[0]:0,r?r[1]:0,n[0],n[1],o,0,!1,0,c,p)}_addCollisionDebugVertex(e,t,r,n,i,a){return t.emplaceBack(0,0),e.emplaceBack(r.x,r.y,n,i,Math.round(a.x),Math.round(a.y))}addCollisionDebugVertices(e,t,r,n,i,a,o){let s=i.segments.prepareSegment(4,i.layoutVertexArray,i.indexArray),l=s.vertexLength,u=i.layoutVertexArray,c=i.collisionVertexArray,h=o.anchorX,p=o.anchorY;this._addCollisionDebugVertex(u,c,a,h,p,new x(e,t)),this._addCollisionDebugVertex(u,c,a,h,p,new x(r,t)),this._addCollisionDebugVertex(u,c,a,h,p,new x(r,n)),this._addCollisionDebugVertex(u,c,a,h,p,new x(e,n)),s.vertexLength+=4;let f=i.indexArray;f.emplaceBack(l,l+1),f.emplaceBack(l+1,l+2),f.emplaceBack(l+2,l+3),f.emplaceBack(l+3,l),s.primitiveLength+=4}addDebugCollisionBoxes(e,t,r,n){for(let i=e;i<t;i++){let e=this.collisionBoxArray.get(i),t=e.x1,a=e.y1,o=e.x2,s=e.y2;this.addCollisionDebugVertices(t,a,o,s,n?this.textCollisionBox:this.iconCollisionBox,e.anchorPoint,r)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new ux(Mu,zy.members,zu),this.iconCollisionBox=new ux(Mu,zy.members,zu);for(let e=0;e<this.symbolInstances.length;e++){let t=this.symbolInstances.get(e);this.addDebugCollisionBoxes(t.textBoxStartIndex,t.textBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.verticalTextBoxStartIndex,t.verticalTextBoxEndIndex,t,!0),this.addDebugCollisionBoxes(t.iconBoxStartIndex,t.iconBoxEndIndex,t,!1),this.addDebugCollisionBoxes(t.verticalIconBoxStartIndex,t.verticalIconBoxEndIndex,t,!1)}}_deserializeCollisionBoxesForSymbol(e,t,r,n,i,a,o,s,l){let u={};for(let n=t;n<r;n++){let t=e.get(n);u.textBox={x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,anchorPointX:t.anchorPointX,anchorPointY:t.anchorPointY},u.textFeatureIndex=t.featureIndex;break}for(let t=n;t<i;t++){let r=e.get(t);u.verticalTextBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.verticalTextFeatureIndex=r.featureIndex;break}for(let t=a;t<o;t++){let r=e.get(t);u.iconBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.iconFeatureIndex=r.featureIndex;break}for(let t=s;t<l;t++){let r=e.get(t);u.verticalIconBox={x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,anchorPointX:r.anchorPointX,anchorPointY:r.anchorPointY},u.verticalIconFeatureIndex=r.featureIndex;break}return u}deserializeCollisionBoxes(e){this.collisionArrays=[];for(let t=0;t<this.symbolInstances.length;t++){let r=this.symbolInstances.get(t);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(e,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;t<n;t+=4)e.indexArray.emplaceBack(t,t+2,t+1),e.indexArray.emplaceBack(t+1,t+2,t+3)}
1178getSortedSymbolIndexes(e){if(this.sortedAngle===e&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;let t=Math.sin(e),r=Math.cos(e),n=[],i=[],a=[];for(let e=0;e<this.symbolInstances.length;++e){a.push(e);let o=this.symbolInstances.get(e);n.push(0|Math.round(t*o.anchorX+r*o.anchorY)),i.push(o.featureIndex)}return a.sort((e,t)=>n[e]-n[t]||i[t]-i[e]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r?.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let e of this.symbolInstanceIndexes){let t=this.symbolInstances.get(e);this.featureSortOrder.push(t.featureIndex);let r=[t.rightJustifiedTextSymbolIndex,t.centerJustifiedTextSymbolIndex,t.leftJustifiedTextSymbolIndex];for(let e=0;e<r.length;e++){let t=r[e];t>=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}t.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,t.verticalPlacedTextSymbolIndex),t.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.placedIconSymbolIndex),t.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,t.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}};function hx(e,t){return t.replace(/{([^{}]+)}/g,(t,r)=>e&&r in e?String(e[r]):"")}let px;Ps("SymbolBucket",cx,{omit:["layers","collisionBoxArray","features","compareText"]});let fx;var dx={get paint(){return fx||=new _l({"icon-opacity":new xl(mr.paint_symbol["icon-opacity"],"icon-opacity"),"icon-color":new xl(mr.paint_symbol["icon-color"],"icon-color"),"icon-halo-color":new xl(mr.paint_symbol["icon-halo-color"],"icon-halo-color"),"icon-halo-width":new xl(mr.paint_symbol["icon-halo-width"],"icon-halo-width"),"icon-halo-blur":new xl(mr.paint_symbol["icon-halo-blur"],"icon-halo-blur"),"icon-translate":new gl(mr.paint_symbol["icon-translate"],"icon-translate"),"icon-translate-anchor":new gl(mr.paint_symbol["icon-translate-anchor"],"icon-translate-anchor"),"text-opacity":new xl(mr.paint_symbol["text-opacity"],"text-opacity"),"text-color":new xl(mr.paint_symbol["text-color"],"text-color",{runtimeType:Ar,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new xl(mr.paint_symbol["text-halo-color"],"text-halo-color"),"text-halo-width":new xl(mr.paint_symbol["text-halo-width"],"text-halo-width"),"text-halo-blur":new xl(mr.paint_symbol["text-halo-blur"],"text-halo-blur"),"text-translate":new gl(mr.paint_symbol["text-translate"],"text-translate"),"text-translate-anchor":new gl(mr.paint_symbol["text-translate-anchor"],"text-translate-anchor")})},get layout(){return px||=new _l({"symbol-placement":new gl(mr.layout_symbol["symbol-placement"],"symbol-placement"),"symbol-spacing":new gl(mr.layout_symbol["symbol-spacing"],"symbol-spacing"),"symbol-avoid-edges":new gl(mr.layout_symbol["symbol-avoid-edges"],"symbol-avoid-edges"),"symbol-sort-key":new xl(mr.layout_symbol["symbol-sort-key"],"symbol-sort-key"),"symbol-z-order":new gl(mr.layout_symbol["symbol-z-order"],"symbol-z-order"),"icon-allow-overlap":new gl(mr.layout_symbol["icon-allow-overlap"],"icon-allow-overlap"),"icon-overlap":new gl(mr.layout_symbol["icon-overlap"],"icon-overlap"),"icon-ignore-placement":new gl(mr.layout_symbol["icon-ignore-placement"],"icon-ignore-placement"),"icon-optional":new gl(mr.layout_symbol["icon-optional"],"icon-optional"),"icon-rotation-alignment":new xl(mr.layout_symbol["icon-rotation-alignment"],"icon-rotation-alignment"),"icon-size":new xl(mr.layout_symbol["icon-size"],"icon-size"),"icon-text-fit":new gl(mr.layout_symbol["icon-text-fit"],"icon-text-fit"),"icon-text-fit-padding":new gl(mr.layout_symbol["icon-text-fit-padding"],"icon-text-fit-padding"),"icon-image":new xl(mr.layout_symbol["icon-image"],"icon-image"),"icon-rotate":new xl(mr.layout_symbol["icon-rotate"],"icon-rotate"),"icon-padding":new xl(mr.layout_symbol["icon-padding"],"icon-padding"),"icon-keep-upright":new gl(mr.layout_symbol["icon-keep-upright"],"icon-keep-upright"),"icon-offset":new xl(mr.layout_symbol["icon-offset"],"icon-offset"),"icon-anchor":new xl(mr.layout_symbol["icon-anchor"],"icon-anchor"),"icon-pitch-alignment":new gl(mr.layout_symbol["icon-pitch-alignment"],"icon-pitch-alignment"),"text-pitch-alignment":new gl(mr.layout_symbol["text-pitch-alignment"],"text-pitch-alignment"),"text-rotation-alignment":new gl(mr.layout_symbol["text-rotation-alignment"],"text-rotation-alignment"),"text-field":new xl(mr.layout_symbol["text-field"],"text-field"),"text-font":new xl(mr.layout_symbol["text-font"],"text-font"),"text-size":new xl(mr.layout_symbol["text-size"],"text-size"),"text-max-width":new xl(mr.layout_symbol["text-max-width"],"text-max-width"),"text-line-height":new gl(mr.layout_symbol["text-line-height"],"text-line-height"),"text-letter-spacing":new xl(mr.layout_symbol["text-letter-spacing"],"text-letter-spacing"),"text-justify":new xl(mr.layout_symbol["text-justify"],"text-justify"),"text-radial-offset":new xl(mr.layout_symbol["text-radial-offset"],"text-radial-offset"),"text-variable-anchor":new gl(mr.layout_symbol["text-variable-anchor"],"text-variable-anchor"),"text-variable-anchor-offset":new xl(mr.layout_symbol["text-variable-anchor-offset"],"text-variable-anchor-offset"),"text-anchor":new xl(mr.layout_symbol["text-anchor"],"text-anchor"),"text-max-angle":new gl(mr.layout_symbol["text-max-angle"],"text-max-angle"),"text-writing-mode":new gl(mr.layout_symbol["text-writing-mode"],"text-writing-mode"),"text-rotate":new xl(mr.layout_symbol["text-rotate"],"text-rotate"),"text-padding":new gl(mr.layout_symbol["text-padding"],"text-padding"),"text-keep-upright":new gl(mr.layout_symbol["text-keep-upright"],"text-keep-upright"),"text-transform":new xl(mr.layout_symbol["text-transform"],"text-transform"),"text-offset":new xl(mr.layout_symbol["text-offset"],"text-offset"),"text-allow-overlap":new gl(mr.layout_symbol["text-allow-overlap"],"text-allow-overlap"),"text-overlap":new gl(mr.layout_symbol["text-overlap"],"text-overlap"),"text-ignore-placement":new gl(mr.layout_symbol["text-ignore-placement"],"text-ignore-placement"),"text-optional":new gl(mr.layout_symbol["text-optional"],"text-optional"),"symbol-height-offset":new xl(mr.layout_symbol["symbol-height-offset"],"symbol-height-offset"),"symbol-height-anchor":new gl(mr.layout_symbol["symbol-height-anchor"],"symbol-height-anchor")})}},yx=class{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:br,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t?.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){if(!this.defaultValue.isConstant()){e(this.defaultValue.value._styleExpression.expression)}}outputDefined(){return!1}serialize(){return null}};Ps("FormatSectionOverride",yx,{omit:["defaultValue"]});const mx=e=>"symbol"===e.type;var gx=class e extends Sl{constructor(e,t){super(e,dx,t)}recalculate(e,t){super.recalculate(e,t);let r=this.layout.get("icon-rotation-alignment");
1178if(("constant"!==r.value.kind||"auto"===r.value.value)&&(this.layout._values["icon-rotation-alignment"]=new fl(r.property,{kind:"constant",value:"point"===this.layout.get("symbol-placement")?"viewport":"map"},r.parameters)),"auto"===this.layout.get("text-rotation-alignment")&&("point"===this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="viewport":this.layout._values["text-rotation-alignment"]="map"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment").constantOr("viewport")),"point"===this.layout.get("symbol-placement")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.includes(r)||t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){let i=this.layout.get(e).evaluate(t,{},r,n),a=this._unevaluatedLayout._values[e];return a.isDataDriven()||Ka(a.value)||!i?i:hx(t.properties,i)}createBucket(e){return new cx(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let t of dx.paint.overridableProperties){if(!e.hasPaintOverride(this.layout,t))continue;let r=this.paint.get(t),n=new Za(new yx(r),`layers[${this.id}].paint.${r.property.name}`,r.property.specification),i=null;i="constant"===r.value.kind||"source"===r.value.kind?new Qa("source",n):new eo("composite",n,r.value.zoomStops),this.paint._values[t]=new fl(r.property,i,r.parameters)}}_handleOverridablePaintPropertyUpdate(t,r,n){return!(!this.layout||r.isDataDriven()||n.isDataDriven())&&e.hasPaintOverride(this.layout,t)}static hasPaintOverride(e,t){let r=e.get("text-field"),n=dx.paint.properties[t],i=!1,a=e=>{for(let t of e)if(n.overrides?.hasOverride(t))return void(i=!0)};if("constant"===r.value.kind&&r.value.value instanceof bn)a(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){let e=t=>{if(!i)if(t instanceof Cn&&Mn(t.value)===kr){let e=t.value;a(e.sections)}else t instanceof Nn?a(t.sections):t.eachChild(e)},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return i}};function xx(e,t,r,n=1){let i=e.get("icon-padding").evaluate(t,{},r)?.values;return[i[0]*n,i[1]*n,i[2]*n,i[3]*n]}let bx;var vx={get paint(){return bx||=new _l({"background-color":new gl(mr.paint_background["background-color"],"background-color"),"background-pattern":new vl(mr.paint_background["background-pattern"],"background-pattern"),"background-opacity":new gl(mr.paint_background["background-opacity"],"background-opacity")})}};const wx=e=>"background"===e.type;var _x=class extends Sl{constructor(e,t){super(e,vx,t)}};function Ax(e){let t=[],r=e.id;return void 0===r&&t.push(new xr(`layers.${r}`,null,"missing required property \"id\"")),void 0===e.render&&t.push(new xr(`layers.${r}`,null,"missing required method \"render\"")),e.renderingMode&&"2d"!==e.renderingMode&&"3d"!==e.renderingMode&&t.push(new xr(`layers.${r}`,null,"property \"renderingMode\" must be either \"2d\" or \"3d\"")),t}const Dx=e=>"custom"===e.type;var Sx=class extends Sl{constructor(e,t){super(e,{},t),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}};function Ex(e,t){if("custom"===e.type)return new Sx(e,t);switch(e.type){case"background":return new _x(e,t);case"circle":return new nh(e,t);case"color-relief":return new Ph(e,t);case"fill":return new Xp(e,t);case"fill-extrusion":return new Uf(e,t);case"heatmap":return new mh(e,t);case"hillshade":return new vh(e,t);case"line":return new My(e,t);case"raster":return new kl(e,t);case"symbol":return new gx(e,t)}}var Fx=class{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){this._triggered||(this._triggered=!0,this._channel?.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}};const Px={once:!0};var kx=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Fx(()=>this.process()),this.subscription=It(this.target,"message",e=>this.receive(e),!1),this.globalScope=bt(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,n)=>{let i=Math.round(1e18*Math.random()).toString(36).substring(0,10),a=t?It(t.signal,"abort",()=>{a?.unsubscribe(),delete this.resolveRejects[i];let r={id:i,type:"<cancel>",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(r),n(new Yt(t.signal.reason))},Px):null;this.resolveRejects[i]={resolve:e=>{a?.unsubscribe(),r(e)},reject:e=>{a?.unsubscribe(),n(e)}};let o=[],s=Object.assign({},e,{id:i,sourceMapId:this.mapId,origin:location.origin,data:Cs(e.data,o)});this.target.postMessage(s,{transfer:o})})}receive(e){let t=e.data,r=t.id,n=["file://","resource://android","null"],i=[t.origin,location.origin],a=t.origin===location.origin,o=i.some(e=>n.includes(e));if((a||o)&&(!t.targetMapId||this.mapId===t.targetMapId)){if("<cancel>"===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(bt(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}async processTask(e,t){if("<response>"===t.type){let r=this.resolveRejects[e];if(delete this.resolveRejects[e],!r)return;return void(t.error?r.reject(Ie(Os(t.error))):r.resolve(Os(t.data)))}if(!this.messageHandlers[t.type])return void this.completeTask(e,null,null);let r=Os(t.data),n=new AbortController;this.abortControllers[e]=n;try{let i=await this.messageHandlers[t.type](t.sourceMapId,r,n);this.completeTask(e,null,i)}catch(t){this.completeTask(e,Ie(t))}}completeTask(e,t,r){let n=[];delete this.abortControllers[e];let i={id:e,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?Cs(t):null,data:Cs(r,n)};this.target.postMessage(i,{transfer:n})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}};function Tx(e,t,r){return!(e<0||e>25||r<0||r>=2**e||t<0||t>=2**e)}function Mx(e,t){let{x:r,y:n}=bf.fromLngLat(t);return!(e<0||e>25||n<0||n>=1||r<0||r>=1)}var Ix=class{constructor(e,t,r){if(!Tx(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${2**e}, 0<=y<${2**e} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=Bx(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){let n=Vx(this.x,this.y,this.z),i=$x(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}
1178/g,String("tms"===r?2**this.z-this.y-1:this.y)).replace(/{ratio}/g,t>1?"@2x":"").replace(/{quadkey}/g,i).replace(/{bbox-epsg-3857}/g,n)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=2**this.z;return new x((e.x*t-this.x)*ke,(e.y*t-this.y)*ke)}toString(){return`${this.z}/${this.x}/${this.y}`}},Cx=class{constructor(e,t){this.wrap=e,this.canonical=t,this.key=Bx(e,t.z,t.z,t.x,t.y)}},Ox=class e{constructor(e,t,r,n,i){if(this.terrainRttPosMatrix32f=null,e<r)throw Error(`overscaledZ should be >= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new Ix(r,+n,+i),this.key=Bx(t,e,r,n,i)}clone(){return new e(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(t){if(t>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-t;return t>this.canonical.z?new e(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new e(t,this.wrap,t,this.canonical.x>>r,this.canonical.y>>r)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,t){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?Bx(this.wrap*+t,e,this.canonical.z,this.canonical.x,this.canonical.y):Bx(this.wrap*+t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(0===e.overscaledZ)return this.overscaledZ>0;let t=this.canonical.z-e.canonical.z;return!(t<0)&&(e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t)}children(t){if(this.overscaledZ>=t)return[new e(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let r=this.canonical.z+1,n=2*this.canonical.x,i=2*this.canonical.y;return[new e(r,this.wrap,r,n,i),new e(r,this.wrap,r,n+1,i),new e(r,this.wrap,r,n,i+1),new e(r,this.wrap,r,n+1,i+1)]}isLessThan(e){return this.wrap<e.wrap||!(this.wrap>e.wrap)&&(this.overscaledZ<e.overscaledZ||!(this.overscaledZ>e.overscaledZ)&&(this.canonical.x<e.canonical.x||!(this.canonical.x>e.canonical.x)&&this.canonical.y<e.canonical.y))}wrapped(){return new e(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new e(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return 2**(this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Cx(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(e){return this.canonical.getTilePoint(new bf(e.x-this.wrap,e.y))}normalizeCoordinates(t,r,n=ke){if(t>=0&&t<n&&r>=0&&r<n)return{tileID:this,x:t,y:r};let i=Math.floor(t/n),a=Math.floor(r/n),o=t-i*n,s=r-a*n,l=this.canonical.z,u=1<<l,c=this.canonical.y+a;if(c<0||c>=u)return null;let h=this.canonical.x+i,p=this.wrap;return h<0?(p-=Math.ceil(-h/u),h=(h%u+u)%u):h>=u&&(p+=Math.floor(h/u),h%=u),{tileID:new e(this.overscaledZ,p,l,h,c),x:o,y:s}}};function Bx(e,t,r,n,i){(e*=2)<0&&(e=-1*e-1);let a=1<<r;return(a*a*e+a*i+n).toString(36)+r.toString(36)+t.toString(36)}const zx=6378137*Math.PI;function Vx(e,t,r){let n=Lx(256*e,256*(t=2**r-t-1),r),i=Lx(256*(e+1),256*(t+1),r);return`${n[0]},${n[1]},${i[0]},${i[1]}`}function Lx(e,t,r){let n=2*zx/256/2**r;return[e*n-zx,t*n-zx]}function $x(e,t,r){let n="";for(let i=e;i>0;i--){let e=1<<i-1;n+=(t&e?1:0)+(r&e?2:0)}return n}function jx(e,t){let r=Math.abs(2*e.wrap)-+(e.wrap<0),n=Math.abs(2*t.wrap)-+(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}Ps("CanonicalTileID",Ix),Ps("OverscaledTileID",Ox,{omit:["terrainRttPosMatrix32f"]});var Rx=class{constructor(e,t){this.feature=e,this.type=e.type,this.properties=e.tags?e.tags:{},this.extent=t,"id"in e&&("string"==typeof e.id?this.id=parseInt(e.id,10):"number"==typeof e.id&&!isNaN(e.id)&&(this.id=e.id))}loadGeometry(){let e=[],t=1===this.feature.type?[this.feature.geometry]:this.feature.geometry;for(let r of t){let t=[];for(let e of r)t.push(new x(e[0],e[1]));e.push(t)}return e}};const Nx="_geojsonTileLayer";var Ux=class{constructor(e,t){this.layers={[Nx]:this},this.name=Nx,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=e.length,this.features=e}feature(e){return new Rx(this.features[e],this.extent)}};function qx(e,t=""){let r=new lm;return Gx(e,r,t),r.finish()}function Gx(e,t,r=""){for(let n in e.layers)t.writeMessage(3,(e,t)=>Yx(e,t,r),e.layers[n])}
1178function Yx(e,t,r=""){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);let n={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let r=0;r<e.length;r++)n.feature=e.feature(r),t.writeMessage(2,Xx,n);let i=n.keys;for(let e of i)t.writeStringField(3,e);let a=n.values;for(let e of a)t.writeMessage(4,Jx,e)}function Xx(e,t){if(!e.feature)return;let r=e.feature;void 0!==r.id&&t.writeVarintField(1,r.id),t.writeMessage(2,Zx,e),t.writeVarintField(3,r.type),t.writeMessage(4,Kx,r)}function Zx(e,t){for(let r in e.feature?.properties){let n=e.feature.properties[r],i=e.keycache[r];if(null==n)continue;void 0===i&&(e.keys.push(r),i=e.keys.length-1,e.keycache[r]=i),t.writeVarint(i),"string"!=typeof n&&"boolean"!=typeof n&&"number"!=typeof n&&(n=e.jsonPrefix+JSON.stringify(n));let a=typeof n+":"+n,o=e.valuecache[a];void 0===o&&(e.values.push(n),o=e.values.length-1,e.valuecache[a]=o),t.writeVarint(o)}}function Wx(e,t){return(t<<3)+(7&e)}function Hx(e){return e<<1^e>>31}function Kx(e,t){let r=e.loadGeometry(),n=e.type,i=0,a=0;for(let o of r){let r=1;1===n&&(r=o.length),t.writeVarint(Wx(1,r));let s=3===n?o.length-1:o.length;for(let e=0;e<s;e++){1===e&&1!==n&&t.writeVarint(Wx(2,s-1));let r=o[e].x-i,l=o[e].y-a;t.writeVarint(Hx(r)),t.writeVarint(Hx(l)),i+=r,a+=l}3===e.type&&t.writeVarint(Wx(7,1))}}function Jx(e,t){let r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1==0?e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e):t.writeDoubleField(3,e))}var Qx=class{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t<e.length;t++){let r=e[t];this._stringToNumber[r]=t,this._numberToString[t]=r}}encode(e){return this._stringToNumber[e]}decode(e){if(e>=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}},eb=class{constructor(e,t,r,n,i){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=n,this._z=t;for(let t in e.properties)"string"==typeof e.properties[t]&&e.properties[t].startsWith("__$json__:")&&(e.properties[t]=JSON.parse(e.properties[t].slice(10)));this.properties=e.properties,this.id=i}projectPoint(e,t,r,n){return[360*(e.x+t)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+r)/n)*Math.PI))-90]}projectLine(e,t,r,n){return e.map(e=>this.projectPoint(e,t,r,n))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*2**this._z,r=e.extent*this._x,n=e.extent*this._y,i=e.loadGeometry();switch(e.type){case 1:{let e=[];for(let t of i)e.push(t[0]);let a=this.projectLine(e,r,n,t);this._geometry=1===e.length?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a};break}case 2:{let e=i.map(e=>this.projectLine(e,r,n,t));this._geometry=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e};break}case 3:{let e=rf(i),a=[];for(let i of e)a.push(i.map(e=>this.projectLine(e,r,n,t)));this._geometry=1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&"_x"!==t&&"_y"!==t&&"_z"!==t&&(e[t]=this[t]);return e}},tb=class{constructor(e,t,r){this._name=e,this.dataBuffer=t,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){return this.nullabilityBuffer?.get(e)||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}},rb=class extends tb{},nb=class extends rb{getValueFromBuffer(e){return this.dataBuffer[e]}},ib=class extends rb{getValueFromBuffer(e){return this.dataBuffer[e]}},ab=class extends tb{constructor(e,t,r,n){super(e,t,n),this.delta=r}},ob=class extends ab{constructor(e,t,r,n,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r,n)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}},sb=class extends tb{constructor(e,t,r,n){super(e,n?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},lb=class{constructor(e,t,r,n,i=4096){if(this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=n,this._extent=i,0===e.length)throw Error("Missing layer name")}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors??[]}
1178getPropertyVector(e){return this.propertyVectorsMap||=new Map(this.propertyVectors.map(e=>[e.name,e])),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r<this.numFeatures;r++){let n;if(this.idVector){let e=this.idVector.getValue(r);null!==e&&(n=this.containsMaxSafeIntegerValues(this.idVector)?Number(e):e)}let i={coordinates:t[r],type:this.geometryVector.geometryType(r)},a={};for(let e of this.propertyVectors){if(!e)continue;let t=e.name,n=e.getValue(r);null!==n&&(a[t]=n)}e.push({id:n,geometry:i,properties:a})}return e}containsMaxSafeIntegerValues(e){return e instanceof nb||e instanceof sb||e instanceof ob||e instanceof ib}};const ub=0,cb=0,hb=1,pb=2,fb=3,db=4,yb=5,mb=6,gb=7,xb=8,bb=9,vb=0,wb=1,_b=2,Ab=0;var Db,Sb,Eb=class{constructor(e){this.value=e}get(){return this.value}set(e){this.value=e}increment(){return this.value++}add(e){this.value+=e}};!(function(e){e.NONE="NONE",e.DELTA="DELTA",e.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",e.RLE="RLE",e.MORTON="MORTON"})(Db||={}),(function(e){e.NONE="NONE",e.FAST_PFOR="FAST_PFOR",e.VARINT="VARINT"})(Sb||={});const Fb=new Uint32Array(33);Fb[0]=0;for(let e=1;e<=32;e++)Fb[e]=32===e?4294967295:4294967295>>>32-e;const Pb=Fb;function kb(e,t){return e-e%t}function Tb(e){return kb(e+31,32)}function Mb(e){let t=e>>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}function Ib(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0;r[i++]=a>>>0&3,r[i++]=a>>>2&3,r[i++]=a>>>4&3,r[i++]=a>>>6&3,r[i++]=a>>>8&3,r[i++]=a>>>10&3,r[i++]=a>>>12&3,r[i++]=a>>>14&3,r[i++]=a>>>16&3,r[i++]=a>>>18&3,r[i++]=a>>>20&3,r[i++]=a>>>22&3,r[i++]=a>>>24&3,r[i++]=a>>>26&3,r[i++]=a>>>28&3,r[i++]=a>>>30&3,r[i++]=o>>>0&3,r[i++]=o>>>2&3,r[i++]=o>>>4&3,r[i++]=o>>>6&3,r[i++]=o>>>8&3,r[i++]=o>>>10&3,r[i++]=o>>>12&3,r[i++]=o>>>14&3,r[i++]=o>>>16&3,r[i++]=o>>>18&3,r[i++]=o>>>20&3,r[i++]=o>>>22&3,r[i++]=o>>>24&3,r[i++]=o>>>
vendor: 11,190 bytes, line 1178
117826&3,r[i++]=o>>>28&3,r[i]=o>>>30&3}function Cb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0;r[i++]=a>>>0&7,r[i++]=a>>>3&7,r[i++]=a>>>6&7,r[i++]=a>>>9&7,r[i++]=a>>>12&7,r[i++]=a>>>15&7,r[i++]=a>>>18&7,r[i++]=a>>>21&7,r[i++]=a>>>24&7,r[i++]=a>>>27&7,r[i++]=7&(a>>>30|(1&o)<<2),r[i++]=o>>>1&7,r[i++]=o>>>4&7,r[i++]=o>>>7&7,r[i++]=o>>>10&7,r[i++]=o>>>13&7,r[i++]=o>>>16&7,r[i++]=o>>>19&7,r[i++]=o>>>22&7,r[i++]=o>>>25&7,r[i++]=o>>>28&7,r[i++]=7&(o>>>31|(3&s)<<1),r[i++]=s>>>2&7,r[i++]=s>>>5&7,r[i++]=s>>>8&7,r[i++]=s>>>11&7,r[i++]=s>>>14&7,r[i++]=s>>>17&7,r[i++]=s>>>20&7,r[i++]=s>>>23&7,r[i++]=s>>>26&7,r[i]=s>>>29&7}function Ob(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0;r[i++]=a>>>0&15,r[i++]=a>>>4&15,r[i++]=a>>>8&15,r[i++]=a>>>12&15,r[i++]=a>>>16&15,r[i++]=a>>>20&15,r[i++]=a>>>24&15,r[i++]=a>>>28&15,r[i++]=o>>>0&15,r[i++]=o>>>4&15,r[i++]=o>>>8&15,r[i++]=o>>>12&15,r[i++]=o>>>16&15,r[i++]=o>>>20&15,r[i++]=o>>>24&15,r[i++]=o>>>28&15,r[i++]=s>>>0&15,r[i++]=s>>>4&15,r[i++]=s>>>8&15,r[i++]=s>>>12&15,r[i++]=s>>>16&15,r[i++]=s>>>20&15,r[i++]=s>>>24&15,r[i++]=s>>>28&15,r[i++]=l>>>0&15,r[i++]=l>>>4&15,r[i++]=l>>>8&15,r[i++]=l>>>12&15,r[i++]=l>>>16&15,r[i++]=l>>>20&15,r[i++]=l>>>24&15,r[i]=l>>>28&15}function Bb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0;r[i++]=a>>>0&31,r[i++]=a>>>5&31,r[i++]=a>>>10&31,r[i++]=a>>>15&31,r[i++]=a>>>20&31,r[i++]=a>>>25&31,r[i++]=31&(a>>>30|(7&o)<<2),r[i++]=o>>>3&31,r[i++]=o>>>8&31,r[i++]=o>>>13&31,r[i++]=o>>>18&31,r[i++]=o>>>23&31,r[i++]=31&(o>>>28|(1&s)<<4),r[i++]=s>>>1&31,r[i++]=s>>>6&31,r[i++]=s>>>11&31,r[i++]=s>>>16&31,r[i++]=s>>>21&31,r[i++]=s>>>26&31,r[i++]=31&(s>>>31|(15&l)<<1),r[i++]=l>>>4&31,r[i++]=l>>>9&31,r[i++]=l>>>14&31,r[i++]=l>>>19&31,r[i++]=l>>>24&31,r[i++]=31&(l>>>29|(3&u)<<3),r[i++]=u>>>2&31,r[i++]=u>>>7&31,r[i++]=u>>>12&31,r[i++]=u>>>17&31,r[i++]=u>>>22&31,r[i]=u>>>27&31}function zb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0;r[i++]=a>>>0&63,r[i++]=a>>>6&63,r[i++]=a>>>12&63,r[i++]=a>>>18&63,r[i++]=a>>>24&63,r[i++]=63&(a>>>30|(15&o)<<2),r[i++]=o>>>4&63,r[i++]=o>>>10&63,r[i++]=o>>>16&63,r[i++]=o>>>22&63,r[i++]=63&(o>>>28|(3&s)<<4),r[i++]=s>>>2&63,r[i++]=s>>>8&63,r[i++]=s>>>14&63,r[i++]=s>>>20&63,r[i++]=s>>>26&63,r[i++]=l>>>0&63,r[i++]=l>>>6&63,r[i++]=l>>>12&63,r[i++]=l>>>18&63,r[i++]=l>>>24&63,r[i++]=63&(l>>>30|(15&u)<<2),r[i++]=u>>>4&63,r[i++]=u>>>10&63,r[i++]=u>>>16&63,r[i++]=u>>>22&63,r[i++]=63&(u>>>28|(3&c)<<4),r[i++]=c>>>2&63,r[i++]=c>>>8&63,r[i++]=c>>>14&63,r[i++]=c>>>20&63,r[i]=c>>>26&63}function Vb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0;r[i++]=a>>>0&127,r[i++]=a>>>7&127,r[i++]=a>>>14&127,r[i++]=a>>>21&127,r[i++]=127&(a>>>28|(7&o)<<4),r[i++]=o>>>3&127,r[i++]=o>>>10&127,r[i++]=o>>>17&127,r[i++]=o>>>24&127,r[i++]=127&(o>>>31|(63&s)<<1),r[i++]=s>>>6&127,r[i++]=s>>>13&127,r[i++]=s>>>20&127,r[i++]=127&(s>>>27|(3&l)<<5),r[i++]=l>>>2&127,r[i++]=l>>>9&127,r[i++]=l>>>16&127,r[i++]=l>>>23&127,r[i++]=127&(l>>>30|(31&u)<<2),r[i++]=u>>>5&127,r[i++]=u>>>12&127,r[i++]=u>>>19&127,r[i++]=127&(u>>>26|(1&c)<<6),r[i++]=c>>>1&127,r[i++]=c>>>8&127,r[i++]=c>>>15&127,r[i++]=c>>>22&127,r[i++]=127&(c>>>29|(15&h)<<3),r[i++]=h>>>4&127,r[i++]=h>>>11&127,r[i++]=h>>>18&127,r[i]=h>>>25&127}function Lb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0,p=e[t+7]>>>0;r[i++]=a>>>0&255,r[i++]=a>>>8&255,r[i++]=a>>>16&255,r[i++]=a>>>24&255,r[i++]=o>>>0&255,r[i++]=o>>>8&255,r[i++]=o>>>16&255,r[i++]=o>>>24&255,r[i++]=s>>>0&255,r[i++]=s>>>8&255,r[i++]=s>>>16&255,r[i++]=s>>>24&255,r[i++]=l>>>0&255,r[i++]=l>>>8&255,r[i++]=l>>>16&255,r[i++]=l>>>24&255,r[i++]=u>>>0&255,r[i++]=u>>>8&255,r[i++]=u>>>16&255,r[i++]=u>>>24&255,r[i++]=c>>>0&255,r[i++]=c>>>8&255,r[i++]=c>>>16&255,r[i++]=c>>>24&255,r[i++]=h>>>0&255,r[i++]=h>>>8&255,r[i++]=h>>>16&255,r[i++]=h>>>24&255,r[i++]=p>>>0&255,r[i++]=p>>>8&255,r[i++]=p>>>16&255,r[i]=p>>>24&255}function $b(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0,p=e[t+7]>>>0,f=e[t+8]>>>0;r[i++]=a>>>0&511,r[i++]=a>>>9&511,r[i++]=a>>>18&511,r[i++]=511&(a>>>27|(15&o)<<5),r[i++]=o>>>4&511,r[i++]=o>>>13&511,r[i++]=o>>>22&511,r[i++]=511&(o>>>31|(255&s)<<1),r[i++]=s>>>8&511,r[i++]=s>>>17&511,r[i++]=511&(s>>>26|(7&l)<<6),r[i++]=l>>>3&511,r[i++]=l>>>12&511,r[i++]=l>>>21&511,r[i++]=511&(l>>>30|(127&u)<<2),r[i++]=u>>>7&511,r[i++]=u>>>16&511,r[i++]=511&(u>>>25|(3&c)<<7),r[i++]=c>>>2&511,r[i++]=c>>>11&511,r[i++]=c>>>20&511,r[i++]=511&(c>>>29|(63&h)<<3),r[i++]=h>>>6&511,r[i++]=h>>>15&511,r[i++]=511&(h>>>24|(1&p)<<8),r[i++]=p>>>1&511,r[i++]=p>>>10&511,r[i++]=p>>>19&511,r[i++]=511&(p>>>28|(31&f)<<4),r[i++]=f>>>5&511,r[i++]=f>>>14&511,r[i]=f>>>23&511}function jb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0,p=e[t+7]>>>0,f=e[t+8]>>>0,d=e[t+9]>>>0;r[i++]=a>>>0&1023,r[i++]=a>>>10&1023,r[i++]=a>>>20&1023,r[i++]=1023&(a>>>30|(255&o)<<2),r[i++]=o>>>8&1023,r[i++]=o>>>18&1023,r[i++]=1023&(o>>>28|(63&s)<<4),r[i++]=s>>>6&1023,r[i++]=s>>>16&1023,r[i++]=1023&(s>>>26|(15&l)<<6),r[i++]=l>>>4&1023,r[i++]=l>>>14&1023,r[i++]=1023&(l>>>24|(3&u)<<8),r[i++]=u>>>2&1023,r[i++]=u>>>12&1023,r[i++]=u>>>22&1023,r[i++]=c>>>0&1023,r[i++]=c>>>10&1023,r[i++]=c>>>20&1023,r[i++]=1023&(c>>>30|(255&h)<<2),r[i++]=h>>>8&1023,r[i++]=h>>>18&1023,r[i++]=1023&(h>>>28|(63&p)<<4),r[i++]=p>>>6&1023,r[i++]=p>>>16&1023,r[i++]=1023&(p>>>26|(15&f)<<6),r[i++]=f>>>4&1023,r[i++]=f>>>14&1023,r[i++]=1023&(f>>>24|(3&d)<<8),r[i++]=d>>>2&1023,r[i++]=d>>>12&1023,r[i]=d>>>22&1023}function Rb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0,p=e[t+7]>>>0,f=e[t+8]>>>0,d=e[t+9]>>>0,y=e[t+10]>>>0;r[i++]=a>>>0&2047,r[i++]=a>>>11&2047,r[i++]=2047&(a>>>22|(1&o)<<10),r[i++]=o>>>1&2047,r[i++]=o>>>12&2047,r[i++]=2047&(o>>>23|(3&s)<<9),r[i++]=s>>>2&2047,r[i++]=s>>>13&2047,r[i++]=2047&(s>>>24|(7&l)<<8),r[i++]=l>>>3&2047,r[i++]=l>>>14&2047,r[i++]=2047&(l>>>25|(15&u)<<7),r[i++]=u>>>4&2047,r[i++]=u>>>15&2047,r[i++]=2047&(u>>>26|(31&c)<<6),r[i++]=c>>>5&2047,r[i++]=c>>>16&2047,r[i++]=2047&(c>>>27|(63&h)<<5),r[i++]=h>>>6&2047,r[i++]=h>>>17&2047,r[i++]=2047&(h>>>28|(127&p)<<4),r[i++]=p>>>7&2047,r[i++]=p>>>18&2047,r[i++]=2047&(p>>>29|(255&f)<<3),r[i++]=f>>>8&2047,r[i++]=f>>>19&2047,r[i++]=2047&(f>>>30|(511&d)<<2),r[i++]=d>>>9&2047,r[i++]=d>>>20&2047,r[i++]=2047&(d>>>31|(1023&y)<<1),r[i++]=y>>>10&2047,r[i]=y>>>21&2047}function Nb(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0,p=e[t+7]>>>0,f=e[t+8]>>>0,d=e[t+9]>>>0,y=e[t+10]>>>0,m=e[t+11]>>>0;r[i++]=a>>>0&4095,r[i++]=a>>>12&4095,r[i++]=4095&(a>>>24|(15&o)<<8),r[i++]=o>>>4&4095,r[i++]=o>>>16&4095,r[i++]=4095&(o>>>28|(255&s)<<4),r[i++]=s>>>8&4095,r[i++]=s>>>20&4095,r[i++]=l>>>0&4095,r[i++]=l>>>12&4095,r[i++]=4095&(l>>>24|(15&u)<<8),r[i++]=u>>>4&4095,r[i++]=u>>>16&4095,r[i++]=4095&(u>>>28|(255&c)<<4),r[i++]=c>>>8&4095,r[i++]=c>>>20&4095,r[i++]=h>>>0&4095,r[i++]=h>>>12&4095,r[i++]=4095&(h>>>24|(15&p)<<8),r[i++]=p>>>4&4095,r[i++]=p>>>16&4095,r[i++]=4095&(p>>>28|(255&f)<<4),r[i++]=f>>>8&4095,r[i++]=f>>>20&4095,r[i++]=d>>>0&4095,r[i++]=d>>>12&4095,r[i++]=4095&(d>>>24|(15&y)<<8),r[i++]=y>>>4&4095,r[i++]=y>>>16&4095,r[i++]=4095&(y>>>28|(255&m)<<4),r[i++]=m>>>8&4095,r[i]=m>>>20&4095}function Ub(e,t,r,n){let i=n,a=e[t]>>>0,o=e[t+1]>>>0,s=e[t+2]>>>0,l=e[t+3]>>>0,u=e[t+4]>>>0,c=e[t+5]>>>0,h=e[t+6]>>>0,p=e[t+7]>>>0,f=e[t+8]>>>0,d=e[t+9]>>>0,y=e[t+10]>>>0,m=e[t+11]>>>0,g=e[t+12]>>>0,x=e[t+13]>>>0,b=e[t+14]>>>0,v=e[t+15]>>>0;r[i++]=a>>>0&65535,r[i++]=a>>>16&65535,r[i++]=o>>>0&65535,r[i++]=o>>>16&65535,r[i++]=s>>>0&65535,r[i++]=s>>>16&65535,r[i++]=l>>>0&65535,r[i++]=l>>>16&65535,r[i++]=u>>>0&65535,r[i++]=u>>>16&65535,r[i++]=c>>>0&65535,r[i++]=c>>>16&65535,r[i++]=h>>>0&65535,r[i++]=h>>>16&65535,r[i++]=p>>>0&65535,r[i++]=p>>>16&65535,r[i++]=f>>>0&65535,r[i++]=f>>>16&65535,r[i++]=d>>>0&65535,r[i++]=d>>>16&65535,r[i++]=y>>>0&65535,r[i++]=y>>>16&65535,r[i++]=m>>>0&65535,r[i++]=m>>>16&65535,r[i++]=g>>>0&65535,r[i++]=g>>>16&65535,r[i++]=x>>>0&65535,r[i++]=x>>>16&65535,r[i++]=b>>>0&65535,r[i++]=b>>>16&65535,r[i++]=v>>>0&65535,r[i]=v>>>16&65535}function qb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0;r[i++]=t>>>0&1,r[i++]=t>>>1&1,r[i++]=t>>>2&1,r[i++]=t>>>3&1,r[i++]=t>>>4&1,r[i++]=t>>>5&1,r[i++]=t>>>6&1,r[i++]=t>>>7&1,r[i++]=t>>>8&1,r[i++]=t>>>9&1,r[i++]=t>>>10&1,r[i++]=t>>>11&1,r[i++]=t>>>12&1,r[i++]=t>>>13&1,r[i++]=t>>>14&1,r[i++]=t>>>15&1,r[i++]=t>>>16&1,r[i++]=t>>>17&1,r[i++]=t>>>18&1,r[i++]=t>>>19&1,r[i++]=t>>>20&1,r[i++]=t>>>21&1,r[i++]=t>>>22&1,r[i++]=t>>>23&1,r[i++]=t>>>24&1,r[i++]=t>>>25&1,r[i++]=t>>>26&1,r[i++]=t>>>27&1,r[i++]=t>>>28&1,r[i++]=t>>>29&1,r[i++]=t>>>30&1,r[i++]=t>>>31&1}}function Gb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0;r[i++]=t>>>0&3,r[i++]=t>>>2&3,r[i++]=t>>>4&3,r[i++]=t>>>6&3,r[i++]=t>>>8&3,r[i++]=t>>>10&3,r[i++]=t>>>12&3,r[i++]=t>>>14&3,r[i++]=t>>>16&3,r[i++]=t>>>18&3,r[i++]=t>>>20&3,r[i++]=t>>>22&3,r[i++]=t>>>24&3,r[i++]=t>>>26&3,r[i++]=t>>>28&3,r[i++]=t>>>30&3,r[i++]=n>>>0&3,r[i++]=n>>>2&3,r[i++]=n>>>4&3,r[i++]=n>>>6&3,r[i++]=n>>>8&3,r[i++]=n>>>10&3,r[i++]=n>>>12&3,r[i++]=n>>>14&3,r[i++]=n>>>16&3,r[i++]=n>>>18&3,r[i++]=n>>>20&3,r[i++]=n>>>22&3,r[i++]=n>>>24&3,r[i++]=n>>>26&3,r[i++]=n>>>28&3,r[i++]=n>>>30&3}}function Yb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,o=e[a++]>>>0;r[i++]=t>>>0&7,r[i++]=t>>>3&7,r[i++]=t>>>6&7,r[i++]=t>>>9&7,r[i++]=t>>>12&7,r[i++]=t>>>15&7,r[i++]=t>>>18&7,r[i++]=t>>>21&7,r[i++]=t>>>24&7,r[i++]=t>>>27&7,r[i++]=7&(t>>>30|(1&n)<<2),r[i++]=n>>>1&7,r[i++]=n>>>4&7,r[i++]=n>>>7&7,r[i++]=n>>>10&7,r[i++]=n>>>13&7,r[i++]=n>>>16&7,r[i++]=n>>>19&7,r[i++]=n>>>22&7,r[i++]=n>>>25&7,r[i++]=n>>>28&7,r[i++]=7&(n>>>31|(3&o)<<1),r[i++]=o>>>2&7,r[i++]=o>>>5&7,r[i++]=o>>>8&7,r[i++]=o>>>11&7,r[i++]=o>>>14&7,r[i++]=o>>>17&7,r[i++]=o>>>20&7,r[i++]=o>>>23&7,r[i++]=o>>>26&7,r[i++]=o>>>29&7}}function Xb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0;r[i++]=t>>>0&15,r[i++]=t>>>4&15,r[i++]=t>>>8&15,r[i++]=t>>>12&15,r[i++]=t>>>16&15,r[i++]=t>>>20&15,r[i++]=t>>>24&15,r[i++]=t>>>28&15,r[i++]=n>>>0&15,r[i++]=n>>>4&15,r[i++]=n>>>8&15,r[i++]=n>>>12&15,r[i++]=n>>>16&15,r[i++]=n>>>20&15,r[i++]=n>>>24&15,r[i++]=n>>>28&15,r[i++]=o>>>0&15,r[i++]=o>>>4&15,r[i++]=o>>>8&15,r[i++]=o>>>12&15,r[i++]=o>>>16&15,r[i++]=o>>>20&15,r[i++]=o>>>24&15,r[i++]=o>>>28&15,r[i++]=s>>>0&15,r[i++]=s>>>4&15,r[i++]=s>>>8&15,r[i++]=s>>>12&15,r[i++]=s>>>16&15,r[i++]=s>>>20&15,r[i++]=s>>>24&15,r[i++]=s>>>28&15}}function Zb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0;r[i++]=t>>>0&31,r[i++]=t>>>5&31,r[i++]=t>>>10&31,r[i++]=t>>>15&31,r[i++]=t>>>20&31,r[i++]=t>>>25&31,r[i++]=31&(t>>>30|(7&n)<<2),r[i++]=n>>>3&31,r[i++]=n>>>8&31,r[i++]=n>>>13&31,r[i++]=n>>>18&31,r[i++]=n>>>23&31,r[i++]=31&(n>>>28|(1&o)<<4),r[i++]=o>>>1&31,r[i++]=o>>>6&31,r[i++]=o>>>11&31,r[i++]=o>>>16&31,r[i++]=o>>>21&31,r[i++]=o>>>
117826&31,r[i++]=31&(o>>>31|(15&s)<<1),r[i++]=s>>>4&31,r[i++]=s>>>9&31,r[i++]=s>>>14&31,r[i++]=s>>>19&31,r[i++]=s>>>24&31,r[i++]=31&(s>>>29|(3&l)<<3),r[i++]=l>>>2&31,r[i++]=l>>>7&31,r[i++]=l>>>12&31,r[i++]=l>>>17&31,r[i++]=l>>>22&31,r[i++]=l>>>27&31}}function Wb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0;r[i++]=t>>>0&63,r[i++]=t>>>6&63,r[i++]=t>>>12&63,r[i++]=t>>>18&63,r[i++]=t>>>24&63,r[i++]=63&(t>>>30|(15&n)<<2),r[i++]=n>>>4&63,r[i++]=n>>>10&63,r[i++]=n>>>16&63,r[i++]=n>>>22&63,r[i++]=63&(n>>>28|(3&o)<<4),r[i++]=o>>>2&63,r[i++]=o>>>8&63,r[i++]=o>>>14&63,r[i++]=o>>>20&63,r[i++]=o>>>26&63,r[i++]=s>>>0&63,r[i++]=s>>>6&63,r[i++]=s>>>12&63,r[i++]=s>>>18&63,r[i++]=s>>>24&63,r[i++]=63&(s>>>30|(15&l)<<2),r[i++]=l>>>4&63,r[i++]=l>>>10&63,r[i++]=l>>>16&63,r[i++]=l>>>22&63,r[i++]=63&(l>>>28|(3&u)<<4),r[i++]=u>>>2&63,r[i++]=u>>>8&63,r[i++]=u>>>14&63,r[i++]=u>>>20&63,r[i++]=u>>>26&63}}function Hb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0;r[i++]=t>>>0&127,r[i++]=t>>>7&127,r[i++]=t>>>14&127,r[i++]=t>>>21&127,r[i++]=127&(t>>>28|(7&n)<<4),r[i++]=n>>>3&127,r[i++]=n>>>10&127,r[i++]=n>>>17&127,r[i++]=n>>>24&127,r[i++]=127&(n>>>31|(63&o)<<1),r[i++]=o>>>6&127,r[i++]=o>>>13&127,r[i++]=o>>>20&127,r[i++]=127&(o>>>27|(3&s)<<5),r[i++]=s>>>2&127,r[i++]=s>>>9&127,r[i++]=s>>>16&127,r[i++]=s>>>23&127,r[i++]=127&(s>>>30|(31&l)<<2),r[i++]=l>>>5&127,r[i++]=l>>>12&127,r[i++]=l>>>19&127,r[i++]=127&(l>>>26|(1&u)<<6),r[i++]=u>>>1&127,r[i++]=u>>>8&127,r[i++]=u>>>15&127,r[i++]=u>>>22&127,r[i++]=127&(u>>>29|(15&c)<<3),r[i++]=c>>>4&127,r[i++]=c>>>11&127,r[i++]=c>>>18&127,r[i++]=c>>>25&127}}function Kb(e,t,r,n){let i=n,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,n=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,u=e[a++]>>>0,c=e[a++]>>>0,h=e[a++]>>>0;r[i++]=t>>>0&255,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=n>>>0&255,r[i++]=n>>>8&255,r[i++]=n>>>16&255,r[i++]=n>>>24&255,r[i++]=o>>>0&255,r[i++]=o>>>8&255,r[i++]=o>>>16&255,r[i++]=o>>>24&255,r[i++]=s>>>0&255,r[i++]=s>>>8&255,r[i++]=s>>>16&255,r[i++]=s>>>24&255,r[i++]=l>>>0&255,r[i++]=l>>>8&255,r[i++]=l>>>16&255,r[i++]=l>>>24&255,r[i++]=u>>>0&255,r[i++]=u>>>8&255,r[i++]=u>>>16&255,r[i++]=u>>>24&255,r[i++]=c>>>0&255,r[i++]=c>>>8&255,r[i++]=c>>>16&255,r[i++]=c>>>24&255,r[i++]=h>>>0&255,r[i++]=h>>>8&255,r[i++]=h>>>16&255,r[i++]=h>>>24&255}}function Jb(e,t,r,n){let i=n,a=t;for(let t=0;t<128;t++){let t=e[a++]>>>0;r[i++]=65535&t,r[i++]=t>>>16&65535}}function Qb(e,t,r,n,i){let a=Pb[i]>>>0,o=t,s=0,l=e[o]>>>0,u=n;for(let t=0;t<8;t++){for(let t=0;t<32;t++)if(s+i<=32){let n=l>>>s&a;r[u+t]=0|n,s+=i,32===s&&(s=0,o++,31!==t&&(l=e[o]>>>0))}else{let n=32-s,c=l>>>s;o++,l=e[o]>>>0;let h=i-n,p=(c|(l&-1>>>32-h>>>0)<<n)&a;r[u+t]=0|p,s=h}u+=32,s=0,t<7&&(l=e[o]>>>0)}}const ev=(function(e){if(!Number.isFinite(e)||e<=0)return 65536;let t=kb(Math.floor(e),256);return 0===t?256:t})(65536),tv=3*ev/256+ev|0;function rv(){let e=new Uint8Array(tv);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function nv(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);let t=Math.max(16,0|e);return{encodedWords:new Uint32Array(t),decoderWorkspace:rv()}}function iv(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,2*t));return e.encodedWords=r,r}function av(e,t,r,n){n.byteContainer.length<r&&(n.byteContainer=new Uint8Array(2*r),n.byteContainerI32=void 0);let i=n.byteContainer,a=r>>>2;if(3&i.byteOffset)for(let r=0;r<a;r=r+1|0){let n=0|e[t+r|0],a=r<<2;i[a]=255&n,i[a+1|0]=n>>>8&255,i[a+2|0]=n>>>16&255,i[a+3|0]=n>>>24&255}else{let r=n.byteContainerI32;(!r||r.buffer!==i.buffer||r.byteOffset!==i.byteOffset||r.length<a)&&(r=n.byteContainerI32=new Int32Array(i.buffer,i.byteOffset,i.byteLength>>>2)),r.set(e.subarray(t,t+a))}let o=3&r;if(o>0){let r=0|e[t+a|0],n=a<<2;for(let e=0;e<o;e=e+1|0)i[n+e|0]=r>>>(e<<3)&255}return i}function ov(e,t,r){let n=0|e[t++],i=r.dataToBePacked;for(let a=2;a<=32;a=a+1|0){if(!(n>>>a-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${a}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let o=e[t++]>>>0,s=Tb(o),l=o*a+31>>>5;if(t+l>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${a}, size=${o}, streamWordIndex=${t}, needWords=${l}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=i[a];(!u||u.length<s)&&(u=i[a]=new Uint32Array(s));let c=0;for(;c<o;c=c+32|0)mv(e,t,u,c,a),t=t+a|0;t=t-((c-o|0)*a>>>5)|0,r.exceptionSizes[a]=o}return t}function sv(e,t,r,n,i){switch(i){case 1:qb(e,t,r,n);break;case 2:Gb(e,t,r,n);break;case 3:Yb(e,t,r,n);break;case 4:Xb(e,t,r,n);break;case 5:Zb(e,t,r,n);break;case 6:Wb(e,t,r,n);break;case 7:Hb(e,t,r,n);break;case 8:Kb(e,t,r,n);break;case 16:Jb(e,t,r,n);break;default:Qb(e,t,r,n,i)}return t+(i<<3)|0}function lv(e,t,r,n){if(r+2>t)throw Error(`FastPFOR decode: byteContainer underflow at block=${n} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let i=e[r++],a=e[r++];if(i>32)throw Error(`FastPFOR decode: invalid bitWidth=${i} at block=${n} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:i,exceptionCount:a,bytePosIn:r}}function uv(e,t,r,n,i,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let o=e[r++];if(o<n||o>32)throw Error(`FastPFOR decode: invalid maxBits=${o} at block=${a} (bitWidth=${n}, expected ${n}..32)`);let s=o-n|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${a} (bitWidth=${n}, maxBits=${o})`);if(r+i>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${i}, have=${t-r})`);return{maxBits:o,exceptionBitWidth:s,bytePosIn:r}}function cv(e,t,r,n,i,a,o,s,l){let{maxBits:u,exceptionBitWidth:c,bytePosIn:h}=uv(i,a,o,r,n,l);if(o=h,1===c){let a=1<<r;for(let r=0;r<n;r=r+1|0){e[i[o++]+t|0]|=a}return o}let p=s.dataToBePacked[c];if(!p)throw Error(`FastPFOR decode: missing exception stream for exceptionBitWidth=${c} (bitWidth=${r}, maxBits=${u}) at block ${l}`);let f=s.dataPointers,d=0|f[c],y=0|s.exceptionSizes[c];if(d+n>y)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${c} (ptr=${d}, need ${n}, size=${y}) at block ${l}`);for(let a=0;a<n;a=a+1|0){let n=i[o++],a=0|p[d++];e[n+t|0]|=a<<r}return f[c]=d,o}function hv(e,t,r,n,i,a,o,s,l,u){let c=0|r,h=0;for(let t=0;t<o;t=t+1|0){let r=lv(s,l,h,t);h=r.bytePosIn;let n=r.bitWidth,o=r.exceptionCount,p=a+256*t|0;switch(n){case 0:i.fill(0,p,p+256);break;case 32:for(let t=0;t<256;t=t+1|0)i[p+t|0]=0|e[c+t|0];c=c+256|0;break;default:c=sv(e,c,i,p,n)}o>0&&(h=cv(i,p,n,o,s,l,h,u,t))}if(c!==n)throw Error(`FastPFOR decode: packed region mismatch (pageStart=${t}, packedStart=${r}, consumedPackedEnd=${c}, expectedPackedEnd=${n}, packedWords=${n-r}, encoded.length=${e.length})`)}function pv(e,t,r,n,i,a){let o=0|r,s=0|e[o];if(s<=0||o+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${o} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=o+1|0,u=o+s|0,c=e[u]>>>0,h=c+3>>>2,p=u+1,f=p+h;if(f>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${h}, pageStart=${o}, packedEnd=${u}
1178, byteContainerStart=${p}) causes bitmapPos=${f} out of bounds (encoded.length=${e.length})`);let d=av(e,p,c,a),y=c,m=ov(e,f,a);return a.dataPointers.fill(0),hv(e,o,l,u,t,0|n,i/256|0,d,y,a),m}function fv(e,t,r,n,i,a){let o=n+kb(i,256),s=n,l=r;for(;s!==o;){let r=Math.min(ev,o-s);l=pv(e,t,l,s,r,a),s=s+r|0}return l}function dv(e,t,r,n,i,a){if(0===a)return t;let o=0,s=t,l=t+r,u=i,c=i,h=i+a,p=0,f=0;for(;s<l&&c<h;){let t=e[s]>>>o&255;if(o+=8,s+=o>>>5,o&=31,p|=(127&t)<<f,128&t)n[c++]=0|p,p=0,f=0;else if(f+=7,f>28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${f}, partial=${p}, decoded=${c-u}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==h)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-u}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`);return s}function yv(e,t,r){let n=0,i=0,a=new Uint32Array(t),o=r??rv();if(e.length>0){let t=0|e[n];if(n=n+1|0,255&t)throw Error(`FastPFOR decode: invalid alignedLength=${t} (expected multiple of 256)`);if(i+t>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${i}, alignedLength=${t}, out.length=${a.length})`);n=fv(e,a,n,i,t,o),i=i+t|0}return dv(e,n,e.length-n|0,a,i,t-i|0),a}function mv(e,t,r,n,i){switch(i){case 2:return void Ib(e,t,r,n);case 3:return void Cb(e,t,r,n);case 4:return void Ob(e,t,r,n);case 5:return void Bb(e,t,r,n);case 6:return void zb(e,t,r,n);case 7:return void Vb(e,t,r,n);case 8:return void Lb(e,t,r,n);case 9:return void $b(e,t,r,n);case 10:return void jb(e,t,r,n);case 11:return void Rb(e,t,r,n);case 12:return void Nb(e,t,r,n);case 16:return void Ub(e,t,r,n);case 32:for(let i=0;i<32;i=i+1|0)r[n+i|0]=0|e[t+i|0];return}let a=Pb[i]>>>0,o=t,s=0,l=e[o]>>>0;for(let t=0;t<32;t++)if(s+i<=32){let u=l>>>s&a;r[n+t]=0|u,s+=i,32===s&&(s=0,o++,31!==t&&(l=e[o]>>>0))}else{let u=32-s,c=l>>>s;o++,l=e[o]>>>0;let h=(c|(l&Pb[i-u]>>>0)<<u)&a;r[n+t]=0|h,s=i-u}}function gv(e,t,r,n){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let i=Math.floor(r/4),a=r%4!=0,o=a?i+1:i;if(n.length<o)throw RangeError(`decodeBigEndianInt32sInto: out.length=${n.length} < ${o}`);if(i>0){let r=e.byteOffset+t;if(3&r)for(let r=0;r<i;r++){let i=t+4*r;n[r]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]}else{let t=new Uint32Array(e.buffer,r,i);for(let e=0;e<i;e++)n[e]=0|Mb(t[e])}}if(a){let a=t+4*i,o=r-4*i,s=0;for(let t=0;t<o;t++)s|=e[a+t]<<24-8*t;n[i]=0|s}return o}function xv(e,t,r){let n=new Uint32Array(r),i=0,a=t.get();for(let t=0;t<n.length;t++){let t=e[a++],r=127&t;t<128?n[i++]=r:(t=e[a++],r|=(127&t)<<7,t<128?n[i++]=r:(t=e[a++],r|=(127&t)<<14,t<128?n[i++]=r:(t=e[a++],r|=(127&t)<<21,t<128||(t=e[a++],r|=(15&t)<<28),n[i++]=r)))}return t.set(a),n}function bv(e,t,r){let n=new BigUint64Array(r);for(let r=0;r<n.length;r++)n[r]=vv(e,t);return n}function vv(e,t){let r=0n,n=0,i=t.get();for(;i<e.length;){let t=e[i++];if(r|=BigInt(127&t)<<BigInt(n),!(128&t))break;if(n+=7,n>=64)throw Error("Varint too long")}return t.set(i),r}function wv(e,t,r){let n=new Float64Array(r);for(let i=0;i<r;i++)n[i]=_v(e,t);return n}function _v(e,t){let r,n;return n=e[t.get()],t.increment(),r=127&n,n<128||(n=e[t.get()],t.increment(),r|=(127&n)<<7,n<128)||(n=e[t.get()],t.increment(),r|=(127&n)<<14,n<128)||(n=e[t.get()],t.increment(),r|=(127&n)<<21,n<128)?r:(n=e[t.get()],r|=(15&n)<<28,Av(r,e,t))}function Av(e,t,r){let n,i;if(i=t[r.get()],r.increment(),n=(112&i)>>4,i<128||(i=t[r.get()],r.increment(),n|=(127&i)<<3,i<128)||(i=t[r.get()],r.increment(),n|=(127&i)<<10,i<128)||(i=t[r.get()],r.increment(),n|=(127&i)<<17,i<128)||(i=t[r.get()],r.increment(),n|=(127&i)<<24,i<128)||(i=t[r.get()],r.increment(),n|=(1&i)<<31,i<128))return 4294967296*n+(e>>>0);throw Error("Expected varint not more than 10 bytes")}function Dv(e,t,r,n){return Sv(e,t,r,n,nv(r>>>2))}function Sv(e,t,r,n,i){let a=n.get();if(3&r)throw Error(`FastPFOR: invalid encodedByteLength=${r} at offset=${a} (encodedBytes.length=${e.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);let o=r>>>2,s=iv(i,o);gv(e,a,r,s);let l=yv(s.subarray(0,o),t,i.decoderWorkspace);return n.add(r),l}function Ev(e){return e>>>1^-(1&e)}function Fv(e){return e>>1n^-(1n&e)}function Pv(e){return e%2==1?(e+1)/-2:e/2}function kv(e){let t=new Int32Array(e.length);for(let r=0;r<e.length;r++)t[r]=Ev(e[r]);return t}function Tv(e){let t=new BigInt64Array(e.length);for(let r=0;r<e.length;r++)t[r]=Fv(e[r]);return t}function Mv(e){for(let t=0;t<e.length;t++)e[t]=Pv(e[t])}function Iv(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=e[n]}let n=new Uint32Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],o=e[r+t];n.fill(o,i,i+a),i+=a}return n}function Cv(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=Number(e[n])}let n=new BigUint64Array(r),i=0;for(let r=0;r<t;r++){let a=Number(e[r]),o=e[r+t];n.fill(o,i,i+a),i+=a}return n}function Ov(e,t,r){let n=new Float64Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],o=e[r+t];n.fill(o,i,i+a),i+=a}return n}function Bv(e){let t=new Int32Array(e.length);t[0]=Ev(e[0]);let r=e.length/4*4,n=1;if(r>=4)for(;n<r-4;n+=4){let r=e[n],i=e[n+1],a=e[n+2],o=e[n+3];t[n]=Ev(r)+t[n-1],t[n+1]=Ev(i)+t[n],t[n+2]=Ev(a)+t[n+1],t[n+3]=Ev(o)+t[n+2]}for(;n!==e.length;++n)t[n]=Ev(e[n])+t[n-1];return t}function zv(e){let t=new BigInt64Array(e.length);t[0]=Fv(e[0]);let r=e.length/4*4,n=1;if(r>=4)for(;n<r-4;n+=4){let r=e[n],i=e[n+1],a=e[n+2],o=e[n+3];t[n]=Fv(r)+t[n-1],t[n+1]=Fv(i)+t[n],t[n+2]=Fv(a)+t[n+1],t[n+3]=Fv(o)+t[n+2]}for(;n!==t.length;++n)t[n]=Fv(e[n])+t[n-1];return t}function Vv(e){e[0]=Pv(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;r<t-4;r+=4){let t=e[r],n=e[r+1],i=e[r+2],a=e[r+3];e[r]=Pv(t)+e[r-1],e[r+1]=Pv(n)+e[r],e[r+2]=Pv(i)+e[r+1],e[r+3]=Pv(a)+e[r+2]}for(;r!==e.length;++r)e[r]=Pv(e[r])+e[r-1]}function Lv(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=e[n]}let n=new Int32Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],o=e[r+t];o=Ev(o),n.fill(o,i,i+a),i+=a}return n}function $v(e,t,r){if(void 0===r){r=0;for(let n=0;n<t;n++)r+=Number(e[n])}let n=new BigInt64Array(r),i=0;for(let r=0;r<t;r++){let a=Number(e[r]),o=e[r+t];o=Fv(o),n.fill(o,i,i+a),i+=a}return n}function jv(e,t,r){let n=new Float64Array(r),i=0;for(let r=0;r<t;r++){let a=e[r],o=e[r+t];o=Pv(o),n.fill(o,i,i+a),i+=a}return n}function Rv(e){let t=e.length/4*4,r=1;if(t>=4)for(let n=e[0];r<t-4;r+=4)n=e[r]+=n,n=e[r+1]+=n,n=e[r+2]+=n,n=e[r+3]+=n;for(;r!==e.length;)e[r]+=e[r-1],++r}function Nv(e){let t=0;for(let r=0;r<e.length;r++)e[r]+=t,t=e[r]}function Uv(e){if(e.length<2)return new Int32Array(e);let t=new Int32Array(e.length);t[0]=Ev(e[0]),t[1]=Ev(e[1]);let r=e.length/4*4,n=2;if(r>=4)for(;n<r-4;n+=4){let r=e[n],i=e[n+1],a=e[n+2],o=e[n+3];t[n]=Ev(r)+t[n-2],t[n+1]=Ev(i)+t[n-1],t[n+2]=Ev(a)+t[n],t[n+3]=Ev(o)+t[n+1]}for(;n!==e.length;n+=2)t[n]=Ev(e[n])+t[n-2],t[n+1]=Ev(e[n+1])+t[n-1];return t}function qv(e,t,r,n){if(e.length<2)return new Int32Array(e);let i=new Int32Array(e.length),a=Ev(e[0]),o=Ev(e[1]);i[0]=Gv(Math.round(a*t),r,n),i[1]=Gv(Math.round(o*t),r,n);let s=e.length/16,l=2;if(s>=4)for(;l<s-4;l+=4){let s=e[l],u=e[l+1],c=Ev(s)+a,h=Ev(u)+o;i[l]=Gv(Math.round(c*t),r,n),i[l+1]=Gv(Math.round(h*t),r,n);let p=e[l+2],f=e[l+3];a=Ev(p)+c,o=Ev(f)+h,i[l+2]=Gv(Math.round(a*t),r,n),i[l+3]=Gv(Math.round(o*t),r,n)}for(;l!==e.length;l+=2)a+=Ev(e[l]),o+=Ev(e[l+1]),i[l]=Gv(Math.round(a*t),r,n),i[l+1]=Gv(Math.round(o*t),r,n);return i}function Gv(e,t,r){return Math.min(r,Math.max(t,e))}function Yv(e){let t=new Int32Array(e.length+1);t[0]=0,t[1]=Ev(e[0]);let r=t[1];for(let n=2;n!==t.length;++n){r+=Ev(e[n-1]),t[n]=t[n-1]+r}return new Uint32Array(t)}function Xv(e,t,r){let n=new Int32Array(r+1);n[0]=0;let i=1,a=n[0];for(let r=0;r<t;r++){let o=e[r],s=e[r+t];s=Ev(s);for(let e=i;e<i+o;e++)n[e]=s+a,a=n[e];i+=o}return n}function Zv(e,t,r){let n=new Uint32Array(r+1);n[0]=0;let i=1,a=n[0];for(let r=0;r<t;r++){let o=e[r],s=e[r+t];for(let e=i;e<i+o;e++)n[e]=s+a,a=n[e];i+=o}return n}function Wv(e,t,r){let n=new Int32Array(r),i=0,a=0;for(let r=0;r<t;r++){let o=e[r],s=Ev(e[r+t]);for(let e=0;e<o;e++)a+=s,n[i++]=a}return n}function Hv(e,t,r){let n=new BigInt64Array(r),i=0,a=0n;for(let r=0;r<t;r++){let o=Number(e[r]),s=Fv(e[r+t]);for(let e=0;e<o;e++)a+=s,n[i++]=a}return n}function Kv(e){let t=new Uint32Array(e.length);t[0]=Ev(e[0])>>>0;for(let r=1;r<e.length;r++)t[r]=t[r-1]+Ev(e[r])>>>0;return t}function Jv(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,Fv(e[0]));for(let r=1;r<e.length;r++)t[r]=BigInt.asUintN(64,t[r-1]+Fv(e[r]));return t}function Qv(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=Ev(e[0])>>>0,t[1]=Ev(e[1])>>>0;for(let r=2;r<e.length;r+=2)t[r]=t[r-2]+Ev(e[r])>>>0,t[r+1]=t[r-1]+Ev(e[r+1])>>>0;return t}function ew(e,t,r,n){let i=qv(e,t,r,n);return new Uint32Array(i)}function tw(e){return e[1]}function rw(e){return Ev(e[1])}function nw(e){if(2===e.length){let t=Ev(e[1]);return[t,t]}return[Ev(e[2]),Ev(e[3])]}function iw(e){return e[1]}function aw(e){return Fv(e[1])}function ow(e){if(2===e.length){let t=Fv(e[1]);return[t,t]}return[Fv(e[2]),Fv(e[3])]}var sw,lw,uw,cw;!(function(e){e.PRESENT="PRESENT",e.DATA="DATA",e.OFFSET="OFFSET",e.LENGTH="LENGTH"})(sw||={}),(function(e){e.NONE="NONE",e.SINGLE="SINGLE",e.SHARED="SHARED",e.VERTEX="VERTEX",e.MORTON="MORTON",e.FSST="FSST"})(lw||={}),(function(e){e.VERTEX="VERTEX",e.INDEX="INDEX",e.STRING="STRING",e.KEY="KEY"})(uw||={}),(function(e){e.VAR_BINARY="VAR_BINARY",e.GEOMETRIES="GEOMETRIES",e.PARTS="PARTS",e.RINGS="RINGS",e.TRIANGLES="TRIANGLES",e.SYMBOL="SYMBOL",e.DICTIONARY="DICTIONARY"})(cw||={});const hw=[sw.PRESENT,sw.DATA,sw.OFFSET,sw.LENGTH],pw=[Db.NONE,Db.DELTA,Db.COMPONENTWISE_DELTA,Db.RLE,Db.MORTON],fw=[Sb.NONE,Sb.FAST_PFOR,Sb.VARINT],dw=[lw.NONE,lw.SINGLE,lw.SHARED,lw.VERTEX,lw.MORTON,lw.FSST],yw=[uw.VERTEX,uw.INDEX,uw.STRING,uw.KEY],mw=[cw.VAR_BINARY,cw.GEOMETRIES,cw.PARTS,cw.RINGS,cw.TRIANGLES,cw.SYMBOL,cw.DICTIONARY];function gw(e,t){let r=vw(e,t);return r.logicalLevelTechnique1===Db.MORTON?xw(r,e,t):Db.RLE!==r.logicalLevelTechnique1&&Db.RLE!==r.logicalLevelTechnique2||Sb.NONE===r.physicalLevelTechnique?r:bw(r,e,t)}function xw(e,t,r){let n=xv(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:e.decompressedCount,numBits:n[0],coordinateShift:n[1]}}function bw(e,t,r){let n=xv(t,r,2);return{physicalStreamType:e.physicalStreamType,logicalStreamType:e.logicalStreamType,logicalLevelTechnique1:e.logicalLevelTechnique1,logicalLevelTechnique2:e.logicalLevelTechnique2,physicalLevelTechnique:e.physicalLevelTechnique,numValues:e.numValues,byteLength:e.byteLength,decompressedCount:n[1],runs:n[0],numRleValues:n[1]}}function vw(e,t){let r=e[t.get()],n=hw[r>>4],i={};switch(n){case sw.DATA:i={dictionaryType:dw[15&r]};break;case sw.OFFSET:i={offsetType:yw[15&r]};break;case sw.LENGTH:i={lengthType:mw[15&r]}}t.increment();let a=e[t.get()],o=pw[a>>5],s=pw[a>>2&7],l=fw[3&a];t.increment();
1178let u=xv(e,t,2),c=u[0];return{physicalStreamType:n,logicalStreamType:i,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:c,byteLength:u[1],decompressedCount:c}}var ww;!(function(e){e[e.FLAT=0]="FLAT",e[e.CONST=1]="CONST",e[e.SEQUENCE=2]="SEQUENCE",e[e.DICTIONARY=3]="DICTIONARY",e[e.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(ww||={});var _w=class{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8),r=e%8;return 1==(this.values[t]>>r&1)}set(e,t){let r=Math.floor(e/8),n=e%8;this.values[r]=this.values[r]|+!!t<<n}getInt(e){let t=Math.floor(e/8),r=e%8;return this.values[t]>>r&1}size(){return this._size}getBuffer(){return this.values}};function Aw(e,t,r){if(!t)return e;let n=t.size(),i=new(0,e.constructor)(n),a=0;for(let o=0;o<n;o++)i[o]=t.get(o)?e[a++]:r;return i}function Dw(e,t,r){if(!r)return e;let n=r.size(),i=new _w(e,t),a=new _w(new Uint8Array(Math.ceil(n/8)),n),o=0;for(let e=0;e<n;e++){let t=!!r.get(e)&&i.get(o++);a.set(e,t)}return a.getBuffer()}function Sw(e,t,r){for(let n=0;n<e;n++){let e=gw(t,r);r.add(e.byteLength)}}function Ew(e,t,r,n,i){let a=Fw(e,Math.ceil(t/8),r,n);return i?Dw(a,t,i):a}function Fw(e,t,r,n){let i=new Uint8Array(t),a=0,o=n.get()+r;for(;a<t&&!(n.get()>=o);){let r=e[n.increment()];if(r<=127){let o=r+3,s=e[n.increment()],l=Math.min(a+o,t);i.fill(s,a,l),a=l}else{let o=256-r;for(let r=0;r<o&&a<t;r++)i[a++]=e[n.increment()]}}return n.set(o),i}function Pw(e,t,r,n){let i=t.get(),a=i+r*Float32Array.BYTES_PER_ELEMENT,o=new Uint8Array(e.subarray(i,a)).buffer,s=new Float32Array(o);return t.set(a),n?Aw(s,n,0):s}function kw(e,t,r,n){let i=t.get(),a=i+r*Float64Array.BYTES_PER_ELEMENT,o=new Uint8Array(e.subarray(i,a)).buffer,s=new Float64Array(o);return t.set(a),n?Aw(s,n,0):s}function Tw(e,t,r){let n=t.get(),i=r*Uint32Array.BYTES_PER_ELEMENT,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=new Uint32Array(r);for(let e=0;e<r;e++)o[e]=a.getUint32(n+e*Uint32Array.BYTES_PER_ELEMENT,!0);return t.add(i),o}function Mw(e,t,r){let n=t.get(),i=r*BigUint64Array.BYTES_PER_ELEMENT,a=new DataView(e.buffer,e.byteOffset,e.byteLength),o=new BigUint64Array(r);for(let e=0;e<r;e++)o[e]=a.getBigUint64(n+e*BigUint64Array.BYTES_PER_ELEMENT,!0);return t.add(i),o}const Iw=new TextDecoder;function Cw(e,t,r){return r-t>=12?Iw.decode(e.subarray(t,r)):Ow(e,t,r)}function Ow(e,t,r){let n="",i=t;for(;i<r;){let t,a,o,s=e[i],l=null,u=s>239?4:s>223?3:s>191?2:1;if(i+u>r)break;1===u?s<128&&(l=s):2===u?(t=e[i+1],128==(192&t)&&(l=(31&s)<<6|63&t,l<=127&&(l=null))):3===u?(t=e[i+1],a=e[i+2],128==(192&t)&&128==(192&a)&&(l=(15&s)<<12|(63&t)<<6|63&a,(l<=2047||l>=55296&&l<=57343)&&(l=null))):4===u&&(t=e[i+1],a=e[i+2],o=e[i+3],128==(192&t)&&128==(192&a)&&128==(192&o)&&(l=(15&s)<<18|(63&t)<<12|(63&a)<<6|63&o,(l<=65535||l>=1114112)&&(l=null))),null===l?(l=65533,u=1):l>65535&&(l-=65536,n+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),n+=String.fromCharCode(l),i+=u}return n}function Bw(e,t,r,n,i){return Hw(Lw(e,t,r),r,n,i)}function zw(e,t,r,n,i){return Kw(Lw(e,t,r),r,n,i)}function Vw(e,t,r){return t_(Lw(e,t,r),r)}function Lw(e,t,r){let n=r.physicalLevelTechnique;switch(n){case Sb.FAST_PFOR:return Dv(e,r.numValues,r.byteLength,t);case Sb.VARINT:return xv(e,t,r.numValues);case Sb.NONE:return Tw(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${n} is not supported (yet).`)}}function $w(e,t,r){let n=r.physicalLevelTechnique;switch(n){case Sb.VARINT:return bv(e,t,r.numValues);case Sb.NONE:return Mw(e,t,r.numValues);default:throw Error(`Specified physicalLevelTechnique ${n} is not supported (yet).`)}}function jw(e,t,r){let n=Lw(e,t,r);return 1===n.length?Ev(n[0]):rw(n)}function Rw(e,t,r){let n=Lw(e,t,r);return 1===n.length?r.logicalLevelTechnique1===Db.DELTA?Ev(n[0]):n[0]:tw(n)}function Nw(e,t,r){return nw(Lw(e,t,r))}function Uw(e,t,r){return ow(bv(e,t,r.numValues))}function qw(e,t,r,n){return Jw($w(e,t,r),r,n)}function Gw(e,t,r,n){return Qw($w(e,t,r),r,n)}function Yw(e,t,r,n){let i=Xw(e,t,r,!1);return n?Aw(i,n,0):i}function Xw(e,t,r,n){if(r.physicalLevelTechnique===Sb.VARINT)return e_(wv(e,t,r.numValues),r,n);let i=$w(e,t,r),a=n?Jw(i,r):Qw(i,r);return Float64Array.from(a,Number)}function Zw(e,t,r){let n=$w(e,t,r);return 1===n.length?Fv(n[0]):aw(n)}function Ww(e,t,r){let n=$w(e,t,r);return 1===n.length?r.logicalLevelTechnique1===Db.DELTA?Fv(n[0]):n[0]:iw(n)}function Hw(e,t,r,n){let i;switch(t.logicalLevelTechnique1){case Db.DELTA:if(t.logicalLevelTechnique2===Db.RLE){let r=t;if(!n)return Wv(e,r.runs,r.numRleValues);i=Bv(e=Iv(e,r.runs,r.numRleValues))}else i=Bv(e);break;case Db.RLE:i=Lv(e,t.runs,t.numRleValues);break;case Db.MORTON:Rv(e),i=new Int32Array(e);break;case Db.COMPONENTWISE_DELTA:if(r&&!n)return qv(e,r.scale,r.min,r.max);i=Uv(e);break;case Db.NONE:i=kv(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return n?Aw(i,n,0):i}function Kw(e,t,r,n){let i;switch(t.logicalLevelTechnique1){case Db.DELTA:if(t.logicalLevelTechnique2===Db.RLE){let r=t;i=Kv(Iv(e,r.runs,r.numRleValues))}else i=Kv(e);break;case Db.RLE:i=Iv(e,t.runs,t.numRleValues);break;case Db.MORTON:Rv(e),i=e;break;case Db.COMPONENTWISE_DELTA:i=r&&!n?ew(e,r.scale,r.min,r.max):Qv(e);break;case Db.NONE:i=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return n?Aw(i,n,0):i}function Jw(e,t,r){let n;switch(t.logicalLevelTechnique1){case Db.DELTA:if(t.logicalLevelTechnique2===Db.RLE){let i=t;if(!r)return Hv(e,i.runs,i.numRleValues);n=zv(e=Cv(e,i.runs,i.numRleValues))}else n=zv(e);break;case Db.RLE:n=$v(e,t.runs,t.numRleValues);break;case Db.NONE:n=Tv(e);break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?Aw(n,r,0n):n}function Qw(e,t,r){let n;switch(t.logicalLevelTechnique1){case Db.DELTA:if(t.logicalLevelTechnique2===Db.RLE){let r=t;n=Jv(Cv(e,r.runs,r.numRleValues))}else n=Jv(e);break;case Db.RLE:n=Cv(e,t.runs,t.numRleValues);break;case Db.NONE:n=e;break;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}return r?Aw(n,r,0n):n}function e_(e,t,r){switch(t.logicalLevelTechnique1){case Db.DELTA:if(t.logicalLevelTechnique2===Db.RLE){let r=t;e=Ov(e,r.runs,r.numRleValues)}return Vv(e),e;case Db.RLE:return i_(e,t,r);case Db.NONE:return r&&Mv(e),e;default:throw Error(`The specified Logical level technique is not supported: ${t.logicalLevelTechnique1}`)}}function t_(e,t){if(t.logicalLevelTechnique1===Db.DELTA&&t.logicalLevelTechnique2===Db.NONE)return Yv(e);if(t.logicalLevelTechnique1===Db.RLE&&t.logicalLevelTechnique2===Db.NONE){let r=t;return Zv(e,r.runs,r.numRleValues)}if(t.logicalLevelTechnique1===Db.NONE&&t.logicalLevelTechnique2===Db.NONE){Nv(e);let r=new Uint32Array(t.numValues+1);return r[0]=0,r.set(e,1),r}if(t.logicalLevelTechnique1===Db.DELTA&&t.logicalLevelTechnique2===Db.RLE){let r=t,n=Xv(e,r.runs,r.numRleValues);return Rv(n),new Uint32Array(n)}throw Error("Only delta encoding is supported for transforming length to offset streams yet.")}function r_(e,t,r,n,i="int32"){let a=e.logicalLevelTechnique1;if(a===Db.RLE)return 1===e.runs?ww.CONST:ww.FLAT;if(a!==Db.DELTA||e.logicalLevelTechnique2!==Db.RLE)return 1===e.numValues?ww.CONST:ww.FLAT;let o=t instanceof _w?t.size():t,s=e;if(s.numRleValues!==o)return ww.FLAT;if(1===s.runs)return ww.SEQUENCE;
1178if(2!==s.runs)return 1===e.numValues?ww.CONST:ww.FLAT;let l=n.get();if(e.physicalLevelTechnique===Sb.VARINT)return n_(r,n,i)?ww.SEQUENCE:1===e.numValues?ww.CONST:ww.FLAT;let u=n.get(),c=new Int32Array(r.buffer,r.byteOffset+u,4);return n.set(l),2===c[2]&&2===c[3]?ww.SEQUENCE:1===e.numValues?ww.CONST:ww.FLAT}function n_(e,t,r){let n=new Eb(t.get());if("int64"===r){let t=bv(e,n,4);return 2n===t[2]&&2n===t[3]}let i=xv(e,n,4);return 2===i[2]&&2===i[3]}function i_(e,t,r){return r?jv(e,t.runs,t.numRleValues):Ov(e,t.runs,t.numRleValues)}var a_,o_,s_,l_=class extends rb{getValueFromBuffer(e){return this.dataBuffer[e]}},u_=class extends ab{constructor(e,t,r,n,i){super(e,i?BigInt64Array.of(t):BigUint64Array.of(t),r,n)}getValueFromBuffer(e){return this.dataBuffer[0]+BigInt(e)*this.delta}};function c_(e,t,r){return{x:h_(e,t)-r,y:h_(e>>1,t)-r}}function h_(e,t){let r=0;for(let n=0;n<t;n++)r|=(e&1<<2*n)>>n;return r}function p_(e){let t=Array(e.numGeometries),r=1,n=1,i=1,a=0,o=0,s=0,l=e.mortonSettings,u=e.topologyVector,c=u.geometryOffsets,h=u.partOffsets,p=u.ringOffsets,f=e.vertexOffsets,d=!f||0===f.length,y=e.containsPolygonGeometry(),m=e.vertexBuffer;for(let u=0;u<e.numGeometries;u++){let g=e.geometryType(u);switch(g){case a_.POINT:{let u,y;if(d)u=m[o++],y=m[o++];else if(e.vertexBufferType===s_.MORTON){let e=c_(m[f[s++]],l.numBits,l.coordinateShift);u=e.x,y=e.y}else{let e=2*f[s++];u=m[e],y=m[e+1]}t[a++]=[[new x(u,y)]],c&&i++,h&&r++,p&&n++}break;case a_.MULTIPOINT:{let u,h=c[i]-c[i-1];if(i++,d){u=Array(h);for(let e=0;e<h;e++){let t=m[o++],r=m[o++];u[e]=new x(t,r)}}else u=f_(e.vertexBufferType,m,f,s,h,!1,l),s+=h;t[a++]=u.map(e=>[e]),r+=h,n+=h}break;case a_.LINESTRING:{let u,g;y?(u=p[n]-p[n-1],n++):u=h[r]-h[r-1],r++,d?(g=d_(m,o,u,!1),o+=2*u):(g=f_(e.vertexBufferType,m,f,s,u,!1,l),s+=u),t[a++]=[g],c&&i++}break;case a_.POLYGON:{let u=h[r]-h[r-1];r++;let y,g=Array(u-1),x=p[n]-p[n-1];if(n++,d){y=d_(m,o,x,!0),o+=2*x;for(let e=0;e<g.length;e++)x=p[n]-p[n-1],n++,g[e]=d_(m,o,x,!0),o+=2*x}else{y=f_(e.vertexBufferType,m,f,s,x,!0,l),s+=x;for(let t=0;t<g.length;t++)x=p[n]-p[n-1],n++,g[t]=f_(e.vertexBufferType,m,f,s,x,!0,l),s+=x}t[a++]=[y].concat(g),c&&i++}break;case a_.MULTILINESTRING:{let u=c[i]-c[i-1];i++;let g=Array(u);for(let t=0;t<u;t++){let i;if(y?(i=p[n]-p[n-1],n++):i=h[r]-h[r-1],r++,d)g[t]=d_(m,o,i,!1),o+=2*i;else{let r=f_(e.vertexBufferType,m,f,s,i,!1,l);g[t]=r,s+=i}}t[a++]=g}break;case a_.MULTIPOLYGON:{let u=c[i]-c[i-1];i++;let y=Array(u);for(let t=0;t<u;t++){let i=h[r]-h[r-1];r++;let a,u=Array(i-1),c=p[n]-p[n-1];n++,d?(a=d_(m,o,c,!0),o+=2*c):(a=f_(e.vertexBufferType,m,f,s,c,!0,l),s+=c);for(let t=0;t<u.length;t++){let r=p[n]-p[n-1];n++,d?(u[t]=d_(m,o,r,!0),o+=2*r):(u[t]=f_(e.vertexBufferType,m,f,s,r,!0,l),s+=r)}y[t]=[a].concat(u)}t[a++]=y.flat()}break;default:throw Error(`The specified geometry type (${g}) is currently not supported.`)}}return t}function f_(e,t,r,n,i,a,o){return e===s_.MORTON?m_(t,r,n,i,a,o):y_(t,r,n,i,a)}function d_(e,t,r,n){let i=Array(n?r+1:r);for(let n=0;n<2*r;n+=2){let r=e[t+n],a=e[t+n+1];i[n/2]=new x(r,a)}return n&&(i[i.length-1]=i[0]),i}function y_(e,t,r,n,i){let a=Array(i?n+1:n);for(let i=0;i<2*n;i+=2){let n=2*t[r+i/2],o=e[n],s=e[n+1];a[i/2]=new x(o,s)}return i&&(a[a.length-1]=a[0]),a}function m_(e,t,r,n,i,a){let o=Array(i?n+1:n);for(let i=0;i<n;i++){let n=c_(e[t[r+i]],a.numBits,a.coordinateShift);o[i]=new x(n.x,n.y)}return i&&(o[o.length-1]=o[0]),o}!(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON",e[e.MULTIPOINT=3]="MULTIPOINT",e[e.MULTILINESTRING=4]="MULTILINESTRING",e[e.MULTIPOLYGON=5]="MULTIPOLYGON"})(a_||={}),(function(e){e[e.POINT=0]="POINT",e[e.LINESTRING=1]="LINESTRING",e[e.POLYGON=2]="POLYGON"})(o_||={}),(function(e){e[e.MORTON=0]="MORTON",e[e.VEC_2=1]="VEC_2",e[e.VEC_3=2]="VEC_3"})(s_||={});var g_=class{constructor(e,t,r,n,i){this._vertexBufferType=e,this._topologyVector=t,this._vertexOffsets=r,this._vertexBuffer=n,this._mortonSettings=i}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(e){let t=this.vertexOffsets?2*this.vertexOffsets[e]:2*e;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getVertex(e){if(this.vertexOffsets&&this.mortonSettings){let t=this.vertexOffsets[e],r=c_(this.vertexBuffer[t],this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[r.x,r.y]}let t=this.vertexOffsets?2*this.vertexOffsets[e]:2*e;return[this.vertexBuffer[t],this.vertexBuffer[t+1]]}getGeometries(){return p_(this)}get mortonSettings(){return this._mortonSettings}};function x_(e,t,r,n,i){return new v_(e,t,s_.VEC_2,r,n,i)}function b_(e,t,r,n,i,a){return new v_(e,t,s_.MORTON,r,n,i,a)}var v_=class extends g_{constructor(e,t,r,n,i,a,o){super(r,n,i,a,o),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===a_.POLYGON||this._geometryType===a_.MULTIPOLYGON}containsSingleGeometryType(){return!0}};function w_(e,t,r,n){return new A_(s_.VEC_2,e,t,r,n)}function __(e,t,r,n,i){return new A_(s_.MORTON,e,t,r,n,i)}var A_=class extends g_{constructor(e,t,r,n,i,a){super(e,r,n,i,a),this._geometryTypes=t}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let e=0;e<this.numGeometries;e++)if(this.geometryType(e)===a_.POLYGON||this.geometryType(e)===a_.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}},D_=class{constructor(e,t,r,n){this._triangleOffsets=e,this._indexBuffer=t,this._vertexBuffer=r,this._topologyVector=n}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw Error("Cannot convert GpuVector to coordinates without topology information");let e=new Uint32Array(this.numGeometries);for(let t=0;t<this.numGeometries;t++)e[t]=this.geometryType(t);return w_(e,this._topologyVector,void 0,this._vertexBuffer).getGeometries()}[Symbol.iterator](){return null}};function S_(e,t,r,n,i,a){return new E_(e,t,r,n,i,a)}var E_=class extends D_{constructor(e,t,r,n,i,a){super(r,n,i,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}};
1178function F_(e,t,r,n,i){return new P_(e,t,r,n,i)}var P_=class extends D_{constructor(e,t,r,n,i){super(t,r,n,i),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}};function k_(e,t,r,n,i){let a,o,s,l,u=gw(e,r);if(r_(u,n,e,r)===ww.CONST){let c,h,p,f,d=Rw(e,r,u);for(let n=0;n<t-1;n++){let t=gw(e,r);switch(t.physicalStreamType){case sw.LENGTH:switch(t.logicalStreamType.lengthType){case cw.GEOMETRIES:c=Vw(e,r,t);break;case cw.PARTS:h=Vw(e,r,t);break;case cw.RINGS:p=Vw(e,r,t);break;case cw.TRIANGLES:f=Vw(e,r,t)}break;case sw.OFFSET:switch(t.logicalStreamType.offsetType){case uw.VERTEX:a=zw(e,r,t);break;case uw.INDEX:l=zw(e,r,t)}break;case sw.DATA:if(lw.VERTEX===t.logicalStreamType.dictionaryType)o=Bw(e,r,t,i);else{let n=t;s={numBits:n.numBits,coordinateShift:n.coordinateShift},o=zw(e,r,t,i)}}}return l?void 0!==c||void 0!==h?S_(n,d,f,l,o,{geometryOffsets:c,partOffsets:h,ringOffsets:p}):S_(n,d,f,l,o):void 0===s?x_(n,d,{geometryOffsets:c,partOffsets:h,ringOffsets:p},a,o):b_(n,d,{geometryOffsets:c,partOffsets:h,ringOffsets:p},a,o,s)}let c,h,p,f,d,y,m,g=zw(e,r,u);for(let n=0;n<t-1;n++){let t=gw(e,r);switch(t.physicalStreamType){case sw.LENGTH:switch(t.logicalStreamType.lengthType){case cw.GEOMETRIES:c=zw(e,r,t);break;case cw.PARTS:h=zw(e,r,t);break;case cw.RINGS:p=zw(e,r,t);break;case cw.TRIANGLES:f=Vw(e,r,t)}break;case sw.OFFSET:switch(t.logicalStreamType.offsetType){case uw.VERTEX:a=zw(e,r,t);break;case uw.INDEX:l=zw(e,r,t)}break;case sw.DATA:if(lw.VERTEX===t.logicalStreamType.dictionaryType)o=Bw(e,r,t,i);else{let n=t;s={numBits:n.numBits,coordinateShift:n.coordinateShift},o=zw(e,r,t,i)}}}return c?(d=T_(g,c,2),h&&p?(y=M_(g,d,h,!1),m=C_(g,d,y,p)):h&&(y=I_(g,d,h))):h&&p?(y=T_(g,h,1),m=M_(g,y,p,!0)):h&&(y=T_(g,h,0)),l&&!y?F_(g,f,l,o):l?F_(g,f,l,o,{geometryOffsets:d,partOffsets:y,ringOffsets:m}):void 0===s?w_(g,{geometryOffsets:d,partOffsets:y,ringOffsets:m},a,o):__(g,{geometryOffsets:d,partOffsets:y,ringOffsets:m},a,o,s)}function T_(e,t,r){let n=new Uint32Array(e.length+1),i=0;n[0]=i;let a=0;for(let o=0;o<e.length;o++)i=n[o+1]=i+(e[o]>r?t[a++]:1);return n}function M_(e,t,r,n){let i=new Uint32Array(t[t.length-1]+1),a=0;i[0]=a;let o=1,s=0;for(let l=0;l<e.length;l++){let u=e[l],c=t[l+1]-t[l];if(5===u||2===u||n&&(4===u||1===u))for(let e=0;e<c;e++)a=i[o++]=a+r[s++];else for(let e=0;e<c;e++)i[o++]=++a}return i}function I_(e,t,r){let n=new Uint32Array(t[t.length-1]+1),i=0;n[0]=i;let a=1,o=0;for(let s=0;s<e.length;s++){let l=e[s],u=t[s+1]-t[s];if(4===l||1===l)for(let e=0;e<u;e++)i=n[a++]=i+r[o++];else for(let e=0;e<u;e++)n[a++]=++i}return n}function C_(e,t,r,n){let i=new Uint32Array(r[r.length-1]+1),a=0;i[0]=a;let o=1,s=1,l=0;for(let u=0;u<e.length;u++){let c=e[u],h=t[u+1]-t[u];if(0!==c&&3!==c)for(let e=0;e<h;e++){let e=r[o]-r[o-1];o++;for(let t=0;t<e;t++)a=i[s++]=a+n[l++]}else for(let e=0;e<h;e++)i[s++]=++a,o++}return i}var O_=class extends tb{constructor(e,t,r){super(e,t.getBuffer(),r),this.dataVector=t}getValueFromBuffer(e){return this.dataVector.get(e)}},B_=class extends rb{getValueFromBuffer(e){return this.dataBuffer[e]}},z_=class extends tb{constructor(e,t,r,n){super(e,n?BigInt64Array.of(t):BigUint64Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}},V_=class extends tb{constructor(e,t,r,n){super(e,r,n),this.offsetBuffer=t}},L_=class extends V_{constructor(e,t,r,n){super(e,t,r,n??t.length-1)}getValueFromBuffer(e){let t=this.offsetBuffer[e],r=this.offsetBuffer[e+1];return Cw(this.dataBuffer,t,r)}},$_=class extends V_{constructor(e,t,r,n,i){super(e,r,n,i??t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e],r=this.offsetBuffer[t],n=this.offsetBuffer[t+1];return Cw(this.dataBuffer,r,n)}};function j_(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];255===i?(r++,n++):r+=e[i]}return r}function R_(e,t,r){let n=new Uint32Array(t.length);for(let e=1;e<t.length;e++)n[e]=n[e-1]+t[e-1];let i=new Uint8Array(j_(t,r)),a=0;for(let o=0;o<r.length;o++){let s=r[o];if(255===s)o++,i[a++]=r[o];else{let r=t[s],o=n[s];for(;r-- >0;)i[a++]=e[o++]}}return i}var N_=class extends V_{constructor(e,t,r,n,i,a,o,s){super(e,r,n,o??t.length),this.indexBuffer=t,this.symbolOffsetBuffer=i,this.symbolTableBuffer=a,this.sharedDictionaryCache=s}getValueFromBuffer(e){this.decodedDictionary??(this.decodedDictionary=this.sharedDictionaryCache?.decodedDictionary,this.decodedDictionary??(this.decodedDictionary=this.decodeDictionary(),this.sharedDictionaryCache&&(this.sharedDictionaryCache.decodedDictionary=this.decodedDictionary)));let t=this.indexBuffer[e],r=this.offsetBuffer[t],n=this.offsetBuffer[t+1];
1178return Cw(this.decodedDictionary,r,n)}decodeDictionary(){return this.symbolLengthBuffer??=this.offsetToLengthBuffer(this.symbolOffsetBuffer),R_(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer)}offsetToLengthBuffer(e){let t=new Uint32Array(e.length-1),r=e[0];for(let n=1;n<e.length;n++){let i=e[n];t[n-1]=i-r,r=i}return t}};function U_(e,t,r,n,i){let a,o,s,l,u,c,h,p=i;for(let e=0;e<n;e++){let e=gw(t,r);switch(e.physicalStreamType){case sw.PRESENT:{let n=new _w(Ew(t,e.numValues,e.byteLength,r),e.numValues);p=i??n;break}case sw.OFFSET:o=zw(t,r,e,void 0,p);break;case sw.LENGTH:{let n=Vw(t,r,e);cw.DICTIONARY===e.logicalStreamType.lengthType?a=n:cw.SYMBOL===e.logicalStreamType.lengthType?l=n:c=n;break}case sw.DATA:{let n=t.subarray(r.get(),r.get()+e.byteLength);r.add(e.byteLength);let i=e.logicalStreamType.dictionaryType;lw.FSST===i?u=n:lw.SINGLE===i||lw.SHARED===i?s=n:lw.NONE===i&&(h=n);break}}}return q_(e,u,o,a,s,l,p)??G_(e,s,o,a,p)??Y_(e,c,h,o,p)}function q_(e,t,r,n,i,a,o){if(t){if(!(r&&n&&i&&a))throw Error(`Incomplete FSST dictionary string column "${e}"`);return new N_(e,r,n,i,a,t,o)}}function G_(e,t,r,n,i){if(t){if(!r||!n)throw Error(`Incomplete dictionary string column "${e}"`);return i?new $_(e,r,n,t,i):new $_(e,r,n,t)}}function Y_(e,t,r,n,i){if(t&&r){if(n)return i?new $_(e,n,t,r,i):new $_(e,n,t,r);if(i&&i.size()!==t.length-1){let n=new Uint32Array(i.size()),a=0;for(let e=0;e<i.size();e++)i.get(e)?n[e]=a++:n[e]=0;return new $_(e,n,t,r,i)}return i?new L_(e,t,r,i):new L_(e,t,r)}}function X_(e,t,r,n){let i,a,o,s,l=!1;for(;!l;){let r=gw(e,t);switch(r.physicalStreamType){case sw.LENGTH:cw.DICTIONARY===r.logicalStreamType.lengthType?i=Vw(e,t,r):o=Vw(e,t,r);break;case sw.DATA:lw.SINGLE===r.logicalStreamType.dictionaryType||lw.SHARED===r.logicalStreamType.dictionaryType?(a=e.subarray(t.get(),t.get()+r.byteLength),l=!0):s=e.subarray(t.get(),t.get()+r.byteLength),t.add(r.byteLength)}}if("complexType"!==r.type)throw Error(`Shared dictionary column ${r.name} must be a complex (struct) column.`);if(!i||!a)throw Error(`Incomplete shared dictionary for column "${r.name}"`);let u=r.complexType.children,c=[],h=s?{}:void 0,p=0;for(let l of u){let u=xv(e,t,1)[0];if(0===u)continue;let f,d=l.name?`${r.name}${l.name}`:r.name;if(n&&!n.has(d)){Sw(u,e,t);continue}if("scalarField"!==l.type||l.scalarField.physicalType!==bb)throw Error("Currently only scalar string fields are implemented for a struct.");if(u>1&&!l.nullable||1===u&&l.nullable)throw Error(`The number of streams for the child field ${l.name} does not match its nullability. nullibilty: ${l.nullable}, numStreams: ${u}`);if(l.nullable){let r=gw(e,t);f=new _w(Ew(e,r.numValues,r.byteLength,t),r.numValues)}let y=zw(e,t,gw(e,t),void 0,f);if(s){if(!o)throw Error(`Incomplete shared FSST dictionary for column "${d}"`);c[p++]=new N_(d,y,i,a,o,s,f,h)}else c[p++]=new $_(d,y,i,a,f)}return c}var Z_,W_,H_=class extends tb{constructor(e,t,r){super(e,new Uint8Array,r??t.length),this.values=t}getValueFromBuffer(e){return this.values[e]}};function K_(e,t,r,n){let i=J_(r);if(0===n)return i.map(e=>new H_(e,[]));let a=Q_(e,t,n),o=(a.presentStream?a.presentCount:a.lengthStream.length)/i.length,s=[],l=0,u=0;for(let e=0;e<i.length;e++){let t=iA(a,e,o,l,u);s.push(new H_(i[e],t.value,t.nullabilityBuffer)),l=t.countsEnd,u=t.valuesEnd}return s}function J_(e){let t="complexType"===e.type?e.complexType.children:void 0;return t&&0!==t.length?t.map(t=>e.name+(t.name??"")):[e.name]}function Q_(e,t,r){let n=e[t.get()];t.add(1);let i=zw(e,t,gw(e,t)),a=r-1,o=[];n&Z_.STRING&&(a-=eA(e,t,o)),a-=tA(e,t,n,o),a-=rA(e,t,n,o);let s,l=0;if(n&Z_.PRESENCE){let r=nA(e,t);s=r.value,l=r.count,a--}let u=new Uint32Array;if(a>0&&(u=zw(e,t,gw(e,t)),a--),0!==a)throw Error(`Unexpected number of remaining streams while decoding map column: ${a}`);return{lengthStream:i,dictionary:o,presentStream:s,presentCount:l,flattenedValues:u}}function eA(e,t,r){let n=e[t.get()];t.add(1);let i=U_("",e,t,n);if(i)for(let e=0;e<i.size;e++)r.push(i.getValue(e));return n}function tA(e,t,r,n){let i=0;return r&Z_.INT32?(cA(n,Bw(e,t,gw(e,t))),i++):r&Z_.INT64&&(cA(n,qw(e,t,gw(e,t))),i++),r&Z_.UINT32?(cA(n,zw(e,t,gw(e,t))),i++):r&Z_.UINT64&&(cA(n,Gw(e,t,gw(e,t))),i++),i}function rA(e,t,r,n){let i=0;return r&Z_.FLOAT&&(cA(n,Pw(e,t,gw(e,t).numValues)),i++),r&Z_.DOUBLE&&(cA(n,kw(e,t,gw(e,t).numValues)),i++),i}function nA(e,t){let r=gw(e,t);if(r.physicalStreamType!==sw.PRESENT)throw Error(`Expected PRESENT stream for map column but found: ${r.physicalStreamType}`);let n=r.numValues,i=t.get(),a=new _w(Ew(e,n,r.byteLength,t),n);return t.set(i+r.byteLength),{value:a,count:n}}function iA(e,t,r,n,i){let a,{lengthStream:o,flattenedValues:s,presentStream:l,dictionary:u}=e,c=t*r,h=r;if(l){a=new _w(new Uint8Array(Math.ceil(r/8)),r),h=0;for(let e=0;e<r;e++)l.get(c+e)&&(a.set(e,!0),h++)}let p=n+h;if(p>o.length)throw Error("Merged map counts underflow while decoding child streams");let f=Array(r),d=n,y=i;for(let e=0;e<r;e++){if(l&&!l.get(c+e)){f[e]=null;continue}let t=y+o[d++];if(t>s.length)throw Error("Map value stream underflow while decoding feature payload");let r=aA(s,y,t,u);f[e]=r.value,y=r.nextIndex}let m=0;for(let e=n;e<p;e++)m+=o[e];let g=i+m;if(y!==g)throw Error("Unused flattened map values remain after decode");return{value:f,nullabilityBuffer:a,countsEnd:p,valuesEnd:g}}function aA(e,t,r,n){return r-t===1||e[t]===W_.START_LIST?sA(e,t,r,n):oA(e,t,r,n)}function oA(e,t,r,n){let i=Object.create(null),a=t;for(;a<r;){let t=uA(e[a++],n);if("string"!=typeof t)throw Error(`Map key dictionary index does not resolve to a string: ${t}`);let o=sA(e,a,r,n);i[t]=o.value,a=o.nextIndex}return{value:i,nextIndex:a}}function sA(e,t,r,n){if(t>=r)throw Error("Unexpected end of map value stream");let i=e[t];
1178if(i===W_.FALSE)return{value:!1,nextIndex:t+1};if(i===W_.TRUE)return{value:!0,nextIndex:t+1};if(i===W_.START_MAP){let i=lA(e,t,r);return{value:oA(e,t+2,i,n).value,nextIndex:i}}if(i===W_.START_LIST){let i=lA(e,t,r),a=[],o=t+2;for(;o<i;){let t=sA(e,o,i,n);a.push(t.value),o=t.nextIndex}return{value:a,nextIndex:i}}return{value:uA(i,n),nextIndex:t+1}}function lA(e,t,r){if(t+1>=r)throw Error("Missing length for nested map/list payload");let n=e[t+1];if(n<2)throw Error(`Invalid nested payload length: ${n}`);let i=t+n;if(i>r)throw Error("Nested payload exceeds containing payload bounds");return i}function uA(e,t){let r=e-W_.COUNT;if(r<0||r>=t.length)throw Error(`Scalar dictionary index out of range: ${e}`);return t[r]}function cA(e,t){for(let r of t)e.push(r)}function hA(e,t,r,n,i,a){return"scalarType"===r.type?a&&!a.has(r.name)?(Sw(n,e,t),null):pA(n,e,t,i,r.scalarType,r):r.complexType?.physicalType===_b?K_(e,t,r,n):0===n?null:X_(e,t,r,a)}function pA(e,t,r,n,i,a){let o;if(0===e)return null;if(a.nullable){let e=gw(t,r),n=e.numValues,i=r.get(),a=Ew(t,n,e.byteLength,r);r.set(i+e.byteLength),o=new _w(a,e.numValues)}let s=o??n;switch(i.physicalType){case db:case fb:return gA(t,r,a,i,s);case bb:{let n=a.nullable?e-1:e;return U_(a.name,t,r,n,o)??null}case cb:return fA(t,r,a,n,s);case mb:case yb:return mA(t,r,a,s,i);case gb:return dA(t,r,a,s);case xb:return yA(t,r,a,s);default:throw Error(`The specified data type for the field is currently not supported: ${i}`)}}function fA(e,t,r,n,i){let a=gw(e,t),o=a.numValues,s=t.get(),l=xA(i)?i:void 0,u=Ew(e,o,a.byteLength,t,l);t.set(s+a.byteLength);let c=new _w(u,o);return new O_(r.name,c,i)}function dA(e,t,r,n){let i=gw(e,t),a=xA(n)?n:void 0,o=Pw(e,t,i.numValues,a);return new B_(r.name,o,n)}function yA(e,t,r,n){let i=gw(e,t),a=xA(n)?n:void 0,o=kw(e,t,i.numValues,a);return new ib(r.name,o,n)}function mA(e,t,r,n,i){let a=gw(e,t),o=r_(a,n,e,t,"int64"),s=i.physicalType===yb;if(o===ww.FLAT){let i=xA(n)?n:void 0,o=s?qw(e,t,a,i):Gw(e,t,a,i);return new l_(r.name,o,n)}if(o===ww.SEQUENCE){let n=Uw(e,t,a);return new u_(r.name,n[0],n[1],a.numRleValues,s)}let l=s?Zw(e,t,a):Ww(e,t,a);return new z_(r.name,l,n,s)}function gA(e,t,r,n,i){let a=gw(e,t),o=r_(a,i,e,t),s=n.physicalType===fb;if(o===ww.FLAT){let n=xA(i)?i:void 0,o=s?Bw(e,t,a,void 0,n):zw(e,t,a,void 0,n);return new nb(r.name,o,i)}if(o===ww.SEQUENCE){let n=Nw(e,t,a);return new ob(r.name,n[0],n[1],a.numRleValues,s)}let l=s?jw(e,t,a):Rw(e,t,a);return new sb(r.name,l,i,s)}function xA(e){return e instanceof _w}!(function(e){e[e.STRING=1]="STRING",e[e.INT32=2]="INT32",e[e.UINT32=4]="UINT32",e[e.INT64=8]="INT64",e[e.UINT64=16]="UINT64",e[e.FLOAT=32]="FLOAT",e[e.DOUBLE=64]="DOUBLE",e[e.PRESENCE=128]="PRESENCE"})(Z_||={}),(function(e){e[e.FALSE=0]="FALSE",e[e.TRUE=1]="TRUE",e[e.START_MAP=2]="START_MAP",e[e.START_LIST=3]="START_LIST",e[e.COUNT=4]="COUNT"})(W_||={});const bA=0,vA=1,wA=2,_A=4,AA=10,DA=30,SA=31;function EA(e){switch(e){case bA:case bA|vA:case bA|wA:case bA|wA|vA:return{nullable:0!==(e&vA),columnScope:ub,type:"scalarType",scalarType:{longID:0!==(e&wA),type:"logicalType",logicalType:Ab}};case _A:return{nullable:!1,columnScope:ub,type:"complexType",complexType:{type:"physicalType",physicalType:vb,children:[]}};case DA:return{nullable:!1,columnScope:ub,type:"complexType",complexType:{type:"physicalType",physicalType:wb,children:[]}};case SA:return{nullable:!0,columnScope:ub,type:"complexType",complexType:{type:"physicalType",physicalType:_b,children:[]}};default:return IA(e)}}function FA(e){return e>=AA}function PA(e){return e===DA||e===SA}function kA(e){if("scalarType"===e.type){let t=e.scalarType;if("physicalType"===t.type)switch(t.physicalType){case cb:case hb:case pb:case fb:case db:case yb:case mb:case gb:case xb:return!1;case bb:return!0;default:return!1}if("logicalType"===t.type)return!1}else if("complexType"===e.type){let t=e.complexType;if("physicalType"===t.type)switch(t.physicalType){case vb:case wb:case _b:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",e),!1}function TA(e){return"scalarType"===e.type&&"logicalType"===e.scalarType?.type&&e.scalarType.logicalType===Ab}function MA(e){return"complexType"===e.type&&"physicalType"===e.complexType?.type&&e.complexType.physicalType===vb}function IA(e){let t;switch(e){case 10:case 11:t=cb;break;case 12:case 13:t=hb;break;case 14:case 15:t=pb;break;case 16:case 17:t=fb;break;case 18:case 19:t=db;break;case 20:case 21:t=yb;break;case 22:case 23:t=mb;break;case 24:case 25:t=gb;break;case 26:case 27:t=xb;break;case 28:case 29:t=bb;break;default:return null}return{nullable:!!(1&e),columnScope:ub,type:"scalarType",scalarType:{longID:!1,t
1178ype:"physicalType",physicalType:t}}}const CA=new TextDecoder,OA="0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT), 31(MAP)";function BA(e,t){let r=xv(e,t,1)[0];if(0===r)return"";let n=t.get(),i=n+r,a=e.subarray(n,i);return t.add(r),CA.decode(a)}function zA(e){let t=e.name,r=e.nullable;return"scalarType"===e.type?{type:"scalarField",scalarField:e.scalarType,name:t,nullable:r}:{type:"complexField",complexField:e.complexType,name:t,nullable:r}}function VA(e,t){let r=xv(e,t,1)[0]>>>0,n=r>=AA?EA(r):null;if(!n)throw Error(`Unsupported field type code ${r}. Supported: 10-29(scalars), 30(STRUCT), 31(MAP)`);let i=Object.assign({},n,{name:BA(e,t)});if("complexType"===i.type&&PA(r)){let r=i.complexType,n=xv(e,t,1)[0]>>>0;r.children=Array(n);for(let i=0;i<n;i++)r.children[i]=VA(e,t)}return zA(i)}function LA(e,t){let r,n=xv(e,t,1)[0]>>>0,i=EA(n);if(!i)throw Error(`Unsupported column type code ${n}. Supported: ${OA}`);if(FA(n))r=BA(e,t);else if(n<_A)r="id";else{if(n!==_A)throw Error(`Unsupported column type code ${n}. Supported: ${OA}`);r="geometry"}let a=Object.assign({},i,{name:r});if("complexType"===a.type&&PA(n)){let r=xv(e,t,1)[0]>>>0,n=a.complexType;n.children=Array(r);for(let i=0;i<r;i++)n.children[i]=VA(e,t)}return a}function $A(e,t){let r={featureTables:[]},n={};if(n.name=BA(e,t),0===n.name.length)throw Error("Missing layer name");let i=xv(e,t,1)[0]>>>0,a=xv(e,t,1)[0]>>>0;n.columns=Array(a);for(let r=0;r<a;r++)n.columns[r]=LA(e,t);return r.featureTables.push(n),[r,i]}function jA(e,t,r=!0){let n=new Eb(0),i=[];for(;n.get()<e.length;){let a=xv(e,n,1)[0]>>>0,o=n.get()+a;if(o>e.length)throw Error(`Block overruns tile: ${o} > ${e.length}`);let s=xv(e,n,1)[0]>>>0;if(1!==s&&2!==s){n.set(o);continue}let[l,u]=$A(e,n),c=l.featureTables[0],h=null,p=null,f=[],d=0;for(let i of c.columns){let a=i.name;if(TA(i)){let t=null;if(i.nullable){let r=gw(e,n),i=n.get(),a=Ew(e,r.numValues,r.byteLength,n);n.set(i+r.byteLength),t=new _w(a,r.numValues)}let o=gw(e,n);d=t?t.size():o.decompressedCount,h=RA(e,i,n,a,o,t??d,r)}else if(MA(i)){let r=xv(e,n,1)[0];if(0===d){let t=n.get();
1178d=gw(e,n).decompressedCount,n.set(t)}t&&(t.scale=t.extent/u),p=k_(e,r,n,d,t)}else{let t=kA(i)?xv(e,n,1)[0]:1;if(0===t)continue;let r=hA(e,n,i,t,d,void 0);if(r)if(Array.isArray(r))for(let e of r)f.push(e);else f.push(r)}}let y=new lb(c.name,p,h,f,u);i.push(y),n.set(o)}return i}function RA(e,t,r,n,i,a,o=!1){let s=t.scalarType?.longID?mb:db,l="number"==typeof a?void 0:a,u=r_(i,a,e,r,s===mb?"int64":"int32");if(s===db)switch(u){case ww.FLAT:return new nb(n,zw(e,r,i,void 0,l),a);case ww.SEQUENCE:{let t=Nw(e,r,i);return new ob(n,t[0],t[1],i.numRleValues,!1)}case ww.CONST:return new sb(n,Rw(e,r,i),a,!1)}switch(u){case ww.FLAT:return o?new ib(n,Yw(e,r,i,l),a):new l_(n,Gw(e,r,i,l),a);case ww.SEQUENCE:{let t=Uw(e,r,i);return new u_(n,t[0],t[1],i.numRleValues,!1)}case ww.CONST:return new z_(n,Ww(e,r,i),a,!1)}throw Error("Vector type not supported for id column.")}var NA=class{constructor(e,t){switch(this._featureData=e,this.properties=this._featureData.properties||{},this._featureData.geometry?.type){case a_.POINT:case a_.MULTIPOINT:this.type=1;break;case a_.LINESTRING:case a_.MULTILINESTRING:this.type=2;break;case a_.POLYGON:case a_.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=t,this.id=Number(this._featureData.id)}loadGeometry(){let e=[];for(let t of this._featureData.geometry.coordinates){let r=[];for(let e of t)r.push(new x(e.x,e.y));e.push(r)}return e}},UA=class{constructor(e){this.features=[],this.featureTable=e,this.name=e.name,this.extent=e.extent,this.version=2,this.features=e.getFeatures(),this.length=this.features.length}feature(e){return new NA(this.features[e],this.extent)}},qA=class{constructor(e){this.layers={};let t=jA(new Uint8Array(e));this.layers=t.reduce((e,t)=>Object.assign({},e,{[t.name]:new UA(t)}),{})}},GA=class{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Es(ke,16,0),this.grid3D=new Es(ke,16,0),this.featureIndexArray=new gu,this.promoteId=t}insert(e,t,r,n,i,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);let s=a?this.grid3D:this.grid;for(let e of t){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)t[0]=Math.min(t[0],r.x),t[1]=Math.min(t[1],r.y),t[2]=Math.max(t[2],r.x),t[3]=Math.max(t[3],r.y);t[0]<8192&&t[1]<8192&&t[2]>=0&&t[3]>=0&&s.insert(o,t[0],t[1],t[2],t[3])}}loadVTLayers(){if(!this.vtLayers){if("mlt"===this.encoding)this.vtLayers=new qA(this.rawTileData).layers;else this.vtLayers=new sf(new sm(this.rawTileData)).layers;this.sourceLayerCoder=new Qx(this.vtLayers?Object.keys(this.vtLayers).sort():[Nx])}return this.vtLayers}query(e,t,r,n){this.loadVTLayers();let i=e.params,a=ke/e.tileSize/e.scale,o=wo(i.filter,"queryRenderedFeatures filter",i.globalState),s=e.queryGeometry,l=e.queryPadding*a,u=Kp.fromPoints(s),c=this.grid.query(u.minX-l,u.minY-l,u.maxX+l,u.maxY+l),h=Kp.fromPoints(e.cameraQueryGeometry).expandBy(l),p=this.grid3D.query(h.minX,h.minY,h.maxX,h.maxY,(t,r,n,i)=>$c(e.cameraQueryGeometry,t-l,r-l,n+l,i+l));for(let e of p)c.push(e);c.sort(ZA);let f,d={};for(let l of c){if(l===f)continue;f=l;let u=this.featureIndexArray.get(l),c=null;this.loadMatchingFeature(d,u.bucketIndex,u.sourceLayerIndex,u.featureIndex,o,i.layers,i.availableImages,t,r,n,(t,r,n)=>(c||=Ac(t),r.queryIntersectsFeature({queryGeometry:s,feature:t,featureState:n,geometry:c,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,t,r,n,i,a,o,s,l,u,c){let h=this.bucketLayerIDs[t];if(a&&!h.some(e=>a.has(e)))return;let p=this.sourceLayerCoder.decode(r),f=this.vtLayers[p].feature(n);if(i.needGeometry){let e=Dc(f,!0);if(!i.filter(new il(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new il(this.tileID.overscaledZ),f))return;let d=this.getId(f,p);for(let t of h){if(a&&!a.has(t))continue;let r=s[t];if(!r)continue;let i={};d&&u&&(i=u.getState(r.sourceLayer||"_geojsonTileLayer",d));let h=tt({},l[t]);h.paint=XA(h.paint,r.paint,f,i,o),h.layout=XA(h.layout,r.layout,f,i,o);let p=!c||c(f,r,i);if(!p)continue;let y=new eb(f,this.z,this.x,this.y,d);y.layer=h;let m=e[t];void 0===m&&(m=e[t]=[]),m.push({featureIndex:n,feature:y,intersectionZ:p})}}lookupSymbolFeatures(e,t,r,n,i,a,o,s){let l={};this.loadVTLayers();let u=wo(i.filterSpec,"queryRenderedFeatures symbol filter",i.globalState);
1178for(let i of e)this.loadMatchingFeature(l,r,n,i,u,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){let r=e.id;if(this.promoteId){let n="string"==typeof this.promoteId?this.promoteId:this.promoteId[t];r=e.properties[n],"boolean"==typeof r&&(r=Number(r)),void 0===r&&e.properties?.cluster&&this.promoteId&&(r=Number(e.properties.cluster_id))}return r}};function YA(e){return"object"==typeof e&&!!e&&"evaluate"in e}function XA(e,t,r,n,i){return ct(e,(e,a)=>{let o=t instanceof dl?t.get(a):null;return YA(o)?o.evaluate(r,n,void 0,i):o})}function ZA(e,t){return t-e}Ps("FeatureIndex",GA,{omit:["rawTileData","sourceLayerCoder"]});var WA=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let n=e.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);let i={value:t,timeout:void 0};if(void 0!==r&&(i.timeout=setTimeout(()=>{this.remove(e,i)},r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let n of this.data[r])e(n.value)||t.push(n);for(let e of t)this.remove(e.value.tileID,e)}},HA=class{constructor(e){this.maxEntries=e,this.map=new Map}get(e){let t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.map.set(e,t)),t}set(e,t){if(this.map.has(e))this.map.delete(e);else if(this.map.size>=this.maxEntries){let e=this.map.keys().next().value;this.map.delete(e)}this.map.set(e,t)}clear(){this.map.clear()}}},1069,[]);
1179__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.readForceWebGlInitializationFailure=function(){return t.IS_DEVELOPMENT_BUILD&&n},e.setForceWebGlInitializationFailure=function(o){if(!t.IS_DEVELOPMENT_BUILD||o===n)return;n=o,u.forEach(t=>{t()})},e.subscribeMapRendererDevOverrides=function(n){if(!t.IS_DEVELOPMENT_BUILD)return()=>{};return u.add(n),()=>{u.delete(n)}};var t=r(d[0]);let n=!1;const u=new Set},1070,[508]);
1180__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MAP_STARTUP_TIMEOUT_MILLIS",{enumerable:!0,get:function(){return n}}),e.classifyMapStartupFailure=function(n){return n instanceof t.GPUInitializationError?'webgl2-unavailable':'required-resource'},e.isMapStartupFailure=function(t){return'webgl2-unavailable'===t||'required-resource'===t};var t=r(d[0]);const n=3e4},1071,[1068]);
1181__d(function(g,r,i,a,m,e,d){"use strict";function t(t,n){return`https://api.maptiler.com/maps/${t}/style.json?key=${n}`}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DEFAULT_MAP_STYLE",{enumerable:!0,get:function(){return n}}),e.getMapStyleUrl=function(s,o=n){return{streets:t('streets-v2',s),dark:t('darkmatter',s),light:t('basic',s),satellite:t('hybrid',s),topo:t('landscape',s)}[o]};const n='streets'},1072,[]);
1182__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorMarkerSwatch=function({locationType:e}){return(0,u.jsx)(o.default,{style:[O.marker,'inside'===e?O.markerInside:O.markerOutside],testID:`sensor-marker-swatch-${e}`})},r(d[0]);
1182var e,t=r(d[1]),o=(e=t)&&e.__esModule?e:{default:e},s=r(d[2]),n=r(d[3]),u=r(d[4]);const O=(0,s.createStyles)({marker:{backgroundColor:n.COLORS.AQI_GOOD,borderRadius:999,borderWidth:2,height:16,width:16},markerInside:{borderColor:n.COLORS.BLACK},markerOutside:{borderColor:n.COLORS.AQI_GOOD}})},1073,[34,276,489,490,104]);
1183__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OwnerStep=function({form:e,isLoadingConfig:l}){const c=(0,f.useField)(e,'email'),u=(0,f.useField)(e,'name'),T=(0,f.useField)(e,'phone');return(0,p.jsxs)(t.default,{style:I.container,children:[(0,p.jsx)(n.default,{style:I.title,children:"Owner Information"}),(0,p.jsx)(n.default,{style:I.subtitle,children:"This information is used to manage and communicate about your device."}),(0,p.jsx)(S.FormInput,{label:"Owner's Email",binding:c,required:!0,keyboardType:"email-address",helpText:(0,p.jsxs)(p.Fragment,{children:['Any valid email address can be used as the owner\'s email. ','If a Google account is used, signing in lets you more easily manage this ','sensor and view it on the map if privately registered. Changing this later ','requires contacting Support by email. ',(0,p.jsx)(h.RegistrationHelpLink,{href:h.REGISTRATION_HELP_LINKS.emailRoles,accessibilityLabel:"Read the community article explaining the difference between the associated email and the owner's email",children:"Read here for more information"})]})}),!0===l?(0,p.jsxs)(t.default,{style:I.loadingRow,children:[(0,p.jsx)(o.default,{size:"small",color:s.COLORS.ACTION_PRIMARY}),(0,p.jsx)(n.default,{style:I.loadingText,children:"Loading sensor configuration..."})]}):null,(0,p.jsx)(S.FormInput,{label:"Name",binding:u,required:!0,helpText:"Used for alert notifications."}),(0,p.jsx)(S.FormInput,{label:"Phone",binding:T,placeholder:"Optional",helpText:"Used for text alert notifications (optional)."})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3])),l=r(d[4]),s=r(d[5]),c=r(d[6]),u=r(d[7]),f=r(d[8]),S=r(d[9]),h=r(d[10]),p=r(d[11]);const I=(0,l.createStyles)({container:{paddingVertical:c.SPACING.SM},loadingRow:{alignItems:'center',flexDirection:'row',marginBottom:c.SPACING.XS,paddingHorizontal:c.SPACING.XS,paddingVertical:c.SPACING.SM},loadingText:{color:s.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.SM,marginLeft:c.SPACING.SM},subtitle:{color:s.COLORS.TEXT_SOFT,fontSize:u.FONT_SIZE.SM,fontStyle:'italic',marginBottom:c.SPACING.LG},title:{color:s.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.XL,fontWeight:'700',marginBottom:c.SPACING.XS}})},1074,[34,276,222,410,489,490,493,494,1053,1061,958,104]);
1184__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.RegistrationSourceConflict=function({prompt:e,onContinue:c,onCancel:s}){const{sections:u}=e.comparison,f=y[e.variant],h=null!=s&&'reopen'===e.variant,[O,L]=(0,t.useState)(()=>{const t={};for(const o of u)t[o.title]='legacy'===e.initialSelections?.[o.title]?'legacy':'current';return t}),b=(e,t)=>{L(o=>Object.assign({},o,{[e]:t}))};return(0,C.jsxs)(S.Card,{padding:32,children:[(0,C.jsxs)(o.default,{style:x.callout,children:[(0,C.jsxs)(o.default,{style:x.calloutHeader,children:[(0,C.jsx)(R,{}),(0,C.jsx)(l.default,{style:x.calloutTitle,children:f.title})]}),(0,C.jsx)(l.default,{style:x.calloutText,children:f.intro})]}),u.map(e=>(0,C.jsx)(T,{section:e,choice:O[e.title]??'current',currentLabel:f.currentLabel,matchNote:f.matchNote,onChoose:t=>{b(e.title,t)}},e.title)),(0,C.jsxs)(o.default,{style:h?x.actions:void 0,children:[h?(0,C.jsx)(n.default,{style:x.cancelButton,onPress:s,accessibilityRole:"button",accessibilityLabel:"Cancel and keep your current values",children:(0,C.jsx)(l.default,{style:x.cancelButtonText,children:"Cancel"})}):null,(0,C.jsx)(n.default,{style:[x.continueButton,h&&x.continueButtonInline],onPress:()=>{c(O)},accessibilityRole:"button",accessibilityLabel:"Continue with the selected registration values",children:(0,C.jsx)(l.default,{style:x.continueButtonText,children:"Continue With Selected Values"})})]})]})};var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3]));r(d[4]);var c=r(d[5]),s=r(d[6]),u=r(d[7]),f=r(d[8]),S=r(d[9]),h=r(d[10]),C=r(d[11]);const O='From Your Link',y={initial:{title:"Some Details Don't Match",intro:"The link you opened includes registration details that differ from what's currently saved for your sensor. For each section, choose which version to continue registering with. You can review and edit everything before submitting.",currentLabel:'Current Registration',matchNote:'The link uses the same values as your current registration.'},reopen:{title:'Review Link Values',intro:"Choose which values to use for each section: your saved registration or the values from your modify link. Your current choices are already selected. You can keep editing everything before you submit.",currentLabel:'Current Registration',matchNote:'The link uses the same values as your current registration.'}};function R(){return(0,t.createElement)('svg',{fill:'none',height:22,stroke:s.COLORS.BLUE_400,strokeLinecap:'round',strokeWidth:2,viewBox:'0 0 24 24',width:22,xmlns:'http://www.w3.org/2000/svg'},(0,t.createElement)('circle',{cx:12,cy:12,key:'c',r:10}),(0,t.createElement)('line',{key:'l1',x1:12,x2:12,y1:16,y2:12}),(0,t.createElement)('line',{key:'l2',x1:12,x2:12.01,y1:8,y2:8}))}
1184function L({sourceLabel:e,selected:t,rows:n,valueFor:c,onSelect:s,accessibilityLabel:u}){return(0,C.jsxs)(h.RadioOption,{checked:t,style:[x.optionPanel,t&&x.optionPanelSelected],onPress:s,accessibilityLabel:u,children:[(0,C.jsxs)(o.default,{style:x.optionHeader,children:[(0,C.jsx)(o.default,{style:[x.radioOuter,t&&x.radioOuterSelected],children:t?(0,C.jsx)(o.default,{style:x.radioInner}):null}),(0,C.jsx)(l.default,{style:[x.optionLabel,t&&x.optionLabelSelected],children:e})]}),(0,C.jsx)(o.default,{style:x.optionRows,children:n.map((e,t)=>(0,C.jsxs)(o.default,{style:[x.fieldRow,t>0&&x.fieldRowDivided],children:[(0,C.jsx)(l.default,{style:x.fieldLabel,children:e.label}),(0,C.jsx)(l.default,{style:[x.fieldValue,e.differs&&x.fieldValueDiffers],children:c(e)})]},e.field))})]})}function b({rows:e,note:t}){return(0,C.jsxs)(o.default,{style:x.matchPanel,children:[(0,C.jsx)(l.default,{style:x.matchNote,children:t}),(0,C.jsx)(o.default,{style:x.optionRows,children:e.map((e,t)=>(0,C.jsxs)(o.default,{style:[x.fieldRow,t>0&&x.fieldRowDivided],children:[(0,C.jsx)(l.default,{style:x.fieldLabel,children:e.label}),(0,C.jsx)(l.default,{style:x.fieldValue,children:e.currentValue})]},e.field))})]})}function T({section:e,choice:t,currentLabel:n,matchNote:c,onChoose:s}){const u=e.rows.filter(e=>e.differs).length,f=0===u;return(0,C.jsxs)(o.default,{style:x.category,children:[(0,C.jsxs)(o.default,{style:x.categoryHeader,children:[(0,C.jsx)(l.default,{style:x.categoryTitle,children:e.title}),f?(0,C.jsx)(l.default,{style:x.categoryMatchBadge,children:"Same"}):(0,C.jsx)(l.default,{style:x.categoryBadge,children:1===u?'1 difference':`${u} differences`})]}),f?(0,C.jsx)(b,{rows:e.rows,note:c}):(0,C.jsxs)(o.default,{style:x.optionPanels,children:[(0,C.jsx)(L,{sourceLabel:O,selected:'legacy'===t,rows:e.rows,valueFor:e=>e.legacyValue,onSelect:()=>{s('legacy')},accessibilityLabel:`Use ${e.title} values from your link`}),(0,C.jsx)(L,{sourceLabel:n,selected:'current'===t,rows:e.rows,valueFor:e=>e.currentValue,onSelect:()=>{s('current')},accessibilityLabel:`Keep ${n} for ${e.title}`})]})]})}const x=(0,c.createStyles)({actions:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.MD,justifyContent:'flex-end',marginTop:u.SPACING.SM},callout:{backgroundColor:s.COLORS.BG_SUBTLE_100,borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,gap:u.SPACING.XS,marginBottom:u.SPACING.XL,padding:u.SPACING.LG},calloutHeader:{alignItems:'center',flexDirection:'row',gap:u.SPACING.SM},calloutIconText:{color:s.COLORS.BLUE_400,fontSize:22,lineHeight:22},calloutText:{color:s.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.MD,lineHeight:22},calloutTitle:{color:s.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.XXL,fontWeight:'700'},cancelButton:{alignItems:'center',backgroundColor:s.COLORS.BG_SURFACE,borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:u.SPACING.XXL,paddingVertical:u.SPACING.LG},cancelButtonText:{color:s.COLORS.TEXT_BODY,fontSize:f.FONT_SIZE.LG,fontWeight:'600'},category:{marginBottom:u.SPACING.XL},categoryBadge:{color:s.COLORS.AMBER_700,fontSize:f.FONT_SIZE.XS,fontWeight:'600'},categoryHeader:{alignItems:'center',flexDirection:'row',gap:u.SPACING.SM,justifyContent:'space-between',marginBottom:u.SPACING.SM},categoryMatchBadge:{color:s.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.XS,fontWeight:'600'},categoryTitle:{color:s.COLORS.TEXT_PRIMARY,fontSize:f.FONT_SIZE.LG,fontWeight:'700'},continueButton:{alignItems:'center',backgroundColor:s.COLORS.ACTION_PRIMARY,borderRadius:8,marginTop:u.SPACING.SM,paddingHorizontal:u.SPACING.XXXL,paddingVertical:u.SPACING.LG},continueButtonInline:{marginTop:0},continueButtonText:{color:s.COLORS.TEXT_INVERSE,fontSize:f.FONT_SIZE.LG,fontWeight:'600'},fieldLabel:{color:s.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.SM,marginRight:u.SPACING.MD},fieldRow:{flexDirection:'row',justifyContent:'space-between',paddingVertical:u.SPACING.XS},fieldRowDivided:{borderTopColor:s.COLORS.BORDER_SLATE,borderTopWidth:1},fieldValue:{color:s.COLORS.TEXT_BODY,flex:1,fontSize:f.FONT_SIZE.SM,textAlign:'right'},fieldValueDiffers:{color:s.COLORS.TEXT_PRIMARY,fontWeight:'700'},matchNote:{color:s.COLORS.TEXT_MUTED,fontSize:f.FONT_SIZE.SM,fontStyle:'italic',marginBottom:u.SPACING.SM},matchPanel:{backgroundColor:s.COLORS.BG_FAINT,borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,padding:u.SPACING.MD},optionHeader:{alignItems:'center',flexDirection:'row',gap:u.SPACING.SM,marginBottom:u.SPACING.SM},optionLabel:{color:s.COLORS.TEXT_MUTED,flex:1,fontSize:f.FONT_SIZE.SM,fontWeight:'700'},optionLabelSelected:{color:s.COLORS.TEXT_PRIMARY},optionPanel:{backgroundColor:s.COLORS.BG_SURFACE,borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,flexBasis:240,flexGrow:1,flexShrink:1,padding:u.SPACING.MD},optionPanelSelected:{backgroundColor:s.COLORS.BLUE_50,borderColor:s.COLORS.BLUE_400,borderWidth:2,padding:u.SPACING.MD-1},optionPanels:{flexDirection:'row',flexWrap:'wrap',gap:u.SPACING.MD},optionRows:{gap:0},radioInner:{backgroundColor:s.COLORS.BLUE_400,borderRadius:5,height:10,width:10},radioOuter:{alignItems:'center',borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:10,borderWidth:2,height:20,justifyContent:'center',width:20},radioOuterSelected:{borderColor:s.COLORS.BLUE_400}})},1075,[34,276,222,488,95,489,490,493,494,605,820,104]);
1185__d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}
1185Object.defineProperty(_e,'__esModule',{value:!0}),_e.buildMapLinkSensor=function(t,e){if(null==t.sensorId)return null;const n=Number(e.lat),o=Number(e.lon),s=!0===e.setlocation&&''!==e.lat.trim()&&''!==e.lon.trim()&&Number.isFinite(n)&&Number.isFinite(o);return{sensorIndex:t.sensorId,readKey:t.readKey??null,hidden:'private'===e.visibility,locationType:'inside'===e.locationType?'inside':'outside',lat:s?n:null,lon:s?o:null}},_e.buildConfirmationEmailNote=function(t,e){const n=t.trim(),o=e.trim(),s=''!==o&&o.toLowerCase()!==n.toLowerCase()?`${n} and ${o}`:n,l="We've emailed a confirmation with full registration details, including a link to modify this registration";return''!==s?`${l}, to ${s}.`:`${l}.`},_e.SensorStatusSection=function({reporting:t}){if(!0===t)return(0,S.jsxs)(e.default,{style:[y.statusBox,y.statusOnline],testID:"registration-status-online",children:[(0,S.jsx)(n.default,{style:y.statusTitle,children:"Your sensor is online and sending data to PurpleAir."}),(0,S.jsx)(n.default,{style:y.statusBody,children:"You can see it on the PurpleAir Map now."})]});if(!1===t)return(0,S.jsxs)(e.default,{style:[y.statusBox,y.statusWaiting],testID:"registration-status-waiting",children:[(0,S.jsx)(n.default,{style:y.statusTitle,children:"Your sensor isn't sending data yet."}),(0,S.jsx)(n.default,{style:y.statusBody,children:"It still appears on the map as a grey marker. Connect it to Wi-Fi to start sending data. A few minutes after it connects, your sensor's map marker will change color to show its reading."}),(0,S.jsx)(p,{})]});return null},_e.PrivateSensorAccessNote=function({isPrivate:t}){if(!t)return null;return(0,S.jsxs)(e.default,{style:y.privateNote,testID:"registration-private-access-note",children:[(0,S.jsx)(n.default,{style:y.privateNoteTitle,children:"Your sensor is private"}),(0,S.jsxs)(n.default,{style:y.privateNoteBody,children:["It won't appear on the map for other people. The map link above carries this sensor's read key, so treat it as access: anyone you send it to can view the sensor. Your confirmation email contains the same link and the read key itself. Signing in with the owner's email is another way back to it.",' ',(0,S.jsx)(c.RegistrationHelpLink,{href:c.REGISTRATION_HELP_LINKS.viewingPrivateSensor,accessibilityLabel:"Read the community article about viewing a private sensor on the map",children:"Viewing a private sensor"})]})]})},r(d[0]);var e=t(r(d[1])),n=t(r(d[2]));r(d[3]);t(r(d[4]));var o=r(d[5]),s=(r(d[6]),r(d[7]),r(d[8])),l=r(d[9]),u=r(d[10]),c=r(d[11]),S=r(d[12]);const h='/install',f={alignSelf:'center',marginTop:l.SPACING.MD,textDecoration:'none'};function p(){return(0,S.jsx)("a",{href:h,style:f,children:(0,S.jsx)(n.default,{style:y.statusHelpLinkText,children:"See the setup guide"})})}const y=(0,o.createStyles)({statusBody:{color:s.COLORS.TEXT_SECONDARY,fontSize:u.FONT_SIZE.MD,lineHeight:20,textAlign:'center'},statusBox:{borderRadius:8,marginBottom:l.SPACING.XL,maxWidth:480,padding:l.SPACING.LG,width:'100%'},statusHelpLink:{alignSelf:'center',marginTop:l.SPACING.MD},statusHelpLinkText:{color:s.COLORS.BRAND_PRIMARY,fontSize:u.FONT_SIZE.MD,fontWeight:'600'},privateNote:{backgroundColor:s.COLORS.BG_SUBTLE,borderRadius:8,marginBottom:l.SPACING.XL,maxWidth:480,padding:l.SPACING.LG,width:'100%'},privateNoteBody:{color:s.COLORS.TEXT_SECONDARY,fontSize:u.FONT_SIZE.MD,lineHeight:20,marginBottom:l.SPACING.SM},privateNoteTitle:{color:s.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.MD,fontWeight:'700',marginBottom:l.SPACING.XS},statusOnline:{backgroundColor:s.COLORS.SUCCESS_BG,borderColor:s.COLORS.SUCCESS,borderWidth:1},statusTitle:{color:s.COLORS.TEXT_DARK,fontSize:u.FONT_SIZE.MD,fontWeight:'700',marginBottom:l.SPACING.XS,textAlign:'center'},statusWaiting:{backgroundColor:s.COLORS.BG_AMBER_TINT,borderColor:s.COLORS.AMBER_200,borderWidth:1}})},1076,[34,276,222,95,521,489,465,530,490,493,494,958,104]);
1186__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ReviewStep=function({form:e,onBack:n,onSubmit:u,isSubmitting:S,submissionResult:h}){const E=(0,C.useField)(e,'terms'),y=e.values;return(0,x.jsxs)(t.default,{style:L.container,children:[(0,x.jsx)(o.default,{style:L.title,children:"Review & Submit"}),(0,x.jsxs)(t.default,{style:L.sectionCard,children:[(0,x.jsx)(o.default,{style:L.sectionHeading,children:"Device"}),(0,x.jsx)(T,{label:"Device-Id",value:y.mac}),(0,x.jsx)(T,{label:"Associated Email",value:y.associated})]}),(0,x.jsxs)(t.default,{style:L.sectionCard,children:[(0,x.jsx)(o.default,{style:L.sectionHeading,children:"Location"}),(0,x.jsx)(T,{label:"Location Type",value:y.locationtype||'--'}),(0,x.jsx)(T,{label:"Sensor Name",value:y.sensorname}),(0,x.jsx)(T,{label:"Visibility",value:y.visibility||'--'}),y.setlocation&&(0,x.jsx)(T,{label:"Coordinates",value:`${y.lat}, ${y.lon}`})]}),(0,x.jsxs)(t.default,{style:L.sectionCard,children:[(0,x.jsx)(o.default,{style:L.sectionHeading,children:"LED"}),(0,x.jsx)(T,{label:"Mode",value:(0,O.ledModeLabel)(y.led_mode)}),(0,x.jsx)(T,{label:"Brightness",value:'0'===y.led_mode?'Not applied (LEDs off)':y.led_brightness||'35'}),(0,x.jsx)(T,{label:"Tap Brightness Control",value:'0'===y.led_mode?'Not applied (LEDs off)':y.led_tap_enabled?'Enabled':'Disabled'})]}),(0,x.jsxs)(t.default,{style:L.sectionCard,children:[(0,x.jsx)(o.default,{style:L.sectionHeading,children:"Data Providers"}),(0,x.jsx)(T,{label:"Provider 1",value:f[y.provider1]??y.provider1}),(0,x.jsx)(T,{label:"Provider 2",value:f[y.provider2]??y.provider2})]}),(0,x.jsxs)(t.default,{style:L.sectionCard,children:[(0,x.jsx)(o.default,{style:L.sectionHeading,children:"Owner"}),(0,x.jsx)(T,{label:"Name",value:y.name}),(0,x.jsx)(T,{label:"Email",value:y.email}),(0,x.jsx)(T,{label:"Phone",value:y.phone})]}),(0,x.jsxs)(t.default,{style:L.termsBox,children:[(0,x.jsx)(o.default,{style:L.termsText,children:"By registering this device you agree to the PurpleAir terms and conditions. Your sensor data may be displayed on the PurpleAir map if visibility is set to public."}),(0,x.jsx)(R.AppLink,{to:"TermsOfService",textStyle:L.termsLink,children:"View Terms and Conditions"})]}
1186),(0,x.jsx)(b.FormCheckbox,{label:"I agree to the terms and conditions",binding:E,required:!0}),h&&(0,x.jsx)(t.default,{style:[L.resultContainer,'success'===h.type&&L.resultSuccess,'warning'===h.type&&L.resultWarning,'error'===h.type&&L.resultError],children:(0,x.jsx)(o.default,{style:[L.resultText,'success'===h.type&&L.resultTextSuccess,'warning'===h.type&&L.resultTextWarning,'error'===h.type&&L.resultTextError],children:h.message})}),(0,x.jsxs)(t.default,{style:L.actionRow,children:[(0,x.jsx)(l.default,{style:L.backButton,onPress:n,activeOpacity:.8,children:(0,x.jsx)(o.default,{style:L.backButtonText,children:"Back"})}),(0,x.jsx)(l.default,{style:[L.submitButton,S&&L.submitButtonDisabled],onPress:u,disabled:S,activeOpacity:.8,children:S?(0,x.jsx)(s.default,{size:"small",color:c.COLORS.TEXT_INVERSE}):(0,x.jsx)(o.default,{style:L.submitButtonText,children:"Register Device"})})]})]})},r(d[0]);var t=e(r(d[1])),o=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),n=r(d[5]),c=r(d[6]),u=r(d[7]),S=r(d[8]),C=r(d[9]),O=r(d[10]),R=r(d[11]),b=r(d[12]),x=r(d[13]);const f={0:'None',2:'Weather Underground',3:'Microsoft Power-Bi',4:'Microsoft Azure',5:'Custom'};function T({label:e,value:l}){return(0,x.jsxs)(t.default,{style:L.row,children:[(0,x.jsx)(o.default,{style:L.rowLabel,children:e}),(0,x.jsx)(o.default,{style:L.rowValue,children:l||'--'})]})}const L=(0,n.createStyles)({actionRow:{flexDirection:'row',gap:u.SPACING.MD,marginTop:u.SPACING.SM},backButton:{alignItems:'center',backgroundColor:c.COLORS.BG_SUBTLE,borderColor:c.COLORS.BORDER_SUBTLE,borderRadius:10,borderWidth:1,justifyContent:'center',paddingHorizontal:u.SPACING.XXL,paddingVertical:u.SPACING.LG},backButtonText:{color:c.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.LG,fontWeight:'600'},container:{paddingVertical:u.SPACING.SM},resultContainer:{borderRadius:8,borderWidth:1,marginBottom:u.SPACING.LG,padding:u.SPACING.LG},resultError:{backgroundColor:c.COLORS.ERROR_BG,borderColor:c.COLORS.ERROR_BORDER},resultSuccess:{backgroundColor:c.COLORS.SUCCESS_BG,borderColor:c.COLORS.GREEN_200},resultText:{fontSize:S.FONT_SIZE.MD,lineHeight:20},resultTextError:{color:c.COLORS.ERROR},resultTextSuccess:{color:c.COLORS.SUCCESS},resultTextWarning:{color:c.COLORS.WARNING},resultWarning:{backgroundColor:c.COLORS.BG_AMBER_TINT,borderColor:c.COLORS.AMBER_200},row:{flexDirection:'row',justifyContent:'space-between',paddingVertical:u.SPACING.XS},rowLabel:{color:c.COLORS.TEXT_SOFT,flex:1,fontSize:S.FONT_SIZE.SM},rowValue:{color:c.COLORS.TEXT_DARK,flex:1,fontSize:S.FONT_SIZE.SM,fontWeight:'500',textAlign:'right'},sectionCard:{backgroundColor:c.COLORS.BG_SURFACE,borderColor:c.COLORS.BORDER,borderRadius:10,borderWidth:1,marginBottom:u.SPACING.MD,padding:u.SPACING.LG},sectionHeading:{color:c.COLORS.ACTION_PRIMARY,fontSize:S.FONT_SIZE.MD,fontWeight:'700',letterSpacing:.5,marginBottom:u.SPACING.SM,textTransform:'uppercase'},submitButton:{alignItems:'center',backgroundColor:c.COLORS.ACTION_PRIMARY,borderRadius:10,flex:1,justifyContent:'center',paddingVertical:u.SPACING.LG},submitButtonDisabled:{opacity:.6},submitButtonText:{color:c.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'700'},termsBox:{backgroundColor:c.COLORS.BG_SUBTLE,borderColor:c.COLORS.BORDER_NEUTRAL,borderRadius:8,borderWidth:1,marginBottom:u.SPACING.SM,padding:u.SPACING.LG},termsLink:{color:c.COLORS.BRAND_PRIMARY,fontSize:S.FONT_SIZE.SM,fontWeight:'600',marginTop:u.SPACING.SM,textDecorationLine:'underline'},termsText:{color:c.COLORS.TEXT_SECONDARY,fontSize:S.FONT_SIZE.SM,lineHeight:20},title:{color:c.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.XL,fontWeight:'700',marginBottom:u.SPACING.LG}})},1077,[34,276,222,488,410,489,490,493,494,1053,1064,516,1061,104]);
1187__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.StepProgressBar=function({currentStep:e,totalSteps:c,stepLabels:n}){return(0,s.jsx)(l.default,{style:u.container,children:Array.from({length:c},(c,O)=>{const C=O<e,R=O===e,S=O>e;return(0,s.jsxs)(t.default.Fragment,{children:[O>0&&(0,s.jsx)(l.default,{style:[u.line,C||R?u.lineActive:u.lineInactive]}),(0,s.jsxs)(l.default,{style:u.stepColumn,children:[(0,s.jsx)(l.default,{style:[u.circle,R&&u.circleActive,C&&u.circleCompleted,S&&u.circleFuture],children:(0,s.jsx)(o.default,{style:[u.circleText,(R||C)&&u.circleTextActive],children:O+1})}),(0,s.jsx)(o.default,{style:[u.label,R&&u.labelActive,C&&u.labelCompleted],numberOfLines:2,children:n[O]??''})]})]},O)})})};var t=e(r(d[0])),l=e(r(d[1])),o=e(r(d[2])),c=r(d[3]),n=r(d[4]),O=r(d[5]),C=r(d[6]),s=r(d[7]);const u=(0,c.createStyles)({circle:{alignItems:'center',borderRadius:14,borderWidth:2,height:28,justifyContent:'center',width:28},circleActive:{backgroundColor:n.COLORS.ACTION_PRIMARY,borderColor:n.COLORS.ACTION_PRIMARY,borderRadius:17,height:34,width:34},circleCompleted:{backgroundColor:n.COLORS.ACTION_PRIMARY,borderColor:n.COLORS.ACTION_PRIMARY},circleFuture:{backgroundColor:n.COLORS.BG_CHIP,borderColor:n.COLORS.BORDER_SOFT},circleText:{color:n.COLORS.TEXT_CAPTION,fontSize:C.FONT_SIZE.XS,fontWeight:'700'},circleTextActive:{color:n.COLORS.TEXT_INVERSE},container:{alignItems:'flex-start',flexDirection:'row',justifyContent:'center',paddingHorizontal:O.SPACING.SM,paddingVertical:O.SPACING.LG},label:{color:n.COLORS.TEXT_MEDIUM,fontSize:C.FONT_SIZE.MICRO,marginTop:O.SPACING.XS,textAlign:'center'},labelActive:{color:n.COLORS.ACTION_PRIMARY,fontWeight:'600'},labelCompleted:{color:n.COLORS.ACTION_PRIMARY},line:{flex:1,height:2,marginHorizontal:-4,marginTop:13},lineActive:{backgroundColor:n.COLORS.ACTION_PRIMARY},lineInactive:{backgroundColor:n.COLORS.BORDER_SOFT},stepColumn:{alignItems:'center',width:56}})},1078,[34,276,222,489,490,493,494,104]);
1188__d(function(g,r,i,a,m,e,d){"use strict";
1188Object.defineProperty(e,'__esModule',{value:!0}),e.SensorMapLink=function({sensor:t,style:n,textStyle:y,label:S="View on Map",testID:p}){return(0,c.jsx)(s.ServiceExternalLink,Object.assign({service:"mapBaseUrl",path:(0,l.buildExternalSensorMapPath)(t),accessibilityLabel:S,style:n??[o.sharedStyles.actionButton,u.primaryButton],textStyle:y??o.sharedStyles.actionButtonText},null!=p?{testID:p}:{},{children:S}))},r(d[0]);var t=r(d[1]),n=r(d[2]),s=r(d[3]),l=r(d[4]),o=r(d[5]),c=r(d[6]);const u=(0,t.createStyles)({primaryButton:{backgroundColor:n.COLORS.ACTION_PRIMARY}})},1079,[34,489,490,522,1080,1081,104]);
1189__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MAX_MULTI_SENSOR_MAP_COUNT",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"MAX_MULTI_SENSOR_MAP_PATH_LENGTH",{enumerable:!0,get:function(){return c}}),e.buildExternalSensorMapPath=function(o){const s=(0,n.toCoord)(o.lat??null,o.lon??null),u=null===s?'':`#${t}/${s.lat.toFixed(6)}/${s.lon.toFixed(6)}`;return`?${y(o)}${u}`},e.buildExternalMultiSensorMapPath=function(n,t="selected-only"){const u=new Map;for(const t of n){if(!Number.isSafeInteger(t.sensorIndex)||t.sensorIndex<=0)return{status:'invalid-sensor',sensorIndex:t.sensorIndex};const n=u.get(t.sensorIndex);if(null!=n){const o=!0===n.hidden!=(!0===t.hidden),s=!0===n.hidden&&n.readKey!==t.readKey;if(o||s)return{status:'invalid-sensor',sensorIndex:t.sensorIndex};continue}u.set(t.sensorIndex,t)}if(0===u.size)return{status:'empty'};if(u.size>l)return{status:'too-many-sensors'};const y=[...u.values()].sort((n,t)=>n.sensorIndex-t.sensorIndex),x=[];for(const n of y)if(!0===n.hidden){if('string'!=typeof n.readKey||!s.test(n.readKey))return{status:'invalid-private-read-key',sensorIndex:n.sensorIndex};x.push(n.readKey)}const I=[];f[t]&&h(I,'show',y.map(n=>String(n.sensorIndex)).join(o));x.length>0&&h(I,'key',[...new Set(x)].join(o));const $=new Set(y.map(n=>p(n.locationType)));['inside','outside'].forEach(n=>{$.has(n)&&h(I,n,'true')});const _=b(y);let M='';switch(_.kind){case'bounds':h(I,'location_bounds',_.locationBounds);break;case'center':M=_.fragment;break;case'none':break;default:return _}const S=`${0===I.length?'':`?${I.join('&')}`}${M}`;if(S.length>c)return{status:'path-too-long'};return{status:'ready',path:S,sensorCount:y.length}};var n=r(d[0]);const t=16,o='|',s=/^[A-Za-z0-9]{16}$/u,u={inside:'inside',outside:'outside',unregistered:'outside'},l=100,c=3500,f={'selected-only':!0,'selected-with-all':!1};function h(n,t,o){n.push(`${encodeURIComponent(t)}=${encodeURIComponent(o)}`)}function p(n){return u[n]}function y(n){const t=[];return h(t,!0===n.archived?'show':'select',String(n.sensorIndex)),!0===n.hidden&&null!=n.readKey&&''!==n.readKey&&h(t,'key',n.readKey),h(t,p(n.locationType),'true'),t.join('&')}function x(n){return n<0?n+360:n}function I(n){const t=n.map(x).sort((n,t)=>n-t);let o=-1,s=0;t.forEach((n,u)=>{const l=(u===t.length-1?(t[0]??n)+360:t[u+1]??n)-n;l>o&&(o=l,s=u)});const u=(s+1)%t.length,l=t[u]??0;let c=t[s]??l;c<l&&(c+=360);const f=l>180?l-360:l;return{west:f,east:f+(c-l)}}function b(o){const s=o.map(t=>(0,n.toCoord)(t.lat??null,t.lon??null)).filter(n=>null!==n),u=s[0];if(void 0===u)return{kind:'none'};if(s.every(n=>n.lat===u.lat&&n.lon===u.lon))return{kind:'center',fragment:`#${t}/${u.lat.toFixed(6)}/${u.lon.toFixed(6)}`};const l=s.map(n=>n.lat),c=I(s.map(n=>n.lon));return{kind:'bounds',locationBounds:[c.west,Math.max(...l),c.east,Math.min(...l)].map(n=>n.toFixed(6)).join(',')}}},1080,[1058]);
1190__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DetailSection=function({title:e,children:o,style:s}){const{isPhone:c}=(0,O.useResponsive)(),S=(0,t.useContext)(h);return(0,R.jsxs)(l.default,{style:[T.detailSection,c&&T.detailSectionPhone,S&&T.detailSectionInGrid,S&&c&&T.detailSectionInGridPhone,s],children:[(0,R.jsx)(n.default,{style:T.detailSectionTitle,selectable:!0,children:e}),o]})},_e.DetailGridProvider=function({children:e}){return(0,R.jsx)(h.Provider,{value:!0,children:e})},_e.InfoItem=function({label:e,value:t}){return(0,R.jsxs)(l.default,{style:T.infoItem,children:[(0,R.jsx)(n.default,{style:T.infoLabel,selectable:!0,children:e}),(0,R.jsx)(n.default,{style:T.infoValue,selectable:!0,children:t??'N/A'})]})},_e.DetailField=function({label:e,value:t}){return(0,R.jsxs)(l.default,{style:T.detailFieldRow,children:[(0,R.jsx)(n.default,{style:T.detailFieldLabel,selectable:!0,children:e}),(0,R.jsx)(n.default,{style:T.detailFieldValue,selectable:!0,children:t??'N/A'})]})},_e.DetailFieldList=function({children:e}){const n=t.Children.toArray(e);return(0,R.jsx)(l.default,{children:n.map((e,n)=>(0,R.jsx)(l.default,{style:n>0?T.detailFieldDivider:null,children:e},(0,t.isValidElement)(e)&&null!=e.key?e.key:`field-${String(n)}`))})},_e.ActionButton=function({label:e,onPress:t,variant:l="default",disabled:s=!1,style:S,accessibilityLabel:u}){const O='primary'===l?c.COLORS.ACTION_PRIMARY:'warning'===l?c.COLORS.WARNING:'danger'===l?c.COLORS.ERROR:'admin'===l?c.COLORS.ERROR_DARK:'neutralStrong'===l?c.COLORS.TEXT_SOFT:c.COLORS.TEXT_MUTED;return(0,R.jsx)(o.default,Object.assign({style:[T.actionButton,{backgroundColor:O},S,s&&T.actionButtonDisabled],onPress:t,disabled:s},void 0!==u?{accessibilityLabel:u}:{},{children:(0,R.jsx)(n.default,{style:T.actionButtonText,children:e})}))},_e.AuditEntryRow=function({entry:e}){const t=I(e.action),o=(0,f.auditChangeDetailExplanation)(e.changeDetailAvailability),s=(0,C.formatIsoDateTime)(e.createdAt);return(0,R.jsxs)(l.default,{style:T.auditEntry,children:[(0,R.jsxs)(l.default,{style:T.auditHeader,children:[(0,R.jsx)(l.default,{style:[T.auditBadge,{backgroundColor:t.color}],children:(0,R.jsx)(n.default,{style:T.auditBadgeText,selectable:!0,children:t.label})}),(0,R.jsxs)(n.default,{style:T.auditActor,selectable:!0,children:[e.actorIdentifier??e.actorClassification," (",e.actorClassification,")"]}),(0,R.jsx)(n.default,{style:T.auditDate,selectable:!0,children:s})]}),null!==o&&(0,R.jsx)(n.default,{style:T.auditChangeDetailLoss,selectable:!0,testID:"audit-change-detail-loss",children:o}),e.changes.length>0&&(0,R.jsx)(l.default,{style:T.auditChanges,children:e.changes.map(e=>(0,R.jsxs)(l.default,{style:T.auditChangeRow,children:[(0,R.jsx)(n.default,{style:T.auditFieldName,selectable:!0,children:e.field}),(0,R.jsx)(E,{value:e.oldValue,style:T.auditOldValue}),(0,R.jsx)(n.default,{style:T.auditArrow,selectable:!0,children:'->'}
1190),(0,R.jsx)(E,{value:e.newValue,style:T.auditNewValue})]},`${e.field}-${e.oldValue}-${e.newValue}`))})]})},Object.defineProperty(_e,"sharedStyles",{enumerable:!0,get:function(){return T}});var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3]));r(d[4]);var s=r(d[5]),c=r(d[6]),S=r(d[7]),u=r(d[8]),O=r(d[9]),f=r(d[10]),C=r(d[11]),R=r(d[12]);const h=(0,t.createContext)(!1);function E({value:e,style:t}){return null==e||''===e?(0,R.jsx)(n.default,{style:T.auditEmptyValue,selectable:!0,children:"(empty)"}):(0,R.jsx)(n.default,{style:t,selectable:!0,children:e})}function I(e){switch(e){case'REGISTER':return{label:'Registration',color:c.COLORS.SUCCESS};case'MODIFY':return{label:'Modification',color:c.COLORS.BLUE};case'MANAGEMENT':return{label:'Management',color:c.COLORS.INFO};case'ARCHIVE':return{label:'Archive',color:c.COLORS.WARNING};default:return e}}const T=(0,s.createStyles)({actionButton:Object.assign({borderRadius:6,paddingHorizontal:S.SPACING.MD,paddingVertical:S.SPACING.SM},{cursor:'pointer'}),actionButtonDisabled:{opacity:.5},actionButtonText:{color:c.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.XS,fontWeight:'600'},auditActor:{color:c.COLORS.TEXT_BODY,fontSize:u.FONT_SIZE.SM,fontWeight:'500'},auditArrow:{color:c.COLORS.TEXT_PLACEHOLDER,fontSize:u.FONT_SIZE.XS},auditBadge:{borderRadius:4,paddingHorizontal:S.SPACING.SM,paddingVertical:S.SPACING.MICRO},auditBadgeText:{color:c.COLORS.TEXT_INVERSE,fontSize:u.FONT_SIZE.XS,fontWeight:'700',textTransform:'uppercase'},auditChangeRow:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM,minWidth:0,paddingVertical:S.SPACING.MICRO},auditChangeDetailLoss:{backgroundColor:c.COLORS.WARNING_BG,borderLeftColor:c.COLORS.WARNING,borderLeftWidth:3,color:c.COLORS.TEXT_BODY,fontSize:u.FONT_SIZE.XS,marginTop:S.SPACING.XS,padding:S.SPACING.SM},auditChanges:{gap:S.SPACING.MICRO,marginTop:S.SPACING.XS},auditDate:{color:c.COLORS.TEXT_PLACEHOLDER,fontSize:u.FONT_SIZE.XS},auditEmptyValue:{color:c.COLORS.TEXT_PLACEHOLDER,fontFamily:u.FONT_FAMILY.WEB_MONOSPACE,fontSize:u.FONT_SIZE.XS,fontStyle:'italic'},auditEntry:{backgroundColor:c.COLORS.BG_WASH,borderColor:c.COLORS.BORDER,borderRadius:8,borderWidth:1,padding:S.SPACING.MD},auditFieldName:{color:c.COLORS.TEXT_MEDIUM,flexShrink:0,fontSize:u.FONT_SIZE.XS,fontWeight:'600'},auditHeader:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.SM,marginBottom:S.SPACING.SM},auditNewValue:{color:c.COLORS.SUCCESS,fontFamily:u.FONT_FAMILY.WEB_MONOSPACE,fontSize:u.FONT_SIZE.XS},auditOldValue:{color:c.COLORS.ERROR,fontFamily:u.FONT_FAMILY.WEB_MONOSPACE,fontSize:u.FONT_SIZE.XS},cardRow:{flexDirection:'row',flexWrap:'wrap',gap:S.SPACING.LG,marginBottom:S.SPACING.MD,minWidth:0},detailSection:{borderBottomColor:c.COLORS.BG_SUBTLE_100,borderBottomWidth:1,padding:S.SPACING.XL},detailSectionInGrid:{backgroundColor:c.COLORS.BG_WASH,borderBottomColor:c.COLORS.BORDER,borderColor:c.COLORS.BORDER,borderRadius:10,borderWidth:1,flexBasis:0,flexGrow:1,maxWidth:460,minWidth:260},detailSectionInGridPhone:{flexBasis:'100%',maxWidth:'100%',minWidth:0},detailSectionPhone:{padding:S.SPACING.LG},detailSectionTitle:{color:c.COLORS.TEXT_BODY,fontSize:u.FONT_SIZE.MD,fontWeight:'700',letterSpacing:.5,marginBottom:S.SPACING.MD,textTransform:'uppercase'},detailFieldDivider:{borderTopColor:c.COLORS.BORDER_FAINT,borderTopWidth:1},detailFieldLabel:{color:c.COLORS.TEXT_MUTED,flexShrink:0,fontSize:u.FONT_SIZE.SM},detailFieldRow:{alignItems:'center',flexDirection:'row',gap:S.SPACING.LG,justifyContent:'space-between',minHeight:36,paddingVertical:S.SPACING.XS},detailFieldValue:{color:c.COLORS.TEXT_HEADING,flexGrow:1,flexShrink:1,fontSize:u.FONT_SIZE.MD,fontWeight:'600',minWidth:0,textAlign:'right'},infoItem:{flexBasis:120,flexGrow:1,flexShrink:1,minWidth:0},infoLabel:{color:c.COLORS.TEXT_MUTED,fontSize:u.FONT_SIZE.XS,letterSpacing:.5,marginBottom:S.SPACING.MICRO,textTransform:'uppercase'},infoValue:{color:c.COLORS.TEXT_HEADING,fontSize:u.FONT_SIZE.MD,fontWeight:'500'},section:{paddingVertical:S.SPACING.XXXL}})},1081,[34,276,222,488,95,489,490,493,494,553,849,685,104]);
1191__d(function(g,r,i,a,m,e,d){"use strict";
1191Object.defineProperty(e,'__esModule',{value:!0}),e.useRegisterScreenOrchestration=function(){const p=(0,s.useRegistrationDevScenarios)(),T=p.scenario,{applySubmitResultOverride:E}=p,D=(0,u.useRegisterParams)(),O=(0,t.useMemo)(()=>T?.routeParams??D??{},[T?.routeParams,D]),P=(0,t.useMemo)(()=>(0,n.parseLegacyRegistrationUrlPrefill)(O),[O]),L=O.token??O.reg??P.token??'',N=O.mac??(''===L?P.values.mac??'':''),I=''===L&&P.hasLegacyPrefill,F=(0,v.useRegistrationWizard)(N),[M,_]=(0,t.useState)(null),[j,U]=(0,t.useState)(!1),[B,G]=(0,t.useState)(null),[z,x]=(0,t.useState)(!1),[J,K]=(0,t.useState)(null),[W,H]=(0,t.useState)(!1),[q,Q]=(0,t.useState)(!1),[X,Y]=(0,t.useState)(!1),[Z,$]=(0,t.useState)(!1),[ee,re]=(0,t.useState)(!1),[te,se]=(0,t.useState)(null),[ae,ne]=(0,t.useState)(null),oe=null!==ae,[le,ue]=(0,t.useState)(!1),[ie,ce]=(0,t.useState)(!1),[me,fe]=(0,t.useState)(null),ge=(0,t.useRef)(null),de=(0,t.useRef)(null),pe=(0,t.useRef)(null),Se=(0,t.useRef)(0),ye=(0,t.useRef)({mac:'',associated:''}),ve=(0,t.useRef)(!1),ke=(0,t.useRef)(0),Re=(0,t.useRef)(null),be=(0,t.useRef)(null),Ce=(0,t.useRef)(null),he=(0,t.useRef)(null),Ve=(0,t.useRef)(!1),we=(0,t.useRef)({association:null,configLookup:null}),Ae=(0,t.useRef)(!0);(0,t.useEffect)(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]),(0,t.useEffect)(()=>{const t=T?.id??null,s=he.current;s!==t&&(he.current=t,Ce.current=null,be.current=null,_(null),fe(null),re(!1),se(null),ne(null),null===s&&null===t||(F.form.reset((0,y.getRegistrationFormInitialValues)()),F.setAssociationValidated(!1),F.goToStep(0)))},[T?.id,F]),(0,t.useEffect)(()=>{if(!I)return;const t=JSON.stringify(P.values);Ce.current!==t&&(Ce.current=t,Object.keys(P.values).length>0&&F.form.setValues(P.values))},[P,I,F.form]),(0,t.useEffect)(()=>{ue(!1)},[P]);const Te=(0,t.useCallback)((t,s,n)=>{const o=ye.current;return Ae.current&&t===Se.current&&o.mac===s&&o.associated===n},[]),Ee=async t=>{x(!0),K(null);try{const s=await(0,l.resumeByToken)(t);if(!Ae.current)return;if('SUCCESS'===s.status&&s.sensorConfig){const t=s.sensorConfig,n=F.form.values.mac,o=''!==N?N:t.sensorMac||n,l=t.associatedEmail??'',u=t.ownerEmail??'';we.current=(0,S.createTokenPrefillSuppression)(o,l,u),F.form.setValues(Object.assign({mac:o,associated:l},(0,S.applyConfigToFormData)(t),{name:t.ownerName??'',email:u,phone:t.ownerPhone??''})),F.setAssociationValidated(!0),F.setIsTokenResume(!0),F.goToStep(1)}else K({message:s.message,retryable:'ASSOCIATION_CHECK_UNAVAILABLE'===s.status})}catch(t){if(f.logger.warn('Token resume failed',t),!Ae.current)return;K({message:(0,c.errorMessage)(t,'Failed to load registration data. Please try again or start a new registration.'),retryable:!0})}finally{Ae.current&&x(!1)}};(0,t.useEffect)(()=>{H(!1),''!==L&&Re.current!==L&&(Re.current=L,Ee(L))},[L]),(0,t.useEffect)(()=>{!F.hasSavedDraft||I||''!==L&&!W?F.hasSavedDraft||Q(!1):Q(!0)},[I,W,L,F.hasSavedDraft]),(0,t.useEffect)(()=>{ke.current+=1,Y(!1),de.current=null,re(!1),se(null),ne(null)},[F.form.values.associated,F.form.values.email,F.form.values.mac]);const De=(0,t.useCallback)(async(t,s)=>null==T?(0,l.checkAssociation)(t,s):T.associationResult??{registrationGrant:null,status:'unknown',message:l.ASSOCIATION_UNAVAILABLE_FALLBACK_MESSAGE},[T]),Oe=(0,t.useCallback)(async(t,s,n,o)=>null==T?(0,l.lookupSensor)(t,s,n,o):T.lookupResult,[T]),Pe=(0,t.useCallback)(async(t,s,n={})=>{if(!t||!s)return;const o=!0===n.returnToDeviceStepOnFailure,l=++Se.current;_({type:'checking',message:'Checking association...'});try{const n=await De(t,s);if(!Te(l,t,s))return;'associated'===n.status?(_({type:'success',message:'Device-Id and Associated Email are related.'}),fe(n.registrationGrant),F.setAssociationValidated(!0)):'not_associated'===n.status?(_({type:'error',message:'No association found. The Associated Email or Device-Id (MAC) was wrong.',retryable:!1}),fe(null),F.setAssociationValidated(!1),o&&F.goToStep(0)):(_({type:'error',message:n.message,retryable:!0}),fe(null),F.setAssociationValidated(!1),o&&F.goToStep(0))}catch(n){if(f.logger.warn('Association check failed',n),!Te(l,t,s))return;_({type:'error',message:'Network error while checking association. Please try again.',retryable:!0}),fe(null),F.setAssociationValidated(!1),o&&F.goToStep(0)}},[Te,De,F]),Le=(0,t.useCallback)(()=>{const{mac:t,associated:s}=F.form.values;void 0===F.form.errors.mac&&void 0===F.form.errors.associated&&''!==t&&''!==s&&Pe(t,s)},[Pe,F.form.errors.associated,F.form.errors.mac,F.form.values]),Ne=(0,t.useCallback)(t=>{F.form.reset((0,y.getRegistrationFormInitialValues)(t)),re(!0)},[F.form]),Ie=(0,t.useCallback)(t=>{F.form.reset((0,y.getRegistrationFormInitialValues)(t)),re(!1)},[F.form]),Fe=(0,t.useCallback)(t=>{if(!t.eligible)return re(!1),!1;if(h(t)){const s=A(t,F.form.values);if(oe)return re(!0),!0;if(I&&w(P.sourceValues)){const t=(0,o.compareRegistrationSources)(s,P.sourceValues);if(t.hasDifferences)return se({comparison:t,currentValues:s,legacyValues:P.sourceValues,variant:'initial'}),re(!0),!1}return Ne(s),!0}if(re(!1),!oe&&I&&w(P.sourceValues))return Ie(P.sourceValues),!0;const s=V(t);return Object.keys(s).length>0&&F.form.setValues(s),!0}
1191,[Ne,Ie,P.sourceValues,oe,I,F.form]),Me=(0,t.useCallback)((t,s,n,o)=>{const l=C(s,n,o);if(be.current===l)return re(h(t)),!0;const u=Fe(t);return u&&(be.current=l),u},[Fe]),_e=(0,t.useCallback)(t=>{null!=t&&''!==t&&fe(t)},[]);(0,t.useEffect)(()=>{if(!ie)return;const{mac:t,associated:s}=F.form.values,n=void 0===F.form.errors.mac,o=void 0===F.form.errors.associated;ce(!1),n&&o&&t&&s?(Ve.current=!0,Pe(t,s,{returnToDeviceStepOnFailure:!0})):(fe(null),F.setAssociationValidated(!1),F.goToStep(0))},[Pe,ie,F,F.form.errors.associated,F.form.errors.mac,F.form.values]),(0,t.useEffect)(()=>{null!==pe.current&&clearTimeout(pe.current);const{mac:t,associated:s}=F.form.values;if(Ve.current)return Ve.current=!1,ye.current={mac:t,associated:s},void(ve.current=!0);if((0,S.shouldSuppressTokenPrefillAssociation)(we,t,s))return ye.current={mac:t,associated:s},void(ve.current=!0);const n=ye.current,o=ve.current&&(n.mac!==t||n.associated!==s);ye.current={mac:t,associated:s},ve.current=!0,o&&(Se.current+=1,ke.current+=1,_(null),fe(null),F.setAssociationValidated(!1));const l=void 0===F.form.errors.mac,u=void 0===F.form.errors.associated;return l&&u?pe.current=setTimeout(()=>{Pe(t,s)},k):(_(null),fe(null),F.setAssociationValidated(!1)),()=>{null!==pe.current&&clearTimeout(pe.current)}},[F.form.values.mac,F.form.values.associated,F.form.errors.mac,F.form.errors.associated]),(0,t.useEffect)(()=>{null!==ge.current&&clearTimeout(ge.current);const t=F.form.values,{mac:s,email:n}=t,o=t.associated,l=F.currentStep;if((0,S.shouldSuppressTokenPrefillConfigLookup)(we,s,o,n))return;if(1!==l||F.isTokenResume||!s||void 0!==F.form.errors.email||n===de.current)return;const u=++ke.current;return ge.current=setTimeout(()=>{(async()=>{$(!0);try{const t=await Oe(s,o,n,me).catch(t=>(f.logger.debug('Registration lookup failed (best-effort)',t),null));if(!Ae.current||u!==ke.current)return;de.current=n,null!=t&&(_e(t.registrationGrant),Me(t,s,o,n))}finally{Ae.current&&u===ke.current&&$(!1)}})()},R),()=>{null!==ge.current&&clearTimeout(ge.current)}},[Me,Oe,_e,F.form.values,F.form.values.associated,F.form.values.email,F.form.values.mac,F.form.errors.email,F.currentStep,F.isTokenResume,me]);const je=(0,t.useCallback)(async()=>{if(G(null),F.validateCurrentStep()){U(!0);try{const t=await(0,l.submitRegistration)((0,y.toRegistrationFormData)(F.form.values),F.isTokenResume?L:void 0);G(t),'success'!==t.type&&'warning'!==t.type||F.clearDraft()}catch(t){f.logger.error('Registration submission failed',t),G({type:'error',message:'Network error while submitting registration. Please try again.'})}finally{U(!1)}}},[F,L]),Ue=(0,t.useMemo)(()=>null==B?null:E(B),[B,E]),Be=(0,t.useCallback)(async()=>{if(F.validateCurrentStep()){if(1===F.currentStep&&!F.isTokenResume){const t=F.form.values.mac,s=F.form.values.associated,n=F.form.values.email,o=++ke.current;Y(!0);try{const l=await Oe(t,s,n,me);if(!Ae.current||o!==ke.current)return;if(null==l)return void F.setApiError('email','Registration lookup is unavailable. Please try again.');if(_e(l.registrationGrant),!l.eligible)return void F.setApiError('email',l.message);if(F.setApiError('email',null),!Me(l,t,s,n))return}catch(t){if(!Ae.current||o!==ke.current)return;return f.logger.warn('Registration lookup failed',t),void F.setApiError('email',(0,c.errorMessage)(t,'Network error while verifying owner eligibility. Please try again.'))}finally{Ae.current&&o===ke.current&&Y(!1)}}F.nextStep()}},[Me,Oe,_e,F,me]),Ge=(0,t.useCallback)(()=>{Q(!1),fe(null),_(null),ce(!0),F.resumeDraft(),F.setAssociationValidated(!1)},[F]),ze=(0,t.useCallback)(()=>{Q(!1),F.clearDraft()},[F]),xe=(0,t.useCallback)(()=>{K(null),H(!0),Q(F.hasSavedDraft)},[F.hasSavedDraft]),Je=(0,t.useCallback)(()=>{''!==L&&Ee(L)},[L]),Ke=(0,t.useCallback)(()=>{G(null),re(!1),se(null),ne(null),be.current=null,F.clearDraft()},[F]),We=(0,t.useCallback)(t=>{const s=te;if(null==s)return;const n=ae?.selections??{},l=n=>{ne({comparison:s.comparison,currentValues:s.currentValues,legacyValues:s.legacyValues,selections:t}),se(null),Ne(n)};if('reopen'===s.variant){return s.comparison.sections.some(s=>('legacy'===n[s.title]?'legacy':'current')!==('legacy'===t[s.title]?'legacy':'current'))?void l((0,o.applyRegistrationSourceSelectionChanges)(F.form.values,s.currentValues,s.legacyValues,s.comparison,n,t)):void se(null)}l((0,o.mergeRegistrationSources)(s.comparison,s.currentValues,s.legacyValues,t))},[Ne,te,ae,F.form.values]),He=(0,t.useCallback)(()=>{const t=ae;null!=t&&se({comparison:t.comparison,currentValues:t.currentValues,legacyValues:t.legacyValues,variant:'reopen',initialSelections:t.selections})},[ae]),qe=(0,t.useCallback)(()=>{se(null)},[]),Qe=(0,t.useCallback)(()=>{ue(!0)},[]),Xe=I&&!le?P.issues:b,Ye=null!==ae,Ze=F.isTokenResume||ee&&!oe;return{wizard:F,tokenLoading:z,draftLoading:F.draftLoading,tokenResumeFailure:J,showDraftPrompt:q,associationStatus:M,isSubmitting:j,submissionResult:Ue,ownerCheckLoading:X,configLoading:Z,currentRegistrationAvailable:ee,isModifyingCurrentRegistration:Ze,registrationSourceConflictPrompt:te,canReopenRegistrationSourceConflict:Ye,legacyRegistrationUrlIssues:Xe,onResumeDraft:Ge,onStartFresh:ze,onDismissTokenError:xe,onRetryToken
1191Resume:Je,onResetAfterSuccess:Ke,onSubmit:je,onNextStep:Be,onRetryAssociation:Le,onContinueWithSelectedRegistrationSources:We,onReopenRegistrationSourceConflict:He,onDismissRegistrationSourceConflict:qe,onDismissLegacyRegistrationUrlIssues:Qe}};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3]),l=r(d[4]),u=r(d[5]),c=r(d[6]),f=r(d[7]),p=r(d[8]),S=r(d[9]),y=r(d[10]),v=r(d[11]);const k=500,R=600,b=[];function C(t,s,n){return JSON.stringify([(0,p.normalizeMac)(t),s.trim().toLowerCase(),n.trim().toLowerCase()])}function h(t){return null!==t.label||null!==t.locationType||null!==t.visibility||null!==t.lat||null!==t.lon||null!==t.ledMode||null!==t.ledBrightness||null!==t.provider1||null!==t.provider2}function V(t){return t.hasOwner?Object.assign({},null!==t.ownerName?{name:t.ownerName}:{},null!==t.ownerPhone?{phone:t.ownerPhone}:{}):{}}function w(t){return Object.keys(t).some(t=>'mac'!==t&&'associated'!==t&&'email'!==t)}function A(t,s){return Object.assign({associated:s.associated,email:s.email,mac:s.mac},(0,S.applyConfigToFormData)(t),{name:t.hasOwner?t.ownerName??'':s.name,phone:t.hasOwner?t.ownerPhone??'':s.phone})}},1082,[34,1083,1085,1087,1088,505,468,469,1059,1090,1086,1091]);
1192__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useRegistrationDevScenarios=function(){return o()};var n=r(d[0]);const t={scenario:null,applySubmitResultOverride:function(n){return n}};const o=(0,n.loadRegistrationDevScenarios)()??function(){return t}},1083,[1084]);
1193__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.loadRegistrationDevScenarios=function(){return null}},1084,[614]);
1194__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.parseLegacyRegistrationUrlPrefill=function(s){const l={},v={},P=[],T=s.mac;if(u(T)){const o=(0,n.normalizeMac)(T);l.mac=o,v.mac=o}u(s.associated)&&(l.associated=s.associated,v.associated=s.associated);u(s.email)&&(l.email=s.email,v.email=s.email);u(s.sensorname)&&(v.sensorname=s.sensorname);u(s.lat)&&(v.lat=s.lat);u(s.lon)&&(v.lon=s.lon);
1194u(s.key3_1)&&(v.key3_1=s.key3_1);u(s.key4_1)&&(v.key4_1=s.key4_1);u(s.key3_2)&&(v.key3_2=s.key3_2);u(s.key4_2)&&(v.key4_2=s.key4_2);u(s.name)&&(v.name=s.name);u(s.phone)&&(v.phone=s.phone);u(s.locationtype)&&(_(s.locationtype,o.LOCATION_TYPES)?v.locationtype=s.locationtype:h(P,'locationtype','Location Type',s.locationtype));u(s.visibility)&&(_(s.visibility,o.VISIBILITIES)?v.visibility=s.visibility:h(P,'visibility','Visibility',s.visibility));u(s.provider1)&&(_(s.provider1,o.PROVIDER1_VALUES)?v.provider1=s.provider1:h(P,'provider1','Data Processor #1',s.provider1));u(s.provider2)&&(_(s.provider2,o.PROVIDER2_VALUES)?v.provider2=s.provider2:h(P,'provider2','Data Processor #2',s.provider2));u(s.method1)&&(_(s.method1,o.HTTP_METHODS)?v.method1=s.method1:h(P,'method1','Data Processor #1 HTTP Method',s.method1));u(s.method2)&&(_(s.method2,o.HTTP_METHODS)?v.method2=s.method2:h(P,'method2','Data Processor #2 HTTP Method',s.method2));const L=s.led_mode;if(u(L)){const o=(0,t.parseLedMode)(L);null==o?h(P,'led_mode','LED Mode',L):(v.led_mode=o.baseMode,v.led_tap_enabled=o.tapEnabled)}const S=s.led_brightness;if(u(S)){const o=y(S);null==o?h(P,'led_brightness','LED Brightness',S):v.led_brightness=o}const E=s.setlocation;if(u(E)){const o=f(E);null==o?h(P,'setlocation','Set Sensor Location Manually',E):v.setlocation=o}(u(s.lat)||u(s.lon))&&(v.setlocation=!0);return{hasLegacyPrefill:k(l),hasLegacySourceValues:b(s),ignoredParams:p(s),issues:P,sourceValues:v,token:c(s),values:l}};var o=r(d[0]),t=r(d[1]),n=r(d[2]);const s=new Set(['interval','terms','create_wu_1','create_wu_2']),l=new Set(['register','swver','elev']);function c(o){return null!=o.token&&''!==o.token?o.token:null!=o.reg&&''!==o.reg?o.reg:null}function u(o){return null!=o&&''!==o}function _(o,t){return t.some(t=>t===o)}function f(o){const t=o.trim().toLowerCase();return'on'===t||'true'===t||'1'===t||'off'!==t&&'false'!==t&&'0'!==t&&null}function y(o){if(!/^\d+$/.test(o))return null;const t=Number(o);return!Number.isInteger(t)||t<0||t>100?null:o}function h(o,t,n,s){o.push({field:t,label:n,value:s,message:`${n} has an unsupported value. Valid information from the link is still available after choosing old-link values.`})}function p(o){const t=[];for(const n of Object.keys(o))s.has(n)&&!t.includes(n)&&t.push(n);return t}function v(o){return'token'===o||'reg'===o}function b(o){for(const[t,n]of Object.entries(o))if(u(n)&&!v(t)&&!s.has(t)&&!l.has(t))return!0;return!1}function k(o){return u(o.mac)||u(o.associated)||u(o.email)}},1085,[1086,1064,1059]);
1195__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"LOCATION_TYPES",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"VISIBILITIES",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"LED_MODES",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"PROVIDER1_VALUES",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"PROVIDER2_VALUES",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"HTTP_METHODS",{enumerable:!0,get:function(){return b}}),Object.defineProperty(e,"REGISTRATION_SCHEMA",{enumerable:!0,get:function(){return E}}),Object.defineProperty(e,"STEP_FIELDS",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"REGISTRATION_CROSS_FIELD_RULES",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"SCHEMA_SUPERSET_CHECK",{enumerable:!0,get:function(){return y}}),Object.defineProperty(e,"SCHEMA_SUBSET_CHECK",{enumerable:!0,get:function(){return T}}),e.getRegistrationFormInitialValues=function(t={}){const n={};for(const t of Object.keys(E)){const o=E[t];void 0!==o&&(n[t]=o.initial)}return Object.assign({},n,t)},e.toRegistrationFormData=function(t){return Object.assign({},t)};var t=r(d[0]),n=r(d[1]);const o=['inside','outside'],s=['public','private'],l=n.LED_BASE_MODES,u=['0','2','3','4','5'],c=['0','3','4','5'],b=['GET','POST','PUT'];function _(t){return n=>t(n)}const O=_(t=>!0===t.setlocation),p=_(t=>(0,n.isLedBrightnessActive)(t.led_mode)),E={mac:(0,t.macField)({requiredMessage:'Device-Id (MAC) is required'}),associated:(0,t.emailField)({requiredMessage:'Associated Email is required',message:'Enter a valid email address'}),locationtype:(0,t.choiceField)(o,{requiredMessage:'Select inside or outside'}),sensorname:(0,t.requiredText)({requiredMessage:'Sensor Name is required'}),visibility:(0,t.choiceField)(s,{requiredMessage:'Select public or private'}),setlocation:(0,t.booleanField)(!0),lat:Object.assign({},(0,t.latitudeField)({requiredMessage:'Latitude is required',message:'Latitude must be between -90 and 90'}),{isActive:O}),lon:Object.assign({},(0,t.longitudeField)({requiredMessage:'Longitude is required',message:'Longitude must be between -180 and 180'}),{isActive:O}),led_mode:(0,t.choiceField)(l,{initial:'5'}),led_tap_enabled:Object.assign({},(0,t.booleanField)(!0),{isActive:p}),led_brightness:Object.assign({},(0,t.optionalIntegerField)({initial:'35',min:0,max:100,message:'LED brightness must be a whole number between 0 and 100.'}),{isActive:p}),provider1:(0,t.choiceField)(u,{initial:'0'}),create_wu_1:(0,t.booleanField)(!0),key3_1:(0,t.optionalText)(),key4_1:(0,t.optionalText)(),method1:(0,t.choiceField)(b,{initial:'POST'}),provider2:(0,t.choiceField)(c,{initial:'0'}),create_wu_2:(0,t.booleanField)(!0),key3_2:(0,t.optionalText)(),key4_2:(0,t.optionalText)(),method2:(0,t.choiceField)(b,{initial:'POST'}),name:(0,t.requiredText)({requiredMessage:"Owner's Name is required"}),email:(0,t.emailField)({requiredMessage:"Owner's Email is required",message:'Enter a valid email address'}),phone:(0,t.optionalText)(),terms:(0,t.booleanField)(!1)},f=[['mac','associated'],['name','email','phone'],['locationtype','sensorname','visibility','setlocation','lat','lon'],['led_mode','led_tap_enabled','led_brightness'],['provider1','create_wu_1','key3_1','key4_1','method1','provider2','create_wu_2','key3_2','key4_2','method2'],['terms']],S=[t=>t.terms?[]:[{field:'terms',error:'You must agree to the terms'}]],y=!0,T=!0},1086,[1053,1064]);
1196__d(function(g,r,i,a,m,e,d){"use strict";
1196Object.defineProperty(e,'__esModule',{value:!0}),e.compareRegistrationSources=function(l,t){const o=u(l),b=u(t);let y=!1;const p=n.map(n=>({rows:n.fields.filter(({field:n})=>Object.prototype.hasOwnProperty.call(l,n)||Object.prototype.hasOwnProperty.call(t,n)||c(o[n])!==c(s[n])).map(({field:l,label:t,formatValue:n})=>{const s=f(o[l],n),c=f(b[l],n),u=s!==c;return u&&(y=!0),{currentValue:s,differs:u,field:l,label:t,legacyValue:c}}).filter(l=>!('--'===l.currentValue&&'--'===l.legacyValue)),title:n.title})).filter(l=>l.rows.length>0);return{hasDifferences:y,sections:p}},e.mergeRegistrationSources=function(l,t,o,n){const s=Object.assign({},t);for(const t of l.sections)if('legacy'===n[t.title])for(const l of t.rows)b(s,o,l.field);return s},e.applyRegistrationSourceSelectionChanges=function(l,t,o,n,s,f){const c=Object.assign({},l);for(const l of n.sections){const n='legacy'===s[l.title]?'legacy':'current',u='legacy'===f[l.title]?'legacy':'current';if(n===u)continue;const y='legacy'===u?o:t;for(const t of l.rows)b(c,y,t.field)}return c};var l=r(d[0]),t=r(d[1]),o=r(d[2]);const n=[{title:'Owner',fields:[{field:'name',label:'Owner Name'},{field:'phone',label:'Owner Phone'}]},{title:'Location',fields:[{field:'sensorname',label:'Sensor Name'},{field:'locationtype',label:'Location Type'},{field:'visibility',label:'Visibility'},{field:'setlocation',label:'Location Set On Map'},{field:'lat',label:'Latitude'},{field:'lon',label:'Longitude'}]},{title:'LED',fields:[{field:'led_mode',label:'LED Mode',formatValue:t.ledModeLabel},{field:'led_tap_enabled',label:'Tap To Change Brightness'},{field:'led_brightness',label:'LED Brightness'}]},{title:'Data Provider 1',fields:[{field:'provider1',label:'Provider',formatValue:l=>(0,o.providerLabel)(o.PROVIDER1_OPTIONS,l)},{field:'key3_1',label:'Key/Header 1'},{field:'key4_1',label:'Key/Header 2'},{field:'method1',label:'HTTP Method'}]},{title:'Data Provider 2',fields:[{field:'provider2',label:'Provider',formatValue:l=>(0,o.providerLabel)(o.PROVIDER2_OPTIONS,l)},{field:'key3_2',label:'Key/Header 1'},{field:'key4_2',label:'Key/Header 2'},{field:'method2',label:'HTTP Method'}]}],s=(0,l.getRegistrationFormInitialValues)();function f(l,t){if('boolean'==typeof l)return l?'Yes':'No';if(''===l)return'--';const o=String(l);return t?t(o):o}function c(l){return String(l)}function u(t){return(0,l.getRegistrationFormInitialValues)(t)}function b(l,t,o){Object.prototype.hasOwnProperty.call(t,o)?l[o]=t[o]:delete l[o]}},1087,[1086,1064,1060]);
1197__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ASSOCIATION_UNAVAILABLE_FALLBACK_MESSAGE",{enumerable:!0,get:function(){return t.ASSOCIATION_UNAVAILABLE_FALLBACK_MESSAGE}}),Object.defineProperty(e,"checkAssociation",{enumerable:!0,get:function(){return t.checkAssociation}}),Object.defineProperty(e,"clearSavedDraft",{enumerable:!0,get:function(){return t.clearSavedDraft}}),Object.defineProperty(e,"isRegistrationDraftTooLargeError",{enumerable:!0,get:function(){return t.isRegistrationDraftTooLargeError}}),Object.defineProperty(e,"loadSavedDraft",{enumerable:!0,get:function(){return t.loadSavedDraft}}
1197),Object.defineProperty(e,"lookupSensor",{enumerable:!0,get:function(){return t.lookupSensor}}),Object.defineProperty(e,"resumeByToken",{enumerable:!0,get:function(){return t.resumeByToken}}),Object.defineProperty(e,"saveRegistrationDraft",{enumerable:!0,get:function(){return t.saveRegistrationDraft}}),Object.defineProperty(e,"submitRegistration",{enumerable:!0,get:function(){return t.submitRegistration}});var t=r(d[0])},1088,[1089]);
1198__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ASSOCIATION_UNAVAILABLE_FALLBACK_MESSAGE",{enumerable:!0,get:function(){return D}}),e.isRegistrationDraftTooLargeError=function(t){const n=(0,s.readAxiosLikeResponse)(t);if(413!==n?.status)return!1;const l=(0,o.parseApiErrorBody)(n.data);return l?.error===c},e.loadSavedDraft=async function(){const n=await t.registration.loadDraft();if(null==n.draft)return null;return p(n.draft)},e.saveRegistrationDraft=async function(n){await t.registration.saveDraft({body:n})},e.clearSavedDraft=async function(n){await t.registration.clearDraft(null==n?void 0:{headers:{'X-Registration-Draft-Discarded-At':n.toString()}})},e.checkAssociation=async function(n,o){if(!n||!o)return{status:'unknown',registrationGrant:null,message:D};const s=await t.registration.validateAssociation({body:{mac:(0,u.normalizeMac)(n),email:o}}),{status:l,registrationGrant:c}=s;if('ASSOCIATED'===l)return null==c||''===c?{status:'unknown',registrationGrant:null,message:D}:{status:'associated',registrationGrant:c};if('NOT_ASSOCIATED'===l)return{status:'not_associated',registrationGrant:null};return{status:'unknown',registrationGrant:null,message:null==s.message||''===s.message?D:s.message}},e.lookupSensor=async function(n,o,s,l){const c=await t.registration.lookupSensor({body:Object.assign({mac:(0,u.normalizeMac)(n),associatedEmail:o,ownerEmail:s},null==l?{}:{registrationGrant:l})});return Object.assign({},k(c),{message:_(c.message,'Registration lookup response')})},e.resumeByToken=async function(n){const o=await t.registration.resume({body:{token:n}});return{message:_(o.message,'Registration resume response'),sensorConfig:null!=o.sensorConfig?k(o.sensorConfig):null,status:o.status}},e.submitRegistration=async function(o,c){try{const s=o.setlocation?(0,n.parseCoord)(o.lat,o.lon):null;if(o.setlocation&&null===s)throw new Error('Latitude and longitude must be finite and within valid geographic ranges.');const f=(0,l.composeLedMode)(o.led_mode,o.led_tap_enabled);if(null===f)throw new Error('LED mode must be a supported LED option.');const y=await t.registration.submit({body:{mac:(0,u.normalizeMac)(o.mac),associatedEmail:o.associated,sensorName:o.sensorname,locationType:o.locationtype,visibility:o.visibility,setLocation:o.setlocation,lat:s?.lat??null,lon:s?.lon??null,ledMode:f,ledBrightness:(0,l.isLedBrightnessActive)(o.led_mode)?b(o.led_brightness,'LED brightness'):null,provider1:{providerType:o.provider1,createWu:o.create_wu_1,key3:''!==o.key3_1?o.key3_1:null,key4:''!==o.key4_1?o.key4_1:null,method:o.method1},provider2:{providerType:o.provider2,createWu:o.create_wu_2,key3:''!==o.key3_2?o.key3_2:null,key4:''!==o.key4_2?o.key4_2:null,method:o.method2},ownerName:o.name,ownerEmail:o.email,ownerPhone:''!==o.phone?o.phone:null,termsAccepted:o.terms,token:null!=c&&''!==c?c:null}}),{success:p,status:D,modifyToken:k,sensorId:v,readKey:w,sensorReporting:h}=y,A=_(y.message,'Registration submit response'),E=t=>{const n={type:t,message:A,submitted:{sensorName:o.sensorname,mac:o.mac,locationType:o.locationtype,visibility:o.visibility,setlocation:o.setlocation,lat:o.lat,lon:o.lon,email:o.email,associated:o.associated}};return null!=k&&''!==k&&(n.modifyToken=k),null!=v&&(n.sensorId=v),null!=w&&''!==w&&(n.readKey=w),null!=h&&(n.sensorReporting=h),n};return p&&'WU_ERROR'===D?E('warning'):p?E('success'):{type:'error',message:A}}catch(t){return{type:'error',message:(0,s.errorMessage)(t,'Registration failed. Please try again.')}}};var t=r(d[0]),n=r(d[1]),o=r(d[2]),s=r(d[3]),l=r(d[4]),u=r(d[5]);const c='REGISTRATION_DRAFT_TOO_LARGE';function f(t,n){const o=t[n];return'string'==typeof o?o:null}function y(t){return'public'===t||'private'===t||''===t?t:null}function p(t){const n=f(t.formData,'mac'),o=f(t.formData,'associated'),s=f(t.formData,'locationtype'),l=f(t.formData,'sensorname'),u=f(t.formData,'visibility'),c=f(t.formData,'lat'),p=f(t.formData,'lon'),_=f(t.formData,'led_mode'),D=t.formData.led_tap_enabled,b=f(t.formData,'led_brightness'),k=f(t.formData,'provider1'),v=f(t.formData,'key3_1'),w=f(t.formData,'key4_1'),h=f(t.formData,'method1'),A=f(t.formData,'provider2'),E=f(t.formData,'key3_2'),R=f(t.formData,'key4_2'),T=f(t.formData,'method2'),L=f(t.formData,'name'),S=f(t.formData,'email'),O=f(t.formData,'phone');if(null===n||null===o||null===s||null===l||null===u||null===c||null===p||null===_||'boolean'!=typeof D||null===b||null===k||null===v||null===w||null===h||null===A||null===E||null===R||null===T||null===L||null===S||null===O)return null;const G='inside'===(I=s)||'outside'===I||''===I?I:null;var I;const N=y(u);return null===G||null===N?null:{associationValidated:t.associationValidated,currentStep:t.currentStep,formData:{associated:o,create_wu_1:t.formData.create_wu_1,create_wu_2:t.formData.create_wu_2,email:S,key3_
11981:v,key3_2:E,key4_1:w,key4_2:R,lat:c,led_brightness:b,led_mode:_,led_tap_enabled:D,locationtype:G,lon:p,mac:n,method1:h,method2:T,name:L,phone:O,provider1:k,provider2:A,sensorname:l,setlocation:t.formData.setlocation,terms:t.formData.terms,visibility:N},savedAt:t.savedAt}}function _(t,n){if(null==t||''===t)throw new Error(`${n} did not include a message.`);return t}const D='There was a problem completing device verification. Please try again.';function b(t,n){const o=t.trim();if(''===o)return null;const s=Number(o);if(!Number.isInteger(s))throw new Error(`${n} must be a whole number.`);return s}function k(t){return Object.assign({},t,{lat:null!=t.lat?(0,n.toLatitude)(t.lat):null,lon:null!=t.lon?(0,n.toLongitude)(t.lon):null})}},1089,[471,1058,466,468,1064,1059]);
1199__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.applyConfigToFormData=function(l){const s=(0,o.parseLedMode)(l.ledMode);return{sensorname:l.label??'',locationtype:(p=l.locationType,t(p)?p:n.REGISTRATION_SCHEMA.locationtype.initial),visibility:u(l.visibility),lat:null!=l.lat?l.lat.toString():'',lon:null!=l.lon?l.lon.toString():'',led_mode:s?.baseMode??n.REGISTRATION_SCHEMA.led_mode.initial,led_tap_enabled:s?.tapEnabled??n.REGISTRATION_SCHEMA.led_tap_enabled.initial,led_brightness:l.ledBrightness?.toString()??n.REGISTRATION_SCHEMA.led_brightness.initial,provider1:l.provider1?.providerType??n.REGISTRATION_SCHEMA.provider1.initial,key3_1:l.provider1?.key3??'',key4_1:l.provider1?.key4??'',method1:(c=l.provider1?.method,null!=c&&''!==c?c:n.REGISTRATION_SCHEMA.method1.initial),provider2:l.provider2?.providerType??n.REGISTRATION_SCHEMA.provider2.initial,key3_2:l.provider2?.key3??'',key4_2:l.provider2?.key4??'',method2:null!=l.provider2?.method&&''!==l.provider2.method?l.provider2.method:n.REGISTRATION_SCHEMA.method2.initial};var c;var p},e.createTokenPrefillSuppression=function(o,n,t){return{association:''!==o&&''!==n?{mac:o,associated:n}:null,configLookup:''!==o&&''!==n&&''!==t?{mac:o,associated:n,email:t}:null}},e.shouldSuppressTokenPrefillAssociation=function(o,n,t){const l=o.current.association;if(null===l)return!1;if(n===l.mac&&t===l.associated)return o.current.association=null,!0;''===n||''===t||n===l.mac&&t===l.associated||(o.current.association=null);return!1},e.shouldSuppressTokenPrefillConfigLookup=function(o,n,t,l){const u=o.current.configLookup;if(null===u)return!1;if(n===u.mac&&t===u.associated&&l===u.email)return o.current.configLookup=null,!0;''===n||''===t||''===l||n===u.mac&&t===u.associated&&l===u.email||(o.current.configLookup=null);return!1};var o=r(d[0]),n=r(d[1]);function t(o){return''===o||null!==o&&n.LOCATION_TYPES.some(n=>n===o)}function l(o){return''===o||null!==o&&n.VISIBILITIES.some(n=>n===o)}function u(o){return l(o)?o:n.REGISTRATION_SCHEMA.visibility.initial}},1090,[1064,1086]);
1200__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TOTAL_STEPS",{enumerable:!0,get:function(){return S}}),Object.defineProperty(e,"STEP_LABELS",{enumerable:!0,get:function(){return v}}),e.useRegistrationWizard=function(u){const f=(0,t.useRef)(null);f.current??=D(u);const v=(0,t.useRef)(!0);(0,t.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]);const[b,w]=(0,t.useState)(0),[T,h]=(0,t.useState)(!1),[k,O]=(0,t.useState)(!1),[A,I]=(0,t.useState)(null),[_,j]=(0,t.useState)(!0),C=(0,t.useRef)(!1),[L,P]=(0,t.useState)(null),M=null!==A,[x,F]=(0,t.useState)({}),V=(0,t.useMemo)(()=>()=>{const t=[];for(const n of Object.keys(x)){const s=x[n];void 0!==s&&''!==s&&t.push({field:n,error:s})}return t},[x]),G=(0,t.useMemo)(()=>[...c.REGISTRATION_CROSS_FIELD_RULES,V],[V]),N=(0,t.useRef)(E(u)),H=(0,n.useForm)(c.REGISTRATION_SCHEMA,{initial:N.current,crossField:G});(0,t.useEffect)(()=>{(async()=>{const t=await R(f.current);v.current&&(I(t),C.current=null!==t,j(!1))})()},[]);const z=(0,t.useRef)(null),W=(0,t.useRef)(0);(0,t.useEffect)(()=>()=>{null!==z.current&&clearTimeout(z.current)},[]),(0,t.useEffect)(()=>{if(_||null!==A)return;null!==z.current&&clearTimeout(z.current);const t=H.values,n=b,s=T,o=f.current,u=C.current,c=++W.current;z.current=setTimeout(()=>{(async()=>{const{draftExists:l,warning:f}=await p(t,n,s,o,u);v.current&&c===W.current&&(C.current=l,void 0!==f&&P(f))})()},l)},[T,A,b,_,H.values]);const B=(0,t.useCallback)((t,n)=>{F(s=>null===n||''===n?void 0===s[t]?s:y(s,[t]):s[t]===n?s:Object.assign({},s,{[t]:n}))},[]),U=(0,t.useCallback)(()=>{F(t=>0===Object.keys(t).length?t:{})},[]),q=(0,t.useRef)(H.values);function J(t){const n=c.STEP_FIELDS[t];return void 0!==n&&n.some(t=>void 0!==H.errors[t])}function K(t){return 0===t&&!T}(0,t.useEffect)(()=>{const t=q.current;q.current=H.values;const n=[];for(const s of Object.keys(H.values))t[s]!==H.values[s]&&n.push(s);0!==n.length&&F(t=>{const s=n.filter(n=>void 0!==t[n]);return 0===s.length?t:y(t,s)})},[H.values]);const Q=!J(b)&&!K(b),X=(0,t.useCallback)(()=>{const t=c.STEP_FIELDS[b];if(void 0!==t)for(const n of t)H.setTouched(n,!0);return!J(b)&&!K(b)},[b,T,H]),Y=(0,t.useCallback)(()=>{X()&&b<5&&(w(b+1),U())},[b,X,U]),Z=(0,t.useCallback)(()=>{b>0&&(w(b-1),U())},[b,U]),$=(0,t.useCallback)(t=>{t>=0&&t<S&&(w(t),U())},[U]),ee=(0,t.useCallback)(()=>{null!==A&&(W.current+=1,H.reset(A.formData),w(Math.max(0,Math.min(A.currentStep,5))),h(A.associationValidated),I(null),P(null),U())},[A,U,H]),te=(0,t.useCallback)(()=>{W.current+=1,(async()=>{try{await(0,s.clearSavedDraft)(Date.now())}catch(t){o.logger.warn('[reg-draft] clearDraft: threw while clearing saved draft',t)}})(),H.reset(f.current),w(0),h(!1),O(!1),I(null),C.current=!1,P(null),U()},[U,H]);return{form:H,currentStep:b,totalSteps:S,associationValidated:T,hasSavedDraft:M,draftLoading:_,draftPersistenceWarning:L,isTokenResume:k,canProceed:Q,goToStep:$,validateCurrentStep:X,nextStep:Y,prevStep:Z,setAssociationValidated:h,setIsTokenResume:O,resumeDraft:ee,clearDraft:te,setApiError:B,clearApiErrors:U}};var t=r(d[0]);r(d[1]);
1200var n=r(d[2]),s=r(d[3]),o=r(d[4]),u=r(d[5]),c=r(d[6]);const l=500,f='Progress is no longer being saved because this registration is too large to store in the browser.',S=6,v=['Device ID','Owner Info','Location','LED Settings','Data Providers','Review'];function b(t){if('object'!=typeof t||null===t)return!1;const n=t;return'number'==typeof n.currentStep&&'number'==typeof n.savedAt&&'boolean'==typeof n.associationValidated&&'object'==typeof n.formData&&null!==n.formData}function E(t){return null==t||''===t?{}:{mac:(0,u.normalizeMac)(t)}}function D(t){const n={};for(const t of Object.keys(c.REGISTRATION_SCHEMA)){const s=c.REGISTRATION_SCHEMA[t];void 0!==s&&(n[t]=s.initial)}const s=E(t);for(const t of Object.keys(s))n[t]=s[t];return n}function w(t,n){const s=t,o=n;for(const t of Object.keys(o))if(s[t]!==o[t])return!0;return!1}function y(t,n){const s=new Set(n),o={};for(const n of Object.keys(t))s.has(n)||(o[n]=t[n]);return o}async function R(t){try{const n=await(0,s.loadSavedDraft)();return b(n)?w(n.formData,t)?n:(await(0,s.clearSavedDraft)(Date.now()),null):null}catch(t){return o.logger.warn('[reg-draft] loadDraft: threw, returning null',t),null}}async function p(t,n,u,c,l){try{return w(t,c)?(await(0,s.saveRegistrationDraft)({currentStep:n,formData:t,associationValidated:u,savedAt:Date.now()}),{draftExists:!0,warning:null}):(l&&await(0,s.clearSavedDraft)(Date.now()),{draftExists:!1,warning:null})}catch(t){return(0,s.isRegistrationDraftTooLargeError)(t)?{draftExists:l,warning:f}:(o.logger.warn('[reg-draft] saveDraft: threw (draft cookie unavailable)',t),{draftExists:l,warning:void 0})}}},1091,[34,95,1053,1088,469,1059,1086]);
1201__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SearchScreen=function(){const e=(0,I.useSeoMeta)('Search'),S=(0,T.useAppNavigation)(),p=(0,T.useSearchParams)(),y=p?.q??'',P=(0,t.useMemo)(()=>(0,O.parseSearchSources)(p?.sources),[p?.sources]),G=x(P),[j,B]=(0,t.useState)(y),[H,F]=(0,t.useState)(null),X=(0,t.useRef)(0);(0,t.useEffect)(()=>{B(y)},[y]);const z=y.trim(),U=D(z,G,H),v=(0,t.useCallback)((e,t)=>{const s={},o=e.trim();o.length>0&&(s.q=o),N(t)||(s.sources=t.join(',')),S.navigate('Search',s)},[S]),w=(0,t.useCallback)(async(e,t,s)=>{try{const o={limit:_};N(t)||(o.sources=t);const l=await h.searchApi.query(e,o);s===X.current&&F({query:e,sourcesKey:x(t),results:l})}catch(o){s===X.current&&(E.logger.error('Federated search page failed',o),F({query:e,sourcesKey:x(t),results:null}))}},[]);(0,t.useEffect)(()=>{if(z.length<b)return;const e=++X.current;w(z,P,e)},[z,G,P,w]);const W=e=>{const t=P.includes(e)?P.filter(t=>t!==e):[...P,e];0!==t.length&&v(j,t)},k=null!=H?.results&&'done'===U?H.results.groups:[];return(0,L.jsxs)(C.PageLayout,{children:[(0,L.jsx)(f.WebMeta,Object.assign({},e)),(0,L.jsxs)(o.default,{style:M.scroll,contentContainerStyle:M.content,keyboardShouldPersistTaps:"handled",testID:"search-page",children:[(0,L.jsx)(l.default,{style:M.heading,accessibilityRole:"header",children:"Search"}),(0,L.jsx)(l.default,{style:M.subheading,children:"Filter by source and search store, community, blog, and press."}),(0,L.jsxs)(u.default,{style:M.searchRow,children:[(0,L.jsx)(n.default,{style:M.input,value:j,onChangeText:B,placeholder:"Search PurpleAir",placeholderTextColor:A.COLORS.TEXT_MUTED,autoCorrect:!1,autoCapitalize:"none",returnKeyType:"search",onSubmitEditing:()=>{v(j,P)},accessibilityLabel:"Search query",testID:"search-page-input"}),(0,L.jsx)(c.default,{style:M.searchButton,onPress:()=>{v(j,P)},accessibilityRole:"button",accessibilityLabel:"Search",testID:"search-page-submit",children:(0,L.jsx)(l.default,{style:M.searchButtonText,children:"Search"})})]}),(0,L.jsx)(u.default,{style:M.filters,accessibilityRole:"toolbar",testID:"search-page-filters",children:O.ALL_SEARCH_SOURCES.map(e=>{const t=P.includes(e);return(0,L.jsx)(c.default,{style:[M.chip,t&&M.chipActive],onPress:()=>{W(e)},accessibilityRole:"button",accessibilityState:{selected:t},accessibilityLabel:`Filter ${O.SEARCH_SOURCE_LABELS[e]}`,testID:`search-filter-${e}`,children:(0,L.jsx)(l.default,{style:[M.chipText,t&&M.chipTextActive],children:O.SEARCH_SOURCE_LABELS[e]})},e)})}),z.length<b&&(0,L.jsx)(l.default,{style:M.message,children:"Type at least two characters and press Search."}),z.length>=b&&'loading'===U&&(0,L.jsxs)(u.default,{style:M.loadingRow,children:[(0,L.jsx)(s.default,{color:A.COLORS.ACTION_PRIMARY}),(0,L.jsx)(l.default,{style:M.messageInline,children:"Searching\u2026"})]}),'error'===U&&(0,L.jsx)(l.default,{style:M.message,children:"Search is unavailable right now. Please try again."}),'done'===U&&0===k.length&&(0,L.jsx)(l.default,{style:M.message,children:`No results for \u201c${z}\u201d.`}),'done'===U&&k.length>0&&(0,L.jsx)(R.SearchResultList,{groups:k})]})]})};var t=r(d[0]),s=e(r(d[1]));r(d[2]);var o=e(r(d[3])),l=e(r(d[4])),n=e(r(d[5])),c=e(r(d[6])),u=e(r(d[7])),S=r(d[8]),h=r(d[9]),C=r(d[10]),O=r(d[11]),R=r(d[12]),f=r(d[13]),A=r(d[14]),p=r(d[15]),y=r(d[16]),I=r(d[17]),T=r(d[18]),E=r(d[19]),L=r(
1201d[20]);const b=2,_=20;function x(e){return[...e].sort().join(',')}function N(e){return O.ALL_SEARCH_SOURCES.every(t=>e.includes(t))&&e.length===O.ALL_SEARCH_SOURCES.length}function D(e,t,s){return e.length<b?'idle':s?.query!==e||s.sourcesKey!==t?'loading':null===s.results?'error':'done'}const M=(0,S.createStyles)({chip:{backgroundColor:A.COLORS.BG_SURFACE,borderColor:A.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,paddingHorizontal:p.SPACING.MD,paddingVertical:p.SPACING.SM},chipActive:{backgroundColor:A.COLORS.ACTION_PRIMARY,borderColor:A.COLORS.ACTION_PRIMARY},chipText:{color:A.COLORS.TEXT_SECONDARY,fontSize:y.FONT_SIZE.SM,fontWeight:'600'},chipTextActive:{color:A.COLORS.WHITE},content:Object.assign({maxWidth:800,paddingHorizontal:p.SPACING.LG,paddingVertical:p.SPACING.XXL,width:'100%'},{marginHorizontal:'auto'}),filters:{flexDirection:'row',flexWrap:'wrap',gap:p.SPACING.SM,marginBottom:p.SPACING.XL},heading:{color:A.COLORS.TEXT_HEADING,fontSize:y.FONT_SIZE.XXXL,fontWeight:'700',marginBottom:p.SPACING.SM},input:{backgroundColor:A.COLORS.BG_SURFACE,borderColor:A.COLORS.BORDER_DEFAULT,borderRadius:8,borderWidth:1,color:A.COLORS.TEXT_HEADING,flex:1,fontSize:y.FONT_SIZE.LG,paddingHorizontal:p.SPACING.MD,paddingVertical:p.SPACING.MD},loadingRow:{alignItems:'center',flexDirection:'row',gap:p.SPACING.SM,paddingVertical:p.SPACING.MD},message:{color:A.COLORS.TEXT_MUTED,fontSize:y.FONT_SIZE.MD,paddingVertical:p.SPACING.MD},messageInline:{color:A.COLORS.TEXT_MUTED,fontSize:y.FONT_SIZE.MD},scroll:{backgroundColor:A.COLORS.BG_LIGHT,flex:1},searchButton:{backgroundColor:A.COLORS.ACTION_PRIMARY,borderRadius:8,justifyContent:'center',paddingHorizontal:p.SPACING.LG,paddingVertical:p.SPACING.MD},searchButtonText:{color:A.COLORS.WHITE,fontSize:y.FONT_SIZE.MD,fontWeight:'700'},searchRow:{flexDirection:'row',gap:p.SPACING.SM,marginBottom:p.SPACING.LG},subheading:{color:A.COLORS.TEXT_MUTED,fontSize:y.FONT_SIZE.MD,marginBottom:p.SPACING.XL}})},1092,[34,410,95,283,222,394,488,276,489,644,568,645,646,565,490,493,494,562,505,469,104]);
1202__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.ShippingPolicyScreen=function(){return(0,c.jsx)(n.ShopifyPolicyPage,{errorSurface:p.contentLoad,seoKey:"ShippingPolicy",handle:"shipping-policy",policyName:"Shipping Policy"})},r(d[0]);var n=r(d[1]),o=r(d[2]),c=r(d[3]);const p=(0,o.defineScreenErrorSurfaces)('ShippingPolicy',{contentLoad:{id:'content-load',kind:'page',label:'Shipping policy content load error'}})},1093,[34,997,557,104]);
1203__d(function(g,r,i,_a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return x}}),_e.StoreCategoryScreen=_;var t=r(d[0]),o=e(r(d[1])),a=e(r(d[2])),n=r(d[3]),s=r(d[4]),u=r(d[5]),l=r(d[6]),c=r(d[7]),S=r(d[8]),y=r(d[9]),f=r(d[10]),p=r(d[11]),b=r(d[12]),C=r(d[13]),A=r(d[14]),j=r(d[15]),L=r(d[16]),P=r(d[17]),h=r(d[18]),E=r(d[19]);const O=(0,C.defineScreenErrorSurfaces)('StoreCategory',{productLoad:{id:'product-load',kind:'page',label:'Store category product load error'},categoryNotFound:{id:'category-not-found',kind:'page',label:'Store category not found error'}});function _(){const{category:e,sensor:n}=(0,P.useStoreCategoryParams)(),p=(0,P.useAppNavigation)(),{data:_,loading:x,error:M,retry:N}
1203=(0,L.useStoreData)(),{isDevTriggered:I,surface:v}=(0,C.useErrorSurface)(O.productLoad),G=null!=M||I?'Unable to Load Products':null,{isDevTriggered:T,surface:k}=(0,C.useErrorSurface)(O.categoryNotFound),F=(0,t.useMemo)(()=>(_?.categories??[]).find(t=>t.slug===e)??null,[_?.categories,e]),U=(0,t.useMemo)(()=>F?(_?.products??[]).filter(e=>e.productType===F.productType).sort((e,t)=>(e.sortOrder??Number.MAX_SAFE_INTEGER)-(t.sortOrder??Number.MAX_SAFE_INTEGER)):[],[_?.products,F]),$=(0,t.useMemo)(()=>(0,S.collectSensorModels)(U),[U]),B=$.length>0&&null!=n&&''!==n?n:null,D=(0,t.useMemo)(()=>$.find(e=>e.handle===B)??null,[$,B]),H=D?.name??B,X=(0,t.useCallback)(t=>{p.navigate('StoreCategory',{category:e,sensor:t})},[p,e]),Y=(0,t.useCallback)(()=>{p.navigate('StoreCategory',{category:e})},[p,e]),V=F?.label??e,z=null!=B?'StoreCategorySensor':'StoreCategory',W=(0,j.useSeoMeta)(z,{categoryLabel:V}),q=null!=B?Object.assign({},W,{title:`${V} for ${H} | PurpleAir`}):W,w=b.CATEGORY_CONFIG_BY_SLUG.get(e),J=(0,A.useResolveImageUri)(w?.heroAsset,`Store category ${e} hero`);if(x)return(0,E.jsx)(s.AsyncPageLayout,{status:"loading",children:(0,E.jsx)(u.LoadingState,{message:"Loading products..."})});if(null!=G)return(0,E.jsx)(s.AsyncPageLayout,{status:"error",children:(0,E.jsx)(u.ErrorState,Object.assign({message:G,surface:v},null!=M?{detail:M}:{},{onRetry:N}))});if(!F||T)return(0,E.jsx)(s.AsyncPageLayout,{status:"error",children:(0,E.jsx)(u.ErrorState,{message:"Category Not Found",surface:k,detail:`The category "${e}" does not exist.`})});const K=w?.heroSubtitle??`${U.length} ${1===U.length?'product':'products'} available`,Q=(0,h.heroBackgroundFromImageUri)(J,{imagePosition:w?.heroPosition??'center'});return(0,E.jsxs)(s.AsyncPageLayout,{status:"ready",children:[(0,E.jsx)(y.WebMeta,Object.assign({},q)),(0,E.jsxs)(a.default,{style:R.container,children:[(0,E.jsx)(l.HeroSection,{backgroundColor:f.COLORS.BRAND_PRIMARY,background:Q,label:"PURPLEAIR STORE",title:V,subtitle:K,centered:null==J||''===J}),(0,E.jsx)(o.default,{style:R.productSection,children:(0,E.jsx)(c.SensorFilteredParts,{products:U,selectedHandle:B,onSelectSensor:X,onClearSensor:Y})})]})]})}const R=(0,n.createStyles)({container:{backgroundColor:f.COLORS.BG_SURFACE,flex:1},productSection:{backgroundColor:f.COLORS.BG_LIGHT,paddingHorizontal:p.SPACING.XXL,paddingVertical:p.SPACING.MASSIVE}});var x=_},1094,[34,276,283,489,567,512,674,1095,1004,565,490,493,631,557,714,562,1045,505,717,104]);
1204__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SensorFilteredParts=function({products:e,selectedHandle:o,onSelectSensor:s,onClearSensor:c}){const S=(0,t.useMemo)(()=>(0,h.collectSensorModels)(e),[e]),C=S.length>0,O=C&&null!=o&&''!==o?o:null,T=(0,t.useMemo)(()=>S.find(e=>e.handle===O)??null,[S,O]),x=T?.name??O,I=(0,t.useMemo)(()=>null==O?e:(0,h.filterProductsBySensorModel)(e,O),[e,O]),_=I.length,A=null!=O&&_>0?`${_} ${1===_?'part':'parts'} fit your ${x}`:null;return(0,y.jsxs)(l.default,{children:[C&&(0,y.jsxs)(l.default,{style:p.filterCard,children:[(0,y.jsx)(n.default,{style:p.filterHeading,children:"Filter by your sensor"}),(0,y.jsx)(n.default,{style:p.filterHelp,children:null!=O?'Showing only the parts that fit your sensor.':'Pick your model to narrow the list \u2014 or browse every part below.'}),(0,y.jsx)(f.SensorPicker,{models:S,selectedHandle:O,onSelect:s}),null!=O&&(0,y.jsxs)(l.default,{style:p.filterFooter,children:[null!=A&&(0,y.jsx)(n.default,{style:p.filterConfirmation,children:A}),(0,y.jsx)(n.default,{style:p.clearFilter,accessibilityRole:"button",accessibilityLabel:"Show all parts",onPress:c,children:"Show all parts"})]})]}),I.length>0?(0,y.jsx)(l.default,{style:p.productGrid,children:I.map(e=>(0,y.jsx)(u.ProductCard,Object.assign({product:e},null!=O?{fitSensorHandle:O}:{}),e.handle))}):(0,y.jsxs)(l.default,{style:p.emptyState,children:[(0,y.jsx)(n.default,{style:p.emptyTitle,children:"No Products Available"}),(0,y.jsx)(n.default,{style:p.emptyText,children:null!=O?`No parts in this category are listed for ${x} yet.`:'There are currently no products in this category.'})]})]})};var t=r(d[0]),l=e(r(d[1])),n=e(r(d[2])),o=r(d[3]),s=r(d[4]),c=r(d[5]),S=r(d[6]),u=r(d[7]),f=r(d[8]),h=r(d[9]),y=r(d[10]);const p=(0,o.createStyles)({clearFilter:{color:s.COLORS.ACTION_PRIMARY,fontSize:S.FONT_SIZE.SM,fontWeight:'600'},emptyState:{alignItems:'center',padding:c.SPACING.MASSIVE},emptyText:{color:s.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.LG,textAlign:'center'},emptyTitle:{color:s.COLORS.TEXT_DARK,fontSize:S.FONT_SIZE.XXL,fontWeight:'bold',marginBottom:c.SPACING.SM},filterCard:{alignSelf:'center',backgroundColor:s.COLORS.BG_SUBTLE_100,borderColor:s.COLORS.BORDER_DEFAULT,borderRadius:12,borderWidth:1,gap:c.SPACING.SM,marginBottom:c.SPACING.XXL,maxWidth:900,paddingHorizontal:c.SPACING.XL,paddingVertical:c.SPACING.LG,width:'100%'},filterConfirmation:{color:s.COLORS.TEXT_SECONDARY,fontSize:S.FONT_SIZE.MD,fontWeight:'600'},filterFooter:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.LG,justifyContent:'center',marginTop:c.SPACING.XS},filterHeading:{color:s.COLORS.TEXT_HEADING,fontSize:S.FONT_SIZE.LG,fontWeight:'600',textAlign:'center'},filterHelp:{color:s.COLORS.TEXT_SOFT,fontSize:S.FONT_SIZE.MD,lineHeight:20,textAlign:'center'},productGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:c.SPACING.XXL,justifyContent:'center',maxWidth:1200,width:'100%'}})},1095,[34,276,222,489,490,493,494,1024,1033,1004,104]);
1205__d(function(g,r,i,_a,m,_e,d){"use strict";
1205function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return k}}),_e.StoreScreen=H;var t=r(d[0]),o=e(r(d[1])),l=e(r(d[2])),n=e(r(d[3]));r(d[4]);var a=r(d[5]),s=e(r(d[6])),c=r(d[7]),u=r(d[8]),p=r(d[9]),S=r(d[10]),f=r(d[11]),h=r(d[12]),y=r(d[13]),x=r(d[14]),C=r(d[15]),O=r(d[16]),R=r(d[17]),T=r(d[18]),b=r(d[19]),A=r(d[20]),I=r(d[21]),P=r(d[22]),j=r(d[23]),L=r(d[24]),N=r(d[25]);const E=(0,A.defineScreenErrorSurfaces)('Store',{productLoad:{id:'product-load',kind:'page',label:'Store product load page error'}});function G(e){return Number.isInteger(e)?`$${e}`:`$${e.toFixed(2)}`}function _(e,t){const o=t.get(e.handle)?.priceRange?.minVariantPrice?.amount;if(null==o||''===o)return G(e.fallbackPriceDollars);const l=Number.parseFloat(o);return Number.isNaN(l)?G(e.fallbackPriceDollars):G(l)}function D({icon:e,title:n,description:a,recommended:s,productsByHandle:u}){return(0,N.jsxs)(o.default,{style:B.guideItem,children:[(0,N.jsx)(f.UseCaseIcon,{name:e,size:28}),(0,N.jsx)(l.default,{style:B.guideTitle,children:n}),(0,N.jsx)(l.default,{style:B.guideDescription,children:a}),(0,N.jsxs)(o.default,{style:B.guideRecommendation,children:[(0,N.jsx)(l.default,{style:B.guideRecommendLabel,children:"Recommended:"}),(0,N.jsx)(l.default,{style:B.guideRecommendLine,children:s.map((e,o)=>{const n=_(e,u),a=0===o?'':o===s.length-1?' or ':', ';return(0,N.jsxs)(t.Fragment,{children:[a,(0,N.jsx)(c.AppLink,{to:"Product",href:`/products/${e.handle}`,inline:!0,textStyle:B.guideRecommendLink,accessibilityLabel:`${e.label} product page`,children:e.label}),(0,N.jsx)(l.default,{style:B.guideRecommendPrice,children:` (${n})`})]},e.handle)})})]})]})}const M=[{icon:'home',title:'Monitoring Your Home',description:'Track outdoor air quality near your house, get alerts during wildfires, and contribute data to your community.',recommended:[{handle:'purpleair-zen',label:'Zen',fallbackPriceDollars:299},{handle:'purpleair-flex',label:'Flex',fallbackPriceDollars:289}]},{icon:'microscope',title:'Research & Monitoring',description:'Deploy sensor networks for environmental studies, air quality research, or community health initiatives.',recommended:[{handle:'classic-plus-air-quality-monitor',label:'Classic Plus',fallbackPriceDollars:239},{handle:'purpleair-flex',label:'Flex',fallbackPriceDollars:289}]},{icon:'building',title:'Indoor Air Quality',description:'Monitor air quality inside your home, office, or classroom with a display you can see at a glance.',recommended:[{handle:'purpleair-touch',label:'Touch',fallbackPriceDollars:209}]},{icon:'pin',title:'Compact & Affordable',description:"Start monitoring with PurpleAir's most accessible sensor. Ultra-compact with no moving parts.",recommended:[{handle:'purpleair-pixel',label:'PIXEL',fallbackPriceDollars:139}]}];function w({category:e}){const[n,a]=(0,t.useState)(null),s=(0,t.useCallback)(()=>{a(null)},[]);return(0,N.jsxs)(o.default,{style:B.productSection,children:[(0,N.jsxs)(o.default,{style:B.categorySectionHeader,children:[(0,N.jsx)(l.default,{style:B.sectionTitle,children:e.label}),(0,N.jsx)(o.default,{style:B.categoryHeaderActions,children:(0,N.jsx)(c.AppLink,{to:"StoreCategory",href:`/store/${e.slug}`,style:B.viewAllButton,children:(0,N.jsx)(l.default,{style:B.viewAllText,children:"View All"})})})]}),(0,N.jsx)(y.SensorFilteredParts,{products:e.products,selectedHandle:n,onSelectSensor:a,onClearSensor:s})]})}function H(){const e=(0,P.useSeoMeta)('Store'),a=(0,I.useResolveImageUri)(s.default,'Store product lineup hero'),{data:c,loading:f,error:y,retry:R}=(0,j.useStoreData)(),{isDevTriggered:b,surface:G}=(0,A.useErrorSurface)(E.productLoad),_=null!=y||b?'Unable to Load Products':null,H=(0,t.useMemo)(()=>c?.categories??[],[c?.categories]),k=(0,t.useMemo)(()=>[...c?.products??[]].sort((e,t)=>(e.sortOrder??Number.MAX_SAFE_INTEGER)-(t.sortOrder??Number.MAX_SAFE_INTEGER)),[c?.products]),X=(0,t.useMemo)(()=>{const e=new Map;for(const t of k)e.set(t.handle,t);return e},[k]),W=(0,t.useMemo)(()=>H.find(e=>e.slug===T.SENSOR_CATEGORY_SLUG)?.productType??null,[H]),z=(0,t.useMemo)(()=>
1205null!=W?k.filter(e=>e.productType===W):[],[k,W]),v=(0,t.useMemo)(()=>z.filter(e=>'outdoor'===e.category||'indoor-outdoor'===e.category),[z]),U=(0,t.useMemo)(()=>z.filter(e=>'indoor'===e.category),[z]),V=z.some(e=>'outdoor'===e.category||'indoor'===e.category||'indoor-outdoor'===e.category),Z=(0,t.useMemo)(()=>H.filter(e=>e.slug!==T.SENSOR_CATEGORY_SLUG).map(e=>Object.assign({},e,{products:k.filter(t=>t.productType===e.productType)})).filter(e=>e.products.length>0),[H,k]),Y=z.some(e=>null!=e.tier&&''!==e.tier),$=y;return f?(0,N.jsx)(u.AsyncPageLayout,{status:"loading",testID:"store-screen",children:(0,N.jsx)(p.LoadingState,{message:"Loading products..."})}):null!=_?(0,N.jsx)(u.AsyncPageLayout,{status:"error",testID:"store-screen",children:(0,N.jsx)(p.ErrorState,Object.assign({message:_,surface:G,onRetry:R},null!=$?{detail:$}:{}))}):(0,N.jsxs)(u.AsyncPageLayout,{status:"ready",testID:"store-screen",children:[(0,N.jsx)(C.WebMeta,Object.assign({},e)),(0,N.jsxs)(n.default,{style:B.container,children:[(0,N.jsx)(S.HeroSection,{backgroundColor:O.COLORS.BRAND_PRIMARY,background:(0,L.heroBackgroundFromImageUri)(a,{imagePosition:'center 35%'}),label:"PURPLEAIR SENSORS",title:'Real-Time Air Quality\nMonitoring for Everyone',subtitle:"Real-time air quality monitoring from the community sensors that help power the EPA's Fire and Smoke Map. Join 35,000+ sensors worldwide.",centered:null==a||''===a,enhancedSubtitleContrast:null!=a&&''!==a}),(0,N.jsx)(x.TrustBar,{variant:"full"}),(0,N.jsxs)(o.default,{style:B.buyingGuide,children:[(0,N.jsx)(l.default,{style:B.sectionTitle,children:"Which Sensor Is Right for You?"}),(0,N.jsx)(l.default,{style:B.sectionSubtitle,children:"Track particulate pollution as it changes in real time. Choose by where you need to monitor."}),(0,N.jsx)(o.default,{style:B.guideGrid,children:M.map(e=>(0,N.jsx)(D,{icon:e.icon,title:e.title,description:e.description,recommended:e.recommended,productsByHandle:X},e.title))})]}),V?(0,N.jsxs)(N.Fragment,{children:[v.length>0&&(0,N.jsxs)(o.default,{style:B.productSection,children:[(0,N.jsx)(l.default,{style:B.sectionTitle,children:"Outdoor Sensors"}),(0,N.jsx)(l.default,{style:B.sectionSubtitle,children:"Purpose-built for permanent outdoor deployment. UV-resistant, weather-sealed, and proven in extreme conditions."}),(0,N.jsx)(o.default,{style:B.productGrid,children:v.map(e=>(0,N.jsx)(h.ProductCard,{product:e},e.handle))})]}),U.length>0&&(0,N.jsxs)(o.default,{style:B.productSection,children:[(0,N.jsx)(l.default,{style:B.sectionTitle,children:"Indoor Sensors"}),(0,N.jsx)(l.default,{style:B.sectionSubtitle,children:"Know what you're breathing at home, at work, or in the classroom."}),(0,N.jsx)(o.default,{style:B.productGrid,children:U.map(e=>(0,N.jsx)(h.ProductCard,{product:e},e.handle))})]})]}):z.length>0&&(0,N.jsxs)(o.default,{style:B.productSection,children:[(0,N.jsx)(l.default,{style:B.sectionTitle,children:"Air Quality Sensors"}),(0,N.jsx)(l.default,{style:B.sectionSubtitle,children:"PurpleAir sensors use laser particle counters to deliver real-time PM data that helps power the EPA's Fire and Smoke Map."}),(0,N.jsx)(o.default,{style:B.productGrid,children:z.map(e=>(0,N.jsx)(h.ProductCard,{product:e},e.handle))})]}),z.length>1&&(0,N.jsxs)(o.default,{style:B.allProductsSection,children:[(0,N.jsx)(l.default,{style:B.sectionTitle,children:"Compare Sensors"}),(0,N.jsxs)(o.default,{style:B.comparisonTable,children:[(0,N.jsxs)(o.default,{style:B.comparisonHeader,children:[(0,N.jsx)(l.default,{style:[B.comparisonCell,B.comparisonHeaderText,B.comparisonHeaderFirst],children:"Sensor"}),(0,N.jsx)(l.default,{style:[B.comparisonCell,B.comparisonHeaderText],children:"Price"}),V&&(0,N.jsx)(l.default,{style:[B.comparisonCell,B.comparisonHeaderText],children:"Use"}),Y&&(0,N.jsx)(l.default,{style:[B.comparisonCell,B.comparisonHeaderText],children:"Tier"})]}),z.map(e=>(0,N.jsxs)(o.default,{style:B.comparisonRow,children:[(0,N.jsx)(l.default,{style:B.comparisonCellName,children:e.title}),(0,N.jsx)(l.default,{style:B.comparisonCell,children:null!=e.priceRange?.minVariantPrice?`$${parseFloat(e.priceRange.minVariantPrice.amount)}`:'Price unavailable'}),V&&(0,N.jsx)(l.default,{style:B.comparisonCell,children:F(e.category)}),Y&&(0,N.jsx)(l.default,{style:B.comparisonCellTier,children:null!=e.tier&&''!==e.tier?e.tier:'-'})]},e.handle))]})]}),Z.map(e=>(0,N.jsx)(w,{category:e},e.slug))]})]})}function F(e){if(null===e)return'-';switch(e){case'outdoor':return'Outdoor';case'indoor':return'Indoor';
1205case'indoor-outdoor':return'Both';default:return'-'}}const B=(0,a.createStyles)({allProductsSection:{backgroundColor:O.COLORS.TEXT_INVERSE,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.JUMBO},buyingGuide:{backgroundColor:O.COLORS.TEXT_INVERSE,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.JUMBO},categoryHeaderActions:{alignItems:'center',flexDirection:'row',gap:R.SPACING.SM},categorySectionHeader:{alignItems:'center',alignSelf:'center',flexDirection:'row',justifyContent:'space-between',marginBottom:R.SPACING.SM,maxWidth:1200,width:'100%'},comparisonCell:{color:O.COLORS.TEXT_DARK,flex:1,fontSize:b.FONT_SIZE.MD,paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.LG},comparisonCellName:{color:O.COLORS.TEXT_DARK,flex:2,fontSize:b.FONT_SIZE.MD,fontWeight:'600',paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.LG},comparisonCellTier:{color:O.COLORS.BRAND_PRIMARY,flex:1,fontSize:b.FONT_SIZE.MD,fontWeight:'600',paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.LG},comparisonHeader:{backgroundColor:O.COLORS.BRAND_BG_SURFACE,borderBottomColor:O.COLORS.BORDER,borderBottomWidth:1,flexDirection:'row'},comparisonHeaderFirst:{flex:2},comparisonHeaderText:{color:O.COLORS.TEXT_DARK,fontSize:b.FONT_SIZE.SM,fontWeight:'700',letterSpacing:.5,textTransform:'uppercase'},comparisonRow:{borderBottomColor:O.COLORS.BG_CHIP,borderBottomWidth:1,flexDirection:'row'},comparisonTable:{alignSelf:'center',borderColor:O.COLORS.BORDER,borderRadius:12,borderWidth:1,maxWidth:700,overflow:'hidden',width:'100%'},container:{backgroundColor:O.COLORS.TEXT_INVERSE,flex:1},guideDescription:{color:O.COLORS.TEXT_SECONDARY,fontSize:b.FONT_SIZE.MD,lineHeight:20},guideGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.XL,justifyContent:'center',maxWidth:960},guideItem:{backgroundColor:O.COLORS.BG_LIGHT,borderColor:O.COLORS.BORDER,borderRadius:16,borderWidth:1,gap:R.SPACING.SM,padding:R.SPACING.XXL,width:220},guideRecommendLabel:{color:O.COLORS.TEXT_CAPTION,fontSize:b.FONT_SIZE.XS,fontWeight:'600',letterSpacing:.5,marginBottom:R.SPACING.XS,textTransform:'uppercase'},guideRecommendLine:{color:O.COLORS.TEXT_SECONDARY,fontSize:b.FONT_SIZE.MD,fontWeight:'500',lineHeight:22},guideRecommendLink:{color:O.COLORS.BRAND_PRIMARY,fontSize:b.FONT_SIZE.MD,fontWeight:'600',textDecorationLine:'underline'},guideRecommendPrice:{color:O.COLORS.TEXT_SECONDARY,fontSize:b.FONT_SIZE.MD,fontWeight:'500'},guideRecommendation:{borderTopColor:O.COLORS.BORDER_LIGHT,borderTopWidth:1,paddingTop:R.SPACING.MD},guideTitle:{color:O.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.LG,fontWeight:'700'},productGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.XXL,justifyContent:'center',maxWidth:1200,width:'100%'},productSection:{backgroundColor:O.COLORS.BG_LIGHT,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.JUMBO},sectionSubtitle:{alignSelf:'center',color:O.COLORS.TEXT_SOFT,fontSize:b.FONT_SIZE.LG,lineHeight:24,marginBottom:R.SPACING.HUGE,maxWidth:600,textAlign:'center'},sectionTitle:Object.assign({color:O.COLORS.TEXT_HEADING,fontSize:b.FONT_SIZE.DISPLAY_SM,fontWeight:'bold',marginBottom:R.SPACING.MD,textAlign:'center'},{fontSize:b.FONT_SIZE.DISPLAY_MD}),viewAllButton:{borderColor:O.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:1,paddingHorizontal:R.SPACING.LG,paddingVertical:R.SPACING.SM},viewAllText:{color:O.COLORS.ACTION_PRIMARY,fontSize:b.FONT_SIZE.MD,fontWeight:'600'}});var k=H},1096,[34,276,222,283,95,489,1097,516,567,512,674,883,1024,1095,1036,565,490,493,631,494,557,714,562,1045,717,104]);
1206__d(function(s,e,a,i,r,t,p){r.exports={uri:"/assets/src/assets/images/hero/purpleair-sensor-lineup.4a59585bb791823a25d52c8d508685ea.jpg",width:1764,height:992}},1097,[]);
1207__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.TechnologyScreen=function(){return(0,c.jsx)(o.DiscoursePage,{errorSurface:t.contentLoad,seoKey:"Technology",slug:"technology",pageName:"PurpleAir technology"})},r(d[0]);var o=r(d[1]),n=r(d[2]),c=r(d[3]);const t=(0,n.defineScreenErrorSurfaces)('Technology',{contentLoad:{id:'content-load',kind:'page',label:'Technology content load error'}})},1098,[34,976,557,104]);
1208__d(function(g,r,i,a,m,e,d){"use strict";
1208Object.defineProperty(e,'__esModule',{value:!0}),e.TermsOfServiceScreen=function(){return(0,n.jsx)(o.ShopifyPolicyPage,{errorSurface:t.contentLoad,seoKey:"TermsOfService",handle:"terms-of-service",policyName:"Terms of Service"})},r(d[0]);var o=r(d[1]),c=r(d[2]),n=r(d[3]);const t=(0,c.defineScreenErrorSurfaces)('TermsOfService',{contentLoad:{id:'content-load',kind:'page',label:'Terms content load error'}})},1099,[34,997,557,104]);
1209__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.TrustingPurpleAirScreen=function(){const{page:t,loading:e,error:o}=(0,C.usePageContent)('trusting-purpleair-sensor-evaluations'),l=(0,P.useSeoMeta)('TrustingPurpleAir'),{isDevTriggered:f,surface:S}=(0,p.useErrorSurface)(T.contentLoad),x=o??(f?'Content not found.':null);if(e)return(0,A.jsx)(u.MarkdownPageLoading,{});if(null!=x||null==t)return(0,A.jsx)(u.MarkdownPageError,{message:x??'Content not found.',surface:S});return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(c.WebMeta,Object.assign({},l)),(0,A.jsx)(u.MarkdownPage,{title:t.title,body:t.body,footer:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(s.AppLink,{to:"Papers",style:O.ctaButton,children:(0,A.jsx)(n.default,{style:O.ctaButtonText,children:"View Specific Evaluations"})}),(0,A.jsx)(s.AppLink,{to:"Contact",style:O.contactButton,children:(0,A.jsx)(n.default,{style:O.contactButtonText,children:"Contact Us"})})]})})]})},r(d[0]);var t,e=r(d[1]),n=(t=e)&&t.__esModule?t:{default:t},o=r(d[2]),s=r(d[3]),u=r(d[4]),c=r(d[5]),l=r(d[6]),f=r(d[7]),S=r(d[8]),p=r(d[9]),C=r(d[10]),P=r(d[11]),A=r(d[12]);const T=(0,p.defineScreenErrorSurfaces)('TrustingPurpleAir',{contentLoad:{id:'content-load',kind:'page',label:'Trusting PurpleAir content load error'}});const O=(0,o.createStyles)({contactButton:{borderColor:l.COLORS.ACTION_PRIMARY,borderRadius:8,borderWidth:2,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.MD},contactButtonText:{color:l.COLORS.ACTION_PRIMARY,fontSize:S.FONT_SIZE.LG,fontWeight:'600'},ctaButton:{backgroundColor:l.COLORS.ACTION_PRIMARY,borderRadius:8,paddingHorizontal:f.SPACING.XXL,paddingVertical:f.SPACING.LG,marginBottom:f.SPACING.MD},ctaButtonText:{color:l.COLORS.TEXT_INVERSE,fontSize:S.FONT_SIZE.LG,fontWeight:'600'}})},1100,[34,222,489,516,566,565,490,493,494,557,559,562,104]);
1210__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.WarrantyScreen=function(){return(0,o.jsx)(n.DiscoursePage,{errorSurface:c.contentLoad,seoKey:"Warranty",slug:"warranty",pageName:"warranty and return policy"})},r(d[0]);var n=r(d[1]),t=r(d[2]),o=r(d[3]);const c=(0,t.defineScreenErrorSurfaces)('Warranty',{contentLoad:{id:'content-load',kind:'page',label:'Warranty content load error'}})},1101,[34,976,557,104]);
1211__d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.WhoUsesPurpleAirScreen=function(){const e=(0,O.useSeoMeta)('WhoUsesPurpleAir');return(0,T.jsxs)(S.PageLayout,{children:[(0,T.jsx)(f.WebMeta,Object.assign({},e)),(0,T.jsxs)(s.default,{style:L.MARKETING.container,children:[(0,T.jsx)(u.HeroSection,{backgroundColor:A.COLORS.BRAND_PRIMARY,background:{imageUrl:'https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80',imagePosition:'center 40%'},minHeight:480,label:"WHO USES PURPLEAIR",title:'From Schools to Satellites:\nWho Uses PurpleAir and Why',subtitle:"Affordable sensors and real-time data empower communities, schools, researchers, and agencies to map pollution, protect public health, and advance air quality science.",centered:!1,children:(0,T.jsxs)(t.default,{style:L.MARKETING.heroActions,children:[(0,T.jsx)(y.ServiceExternalLink,{service:"mapBaseUrl",style:C.primaryButton,textStyle:C.primaryButtonText,accessibilityLabel:"View the live map",children:"View Live Map"}),(0,T.jsx)(c.AppLink,{to:"Papers",style:C.secondaryButton,children:(0,T.jsx)(n.default,{style:C.secondaryButtonText,children:"Research Papers"})})]})}),(0,T.jsxs)(t.default,{style:L.MARKETING.section,children:[(0,T.jsx)(n.default,{style:L.MARKETING.sectionTitleCompact,children:"Real-Time Air Quality Maps"}),(0,T.jsx)(n.default,{style:L.MARKETING.sectionSubtitle,children:"PurpleAir sensors contribute to real-time air quality mapping on platforms like the EPA\u2019s AirNow Fire and Smoke Map and Environment and Climate Change Canada\u2019s AQHI map."}),(0,T.jsx)(t.default,{style:M.integrationsGrid,children:p.PLATFORM_INTEGRATIONS.map(e=>(0,T.jsx)(N,Object.assign({},e),e.name))})]}),(0,T.jsxs)(t.default,{style:M.logoSection,children:[(0,T.jsx)(n.default,{style:M.logoLabel,children:"DATA USED BY"}),(0,T.jsx)(t.default,{style:M.logoGrid,children:p.PARTNER_LOGOS.map(e=>(0,T.jsx)(b,Object.assign({},e),e.name))})]}),(0,T.jsxs)(t.default,{style:[L.MARKETING.section,L.MARKETING.sectionAlt],children:[(0,T.jsx)(n.default,{style:L.MARKETING.sectionTitleCompact,children:"Community Monitoring and Action"}),(0,T.jsx)(n.default,{style:L.MARKETING.sectionSubtitle,children:"Schools and public agencies distribute sensors so residents can see real-time pollution levels nearby. Cities also run lending programs that grow community awareness."}),(0,T.jsx)(t.default,{style:L.MARKETING.gridWide,children:p.COMMUNITY_STORIES.map(e=>(0,T.jsx)(E,Object.assign({},e),e.organization))})]}),(0,T.jsxs)(t.default,{style:L.MARKETING.section,children:[(0,T.jsx)(n.default,{style:L.MARKETING.sectionTitleCompact,children:"Air Quality Projects and Research"}),(0,T.jsx)(n.default,{style:L.MARKETING.sectionSubtitle,children:"Academics and government agencies use PurpleAir data for research and large projects \u2014 including NASA\u2019s Jet Propulsion Laboratory calibrating satellite pollution data."}),(0,T.jsx)(t.default,{style:M.researchList,children:p.RESEARCH_SPOTLIGHTS.map(e=>(0,T.jsx)(G,Object.assign({},e),e.name))}),(0,T.jsxs)(t.default,{style:M.researchFooter,children:[(0,T.jsx)(n.default,{style:M.researchFooterText,children:"Many more research articles and projects feature PurpleAir."}),(0,T.jsx)(c.AppLink,{to:"ExploringAirQuality",style:M.researchFooterLink,children:(0,T.jsx)(n.default,{style:M.researchFooterLinkText,children:"Explore research uses"})})]})]}),(0,T.jsxs)(t.default,{style:[L.MARKETING.ctaSection,{backgroundColor:A.COLORS.BRAND_PRIMARY}],children:[(0,T.jsx)(n.default,{style:L.MARKETING.ctaTitle,children:"Join the Network"}),(0,T.jsx)(n.default,{style:L.MARKETING.ctaSubtitle,children:"Whether you are a school, city, researcher, or neighbor \u2014 start measuring the air where you live."}),(0,T.jsxs)(t.default,{style:L.MARKETING.ctaActions,children:[(0,T.jsx)(c.AppLink,{to:"Store",style:I.ctaButton,children:(0,T.jsx)(n.default,{style:I.ctaButtonText,children:"Shop Sensors"})}),(0,T.jsx)(c.AppLink,{to:"Contact",style:I.ctaSecondaryButton,children:(0,T.jsx)(n.default,{style:I.ctaSecondaryButtonText,children:"Contact Us"})})]})]})]})]})},r(d[0]);var t=e(r(d[1])),n=e(r(d[2])),o=e(r(d[3]));r(d[4]);var s=e(r(d[5])),l=r(d[6]),c=r(d[7]),h=r(d[8]),u=r(d[9]),S=r(d[10]),y=r(d[11]),f=r(d[12]),A=r(d[13]),L=r(
1211d[14]),R=r(d[15]),x=r(d[16]),p=r(d[17]),O=r(d[18]),T=r(d[19]);const C=(0,L.createHeroButtonStyles)(A.COLORS.BG_SURFACE,A.COLORS.ACTION_PRIMARY),I=(0,L.createCTAButtonStyles)(A.COLORS.BG_SURFACE,A.COLORS.ACTION_PRIMARY);function j({href:e,style:t,accessibilityLabel:n,children:o}){return(0,h.isHttpsUrl)(e)?(0,T.jsx)(h.ExternalLink,{href:e,style:t,accessibilityLabel:n,children:o}):e.startsWith('/blog/')?(0,T.jsx)(c.AppLink,{to:"BlogArticle",href:e,style:t,accessibilityLabel:n,children:o}):(0,T.jsx)(c.AppLink,{href:e,style:t,accessibilityLabel:n,children:o})}function N({name:e,description:t,href:o}){return(0,T.jsxs)(j,{href:o,style:M.integrationCard,accessibilityLabel:`Learn more about ${e}`,children:[(0,T.jsx)(n.default,{style:M.integrationName,children:e}),(0,T.jsx)(n.default,{style:M.integrationDesc,children:t}),(0,T.jsx)(n.default,{style:M.integrationLink,children:"Learn More"})]})}function b({name:e,imageUrl:t,href:n,maxWidth:s}){return(0,T.jsx)(j,{href:n,style:M.logoTile,accessibilityLabel:e,children:(0,T.jsx)(o.default,{source:{uri:t},style:[M.logoImage,{maxWidth:s}],resizeMode:"contain",accessibilityLabel:e})})}function E({organization:e,description:t,href:o}){return(0,T.jsxs)(j,{href:o,style:M.communityCard,accessibilityLabel:`Learn more about ${e}`,children:[(0,T.jsx)(n.default,{style:M.communityOrg,children:e}),(0,T.jsx)(n.default,{style:M.communityDesc,children:t}),(0,T.jsx)(n.default,{style:M.communityLink,children:"Learn More"})]})}function G({name:e,description:s,href:l,logoUrl:c,logoMaxWidth:h}){return(0,T.jsxs)(j,{href:l,style:M.researchRow,accessibilityLabel:`Learn more about ${e}`,children:[(0,T.jsxs)(t.default,{style:M.researchCopy,children:[(0,T.jsx)(n.default,{style:M.researchName,children:e}),(0,T.jsx)(n.default,{style:M.researchDesc,children:s}),(0,T.jsx)(n.default,{style:M.researchLink,children:"Learn More"})]}),(0,T.jsx)(o.default,{source:{uri:c},style:[M.researchLogo,{maxWidth:h}],resizeMode:"contain",accessibilityLabel:`${e} logo`})]})}const M=(0,l.createStyles)({integrationsGrid:{alignSelf:'center',flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.XXL,justifyContent:'center',maxWidth:1100},integrationCard:Object.assign({backgroundColor:A.COLORS.BG_LIGHT,borderRadius:12,padding:R.SPACING.XXL,width:320},{width:340}),integrationName:{color:A.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XL,fontWeight:'700',marginBottom:R.SPACING.SM},integrationDesc:{color:A.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.LG,lineHeight:24,marginBottom:R.SPACING.MD},integrationLink:{color:A.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},logoSection:{alignItems:'center',backgroundColor:A.COLORS.BG_SURFACE,borderBottomColor:A.COLORS.BORDER_SOFT,borderBottomWidth:1,borderTopColor:A.COLORS.BORDER_SOFT,borderTopWidth:1,paddingHorizontal:R.SPACING.XXL,paddingVertical:R.SPACING.HUGE},logoLabel:{color:A.COLORS.TEXT_SOFT,fontSize:x.FONT_SIZE.XS,fontWeight:'600',letterSpacing:2,marginBottom:R.SPACING.XXL},logoGrid:{alignItems:'center',flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.XXXL,justifyContent:'center',maxWidth:900},logoTile:{alignItems:'center',height:64,justifyContent:'center',paddingHorizontal:R.SPACING.SM},logoImage:{height:56,width:140},communityCard:Object.assign({backgroundColor:A.COLORS.BG_SURFACE,borderRadius:12,padding:R.SPACING.XXL,width:320},{width:340}),communityOrg:{color:A.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.LG,fontWeight:'700',marginBottom:R.SPACING.SM},communityDesc:{color:A.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.LG,lineHeight:24,marginBottom:R.SPACING.MD},communityLink:{color:A.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},researchList:{alignSelf:'center',gap:R.SPACING.XXL,maxWidth:900,width:'100%'},researchRow:{alignItems:'center',backgroundColor:A.COLORS.BG_LIGHT,borderRadius:12,flexDirection:'row',flexWrap:'wrap',gap:R.SPACING.XXL,justifyContent:'space-between',padding:R.SPACING.XXL},researchCopy:{flex:1,minWidth:240},researchName:{color:A.COLORS.TEXT_HEADING,fontSize:x.FONT_SIZE.XXL,fontWeight:'700',marginBottom:R.SPACING.SM},researchDesc:{color:A.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.LG,lineHeight:24,marginBottom:R.SPACING.MD},researchLink:{color:A.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.SM,fontWeight:'600'},researchLogo:{height:100,width:140},researchFooter:{alignItems:'center',marginTop:R.SPACING.HUGE},researchFooterText:{color:A.COLORS.TEXT_MUTED,fontSize:x.FONT_SIZE.LG,marginBottom:R.SPACING.MD,textAlign:'center'},researchFooterLink:{paddingVertical:R.SPACING.SM},researchFooterLinkText:{color:A.COLORS.BRAND_PRIMARY,fontSize:x.FONT_SIZE.LG,fontWeight:'600',textDecorationLine:'underline'}})},1102,[34,276,222,328,95,283,489,516,519,674,568,522,565,490,676,493,494,1103,562,104]);
1212__d(function(g,r,i,a,m,e,d){"use strict";
1212Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PLATFORM_INTEGRATIONS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"PARTNER_LOGOS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"COMMUNITY_STORIES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"RESEARCH_SPOTLIGHTS",{enumerable:!0,get:function(){return s}});const t=[{name:'Paku',description:'A dedicated mobile app that transforms PurpleAir sensor data into an easy-to-use format, giving users quick access to convenient air quality reports.',href:'/blog/the-paku-app-view-purpleair-air-quality-data'},{name:'Watch Duty',description:'Originally designed for wildfire alerts, Watch Duty now integrates PurpleAir data to provide real-time air quality updates during active fires.',href:'https://support.watchduty.org/hc/en-us/articles/16881246626957-What-is-the-Air-Quality-Index-AQI-map-layer'},{name:'SC-AQMD',description:'South Coast Air Quality Management District incorporates PurpleAir sensor data into its research and public map, comparing it with official regulatory monitors.',href:'https://www.aqmd.gov/home/air-quality/current-air-quality-data/aqi-information-and-faqs'},{name:'OpenSnow',description:'Skiers and outdoor adventurers can see air quality data alongside snow forecasts, understanding how pollution might impact visibility and health.',href:'https://support.opensnow.com/feature-guides/air-quality-map'},{name:'Windy.com',description:'An interactive air quality map that displays PurpleAir PM (particulate matter) levels alongside global weather patterns.',href:'https://community.windy.com/topic/15970/we-have-added-12-000-air-quality-stations'},{name:'Weather Underground',description:'WU integrates PurpleAir sensor data into its weather reports, making it easy to see PM2.5 levels alongside temperature, humidity, and other conditions.',href:'https://www.wunderground.com/sensors/purpleair'},{name:'ECCC',description:'Environment and Climate Change Canada includes PurpleAir data alongside government monitors on their AQHI map for a comprehensive view of air quality.',href:'https://aqmap.ca/aqmap'},{name:'EPA',description:'The EPA incorporates PurpleAir data into its AirNow Fire and Smoke Map, providing real-time crowd-sourced readings alongside official monitoring stations.',href:'https://www.epa.gov/sciencematters/epa-research-improves-air-quality-information-public-airnow-fire-and-smoke-map'},{name:'Google',description:'Google integrates PurpleAir data into Google Search and Google Maps to help people check localized air quality with a quick search.',href:'https://blog.google/products/search/get-some-fresh-air-outdoors-with-google/'}],o=[{name:'South Coast AQMD',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_aqmd.png?v=1739486193',href:'https://www.aqmd.gov/home/air-quality/current-air-quality-data/aqi-information-and-faqs',maxWidth:100},{name:'Google',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_google.png?v=1739486193',href:'https://blog.google/products/search/get-some-fresh-air-outdoors-with-google/',maxWidth:140},{name:'Environment and Climate Change Canada',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_canada.png?v=1739486193',href:'https://aqmap.ca/aqmap',maxWidth:140},{name:'U.S. EPA',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_epa.png?v=1739824102',href:'https://www.epa.gov/sciencematters/epa-research-improves-air-quality-information-public-airnow-fire-and-smoke-map',maxWidth:120},{name:'Weather Underground',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_weatherunderground.png?v=1739486193',href:'https://www.wunderground.com/sensors/purpleair',maxWidth:130},{name:'Watch Duty',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/affiliates-gallery-watch-duty.png?v=1738707501',href:'https://support.watchduty.org/hc/en-us/articles/16881246626957-What-is-the-Air-Quality-Index-AQI-map-layer',maxWidth:130},{name:'Windy',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_windy.png?v=1739486193',href:'https://community.windy.com/topic/15970/we-have-added-12-000-air-quality-stations',maxWidth:140},{name:'Paku',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_paku.png?v=1739486193',href:'/blog/the-paku-app-view-purpleair-air-quality-data',maxWidth:120},{name:'OpenSnow',imageUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/gallery_opensnow.png?v=1739486193',href:'https://support.opensnow.com/feature-guides/air-quality-map',maxWidth:140}],n=[{organization:'Montana Department of Environmental Quality (DEQ)',description:'The Montana DEQ deploys PurpleAir sensors in high schools across the state, spreading air quality awareness to the community. This helps residents make data-driven health decisions and officials track air pollution and take action.',href:'https://deq.mt.gov/air/Programs/monitoring'},{organization:'Sandy City, Utah',description:'Sandy City partnered with PurpleAir to install air quality sensors throughout the city. This initiative gives residents access to real-time air quality data, allowing them to make informed choices about outdoor activities.',href:'https://sandy.utah.gov/2284/Air-Quality-Monitoring'},{organization:'Benicia Unified School District (BUSD)',description:'BUSD integrates PurpleAir sensors into its decision-making processes to protect students, faculty, and staff. By monitoring air quality through both PurpleAir and the EPA\u2019s AirNow system, school administrators can determine whether modified schedules or school 
1212closures are necessary.',href:'https://beniciaunified.org/air-quality-monitoring/purple-air/'},{organization:'CleanAIRE NC',description:'CleanAIRE NC is a community-based organization that deploys PurpleAir sensors to empower local residents. One of its first major initiatives placed sensors in Charlotte, NC\u2019s historic West End neighborhood, allowing residents to monitor pollution levels in their community.',href:'/blog/how-cleanaire-nc-successfully-integrated-purpleair-sensors'},{organization:'University of Minnesota Rochester',description:'At the University of Minnesota Rochester, PurpleAir sensors play a key role in student-led air quality research. One notable project, launched by student Matthew Spiten, used these sensors to collect citywide air pollution data and develop predictive models.',href:'https://dmc.mn/a-new-tool-for-decision-making-rochesters-air-quality-sensor-network-safeguarding-air-quality-through-data/'},{organization:'Minneapolis, Minnesota',description:'Minneapolis has embraced PurpleAir as part of its community-driven air monitoring efforts. The city runs a lending program enabling residents to host sensors, expanding the monitoring network while increasing public engagement.',href:'https://www.minneapolismn.gov/government/programs-initiatives/environmental-programs/air-quality/'}],s=[{name:'NASA',description:'NASA\u2019s Multi-Angle Imager for Aerosols (MAIA) project integrates PurpleAir data to enhance satellite-based air quality monitoring. By combining satellite imaging with ground-based sensors, NASA improves air quality assessments and deepens research into the health effects of airborne particles.',href:'https://maia.jpl.nasa.gov/mission/',logoUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/NASA_logo_svg.png?v=1738707228',logoMaxWidth:120},{name:'RISE Communities',description:'Research Innovations using Sensor Technology in Environmental Justice Communities (RISE Communities) helps research groups from environmental justice communities monitor their own air quality. They provide training programs and tools to help resident and researcher teams collect, analyze, and advocate for cleaner air.',href:'https://www.ejsensors.com/our-in-person-program',logoUrl:'https://cdn.shopify.com/s/files/1/0080/5552/1377/files/RISE_Transparent.png?v=1739492301',logoMaxWidth:140}]},1103,[]);
1213__r(3);
1214__r(0);

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.