1var Ere=Object.defineProperty;var xre=(e,t,n)=>t in e?Ere(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var G=(e,t,n)=>(xre(e,typeof t!="symbol"?t+"":t,n),n),tC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Dt=(e,t,n)=>(tC(e,t,"read from private field"),n?n.call(e):t.get(e)),Zr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Os=(e,t,n,r)=>(tC(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Rn=(e,t,n)=>(tC(e,t,"access private method"),n);import{r as p,R as o,a as kl,b as u5,g as id,d as Ub,e as rE}from"./client.d2090ace.js";import{s as dn,_ as VH,t as UH,e as xr,u as od,v as BH,x as jH,C as WH,y as aE,z as Xs,A as gM,B as su,D as _re,S as kre,E as Sre,F as bp,G as sE,L as Cre,H as Py,I as wp,J as Nre,K as GH,M as Rd,N as Rre,O as Tre,P as rR,Q as qH,R as Are,T as Ire,U as R_,V as Ore,W as YH,X as Mre,j as za,h as pt,$ as Ze,g as Ir,i as Pre,k as of,d as Ts,o as fg,Y as vM,Z as Dre,a0 as Ep,a1 as xp,a2 as Dy,m as yM,n as KH,a3 as Lre,a4 as $re,a5 as T_,a6 as Fre,q as Bb,p as jb,r as Wb,w as Gb,a7 as zre}from"./brand.924cec70.js";const Hre="modulepreload",Vre=function(e){return"/"+e},d5={},yn=function(t,n,r){if(!n||n.length===0)return t();const a=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=Vre(s),s in d5)return;d5[s]=!0;const i=s.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(!!r)for(let d=a.length-1;d>=0;d--){const f=a[d];if(f.href===s&&(!i||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${l}`))return;const u=document.createElement("link");if(u.rel=i?"stylesheet":Hre,i||(u.as="script",u.crossOrigin=""),u.href=s,document.head.appendChild(u),i)return new Promise((d,f)=>{u.addEventListener("load",d),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})};var ZH={exports:{}},XH={};/** 2 * @license React 3 * use-sync-external-store-shim.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var _p=p;function Ure(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bre=typeof Object.is=="function"?Object.is:Ure,jre=_p.useState,Wre=_p.useEffect,Gre=_p.useLayoutEffect,qre=_p.useDebugValue;function Yre(e,t){var n=t(),r=jre({inst:{value:n,getSnapshot:t}}),a=r[0].inst,s=r[1];return Gre(function(){a.value=n,a.getSnapshot=t,nC(a)&&s({inst:a})},[e,n,t]),Wre(function(){return nC(a)&&s({inst:a}),e(function(){nC(a)&&s({inst:a})})},[e]),qre(n),n}function nC(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bre(e,n)}catch{return!0}}function Kre(e,t){return t()}var Zre=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Kre:Yre;XH.useSyncExternalStore=_p.useSyncExternalStore!==void 0?_p.useSyncExternalStore:Zre;ZH.exports=XH;var Xre=ZH.exports,QH={exports:{}},JH={};/** 10 * @license React 11 * use-sync-external-store-shim/with-selector.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var A_=p,Qre=Xre;function Jre(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var eae=typeof Object.is=="function"?Object.is:Jre,tae=Qre.useSyncExternalStore,nae=A_.useRef,rae=A_.useEffect,aae=A_.useMemo,sae=A_.useDebugValue;JH.useSyncExternalStoreWithSelector=function(e,t,n,r,a){var s=nae(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=aae(function(){function c(h){if(!u){if(u=!0,d=h,h=r(h),a!==void 0&&i.hasValue){var g=i.value;if(a(g,h))return f=g}return f=h}if(g=f,eae(d,h))return g;var v=r(h);return a!==void 0&&a(g,v)?g:(d=h,f=v)}var u=!1,d,f,m=n===void 0?null:n;return[function(){return c(t())},m===null?void 0:function(){return c(m())}]},[t,n,r,a]);var l=tae(e,s[0],s[1]);return rae(function(){i.hasValue=!0,i.value=l},[l]),sae(l),l};QH.exports=JH;var iae=QH.exports;function oae(e){e()}let eV=oae;const lae=e=>eV=e,cae=()=>eV,Gd=p.createContext(null);function tV(){return p.useContext(Gd)}const uae=()=>{throw new Error("uSES not initialized!")};let nV=uae;const dae=e=>{nV=e},fae=(e,t)=>e===t;function mae(e=Gd){const t=e===Gd?tV:()=>p.useContext(e);return function(r,a=fae){const{store:s,subscription:i,getServerState:l}=t(),c=nV(i.addNestedSub,s.getState,l||s.getState,r,a);return p.useDebugValue(c),c}}const Wn=mae();
17var rV={exports:{}},wa={};/** @license React v16.13.1 18 * react-is.production.min.js 19 * 20 * Copyright (c) Facebook, Inc. and its affiliates. 21 * 22 * This source code is licensed under the MIT license found in the 23 * LICENSE file in the root directory of this source tree. 24 */var ei=typeof Symbol=="function"&&Symbol.for,bM=ei?Symbol.for("react.element"):60103,wM=ei?Symbol.for("react.portal"):60106,I_=ei?Symbol.for("react.fragment"):60107,O_=ei?Symbol.for("react.strict_mode"):60108,M_=ei?Symbol.for("react.profiler"):60114,P_=ei?Symbol.for("react.provider"):60109,D_=ei?Symbol.for("react.context"):60110,EM=ei?Symbol.for("react.async_mode"):60111,L_=ei?Symbol.for("react.concurrent_mode"):60111,$_=ei?Symbol.for("react.forward_ref"):60112,F_=ei?Symbol.for("react.suspense"):60113,hae=ei?Symbol.for("react.suspense_list"):60120,z_=ei?Symbol.for("react.memo"):60115,H_=ei?Symbol.for("react.lazy"):60116,pae=ei?Symbol.for("react.block"):60121,gae=ei?Symbol.for("react.fundamental"):60117,vae=ei?Symbol.for("react.responder"):60118,yae=ei?Symbol.for("react.scope"):60119;function al(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bM:switch(e=e.type,e){case EM:case L_:case I_:case M_:case O_:case F_:return e;default:switch(e=e&&e.$$typeof,e){case D_:case $_:case H_:case z_:case P_:return e;default:return t}}case wM:return t}}}function aV(e){return al(e)===L_}wa.AsyncMode=EM;wa.ConcurrentMode=L_;wa.ContextConsumer=D_;wa.ContextProvider=P_;wa.Element=bM;wa.ForwardRef=$_;wa.Fragment=I_;wa.Lazy=H_;wa.Memo=z_;wa.Portal=wM;wa.Profiler=M_;wa.StrictMode=O_;wa.Suspense=F_;wa.isAsyncMode=function(e){return aV(e)||al(e)===EM};wa.isConcurrentMode=aV;wa.isContextConsumer=function(e){return al(e)===D_};wa.isContextProvider=function(e){return al(e)===P_};wa.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bM};wa.isForwardRef=function(e){return al(e)===$_};wa.isFragment=function(e){return al(e)===I_};wa.isLazy=function(e){return al(e)===H_};wa.isMemo=function(e){return al(e)===z_};wa.isPortal=function(e){return al(e)===wM};wa.isProfiler=function(e){return al(e)===M_};wa.isStrictMode=function(e){return al(e)===O_};wa.isSuspense=function(e){return al(e)===F_};wa.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===I_||e===L_||e===M_||e===O_||e===F_||e===hae||typeof e=="object"&&e!==null&&(e.$$typeof===H_||e.$$typeof===z_||e.$$typeof===P_||e.$$typeof===D_||e.$$typeof===$_||e.$$typeof===gae||e.$$typeof===vae||e.$$typeof===yae||e.$$typeof===pae)};wa.typeOf=al;rV.exports=wa;var bae=rV.exports,sV=bae,wae={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Eae={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},iV={};iV[sV.ForwardRef]=wae;iV[sV.Memo]=Eae;var ka={};/** 25 * @license React 26 * react-is.production.min.js 27 * 28 * Copyright (c) Facebook, Inc. and its affiliates. 29 * 30 * This source code is licensed under the MIT license found in the 31 * LICENSE file in the root directory of this source tree. 32 */var xM=Symbol.for("react.element"),_M=Symbol.for("react.portal"),V_=Symbol.for("react.fragment"),U_=Symbol.for("react.strict_mode"),B_=Symbol.for("react.profiler"),j_=Symbol.for("react.provider"),W_=Symbol.for("react.context"),xae=Symbol.for("react.server_context"),G_=Symbol.for("react.forward_ref"),q_=Symbol.for("react.suspense"),Y_=Symbol.for("react.suspense_list"),K_=Symbol.for("react.memo"),Z_=Symbol.for("react.lazy"),_ae=Symbol.for("react.offscreen"),oV;oV=Symbol.for("react.module.reference");function zl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xM:switch(e=e.type,e){case V_:case B_:case U_:case q_:case Y_:return e;default:switch(e=e&&e.$$typeof,e){case xae:case W_:case G_:case Z_:case K_:case j_:return e;default:return t}}case _M:return t}}}ka.ContextConsumer=W_;ka.ContextProvider=j_;ka.Element=xM;ka.ForwardRef=G_;ka.Fragment=V_;ka.Lazy=Z_;ka.Memo=K_;ka.Portal=_M;ka.Profiler=B_;ka.StrictMode=U_;ka.Suspense=q_;ka.SuspenseList=Y_;ka.isAsyncMode=function(){return!1};ka.isConcurrentMode=function(){return!1};ka.isContextConsumer=function(e){return zl(e)===W_};ka.isContextProvider=function(e){return zl(e)===j_};ka.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xM};ka.isForwardRef=function(e){return zl(e)===G_};ka.isFragment=function(e){return zl(e)===V_};ka.isLazy=function(e){return zl(e)===Z_};ka.isMemo=function(e){return zl(e)===K_};ka.isPortal=function(e){return zl(e)===_M};ka.isProfiler=function(e){return zl(e)===B_};ka.isStrictMode=function(e){return zl(e)===U_};ka.isSuspense=function(e){return zl(e)===q_};ka.isSuspenseList=function(e){return zl(e)===Y_};ka.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===V_||e===B_||e===U_||e===q_||e===Y_||e===_ae||typeof e=="object"&&e!==null&&(e.$$typeof===Z_||e.$$typeof===K_||e.$$typeof===j_||e.$$typeof===W_||e.$$typeof===G_||e.$$typeof===oV||e.getModuleId!==void 0)};ka.typeOf=zl;function kae(){const e=cae();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],a=t;for(;a;)r.push(a),a=a.next;return r},subscribe(r){let a=!0,s=n={callback:r,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!a||t===null||(a=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}const f5={notify(){},get:()=>[]};function Sae(e,t){let n,r=f5;function a(f){return c(),r.subscribe(f)}function s(){r.notify()}function i(){d.onStateChange&&d.onStateChange()}function l(){return!!n}function c(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=kae())}function u(){n&&(n(),n=void 0,r.clear(),r=f5)}const d={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:i,isSubscribed:l,trySubscribe:c,tryUnsubscribe:u,getListeners:()=>r};return d}const Cae=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Nae=Cae?p.useLayoutEffect:p.useEffect;function Rae({store:e,context:t,children:n,serverState:r}){const a=p.useMemo(()=>{const l=Sae(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0}},[e,r]),s=p.useMemo(()=>e.getState(),[e]);Nae(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,s]);const i=t||Gd;return o.createElement(i.Provider,{value:a},n)}function lV(e=Gd){const t=e===Gd?tV:()=>p.useContext(e);return function(){const{store:r}=t();return r}}const Tae=lV();function Aae(e=Gd){const t=e===Gd?Tae:lV(e);return function(){return t().dispatch}}const Iae=Aae();dae(iae.useSyncExternalStoreWithSelector);lae(kl.unstable_batchedUpdates);const m5="@firebase/database",h5="1.0.8";/** 33 * @license 34 * Copyright 2019 Google LLC 35 * 36 * Licensed under the Apache License, Version 2.0 (the "License");
37 * you may not use this file except in compliance with the License. 38 * You may obtain a copy of the License at 39 * 40 * http://www.apache.org/licenses/LICENSE-2.0 41 * 42 * Unless required by applicable law or agreed to in writing, software 43 * distributed under the License is distributed on an "AS IS" BASIS, 44 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 45 * See the License for the specific language governing permissions and 46 * limitations under the License. 47 */let cV="";function Oae(e){cV=e}/** 48 * @license 49 * Copyright 2017 Google LLC 50 * 51 * Licensed under the Apache License, Version 2.0 (the "License"); 52 * you may not use this file except in compliance with the License. 53 * You may obtain a copy of the License at 54 * 55 * http://www.apache.org/licenses/LICENSE-2.0 56 * 57 * Unless required by applicable law or agreed to in writing, software 58 * distributed under the License is distributed on an "AS IS" BASIS, 59 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 60 * See the License for the specific language governing permissions and 61 * limitations under the License. 62 */class Mae{constructor(t){this.domStorage_=t,this.prefix_="firebase:"}set(t,n){n==null?this.domStorage_.removeItem(this.prefixedName_(t)):this.domStorage_.setItem(this.prefixedName_(t),Xs(n))}get(t){const n=this.domStorage_.getItem(this.prefixedName_(t));return n==null?null:gM(n)}remove(t){this.domStorage_.removeItem(this.prefixedName_(t))}prefixedName_(t){return this.prefix_+t}toString(){return this.domStorage_.toString()}}/** 63 * @license 64 * Copyright 2017 Google LLC 65 * 66 * Licensed under the Apache License, Version 2.0 (the "License"); 67 * you may not use this file except in compliance with the License. 68 * You may obtain a copy of the License at 69 * 70 * http://www.apache.org/licenses/LICENSE-2.0 71 * 72 * Unless required by applicable law or agreed to in writing, software 73 * distributed under the License is distributed on an "AS IS" BASIS, 74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 * See the License for the specific language governing permissions and 76 * limitations under the License. 77 */class Pae{constructor(){this.cache_={},this.isInMemoryStorage=!0}set(t,n){n==null?delete this.cache_[t]:this.cache_[t]=n}get(t){return su(this.cache_,t)?this.cache_[t]:null}remove(t){delete this.cache_[t]}}/** 78 * @license 79 * Copyright 2017 Google LLC 80 * 81 * Licensed under the Apache License, Version 2.0 (the "License"); 82 * you may not use this file except in compliance with the License. 83 * You may obtain a copy of the License at 84 * 85 * http://www.apache.org/licenses/LICENSE-2.0 86 * 87 * Unless required by applicable law or agreed to in writing, software 88 * distributed under the License is distributed on an "AS IS" BASIS, 89 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 90 * See the License for the specific language governing permissions and 91 * limitations under the License. 92 */const uV=function(e){try{if(typeof window<"u"&&typeof window[e]<"u"){const t=window[e];return t.setItem("firebase:sentinel","cache"),t.removeItem("firebase:sentinel"),new Mae(t)}}catch{}return new Pae},Ff=uV("localStorage"),aR=uV("sessionStorage");/** 93 * @license 94 * Copyright 2017 Google LLC 95 * 96 * Licensed under the Apache License, Version 2.0 (the "License"); 97 * you may not use this file except in compliance with the License. 98 * You may obtain a copy of the License at 99 * 100 * http://www.apache.org/licenses/LICENSE-2.0 101 * 102 * Unless required by applicable law or agreed to in writing, software 103 * distributed under the License is distributed on an "AS IS" BASIS, 104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 105 * See the License for the specific language governing permissions and 106 * limitations under the License. 107 */const Hh=new Cre("@firebase/database"),Dae=function(){let e=1;return function(){return e++}}(),dV=function(e){const t=_re(e),n=new kre;n.update(t);const r=n.digest();return Sre.encodeByteArray(r)},Ly=function(...e){let t="";for(let n=0;n<e.length;n++){const r=e[n];Array.isArray(r)||r&&typeof r=="object"&&typeof r.length=="number"?t+=Ly.apply(null,r):typeof r=="object"?t+=Xs(r):t+=r,t+=" "}return t};let tm=null,p5=!0;const Lae=function(e,t){dn(!t||e===!0||e===!1,"Can't turn on custom loggers persistently."),e===!0?(Hh.logLevel=Nre.VERBOSE,tm=Hh.log.bind(Hh),t&&aR.set("logging_enabled",!0)):typeof e=="function"?tm=e:(tm=null,aR.remove("logging_enabled"))},ii=function(...e){if(p5===!0&&(p5=!1,tm===null&&aR.get("logging_enabled")===!0&&Lae(!0)),tm){const t=Ly.apply(null,e);tm(t)}},$y=function(e){return function(...t){ii(e,...t)}},sR=function(...e){const t="FIREBASE INTERNAL ERROR: "+Ly(...e);Hh.error(t)},Ku=function(...e){const t=`FIREBASE FATAL ERROR: ${Ly(...e)}`;throw Hh.error(t),new Error(t)},ho=function(...e){const t="FIREBASE WARNING: "+Ly(...e);Hh.warn(t)},$ae=function(){typeof window<"u"&&window.location&&window.location.protocol&&window.location.protocol.indexOf("https:")!==-1&&ho("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},X_=function(e){return typeof e=="number"&&(e!==e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY)},Fae=function(e){if(document.readyState==="complete")e();else{let t=!1;const n=function(){if(!document.body){setTimeout(n,Math.floor(10));return}t||(t=!0,e())};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",()=>{document.readyState==="complete"&&n()}),window.attachEvent("onload",n))}},kp="[MIN_NAME]",fm="[MAX_NAME]",$m=function(e,t){if(e===t)return 0;if(e===kp||t===fm)return-1;if(t===kp||e===fm)return 1;{const n=g5(e),r=g5(t);return n!==null?r!==null?n-r===0?e.length-t.length:n-r:-1:r!==null?1:e<t?-1:1}},zae=function(e,t){return e===t?0:e<t?-1:1},Wg=function(e,t){if(t&&e in t)return t[e];throw new Error("Missing required key ("+e+") in object: "+Xs(t))},kM=function(e){if(typeof e!="object"||e===null)return Xs(e);const t=[];for(const r in e)t.push(r);t.sort();let n="{";for(let r=0;r<t.length;r++)r!==0&&(n+=","),n+=Xs(t[r]),n+=":",n+=kM(e[t[r]]);return n+="}",n},fV=function(e,t){const n=e.length;if(n<=t)return[e];const r=[];for(let a=0;a<n;a+=t)a+t>n?r.push(e.substring(a,n)):r.push(e.substring(a,a+t));return r};function Si(e,t){for(const n in e)e.hasOwnProperty(n)&&t(n,e[n])}const mV=function(e){dn(!X_(e),"Invalid JSON number");const t=11,n=52,r=(1<<t-1)-1;let a,s,i,l,c;e===0?(s=0,i=0,a=1/e===-1/0?1:0):(a=e<0,e=Math.abs(e),e>=Math.pow(2,1-r)?(l=Math.min(Math.floor(Math.log(e)/Math.LN2),r),s=l+r,i=Math.round(e*Math.pow(2,n-l)-Math.pow(2,n))):(s=0,i=Math.round(e/Math.pow(2,1-r-n))));const u=[];for(c=n;c;c-=1)u.push(i%2?1:0),i=Math.floor(i/2);for(c=t;c;c-=1)u.push(s%2?1:0),s=Math.floor(s/2);u.push(a?1:0),u.reverse();const d=u.join("");let f="";for(c=0;c<64;c+=8){let m=parseInt(d.substr(c,8),2).toString(16);m.length===1&&(m="0"+m),f=f+m}return f.toLowerCase()},Hae=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},Vae=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function Uae(e,t){let n="Unknown Error";e==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":e==="permission_denied"?n="Client doesn't have permission to access the desired data.":e==="unavailable"&&(n="The service is unavailable");const r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}const Bae=new RegExp("^-?(0*)\\d{1,10}$"),jae=-2147483648,Wae=2147483647,g5=function(e){if(Bae.test(e)){const t=Number(e);if(t>=jae&&t<=Wae)return t}return null},mg=function(e){try{e()}catch(t){setTimeout(()=>{const n=t.stack||"";throw ho("Exception was thrown by user callback.",n),t},Math.floor(0))}},Gae=function(){return(typeof window=="object"&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},V0=function(e,t){const n=setTimeout(e,t);return typeof n=="number"&&typeof Deno<"u"&&Deno.unrefTimer?Deno.unrefTimer(n):typeof n=="object"&&n.unref&&n.unref(),n};/** 108 * @license 109 * Copyright 2021 Google LLC 110 * 111 * Licensed under the Apache License, Version 2.0 (the "License");
112 * you may not use this file except in compliance with the License. 113 * You may obtain a copy of the License at 114 * 115 * http://www.apache.org/licenses/LICENSE-2.0 116 * 117 * Unless required by applicable law or agreed to in writing, software 118 * distributed under the License is distributed on an "AS IS" BASIS, 119 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 120 * See the License for the specific language governing permissions and 121 * limitations under the License. 122 */class qae{constructor(t,n){this.appName_=t,this.appCheckProvider=n,this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(r=>this.appCheck=r)}getToken(t){return this.appCheck?this.appCheck.getToken(t):new Promise((n,r)=>{setTimeout(()=>{this.appCheck?this.getToken(t).then(n,r):n(null)},0)})}addTokenChangeListener(t){var n;(n=this.appCheckProvider)===null||n===void 0||n.get().then(r=>r.addTokenListener(t))}notifyForInvalidToken(){ho(`Provided AppCheck credentials for the app named "${this.appName_}" are invalid. This usually indicates your app was not initialized correctly.`)}}/** 123 * @license 124 * Copyright 2017 Google LLC 125 * 126 * Licensed under the Apache License, Version 2.0 (the "License"); 127 * you may not use this file except in compliance with the License. 128 * You may obtain a copy of the License at 129 * 130 * http://www.apache.org/licenses/LICENSE-2.0 131 * 132 * Unless required by applicable law or agreed to in writing, software 133 * distributed under the License is distributed on an "AS IS" BASIS, 134 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135 * See the License for the specific language governing permissions and 136 * limitations under the License. 137 */class Yae{constructor(t,n,r){this.appName_=t,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(a=>this.auth_=a)}getToken(t){return this.auth_?this.auth_.getToken(t).catch(n=>n&&n.code==="auth/token-not-initialized"?(ii("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(n)):new Promise((n,r)=>{setTimeout(()=>{this.auth_?this.getToken(t).then(n,r):n(null)},0)})}addTokenChangeListener(t){this.auth_?this.auth_.addAuthTokenListener(t):this.authProvider_.get().then(n=>n.addAuthTokenListener(t))}removeTokenChangeListener(t){this.authProvider_.get().then(n=>n.removeAuthTokenListener(t))}notifyForInvalidToken(){let t='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',ho(t)}}class Vh{constructor(t){this.accessToken=t}getToken(t){return Promise.resolve({accessToken:this.accessToken})}addTokenChangeListener(t){t(this.accessToken)}removeTokenChangeListener(t){}notifyForInvalidToken(){}}Vh.OWNER="owner";/** 138 * @license 139 * Copyright 2017 Google LLC 140 * 141 * Licensed under the Apache License, Version 2.0 (the "License"); 142 * you may not use this file except in compliance with the License. 143 * You may obtain a copy of the License at 144 * 145 * http://www.apache.org/licenses/LICENSE-2.0 146 * 147 * Unless required by applicable law or agreed to in writing, software 148 * distributed under the License is distributed on an "AS IS" BASIS, 149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 150 * See the License for the specific language governing permissions and 151 * limitations under the License. 152 */const SM="5",hV="v",pV="s",gV="r",vV="f",yV=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,bV="ls",wV="p",iR="ac",EV="websocket",xV="long_polling";/** 153 * @license 154 * Copyright 2017 Google LLC 155 * 156 * Licensed under the Apache License, Version 2.0 (the "License");
157 * you may not use this file except in compliance with the License. 158 * You may obtain a copy of the License at 159 * 160 * http://www.apache.org/licenses/LICENSE-2.0 161 * 162 * Unless required by applicable law or agreed to in writing, software 163 * distributed under the License is distributed on an "AS IS" BASIS, 164 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 165 * See the License for the specific language governing permissions and 166 * limitations under the License. 167 */class _V{constructor(t,n,r,a,s=!1,i="",l=!1,c=!1){this.secure=n,this.namespace=r,this.webSocketOnly=a,this.nodeAdmin=s,this.persistenceKey=i,this.includeNamespaceInQueryParams=l,this.isUsingEmulator=c,this._host=t.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=Ff.get("host:"+t)||this._host}isCacheableHost(){return this.internalHost.substr(0,2)==="s-"}isCustomHost(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"}get host(){return this._host}set host(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&Ff.set("host:"+this._host,this.internalHost))}toString(){let t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t}toURLString(){const t=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?`?ns=${this.namespace}`:"";return`${t}${this.host}/${n}`}}function Kae(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams}function kV(e,t,n){dn(typeof t=="string","typeof type must == string"),dn(typeof n=="object","typeof params must == object");let r;if(t===EV)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else if(t===xV)r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+t);Kae(e)&&(n.ns=e.namespace);const a=[];return Si(n,(s,i)=>{a.push(s+"="+i)}),r+a.join("&")}/** 168 * @license 169 * Copyright 2017 Google LLC 170 * 171 * Licensed under the Apache License, Version 2.0 (the "License"); 172 * you may not use this file except in compliance with the License. 173 * You may obtain a copy of the License at 174 * 175 * http://www.apache.org/licenses/LICENSE-2.0 176 * 177 * Unless required by applicable law or agreed to in writing, software 178 * distributed under the License is distributed on an "AS IS" BASIS, 179 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 180 * See the License for the specific language governing permissions and 181 * limitations under the License. 182 */class Zae{constructor(){this.counters_={}}incrementCounter(t,n=1){su(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=n}get(){return Ore(this.counters_)}}/** 183 * @license 184 * Copyright 2017 Google LLC 185 * 186 * Licensed under the Apache License, Version 2.0 (the "License"); 187 * you may not use this file except in compliance with the License. 188 * You may obtain a copy of the License at 189 * 190 * http://www.apache.org/licenses/LICENSE-2.0 191 * 192 * Unless required by applicable law or agreed to in writing, software 193 * distributed under the License is distributed on an "AS IS" BASIS, 194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 195 * See the License for the specific language governing permissions and 196 * limitations under the License. 197 */const rC={},aC={};function CM(e){const t=e.toString();return rC[t]||(rC[t]=new Zae),rC[t]}function Xae(e,t){const n=e.toString();return aC[n]||(aC[n]=t()),aC[n]}/** 198 * @license 199 * Copyright 2017 Google LLC 200 * 201 * Licensed under the Apache License, Version 2.0 (the "License"); 202 * you may not use this file except in compliance with the License. 203 * You may obtain a copy of the License at 204 * 205 * http://www.apache.org/licenses/LICENSE-2.0 206 * 207 * Unless required by applicable law or agreed to in writing, software 208 * distributed under the License is distributed on an "AS IS" BASIS, 209 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 210 * See the License for the specific language governing permissions and 211 * limitations under the License. 212 */class Qae{constructor(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}closeAfter(t,n){this.closeAfterResponse=t,this.onClose=n,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)}handleResponse(t,n){for(this.pendingResponses[t]=n;this.pendingResponses[this.currentResponseNum];){const r=this.pendingResponses[this.currentResponseNum];delete this.pendingResponses[this.currentResponseNum];for(let a=0;a<r.length;++a)r[a]&&mg(()=>{this.onMessage_(r[a])});if(this.currentResponseNum===this.closeAfterResponse){this.onClose&&(this.onClose(),this.onClose=null);break}this.currentResponseNum++}}}/** 213 * @license 214 * Copyright 2017 Google LLC 215 * 216 * Licensed under the Apache License, Version 2.0 (the "License");
217 * you may not use this file except in compliance with the License. 218 * You may obtain a copy of the License at 219 * 220 * http://www.apache.org/licenses/LICENSE-2.0 221 * 222 * Unless required by applicable law or agreed to in writing, software 223 * distributed under the License is distributed on an "AS IS" BASIS, 224 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 225 * See the License for the specific language governing permissions and 226 * limitations under the License. 227 */const v5="start",Jae="close",ese="pLPCommand",tse="pRTLPCB",SV="id",CV="pw",NV="ser",nse="cb",rse="seg",ase="ts",sse="d",ise="dframe",RV=1870,TV=30,ose=RV-TV,lse=25e3,cse=3e4;class Sh{constructor(t,n,r,a,s,i,l){this.connId=t,this.repoInfo=n,this.applicationId=r,this.appCheckToken=a,this.authToken=s,this.transportSessionId=i,this.lastSessionId=l,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=$y(t),this.stats_=CM(n),this.urlFn=c=>(this.appCheckToken&&(c[iR]=this.appCheckToken),kV(n,xV,c))}open(t,n){this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new Qae(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(()=>{this.log_("Timed out trying to connect."),this.onClosed_(),this.connectTimeoutTimer_=null},Math.floor(cse)),Fae(()=>{if(this.isClosed_)return;this.scriptTagHolder=new NM((...s)=>{const[i,l,c,u,d]=s;if(this.incrementIncomingBytes_(s),!!this.scriptTagHolder)if(this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null),this.everConnected_=!0,i===v5)this.id=l,this.password=c;else if(i===Jae)l?(this.scriptTagHolder.sendNewPolls=!1,this.myPacketOrderer.closeAfter(l,()=>{this.onClosed_()})):this.onClosed_();else throw new Error("Unrecognized command received: "+i)},(...s)=>{const[i,l]=s;this.incrementIncomingBytes_(s),this.myPacketOrderer.handleResponse(i,l)},()=>{this.onClosed_()},this.urlFn);const r={};r[v5]="t",r[NV]=Math.floor(Math.random()*1e8),this.scriptTagHolder.uniqueCallbackIdentifier&&(r[nse]=this.scriptTagHolder.uniqueCallbackIdentifier),r[hV]=SM,this.transportSessionId&&(r[pV]=this.transportSessionId),this.lastSessionId&&(r[bV]=this.lastSessionId),this.applicationId&&(r[wV]=this.applicationId),this.appCheckToken&&(r[iR]=this.appCheckToken),typeof location<"u"&&location.hostname&&yV.test(location.hostname)&&(r[gV]=vV);const a=this.urlFn(r);this.log_("Connecting via long-poll to "+a),this.scriptTagHolder.addTag(a,()=>{})})}start(){this.scriptTagHolder.startLongPoll(this.id,this.password),this.addDisconnectPingFrame(this.id,this.password)}static forceAllow(){Sh.forceAllow_=!0}static forceDisallow(){Sh.forceDisallow_=!0}static isAvailable(){return Sh.forceAllow_?!0:!Sh.forceDisallow_&&typeof document<"u"&&document.createElement!=null&&!Hae()&&!Vae()}markConnectionHealthy(){}shutdown_(){this.isClosed_=!0,this.scriptTagHolder&&(this.scriptTagHolder.close(),this.scriptTagHolder=null),this.myDisconnFrame&&(document.body.removeChild(this.myDisconnFrame),this.myDisconnFrame=null),this.connectTimeoutTimer_&&(clearTimeout(this.connectTimeoutTimer_),this.connectTimeoutTimer_=null)}onClosed_(){this.isClosed_||(this.log_("Longpoll is closing itself"),this.shutdown_(),this.onDisconnect_&&(this.onDisconnect_(this.everConnected_),this.onDisconnect_=null))}close(){this.isClosed_||(this.log_("Longpoll is being closed."),this.shutdown_())}send(t){const n=Xs(t);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=Mre(n),a=fV(r,ose);for(let s=0;s<a.length;s++)this.scriptTagHolder.enqueueSegment(this.curSegmentNum,a.length,a[s]),this.curSegmentNum++}addDisconnectPingFrame(t,n){this.myDisconnFrame=document.createElement("iframe");const r={};r[ise]="t",r[SV]=t,r[CV]=n,this.myDisconnFrame.src=this.urlFn(r),this.myDisconnFrame.style.display="none",document.body.appendChild(this.myDisconnFrame)}incrementIncomingBytes_(t){const n=Xs(t).length;this.bytesReceived+=n,this.stats_.incrementCounter("bytes_received",n)}}class NM{constructor(t,n,r,a){this.onDisconnect=r,this.urlFn=a,this.outstandingRequests=new Set,this.pendingSegs=[],this.currentSerial=Math.floor(Math.random()*1e8),this.sendNewPolls=!0;{this.uniqueCallbackIdentifier=Dae(),window[ese+this.uniqueCallbackIdentifier]=t,window[tse+this.uniqueCallbackIdentifier]=n,this.myIFrame=NM.createIFrame_();let s="";this.myIFrame.src&&this.myIFrame.src.substr(0,11)==="javascript:"&&(s='<script>document.domain="'+document.domain+'";<\/script>');const i="<html><body>"+s+"</body></html>";
vendor: 15,887 bytes, lines 227-282
227try{this.myIFrame.doc.open(),this.myIFrame.doc.write(i),this.myIFrame.doc.close()}catch(l){ii("frame writing exception"),l.stack&&ii(l.stack),ii(l)}}}static createIFrame_(){const t=document.createElement("iframe");if(t.style.display="none",document.body){document.body.appendChild(t);try{t.contentWindow.document||ii("No IE domain setting required")}catch{const r=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t}close(){this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.textContent="",setTimeout(()=>{this.myIFrame!==null&&(document.body.removeChild(this.myIFrame),this.myIFrame=null)},Math.floor(0)));const t=this.onDisconnect;t&&(this.onDisconnect=null,t())}startLongPoll(t,n){for(this.myID=t,this.myPW=n,this.alive=!0;this.newRequest_(););}newRequest_(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;const t={};t[SV]=this.myID,t[CV]=this.myPW,t[NV]=this.currentSerial;let n=this.urlFn(t),r="",a=0;for(;this.pendingSegs.length>0&&this.pendingSegs[0].d.length+TV+r.length<=RV;){const i=this.pendingSegs.shift();r=r+"&"+rse+a+"="+i.seg+"&"+ase+a+"="+i.ts+"&"+sse+a+"="+i.d,a++}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1}enqueueSegment(t,n,r){this.pendingSegs.push({seg:t,ts:n,d:r}),this.alive&&this.newRequest_()}addLongPollTag_(t,n){this.outstandingRequests.add(n);const r=()=>{this.outstandingRequests.delete(n),this.newRequest_()},a=setTimeout(r,Math.floor(lse)),s=()=>{clearTimeout(a),r()};this.addTag(t,s)}addTag(t,n){setTimeout(()=>{try{if(!this.sendNewPolls)return;const r=this.myIFrame.doc.createElement("script");r.type="text/javascript",r.async=!0,r.src=t,r.onload=r.onreadystatechange=function(){const a=r.readyState;(!a||a==="loaded"||a==="complete")&&(r.onload=r.onreadystatechange=null,r.parentNode&&r.parentNode.removeChild(r),n())},r.onerror=()=>{ii("Long-poll script failed to load: "+t),this.sendNewPolls=!1,this.close()},this.myIFrame.doc.body.appendChild(r)}catch{}},Math.floor(1))}}/** 228 * @license 229 * Copyright 2017 Google LLC 230 * 231 * Licensed under the Apache License, Version 2.0 (the "License"); 232 * you may not use this file except in compliance with the License. 233 * You may obtain a copy of the License at 234 * 235 * http://www.apache.org/licenses/LICENSE-2.0 236 * 237 * Unless required by applicable law or agreed to in writing, software 238 * distributed under the License is distributed on an "AS IS" BASIS, 239 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 240 * See the License for the specific language governing permissions and 241 * limitations under the License. 242 */const use=16384,dse=45e3;let iE=null;typeof MozWebSocket<"u"?iE=MozWebSocket:typeof WebSocket<"u"&&(iE=WebSocket);class Jl{constructor(t,n,r,a,s,i,l){this.connId=t,this.applicationId=r,this.appCheckToken=a,this.authToken=s,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=$y(this.connId),this.stats_=CM(n),this.connURL=Jl.connectionURL_(n,i,l,a,r),this.nodeAdmin=n.nodeAdmin}static connectionURL_(t,n,r,a,s){const i={};return i[hV]=SM,typeof location<"u"&&location.hostname&&yV.test(location.hostname)&&(i[gV]=vV),n&&(i[pV]=n),r&&(i[bV]=r),a&&(i[iR]=a),s&&(i[wV]=s),kV(t,EV,i)}open(t,n){this.onDisconnect=n,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,Ff.set("previous_websocket_failure",!0);try{let r;GH(),this.mySock=new iE(this.connURL,[],r)}catch(r){this.log_("Error instantiating WebSocket.");const a=r.message||r.data;a&&this.log_(a),this.onClosed_();return}this.mySock.onopen=()=>{this.log_("Websocket connected."),this.everConnected_=!0},this.mySock.onclose=()=>{this.log_("Websocket connection was disconnected."),this.mySock=null,this.onClosed_()},this.mySock.onmessage=r=>{this.handleIncomingFrame(r)},this.mySock.onerror=r=>{this.log_("WebSocket error. Closing connection.");const a=r.message||r.data;a&&this.log_(a),this.onClosed_()}}start(){}static forceDisallow(){Jl.forceDisallow_=!0}static isAvailable(){let t=!1;if(typeof navigator<"u"&&navigator.userAgent){const n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(t=!0)}return!t&&iE!==null&&!Jl.forceDisallow_}static previouslyFailed(){return Ff.isInMemoryStorage||Ff.get("previous_websocket_failure")===!0}markConnectionHealthy(){Ff.remove("previous_websocket_failure")}appendFrame_(t){if(this.frames.push(t),this.frames.length===this.totalFrames){const n=this.frames.join("");this.frames=null;const r=gM(n);this.onMessage(r)}}handleNewFrameCount_(t){this.totalFrames=t,this.frames=[]}extractFrameCount_(t){if(dn(this.frames===null,"We already have a frame buffer"),t.length<=6){const n=Number(t);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),t}handleIncomingFrame(t){if(this.mySock===null)return;const n=t.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{const r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}send(t){this.resetKeepAlive();const n=Xs(t);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);const r=fV(n,use);r.length>1&&this.sendString_(String(r.length));for(let a=0;a<r.length;a++)this.sendString_(r[a])}shutdown_(){this.isClosed_=!0,this.keepaliveTimer&&(clearInterval(this.keepaliveTimer),this.keepaliveTimer=null),this.mySock&&(this.mySock.close(),this.mySock=null)}onClosed_(){this.isClosed_||(this.log_("WebSocket is closing itself"),this.shutdown_(),this.onDisconnect&&(this.onDisconnect(this.everConnected_),this.onDisconnect=null))}close(){this.isClosed_||(this.log_("WebSocket is being closed"),this.shutdown_())}resetKeepAlive(){clearInterval(this.keepaliveTimer),this.keepaliveTimer=setInterval(()=>{this.mySock&&this.sendString_("0"),this.resetKeepAlive()},Math.floor(dse))}sendString_(t){try{this.mySock.send(t)}catch(n){this.log_("Exception thrown from WebSocket.send():",n.message||n.data,"Closing connection."),setTimeout(this.onClosed_.bind(this),0)}}}Jl.responsesRequiredToBeHealthy=2;Jl.healthyTimeout=3e4;/** 243 * @license 244 * Copyright 2017 Google LLC 245 * 246 * Licensed under the Apache License, Version 2.0 (the "License"); 247 * you may not use this file except in compliance with the License. 248 * You may obtain a copy of the License at 249 * 250 * http://www.apache.org/licenses/LICENSE-2.0 251 * 252 * Unless required by applicable law or agreed to in writing, software 253 * distributed under the License is distributed on an "AS IS" BASIS, 254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 255 * See the License for the specific language governing permissions and 256 * limitations under the License. 257 */class xv{constructor(t){this.initTransports_(t)}static get ALL_TRANSPORTS(){return[Sh,Jl]}static get IS_TRANSPORT_INITIALIZED(){return this.globalTransportInitialized_}initTransports_(t){const n=Jl&&Jl.isAvailable();let r=n&&!Jl.previouslyFailed();if(t.webSocketOnly&&(n||ho("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),r=!0),r)this.transports_=[Jl];else{const a=this.transports_=[];for(const s of xv.ALL_TRANSPORTS)s&&s.isAvailable()&&a.push(s);xv.globalTransportInitialized_=!0}}initialTransport(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")}upgradeTransport(){return this.transports_.length>1?this.transports_[1]:null}}xv.globalTransportInitialized_=!1;/** 258 * @license 259 * Copyright 2017 Google LLC 260 * 261 * Licensed under the Apache License, Version 2.0 (the "License"); 262 * you may not use this file except in compliance with the License. 263 * You may obtain a copy of the License at 264 * 265 * http://www.apache.org/licenses/LICENSE-2.0 266 * 267 * Unless required by applicable law or agreed to in writing, software 268 * distributed under the License is distributed on an "AS IS" BASIS, 269 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 270 * See the License for the specific language governing permissions and 271 * limitations under the License. 272 */const fse=6e4,mse=5e3,hse=10*1024,pse=100*1024,sC="t",y5="d",gse="s",b5="r",vse="e",w5="o",E5="a",x5="n",_5="p",yse="h";class bse{constructor(t,n,r,a,s,i,l,c,u,d){this.id=t,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=a,this.authToken_=s,this.onMessage_=i,this.onReady_=l,this.onDisconnect_=c,this.onKill_=u,this.lastSessionId=d,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=$y("c:"+this.id+":"),this.transportManager_=new xv(n),this.log_("Connection created"),this.start_()}start_(){const t=this.transportManager_.initialTransport();this.conn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.conn_),r=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(()=>{this.conn_&&this.conn_.open(n,r)},Math.floor(0));const a=t.healthyTimeout||0;a>0&&(this.healthyTimeout_=V0(()=>{this.healthyTimeout_=null,this.isHealthy_||(this.conn_&&this.conn_.bytesReceived>pse?(this.log_("Connection exceeded healthy timeout but has received "+this.conn_.bytesReceived+" bytes. Marking connection healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()):this.conn_&&this.conn_.bytesSent>hse?this.log_("Connection exceeded healthy timeout but has sent "+this.conn_.bytesSent+" bytes. Leaving connection alive."):(this.log_("Closing unhealthy connection after timeout."),this.close()))},Math.floor(a)))}nextTransportId_(){return"c:"+this.id+":"+this.connectionCount++}disconnReceiver_(t){return n=>{t===this.conn_?this.onConnectionLost_(n):t===this.secondaryConn_?(this.log_("Secondary connection lost."),this.onSecondaryConnectionLost_()):this.log_("closing an old connection")}}connReceiver_(t){return n=>{this.state_!==2&&(t===this.rx_?this.onPrimaryMessageReceived_(n):t===this.secondaryConn_?this.onSecondaryMessageReceived_(n):this.log_("message on old connection"))}}sendRequest(t){const n={t:"d",d:t};this.sendData_(n)}tryCleanupConnection(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)}onSecondaryControl_(t){if(sC in t){const n=t[sC];n===E5?this.upgradeIfSecondaryHealthy_():n===b5?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===w5&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}}onSecondaryMessageReceived_(t){const n=Wg("t",t),r=Wg("d",t);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)}upgradeIfSecondaryHealthy_(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:_5,d:{}}}))}proceedWithUpgrade_(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:E5,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:x5,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()}onPrimaryMessageReceived_(t){const n=Wg("t",t),r=Wg("d",t);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)}onDataMessage_(t){this.onPrimaryResponse_(),this.onMessage_(t)}onPrimaryResponse_(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))}onControl_(t){const n=Wg(sC,t);if(y5 in t){const r=t[y5];if(n===yse){const a=Object.assign({},r);this.repoInfo_.isUsingEmulator&&(a.h=this.repoInfo_.host),this.onHandshake_(a)}else if(n===x5){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(let a=0;a<this.pendingDataMessages.length;++a)this.onDataMessage_(this.pendingDataMessages[a]);this.pendingDataMessages=[],this.tryCleanupConnection()}else n===gse?this.onConnectionShutdown_(r):n===b5?this.onReset_(r):n===vse?sR("Server Error: "+r):n===w5?(this.log_("got pong on primary."),this.onPrimaryResponse_(),this.sendPingOnPrimaryIfNecessary_()):sR("Unknown control packet command: "+n)}}onHandshake_(t){const n=t.ts,r=t.v,a=t.h;this.sessionId=t.s,this.repoInfo_.host=a,this.state_===0&&(this.conn_.start(),this.onConnectionEstablished_(this.conn_,n),SM!==r&&ho("Protocol version mismatch detected"),this.tryStartUpgrade_())}tryStartUpgrade_(){const t=this.transportManager_.upgradeTransport();t&&this.startUpgrade_(t)}startUpgrade_(t){this.secondaryConn_=new t(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,this.sessionId),this.secondaryResponsesRequired_=t.responsesRequiredToBeHealthy||0;const n=this.connReceiver_(this.secondaryConn_),r=this.disconnReceiver_(this.secondaryConn_);this.secondaryConn_.open(n,r),V0(()=>{this.secondaryConn_&&(this.log_("Timed out trying to upgrade."),this.secondaryConn_.close())},Math.floor(fse))}onReset_(t){this.log_("Reset packet received. New host: "+t),this.repoInfo_.host=t,this.state_===1?this.close():(this.closeConnections_(),this.start_())}onConnectionEstablished_(t,n){this.log_("Realtime connection established."),this.conn_=t,this.state_=1,this.onReady_&&(this.onReady_(n,this.sessionId),this.onReady_=null),this.primaryResponsesRequired_===0?(this.log_("Primary connection is healthy."),this.isHealthy_=!0):V0(()=>{this.sendPingOnPrimaryIfNecessary_()},Math.floor(mse))}sendPingOnPrimaryIfNecessary_(){!this.isHealthy_&&this.state_===1&&(this.log_("sending ping on primary."),this.sendData_({t:"c",d:{t:_5,d:{}}}))}onSecondaryConnectionLost_(){const t=this.secondaryConn_;this.secondaryConn_=null,(this.tx_===t||this.rx_===t)&&this.close()}onConnectionLost_(t){this.conn_=null,!t&&this.state_===0?(this.log_("Realtime connection failed."),this.repoInfo_.isCacheableHost()&&(Ff.remove("host:"+this.repoInfo_.host),this.repoInfo_.internalHost=this.repoInfo_.host)):this.state_===1&&this.log_("Realtime connection lost."),this.close()}onConnectionShutdown_(t){this.log_("Connection shutdown command received. Shutting down..."),this.onKill_&&(this.onKill_(t),this.onKill_=null),this.onDisconnect_=null,this.close()}sendData_(t){if(this.state_!==1)throw"Connection is not connected";this.tx_.send(t)}close(){this.state_!==2&&(this.log_("Closing realtime connection."),this.state_=2,this.closeConnections_(),this.onDisconnect_&&(this.onDisconnect_(),this.onDisconnect_=null))}closeConnections_(){this.log_("Shutting down all connections"),this.conn_&&(this.conn_.close(),this.conn_=null),this.secondaryConn_&&(this.secondaryConn_.close(),this.secondaryConn_=null),this.healthyTimeout_&&(clearTimeout(this.healthyTimeout_),this.healthyTimeout_=null)}}/** 273 * @license 274 * Copyright 2017 Google LLC 275 * 276 * Licensed under the Apache License, Version 2.0 (the "License"); 277 * you may not use this file except in compliance with the License. 278 * You may obtain a copy of the License at 279 * 280 * http://www.apache.org/licenses/LICENSE-2.0 281 * 282 * Unless required by applicable law or agreed to in writing, softw
282are 283 * distributed under the License is distributed on an "AS IS" BASIS, 284 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 285 * See the License for the specific language governing permissions and 286 * limitations under the License. 287 */class AV{put(t,n,r,a){}merge(t,n,r,a){}refreshAuthToken(t){}refreshAppCheckToken(t){}onDisconnectPut(t,n,r){}onDisconnectMerge(t,n,r){}onDisconnectCancel(t,n){}reportStats(t){}}/** 288 * @license 289 * Copyright 2017 Google LLC 290 * 291 * Licensed under the Apache License, Version 2.0 (the "License"); 292 * you may not use this file except in compliance with the License. 293 * You may obtain a copy of the License at 294 * 295 * http://www.apache.org/licenses/LICENSE-2.0 296 * 297 * Unless required by applicable law or agreed to in writing, software 298 * distributed under the License is distributed on an "AS IS" BASIS, 299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 300 * See the License for the specific language governing permissions and 301 * limitations under the License. 302 */class IV{constructor(t){this.allowedEvents_=t,this.listeners_={},dn(Array.isArray(t)&&t.length>0,"Requires a non-empty array")}trigger(t,...n){if(Array.isArray(this.listeners_[t])){const r=[...this.listeners_[t]];for(let a=0;a<r.length;a++)r[a].callback.apply(r[a].context,n)}}on(t,n,r){this.validateEventType_(t),this.listeners_[t]=this.listeners_[t]||[],this.listeners_[t].push({callback:n,context:r});const a=this.getInitialEvent(t);a&&n.apply(r,a)}off(t,n,r){this.validateEventType_(t);const a=this.listeners_[t]||[];for(let s=0;s<a.length;s++)if(a[s].callback===n&&(!r||r===a[s].context)){a.splice(s,1);return}}validateEventType_(t){dn(this.allowedEvents_.find(n=>n===t),"Unknown event: "+t)}}/** 303 * @license 304 * Copyright 2017 Google LLC 305 * 306 * Licensed under the Apache License, Version 2.0 (the "License"); 307 * you may not use this file except in compliance with the License. 308 * You may obtain a copy of the License at 309 * 310 * http://www.apache.org/licenses/LICENSE-2.0 311 * 312 * Unless required by applicable law or agreed to in writing, software 313 * distributed under the License is distributed on an "AS IS" BASIS, 314 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 315 * See the License for the specific language governing permissions and 316 * limitations under the License. 317 */class oE extends IV{constructor(){super(["online"]),this.online_=!0,typeof window<"u"&&typeof window.addEventListener<"u"&&!qH()&&(window.addEventListener("online",()=>{this.online_||(this.online_=!0,this.trigger("online",!0))},!1),window.addEventListener("offline",()=>{this.online_&&(this.online_=!1,this.trigger("online",!1))},!1))}static getInstance(){return new oE}getInitialEvent(t){return dn(t==="online","Unknown event type: "+t),[this.online_]}currentlyOnline(){return this.online_}}/** 318 * @license 319 * Copyright 2017 Google LLC 320 * 321 * Licensed under the Apache License, Version 2.0 (the "License"); 322 * you may not use this file except in compliance with the License. 323 * You may obtain a copy of the License at 324 * 325 * http://www.apache.org/licenses/LICENSE-2.0 326 * 327 * Unless required by applicable law or agreed to in writing, software 328 * distributed under the License is distributed on an "AS IS" BASIS, 329 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 330 * See the License for the specific language governing permissions and 331 * limitations under the License. 332 */const k5=32,S5=768;class ba{constructor(t,n){if(n===void 0){this.pieces_=t.split("/");let r=0;for(let a=0;a<this.pieces_.length;a++)this.pieces_[a].length>0&&(this.pieces_[r]=this.pieces_[a],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=n}toString(){let t="";for(let n=this.pieceNum_;n<this.pieces_.length;n++)this.pieces_[n]!==""&&(t+="/"+this.pieces_[n]);return t||"/"}}function ha(){return new ba("")}function Br(e){return e.pieceNum_>=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function qd(e){return e.pieces_.length-e.pieceNum_}function Aa(e){let t=e.pieceNum_;return t<e.pieces_.length&&t++,new ba(e.pieces_,t)}function RM(e){return e.pieceNum_<e.pieces_.length?e.pieces_[e.pieces_.length-1]:null}function wse(e){let t="";for(let n=e.pieceNum_;n<e.pieces_.length;n++)e.pieces_[n]!==""&&(t+="/"+encodeURIComponent(String(e.pieces_[n])));return t||"/"}function _v(e,t=0){return e.pieces_.slice(e.pieceNum_+t)}function OV(e){if(e.pieceNum_>=e.pieces_.length)return null;const t=[];for(let n=e.pieceNum_;n<e.pieces_.length-1;n++)t.push(e.pieces_[n]);return new ba(t,0)}function ws(e,t){const n=[];for(let r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);if(t instanceof ba)for(let r=t.pieceNum_;r<t.pieces_.length;r++)n.push(t.pieces_[r]);else{const r=t.split("/");for(let a=0;a<r.length;a++)r[a].length>0&&n.push(r[a])}return new ba(n,0)}function qr(e){return e.pieceNum_>=e.pieces_.length}function uo(e,t){const n=Br(e),r=Br(t);if(n===null)return t;if(n===r)return uo(Aa(e),Aa(t));
vendor: 12,096 bytes, lines 332-363
332throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function Ese(e,t){const n=_v(e,0),r=_v(t,0);for(let a=0;a<n.length&&a<r.length;a++){const s=$m(n[a],r[a]);if(s!==0)return s}return n.length===r.length?0:n.length<r.length?-1:1}function TM(e,t){if(qd(e)!==qd(t))return!1;for(let n=e.pieceNum_,r=t.pieceNum_;n<=e.pieces_.length;n++,r++)if(e.pieces_[n]!==t.pieces_[r])return!1;return!0}function Sl(e,t){let n=e.pieceNum_,r=t.pieceNum_;if(qd(e)>qd(t))return!1;for(;n<e.pieces_.length;){if(e.pieces_[n]!==t.pieces_[r])return!1;++n,++r}return!0}class xse{constructor(t,n){this.errorPrefix_=n,this.parts_=_v(t,0),this.byteLength_=Math.max(1,this.parts_.length);for(let r=0;r<this.parts_.length;r++)this.byteLength_+=R_(this.parts_[r]);MV(this)}}function _se(e,t){e.parts_.length>0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=R_(t),MV(e)}function kse(e){const t=e.parts_.pop();e.byteLength_-=R_(t),e.parts_.length>0&&(e.byteLength_-=1)}function MV(e){if(e.byteLength_>S5)throw new Error(e.errorPrefix_+"has a key path longer than "+S5+" bytes ("+e.byteLength_+").");if(e.parts_.length>k5)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+k5+") or object contains a cycle "+Cf(e))}function Cf(e){return e.parts_.length===0?"":"in property '"+e.parts_.join(".")+"'"}/** 333 * @license 334 * Copyright 2017 Google LLC 335 * 336 * Licensed under the Apache License, Version 2.0 (the "License"); 337 * you may not use this file except in compliance with the License. 338 * You may obtain a copy of the License at 339 * 340 * http://www.apache.org/licenses/LICENSE-2.0 341 * 342 * Unless required by applicable law or agreed to in writing, software 343 * distributed under the License is distributed on an "AS IS" BASIS, 344 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 345 * See the License for the specific language governing permissions and 346 * limitations under the License. 347 */class AM extends IV{constructor(){super(["visible"]);let t,n;typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(n="visibilitychange",t="hidden"):typeof document.mozHidden<"u"?(n="mozvisibilitychange",t="mozHidden"):typeof document.msHidden<"u"?(n="msvisibilitychange",t="msHidden"):typeof document.webkitHidden<"u"&&(n="webkitvisibilitychange",t="webkitHidden")),this.visible_=!0,n&&document.addEventListener(n,()=>{const r=!document[t];r!==this.visible_&&(this.visible_=r,this.trigger("visible",r))},!1)}static getInstance(){return new AM}getInitialEvent(t){return dn(t==="visible","Unknown event type: "+t),[this.visible_]}}/** 348 * @license 349 * Copyright 2017 Google LLC 350 * 351 * Licensed under the Apache License, Version 2.0 (the "License"); 352 * you may not use this file except in compliance with the License. 353 * You may obtain a copy of the License at 354 * 355 * http://www.apache.org/licenses/LICENSE-2.0 356 * 357 * Unless required by applicable law or agreed to in writing, software 358 * distributed under the License is distributed on an "AS IS" BASIS, 359 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 360 * See the License for the specific language governing permissions and 361 * limitations under the License. 362 */const Gg=1e3,Sse=60*5*1e3,C5=30*1e3,Cse=1.3,Nse=3e4,Rse="server_kill",N5=3;class Bu extends AV{constructor(t,n,r,a,s,i,l,c){if(super(),this.repoInfo_=t,this.applicationId_=n,this.onDataUpdate_=r,this.onConnectStatus_=a,this.onServerInfoUpdate_=s,this.authTokenProvider_=i,this.appCheckTokenProvider_=l,this.authOverride_=c,this.id=Bu.nextPersistentConnectionId_++,this.log_=$y("p:"+this.id+":"),this.interruptReasons_={},this.listens=new Map,this.outstandingPuts_=[],this.outstandingGets_=[],this.outstandingPutCount_=0,this.outstandingGetCount_=0,this.onDisconnectRequestQueue_=[],this.connected_=!1,this.reconnectDelay_=Gg,this.maxReconnectDelay_=Sse,this.securityDebugCallback_=null,this.lastSessionId=null,this.establishConnectionTimer_=null,this.visible_=!1,this.requestCBHash_={},this.requestNumber_=0,this.realtime_=null,this.authToken_=null,this.appCheckToken_=null,this.forceTokenRefresh_=!1,this.invalidAuthTokenCount_=0,this.invalidAppCheckTokenCount_=0,this.firstConnection_=!0,this.lastConnectionAttemptTime_=null,this.lastConnectionEstablishedTime_=null,c&&!GH())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");AM.getInstance().on("visible",this.onVisible_,this),t.host.indexOf("fblocal")===-1&&oE.getInstance().on("online",this.onOnline_,this)}sendRequest(t,n,r){const a=++this.requestNumber_,s={r:a,a:t,b:n};this.log_(Xs(s)),dn(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(s),r&&(this.requestCBHash_[a]=r)}get(t){this.initConnection_();const n=new Rd,a={action:"g",request:{p:t._path.toString(),q:t._queryObject},onComplete:i=>{const l=i.d;i.s==="ok"?n.resolve(l):n.reject(l)}};this.outstandingGets_.push(a),this.outstandingGetCount_++;const s=this.outstandingGets_.length-1;return this.connected_&&this.sendGet_(s),n.promise}listen(t,n,r,a){this.initConnection_();const s=t._queryIdentifier,i=t._path.toString();this.log_("Listen called for "+i+" "+s),this.listens.has(i)||this.listens.set(i,new Map),dn(t._queryParams.isDefault()||!t._queryParams.loadsAllData(),"listen() called for non-default but complete query"),dn(!this.listens.get(i).has(s),"listen() called twice for same path/queryId.");const l={onComplete:a,hashFn:n,query:t,tag:r};this.listens.get(i).set(s,l),this.connected_&&this.sendListen_(l)}sendGet_(t){const n=this.outstandingGets_[t];this.sendRequest("g",n.request,r=>{delete this.outstandingGets_[t],this.outstandingGetCount_--,this.outstandingGetCount_===0&&(this.outstandingGets_=[]),n.onComplete&&n.onComplete(r)})}sendListen_(t){const n=t.query,r=n._path.toString(),a=n._queryIdentifier;this.log_("Listen on "+r+" for "+a);const s={p:r},i="q";t.tag&&(s.q=n._queryObject,s.t=t.tag),s.h=t.hashFn(),this.sendRequest(i,s,l=>{const c=l.d,u=l.s;Bu.warnOnListenWarnings_(c,n),(this.listens.get(r)&&this.listens.get(r).get(a))===t&&(this.log_("listen response",l),u!=="ok"&&this.removeListen_(r,a),t.onComplete&&t.onComplete(u,c))})}static warnOnListenWarnings_(t,n){if(t&&typeof t=="object"&&su(t,"w")){const r=bp(t,"w");if(Array.isArray(r)&&~r.indexOf("no_index")){const a='".indexOn": "'+n._queryParams.getIndex().toString()+'"',s=n._path.toString();ho(`Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ${a} at ${s} to your security rules for better performance.`)}}}refreshAuthToken(t){this.authToken_=t,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},()=>{}),this.reduceReconnectDelayIfAdminCredential_(t)}reduceReconnectDelayIfAdminCredential_(t){(t&&t.length===40||Rre(t))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=C5)}refreshAppCheckToken(t){this.appCheckToken_=t,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},()=>{})}tryAuth(){if(this.connected_&&this.authToken_){const t=this.authToken_,n=Tre(t)?"auth":"gauth",r={cred:t};this.authOverride_===null?r.noauth=!0:typeof this.authOverride_=="object"&&(r.authvar=this.authOverride_),this.sendRequest(n,r,a=>{const s=a.s,i=a.d||"error";this.authToken_===t&&(s==="ok"?this.invalidAuthTokenCount_=0:this.onAuthRevoked_(s,i))})}}tryAppCheck(){this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},t=>{const n=t.s,r=t.d||"error";n==="ok"?this.invalidAppCheckTokenCount_=0:this.onAppCheckRevoked_(n,r)})}unlisten(t,n){const r=t._path.toString(),a=t._queryIdentifier;this.log_("Unlisten called for "+r+" "+a),dn(t._queryParams.isDefault()||!t._queryParams.loadsAllData(),"unlisten() called for non-default but complete query"),this.removeListen_(r,a)&&this.connected_&&this.sendUnlisten_(r,a,t._queryObject,n)}sendUnlisten_(t,n,r,a){this.log_("Unlisten on "+t+" for "+n);const s={p:t},i="n";a&&(s.q=r,s.t=a),this.sendRequest(i,s)}onDisconnectPut(t,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",t,n,r):this.onDisconnectRequestQueue_.push({pathString:t,action:"o",data:n,onComplete:r})}onDisconnectMerge(t,n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",t,n,r):this.onDisconnectRequestQueue_.push({pathString:t,action:"om",data:n,onComplete:r})}onDisconnectCancel(t,n){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",t,null,n):this.onDisconnectRequestQueue_.push({pathString:t,action:"oc",data:null,onComplete:n})}sendOnDisconnect_(t,n,r,a){const s={p:n,d:r};this.log_("onDisconnect "+t,s),this.sendRequest(t,s,i=>{a&&setTimeout(()=>{a(i.s,i.d)},Math.floor(0))})}put(t,n,r,a){this.putInternal("p",t,n,r,a)}merge(t,n,r,a){this.putInternal("m",t,n,r,a)}putInternal(t,n,r,a,s){this.initConnection_();const i={p:n,d:r};s!==void 0&&(i.h=s),this.outstandingPuts_.push({action:t,request:i,onComplete:a}),this.outstandingPutCount_++;const l=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(l):this.log_("Buffering put: "+n)}sendPut_(t){const n=this.outstandingPuts_[t].action,r=this.outstandingPuts_[t].request,a=this.outstandingPuts_[t].onComplete;this.outstandingPuts_[t].queued=this.connected_,this.sendRequest(n,r,s=>{this.log_(n+" response",s),delete this.outstandingPuts_[t],this.outstandingPutCount_--,this.outstandingPutCount_===0&&(this.outstandingPuts_=[]),a&&a(s.s,s.d)})}reportStats(t){if(this.connected_){const n={c:t};this.log_("reportStats",n),this.sendRequest("s",n,r=>{if(r.s!=="ok"){const s=r.d;this.log_("reportStats","Error sending stats: "+s)}})}}onDataMessage_(t){if("r"in t){this.log_("from server: "+Xs(t));const n=t.r,r=this.requestCBHash_[n];r&&(delete this.requestCBHash_[n],r(t.b))}else{if("error"in t)throw"A server-side error has occurred: "+t.error;"a"in t&&this.onDataPush_(t.a,t.b)}}onDataPush_(t,n){this.log_("handleServerMessage",t,n),t==="d"?this.onDataUpdate_(n.p,n.d,!1,n.t):t==="m"?this.onDataUpdate_(n.p,n.d,!0,n.t):t==="c"?this.onListenRevoked_(n.p,n.q):t==="ac"?this.onAuthRevoked_(n.s,n.d):t==="apc"?this.onAppCheckRevoked_(n.s,n.d):t==="sd"?this.onSecurityDebugPacket_(n):sR("Unrecognized action received from server: "+Xs(t)+` 363Are you using the latest client?`)}onReady_(t,n){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(t),this.lastSessionId=n,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)}scheduleConnect_(t){dn(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(()=>{this.establishConnectionTimer_=null,this.establishConnection_()},Math.floor(t))}initConnection_(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)}onVisible_(t){t&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Gg,this.realtime_||this.scheduleConnect_(0)),this.visible_=t}onOnline_(t){t?(this.log_("Browser went online."),this.reconnectDelay_=Gg,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())}onRealtimeDisconnect_(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){this.visible_?this.lastConnectionEstablishedTime_&&(new Date().getTime()-this.lastConnectionEstablishedTime_>Nse&&(this.reconnectDelay_=Gg),this.lastConnectionEstablishedTime_=null):(this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime());const t=new Date().getTime()-this.lastConnectionAttemptTime_;let n=Math.max(0,this.reconnectDelay_-t);
363n=Math.random()*n,this.log_("Trying to reconnect in "+n+"ms"),this.scheduleConnect_(n),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*Cse)}this.onConnectStatus_(!1)}async establishConnection_(){if(this.shouldReconnect_()){this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null;const t=this.onDataMessage_.bind(this),n=this.onReady_.bind(this),r=this.onRealtimeDisconnect_.bind(this),a=this.id+":"+Bu.nextConnectionId_++,s=this.lastSessionId;let i=!1,l=null;const c=function(){l?l.close():(i=!0,r())},u=function(f){dn(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(f)};this.realtime_={close:c,sendRequest:u};const d=this.forceTokenRefresh_;this.forceTokenRefresh_=!1;try{const[f,m]=await Promise.all([this.authTokenProvider_.getToken(d),this.appCheckTokenProvider_.getToken(d)]);i?ii("getToken() completed but was canceled"):(ii("getToken() completed. Creating connection."),this.authToken_=f&&f.accessToken,this.appCheckToken_=m&&m.token,l=new bse(a,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,t,n,r,h=>{ho(h+" ("+this.repoInfo_.toString()+")"),this.interrupt(Rse)},s))}catch(f){this.log_("Failed to get token: "+f),i||(this.repoInfo_.nodeAdmin&&ho(f),c())}}}interrupt(t){ii("Interrupting connection for reason: "+t),this.interruptReasons_[t]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())}resume(t){ii("Resuming connection for reason: "+t),delete this.interruptReasons_[t],rR(this.interruptReasons_)&&(this.reconnectDelay_=Gg,this.realtime_||this.scheduleConnect_(0))}handleTimestamp_(t){const n=t-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:n})}cancelSentTransactions_(){for(let t=0;t<this.outstandingPuts_.length;t++){const n=this.outstandingPuts_[t];n&&"h"in n.request&&n.queued&&(n.onComplete&&n.onComplete("disconnect"),delete this.outstandingPuts_[t],this.outstandingPutCount_--)}this.outstandingPutCount_===0&&(this.outstandingPuts_=[])}onListenRevoked_(t,n){let r;n?r=n.map(s=>kM(s)).join("$"):r="default";const a=this.removeListen_(t,r);a&&a.onComplete&&a.onComplete("permission_denied")}removeListen_(t,n){const r=new ba(t).toString();let a;if(this.listens.has(r)){const s=this.listens.get(r);a=s.get(n),s.delete(n),s.size===0&&this.listens.delete(r)}else a=void 0;return a}onAuthRevoked_(t,n){ii("Auth token revoked: "+t+"/"+n),this.authToken_=null,this.forceTokenRefresh_=!0,this.realtime_.close(),(t==="invalid_token"||t==="permission_denied")&&(this.invalidAuthTokenCount_++,this.invalidAuthTokenCount_>=N5&&(this.reconnectDelay_=C5,this.authTokenProvider_.notifyForInvalidToken()))}onAppCheckRevoked_(t,n){ii("App check token revoked: "+t+"/"+n),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(t==="invalid_token"||t==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=N5&&this.appCheckTokenProvider_.notifyForInvalidToken())}onSecurityDebugPacket_(t){this.securityDebugCallback_?this.securityDebugCallback_(t):"msg"in t&&""+t.msg.replace(` 364`,` 365FIREBASE: `)}restoreState_(){this.tryAuth(),this.tryAppCheck();for(const t of this.listens.values())for(const n of t.values())this.sendListen_(n);for(let t=0;t<this.outstandingPuts_.length;t++)this.outstandingPuts_[t]&&this.sendPut_(t);for(;this.onDisconnectRequestQueue_.length;){const t=this.onDisconnectRequestQueue_.shift();this.sendOnDisconnect_(t.action,t.pathString,t.data,t.onComplete)}for(let t=0;t<this.outstandingGets_.length;t++)this.outstandingGets_[t]&&this.sendGet_(t)}sendConnectStats_(){const t={};let n="js";t["sdk."+n+"."+cV.replace(/\./g,"-")]=1,qH()?t["framework.cordova"]=1:Are()&&(t["framework.reactnative"]=1),this.reportStats(t)}shouldReconnect_(){const t=oE.getInstance().currentlyOnline();return rR(this.interruptReasons_)&&t}}Bu.nextPersistentConnectionId_=0;Bu.nextConnectionId_=0;/** 366 * @license 367 * Copyright 2017 Google LLC 368 * 369 * Licensed under the Apache License, Version 2.0 (the "License");
370 * you may not use this file except in compliance with the License. 371 * You may obtain a copy of the License at 372 * 373 * http://www.apache.org/licenses/LICENSE-2.0 374 * 375 * Unless required by applicable law or agreed to in writing, software 376 * distributed under the License is distributed on an "AS IS" BASIS, 377 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 378 * See the License for the specific language governing permissions and 379 * limitations under the License. 380 */class Yr{constructor(t,n){this.name=t,this.node=n}static Wrap(t,n){return new Yr(t,n)}}/** 381 * @license 382 * Copyright 2017 Google LLC 383 * 384 * Licensed under the Apache License, Version 2.0 (the "License"); 385 * you may not use this file except in compliance with the License. 386 * You may obtain a copy of the License at 387 * 388 * http://www.apache.org/licenses/LICENSE-2.0 389 * 390 * Unless required by applicable law or agreed to in writing, software 391 * distributed under the License is distributed on an "AS IS" BASIS, 392 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 393 * See the License for the specific language governing permissions and 394 * limitations under the License. 395 */class Q_{getCompare(){return this.compare.bind(this)}indexedValueChanged(t,n){const r=new Yr(kp,t),a=new Yr(kp,n);return this.compare(r,a)!==0}minPost(){return Yr.MIN}}/** 396 * @license 397 * Copyright 2017 Google LLC 398 * 399 * Licensed under the Apache License, Version 2.0 (the "License"); 400 * you may not use this file except in compliance with the License. 401 * You may obtain a copy of the License at 402 * 403 * http://www.apache.org/licenses/LICENSE-2.0 404 * 405 * Unless required by applicable law or agreed to in writing, software 406 * distributed under the License is distributed on an "AS IS" BASIS, 407 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 408 * See the License for the specific language governing permissions and 409 * limitations under the License. 410 */let qb;class PV extends Q_{static get __EMPTY_NODE(){return qb}static set __EMPTY_NODE(t){qb=t}compare(t,n){return $m(t.name,n.name)}isDefinedOn(t){throw Py("KeyIndex.isDefinedOn not expected to be called.")}indexedValueChanged(t,n){return!1}minPost(){return Yr.MIN}maxPost(){return new Yr(fm,qb)}makePost(t,n){return dn(typeof t=="string","KeyIndex indexValue must always be a string."),new Yr(t,qb)}toString(){return".key"}}const Uh=new PV;/** 411 * @license 412 * Copyright 2017 Google LLC 413 * 414 * Licensed under the Apache License, Version 2.0 (the "License"); 415 * you may not use this file except in compliance with the License. 416 * You may obtain a copy of the License at 417 * 418 * http://www.apache.org/licenses/LICENSE-2.0 419 * 420 * Unless required by applicable law or agreed to in writing, software 421 * distributed under the License is distributed on an "AS IS" BASIS, 422 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 423 * See the License for the specific language governing permissions and 424 * limitations under the License. 425 */class Yb{constructor(t,n,r,a,s=null){this.isReverse_=a,this.resultGenerator_=s,this.nodeStack_=[];let i=1;for(;!t.isEmpty();)if(t=t,i=n?r(t.key,n):1,a&&(i*=-1),i<0)this.isReverse_?t=t.left:t=t.right;else if(i===0){this.nodeStack_.push(t);break}else this.nodeStack_.push(t),this.isReverse_?t=t.right:t=t.left}getNext(){if(this.nodeStack_.length===0)return null;let t=this.nodeStack_.pop(),n;if(this.resultGenerator_?n=this.resultGenerator_(t.key,t.value):n={key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return n}hasNext(){return this.nodeStack_.length>0}peek(){if(this.nodeStack_.length===0)return null;const t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}}}class Ks{constructor(t,n,r,a,s){this.key=t,this.value=n,this.color=r??Ks.RED,this.left=a??fo.EMPTY_NODE,this.right=s??fo.EMPTY_NODE}copy(t,n,r,a,s){return new Ks(t??this.key,n??this.value,r??this.color,a??this.left,s??this.right)}count(){return this.left.count()+1+this.right.count()}isEmpty(){return!1}inorderTraversal(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)}reverseTraversal(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)}min_(){return this.left.isEmpty()?this:this.left.min_()}minKey(){return this.min_().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(t,n,r){let a=this;const s=r(t,a.key);return s<0?a=a.copy(null,null,null,a.left.insert(t,n,r),null):s===0?a=a.copy(null,n,null,null,null):a=a.copy(null,null,null,null,a.right.insert(t,n,r)),a.fixUp_()}removeMin_(){if(this.left.isEmpty())return fo.EMPTY_NODE;let t=this;return!t.left.isRed_()&&!t.left.left.isRed_()&&(t=t.moveRedLeft_()),t=t.copy(null,null,null,t.left.removeMin_(),null),t.fixUp_()}remove(t,n){let r,a;
vendor: 7,019 bytes, lines 425-470
425if(r=this,n(t,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(t,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(t,r.key)===0){if(r.right.isEmpty())return fo.EMPTY_NODE;a=r.right.min_(),r=r.copy(a.key,a.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(t,n))}return r.fixUp_()}isRed_(){return this.color}fixUp_(){let t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t}moveRedLeft_(){let t=this.colorFlip_();return t.right.left.isRed_()&&(t=t.copy(null,null,null,null,t.right.rotateRight_()),t=t.rotateLeft_(),t=t.colorFlip_()),t}moveRedRight_(){let t=this.colorFlip_();return t.left.left.isRed_()&&(t=t.rotateRight_(),t=t.colorFlip_()),t}rotateLeft_(){const t=this.copy(null,null,Ks.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)}rotateRight_(){const t=this.copy(null,null,Ks.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)}colorFlip_(){const t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)}checkMaxDepth_(){const t=this.check_();return Math.pow(2,t)<=this.count()+1}check_(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");const t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)}}Ks.RED=!0;Ks.BLACK=!1;class Tse{copy(t,n,r,a,s){return this}insert(t,n,r){return new Ks(t,n,null)}remove(t,n){return this}count(){return 0}isEmpty(){return!0}inorderTraversal(t){return!1}reverseTraversal(t){return!1}minKey(){return null}maxKey(){return null}check_(){return 0}isRed_(){return!1}}class fo{constructor(t,n=fo.EMPTY_NODE){this.comparator_=t,this.root_=n}insert(t,n){return new fo(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,Ks.BLACK,null,null))}remove(t){return new fo(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,Ks.BLACK,null,null))}get(t){let n,r=this.root_;for(;!r.isEmpty();){if(n=this.comparator_(t,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null}getPredecessorKey(t){let n,r=this.root_,a=null;for(;!r.isEmpty();)if(n=this.comparator_(t,r.key),n===0){if(r.left.isEmpty())return a?a.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(a=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")}isEmpty(){return this.root_.isEmpty()}count(){return this.root_.count()}minKey(){return this.root_.minKey()}maxKey(){return this.root_.maxKey()}inorderTraversal(t){return this.root_.inorderTraversal(t)}reverseTraversal(t){return this.root_.reverseTraversal(t)}getIterator(t){return new Yb(this.root_,null,this.comparator_,!1,t)}getIteratorFrom(t,n){return new Yb(this.root_,t,this.comparator_,!1,n)}getReverseIteratorFrom(t,n){return new Yb(this.root_,t,this.comparator_,!0,n)}getReverseIterator(t){return new Yb(this.root_,null,this.comparator_,!0,t)}}fo.EMPTY_NODE=new Tse;/** 426 * @license 427 * Copyright 2017 Google LLC 428 * 429 * Licensed under the Apache License, Version 2.0 (the "License"); 430 * you may not use this file except in compliance with the License. 431 * You may obtain a copy of the License at 432 * 433 * http://www.apache.org/licenses/LICENSE-2.0 434 * 435 * Unless required by applicable law or agreed to in writing, software 436 * distributed under the License is distributed on an "AS IS" BASIS, 437 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 438 * See the License for the specific language governing permissions and 439 * limitations under the License. 440 */function Ase(e,t){return $m(e.name,t.name)}function IM(e,t){return $m(e,t)}/** 441 * @license 442 * Copyright 2017 Google LLC 443 * 444 * Licensed under the Apache License, Version 2.0 (the "License"); 445 * you may not use this file except in compliance with the License. 446 * You may obtain a copy of the License at 447 * 448 * http://www.apache.org/licenses/LICENSE-2.0 449 * 450 * Unless required by applicable law or agreed to in writing, software 451 * distributed under the License is distributed on an "AS IS" BASIS, 452 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 453 * See the License for the specific language governing permissions and 454 * limitations under the License. 455 */let oR;function Ise(e){oR=e}const DV=function(e){return typeof e=="number"?"number:"+mV(e):"string:"+e},LV=function(e){if(e.isLeafNode()){const t=e.val();dn(typeof t=="string"||typeof t=="number"||typeof t=="object"&&su(t,".sv"),"Priority must be a string or number.")}else dn(e===oR||e.isEmpty(),"priority of unexpected type.");dn(e===oR||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** 456 * @license 457 * Copyright 2017 Google LLC 458 * 459 * Licensed under the Apache License, Version 2.0 (the "License"); 460 * you may not use this file except in compliance with the License. 461 * You may obtain a copy of the License at 462 * 463 * http://www.apache.org/licenses/LICENSE-2.0 464 * 465 * Unless required by applicable law or agreed to in writing, software 466 * distributed under the License is distributed on an "AS IS" BASIS, 467 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 468 * See the License for the specific language governing permissions and 469 * limitations under the License. 470 */let R5;class Ys{constructor(t,n=Ys.__childrenNodeConstructor.EMPTY_NODE){this.value_=t,this.priorityNode_=n,this.lazyHash_=null,dn(this.value_!==void 0&&this.value_!==null,"LeafNode shouldn't be created with null/undefined value."),LV(this.priorityNode_)}static set __childrenNodeConstructor(t){R5=t}static get __childrenNodeConstructor(){return R5}isLeafNode(){return!0}getPriority(){return this.priorityNode_}updatePriority(t){return new Ys(this.value_,t)}getImmediateChild(t){return t===".priority"?this.priorityNode_:Ys.__childrenNodeConstructor.EMPTY_NODE}getChild(t){return qr(t)?this:Br(t)===".priority"?this.priorityNode_:Ys.__childrenNodeConstructor.EMPTY_NODE}hasChild(){return!1}getPredecessorChildName(t,n){return null}updateImmediateChild(t,n){return t===".priority"?this.updatePriority(n):n.isEmpty()&&t!==".priority"?this:Ys.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.priorityNode_)}updateChild(t,n){const r=Br(t);return r===null?n:n.isEmpty()&&r!==".priority"?this:(dn(r!==".priority"||qd(t)===1,".priority must be the last token in a path"),this.updateImmediateChild(r,Ys.__childrenNodeConstructor.EMPTY_NODE.updateChild(Aa(t),n)))}isEmpty(){return!1}numChildren(){return 0}forEachChild(t,n){return!1}
470val(t){return t&&!this.getPriority().isEmpty()?{".value":this.getValue(),".priority":this.getPriority().val()}:this.getValue()}hash(){if(this.lazyHash_===null){let t="";this.priorityNode_.isEmpty()||(t+="priority:"+DV(this.priorityNode_.val())+":");const n=typeof this.value_;t+=n+":",n==="number"?t+=mV(this.value_):t+=this.value_,this.lazyHash_=dV(t)}return this.lazyHash_}getValue(){return this.value_}compareTo(t){return t===Ys.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof Ys.__childrenNodeConstructor?-1:(dn(t.isLeafNode(),"Unknown node type"),this.compareToLeafNode_(t))}compareToLeafNode_(t){const n=typeof t.value_,r=typeof this.value_,a=Ys.VALUE_TYPE_ORDER.indexOf(n),s=Ys.VALUE_TYPE_ORDER.indexOf(r);return dn(a>=0,"Unknown leaf type: "+n),dn(s>=0,"Unknown leaf type: "+r),a===s?r==="object"?0:this.value_<t.value_?-1:this.value_===t.value_?0:1:s-a}withIndex(){return this}isIndexed(){return!0}equals(t){if(t===this)return!0;if(t.isLeafNode()){const n=t;return this.value_===n.value_&&this.priorityNode_.equals(n.priorityNode_)}else return!1}}Ys.VALUE_TYPE_ORDER=["object","boolean","number","string"];/** 471 * @license 472 * Copyright 2017 Google LLC 473 * 474 * Licensed under the Apache License, Version 2.0 (the "License"); 475 * you may not use this file except in compliance with the License. 476 * You may obtain a copy of the License at 477 * 478 * http://www.apache.org/licenses/LICENSE-2.0 479 * 480 * Unless required by applicable law or agreed to in writing, software 481 * distributed under the License is distributed on an "AS IS" BASIS, 482 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 483 * See the License for the specific language governing permissions and 484 * limitations under the License. 485 */let $V,FV;function Ose(e){$V=e}function Mse(e){FV=e}class Pse extends Q_{compare(t,n){const r=t.node.getPriority(),a=n.node.getPriority(),s=r.compareTo(a);return s===0?$m(t.name,n.name):s}isDefinedOn(t){return!t.getPriority().isEmpty()}indexedValueChanged(t,n){return!t.getPriority().equals(n.getPriority())}minPost(){return Yr.MIN}maxPost(){return new Yr(fm,new Ys("[PRIORITY-POST]",FV))}makePost(t,n){const r=$V(t);return new Yr(n,new Ys("[PRIORITY-POST]",r))}toString(){return".priority"}}const as=new Pse;/** 486 * @license 487 * Copyright 2017 Google LLC 488 * 489 * Licensed under the Apache License, Version 2.0 (the "License"); 490 * you may not use this file except in compliance with the License. 491 * You may obtain a copy of the License at 492 * 493 * http://www.apache.org/licenses/LICENSE-2.0 494 * 495 * Unless required by applicable law or agreed to in writing, software 496 * distributed under the License is distributed on an "AS IS" BASIS, 497 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 498 * See the License for the specific language governing permissions and 499 * limitations under the License. 500 */const Dse=Math.log(2);class Lse{constructor(t){const n=s=>parseInt(Math.log(s)/Dse,10),r=s=>parseInt(Array(s+1).join("1"),2);this.count=n(t+1),this.current_=this.count-1;const a=r(this.count);this.bits_=t+1&a}nextBitIsOne(){const t=!(this.bits_&1<<this.current_);return this.current_--,t}}const lE=function(e,t,n,r){e.sort(t);const a=function(c,u){const d=u-c;let f,m;if(d===0)return null;if(d===1)return f=e[c],m=n?n(f):f,new Ks(m,f.node,Ks.BLACK,null,null);{const h=parseInt(d/2,10)+c,g=a(c,h),v=a(h+1,u);return f=e[h],m=n?n(f):f,new Ks(m,f.node,Ks.BLACK,g,v)}},s=function(c){let u=null,d=null,f=e.length;const m=function(g,v){const y=f-g,b=f;f-=g;const E=a(y+1,b),w=e[y],x=n?n(w):w;h(new Ks(x,w.node,v,null,E))},h=function(g){u?(u.left=g,u=g):(d=g,u=g)};for(let g=0;g<c.count;++g){const v=c.nextBitIsOne(),y=Math.pow(2,c.count-(g+1));v?m(y,Ks.BLACK):(m(y,Ks.BLACK),m(y,Ks.RED))}return d},i=new Lse(e.length),l=s(i);return new fo(r||t,l)};/** 501 * @license 502 * Copyright 2017 Google LLC 503 * 504 * Licensed under the Apache License, Version 2.0 (the "License"); 505 * you may not use this file except in compliance with the License. 506 * You may obtain a copy of the License at 507 * 508 * http://www.apache.org/licenses/LICENSE-2.0 509 * 510 * Unless required by applicable law or agreed to in writing, softw
510are 511 * distributed under the License is distributed on an "AS IS" BASIS, 512 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 513 * See the License for the specific language governing permissions and 514 * limitations under the License. 515 */let iC;const Zm={};class $u{constructor(t,n){this.indexes_=t,this.indexSet_=n}static get Default(){return dn(Zm&&as,"ChildrenNode.ts has not been loaded"),iC=iC||new $u({".priority":Zm},{".priority":as}),iC}get(t){const n=bp(this.indexes_,t);if(!n)throw new Error("No index defined for "+t);return n instanceof fo?n:null}hasIndex(t){return su(this.indexSet_,t.toString())}addIndex(t,n){dn(t!==Uh,"KeyIndex always exists and isn't meant to be added to the IndexMap.");const r=[];let a=!1;const s=n.getIterator(Yr.Wrap);let i=s.getNext();for(;i;)a=a||t.isDefinedOn(i.node),r.push(i),i=s.getNext();let l;a?l=lE(r,t.getCompare()):l=Zm;const c=t.toString(),u=Object.assign({},this.indexSet_);u[c]=t;const d=Object.assign({},this.indexes_);return d[c]=l,new $u(d,u)}addToIndexes(t,n){const r=sE(this.indexes_,(a,s)=>{const i=bp(this.indexSet_,s);if(dn(i,"Missing index implementation for "+s),a===Zm)if(i.isDefinedOn(t.node)){const l=[],c=n.getIterator(Yr.Wrap);let u=c.getNext();for(;u;)u.name!==t.name&&l.push(u),u=c.getNext();return l.push(t),lE(l,i.getCompare())}else return Zm;else{const l=n.get(t.name);let c=a;return l&&(c=c.remove(new Yr(t.name,l))),c.insert(t,t.node)}});return new $u(r,this.indexSet_)}removeFromIndexes(t,n){const r=sE(this.indexes_,a=>{if(a===Zm)return a;{const s=n.get(t.name);return s?a.remove(new Yr(t.name,s)):a}});return new $u(r,this.indexSet_)}}/** 516 * @license 517 * Copyright 2017 Google LLC 518 * 519 * Licensed under the Apache License, Version 2.0 (the "License"); 520 * you may not use this file except in compliance with the License. 521 * You may obtain a copy of the License at 522 * 523 * http://www.apache.org/licenses/LICENSE-2.0 524 * 525 * Unless required by applicable law or agreed to in writing, software 526 * distributed under the License is distributed on an "AS IS" BASIS, 527 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 528 * See the License for the specific language governing permissions and 529 * limitations under the License. 530 */let qg;class pr{constructor(t,n,r){this.children_=t,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&LV(this.priorityNode_),this.children_.isEmpty()&&dn(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}static get EMPTY_NODE(){return qg||(qg=new pr(new fo(IM),null,$u.Default))}isLeafNode(){return!1}getPriority(){return this.priorityNode_||qg}updatePriority(t){return this.children_.isEmpty()?this:new pr(this.children_,t,this.indexMap_)}getImmediateChild(t){if(t===".priority")return this.getPriority();{const n=this.children_.get(t);return n===null?qg:n}}getChild(t){const n=Br(t);return n===null?this:this.getImmediateChild(n).getChild(Aa(t))}hasChild(t){return this.children_.get(t)!==null}updateImmediateChild(t,n){if(dn(n,"We should always be passing snapshot nodes"),t===".priority")return this.updatePriority(n);{const r=new Yr(t,n);let a,s;n.isEmpty()?(a=this.children_.remove(t),s=this.indexMap_.removeFromIndexes(r,this.children_)):(a=this.children_.insert(t,n),s=this.indexMap_.addToIndexes(r,this.children_));const i=a.isEmpty()?qg:this.priorityNode_;return new pr(a,i,s)}}updateChild(t,n){const r=Br(t);if(r===null)return n;{dn(Br(t)!==".priority"||qd(t)===1,".priority must be the last token in a path");const a=this.getImmediateChild(r).updateChild(Aa(t),n);return this.updateImmediateChild(r,a)}}isEmpty(){return this.children_.isEmpty()}numChildren(){return this.children_.count()}val(t){if(this.isEmpty())return null;const n={};let r=0,a=0,s=!0;if(this.forEachChild(as,(i,l)=>{n[i]=l.val(t),r++,s&&pr.INTEGER_REGEXP_.test(i)?a=Math.max(a,Number(i)):s=!1}),!t&&s&&a<2*r){const i=[];for(const l in n)i[l]=n[l];return i}else return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n}hash(){if(this.lazyHash_===null){let t="";
530this.getPriority().isEmpty()||(t+="priority:"+DV(this.getPriority().val())+":"),this.forEachChild(as,(n,r)=>{const a=r.hash();a!==""&&(t+=":"+n+":"+a)}),this.lazyHash_=t===""?"":dV(t)}return this.lazyHash_}getPredecessorChildName(t,n,r){const a=this.resolveIndex_(r);if(a){const s=a.getPredecessorKey(new Yr(t,n));return s?s.name:null}else return this.children_.getPredecessorKey(t)}getFirstChildName(t){const n=this.resolveIndex_(t);if(n){const r=n.minKey();return r&&r.name}else return this.children_.minKey()}getFirstChild(t){const n=this.getFirstChildName(t);return n?new Yr(n,this.children_.get(n)):null}getLastChildName(t){const n=this.resolveIndex_(t);if(n){const r=n.maxKey();return r&&r.name}else return this.children_.maxKey()}getLastChild(t){const n=this.getLastChildName(t);return n?new Yr(n,this.children_.get(n)):null}forEachChild(t,n){const r=this.resolveIndex_(t);return r?r.inorderTraversal(a=>n(a.name,a.node)):this.children_.inorderTraversal(n)}getIterator(t){return this.getIteratorFrom(t.minPost(),t)}getIteratorFrom(t,n){const r=this.resolveIndex_(n);if(r)return r.getIteratorFrom(t,a=>a);{const a=this.children_.getIteratorFrom(t.name,Yr.Wrap);let s=a.peek();for(;s!=null&&n.compare(s,t)<0;)a.getNext(),s=a.peek();return a}}getReverseIterator(t){return this.getReverseIteratorFrom(t.maxPost(),t)}getReverseIteratorFrom(t,n){const r=this.resolveIndex_(n);if(r)return r.getReverseIteratorFrom(t,a=>a);{const a=this.children_.getReverseIteratorFrom(t.name,Yr.Wrap);let s=a.peek();for(;s!=null&&n.compare(s,t)>0;)a.getNext(),s=a.peek();return a}}compareTo(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===Fy?-1:0}withIndex(t){if(t===Uh||this.indexMap_.hasIndex(t))return this;{const n=this.indexMap_.addIndex(t,this.children_);return new pr(this.children_,this.priorityNode_,n)}}isIndexed(t){return t===Uh||this.indexMap_.hasIndex(t)}equals(t){if(t===this)return!0;if(t.isLeafNode())return!1;{const n=t;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){const r=this.getIterator(as),a=n.getIterator(as);let s=r.getNext(),i=a.getNext();for(;s&&i;){if(s.name!==i.name||!s.node.equals(i.node))return!1;s=r.getNext(),i=a.getNext()}return s===null&&i===null}else return!1;else return!1}}resolveIndex_(t){return t===Uh?null:this.indexMap_.get(t.toString())}}pr.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/;class $se extends pr{constructor(){super(new fo(IM),pr.EMPTY_NODE,$u.Default)}compareTo(t){return t===this?0:1}equals(t){return t===this}getPriority(){return this}getImmediateChild(t){return pr.EMPTY_NODE}isEmpty(){return!1}}const Fy=new $se;Object.defineProperties(Yr,{MIN:{value:new Yr(kp,pr.EMPTY_NODE)},MAX:{value:new Yr(fm,Fy)}});PV.__EMPTY_NODE=pr.EMPTY_NODE;Ys.__childrenNodeConstructor=pr;Ise(Fy);Mse(Fy);/** 531 * @license 532 * Copyright 2017 Google LLC 533 * 534 * Licensed under the Apache License, Version 2.0 (the "License"); 535 * you may not use this file except in compliance with the License. 536 * You may obtain a copy of the License at 537 * 538 * http://www.apache.org/licenses/LICENSE-2.0 539 * 540 * Unless required by applicable law or agreed to in writing, software 541 * distributed under the License is distributed on an "AS IS" BASIS, 542 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 543 * See the License for the specific language governing permissions and 544 * limitations under the License. 545 */const Fse=!0;function Ss(e,t=null){if(e===null)return pr.EMPTY_NODE;if(typeof e=="object"&&".priority"in e&&(t=e[".priority"]),dn(t===null||typeof t=="string"||typeof t=="number"||typeof t=="object"&&".sv"in t,"Invalid priority type found: "+typeof t),typeof e=="object"&&".value"in e&&e[".value"]!==null&&(e=e[".value"]),typeof e!="object"||".sv"in e){const n=e;return new Ys(n,Ss(t))}if(!(e instanceof Array)&&Fse){const n=[];let r=!1;if(Si(e,(i,l)=>{if(i.substring(0,1)!=="."){const c=Ss(l);c.isEmpty()||(r=r||!c.getPriority().isEmpty(),n.push(new Yr(i,c)))}}),n.length===0)return pr.EMPTY_NODE;const s=lE(n,Ase,i=>i.name,IM);if(r){const i=lE(n,as.getCompare());return new pr(s,Ss(t),new $u({".priority":i},{".priority":as}))}else return new pr(s,Ss(t),$u.Default)}else{let n=pr.EMPTY_NODE;return Si(e,(r,a)=>{if(su(e,r)&&r.substring(0,1)!=="."){const s=Ss(a);(s.isLeafNode()||!s.isEmpty())&&(n=n.updateImmediateChild(r,s))}}),n.updatePriority(Ss(t))}}Ose(Ss);/** 546 * @license 547 * Copyright 2017 Google LLC 548 * 549 * Licensed under the Apache License, Version 2.0 (the "License");
550 * you may not use this file except in compliance with the License. 551 * You may obtain a copy of the License at 552 * 553 * http://www.apache.org/licenses/LICENSE-2.0 554 * 555 * Unless required by applicable law or agreed to in writing, software 556 * distributed under the License is distributed on an "AS IS" BASIS, 557 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 558 * See the License for the specific language governing permissions and 559 * limitations under the License. 560 */class zse extends Q_{constructor(t){super(),this.indexPath_=t,dn(!qr(t)&&Br(t)!==".priority","Can't create PathIndex with empty path or .priority key")}extractChild(t){return t.getChild(this.indexPath_)}isDefinedOn(t){return!t.getChild(this.indexPath_).isEmpty()}compare(t,n){const r=this.extractChild(t.node),a=this.extractChild(n.node),s=r.compareTo(a);return s===0?$m(t.name,n.name):s}makePost(t,n){const r=Ss(t),a=pr.EMPTY_NODE.updateChild(this.indexPath_,r);return new Yr(n,a)}maxPost(){const t=pr.EMPTY_NODE.updateChild(this.indexPath_,Fy);return new Yr(fm,t)}toString(){return _v(this.indexPath_,0).join("/")}}/** 561 * @license 562 * Copyright 2017 Google LLC 563 * 564 * Licensed under the Apache License, Version 2.0 (the "License"); 565 * you may not use this file except in compliance with the License. 566 * You may obtain a copy of the License at 567 * 568 * http://www.apache.org/licenses/LICENSE-2.0 569 * 570 * Unless required by applicable law or agreed to in writing, software 571 * distributed under the License is distributed on an "AS IS" BASIS, 572 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 573 * See the License for the specific language governing permissions and 574 * limitations under the License. 575 */class Hse extends Q_{compare(t,n){const r=t.node.compareTo(n.node);return r===0?$m(t.name,n.name):r}isDefinedOn(t){return!0}indexedValueChanged(t,n){return!t.equals(n)}
vendor: 8,523 bytes, lines 575-639
575minPost(){return Yr.MIN}maxPost(){return Yr.MAX}makePost(t,n){const r=Ss(t);return new Yr(n,r)}toString(){return".value"}}const Vse=new Hse;/** 576 * @license 577 * Copyright 2017 Google LLC 578 * 579 * Licensed under the Apache License, Version 2.0 (the "License"); 580 * you may not use this file except in compliance with the License. 581 * You may obtain a copy of the License at 582 * 583 * http://www.apache.org/licenses/LICENSE-2.0 584 * 585 * Unless required by applicable law or agreed to in writing, software 586 * distributed under the License is distributed on an "AS IS" BASIS, 587 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 588 * See the License for the specific language governing permissions and 589 * limitations under the License. 590 */function zV(e){return{type:"value",snapshotNode:e}}function Sp(e,t){return{type:"child_added",snapshotNode:t,childName:e}}function kv(e,t){return{type:"child_removed",snapshotNode:t,childName:e}}function Sv(e,t,n){return{type:"child_changed",snapshotNode:t,childName:e,oldSnap:n}}function Use(e,t){return{type:"child_moved",snapshotNode:t,childName:e}}/** 591 * @license 592 * Copyright 2017 Google LLC 593 * 594 * Licensed under the Apache License, Version 2.0 (the "License"); 595 * you may not use this file except in compliance with the License. 596 * You may obtain a copy of the License at 597 * 598 * http://www.apache.org/licenses/LICENSE-2.0 599 * 600 * Unless required by applicable law or agreed to in writing, software 601 * distributed under the License is distributed on an "AS IS" BASIS, 602 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 603 * See the License for the specific language governing permissions and 604 * limitations under the License. 605 */class OM{constructor(t){this.index_=t}updateChild(t,n,r,a,s,i){dn(t.isIndexed(this.index_),"A node must be indexed if only a child is updated");const l=t.getImmediateChild(n);return l.getChild(a).equals(r.getChild(a))&&l.isEmpty()===r.isEmpty()||(i!=null&&(r.isEmpty()?t.hasChild(n)?i.trackChildChange(kv(n,l)):dn(t.isLeafNode(),"A child remove without an old child only makes sense on a leaf node"):l.isEmpty()?i.trackChildChange(Sp(n,r)):i.trackChildChange(Sv(n,r,l))),t.isLeafNode()&&r.isEmpty())?t:t.updateImmediateChild(n,r).withIndex(this.index_)}updateFullNode(t,n,r){return r!=null&&(t.isLeafNode()||t.forEachChild(as,(a,s)=>{n.hasChild(a)||r.trackChildChange(kv(a,s))}),n.isLeafNode()||n.forEachChild(as,(a,s)=>{if(t.hasChild(a)){const i=t.getImmediateChild(a);i.equals(s)||r.trackChildChange(Sv(a,s,i))}else r.trackChildChange(Sp(a,s))})),n.withIndex(this.index_)}updatePriority(t,n){return t.isEmpty()?pr.EMPTY_NODE:t.updatePriority(n)}filtersNodes(){return!1}getIndexedFilter(){return this}getIndex(){return this.index_}}/** 606 * @license 607 * Copyright 2017 Google LLC 608 * 609 * Licensed under the Apache License, Version 2.0 (the "License"); 610 * you may not use this file except in compliance with the License. 611 * You may obtain a copy of the License at 612 * 613 * http://www.apache.org/licenses/LICENSE-2.0 614 * 615 * Unless required by applicable law or agreed to in writing, software 616 * distributed under the License is distributed on an "AS IS" BASIS, 617 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 618 * See the License for the specific language governing permissions and 619 * limitations under the License. 620 */class Cv{constructor(t){this.indexedFilter_=new OM(t.getIndex()),this.index_=t.getIndex(),this.startPost_=Cv.getStartPost_(t),this.endPost_=Cv.getEndPost_(t),this.startIsInclusive_=!t.startAfterSet_,this.endIsInclusive_=!t.endBeforeSet_}getStartPost(){return this.startPost_}getEndPost(){return this.endPost_}matches(t){const n=this.startIsInclusive_?this.index_.compare(this.getStartPost(),t)<=0:this.index_.compare(this.getStartPost(),t)<0,r=this.endIsInclusive_?this.index_.compare(t,this.getEndPost())<=0:this.index_.compare(t,this.getEndPost())<0;return n&&r}updateChild(t,n,r,a,s,i){return this.matches(new Yr(n,r))||(r=pr.EMPTY_NODE),this.indexedFilter_.updateChild(t,n,r,a,s,i)}updateFullNode(t,n,r){n.isLeafNode()&&(n=pr.EMPTY_NODE);let a=n.withIndex(this.index_);a=a.updatePriority(pr.EMPTY_NODE);const s=this;return n.forEachChild(as,(i,l)=>{s.matches(new Yr(i,l))||(a=a.updateImmediateChild(i,pr.EMPTY_NODE))}),this.indexedFilter_.updateFullNode(t,a,r)}updatePriority(t,n){return t}filtersNodes(){return!0}getIndexedFilter(){return this.indexedFilter_}getIndex(){return this.index_}static getStartPost_(t){if(t.hasStart()){const n=t.getIndexStartName();return t.getIndex().makePost(t.getIndexStartValue(),n)}else return t.getIndex().minPost()}static getEndPost_(t){if(t.hasEnd()){const n=t.getIndexEndName();return t.getIndex().makePost(t.getIndexEndValue(),n)}else return t.getIndex().maxPost()}}/** 621 * @license 622 * Copyright 2017 Google LLC 623 * 624 * Licensed under the Apache License, Version 2.0 (the "License"); 625 * you may not use this file except in compliance with the License. 626 * You may obtain a copy of the License at 627 * 628 * http://www.apache.org/licenses/LICENSE-2.0 629 * 630 * Unless required by applicable law or agreed to in writing, software 631 * distributed under the License is distributed on an "AS IS" BASIS, 632 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 633 * See the License for the specific language governing permissions and 634 * limitations under the License. 635 */class Bse{constructor(t){this.withinDirectionalStart=n=>this.reverse_?this.withinEndPost(n):this.withinStartPost(n),this.withinDirectionalEnd=n=>this.reverse_?this.withinStartPost(n):this.withinEndPost(n),this.withinStartPost=n=>{const r=this.index_.compare(this.rangedFilter_.getStartPost(),n);return this.startIsInclusive_?r<=0:r<0},this.withinEndPost=n=>{const r=this.index_.compare(n,this.rangedFilter_.getEndPost());return this.endIsInclusive_?r<=0:r<0},this.rangedFilter_=new Cv(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft(),this.startIsInclusive_=!t.startAfterSet_,this.endIsInclusive_=!t.endBeforeSet_}updateChild(t,n,r,a,s,i){return this.rangedFilter_.matches(new Yr(n,r))||(r=pr.EMPTY_NODE),t.getImmediateChild(n).equals(r)?t:t.numChildren()<this.limit_?this.rangedFilter_.getIndexedFilter().updateChild(t,n,r,a,s,i):this.fullLimitUpdateChild_(t,n,r,s,i)}updateFullNode(t,n,r){let a;if(n.isLeafNode()||n.isEmpty())a=pr.EMPTY_NODE.withIndex(this.index_);else if(this.limit_*2<n.numChildren()&&n.isIndexed(this.index_)){a=pr.EMPTY_NODE.withIndex(this.index_);let s;this.reverse_?s=n.getReverseIteratorFrom(this.rangedFilter_.getEndPost(),this.index_):s=n.getIteratorFrom(this.rangedFilter_.getStartPost(),this.index_);let i=0;for(;s.hasNext()&&i<this.limit_;){const l=s.getNext();if(this.withinDirectionalStart(l))if(this.withinDirectionalEnd(l))a=a.updateImmediateChild(l.name,l.node),i++;else break;else continue}}else{a=n.withIndex(this.index_),a=a.updatePriority(pr.EMPTY_NODE);let s;this.reverse_?s=a.getReverseIterator(this.index_):s=a.getIterator(this.index_);let i=0;for(;s.hasNext();){const l=s.getNext();i<this.limit_&&this.withinDirectionalStart(l)&&this.withinDirectionalEnd(l)?i++:a=a.updateImmediateChild(l.name,pr.EMPTY_NODE)}}return this.rangedFilter_.getIndexedFilter().updateFullNode(t,a,r)}updatePriority(t,n){return t}filtersNodes(){return!0}getIndexedFilter(){return this.rangedFilter_.getIndexedFilter()}getIndex(){return this.index_}fullLimitUpdateChild_(t,n,r,a,s){let i;if(this.reverse_){const f=this.index_.getCompare();i=(m,h)=>f(h,m)}else i=this.index_.getCompare();const l=t;dn(l.numChildren()===this.limit_,"");const c=new Yr(n,r),u=this.reverse_?l.getFirstChild(this.index_):l.getLastChild(this.index_),d=this.rangedFilter_.matches(c);if(l.hasChild(n)){const f=l.getImmediateChild(n);let m=a.getChildAfterChild(this.index_,u,this.reverse_);for(;m!=null&&(m.name===n||l.hasChild(m.name));)m=a.getChildAfterChild(this.index_,m,this.reverse_);const h=m==null?1:i(m,c);if(d&&!r.isEmpty()&&h>=0)return s!=null&&s.trackChildChange(Sv(n,r,f)),l.updateImmediateChild(n,r);{s!=null&&s.trackChildChange(kv(n,f));const v=l.updateImmediateChild(n,pr.EMPTY_NODE);return m!=null&&this.rangedFilter_.matches(m)?(s!=null&&s.trackChildChange(Sp(m.name,m.node)),v.updateImmediateChild(m.name,m.node)):v}}else return r.isEmpty()?t:d&&i(u,c)>=0?(s!=null&&(s.trackChildChange(kv(u.name,u.node)),s.trackChildChange(Sp(n,r))),l.updateImmediateChild(n,r).updateImmediateChild(u.name,pr.EMPTY_NODE)):t}}/** 636 * @license 637 * Copyright 2017 Google LLC 638 * 639 * Licensed under the Apache License, Version 2.0 (the "License");
640 * you may not use this file except in compliance with the License. 641 * You may obtain a copy of the License at 642 * 643 * http://www.apache.org/licenses/LICENSE-2.0 644 * 645 * Unless required by applicable law or agreed to in writing, software 646 * distributed under the License is distributed on an "AS IS" BASIS, 647 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 648 * See the License for the specific language governing permissions and 649 * limitations under the License. 650 */class MM{constructor(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=as}hasStart(){return this.startSet_}isViewFromLeft(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"}getIndexStartValue(){return dn(this.startSet_,"Only valid if start has been set"),this.indexStartValue_}getIndexStartName(){return dn(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:kp}hasEnd(){return this.endSet_}getIndexEndValue(){return dn(this.endSet_,"Only valid if end has been set"),this.indexEndValue_}getIndexEndName(){return dn(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:fm}hasLimit(){return this.limitSet_}hasAnchoredLimit(){return this.limitSet_&&this.viewFrom_!==""}getLimit(){return dn(this.limitSet_,"Only valid if limit has been set"),this.limit_}getIndex(){return this.index_}loadsAllData(){return!(this.startSet_||this.endSet_||this.limitSet_)}isDefault(){return this.loadsAllData()&&this.index_===as}copy(){const t=new MM;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.startAfterSet_=this.startAfterSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.endBeforeSet_=this.endBeforeSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_=this.index_,t.viewFrom_=this.viewFrom_,t}}function jse(e){return e.loadsAllData()?new OM(e.getIndex()):e.hasLimit()?new Bse(e):new Cv(e)}function T5(e){const t={};if(e.isDefault())return t;let n;if(e.index_===as?n="$priority":e.index_===Vse?n="$value":e.index_===Uh?n="$key":(dn(e.index_ instanceof zse,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=Xs(n),e.startSet_){const r=e.startAfterSet_?"startAfter":"startAt";t[r]=Xs(e.indexStartValue_),e.startNameSet_&&(t[r]+=","+Xs(e.indexStartName_))}if(e.endSet_){const r=e.endBeforeSet_?"endBefore":"endAt";t[r]=Xs(e.indexEndValue_),e.endNameSet_&&(t[r]+=","+Xs(e.indexEndName_))}return e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function A5(e){const t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_),t.sin=!e.startAfterSet_),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_),t.ein=!e.endBeforeSet_),e.limitSet_){t.l=e.limit_;let n=e.viewFrom_;n===""&&(e.isViewFromLeft()?n="l":n="r"),t.vf=n}return e.index_!==as&&(t.i=e.index_.toString()),t}/** 651 * @license 652 * Copyright 2017 Google LLC 653 * 654 * Licensed under the Apache License, Version 2.0 (the "License"); 655 * you may not use this file except in compliance with the License. 656 * You may obtain a copy of the License at 657 * 658 * http://www.apache.org/licenses/LICENSE-2.0 659 * 660 * Unless required by applicable law or agreed to in writing, software 661 * distributed under the License is distributed on an "AS IS" BASIS, 662 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 663 * See the License for the specific language governing permissions and 664 * limitations under the License. 665 */class cE extends AV{constructor(t,n,r,a){super(),this.repoInfo_=t,this.onDataUpdate_=n,this.authTokenProvider_=r,this.appCheckTokenProvider_=a,this.log_=$y("p:rest:"),this.listens_={}}reportStats(t){throw new Error("Method not implemented.")}static getListenId_(t,n){return n!==void 0?"tag$"+n:(dn(t._queryParams.isDefault(),"should have a tag if it's not a default query."),t._path.toString())}listen(t,n,r,a){const s=t._path.toString();this.log_("Listen called for "+s+" "+t._queryIdentifier);const i=cE.getListenId_(t,r),l={};this.listens_[i]=l;const c=T5(t._queryParams);this.restRequest_(s+".json",c,(u,d)=>{let f=d;if(u===404&&(f=null,u=null),u===null&&this.onDataUpdate_(s,f,!1,r),bp(this.listens_,i)===l){let m;u?u===401?m="permission_denied":m="rest_error:"+u:m="ok",a(m,null)}})}unlisten(t,n){const r=cE.getListenId_(t,n);delete this.listens_[r]}get(t){const n=T5(t._queryParams),r=t._path.toString(),a=new Rd;return this.restRequest_(r+".json",n,(s,i)=>{let l=i;s===404&&(l=null,s=null),s===null?(this.onDataUpdate_(r,l,!1,null),a.resolve(l)):a.reject(new Error(l))}),a.promise}refreshAuthToken(t){}restRequest_(t,n={},r){return n.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(([a,s])=>{a&&a.accessToken&&(n.auth=a.accessToken),s&&s.token&&(n.ac=s.token);const i=(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host+t+"?ns="+this.repoInfo_.namespace+Ire(n);this.log_("Sending REST request for "+i);const l=new XMLHttpRequest;l.onreadystatechange=()=>{if(r&&l.readyState===4){this.log_("REST Response for "+i+" received. status:",l.status,"response:",l.responseText);let c=null;if(l.status>=200&&l.status<300){try{c=gM(l.responseText)}catch{ho("Failed to parse JSON response for "+i+": "+l.responseText)}r(null,c)}else l.status!==401&&l.status!==404&&ho("Got unsuccessful REST response for "+i+" Status: "+l.status),r(l.status);r=null}},l.open("GET",i,!0),l.send()})}}/** 666 * @license 667 * Copyright 2017 Google LLC 668 * 669 * Licensed under the Apache License, Version 2.0 (the "License");
670 * you may not use this file except in compliance with the License. 671 * You may obtain a copy of the License at 672 * 673 * http://www.apache.org/licenses/LICENSE-2.0 674 * 675 * Unless required by applicable law or agreed to in writing, software 676 * distributed under the License is distributed on an "AS IS" BASIS, 677 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 678 * See the License for the specific language governing permissions and 679 * limitations under the License. 680 */class Wse{constructor(){this.rootNode_=pr.EMPTY_NODE}getNode(t){return this.rootNode_.getChild(t)}updateSnapshot(t,n){this.rootNode_=this.rootNode_.updateChild(t,n)}}/** 681 * @license 682 * Copyright 2017 Google LLC 683 * 684 * Licensed under the Apache License, Version 2.0 (the "License"); 685 * you may not use this file except in compliance with the License. 686 * You may obtain a copy of the License at 687 * 688 * http://www.apache.org/licenses/LICENSE-2.0 689 * 690 * Unless required by applicable law or agreed to in writing, software 691 * distributed under the License is distributed on an "AS IS" BASIS, 692 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 693 * See the License for the specific language governing permissions and 694 * limitations under the License. 695 */function uE(){return{value:null,children:new Map}}function hg(e,t,n){if(qr(t))e.value=n,e.children.clear();else if(e.value!==null)e.value=e.value.updateChild(t,n);else{const r=Br(t);e.children.has(r)||e.children.set(r,uE());const a=e.children.get(r);t=Aa(t),hg(a,t,n)}}function lR(e,t){if(qr(t))return e.value=null,e.children.clear(),!0;if(e.value!==null){if(e.value.isLeafNode())return!1;{const n=e.value;return e.value=null,n.forEachChild(as,(r,a)=>{hg(e,new ba(r),a)}),lR(e,t)}}else if(e.children.size>0){const n=Br(t);return t=Aa(t),e.children.has(n)&&lR(e.children.get(n),t)&&e.children.delete(n),e.children.size===0}else return!0}function cR(e,t,n){e.value!==null?n(t,e.value):Gse(e,(r,a)=>{const s=new ba(t.toString()+"/"+r);cR(a,s,n)})}function Gse(e,t){e.children.forEach((n,r)=>{t(r,n)})}/** 696 * @license 697 * Copyright 2017 Google LLC 698 * 699 * Licensed under the Apache License, Version 2.0 (the "License"); 700 * you may not use this file except in compliance with the License. 701 * You may obtain a copy of the License at 702 * 703 * http://www.apache.org/licenses/LICENSE-2.0 704 * 705 * Unless required by applicable law or agreed to in writing, software 706 * distributed under the License is distributed on an "AS IS" BASIS, 707 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 708 * See the License for the specific language governing permissions and 709 * limitations under the License. 710 */class qse{constructor(t){this.collection_=t,this.last_=null}get(){const t=this.collection_.get(),n=Object.assign({},t);return this.last_&&Si(this.last_,(r,a)=>{n[r]=n[r]-a}),this.last_=t,n}}/** 711 * @license 712 * Copyright 2017 Google LLC 713 * 714 * Licensed under the Apache License, Version 2.0 (the "License"); 715 * you may not use this file except in compliance with the License. 716 * You may obtain a copy of the License at 717 * 718 * http://www.apache.org/licenses/LICENSE-2.0 719 * 720 * Unless required by applicable law or agreed to in writing, software 721 * distributed under the License is distributed on an "AS IS" BASIS, 722 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 723 * See the License for the specific language governing permissions and 724 * limitations under the License. 725 */const I5=10*1e3,Yse=30*1e3,Kse=5*60*1e3;class Zse{constructor(t,n){this.server_=n,this.statsToReport_={},this.statsListener_=new qse(t);const r=I5+(Yse-I5)*Math.random();V0(this.reportStats_.bind(this),Math.floor(r))}reportStats_(){const t=this.statsListener_.get(),n={};let r=!1;Si(t,(a,s)=>{s>0&&su(this.statsToReport_,a)&&(n[a]=s,r=!0)}),r&&this.server_.reportStats(n),V0(this.reportStats_.bind(this),Math.floor(Math.random()*2*Kse))}}/** 726 * @license 727 * Copyright 2017 Google LLC 728 * 729 * Licensed under the Apache License, Version 2.0 (the "License"); 730 * you may not use this file except in compliance with the License. 731 * You may obtain a copy of the License at 732 * 733 * http://www.apache.org/licenses/LICENSE-2.0 734 * 735 * Unless required by applicable law or agreed to in writing, softw
735are 736 * distributed under the License is distributed on an "AS IS" BASIS, 737 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 738 * See the License for the specific language governing permissions and 739 * limitations under the License. 740 */var rc;(function(e){e[e.OVERWRITE=0]="OVERWRITE",e[e.MERGE=1]="MERGE",e[e.ACK_USER_WRITE=2]="ACK_USER_WRITE",e[e.LISTEN_COMPLETE=3]="LISTEN_COMPLETE"})(rc||(rc={}));function HV(){return{fromUser:!0,fromServer:!1,queryId:null,tagged:!1}}function PM(){return{fromUser:!1,fromServer:!0,queryId:null,tagged:!1}}function DM(e){return{fromUser:!1,fromServer:!0,queryId:e,tagged:!0}}/** 741 * @license 742 * Copyright 2017 Google LLC 743 * 744 * Licensed under the Apache License, Version 2.0 (the "License"); 745 * you may not use this file except in compliance with the License. 746 * You may obtain a copy of the License at 747 * 748 * http://www.apache.org/licenses/LICENSE-2.0 749 * 750 * Unless required by applicable law or agreed to in writing, software 751 * distributed under the License is distributed on an "AS IS" BASIS, 752 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 753 * See the License for the specific language governing permissions and 754 * limitations under the License. 755 */class dE{constructor(t,n,r){this.path=t,this.affectedTree=n,this.revert=r,this.type=rc.ACK_USER_WRITE,this.source=HV()}operationForChild(t){if(qr(this.path)){if(this.affectedTree.value!=null)return dn(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;{const n=this.affectedTree.subtree(new ba(t));return new dE(ha(),n,this.revert)}}else return dn(Br(this.path)===t,"operationForChild called for unrelated child."),new dE(Aa(this.path),this.affectedTree,this.revert)}}/** 756 * @license 757 * Copyright 2017 Google LLC 758 * 759 * Licensed under the Apache License, Version 2.0 (the "License"); 760 * you may not use this file except in compliance with the License. 761 * You may obtain a copy of the License at 762 * 763 * http://www.apache.org/licenses/LICENSE-2.0 764 * 765 * Unless required by applicable law or agreed to in writing, software 766 * distributed under the License is distributed on an "AS IS" BASIS, 767 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 768 * See the License for the specific language governing permissions and 769 * limitations under the License. 770 */class Nv{constructor(t,n){this.source=t,this.path=n,this.type=rc.LISTEN_COMPLETE}operationForChild(t){return qr(this.path)?new Nv(this.source,ha()):new Nv(this.source,Aa(this.path))}}/** 771 * @license 772 * Copyright 2017 Google LLC 773 * 774 * Licensed under the Apache License, Version 2.0 (the "License"); 775 * you may not use this file except in compliance with the License. 776 * You may obtain a copy of the License at 777 * 778 * http://www.apache.org/licenses/LICENSE-2.0 779 * 780 * Unless required by applicable law or agreed to in writing, software 781 * distributed under the License is distributed on an "AS IS" BASIS, 782 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 783 * See the License for the specific language governing permissions and 784 * limitations under the License. 785 */class mm{constructor(t,n,r){this.source=t,this.path=n,this.snap=r,this.type=rc.OVERWRITE}operationForChild(t){return qr(this.path)?new mm(this.source,ha(),this.snap.getImmediateChild(t)):new mm(this.source,Aa(this.path),this.snap)}}/** 786 * @license 787 * Copyright 2017 Google LLC 788 * 789 * Licensed under the Apache License, Version 2.0 (the "License"); 790 * you may not use this file except in compliance with the License. 791 * You may obtain a copy of the License at 792 * 793 * http://www.apache.org/licenses/LICENSE-2.0 794 * 795 * Unless required by applicable law or agreed to in writing, software 796 * distributed under the License is distributed on an "AS IS" BASIS, 797 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 798 * See the License for the specific language governing permissions and 799 * limitations under the License. 800 */class Rv{constructor(t,n,r){this.source=t,this.path=n,this.children=r,this.type=rc.MERGE}operationForChild(t){if(qr(this.path)){const n=this.children.subtree(new ba(t));return n.isEmpty()?null:n.value?new mm(this.source,ha(),n.value):new Rv(this.source,ha(),n)}else return dn(Br(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new Rv(this.source,Aa(this.path),this.children)}toString(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"}}/** 801 * @license 802 * Copyright 2017 Google LLC 803 * 804 * Licensed under the Apache License, Version 2.0 (the "License");
805 * you may not use this file except in compliance with the License. 806 * You may obtain a copy of the License at 807 * 808 * http://www.apache.org/licenses/LICENSE-2.0 809 * 810 * Unless required by applicable law or agreed to in writing, software 811 * distributed under the License is distributed on an "AS IS" BASIS, 812 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 813 * See the License for the specific language governing permissions and 814 * limitations under the License. 815 */class hm{constructor(t,n,r){this.node_=t,this.fullyInitialized_=n,this.filtered_=r}isFullyInitialized(){return this.fullyInitialized_}isFiltered(){return this.filtered_}isCompleteForPath(t){if(qr(t))return this.isFullyInitialized()&&!this.filtered_;const n=Br(t);return this.isCompleteForChild(n)}isCompleteForChild(t){return this.isFullyInitialized()&&!this.filtered_||this.node_.hasChild(t)}getNode(){return this.node_}}/** 816 * @license 817 * Copyright 2017 Google LLC 818 * 819 * Licensed under the Apache License, Version 2.0 (the "License"); 820 * you may not use this file except in compliance with the License. 821 * You may obtain a copy of the License at 822 * 823 * http://www.apache.org/licenses/LICENSE-2.0 824 * 825 * Unless required by applicable law or agreed to in writing, software 826 * distributed under the License is distributed on an "AS IS" BASIS, 827 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 828 * See the License for the specific language governing permissions and 829 * limitations under the License. 830 */class Xse{constructor(t){this.query_=t,this.index_=this.query_._queryParams.getIndex()}}function Qse(e,t,n,r){const a=[],s=[];return t.forEach(i=>{i.type==="child_changed"&&e.index_.indexedValueChanged(i.oldSnap,i.snapshotNode)&&s.push(Use(i.childName,i.snapshotNode))}),Yg(e,a,"child_removed",t,r,n),Yg(e,a,"child_added",t,r,n),Yg(e,a,"child_moved",s,r,n),Yg(e,a,"child_changed",t,r,n),Yg(e,a,"value",t,r,n),a}function Yg(e,t,n,r,a,s){const i=r.filter(l=>l.type===n);i.sort((l,c)=>eie(e,l,c)),i.forEach(l=>{const c=Jse(e,l,s);a.forEach(u=>{u.respondsTo(l.type)&&t.push(u.createEvent(c,e.query_))})})}function Jse(e,t,n){return t.type==="value"||t.type==="child_removed"||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}function eie(e,t,n){if(t.childName==null||n.childName==null)throw Py("Should only compare child_ events.");const r=new Yr(t.childName,t.snapshotNode),a=new Yr(n.childName,n.snapshotNode);return e.index_.compare(r,a)}/** 831 * @license 832 * Copyright 2017 Google LLC 833 * 834 * Licensed under the Apache License, Version 2.0 (the "License"); 835 * you may not use this file except in compliance with the License. 836 * You may obtain a copy of the License at 837 * 838 * http://www.apache.org/licenses/LICENSE-2.0 839 * 840 * Unless required by applicable law or agreed to in writing, software 841 * distributed under the License is distributed on an "AS IS" BASIS, 842 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 843 * See the License for the specific language governing permissions and 844 * limitations under the License. 845 */function J_(e,t){return{eventCache:e,serverCache:t}}function U0(e,t,n,r){return J_(new hm(t,n,r),e.serverCache)}function VV(e,t,n,r){return J_(e.eventCache,new hm(t,n,r))}function uR(e){return e.eventCache.isFullyInitialized()?e.eventCache.getNode():null}function pm(e){return e.serverCache.isFullyInitialized()?e.serverCache.getNode():null}/** 846 * @license 847 * Copyright 2017 Google LLC 848 * 849 * Licensed under the Apache License, Version 2.0 (the "License"); 850 * you may not use this file except in compliance with the License. 851 * You may obtain a copy of the License at 852 * 853 * http://www.apache.org/licenses/LICENSE-2.0 854 * 855 * Unless required by applicable law or agreed to in writing, software 856 * distributed under the License is distributed on an "AS IS" BASIS, 857 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 858 * See the License for the specific language governing permissions and 859 * limitations under the License. 860 */let oC;const tie=()=>(oC||(oC=new fo(zae)),oC);class Pa{constructor(t,n=tie()){this.value=t,this.children=n}static fromObject(t){let n=new Pa(null);return Si(t,(r,a)=>{n=n.set(new ba(r),a)}),n}isEmpty(){return this.value===null&&this.children.isEmpty()}findRootMostMatchingPathAndValue(t,n){if(this.value!=null&&n(this.value))return{path:ha(),value:this.value};if(qr(t))return null;{const r=Br(t),a=this.children.get(r);if(a!==null){const s=a.findRootMostMatchingPathAndValue(Aa(t),n);return s!=null?{path:ws(new ba(r),s.path),value:s.value}:null}else return null}}findRootMostValueAndPath(t){return this.findRootMostMatchingPathAndValue(t,()=>!0)}subtree(t){if(qr(t))return this;{const n=Br(t),r=this.children.get(n);return r!==null?r.subtree(Aa(t)):new Pa(null)}}set(t,n){if(qr(t))return new Pa(n,this.children);{const r=Br(t),s=(this.children.get(r)||new Pa(null)).set(Aa(t),n),i=this.children.insert(r,s);return new Pa(this.value,i)}}remove(t){if(qr(t))return this.children.isEmpty()?new Pa(null):new Pa(null,this.children);{const n=Br(t),r=this.children.get(n);if(r){const a=r.remove(Aa(t));let s;return a.isEmpty()?s=this.children.remove(n):s=this.children.insert(n,a),this.value===null&&s.isEmpty()?new Pa(null):new Pa(this.value,s)}else return this}}get(t){if(qr(t))return this.value;{const n=Br(t),r=this.children.get(n);return r?r.get(Aa(t)):null}}setTree(t,n){if(qr(t))return n;{const r=Br(t),s=(this.children.get(r)||new Pa(null)).setTree(Aa(t),n);let i;return s.isEmpty()?i=this.children.remove(r):i=this.children.insert(r,s),new Pa(this.value,i)}}fold(t){return this.fold_(ha(),t)}fold_(t,n){const r={};return this.children.inorderTraversal((a,s)=>{r[a]=s.fold_(ws(t,a),n)}),n(t,this.value,r)}findOnPath(t,n){return this.findOnPath_(t,ha(),n)}findOnPath_(t,n,r){const a=this.value?r(n,this.value):!1;if(a)return a;
vendor: 8,872 bytes, lines 860-909
860if(qr(t))return null;{const s=Br(t),i=this.children.get(s);return i?i.findOnPath_(Aa(t),ws(n,s),r):null}}foreachOnPath(t,n){return this.foreachOnPath_(t,ha(),n)}foreachOnPath_(t,n,r){if(qr(t))return this;{this.value&&r(n,this.value);const a=Br(t),s=this.children.get(a);return s?s.foreachOnPath_(Aa(t),ws(n,a),r):new Pa(null)}}foreach(t){this.foreach_(ha(),t)}foreach_(t,n){this.children.inorderTraversal((r,a)=>{a.foreach_(ws(t,r),n)}),this.value&&n(t,this.value)}foreachChild(t){this.children.inorderTraversal((n,r)=>{r.value&&t(n,r.value)})}}/** 861 * @license 862 * Copyright 2017 Google LLC 863 * 864 * Licensed under the Apache License, Version 2.0 (the "License"); 865 * you may not use this file except in compliance with the License. 866 * You may obtain a copy of the License at 867 * 868 * http://www.apache.org/licenses/LICENSE-2.0 869 * 870 * Unless required by applicable law or agreed to in writing, software 871 * distributed under the License is distributed on an "AS IS" BASIS, 872 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 873 * See the License for the specific language governing permissions and 874 * limitations under the License. 875 */class oc{constructor(t){this.writeTree_=t}static empty(){return new oc(new Pa(null))}}function B0(e,t,n){if(qr(t))return new oc(new Pa(n));{const r=e.writeTree_.findRootMostValueAndPath(t);if(r!=null){const a=r.path;let s=r.value;const i=uo(a,t);return s=s.updateChild(i,n),new oc(e.writeTree_.set(a,s))}else{const a=new Pa(n),s=e.writeTree_.setTree(t,a);return new oc(s)}}}function O5(e,t,n){let r=e;return Si(n,(a,s)=>{r=B0(r,ws(t,a),s)}),r}function M5(e,t){if(qr(t))return oc.empty();{const n=e.writeTree_.setTree(t,new Pa(null));return new oc(n)}}function dR(e,t){return Fm(e,t)!=null}function Fm(e,t){const n=e.writeTree_.findRootMostValueAndPath(t);return n!=null?e.writeTree_.get(n.path).getChild(uo(n.path,t)):null}function P5(e){const t=[],n=e.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(as,(r,a)=>{t.push(new Yr(r,a))}):e.writeTree_.children.inorderTraversal((r,a)=>{a.value!=null&&t.push(new Yr(r,a.value))}),t}function Fd(e,t){if(qr(t))return e;{const n=Fm(e,t);return n!=null?new oc(new Pa(n)):new oc(e.writeTree_.subtree(t))}}function fR(e){return e.writeTree_.isEmpty()}function Cp(e,t){return UV(ha(),e.writeTree_,t)}function UV(e,t,n){if(t.value!=null)return n.updateChild(e,t.value);{let r=null;return t.children.inorderTraversal((a,s)=>{a===".priority"?(dn(s.value!==null,"Priority writes must always be leaf nodes"),r=s.value):n=UV(ws(e,a),s,n)}),!n.getChild(e).isEmpty()&&r!==null&&(n=n.updateChild(ws(e,".priority"),r)),n}}/** 876 * @license 877 * Copyright 2017 Google LLC 878 * 879 * Licensed under the Apache License, Version 2.0 (the "License"); 880 * you may not use this file except in compliance with the License. 881 * You may obtain a copy of the License at 882 * 883 * http://www.apache.org/licenses/LICENSE-2.0 884 * 885 * Unless required by applicable law or agreed to in writing, software 886 * distributed under the License is distributed on an "AS IS" BASIS, 887 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 888 * See the License for the specific language governing permissions and 889 * limitations under the License. 890 */function LM(e,t){return GV(t,e)}function nie(e,t,n,r,a){dn(r>e.lastWriteId,"Stacking an older write on top of newer ones"),a===void 0&&(a=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:a}),a&&(e.visibleWrites=B0(e.visibleWrites,t,n)),e.lastWriteId=r}function rie(e,t){for(let n=0;n<e.allWrites.length;n++){const r=e.allWrites[n];if(r.writeId===t)return r}return null}function aie(e,t){const n=e.allWrites.findIndex(l=>l.writeId===t);dn(n>=0,"removeWrite called with nonexistent writeId.");const r=e.allWrites[n];e.allWrites.splice(n,1);let a=r.visible,s=!1,i=e.allWrites.length-1;for(;a&&i>=0;){const l=e.allWrites[i];l.visible&&(i>=n&&sie(l,r.path)?a=!1:Sl(r.path,l.path)&&(s=!0)),i--}if(a){if(s)return iie(e),!0;if(r.snap)e.visibleWrites=M5(e.visibleWrites,r.path);else{const l=r.children;Si(l,c=>{e.visibleWrites=M5(e.visibleWrites,ws(r.path,c))})}return!0}else return!1}function sie(e,t){if(e.snap)return Sl(e.path,t);for(const n in e.children)if(e.children.hasOwnProperty(n)&&Sl(ws(e.path,n),t))return!0;return!1}function iie(e){e.visibleWrites=BV(e.allWrites,oie,ha()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}function oie(e){return e.visible}function BV(e,t,n){let r=oc.empty();for(let a=0;a<e.length;++a){const s=e[a];if(t(s)){const i=s.path;let l;if(s.snap)Sl(n,i)?(l=uo(n,i),r=B0(r,l,s.snap)):Sl(i,n)&&(l=uo(i,n),r=B0(r,ha(),s.snap.getChild(l)));else if(s.children){if(Sl(n,i))l=uo(n,i),r=O5(r,l,s.children);else if(Sl(i,n))if(l=uo(i,n),qr(l))r=O5(r,ha(),s.children);else{const c=bp(s.children,Br(l));if(c){const u=c.getChild(Aa(l));r=B0(r,ha(),u)}}}else throw Py("WriteRecord should have .snap or .children")}}return r}function jV(e,t,n,r,a){if(!r&&!a){const s=Fm(e.visibleWrites,t);if(s!=null)return s;{const i=Fd(e.visibleWrites,t);if(fR(i))return n;if(n==null&&!dR(i,ha()))return null;{const l=n||pr.EMPTY_NODE;return Cp(i,l)}}}else{const s=Fd(e.visibleWrites,t);if(!a&&fR(s))return n;if(!a&&n==null&&!dR(s,ha()))return null;{const i=function(u){return(u.visible||a)&&(!r||!~r.indexOf(u.writeId))&&(Sl(u.path,t)||Sl(t,u.path))},l=BV(e.allWrites,i,t),c=n||pr.EMPTY_NODE;return Cp(l,c)}}}function lie(e,t,n){let r=pr.EMPTY_NODE;const a=Fm(e.visibleWrites,t);if(a)return a.isLeafNode()||a.forEachChild(as,(s,i)=>{r=r.updateImmediateChild(s,i)}),r;if(n){const s=Fd(e.visibleWrites,t);return n.forEachChild(as,(i,l)=>{const c=Cp(Fd(s,new ba(i)),l);r=r.updateImmediateChild(i,c)}),P5(s).forEach(i=>{r=r.updateImmediateChild(i.name,i.node)}),r}else{const s=Fd(e.visibleWrites,t);return P5(s).forEach(i=>{r=r.updateImmediateChild(i.name,i.node)}),r}}function cie(e,t,n,r,a){dn(r||a,"Either existingEventSnap or existingServerSnap must exist");const s=ws(t,n);if(dR(e.visibleWrites,s))return null;{const i=Fd(e.visibleWrites,s);return fR(i)?a.getChild(n):Cp(i,a.getChild(n))}}function uie(e,t,n,r){const a=ws(t,n),s=Fm(e.visibleWrites,a);if(s!=null)return s;if(r.isCompleteForChild(n)){const i=Fd(e.visibleWrites,a);return Cp(i,r.getNode().getImmediateChild(n))}else return null}function die(e,t){return Fm(e.visibleWrites,t)}function fie(e,t,n,r,a,s,i){let l;const c=Fd(e.visibleWrites,t),u=Fm(c,ha());if(u!=null)l=u;else if(n!=null)l=Cp(c,n);else return[];if(l=l.withIndex(i),!l.isEmpty()&&!l.isLeafNode()){const d=[],f=i.getCompare(),m=s?l.getReverseIteratorFrom(r,i):l.getIteratorFrom(r,i);let h=m.getNext();for(;h&&d.length<a;)f(h,r)!==0&&d.push(h),h=m.getNext();return d}else return[]}function mie(){return{visibleWrites:oc.empty(),allWrites:[],lastWriteId:-1}}function fE(e,t,n,r){return jV(e.writeTree,e.treePath,t,n,r)}function $M(e,t){return lie(e.writeTree,e.treePath,t)}function D5(e,t,n,r){return cie(e.writeTree,e.treePath,t,n,r)}function mE(e,t){return die(e.writeTree,ws(e.treePath,t))}function hie(e,t,n,r,a,s){return fie(e.writeTree,e.treePath,t,n,r,a,s)}function FM(e,t,n){return uie(e.writeTree,e.treePath,t,n)}function WV(e,t){return GV(ws(e.treePath,t),e.writeTree)}function GV(e,t){return{treePath:e,writeTree:t}}/** 891 * @license 892 * Copyright 2017 Google LLC 893 * 894 * Licensed under the Apache License, Version 2.0 (the "License"); 895 * you may not use this file except in compliance with the License. 896 * You may obtain a copy of the License at 897 * 898 * http://www.apache.org/licenses/LICENSE-2.0 899 * 900 * Unless required by applicable law or agreed to in writing, software 901 * distributed under the License is distributed on an "AS IS" BASIS, 902 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 903 * See the License for the specific language governing permissions and 904 * limitations under the License. 905 */class pie{constructor(){this.changeMap=new Map}trackChildChange(t){const n=t.type,r=t.childName;dn(n==="child_added"||n==="child_changed"||n==="child_removed","Only child changes supported for tracking"),dn(r!==".priority","Only non-priority child changes can be tracked.");const a=this.changeMap.get(r);if(a){const s=a.type;if(n==="child_added"&&s==="child_removed")this.changeMap.set(r,Sv(r,t.snapshotNode,a.snapshotNode));else if(n==="child_removed"&&s==="child_added")this.changeMap.delete(r);else if(n==="child_removed"&&s==="child_changed")this.changeMap.set(r,kv(r,a.oldSnap));else if(n==="child_changed"&&s==="child_added")this.changeMap.set(r,Sp(r,t.snapshotNode));else if(n==="child_changed"&&s==="child_changed")this.changeMap.set(r,Sv(r,t.snapshotNode,a.oldSnap));else throw Py("Illegal combination of changes: "+t+" occurred after "+a)}else this.changeMap.set(r,t)}getChanges(){return Array.from(this.changeMap.values())}}/** 906 * @license 907 * Copyright 2017 Google LLC 908 * 909 * Licensed under the Apache License, Version 2.0 (the "License");
910 * you may not use this file except in compliance with the License. 911 * You may obtain a copy of the License at 912 * 913 * http://www.apache.org/licenses/LICENSE-2.0 914 * 915 * Unless required by applicable law or agreed to in writing, software 916 * distributed under the License is distributed on an "AS IS" BASIS, 917 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 918 * See the License for the specific language governing permissions and 919 * limitations under the License. 920 */class gie{getCompleteChild(t){return null}getChildAfterChild(t,n,r){return null}}const qV=new gie;class zM{constructor(t,n,r=null){this.writes_=t,this.viewCache_=n,this.optCompleteServerCache_=r}getCompleteChild(t){const n=this.viewCache_.eventCache;if(n.isCompleteForChild(t))return n.getNode().getImmediateChild(t);{const r=this.optCompleteServerCache_!=null?new hm(this.optCompleteServerCache_,!0,!1):this.viewCache_.serverCache;return FM(this.writes_,t,r)}}getChildAfterChild(t,n,r){const a=this.optCompleteServerCache_!=null?this.optCompleteServerCache_:pm(this.viewCache_),s=hie(this.writes_,a,n,1,r,t);return s.length===0?null:s[0]}}/** 921 * @license 922 * Copyright 2017 Google LLC 923 * 924 * Licensed under the Apache License, Version 2.0 (the "License"); 925 * you may not use this file except in compliance with the License. 926 * You may obtain a copy of the License at 927 * 928 * http://www.apache.org/licenses/LICENSE-2.0 929 * 930 * Unless required by applicable law or agreed to in writing, software 931 * distributed under the License is distributed on an "AS IS" BASIS, 932 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 933 * See the License for the specific language governing permissions and 934 * limitations under the License. 935 */function vie(e){return{filter:e}}function yie(e,t){dn(t.eventCache.getNode().isIndexed(e.filter.getIndex()),"Event snap not indexed"),dn(t.serverCache.getNode().isIndexed(e.filter.getIndex()),"Server snap not indexed")}function bie(e,t,n,r,a){const s=new pie;let i,l;if(n.type===rc.OVERWRITE){const u=n;u.source.fromUser?i=mR(e,t,u.path,u.snap,r,a,s):(dn(u.source.fromServer,"Unknown source."),l=u.source.tagged||t.serverCache.isFiltered()&&!qr(u.path),i=hE(e,t,u.path,u.snap,r,a,l,s))}else if(n.type===rc.MERGE){const u=n;u.source.fromUser?i=Eie(e,t,u.path,u.children,r,a,s):(dn(u.source.fromServer,"Unknown source."),l=u.source.tagged||t.serverCache.isFiltered(),i=hR(e,t,u.path,u.children,r,a,l,s))}else if(n.type===rc.ACK_USER_WRITE){const u=n;u.revert?i=kie(e,t,u.path,r,a,s):i=xie(e,t,u.path,u.affectedTree,r,a,s)}else if(n.type===rc.LISTEN_COMPLETE)i=_ie(e,t,n.path,r,s);else throw Py("Unknown operation type: "+n.type);const c=s.getChanges();return wie(t,i,c),{viewCache:i,changes:c}}function wie(e,t,n){const r=t.eventCache;if(r.isFullyInitialized()){const a=r.getNode().isLeafNode()||r.getNode().isEmpty(),s=uR(e);(n.length>0||!e.eventCache.isFullyInitialized()||a&&!r.getNode().equals(s)||!r.getNode().getPriority().equals(s.getPriority()))&&n.push(zV(uR(t)))}}function YV(e,t,n,r,a,s){const i=t.eventCache;if(mE(r,n)!=null)return t;{let l,c;if(qr(n))if(dn(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){const u=pm(t),d=u instanceof pr?u:pr.EMPTY_NODE,f=$M(r,d);l=e.filter.updateFullNode(t.eventCache.getNode(),f,s)}else{const u=fE(r,pm(t));l=e.filter.updateFullNode(t.eventCache.getNode(),u,s)}else{const u=Br(n);if(u===".priority"){dn(qd(n)===1,"Can't have a priority with additional path components");const d=i.getNode();c=t.serverCache.getNode();const f=D5(r,n,d,c);f!=null?l=e.filter.updatePriority(d,f):l=i.getNode()}else{const d=Aa(n);let f;if(i.isCompleteForChild(u)){c=t.serverCache.getNode();const m=D5(r,n,i.getNode(),c);m!=null?f=i.getNode().getImmediateChild(u).updateChild(d,m):f=i.getNode().getImmediateChild(u)}else f=FM(r,u,t.serverCache);f!=null?l=e.filter.updateChild(i.getNode(),u,f,d,a,s):l=i.getNode()}}return U0(t,l,i.isFullyInitialized()||qr(n),e.filter.filtersNodes())}}function hE(e,t,n,r,a,s,i,l){const c=t.serverCache;let u;const d=i?e.filter:e.filter.getIndexedFilter();if(qr(n))u=d.updateFullNode(c.getNode(),r,null);else if(d.filtersNodes()&&!c.isFiltered()){const h=c.getNode().updateChild(n,r);u=d.updateFullNode(c.getNode(),h,null)}else{const h=Br(n);if(!c.isCompleteForPath(n)&&qd(n)>1)return t;const g=Aa(n),y=c.getNode().getImmediateChild(h).updateChild(g,r);h===".priority"?u=d.updatePriority(c.getNode(),y):u=d.updateChild(c.getNode(),h,y,g,qV,null)}const f=VV(t,u,c.isFullyInitialized()||qr(n),d.filtersNodes()),m=new zM(a,f,s);return YV(e,f,n,a,m,l)}function mR(e,t,n,r,a,s,i){const l=t.eventCache;let c,u;const d=new zM(a,t,s);if(qr(n))u=e.filter.updateFullNode(t.eventCache.getNode(),r,i),c=U0(t,u,!0,e.filter.filtersNodes());else{const f=Br(n);if(f===".priority")u=e.filter.updatePriority(t.eventCache.getNode(),r),c=U0(t,u,l.isFullyInitialized(),l.isFiltered());else{const m=Aa(n),h=l.getNode().getImmediateChild(f);let g;if(qr(m))g=r;else{const v=d.getCompleteChild(f);
vendor: 4,600 bytes, lines 935-950
935v!=null?RM(m)===".priority"&&v.getChild(OV(m)).isEmpty()?g=v:g=v.updateChild(m,r):g=pr.EMPTY_NODE}if(h.equals(g))c=t;else{const v=e.filter.updateChild(l.getNode(),f,g,m,d,i);c=U0(t,v,l.isFullyInitialized(),e.filter.filtersNodes())}}}return c}function L5(e,t){return e.eventCache.isCompleteForChild(t)}function Eie(e,t,n,r,a,s,i){let l=t;return r.foreach((c,u)=>{const d=ws(n,c);L5(t,Br(d))&&(l=mR(e,l,d,u,a,s,i))}),r.foreach((c,u)=>{const d=ws(n,c);L5(t,Br(d))||(l=mR(e,l,d,u,a,s,i))}),l}function $5(e,t,n){return n.foreach((r,a)=>{t=t.updateChild(r,a)}),t}function hR(e,t,n,r,a,s,i,l){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;let c=t,u;qr(n)?u=r:u=new Pa(null).setTree(n,r);const d=t.serverCache.getNode();return u.children.inorderTraversal((f,m)=>{if(d.hasChild(f)){const h=t.serverCache.getNode().getImmediateChild(f),g=$5(e,h,m);c=hE(e,c,new ba(f),g,a,s,i,l)}}),u.children.inorderTraversal((f,m)=>{const h=!t.serverCache.isCompleteForChild(f)&&m.value===null;if(!d.hasChild(f)&&!h){const g=t.serverCache.getNode().getImmediateChild(f),v=$5(e,g,m);c=hE(e,c,new ba(f),v,a,s,i,l)}}),c}function xie(e,t,n,r,a,s,i){if(mE(a,n)!=null)return t;const l=t.serverCache.isFiltered(),c=t.serverCache;if(r.value!=null){if(qr(n)&&c.isFullyInitialized()||c.isCompleteForPath(n))return hE(e,t,n,c.getNode().getChild(n),a,s,l,i);if(qr(n)){let u=new Pa(null);return c.getNode().forEachChild(Uh,(d,f)=>{u=u.set(new ba(d),f)}),hR(e,t,n,u,a,s,l,i)}else return t}else{let u=new Pa(null);return r.foreach((d,f)=>{const m=ws(n,d);c.isCompleteForPath(m)&&(u=u.set(d,c.getNode().getChild(m)))}),hR(e,t,n,u,a,s,l,i)}}function _ie(e,t,n,r,a){const s=t.serverCache,i=VV(t,s.getNode(),s.isFullyInitialized()||qr(n),s.isFiltered());return YV(e,i,n,r,qV,a)}function kie(e,t,n,r,a,s){let i;if(mE(r,n)!=null)return t;{const l=new zM(r,t,a),c=t.eventCache.getNode();let u;if(qr(n)||Br(n)===".priority"){let d;if(t.serverCache.isFullyInitialized())d=fE(r,pm(t));else{const f=t.serverCache.getNode();dn(f instanceof pr,"serverChildren would be complete if leaf node"),d=$M(r,f)}d=d,u=e.filter.updateFullNode(c,d,s)}else{const d=Br(n);let f=FM(r,d,t.serverCache);f==null&&t.serverCache.isCompleteForChild(d)&&(f=c.getImmediateChild(d)),f!=null?u=e.filter.updateChild(c,d,f,Aa(n),l,s):t.eventCache.getNode().hasChild(d)?u=e.filter.updateChild(c,d,pr.EMPTY_NODE,Aa(n),l,s):u=c,u.isEmpty()&&t.serverCache.isFullyInitialized()&&(i=fE(r,pm(t)),i.isLeafNode()&&(u=e.filter.updateFullNode(u,i,s)))}return i=t.serverCache.isFullyInitialized()||mE(r,ha())!=null,U0(t,u,i,e.filter.filtersNodes())}}/** 936 * @license 937 * Copyright 2017 Google LLC 938 * 939 * Licensed under the Apache License, Version 2.0 (the "License"); 940 * you may not use this file except in compliance with the License. 941 * You may obtain a copy of the License at 942 * 943 * http://www.apache.org/licenses/LICENSE-2.0 944 * 945 * Unless required by applicable law or agreed to in writing, software 946 * distributed under the License is distributed on an "AS IS" BASIS, 947 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 948 * See the License for the specific language governing permissions and 949 * limitations under the License. 950 */class Sie{constructor(t,n){this.query_=t,this.eventRegistrations_=[];const r=this.query_._queryParams,a=new OM(r.getIndex()),s=jse(r);this.processor_=vie(s);const i=n.serverCache,l=n.eventCache,c=a.updateFullNode(pr.EMPTY_NODE,i.getNode(),null),u=s.updateFullNode(pr.EMPTY_NODE,l.getNode(),null),d=new hm(c,i.isFullyInitialized(),a.filtersNodes()),f=new hm(u,l.isFullyInitialized(),s.filtersNodes());this.viewCache_=J_(f,d),this.eventGenerator_=new Xse(this.query_)}get query(){return this.query_}}function Cie(e){return e.viewCache_.serverCache.getNode()}function Nie(e,t){const n=pm(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!qr(t)&&!n.getImmediateChild(Br(t)).isEmpty())?n.getChild(t):null}function F5(e){return e.eventRegistrations_.length===0}function Rie(e,t){e.eventRegistrations_.push(t)}function z5(e,t,n){const r=[];if(n){dn(t==null,"A cancel should cancel all event registrations.");const a=e.query._path;e.eventRegistrations_.forEach(s=>{const i=s.createCancelEvent(n,a);i&&r.push(i)})}if(t){let a=[];for(let s=0;s<e.eventRegistrations_.length;++s){const i=e.eventRegistrations_[s];if(!i.matches(t))a.push(i);else if(t.hasAnyCallback()){a=a.concat(e.eventRegistrations_.slice(s+1));break}}e.eventRegistrations_=a}else e.eventRegistrations_=[];return r}function H5(e,t,n,r){t.type===rc.MERGE&&t.source.queryId!==null&&(dn(pm(e.viewCache_),"We should always have a full c
950ache before handling merges"),dn(uR(e.viewCache_),"Missing event cache, even though we have a server cache"));const a=e.viewCache_,s=bie(e.processor_,a,t,n,r);return yie(e.processor_,s.viewCache),dn(s.viewCache.serverCache.isFullyInitialized()||!a.serverCache.isFullyInitialized(),"Once a server snap is complete, it should never go back"),e.viewCache_=s.viewCache,KV(e,s.changes,s.viewCache.eventCache.getNode(),null)}function Tie(e,t){const n=e.viewCache_.eventCache,r=[];return n.getNode().isLeafNode()||n.getNode().forEachChild(as,(s,i)=>{r.push(Sp(s,i))}),n.isFullyInitialized()&&r.push(zV(n.getNode())),KV(e,r,n.getNode(),t)}function KV(e,t,n,r){const a=r?[r]:e.eventRegistrations_;return Qse(e.eventGenerator_,t,n,a)}/** 951 * @license 952 * Copyright 2017 Google LLC 953 * 954 * Licensed under the Apache License, Version 2.0 (the "License"); 955 * you may not use this file except in compliance with the License. 956 * You may obtain a copy of the License at 957 * 958 * http://www.apache.org/licenses/LICENSE-2.0 959 * 960 * Unless required by applicable law or agreed to in writing, software 961 * distributed under the License is distributed on an "AS IS" BASIS, 962 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 963 * See the License for the specific language governing permissions and 964 * limitations under the License. 965 */let pE;class Aie{constructor(){this.views=new Map}}function Iie(e){dn(!pE,"__referenceConstructor has already been defined"),pE=e}function Oie(){return dn(pE,"Reference.ts has not been loaded"),pE}function Mie(e){return e.views.size===0}function HM(e,t,n,r){const a=t.source.queryId;if(a!==null){const s=e.views.get(a);return dn(s!=null,"SyncTree gave us an op for an invalid query."),H5(s,t,n,r)}else{let s=[];for(const i of e.views.values())s=s.concat(H5(i,t,n,r));return s}}function Pie(e,t,n,r,a){const s=t._queryIdentifier,i=e.views.get(s);if(!i){let l=fE(n,a?r:null),c=!1;l?c=!0:r instanceof pr?(l=$M(n,r),c=!1):(l=pr.EMPTY_NODE,c=!1);const u=J_(new hm(l,c,!1),new hm(r,a,!1));return new Sie(t,u)}return i}function Die(e,t,n,r,a,s){const i=Pie(e,t,r,a,s);return e.views.has(t._queryIdentifier)||e.views.set(t._queryIdentifier,i),Rie(i,n),Tie(i,n)}function Lie(e,t,n,r){const a=t._queryIdentifier,s=[];let i=[];const l=Yd(e);if(a==="default")for(const[c,u]of e.views.entries())i=i.concat(z5(u,n,r)),F5(u)&&(e.views.delete(c),u.query._queryParams.loadsAllData()||s.push(u.query));else{const c=e.views.get(a);c&&(i=i.concat(z5(c,n,r)),F5(c)&&(e.views.delete(a),c.query._queryParams.loadsAllData()||s.push(c.query)))}return l&&!Yd(e)&&s.push(new(Oie())(t._repo,t._path)),{removed:s,events:i}}function ZV(e){const t=[];for(const n of e.views.values())n.query._queryParams.loadsAllData()||t.push(n);return t}function Bh(e,t){let n=null;for(const r of e.views.values())n=n||Nie(r,t);return n}function XV(e,t){if(t._queryParams.loadsAllData())return ek(e);{const r=t._queryIdentifier;return e.views.get(r)}}function QV(e,t){return XV(e,t)!=null}function Yd(e){return ek(e)!=null}function ek(e){for(const t of e.views.values())if(t.query._queryParams.loadsAllData())return t;return null}/** 966 * @license 967 * Copyright 2017 Google LLC 968 * 969 * Licensed under the Apache License, Version 2.0 (the "License"); 970 * you may not use this file except in compliance with the License. 971 * You may obtain a copy of the License at 972 * 973 * http://www.apache.org/licenses/LICENSE-2.0 974 * 975 * Unless required by applicable law or agreed to in writing, software 976 * distributed under the License is distributed on an "AS IS" BASIS, 977 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 978 * See the License for the specific language governing permissions and 979 * limitations under the License. 980 */let gE;function $ie(e){dn(!gE,"__referenceConstructor has already been defined"),gE=e}function Fie(){return dn(gE,"Reference.ts has not been loaded"),gE}let zie=1;class V5{constructor(t){this.listenProvider_=t,this.syncPointTree_=new Pa(null),this.pendingWriteTree_=mie(),this.tagToQueryMap=new Map,this.queryToTagMap=new Map}}function JV(e,t,n,r,a){return nie(e.pendingWriteTree_,t,n,r,a),a?zy(e,new mm(HV(),t,n)):[]}function zf(e,t,n=!1){const r=rie(e.pendingWriteTree_,t);if(aie(e.pendingWriteTree_,t)){let s=new Pa(null);return r.snap!=null?s=s.set(ha(),!0):Si(r.children,i=>{s=s.set(new ba(i),!0)}),zy(e,new dE(r.path,s,n))}else return[]}
980function tk(e,t,n){return zy(e,new mm(PM(),t,n))}function Hie(e,t,n){const r=Pa.fromObject(n);return zy(e,new Rv(PM(),t,r))}function Vie(e,t){return zy(e,new Nv(PM(),t))}function Uie(e,t,n){const r=UM(e,n);if(r){const a=BM(r),s=a.path,i=a.queryId,l=uo(s,t),c=new Nv(DM(i),l);return jM(e,s,c)}else return[]}function pR(e,t,n,r,a=!1){const s=t._path,i=e.syncPointTree_.get(s);let l=[];if(i&&(t._queryIdentifier==="default"||QV(i,t))){const c=Lie(i,t,n,r);Mie(i)&&(e.syncPointTree_=e.syncPointTree_.remove(s));const u=c.removed;if(l=c.events,!a){const d=u.findIndex(m=>m._queryParams.loadsAllData())!==-1,f=e.syncPointTree_.findOnPath(s,(m,h)=>Yd(h));if(d&&!f){const m=e.syncPointTree_.subtree(s);if(!m.isEmpty()){const h=Wie(m);for(let g=0;g<h.length;++g){const v=h[g],y=v.query,b=nU(e,v);e.listenProvider_.startListening(j0(y),vE(e,y),b.hashFn,b.onComplete)}}}!f&&u.length>0&&!r&&(d?e.listenProvider_.stopListening(j0(t),null):u.forEach(m=>{const h=e.queryToTagMap.get(nk(m));e.listenProvider_.stopListening(j0(m),h)}))}Gie(e,u)}return l}function Bie(e,t,n,r){const a=UM(e,r);if(a!=null){const s=BM(a),i=s.path,l=s.queryId,c=uo(i,t),u=new mm(DM(l),c,n);return jM(e,i,u)}else return[]}function jie(e,t,n,r){const a=UM(e,r);if(a){const s=BM(a),i=s.path,l=s.queryId,c=uo(i,t),u=Pa.fromObject(n),d=new Rv(DM(l),c,u);return jM(e,i,d)}else return[]}function U5(e,t,n,r=!1){const a=t._path;let s=null,i=!1;e.syncPointTree_.foreachOnPath(a,(m,h)=>{const g=uo(m,a);s=s||Bh(h,g),i=i||Yd(h)});let l=e.syncPointTree_.get(a);l?(i=i||Yd(l),s=s||Bh(l,ha())):(l=new Aie,e.syncPointTree_=e.syncPointTree_.set(a,l));let c;s!=null?c=!0:(c=!1,s=pr.EMPTY_NODE,e.syncPointTree_.subtree(a).foreachChild((h,g)=>{const v=Bh(g,ha());v&&(s=s.updateImmediateChild(h,v))}));const u=QV(l,t);if(!u&&!t._queryParams.loadsAllData()){const m=nk(t);dn(!e.queryToTagMap.has(m),"View does not exist, but we have a tag");const h=qie();e.queryToTagMap.set(m,h),e.tagToQueryMap.set(h,m)}const d=LM(e.pendingWriteTree_,a);let f=Die(l,t,n,d,s,c);if(!u&&!i&&!r){const m=XV(l,t);f=f.concat(Yie(e,t,m))}return f}function VM(e,t,n){const a=e.pendingWriteTree_,s=e.syncPointTree_.findOnPath(t,(i,l)=>{const c=uo(i,t),u=Bh(l,c);if(u)return u});return jV(a,t,s,n,!0)}function zy(e,t){return eU(t,e.syncPointTree_,null,LM(e.pendingWriteTree_,ha()))}function eU(e,t,n,r){if(qr(e.path))return tU(e,t,n,r);{const a=t.get(ha());n==null&&a!=null&&(n=Bh(a,ha()));let s=[];const i=Br(e.path),l=e.operationForChild(i),c=t.children.get(i);if(c&&l){const u=n?n.getImmediateChild(i):null,d=WV(r,i);s=s.concat(eU(l,c,u,d))}return a&&(s=s.concat(HM(a,e,r,n))),s}}function tU(e,t,n,r){const a=t.get(ha());n==null&&a!=null&&(n=Bh(a,ha()));let s=[];return t.children.inorderTraversal((i,l)=>{const c=n?n.getImmediateChild(i):null,u=WV(r,i),d=e.operationForChild(i);d&&(s=s.concat(tU(d,l,c,u)))}),a&&(s=s.concat(HM(a,e,r,n))),s}function nU(e,t){const n=t.query,r=vE(e,n);return{hashFn:()=>(Cie(t)||pr.EMPTY_NODE).hash(),onComplete:a=>{if(a==="ok")return r?Uie(e,n._path,r):Vie(e,n._path);{const s=Uae(a,n);return pR(e,n,null,s)}}}}function vE(e,t){const n=nk(t);return e.queryToTagMap.get(n)}function nk(e){return e._path.toString()+"$"+e._queryIdentifier}function UM(e,t){return e.tagToQueryMap.get(t)}function BM(e){const t=e.indexOf("$");return dn(t!==-1&&t<e.length-1,"Bad queryKey."),{queryId:e.substr(t+1),path:new ba(e.substr(0,t))}}function jM(e,t,n){const r=e.syncPointTree_.get(t);dn(r,"Missing sync point for query tag that we're tracking");const a=LM(e.pendingWriteTree_,t);return HM(r,n,a,null)}function Wie(e){return e.fold((t,n,r)=>{if(n&&Yd(n))return[ek(n)];{let a=[];return n&&(a=ZV(n)),Si(r,(s,i)=>{a=a.concat(i)}),a}})}
980function j0(e){return e._queryParams.loadsAllData()&&!e._queryParams.isDefault()?new(Fie())(e._repo,e._path):e}function Gie(e,t){for(let n=0;n<t.length;++n){const r=t[n];if(!r._queryParams.loadsAllData()){const a=nk(r),s=e.queryToTagMap.get(a);e.queryToTagMap.delete(a),e.tagToQueryMap.delete(s)}}}function qie(){return zie++}function Yie(e,t,n){const r=t._path,a=vE(e,t),s=nU(e,n),i=e.listenProvider_.startListening(j0(t),a,s.hashFn,s.onComplete),l=e.syncPointTree_.subtree(r);if(a)dn(!Yd(l.value),"If we're adding a query, it shouldn't be shadowed");else{const c=l.fold((u,d,f)=>{if(!qr(u)&&d&&Yd(d))return[ek(d).query];{let m=[];return d&&(m=m.concat(ZV(d).map(h=>h.query))),Si(f,(h,g)=>{m=m.concat(g)}),m}});for(let u=0;u<c.length;++u){const d=c[u];e.listenProvider_.stopListening(j0(d),vE(e,d))}}return i}/** 981 * @license 982 * Copyright 2017 Google LLC 983 * 984 * Licensed under the Apache License, Version 2.0 (the "License"); 985 * you may not use this file except in compliance with the License. 986 * You may obtain a copy of the License at 987 * 988 * http://www.apache.org/licenses/LICENSE-2.0 989 * 990 * Unless required by applicable law or agreed to in writing, software 991 * distributed under the License is distributed on an "AS IS" BASIS, 992 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 993 * See the License for the specific language governing permissions and 994 * limitations under the License. 995 */class WM{constructor(t){this.node_=t}getImmediateChild(t){const n=this.node_.getImmediateChild(t);return new WM(n)}node(){return this.node_}}class GM{constructor(t,n){this.syncTree_=t,this.path_=n}getImmediateChild(t){const n=ws(this.path_,t);return new GM(this.syncTree_,n)}node(){return VM(this.syncTree_,this.path_)}}const Kie=function(e){return e=e||{},e.timestamp=e.timestamp||new Date().getTime(),e},B5=function(e,t,n){if(!e||typeof e!="object")return e;if(dn(".sv"in e,"Unexpected leaf node or priority contents"),typeof e[".sv"]=="string")return Zie(e[".sv"],t,n);if(typeof e[".sv"]=="object")return Xie(e[".sv"],t);dn(!1,"Unexpected server value: "+JSON.stringify(e,null,2))},Zie=function(e,t,n){switch(e){case"timestamp":return n.timestamp;default:dn(!1,"Unexpected server value: "+e)}},Xie=function(e,t,n){e.hasOwnProperty("increment")||dn(!1,"Unexpected server value: "+JSON.stringify(e,null,2));const r=e.increment;typeof r!="number"&&dn(!1,"Unexpected increment value: "+r);const a=t.node();if(dn(a!==null&&typeof a<"u","Expected ChildrenNode.EMPTY_NODE for nulls"),!a.isLeafNode())return r;const i=a.getValue();return typeof i!="number"?r:i+r},Qie=function(e,t,n,r){return qM(t,new GM(n,e),r)},rU=function(e,t,n){return qM(e,new WM(t),n)};function qM(e,t,n){const r=e.getPriority().val(),a=B5(r,t.getImmediateChild(".priority"),n);let s;if(e.isLeafNode()){const i=e,l=B5(i.getValue(),t,n);return l!==i.getValue()||a!==i.getPriority().val()?new Ys(l,Ss(a)):e}else{const i=e;return s=i,a!==i.getPriority().val()&&(s=s.updatePriority(new Ys(a))),i.forEachChild(as,(l,c)=>{const u=qM(c,t.getImmediateChild(l),n);u!==c&&(s=s.updateImmediateChild(l,u))}),s}}/** 996 * @license 997 * Copyright 2017 Google LLC 998 * 999 * Licensed under the Apache License, Version 2.0 (the "License"); 1000 * you may not use this file except in compliance with the License. 1001 * You may obtain a copy of the License at 1002 * 1003 * http://www.apache.org/licenses/LICENSE-2.0 1004 * 1005 * Unless required by applicable law or agreed to in writing, software 1006 * distributed under the License is distributed on an "AS IS" BASIS, 1007 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1008 * See the License for the specific language governing permissions and 1009 * limitations under the License. 1010 */class YM{constructor(t="",n=null,r={children:{},childCount:0}){this.name=t,this.parent=n,this.node=r}}function KM(e,t){let n=t instanceof ba?t:new ba(t),r=e,a=Br(n);for(;a!==null;){const s=bp(r.node.children,a)||{children:{},childCount:0};r=new YM(a,r,s),n=Aa(n),a=Br(n)}return r}function pg(e){return e.node.value}function aU(e,t){e.node.value=t,gR(e)}function sU(e){return e.node.childCount>0}function Jie(e){return pg(e)===void 0&&!sU(e)}function rk(e,t){Si(e.node.children,(n,r)=>{t(new YM(n,e,r))})}function iU(e,t,n,r){n&&!r&&t(e),rk(e,a=>{iU(a,t,!0,r)}),n&&r&&t(e)}function eoe(e,t,n){let r=n?e:e.parent;for(;r!==null;){if(t(r))return!0;r=r.parent}return!1}function Hy(e){return new ba(e.parent===null?e.name:Hy(e.parent)+"/"+e.name)}
vendor: 4,243 bytes, lines 1010-1029
1010function gR(e){e.parent!==null&&toe(e.parent,e.name,e)}function toe(e,t,n){const r=Jie(n),a=su(e.node.children,t);r&&a?(delete e.node.children[t],e.node.childCount--,gR(e)):!r&&!a&&(e.node.children[t]=n.node,e.node.childCount++,gR(e))}/** 1011 * @license 1012 * Copyright 2017 Google LLC 1013 * 1014 * Licensed under the Apache License, Version 2.0 (the "License"); 1015 * you may not use this file except in compliance with the License. 1016 * You may obtain a copy of the License at 1017 * 1018 * http://www.apache.org/licenses/LICENSE-2.0 1019 * 1020 * Unless required by applicable law or agreed to in writing, software 1021 * distributed under the License is distributed on an "AS IS" BASIS, 1022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1023 * See the License for the specific language governing permissions and 1024 * limitations under the License. 1025 */const noe=/[\[\].#$\/\u0000-\u001F\u007F]/,roe=/[\[\].#$\u0000-\u001F\u007F]/,lC=10*1024*1024,ZM=function(e){return typeof e=="string"&&e.length!==0&&!noe.test(e)},oU=function(e){return typeof e=="string"&&e.length!==0&&!roe.test(e)},aoe=function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),oU(e)},lU=function(e){return e===null||typeof e=="string"||typeof e=="number"&&!X_(e)||e&&typeof e=="object"&&su(e,".sv")},vR=function(e,t,n,r){r&&t===void 0||ak(wp(e,"value"),t,n)},ak=function(e,t,n){const r=n instanceof ba?new xse(n,e):n;if(t===void 0)throw new Error(e+"contains undefined "+Cf(r));if(typeof t=="function")throw new Error(e+"contains a function "+Cf(r)+" with contents = "+t.toString());if(X_(t))throw new Error(e+"contains "+t.toString()+" "+Cf(r));if(typeof t=="string"&&t.length>lC/3&&R_(t)>lC)throw new Error(e+"contains a string greater than "+lC+" utf8 bytes "+Cf(r)+" ('"+t.substring(0,50)+"...')");if(t&&typeof t=="object"){let a=!1,s=!1;if(Si(t,(i,l)=>{if(i===".value")a=!0;else if(i!==".priority"&&i!==".sv"&&(s=!0,!ZM(i)))throw new Error(e+" contains an invalid key ("+i+") "+Cf(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);_se(r,i),ak(e,l,r),kse(r)}),a&&s)throw new Error(e+' contains ".value" child '+Cf(r)+" in addition to actual children.")}},soe=function(e,t){let n,r;for(n=0;n<t.length;n++){r=t[n];const s=_v(r);for(let i=0;i<s.length;i++)if(!(s[i]===".priority"&&i===s.length-1)){if(!ZM(s[i]))throw new Error(e+"contains an invalid key ("+s[i]+") in path "+r.toString()+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`)}}t.sort(Ese);let a=null;for(n=0;n<t.length;n++){if(r=t[n],a!==null&&Sl(a,r))throw new Error(e+"contains a path "+a.toString()+" that is ancestor of another path "+r.toString());a=r}},ioe=function(e,t,n,r){if(r&&t===void 0)return;const a=wp(e,"values");if(!(t&&typeof t=="object")||Array.isArray(t))throw new Error(a+" must be an object containing the children to replace.");const s=[];Si(t,(i,l)=>{const c=new ba(i);if(ak(a,l,ws(n,c)),RM(c)===".priority"&&!lU(l))throw new Error(a+"contains an invalid value for '"+c.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(c)}),soe(a,s)},ooe=function(e,t,n){if(!(n&&t===void 0)){if(X_(t))throw new Error(wp(e,"priority")+"is "+t.toString()+", but must be a valid Firebase priority (a string, finite number, server value, or null).");if(!lU(t))throw new Error(wp(e,"priority")+"must be a valid Firebase priority (a string, finite number, server value, or null).")}},cU=function(e,t,n,r){if(!(r&&n===void 0)&&!oU(n))throw new Error(wp(e,t)+'was an invalid path = "'+n+`". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"`)},loe=function(e,t,n,r){n&&(n=n.replace(/^\/*\.info(\/|$)/,"/")),cU(e,t,n,r)},Ch=function(e,t){if(Br(t)===".info")throw new Error(e+" failed = Can't modify data under /.info/")},coe=function(e,t){const n=t.path.toString();if(typeof t.repoInfo.host!="string"||t.repoInfo.host.length===0||!ZM(t.repoInfo.namespace)&&t.repoInfo.host.split(":")[0]!=="localhost"||n.length!==0&&!aoe(n))throw new Error(wp(e,"url")+`must be a valid firebase URL and the path can't contain ".", "#", "$", "[", or "]".`)};/** 1026 * @license 1027 * Copyright 2017 Google LLC 1028 * 1029 * Licensed under the Apache License, Version 2.0 (the "License");
1030 * you may not use this file except in compliance with the License. 1031 * You may obtain a copy of the License at 1032 * 1033 * http://www.apache.org/licenses/LICENSE-2.0 1034 * 1035 * Unless required by applicable law or agreed to in writing, software 1036 * distributed under the License is distributed on an "AS IS" BASIS, 1037 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1038 * See the License for the specific language governing permissions and 1039 * limitations under the License. 1040 */class uoe{constructor(){this.eventLists_=[],this.recursionDepth_=0}}function XM(e,t){let n=null;for(let r=0;r<t.length;r++){const a=t[r],s=a.getPath();n!==null&&!TM(s,n.path)&&(e.eventLists_.push(n),n=null),n===null&&(n={events:[],path:s}),n.events.push(a)}n&&e.eventLists_.push(n)}function uU(e,t,n){XM(e,n),dU(e,r=>TM(r,t))}function Zu(e,t,n){XM(e,n),dU(e,r=>Sl(r,t)||Sl(t,r))}function dU(e,t){e.recursionDepth_++;let n=!0;for(let r=0;r<e.eventLists_.length;r++){const a=e.eventLists_[r];if(a){const s=a.path;t(s)?(doe(e.eventLists_[r]),e.eventLists_[r]=null):n=!1}}n&&(e.eventLists_=[]),e.recursionDepth_--}function doe(e){for(let t=0;t<e.events.length;t++){const n=e.events[t];if(n!==null){e.events[t]=null;const r=n.getEventRunner();tm&&ii("event: "+n.toString()),mg(r)}}}/** 1041 * @license 1042 * Copyright 2017 Google LLC 1043 * 1044 * Licensed under the Apache License, Version 2.0 (the "License"); 1045 * you may not use this file except in compliance with the License. 1046 * You may obtain a copy of the License at 1047 * 1048 * http://www.apache.org/licenses/LICENSE-2.0 1049 * 1050 * Unless required by applicable law or agreed to in writing, software 1051 * distributed under the License is distributed on an "AS IS" BASIS, 1052 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1053 * See the License for the specific language governing permissions and 1054 * limitations under the License. 1055 */const foe="repo_interrupt",moe=25;class hoe{constructor(t,n,r,a){this.repoInfo_=t,this.forceRestClient_=n,this.authTokenProvider_=r,this.appCheckProvider_=a,this.dataUpdateCount=0,this.statsListener_=null,this.eventQueue_=new uoe,this.nextWriteId_=1,this.interceptServerDataCallback_=null,this.onDisconnect_=uE(),this.transactionQueueTree_=new YM,this.persistentConnection_=null,this.key=this.repoInfo_.toURLString()}toString(){return(this.repoInfo_.secure?"https://":"http://")+this.repoInfo_.host}}function poe(e,t,n){if(e.stats_=CM(e.repoInfo_),e.forceRestClient_||Gae())e.server_=new cE(e.repoInfo_,(r,a,s,i)=>{j5(e,r,a,s,i)},e.authTokenProvider_,e.appCheckProvider_),setTimeout(()=>W5(e,!0),0);else{if(typeof n<"u"&&n!==null){if(typeof n!="object")throw new Error("Only objects are supported for option databaseAuthVariableOverride");try{Xs(n)}catch(r){throw new Error("Invalid authOverride provided: "+r)}}e.persistentConnection_=new Bu(e.repoInfo_,t,(r,a,s,i)=>{j5(e,r,a,s,i)},r=>{W5(e,r)},r=>{voe(e,r)},e.authTokenProvider_,e.appCheckProvider_,n),e.server_=e.persistentConnection_}e.authTokenProvider_.addTokenChangeListener(r=>{e.server_.refreshAuthToken(r)}),e.appCheckProvider_.addTokenChangeListener(r=>{e.server_.refreshAppCheckToken(r.token)}),e.statsReporter_=Xae(e.repoInfo_,()=>new Zse(e.stats_,e.server_)),e.infoData_=new Wse,e.infoSyncTree_=new V5({startListening:(r,a,s,i)=>{let l=[];const c=e.infoData_.getNode(r._path);return c.isEmpty()||(l=tk(e.infoSyncTree_,r._path,c),setTimeout(()=>{i("ok")},0)),l},stopListening:()=>{}}),JM(e,"connected",!1),e.serverSyncTree_=new V5({startListening:(r,a,s,i)=>(e.server_.listen(r,s,a,(l,c)=>{const u=i(l,c);Zu(e.eventQueue_,r._path,u)}),[]),stopListening:(r,a)=>{e.server_.unlisten(r,a)}})}function goe(e){const n=e.infoData_.getNode(new ba(".info/serverTimeOffset")).val()||0;return new Date().getTime()+n}function QM(e){return Kie({timestamp:goe(e)})}function j5(e,t,n,r,a){e.dataUpdateCount++;const s=new ba(t);n=e.interceptServerDataCallback_?e.interceptServerDataCallback_(t,n):n;let i=[];if(a)if(r){const c=sE(n,u=>Ss(u));i=jie(e.serverSyncTree_,s,c,a)}else{const c=Ss(n);i=Bie(e.serverSyncTree_,s,c,a)}else if(r){const c=sE(n,u=>Ss(u));i=Hie(e.serverSyncTree_,s,c)}else{const c=Ss(n);i=tk(e.serverSyncTree_,s,c)}let l=s;i.length>0&&(l=sk(e,s)),Zu(e.eventQueue_,l,i)}function W5(e,t){JM(e,"connected",t),t===!1&&boe(e)}function voe(e,t){Si(t,(n,r)=>{JM(e,n,r)})}function JM(e,t,n){const r=new ba("/.info/"+t),a=Ss(n);e.infoData_.updateSnapshot(r,a);const s=tk(e.infoSyncTree_,r,a);Zu(e.eventQueue_,r,s)}function fU(e){return e.nextWriteId_++}function yoe(e,t,n,r,a){eP(e,"set",{path:t.toString(),value:n,priority:r});const s=QM(e),i=Ss(n,r),l=VM(e.serverSyncTree_,t),c=rU(i,l,s),u=fU(e),d=JV(e.serverSyncTree_,t,c,u,!0);XM(e.eventQueue_,d),e.server_.put(t.toString(),i.val(!0),(m,h)=>{const g=m==="ok";g||ho("set at "+t+" failed: "+m);const v=zf(e.serverSyncTree_,u,!g);Zu(e.eventQueue_,t,v),Np(e,a,m,h)});const f=vU(e,t);sk(e,f),Zu(e.eventQueue_,f,[])}function boe(e){eP(e,"onDisconnectEvents");const t=QM(e),n=uE();cR(e.onDisconnect_,ha(),(a,s)=>{const i=Qie(a,s,e.serverSyncTree_,t);hg(n,a,i)});let r=[];cR(n,ha(),(a,s)=>{r=r.concat(tk(e.serverSyncTree_,a,s));const i=vU(e,a);sk(e,i)}),e.onDisconnect_=uE(),Zu(e.eventQueue_,ha(),r)}function woe(e,t,n){e.server_.onDisconnectCancel(t.toString(),(r,a)=>{r==="ok"&&lR(e.onDisconnect_,t),Np(e,n,r,a)})}function G5(e,t,n,r){const a=Ss(n);e.server_.onDisconnectPut(t.toString(),a.val(!0),(s,i)=>{s==="ok"&&hg(e.onDisconnect_,t,a),Np(e,r,s,i)})}function Eoe(e,t,n,r,a){const s=Ss(n,r);e.server_.onDisconnectPut(t.toString(),s.val(!0),(i,l)=>{i==="ok"&&hg(e.onDisconnect_,t,s),Np(e,a,i,l)})}function xoe(e,t,n,r){if(rR(n)){ii("onDisconnect().update() called with empty data. Don't do anything."),Np(e,r,"ok",void 0);return}e.server_.onDisconnectMerge(t.toString(),n,(a,s)=>{a==="ok"&&Si(n,(i,l)=>{const c=Ss(l);hg(e.onDisconnect_,ws(t,i),c)}),Np(e,r,a,s)})}function _oe(e,t,n){let r;Br(t._path)===".info"?r=U5(e.infoSyncTree_,t,n):r=U5(e.serverSyncTree_,t,n),uU(e.eventQueue_,t._path,r)}function q5(e,t,n){let r;Br(t._path)===".info"?r=pR(e.infoSyncTree_,t,n):r=pR(e.serverSyncTree_,t,n),uU(e.eventQueue_,t._path,r)}function koe(e){e.persistentConnection_&&e.persistentConnection_.interrupt(foe)}function eP(e,...t){let n="";e.persistentConnection_&&(n=e.persistentConnection_.id+":"),ii(n,...t)}function Np(e,t,n,r){t&&mg(()=>{if(n==="ok")t(null);else{const a=(n||"error").toUpperCase();let s=a;r&&(s+=": "+r);const i=new Error(s);i.code=a,t(i)}})}
vendor: 4,223 bytes, lines 1055-1065
1055function mU(e,t,n){return VM(e.serverSyncTree_,t,n)||pr.EMPTY_NODE}function tP(e,t=e.transactionQueueTree_){if(t||ik(e,t),pg(t)){const n=pU(e,t);dn(n.length>0,"Sending zero length transaction queue"),n.every(a=>a.status===0)&&Soe(e,Hy(t),n)}else sU(t)&&rk(t,n=>{tP(e,n)})}function Soe(e,t,n){const r=n.map(u=>u.currentWriteId),a=mU(e,t,r);let s=a;const i=a.hash();for(let u=0;u<n.length;u++){const d=n[u];dn(d.status===0,"tryToSendTransactionQueue_: items in queue should all be run."),d.status=1,d.retryCount++;const f=uo(t,d.path);s=s.updateChild(f,d.currentOutputSnapshotRaw)}const l=s.val(!0),c=t;e.server_.put(c.toString(),l,u=>{eP(e,"transaction put response",{path:c.toString(),status:u});let d=[];if(u==="ok"){const f=[];for(let m=0;m<n.length;m++)n[m].status=2,d=d.concat(zf(e.serverSyncTree_,n[m].currentWriteId)),n[m].onComplete&&f.push(()=>n[m].onComplete(null,!0,n[m].currentOutputSnapshotResolved)),n[m].unwatcher();ik(e,KM(e.transactionQueueTree_,t)),tP(e,e.transactionQueueTree_),Zu(e.eventQueue_,t,d);for(let m=0;m<f.length;m++)mg(f[m])}else{if(u==="datastale")for(let f=0;f<n.length;f++)n[f].status===3?n[f].status=4:n[f].status=0;else{ho("transaction at "+c.toString()+" failed: "+u);for(let f=0;f<n.length;f++)n[f].status=4,n[f].abortReason=u}sk(e,t)}},i)}function sk(e,t){const n=hU(e,t),r=Hy(n),a=pU(e,n);return Coe(e,a,r),r}function Coe(e,t,n){if(t.length===0)return;const r=[];let a=[];const i=t.filter(l=>l.status===0).map(l=>l.currentWriteId);for(let l=0;l<t.length;l++){const c=t[l],u=uo(n,c.path);let d=!1,f;if(dn(u!==null,"rerunTransactionsUnderNode_: relativePath should not be null."),c.status===4)d=!0,f=c.abortReason,a=a.concat(zf(e.serverSyncTree_,c.currentWriteId,!0));else if(c.status===0)if(c.retryCount>=moe)d=!0,f="maxretry",a=a.concat(zf(e.serverSyncTree_,c.currentWriteId,!0));else{const m=mU(e,c.path,i);c.currentInputSnapshot=m;const h=t[l].update(m.val());if(h!==void 0){ak("transaction failed: Data returned ",h,c.path);let g=Ss(h);typeof h=="object"&&h!=null&&su(h,".priority")||(g=g.updatePriority(m.getPriority()));const y=c.currentWriteId,b=QM(e),E=rU(g,m,b);c.currentOutputSnapshotRaw=g,c.currentOutputSnapshotResolved=E,c.currentWriteId=fU(e),i.splice(i.indexOf(y),1),a=a.concat(JV(e.serverSyncTree_,c.path,E,c.currentWriteId,c.applyLocally)),a=a.concat(zf(e.serverSyncTree_,y,!0))}else d=!0,f="nodata",a=a.concat(zf(e.serverSyncTree_,c.currentWriteId,!0))}Zu(e.eventQueue_,n,a),a=[],d&&(t[l].status=2,function(m){setTimeout(m,Math.floor(0))}(t[l].unwatcher),t[l].onComplete&&(f==="nodata"?r.push(()=>t[l].onComplete(null,!1,t[l].currentInputSnapshot)):r.push(()=>t[l].onComplete(new Error(f),!1,null))))}ik(e,e.transactionQueueTree_);for(let l=0;l<r.length;l++)mg(r[l]);tP(e,e.transactionQueueTree_)}function hU(e,t){let n,r=e.transactionQueueTree_;for(n=Br(t);n!==null&&pg(r)===void 0;)r=KM(r,n),t=Aa(t),n=Br(t);return r}function pU(e,t){const n=[];return gU(e,t,n),n.sort((r,a)=>r.order-a.order),n}function gU(e,t,n){const r=pg(t);if(r)for(let a=0;a<r.length;a++)n.push(r[a]);rk(t,a=>{gU(e,a,n)})}function ik(e,t){const n=pg(t);if(n){let r=0;for(let a=0;a<n.length;a++)n[a].status!==2&&(n[r]=n[a],r++);n.length=r,aU(t,n.length>0?n:void 0)}rk(t,r=>{ik(e,r)})}function vU(e,t){const n=Hy(hU(e,t)),r=KM(e.transactionQueueTree_,t);return eoe(r,a=>{cC(e,a)}),cC(e,r),iU(r,a=>{cC(e,a)}),n}function cC(e,t){const n=pg(t);if(n){const r=[];let a=[],s=-1;for(let i=0;i<n.length;i++)n[i].status===3||(n[i].status===1?(dn(s===i-1,"All SENT items should be at beginning of queue."),s=i,n[i].status=3,n[i].abortReason="set"):(dn(n[i].status===0,"Unexpected transaction status in abort"),n[i].unwatcher(),a=a.concat(zf(e.serverSyncTree_,n[i].currentWriteId,!0)),n[i].onComplete&&r.push(n[i].onComplete.bind(null,new Error("set"),!1,null))));s===-1?aU(t,void 0):n.length=s+1,Zu(e.eventQueue_,Hy(t),a);for(let i=0;i<r.length;i++)mg(r[i])}}/** 1056 * @license 1057 * Copyright 2017 Google LLC 1058 * 1059 * Licensed under the Apache License, Version 2.0 (the "License"); 1060 * you may not use this file except in compliance with the License. 1061 * You may obtain a copy of the License at 1062 * 1063 * http://www.apache.org/licenses/LICENSE-2.0 1064 * 1065 * Unless required by applicable law or agreed to in writing, softw
1065are 1066 * distributed under the License is distributed on an "AS IS" BASIS, 1067 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1068 * See the License for the specific language governing permissions and 1069 * limitations under the License. 1070 */function Noe(e){let t="";const n=e.split("/");for(let r=0;r<n.length;r++)if(n[r].length>0){let a=n[r];try{a=decodeURIComponent(a.replace(/\+/g," "))}catch{}t+="/"+a}return t}function Roe(e){const t={};e.charAt(0)==="?"&&(e=e.substring(1));for(const n of e.split("&")){if(n.length===0)continue;const r=n.split("=");r.length===2?t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]):ho(`Invalid query segment '${n}' in query '${e}'`)}return t}const Y5=function(e,t){const n=Toe(e),r=n.namespace;n.domain==="firebase.com"&&Ku(n.host+" is no longer supported. Please use <YOUR FIREBASE>.firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&Ku("Cannot parse Firebase url. Please use https://<YOUR FIREBASE>.firebaseio.com"),n.secure||$ae();const a=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new _V(n.host,n.secure,r,a,t,"",r!==n.subdomain),path:new ba(n.pathString)}},Toe=function(e){let t="",n="",r="",a="",s="",i=!0,l="https",c=443;if(typeof e=="string"){let u=e.indexOf("//");u>=0&&(l=e.substring(0,u-1),e=e.substring(u+2));let d=e.indexOf("/");d===-1&&(d=e.length);let f=e.indexOf("?");f===-1&&(f=e.length),t=e.substring(0,Math.min(d,f)),d<f&&(a=Noe(e.substring(d,f)));const m=Roe(e.substring(Math.min(e.length,f)));u=t.indexOf(":"),u>=0?(i=l==="https"||l==="wss",c=parseInt(t.substring(u+1),10)):u=t.length;const h=t.slice(0,u);if(h.toLowerCase()==="localhost")n="localhost";else if(h.split(".").length<=2)n=h;else{const g=t.indexOf(".");r=t.substring(0,g).toLowerCase(),n=t.substring(g+1),s=r}"ns"in m&&(s=m.ns)}return{host:t,port:c,domain:n,subdomain:r,secure:i,scheme:l,pathString:a,namespace:s}};/** 1071 * @license 1072 * Copyright 2017 Google LLC 1073 * 1074 * Licensed under the Apache License, Version 2.0 (the "License"); 1075 * you may not use this file except in compliance with the License. 1076 * You may obtain a copy of the License at 1077 * 1078 * http://www.apache.org/licenses/LICENSE-2.0 1079 * 1080 * Unless required by applicable law or agreed to in writing, software 1081 * distributed under the License is distributed on an "AS IS" BASIS, 1082 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1083 * See the License for the specific language governing permissions and 1084 * limitations under the License. 1085 */class yU{constructor(t,n,r,a){this.eventType=t,this.eventRegistration=n,this.snapshot=r,this.prevName=a}getPath(){const t=this.snapshot.ref;return this.eventType==="value"?t._path:t.parent._path}getEventType(){return this.eventType}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.getPath().toString()+":"+this.eventType+":"+Xs(this.snapshot.exportVal())}}class bU{constructor(t,n,r){this.eventRegistration=t,this.error=n,this.path=r}getPath(){return this.path}getEventType(){return"cancel"}getEventRunner(){return this.eventRegistration.getEventRunner(this)}toString(){return this.path.toString()+":cancel"}}/** 1086 * @license 1087 * Copyright 2017 Google LLC 1088 * 1089 * Licensed under the Apache License, Version 2.0 (the "License"); 1090 * you may not use this file except in compliance with the License. 1091 * You may obtain a copy of the License at 1092 * 1093 * http://www.apache.org/licenses/LICENSE-2.0 1094 * 1095 * Unless required by applicable law or agreed to in writing, software 1096 * distributed under the License is distributed on an "AS IS" BASIS, 1097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1098 * See the License for the specific language governing permissions and 1099 * limitations under the License. 1100 */class Aoe{constructor(t,n){this.snapshotCallback=t,this.cancelCallback=n}onValue(t,n){this.snapshotCallback.call(null,t,n)}onCancel(t){return dn(this.hasCancelCallback,"Raising a cancel event on a listener with no cancel callback"),this.cancelCallback.call(null,t)}get hasCancelCallback(){return!!this.cancelCallback}matches(t){return this.snapshotCallback===t.snapshotCallback||this.snapshotCallback.userCallback!==void 0&&this.snapshotCallback.userCallback===t.snapshotCallback.userCallback&&this.snapshotCallback.context===t.snapshotCallback.context}}/** 1101 * @license 1102 * Copyright 2021 Google LLC 1103 * 1104 * Licensed under the Apache License, Version 2.0 (the "License");
1105 * you may not use this file except in compliance with the License. 1106 * You may obtain a copy of the License at 1107 * 1108 * http://www.apache.org/licenses/LICENSE-2.0 1109 * 1110 * Unless required by applicable law or agreed to in writing, software 1111 * distributed under the License is distributed on an "AS IS" BASIS, 1112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1113 * See the License for the specific language governing permissions and 1114 * limitations under the License. 1115 */class Ioe{constructor(t,n){this._repo=t,this._path=n}cancel(){const t=new Rd;return woe(this._repo,this._path,t.wrapCallback(()=>{})),t.promise}remove(){Ch("OnDisconnect.remove",this._path);const t=new Rd;return G5(this._repo,this._path,null,t.wrapCallback(()=>{})),t.promise}set(t){Ch("OnDisconnect.set",this._path),vR("OnDisconnect.set",t,this._path,!1);const n=new Rd;return G5(this._repo,this._path,t,n.wrapCallback(()=>{})),n.promise}setWithPriority(t,n){Ch("OnDisconnect.setWithPriority",this._path),vR("OnDisconnect.setWithPriority",t,this._path,!1),ooe("OnDisconnect.setWithPriority",n,!1);const r=new Rd;return Eoe(this._repo,this._path,t,n,r.wrapCallback(()=>{})),r.promise}update(t){Ch("OnDisconnect.update",this._path),ioe("OnDisconnect.update",t,this._path,!1);const n=new Rd;return xoe(this._repo,this._path,t,n.wrapCallback(()=>{})),n.promise}}/** 1116 * @license 1117 * Copyright 2020 Google LLC 1118 * 1119 * Licensed under the Apache License, Version 2.0 (the "License"); 1120 * you may not use this file except in compliance with the License. 1121 * You may obtain a copy of the License at 1122 * 1123 * http://www.apache.org/licenses/LICENSE-2.0 1124 * 1125 * Unless required by applicable law or agreed to in writing, software 1126 * distributed under the License is distributed on an "AS IS" BASIS, 1127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1128 * See the License for the specific language governing permissions and 1129 * limitations under the License. 1130 */class nP{constructor(t,n,r,a){this._repo=t,this._path=n,this._queryParams=r,this._orderByCalled=a}get key(){return qr(this._path)?null:RM(this._path)}get ref(){return new ld(this._repo,this._path)}get _queryIdentifier(){const t=A5(this._queryParams),n=kM(t);return n==="{}"?"default":n}get _queryObject(){return A5(this._queryParams)}isEqual(t){if(t=od(t),!(t instanceof nP))return!1;const n=this._repo===t._repo,r=TM(this._path,t._path),a=this._queryIdentifier===t._queryIdentifier;return n&&r&&a}toJSON(){return this.toString()}toString(){return this._repo.toString()+wse(this._path)}}class ld extends nP{constructor(t,n){super(t,n,new MM,!1)}get parent(){const t=OV(this._path);return t===null?null:new ld(this._repo,t)}get root(){let t=this;for(;t.parent!==null;)t=t.parent;return t}}class Tv{constructor(t,n,r){this._node=t,this.ref=n,this._index=r}get priority(){return this._node.getPriority().val()}get key(){return this.ref.key}get size(){return this._node.numChildren()}child(t){const n=new ba(t),r=yE(this.ref,t);return new Tv(this._node.getChild(n),r,as)}exists(){return!this._node.isEmpty()}exportVal(){return this._node.val(!0)}forEach(t){return this._node.isLeafNode()?!1:!!this._node.forEachChild(this._index,(r,a)=>t(new Tv(a,yE(this.ref,r),as)))}hasChild(t){const n=new ba(t);return!this._node.getChild(n).isEmpty()}hasChildren(){return this._node.isLeafNode()?!1:!this._node.isEmpty()}toJSON(){return this.exportVal()}val(){return this._node.val()}}function Kb(e,t){return e=od(e),e._checkNotDeleted("ref"),t!==void 0?yE(e._root,t):e._root}function yE(e,t){return e=od(e),Br(e._path)===null?loe("child","path",t,!1):cU("child","path",t,!1),new ld(e._repo,ws(e._path,t))}function Ooe(e){return e=od(e),new Ioe(e._repo,e._path)}function Moe(e){return Ch("remove",e._path),fw(e,null)}function fw(e,t){e=od(e),Ch("set",e._path),vR("set",t,e._path,!1);const n=new Rd;return yoe(e._repo,e._path,t,null,n.wrapCallback(()=>{})),n.promise}class rP{constructor(t){this.callbackContext=t}respondsTo(t){return t==="value"}createEvent(t,n){const r=n._queryParams.getIndex();return new yU("value",this,new Tv(t.snapshotNode,new ld(n._repo,n._path),r))}getEventRunner(t){return t.getEventType()==="cancel"?()=>this.callbackContext.onCancel(t.error):()=>this.callbackContext.onValue(t.snapshot,null)}createCancelEvent(t,n){return this.callbackContext.hasCancelCallback?new bU(this,t,n):null}matches(t){return t instanceof rP?!t.callbackContext||!this.callbackContext?!0:t.callbackContext.matches(this.callbackContext):!1}hasAnyCallback(){return this.callbackContext!==null}}class aP{constructor(t,n){this.eventType=t,this.callbackContext=n}respondsTo(t){let n=t==="children_added"?"child_added":t;return n=n==="children_removed"?"child_removed":n,this.eventType===n}createCancelEvent(t,n){return this.callbackContext.hasCancelCallback?new bU(this,t,n):null}createEvent(t,n){dn(t.childName!=null,"Child events should have a childName.");const r=yE(new ld(n._repo,n._path),t.childName),a=n._queryParams.getIndex();return new yU(t.type,this,new Tv(t.snapshotNode,r,a),t.prevName)}getEventRunner(t){return t.getEventType()==="cancel"?()=>this.callbackContext.onCancel(t.error):()=>this.callbackContext.onValue(t.snapshot,t.prevName)}matches(t){return t instanceof aP?this.eventType===t.eventType&&(!this.callbackContext||!t.callbackContext||this.callbackContext.matches(t.callbackContext)):!1}hasAnyCallback(){return!!this.callbackContext}}function Poe(e,t,n,r,a){let s;if(typeof r=="object"&&(s=void 0,a=r),typeof r=="function"&&(s=r),a&&a.onlyOnce){const c=n,u=(d,f)=>{q5(e._repo,e,l),c(d,f)};u.userCallback=n.userCallback,u.context=n.context,n=u}const i=new Aoe(n,s||void 0),l=t==="value"?new rP(i):new aP(t,i);return _oe(e._repo,e,l),()=>q5(e._repo,e,l)}function Doe(e,t,n,r){return Poe(e,"value",t,n,r)}Iie(ld);$ie(ld);/** 1131 * @license 1132 * Copyright 2020 Google LLC 1133 * 1134 * Licensed under the Apache License, Version 2.0 (the "License");
1135 * you may not use this file except in compliance with the License. 1136 * You may obtain a copy of the License at 1137 * 1138 * http://www.apache.org/licenses/LICENSE-2.0 1139 * 1140 * Unless required by applicable law or agreed to in writing, software 1141 * distributed under the License is distributed on an "AS IS" BASIS, 1142 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1143 * See the License for the specific language governing permissions and 1144 * limitations under the License. 1145 */const Loe="FIREBASE_DATABASE_EMULATOR_HOST",yR={};let $oe=!1;function Foe(e,t,n,r){e.repoInfo_=new _V(`${t}:${n}`,!1,e.repoInfo_.namespace,e.repoInfo_.webSocketOnly,e.repoInfo_.nodeAdmin,e.repoInfo_.persistenceKey,e.repoInfo_.includeNamespaceInQueryParams,!0),r&&(e.authTokenProvider_=r)}function zoe(e,t,n,r,a){let s=r||e.options.databaseURL;s===void 0&&(e.options.projectId||Ku("Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp()."),ii("Using default host for project ",e.options.projectId),s=`${e.options.projectId}-default-rtdb.firebaseio.com`);let i=Y5(s,a),l=i.repoInfo,c,u;typeof process<"u"&&process.env&&(u=process.env[Loe]),u?(c=!0,s=`http://${u}?ns=${l.namespace}`,i=Y5(s,a),l=i.repoInfo):c=!i.repoInfo.secure;const d=a&&c?new Vh(Vh.OWNER):new Yae(e.name,e.options,t);coe("Invalid Firebase Database URL",i),qr(i.path)||Ku("Database URL must point to the root of a Firebase Database (not including a child path).");const f=Voe(l,e,d,new qae(e.name,n));return new Uoe(f,e)}function Hoe(e,t){const n=yR[t];(!n||n[e.key]!==e)&&Ku(`Database ${t}(${e.repoInfo_}) has already been deleted.`),koe(e),delete n[e.key]}function Voe(e,t,n,r){let a=yR[t.name];a||(a={},yR[t.name]=a);let s=a[e.toURLString()];return s&&Ku("Database initialized multiple times. Please make sure the format of the database URL matches with each database() call."),s=new hoe(e,$oe,n,r),a[e.toURLString()]=s,s}let Uoe=class{constructor(t,n){this._repoInternal=t,this.app=n,this.type="database",this._instanceStarted=!1}get _repo(){return this._instanceStarted||(poe(this._repoInternal,this.app.options.appId,this.app.options.databaseAuthVariableOverride),this._instanceStarted=!0),this._repoInternal}get _root(){return this._rootInternal||(this._rootInternal=new ld(this._repo,ha())
1145),this._rootInternal}_delete(){return this._rootInternal!==null&&(Hoe(this._repo,this.app.name),this._repoInternal=null,this._rootInternal=null),Promise.resolve()}_checkNotDeleted(t){this._rootInternal===null&&Ku("Cannot call "+t+" on a deleted database.")}};function Boe(e=xr(),t){const n=VH(e,"database").getImmediate({identifier:t});if(!n._instanceStarted){const r=UH("database");r&&joe(n,...r)}return n}function joe(e,t,n,r={}){e=od(e),e._checkNotDeleted("useEmulator"),e._instanceStarted&&Ku("Cannot call useEmulator() after instance has already been initialized.");const a=e._repoInternal;let s;if(a.repoInfo_.nodeAdmin)r.mockUserToken&&Ku('mockUserToken is not supported by the Admin SDK. For client access with mock users, please use the "firebase" package instead of "firebase-admin".'),s=new Vh(Vh.OWNER);else if(r.mockUserToken){const i=typeof r.mockUserToken=="string"?r.mockUserToken:BH(r.mockUserToken,e.app.options.projectId);s=new Vh(i)}Foe(a,t,n,s)}/** 1146 * @license 1147 * Copyright 2021 Google LLC 1148 * 1149 * Licensed under the Apache License, Version 2.0 (the "License"); 1150 * you may not use this file except in compliance with the License. 1151 * You may obtain a copy of the License at 1152 * 1153 * http://www.apache.org/licenses/LICENSE-2.0 1154 * 1155 * Unless required by applicable law or agreed to in writing, software 1156 * distributed under the License is distributed on an "AS IS" BASIS, 1157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1158 * See the License for the specific language governing permissions and 1159 * limitations under the License. 1160 */function Woe(e){Oae(YH),jH(new WH("database",(t,{instanceIdentifier:n})=>{const r=t.getProvider("app").getImmediate(),a=t.getProvider("auth-internal"),s=t.getProvider("app-check-internal");return zoe(r,a,s,n)},"PUBLIC").setMultipleInstances(!0)),aE(m5,h5,e),aE(m5,h5,"esm2017")}/** 1161 * @license 1162 * Copyright 2020 Google LLC 1163 * 1164 * Licensed under the Apache License, Version 2.0 (the "License"); 1165 * you may not use this file except in compliance with the License. 1166 * You may obtain a copy of the License at 1167 * 1168 * http://www.apache.org/licenses/LICENSE-2.0 1169 * 1170 * Unless required by applicable law or agreed to in writing, software 1171 * distributed under the License is distributed on an "AS IS" BASIS, 1172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1173 * See the License for the specific language governing permissions and 1174 * limitations under the License. 1175 */const Goe={".sv":"timestamp"};function K5(){return Goe}Bu.prototype.simpleListen=function(e,t){this.sendRequest("q",{p:e},t)};Bu.prototype.echo=function(e,t){this.sendRequest("echo",{d:e},t)};Woe();const Zc={defaults:{loginRedirect:"/workspace/all/bookmarks/recently-viewed"}};var wU="1.13.6",Z5=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},ok=Array.prototype,sP=Object.prototype,X5=typeof Symbol<"u"?Symbol.prototype:null,qoe=ok.push,Vy=ok.slice,Av=sP.toString,Yoe=sP.hasOwnProperty,EU=typeof ArrayBuffer<"u",Koe=typeof DataView<"u",Zoe=Array.isArray,Q5=Object.keys,J5=Object.create,e$=EU&&ArrayBuffer.isView,Xoe=isNaN,Qoe=isFinite,xU=!{toString:null}.propertyIsEnumerable("toString"),t$=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Joe=Math.pow(2,53)-1;function vo(e,t){return t=t==null?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),a=0;a<n;a++)r[a]=arguments[a+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var s=Array(t+1);for(a=0;a<t;a++)s[a]=arguments[a];return s[t]=r,e.apply(this,s)}}function Xu(e){var t=typeof e;return t==="function"||t==="object"&&!!e}function ele(e){return e===null}function _U(e){return e===void 0}function kU(e){return e===!0||e===!1||Av.call(e)==="[object Boolean]"}function tle(e){return!!(e&&e.nodeType===1)}function Ci(e){var t="[object "+e+"]";return function(n){return Av.call(n)===t}}const iP=Ci("String"),SU=Ci("Number"),nle=Ci("Date"),rle=Ci("RegExp"),ale=Ci("Error"),CU=Ci("Symbol"),NU=Ci("ArrayBuffer");var RU=Ci("Function"),sle=Z5.document&&Z5.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof sle!="function"&&(RU=function(e){return typeof e=="function"||!1});const Xi=RU,TU=Ci("Object");var AU=Koe&&TU(new DataView(new ArrayBuffer(8))),oP=typeof Map<"u"&&TU(new Map),ile=Ci("DataView");function ole(e){return e!=null&&Xi(e.getInt8)&&NU(e.buffer)}const bE=AU?ole:ile,zm=Zoe||Ci("Array");function lf(e,t){return e!=null&&Yoe.call(e,t)}var bR=Ci("Arguments");(function(){bR(arguments)||(bR=function(e){return lf(e,"callee")})})();const lP=bR;function lle(e){return!CU(e)&&Qoe(e)&&!isNaN(parseFloat(e))}function IU(e){return SU(e)&&Xoe(e)}function OU(e){return function(){return e}}function MU(e){return function(t){var n=e(t);return typeof n=="number"&&n>=0&&n<=Joe}}function PU(e){return function(t){return t==null?void 0:t[e]}}
1175const wE=PU("byteLength"),cle=MU(wE);var ule=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function dle(e){return e$?e$(e)&&!bE(e):cle(e)&&ule.test(Av.call(e))}const DU=EU?dle:OU(!1),yo=PU("length");function fle(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(a){return t[a]===!0},push:function(a){return t[a]=!0,e.push(a)}}}function LU(e,t){t=fle(t);var n=t$.length,r=e.constructor,a=Xi(r)&&r.prototype||sP,s="constructor";for(lf(e,s)&&!t.contains(s)&&t.push(s);n--;)s=t$[n],s in e&&e[s]!==a[s]&&!t.contains(s)&&t.push(s)}function Qs(e){if(!Xu(e))return[];if(Q5)return Q5(e);var t=[];for(var n in e)lf(e,n)&&t.push(n);return xU&&LU(e,t),t}function mle(e){if(e==null)return!0;var t=yo(e);return typeof t=="number"&&(zm(e)||iP(e)||lP(e))?t===0:yo(Qs(e))===0}function $U(e,t){var n=Qs(t),r=n.length;if(e==null)return!r;for(var a=Object(e),s=0;s<r;s++){var i=n[s];if(t[i]!==a[i]||!(i in a))return!1}return!0}function pa(e){if(e instanceof pa)return e;if(!(this instanceof pa))return new pa(e);this._wrapped=e}pa.VERSION=wU;pa.prototype.value=function(){return this._wrapped};pa.prototype.valueOf=pa.prototype.toJSON=pa.prototype.value;pa.prototype.toString=function(){return String(this._wrapped)};function n$(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,wE(e))}var r$="[object DataView]";function wR(e,t,n,r){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;return a!=="function"&&a!=="object"&&typeof t!="object"?!1:FU(e,t,n,r)}function FU(e,t,n,r){e instanceof pa&&(e=e._wrapped),t instanceof pa&&(t=t._wrapped);var a=Av.call(e);if(a!==Av.call(t))return!1;if(AU&&a=="[object Object]"&&bE(e)){if(!bE(t))return!1;a=r$}switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return X5.valueOf.call(e)===X5.valueOf.call(t);case"[object ArrayBuffer]":case r$:return FU(n$(e),n$(t),n,r)}var s=a==="[object Array]";if(!s&&DU(e)){var i=wE(e);if(i!==wE(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;s=!0}if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,c=t.constructor;if(l!==c&&!(Xi(l)&&l instanceof l&&Xi(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),s){if(u=e.length,u!==t.length)return!1;for(;u--;)if(!wR(e[u],t[u],n,r))return!1}else{var d=Qs(e),f;if(u=d.length,Qs(t).length!==u)return!1;for(;u--;)if(f=d[u],!(lf(t,f)&&wR(e[f],t[f],n,r)))return!1}return n.pop(),r.pop(),!0}function hle(e,t){return wR(e,t)}function Uy(e){if(!Xu(e))return[];var t=[];for(var n in e)t.push(n);return xU&&LU(e,t),t}function cP(e){var t=yo(e);return function(n){if(n==null)return!1;var r=Uy(n);if(yo(r))return!1;for(var a=0;a<t;a++)if(!Xi(n[e[a]]))return!1;return e!==VU||!Xi(n[uP])}}var uP="forEach",zU="has",dP=["clear","delete"],HU=["get",zU,"set"],ple=dP.concat(uP,HU),VU=dP.concat(HU),gle=["add"].concat(dP,uP,zU);const vle=oP?cP(ple):Ci("Map"),yle=oP?cP(VU):Ci("WeakMap"),ble=oP?cP(gle):Ci("Set"),wle=Ci("WeakSet");function gg(e){for(var t=Qs(e),n=t.length,r=Array(n),a=0;a<n;a++)r[a]=e[t[a]];return r}function Ele(e){for(var t=Qs(e),n=t.length,r=Array(n),a=0;a<n;a++)r[a]=[t[a],e[t[a]]];return r}function UU(e){for(var t={},n=Qs(e),r=0,a=n.length;r<a;r++)t[e[n[r]]]=n[r];return t}function ER(e){var t=[];for(var n in e)Xi(e[n])&&t.push(n);return t.sort()}function fP(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||n==null)return n;for(var a=1;a<r;a++)for(var s=arguments[a],i=e(s),l=i.length,c=0;c<l;c++){var u=i[c];(!t||n[u]===void 0)&&(n[u]=s[u])}return n}}const BU=fP(Uy),EE=fP(Qs),jU=fP(Uy,!0);function xle(){return function(){}}function WU(e){if(!Xu(e))return{};if(J5)return J5(e);var t=xle();t.prototype=e;var n=new t;return t.prototype=null,n}function _le(e,t){var n=WU(e);return t&&EE(n,t),n}function kle(e){return Xu(e)?zm(e)?e.slice():BU({},e):e}function Sle(e,t){return t(e),e}function GU(e){return zm(e)?e:[e]}pa.toPath=GU;function By(e){return pa.toPath(e)}function mP(e,t){for(var n=t.length,r=0;r<n;r++){if(e==null)return;e=e[t[r]]}return n?e:void 0}
vendor: 3,504 bytes, lines 1175-1187
1175function qU(e,t,n){var r=mP(e,By(t));return _U(r)?n:r}function Cle(e,t){t=By(t);for(var n=t.length,r=0;r<n;r++){var a=t[r];if(!lf(e,a))return!1;e=e[a]}return!!n}function hP(e){return e}function Iv(e){return e=EE({},e),function(t){return $U(t,e)}}function pP(e){return e=By(e),function(t){return mP(t,e)}}function jy(e,t,n){if(t===void 0)return e;switch(n??3){case 1:return function(r){return e.call(t,r)};case 3:return function(r,a,s){return e.call(t,r,a,s)};case 4:return function(r,a,s,i){return e.call(t,r,a,s,i)}}return function(){return e.apply(t,arguments)}}function YU(e,t,n){return e==null?hP:Xi(e)?jy(e,t,n):Xu(e)&&!zm(e)?Iv(e):pP(e)}function gP(e,t){return YU(e,t,1/0)}pa.iteratee=gP;function xo(e,t,n){return pa.iteratee!==gP?pa.iteratee(e,t):YU(e,t,n)}function Nle(e,t,n){t=xo(t,n);for(var r=Qs(e),a=r.length,s={},i=0;i<a;i++){var l=r[i];s[l]=t(e[l],l,e)}return s}function KU(){}function Rle(e){return e==null?KU:function(t){return qU(e,t)}}function Tle(e,t,n){var r=Array(Math.max(0,e));t=jy(t,n,1);for(var a=0;a<e;a++)r[a]=t(a);return r}function xR(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}const Ov=Date.now||function(){return new Date().getTime()};function ZU(e){var t=function(s){return e[s]},n="(?:"+Qs(e).join("|")+")",r=RegExp(n),a=RegExp(n,"g");return function(s){return s=s==null?"":""+s,r.test(s)?s.replace(a,t):s}}const XU={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ale=ZU(XU),Ile=UU(XU),Ole=ZU(Ile),Mle=pa.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var uC=/(.)^/,Ple={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Dle=/\\|'|\r|\n|\u2028|\u2029/g;function Lle(e){return"\\"+Ple[e]}var $le=/^\s*(\w|\$)+\s*$/;function Fle(e,t,n){!t&&n&&(t=n),t=jU({},t,pa.templateSettings);var r=RegExp([(t.escape||uC).source,(t.interpolate||uC).source,(t.evaluate||uC).source].join("|")+"|$","g"),a=0,s="__p+='";e.replace(r,function(u,d,f,m,h){return s+=e.slice(a,h).replace(Dle,Lle),a=h+u.length,d?s+=`'+ 1176((__t=(`+d+`))==null?'':_.escape(__t))+ 1177'`:f?s+=`'+ 1178((__t=(`+f+`))==null?'':__t)+ 1179'`:m&&(s+=`'; 1180`+m+` 1181__p+='`),u}),s+=`'; 1182`;var i=t.variable;if(i){if(!$le.test(i))throw new Error("variable is not a bare identifier: "+i)}else s=`with(obj||{}){ 1183`+s+`} 1184`,i="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; 1185`+s+`return __p; 1186`;var l;try{l=new Function(i,"_",s)}catch(u){throw u.source=s,u}var c=function(u){return l.call(this,u,pa)};return c.source="function("+i+`){ 1187`+s+"}",c}function zle(e,t,n){t=By(t);var r=t.length;if(!r)return Xi(n)?n.call(e):n;for(var a=0;a<r;a++){var s=e==null?void 0:e[t[a]];s===void 0&&(s=n,a=r),e=Xi(s)?s.call(e):s}return e}var Hle=0;function Vle(e){var t=++Hle+"";return e?e+t:t}function Ule(e){var t=pa(e);return t._chain=!0,t}function QU(e,t,n,r,a){if(!(r instanceof t))return e.apply(n,a);var s=WU(e.prototype),i=e.apply(s,a);return Xu(i)?i:s}var vg=vo(function(e,t){var n=vg.placeholder,r=function(){for(var a=0,s=t.length,i=Array(s),l=0;l<s;l++)i[l]=t[l]===n?arguments[a++]:t[l];for(;a<arguments.length;)i.push(arguments[a++]);return QU(e,r,this,this,i)};return r});vg.placeholder=pa;const JU=vo(function(e,t,n){if(!Xi(e))throw new TypeError("Bind must be called on a function");var r=vo(function(a){return QU(e,r,t,this,n.concat(a))});return r}),sl=MU(yo);function Hm(e,t,n,r){if(r=r||[],!t&&t!==0)t=1/0;else if(t<=0)return r.concat(e);for(var a=r.length,s=0,i=yo(e);s<i;
1187s++){var l=e[s];if(sl(l)&&(zm(l)||lP(l)))if(t>1)Hm(l,t-1,n,r),a=r.length;else for(var c=0,u=l.length;c<u;)r[a++]=l[c++];else n||(r[a++]=l)}return r}const Ble=vo(function(e,t){t=Hm(t,!1,!1);var n=t.length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var r=t[n];e[r]=JU(e[r],e)}return e});function jle(e,t){var n=function(r){var a=n.cache,s=""+(t?t.apply(this,arguments):r);return lf(a,s)||(a[s]=e.apply(this,arguments)),a[s]};return n.cache={},n}const eB=vo(function(e,t,n){return setTimeout(function(){return e.apply(null,n)},t)}),Wle=vg(eB,pa,1);function Gle(e,t,n){var r,a,s,i,l=0;n||(n={});var c=function(){l=n.leading===!1?0:Ov(),r=null,i=e.apply(a,s),r||(a=s=null)},u=function(){var d=Ov();!l&&n.leading===!1&&(l=d);var f=t-(d-l);return a=this,s=arguments,f<=0||f>t?(r&&(clearTimeout(r),r=null),l=d,i=e.apply(a,s),r||(a=s=null)):!r&&n.trailing!==!1&&(r=setTimeout(c,f)),i};return u.cancel=function(){clearTimeout(r),l=0,r=a=s=null},u}function qle(e,t,n){var r,a,s,i,l,c=function(){var d=Ov()-a;t>d?r=setTimeout(c,t-d):(r=null,n||(i=e.apply(l,s)),r||(s=l=null))},u=vo(function(d){return l=this,s=d,a=Ov(),r||(r=setTimeout(c,t),n&&(i=e.apply(l,s))),i});return u.cancel=function(){clearTimeout(r),r=s=l=null},u}function Yle(e,t){return vg(t,e)}function vP(e){return function(){return!e.apply(this,arguments)}}function Kle(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function Zle(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function tB(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}const Xle=vg(tB,2);function nB(e,t,n){t=xo(t,n);for(var r=Qs(e),a,s=0,i=r.length;s<i;s++)if(a=r[s],t(e[a],a,e))return a}function rB(e){return function(t,n,r){n=xo(n,r);for(var a=yo(t),s=e>0?0:a-1;s>=0&&s<a;s+=e)if(n(t[s],s,t))return s;return-1}}const yP=rB(1),aB=rB(-1);function sB(e,t,n,r){n=xo(n,r,1);for(var a=n(t),s=0,i=yo(e);s<i;){var l=Math.floor((s+i)/2);n(e[l])<a?s=l+1:i=l}return s}function iB(e,t,n){return function(r,a,s){var i=0,l=yo(r);if(typeof s=="number")e>0?i=s>=0?s:Math.max(s+l,i):l=s>=0?Math.min(s+1,l):s+l+1;else if(n&&s&&l)return s=n(r,a),r[s]===a?s:-1;if(a!==a)return s=t(Vy.call(r,i,l),IU),s>=0?s+i:-1;for(s=e>0?i:l-1;s>=0&&s<l;s+=e)if(r[s]===a)return s;return-1}}const oB=iB(1,yP,sB),Qle=iB(-1,aB);function _R(e,t,n){var r=sl(e)?yP:nB,a=r(e,t,n);if(a!==void 0&&a!==-1)return e[a]}function Jle(e,t){return _R(e,Iv(t))}function Qu(e,t,n){t=jy(t,n);var r,a;if(sl(e))for(r=0,a=e.length;r<a;r++)t(e[r],r,e);else{var s=Qs(e);for(r=0,a=s.length;r<a;r++)t(e[s[r]],s[r],e)}return e}function gm(e,t,n){t=xo(t,n);for(var r=!sl(e)&&Qs(e),a=(r||e).length,s=Array(a),i=0;i<a;i++){var l=r?r[i]:i;s[i]=t(e[l],l,e)}return s}function lB(e){var t=function(n,r,a,s){var i=!sl(n)&&Qs(n),l=(i||n).length,c=e>0?0:l-1;for(s||(a=n[i?i[c]:c],c+=e);c>=0&&c<l;c+=e){var u=i?i[c]:c;a=r(a,n[u],u,n)}return a};return function(n,r,a,s){var i=arguments.length>=3;return t(n,jy(r,s,4),a,i)}}const dC=lB(1),a$=lB(-1);function Rp(e,t,n){var r=[];return t=xo(t,n),Qu(e,function(a,s,i){t(a,s,i)&&r.push(a)}),r}function ece(e,t,n){return Rp(e,vP(xo(t)),n)}function s$(e,t,n){t=xo(t,n);for(var r=!sl(e)&&Qs(e),a=(r||e).length,s=0;s<a;s++){var i=r?r[s]:s;if(!t(e[i],i,e))return!1}return!0}function i$(e,t,n){t=xo(t,n);for(var r=!sl(e)&&Qs(e),a=(r||e).length,s=0;s<a;s++){var i=r?r[s]:s;if(t(e[i],i,e))return!0}return!1}function ju(e,t,n,r){return sl(e)||(e=gg(e)),(typeof n!="number"||r)&&(n=0),oB(e,t,n)>=0}const tce=vo(function(e,t,n){var r,a;return Xi(t)?a=t:(t=By(t),r=t.slice(0,-1),t=t[t.length-1]),gm(e,function(s){var i=a;if(!i){if(r&&r.length&&(s=mP(s,r)),s==null)return;i=s[t]}return i==null?i:i.apply(s,n)})});function bP(e,t){return gm(e,pP(t))}function nce(e,t){return Rp(e,Iv(t))}function cB(e,t,n){var r=-1/0,a=-1/0,s,i;if(t==null||typeof t=="number"&&typeof e[0]!="object"&&e!=null){e=sl(e)?e:gg(e);for(var l=0,c=e.length;l<c;l++)s=e[l],s!=null&&s>r&&(r=s)}else t=xo(t,n),Qu(e,function(u,d,f){i=t(u,d,f),(i>a||i===-1/0&&r===-1/0)&&(r=u,a=i)});return r}function rce(e,t,n){var r=1/0,a=1/0,s,i;if(t==null||typeof t=="number"&&typeof e[0]!="object"&&e!=null){e=sl(e)?e:gg(e);for(var l=0,c=e.length;l<c;l++)s=e[l],s!=null&&s<r&&(r=s)}else t=xo(t,n),Qu(e,function(u,d,f){i=t(u,d,f),(i<a||i===1/0&&r===1/0)&&(r=u,a=i)});return r}var ace=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function uB(e){return e?zm(e)?Vy.call(e):iP(e)?e.match(ace):sl(e)?gm(e,hP):gg(e):[]}
1187function dB(e,t,n){if(t==null||n)return sl(e)||(e=gg(e)),e[xR(e.length-1)];var r=uB(e),a=yo(r);t=Math.max(Math.min(t,a),0);for(var s=a-1,i=0;i<t;i++){var l=xR(i,s),c=r[i];r[i]=r[l],r[l]=c}return r.slice(0,t)}function sce(e){return dB(e,1/0)}function ice(e,t,n){var r=0;return t=xo(t,n),bP(gm(e,function(a,s,i){return{value:a,index:r++,criteria:t(a,s,i)}}).sort(function(a,s){var i=a.criteria,l=s.criteria;if(i!==l){if(i>l||i===void 0)return 1;if(i<l||l===void 0)return-1}return a.index-s.index}),"value")}function lk(e,t){return function(n,r,a){var s=t?[[],[]]:{};return r=xo(r,a),Qu(n,function(i,l){var c=r(i,l,n);e(s,i,c)}),s}}const oce=lk(function(e,t,n){lf(e,n)?e[n].push(t):e[n]=[t]}),lce=lk(function(e,t,n){e[n]=t}),cce=lk(function(e,t,n){lf(e,n)?e[n]++:e[n]=1}),uce=lk(function(e,t,n){e[n?0:1].push(t)},!0);function dce(e){return e==null?0:sl(e)?e.length:Qs(e).length}function fce(e,t,n){return t in n}const fB=vo(function(e,t){var n={},r=t[0];if(e==null)return n;Xi(r)?(t.length>1&&(r=jy(r,t[1])),t=Uy(e)):(r=fce,t=Hm(t,!1,!1),e=Object(e));for(var a=0,s=t.length;a<s;a++){var i=t[a],l=e[i];r(l,i,e)&&(n[i]=l)}return n}),mce=vo(function(e,t){var n=t[0],r;return Xi(n)?(n=vP(n),t.length>1&&(r=t[1])):(t=gm(Hm(t,!1,!1),String),n=function(a,s){return!ju(t,s)}),fB(e,n,r)});function mB(e,t,n){return Vy.call(e,0,Math.max(0,e.length-(t==null||n?1:t)))}function fC(e,t,n){return e==null||e.length<1?t==null||n?void 0:[]:t==null||n?e[0]:mB(e,e.length-t)}
1187function mw(e,t,n){return Vy.call(e,t==null||n?1:t)}function hce(e,t,n){return e==null||e.length<1?t==null||n?void 0:[]:t==null||n?e[e.length-1]:mw(e,Math.max(0,e.length-t))}function pce(e){return Rp(e,Boolean)}function gce(e,t){return Hm(e,t,!1)}const hB=vo(function(e,t){return t=Hm(t,!0,!0),Rp(e,function(n){return!ju(t,n)})}),vce=vo(function(e,t){return hB(e,t)});function kR(e,t,n,r){kU(t)||(r=n,n=t,t=!1),n!=null&&(n=xo(n,r));for(var a=[],s=[],i=0,l=yo(e);i<l;i++){var c=e[i],u=n?n(c,i,e):c;t&&!n?((!i||s!==u)&&a.push(c),s=u):n?ju(s,u)||(s.push(u),a.push(c)):ju(a,c)||a.push(c)}return a}const yce=vo(function(e){return kR(Hm(e,!0,!0))});function bce(e){for(var t=[],n=arguments.length,r=0,a=yo(e);r<a;r++){var s=e[r];if(!ju(t,s)){var i;for(i=1;i<n&&ju(arguments[i],s);i++);i===n&&t.push(s)}}return t}function SR(e){for(var t=e&&cB(e,yo).length||0,n=Array(t),r=0;r<t;r++)n[r]=bP(e,r);return n}const wce=vo(SR);function Ece(e,t){for(var n={},r=0,a=yo(e);r<a;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function xce(e,t,n){t==null&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),a=Array(r),s=0;s<r;s++,e+=n)a[s]=e;return a}function _ce(e,t){if(t==null||t<1)return[];for(var n=[],r=0,a=e.length;r<a;)n.push(Vy.call(e,r,r+=t));return n}function wP(e,t){return e._chain?pa(t).chain():t}function pB(e){return Qu(ER(e),function(t){var n=pa[t]=e[t];pa.prototype[t]=function(){var r=[this._wrapped];return qoe.apply(r,arguments),wP(this,n.apply(pa,r))}}),pa}Qu(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=ok[e];pa.prototype[e]=function(){var n=this._wrapped;return n!=null&&(t.apply(n,arguments),(e==="shift"||e==="splice")&&n.length===0&&delete n[0]),wP(this,n)}});Qu(["concat","join","slice"],function(e){var t=ok[e];pa.prototype[e]=function(){var n=this._wrapped;return n!=null&&(n=t.apply(n,arguments)),wP(this,n)}});const kce=Object.freeze(Object.defineProperty({__proto__:null,VERSION:wU,after:Zle,all:s$,allKeys:Uy,any:i$,assign:EE,before:tB,bind:JU,bindAll:Ble,chain:Ule,chunk:_ce,clone:kle,collect:gm,compact:pce,compose:Kle,constant:OU,contains:ju,countBy:cce,create:_le,debounce:qle,default:pa,defaults:jU,defer:Wle,delay:eB,detect:_R,difference:hB,drop:mw,each:Qu,escape:Ale,every:s$,extend:BU,extendOwn:EE,filter:Rp,find:_R,findIndex:yP,findKey:nB,findLastIndex:aB,findWhere:Jle,first:fC,flatten:gce,foldl:dC,foldr:a$,forEach:Qu,functions:ER,get:qU,groupBy:oce,has:Cle,head:fC,identity:hP,include:ju,includes:ju,indexBy:lce,indexOf:oB,initial:mB,inject:dC,intersection:bce,invert:UU,invoke:tce,isArguments:lP,isArray:zm,isArrayBuffer:NU,isBoolean:kU,isDataView:bE,isDate:nle,isElement:tle,isEmpty:mle,isEqual:hle,isError:ale,isFinite:lle,isFunction:Xi,isMap:vle,isMatch:$U,isNaN:IU,isNull:ele,isNumber:SU,isObject:Xu,isRegExp:rle,isSet:ble,isString:iP,isSymbol:CU,isTypedArray:DU,isUndefined:_U,isWeakMap:yle,isWeakSet:wle,iteratee:gP,keys:Qs,last:hce,lastIndexOf:Qle,map:gm,mapObject:Nle,matcher:Iv,matches:Iv,max:cB,memoize:jle,methods:ER,min:rce,mixin:pB,negate:vP,noop:KU,now:Ov,object:Ece,omit:mce,once:Xle,pairs:Ele,partial:vg,partition:uce,pick:fB,pluck:bP,property:pP,propertyOf:Rle,random:xR,range:xce,reduce:dC,reduceRight:a$,reject:ece,rest:mw,restArguments:vo,result:zle,sample:dB,select:Rp,shuffle:sce,size:dce,some:i$,sortBy:ice,sortedIndex:sB,tail:mw,take:fC,tap:Sle,template:Fle,templateSettings:Mle,throttle:Gle,times:Tle,toArray:uB,toPath:GU,transpose:SR,unescape:Ole,union:yce,uniq:kR,unique:kR,uniqueId:Vle,unzip:SR,values:gg,where:nce,without:vce,wrap:Yle,zip:wce},Symbol.toStringTag,{value:"Module"}));var ta=pB(kce);ta._=ta;var gB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(u5,function(){var n=function(_,R){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,V){P.__proto__=V}||function(P,V){for(var Z in V)Object.prototype.hasOwnProperty.call(V,Z)&&(P[Z]=V[Z])})(_,R)},r=function(){return(r=Object.assign||function(_){for(var R,P=1,V=arguments.length;P<V;P++)for(var Z in R=arguments[P])Object.prototype.hasOwnProperty.call(R,Z)&&(_[Z]=R[Z]);return _}).apply(this,arguments)};function a(_,R,P){if(P||arguments.length===2)for(var V,Z=0,Q=R.length;Z<Q;Z++)!V&&Z in R||((V=V||Array.prototype.slice.call(R,0,Z))[Z]=R[Z]);return _.concat(V||Array.prototype.slice.call(R))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:u5,i=Object.keys,l=Array.isArray;
vendor: 26,092 bytes, lines 1187-1189
1187function c(_,R){return typeof R!="object"||i(R).forEach(function(P){_[P]=R[P]}),_}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var u=Object.getPrototypeOf,d={}.hasOwnProperty;function f(_,R){return d.call(_,R)}function m(_,R){typeof R=="function"&&(R=R(u(_))),(typeof Reflect>"u"?i:Reflect.ownKeys)(R).forEach(function(P){g(_,P,R[P])})}var h=Object.defineProperty;function g(_,R,P,V){h(_,R,c(P&&f(P,"get")&&typeof P.get=="function"?{get:P.get,set:P.set,configurable:!0}:{value:P,configurable:!0,writable:!0},V))}function v(_){return{from:function(R){return _.prototype=Object.create(R.prototype),g(_.prototype,"constructor",_),{extend:m.bind(null,_.prototype)}}}}var y=Object.getOwnPropertyDescriptor,b=[].slice;function E(_,R,P){return b.call(_,R,P)}function w(_,R){return R(_)}function x(_){if(!_)throw new Error("Assertion Failed")}function S(_){s.setImmediate?setImmediate(_):setTimeout(_,0)}function N(_,R){if(typeof R=="string"&&f(_,R))return _[R];if(!R)return _;if(typeof R!="string"){for(var P=[],V=0,Z=R.length;V<Z;++V){var Q=N(_,R[V]);P.push(Q)}return P}var de=R.indexOf(".");if(de!==-1){var ve=_[R.substr(0,de)];return ve==null?void 0:N(ve,R.substr(de+1))}}function k(_,R,P){if(_&&R!==void 0&&!("isFrozen"in Object&&Object.isFrozen(_)))if(typeof R!="string"&&"length"in R){x(typeof P!="string"&&"length"in P);for(var V=0,Z=R.length;V<Z;++V)k(_,R[V],P[V])}else{var Q,de,ve=R.indexOf(".");ve!==-1?(Q=R.substr(0,ve),(de=R.substr(ve+1))===""?P===void 0?l(_)&&!isNaN(parseInt(Q))?_.splice(Q,1):delete _[Q]:_[Q]=P:k(ve=!(ve=_[Q])||!f(_,Q)?_[Q]={}:ve,de,P)):P===void 0?l(_)&&!isNaN(parseInt(R))?_.splice(R,1):delete _[R]:_[R]=P}}function C(_){var R,P={};for(R in _)f(_,R)&&(P[R]=_[R]);return P}var A=[].concat;function O(_){return A.apply([],_)}var Se="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(O([8,16,32,64].map(function(_){return["Int","Uint","Float"].map(function(R){return R+_+"Array"})}))).filter(function(_){return s[_]}),T=new Set(Se.map(function(_){return s[_]})),M=null;function L(_){return M=new WeakMap,_=function R(P){if(!P||typeof P!="object")return P;var V=M.get(P);if(V)return V;if(l(P)){V=[],M.set(P,V);for(var Z=0,Q=P.length;Z<Q;++Z)V.push(R(P[Z]))}else if(T.has(P.constructor))V=P;else{var de,ve=u(P);for(de in V=ve===Object.prototype?{}:Object.create(ve),M.set(P,V),P)f(P,de)&&(V[de]=R(P[de]))}return V}(_),M=null,_}var D={}.toString;function j(_){return D.call(_).slice(8,-1)}var H=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Y=typeof H=="symbol"?function(_){var R;return _!=null&&(R=_[H])&&R.apply(_)}:function(){return null};function z(_,R){return R=_.indexOf(R),0<=R&&_.splice(R,1),0<=R}var K={};function ee(_){var R,P,V,Z;if(arguments.length===1){if(l(_))return _.slice();if(this===K&&typeof _=="string")return[_];if(Z=Y(_)){for(P=[];!(V=Z.next()).done;)P.push(V.value);return P}if(_==null)return[_];if(typeof(R=_.length)!="number")return[_];for(P=new Array(R);R--;)P[R]=_[R];return P}for(R=arguments.length,P=new Array(R);R--;)P[R]=arguments[R];return P}var oe=typeof Symbol<"u"?function(_){return _[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},ke=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ul=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(ke),J={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function se(_,R){this.name=_,this.message=R}function B(_,R){return _+". Errors: "+Object.keys(R).map(function(P){return R[P].toString()}).filter(function(P,V,Z){return Z.indexOf(P)===V}).join(` 1188`)}function U(_,R,P,V){this.failures=R,this.failedKeys=V,this.successCount=P,this.message=B(_,R)}function $(_,R){this.name="BulkError",this.failures=Object.keys(R).map(function(P){return R[P]}),this.failuresByPos=R,this.message=B(_,this.failures)}v(se).from(Error).extend({toString:function(){return this.name+": "+this.message}}),v(U).from(se),v($).from(se);var ce=ul.reduce(function(_,R){return _[R]=R+"Error",_},{}),be=se,ue=ul.reduce(function(_,R){var P=R+"Error";function V(Z,Q){this.name=P,Z?typeof Z=="string"?(this.message="".concat(Z).concat(Q?` 1189 `+Q:""),this.inner=Q||null):typeof Z=="object"&&(this.message="".concat(Z.name," ").concat(Z.message),this.inner=Z):(this.message=J[R]||P,this.inner=null)}return v(V).from(be),_[R]=V,_},{});ue.Syntax=SyntaxError,ue.Type=TypeError,ue.Range=RangeError;var Ie=ke.reduce(function(_,R){return _[R+"Error"]=ue[R],_},{}),Ae=ul.reduce(function(_,R){return["Syntax","Type","Range"].indexOf(R)===-1&&(_[R+"Error"]=ue[R]),_},{});function he(){}function _e(_){return _}function ie(_,R){return _==null||_===_e?R:function(P){return R(_(P))}}function Ue(_,R){return function(){_.apply(this,arguments),R.apply(this,arguments)}}function ae(_,R){return _===he?R:function(){var P=_.apply(this,arguments);P!==void 0&&(arguments[0]=P);var V=this.onsuccess,Z=this.onerror;this.onsuccess=null,this.onerror=null;var Q=R.apply(this,arguments);return V&&(this.onsuccess=this.onsuccess?Ue(V,this.onsuccess):V),Z&&(this.onerror=this.onerror?Ue(Z,this.onerror):Z),Q!==void 0?Q:P}}function pe(_,R){return _===he?R:function(){_.apply(this,arguments);var P=this.onsuccess,V=this.onerror;this.onsuccess=this.onerror=null,R.apply(this,arguments),P&&(this.onsuccess=this.onsuccess?Ue(P,this.onsuccess):P),V&&(this.onerror=this.onerror?Ue(V,this.onerror):V)}}function W(_,R){return _===he?R:function(P){var V=_.apply(this,arguments);c(P,V);var Z=this.onsuccess,Q=this.onerror;return this.onsuccess=null,this.onerror=null,P=R.apply(this,arguments),Z&&(this.onsuccess=this.onsuccess?Ue(Z,this.onsuccess):Z),Q&&(this.onerror=this.onerror?Ue(Q,this.onerror):Q),V===void 0?P===void 0?void 0:P:c(V,P)}}function q(_,R){return _===he?R:function(){return R.apply(this,arguments)!==!1&&_.apply(this,arguments)}}function te(_,R){return _===he?R:function(){var P=_.apply(this,arguments);if(P&&typeof P.then=="function"){for(var V=this,Z=arguments.length,Q=new Array(Z);Z--;)Q[Z]=arguments[Z];return P.then(function(){return R.apply(V,Q)})}return R.apply(this,arguments)}}Ae.ModifyError=U,Ae.DexieError=se,Ae.BulkError=$;var X=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function le(_){X=_}var me={},fe=100,Se=typeof Promise>"u"?[]:function(){var _=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[_,u(_),_];var R=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[R,u(R),_]}(),ke=Se[0],ul=Se[1],Se=Se[2],ul=ul&&ul.then,Et=ke&&ke.constructor,nt=!!Se,Pt=function(_,R){rr.push([_,R]),hn&&(queueMicrotask(In),hn=!1)},en=!0,hn=!0,rt=[],et=[],Kt=_e,zn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:he,pgp:!1,env:{},finalize:he},xt=zn,rr=[],ir=0,Tn=[];function Ct(_){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var R=this._PSD=xt;if(typeof _!="function"){if(_!==me)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Ce(this,this._value))}this._state=null,this._value=null,++R.ref,function P(V,Z){try{Z(function(Q){if(V._state===null){if(Q===V)throw new TypeError("A promise cannot be resolved with itself.");var de=V._lib&&Dn();Q&&typeof Q.then=="function"?P(V,function(ve,Te){Q instanceof Ct?Q._then(ve,Te):Q.then(ve,Te)}):(V._state=!0,V._value=Q,ut(V)),de&&or()}},Ce.bind(null,V))}catch(Q){Ce(V,Q)}}(this,_)}var _r={get:function(){var _=xt,R=We;function P(V,Z){var Q=this,de=!_.global&&(_!==xt||R!==We),ve=de&&!An(),Te=new Ct(function(Oe,Ge){pn(Q,new Qn(mt(V,_,de,ve),mt(Z,_,de,ve),Oe,Ge,_))});return this._consoleTask&&(Te._consoleTask=this._consoleTask),Te}return P.prototype=me,P},set:function(_){g(this,"then",_&&_.prototype===me?_r:{get:function(){return _},set:_r.set})}};function Qn(_,R,P,V,Z){this.onFulfilled=typeof _=="function"?_:null,this.onRejected=typeof R=="function"?R:null,this.resolve=P,this.reject=V,this.psd=Z}function Ce(_,R){var P,V;et.push(R),_._state===null&&(P=_._lib&&Dn(),R=Kt(R),_._state=!1,_._value=R,V=_,rt.some(function(Z){return Z._value===V._value})||rt.push(V),ut(_),P&&or())}function ut(_){var R=_._listeners;_._listeners=[];for(var P=0,V=R.length;P<V;++P)pn(_,R[P]);var Z=_._PSD;--Z.ref||Z.finalize(),ir===0&&(++ir,Pt(function(){--ir==0&&Zt()},[]))}function pn(_,R){if(_._state!==null){var P=_._state?R.onFulfilled:R.onRejected;if(P===null)return(_._state?R.resolve:R.reject)(_._value);++R.psd.ref,++ir,Pt(Jt,[P,_,R])}else _._listeners.push(R)}function Jt(_,R,P){try{var V,Z=R._value;!R._state&&et.length&&(et=[]),V=X&&R._consoleTask?R._consoleTask.run(function(){return _(Z)}):_(Z),R._state||et.indexOf(Z)!==-1||function(Q){for(var de=rt.length;de;)if(rt[--de]._value===Q._value)return rt.splice(de,1)}(R),P.resolve(V)}catch(Q){P.reject(Q)}finally{--ir==0&&Zt(),--P.psd.ref||P.psd.finalize()}}function In(){Be(zn,function(){Dn()&&or()})}function Dn(){var _=en;return hn=en=!1,_}function or(){var _,R,P;do for(;0<rr.length;)for(_=rr,rr=[],P=_.length,R=0;R<P;++R){var V=_[R];V[0].apply(null,V[1])}while(0<rr.length);hn=en=!0}function Zt(){var _=rt;rt=[],_.forEach(function(V){V._PSD.onunhandled.call(null,V._value,V)});for(var R=Tn.slice(0),P=R.length;P;)R[--P]()}function tr(_){return new Ct(me,!1,_)}function Fe(_,R){var P=xt;return function(){var V=Dn(),Z=xt;try{return Lt(P,!0),_.apply(this,arguments)}catch(Q){R&&R(Q)}finally{Lt(Z,!1),V&&or()}}}m(Ct.prototype,{then:_r,_then:function(_,R){pn(this,new Qn(null,null,_,R,xt))},catch:function(_){if(arguments.length===1)return this.then(null,_);var R=_,P=arguments[1];return typeof R=="function"?this.then(null,function(V){return(V instanceof R?P:tr)(V)}):this.then(null,function(V){return(V&&V.name===R?P:tr)(V)})},finally:function(_){return this.then(function(R){return Ct.resolve(_()).then(function(){return R})},function(R){return Ct.resolve(_()).then(function(){return tr(R)})})},timeout:function(_,R){var P=this;return _<1/0?new Ct(function(V,Z){var Q=setTimeout(function(){return Z(new ue.Timeout(R))},_);P.then(V,Z).finally(clearTimeout.bind(null,Q))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&g(Ct.prototype,Symbol.toStringTag,"Dexie.Promise"),zn.env=ne(),m(Ct,{all:function(){var _=ee.apply(null,arguments).map(je);return new Ct(function(R,P){_.length===0&&R([]);var V=_.length;_.forEach(function(Z,Q){return Ct.resolve(Z).then(function(de){_[Q]=de,--V||R(_)},P)})})},resolve:function(_){return _ instanceof Ct?_:_&&typeof _.then=="function"?new Ct(function(R,P){_.then(R,P)}):new Ct(me,!0,_)},reject:tr,race:function(){var _=ee.apply(null,arguments).map(je);return new Ct(function(R,P){_.map(function(V){return Ct.resolve(V).then(R,P)})})},PSD:{get:function(){return xt},set:function(_){return xt=_}},totalEchoes:{get:function(){return We}},newPSD:_t,usePSD:Be,scheduler:{get:function(){return Pt},set:function(_){Pt=_}},rejectionMapper:{get:function(){return Kt},set:function(_){Kt=_}},follow:function(_,R){return new Ct(function(P,V){return _t(function(Z,Q){var de=xt;de.unhandleds=[],de.onunhandled=Q,de.finalize=Ue(function(){var ve,Te=this;ve=function(){Te.unhandleds.length===0?Z():Q(Te.unhandleds[0])},Tn.push(function Oe(){ve(),Tn.splice(Tn.indexOf(Oe),1)}),++ir,Pt(function(){--ir==0&&Zt()},[])},de.finalize),_()},R,P,V)})}}),Et&&(Et.allSettled&&g(Ct,"allSettled",function(){var _=ee.apply(null,arguments).map(je);return new Ct(function(R){_.length===0&&R([]);var P=_.length,V=new Array(P);_.forEach(function(Z,Q){return Ct.resolve(Z).then(function(de){return V[Q]={status:"fulfilled",value:de}},function(de){return V[Q]={status:"rejected",reason:de}}).then(function(){return--P||R(V)})})})}),Et.any&&typeof AggregateError<"u"&&g(Ct,"any",function(){var _=ee.apply(null,arguments).map(je);return new Ct(function(R,P){_.length===0&&P(new AggregateError([]));var V=_.length,Z=new Array(V);_.forEach(function(Q,de){return Ct.resolve(Q).then(function(ve){return R(ve)},function(ve){Z[de]=ve,--V||P(new AggregateError(Z))})})})}),Et.withResolvers&&(Ct.withResolvers=Et.withResolvers));var st={awaits:0,echoes:0,id:0},gt=0,ht=[],Ee=0,We=0,it=0;function _t(_,R,P,V){var Z=xt,Q=Object.create(Z);return Q.parent=Z,Q.ref=0,Q.global=!1,Q.id=++it,zn.env,Q.env=nt?{Promise:Ct,PromiseProp:{value:Ct,configurable:!0,writable:!0},all:Ct.all,race:Ct.race,allSettled:Ct.allSettled,any:Ct.any,resolve:Ct.resolve,reject:Ct.reject}:{},R&&c(Q,R),++Z.ref,Q.finalize=function(){--this.parent.ref||this.parent.finalize()},V=Be(Q,_,P,V),Q.ref===0&&Q.finalize(),V}function vn(){return st.id||(st.id=++gt),++st.awaits,st.echoes+=fe,st.id}function An(){return!!st.awaits&&(--st.awaits==0&&(st.id=0),st.echoes=st.awaits*fe,!0)}function je(_){return st.echoes&&_&&_.constructor===Et?(vn(),_.then(function(R){return An(),R},function(R){return An(),vt(R)})):_}function kt(){var _=ht[ht.length-1];ht.pop(),Lt(_,!1)}function Lt(_,R){var P,V=xt;(R?!st.echoes||Ee++&&_===xt:!Ee||--Ee&&_===xt)||queueMicrotask(R?(function(Z){++We,st.echoes&&--st.echoes!=0||(st.echoes=st.awaits=st.id=0),ht.push(xt),Lt(Z,!0)}).bind(null,_):kt),_!==xt&&(xt=_,V===zn&&(zn.env=ne()),nt&&(P=zn.env.Promise,R=_.env,(V.global||_.global)&&(Object.defineProperty(s,"Promise",R.PromiseProp),P.all=R.all,P.race=R.race,P.resolve=R.resolve,P.reject=R.reject,R.allSettled&&(P.allSettled=R.allSettled),R.any&&(P.any=R.any))))}function ne(){var _=s.Promise;return nt?{Promise:_,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:_.all,race:_.race,allSettled:_.allSettled,any:_.any,resolve:_.resolve,reject:_.reject}:{}}function Be(_,R,P,V,Z){var Q=xt;try{return Lt(_,!0),R(P,V,Z)}finally{Lt(Q,!1)}}function mt(_,R,P,V){return typeof _!="function"?_:function(){var Z=xt;P&&vn(),Lt(R,!0);try{return _.apply(this,arguments)}finally{Lt(Z,!1),V&&queueMicrotask(An)}}}function we(_){Promise===Et&&st.echoes===0?Ee===0?_():enqueueNativeMicroTask(_):setTimeout(_,0)}(""+ul).indexOf("[native code]")===-1&&(vn=An=he);var vt=Ct.reject,It=String.fromCharCode(65535),fn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ne="String expected.",lt=[],wt="__dbnames",Ke="readonly",St="readwrite";function ln(_,R){return _?R?function(){return _.apply(this,arguments)&&R.apply(this,arguments)}:_:R}var vr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Yn(_){return typeof _!="string"||/\./.test(_)?function(R){return R}:function(R){return R[_]===void 0&&_ in R&&delete(R=L(R))[_],R}}function Cn(){throw ue.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function Hn(_,R){try{var P=Re(_),V=Re(R);if(P!==V)return P==="Array"?1:V==="Array"?-1:P==="binary"?1:V==="binary"?-1:P==="string"?1:V==="string"?-1:P==="Date"?1:V!=="Date"?NaN:-1;switch(P){case"number":case"Date":case"string":return R<_?1:_<R?-1:0;case"binary":return function(Z,Q){for(var de=Z.length,ve=Q.length,Te=de<ve?de:ve,Oe=0;Oe<Te;++Oe)if(Z[Oe]!==Q[Oe])return Z[Oe]<Q[Oe]?-1:1;return de===ve?0:de<ve?-1:1}(ot(_),ot(R));case"Array":return function(Z,Q){for(var de=Z.length,ve=Q.length,Te=de<ve?de:ve,Oe=0;Oe<Te;++Oe){var Ge=Hn(Z[Oe],Q[Oe]);if(Ge!==0)return Ge}return de===ve?0:de<ve?-1:1}(_,R)}}catch{}return NaN}function Re(_){var R=typeof _;return R!="object"?R:ArrayBuffer.isView(_)?"binary":(_=j(_),_==="ArrayBuffer"?"binary":_)}function ot(_){return _ instanceof Uint8Array?_:ArrayBuffer.isView(_)?new Uint8Array(_.buffer,_.byteOffset,_.byteLength):new Uint8Array(_)}function jt(_,R,P){var V=_.schema.yProps;return V?(R&&0<P.numFailures&&(R=R.filter(function(Z,Q){return!P.failures[Q]})),Promise.all(V.map(function(Z){return Z=Z.updatesTable,R?_.db.table(Z).where("k").anyOf(R).delete():_.db.table(Z).clear()})).then(function(){return P})):P}var En=(ar.prototype.execute=function(_){var R=this["@@propmod"];if(R.add!==void 0){var P=R.add;if(l(P))return a(a([],l(_)?_:[],!0),P,!0).sort();if(typeof P=="number")return(Number(_)||0)+P;if(typeof P=="bigint")try{return BigInt(_)+P}catch{return BigInt(0)+P}throw new TypeError("Invalid term ".concat(P))}if(R.remove!==void 0){var V=R.remove;if(l(V))return l(_)?_.filter(function(Z){return!V.includes(Z)}).sort():[];if(typeof V=="number")return Number(_)-V;if(typeof V=="bigint")try{return BigInt(_)-V}catch{return BigInt(0)-V}throw new TypeError("Invalid subtrahend ".concat(V))}return P=(P=R.replacePrefix)===null||P===void 0?void 0:P[0],P&&typeof _=="string"&&_.startsWith(P)?R.replacePrefix[1]+_.substring(P.length):_},ar);function ar(_){this["@@propmod"]=_}function ye(_,R){for(var P=i(R),V=P.length,Z=!1,Q=0;Q<V;++Q){var de=P[Q],ve=R[de],Te=N(_,de);ve instanceof En?(k(_,de,ve.execute(Te)),Z=!0):Te!==ve&&(k(_,de,ve),Z=!0)}return Z}var qe=(Me.prototype._trans=function(_,R,P){var V=this._tx||xt.trans,Z=this.name,Q=X&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(_==="readonly"?"read":"write"," ").concat(this.name));function de(Oe,Ge,xe){if(!xe.schema[Z])throw new ue.NotFound("Table "+Z+" not part of transaction");return R(xe.idbtrans,xe)}var ve=Dn();try{var Te=V&&V.db._novip===this.db._novip?V===xt.trans?V._promise(_,de,P):_t(function(){return V._promise(_,de,P)},{trans:V,transless:xt.transless||xt}):function Oe(Ge,xe,Xe,Pe){if(Ge.idbdb&&(Ge._state.openComplete||xt.letThrough||Ge._vip)){var ze=Ge._createTransaction(xe,Xe,Ge._dbSchema);try{ze.create(),Ge._state.PR1398_maxLoop=3}catch(He){return He.name===ce.InvalidState&&Ge.isOpen()&&0<--Ge._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Ge.close({disableAutoOpen:!1}),Ge.open().then(function(){return Oe(Ge,xe,Xe,Pe)})):vt(He)}return ze._promise(xe,function(He,Ye){return _t(function(){return xt.trans=ze,Pe(He,Ye,ze)})}).then(function(He){if(xe==="readwrite")try{ze.idbtrans.commit()}catch{}return xe==="readonly"?He:ze._completion.then(function(){return He})})}if(Ge._state.openComplete)return vt(new ue.DatabaseClosed(Ge._state.dbOpenError));if(!Ge._state.isBeingOpened){if(!Ge._state.autoOpen)return vt(new ue.DatabaseClosed);Ge.open().catch(he)}return Ge._state.dbReadyPromise.then(function(){return Oe(Ge,xe,Xe,Pe)})}(this.db,_,[this.name],de);return Q&&(Te._consoleTask=Q,Te=Te.catch(function(Oe){return console.trace(Oe),vt(Oe)})),Te}finally{ve&&or()}},Me.prototype.get=function(_,R){var P=this;return _&&_.constructor===Object?this.where(_).first(R):_==null?vt(new ue.Type("Invalid argument to Table.get()")):this._trans("readonly",function(V){return P.core.get({trans:V,key:_}).then(function(Z){return P.hook.reading.fire(Z)})}).then(R)},Me.prototype.where=function(_){if(typeof _=="string")return new this.db.WhereClause(this,_);if(l(_))return new this.db.WhereClause(this,"[".concat(_.join("+"),"]"));var R=i(_);if(R.length===1)return this.where(R[0]).equals(_[R[0]]);var P=this.schema.indexes.concat(this.schema.primKey).filter(function(ve){if(ve.compound&&R.every(function(Oe){return 0<=ve.keyPath.indexOf(Oe)})){for(var Te=0;Te<R.length;++Te)if(R.indexOf(ve.keyPath[Te])===-1)return!1;return!0}return!1}).sort(function(ve,Te){return ve.keyPath.length-Te.keyPath.length})[0];if(P&&this.db._maxKey!==It){var Q=P.keyPath.slice(0,R.length);return this.where(Q).equals(Q.map(function(Te){return _[Te]}))}!P&&X&&console.warn("The query ".concat(JSON.stringify(_)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(R.join("+"),"]"));var V=this.schema.idxByName;function Z(ve,Te){return Hn(ve,Te)===0}var de=R.reduce(function(xe,Te){var Oe=xe[0],Ge=xe[1],xe=V[Te],Xe=_[Te];return[Oe||xe,Oe||!xe?ln(Ge,xe&&xe.multi?function(Pe){return Pe=N(Pe,Te),l(Pe)&&Pe.some(function(ze){return Z(Xe,ze)})}:function(Pe){return Z(Xe,N(Pe,Te))}):Ge]},[null,null]),Q=de[0],de=de[1];return Q?this.where(Q.name).equals(_[Q.keyPath]).filter(de):P?this.filter(de):this.where(R).equals("")},Me.prototype.filter=function(_){return this.toCollection().and(_)},Me.prototype.count=function(_){return this.toCollection().count(_)},Me.prototype.offset=function(_){return this.toCollection().offset(_)},Me.prototype.limit=function(_){return this.toCollection().limit(_)},Me.prototype.each=function(_){return this.toCollection().each(_)},Me.prototype.toArray=function(_){return this.toCollection().toArray(_)},Me.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},Me.prototype.orderBy=function(_){return new this.db.Collection(new this.db.WhereClause(this,l(_)?"[".concat(_.join("+"),"]"):_))},Me.prototype.reverse=function(){return this.toCollection().reverse()},Me.prototype.mapToClass=function(_){var R,P=this.db,V=this.name;function Z(){return R!==null&&R.apply(this,arguments)||this}(this.schema.mappedClass=_).prototype instanceof Cn&&(function(Te,Oe){if(typeof Oe!="function"&&Oe!==null)throw new TypeError("Class extends value "+String(Oe)+" is not a constructor or null");function Ge(){this.constructor=Te}n(Te,Oe),Te.prototype=Oe===null?Object.create(Oe):(Ge.prototype=Oe.prototype,new Ge)}(Z,R=_),Object.defineProperty(Z.prototype,"db",{get:function(){return P},enumerable:!1,configurable:!0}),Z.prototype.table=function(){return V},_=Z);for(var Q=new Set,de=_.prototype;de;de=u(de))Object.getOwnPropertyNames(de).forEach(function(Te){return Q.add(Te)});function ve(Te){if(!Te)return Te;var Oe,Ge=Object.create(_.prototype);for(Oe in Te)if(!Q.has(Oe))try{Ge[Oe]=Te[Oe]}catch{}return Ge}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=ve,this.hook("reading",ve),_},Me.prototype.defineClass=function(){return this.mapToClass(function(_){c(this,_)})},Me.prototype.add=function(_,R){var P=this,V=this.schema.primKey,Z=V.auto,Q=V.keyPath,de=_;return Q&&Z&&(de=Yn(Q)(_)),this._trans("readwrite",function(ve){return P.core.mutate({trans:ve,type:"add",keys:R!=null?[R]:null,values:[de]})}).then(function(ve){return ve.numFailures?Ct.reject(ve.failures[0]):ve.lastResult}).then(function(ve){if(Q)try{k(_,Q,ve)}catch{}return ve})},Me.prototype.upsert=function(_,R){var P=this,V=this.schema.primKey.keyPath;return this._trans("readwrite",function(Z){return P.core.get({trans:Z,key:_}).then(function(Q){var de=Q??{};return ye(de,R),V&&k(de,V,_),P.core.mutate({trans:Z,type:"put",values:[de],keys:[_],upsert:!0,updates:{keys:[_],changeSpecs:[R]}}).then(function(ve){return ve.numFailures?Ct.reject(ve.failures[0]):!!Q})})})},Me.prototype.update=function(_,R){return typeof _!="object"||l(_)?this.where(":id").equals(_).modify(R):(_=N(_,this.schema.primKey.keyPath),_===void 0?vt(new ue.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(_).modify(R))},Me.prototype.put=function(_,R){var P=this,V=this.schema.primKey,Z=V.auto,Q=V.keyPath,de=_;return Q&&Z&&(de=Yn(Q)(_)),this._trans("readwrite",function(ve){return P.core.mutate({trans:ve,type:"put",values:[de],keys:R!=null?[R]:null})}).then(function(ve){return ve.numFailures?Ct.reject(ve.failures[0]):ve.lastResult}).then(function(ve){if(Q)try{k(_,Q,ve)}catch{}return ve})},Me.prototype.delete=function(_){var R=this;return this._trans("readwrite",function(P){return R.core.mutate({trans:P,type:"delete",keys:[_]}).then(function(V){return jt(R,[_],V)}).then(function(V){return V.numFailures?Ct.reject(V.failures[0]):void 0})})},Me.prototype.clear=function(){var _=this;return this._trans("readwrite",function(R){return _.core.mutate({trans:R,type:"deleteRange",range:vr}).then(function(P){return jt(_,null,P)})}).then(function(R){return R.numFailures?Ct.reject(R.failures[0]):void 0})},Me.prototype.bulkGet=function(_){var R=this;return this._trans("readonly",function(P){return R.core.getMany({keys:_,trans:P}).then(function(V){return V.map(function(Z){return R.hook.reading.fire(Z)})})})},Me.prototype.bulkAdd=function(_,R,P){var V=this,Z=Array.isArray(R)?R:void 0,Q=(P=P||(Z?void 0:R))?P.allKeys:void 0;return this._trans("readwrite",function(de){var Oe=V.schema.primKey,ve=Oe.auto,Oe=Oe.keyPath;if(Oe&&Z)throw new ue.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(Z&&Z.length!==_.length)throw new ue.InvalidArgument("Arguments objects and keys must have the same length");var Te=_.length,Oe=Oe&&ve?_.map(Yn(Oe)):_;return V.core.mutate({trans:de,type:"add",keys:Z,values:Oe,wantResults:Q}).then(function(ze){var xe=ze.numFailures,Xe=ze.results,Pe=ze.lastResult,ze=ze.failures;if(xe===0)return Q?Xe:Pe;throw new $("".concat(V.name,".bulkAdd(): ").concat(xe," of ").concat(Te," operations failed"),ze)})})},Me.prototype.bulkPut=function(_,R,P){var V=this,Z=Array.isArray(R)?R:void 0,Q=(P=P||(Z?void 0:R))?P.allKeys:void 0;return this._trans("readwrite",function(de){var Oe=V.schema.primKey,ve=Oe.auto,Oe=Oe.keyPath;if(Oe&&Z)throw new ue.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(Z&&Z.length!==_.length)throw new ue.InvalidArgument("Arguments objects and keys must have the same length");var Te=_.length,Oe=Oe&&ve?_.map(Yn(Oe)):_;return V.core.mutate({trans:de,type:"put",keys:Z,values:Oe,wantResults:Q}).then(function(ze){var xe=ze.numFailures,Xe=ze.results,Pe=ze.lastResult,ze=ze.failures;if(xe===0)return Q?Xe:Pe;throw new $("".concat(V.name,".bulkPut(): ").concat(xe," of ").concat(Te," operations failed"),ze)})})},Me.prototype.bulkUpdate=function(_){var R=this,P=this.core,V=_.map(function(de){return de.key}),Z=_.map(function(de){return de.changes}),Q=[];return this._trans("readwrite",function(de){return P.getMany({trans:de,keys:V,cache:"clone"}).then(function(ve){var Te=[],Oe=[];_.forEach(function(xe,Xe){var Pe=xe.key,ze=xe.changes,He=ve[Xe];if(He){for(var Ye=0,tt=Object.keys(ze);Ye<tt.length;Ye++){var ct=tt[Ye],yt=ze[ct];
vendor: 7,008 bytes, line 1189
1189if(ct===R.schema.primKey.keyPath){if(Hn(yt,Pe)!==0)throw new ue.Constraint("Cannot update primary key in bulkUpdate()")}else k(He,ct,yt)}Q.push(Xe),Te.push(Pe),Oe.push(He)}});var Ge=Te.length;return P.mutate({trans:de,type:"put",keys:Te,values:Oe,updates:{keys:V,changeSpecs:Z}}).then(function(xe){var Xe=xe.numFailures,Pe=xe.failures;if(Xe===0)return Ge;for(var ze=0,He=Object.keys(Pe);ze<He.length;ze++){var Ye,tt=He[ze],ct=Q[Number(tt)];ct!=null&&(Ye=Pe[tt],delete Pe[tt],Pe[ct]=Ye)}throw new $("".concat(R.name,".bulkUpdate(): ").concat(Xe," of ").concat(Ge," operations failed"),Pe)})})})},Me.prototype.bulkDelete=function(_){var R=this,P=_.length;return this._trans("readwrite",function(V){return R.core.mutate({trans:V,type:"delete",keys:_}).then(function(Z){return jt(R,_,Z)})}).then(function(de){var Z=de.numFailures,Q=de.lastResult,de=de.failures;if(Z===0)return Q;throw new $("".concat(R.name,".bulkDelete(): ").concat(Z," of ").concat(P," operations failed"),de)})},Me);function Me(){}function Ve(_){function R(de,ve){if(ve){for(var Te=arguments.length,Oe=new Array(Te-1);--Te;)Oe[Te-1]=arguments[Te];return P[de].subscribe.apply(null,Oe),_}if(typeof de=="string")return P[de]}var P={};R.addEventType=Q;for(var V=1,Z=arguments.length;V<Z;++V)Q(arguments[V]);return R;function Q(de,ve,Te){if(typeof de!="object"){var Oe;ve=ve||q;var Ge={subscribers:[],fire:Te=Te||he,subscribe:function(xe){Ge.subscribers.indexOf(xe)===-1&&(Ge.subscribers.push(xe),Ge.fire=ve(Ge.fire,xe))},unsubscribe:function(xe){Ge.subscribers=Ge.subscribers.filter(function(Xe){return Xe!==xe}),Ge.fire=Ge.subscribers.reduce(ve,Te)}};return P[de]=R[de]=Ge}i(Oe=de).forEach(function(xe){var Xe=Oe[xe];if(l(Xe))Q(xe,Oe[xe][0],Oe[xe][1]);else{if(Xe!=="asap")throw new ue.InvalidArgument("Invalid event config");var Pe=Q(xe,_e,function(){for(var ze=arguments.length,He=new Array(ze);ze--;)He[ze]=arguments[ze];Pe.subscribers.forEach(function(Ye){S(function(){Ye.apply(null,He)})})})}})}}function Je(_,R){return v(R).from({prototype:_}),R}function bt(_,R){return!(_.filter||_.algorithm||_.or)&&(R?_.justLimit:!_.replayFilter)}function $e(_,R){_.filter=ln(_.filter,R)}function dt(_,R,P){var V=_.replayFilter;_.replayFilter=V?function(){return ln(V(),R())}:R,_.justLimit=P&&!V}function Rt(_,R){if(_.isPrimKey)return R.primaryKey;var P=R.getIndexByKeyPath(_.index);if(!P)throw new ue.Schema("KeyPath "+_.index+" on object store "+R.name+" is not indexed");return P}function Vt(_,R,P){var V=Rt(_,R.schema);return R.openCursor({trans:P,values:!_.keysOnly,reverse:_.dir==="prev",unique:!!_.unique,query:{index:V,range:_.range}})}function Wt(_,R,P,V){var Z=_.replayFilter?ln(_.filter,_.replayFilter()):_.filter;if(_.or){var Q={},de=function(ve,Te,Oe){var Ge,xe;Z&&!Z(Te,Oe,function(Xe){return Te.stop(Xe)},function(Xe){return Te.fail(Xe)})||((xe=""+(Ge=Te.primaryKey))=="[object ArrayBuffer]"&&(xe=""+new Uint8Array(Ge)),f(Q,xe)||(Q[xe]=!0,R(ve,Te,Oe)))};return Promise.all([_.or._iterate(de,P),On(Vt(_,V,P),_.algorithm,de,!_.keysOnly&&_.valueMapper)])}return On(Vt(_,V,P),ln(_.algorithm,Z),R,!_.keysOnly&&_.valueMapper)}function On(_,R,P,V){var Z=Fe(V?function(Q,de,ve){return P(V(Q),de,ve)}:P);return _.then(function(Q){if(Q)return Q.start(function(){var de=function(){return Q.continue()};R&&!R(Q,function(ve){return de=ve},function(ve){Q.stop(ve),de=he},function(ve){Q.fail(ve),de=he})||Z(Q.value,Q,function(ve){return de=ve}),de()})})}var Nn=(tn.prototype._read=function(_,R){var P=this._ctx;return P.error?P.table._trans(null,vt.bind(null,P.error)):P.table._trans("readonly",_).then(R)},tn.prototype._write=function(_){var R=this._ctx;return R.error?R.table._trans(null,vt.bind(null,R.error)):R.table._trans("readwrite",_,"locked")},tn.prototype._addAlgorithm=function(_){var R=this._ctx;R.algorithm=ln(R.algorithm,_)},tn.prototype._iterate=function(_,R){return Wt(this._ctx,_,R,this._ctx.table.core)},tn.prototype.clone=function(_){var R=Object.create(this.constructor.prototype),P=Object.create(this._ctx);return _&&c(P,_),R._ctx=P,R},tn.prototype.raw=function(){return this._ctx.valueMapper=null,this},tn.prototype.each=function(_){var R=this._ctx;return this._read(function(P){return Wt(R,_,P,R.table.core)})},tn.prototype.count=function(_){var R=this;return this._read(function(P){var V=R._ctx,Z=V.table.core;if(bt(V,!0))return Z.count({trans:P,query:{index:Rt(V,Z.schema),range:V.range}}).then(function(de){return Math.min(de,V.limit)});var Q=0;return Wt(V,function(){return++Q,!1},P,Z).then(function(){return Q})}).then(_)},tn.prototype.sortBy=function(_,R){var P=_.split(".").reverse(),V=P[0],Z=P.length-1;function Q(Te,Oe){return Oe?Q(Te[P[Oe]],Oe-1):Te[V]}var de=this._ctx.dir==="next"?1:-1;function ve(Te,Oe){return Hn(Q(Te,Z),Q(Oe,Z))*de}return this.toArray(function(Te){return Te.sort(ve)}).then(R)},tn.prototype.toArray=function(_){var R=this;return this._read(function(P){var V=R._ctx;if(V.dir==="next"&&bt(V,!0)&&0<V.limit){var Z=V.valueMapper,Q=Rt(V,V.table.core.schema);return V.table.core.query({trans:P,limit:V.limit,values:!0,query:{index:Q,range:V.range}}).then(function(ve){return ve=ve.result,Z?ve.map(Z):ve})}var de=[];return Wt(V,function(ve){return de.push(ve)},P,V.table.core).then(function(){return de})},_)},tn.prototype.offset=function(_){var R=this._ctx;return _<=0||(R.offset+=_,bt(R)?dt(R,function(){var P=_;return function(V,Z){return P===0||(P===1?--P:Z(function(){V.advance(P),P=0}),!1)}}):dt(R,function(){var P=_;return function(){return--P<0}})),this},tn.prototype.limit=function(_){return this._ctx.limit=Math.min(this._ctx.limit,_),dt(this._ctx,function(){var R=_;return function(P,V,Z){return--R<=0&&V(Z),0<=R}},!0),this},tn.prototype.until=function(_,R){return $e(this._ctx,function(P,V,Z){return!_(P.value)||(V(Z),R)}),this},tn.prototype.first=function(_){return this.limit(1).toArray(function(R){return R[0]}).then(_)},tn.prototype.last=function(_){return this.reverse().first(_)},tn.prototype.filter=function(_){var R;return $e(this._ctx,function(P){return _(P.value)}),(R=this._ctx).isMatch=ln(R.isMatch,_),this},tn.prototype.and=function(_){return this.filter(_)},tn.prototype.or=function(_){return new this.db.WhereClause(this._ctx.table,_,this)},tn.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},tn.prototype.desc=function(){return this.reverse()},tn.prototype.eachKey=function(_){var R=this._ctx;return R.keysOnly=!R.isMatch,this.each(function(P,V){_(V.key,V)})},tn.prototype.eachUniqueKey=function(_){return this._ctx.unique="unique",this.eachKey(_)},tn.prototype.eachPrimaryKey=function(_){var R=this._ctx;return R.keysOnly=!R.isMatch,this.each(function(P,V){_(V.primaryKey,V)})},tn.prototype.keys=function(_){var R=this._ctx;R.keysOnly=!R.isMatch;var P=[];return this.each(function(V,Z){P.push(Z.key)}).then(function(){return P}).then(_)},tn.prototype.primaryKeys=function(_){var R=this._ctx;if(R.dir==="next"&&bt(R,!0)&&0<R.limit)return this._read(function(V){var Z=Rt
vendor: 16,718 bytes, line 1189
1189(R,R.table.core.schema);return R.table.core.query({trans:V,values:!1,limit:R.limit,query:{index:Z,range:R.range}})}).then(function(V){return V.result}).then(_);R.keysOnly=!R.isMatch;var P=[];return this.each(function(V,Z){P.push(Z.primaryKey)}).then(function(){return P}).then(_)},tn.prototype.uniqueKeys=function(_){return this._ctx.unique="unique",this.keys(_)},tn.prototype.firstKey=function(_){return this.limit(1).keys(function(R){return R[0]}).then(_)},tn.prototype.lastKey=function(_){return this.reverse().firstKey(_)},tn.prototype.distinct=function(){var _=this._ctx,_=_.index&&_.table.schema.idxByName[_.index];if(!_||!_.multi)return this;var R={};return $e(this._ctx,function(Z){var V=Z.primaryKey.toString(),Z=f(R,V);return R[V]=!0,!Z}),this},tn.prototype.modify=function(_){var R=this,P=this._ctx;return this._write(function(V){var Z=typeof _=="function"?_:function(He){return ye(He,_)},Q=P.table.core,Oe=Q.schema.primaryKey,de=Oe.outbound,ve=Oe.extractKey,Te=200,Oe=R.db._options.modifyChunkSize;Oe&&(Te=typeof Oe=="object"?Oe[Q.name]||Oe["*"]||200:Oe);function Ge(He,ct){var tt=ct.failures,ct=ct.numFailures;Xe+=He-ct;for(var yt=0,Tt=i(tt);yt<Tt.length;yt++){var rn=Tt[yt];xe.push(tt[rn])}}var xe=[],Xe=0,Pe=[],ze=_===br;return R.clone().primaryKeys().then(function(He){function Ye(ct){var yt=Math.min(Te,He.length-ct),Tt=He.slice(ct,ct+yt);return(ze?Promise.resolve([]):Q.getMany({trans:V,keys:Tt,cache:"immutable"})).then(function(rn){var xn=[],Xt=[],un=de?[]:null,kn=ze?Tt:[];if(!ze)for(var gn=0;gn<yt;++gn){var Ln=rn[gn],Mr={value:L(Ln),primKey:He[ct+gn]};Z.call(Mr,Mr.value,Mr)!==!1&&(Mr.value==null?kn.push(He[ct+gn]):de||Hn(ve(Ln),ve(Mr.value))===0?(Xt.push(Mr.value),de&&un.push(He[ct+gn])):(kn.push(He[ct+gn]),xn.push(Mr.value)))}return Promise.resolve(0<xn.length&&Q.mutate({trans:V,type:"add",values:xn}).then(function(zr){for(var Gr in zr.failures)kn.splice(parseInt(Gr),1);Ge(xn.length,zr)})).then(function(){return(0<Xt.length||tt&&typeof _=="object")&&Q.mutate({trans:V,type:"put",keys:un,values:Xt,criteria:tt,changeSpec:typeof _!="function"&&_,isAdditionalChunk:0<ct}).then(function(zr){return Ge(Xt.length,zr)})}).then(function(){return(0<kn.length||tt&&ze)&&Q.mutate({trans:V,type:"delete",keys:kn,criteria:tt,isAdditionalChunk:0<ct}).then(function(zr){return jt(P.table,kn,zr)}).then(function(zr){return Ge(kn.length,zr)})}).then(function(){return He.length>ct+yt&&Ye(ct+Te)})})}var tt=bt(P)&&P.limit===1/0&&(typeof _!="function"||ze)&&{index:P.index,range:P.range};return Ye(0).then(function(){if(0<xe.length)throw new U("Error modifying one or more objects",xe,Xe,Pe);return He.length})})})},tn.prototype.delete=function(){var _=this._ctx,R=_.range;return!bt(_)||_.table.schema.yProps||!_.isPrimKey&&R.type!==3?this.modify(br):this._write(function(P){var V=_.table.core.schema.primaryKey,Z=R;return _.table.core.count({trans:P,query:{index:V,range:Z}}).then(function(Q){return _.table.core.mutate({trans:P,type:"deleteRange",range:Z}).then(function(Te){var ve=Te.failures,Te=Te.numFailures;if(Te)throw new U("Could not delete some values",Object.keys(ve).map(function(Oe){return ve[Oe]}),Q-Te);return Q-Te})})})},tn);function tn(){}var br=function(_,R){return R.value=null};function ca(_,R){return _<R?-1:_===R?0:1}function sa(_,R){return R<_?-1:_===R?0:1}function Gn(_,R,P){return _=_ instanceof Ca?new _.Collection(_):_,_._ctx.error=new(P||TypeError)(R),_}function wr(_){return new _.Collection(_,function(){return Wr("")}).limit(0)}function Er(_,R,P,V){var Z,Q,de,ve,Te,Oe,Ge,xe=P.length;if(!P.every(function(ze){return typeof ze=="string"}))return Gn(_,Ne);function Xe(ze){Z=ze==="next"?function(Ye){return Ye.toUpperCase()}:function(Ye){return Ye.toLowerCase()},Q=ze==="next"?function(Ye){return Ye.toLowerCase()}:function(Ye){return Ye.toUpperCase()},de=ze==="next"?ca:sa;var He=P.map(function(Ye){return{lower:Q(Ye),upper:Z(Ye)}}).sort(function(Ye,tt){return de(Ye.lower,tt.lower)});ve=He.map(function(Ye){return Ye.upper}),Te=He.map(function(Ye){return Ye.lower}),Ge=(Oe=ze)==="next"?"":V}Xe("next"),_=new _.Collection(_,function(){return Nr(ve[0],Te[xe-1]+V)}),_._ondirectionchange=function(ze){Xe(ze)};var Pe=0;return _._addAlgorithm(function(ze,He,Ye){var tt=ze.key;if(typeof tt!="string")return!1;var ct=Q(tt);if(R(ct,Te,Pe))return!0;for(var yt=null,Tt=Pe;Tt<xe;++Tt){var rn=function(xn,Xt,un,kn,gn,Ln){for(var Mr=Math.min(xn.length,kn.length),zr=-1,Gr=0;Gr<Mr;++Gr){var To=Xt[Gr];if(To!==kn[Gr])return gn(xn[Gr],un[Gr])<0?xn.substr(0,Gr)+un[Gr]+un.substr(Gr+1):gn(xn[Gr],kn[Gr])<0?xn.substr(0,Gr)+kn[Gr]+un.substr(Gr+1):0<=zr?xn.substr(0,zr)+Xt[zr]+un.substr(zr+1):null;gn(xn[Gr],To)<0&&(zr=Gr)}return Mr<kn.length&&Ln==="next"?xn+un.substr(xn.length):Mr<xn.length&&Ln==="prev"?xn.substr(0,un.length):zr<0?null:xn.substr(0,zr)+kn[zr]+un.substr(zr+1)}(tt,ct,ve[Tt],Te[Tt],de,Oe);rn===null&&yt===null?Pe=Tt+1:(yt===null||0<de(yt,rn))&&(yt=rn)}return He(yt!==null?function(){ze.continue(yt+Ge)}:Ye),!1}),_}function Nr(_,R,P,V){return{type:2,lower:_,upper:R,lowerOpen:P,upperOpen:V}}function Wr(_){return{type:1,lower:_,upper:_}}var Ca=(Object.defineProperty(Pr.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Pr.prototype.between=function(_,R,P,V){P=P!==!1,V=V===!0;try{return 0<this._cmp(_,R)||this._cmp(_,R)===0&&(P||V)&&(!P||!V)?wr(this):new this.Collection(this,function(){return Nr(_,R,!P,!V)})}catch{return Gn(this,fn)}},Pr.prototype.equals=function(_){return _==null?Gn(this,fn):new this.Collection(this,function(){return Wr(_)})},Pr.prototype.above=function(_){return _==null?Gn(this,fn):new this.Collection(this,function(){return Nr(_,void 0,!0)})},Pr.prototype.aboveOrEqual=function(_){return _==null?Gn(this,fn):new this.Collection(this,function(){return Nr(_,void 0,!1)})},Pr.prototype.below=function(_){return _==null?Gn(this,fn):new this.Collection(this,function(){return Nr(void 0,_,!1,!0)})},Pr.prototype.belowOrEqual=function(_){return _==null?Gn(this,fn):new this.Collection(this,function(){return Nr(void 0,_)})},Pr.prototype.startsWith=function(_){return typeof _!="string"?Gn(this,Ne):this.between(_,_+It,!0,!0)},Pr.prototype.startsWithIgnoreCase=function(_){return _===""?this.startsWith(_):Er(this,function(R,P){return R.indexOf(P[0])===0},[_],It)},Pr.prototype.equalsIgnoreCase=function(_){return Er(this,function(R,P){return R===P[0]},[_],"")},Pr.prototype.anyOfIgnoreCase=function(){var _=ee.apply(K,arguments);return _.length===0?wr(this):Er(this,function(R,P){return P.indexOf(R)!==-1},_,"")},Pr.prototype.startsWithAnyOfIgnoreCase=function(){var _=ee.apply(K,arguments);return _.length===0?wr(this):Er(this,function(R,P){return P.some(function(V){return R.indexOf(V)===0})},_,It)},Pr.prototype.anyOf=function(){var _=this,R=ee.apply(K,arguments),P=this._cmp;try{R.sort(P)}catch{return Gn(this,fn)}if(R.length===0)return wr(this);var V=new this.Collection(this,function(){return Nr(R[0],R[R.length-1])});V._ondirectionchange=function(Q){P=Q==="next"?_._ascending:_._descending,R.sort(P)};var Z=0;return V._addAlgorithm(function(Q,de,ve){for(var Te=Q.key;0<P(Te,R[Z]);)if(++Z===R.length)return de(ve),!1;return P(Te,R[Z])===0||(de(function(){Q.continue(R[Z])}),!1)}),V},Pr.prototype.notEqual=function(_){return this.inAnyRange([[-1/0,_],[_,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Pr.prototype.noneOf=function(){var _=ee.apply(K,arguments);if(_.length===0)return new this.Collection(this);try{_.sort(this._ascending)}catch{return Gn(this,fn)}var R=_.reduce(function(P,V){return P?P.concat([[P[P.length-1][1],V]]):[[-1/0,V]]},null);return R.push([_[_.length-1],this.db._maxKey]),this.inAnyRange(R,{includeLowers:!1,includeUppers:!1})},Pr.prototype.inAnyRange=function(tt,R){var P=this,V=this._cmp,Z=this._ascending,Q=this._descending,de=this._min,ve=this._max;if(tt.length===0)return wr(this);if(!tt.every(function(ct){return ct[0]!==void 0&&ct[1]!==void 0&&Z(ct[0],ct[1])<=0}))return Gn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ue.InvalidArgument);var Te=!R||R.includeLowers!==!1,Oe=R&&R.includeUppers===!0,Ge,xe=Z;function Xe(ct,yt){return xe(ct[0],yt[0])}try{(Ge=tt.reduce(function(ct,yt){for(var Tt=0,rn=ct.length;Tt<rn;++Tt){var xn=ct[Tt];if(V(yt[0],xn[1])<0&&0<V(yt[1],xn[0])){xn[0]=de(xn[0],yt[0]),xn[1]=ve(xn[1],yt[1]);break}}return Tt===rn&&ct.push(yt),ct},[])).sort(Xe)}catch{return Gn(this,fn)}var Pe=0,ze=Oe?function(ct){return 0<Z(ct,Ge[Pe][1])}:function(ct){return 0<=Z(ct,Ge[Pe][1])},He=Te?function(ct){return 0<Q(ct,Ge[Pe][0])}:function(ct){return 0<=Q(ct,Ge[Pe][0])},Ye=ze,tt=new this.Collection(this,function(){return Nr(Ge[0][0],Ge[Ge.length-1][1],!Te,!Oe)});return tt._ondirectionchange=function(ct){xe=ct==="next"?(Ye=ze,Z):(Ye=He,Q),Ge.sort(Xe)},tt._addAlgorithm(function(ct,yt,Tt){for(var rn,xn=ct.key;Ye(xn);)if(++Pe===Ge.length)return yt(Tt),!1;return!ze(rn=xn)&&!He(rn)||(P._cmp(xn,Ge[Pe][1])===0||P._cmp(xn,Ge[Pe][0])===0||yt(function(){xe===Z?ct.continue(Ge[Pe][0]):ct.continue(Ge[Pe][1])}),!1)}),tt},Pr.prototype.startsWithAnyOf=function(){var _=ee.apply(K,arguments);return _.every(function(R){return typeof R=="string"})?_.length===0?wr(this):this.inAnyRange(_.map(function(R){return[R,R+It]})):Gn(this,"startsWithAnyOf() only works with strings")},Pr);function Pr(){}function ge(_){return Fe(function(R){return at(R),_(R.target.error),!1})}function at(_){_.stopPropagation&&_.stopPropagation(),_.preventDefault&&_.preventDefault()}var zt="storagemutated",cn="x-storagemutated-1",Mt=Ve(null,zt),kr=(Dr.prototype._lock=function(){return x(!xt.global),++this._reculock,this._reculock!==1||xt.global||(xt.lockOwnerFor=this),this},Dr.prototype._unlock=function(){if(x(!xt.global),--this._reculock==0)for(xt.global||(xt.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var _=this._blockedFuncs.shift();try{Be(_[1],_[0])}catch{}}return this},Dr.prototype._locked=function(){return this._reculock&&xt.lockOwnerFor!==this},Dr.prototype.create=function(_){var R=this;if(!this.mode)return this;var P=this.db.idbdb,V=this.db._state.dbOpenError;if(x(!this.idbtrans),!_&&!P)switch(V&&V.name){case"DatabaseClosedError":throw new ue.DatabaseClosed(V);case"MissingAPIError":throw new ue.MissingAPI(V.message,V);default:throw new ue.OpenFailed(V)}if(!this.active)throw new ue.TransactionInactive;return x(this._completion._state===null),(_=this.idbtrans=_||(this.db.core||P).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Fe(function(Z){at(Z),R._reject(_.error)}),_.onabort=Fe(function(Z){at(Z),R.active&&R._reject(new ue.Abort(_.error)),R.active=!1,R.on("abort").fire(Z)}),_.oncomplete=Fe(function(){R.active=!1,R._resolve(),"mutatedParts"in _&&Mt.storagemutated.fire(_.mutatedParts)}),this},Dr.prototype._promise=function(_,R,P){var V=this;if(_==="readwrite"&&this.mode!=="readwrite")return vt(new ue.ReadOnly("Transaction is readonly"));if(!this.active)return vt(new ue.TransactionInactive);if(this._locked())return new Ct(function(Q,de){V._blockedFuncs.push([function(){V._promise(_,R,P).then(Q,de)},xt])});if(P)return _t(function(){var Q=new Ct(function(de,ve){V._lock();var Te=R(de,ve,V);Te&&Te.then&&Te.then(de,ve)});return Q.finally(function(){return V._unlock()}),Q._lib=!0,Q});var Z=new Ct(function(Q,de){var ve=R(Q,de,V);ve&&ve.then&&ve.then(Q,de)});return Z._lib=!0,Z},Dr.prototype._root=function(){return this.parent?this.parent._root():this},Dr.prototype.waitFor=function(_){var R,P=this._root(),V=Ct.resolve(_);P._waitingFor?P._waitingFor=P._waitingFor.then(function(){return V}):(P._waitingFor=V,P._waitingQueue=[],R=P.idbtrans.objectStore(P.storeNames[0]),function Q(){for(++P._spinCount;P._waitingQueue.length;)P._waitingQueue.shift()();P._waitingFor&&(R.get(-1/0).onsuccess=Q)}());var Z=P._waitingFor;return new Ct(function(Q,de){V.then(function(ve){return P._waitingQueue.push(Fe(Q.bind(null,ve)))},function(ve){return P._waitingQueue.push(Fe(de.bind(null,ve)))}).finally(function(){P._waitingFor===Z&&(P._waitingFor=null)})})},Dr.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ue.Abort))},Dr.prototype.table=function(_){var R=this._memoizedTables||(this._memoizedTables={});if(f(R,_))return R[_];var P=this.schema[_];if(!P)throw new ue.NotFound("Table "+_+" not part of transaction");return P=new this.db.Table(_,P,this),P.core=this.db.core.table(_),R[_]=P},Dr);function Dr(){}function es(_,R,P,V,Z,Q,de,ve){return{name:_,keyPath:R,unique:P,multi:V,auto:Z,compound:Q,src:(P&&!de?"&":"")+(V?"*":"")+(Z?"++":"")+cl(R),type:ve}}function cl(_){return typeof _=="string"?_:_?"["+[].join.call(_,"+")+"]":""}function ko(_,R,P){return{name:_,primKey:R,indexes:P,mappedClass:null,idxByName:(V=function(Z){return[Z.name,Z]},P.reduce(function(Z,Q,de){return de=V(Q,de),de&&(Z[de[0]]=de[1]),Z},{}))};var V}var Ti=function(_){try{return _.only([[]]),Ti=function(){return[[]]},[[]]}catch{return Ti=function(){return It},It}};function So(_){return _==null?function(){}:typeof _=="string"?(R=_).split(".").length===1?function(P){return P[R]}:function(P){return N(P,R)}:function(P){return N(P,_)};var R}function Co(_){return[].slice.call(_)}var Bl=0;function Ai(_){return _==null?":id":typeof _=="string"?_:"[".concat(_.join("+"),"]")}function Ba(_,R,Te){function V(Ye){if(Ye.type===3)return null;if(Ye.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var Pe=Ye.lower,ze=Ye.upper,He=Ye.lowerOpen,Ye=Ye.upperOpen;return Pe===void 0?ze===void 0?null:R.upperBound(ze,!!Ye):ze===void 0?R.lowerBound(Pe,!!He):R.bound(Pe,ze,!!He,!!Ye)}function Z(Xe){var Pe,ze=Xe.name;return{name:ze,schema:Xe,mutate:function(He){var Ye=He.trans,tt=He.type,ct=He.keys,yt=He.values,Tt=He.range;return new Promise(function(rn,xn){rn=Fe(rn);var Xt=Ye.objectStore(ze),un=Xt.keyPath==null,kn=tt==="put"||tt==="add";if(!kn&&tt!=="delete"&&tt!=="deleteRange")throw new Error("Invalid operation type: "+tt);var gn,Ln=(ct||yt||{length:1}).length;if(ct&&yt&&ct.length!==yt.length)throw new Error("Given keys array must have same length as given values array.");if(Ln===0)return rn({numFailures:0,failures:{},results:[],lastResult:void 0});function Mr(Ii){++To,at(Ii)}var zr=[],Gr=[],To=0;if(tt==="deleteRange"){if(Tt.type===4)return rn({numFailures:To,failures:Gr,results:[],lastResult:void 0});Tt.type===3?zr.push(gn=Xt.clear()):zr.push(gn=Xt.delete(V(Tt)))}else{var un=kn?un?[yt,ct]:[yt,null]:[ct,null],Rr=un[0],di=un[1];if(kn)for(var fi=0;fi<Ln;++fi)zr.push(gn=di&&di[fi]!==void 0?Xt[tt](Rr[fi],di[fi]):Xt[tt](Rr[fi])),gn.onerror=Mr;else for(fi=0;fi<Ln;++fi)zr.push(gn=Xt[tt](Rr[fi])),gn.onerror=Mr}function Vb(Ii){Ii=Ii.target.result,zr.forEach(function(pf,eC){return pf.error!=null&&(Gr[eC]=pf.error)}),rn({numFailures:To,failures:Gr,results:tt==="delete"?ct:zr.map(function(pf){return pf.result}),lastResult:Ii})}gn.onerror=function(Ii){Mr(Ii),Vb(Ii)},gn.onsuccess=Vb})},getMany:function(He){var Ye=He.trans,tt=He.keys;return new Promise(function(ct,yt){ct=Fe(ct);for(var Tt,rn=Ye.objectStore(ze),xn=tt.length,Xt=new Array(xn),un=0,kn=0,gn=function(zr){zr=zr.target,Xt[zr._pos]=zr.result,++kn===un&&ct(Xt)},Ln=ge(yt),Mr=0;Mr<xn;++Mr)tt[Mr]!=null&&((Tt=rn.get(tt[Mr]))._pos=Mr,Tt.onsuccess=gn,Tt.onerror=Ln,++un);un===0&&ct(Xt)})},get:function(He){var Ye=He.trans,tt=He.key;return new Promise(function(ct,yt){ct=Fe(ct);var Tt=Ye.objectStore(ze).get(tt);Tt.onsuccess=function(rn){return ct(rn.target.result)},Tt.onerror=ge(yt)})},query:(Pe=Oe,function(He){return new Promise(function(Ye,tt){Ye=Fe(Ye);var ct,yt,Tt,un=He.trans,rn=He.values,xn=He.limit,gn=He.query,Xt=xn===1/0?void 0:xn,kn=gn.index,gn=gn.range,un=un.objectStore(ze),kn=kn.isPrimaryKey?un:un.index(kn.name),gn=V(gn);if(xn===0)return Ye({result:[]});Pe?((Xt=rn?kn.getAll(gn,Xt):kn.getAllKeys(gn,Xt)).onsuccess=function(Ln){return Ye({result:Ln.target.result})},Xt.onerror=ge(tt)):(ct=0,yt=!rn&&"openKeyCursor"in kn?kn.openKeyCursor(gn):kn.openCursor(gn),Tt=[],yt.onsuccess=function(Ln){var Mr=yt.result;return Mr?(Tt.push(rn?Mr.value:Mr.primaryKey),++ct===xn?Ye({result:Tt}):void Mr.continue()):Ye({result:Tt})},yt.onerror=ge(tt))})}),openCursor:function(He){var Ye=He.trans,tt=He.values,ct=He.query,yt=He.reverse,Tt=He.unique;return new Promise(function(rn,xn){rn=Fe(rn);var kn=ct.index,Xt=ct.range,un=Ye.objectStore(ze),un=kn.isPrimaryKey?un:un.index(kn.name),kn=yt?Tt?"prevunique":"prev":Tt?"nextunique":"next",gn=!tt&&"openKeyCursor"in un?un.openKeyCursor(V(Xt),kn):un.openCursor(V(Xt),kn);gn.onerror=ge(xn),gn.onsuccess=Fe(function(Ln){var Mr,zr,Gr,To,Rr=gn.result;Rr?(Rr.___id=++Bl,Rr.done=!1,Mr=Rr.continue.bind(Rr),zr=(zr=Rr.continuePrimaryKey)&&zr.bind(Rr),Gr=Rr.advance.b
vendor: 4,275 bytes, line 1189
1189ind(Rr),To=function(){throw new Error("Cursor not stopped")},Rr.trans=Ye,Rr.stop=Rr.continue=Rr.continuePrimaryKey=Rr.advance=function(){throw new Error("Cursor not started")},Rr.fail=Fe(xn),Rr.next=function(){var di=this,fi=1;return this.start(function(){return fi--?di.continue():di.stop()}).then(function(){return di})},Rr.start=function(di){function fi(){if(gn.result)try{di()}catch(Ii){Rr.fail(Ii)}else Rr.done=!0,Rr.start=function(){throw new Error("Cursor behind last entry")},Rr.stop()}var Vb=new Promise(function(Ii,pf){Ii=Fe(Ii),gn.onerror=ge(pf),Rr.fail=pf,Rr.stop=function(eC){Rr.stop=Rr.continue=Rr.continuePrimaryKey=Rr.advance=To,Ii(eC)}});return gn.onsuccess=Fe(function(Ii){gn.onsuccess=fi,fi()}),Rr.continue=Mr,Rr.continuePrimaryKey=zr,Rr.advance=Gr,fi(),Vb},rn(Rr)):rn(null)},xn)})},count:function(He){var Ye=He.query,tt=He.trans,ct=Ye.index,yt=Ye.range;return new Promise(function(Tt,rn){var xn=tt.objectStore(ze),Xt=ct.isPrimaryKey?xn:xn.index(ct.name),xn=V(yt),Xt=xn?Xt.count(xn):Xt.count();Xt.onsuccess=Fe(function(un){return Tt(un.target.result)}),Xt.onerror=ge(rn)})}}}var Q,de,ve,Ge=(de=Te,ve=Co((Q=_).objectStoreNames),{schema:{name:Q.name,tables:ve.map(function(Xe){return de.objectStore(Xe)}).map(function(Xe){var Pe=Xe.keyPath,Ye=Xe.autoIncrement,ze=l(Pe),He={},Ye={name:Xe.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:Pe==null,compound:ze,keyPath:Pe,autoIncrement:Ye,unique:!0,extractKey:So(Pe)},indexes:Co(Xe.indexNames).map(function(tt){return Xe.index(tt)}).map(function(Tt){var ct=Tt.name,yt=Tt.unique,rn=Tt.multiEntry,Tt=Tt.keyPath,rn={name:ct,compound:l(Tt),keyPath:Tt,unique:yt,multiEntry:rn,extractKey:So(Tt)};return He[Ai(Tt)]=rn}),getIndexByKeyPath:function(tt){return He[Ai(tt)]}};return He[":id"]=Ye.primaryKey,Pe!=null&&(He[Ai(Pe)]=Ye.primaryKey),Ye})},hasGetAll:0<ve.length&&"getAll"in de.objectStore(ve[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),Te=Ge.schema,Oe=Ge.hasGetAll,Ge=Te.tables.map(Z),xe={};return Ge.forEach(function(Xe){return xe[Xe.name]=Xe}),{stack:"dbcore",transaction:_.transaction.bind(_),table:function(Xe){if(!xe[Xe])throw new Error("Table '".concat(Xe,"' not found"));return xe[Xe]},MIN_KEY:-1/0,MAX_KEY:Ti(R),schema:Te}}function Is(_,R,P,V){var Z=P.IDBKeyRange;return P.indexedDB,{dbcore:(V=Ba(R,Z,V),_.dbcore.reduce(function(Q,de){return de=de.create,r(r({},Q),de(Q))},V))}}function js(_,V){var P=V.db,V=Is(_._middlewares,P,_._deps,V);_.core=V.dbcore,_.tables.forEach(function(Z){var Q=Z.name;_.core.schema.tables.some(function(de){return de.name===Q})&&(Z.core=_.core.table(Q),_[Q]instanceof _.Table&&(_[Q].core=Z.core))})}function ui(_,R,P,V){P.forEach(function(Z){var Q=V[Z];R.forEach(function(de){var ve=function Te(Oe,Ge){return y(Oe,Ge)||(Oe=u(Oe))&&Te(Oe,Ge)}(de,Z);(!ve||"value"in ve&&ve.value===void 0)&&(de===_.Transaction.prototype||de instanceof _.Transaction?g(de,Z,{get:function(){return this.table(Z)},set:function(Te){h(this,Z,{value:Te,writable:!0,configurable:!0,enumerable:!0})}}):de[Z]=new _.Table(Z,Q))})})}function no(_,R){R.forEach(function(P){for(var V in P)P[V]instanceof _.Table&&delete P[V]})}function mr(_,R){return _._cfg.version-R._cfg.version}function ja(_,R,P,V){var Z=_._dbSchema;P.objectStoreNames.contains("$meta")&&!Z.$meta&&(Z.$meta=ko("$meta",Sn("")[0],[]),_._storeNames.push("$meta"));var Q=_._createTransaction("readwrite",_._storeNames,Z);Q.create(P),Q._completion.catch(V);var de=Q._reject.bind(Q),ve=xt.transless||xt;_t(function(){return xt.trans=Q,xt.transless=ve,R!==0?(js(_,P),Oe=R,((Te=Q).storeNames.includes("$meta")?Te.table("$meta").get("version").then(function(Ge){return Ge??Oe}):Ct.resolve(Oe)).then(function(Ge){return Xe=Ge,Pe=Q,ze=P,He=[],Ge=(xe=_)._versions,Ye=xe._dbSchema=mn(0,xe.idbdb,ze),(Ge=Ge.filter(function(tt){return tt._cfg.version>=Xe})).length!==0?(Ge.forEach(function(tt){He.push(function(){var ct=Ye,yt=tt._cfg.dbschema;nn(xe,ct,ze),nn(xe,yt,ze),Ye=xe._dbSchema=yt;var Tt=No(ct,yt);Tt.add.forEach(function(kn){Ro(ze,kn[0],kn[1].primKey,kn[1].indexes)}),Tt.change.forEach(function(kn){if(kn.recreate)throw new ue.Upgrade("Not yet support for changing primary key");var gn=ze.objectStore(kn.name);
1189kn.add.forEach(function(Ln){return $t(gn,Ln)}),kn.change.forEach(function(Ln){gn.deleteIndex(Ln.name),$t(gn,Ln)}),kn.del.forEach(function(Ln){return gn.deleteIndex(Ln)})});var rn=tt._cfg.contentUpgrade;if(rn&&tt._cfg.version>Xe){js(xe,ze),Pe._memoizedTables={};var xn=C(yt);Tt.del.forEach(function(kn){xn[kn]=ct[kn]}),no(xe,[xe.Transaction.prototype]),ui(xe,[xe.Transaction.prototype],i(xn),xn),Pe.schema=xn;var Xt,un=oe(rn);return un&&vn(),Tt=Ct.follow(function(){var kn;(Xt=rn(Pe))&&un&&(kn=An.bind(null,null),Xt.then(kn,kn))}),Xt&&typeof Xt.then=="function"?Ct.resolve(Xt):Tt.then(function(){return Xt})}}),He.push(function(ct){var yt,Tt,rn=tt._cfg.dbschema;yt=rn,Tt=ct,[].slice.call(Tt.db.objectStoreNames).forEach(function(xn){return yt[xn]==null&&Tt.db.deleteObjectStore(xn)}),no(xe,[xe.Transaction.prototype]),ui(xe,[xe.Transaction.prototype],xe._storeNames,xe._dbSchema),Pe.schema=xe._dbSchema}),He.push(function(ct){xe.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(xe.idbdb.version/10)===tt._cfg.version?(xe.idbdb.deleteObjectStore("$meta"),delete xe._dbSchema.$meta,xe._storeNames=xe._storeNames.filter(function(yt){return yt!=="$meta"})):ct.objectStore("$meta").put(tt._cfg.version,"version"))})}),function tt(){return He.length?Ct.resolve(He.shift()(Pe.idbtrans)).then(tt):Ct.resolve()}().then(function(){Le(Ye,ze)})):Ct.resolve();var xe,Xe,Pe,ze,He,Ye}).catch(de)):(i(Z).forEach(function(Ge){Ro(P,Ge,Z[Ge].primKey,Z[Ge].indexes)}),js(_,P),void Ct.follow(function(){return _.on.populate.fire(Q)}).catch(de));var Te,Oe})}function _c(_,R){Le(_._dbSchema,R),R.db.version%10!=0||R.objectStoreNames.contains("$meta")||R.db.createObjectStore("$meta").add(Math.ceil(R.db.version/10-1),"version");var P=mn(0,_.idbdb,R);nn(_,_._dbSchema,R);for(var V=0,Z=No(P,_._dbSchema).change;V<Z.length;V++){var Q=function(de){if(de.change.length||de.recreate)return console.warn("Unable to patch indexes of table ".concat(de.name," because it has changes on the type of index or primary key.")),{value:void 0};var ve=R.objectStore(de.name);de.add.forEach(function(Te){X&&"Dexie upgrade patch: Creating missing index ".concat(de.name,".").concat(Te.src),$t(ve,Te)})}(Z[V]);if(typeof Q=="object")return Q.value}}function No(_,R){var P,V={del:[],add:[],change:[]};for(P in _)R[P]||V.del.push(P);for(P in R){var Z=_[P],Q=R[P];if(Z){var de={name:P,def:Q,recreate:!1,del:[],add:[],change:[]};if(""+(Z.primKey.keyPath||"")!=""+(Q.primKey.keyPath||"")||Z.primKey.auto!==Q.primKey.auto)de.recreate=!0,V.change.push(de);else{var ve=Z.idxByName,Te=Q.idxByName,Oe=void 0;for(Oe in ve)Te[Oe]||de.del.push(Oe);for(Oe in Te){var Ge=ve[Oe],xe=Te[Oe];Ge?Ge.src!==xe.src&&de.change.push(xe):de.add.push(xe)}(0<de.del.length||0<de.add.length||0<de.change.length)&&V.change.push(de)}}else V.add.push([P,Q])}return V}function Ro(_,R,P,V){var Z=_.db.createObjectStore(R,P.keyPath?{keyPath:P.keyPath,autoIncrement:P.auto}:{autoIncrement:P.auto});return V.forEach(function(Q){return $t(Z,Q)}),Z}function Le(_,R){i(_).forEach(function(P){R.db.objectStoreNames.contains(P)||Ro(R,P,_[P].primKey,_[P].indexes)})}function $t(_,R){_.createIndex(R.name,R.keyPath,{unique:R.unique,multiEntry:R.multi})}function mn(_,R,P){var V={};return E(R.objectStoreNames,0).forEach(function(Z){for(var Q=P.objectStore(Z),de=es(cl(Oe=Q.keyPath),Oe||"",!0,!1,!!Q.autoIncrement,Oe&&typeof Oe!="string",!0),ve=[],Te=0;Te<Q.indexNames.length;++Te){var Ge=Q.index(Q.indexNames[Te]),Oe=Ge.keyPath,Ge=es(Ge.name,Oe,!!Ge.unique,!!Ge.multiEntry,!1,Oe&&typeof Oe!="string",!1);ve.push(Ge)}V[Z]=ko(Z,de,ve)}),V}function nn(_,R,P){for(var V=P.db.objectStoreNames,Z=0;Z<V.length;++Z){var Q=V[Z],de=P.objectStore(Q);_._hasGetAll="getAll"in de;for(var ve=0;ve<de.indexNames.length;++ve){var Te=de.indexNames[ve],Oe=de.index(Te).keyPath,Ge=typeof Oe=="string"?Oe:"["+E(Oe).join("+")+"]";!R[Q]||(Oe=R[Q].idxByName[Ge])&&(Oe.name=Te,delete R[Q].idxByName[Ge],R[Q].idxByName[Te]=Oe)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(_._hasGetAll=!1)}function Sn(_){return _.split(",").map(function(R,P){var Q=R.split(":"),V=(Z=Q[1])===null||Z===void 0?void 0:Z.trim(),Z=(R=Q[0].trim()).replace(/([&*]|\+\+)/g,""),Q=/^\[/.test(Z)?Z.match(/^\[(.*)\]$/)[1].split("+"):Z;return es(Z,Q||null,/\&/.test(R),/\*/.test(R),/\+\+/.test(R),l(Q),P===0,V)})}var Lr=(hr.prototype._createTableSchema=ko,hr.prototype._parseIndexSyntax=Sn,hr.prototype._parseStoresSpec=function(_,R){var P=this;i(_).forEach(function(V){if(_[V]!==null){var Z=P._parseIndexSyntax(_[V]),Q=Z.shift();if(!Q)throw new ue.Schema("Invalid schema for table "+V+": "+_[V]);if(Q.unique=!0,Q.multi)throw new ue.Schema("Primary key cannot be multiEntry*");Z.forEach(function(de){if(de.auto)throw new ue.Schema("Only primary key can be marked as autoIncrement (++)");if(!de.keyPath)throw new ue.Schema("Index must have a name and cannot be an empty string")}),Z=P._createTableSchema(V,Q,Z),R[V]=Z}})},hr.prototype.stores=function(P){var R=this.db;this._cfg.storesSource=this._cfg.storesSource?c(this._cfg.storesSource,P):P;var P=R._versions,V={},Z={};return P.forEach(function(Q){c(V,Q._cfg.storesSource),Z=Q._cfg.dbschema={},Q._parseStoresSpec(V,Z)}),R._dbSchema=Z,no(R,[R._allTables,R,R.Transaction.prototype]),ui(R,[R._allTables,R,R.Transaction.prototype,this._cfg.tables],i(Z),Z),R._storeNames=i(Z),this},hr.prototype.upgrade=function(_){return this._cfg.contentUpgrade=te(this._cfg.contentUpgrade||he,_),this},hr);function hr(){}function Bn(_,R){var P=_._dbNamesDB;return P||(P=_._dbNamesDB=new mu(wt,{addons:[],indexedDB:_,IDBKeyRange:R})).version(1).stores({dbnames:"name"}),P.table("dbnames")}function Vr(_){return _&&typeof _.databases=="function"}
vendor: 4,751 bytes, line 1189
1189function Wa(_){return _t(function(){return xt.letThrough=!0,_()})}function ls(_){return!("from"in _)}var Sr=function(_,R){if(!this){var P=new Sr;return _&&"d"in _&&c(P,_),P}c(this,arguments.length?{d:1,from:_,to:1<arguments.length?R:_}:{d:0})};function ga(_,R,P){var V=Hn(R,P);if(!isNaN(V)){if(0<V)throw RangeError();if(ls(_))return c(_,{from:R,to:P,d:1});var Z=_.l,V=_.r;if(Hn(P,_.from)<0)return Z?ga(Z,R,P):_.l={from:R,to:P,d:1,l:null,r:null},Ga(_);if(0<Hn(R,_.to))return V?ga(V,R,P):_.r={from:R,to:P,d:1,l:null,r:null},Ga(_);Hn(R,_.from)<0&&(_.from=R,_.l=null,_.d=V?V.d+1:1),0<Hn(P,_.to)&&(_.to=P,_.r=null,_.d=_.l?_.l.d+1:1),P=!_.r,Z&&!_.l&&ro(_,Z),V&&P&&ro(_,V)}}function ro(_,R){ls(R)||function P(V,Te){var Q=Te.from,de=Te.to,ve=Te.l,Te=Te.r;ga(V,Q,de),ve&&P(V,ve),Te&&P(V,Te)}(_,R)}function jl(_,R){var P=Or(R),V=P.next();if(V.done)return!1;for(var Z=V.value,Q=Or(_),de=Q.next(Z.from),ve=de.value;!V.done&&!de.done;){if(Hn(ve.from,Z.to)<=0&&0<=Hn(ve.to,Z.from))return!0;Hn(Z.from,ve.from)<0?Z=(V=P.next(ve.from)).value:ve=(de=Q.next(Z.from)).value}return!1}function Or(_){var R=ls(_)?null:{s:0,n:_};return{next:function(P){for(var V=0<arguments.length;R;)switch(R.s){case 0:if(R.s=1,V)for(;R.n.l&&Hn(P,R.n.from)<0;)R={up:R,n:R.n.l,s:1};else for(;R.n.l;)R={up:R,n:R.n.l,s:1};case 1:if(R.s=2,!V||Hn(P,R.n.to)<=0)return{value:R.n,done:!1};case 2:if(R.n.r){R.s=3,R={up:R,n:R.n.r,s:0};continue}case 3:R=R.up}return{done:!0}}}}function Ga(_){var R,P,V=(((R=_.r)===null||R===void 0?void 0:R.d)||0)-(((P=_.l)===null||P===void 0?void 0:P.d)||0),Z=1<V?"r":V<-1?"l":"";Z&&(R=Z=="r"?"l":"r",P=r({},_),V=_[Z],_.from=V.from,_.to=V.to,_[Z]=V[Z],P[Z]=V[R],(_[R]=P).d=ao(P)),_.d=ao(_)}function ao(P){var R=P.r,P=P.l;return(R?P?Math.max(R.d,P.d):R.d:P?P.d:0)+1}function mf(_,R){return i(R).forEach(function(P){_[P]?ro(_[P],R[P]):_[P]=function V(Z){var Q,de,ve={};for(Q in Z)f(Z,Q)&&(de=Z[Q],ve[Q]=!de||typeof de!="object"||T.has(de.constructor)?de:V(de));return ve}(R[P])}),_}function Ym(_,R){return _.all||R.all||Object.keys(_).some(function(P){return R[P]&&jl(R[P],_[P])})}m(Sr.prototype,((ul={add:function(_){return ro(this,_),this},addKey:function(_){return ga(this,_,_),this},addKeys:function(_){var R=this;return _.forEach(function(P){return ga(R,P,P)}),this},hasKey:function(_){var R=Or(this).next(_).value;return R&&Hn(R.from,_)<=0&&0<=Hn(R.to,_)}})[H]=function(){return Or(this)},ul));var kc={},WS={},GS=!1;function $b(_){mf(WS,_),GS||(GS=!0,setTimeout(function(){GS=!1,qS(WS,!(WS={}))},0))}function qS(_,R){R===void 0&&(R=!1);var P=new Set;if(_.all)for(var V=0,Z=Object.values(kc);V<Z.length;V++)t5(de=Z[V],_,P,R);else for(var Q in _){var de,ve=/^idb\:\/\/(.*)\/(.*)\//.exec(Q);ve&&(Q=ve[1],ve=ve[2],(de=kc["idb://".concat(Q,"/").concat(ve)])&&t5(de,_,P,R))}P.forEach(function(Te){return Te()})}function t5(_,R,P,V){for(var Z=[],Q=0,de=Object.entries(_.queries.query);Q<de.length;Q++){for(var ve=de[Q],Te=ve[0],Oe=[],Ge=0,xe=ve[1];Ge<xe.length;Ge++){var Xe=xe[Ge];Ym(R,Xe.obsSet)?Xe.subscribers.forEach(function(Ye){return P.add(Ye)}):V&&Oe.push(Xe)}V&&Z.push([Te,Oe])}if(V)for(var Pe=0,ze=Z;Pe<ze.length;Pe++){var He=ze[Pe],Te=He[0],Oe=He[1];_.queries.query[Te]=Oe}}function fre(_){var R=_._state,P=_._deps.indexedDB;if(R.isBeingOpened||_.idbdb)return R.dbReadyPromise.then(function(){return R.dbOpenError?vt(R.dbOpenError):_});R.isBeingOpened=!0,R.dbOpenError=null,R.openComplete=!1;var V=R.openCanceller,Z=Math.round(10*_.verno),Q=!1;function de(){if(R.openCanceller!==V)throw new ue.DatabaseClosed("db.open() was cancelled")}function ve(){return new Ct(function(Xe,Pe){if(de(),!P)throw new ue.MissingAPI;var ze=_.name,He=R.autoSchema||!Z?P.open(ze):P.open(ze,Z);if(!He)throw new ue.MissingAPI;He.onerror=ge(Pe),He.onblocked=Fe(_._fireOnBlocked),He.onupgradeneeded=Fe(function(Ye){var tt;Ge=He.transaction,R.autoSchema&&!_._options.allowEmptyDB?(He.onerror=at,Ge.abort(),He.result.close(),(tt=P.deleteDatabase(ze)).onsuccess=tt.onerror=Fe(function(){Pe(new ue.NoSuchDatabase("Database ".concat(ze," doesnt exist")))})):(Ge.onerror=ge(Pe),Ye=Ye.oldVersion>Math.pow(2,62)?0:Ye.oldVersion,xe=Ye<1,_.idbdb=He.result,Q&&_c(_,Ge),ja(_,Ye/10,Ge,Pe))},Pe),He.onsuccess=Fe(function(){Ge=null;var Ye,tt,ct,yt,Tt,rn=_.idbdb=He.result,xn=E(rn.objectStoreNames);if(0<xn.length)try{var Xt=rn.transaction((yt=xn).length===1?yt[0]:yt,"readonly");if(R.autoSchema)tt=rn,ct=Xt,(Ye=_).verno=tt.version/10,ct=Ye._dbSchema=mn(0,tt,ct),Ye._storeNames=E(tt.objectStoreNames,0),ui(Ye,[Ye._allTables],i(ct),ct);else if(nn(_,_._dbSchema,Xt),((Tt=No(mn(0,(Tt=_).idbdb,Xt),Tt._dbSchema)).add.length||Tt.change.some(function(un){return un.add.length||un.change.length}))&&!Q)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.ver
1189sion(). Dexie will add missing parts and increment native version number to workaround this."),rn.close(),Z=rn.version+1,Q=!0,Xe(ve());js(_,Xt)}catch{}lt.push(_),rn.onversionchange=Fe(function(un){R.vcFired=!0,_.on("versionchange").fire(un)}),rn.onclose=Fe(function(){_.close({disableAutoOpen:!1})}),xe&&(Tt=_._deps,Xt=ze,rn=Tt.indexedDB,Tt=Tt.IDBKeyRange,Vr(rn)||Xt===wt||Bn(rn,Tt).put({name:Xt}).catch(he)),Xe()},Pe)}).catch(function(Xe){switch(Xe==null?void 0:Xe.name){case"UnknownError":if(0<R.PR1398_maxLoop)return R.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),ve();break;case"VersionError":if(0<Z)return Z=0,ve()}return Ct.reject(Xe)})}var Te,Oe=R.dbReadyResolve,Ge=null,xe=!1;return Ct.race([V,(typeof navigator>"u"?Ct.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(Xe){function Pe(){return indexedDB.databases().finally(Xe)}Te=setInterval(Pe,100),Pe()}).finally(function(){return clearInterval(Te)}):Promise.resolve()).then(ve)]).then(function(){return de(),R.onReadyBeingFired=[],Ct.resolve(Wa(function(){return _.on.ready.fire(_.vip)}
vendor: 13,483 bytes, line 1189
1189)).then(function Xe(){if(0<R.onReadyBeingFired.length){var Pe=R.onReadyBeingFired.reduce(te,he);return R.onReadyBeingFired=[],Ct.resolve(Wa(function(){return Pe(_.vip)})).then(Xe)}})}).finally(function(){R.openCanceller===V&&(R.onReadyBeingFired=null,R.isBeingOpened=!1)}).catch(function(Xe){R.dbOpenError=Xe;try{Ge&&Ge.abort()}catch{}return V===R.openCanceller&&_._close(),vt(Xe)}).finally(function(){R.openComplete=!0,Oe()}).then(function(){var Xe;return xe&&(Xe={},_.tables.forEach(function(Pe){Pe.schema.indexes.forEach(function(ze){ze.name&&(Xe["idb://".concat(_.name,"/").concat(Pe.name,"/").concat(ze.name)]=new Sr(-1/0,[[[]]]))}),Xe["idb://".concat(_.name,"/").concat(Pe.name,"/")]=Xe["idb://".concat(_.name,"/").concat(Pe.name,"/:dels")]=new Sr(-1/0,[[[]]])}),Mt(zt).fire(Xe),qS(Xe,!0)),_})}function YS(_){function R(Q){return _.next(Q)}var P=Z(R),V=Z(function(Q){return _.throw(Q)});function Z(Q){return function(Te){var ve=Q(Te),Te=ve.value;return ve.done?Te:Te&&typeof Te.then=="function"?Te.then(P,V):l(Te)?Promise.all(Te).then(P,V):P(Te)}}return Z(R)()}function Fb(_,R,P){for(var V=l(_)?_.slice():[_],Z=0;Z<P;++Z)V.push(R);return V}var mre={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(_){return r(r({},_),{table:function(R){var P=_.table(R),V=P.schema,Z={},Q=[];function de(xe,Xe,Pe){var ze=Ai(xe),He=Z[ze]=Z[ze]||[],Ye=xe==null?0:typeof xe=="string"?1:xe.length,tt=0<Xe,tt=r(r({},Pe),{name:tt?"".concat(ze,"(virtual-from:").concat(Pe.name,")"):Pe.name,lowLevelIndex:Pe,isVirtual:tt,keyTail:Xe,keyLength:Ye,extractKey:So(xe),unique:!tt&&Pe.unique});return He.push(tt),tt.isPrimaryKey||Q.push(tt),1<Ye&&de(Ye===2?xe[0]:xe.slice(0,Ye-1),Xe+1,Pe),He.sort(function(ct,yt){return ct.keyTail-yt.keyTail}),tt}R=de(V.primaryKey.keyPath,0,V.primaryKey),Z[":id"]=[R];for(var ve=0,Te=V.indexes;ve<Te.length;ve++){var Oe=Te[ve];de(Oe.keyPath,0,Oe)}function Ge(xe){var Xe,Pe=xe.query.index;return Pe.isVirtual?r(r({},xe),{query:{index:Pe.lowLevelIndex,range:(Xe=xe.query.range,Pe=Pe.keyTail,{type:Xe.type===1?2:Xe.type,lower:Fb(Xe.lower,Xe.lowerOpen?_.MAX_KEY:_.MIN_KEY,Pe),lowerOpen:!0,upper:Fb(Xe.upper,Xe.upperOpen?_.MIN_KEY:_.MAX_KEY,Pe),upperOpen:!0})}}):xe}return r(r({},P),{schema:r(r({},V),{primaryKey:R,indexes:Q,getIndexByKeyPath:function(xe){return(xe=Z[Ai(xe)])&&xe[0]}}),count:function(xe){return P.count(Ge(xe))},query:function(xe){return P.query(Ge(xe))},openCursor:function(xe){var Xe=xe.query.index,Pe=Xe.keyTail,ze=Xe.isVirtual,He=Xe.keyLength;return ze?P.openCursor(Ge(xe)).then(function(tt){return tt&&Ye(tt)}):P.openCursor(xe);function Ye(tt){return Object.create(tt,{continue:{value:function(ct){ct!=null?tt.continue(Fb(ct,xe.reverse?_.MAX_KEY:_.MIN_KEY,Pe)):xe.unique?tt.continue(tt.key.slice(0,He).concat(xe.reverse?_.MIN_KEY:_.MAX_KEY,Pe)):tt.continue()}},continuePrimaryKey:{value:function(ct,yt){tt.continuePrimaryKey(Fb(ct,_.MAX_KEY,Pe),yt)}},primaryKey:{get:function(){return tt.primaryKey}},key:{get:function(){var ct=tt.key;return He===1?ct[0]:ct.slice(0,He)}},value:{get:function(){return tt.value}}})}}})}})}};function KS(_,R,P,V){return P=P||{},V=V||"",i(_).forEach(function(Z){var Q,de,ve;f(R,Z)?(Q=_[Z],de=R[Z],typeof Q=="object"&&typeof de=="object"&&Q&&de?(ve=j(Q))!==j(de)?P[V+Z]=R[Z]:ve==="Object"?KS(Q,de,P,V+Z+"."):Q!==de&&(P[V+Z]=R[Z]):Q!==de&&(P[V+Z]=R[Z])):P[V+Z]=void 0}),i(R).forEach(function(Z){f(_,Z)||(P[V+Z]=R[Z])}),P}function ZS(_,R){return R.type==="delete"?R.keys:R.keys||R.values.map(_.extractKey)}var hre={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(_){return r(r({},_),{table:function(R){var P=_.table(R),V=P.schema.primaryKey;return r(r({},P),{mutate:function(Z){var Q=xt.trans,de=Q.table(R).hook,ve=de.deleting,Te=de.creating,Oe=de.updating;switch(Z.type){case"add":if(Te.fire===he)break;return Q._promise("readwrite",function(){return Ge(Z)},!0);case"put":if(Te.fire===he&&Oe.fire===he)break;return Q._promise("readwrite",function(){return Ge(Z)},!0);case"delete":if(ve.fire===he)break;return Q._promise("readwrite",function(){return Ge(Z)},!0);case"deleteRange":if(ve.fire===he)break;return Q._promise("readwrite",function(){return function xe(Xe,Pe,ze){return P.query({trans:Xe,values:!1,query:{index:V,range:Pe},limit:ze}).then(function(He){var Ye=He.result;return Ge({type:"delete",keys:Ye,trans:Xe}).then(function(tt){return 0<tt.numFailures?Promise.reject(tt.failures[0]):Ye.length<ze?{failures:[],numFailures:0,lastResult:void 0}:xe(Xe,r(r({},Pe),{lower:Ye[Ye.length-1],lowerOpen:!0}),ze)})})}(Z.trans,Z.range,1e4)},!0)}return P.mutate(Z);function Ge(xe){var Xe,Pe,ze,He=xt.trans,Ye=xe.keys||ZS(V,xe);if(!Ye)throw new Error("Keys missing");return(xe=xe.type==="add"||xe.type==="put"?r(r({},xe),{keys:Ye}):r({},xe)).type!=="delete"&&(xe.values=a([],xe.values,!0)),xe.keys&&(xe.keys=a([],xe.keys,!0)),Xe=P,ze=Ye,((Pe=xe).type==="add"?Promise.resolve([]):Xe.getMany({trans:Pe.trans,keys:ze,cache:"immutable"})).then(function(tt){var ct=Ye.map(function(yt,Tt){var rn,xn,Xt,un=tt[Tt],kn={onerror:null,onsuccess:null};return xe.type==="delete"?ve.fire.call(kn,yt,un,He):xe.type==="add"||un===void 0?(rn=Te.fire.call(kn,yt,xe.values[Tt],He),yt==null&&rn!=null&&(xe.keys[Tt]=yt=rn,V.outbound||k(xe.values[Tt],V.keyPath,yt))):(rn=KS(un,xe.values[Tt]),(xn=Oe.fire.call(kn,rn,yt,un,He))&&(Xt=xe.values[Tt],Object.keys(xn).forEach(function(gn){f(Xt,gn)?Xt[gn]=xn[gn]:k(Xt,gn,xn[gn])}))),kn});return P.mutate(xe).then(function(yt){for(var Tt=yt.failures,rn=yt.results,xn=yt.numFailures,yt=yt.lastResult,Xt=0;Xt<Ye.length;++Xt){var un=(rn||Ye)[Xt],kn=ct[Xt];un==null?kn.onerror&&kn.onerror(Tt[Xt]):kn.onsuccess&&kn.onsuccess(xe.type==="put"&&tt[Xt]?xe.values[Xt]:un)}return{failures:Tt,results:rn,numFailures:xn,lastResult:yt}}).catch(function(yt){return ct.forEach(function(Tt){return Tt.onerror&&Tt.onerror(yt)}),Promise.reject(yt)})})}}})}})}};function n5(_,R,P){try{if(!R||R.keys.length<_.length)return null;for(var V=[],Z=0,Q=0;Z<R.keys.length&&Q<_.length;++Z)Hn(R.keys[Z],_[Q])===0&&(V.push(P?L(R.values[Z]):R.values[Z]),++Q);return V.length===_.length?V:null}catch{return null}}var pre={stack:"dbcore",level:-1,create:function(_){return{table:function(R){var P=_.table(R);return r(r({},P),{getMany:function(V){if(!V.cache)return P.getMany(V);var Z=n5(V.keys,V.trans._cache,V.cache==="clone");return Z?Ct.resolve(Z):P.getMany(V).then(function(Q){return V.trans._cache={keys:V.keys,values:V.cache==="clone"?L(Q):Q},Q})},mutate:function(V){return V.type!=="add"&&(V.trans._cache=null),P.mutate(V)}})}}}};function r5(_,R){return _.trans.mode==="readonly"&&!!_.subscr&&!_.trans.explicit&&_.trans.db._options.cache!=="disabled"&&!R.schema.primaryKey.outbound}function a5(_,R){switch(_){case"query":return R.values&&!R.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var gre={stack:"dbcore",level:0,name:"Observability",create:function(_){var R=_.schema.name,P=new Sr(_.MIN_KEY,_.MAX_KEY);return r(r({},_),{transaction:function(V,Z,Q){if(xt.subscr&&Z!=="readonly")throw new ue.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(xt.querier));return _.transaction(V,Z,Q)},table:function(V){var Z=_.table(V),Q=Z.schema,de=Q.primaryKey,xe=Q.indexes,ve=de.extractKey,Te=de.outbound,Oe=de.autoIncrement&&xe.filter(function(Pe){return Pe.compound&&Pe.keyPath.includes(de.keyPath)}),Ge=r(r({},Z),{mutate:function(Pe){function ze(gn){return gn="idb://".concat(R,"/").concat(V,"/").concat(gn),yt[gn]||(yt[gn]=new Sr)}var He,Ye,tt,ct=Pe.trans,yt=Pe.mutatedParts||(Pe.mutatedParts={}),Tt=ze(""),rn=ze(":dels"),xn=Pe.type,kn=Pe.type==="deleteRange"?[Pe.range]:Pe.type==="delete"?[Pe.keys]:Pe.values.length<50?[ZS(de,Pe).filter(function(gn){return gn}),Pe.values]:[],Xt=kn[0],un=kn[1],kn=Pe.trans._cache;return l(Xt)?(Tt.addKeys(Xt),(kn=xn==="delete"||Xt.length===un.length?n5(Xt,kn):null)||rn.addKeys(Xt),(kn||un)&&(He=ze,Ye=kn,tt=un,Q.indexes.forEach(function(gn){var Ln=He(gn.name||"");function Mr(Gr){return Gr!=null?gn.extractKey(Gr):null}function zr(Gr){return gn.multiEntry&&l(Gr)?Gr.forEach(function(To){return Ln.addKey(To)}):Ln.addKey(Gr)}(Ye||tt).forEach(function(Gr,di){var Rr=Ye&&Mr(Ye[di]),di=tt&&Mr(tt[di]);Hn(Rr,di)!==0&&(Rr!=null&&zr(Rr),di!=null&&zr(di))})}))):Xt?(un={from:(un=Xt.lower)!==null&&un!==void 0?un:_.MIN_KEY,to:(un=Xt.upper)!==null&&un!==void 0?un:_.MAX_KEY},rn.add(un),Tt.add(un)):(Tt.add(P),rn.add(P),Q.indexes.forEach(function(gn){return ze(gn.name).add(P)})),Z.mutate(Pe).then(function(gn){return!Xt||Pe.type!=="add"&&Pe.type!=="put"||(Tt.addKeys(gn.results),Oe&&Oe.forEach(function(Ln){for(var Mr=Pe.values.map(function(Rr){return Ln.extractKey(Rr)}),zr=Ln.keyPath.findIndex(function(Rr){return Rr===de.keyPath}),Gr=0,To=gn.results.length;Gr<To;++Gr)Mr[Gr][zr]=gn.results[Gr];ze(Ln.name).addKeys(Mr)})),ct.mutatedParts=mf(ct.mutatedParts||{},yt),gn})}}),xe=function(ze){var He=ze.query,ze=He.index,He=He.range;return[ze,new Sr((ze=He.lower)!==null&&ze!==void 0?ze:_.MIN_KEY,(He=He.upper)!==null&&He!==void 0?He:_.MAX_KEY)]},Xe={get:function(Pe){return[de,new Sr(Pe.key)]},getMany:function(Pe){return[de,new Sr().addKeys(Pe.keys)]},count:xe,query:xe,openCursor:xe};return i(Xe).forEach(function(Pe){Ge[Pe]=function(ze){var He=xt.subscr,Ye=!!He,tt=r5(xt,Z)&&a5(Pe,ze)?ze.obsSet={}:He;if(Ye){var ct=function(un){return un="idb://".concat(R,"/").concat(V,"/").concat(un),tt[un]||(tt[un]=new Sr)},yt=ct(""),Tt=ct(":dels"),He=Xe[Pe](ze),Ye=He[0],He=He[1];if((Pe==="query"&&Ye.isPrimaryKey&&!ze.values?Tt:ct(Ye.name||"")).add(He),!Ye.isPrimaryKey){if(Pe!=="count"){var rn=Pe==="query"&&Te&&ze.values&&Z.query(r(r({},ze),{values:!1}));return Z[Pe].apply(this,arguments).then(function(un){if(Pe==="query"){if(Te&&ze.values)return rn.then(function(Mr){return Mr=Mr.result,yt.addKeys(Mr),un});var kn=ze.values?un.result.map(ve):un.result;(ze.values?yt:Tt).addKeys(kn)}else if(Pe==="openCursor"){var gn=un,Ln=ze.values;return gn&&Object.create(gn,{key:{get:function(){return Tt.addKey(gn.primaryKey),gn.key}},primaryKey:{get:function(){var Mr=gn.primaryKey;return Tt.addKey(Mr),Mr}},value:{get:function(){return Ln&&yt.addKey(gn.primaryKey),gn.value}}})}return un})}Tt.add(P)}}return Z[Pe].apply(this,arguments)}}),Ge}})}};function s5(_,R,P){if(P.numFailures===0)return R;if(R.type==="deleteRange")return null;var V=R.keys?R.keys.length:"values"in R&&R.values?R.values.length:1;return P.numFailures===V?null:(R=r({},R),l(R.keys)&&(R.keys=R.keys.filter(function(Z,Q){return!(Q in P.failures)})),"values"in R&&l(R.values)&&(R.values=R.values.filter(function(Z,Q){return!(Q in P.failures)})),R)}function XS(_,R){return P=_,((V=R).lower===void 0||(V.lowerOpen?0<Hn(P,V.lower):0<=Hn(P,V.lower)))&&(_=_,(R=R).upper===void 0||(R.upperOpen?Hn(_,R.upper)<0:Hn(_,R.upper)<=0));var P,V}function i5(_,R,Xe,V,Z,Q){if(!Xe||Xe.length===0)return _;var de=R.query.index,ve=de.multiEntry,Te=R.query.range,Oe=V.schema.primaryKey.extractKey,Ge=de.extractKey,xe=(de.lowLevelIndex||de).extractKey,Xe=Xe.reduce(function(Pe,ze){var He=Pe,Ye=[];if(ze.type==="add"||ze.type==="put")for(var tt=new Sr,ct=ze.values.length-1;0<=ct;--ct){var yt,Tt=ze.values[ct],rn=Oe(Tt);tt.hasKey(rn)||(yt=Ge(Tt),(ve&&l(yt)?yt.some(function(gn){return XS(gn,Te)}):XS(yt,Te))&&(tt.addKey(rn),Ye.push(Tt)))}switch(ze.type){case"add":var xn=new Sr().addKeys(R.values?Pe.map(function(Ln){return Oe(Ln)}):Pe),He=Pe.concat(R.values?Ye.filter(function(Ln){return Ln=Oe(Ln),!xn.hasKey(Ln)&&(xn.addKey(Ln),!0)}):Ye.map(function(Ln){return Oe(Ln)}).filter(function(Ln){return!xn.hasKey(Ln)&&(xn.addKey(Ln),!0)}));break;case"put":var Xt=new Sr().addKeys(ze.values.map(function(Ln){return Oe(Ln)}));He=Pe.filter(function(Ln){return!Xt.hasKey(R.values?Oe(Ln):Ln)}).concat(R.values?Ye:Ye.map(function(Ln){return Oe(Ln)}));break;case"delete":var un=new Sr().addKeys(ze.keys);He=Pe.filter(function(Ln){return!un.hasKey(R.values?Oe(Ln):Ln)});break;case"deleteRange":var kn=ze.range;He=Pe.filter(function(Ln){return!XS(Oe(Ln),kn)})}return He},_);return Xe===_?_:(Xe.sort(function(Pe,ze){return Hn(xe(Pe),xe(ze))||Hn(Oe(Pe),Oe(ze))}),R.limit&&R.limit<1/0&&(Xe.length>R.limit?Xe.length=R.limit:_.length===R.limit&&Xe.length<R.limit&&(Z.dirty=!0)),Q?Object.freeze(Xe):Xe)}function o5(_,R){return Hn(_.lower,R.lower)===0&&Hn(_.upper,R.upper)===0&&!!_.lowerOpen==!!R.lowerOpen&&!!_.upperOpen==!!R.upperOpen}function vre(_,R){return function(P,V,Z,Q){if(P===void 0)return V!==void 0?-1:0;if(V===void 0)return 1;if((V=Hn(P,V))===0){if(Z&&Q)return 0;if(Z)return 1;if(Q)return-1}return V}(_.lower,R.lower,_.lowerOpen,R.lowerOpen)<=0&&0<=function(P,V,Z,Q){if(P===void 0)return V!==void 0?1:0;if(V===void 0)return-1;if((V=Hn(P,V))===0){if(Z&&Q)return 0;if(Z)return-1;if(Q)return 1}return V}(_.upper,R.upper,_.upperOpen,R.upperOpen)}function yre(_,R,P,V){_.subscribers.add(P),V.addEventListener("abort",function(){var Z,Q;_.subscribers.delete(P),_.subscribers.size===0&&(Z=_,Q=R,setTimeout(function(){Z.subscribers.size===0&&z(Q,Z)},3e3))})}var bre={stack:"dbcore",level:0,name:"Cache",create:function(_){var R=_.schema.name;return r(r({},_),{transaction:function(P,V,Z){var Q,de,ve=_.transaction(P,V,Z);return V==="readwrite"&&(de=(Q=new AbortController).signal,Z=function(Te){return function(){if(Q.abort(),V==="readwrite"){for(var Oe=new Set,Ge=0,xe=P;Ge<xe.length;Ge++){var Xe=xe[Ge],Pe=kc["idb://".concat(R,"/").concat(Xe)];if(Pe){var ze=_.table(Xe),He=Pe.optimisticOps.filter(function(Ln){return Ln.trans===ve});if(ve._explicit&&Te&&ve.mutatedParts)for(var Ye=0,tt=Object.values(Pe.queries.query
vendor: 4,554 bytes, line 1189
1189);Ye<tt.length;Ye++)for(var ct=0,yt=(xn=tt[Ye]).slice();ct<yt.length;ct++)Ym((Xt=yt[ct]).obsSet,ve.mutatedParts)&&(z(xn,Xt),Xt.subscribers.forEach(function(Ln){return Oe.add(Ln)}));else if(0<He.length){Pe.optimisticOps=Pe.optimisticOps.filter(function(Ln){return Ln.trans!==ve});for(var Tt=0,rn=Object.values(Pe.queries.query);Tt<rn.length;Tt++)for(var xn,Xt,un,kn=0,gn=(xn=rn[Tt]).slice();kn<gn.length;kn++)(Xt=gn[kn]).res!=null&&ve.mutatedParts&&(Te&&!Xt.dirty?(un=Object.isFrozen(Xt.res),un=i5(Xt.res,Xt.req,He,ze,Xt,un),Xt.dirty?(z(xn,Xt),Xt.subscribers.forEach(function(Ln){return Oe.add(Ln)})):un!==Xt.res&&(Xt.res=un,Xt.promise=Ct.resolve({result:un}))):(Xt.dirty&&z(xn,Xt),Xt.subscribers.forEach(function(Ln){return Oe.add(Ln)})))}}}Oe.forEach(function(Ln){return Ln()})}}},ve.addEventListener("abort",Z(!1),{signal:de}),ve.addEventListener("error",Z(!1),{signal:de}),ve.addEventListener("complete",Z(!0),{signal:de})),ve},table:function(P){var V=_.table(P),Z=V.schema.primaryKey;return r(r({},V),{mutate:function(Q){var de=xt.trans;if(Z.outbound||de.db._options.cache==="disabled"||de.explicit||de.idbtrans.mode!=="readwrite")return V.mutate(Q);var ve=kc["idb://".concat(R,"/").concat(P)];return ve?(de=V.mutate(Q),Q.type!=="add"&&Q.type!=="put"||!(50<=Q.values.length||ZS(Z,Q).some(function(Te){return Te==null}))?(ve.optimisticOps.push(Q),Q.mutatedParts&&$b(Q.mutatedParts),de.then(function(Te){0<Te.numFailures&&(z(ve.optimisticOps,Q),(Te=s5(0,Q,Te))&&ve.optimisticOps.push(Te),Q.mutatedParts&&$b(Q.mutatedParts))}),de.catch(function(){z(ve.optimisticOps,Q),Q.mutatedParts&&$b(Q.mutatedParts)})):de.then(function(Te){var Oe=s5(0,r(r({},Q),{values:Q.values.map(function(Ge,xe){var Xe;return Te.failures[xe]?Ge:(Ge=(Xe=Z.keyPath)!==null&&Xe!==void 0&&Xe.includes(".")?L(Ge):r({},Ge),k(Ge,Z.keyPath,Te.results[xe]),Ge)})}),Te);ve.optimisticOps.push(Oe),queueMicrotask(function(){return Q.mutatedParts&&$b(Q.mutatedParts)})}),de):V.mutate(Q)},query:function(Q){if(!r5(xt,V)||!a5("query",Q))return V.query(Q);var de=((Oe=xt.trans)===null||Oe===void 0?void 0:Oe.db._options.cache)==="immutable",xe=xt,ve=xe.requery,Te=xe.signal,Oe=function(ze,He,Ye,tt){var ct=kc["idb://".concat(ze,"/").concat(He)];if(!ct)return[];if(!(He=ct.queries[Ye]))return[null,!1,ct,null];var yt=He[(tt.query?tt.query.index.name:null)||""];if(!yt)return[null,!1,ct,null];switch(Ye){case"query":var Tt=yt.find(function(rn){return rn.req.limit===tt.limit&&rn.req.values===tt.values&&o5(rn.req.query.range,tt.query.range)});return Tt?[Tt,!0,ct,yt]:[yt.find(function(rn){return("limit"in rn.req?rn.req.limit:1/0)>=tt.limit&&(!tt.values||rn.req.values)&&vre(rn.req.query.range,tt.query.range)}),!1,ct,yt];case"count":return Tt=yt.find(function(rn){return o5(rn.req.query.range,tt.query.range)}),[Tt,!!Tt,ct,yt]}}(R,P,"query",Q),Ge=Oe[0],xe=Oe[1],Xe=Oe[2],Pe=Oe[3];return Ge&&xe?Ge.obsSet=Q.obsSet:(xe=V.query(Q).then(function(ze){var He=ze.result;if(Ge&&(Ge.res=He),de){for(var Ye=0,tt=He.length;Ye<tt;++Ye)Object.freeze(He[Ye]);Object.freeze(He)}else ze.result=L(He);return ze}).catch(function(ze){return Pe&&Ge&&z(Pe,Ge),Promise.reject(ze)}),Ge={obsSet:Q.obsSet,promise:xe,subscribers:new Set,type:"query",req:Q,dirty:!1},Pe?Pe.push(Ge):(Pe=[Ge],(Xe=Xe||(kc["idb://".concat(R,"/").concat(P)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[Q.query.index.name||""]=Pe)),yre(Ge,Pe,ve,Te),Ge.promise.then(function(ze){return{result:i5(ze.result,Q,Xe==null?void 0:Xe.optimisticOps,V,Ge,de)}})}})}})}};function zb(_,R){return new Proxy(_,{get:function(P,V,Z){return V==="db"?R:Reflect.get(P,V,Z)}})}var mu=(ps.prototype.version=function(_){if(isNaN(_)||_<.1)throw new ue.Type("Given version is not a positive number");if(_=Math.round(10*_)/10,this.idbdb||this._state.isBeingOpened)throw new ue.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,_);var R=this._versions,P=R.filter(function(V){return V._cfg.version===_})[0];return P||(P=new this.Version(_),R.push(P),R.sort(mr),P.stores({}),this._state.autoSchema=!1,P)},ps.prototype._whenReady=function(_){var R=this;return this.idbdb&&(this._state.openComplete||xt.letThrough||this._vip)?_():new Ct(function(P,V){if(R._state.openComplete)return V(new ue.DatabaseClosed(R._state.dbOpenError));if(!R._state.isBeingOpened){if(!R._state.autoOpen)return void V(new ue.DatabaseClosed);R.open().catch(he)}R._state.dbReadyPromise.then(P,V)}).then(_)},ps.prototype.use=function(_){var R=_.stack,P=_.create,V=_.level,Z=_.name;return Z&&this.unuse({stack:R,name:Z}
1189),_=this._middlewares[R]||(this._middlewares[R]=[]),_.push({stack:R,create:P,level:V??10,name:Z}),_.sort(function(Q,de){return Q.level-de.level}),this},ps.prototype.unuse=function(_){var R=_.stack,P=_.name,V=_.create;return R&&this._middlewares[R]&&(this._middlewares[R]=this._middlewares[R].filter(function(Z){return V?Z.create!==V:!!P&&Z.name!==P})),this},ps.prototype.open=function(){var _=this;return Be(zn,function(){return fre(_)})},ps.prototype._close=function(){this.on.close.fire(new CustomEvent("close"));var _=this._state,R=lt.indexOf(this);if(0<=R&<.splice(R,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}_.isBeingOpened||(_.dbReadyPromise=new Ct(function(P){_.dbReadyResolve=P}),_.openCanceller=new Ct(function(P,V){_.cancelOpen=V}))},ps.prototype.close=function(P){var R=(P===void 0?{disableAutoOpen:!0}:P).disableAutoOpen,P=this._state;R?(P.isBeingOpened&&P.cancelOpen(new ue.DatabaseClosed),this._close(),P.autoOpen=!1,P.dbOpenError=new ue.DatabaseClosed):(this._close(),P.autoOpen=this._options.autoOpen||P.isBeingOpened,P.openComplete=!1,P.dbOpenError=null)},ps.prototype.delete=function(_){var R=this;_===void 0&&(_={disableAutoOpen:!0});var P=0<arguments.length&&typeof arguments[0]!="object",V=this._state;return new Ct(function(Z,Q){function de(){R.close(_);var ve=R._deps.indexedDB.deleteDatabase(R.name);ve.onsuccess=Fe(function(){var Te,Oe,Ge;Te=R._deps,Oe=R.name,Ge=Te.indexedDB,Te=Te.IDBKeyRange,Vr(Ge)||Oe===wt||Bn(Ge,Te).delete(Oe).catch(he),Z()}),ve.onerror=ge(Q),ve.onblocked=R._fireOnBlocked}if(P)throw new ue.InvalidArgument("Invalid closeOptions argument to db.delete()");V.isBeingOpened?V.dbReadyPromise.then(de):de()})},ps.prototype.backendDB=function(){return this.idbdb},ps.prototype.isOpen=function(){return this.idbdb!==null},ps.prototype.hasBeenClosed=function(){var _=this._state.dbOpenError;return _&&_.name==="DatabaseClosed"},ps.prototype.hasFailed=function(){return this._state.dbOpenError!==null},ps.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(ps.prototype,"tables",{get:function(){var _=this;return i(this._allTables).map(function(R){return _._allTables[R]})},enumerable:!1,configurable:!0}),ps.prototype.transaction=function(){var _=(function(R,P,V){var Z=arguments.length;if(Z<2)throw new ue.InvalidArgument("Too few arguments");for(var Q=new Array(Z-1);--Z;)Q[Z-1]=arguments[Z];return V=Q.pop(),[R,O(Q),V]}).apply(this,arguments);return this._transaction.apply(this,_)},ps.prototype._transaction=function(_,R,P){var V=this,Z=xt.trans;Z&&Z.db===this&&_.indexOf("!")===-1||(Z=null);var Q,de,ve=_.indexOf("?")!==-1;_=_.replace("!","").replace("?","");try{if(de=R.map(function(Oe){if(Oe=Oe instanceof V.Table?Oe.name:Oe,typeof Oe!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return Oe}),_=="r"||_===Ke)Q=Ke;else{if(_!="rw"&&_!=St)throw new ue.InvalidArgument("Invalid transaction mode: "+_);Q=St}if(Z){if(Z.mode===Ke&&Q===St){if(!ve)throw new ue.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");Z=null}Z&&de.forEach(function(Oe){if(Z&&Z.storeNames.indexOf(Oe)===-1){if(!ve)throw new ue.SubTransaction("Table "+Oe+" not included in parent transaction.");Z=null}}),ve&&Z&&!Z.active&&(Z=null)}}catch(Oe){return Z?Z._promise(null,function(Ge,xe){xe(Oe)}):vt(Oe)}var Te=(function Oe(Ge,xe,Xe,Pe,ze){return Ct.resolve().then(function(){var He=xt.transless||xt,Ye=Ge._createTransaction(xe,Xe,Ge._dbSchema,Pe);if(Ye.explicit=!0,He={trans:Ye,transless:He},Pe)Ye.idbtrans=Pe.idbtrans;else try{Ye.create(),Ye.idbtrans._explicit=!0,Ge._state.PR1398_maxLoop=3}catch(yt){return yt.name===ce.InvalidState&&Ge.isOpen()&&0<--Ge._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Ge.close({disableAutoOpen:!1}),Ge.open().then(function(){return Oe(Ge,xe,Xe,null,ze)})):vt(yt)}var tt,ct=oe(ze);return ct&&vn(),He=Ct.follow(function(){var yt;(tt=ze.call(Ye,Ye))&&(ct?(yt=An.bind(null,null),tt.then(yt,yt)):typeof tt.next=="function"&&typeof tt.throw=="function"&&(tt=YS(tt)))},He),(tt&&typeof tt.then=="function"?Ct.resolve(tt).then(function(yt){return Ye.active?yt:vt(new ue.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):He.then(function(){return tt})).then(function(yt){return Pe&&Ye._resolve(),Ye._completion.then(function(){return yt})}).catch(function(yt){return Ye._reject(yt),vt(yt)})})}).bind(null,this,Q,de,Z,P);return Z?Z._promise(Q,Te,"lock"):xt.trans?Be(xt.transless,function(){return V._whenReady(Te)}):this._whenReady(Te)},ps.prototype.table=function(_){if(!f(this._allTables,_))throw new ue.InvalidTable("Table ".concat(_," does not exist"));return this._allTables[_]},ps);function ps(_,R){var P=this;this._middlewares={},this.verno=0;var V=ps.dependencies;this._options=R=r({addons:ps.addons,autoOpen:!0,indexedDB:V.indexedDB,IDBKeyRange:V.IDBKeyRange,cache:"cloned"},R),this._deps={indexedDB:R.indexedDB,IDBKeyRange:R.IDBKeyRange},V=R.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var Z,Q,de,ve,Te,Oe={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:he,dbReadyPromise:null,cancelOpen:he,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:R.autoOpen};
vendor: 4,195 bytes, line 1189
1189Oe.dbReadyPromise=new Ct(function(xe){Oe.dbReadyResolve=xe}),Oe.openCanceller=new Ct(function(xe,Xe){Oe.cancelOpen=Xe}),this._state=Oe,this.name=_,this.on=Ve(this,"populate","blocked","versionchange","close",{ready:[te,he]}),this.once=function(xe,Xe){var Pe=function(){for(var ze=[],He=0;He<arguments.length;He++)ze[He]=arguments[He];P.on(xe).unsubscribe(Pe),Xe.apply(P,ze)};return P.on(xe,Pe)},this.on.ready.subscribe=w(this.on.ready.subscribe,function(xe){return function(Xe,Pe){ps.vip(function(){var ze,He=P._state;He.openComplete?(He.dbOpenError||Ct.resolve().then(Xe),Pe&&xe(Xe)):He.onReadyBeingFired?(He.onReadyBeingFired.push(Xe),Pe&&xe(Xe)):(xe(Xe),ze=P,Pe||xe(function Ye(){ze.on.ready.unsubscribe(Xe),ze.on.ready.unsubscribe(Ye)}))})}}),this.Collection=(Z=this,Je(Nn.prototype,function(tt,Ye){this.db=Z;var Pe=vr,ze=null;if(Ye)try{Pe=Ye()}catch(ct){ze=ct}var He=tt._ctx,Ye=He.table,tt=Ye.hook.reading.fire;this._ctx={table:Ye,index:He.index,isPrimKey:!He.index||Ye.schema.primKey.keyPath&&He.index===Ye.schema.primKey.name,range:Pe,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:ze,or:He.or,valueMapper:tt!==_e?tt:null}})),this.Table=(Q=this,Je(qe.prototype,function(xe,Xe,Pe){this.db=Q,this._tx=Pe,this.name=xe,this.schema=Xe,this.hook=Q._allTables[xe]?Q._allTables[xe].hook:Ve(null,{creating:[ae,he],reading:[ie,_e],updating:[W,he],deleting:[pe,he]})})),this.Transaction=(de=this,Je(kr.prototype,function(xe,Xe,Pe,ze,He){var Ye=this;xe!=="readonly"&&Xe.forEach(function(tt){tt=(tt=Pe[tt])===null||tt===void 0?void 0:tt.yProps,tt&&(Xe=Xe.concat(tt.map(function(ct){return ct.updatesTable})))}),this.db=de,this.mode=xe,this.storeNames=Xe,this.schema=Pe,this.chromeTransactionDurability=ze,this.idbtrans=null,this.on=Ve(this,"complete","error","abort"),this.parent=He||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Ct(function(tt,ct){Ye._resolve=tt,Ye._reject=ct}),this._completion.then(function(){Ye.active=!1,Ye.on.complete.fire()},function(tt){var ct=Ye.active;return Ye.active=!1,Ye.on.error.fire(tt),Ye.parent?Ye.parent._reject(tt):ct&&Ye.idbtrans&&Ye.idbtrans.abort(),vt(tt)})})),this.Version=(ve=this,Je(Lr.prototype,function(xe){this.db=ve,this._cfg={version:xe,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(Te=this,Je(Ca.prototype,function(xe,Xe,Pe){if(this.db=Te,this._ctx={table:xe,index:Xe===":id"?null:Xe,or:Pe},this._cmp=this._ascending=Hn,this._descending=function(ze,He){return Hn(He,ze)},this._max=function(ze,He){return 0<Hn(ze,He)?ze:He},this._min=function(ze,He){return Hn(ze,He)<0?ze:He},this._IDBKeyRange=Te._deps.IDBKeyRange,!this._IDBKeyRange)throw new ue.MissingAPI})),this.on("versionchange",function(xe){0<xe.newVersion?console.warn("Another connection wants to upgrade database '".concat(P.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(P.name,"'. Closing db now to resume the delete request.")),P.close({disableAutoOpen:!1})}),this.on("blocked",function(xe){!xe.newVersion||xe.newVersion<xe.oldVersion?console.warn("Dexie.delete('".concat(P.name,"') was blocked")):console.warn("Upgrade '".concat(P.name,"' blocked by other connection holding version ").concat(xe.oldVersion/10))}),this._maxKey=Ti(R.IDBKeyRange),this._createTransaction=function(xe,Xe,Pe,ze){return new P.Transaction(xe,Xe,Pe,P._options.chromeTransactionDurability,ze)},this._fireOnBlocked=function(xe){P.on("blocked").fire(xe),lt.filter(function(Xe){return Xe.name===P.name&&Xe!==P&&!Xe._state.vcFired}).map(function(Xe){return Xe.on("versionchange").fire(xe)})},this.use(pre),this.use(bre),this.use(gre),this.use(mre),this.use(hre);var Ge=new Proxy(this,{get:function(xe,Xe,Pe){if(Xe==="_vip")return!0;if(Xe==="table")return function(He){return zb(P.table(He),Ge)};var ze=Reflect.get(xe,Xe,Pe);return ze instanceof qe?zb(ze,Ge):Xe==="tables"?ze.map(function(He){return zb(He,Ge)}):Xe==="_createTransaction"?function(){return zb(ze.apply(this,arguments),Ge)}:ze}});
1189this.vip=Ge,V.forEach(function(xe){return xe(P)})}var Hb,ul=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",wre=(QS.prototype.subscribe=function(_,R,P){return this._subscribe(_&&typeof _!="function"?_:{next:_,error:R,complete:P})},QS.prototype[ul]=function(){return this},QS);function QS(_){this._subscribe=_}try{Hb={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Hb={indexedDB:null,IDBKeyRange:null}}function l5(_){var R,P=!1,V=new wre(function(Z){var Q=oe(_),de,ve=!1,Te={},Oe={},Ge={get closed(){return ve},unsubscribe:function(){ve||(ve=!0,de&&de.abort(),xe&&Mt.storagemutated.unsubscribe(Pe))}};Z.start&&Z.start(Ge);var xe=!1,Xe=function(){return we(ze)},Pe=function(He){mf(Te,He),Ym(Oe,Te)&&Xe()},ze=function(){var He,Ye,tt;!ve&&Hb.indexedDB&&(Te={},He={},de&&de.abort(),de=new AbortController,tt=function(ct){var yt=Dn();try{Q&&vn();var Tt=_t(_,ct);return Tt=Q?Tt.finally(An):Tt}finally{yt&&or()}}(Ye={subscr:He,signal:de.signal,requery:Xe,querier:_,trans:null}),Promise.resolve(tt).then(function(ct){P=!0,R=ct,ve||Ye.signal.aborted||(Te={},function(yt){for(var Tt in yt)if(f(yt,Tt))return;return 1}(Oe=He)||xe||(Mt(zt,Pe),xe=!0),we(function(){return!ve&&Z.next&&Z.next(ct)}))},function(ct){P=!1,["DatabaseClosedError","AbortError"].includes(ct==null?void 0:ct.name)||ve||we(function(){ve||Z.error&&Z.error(ct)})}))};return setTimeout(Xe,0),Ge});return V.hasValue=function(){return P},V.getValue=function(){return R},V}var hf=mu;function JS(_){var R=gd;try{gd=!0,Mt.storagemutated.fire(_),qS(_,!0)}finally{gd=R}}m(hf,r(r({},Ae),{delete:function(_){return new hf(_,{addons:[]}).delete()},exists:function(_){return new hf(_,{addons:[]}).open().then(function(R){return R.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(_){try{return R=hf.dependencies,P=R.indexedDB,R=R.IDBKeyRange,(Vr(P)?Promise.resolve(P.databases()).then(function(V){return V.map(function(Z){return Z.name}).filter(function(Z){return Z!==wt})}):Bn(P,R).toCollection().primaryKeys()).then(_)}catch{return vt(new ue.MissingAPI)}var R,P},defineClass:function(){return function(_){c(this,_)}},ignoreTransaction:function(_){return xt.trans?Be(xt.transless,_):_()},vip:Wa,async:function(_){return function(){try{var R=YS(_.apply(this,arguments));return R&&typeof R.then=="function"?R:Ct.resolve(R)}catch(P){return vt(P)}}},spawn:function(_,R,P){try{var V=YS(_.apply(P,R||[]));return V&&typeof V.then=="function"?V:Ct.resolve(V)}catch(Z){return vt(Z)}},currentTransaction:{get:function(){return xt.trans||null}},waitFor:function(_,R){return R=Ct.resolve(typeof _=="function"?hf.ignoreTransaction(_):_).timeout(R||6e4),xt.trans?xt.trans.waitFor(R):R},Promise:Ct,debug:{get:function(){return X},set:function(_){le(_)}},derive:v,extend:c,props:m,override:w,Events:Ve,on:Mt,liveQuery:l5,extendObservabilitySet:mf,getByKeyPath:N,setByKeyPath:k,delByKeyPath:function(_,R){typeof R=="string"?k(_,R,void 0):"length"in R&&[].map.call(R,function(P){k(_,P,void 0)})},shallowClone:C,deepClone:L,getObjectDiff:KS,cmp:Hn,asap:S,minKey:-1/0,addons:[],connections:lt,errnames:ce,dependencies:Hb,cache:kc,semVer:"4.2.1",version:"4.2.1".split(".").map(function(_){return parseInt(_)}).reduce(function(_,R,P){return _+R/Math.pow(10,2*P)})})),hf.maxKey=Ti(hf.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Mt(zt,function(_){gd||(_=new CustomEvent(cn,{detail:_}),gd=!0,dispatchEvent(_),gd=!1)}),addEventListener(cn,function(_){_=_.detail,gd||JS(_)}));var Km,gd=!1,c5=function(){};return typeof BroadcastChannel<"u"&&((c5=function(){(Km=new BroadcastChannel(cn)).onmessage=function(_){return _.data&&JS(_.data)}})(),typeof Km.unref=="function"&&Km.unref(),Mt(zt,function(_){gd||Km.postMessage(_)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(_){if(!mu.disableBfCache&&_.persisted){Km!=null&&Km.close();for(var R=0,P=lt;R<P.length;R++)P[R].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(_){!mu.disableBfCache&&_.persisted&&(c5(),JS({all:new Sr(-1/0,[[]])}))})),Ct.rejectionMapper=function(_,R){return!_||_ instanceof se||_ instanceof TypeError||_ instanceof SyntaxError||!_.name||!Ie[_.name]?_:(R=new Ie[_.name](R||_.message,_),"stack"in _&&g(R,"stack",{get:function(){return this.inner.stack}}),R)},le(X),r(mu,Object.freeze({__proto__:null,Dexie:mu,liveQuery:l5,Entity:Cn,cmp:Hn,PropModification:En,replacePrefix:function(_,R){return new En({replacePrefix:[_,R]})},add:function(_){return new En({add:_})},remove:function(_){return new En({remove:_})},default:mu,RangeSet:Sr,mergeRanges:ro,rangesOverlap:jl}),{default:mu}),mu})})(gB);var Sce=gB.exports;const CR=id(Sce),o$=Symbol.for("Dexie"),xE=globalThis[o$]||(globalThis[o$]=CR);if(CR.semVer!==xE.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${CR.semVer} and ${xE.semVer}`);const{liveQuery:Cce,mergeRanges:BKe,rangesOverlap:jKe,RangeSet:WKe,cmp:GKe,Entity:qKe,PropModification:YKe,replacePrefix:KKe,add:ZKe,remove:XKe,DexieYProvider:QKe}=xE;let Qe={base:null,isReady:!1,action:{set:ta.noop,get:ta.noop,selfDestruct:()=>new Promise((e,t)=>
1189e())},$dexie:{action:{get:ta.noop}},isResetting:!1};const l$=za.dexieDatabaseName,Zb=.6,mC=[{$id:"Assets-General-All",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]},{key:"teamID",targets:["$team_id"]}]},{$id:"Assets-RecentlyViewed-All",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]}]},{$id:"Assets-RecentlyViewed-Team",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]},{key:"teamID",targets:["$team_id"]}]},{$id:"Assets-LastUpdated-All",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]}]},{$id:"Assets-LastUpdated-Team",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]},{key:"teamID",targets:["$team_id"]}]},{$id:"Assets-Favorited-All",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]}]},{$id:"Assets-Favorited-Team",DBversion:5,keyValue:"$id",indexes:[{key:"assetName",targets:["name"]},{key:"teamID",targets:["$team_id"]}]},{$id:"Collections",DBversion:5,keyValue:"$id",indexes:[{key:"collectionName",targets:["name"]},{key:"teamID",targets:["$team_id"]}]},{$id:"Tags",DBversion:5,keyValue:"$id",indexes:[{key:"tagName",targets:["name"]},{key:"teamID",targets:["$team_id"]}]}];if(!("indexedDB"in window))console.warn("This browser doesn't support IndexedDB");else{const e=parseFloat(localStorage.getItem("localDB_version")||"0");if(e<Zb){console.warn(`Upgrading DB from ${e} to ${Zb} - Forcing Cleanup & Logout`),localStorage.clear(),localStorage.setItem("localDB_version",Zb);const t=window.indexedDB.deleteDatabase("firebaseLocalStorageDb"),n=()=>window.location.reload();t.onsuccess=n,t.onerror=n,t.onblocked=n}else{Qe.$dexie.base=new xE(l$);let t={};mC.forEach(({DBversion:r,$id:a,keyValue:s,indexes:i})=>{let l=s;i.forEach(c=>{c.targets&&c.targets.length>0&&(l+=", "+c.targets.join("+"))}),t[a]=l}),Qe.$dexie.base.version(Zb).stores(t),Qe.action.set=({tableID:r,dataList:a=[],options:s={}})=>Qe.$dexie.base.transaction("rw",r,async()=>{const i=Qe.$dexie.base[r];if(s.skipClear){const l=a.map((c,u)=>{let d={...c};return s.preserveLocalDB||(d.$localDB={}),s.includeIndex&&(d.$localDB||(d.$localDB={}),d.$localDB.$index=u),s.additionalData&&Object.assign(d,s.additionalData),d});await i.bulkPut(l)}else{const c=(await i.toArray()).filter(m=>m.$optimistic),u=new Set(a.map(m=>m.$id)),d=c.filter(m=>!u.has(m.$id));await i.clear();const f=[...d,...a].map((m,h)=>{let g={...m};return s.preserveLocalDB||(g.$localDB={}),s.includeIndex&&(g.$localDB||(g.$localDB={}),g.$localDB.$index=h),s.additionalData&&Object.assign(g,s.additionalData),g});await i.bulkPut(f)}}),Qe.action.delete=({tableID:r,id:a})=>Qe.$dexie.base[r].delete(a),Qe.action.selfDestruct=(r={})=>Promise.all(mC.map(a=>Qe.$dexie.base[a.$id].clear())),Qe.$dexie.base.open().catch(r=>{console.error("Dexie Failed to Open",r),(r.name==="UpgradeError"||r.name==="VersionError"||r.name==="SchemaError")&&n()}),Qe.base=Qe.$dexie.base,Qe.isReady=!0,Qe.$dexie.base.on("blocked",()=>{console.error("##### Dexie blocked #####"),n()});const n=()=>
1189{if(Qe.isResetting)return;Qe.isResetting=!0,console.warn("##### Critical Database Error - Resetting... #####"),Qe.$dexie.base&&Qe.$dexie.base.close(),window.indexedDB.deleteDatabase("firebaseLocalStorageDb");const r=window.indexedDB.deleteDatabase(l$);r.onsuccess=()=>window.location.reload(),r.onerror=()=>window.location.reload(),r.onblocked=()=>window.location.reload()};Qe.$dexie.action.delete=Qe.action.delete,Qe.$dexie.action.get=({tableID:r,options:a={}})=>{if(Qe.isResetting)return new Promise(()=>{});let s=null,i=a.filters?[...a.filters]:[];const l=mC.find(c=>c.$id===r);if(l){const c=i.findIndex(u=>u.type==="match"&&l.indexes.some(d=>d.targets.includes(u.key)));if(c>-1){const u=i[c],d=l.indexes.find(f=>f.targets.includes(u.key));try{s=Qe.$dexie.base[r].where(d.targets.join("+")).equals(u.value)}catch{s=null}}}if(!s)try{s=Qe.$dexie.base[r].toCollection()}catch(c){if(c.name==="DatabaseClosedError")return console.warn("Database closed during query - likely resetting."),new Promise(()=>{});throw c}return i.length>0&&(s=s.filter(c=>i.every(u=>u.type==="boolean"?c[u.key]:u.type==="existence"?!ta.isUndefined(c[u.key])&&!ta.isNull(c[u.key]):u.type==="array-containment"?u.value.includes(c[u.key]):u.type==="array-intersection"?c[u.key].filter(d=>u.value.some(f=>f.$id===d.$id)).length>=u.value.length:u.type==="match"?c[u.key]===u.value:!0))),Promise.race([s.sortBy("$localDB.$index"),new Promise((c,u)=>setTimeout(()=>u(new Error("DB_TIMEOUT")),5e3))]).catch(c=>{if(c.message==="DB_TIMEOUT")return console.error("Database query timed out - enforcing reset"),n(),new Promise(()=>{});throw c})}}}const Nce=Object.freeze(Object.defineProperty({__proto__:null,default:Qe},Symbol.toStringTag,{value:"Module"}));function dl(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var c$=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),hC=function(){return Math.random().toString(36).substring(7).split("").join(".")},u$={INIT:"@@redux/INIT"+hC(),REPLACE:"@@redux/REPLACE"+hC(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+hC()}};function Rce(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function vB(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(dl(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(dl(1));return n(vB)(e,t)}if(typeof e!="function")throw new Error(dl(2));var a=e,s=t,i=[],l=i,c=!1;function u(){l===i&&(l=i.slice())}function d(){if(c)throw new Error(dl(3));return s}function f(v){if(typeof v!="function")throw new Error(dl(4));if(c)throw new Error(dl(5));var y=!0;return u(),l.push(v),function(){if(y){if(c)throw new Error(dl(6));y=!1,u();var E=l.indexOf(v);l.splice(E,1),i=null}}}function m(v){if(!Rce(v))throw new Error(dl(7));if(typeof v.type>"u")throw new Error(dl(8));if(c)throw new Error(dl(9));try{c=!0,s=a(s,v)}finally{c=!1}for(var y=i=l,b=0;b<y.length;b++){var E=y[b];E()}return v}function h(v){if(typeof v!="function")throw new Error(dl(10));a=v,m({type:u$.REPLACE})}function g(){var v,y=f;return v={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(dl(11));function w(){E.next&&E.next(d())}w();var x=y(w);return{unsubscribe:x}}},v[c$]=function(){return this},v}return m({type:u$.INIT}),r={dispatch:m,subscribe:f,getState:d,replaceReducer:h},r[c$]=g,r}function Tce(e={FB:{auth:{user:null,context:{},globalMeta:{},parsedMeta:{},isLoggedIn:!1,isLoading:!1,isLive:!1},images:{previouslyLoaded:{}}},UI:{user:{isAllTeam:!1,activeTeam:{id:null,name:null}}},SW:{active:!1},redirect:{assetGO:null,organizationSubscribe:null,skipAPIredirect:!1,retainedPreviousURL:{UID:null,isApplicableView:!1,pathname:null,params:{}}}},t){var a,s,i,l,c,u,d,f,m,h,g,v,y,b,E,w,x,S,N,k,C,A,O,T,M,L,D,j,H,Y,z,K,ee;if(t.type==="auth/setLoginState"){let oe={subscriptionStates:{},subscriptionStatesResolved:!1};const J=!((a=t==null?void 0:t.data)!=null&&a.isLoggedIn);if((i=(s=t==null?void 0:t.data)==null?void 0:s.globalMeta)!=null&&i.organizations&&((c=(l=t==null?void 0:t.data)==null?void 0:l.globalMeta)!=null&&c.teams)){let se={},B={};for(var n=0;n<t.data.globalMeta.organizations.length;n++){let U=t.data.globalMeta.organizations[n];se[U.id]=U.subscription}for(var r=0;r<t.data.globalMeta.teams.length;r++){let U=t.data.globalMeta.teams[r],$=se[(u=U==null?void 0:U.organization)==null?void 0:u.$id];B[U.id]=$?{active:$.active,plan:$.plan}:null}oe.subscriptionStates.organizations=se,oe.subscriptionStates.teams=B,oe.subscriptionStatesResolved=!0}else J&&(oe.subscriptionStatesResolved=!0);return{...e,FB:{auth:{user:((d=t==null?void 0:t.data)==null?void 0:d.currentUser)||null,context:((f=t==null?void 0:t.data)==null?void 0:f.userContext)||{},globalMeta:((m=t==null?void 0:t.data)==null?void 0:m.globalMeta)||{},parsedMeta:oe,isLoggedIn:((h=t==null?void 0:t.data)==null?void 0:h.isLoggedIn)||!1,isLoading:((g=t==null?void 0:t.data)==null?void 0:g.isLoading)||!1,isLive:!0},images:e.FB.images}}}else if(t.type==="auth/resetInitialIsLive"){let oe=e;return oe.FB.auth.isLive=!1,oe}else if(t.type==="auth/updateTeamField"){const{teamID:oe,field:J,value:se}=t.data||{};if(!oe||!J)return e;const U=(((b=(y=(v=e==null?void 0:e.FB)==null?void 0:v.auth)==null?void 0:y.globalMeta)==null?void 0:b.teams)||[]).map($=>String($.id)===String(oe)?{...$,[J]:se}:$);return{...e,FB:{...e.FB,auth:{...e.FB.auth,globalMeta:{...e.FB.auth.globalMeta,teams:U}}}}}else{if(t.type==="sw/setActive")return{...e,SW:{active:((E=t==null?void 0:t.data)==null?void 0:E.active)||!1}};if(t.type==="images/setPreviouslyLoadedImages"){let oe=e.FB.images.previouslyLoaded;return(w=t==null?void 0:t.data)!=null&&w.storagePath&&((x=t==null?void 0:t.data)!=null&&x.url)&&(oe[t.data.storagePath]=t.data.url),{...e,FB:{auth:e.FB.auth,images:{previouslyLoaded:oe}}}}else if(t.type==="ui/setUser_allTeam"){let oe=!((S=t==null?void 0:t.data)!=null&&S.setToFalse);return localStorage.setItem("userLoader-isAllTeam",oe),{...e,UI:{user:{isAllTeam:oe,activeTeam:e.UI.user.activeTeam}}}}else if(t.type==="ui/setUser_currentTeam"){if((N=t==null?void 0:t.data)!=null&&N.id&&localStorage.getItem("userLoader-teamsList")){let J=JSON.parse(localStorage.getItem("userLoader-teamsList"))||[];for(var n=0;n<J.length;n++)J[n].lastViewed=J[n].id===t.data.id;localStorage.setItem("userLoader-teamsList",JSON.stringify(J))}let oe=(k=t==null?void 0:t.data)!=null&&k.skipSetAllTeam?e.UI.user.isAllTeam:!1;return localStorage.setItem("userLoader-isAllTeam",oe),{...e,UI:{user:{isAllTeam:oe,activeTeam:{i
1189d:((C=t==null?void 0:t.data)==null?void 0:C.id)||null,name:((A=t==null?void 0:t.data)==null?void 0:A.name)||null,invitationCode:((O=t==null?void 0:t.data)==null?void 0:O.invitationCode)!==void 0?t.data.invitationCode:((T=e.UI.user.activeTeam)==null?void 0:T.invitationCode)||null,legacyInviteCode:((M=t==null?void 0:t.data)==null?void 0:M.legacyInviteCode)!==void 0?t.data.legacyInviteCode:((L=e.UI.user.activeTeam)==null?void 0:L.legacyInviteCode)||null}}}}}else return t.type==="ui/setAssetGO_assetID"?{...e,redirect:{assetGO:((D=t==null?void 0:t.data)==null?void 0:D.assetID)||null,organizationSubscribe:e.redirect.organizationSubscribe,skipAPIredirect:e.redirect.skipAPIredirect,retainedPreviousURL:e.redirect.retainedPreviousURL}}:t.type==="ui/setOrganizationSubscribe_organizationID"?{...e,redirect:{assetGO:e.redirect.assetGO,organizationSubscribe:((j=t==null?void 0:t.data)==null?void 0:j.organizationID)||null,skipAPIredirect:e.redirect.skipAPIredirect,retainedPreviousURL:e.redirect.retainedPreviousURL}}:t.type==="ui/setsRedirect_skip"?{...e,redirect:{assetGO:e.redirect.assetGO,organizationSubscribe:e.redirect.organizationSubscribe,skipAPIredirect:((H=t==null?void 0:t.data)==null?void 0:H.isSkipping)||!1,retainedPreviousURL:e.redirect.retainedPreviousURL}}:t.type==="ui/setsRedirect_retainedURL"?{...e,redirect:{assetGO:e.redirect.assetGO,organizationSubscribe:e.redirect.organizationSubscribe,skipAPIredirect:e.redirect.skipAPIredirect,retainedPreviousURL:{UID:((Y=t==null?void 0:t.data)==null?void 0:Y.UID)||null,isApplicableView:((z=t==null?void 0:t.data)==null?void 0:z.isApplicableView)||!1,pathname:((K=t==null?void 0:t.data)==null?void 0:K.pathname)||null,params:((ee=t==null?void 0:t.data)==null?void 0:ee.params)||[]}}}:e}}let Zn=vB(Tce);var ft=typeof window<"u"?window:void 0,Hs=typeof globalThis<"u"?globalThis:ft;typeof self>"u"&&(Hs.self=Hs),typeof File>"u"&&(Hs.File=function(){});var Bi=Hs==null?void 0:Hs.navigator,_n=Hs==null?void 0:Hs.document,ys=Hs==null?void 0:Hs.location,NR=Hs==null?void 0:Hs.fetch,RR=Hs!=null&&Hs.XMLHttpRequest&&"withCredentials"in new Hs.XMLHttpRequest?Hs.XMLHttpRequest:void 0,d$=Hs==null?void 0:Hs.AbortController,Ace=Hs==null?void 0:Hs.CompressionStream,lo=Bi==null?void 0:Bi.userAgent,Kn=ft??{},f$="1.396.5",cs={DEBUG:!1,LIB_VERSION:f$,LIB_NAME:"web",JS_SDK_VERSION:f$};function m$(e,t,n,r,a,s,i){try{var l=e[s](i),c=l.value}catch(u){return void n(u)}l.done?t(c):Promise.resolve(c).then(r,a)}function Ls(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var s=e.apply(t,n);function i(c){m$(s,r,a,i,l,"next",c)}function l(c){m$(s,r,a,i,l,"throw",c)}i(void 0)})}}function Qt(){return Qt=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qt.apply(null,arguments)}function yB(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var h$=e=>{if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}};function p$(e){return typeof e=="string"||e}function g$(e){return typeof e=="string"?e:void 0}var Kg,ku=function(e){return e.AnonymousId="anonymous_id",e.DistinctId="distinct_id",e.Props="props",e.EnablePersonProcessing="enable_person_processing",e.PersonMode="person_mode",e.FeatureFlagDetails="feature_flag_details",e.FeatureFlags="feature_flags",e.FeatureFlagPayloads="feature_flag_payloads",e.BootstrapFeatureFlagDetails="bootstrap_feature_flag_details",e.BootstrapFeatureFlags="bootstrap_feature_flags",e.BootstrapFeatureFlagPayloads="bootstrap_feature_flag_payloads",e.OverrideFeatureFlags="override_feature_flags",e.Queue="queue",e.LogsQueue="logs_queue",e.OptedOut="opted_out",e.SessionId="session_id",e.SessionStartTimestamp="session_start_timestamp",e.SessionLastTimestamp="session_timestamp",e.PersonProperties="person_properties",e.GroupProperties="group_properties",e.InstalledAppBuild="installed_app_build",e.InstalledAppVersion="installed_app_version",e.SessionReplay="session_replay",e.SessionReplayEventTriggerActivatedSession="session_replay_event_trigger_activated_session",e.SurveyLastSeenDate="survey_last_seen_date",e.SurveysSeen="surveys_seen",e.Surveys="surveys",e.RemoteConfig="remote_config",e.FlagsEndpointWasHit="flags_endpoint_was_hit",e.DeviceId="device_id",e}({}),v$=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),Ice=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],Oce=["token"],bB="NativeGzipValidationError",TR=e=>e.length>=2&&e[0]===31&&e[1]===139,y$=(e,t)=>
1189e===v$.GZipJS||t===v$.GZipJS||t==="gzip",b$=e=>!(!e||typeof e!="object")&&("name"in e?String(e.name):"")==="NotReadableError",Xb=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=bB,t},Mce=function(){var e=Ls(function*(t,n){18>t.size&&Xb("too-short");var r=new Uint8Array(yield t.slice(0,10).arrayBuffer());TR(r)&&r[2]===8||Xb("invalid-header");var a=new DataView(yield t.slice(t.size-8).arrayBuffer());a.getUint32(0,!0)!==(i=>{for(var l=(()=>{if(Kg)return Kg;Kg=[];for(var d=0;256>d;d++){for(var f=d,m=0;8>m;m++)f=1&f?3988292384^f>>>1:f>>>1;Kg[d]=f>>>0}return Kg})(),c=4294967295,u=0;i.length>u;u++)c=l[255&(c^i[u])]^c>>>8;return(4294967295^c)>>>0})(n)&&Xb("invalid-crc");var s=n.length>>>0;a.getUint32(4,!0)!==s&&Xb("invalid-size")});return function(t,n){return e.apply(this,arguments)}}();function AR(){return AR=Ls(function*(e,t,n){t===void 0&&(t=!0);try{var r=new TextEncoder().encode(e),a=new CompressionStream("gzip"),s=a.writable.getWriter(),i=s.write(r).then(()=>s.close()).catch(function(){var u=Ls(function*(d){try{yield s.abort(d)}catch{}throw d});return function(d){return u.apply(this,arguments)}}()),l=new Response(a.readable).blob(),[c]=yield Promise.all([l,i]);return yield Mce(c,r),c}catch(u){if(n!=null&&n.rethrow)throw u;return t&&console.error("Failed to gzip compress data",u),null}}),AR.apply(this,arguments)}var Pce=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],w$=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return Pce.concat(t).some(r=>{var a=r.toLowerCase();return n.indexOf(a)!==-1})};function dr(e,t){return e.indexOf(t)!==-1}var ck=function(e){return e.trim()},IR=function(e){return e.replace(/^\$/,"")},wB=Object.prototype,EB=wB.hasOwnProperty,uk=wB.toString,Ur=Array.isArray||function(e){return uk.call(e)==="[object Array]"},Ic=e=>typeof e=="function",Da=e=>e===Object(e)&&!Ur(e),Id=e=>{if(Da(e)){for(var t in e)if(EB.call(e,t))return!1;return!0}return!1},on=e=>e===void 0,_a=e=>uk.call(e)=="[object String]",OR=e=>_a(e)&&e.trim().length===0,qi=e=>e===null,Ar=e=>on(e)||qi(e),Yi=e=>uk.call(e)=="[object Number]"&&e==e,xu=e=>Yi(e)&&e>0,Bc=e=>uk.call(e)==="[object Boolean]",Dce=e=>e instanceof FormData,Lce=e=>dr(Ice,e),$ce=e=>dr(Oce,e);function xB(e){return e===null||typeof e!="object"}function _E(e,t){return{}.toString.call(e)==="[object "+t+"]"}function EP(e){return typeof Event<"u"&&function(t,n){try{return t instanceof n}catch{return!1}}(e,Event)}var Fce=[!0,"true",1,"1","yes"],pC=e=>dr(Fce,e),zce=[!1,"false",0,"0","no"];function Fc(e,t,n,r,a){return t>n&&(r.warn("min cannot be greater than max."),t=n),Yi(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+a),Fc(a||n,t,n,r))}class Hce{constructor(t){this.Ee={},this.Pe=t.Pe,this.Fe=Fc(t.bucketSize,0,100,t.Ae),this.$e=Fc(t.refillRate,0,this.Fe,t.Ae),this.De=Fc(t.refillInterval,0,864e5,t.Ae)}Ne(t,n){var r=Math.floor((n-t.lastAccess)/this.De);r>0&&(t.tokens=Math.min(t.tokens+r*this.$e,this.Fe),t.lastAccess=t.lastAccess+r*this.De)}consumeRateLimit(t){var n,r=Date.now(),a=String(t),s=this.Ee[a];return s?this.Ne(s,r):this.Ee[a]=s={tokens:this.Fe,lastAccess:r},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.Pe)==null||n.call(this,t)),s.tokens===0)}stop(){this.Ee={}}}var Go="Mobile",kE="iOS",Fu="Android",Tp="Tablet",_B=Fu+" "+Tp,kB="iPad",SB="Apple",CB=SB+" Watch",W0="Safari",Ap="BlackBerry",NB="Samsung",RB=NB+"Browser",TB=NB+" Internet",nm="Chrome",Vce=nm+" OS",AB=nm+" "+kE,xP="Internet Explorer",IB=xP+" "+Go,_P="Opera",Uce=_P+" Mini",kP="Edge",OB="Microsoft "+kP,jh="Firefox",MB=jh+" "+kE,Mv="Nintendo",Pv="PlayStation",Wh="Xbox",PB=Fu+" "+Go,DB=Go+" "+W0,_0="Windows",MR=_0+" Phone",E$="Nokia",PR="Ouya",LB="Generic",Bce=LB+" "+Go.toLowerCase(),$B=LB+" "+Tp.toLowerCase(),DR="Konqueror",FB="Oculus Browser",SE="Vivaldi",zB="Yandex",CE="Whale",LR="DuckDuckGo",HB="Pale Moon",NE="Waterfox",G0="Brave",VB="Google Search App",qa="(\\d+(\\.\\d+)?)",gC=new RegExp("Version/"+qa),jce=new RegExp(Wh,"i"),Wce=new RegExp(Pv+" \\w+","i"),Gce=new RegExp(Mv+" \\w+","i"),SP=new RegExp(Ap+"|PlayBook|BB10","i"),qce={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},UB=function(e,t,n,r){t=t||"";var a=function(s){return s!=null&&s.brave?G0:null}(n);return a||(r!=null&&r.detectGoogleSearchApp&&dr(e,"GSA/")?VB:dr(e," OPR/")&&dr(e,"Mini")?Uce:dr(e," OPR/")?_P:SP.test(e)?Ap:dr(e,"IE"+Go)||dr(e,"WPDesktop")?IB:dr(e,"OculusBrowser")?FB:dr(e,RB)?TB:dr(e,kP)||dr(e,"Edg/")?OB:dr(e,
1189SE+"/")?SE:dr(e,"YaBrowser/")?zB:dr(e,CE+"/")?CE:dr(e,LR+"/")||dr(e,"Ddg/")?LR:dr(e,"FBIOS")?"Facebook "+Go:dr(e,"UCWEB")||dr(e,"UCBrowser")?"UC Browser":dr(e,"CriOS")?AB:dr(e,"CrMo")||dr(e,nm)?nm:dr(e,Fu)&&dr(e,W0)?PB:dr(e,"FxiOS")?MB:dr(e.toLowerCase(),DR.toLowerCase())?DR:dr(e,G0+"/")?G0:((s,i)=>i&&dr(i,SB)||function(l){return dr(l,W0)&&!dr(l,nm)&&!dr(l,Fu)}(s))(e,t)?dr(e,Go)?DB:W0:dr(e,"PaleMoon/")?HB:dr(e,NE+"/")?NE:dr(e,jh)?jh:dr(e,"MSIE")||dr(e,"Trident/")?xP:dr(e,"Gecko")?jh:"")},Yce={[IB]:[new RegExp("rv:"+qa)],[OB]:[new RegExp(kP+"?\\/"+qa)],[nm]:[new RegExp("("+nm+"|CrMo)\\/"+qa)],[AB]:[new RegExp("CriOS\\/"+qa)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+qa)],[W0]:[gC],[DB]:[gC],[_P]:[new RegExp("(Opera|OPR)\\/"+qa)],[jh]:[new RegExp(jh+"\\/"+qa)],[MB]:[new RegExp("FxiOS\\/"+qa)],[DR]:[new RegExp("Konqueror[:/]?"+qa,"i")],[Ap]:[new RegExp(Ap+" "+qa),gC],[PB]:[new RegExp("android\\s"+qa,"i")],[TB]:[new RegExp(RB+"\\/"+qa)],[FB]:[new RegExp("OculusBrowser\\/"+qa)],[SE]:[new RegExp(SE+"\\/"+qa)],[zB]:[new RegExp("YaBrowser\\/"+qa)],[CE]:[new RegExp(CE+"\\/"+qa)],[G0]:[new RegExp(G0+"\\/"+qa)],[LR]:[new RegExp("(DuckDuckGo|Ddg)\\/"+qa)],[HB]:[new RegExp("PaleMoon\\/"+qa)],[NE]:[new RegExp(NE+"\\/"+qa)],[VB]:[new RegExp("GSA\\/"+qa)],[xP]:[new RegExp("(rv:|MSIE )"+qa)],Mozilla:[new RegExp("rv:"+qa)]},Kce=function(e,t,n,r){var a=UB(e,t,n,r),s=Yce[a];if(on(s))return null;for(var i=0;s.length>i;i++){var l=e.match(s[i]);if(l)return parseFloat(l[l.length-2])}return null},x$=[[new RegExp(Wh+"; "+Wh+" (.*?)[);]","i"),e=>[Wh,e&&e[1]||""]],[new RegExp(Mv,"i"),[Mv,""]],[new RegExp(Pv,"i"),[Pv,""]],[SP,[Ap,""]],[new RegExp(_0,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[MR,""];if(new RegExp(Go).test(t)&&!/IEMobile\b/.test(t))return[_0+" "+Go,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=qce[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[_0,r]}return[_0,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[kE,[e[3],e[4],e[5]||"0"].join(".")]:[kE,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=on(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Fu+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Fu+")","i"),e=>e&&e[2]?[Fu,[e[2],e[3],e[4]||"0"].join(".")]:[Fu,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Vce,""]],[/Linux|debian/i,["Linux",""]]],_$=function(e){return Gce.test(e)?Mv:Wce.test(e)?Pv:jce.test(e)?Wh:new RegExp(PR,"i").test(e)?PR:new RegExp("("+MR+"|WPDesktop)","i").test(e)?MR:/iPad/.test(e)?kB:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?CB:SP.test(e)?Ap:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(E$,"i").test(e)?E$:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(Go).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Fu:_B:new RegExp("(pda|"+Go+")","i").test(e)?Bce:new RegExp(Tp,"i").test(e)&&!new RegExp(Tp+" pc","i").test(e)?$B:""},Zce=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function k$(e,t){return typeof(n=e)=="string"&&Zce.test(n)?e:t();var n}function Kd(e){return e&&e.split("#")[0]}function vC(e,t){var n=setTimeout(e,t);return n!=null&&n.unref&&(n==null||n.unref()),n}var Xce=e=>e instanceof Error,BB={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},Qce=BB.info;function jB(e){if(Bc(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(Ur(e))return{arrayValue:{values:e.map(t=>jB(t))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function WB(e){var t=[];for(var n in e){var r=e[n];qi(r)||on(r)||t.push({key:n,value:jB(r)})}return t}
1189function Jce(e,t){var n=e.level||"info",{text:r,number:a}=BB[n]||Qce,s=String(Date.now())+"000000",i={};t.distinctId&&(i.posthogDistinctId=t.distinctId),t.sessionId&&(i.sessionId=t.sessionId),t.windowId&&(i["window.id"]=t.windowId),Ar(t.sessionStartTimestamp)||(i.sessionStartTimestamp=String(t.sessionStartTimestamp)),Ar(t.lastActivityTimestamp)||(i.lastActivityTimestamp=String(t.lastActivityTimestamp)),t.currentUrl&&(i["url.full"]=t.currentUrl),t.screenName&&(i["screen.name"]=t.screenName),t.appState&&(i["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(i.feature_flags=t.activeFeatureFlags);var l=Qt({},i,e.attributes||{}),c={timeUnixNano:s,observedTimeUnixNano:s,severityNumber:a,severityText:r,body:{stringValue:e.body},attributes:WB(l)};return e.trace_id&&(c.traceId=e.trace_id),e.span_id&&(c.spanId=e.span_id),on(e.trace_flags)||(c.flags=e.trace_flags),c}function GB(e,t,n){return Qt({},e.resourceAttributes,{"service.name":e.serviceName||"unknown_service"},e.environment&&{"deployment.environment":e.environment},e.serviceVersion&&{"service.version":e.serviceVersion},{"telemetry.sdk.name":t,"telemetry.sdk.version":n})}function qB(e,t,n,r){return{resourceLogs:[{resource:{attributes:WB(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}let eue=class{constructor(e,t,n,r,a,s,i){var l;s===void 0&&(s=()=>Promise.resolve()),this._instance=e,this.Se=t,this.Ae=n,this.qe=r,this.je=a,this.Be=s,this.He=i,this.Ue=null,this.ze=0,this.Ve=0,this.We=0,this.Ge=0,this.Ze=!1,this.Qe=t.maxBufferSize,this.Je=Math.max((l=t.maxQueueSize)!==null&&l!==void 0?l:t.maxBufferSize,t.maxBufferSize),this.Ye=t.flushIntervalMs,this.Ke=t.maxBatchRecordsPerPost,this.Xe=t.rateCapWindowMs,this.et=t.maxLogsPerInterval}reset(){this.tt(),this.Ue=null,this.We=0,this.Ge=0,this.Ze=!1,this.ze=0,this.Ve=0,this.Ke=this.Se.maxBatchRecordsPerPost}onReconnect(){this.Ve=0,this.rt()}captureLog(e){if(!this._instance.isDisabled&&!this._instance.optedOut&&e!=null&&e.body){var t=this.it(e);if(t!==null)if(t.body){if(this.nt()){var n={record:Jce(t,this.qe())};this.je(()=>this.st(n))}}else this.Ae.info("Log was rejected in beforeSend function")}}it(e){var t=this.Se.beforeSend;if(!t)return e;var n=Ur(t)?t:[t],r=e;for(var a of n)try{var s=a(r);if(!s)return this.Ae.info("Log was rejected in beforeSend function"),null;r=s}catch(i){return this.Ae.error("Error in beforeSend function for log:",i),null}return r}nt(){if(this.et===void 0)return!0;var e=Date.now(),t=e-this.We;return this.Xe>t&&t>=0||(this.We=e,this.Ge=0,this.Ze=!1),this.et>this.Ge?(this.Ge++,!0):(this.Ze||(this.Ae.warn("captureLog dropping logs: exceeded "+this.et+" logs per "+this.Xe+"ms"),this.Ze=!0),!1)}flush(){var e=this;return Ls(function*(){if(!e._instance.isDisabled)return e.Ue||(e.Ue=e.ot().finally(()=>{e.Ue=null})),e.Ue})()}ot(){var e=this;return Ls(function*(){var t;e.tt();var n=(t=e._instance.getPersistedProperty(ku.LogsQueue))!==null&&t!==void 0?t:[];if(n.length!==0)for(var r=n.length,a=0;n.length>0&&r>a;){var s,i;e.ze=0;var l=Math.min(n.length,e.Ke),c=n.slice(0,l),u=qB(c.map(f=>f.record),e.ut(),(s=e.He)!==null&&s!==void 0?s:e._instance.getLibraryId(),e._instance.getLibraryVersion()),d=yield e._instance.ht(u);if(d.kind==="too-large"&&c.length>1)e.Ke=Math.max(1,Math.floor(c.length/2)),e.Ae.warn("Received 413 when sending logs batch of size "+c.length+", reducing batch size to "+e.Ke);else if(d.kind==="retry-later"||(d.kind==="too-large"?e.Ae.warn("Dropping a single log record after 413 with batch size 1 â the record is larger than the server cap and cannot be split further."):d.kind==="ok"&&e.Se.maxBatchRecordsPerPost>e.Ke&&(e.Ke=Math.min(e.Se.maxBatchRecordsPerPost,e.Ke+1)),yield e.dt(c.length),n=(i=e._instance.getPersistedProperty(ku.LogsQueue))!==null&&i!==void 0?i:[],a+=c.length,d.kind==="fatal"))throw d.error}})()}dt(e){var t=this;return Ls(function*(){var n,r=Math.max(0,e-t.ze),a=(n=t._instance.getPersistedProperty(ku.LogsQueue))!==null&&n!==void 0?n:[];t._instance.setPersistedProperty(ku.LogsQueue,a.slice(r)),yield t.Be()})()}ut(){return GB(this.Se,this._instance.getLibraryId(),this._instance.getLibraryVersion())}st(e){var t;if(!this._instance.optedOut){var n=(t=this._instance.getPersistedProperty(ku.LogsQueue))!==null&&t!==void 0?t:[];this.Je>n.length||(n.shift(),this.ze++,this.Ae.info("Logs queue is full, dropping oldest record.")),n.push(e),this._instance.setPersistedProperty(ku.LogsQueue,n),this.Qe>n.length?this.ct():this.rt()}}ct(e){e===void 0&&(e=this.Ye),this.vt||(this.vt=vC(()=>{this.vt=void 0,this.rt()},e))}ft(){var e=Math.min(Math.max(0,this.Ve-1),6);return this.Ye*Math.pow(2,e)}yt(){var e=this._instance.getPersistedProperty(ku.LogsQueue);return!!e&&e.length>0}shutdown(e){var t=this;return Ls(function*(){t.tt();var n=t.flush().catch(()=>{});e!==void 0?yield Promise.race([n,new Promise(r=>vC(r,e))]):yield n})()}flushWithTimeout(e){var t=this;return Ls(function*(){var n=!1,r=t.flush(),a=new Promise(s=>vC(()=>{n=!0,s()},e));try{yield Promise.race([r,a])}finally{n&&r.catch(()=>{})}})()}rt(){this.flush().then(()=>{this.Ve=0},e=>{this.Ve++,this.Ae.error("PostHog logs flush failed:",e)}).finally(()=>
1189{!this._instance.isDisabled&&this.yt()&&this.ct(this.ft())})}tt(){this.vt&&(clearTimeout(this.vt),this.vt=void 0)}};var Qb,S$,yC;function tue(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return yC&&n.length===S$||(S$=n.length,yC=n.reduce((r,a)=>{Qb||(Qb={});var s=Qb[a];if(s)r[s[0]]=s[1];else for(var i=e(a),l=i.length-1;l>=0;l--){var c=i[l],u=c==null?void 0:c.filename,d=t[a];if(u&&d){r[u]=d,Qb[a]=[u,d];break}}return r},{})),yC}}let nue=class{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},a=this.buildCoercingContext(r,n,0).apply(t),s=this.buildParsingContext(n),i=this.parseStacktrace(a,s);return{$exception_list:this.convertToExceptionList(i,r),$exception_level:"error"}}modifyFrames(t){var n=this;return Ls(function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&Ur(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t})()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,a;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(a=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),Qt({},t,{cause:r,stack:a})}applyChunkIds(t,n){return t.map(r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return Ls(function*(){var r=t;for(var a of n.modifiers)r=yield a(r);return r})()}convertToExceptionList(t,n){var r,a,s,i={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(a=n.handled)===null||a===void 0||a,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(i.stacktrace={type:"raw",frames:t.stack});var l=[i];return t.cause!=null&&l.push(...this.convertToExceptionList(t.cause,Qt({},n,{handled:!0}))),l}buildParsingContext(t){var n;return{chunkIdMap:tue(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var a=(s,i)=>{if(4>=i){var l=this.buildCoercingContext(t,n,i);return this.applyCoercers(s,l)}};return Qt({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:s=>a(s,r),next:s=>a(s,r+1)})}};var Ip="?";function $R(e,t,n,r,a){var s={platform:e,filename:t,function:n==="<anonymous>"?Ip:n,in_app:!0};return on(r)||(s.lineno=r),on(a)||(s.colno=a),s}var YB=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ip,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},rue=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,aue=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,sue=/\((\S*)(?::(\d+))(?::(\d+))\)/,iue=(e,t)=>{var n=rue.exec(e);if(n){var[,r,a,s]=n;return $R(t,r,Ip,+a,+s)}var i=aue.exec(e);if(i){if(i[2]&&i[2].indexOf("eval")===0){var l=sue.exec(i[2]);l&&(i[2]=l[1],i[3]=l[2],i[4]=l[3])}var[c,u]=YB(i[1]||Ip,i[2]);return $R(t,u,c,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}},oue=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,lue=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,cue=(e,t)=>{var n=oue.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=lue.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var a=n[3],s=n[1]||Ip;return[s,a]=YB(s,a),$R(t,a,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},C$=/\(error: (.*)\)/;class uue{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=_a(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return _E(t,"DOMException")}isDOMError(t){return _E(t,"DOMError")}}class due{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(t){return t.stacktrace||t.stack||void 0}}class fue{constructor(){}match(t){return _E(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r;return n.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var mue=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class hue{match(t){return typeof t=="string"}coerce(t,n){var r,[a,s]=this.getInfos(t);return{type:a??"Error",value:s??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,a=t.match(mue);return a&&(n=a[1],r=a[2]),[n,r]}}var pue=["fatal","error","warning","log","info","debug"];
1189function KB(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var a=n.slice(0,r).join(", ");if(t>=a.length)return r===n.length?a:a.length>t?a.slice(0,t)+"...":a}return""}class gue{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,a=this.getErrorPropertyFromObject(t);return a?n.apply(a):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return EP(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+KB(t)}isSeverityLevel(t){return _a(t)&&!OR(t)&&pue.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if({}.hasOwnProperty.call(t,n)){var r=t[n];if(Xce(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class vue{match(t){return EP(t)}coerce(t,n){var r,a=t.constructor.name;return{type:a,value:a+" captured as exception with keys: "+KB(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class yue{match(t){return xB(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class bue{match(t){return _E(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!EP(t))return!1;try{var n=t.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(t,n){var r,a=this.getUnhandledRejectionReason(t);return xB(a)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(a),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(a)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var RE="$message",TE="$timestamp",wue=new Set([RE,TE]),bC={enabled:!0,max_bytes:32768};function AE(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:bC.enabled,max_bytes:xue(e.max_bytes,bC.max_bytes)}:Qt({},bC)}class Eue{constructor(t){this.bt=[],this._t=0,this.Se=AE(t)}setConfig(t){this.Se=AE(t),this.wt()}add(t){var n=function(a){var s,i,l;try{l=[],s=(i=JSON.stringify(a,function(m,h){if(typeof h=="bigint")return h.toString();if(typeof h!="function"&&typeof h!="symbol"){if(h instanceof Error)return{name:h.name,message:h.message,stack:h.stack};if(h&&typeof h=="object"){for(;l.length>0&&l[l.length-1]!==this;)l.pop();if(l.includes(h))return"[Circular]";l.push(h)}return h}}))!==null&&i!==void 0?i:"null"}catch{return}try{var c=JSON.parse(s);if(!Da(c))return;var u=c,d=u[RE],f=u[TE];return!_a(d)||d.trim().length===0||!_a(f)&&!Yi(f)?void 0:{step:u,json:s}}catch{return}}(t);if(n){var r=function(a){if(typeof TextEncoder<"u")return new TextEncoder().encode(a).length;for(var s=encodeURIComponent(a),i=0,l=0;s.length>l;l++)s[l]==="%"?(i+=1,l+=2):i+=1;return i}(n.json);r>this.Se.max_bytes||(this.bt.push({step:n.step,bytes:r}),this._t+=r,this.wt())}}getAttachable(){return this.bt.map(t=>t.step)}clear(){this.bt=[],this._t=0}size(){return this.bt.length}wt(){for(;this._t>this.Se.max_bytes&&this.bt.length>0;){var t=this.bt.shift();t&&(this._t-=t.bytes)}}}function xue(e,t){if(!Yi(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var ZB=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={k(a){if(ft&&(cs.DEBUG||Kn.POSTHOG_DEBUG||n)&&!on(ft.console)&&ft.console){for(var s=("__rrweb_original__"in ft.console[a])?ft.console[a].__rrweb_original__:ft.console[a],i=arguments.length,l=new Array(i>1?i-1:0),c=1;i>c;c++)l[c-1]=arguments[c];s(e,...l)}},debug(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.k("debug",...s)},info(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.k("log",...s)},warn(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.k("warn",...s)},error(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];r.k("error",...s)},critical(){for(var a=arguments.length,s=new Array(a),i=0;a>i;i++)s[i]=arguments[i];console.error(e,...s)},uninitializedWarning(a){r.error("You must initialize PostHog before calling "+a)},createLogger:(a,s)=>ZB(e+" "+a,s)};return r},sn=ZB("[PostHog.js]"),Qa=sn.createLogger,_ue=Qa("[ExternalScriptsLoader]"),wC=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return _ue.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=_n==null?void 0:_n.querySelectorAll("script");
1189if(r){for(var a,s=function(){if(r[i].src===t){var c=r[i];return c.__posthog_loading_callback_fired?{v:n()}:(c.addEventListener("load",u=>{c.__posthog_loading_callback_fired=!0,n(void 0,u)}),c.onerror=u=>n(u),{v:void 0})}},i=0;r.length>i;i++)if(a=s())return a.v}var l=()=>{if(!_n)return n("document not found");var c=_n.createElement("script");if(c.type="text/javascript",c.crossOrigin="anonymous",c.src=t,c.onload=f=>{c.__posthog_loading_callback_fired=!0,n(void 0,f)},c.onerror=f=>n(f),e.config.prepare_external_dependency_script&&(c=e.config.prepare_external_dependency_script(c)),!c)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")_n.head.appendChild(c);else{var u,d=_n.querySelectorAll("body > script");d.length>0?(u=d[0].parentNode)==null||u.insertBefore(c,d[0]):_n.body.appendChild(c)}};_n!=null&&_n.body?l():_n==null||_n.addEventListener("DOMContentLoaded",l)};Kn.__PosthogExtensions__=Kn.__PosthogExtensions__||{},Kn.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!=="remote-config"){var r;if(e.config.strict_script_versioning)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var a="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;a=a+"&t="+Math.floor(Date.now()/s)*s}r=e.requestRouter.endpointFor("assets",a)}wC(e,r,n)}else{var i=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");wC(e,i,n)}},Kn.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);wC(e,r,n)};var XB="$people_distinct_id",IE="$device_id",EC="$device_model",k0="__alias",S0="__timers",FR="$autocapture_disabled_server_side",zR="$heatmaps_enabled_server_side",HR="$exception_capture_enabled_server_side",VR="$error_tracking_suppression_rules",UR="$error_tracking_capture_extension_exceptions",BR="$web_vitals_enabled_server_side",CP="$dead_clicks_enabled_server_side",NP="$product_tours_enabled_server_side",jR="$web_vitals_allowed_metrics",Hf="$session_recording_remote_config",QB="$replay_sample_rate",JB="$replay_override_sampling",ej="$replay_override_linked_flag",tj="$replay_override_url_trigger",nj="$replay_override_event_trigger",Nh="$sesid",RP="$session_is_sampled",Lf="$enabled_feature_flags",hw="$active_feature_flags",C0="$early_access_features",WR="$feature_flag_details",pw="$feature_flag_payloads",GR="$feature_flag_request_id",_u="$override_feature_flags",gh="$override_feature_flag_payloads",Nf="$stored_person_properties",Rf="$stored_group_properties",qR="$surveys",TP="$surveys_loaded_at",YR="$surveys_activated",N0="ph_product_tours",q0="$flag_call_reported",KR="$flag_call_reported_session_id",ZR="$feature_flag_errors",Dv="$feature_flag_evaluated_at",Kl="$user_state",XR="$client_session_props",QR="$capture_rate_limit",JR="$initial_campaign_params",eT="$initial_referrer_info",OE="$initial_person_info",ME="$epp",rj="__POSTHOG_TOOLBAR__",Jb="$posthog_cookieless",aj="$sdk_debug_extensions_init_method",sj="$sdk_debug_extensions_init_time_ms",ij="$sdk_debug_recording_script_not_loaded",tT="PostHog loadExternalDependency extension not found.",Tf="on_reject",Mu="always",Xm="anonymous",Qm="identified",nT="identified_only",PE="visibilitychange",DE="beforeunload",vh="$pageview",xC="$pageleave",_C="$identify",N$="$groupidentify";function e1(e,t){Ur(e)&&e.forEach(t)}function Ta(e,t){if(!Ar(e))if(Ur(e))e.forEach(t);else if(Dce(e))e.forEach((r,a)=>t(r,a));else for(var n in e)EB.call(e,n)&&t(e[n],n)}var Oa=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var a of n)for(var s in a)a[s]!==void 0&&(e[s]=a[s]);return e};function gw(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var R$=function(e){try{return e()}catch{return}},kue=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(a){sn.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),sn.critical(a)}}},AP=function(e){var t={};return Ta(e,function(n,r){(_a(n)&&n.length>0||Yi(n))&&(t[r]=n)}),t},Sue=["herokuapp.com","vercel.app","netlify.app"];function Cue(e){var t=e==null?void 0:e.hostname;if(!_a(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of Sue)if(n===r)return!1;return!0}function ns(e,t,n,r){var{capture:a=!1,passive:s=!0}=r??{};e==null||e.addEventListener(t,n,{capture:a,passive:s})}
1189function oj(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Yi(e)&&isFinite(e)&&Math.floor(e)===e});class LE{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,a){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(a)||0>t||0>n||0>r||0>a||t>0xffffffffffff||n>4095||r>1073741823||a>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new LE(s)}toString(){for(var t="",n=0;this.bytes.length>n;n++)t=t+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new LE(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;16>n;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class Nue{constructor(){this.S=0,this.C=0,this.I=new Rue}generate(){var t=this.generateOrAbort();if(on(t)){this.S=0;var n=this.generateOrAbort();if(on(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.M();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.M())}return LE.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}M(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var T$,lj=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ft&&!on(ft.crypto)&&crypto.getRandomValues&&(lj=e=>crypto.getRandomValues(e));class Rue{constructor(){this.R=new Uint32Array(8),this.O=1/0}nextUint32(){return this.R.length>this.O||(lj(this.R),this.O=0),this.R[this.O++]}}var Tu=()=>Tue().toString(),Tue=()=>(T$||(T$=new Nue)).generate(),Zg="",Aue=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,Lc={N:()=>!!_n,D(e){sn.error("cookieStore error: "+e)},A(e){if(_n){try{for(var t=e+"=",n=_n.cookie.split(";").filter(s=>s.length),r=0;n.length>r;r++){for(var a=n[r];a.charAt(0)==" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return decodeURIComponent(a.substring(t.length,a.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(Lc.A(e))||{}}catch{}return t},q(e,t,n,r,a){if(!_n)return!1;try{var s="",i="",l=function(d,f){if(f){var m=function(g,v){if(v===void 0&&(v=_n),Zg)return Zg;if(!v||["localhost","127.0.0.1"].includes(g))return"";for(var y=g.split("."),b=Math.min(y.length,8),E="dmn_chk_"+Tu();!Zg&&b--;){var w=y.slice(b).join("."),x=E+"=1;domain=."+w+";path=/";v.cookie=x+";max-age=3",v.cookie.includes(E)&&(v.cookie=x+";max-age=0",Zg=w)}return Zg}(d);if(!m){var h=(g=>{var v=g.match(Aue);return v?v[0]:""})(d);h!==m&&sn.info("Warning: cookie subdomain discovery mismatch",h,m),m=h}return m?"; domain=."+m:""}return""}(_n.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),s="; expires="+c.toUTCString()}a&&(i="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+l+i;return u.length>3686.4&&sn.warn("cookieStore warning: large cookie, len="+u.length),_n.cookie=u,!0}catch{return!1}},P(e,t){if(_n!=null&&_n.cookie)try{Lc.q(e,"",-1,t)}catch{return}}},kC=null,Na={N(){if(!qi(kC))return kC;var e=!0;if(on(ft))e=!1;else try{var t="__mplssupport__";Na.q(t,"xyz"),Na.A(t)!=='"xyz"'&&(e=!1),Na.P(t)}catch{e=!1}return e||sn.error("localStorage unsupported; falling back to cookie store"),kC=e,e},D(e){sn.error("localStorage error: "+e)},A(e){try{return ft==null?void 0:ft.localStorage.getItem(e)}catch(t){Na.D(t)}return null},F(e){try{return JSON.parse(Na.A(e))||{}}catch{}return null},q(e,t){try{return ft==null||ft.localStorage.setItem(e,JSON.stringify(t)),!0}catch(n){Na.D(n)}return!1},P(e){try{ft==null||ft.localStorage.removeItem(e)}
1189catch(t){Na.D(t)}}},Iue=[IE,"distinct_id",Nh,RP,ME,OE,Kl],t1={},Oue={N:()=>!0,D(e){sn.error("memoryStorage error: "+e)},A:e=>t1[e]||null,F:e=>t1[e]||null,q:(e,t)=>(t1[e]=t,!0),P(e){delete t1[e]}},gf=null,ai={N(){if(!qi(gf))return gf;if(gf=!0,on(ft))gf=!1;else try{var e="__support__";ai.q(e,"xyz"),ai.A(e)!=='"xyz"'&&(gf=!1),ai.P(e)}catch{gf=!1}return gf},D(e){sn.error("sessionStorage error: ",e)},A(e){try{return ft==null?void 0:ft.sessionStorage.getItem(e)}catch(t){ai.D(t)}return null},F(e){try{return JSON.parse(ai.A(e))||null}catch{}return null},q(e,t){try{return ft==null||ft.sessionStorage.setItem(e,JSON.stringify(t)),!0}catch(n){ai.D(n)}return!1},P(e){try{ft==null||ft.sessionStorage.removeItem(e)}catch(t){ai.D(t)}}};class Mue{constructor(t){this._instance=t}get Se(){return this._instance.config}get consent(){return this.kt()?0:this.St}isOptedOut(){return this.Se.cookieless_mode===Mu||this.isRejected()||this.consent===-1&&this.Se.cookieless_mode===Tf}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Se.opt_out_capturing_by_default}optInOut(t){this.Ct.q(this.It,t?1:0,this.Se.cookie_expiration,this.Se.cross_subdomain_cookie,this.Se.secure_cookie)}reset(){this.Ct.P(this.It,this.Se.cross_subdomain_cookie)}get It(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get St(){var t=this.Ct.A(this.It);return pC(t)?1:dr(zce,t)?0:-1}get Ct(){var t=this.Se.opt_out_capturing_persistence_type,n=t==="localStorage"?Na:Lc;if(!this.Tt||this.Tt!==n){this.Tt=n;var r=t==="localStorage"?Lc:Na;r.A(this.It)&&(this.Tt.A(this.It)||this.optInOut(pC(r.A(this.It))),r.P(this.It,this.Se.cross_subdomain_cookie))}return this.Tt}kt(){return!!this.Se.respect_dnt&&[Bi==null?void 0:Bi.doNotTrack,Bi==null?void 0:Bi.msDoNotTrack,Kn.doNotTrack].some(t=>pC(t))}}function cj(e,t){var n,r=e==null||(n=e.config)==null?void 0:n.get_current_url;if(!Ic(r))return t;try{var a=r(t);return _a(a)&&a?a:t}catch(s){return sn.error("Error in get_current_url, falling back to window.location.href",s),t}}var Pue=1,Due=3,Lue=11;function A$(e){return e instanceof Element&&(e.id===rj||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function Zd(e){return!!e&&e.nodeType===Pue}function Uo(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function uj(e){return!!e&&e.nodeType===Due}function dj(e){return!!e&&e.nodeType===Lue&&Zd(e.host)}function IP(e){return e?ck(e).split(/\s+/):[]}function I$(e,t){var n=function(r){var a,s=ft==null||(a=ft.location)==null?void 0:a.href;return on(s)?void 0:cj(r,s)}(t);return!!(n&&e&&e.some(r=>n.match(r)))}function $E(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return IP(t)}function fj(e){return Ar(e)?null:ck(e).split(/(\s+)/).filter(t=>Y0(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Lv(e){var t="";return aT(e)&&!gj(e)&&e.childNodes&&e.childNodes.length&&Ta(e.childNodes,function(n){var r;uj(n)&&n.textContent&&(t+=(r=fj(n.textContent))!==null&&r!==void 0?r:"")}),ck(t)}function SC(e){return on(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var OP=["a","button","form","input","select","textarea","label"];function rT(e,t){if(on(t))return!0;var n,r=function(s){if(t.some(i=>function(l,c){var u=l.matches||l.matchesSelector||l.msMatchesSelector||l.mozMatchesSelector||l.webkitMatchesSelector||l.oMatchesSelector;try{return!!u&&u.call(l,c)}catch{return!1}}(s,i)))return{v:!0}};for(var a of e)if(n=r(a))return n.v;return!1}function mj(e){var t=e.parentNode;return!(!t||!Zd(t))&&t}var $ue=[".ph-no-autocapture","[data-ph-no-autocapture]"],hj=["next","previous","prev",">","<"],Fue=[...hj,"+","-","â","â"],O$=(e,t)=>/[a-z0-9]/i.test(t)?e.includes(t):e===t,M$=[".ph-no-rageclick",".ph-no-capture"],zue=["","text","search","email","password","url","tel","number"];function P$(e,t){if(!ft||MP(e))return!1;var n,r,a,s,i;if(Bc(t)?(n=!!t&&M$,r=void 0,a=!1):(n=(s=t==null?void 0:t.css_selector_ignorelist)!==null&&s!==void 0?s:M$,r=t==null?void 0:t.content_ignorelist,a=(i=t==null?void 0:t.ignore_text_selection)!==null&&i!==void 0&&i),n===!1||a&&function(c){return!(!c||!Zd(c))&&(!!Uo(c,"textarea")||(Uo(c,"input")?dr(zue,(c.getAttribute("type")||"").toLowerCase()):function(u){if(u.isContentEditable)return!0;var d=u.getAttribute==null?void 0:u.getAttribute("contenteditable");return d==="true"||d===""}(c)))}(e))return!1;var{targetElementList:l}=pj(e,!1);return!function(c,u){if(c===!1||on(c))return!1;var d;if(c===!0)d=hj;else{if(!Ur(c))return!1;if(c.length>10)return sn.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;d=c.map(f=>f.toLowerCase())}return u.some(f=>{var{safeText:m,ariaLabel:h}=f;return d.some(g=>O$(m,g)||O$(h,g))})}(r,l.map(c=>{var u;return{safeText:Lv(c).toLowerCase(),ariaLabel:((u=c.getAttribute("aria-label"))==null?void 0:u.toLowerCase().trim())||""}}))&&!rT(l,n)}var MP=e=>!e||Uo(e,"html")||!Zd(e),pj=(e,t)=>{if(!ft||MP(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],a=e;a.parentNode&&!Uo(a,"body");)if(dj(a.parentNode))r.push(a.parentNode.host),a=a.parentNode.host;else{var s=mj(a);if(!s)break;if(t||OP.indexOf(s.tagName.toLowerCase())>-1)n=!0;else try{var i=ft.getComputedStyle(s);i&&i.getPropertyValue("cursor")==="pointer"&&(n=!0)}catch{}r.push(s),a=s}return{parentIsUsefulElement:n,targetElementList:r}};function aT(e){for(var t=e;t.parentNode&&!Uo(t,"body");t=t.parentNode){var n=$E(t);if(dr(n,"ph-sensitive")||dr(n,"ph-no-capture"))return!1}if(dr($E(e),"ph-include"))return!0;var r=e.type||"";if(_a(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}
vendor: 5,131 bytes, line 1189
1189var a=e.name||e.id||"";return!_a(a)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,""))}function gj(e){return!!(Uo(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Uo(e,"select")||Uo(e,"textarea")||e.getAttribute("contenteditable")==="true")}var vj="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Hue=new RegExp("^(?:"+vj+")$"),Vue=new RegExp(vj),yj="\\d{3}-?\\d{2}-?\\d{4}",Uue=new RegExp("^("+yj+")$"),Bue=new RegExp("("+yj+")");function Y0(e,t){return t===void 0&&(t=!0),!(Ar(e)||_a(e)&&(e=ck(e),(t?Hue:Vue).test((e||"").replace(/[- ]/g,""))||(t?Uue:Bue).test(e)))}function D$(e){var t=Lv(e);return Y0(t=(t+" "+bj(e)).trim())?t:""}function bj(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Ta(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var a=Lv(n);t=(t+" "+a).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+bj(n)).trim())}catch(s){sn.error("[AutoCapture]",s)}}),t}function L$(e){return e.replace(/"|\\"/g,'\\"')}function jue(e){var t=e.attr__class;return t?Ur(t)?t:IP(t):void 0}var n1=Qa("[Dead Clicks]"),Wue=()=>!0,Gue=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(CP)),r=e.instance.config.capture_dead_clicks;return Bc(r)?r:!!Da(r)||n};class $${get lazyLoadedDeadClicksAutocapture(){return this.Et}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[CP]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.Mt(()=>{this.Pt()}):this.stop()}Mt(t){var n,r;(n=Kn.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture?t():(r=Kn.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",a=>{a?n1.error("failed to load script",a):t()})}Pt(){var t;if(_n){if(!this.Et&&(t=Kn.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=Da(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.Et=Kn.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.Et.start(_n),n1.info("starting...")}}else n1.error("`document` not found. Cannot start.")}stop(){this.Et&&(this.Et.stop(),this.Et=void 0,n1.info("stopping..."))}}var CC=Qa("[SegmentIntegration]"),wj="posthog-js";function Ej(e,t){var{organization:n,projectId:r,prefix:a,severityAllowList:s=["error"],sendExceptionsToPostHog:i=!0}=t===void 0?{}:t;return l=>{var c,u,d,f,m;if(s!=="*"&&!s.includes(l.level)||!e.__loaded)return l;l.tags||(l.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());l.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(l.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var g,v=((c=l.exception)==null?void 0:c.values)||[],y=v.map(E=>Qt({},E,{stacktrace:E.stacktrace?Qt({},E.stacktrace,{type:"raw",frames:(E.stacktrace.frames||[]).map(w=>Qt({},w,{platform:"web:javascript"}))}):void 0})),b={$exception_message:((u=v[0])==null?void 0:u.value)||l.message,$exception_type:(d=v[0])==null?void 0:d.type,$exception_level:l.level,$exception_list:y,$sentry_event_id:l.event_id,$sentry_exception:l.exception,$sentry_exception_message:((f=v[0])==null?void 0:f.value)||l.message,$sentry_exception_type:(m=v[0])==null?void 0:m.type,$sentry_tags:l.tags};return n&&r&&(b.$sentry_url=(a||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+l.event_id),i&&((g=e.exceptions)==null||g.sendExceptionEvent(b)),l}}class que{constructor(t,n,r,a,s,i){this.name=wj,this.setupOnce=function(l){l(Ej(t,{organization:n,projectId:r,prefix:a,severityAllowList:s,sendExceptionsToPostHog:i==null||i}))}}}class F${constructor(t){this.Rt=(n,r,a)=>{a&&(a.noSessionId||a.activityTimeout||a.sessionPastMaximumLength||a.crossTabAdoption)&&(sn.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:a}),this.Ot=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.Lt()}Lt(){var t;this.Ft=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.Rt)}destroy(){var t;(t=this.Ft)==null||t.call(this),this.Ft=void 0}doPageView(t,n){var r,a=this.At(t,n);return this.Ot={pathname:(r=ft==null?void 0:ft.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),a}doPageLeave(t){var n;return this.At(t,(n=this.Ot)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.Ot)==null?void 0:t.pageViewId}}At(t,n){var r=this.Ot;if(!r)return{$pageview_id:n};var a={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:i,lastScrollY:l,maxScrollY:c,maxContentHeight:u,last
1189ContentY:d,maxContentY:f}=s;if(!(on(i)||on(l)||on(c)||on(u)||on(d)||on(f))){i=Math.ceil(i),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d),f=Math.ceil(f);var m=i>1?Fc(l/i,0,1,sn):1,h=i>1?Fc(c/i,0,1,sn):1,g=u>1?Fc(d/u,0,1,sn):1,v=u>1?Fc(f/u,0,1,sn):1;a=Oa(a,{$prev_pageview_last_scroll:l,$prev_pageview_last_scroll_percentage:m,$prev_pageview_max_scroll:c,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:d,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:f,$prev_pageview_max_content_percentage:v})}}return r.pathname&&(a.$prev_pageview_pathname=r.pathname),r.timestamp&&(a.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),a}}var r1=["flags","surveys"],Yue={[XB]:{exposure:"hidden"},[k0]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[S0]:{exposure:"hidden"},[FR]:{exposure:"event"},[zR]:{exposure:"hidden"},[HR]:{exposure:"event"},[VR]:{exposure:"hidden"},[UR]:{exposure:"event"},[BR]:{exposure:"event"},[CP]:{exposure:"event"},[NP]:{exposure:"hidden"},[jR]:{exposure:"event"},[Hf]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Nh]:{exposure:"hidden"},[RP]:{exposure:"event"},[QB]:{exposure:"event",shouldSkipFromEventProperties:e=>qi(e)},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},$sess_rec_flush_size:{exposure:"hidden"},[Lf]:{exposure:"derived",storageGroup:"flags",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!Da(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[hw]:{exposure:"event",storageGroup:"flags"},[C0]:{exposure:"hidden"},[WR]:{exposure:"hidden",storageGroup:"flags"},[pw]:{exposure:"event",storageGroup:"flags"},[GR]:{exposure:"event",storageGroup:"flags",volatile:!0},[_u]:{exposure:"event"},[gh]:{exposure:"hidden"},[Nf]:{exposure:"hidden"},[Rf]:{exposure:"hidden"},[qR]:{exposure:"hidden",storageGroup:"surveys"},[TP]:{exposure:"hidden",storageGroup:"surveys",volatile:!0},[YR]:{exposure:"event"},[N0]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[q0]:{exposure:"hidden"},[KR]:{exposure:"hidden"},[ZR]:{exposure:"hidden"},[Dv]:{exposure:"hidden",storageGroup:"flags",volatile:!0},[Kl]:{exposure:"hidden"},[XR]:{exposure:"hidden"},[QR]:{exposure:"hidden"},[JR]:{exposure:"hidden"},[eT]:{exposure:"hidden"},[OE]:{exposure:"hidden"},[ME]:{exposure:"hidden"},[JB]:{exposure:"event"},[ej]:{exposure:"event"},[tj]:{exposure:"event"},[nj]:{exposure:"event"},[aj]:{exposure:"event"},[sj]:{exposure:"event"},[ij]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},Kue=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],vf=e=>{var t=Yue[e];if(t)return t;for(var[n,r]of Kue)if(e.indexOf(n)===0)return r},FE=e=>{var t=_n==null?void 0:_n.createElement("a");return on(t)?null:(t.href=e,t)},Op=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;r.length>a;a++){var s=r[a].split("=");if(s[0]===t){n=s;break}}if(!Ur(n)||2>n.length)return"";var i=n[1];try{i=decodeURIComponent(i)}catch{sn.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},$v=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),a=r[1],s=(r[0]||"").split("?"),i=s[1],l=s[0],c=(i||"").split("&"),u=[],d=0;c.length>d;d++){var f=c[d].split("=");Ur(f)&&(t.includes(f[0])?u.push(f[0]+"="+n):u.push(c[d]))}var m=l;return i!=null&&(m+="?"+u.join("&")),a!=null&&(m+="#"+a),m},zE=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));
1189return n?n[1]:null},a1="https?://(.*)",Mp=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Zue=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Mp],Fv="<masked>",Xue=["li_fat_id"];function xj(e,t,n){if(!_n)return{};var r,a=t?[...Mp,...n||[]]:[],s=_j($v(_n.URL,a,Fv),e),i=(r={},Ta(Xue,function(l){var c=Lc.A(l);r[l]=c||null}),r);return Oa(i,s)}function _j(e,t){var n=Zue.concat(t||[]),r={};return Ta(n,function(a){var s=Op(e,a);r[a]=s||null}),r}function kj(e){var t=function(s){return s?s.search(a1+"google.([^/?]*)")===0?"google":s.search(a1+"bing.com")===0?"bing":s.search(a1+"yahoo.com")===0?"yahoo":s.search(a1+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!qi(t)){r.$search_engine=t;var a=_n?Op(_n.referrer,n):"";a.length&&(r.ph_keyword=a)}return r}function z$(){return navigator.language||navigator.userLanguage}var HE="$direct";function Sj(){return(_n==null?void 0:_n.referrer)||HE}function Cj(e,t,n){n===void 0&&(n=!1);var r=e?[...Mp,...t||[]]:[],a=n?Kd(ys==null?void 0:ys.href):ys==null?void 0:ys.href,s=a==null?void 0:a.substring(0,1e3);return{r:Sj().substring(0,1e3),u:s?$v(s,r,Fv):void 0}}function Nj(e,t){var n;t===void 0&&(t=!1);var{r,u:a}=e,s=t?Kd(a):a,i={$referrer:r,$referring_domain:r==null?void 0:r==HE?HE:(n=FE(r))==null?void 0:n.host};
1189if(s){i.$current_url=s;var l=FE(s);i.$host=l==null?void 0:l.host,i.$pathname=l==null?void 0:l.pathname;var c=_j(s);Oa(i,c)}if(r){var u=kj(r);Oa(i,u)}return i}function Rj(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Que(){try{return new Date().getTimezoneOffset()}catch{return}}var Jue={flags:Dv,surveys:TP},ede=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],Jm="main";class NC{constructor(t,n,r){if(r===void 0&&(r=!0),this.$t={},this.Dt=!1,this.Nt=!1,this.Se=t,this.qt=r,this.props={},this.jt=!1,this.Bt=(s=>{var i="";return s.token&&(i=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),s.persistence_name?"ph_"+s.persistence_name:"ph_"+i+"_posthog"})(t),this.Ct=this.Ht(t),this.Nt=this.Ut(t),this.load(),t.debug&&sn.info("Persistence loaded",t.persistence,Qt({},this.props)),this.update_config(t,t,n),this.save(),ft){var a=()=>this.flush();ns(ft,"beforeunload",a,{capture:!1}),ns(ft,"pagehide",a,{capture:!1})}}zt(){var t,n=(t=this.Se)==null?void 0:t.persistence_save_debounce_ms;return Yi(n)&&n>0?n:0}isDisabled(){return!!this.Vt}Ht(t){ede.indexOf(t.persistence.toLowerCase())===-1&&(sn.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n,r=function(i,l){i===void 0&&(i=[]),l===void 0&&(l=!1);var c=[...Iue,...i];return Qt({},Na,{F(u){try{var d={};try{d=Lc.F(u)||{}}catch{}var f,m=JSON.parse(Na.A(u)||"{}");if(l){var h={};for(var g in d){var v=d[g];qi(v)||v===""||(h[g]=v)}f=Oa(m,h)}else f=Oa(d,m);return Na.q(u,f),f}catch{}return null},q(u,d,f,m,h,g){var v=Na.q(u,d,void 0,void 0,g);try{var y={};c.forEach(b=>{d[b]&&(y[b]=d[b])}),Object.keys(y).length&&Lc.q(u,y,f,m,h,g)}catch(b){Na.D(b)}return v},P(u,d){try{ft==null||ft.localStorage.removeItem(u),Lc.P(u,d)}catch(f){Na.D(f)}}})}(t.cookie_persisted_properties||[],t.__preview_cookie_wins_on_conflict||!1),a=!1,s=t.persistence.toLowerCase();return s==="localstorage"&&Na.N()?(n=Na,a=!0):s==="localstorage+cookie"&&r.N()?(n=r,a=!0):s==="sessionstorage"&&ai.N()?n=ai:s==="memory"?n=Oue:s==="cookie"?n=Lc:r.N()?(n=r,a=!0):n=Lc,this.Dt=a,n}Wt(t){return this.Bt+"__"+t}Ut(t){return this.Dt&&!!t.split_storage}Gt(t){var n=t??this.Se.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[Dv];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return Ta(this.props,(n,r)=>{var a=vf(r);if((a==null?void 0:a.exposure)==="derived"){if(a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,r===Lf?()=>this.Gt():()=>!1))return;a.transformToEventProperties&&Oa(t,a.transformToEventProperties(n))}else if(!a||a.exposure==="event"){if(a!=null&&a.shouldSkipFromEventProperties!=null&&a.shouldSkipFromEventProperties(n,()=>!1))return;t[r]=n}}),t}load(){if(!this.Vt){var t=this.Ct.F(this.Bt);t&&(this.props=Oa({},t)),this.Nt&&this.Zt()}}Zt(){for(var t of r1){var n=Na.F(this.Wt(t));if(n&&!Id(n)){var r=this.Qt(t);r.persisted=!0,this.Jt(t)||(r.fingerprint=this.Yt(n,t)),this.Kt(t,n)||Oa(this.props,n)}}}Jt(t){return Object.keys(this.props).some(n=>{var r;return((r=vf(n))==null?void 0:r.storageGroup)===t})}Kt(t,n){var r=Jue[t];if(!r)return!1;var a=n[r],s=this.props[r];return Yi(a)&&Yi(s)&&s>a}refreshKey(t){var n;if(!this.Vt){var r=this.Nt?(n=vf(t))==null?void 0:n.storageGroup:void 0,a=r?Na.F(this.Wt(r)):this.Ct.F(this.Bt);if(a&&t in a)this.Xt(t,a[t]);else{if(r){var s=this.Ct.F(this.Bt);if(s&&t in s)return void this.Xt(t,s[t])}this.er(t)}}}save(){if(!this.Vt){var t=this.zt();t>0?on(this.tr)&&(this.tr=setTimeout(()=>{this.tr=void 0,this.rr()},t)):this.rr()}}flush(){on(this.tr)||(clearTimeout(this.tr),this.tr=void 0,this.rr())}rr(){this.Vt||(this.Nt?this.ir():this.nr(this.Ct,this.Bt,this.props,Jm))}ir(){var{main:t,groups:n}=this.sr();for(var r of(this.nr(this.Ct,this.Bt,t,Jm),r1)){var a,s=n[r];(!Id(s)||(a=this.$t[r])!=null&&a.persisted)&&this.nr(Na,this.Wt(r),s,r)}}sr(){var t={},n={};for(var r of r1)n[r]={};return Ta(this.props,(a,s)=>{var i,l=(i=vf(s))==null?void 0:i.storageGroup;l?n[l][s]=a:t[s]=a}),{main:t,groups:n}}Yt(t,n){if(n===Jm)return JSON.stringify(t)+"|"+this.ar+"|"+this.lr+"|"+this.ur;var r={};return Ta(t,(a,s)=>{var i;r[s]=(i=vf(s))!=null&&i.volatile?"__volatile__":a}),JSON.stringify(r)}nr(t,n,r,a){var s=this.Qt(a);if(a===Jm||s.dirty||on(s.fingerprint)){var i;try{if((i=this.Yt(r,a))===s.fingerprint)return void(s.dirty=!1)}catch{i=void 0}t.q(n,r,this.ar,this.lr,this.ur,this.Se.debug)?(s.dirty=!1,a!==Jm&&(s.persisted=!0),on(i)||(s.fingerprint=i)):this.Se.debug&&sn.warn('failed to persist storage entry "'+n+'"; will retry on next save')}}remove(t){var{keepGroupEntries:n=!1}=t===void 0?{}:t;if(on(this.tr)||(clearTimeout(this.tr),this.tr=void 0),this.Ct.P(this.Bt,!1),this.Ct.P(this.Bt,!0),!n&&this.qt)for(var r of r1)Na.P(this.Wt(r));n?delete this.$t[Jm]:this.$t={}}clear(){this.remove(),this.props={}}register_once(t,n,r){if(Da(t)){on(n)&&(n="None"),this.ar=on(r)?this.hr:r;var a=!1;if(Ta(t,(s,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==n||(this.Xt(i,s),a=!0)}),a)return this.save(),!0}return!1}register(t,n){if(Da(t)){this.ar=on(n)?this.hr:n;var r=!1;if(Ta(t,(a,s)=>{t.hasOwnProperty(s)&&this.props[s]!==a&&(this.Xt(s,a),r=!0)}),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.er(t),this.save())}update_campaign_params(){if(!this.jt){var t=xj(this.Se.custom_campaign_params,this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties);Id(AP(t))||this.register(t),this.jt=!0}}update_search_keyword(){var t;this.register((t=_n==null?void 0:_n.referrer)?kj(t):{})}update_referrer_info(){var t;this.register_once({$referrer:Sj(),$referring_domain:_n!=null&&_n.referrer&&((t=FE(_n.referrer))==null?void 0:t.host)||HE},void 0)}set_initial_person_info(){this.props[JR]||this.props[eT]||this.register_once({[OE]:Cj(this.Se.mask_personal_data_properties,this.Se.custom_personal_data_properties,this.Se.disable_capture_url_hashes
1189)},void 0)}get_initial_props(){var t={};Ta([eT,JR],a=>{var s=this.props[a];s&&Ta(s,function(i,l){t["$initial_"+IR(l)]=i})});var n=this.props[OE];if(n){var r=function(a,s){s===void 0&&(s=!1);var i=Nj(a,s),l={};return Ta(i,function(c,u){l["$initial_"+IR(u)]=c}),l}(n,this.Se.disable_capture_url_hashes);Oa(t,r)}return t}safe_merge(t){return Ta(this.props,function(n,r){r in t||(t[r]=n)}),t}update_config(t,n,r){this.hr=this.ar=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie);var a=t.persistence!==n.persistence||!((c,u)=>{if(c.length!==u.length)return!1;var d=[...c].sort(),f=[...u].sort();return d.every((m,h)=>m===f[h])})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[]),s=a?this.Ht(t):this.Ct,i=this.Ut(t);if(a||i!==this.Nt){var l=this.props;this.clear(),this.Ct=s,this.Nt=i,this.props=l,this.save()}}set_disabled(t){this.Vt=t,this.Vt?this.remove():this.save()}set_cross_subdomain(t){t!==this.lr&&(this.lr=t,this.remove({keepGroupEntries:!0}),this.save())}set_secure(t){t!==this.ur&&(this.ur=t,this.remove({keepGroupEntries:!0}),this.save())}set_event_timer(t,n){var r=this.props[S0]||{};r[t]=n,this.Xt(S0,r),this.save()}remove_event_timer(t){var n=this.props[S0]||{},r=n[t];return on(r)||(delete n[t],this.Xt(S0,n),this.save()),r}get_property(t){return this.props[t]}set_property(t,n){this.Xt(t,n),this.save()}Xt(t,n){var r;this.props[t]=n,(r=vf(t))!=null&&r.volatile||this.dr(t)}er(t){delete this.props[t],this.dr(t)}dr(t){var n,r=(n=vf(t))==null?void 0:n.storageGroup;r&&(this.Qt(r).dirty=!0)}Qt(t){return this.$t[t]||(this.$t[t]={})}}var Xg={Activation:"events",Cancellation:"cancelEvents"},RC={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},tde={Once:"once",Recurring:"recurring",Always:"always"},Pu={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},TC={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_RESPONSE:"$survey_response",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_QUESTIONS:"$survey_questions",SURVEY_COMPLETED:"$survey_completed",PRODUCT_TOUR_ID:"$product_tour_id",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date",SURVEY_LANGUAGE:"$survey_language"},sT={Popover:"popover",Inline:"inline"},nde={SHOWN:"product tour shown",DISMISSED:"product tour dismissed",COMPLETED:"product tour completed",STEP_SHOWN:"product tour step shown",STEP_COMPLETED:"product tour step completed",BUTTON_CLICKED:"product tour button clicked",STEP_SELECTOR_FAILED:"product tour step selector failed",BANNER_CONTAINER_SELECTOR_FAILED:"product tour banner container selector failed",BANNER_ACTION_CLICKED:"product tour banner action clicked"},H$={TOUR_ID:"$product_tour_id",TOUR_NAME:"$product_tour_name",TOUR_ITERATION:"$product_tour_iteration",TOUR_RENDER_REASON:"$product_tour_render_reason",TOUR_STEP_ID:"$product_tour_step_id",TOUR_STEP_ORDER:"$product_tour_step_order",TOUR_STEP_TYPE:"$product_tour_step_type",TOUR_DISMISS_REASON:"$product_tour_dismiss_reason",TOUR_BUTTON_TEXT:"$product_tour_button_text",TOUR_BUTTON_ACTION:"$product_tour_button_action",TOUR_BUTTON_LINK:"$product_tour_button_link",TOUR_BUTTON_TOUR_ID:"$product_tour_button_tour_id",TOUR_STEPS_COUNT:"$product_tour_steps_count",TOUR_STEP_SELECTOR:"$product_tour_step_selector",TOUR_STEP_SELECTOR_FOUND:"$product_tour_step_selector_found",TOUR_STEP_ELEMENT_TAG:"$product_tour_step_element_tag",TOUR_STEP_ELEMENT_ID:"$product_tour_step_element_id",TOUR_STEP_ELEMENT_CLASSES:"$product_tour_step_element_classes",TOUR_STEP_ELEMENT_TEXT:"$product_tour_step_element_text",TOUR_ERROR:"$product_tour_error",TOUR_MATCHES_COUNT:"$product_tour_matches_count",TOUR_FAILURE_PHASE:"$product_tour_failure_phase",TOUR_WAITED_FOR_ELEMENT:"$product_tour_waited_for_element",TOUR_WAIT_DURATION_MS:"$product_tour_wait_duration_ms",TOUR_BANNER_SELECTOR:"$product_tour_banner_selector",TOUR_LINKED_SURVEY_ID:"$product_tour_linked_survey_id",USE_MANUAL_SELECTOR:"$use_manual_selector",INFERENCE_DATA_PRESENT:"$inference_data_present",TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},V$=Qa("[RateLimiter]");class rde{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;
vendor: 2,386 bytes, line 1189
1189if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach(a=>{V$.info((a||"events")+" is quota limited."),this.serverLimits[a]=new Date().getTime()+6e4})}catch(a){return void V$.warn('could not rate limit - continuing. Error: "'+(a==null?void 0:a.message)+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,a;t===void 0&&(t=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:i}=this,l=new Date().getTime(),c=(n=(r=this.instance.persistence)==null?void 0:r.get_property(QR))!==null&&n!==void 0?n:{tokens:s,last:l};c.tokens+=(l-c.last)/1e3*i,c.last=l,c.tokens>s&&(c.tokens=s);var u=1>c.tokens;return u||t||(c.tokens=Math.max(0,c.tokens-1)),!u||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+i+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,(a=this.instance.persistence)==null||a.set_property(QR,c),{isRateLimited:u,remainingTokens:c.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Qg=Qa("[RemoteConfig]");class Tj{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Kn._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}cr(t){var n,r;(n=Kn.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Kn.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}vr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){t(n.json)}})}load(){try{if(this.remoteConfig)return Qg.info("Using preloaded remote config",this.remoteConfig),this.pr(this.remoteConfig),void this.gr();if(this._instance.mr())return void Qg.warn("Remote config is disabled. Falling back to local config.");this.cr(t=>
vendor: 4,133 bytes, line 1189
1189{if(!t)return Qg.info("No config found after loading remote JS config. Falling back to JSON."),void this.vr(n=>{this.pr(n),this.gr()});this.pr(t),this.gr()})}catch(t){Qg.error("Error loading remote config",t)}}stop(){this.yr&&(clearInterval(this.yr),this.yr=void 0)}refresh(){!this._instance.mr()&&_n&&_n.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}gr(){var t;if(!this.yr){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.yr=setInterval(()=>{this.refresh()},n))}}pr(t){var n;t||Qg.error("Failed to fetch remote config from PostHog."),this._instance.pr(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var Oc={GZipJS:"gzip-js",Base64:"base64"},Il=Uint8Array,ji=Uint16Array,Pp=Uint32Array,PP=new Il([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),DP=new Il([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),U$=new Il([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Aj=function(e,t){for(var n=new ji(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var a=new Pp(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)a[s]=s-n[r]<<5|r;return[n,a]},Ij=Aj(PP,2),iT=Ij[1];Ij[0][28]=258,iT[258]=28;for(var B$=Aj(DP,0)[1],oT=new ji(32768),$a=0;32768>$a;++$a){var eh=(43690&$a)>>>1|(21845&$a)<<1;oT[$a]=((65280&(eh=(61680&(eh=(52428&eh)>>>2|(13107&eh)<<2))>>>4|(3855&eh)<<4))>>>8|(255&eh)<<8)>>>1}var K0=function(e,t,n){for(var r=e.length,a=0,s=new ji(t);r>a;++a)++s[e[a]-1];var i,l=new ji(t);for(a=0;t>a;++a)l[a]=l[a-1]+s[a-1]<<1;if(n){i=new ji(1<<t);var c=15-t;for(a=0;r>a;++a)if(e[a])for(var u=a<<4|e[a],d=t-e[a],f=l[e[a]-1]++<<d,m=f|(1<<d)-1;m>=f;++f)i[oT[f]>>>c]=u}else for(i=new ji(r),a=0;r>a;++a)i[a]=oT[l[e[a]-1]++]>>>15-e[a];return i},vm=new Il(288);for($a=0;144>$a;++$a)vm[$a]=8;for($a=144;256>$a;++$a)vm[$a]=9;for($a=256;280>$a;++$a)vm[$a]=7;for($a=280;288>$a;++$a)vm[$a]=8;var VE=new Il(32);for($a=0;32>$a;++$a)VE[$a]=5;var ade=K0(vm,9,0),sde=K0(VE,5,0),Oj=function(e){return(e/8>>0)+(7&e&&1)},Mj=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof ji?ji:e instanceof Pp?Pp:Il)(n-t);return r.set(e.subarray(t,n)),r},hu=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},Jg=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},AC=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var a=n.length,s=n.slice();if(!a)return[new Il(0),0];if(a==1){var i=new Il(n[0].s+1);return i[n[0].s]=1,[i,1]}n.sort(function(S,N){return S.f-N.f}),n.push({s:-1,f:25001});var l=n[0],c=n[1],u=0,d=1,f=2;for(n[0]={s:-1,f:l.f+c.f,l,r:c};d!=a-1;)l=n[n[f].f>n[u].f?u++:f++],c=n[u!=d&&n[f].f>n[u].f?u++:f++],n[d++]={s:-1,f:l.f+c.f,l,r:c};var m=s[0].s;for(r=1;a>r;++r)s[r].s>m&&(m=s[r].s);var h=new ji(m+1),g=lT(n[d-1],h,0);if(g>t){r=0;var v=0,y=g-t,b=1<<y;for(s.sort(function(S,N){return h[N.s]-h[S.s]||S.f-N.f});a>r;++r){var E=s[r].s;if(t>=h[E])break;v+=b-(1<<g-h[E]),h[E]=t}for(v>>>=y;v>0;){var w=s[r].s;t>h[w]?v-=1<<t-h[w]++-1:++r}for(;r>=0&&v;--r){var x=s[r].s;h[x]==t&&(--h[x],++v)}g=t}return[new Il(h),g]},lT=function(e,t,n){return e.s==-1?Math.max(lT(e.l,t,n+1),lT(e.r,t,n+1)):t[e.s]=n},j$=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new ji(++t),r=0,a=e[0],s=1,i=function(c){n[r++]=c},l=1;t>=l;++l)if(e[l]==a&&l!=t)++s;else{if(!a&&s>2){for(;s>138;s-=138)i(32754);s>2&&(i(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(i(a),--s;s>6;s-=6)i(8304);s>2&&(i(s-3<<5|8208),s=0)}for(;s--;)i(a);s=1,a=e[l]}return[n.subarray(0,r),t]},e0=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},cT=function(e,t,n){var r=n.length,a=Oj(t+2);e[a]=255&r,e[a+1]=r>>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var s=0;r>s;++s)e[a+s+4]=n[s];return 8*(a+4+r)},W$=function(e,t,n,r,a,s,i,l,c,u,d){hu(t,d++,n),++a[256];for(var f=AC(a,15),m=f[0],h=f[1],g=AC(s,15),v=g[0],y=g[1],b=j$(m),E=b[0],w=b[1],x=j$(v),S=x[0],N=x[1],k=new ji(19),C=0;E.length>C;++C)k[31&E[C]]++;for(C=0;S.length>C;++C)k[31&S[C]]++;for(var A=AC(k,7),O=A[0],T=A[1],M=19;M>
11894&&!O[U$[M-1]];--M);var L,D,j,H,Y=u+5<<3,z=e0(a,vm)+e0(s,VE)+i,K=e0(a,m)+e0(s,v)+i+14+3*M+e0(k,O)+(2*k[16]+3*k[17]+7*k[18]);if(z>=Y&&K>=Y)return cT(t,d,e.subarray(c,c+u));if(hu(t,d,1+(z>K)),d+=2,z>K){L=K0(m,h,0),D=m,j=K0(v,y,0),H=v;var ee=K0(O,T,0);for(hu(t,d,w-257),hu(t,d+5,N-1),hu(t,d+10,M-4),d+=14,C=0;M>C;++C)hu(t,d+3*C,O[U$[C]]);d+=3*M;for(var oe=[E,S],J=0;2>J;++J){var se=oe[J];for(C=0;se.length>C;++C)hu(t,d,ee[B=31&se[C]]),d+=O[B],B>15&&(hu(t,d,se[C]>>>5&127),d+=se[C]>>>12)}}else L=ade,D=vm,j=sde,H=VE;for(C=0;l>C;++C)if(r[C]>255){var B;Jg(t,d,L[257+(B=r[C]>>>18&31)]),d+=D[B+257],B>7&&(hu(t,d,r[C]>>>23&31),d+=PP[B]);var U=31&r[C];Jg(t,d,j[U]),d+=H[U],U>3&&(Jg(t,d,r[C]>>>5&8191),d+=DP[U])}else Jg(t,d,L[r[C]]),d+=D[r[C]];return Jg(t,d,L[256]),d+D[256]},ide=new Pp([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ode=function(){for(var e=new Pp(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),IC=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function lde(e,t){t===void 0&&(t={});var n=function(){var f=4294967295;return{p(m){for(var h=f,g=0;m.length>g;++g)h=ode[255&h^m[g]]^h>>>8;f=h},d(){return 4294967295^f}}}(),r=e.length;n.p(e);var a,s,i,l,c,u=(l=10+((a=t).filename&&a.filename.length+1||0),c=8,function(f,m,h,g,v,y){var b=f.length,E=new Il(g+b+5*(1+Math.floor(b/7e3))+v),w=E.subarray(g,E.length-v),x=0;if(!m||8>b)for(var S=0;b>=S;S+=65535){var N=S+65535;b>N?x=cT(w,x,f.subarray(S,N)):(w[S]=!0,x=cT(w,x,f.subarray(S,b)))}else{for(var k=ide[m-1],C=k>>>13,A=8191&k,O=(1<<h)-1,T=new ji(32768),M=new ji(O+1),L=Math.ceil(h/3),D=2*L,j=function(me){return(f[me]^f[me+1]<<L^f[me+2]<<D)&O},H=new Pp(25e3),Y=new ji(288),z=new ji(32),K=0,ee=0,oe=(S=0,0),J=0,se=0;b>S;++S){var B=j(S),U=32767&S,$=M[B];if(T[U]=$,M[B]=U,S>=J){var ce=b-S;if((K>7e3||oe>24576)&&ce>423){x=W$(f,w,0,H,Y,z,ee,oe,se,S-se,x),oe=K=ee=0,se=S;for(var be=0;286>be;++be)Y[be]=0;for(be=0;30>be;++be)z[be]=0}var ue=2,Ie=0,Ae=A,he=U-$&32767;if(ce>2&&B==j(S-he))for(var _e=Math.min(C,ce)-1,ie=Math.min(32767,S),Ue=Math.min(258,ce);ie>=he&&--Ae&&U!=$;){if(f[S+ue]==f[S+ue-he]){for(var ae=0;Ue>ae&&f[S+ae]==f[S+ae-he];++ae);if(ae>ue){if(ue=ae,Ie=he,ae>_e)break;var pe=Math.min(he,ae-2),W=0;for(be=0;pe>be;++be){var q=S-he+be+32768&32767,te=q-T[q]+32768&32767;te>W&&(W=te,$=q)}}}he+=(U=$)-($=T[U])+32768&32767}if(Ie){H[oe++]=268435456|iT[ue]<<18|B$[Ie];var X=31&iT[ue],le=31&B$[Ie];ee+=PP[X]+DP[le],++Y[257+X],++z[le],J=S+ue,++K}else H[oe++]=f[S],++Y[f[S]]}}x=W$(f,w,!0,H,Y,z,ee,oe,se,S-se,x)}return Mj(E,0,g+Oj(x)+v)}(s=e,(i=t).level==null?6:i.level,i.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+i.mem,l,c)),d=u.length;return function(f,m){var h=m.filename;if(f[0]=31,f[1]=139,f[2]=8,f[8]=2>m.level?4:m.level==9?2:0,f[9]=3,m.mtime!=0&&IC(f,4,Math.floor(new Date(m.mtime||Date.now())/1e3)),h){f[3]=8;for(var g=0;h.length>=g;++g)f[g+10]=h.charCodeAt(g)}}(u,t),IC(u,d-8,n.d()),IC(u,d-4,r),u}var cde=!!RR||!!NR,Pj="text/plain",vw=!1,ude=(e,t)=>{var[n,r]=e.split("#"),[a,s]=n.split("?");if(!s)return e;var i=s.split("&").filter(l=>l.split("=")[0]!==t).join("&");return a+(i?"?"+i:"")+(r?"#"+r:"")},Dj=function(e,t,n){var r;n===void 0&&(n=!0);var[a,s]=e.split("?"),i=Qt({},t),l=(r=s==null?void 0:s.split("&").map(u=>{var d,[f,m]=u.split("="),h=n&&(d=i[f])!==null&&d!==void 0?d:m;return delete i[f],f+"="+h}))!==null&&r!==void 0?r:[],c=function(u,d){var f,m;d===void 0&&(d="&");var h=[];return Ta(u,function(g,v){on(g)||on(v)||v==="undefined"||(f=encodeURIComponent((y=>y instanceof File)(g)?g.name:g.toString()),m=encodeURIComponent(v),h[h.length]=m+"="+f)}),h.join(d)}(i);return c&&l.push(c),a+"?"+l.join("&")},Rh=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),G$=e=>{if(e.xt)return e.xt;var{data:t,compression:n}=e;if(t){if(n===Oc.GZipJS){var r=lde(function(l,c){var u=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var d=new Il(l.length+(l.length>>>1)),f=0,m=function(y){d[f++]=y},h=0;u>h;++h){if(f+5>d.length){var g=new Il(f+8+(u-h<<1));g.set(d),d=g}var v=l.charCodeAt(h);128>v?m(v):2048>v?(m(192|v>>>6),m(128|63&v)):v>55295&&57344>v?(m(240|(v=65536+(1047552&v)|1023&l.charCodeAt(++h))>>>18),m(128|v>>>12&63),m(128|v>>>6&63),m(128|63&v)):(m(224|v>>>12),m(128|v>>>6&63),m(128|63&v))}return Mj(d,0,f)}(Rh(t)),{mtime:0});return{contentType:Pj,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===Oc.Base64){var a=function(l){return l&&btoa(encodeURIComponent(l).replace(/%([0-9A-F]{2})/g,(c,u)=>String.fromCharCode(parseInt(u,16))))}(Rh(t)),s=(l=>"data="+encodeURIComponent(typeof l=="string"?l:Rh(l)))(a);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var i=Rh(t);return{contentType:"application/json",body:i,estimatedSize:new Blob([i]).size}}},Lj=e=>{var t,n,r=()=>({url:ude(e.url,"compression"),encodedBody:G$(Qt({},e,{compression:void 0,xt:void 0}))});try{t=G$(e)}catch(a){if(y$(e.compression,Op(e.url,"compression")))return sn.error("Failed to gzip request body, sending uncompressed payload",a),r();throw a}return t&&y$(e.compression,Op(e.url,"compression"))&&!((n=t.body)instanceof ArrayBuffer?TR(new Uint8Array(n)):ArrayBuffer.isView(n)&&TR(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)))?(vw=!0,r()):{url:e.url,encodedBody:t}},q$=e=>{try{return Lj(e)}catch(t){return sn.error(t),void(e.callback==null||e.callback({statusCode:0,error:t}))}},dde=function(){var e=Ls(function*(t){var n=Rh(t.data),r=yield function(s,i,l){return AR.apply(this,arguments)}(n,cs.DEBUG,{rethrow:!0});if(!r)return t;var a=yield r.arrayBuffer();return Qt({},t,{xt:{contentType:Pj,body:a,estimatedSize:a.byteLength}})});return function(t){return e.apply(this,arguments)}}(),Y$=(e,t)=>Dj(e,{_:new Date().getTime().toString(),ver:cs.JS_SDK_VERSION,compression:t}),yw=[];NR&&yw.push({transport:"fetch",method(e){var t,n=q$(e);if(n){var{url:r,encodedBody:a}=n,{contentType:s,body:i,estimatedSize:l}=a??{},c=new Headers;Ta(e.headers,function(m,h){c.append(h,m)}),s&&c.append("Content-Type",s);var u=null,d=null;if(d$){var f=new d$;
1189u={signal:f.signal,timeout:setTimeout(()=>{var m,h;m=e.timeout,(h=new Error("PostHog request timed out"+(m?" after "+m+"ms":""))).name="AbortError",f.abort(d=h)},e.timeout)}}NR(r,Qt({method:(e==null?void 0:e.method)||"GET",headers:c,keepalive:e.method==="POST"&&52428.8>(l||0),body:i,signal:(t=u)==null?void 0:t.signal},e.fetchOptions)).then(m=>m.text().then(h=>{var g={statusCode:m.status,text:h};if(m.status===200)try{g.json=JSON.parse(h)}catch(v){sn.error(v)}e.callback==null||e.callback(g)})).catch(m=>{m===d?sn.warn(m):sn.error(m),e.callback==null||e.callback({statusCode:0,error:m})}).finally(()=>u?clearTimeout(u.timeout):null)}}}),RR&&yw.push({transport:"XHR",method(e){var t=q$(e);if(t){var n=new RR,{url:r,encodedBody:a}=t;n.open(e.method||"GET",r,!0);var{contentType:s,body:i}=a??{};Ta(e.headers,function(l,c){n.setRequestHeader(c,l)}),s&&n.setRequestHeader("Content-Type",s),e.timeout&&(n.timeout=e.timeout),n.onreadystatechange=()=>{if(n.readyState===4){var l={statusCode:n.status,text:n.responseText};if(n.status===200)try{l.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(l)}},n.send(i)}}}),Bi!=null&&Bi.sendBeacon&&yw.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:n}=Lj(e),{contentType:r,body:a}=n??{};if(!a)return;var s=a instanceof Blob?a:new Blob([a],{type:r});Bi.sendBeacon(t,s)}catch{}}});var uT=3e3;class fde{constructor(t,n){this.br=!0,this._r=[],this.wr=Fc((n==null?void 0:n.flush_interval_ms)||uT,250,5e3,sn.createLogger("flush interval"),uT),this.kr=t}enqueue(t){this._r.push(t),this.Sr||this.Cr()}unload(){this.Ir();var t=this._r.length>0?this.Tr():{},n=Object.values(t);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Er(Qt({},r,{transport:"sendBeacon"}))})}enable(){this.br=!1,this.Cr()}Cr(){var t=this;this.br||(this.Sr=setTimeout(()=>{if(this.Ir(),this._r.length>0){var n=this.Tr(),r=function(){var s=n[a],i=new Date().getTime();s.data&&Ur(s.data)&&Ta(s.data,l=>{l.offset=Math.abs(l.timestamp-i),delete l.timestamp}),t.Er(s)};for(var a in n)r()}},this.wr))}Er(t){try{this.kr(t)}catch(n){sn.error(n)}}Ir(){clearTimeout(this.Sr),this.Sr=void 0}Tr(){var t={};return Ta(this._r,n=>{var r,a=n,s=(a?a.batchKey:null)||a.url;on(t[s])&&(t[s]=Qt({},a,{data:[]})),(r=t[s].data)==null||r.push(a.data)}),this._r=[],t}}var mde=["retriesPerformedSoFar"];class hde{constructor(t){this.Mr=!1,this.Pr=3e3,this._r=[],this._instance=t,this._r=[],this.Rr=!0,!on(ft)&&"onLine"in ft.navigator&&(this.Rr=ft.navigator.onLine,this.Or=()=>{this.Rr=!0,this.Lr()},this.Fr=()=>{this.Rr=!1},ns(ft,"online",this.Or),ns(ft,"offline",this.Fr))}get length(){return this._r.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=yB(t,mde);xu(n)&&(r.url=Dj(r.url,{retry_count:n})),this._instance._send_request(Qt({},r,{callback:a=>{if(a.statusCode!==200&&(400>a.statusCode||a.statusCode>=500)){if((a.statusCode===0?3:10)>(n??0))return void this.st(Qt({retriesPerformedSoFar:n},r));a.statusCode===0&&sn.warn("Request failed before receiving an HTTP response; this can happen due to network issues, CORS, browser blocking, or ad blockers. Stopped retrying after "+(n??0)+" retries.")}r.callback==null||r.callback(a)}}))}st(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=function(i){var l=3e3*Math.pow(2,i),c=l/2,u=Math.min(18e5,l),d=Math.random()-.5;return Math.ceil(u+d*(u-c))}(n),a=Date.now()+r;this._r.push({retryAt:a,requestOptions:t});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),sn.warn(s),this.Mr||(this.Mr=!0,this.Ar())}Ar(){if(this.$r&&clearTimeout(this.$r),this._r.length===0)return this.Mr=!1,void(this.$r=void 0);this.$r=setTimeout(()=>{this.Rr&&this._r.length>0&&this.Lr(),this.Ar()},this.Pr)}Lr(){var t=Date.now(),n=[],r=this._r.filter(s=>t>s.retryAt||(n.push(s),!1));if(this._r=n,r.length>0)for(var{requestOptions:a}of r)this.retriableRequest(a)}unload(){for(var{requestOptions:t}of(this.$r&&(clearTimeout(this.$r),this.$r=void 0),this.Mr=!1,on(ft)||(this.Or&&(ft.removeEventListener("online",this.Or),this.Or=void 0),this.Fr&&(ft.removeEventListener("offline",this.Fr),this.Fr=void 0)),this._r))try{this._instance._send_request(Qt({},t,{transport:"sendBeacon"}))}catch(n){sn.error(n)}this._r=[]}}class pde{constructor(t){this.Dr=()=>{var n,r,a,s;this.Nr||(this.Nr={});var i=this.scrollElement(),l=this.scrollY(),c=i?Math.max(0,i.scrollHeight-i.clientHeight):0,u=l+((i==null?void 0:i.clientHeight)||0),d=(i==null?void 0:i.scrollHeight)||0;this.Nr.lastScrollY=Math.ceil(l),this.Nr.maxScrollY=Math.max(l,(n=this.Nr.maxScrollY)!==null&&n!==void 0?n:0),this.Nr.maxScrollHeight=Math.max(c,(r=this.Nr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Nr.lastContentY=u,this.Nr.maxContentY=Math.max(u,(a=this.Nr.maxContentY)!==null&&a!==void 0?a:0),this.Nr.maxContentHeight=Math.max(d,(s=this.Nr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get qr(){return this._instance.config.scroll_root_selector}getContext(){return this.Nr}resetContext(){var t=this.Nr;return setTimeout(this.Dr,0),t}startMeasuringScrollPosition(){ns(ft,"scroll",this.Dr,{capture:!0}),ns(ft,"scrollend",this.Dr,{capture:!0}),ns(ft,"resize",this.Dr)}scrollElement(){if(!this.qr)return ft==null?void 0:ft.document.documentElement;var t=Ur(this.qr)?this.qr:[this.qr];for(var n of t){var r=ft==null?void 0:ft.document.querySelector(n);if(r)return r}}jr(t){var n=t==="y"?"scrollTop":"scrollLeft";if(this.qr){var r=this.scrollElement();return r&&r[n]||0}return ft?t==="y"?ft.scrollY||ft.pageYOffset||ft.document.documentElement.scrollTop||0:ft.scrollX||ft.pageXOffset||ft.document.documentElement.scrollLeft||0:0}scrollY(){return this.jr("y")}scrollX(){return this.jr("x")}}var gde=e=>Cj(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties,e==null?void 0:e.config.disable_capture_url_hashes
1189);class K${constructor(t,n,r,a){this.Br=s=>{var i=this.Hr();if(!i||i.sessionId!==s){var l={sessionId:s,props:this.Ur(this._instance)};this.zr.register({[XR]:l})}},this._instance=t,this.Vr=n,this.zr=r,this.Ur=a||gde,this.Vr.onSessionId(this.Br)}Hr(){return this.zr.props[XR]}getSetOnceProps(){var t,n=(t=this.Hr())==null?void 0:t.props;return n?"r"in n?Nj(n,this._instance.config.disable_capture_url_hashes):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return Ta(AP(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+IR(r)]=n}),t}}class LP{constructor(){this.Wr={}}on(t,n){return this.Wr[t]||(this.Wr[t]=[]),this.Wr[t].push(n),()=>{this.Wr[t]=this.Wr[t].filter(r=>r!==n)}}emit(t,n){for(var r of this.Wr[t]||[])r(n);for(var a of this.Wr["*"]||[])a(t,n)}}var t0=Qa("[SessionId]");class Z${on(t,n){return this.Gr.on(t,n)}constructor(t,n,r){var a;if(this.Zr=null,this.Qr=[],this.Jr=void 0,this.Yr=!1,this.Gr=new LP,this.Kr=(u,d)=>!(!xu(u)||!xu(d))&&Math.abs(u-d)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===Mu)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Se=t.config,this.zr=t.persistence,this.Xr=void 0,this.ei=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.ti=n||Tu,this.ri=r||Tu;var s=this.Se.persistence_name||this.Se.token;if(this._sessionTimeoutMs=1e3*Fc(this.Se.session_idle_timeout_seconds||1800,60,36e3,t0.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ii(),this.ni="ph_"+s+"_window_id",this.si="ph_"+s+"_primary_window_exists",this.oi()){var i=ai.F(this.ni),l=ai.F(this.si);i&&!l?this.Xr=i:ai.P(this.ni),ai.q(this.si,!0)}if((a=this.Se.bootstrap)!=null&&a.sessionID)try{var c=(u=>{var d=this.Se.bootstrap.sessionID.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})();this.ai(this.Se.bootstrap.sessionID,new Date().getTime(),c)}catch(u){t0.error("Invalid sessionID in bootstrap",u)}this.li()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return on(this.Qr)&&(this.Qr=[]),this.Qr.push(t),this.ei&&t(this.ei,this.Xr),()=>{this.Qr=this.Qr.filter(n=>n!==t)}}oi(){return this.Se.persistence!=="memory"&&!this.zr.Vt&&ai.N()}ui(t){t!==this.Xr&&(this.Xr=t,this.oi()&&ai.q(this.ni,t))}hi(){return this.Xr?this.Xr:this.oi()?ai.F(this.ni):null}di(t){var n=this.Zr;return!qi(n)&&!qi(t)&&5e3>Math.abs(t-n)}ai(t,n,r){var a=n!==this._sessionActivityTimestamp,s=!(t!==this.ei||r!==this._sessionStartTimestamp);this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.ei=t,s&&!a||s&&this.di(n)||(this.Zr=n,this.zr.register({[Nh]:[n,t,r]}))}ci(){var t,n=(t=this.Se)==null?void 0:t.persistence_save_debounce_ms;return xu(n)&&n>0}vi(){this.ci()?this.zr.refreshKey(Nh):(this.zr.flush(),this.zr.load())}fi(){var t;if(!qi(this._sessionActivityTimestamp)&&this._sessionActivityTimestamp!==this.Zr){this.vi();var[,n,r]=this.pi();n===this.ei&&r===this._sessionStartTimestamp&&(this.Zr=this._sessionActivityTimestamp,this.zr.register({[Nh]:[this._sessionActivityTimestamp,(t=this.ei)!==null&&t!==void 0?t:null,this._sessionStartTimestamp]}),this.zr.flush())}}gi(){var[t]=this.pi(),n=xu(t)?t:0,r=xu(this._sessionActivityTimestamp)?this._sessionActivityTimestamp:0;return Math.max(n,r)}mi(t){return this.vi(),this.Kr(t,this.gi())}pi(){var t=this.zr.props[Nh];return Ur(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.Zr=null,clearTimeout(this.yi),this.yi=void 0,this.ai(null,null,null)}destroy(){this.Yr=!0,this.fi(),clearTimeout(this.yi),this.yi=void 0,this.Jr&&ft&&(ft.removeEventListener(DE,this.Jr,{capture:!1}),this.Jr=void 0),this.Qr=[]}li(){this.Jr=()=>{this.fi(),this.oi()&&ai.P(this.si)},ns(ft,DE,this.Jr,{capture:!1})}
1189checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.Se.cookieless_mode===Mu)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[,a,s]=this.pi(),i=this.gi(),l=this.hi(),c=xu(s)&&Math.abs(r-s)>864e5,u=!1,d=!1,f=!a,m=a,h=!f&&!t&&this.Kr(r,i);h&&((h=this.mi(r))||t0.info("cross-tab refresh kept the session alive",{sessionId:a}),[,a,s]=this.pi()),f||h||c?(a=this.ti(),l=this.ri(),t0.info("new session ID generated",{sessionId:a,windowId:l,changeReason:{noSessionId:f,activityTimeout:h,sessionPastMaximumLength:c}}),s=r,u=!0):(l||(l=this.ri(),u=!0),(d=a!==m)&&(t0.info("adopted cross-tab session id",{sessionId:a,windowId:l}),u=!0));var g=xu(i)&&t&&!c?i:r,v=xu(s)?s:new Date().getTime();this.ui(l),this.ai(a,g,v),t||this.ii();var y={noSessionId:f,activityTimeout:h,sessionPastMaximumLength:c,crossTabAdoption:d};return u&&this.Qr.forEach(b=>b(a,l,y)),{sessionId:a,windowId:l,sessionStartTimestamp:v,changeReason:u?y:void 0,lastActivityTimestamp:i}}ii(){this.Yr||(clearTimeout(this.yi),this.yi=setTimeout(()=>{if(!this.Yr)if(this.mi(new Date().getTime())){var t=this.ei;this.resetSessionId(),this.Gr.emit("forcedIdleReset",{idleSessionId:t})}else this.ii()},1.1*this.sessionTimeoutMs))}}var $j=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&w$(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(a=>w$(a==null?void 0:a.brand,t)))return!0}catch{}return!!e.webdriver};function Fj(){return(Fj=Ls(function*(){var e=Bi==null?void 0:Bi.userAgentData;if(e!=null&&e.getHighEntropyValues)try{var t=yield e.getHighEntropyValues(["model"]),n=t==null?void 0:t.model;return _a(n)&&n.length>0?n:void 0}catch(r){return void sn.info("Unable to resolve $device_model from userAgentData.getHighEntropyValues",r)}})).apply(this,arguments)}var UE=function(e,t){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function X$(e,t,n){return Rh({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var zj={exact:(e,t)=>t.some(n=>e.some(r=>n===r)),is_not:(e,t)=>t.every(n=>e.every(r=>n!==r)),regex:(e,t)=>t.some(n=>e.some(r=>UE(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!UE(n,r))),icontains:(e,t)=>t.map(s1).some(n=>e.map(s1).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(s1).every(n=>e.map(s1).every(r=>!n.includes(r))),gt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(a=>r>parseFloat(a))}),lt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(a=>r<parseFloat(a))})},s1=e=>e.toLowerCase();function Hj(e,t){return!e||Object.entries(e).every(n=>{var[r,a]=n,s=t==null?void 0:t[r];if(on(s)||qi(s))return!1;var i=[String(s)],l=zj[a.operator];return!!l&&l(a.values,i)})}var dT="custom",Q$="i.posthog.com",vde=/^\/static\//;class yde{constructor(t){this.bi={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+Q$,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.bi[this.apiHost]||(this.bi[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":dT),this.bi[this.apiHost]}wi(t){if(vde.test(t)){var n=this.instance.config.asset_host;if(typeof n=="string")return n.trim().replace(/\/$/,"")||void 0}}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(t==="assets"){var r=this.wi(n);if(r)return""+r+n}if(this.region===dT)return this.apiHost+n;var a=Q$+n;switch(t){case"assets":return"https://"+this.region+"-assets."+a;case"api":return"https://"+this.region+"."+a}}}var xa=Qa("[Surveys]"),fT="seenSurvey_",bde=[RC.Popover,RC.Widget,RC.API],wde={ignoreConditions:!1,ignoreDelay:!1,displayType:sT.Popover}
1189,Ede=Qa("[PostHog ExternalIntegrations]"),xde={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class _de{constructor(t){this._instance=t}Mt(t,n){var r;(r=Kn.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,a=>{if(a)return Ede.error("failed to load script",a);n()})}startIfEnabledOrStop(){var t=this,n=function(i){var l,c,u;!a||(l=Kn.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[i]||t.Mt(xde[i],()=>{var d;(d=Kn.__PosthogExtensions__)==null||(d=d.integrations)==null||(d=d[i])==null||d.start(t._instance)}),!a&&(c=Kn.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[i]&&((u=Kn.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[i])==null||u.stop())};for(var[r,a]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var th,Z0={},OC=0,BE=()=>{},J$='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',n0="Surveys module not available",e3="sanitize_properties is deprecated. Use before_send instead",Vj="Invalid value for property_denylist config: ",yh="posthog",Uj=!cde&&(lo==null?void 0:lo.indexOf("MSIE"))===-1&&(lo==null?void 0:lo.indexOf("Mozilla"))===-1,t3=e=>{var t;return Qt({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,asset_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Cue(_n==null?void 0:_n.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:BE,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,__preview_cookie_wins_on_conflict:!1,debug:ys&&_a(ys==null?void 0:ys.search)&&ys.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disableDeviceModel:!1,disable_external_dependency_loading:!1,strict_script_versioning:!1,enable_recording_console_log:void 0,secure_cookie:(ft==null||(t=ft.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){sn.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:nT,before_send:void 0,get_current_url:void 0,request_queue_config:{flush_interval_ms:uT},error_tracking:{},_onCapture:BE},(n=>({rageclick:n&&n>="2026-05-30"?{content_ignorelist:Fue,ignore_text_selection:!0}
1189:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2026-06-25"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6},streamNetworkBody:!0}:n&&n>="2026-05-30"?{strictMinimumDuration:!0,canvasCapture:{resolutionScale:.6}}:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0,persistence_save_debounce_ms:n&&n>="2026-05-30"?250:0,split_storage:!(!n||"2026-05-30">n),detect_google_search_app:!(!n||"2026-05-30">n),disable_capture_url_hashes:!(!n||"2026-06-25">n)}))(e))},kde=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["__preview_disable_beacon","disable_beacon"],["store_google","save_campaign_params"],["verbose","debug"]],n3=e=>{var t={};for(var[n,r]of kde)on(e[n])||(t[r]=e[n]);var a=Oa({},t,e),s=e.__preview_external_dependency_versioned_paths;return on(s)||(on(e.strict_script_versioning)&&(a.strict_script_versioning=!!s),_a(s)&&on(e.asset_host)&&(a.asset_host=s)),Ur(e.property_blacklist)&&(on(e.property_denylist)?a.property_denylist=e.property_blacklist:Ur(e.property_denylist)?a.property_denylist=[...e.property_blacklist,...e.property_denylist]:sn.error(Vj+e.property_denylist)),a};class Sde{constructor(){this.__forceAllowLocalhost=!1}get xi(){return this.__forceAllowLocalhost}set xi(t){sn.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class wl{ki(t,n){if(t){var r=this.Si.indexOf(t);r!==-1&&this.Si.splice(r,1)}return this.Si.push(n),n.initialize==null||n.initialize(),n}Ci(){return this.config.cookieless_mode===Mu||this.config.cookieless_mode===Tf&&this.consent.isRejected()}get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new Sde,this.Ii=!1,this.version=cs.LIB_VERSION,this.Ti=new LP,this.Si=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=t3(),this.SentryIntegration=que,this.sentryIntegration=r=>function(a,s){var i=Ej(a,s);return{name:wj,processEvent:l=>i(l)}}(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Ei=!1,this.Mi=null,this.Pi=null,this.Ri=null,this.scrollManager=new pde(this),this.pageViewManager=new F$(this),this.rateLimiter=new rde(this),this.requestRouter=new yde(this),this.consent=new Mue(this),this.externalIntegrations=new _de(this);var n=(t=wl.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,a,s)=>{var i=_a(r)?{[r]:a}:r;this.setPersonProperties(i),s==null||s({})},set_once:(r,a,s)=>{var i=_a(r)?{[r]:a}:r;this.setPersonProperties(void 0,i),s==null||s({})}},this.on("eventCaptured",r=>sn.info('send "'+(r==null?void 0:r.event)+'"',r))}init(t,n,r){if(r&&r!==yh){var a,s=(a=Z0[r])!==null&&a!==void 0?a:new wl;return s._init(t,n,r),Z0[r]=s,Z0[yh][r]=s,s}return this._init(t,n,r)}_init(t,n,r){var a,s;n===void 0&&(n={});var i=_a(t)?t.trim():"";if(!i)return sn.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Oi(n.debug),this.Li=n,this.Fi=[],n.person_profiles?this.Pi=n.person_profiles:n.process_person&&(this.Pi=n.process_person);var l=t3(n.defaults),c=n3(n),u=Oa({},l,c,{name:r,token:i});Da(l.rageclick)&&Da(c.rageclick)&&(u.rageclick=Oa({},l.rageclick,c.rageclick)),Da(l.session_recording)&&Da(c.session_recording)&&(u.session_recording=Oa({},l.session_recording,c.session_recording)),this.set_config(u),this.config.on_xhr_error&&sn.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:Oc.GZipJS;var d=this.Ai();this.persistence=new NC(this.config,d),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new NC(Qt({},this.config,{persistence:"sessionStorage"}),d,!1);var f=Qt({},this.persistence.props),m=Qt({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new fde(x=>this.Di(x),this.config.request_queue_config),this.Ni=new hde(this),this.__request_queue=[];var h=this.Ci();if(h||(this.sessionManager=new Z$(this),this.sessionPropsManager=new K$(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(sn.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.qi(h)},0)):(sn.info("Initializing extensions synchronously"),this.qi(h)),cs.DEBUG=cs.DEBUG||this.config.debug,cs.DEBUG&&sn.info("Starting in debug mode",{this:this,config:n,thisC:Qt({},this.config),p:f,s:m}),!this.config.identity_distinct_id||(a=n.bootstrap)!=null&&a.distinctID||(n.bootstrap=Qt({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var g=n.bootstrap.distinctID,v=this.get_distinct_id(),y=this.persistence.get_property(Kl);if(n.bootstrap.isIdentifiedID&&v!=null&&v!==g&&y===Xm)this.identify(g);else if(n.bootstrap.isIdentifiedID&&v!=null&&v!==g&&y===Qm)sn.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var b=this.config.get_device_id(Tu()),E=n.bootstrap.isIdentifiedID?b:g;this.persistence.set_property(Kl,n.bootstrap.isIdentifiedID?Qm:Xm),this.register({distinct_id:g,$device_id:E})}}if(h)this.register_once({distinct_id:Jb,$device_id:null},"");else if(!this.get_distinct_id()){var w=this.config.get_device_id(Tu());this.register_once({distinct_id:w,$device_id:w},""),this.persistence.set_property(Kl,Xm)}return ns(ft,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?function(x,S){var N=x.config.segment;if(!N)return S();(function(k,C){var A=k.config.segment;if(!A)return C();var O=M=>{var L=()=>M.anonymousId()||Tu();k.config.get_device_id=L,M.id()&&(k.register({distinct_id:M.id(),$device_id:L()}),k.persistence.set_property(Kl,Qm)),C()},T=A.user();"then"in T&&Ic(T.then)?T.then(O):O(T)})(x,()=>{N.register((k=>{typeof Promise<"u"&&Promise.resolve||CC.warn("This browser does not have Promise support, and can not use the segment integration");var C=(A,O)=>{if(!O)return A;A.event.userId||A.event.anonymousId===k.get_distinct_id()||(CC.info("No userId set, resetting PostHog"),k.reset()),A.event.userId&&A.event.userId!==k.get_distinct_id()&&(CC.info("UserId set, identifying with PostHog"),k.identify(A.event.userId)
1189);var T=k.calculateEventProperties(O,A.event.properties);return A.event.properties=Object.assign({},T,A.event.properties),A};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:A=>C(A,A.event.event),page:A=>C(A,vh),identify:A=>C(A,_C),screen:A=>C(A,"$screen")}})(x)).then(()=>{S()})})}(this,()=>this.ji()):this.ji(),Ic(this.config._onCapture)&&this.config._onCapture!==BE&&(sn.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",x=>this.config._onCapture(x.event,x))),this.config.ip&&sn.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this.config.disableDeviceModel||function(){return Fj.apply(this,arguments)}().then(x=>{x&&this.register({[EC]:x})}).catch(BE),this}qi(t){var n,r,a,s,i,l,c,u=performance.now(),d=Qt({},wl.__defaultExtensionClasses,this.config.__extensionClasses),f=[];d.featureFlags&&this.Si.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new d.featureFlags(this)),d.exceptions&&this.Si.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new d.exceptions(this)),d.historyAutocapture&&this.Si.push(this.historyAutocapture=new d.historyAutocapture(this)),d.tracingHeaders&&this.Si.push(this.tracingHeaders=new d.tracingHeaders(this)),d.siteApps&&this.Si.push(this.siteApps=new d.siteApps(this)),d.sessionRecording&&!t&&this.Si.push(this.sessionRecording=new d.sessionRecording(this)),this.config.disable_scroll_properties||f.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),d.autocapture&&this.Si.push(this.autocapture=new d.autocapture(this)),d.surveys&&this.Si.push(this.surveys=(a=this.surveys)!==null&&a!==void 0?a:new d.surveys(this)),d.logs&&this.Si.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new d.logs(this)),d.conversations&&this.Si.push(this.conversations=(i=this.conversations)!==null&&i!==void 0?i:new d.conversations(this)),d.productTours&&this.Si.push(this.productTours=new d.productTours(this)),d.heatmaps&&this.Si.push(this.heatmaps=new d.heatmaps(this)),d.webVitalsAutocapture&&this.Si.push(this.webVitalsAutocapture=new d.webVitalsAutocapture(this)),d.exceptionObserver&&this.Si.push(this.exceptionObserver=new d.exceptionObserver(this)),d.deadClicksAutocapture&&this.Si.push(this.deadClicksAutocapture=new d.deadClicksAutocapture(this,Gue)),d.toolbar&&this.Si.push(this.toolbar=(l=this.toolbar)!==null&&l!==void 0?l:new d.toolbar(this)),d.experiments&&this.Si.push(this.experiments=(c=this.experiments)!==null&&c!==void 0?c:new d.experiments(this)),this.Si.forEach(m=>{m.initialize&&f.push(()=>{m.initialize==null||m.initialize()})}),f.push(()=>{if(this.Bi){var m=this.Bi;this.Bi=void 0,this.pr(m)}}),this.Hi(f,u)}Hi(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout(()=>{this.Hi(t,n)},0);var r=t.shift();if(r)try{r()}catch(s){sn.error("Error initializing extension:",s)}}var a=Math.round(performance.now()-n);this.register_for_session({[aj]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[sj]:a}),this.config.__preview_deferred_init_extensions&&sn.info("PostHog extensions initialized ("+a+"ms)")}pr(t){var n;if(!_n||!_n.body)return sn.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.pr(t)},500);this.config.__preview_deferred_init_extensions&&(this.Bi=t),this.Ui=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=dr(t.supportedCompression,Oc.GZipJS)?Oc.GZipJS:dr(t.supp
1189ortedCompression,Oc.Base64)?Oc.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Pi?this.Pi:nT}),this.Si.forEach(r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(t))}ji(){try{this.config.loaded(this)}catch(r){sn.critical("`loaded` function failed",r)}if(this.zi(),this.config.internal_or_test_user_hostname&&ys!=null&&ys.hostname){var t=ys.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ci())&&this.Vi()},1),this.Wi=new Tj(this),this.Wi.load()}zi(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.$i)==null||t.enable())}_dom_loaded(){this.is_capturing()&&e1(this.__request_queue,t=>this.Di(t)),this.__request_queue=[],this.zi()}_handle_unload(){var t,n,r,a;(t=this.surveys)==null||t.handlePageUnload==null||t.handlePageUnload(),this.config.request_batching?(this.Gi()&&this.capture(xC),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.$i)==null||r.unload(),(a=this.Ni)==null||a.unload()):this.Gi()&&this.capture(xC,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded?Uj?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)?t.fireCallbackOnDrop&&(t.callback==null||t.callback({statusCode:429})):(t.transport=t.transport||this.config.api_transport,t.headers=Qt({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,(on(this.config.disable_beacon)?this.config.__preview_disable_beacon:this.config.disable_beacon)&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,a,s,i=Qt({},n);i.timeout=i.timeout||6e4,i.url=Y$(i.url,i.compression);var l=(r=i.transport)!==null&&r!==void 0?r:"fetch",c=yw.filter(d=>!i.disableTransport||!d.transport||!i.disableTransport.includes(d.transport)),u=(a=(s=function(d,f){for(var m=0;d.length>m;m++)if(d[m].transport===l)return d[m]}(c))==null?void 0:s.method)!==null&&a!==void 0?a:c[0].method;if(!u)throw new Error("No available transport method");l!=="sendBeacon"&&i.data&&i.compression===Oc.GZipJS&&Ace&&typeof Promise<"u"&&!vw?dde(i).then(d=>{u(d)}).catch(d=>{if(b$(d))return vw=!0,void u(Qt({},i,{compression:void 0,url:Y$(n.url,void 0)}));(f=>{if(!f||typeof f!="object")return!1;var m="name"in f?String(f.name):"";return b$(f)||m===bB})(d)&&(vw=!0),u(i)}):u(i)})(Qt({},t,{callback:n=>{var r,a;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(a=this.config).on_request_error)==null||r.call(a,n),t.callback==null||t.callback(n)}}))):t.fireCallbackOnDrop&&(t.callback==null||t.callback({statusCode:0}))}Di(t){this.Ni?this.Ni.retriableRequest(t):this._send_request(t)}_execute_array(t){OC++;try{var n,r=[],a=[],s=[];e1(t,l=>{if(l)if(Ur(n=l[0]))s.push(l);else if(Ic(l))try{l.call(this)}catch(c){sn.error("Error executing queued PostHog call",l,c)}else Ur(l)&&n==="alias"?r.push(l):Ur(l)&&n.indexOf("capture")!==-1&&Ic(this[n])?s.push(l):a.push(l)});var i=function(l,c){e1(l,function(u){try{if(Ur(u[0])){var d=c;Ta(u,function(f){d=d[f[0]].apply(d,f.slice(1))})}else c[u[0]].apply(c,u.slice(1))}catch(f){sn.error("Error executing queued PostHog call",u,f)}})};i(r,this),i(a,this),i(s,this)}finally{OC--}}push(t){if(OC>0&&Ur(t)&&_a(t[0])){var n=wl.prototype[t[0]];Ic(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var a,s,i,l,c;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!on(t)&&_a(t)){var u=!this.config.opt_out_useragent_filter&&this._is_bot();if(!u||this.config.__preview_capture_bot_pageviews){var d=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(d==null||!d.isRateLimited){n!=null&&n.$current_url&&!_a(n==null?void 0:n.$current_url)&&(sn.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.Zi||sn.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var f=new Date,m=(r==null?void 0:r.timestamp)||f,h=k$(r==null?void 0:r.uuid,Tu),g={uuid:h,event:t,properties:this.calculateEventProperties(t,n||{},m,h)};t===vh&&this.config.__preview_capture_bot_pageviews&&u&&(g.event="$bot_pageview",g.properties.$browser_type="bot"),d&&(g.properties.$lib_rate_limit_remaining_tokens=d.remainingTokens),r!=null&&r.$set&&(g.$set=r==null?void 0:r.$set);var v=r==null?void 0:r.$unset;v&&(g.$unset=v);var y,b,E,w=this.Qi(r==null?void 0:r.$set_once,t!==N$,t===_C);if(w&&(g.$set_once=w),r!=null&&r._noTruncate||(s=this.config.properties_string_max_length,i=g,l=O=>_a(O)?O.slice(0,s):O,c=new Set,g=function O(T,M){return T!==Object(T)?l?l(T):T:c.has(T)?void 0:(c.add(T),Ur(T)?(L=[],e1(T,D=>{L.push(O(D))})):(L={},Ta(T,(D,j)=>{c.has(D)||(L[j]=O(D))})),L);var L}(i)),g.timestamp=m,on(r==null?void 0:r.timestamp)||(g.properties.$event_time_override_provided=!0,g.properties.$event_time_override_system_time=f),t===Pu.DISMISSED||t===Pu.SENT){var x=n==null?void 0:n[TC.SURVEY_ID],S=n==null?void 0:n[TC.SURVEY_ITERATION];(O=>{try{var T=(M=>((L,D)=>
1189{var j=""+fT+D.id;return D.current_iteration&&D.current_iteration>0&&(j=""+fT+D.id+"_"+D.current_iteration),j})(0,M))(O);if(localStorage.getItem(T))return;localStorage.setItem(T,"true")}catch(M){xa.error("Failed to persist survey seen state",M)}})({id:x,current_iteration:S}),g.$set=Qt({},g.$set,{[(y={id:x,current_iteration:S},b=t===Pu.SENT?"responded":"dismissed",E="$survey_"+b+"/"+y.id,y.current_iteration&&y.current_iteration>0&&(E="$survey_"+b+"/"+y.id+"/"+y.current_iteration),E)]:!0})}else t===Pu.SHOWN&&(g.$set=Qt({},g.$set,{[TC.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===nde.SHOWN){var N=n==null?void 0:n[H$.TOUR_TYPE];N&&(g.$set=Qt({},g.$set,{[H$.TOUR_LAST_SEEN_DATE+"/"+N]:new Date().toISOString()}))}var k=Qt({},g.properties.$set,g.$set);if(Id(k)||this.setPersonPropertiesForFlags(k),!Ar(this.config.before_send)){var C=this.it(g);if(!C)return;(g=C).uuid=k$(g.uuid,Tu)}this.Ti.emit("eventCaptured",g);var A={method:"POST",url:(a=r==null?void 0:r._url)!==null&&a!==void 0?a:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:g,compression:"best-available",batchKey:r==null?void 0:r._batchKey,transport:r==null?void 0:r.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Di(A):this.$i.enqueue(A),g}sn.critical("This capture call is ignored due to client rate limiting.")}}else sn.error("No event name provided to posthog.capture")}else sn.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",n=>t(n.event,n))}calculateEventProperties(t,n,r,a,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var i=s?void 0:this.persistence.remove_event_timer(t),l=Qt({},n);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.Ci()&&(l.$cookieless_mode=!0),t==="$snapshot"){var c=Qt({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=c.distinct_id,(!_a(l.distinct_id)&&!Yi(l.distinct_id)||OR(l.distinct_id))&&sn.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var u,d=function(b,E,w,x){var S,N,k,C;if(x===void 0&&(x=!1),!lo)return{};var A,O,T,M,L,D,j,H,Y,z=b?[...Mp,...E||[]]:[],[K,ee]=function(B){for(var U=0;x$.length>U;U++){var[$,ce]=x$[U],be=$.exec(B),ue=be&&(Ic(ce)?ce(be,B):ce);if(ue)return ue}return["",""]}(lo),oe=(A=typeof navigator<"u"?navigator:void 0)!=null&&A.brave?{brave:!0}:{},J={detectGoogleSearchApp:w},se=Oa(AP({$os:K,$os_version:ee,$browser:UB(lo,navigator.vendor,oe,J),$device:_$(lo),$device_type:(T=lo,M={userAgentDataPlatform:(S=navigator)==null||(S=S.userAgentData)==null?void 0:S.platform,maxTouchPoints:(N=navigator)==null?void 0:N.maxTouchPoints,screenWidth:ft==null||(k=ft.screen)==null?void 0:k.width,screenHeight:ft==null||(C=ft.screen)==null?void 0:C.height,devicePixelRatio:ft==null?void 0:ft.devicePixelRatio},Y=_$(T),Y===kB||Y===_B||Y==="Kobo"||Y==="Kindle Fire"||Y===$B?Tp:Y===Mv||Y===Wh||Y===Pv||Y===PR?"Console":Y===CB?"Wearable":Y?Go:(M==null?void 0:M.userAgentDataPlatform)==="Android"&&((L=M==null?void 0:M.maxTouchPoints)!==null&&L!==void 0?L:0)>0?600>Math.min((D=M==null?void 0:M.screenWidth)!==null&&D!==void 0?D:0,(j=M==null?void 0:M.screenHeight)!==null&&j!==void 0?j:0)/((H=M==null?void 0:M.devicePixelRatio)!==null&&H!==void 0?H:1)?Go:Tp:"Desktop"),$timezone:Rj(),$timezone_offset:Que()}),{$current_url:$v(x?Kd(ys==null?void 0:ys.href):ys==null?void 0:ys.href,z,Fv),$host:ys==null?void 0:ys.host,$pathname:ys==null?void 0:ys.pathname,$raw_user_agent:lo.length>1e3?lo.substring(0,997)+"...":lo,$browser_version:Kce(lo,navigator.vendor,oe,J),$browser_language:z$(),$browser_language_prefix:(O=z$(),typeof O=="string"?O.split("-")[0]:void 0),$screen_height:ft==null?void 0:ft.screen.height,$screen_width:ft==null?void 0:ft.screen.width,$viewport_height:ft==null?void 0:ft.innerHeight,$viewport_width:ft==null?void 0:ft.innerWidth,$lib:cs.LIB_NAME,$lib_version:cs.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3});return cs.SDK_DIST_CHANNEL&&(se.$sdk_dist_channel=cs.SDK_DIST_CHANNEL),se}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties,this.config.detect_google_search_app,this.config.disable_capture_url_hashes
1189);if(this.sessionManager){var{sessionId:f,windowId:m}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());l.$session_id=f,l.$window_id=m}this.sessionPropsManager&&Oa(l,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&Oa(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=(h=this.Ni)==null?void 0:h.length}catch(b){l.$sdk_debug_error_capturing_properties=String(b)}if(this.requestRouter.region===dT&&(l.$lib_custom_api_host=this.config.api_host),u=t!==vh||s?t!==xC||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,a),l=Oa(l,u),t===vh&&_n&&(l.title=_n.title),!on(i)){var g=r.getTime()-i;l.$duration=parseFloat((g/1e3).toFixed(3))}lo&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=Oa({},d,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),Ur(this.config.property_denylist)?Ta(this.config.property_denylist,function(b){delete l[b]}):sn.error(Vj+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var v=this.config.sanitize_properties;v&&(sn.error(e3),l=v(l,t));var y=this.Ji();return l.$process_person_profile=y,y&&!s&&this.Yi("_calculate_event_properties"),l}Qi(t,n,r){var a;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.Ji()||this.Ii&&!r)return t;var s=this.persistence.get_initial_props(),i=(a=this.sessionPropsManager)==null?void 0:a.getSetOnceProps(),l=Oa({},s,i||{},t||{}),c=this.config.sanitize_properties;return c&&(sn.error(e3),l=c(l,"$set_once")),n&&(this.Ii=!0),Id(l)?void 0:l}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var a;(a=this.persistence)==null||a.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}Ki(t,n){this.register({[t]:n})}getFeatureFlag(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(t,n)}getAllFeatureFlags(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.getAllFeatureFlags())!==null&&t!==void 0?t:[]}isFeatureEnabled(t,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(t,n)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,n,r){var a;(a=this.featureFlags)==null||a.updateFlags(t,n,r)}updateEarlyAccessFeatureEnrollment(t,n,r){var a;(a=this.featureFlags)==null||a.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){var a;return n===void 0&&(n=!1),(a=this.featureFlags)==null?void 0:a.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Ti.on(t,n)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:n0}),()=>{})}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(t,n):t([],{isLoaded:!1,error:n0})}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,n):t([],{isLoaded:!1,error:n0})}renderSurvey(t,n){var r;(r=this.surveys)==null||r.renderSurvey(t,n)}displaySurvey(t,n){var r;n===void 0&&(n=wde),(r=this.surveys)==null||r.displaySurvey(t,n)}cancelPendingSurvey(t){var n;(n=this.surveys)==null||n.cancelPendingSurvey(t)}canRenderSurvey(t){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(t))!==null&&n!==void 0?n:{visible:!1,disabledReason:n0}}canRenderSurveyAsync(t,n){var r,a;return n===void 0&&(n=!1),(r=(a=this.surveys)==null?void 0:a.canRenderSurveyAsync(t,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:n0})}Xi(t){return!t||OR(t)?(sn.critical("Unique user id has not been set in posthog.identify"),!1):t===Jb?(sn.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(sn.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
1189ot a hardcoded string.'),!1)}identify(t,n,r){if(!this.__loaded||!this.persistence)return sn.uninitializedWarning("posthog.identify");if(Yi(t)&&(t=t.toString(),sn.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.Xi(t)&&this.Yi("posthog.identify")){var a=this.get_distinct_id();this.register({$user_id:t}),this.get_property(IE)||this.register_once({$had_persisted_distinct_id:!0,$device_id:a},""),t!==a&&t!==this.get_property(k0)&&(this.unregister(k0),this.register({distinct_id:t}));var s,i=(this.persistence.get_property(Kl)||Xm)===Xm;t!==a&&i?(this.persistence.set_property(Kl,Qm),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(_C,{distinct_id:t,$anon_distinct_id:a},{$set:n||{},$set_once:r||{}}),this.Ri=X$(t,n,r),(s=this.featureFlags)==null||s.setAnonymousDistinctId(a)):(n||r)&&this.setPersonProperties(n,r),t!==a&&(this.reloadFeatureFlags(),this.unregister(q0))}}setPersonProperties(t,n){if((t||n)&&this.Yi("posthog.setPersonProperties")){var r=X$(this.get_distinct_id(),t,n);this.Ri!==r?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!0),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Ri=r):sn.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}unsetPersonProperties(t){var n,r=(Ur(t)?t:[t]).filter(a=>_a(a)&&a.length>0);r.length!==0&&this.Yi("posthog.unsetPersonProperties")&&((n=this.featureFlags)==null||n.unsetPersonPropertiesForFlags(r,!0),this.capture("$set",{$unset:r}),this.Ri=null)}group(t,n,r){if(t&&n){var a=this.getGroups(),s=a[t]!==n;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Qt({},a,{[t]:n})}),s||r){var i={$group_type:t,$group_key:n};r&&(i.$group_set=r),this.capture(N$,i)}r&&this.setGroupPropertiesForFlags({[t]:r}),s&&!r&&this.reloadFeatureFlags()}else sn.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(t){var n;t===void 0&&(t=!0),(n=this.featureFlags)==null||n.resetPersonPropertiesForFlags(t)}setGroupPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),this.Yi("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(t,n))}resetGroupPropertiesForFlags(t){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(t)}reset(t){var n,r,a,s,i,l,c,u,d;if(sn.info("reset"),!this.__loaded)return sn.uninitializedWarning("posthog.reset");var f,m=this.get_property(IE),h=this.get_property(EC),g=this.get_property(Hf);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),on(g)||(f=this.persistence)==null||f.register({[Hf]:g}),(a=this.surveys)==null||a.reset(),(s=this.Wi)==null||s.stop(),(i=this.featureFlags)==null||i.reset(),(l=this.conversations)==null||l.reset(),(c=this.logs)==null||c.reset(),(u=this.persistence)==null||u.set_property(Kl,Xm),(d=this.sessionManager)==null||d.resetSessionId(),this.Ri=null,this.config.cookieless_mode===Mu)this.register_once({distinct_id:Jb,$device_id:null},"");else{var v=this.config.get_device_id(Tu());this.register_once({distinct_id:v,$device_id:t?v:m},""),t||on(h)||this.register({[EC]:h})}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,n){var r;this.config.identity_distinct_id=t,this.config.identity_hash=n,this.alias(t),(r=this.conversations)==null||r.en()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.tn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),a=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var s,i=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return a;a+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-i,0)}return a}
1189alias(t,n){return t===this.get_property(XB)?(sn.critical("Attempting to create alias for existing People user - aborting."),-2):this.Yi("posthog.alias")?(on(n)&&(n=this.get_distinct_id()),t!==n?(this.Ki(k0,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(sn.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=Qt({},this.config);if(Da(t)){var r,a,s,i,l,c,u,d,f,m,h;Oa(this.config,n3(t));var g=this.Ai();(r=this.persistence)==null||r.update_config(this.config,n,g),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new NC(Qt({},this.config,{persistence:"sessionStorage"}),g,!1);var v=this.Oi(this.config.debug);Bc(v)&&(this.config.debug=v),Bc(this.config.debug)&&(this.config.debug?(cs.DEBUG=!0,Na.N()&&Na.q("ph_debug",!0),sn.info("set_config",{config:t,oldConfig:n,newConfig:Qt({},this.config)})):(cs.DEBUG=!1,Na.N()&&Na.P("ph_debug"))),(a=this.exceptionObserver)==null||a.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(l=this.tracingHeaders)==null||l.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(u=this.heatmaps)==null||u.startIfEnabled(),(d=this.exceptionObserver)==null||d.startIfEnabledOrStop(),(f=this.deadClicksAutocapture)==null||f.startIfEnabledOrStop(),(m=this.surveys)==null||m.loadIfEnabled(),this.rn(),(h=this.externalIntegrations)==null||h.startIfEnabledOrStop()}}_overrideSDKInfo(t,n){cs.LIB_NAME=t,cs.LIB_VERSION=n}startSessionRecording(t){var n,r,a,s,i,l=t===!0,c={sampling:l||!(t==null||!t.sampling),linked_flag:l||!(t==null||!t.linked_flag),url_trigger:l||!(t==null||!t.url_trigger),event_trigger:l||!(t==null||!t.event_trigger)};Object.values(c).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),c.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),c.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),c.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),c.event_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),a=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(Qt({},a,n))}}addExceptionStep(t,n){var r;(r=this.exceptions)==null||r.addExceptionStep(t,n)}captureLog(t){var n;(n=this.logs)==null||n.captureLog(t)}get logger(){var t,n;return(t=(n=this.logs)==null?void 0:n.logger)!==null&&t!==void 0?t:wl.nn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(t))!==null&&n!==void 0&&n}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:yh;return n!==yh&&(n=yh+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(Kl))===Qm||((n=this.sessionPersistence)==null?void 0:n.get_property(Kl))===Qm}Ji(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===nT&&!this._isIdentified()&&Id(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[k0])&&((n=this.persistence)==null||(n=n.props)==null||!n[ME]))}Gi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Ji()||this.Yi("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Yi("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Yi(t){return this.config.person_profiles==="never"?(sn.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Ki(ME,!0),!0)}Ai(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Tf)}rn(){var t,n,r,a,s=this.Ai();return((t=this.persistence)==null?void 0:t.Vt)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n.Vt)!==s&&((a=this.sessionPersistence)==null||a.set_disabled(s)),s}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==Mu){if(this.Ci()){var r,a,s,i,l;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(a=this.pageViewM
1189anager)==null||a.destroy(),this.sessionManager=new Z$(this),this.pageViewManager=new F$(this),this.persistence&&(this.sessionPropsManager=new K$(this,this.sessionManager,this.persistence));var c,u=(s=(i=this.config.__extensionClasses)==null?void 0:i.sessionRecording)!==null&&s!==void 0?s:(l=wl.__defaultExtensionClasses)==null?void 0:l.sessionRecording;u&&(this.sessionRecording=this.ki(this.sessionRecording,new u(this)),this.Ui&&((c=this.sessionRecording)==null||c.onRemoteConfig==null||c.onRemoteConfig(this.Ui)))}var d,f;this.consent.optInOut(!0),this.rn(),this.zi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Tf&&((d=this.surveys)==null||d.loadIfEnabled()),(on(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((f=t==null?void 0:t.captureEventName)!==null&&f!==void 0?f:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Vi()}else sn.warn(J$)}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!==Mu?(this.config.cookieless_mode===Tf&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.rn(),this.config.cookieless_mode===Tf&&(this.register({distinct_id:Jb,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.config.capture_pageview&&this.Vi(),this.zi())):sn.warn(J$)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Mu||(this.config.cookieless_mode===Tf?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.rn()}_is_bot(){return Bi?$j(Bi,this.config.custom_blocked_useragents):void 0}Vi(){_n&&(_n.visibilityState==="visible"?this.Ei||(this.Ei=!0,this.capture(vh,{title:_n.title},{send_instantly:!0}),this.Mi&&(_n.removeEventListener(PE,this.Mi),this.Mi=null)):this.Mi||(this.Mi=this.Vi.bind(this),ns(_n,PE,this.Mi)))}debug(t){t===!1?(ft==null||ft.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(ft==null||ft.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}mr(){var t,n,r,a,s,i,l=this.Li||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(sn.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",a=sn,s=(n="advanced_disable_flags")in(t=l)&&!Ar(t[n]),i=r in t&&!Ar(t[r]),s?t[n]:!!i&&(a&&a.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]))}it(t){var n;if(Ar(this.config.before_send))return t;var r=Object.keys((n=t.properties)!==null&&n!==void 0?n:{}).filter($ce),a=Ur(this.config.before_send)?this.config.before_send:[this.config.before_send],s=t;for(var i of a){if(s=i(s),Ar(s)){var l="Event '"+t.event+"' was rejected in beforeSend function";return Lce(t.event)?sn.warn(l+". This can cause unexpected behavior."):sn.info(l),null}s.properties&&!Id(s.properties)||sn.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}for(var c of r)if(s.properties&&Ar(s.properties[c]))return sn.warn("Event '"+t.event+"' had its '"+c+"' property removed in a beforeSend function. This property is required for ingestion, so the event will be dropped."),null;return s}getPageViewId(){var t;return(t=this.pageViewManager.Ot)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Oi(t){var n=Bc(t)&&!t,r=Na.N()&&Na.A("ph_debug")==="true";return!n&&(!!r||t)}}wl.__defaultExtensionClasses={},wl.nn={trace:th=()=>{},debug:th,info:th,warn:th,error:th,fatal:th},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=kue(e.prototype[t[n]])}(wl,["identify"]);class r3{constructor(t){this.disabled=t===!1;var n=Da(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var a=this.clicks[this.clicks.length-1];if(a&&Math.abs(t-a.x)+Math.abs(n-a.y)<this.thresholdPx&&this.timeoutMs>r-a.timestamp){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var MC="$copy_autocapture",PC=Qa("[AutoCapture]");function DC(e,t){return t.length>e?t.slice(0,e)+"...":t}function Cde(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Zd(t));return t}function Nde(e,t){var n,r,{e:a,maskAllElementAttributes:s,maskAllText:i,elementAttributeIgnoreList:l,elementsC
1189hainAsString:c,disableCaptureUrlHashes:u}=t;if(!Zd(e))return{props:{}};for(var d=[e],f=e;f.parentNode&&!Uo(f,"body");)if(dj(f.parentNode))d.push(f.parentNode.host),f=f.parentNode.host;else{if(!Zd(f.parentNode))break;d.push(f.parentNode),f=f.parentNode}var m,h,g=[],v={},y=!1,b=!1;if(Ta(d,N=>{var k=aT(N);if(Uo(N,"a")){var C=N.getAttribute("href");y=!!(k&&C&&Y0(C))&&(u?Kd(C):C)}dr($E(N),"ph-no-capture")&&(b=!0),g.push(function(O,T,M,L,D){D===void 0&&(D=!1);var j=O.tagName.toLowerCase(),H={tag_name:j};OP.indexOf(j)>-1&&!M&&(H.$el_text=j.toLowerCase()==="a"||j.toLowerCase()==="button"?DC(1024,D$(O)):DC(1024,Lv(O)));var Y=$E(O);Y.length>0&&(H.classes=Y.filter(function(oe){return oe!==""})),Ta(O.attributes,function(oe){var J;if((!gj(O)||["name","id","class","aria-label"].indexOf(oe.name)!==-1)&&(L==null||!L.includes(oe.name))&&!T&&Y0(oe.value)&&(!_a(J=oe.name)||J.substring(0,10)!=="_ngcontent"&&J.substring(0,7)!=="_nghost")){var se=oe.value;oe.name==="class"&&(se=IP(se).join(" ")),H["attr__"+oe.name]=DC(1024,oe.name==="href"&&D?Kd(se):se)}});for(var z=1,K=1,ee=O;ee=Cde(ee);)z++,ee.tagName===O.tagName&&K++;return H.nth_child=z,H.nth_of_type=K,H}(N,s,i,l,u));var A=function(O){if(!aT(O))return{};var T={};return Ta(O.attributes,function(M){if(M.name&&M.name.indexOf("data-ph-capture-attribute")===0){var L=M.name.replace("data-ph-capture-attribute-",""),D=M.value;L&&D&&Y0(D)&&(T[L]=D)}}),T}(N);Oa(v,A)}),b)return{props:{},explicitNoCapture:b};if(i||(g[0].$el_text=Uo(e,"a")||Uo(e,"button")?D$(e):Lv(e)),y){var E,w;g[0].attr__href=y;var x=(E=FE(y))==null?void 0:E.host,S=ft==null||(w=ft.location)==null?void 0:w.host;x&&S&&x!==S&&(m=y)}return{props:Oa({$event_type:a.type,$ce_version:1},c?{}:{$elements:g},{$elements_chain:(h=g,function(N){return N.map(k=>{var C,A,O="";if(k.tag_name&&(O+=k.tag_name),k.attr_class)for(var T of(k.attr_class.sort(),k.attr_class))O+="."+T.replace(/"/g,"");var M=Qt({},k.text?{text:k.text}:{},{"nth-child":(C=k.nth_child)!==null&&C!==void 0?C:0,"nth-of-type":(A=k.nth_of_type)!==null&&A!==void 0?A:0},k.href?{href:k.href}:{},k.attr_id?{attr_id:k.attr_id}:{},k.attributes),L={};return gw(M).sort((D,j)=>{var[H]=D,[Y]=j;return H.localeCompare(Y)}).forEach(D=>{var[j,H]=D;return L[L$(j.toString())]=L$(H.toString())}),(O+=":")+gw(L).map(D=>{var[j,H]=D;return j+'="'+H+'"'}).join("")}).join(";")}(function(N){return N.map(k=>{var C,A,O={text:(C=k.$el_text)==null?void 0:C.slice(0,400),tag_name:k.tag_name,href:(A=k.attr__href)==null?void 0:A.slice(0,2048),attr_class:jue(k),attr_id:k.attr__id,nth_child:k.nth_child,nth_of_type:k.nth_of_type,attributes:{}};return gw(k).filter(T=>{var[M]=T;return M.indexOf("attr__")===0}).forEach(T=>{var[M,L]=T;return O.attributes[M]=L}),O})}(h)))},(n=g[0])!=null&&n.$el_text?{$el_text:(r=g[0])==null?void 0:r.$el_text}:{},m&&a.type==="click"?{$external_click_url:m}:{},v)}}var r0=Qa("[ExceptionAutocapture]"),Rde=Qa("[TracingHeaders]"),yf=Qa("[Web Vitals]"),a3=9e5,s3="disabled",i3="lazy_loading",a0="awaiting_config",i1="missing_config";Qa("[SessionRecording]"),Qa("[SessionRecording]");var mT="[SessionRecording]",pu=Qa(mT),Tde=Qa("[Heatmaps]");function o3(e){return Da(e)&&"clientX"in e&&"clientY"in e&&Yi(e.clientX)&&Yi(e.clientY)}var LC=Qa("[Product Tours]"),$C=e=>{var t;return!e.config.disable_product_tours&&!((t=e.persistence)==null||!t.get_property(NP))},Ade=["$set_once","$set"],Sc=Qa("[SiteApps]"),l3="Error while initializing PostHog app with config id ";function nh(e,t,n){if(Ar(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class Ide{constructor(t){this.sn=new LP,this.an=(n,r)=>this.ln(n,r)&&this.un(n,r)&&this.hn(n,r)&&this.dn(n,r),this.ln=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=t,this.cn=new Set,this.vn=new Set}init(){var t,n;on((t=this._instance)==null?void 0:t._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook((r,a)=>{this.on(r,a)})}register(t){var n,r;if(!on((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach(i=>
vendor: 4,693 bytes, line 1189
1189{var l,c;(l=this.vn)==null||l.add(i),(c=i.steps)==null||c.forEach(u=>{var d;(d=this.cn)==null||d.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var a,s=new Set;t.forEach(i=>{var l;(l=i.steps)==null||l.forEach(c=>{c!=null&&c.selector&&s.add(c==null?void 0:c.selector)})}),(a=this._instance)==null||a.autocapture.setElementSelectors(s)}}on(t,n){var r;n!=null&&t.length!=0&&(this.cn.has(t)||this.cn.has(n==null?void 0:n.event))&&this.vn&&((r=this.vn)==null?void 0:r.size)>0&&this.vn.forEach(a=>{this.fn(n,a)&&this.sn.emit("actionCaptured",a.name)})}pn(t){this.onAction("actionCaptured",n=>t(n))}fn(t,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.an(t,r))return!0;return!1}onAction(t,n){return this.sn.on(t,n)}un(t,n){if(n!=null&&n.url){var r,a=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!a||typeof a!="string"||!nh(a,n.url,n.url_matching||"contains"))return!1}return!0}hn(t,n){return!!this.gn(t,n)&&!!this.mn(t,n)&&!!this.yn(t,n)}gn(t,n){var r;if(n==null||!n.href)return!0;var a=this.bn(t);if(a.length>0)return a.some(l=>nh(l.href,n.href,n.href_matching||"exact"));var s,i=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!i&&nh((s=i.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}mn(t,n){var r;if(n==null||!n.text)return!0;var a=this.bn(t);if(a.length>0)return a.some(u=>nh(u.text,n.text,n.text_matching||"exact")||nh(u.$el_text,n.text,n.text_matching||"exact"));var s,i,l,c=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!c&&(s=function(u){for(var d,f=[],m=/(?::|")text="(.*?)"/g;!Ar(d=m.exec(u));)f.includes(d[1])||f.push(d[1]);return f}(c),i=n.text,l=n.text_matching||"exact",s.some(u=>nh(u,i,l)))}yn(t,n){var r,a;if(n==null||!n.selector)return!0;var s=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var i=(t==null||(a=t.properties)==null?void 0:a.$elements_chain)||"";if(n.selector_regex&&i)try{return new RegExp(n.selector_regex).test(i)}catch{return!1}return!1}bn(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t==null?void 0:t.properties.$elements}dn(t,n){return n==null||!n.properties||n.properties.length===0||Hj(n.properties.reduce((r,a)=>{var s=Ur(a.value)?a.value.map(String):a.value!=null?[String(a.value)]:[];return r[a.key]={values:s,operator:a.operator||"exact"},r},{}),t==null?void 0:t.properties)}}class Ode{constructor(t){this._n=[],this._instance=t,this.wn=new Map,this.xn=new Map,this.kn=new Map}Sn(t,n){return!!t&&Hj(t.propertyFilters,n==null?void 0:n.properties)}Cn(t,n){var r=new Map;return t.forEach(a=>{var s;(s=a.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach(i=>{if(i!=null&&i.name){var l=r.get(i.name)||[];l.push(a.id),r.set(i.name,l)}})}),r}In(t,n,r){var a=(r===Xg.Activation?this.wn:this.xn).get(t),s=[];return this.Tn(i=>{s=i.filter(l=>a==null?void 0:a.includes(l.id))}),s.filter(i=>{var l,c=(l=i.conditions)==null||(l=l[r])==null||(l=l.values)==null?void 0:l.find(u=>u.name===t);return this.Sn(c,n)})}register(t){var n;on((n=this._instance)==null?void 0:n._addCaptureHook)||(this.En(t),this.Mn(t))}Mn(t){var n=t.filter(r=>{var a,s;return((a=r.conditions)==null?void 0:a.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0});n.length!==0&&(this.Pn==null&&(this.Pn=new Ide(this._instance),this.Pn.init(),this.Pn.pn(r=>{this.onAction(r)})),n.forEach(r=>{var a,s,i,l,c;r.conditions&&(a=r.conditions)!=null&&a.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0&&((l=this.Pn)==null||l.register(r.conditions.actions.values),(c=r.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach(u=>{if(u&&u.name){var d=this.kn.get(u.name);d&&d.push(r.id),this.kn.set(u.name,d||[r.id])}}))}))}En(t){var n,r=t.filter(s=>{var i,l;return((i=s.conditions)==null?void 0:i.events)&&((l=s.conditions)==null||(l=l.events)==null||(l=l.values)==null?void 0:l.length)>0}),a=t.filter(s=>{var i,l;return((i=s.conditions)==null?void 0:i.cancelEvents)&&((l=s.conditions)==null||(l=l.cancelEvents)==null||(l=l.values)==null?void 0:l.length)>0});r.length===0&&a.length===0||((n=this._instance)==null||n._addCaptureHook((s,i)=>{this.onEvent(s,i)}),this.wn=this.Cn(t,Xg.Activation),this.xn=this.Cn(t,Xg.Cancellation))}onEvent(t,n){var r,a,s=this.Rn(),i=(n==null||(r=n.properties)==null?void 0:r.$survey_id)||(n==null||(a=n.properties)==null?void 0:a.$product_tour_id);if(i&&this.getActivatedIds().includes(i)){var l=this.On(t,i);if(l==="consume")return s.info("event consumed activated item, remov
1189ing it",{event:t,itemId:i}),void this.Ln([i]);if(l==="persist")return s.info("shown item promoted to persisted activation",{event:t,itemId:i}),void this.Fn(i)}if(this.xn.has(t)){var c=this.In(t,n,Xg.Cancellation);c.length>0&&(s.info("cancel event matched, cancelling items",{event:t,itemsToCancel:c.map(d=>d.id)}),this.Ln(c.map(d=>d.id)),c.forEach(d=>this.An(d.id)))}if(this.wn.has(t)){s.info("event name matched",{event:t,eventPayload:n,items:this.wn.get(t)});var u=this.In(t,n,Xg.Activation);this.$n(u.map(d=>d.id))}}onAction(t){this.kn.has(t)&&this.$n(this.kn.get(t)||[])}$n(t){t.length!==0&&(this._n=[...new Set([...this._n,...t])],this.Rn().info("updating activated items",{activatedItems:this.getActivatedIds()}))}Fn(t){this._n=this._n.filter(r=>r!==t);var n=this.Dn();n.includes(t)||this.Nn([...n,t])}Ln(t){var n=new Set(t);this._n=this._n.filter(s=>!n.has(s));var r=this.Dn(),a=r.filter(s=>!n.has(s));a.length!==r.length&&this.Nn(a)}Dn(){var t,n=this.qn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n])||[]}getActivatedIds(){return[...new Set([...this.Dn(),...this._n])].filter(t=>!this.jn(t))}reset(){this._n=[],this.Dn().length>0&&this.Nn([])}getEventToItemsMap(){return this.wn}Bn(){return this.Pn}}class Mde extends Ode{constructor(t){super(t)}qn(){return YR}Hn(){return Pu.SHOWN}Tn(t){var n;(n=this._instance)==null||n.getSurveys(t)}An(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}Rn(){return xa}Nn(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[YR]:t})}jn(){return!1}On(t,n){var r;this.Tn(s=>{r=s.find(i=>i.id===n)});var a=!r||function(s){var i,l,c,u=((i=(l=s.conditions)==null||(l=l.events)==null||(l=l.values)==null?void 0:l.length)!==null&&i!==void 0?i:0)>0;return s.schedule===tde.Always||!((c=s.conditions)==null||(c=c.events)==null||!c.repeatedActivation||!u)}(r);return a?t===Pu.SHOWN?"consume":"ignore":t===Pu.SHOWN?"persist":t===Pu.DISMISSED||t===Pu.SENT?"consume":"ignore"}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var FC="SDK is not enabled or survey functionality is not yet loaded",c3="Disabled. Not loading surveys.",Pde=ft!=null&&ft.location?zE(ft.location.hash,"__posthog")||zE(location.hash,"state"):null,u3="_postHogToolbarParams",d3=Qa("[Toolbar]"),Ms=Qa("[FeatureFlags]"),bf=Qa("[FeatureFlags]",{debugEnabled:!0}),zC=`" failed. Feature flags didn't load in time.`,f3=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},m3=e=>{var t={};for(var[n,r]of gw(e||{}))r&&(t[n]=r);return t},gu=Qa("[Error tracking]"),h3="Refusing to render web experiment since the viewer is a likely bot",Dde={icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>UE(t,e),not_regex:(e,t)=>!UE(t,e),exact:(e,t)=>t===e,is_not:(e,t)=>t!==e};class gi{get Se(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(a=>{gi.Un("retrieved web experiments from the server"),n.zn=new Map,a.forEach(s=>{if(s.feature_flag_key){var i;n.zn&&(gi.Un("setting flag key ",s.feature_flag_key," to web experiment ",s),(i=n.zn)==null||i.set(s.feature_flag_key,s));var l=n._instance.getFeatureFlag(s.feature_flag_key);_a(l)&&s.variants[l]&&n.Vn(s.name,l,s.variants[l].transforms)}else if(s.variants)for(var c in s.variants){var u=s.variants[c];gi.Wn(u,n._instance)&&n.Vn(s.name,c,u.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}initialize(){}onFeatureFlags(t){if(this._is_bot())gi.Un(h3);else if(!this.Se.disable_web_experiments){if(Ar(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();gi.Un("applying feature flags",t),t.forEach(n=>{var r;if(this.zn&&(r=this.zn)!=null&&r.has(n)){var a,s=this._instance.getFeatureFlag(n),i=(a=this.zn)==null?void 0:a.get(n);s&&i!=null&&i.variants[s]&&this.Vn(i.name,s,i.variants[s].transforms)}})}}previewWebExperiment(){var t=gi.getWindowLocation();if(t!=null&&t.search){var n=Op(t==null?void 0:t.search,"__experiment_id"),r=Op(t==null?void 0:t.search,"__experiment_variant");n&&r&&(gi.Un("previewing web experiments "+n+" && "+r),this.getWebExperiments(a=>{this.Gn(parseInt(n),r,a)},!1,!0))}}loadIfEnabled(){this.Se.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this.Se.disable_web_experiments&&!r)return t([]);var a=this._instance.get_property("$web_experiments");if(a&&!n)return t(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Se.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(t,n,r){var a=r.filter(s=>s.id===t);a&&a.length>0&&(gi.Un("Previewing web experiment ["+a[0].name+"] with variant ["+n+"]"),this.Vn(a[0].name,n,a[0].variants[n].transforms))}static Wn(t,n){return!Ar(t.conditions)&&gi.Zn(t,n)&&gi.Qn(t)}static Zn(t,n){var r;if(Ar(t.conditions)||Ar((r=t.conditions)==null?void 0:r.url))return!0;var a=gi.getWindowLocation();if(a){var s,i,l,c=cj(n,a.href);return(s=t.conditions)==null||!s.url||Dde[(i=(l=t.conditions)==null?void 0:l.urlMatchType)!==null&&i!==void 0?i:"icontains"](t.conditions.url,c)}return!1}
1189static getWindowLocation(){return ft==null?void 0:ft.location}static Qn(t){var n;if(Ar(t.conditions)||Ar((n=t.conditions)==null?void 0:n.utm))return!0;var r=xj();if(r.utm_source){var a,s,i,l,c,u,d,f,m=(a=t.conditions)==null||(a=a.utm)==null||!a.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,h=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_source||((l=t.conditions)==null||(l=l.utm)==null?void 0:l.utm_source)==r.utm_source,g=(c=t.conditions)==null||(c=c.utm)==null||!c.utm_medium||((u=t.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,v=(d=t.conditions)==null||(d=d.utm)==null||!d.utm_term||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_term)==r.utm_term;return m&&g&&v&&h}return!1}static Un(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;n>a;a++)r[a-1]=arguments[a];sn.info("[WebExperiments] "+t,r)}Vn(t,n,r){this._is_bot()?gi.Un(h3):n!=="control"?r.forEach(a=>{if(a.selector){var s;gi.Un("applying transform of variant "+n+" for experiment "+t+" ",a);var i=(s=document)==null?void 0:s.querySelectorAll(a.selector);i==null||i.forEach(l=>{var c=l;a.html&&(c.innerHTML=a.html),a.css&&c.setAttribute("style",a.css)})}}):gi.Un("Control variants leave the page unmodified.")}_is_bot(){return Bi&&this._instance?$j(Bi,this.Se.custom_blocked_useragents):void 0}}var fl=Qa("[Conversations]"),wf="Conversations not available yet.",p3="console",dk={featureFlags:class{constructor(e){this.Jn=!1,this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Se(){return this._instance.config}get zr(){return this._instance.persistence}ss(e){return this._instance.get_property(e)}os(){var e,t;return(e=(t=this.zr)==null?void 0:t.Gt(this.Se.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}ls(){return!!this.os()&&(this.ns||this.Kn||(this.ns=!0,Ms.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}us(){var e,t=(e=this.Se.evaluation_contexts)!==null&&e!==void 0?e:this.Se.evaluation_environments;return!this.Se.evaluation_environments||this.Se.evaluation_contexts||this.rs||(Ms.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.rs=!0),t!=null&&t.length?t.filter(n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||Ms.error("Invalid evaluation context found:",n,"Expected non-empty string"),r}):[]}hs(){return this.us().length>0}ds(){var e=this.Se.flag_keys;if(!on(e)){if(Ur(e))return e.filter(t=>{var n=t&&typeof t=="string"&&t.trim().length>0;return n||Ms.error("Invalid flag key found:",t,"Expected non-empty string"),n});Ms.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:n}=this._instance,r=(e=(t=n.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(r).length){var a,s,i=(a=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&a!==void 0?a:{},l=Object.keys(r).filter(u=>!!r[u]).reduce((u,d)=>(u[d]=r[d]||!1,u),{}),c=Object.keys(i).filter(u=>l[u]).reduce((u,d)=>(i[d]&&(u[d]=i[d]),u),{});this.receivedFeatureFlags({featureFlags:l,featureFlagPayloads:c})}}updateFlags(e,t,n){var r,a,s=n!=null&&n.merge&&(r=this.ss(Lf))!==null&&r!==void 0?r:{},i=n!=null&&n.merge&&(a=this.ss(pw))!==null&&a!==void 0?a:{},l=Qt({},s,e),c=Qt({},i,t),u={};for(var[d,f]of Object.entries(l))u[d]={key:d,enabled:p$(f),variant:g$(f),reason:void 0,metadata:on(c==null?void 0:c[d])?void 0:{id:0,version:void 0,description:void 0,payload:c[d]}};this.receivedFeatureFlags({flags:u})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.ss(WR),t=this.ss(_u),n=this.ss(gh);if(!n&&!t)return e||{};var r=Oa({},e||{}),a=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var s of a){var i,l,c=r[s],u=t==null?void 0:t[s],d=on(u)?(i=c==null?void 0:c.enabled)!==null&&i!==void 0&&i:!!u,f=on(u)?c.variant:typeof u=="string"?u:void 0,m=n==null?void 0:n[s],h=Qt({},c,{enabled:d,variant:d?f??(c==null?void 0:c.variant):void 0});d!==(c==null?void 0:c.enabled)&&(h.original_enabled=c==null?void 0:c.enabled),f!==(c==null?void 0:c.variant)&&(h.original_variant=c==null?void 0:c.variant),m&&(h.metadata=Qt({},c==null?void 0:c.metadata,{payload:m,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),r[s]=h}return this.Jn||(Ms.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getAllFeatureFlags(){var e=this.getFlagVariants(),t=this.getFlagPayloads();return Object.keys(e).map(n=>{var r=e[n];return{key:n,enabled:p$(r),variant:g$(r),payload:h$(t[n])}})}getFlagVariants(){var e=this.ss(Lf),t=this.ss(_u);if(!t)return e||{};for(var n=Oa({},e),r=Object.keys(t),a=0;r.length>a;a++)n[r[a]]=t[r[a]];return this.Jn||(Ms.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var e=this.ss(pw),t=this.ss(gh);if(!t)return e||{};for(var n=Oa({},e||{}),r=Object.keys(t),a=0;r.length>a;a++)n[r[a]]=t[r[a]];return this.Jn||(Ms.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.Xn||this.Se.advanced_disable_feature_flags||this.cs||(this._instance.Ti.emit("featureFlagsReloading",!0),this.cs=setTimeout(()=>{this.vs()},5))}fs(){clearTimeout(this.cs),this.cs=void 0}ensureFlagsLoaded(){this.Yn||this.Kn||this.cs||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Xn=e}vs(e){var t;if(this.fs(),!this._instance.mr())if(this.Kn)this.es=!0;else{var n=this.Se.token,r=this.ss(IE),a={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Qt({},((t=this.zr)==null?void 0:t.get_initial_props())||{},this.ss(Nf)||{}),group_properties:this.ss(Rf),timezone:Rj()};qi(r)||on(r)||(a.$device_id=r),(e!=null&&e.disableFlags||this.Se.advanced_disable_feature_flags)&&(a.disable_flags=!0),this.hs()&&(a.evaluation_contexts=this.us());var s=this.ds();on(s)||(a.flag_keys=s);var i=!!this.Se.advanced_only_evaluate_survey_feature_flags,l=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Se.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Kn=!0,this._instance._send_request({method:"POST",url:l,data:a,compression:this.Se.disable_compression?void 0:Oc.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback:c=>{var u,d,f,m=!0;if(c.statusCode===200&&(this.es||(this.$anon_distinct_id=void 0),m=!1),this.Kn=!1,!a.disable_flags||this.es){this.ts=!m;var h=[];c.error?c.error instanceof Error?h.push(c.error.name==="AbortError"?"timeout":"connection_error"):h.push("unknown_error"):c.statusCode!==200&&h.push("api_error_"+c.statusCode),(u=c.json)!=null&&u.errorsWhileComputingFlags&&h.push("errors_while_computing_flags");var g,v=!((d=c.json)==null||(d=d.quotaLimited)==null||!d.includes("feature_flags"));v&&h.push("quota_limited"),(f=this.zr)==null||f.register({[ZR]:h}),v?Ms.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(a.disable_flags||this.receivedFeatureFlags((g=c.json)!==null&&g!==void 0?g:{},m,{partialResponse:i}
1189),this.es&&(this.es=!1,this.vs()))}}})}}getFeatureFlag(e,t){var n;if(t===void 0&&(t={}),!t.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFeatureFlagResult(e,t);return(n=r==null?void 0:r.variant)!==null&&n!==void 0?n:r==null?void 0:r.enabled}}else Ms.warn('getFeatureFlag for key "'+e+zC)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t==null?void 0:t.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.ts)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),r=e in n,a=n[e],s=this.getFlagPayloads()[e],i=String(a),l=this.ss(GR)||void 0,c=this.ss(Dv)||void 0,u=this.ss(q0)||{};if(this.Se.advanced_feature_flags_dedup_per_session){var d,f=this._instance.get_session_id(),m=this.ss(KR);f&&f!==m&&(u={},(d=this.zr)==null||d.register({[q0]:u,[KR]:f}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(i))){var h,g,v,y,b,E,w,x,S,N;Ur(u[e])?u[e].push(i):u[e]=[i],(h=this.zr)==null||h.register({[q0]:u});var k=this.getFeatureFlagDetails(e),C=[...(g=this.ss(ZR))!==null&&g!==void 0?g:[]];on(a)&&C.push("flag_missing");var A={$feature_flag:e,$feature_flag_response:a,$feature_flag_payload:s||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:c,$feature_flag_bootstrapped_response:((v=this.Se.bootstrap)==null||(v=v.featureFlags)==null?void 0:v[e])||null,$feature_flag_bootstrapped_payload:((y=this.Se.bootstrap)==null||(y=y.featureFlagPayloads)==null?void 0:y[e])||null,$used_bootstrap_value:!this.ts};on(k==null||(b=k.metadata)==null?void 0:b.version)||(A.$feature_flag_version=k.metadata.version);var O,T=(E=k==null||(w=k.reason)==null?void 0:w.description)!==null&&E!==void 0?E:k==null||(x=k.reason)==null?void 0:x.code;T&&(A.$feature_flag_reason=T),k!=null&&(S=k.metadata)!=null&&S.id&&(A.$feature_flag_id=k.metadata.id),on(k==null?void 0:k.original_variant)&&on(k==null?void 0:k.original_enabled)||(A.$feature_flag_original_response=on(k.original_variant)?k.original_enabled:k.original_variant),k!=null&&(N=k.metadata)!=null&&N.original_payload&&(A.$feature_flag_original_payload=k==null||(O=k.metadata)==null?void 0:O.original_payload),C.length&&(A.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",A)}if(r)return{key:e,enabled:!!a,variant:typeof a=="string"?a:void 0,payload:h$(s)}}}else Ms.warn('getFeatureFlagResult for key "'+e+zC)}getRemoteConfigPayload(e,t){var n=this.Se.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.hs()&&(r.evaluation_contexts=this.us());var a=this.ds();on(a)||(r.flag_keys=a),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Se.disable_compression?void 0:Oc.Base64,timeout:this.Se.feature_flag_request_timeout_ms,callback(s){var i,l=(i=s.json)==null?void 0:i.featureFlagPayloads;t((l==null?void 0:l[e])||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.ts){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return on(n)?void 0:!!n}Ms.warn('isFeatureEnabled for key "'+e+zC)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t,n){if(this.zr){this.Yn=!0;var r=this.getFlagVariants(),a=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(i,l,c,u,d,f){c===void 0&&(c={}),u===void 0&&(u={}),d===void 0&&(d={});var m=(C=>{var A=C.flags;return A?(C.featureFlags=Object.fromEntries(Object.keys(A).map(O=>{var T;return[O,(T=A[O].variant)!==null&&T!==void 0?T:A[O].enabled]})),C.featureFlagPayloads=Object.fromEntries(Object.keys(A).filter(O=>A[O].enabled).filter(O=>{var T;return(T=A[O].metadata)==null?void 0:T.payload}).map(O=>{var T;return[O,(T=A[O].metadata)==null?void 0:T.payload]}))):C.featureFlags&&Ms.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),C})(i),h=m.flags,g=m.featureFlags,v=m.featureFlagPayloads;if(g){var y=i.requestId,b=i.evaluatedAt;if(Ur(g)){Ms.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var E={};if(g)for(var w=0;g.length>w;w++)E[g[w]]=!0;l&&l.register({[hw]:g,[Lf]:E})}else{var x=g,S=v,N=h;if(f!=null&&f.partialResponse)x=Qt({},c,x),S=Qt({},u,S),N=Qt({},d,N);else if(i.errorsWhileComputingFlags)if(h){var k=new Set(Object.keys(h).filter(C=>{var A;return!((A=h[C])!=null&&A.failed)}));x=Qt({},c,Object.fromEntries(Object.entries(x).filter(C=>{var[A]=C;return k.has(A)}))),S=Qt({},u,Object.fromEntries(Object.entries(S||{}).filter(C=>{var[A]=C;return k.has(A)}))),N=Qt({},d,Object.fromEntries(Object.entries(N||{}).filter(C=>{var[A]=C;return k.has(A)})))}else x=Qt({},c,x),S=Qt({},u,S),N=Qt({},d,N);l&&l.register(Qt({[hw]:Object.keys(m3(x)),[Lf]:x||{},[pw]:S||{},[WR]:N||{}},y?{[GR]:y}:{},b?{[Dv]:b}:{}))}}})(e,this.zr,r,a,s,n),t||(this.ns=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),Ms.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.zr)return Ms.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.zr.unregister(_u),this.zr.unregister(gh),this.ps(),bf.info("All overrides cleared");if(Ur(e)){var t=f3(e);return this.zr.register({[_u]:t}),this.ps(),bf.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Jn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.zr.unregister(_u),bf.info("Flag overrides cleared");else if(r.flags){if(Ur(r.flags)){var a=f3(r.flags);this.zr.register({[_u]:a})}else this.zr.register({[_u]:r.flags});bf.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.zr.unregister(gh),bf.info("Payload overrides cleared")):r.payloads&&(this.zr.register({[gh]:r.payloads}),bf.info("Payload overrides set",{payloads:r.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.zr.register({[_u]:e}),this.ps(),bf.info("Flag overrides set",{flags:e});Ms.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:n}=this.gs();try{e(t,n)}catch(r){Ms.error("Error while running feature flags callback",r)}}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,a=(this.ss(C0)||[]).find(c=>c.flagKey===e),s={["$feature_enrollment/"+e]:t},i={$feature_flag:e,$feature_enrollment:t,$set:s};a&&(i.$early_access_feature_name=a.name),n&&(i.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",i),this.setPersonPropertiesForFlags(s,!1);var l=Qt({},this.getFlagVariants(),{[e]:t});(r=this.zr)==null||r.register({[hw]:Object.keys(m3(l)),[Lf]:l}),this.ps()}
1189getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.ss(C0),a=n?"&"+n.map(s=>"stage="+s).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Se.token+a),method:"GET",callback:s=>{var i,l;if(s.json){var c=s.json.earlyAccessFeatures;return(i=this.zr)==null||i.unregister(C0),(l=this.zr)==null||l.register({[C0]:c}),e(c)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(n=>t[n]),flagVariants:Object.keys(t).filter(n=>t[n]).reduce((n,r)=>(n[r]=t[r],n),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach(r=>{try{r(t,n,{errorsLoading:e})}catch(a){Ms.error("Error while running feature flags callback",a)}})}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.ss(Nf)||{},r=(e==null?void 0:e.$set)||(e!=null&&e.$set_once?{}:e),a=e==null?void 0:e.$set_once,s={};if(a)for(var i in a)({}).hasOwnProperty.call(a,i)&&(i in n||(s[i]=a[i]));this._instance.register({[Nf]:Qt({},n,s,r)}),t&&this._instance.reloadFeatureFlags()}unsetPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=Qt({},this.ss(Nf)||{});e.forEach(r=>{delete n[r]}),this._instance.register({[Nf]:n}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(e){e===void 0&&(e=!0),this._instance.unregister(Nf),e&&this._instance.reloadFeatureFlags()}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.ss(Rf)||{};Object.keys(n).length!==0&&Object.keys(n).forEach(r=>{n[r]=Qt({},n[r],e[r]),delete e[r]}),this._instance.register({[Rf]:Qt({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.ss(Rf)||{};this._instance.register({[Rf]:Qt({},t,{[e]:{}})})}else this._instance.unregister(Rf)}reset(){this.Yn=!1,this.Kn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},Lde={sessionRecording:class{get Se(){return this._instance.config}get zr(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===a0||this.bs===i1?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=s3,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw pu.error("started without valid sessionManager"),new Error(mT+" started without valid sessionManager. This is a bug.");if(this.Se.cookieless_mode===Mu)throw new Error(mT+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(Hf))==null||!e.enabled),n=!this.Se.disable_session_recording,r=this.Se.disable_session_recording||this._instance.consent.isOptedOut();return ft&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var n=!on(Object.assign)&&!on(Array.from);this.ws&&n?(this.xs(e),pu.info("starting")):(this.bs=s3,this.stopRecording())}}xs(e){var t,n,r;this.ws&&(this.bs!==a0&&this.bs!==i1&&(this.bs=i3),Kn!=null&&(t=Kn.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=Kn.__PosthogExtensions__)!=null&&n.initSessionRecording?this.ks(e):(r=Kn.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Ss,a=>{if(a)return pu.error("could not load recorder",a);this.ks(e)}))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}Cs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}Is(){var e,t;(e=this.zr)==null||e.unregister(RP),(t=this.zr)==null||t.unregister(QB)}Ts(e,t){if(Ar(e))return null;var n,r=Yi(e)?e:parseFloat(e);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(pu.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}Es(e){if(this.zr){var t,n,r=this.zr,a=()=>{var s,i=e.sessionRecording===!1?void 0:e.sessionRecording,l=this.Ts((s=this.Se.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),c=this.Ts(i==null?void 0:i.sampleRate,"remote config sampleRate"),u=l??c;Ar(u)&&this.Is();var d=i==null?void 0:i.minimumDurationMilliseconds;r.register({[Hf]:Qt({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:Qt({capturePerformance:e.capturePerformance},i==null?void 0:i.networkPayloadCapture),canvasRecording:{enabled:i==null?void 0:i.recordCanvas,fps:i==null?void 0:i.canvasFps,quality:i==null?void 0:i.canvasQuality},sampleRate:u,minimumDurationMilliseconds:on(d)?null:d,endpoint:i==null?void 0:i.endpoint,triggerMatchType:i==null?void 0:i.triggerMatchType,masking:i==null?void 0:i.masking,urlTriggers:i==null?void 0:i.urlTriggers,version:i==null?void 0:i.version,triggerGroups:i==null?void 0:i.triggerGroups})})};a(),(t=this._s)==null||t.call(this),this._s=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(a)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.Es(e),void this.Cs()):(this.Es(e),void this.startIfEnabledOrStop()):(this.bs===a0&&(this.bs=i1,pu.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t="log"),(n=this.ys)!=null&&n.log?this.ys.log(e,t):pu.warn("log called before recorder was ready")}get Ss(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Hf);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Ms(){var e,t,n=this._instance.get_property(Hf);if(!n)return!1;try{t=typeof n=="object"?n:JSON.parse(n)}catch(a){return pu.warn("persisted remote config for session recording is invali
1189d and will be ignored",a),!1}var r=(e=t.cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-r}ks(e){var t,n;if((t=Kn.__PosthogExtensions__)==null||!t.initSessionRecording)return pu.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[ij]:!0});if(this.ys||(this.ys=(n=Kn.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ms())return this.bs===i1||this.bs===a0?void 0:(this.bs=a0,pu.info("persisted remote config is stale, requesting fresh config before starting"),void new Tj(this._instance).load());this.bs=i3,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.zr)==null||t.register({[ej]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.zr)==null||t.register({[JB]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||(n=this.zr)==null||n.register({[e==="url"?tj:nj]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.ys)==null||!n.tryAddCustomEvent(e,t))}}},$de={autocapture:class{constructor(e){this.Ps=!1,this.Rs=null,this.Os=!1,this.instance=e,this.rageclicks=new r3(e.config.rageclick),this.Ls=null}initialize(){this.startIfEnabled()}get Se(){var e,t,n=Da(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map(r=>new RegExp(r)),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map(r=>new RegExp(r)),n}Fs(){if(this.isBrowserSupported()){if(ft&&_n){var e=n=>{n=n||(ft==null?void 0:ft.event);try{this.As(n)}catch(r){PC.error("Failed to capture event",r)}};if(ns(_n,"submit",e,{capture:!0}),ns(_n,"change",e,{capture:!0}),ns(_n,"click",e,{capture:!0}),this.Se.capture_copied_text){var t=n=>{n=n||(ft==null?void 0:ft.event);try{this.As(n,MC)}catch(r){PC.error("Failed to capture copy/cut event",r)}};ns(_n,"copy",t,{capture:!0}),ns(_n,"cut",t,{capture:!0})}}}else PC.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Ps&&(this.Fs(),this.Ps=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Os=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[FR]:!!e.autocapture_opt_out}),this.Rs=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Ls=e}getElementSelectors(e){var t,n=[];return(t=this.Ls)==null||t.forEach(r=>{var a=_n==null?void 0:_n.querySelectorAll(r);a==null||a.forEach(s=>{e===s&&n.push(r)})}),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[FR];if(qi(this.Rs)&&!Bc(n)&&!this.instance.mr())return!1;var r=(t=this.Rs)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!r}As(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=SC(e);uj(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&P$(r,this.instance.config.rageclick)&&this.As(e,"$rageclick");var a=t===MC;if(r&&function(f,m,h,g,v,y){var b,E,w,x,S,N;if(h===void 0&&(h=void 0),!ft||MP(f)||(b=h)!=null&&b.url_allowlist&&!I$(h.url_allowlist,y)||(E=h)!=null&&E.url_ignorelist&&I$(h.url_ignorelist,y))return!1;if((w=h)!=null&&w.dom_event_allowlist){var k=h.dom_event_allowlist;if(k&&!k.some(M=>m.type===M))return!1}var{parentIsUsefulElement:C,targetElementList:A}=pj(f,g);if(!function(M,L){var D=L==null?void 0:L.element_allowlist;if(on(D))return!0;var j,H=function(z){if(D.some(K=>z.tagName.toLowerCase()===K))return{v:!0}};for(var Y of M)if(j=H(Y))return j.v;return!1}(A,h)||!rT(A,(x=h)==null?void 0:x.css_selector_allowlist)||rT(A,(S=(N=h)==null?void 0:N.css_selector_ignorelist)!==null&&S!==void 0?S:$ue))return!1;try{var O=ft.getComputedStyle(f);if(O&&O.getPropertyValue("cursor")==="pointer"&&m.type==="click")return!0}catch{}var T=f.tagName.toLowerCase();switch(T){case"html":return!1;case"form":return(v||["submit"]).indexOf(m.type)>=0;case"input":case"select":case"textarea":return(v||["change","click"]).indexOf(m.type)>=0;default:return C?(v||["click"]).indexOf(m.type)>=0:(v||["click"]).indexOf(m.type)>=0&&(OP.indexOf(T)>-1||f.getAttribute("contenteditable")==="true")}}(r,e,this.Se,a,a?["copy","cut"]:void 0,this.instance)){var{props:s,explicitNoCapture:i}=Nde(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Se.element_attribute_ignorelist,elementsC
1189hainAsString:this.Os,disableCaptureUrlHashes:this.instance.config.disable_capture_url_hashes});if(i)return!1;var l=this.getElementSelectors(r);if(l&&l.length>0&&(s.$element_selectors=l),t===MC){var c,u=fj(ft==null||(c=ft.getSelection())==null?void 0:c.toString()),d=e.type||"clipboard";if(!u)return!1;s.$selected_content=u,s.$copy_type=d}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return Ic(_n==null?void 0:_n.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.$s=(ft==null||(t=ft.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(sn.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,sn.info("History API monitoring stopped")}monitorHistoryChanges(){ft&&ft.history&&(this.Ns("pushState"),this.Ns("replaceState"),this.qs())}Ns(e){var t;if(ft&&((t=ft.history[e])==null||!t.__posthog_wrapped__)){var n=this;(function(r,a,s){try{if(!(a in r))return()=>{};var i=r[a],l=s(i);return Ic(l)&&(l.prototype=l.prototype||{},Object.defineProperties(l,{__posthog_wrapped__:{enumerable:!1,value:!0}})),r[a]=l,()=>{r[a]===l&&(r[a]=i)}}catch{return()=>{}}})(ft.history,e,r=>function(a,s,i){r.call(this,a,s,i),n.js(e)})}}js(e){try{var t,n=ft==null||(t=ft.location)==null?void 0:t.pathname;if(!n)return;n!==this.$s&&this.isEnabled&&this._instance.capture(vh,{navigation_type:e}),this.$s=n}catch(r){sn.error("Error capturing "+e+" pageview",r)}}qs(){if(!this.Ds){var e=()=>{this.js("popstate")};ns(ft,"popstate",e),this.Ds=()=>{ft&&ft.removeEventListener("popstate",e)}}}},heatmaps:class{get Se(){return this.instance.config}constructor(e){var t;this.Bs=!1,this.Ps=!1,this.Hs=null,this.instance=e,this.Bs=!((t=this.instance.persistence)==null||!t.props[zR]),this.rageclicks=new r3(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return Da(this.Se.capture_heatmaps)&&this.Se.capture_heatmaps.flush_interval_milliseconds&&(e=this.Se.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return Ar(this.Se.capture_heatmaps)?Ar(this.Se.enable_heatmaps)?this.Bs:this.Se.enable_heatmaps:this.Se.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Ps)return;Tde.info("starting..."),this.Us(),this.ke()}else{var e;clearInterval((e=this.Hs)!==null&&e!==void 0?e:void 0),this.zs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[zR]:t}),this.Bs=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.R;return this.R=void 0,e}Vs(e){this.fe(e.originalEvent,"deadclick")}ke(){this.Hs&&clearInterval(this.Hs),this.Hs=(_n==null?void 0:_n.visibilityState)==="visible"?setInterval(this.Lr.bind(this),this.flushIntervalMilliseconds):null}Us(){ft&&_n&&(this.Ws=this.Lr.bind(this),ns(ft,DE,this.Ws),this.Gs=e=>this.fe(e||(ft==null?void 0:ft.event)),ns(_n,"click",this.Gs,{capture:!0}),this.Zs=e=>this.Qs(e||(ft==null?void 0:ft.event)),ns(_n,"mousemove",this.Zs,{capture:!0}),this.Js=new $$(this.instance,Wue,this.Vs.bind(this)),this.Js.startIfEnabledOrStop(),this.Ys=this.ke.bind(this),ns(_n,PE,this.Ys),this.Ps=!0)}zs(){var e;ft&&_n&&(this.Ws&&ft.removeEventListener(DE,this.Ws),this.Gs&&_n.removeEventListener("click",this.Gs,{capture:!0}),this.Zs&&_n.removeEventListener("mousemove",this.Zs,{capture:!0}),this.Ys&&_n.removeEventListener(PE,this.Ys),clearTimeout(this.Ks),(e=this.Js)==null||e.stop(),this.Ps=!1)}Xs(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),a=this.instance.scrollManager.scrollElement(),s=function(i,l,c){for(var u=i;u&&Zd(u)&&!Uo(u,"body");){if(u===c)return!1;var d=void 0;try{var f,m,h;d=(f=(m=(h=u.ownerDocument)==null?void 0:h.defaultView)!==null&&m!==void 0?m:ft)==null?void 0:f.getComputedStyle(u).position}catch{return!1}if(dr(l,d))return!0;u=mj(u)}return!1}(SC(e),["fixed","sticky"],a);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:n),target_fixed:s,type:t}}fe(e,t){var n;if(t===void 0&&(t="click"),!A$(e.target)&&o3(e)){var r=this.Xs(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&P$(SC(e),this.instance.config.rageclick)&&this.eo(Qt({},r,{type:"rageclick"})),this.eo(r)}}Qs(e){!A$(e.target)&&o3(e)&&(clearTimeout(this.Ks),this.Ks=setTimeout(()=>{this.eo(this.Xs(e,"mousemove"))},500))}eo(e){if(ft){var t=this.Se.disable_capture_url_hashes?Kd(ft.location.href):ft.location.href,n=this.Se.custom_personal_data_properties,r=this.Se.mask_personal_data_properties?[...Mp,...n||[]]:[],a=$v(t,r,Fv);this.R=this.R||{},this.R[a]||(this.R[a]=[]),this.R[a].push(e)}}Lr(){this.R&&!Id(this.R)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:$$,webVitalsAutocapture:class{constructor(e){var t;this.Bs=!1,this.Ps=!1,this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.ro=()=>{clearTimeout(this.io),this.R.metrics.length!==0&&(this._instance.capture("$web_vitals",this.R.metrics.reduce((n,r)=>Qt({},n,{["$web_vitals_"+r.name+"_event"]:Qt({},r),["$web_vitals_"+r.name+"_value"]:r.value}),{})),this.R={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.no=n=>{var r;this.R=this.R||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var a=this.so();if(!on(a))if(Ar(n==null?void 0:n.name)||Ar(n==null?void 0:n.value))yf.error("Invalid metric received",n);else if(!this.oo||this.oo>n.value){this.R.url!==a&&(this.ro(),this.io=setTimeout(this.ro,this.flushToCaptureTimeoutMs)),on(this.R.url)&&(this.R.url=a),this.R.firstMetricTimestamp=on(this.R.firstMetricTimestamp)?Date.now():this.R.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var s=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),i=Qt({},n,{$current_url:a,timestamp:Date.now()});on(s)||(i.$session_id=s.sessionId,i.$window_id=s.windowId),this.R.metrics.push(i),this.R.metrics.length===this.allowedMetrics.length&&this.ro()}else yf.error("Ignoring metric with value >= "+this.oo,n)},this.ao=()=>
1189{if(!this.Ps){var n,r,a,s,i=Kn.__PosthogExtensions__;on(i)||on(i.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:a,onINP:s}=i.postHogWebVitalsCallbacks),n&&r&&a&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.no.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.no.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&a(this.no.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.no.bind(this)),this.Ps=!0):yf.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Bs=!((t=this._instance.persistence)==null||!t.props[BR]),this.startIfEnabled()}get lo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=Da(this.lo)?(e=this.lo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return Ar(n)?((t=this._instance.persistence)==null?void 0:t.props[jR])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(Da(this.lo)?this.lo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=Da(this.lo)?this.lo.web_vitals_attribution:void 0;return e!=null&&e}get oo(){var e=Da(this.lo)&&Yi(this.lo.__web_vitals_max_value)?this.lo.__web_vitals_max_value:a3;return e>0&&6e4>=e?a3:e}get isEnabled(){var e=ys==null?void 0:ys.protocol;if(e!=="http:"&&e!=="https:")return yf.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=Da(this.lo)?this.lo.web_vitals:Bc(this.lo)?this.lo:void 0;return Bc(t)?t:this.Bs}startIfEnabled(){this.isEnabled&&!this.Ps&&(yf.info("enabled, starting..."),this.Mt(this.ao))}onRemoteConfig(e){if("capturePerformance"in e){var t=Da(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=Da(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[BR]:t}),this._instance.persistence.register({[jR]:n})),this.Bs=t,this.startIfEnabled()}}Mt(e){var t,n;(t=Kn.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=Kn.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",r=>{r?yf.error("failed to load script",r):e()})}so(){var e=ft?this._instance.config.disable_capture_url_hashes?Kd(ft.location.href):ft.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Mp,...t||[]]:[];return $v(e,n,Fv)}yf.error("Could not determine current URL")}}},Fde={exceptionObserver:class{constructor(e){var t,n,r;this.ao=()=>{var a;if(ft&&this.isEnabled&&(a=Kn.__PosthogExtensions__)!=null&&a.errorWrappingFunctions){var s=Kn.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=Kn.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Kn.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.uo&&this.Se.capture_unhandled_errors&&(this.uo=s(this.captureException.bind(this))),!this.ho&&this.Se.capture_unhandled_rejections&&(this.ho=i(this.captureException.bind(this))),!this.do&&this.Se.capture_console_errors&&(this.do=l(this.captureException.bind(this)))}catch(c){r0.error("failed to start",c),this.co()}}},this._instance=e,this.vo=!((t=this._instance.persistence)==null||!t.props[HR]),this.fo=new Hce({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Ae:r0}),this.Se=this.po(),this.startIfEnabledOrStop()}po(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Da(e)?t=Qt({},t,e):(on(e)?this.vo:e)&&(t=Qt({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Se.capture_console_errors||this.Se.capture_unhandled_errors||this.Se.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(r0.info("enabled"),this.co(),this.Mt(this.ao)):this.co()}Mt(e){var t,n;(t=Kn.__PosthogExtensions__)!=null&&t.errorWrappingFunctions?e():(n=Kn.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",r=>{if(r)return r0.error("failed to load script",r);e()})}co(){var e,t,n;(e=this.uo)==null||e.call(this),this.uo=void 0,(t=this.ho)==null||t.call(this),this.ho=void 0,(n=this.do)==null||n.call(this),this.do=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.vo=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[HR]:this.vo}),this.Se=this.po(),this.startIfEnabledOrStop())}onConfigChange(){this.Se=this.po()}captureException(e){var t,n,r,a=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.fo.consumeRateLimit(a)?r0.info("Skipping exception capture because of client rate limiting.",{exception:a}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.mo=[],this.yo=new nue([new uue,new bue,new fue,new due,new vue,new gue,new hue,new yue],function(r){for(var a=arguments.length,s=new Array(a>1?a-1:0),i=1;a>i;i++)s[i-1]=arguments[i];return function(l,c){c===void 0&&(c=0);for(var u=[],d=l.split(` 1190`),f=c;d.length>f;f++){var m=d[f];if(1024>=m.length){var h=C$.test(m)?m.replace(C$,"$1"):m;if(!h.match(/\S*Error: /)){for(var g of s){var v=g(h,r);if(v){u.push(v);break}}if(u.length>=50)break}}}return function(y){if(!y.length)return[];var b=Array.from(y);return b.reverse(),b.slice(0,50).map(E=>{return Qt({},E,{filename:E.filename||(w=b,w[w.length-1]||{}).filename,function:E.function||Ip});var w})}(u)}}("web:javascript",iue,cue)),this._instance=e,this.mo=(t=(n=this._instance.persistence)==null?void 0:n.get_property(VR))!==null&&t!==void 0?t:[],this.bo=AE(this._o()),this.wo=new Eue(this.bo)}onConfigChange(){this.bo=AE(this._o()),this.wo.setConfig(this.bo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var a=(t=(n=e.errorTracking)==null?void 0:n.suppressionRules)!==null&&t!==void 0?t:[],s=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.mo=a,this._instance.persistence&&this._instance.persistence.register({[VR]:this.mo,[UR]:s})}}get xo(){var e,t=!!this._instance.get_property(UR),n=this._instance.config.error_tracking.captureExtensionExceptions;return(e=n??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.yo.buildFromUnknown(e,{syntheticException:t==null?void 0:t.syntheticException,mechanism:{handled:t==null?void 0:t.handled}})}addExceptionStep(e,t){if(this.bo.enabled)try{if(!_a(e)||e.trim().length===0)return void gu.warn("Ignoring exception step because message must be a non-empty string");var n=this.ko(t),{sanitizedProperties:r,droppedKeys:a}=function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var i=[];return{sanitizedProperties:Object.keys(s).reduce((l,c)=>wue.has(c)?(i.push(c),l):(l[c]=s[c],l),{}),droppedKeys:i}}(n);a.length>0&&gu.warn("Ignoring reserved exception step fields",{droppedKeys:a}),this.wo.add(Qt({[RE]:e,[TE]:new Date().toISOString()},r))}catch(s){gu.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.So(t)){if(this.Co(t))return this.Io("Exception dropped: matched a suppression rule"),void gu.info("Skipping exception capture because a suppression rule matched");if(!this.xo&&this.To(t))return this.Io("Exception dropped: thrown by a browser extension"),void gu.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Eo(t))return this.Io("Exception dropped: thrown by the PostHog SDK"),void gu.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.bo.enabled&&Ar(e.$exception_steps)?this.Mo(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",Zi:!0});return r&&this.wo.clear(),r}catch(a){return gu.error("Failed to capture exception event. Dropping this exception.",a),void this.wo.clear()}}catch(a){return void gu.error("Failed to process exception event. Ignoring this exception.",a)}}Mo(e){try{var t=this.wo.getAttachable();return t.length===0?e:Qt({},e,{$exception_steps:t})}catch(n){return gu.error("Failed to read buffered exception steps. Capturing exception without steps.",n),e}}Io(e){this.bo.enabled&&this.wo.add({[RE]:e,[TE]:new Date().toISOString()})}ko(e){return Da(e)?Qt({},e):{}}_o(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Co(e){if(e.length===0)return!1;var t=e.reduce((n,r)=>{var{type:a,value:s}=r;return _a(a)&&a.length>0&&n.$exception_types.push(a),_a(s)&&s.length>0&&n.$exception_values.push(s),n},{$exception_types:[],$exception_values:[]});return this.mo.some(n=>{var r=n.values.map(a=>{var s,i=zj[a.operator],l=Ur(a.value)?a.value:[a.value],c=(s=t[a.key])!==null&&s!==void 0?s:[];return l.length>0&&i(l,c)});return n.type==="OR"?r.some(Boolean):r.every(Boolean)})}To(e){return e.flatMap(t=>{var n,r;
1190return(n=(r=t.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]}).some(t=>t.filename&&t.filename.startsWith("chrome-extension://"))}Eo(e){if(e.length>0){var t,n,r,a,s=(t=(n=e[0].stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[],i=s[s.length-1];return(r=i==null||(a=i.filename)==null?void 0:a.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}So(e){return!Ar(e)&&Ur(e)}}},zde=Qt({productTours:class{get zr(){return this._instance.persistence}constructor(e){this.Po=null,this.Ro=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if("productTours"in e){var t,n;if(this.zr&&this.zr.register({[NP]:!!e.productTours}),!$C(this._instance))return!this.Po&&Ar((t=this.zr)==null?void 0:t.props[N0])||LC.info("product tours disabled; stopping and clearing cached tours"),(n=this.Po)==null||n.stop(),this.Po=null,void this.clearCache();this.loadIfEnabled()}}loadIfEnabled(){!this.Po&&$C(this._instance)&&this.Mt(()=>this.Oo())}Mt(e){var t,n;(t=Kn.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=Kn.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",r=>{r?LC.error("Could not load product tours script",r):e()})}Oo(){var e;!this.Po&&(e=Kn.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Po=Kn.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Ur(this.Ro)||t){var n=this.zr;if(n){var r=n.props[N0];if(Ur(r)&&!t)return this.Ro=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:a=>{if($C(this._instance)){var s=a.statusCode;if(s!==200||!a.json){var i="Product Tours API could not be loaded, status: "+s;return LC.error(i),void e([],{isLoaded:!1,error:i})}var l=Ur(a.json.product_tours)?a.json.product_tours:[];this.Ro=l,n&&n.register({[N0]:l}),e(l,{isLoaded:!0})}else e([],{isLoaded:!0})}})}else e(this.Ro,{isLoaded:!0})}getActiveProductTours(e){Ar(this.Po)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Po.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Po)==null||t.showTourById(e)}previewTour(e){this.Po?this.Po.previewTour(e):this.Mt(()=>{var t;this.Oo(),(t=this.Po)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.Po)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Po)==null||e.nextStep()}previousStep(){var e;(e=this.Po)==null||e.previousStep()}clearCache(){var e;this.Ro=null,(e=this.zr)==null||e.unregister(N0)}resetTour(e){var t;(t=this.Po)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Po)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Po)==null||t.cancelPendingTour(e)}}},dk),Hde={siteApps:class{constructor(e){this.Lo=0,this._instance=e,this.Fo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Ao(e,t){if(t){var n=this.globalsForEvent(t);this.Fo.push(n),this.Fo.length>1e3&&(this.Fo=this.Fo.slice(10))}}get siteAppLoaders(){var e;return(e=Kn._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Ao.bind(this));this.$o=()=>{e(),this.Fo=[],this.$o=void 0}}}globalsForEvent(e){var t,n,r,a,s,i,l;if(!e)throw new Error("Event payload is required");var c={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[f,m]of Object.entries(d))c[f]={id:u[f],type:f,properties:m};var{$set_once:h,$set:g}=e;return{event:Qt({},yB(e,Ade),{properties:Qt({},e.properties,g?{$set:Qt({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},g)}:{},h?{$set_once:Qt({},(r=(a=e.properties)==null?void 0:a.$set_once)!==null&&r!==void 0?r:{},h)}:{}),elements_chain:(s=(i=e.properties)==null?void 0:i.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}Do(e){var t,n=(t=e.tagName)==null?void 0:t.toLowerCase();return n==="style"&&this._instance.config.prepare_external_dependency_stylesheet?this._instance.config.prepare_external_dependency_stylesheet(e)||(Sc.error("prepare_external_dependency_stylesheet returned null"),null):n==="script"&&this._instance.config.prepare_external_dependency_script?this._instance.config.prepare_external_dependency_script(e)||(Sc.error("prepare_external_dependency_script returned null"),null):e}No(){var e,t,n,r,a,s,i,l;if(!this._instance.config.prepare_external_dependency_stylesheet&&!this._instance.config.prepare_external_dependency_script)return()=>{};var c=_n==null?void 0:_n.defaultView,u=c==null||(e=c.Node)==null?void 0:e.prototype;if(!c||!u)return()=>{};if(this.Lo++,this.qo)return this.jo();var d=[],f=this,m=new WeakSet,h=(y,b,E)=>{if(y!=null&&y[b]){var w=y[b];y[b]=E(w),d.push(()=>{y[b]=w})}},g=y=>{if(m.has(y))return y;var b=f.Do(y);return b&&m.add(b),b},v=y=>y.map(b=>typeof b=="string"?b:g(b)).filter(b=>!qi(b));return h(u,"appendChild",y=>function(b){var E=g(b);return E?y.call(this,E):b}),h(u,"insertBefore",y=>function(b,E){var w=g(b);return w?y.call(this,w,E):b}),h(u,"replaceChild",y=>function(b,E){var w=g(b);return w?y.call(this,w,E):E}),[(t=c.Element)==null?void 0:t.prototype,(n=c.Document)==null?void 0:n.prototype,(r=c.DocumentFragment)==null?void 0:r.prototype].forEach(y=>{h(y,"append",b=>function(){for(var E=arguments.length,w=new Array(E),x=0;E>x;x++)w[x]=arguments[x];return b.apply(this,v(w))}),h(y,"prepend",b=>function(){for(var E=arguments.length,w=new Array(E),x=0;E>x;x++)w[x]=arguments[x];return b.apply(this,v(w))})}),[(a=c.Element)==null?void 0:a.prototype,(s=c.CharacterData)==null?void 0:s.prototype,(i=c.DocumentType)==null?void 0:i.prototype].forEach(y=>{h(y,"before",b=>function(){for(var E=arguments.length,w=new Array(E),x=0;E>x;x++)w[x]=arguments[x];return b.apply(this,v(w))}),h(y,"after",b=>function(){for(var E=arguments.length,w=new Array(E),x=0;E>x;x++)w[x]=arguments[x];return b.apply(this,v(w))}),h(y,"replaceWith",b=>function(){for(var E=arguments.length,w=new Array(E),x=0;E>x;x++)w[x]=arguments[x];var S=v(w);return w.length&&!S.length?void 0:b.apply(this,S)})}),h((l=c.Element)==null?void 0:l.prototype,"insertAdjacentElement",y=>function(b,E){var w=g(E);return w?y.call(this,b,w):null}),this.qo=()=>{d.forEach(y=>y()),this.qo=void 0},this.jo()}jo(){var e=!1;return()=>{var t;e||(e=!0,this.Lo--,this.Lo===0&&((t=this.qo)==null||t.call(this)))}}
1190Bo(e,t){t===void 0&&(t=!0);var n=this.No();try{var r=e(n);return t&&n(),r}catch(a){throw n(),a}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var i;!t.errored&&this.Fo.length&&(Sc.info("Processing "+this.Fo.length+" events for site app with id "+e.id),this.Fo.forEach(l=>this.Bo(()=>t.processEvent==null?void 0:t.processEvent(l))),t.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((i=this.$o)==null||i.call(this))},r=!1,a=i=>{t.errored=!i,t.loaded=!0,Sc.info("Site app with id "+e.id+" "+(i?"loaded":"errored")),r&&n()};try{var{processEvent:s}=this.Bo(i=>e.init({posthog:this._instance,callback(l){i(),a(l)}}),!1);s&&(t.processEvent=s),r=!0}catch(i){Sc.error(l3+e.id,i),a(!1)}if(r&&t.loaded)try{n()}catch(i){Sc.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}Ho(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Uo(e){var t=this;if(Object.keys(this.apps).length!==0){var n=this.globalsForEvent(e),r=function(s){try{t.Bo(()=>s.processEvent==null?void 0:s.processEvent(n))}catch(i){Sc.error("Error while processing event "+e.event+" for site app "+s.id,i)}};for(var a of Object.values(this.apps))r(a)}}onRemoteConfig(e){var t,n,r,a=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Ho(),void this._instance.on("eventCaptured",c=>this.Uo(c))):void Sc.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.$o)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(c){var u;Kn["__$$ph_site_app_"+c]=a._instance,(u=Kn.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(a._instance,l,d=>{if(d)return Sc.error(l3+c,d)})};for(var{id:i,url:l}of e.siteApps)s(i)}else Sc.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},Vde={tracingHeaders:class{constructor(e){this.zo=void 0,this.Vo=void 0,this.Wo=void 0,this.ao=()=>{var t,n,r=this.Go();r?(on(this.zo)&&(this.zo=(t=Kn.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null?void 0:t._patchXHR(r,()=>this._instance.get_distinct_id(),this._instance.sessionManager)),on(this.Vo)&&(this.Vo=(n=Kn.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null?void 0:n._patchFetch(r,()=>this._instance.get_distinct_id(),this._instance.sessionManager))):this.co()},this._instance=e}initialize(){this.startIfEnabledOrStop()}Mt(e){var t,n;(t=Kn.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns?e():(n=Kn.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",r=>{if(r)return Rde.error("failed to load script",r);e()})}Zo(){var e,t;return(e=(t=this._instance.config.tracing_headers)!==null&&t!==void 0?t:this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}Go(){var e=this.Zo();return Ur(e)?(Ur(this.Wo)?this.Wo.splice(0,this.Wo.length,...e):this.Wo=[...e],e.length>0?this.Wo:void 0):(Ur(this.Wo)&&this.Wo.splice(0),this.Wo=e||void 0,this.Wo)}co(){var e,t;(e=this.zo)==null||e.call(this),(t=this.Vo)==null||t.call(this),this.zo=void 0,this.Vo=void 0}startIfEnabledOrStop(){this.Go()?this.Mt(this.ao):this.co()}}},Ude=Qt({surveys:class{get Se(){return this._instance.config}constructor(e){this.Qo=void 0,this._surveyManager=null,this.Jo=!1,this.Yo=[],this.Ko=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Se.disable_surveys){var t=e.surveys;if(Ar(t))return xa.warn("Flags not loaded yet. Not loading surveys.");var n=Ur(t);this.Qo=n?t.length>0:t,xa.info("flags response received, isSurveysEnabled: "+this.Qo),this.loadIfEnabled()}}reset(){try{var e;(e=this._surveyEventReceiver)==null||e.reset(),localStorage.removeItem("lastSeenSurveyDate");for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);(r!=null&&r.startsWith(fT)||r!=null&&r.startsWith("inProgressSurvey_"))&&t.push(r)}t.forEach(a=>localStorage.removeItem(a))}catch{}}loadIfEnabled(){if(!this._surveyManager)if(this.Jo)xa.info("Already initializing surveys, skipping...");else if(this.Se.disable_surveys)xa.info(c3);
vendor: 4,469 bytes, line 1190
1190else if(this.Se.cookieless_mode&&this._instance.consent.isOptedOut())xa.info("Not loading surveys in cookieless mode without consent.");else{var e=Kn==null?void 0:Kn.__PosthogExtensions__;if(e){if(!on(this.Qo)||this.Se.advanced_enable_surveys){var t=this.Qo||this.Se.advanced_enable_surveys;this.Jo=!0;try{var n=e.generateSurveys;if(n)return void this.Xo(n,t);var r=e.loadExternalDependency;if(!r)return void this.ea(tT);r(this._instance,"surveys",a=>{a||!e.generateSurveys?this.ea("Could not load surveys script",a):this.Xo(e.generateSurveys,t)})}catch(a){throw this.ea("Error initializing surveys",a),a}finally{this.Jo=!1}}}else xa.error("PostHog Extensions not found.")}}Xo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new Mde(this._instance),xa.info("Surveys loaded successfully"),this.ta({isLoaded:!0})}ea(e,t){xa.error(e,t),this.ta({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Yo.push(e),this._surveyManager&&this.ta({isLoaded:!0}),()=>{this.Yo=this.Yo.filter(t=>t!==e)}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Se.disable_surveys)return xa.info(c3),e([]);var n,r=this._instance.get_property(qR);if(r&&!t)return e(r,{isLoaded:!0});typeof Promise<"u"&&this.Ko?this.Ko.then(a=>{var{surveys:s,context:i}=a;return e(s,i)}):(typeof Promise<"u"&&(this.Ko=new Promise(a=>{n=a})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Se.token),method:"GET",timeout:this.Se.surveys_request_timeout_ms,callback:a=>{var s;this.Ko=null;var i=a.statusCode;if(i!==200||!a.json){var l="Surveys API could not be loaded, status: "+i;xa.error(l);var c={isLoaded:!1,error:l};return e([],c),void(n==null||n({surveys:[],context:c}))}var u,d=a.json.surveys||[],f=d.filter(h=>function(g){return!(!g.start_date||g.end_date)}(h)&&(function(g){var v;return!((v=g.conditions)==null||(v=v.events)==null||(v=v.values)==null||!v.length)}(h)||function(g){var v;return!((v=g.conditions)==null||(v=v.actions)==null||(v=v.values)==null||!v.length)}(h)));f.length>0&&((u=this._surveyEventReceiver)==null||u.register(f)),(s=this._instance.persistence)==null||s.register({[qR]:d,[TP]:Date.now()});var m={isLoaded:!0};e(d,m),n==null||n({surveys:d,context:m})}}))}ta(e){for(var t of this.Yo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(n){xa.error("Error in survey callback",n)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Ar(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);xa.warn("init was not called")}ra(e){var t=null;return this.getSurveys(n=>{var r;t=(r=n.find(a=>a.id===e))!==null&&r!==void 0?r:null}),t}ia(e){if(Ar(this._surveyManager))return{eligible:!1,reason:FC};var t=typeof e=="string"?this.ra(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Ar(this._surveyManager))return xa.warn("init was not called"),{visible:!1,disabledReason:FC};var t=this.ia(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Ar(this._surveyManager)?(xa.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:FC})):new Promise(n=>{this.getSurveys(r=>{var a,s=(a=r.find(l=>l.id===e))!==null&&a!==void 0?a:null;if(s){var i=this.ia(s);n({visible:i.eligible,disabledReason:i.reason})}else n({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,n){var r;if(Ar(this._surveyManager))xa.warn("init was not called");else{var a=typeof e=="string"?this.ra(e):e;if(a!=null&&a.id)if(bde.includes(a.type)){var s=_n==null?void 0:_n.querySelector(t);if(s)return(r=a.appearance)!=null&&r.surveyPopupDelaySeconds?(xa.info("Rendering survey "+a.id+" with delay of "+a.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var i,l;xa.info("Rendering survey "+a.id+" with delay of "+((i=a.appearance)==null?void 0:i.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(a,s,n),xa.info("Survey "+a.id+" rendered")},1e3*a.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(a,s,n);xa.warn("Survey element not found")}else xa.warn("Surveys of type "+a.type+" cannot be rendered in the app");else xa.warn("Survey not found")}}displaySurvey(e,t){var n;if(Ar(this._surveyManager))xa.warn("init was not called");else{var r=this.ra(e);if(r){var a=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(a=Qt({},r,{appearance:Qt({},r.appearance,{surveyPopupDelaySeconds:0})}
1190)),t.displayType!==sT.Popover&&t.initialResponses&&xa.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(r);if(!s.visible)return void xa.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==sT.Inline?this._surveyManager.handlePopoverSurvey(a,t):this.renderSurvey(a,t.selector,t.properties)}else xa.warn("Survey not found")}}cancelPendingSurvey(e){Ar(this._surveyManager)?xa.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},dk),Bde={toolbar:class{constructor(e){this.instance=e}na(e){Kn.ph_toolbar_state=e}sa(){var e;return(e=Kn.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),oj(this.instance.config)||!ft||!_n)return!1;e=e??ft.location,n=n??ft.history;try{if(!t){try{ft.localStorage.setItem("test","test"),ft.localStorage.removeItem("test")}catch{return!1}t=ft==null?void 0:ft.localStorage}var r,a=Pde||zE(e.hash,"__posthog")||zE(e.hash,"state"),s=a?R$(()=>JSON.parse(atob(decodeURIComponent(a))))||R$(()=>JSON.parse(decodeURIComponent(a))):null;return s&&s.action==="ph_authorize"?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(u3)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}oa(e){var t=Kn.ph_load_toolbar||Kn.ph_load_editor;!Ar(t)&&Ic(t)?t(e,this.instance):d3.warn("No toolbar load function found")}loadToolbar(e){var t=!(_n==null||!_n.getElementById(rj));if(!ft||t)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=Qt({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(ft.localStorage.setItem(u3,JSON.stringify(Qt({},r,{source:void 0}))),this.sa()===2)this.oa(r);else if(this.sa()===0){var a;this.na(1),(a=Kn.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"toolbar",s=>{if(s)return d3.error("[Toolbar] Failed to load",s),void this.na(0);this.na(2),this.oa(r)}),ns(ft,"turbolinks:load",()=>{this.na(0),this.loadToolbar(r)})}return!0}aa(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},jde=Qt({experiments:gi},dk),Wde=Qt({},dk,Lde,$de,Fde,zde,Hde,Ude,Vde,Bde,jde,{conversations:class{constructor(e){this.la=void 0,this._conversationsManager=null,this.ua=!1,this.ha=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Ar(t)||(Bc(t)?this.la=t:(this.la=t.enabled,this.ha=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.la=void 0,this.ha=null}loadIfEnabled(){if(!(this._conversationsManager||this.ua||this._instance.config.disable_conversations||oj(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Kn==null?void 0:Kn.__PosthogExtensions__;if(e&&!on(this.la)&&this.la)if(this.ha&&this.ha.token){this.ua=!0;try{var t=e.initConversations;if(t)return this.da(t),void(this.ua=!1);var n=e.loadExternalDependency;if(!n)return void this.ca(tT);n(this._instance,"conversations",r=>{r||!e.initConversations?this.ca("Could not load conversations script",r):this.da(e.initConversations),this.ua=!1})}catch(r){this.ca("Error initializing conversations",r),this.ua=!1}}else fl.error("Conversations enabled but missing token in remote config.")}}da(e){if(this.ha)try{this._conversationsManager=e(this.ha,this._instance),fl.info("Conversations loaded successfully")}catch(t){this.ca("Error completing conversations initialization",t)}else fl.error("Cannot complete initialization: remote config is null")}ca(e,t){fl.error(e,t),this._conversationsManager=null,this.ua=!1}show(){this._conversationsManager?this._conversationsManager.show():fl.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.la===!0&&!qi(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,n){var r=this;return Ls(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(fl.warn(wf),null)})()}getMessages(e,t){var n=this;return Ls(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(fl.warn(wf),null)})()}markAsRead(e){var t=this;return Ls(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(fl.warn(wf),null)})()}getTickets(e){var t=this;return Ls(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(fl.warn(wf),null)})()}requestRestoreLink(e){var t=this;return Ls(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(fl.warn(wf),null)})()}restoreFromToken(e){var t=this;return Ls(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(fl.warn(wf),null)})()}restoreFromUrlToken(){var e=this;return Ls(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(fl.warn(wf),null)})()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}en(){var e;(e=this._conversationsManager)==null||e.setIdentity()}tn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},{logs:class{constructor(e){var t;this.va=!1,this.fa=!1,this.Ae=Qa("[logs]"),this._r=[],this.pa=[],this.ga=()=>{var n,r;(n=this.ma)==null||n.onReconnect(),(r=this.ya)==null||r.onReconnect()},this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.va=!0),ft&&ns(ft,"online",this.ga)}ba(e,t,n,r){var a,s=function(i,l){var c,u,d,f,m,h,g,v=(c=i==null?void 0:i.flushIntervalMs)!==null&&c!==void 0?c:3e3,y=(u=i==null?void 0:i.maxBufferSize)!==null&&u!==void 0?u:100,b=l!=null&&l.consoleCapture?void 0:(d=i==null?void 0:i.maxLogsPerInterval)!==null&&d!==void 0?d:1e3,E=on(b)?Math.max(y,2048):Math.max(y,b),w=i==null?void 0:i.resourceAttributes;return{serviceName:(f=(m=w==null?void 0:w["service.name"])!==null&&m!==void 0?m:i==null?void 0:i.serviceName)!==null&&f!==void 0?f:l==null?void 0:l.serviceNameDefault,serviceVersion:(h=w==null?void 0:w["service.version"])!==null&&h!==void 0?h:i==null?void 0:i.serviceVersion,environment:(g=w==null?void 0:w["deployment.environment"])!==null&&g!==void 0?g:i==null?void 0:i.environment,resourceAttributes:w,beforeSend:i==null?void 0:i.beforeSend,flushIntervalMs:v,max
1190BufferSize:y,maxQueueSize:E,maxBatchRecordsPerPost:100,rateCapWindowMs:v,maxLogsPerInterval:b,backgroundFlushBudgetMs:0,terminationFlushBudgetMs:0}}((a=this._instance)==null||(a=a.config)==null?void 0:a.logs,n);return[new eue(this._a(e,t),s,this.Ae,()=>this.wa(),i=>i(),void 0,r),s]}xa(){var e,t,n=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;return this.ma&&this.ka===n||((t=this.ma)==null||t.reset(),this.ka=n,[this.ma,this.Sa]=this.ba(()=>this._r,r=>{this._r=r})),this.ma}Ca(){var e,t,n=(e=this._instance)==null||(e=e.config)==null?void 0:e.logs;return this.ya&&this.Ia===n||((t=this.ya)==null||t.reset(),this.Ia=n,[this.ya,this.Ta]=this.ba(()=>this.pa,r=>{this.pa=r},{serviceNameDefault:"posthog-browser-logs",consoleCapture:!0},p3)),this.ya}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=(t=e.logs)==null?void 0:t.captureConsoleLogs;!Ar(n)&&n&&(this.va=!0,this.loadIfEnabled())}reset(){var e,t;this._r=[],(e=this.ma)==null||e.reset(),this.pa=[],(t=this.ya)==null||t.reset()}captureLog(e){this.xa().captureLog(e)}le(e){this.Ca().captureLog(e)}get logger(){return this.Ea||(this.Ea={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.Ea}flushLogs(e){e?this.Ma(e):(this.ma&&this.ma.flush().catch(t=>this.Ae.error("PostHog logs flush failed:",t)),this.ya&&this.ya.flush().catch(t=>this.Ae.error("PostHog logs flush failed:",t)))}loadIfEnabled(){if(this.va&&!this.fa){var e=Kn==null?void 0:Kn.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",n=>{var r;n||(r=e.logs)==null||!r.initializeLogs?this.Ae.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.fa=!0)}):this.Ae.error(tT)}else this.Ae.error("PostHog Extensions not found.")}}_a(e,t){var n=this._instance;return{get isDisabled(){return!1},get optedOut(){return!n.is_capturing()},getPersistedProperty:r=>r===ku.LogsQueue?e():void 0,setPersistedProperty(r,a){var s;r===ku.LogsQueue&&t((s=a)!==null&&s!==void 0?s:[])},ht:r=>this.ht(r),getLibraryId:()=>cs.LIB_NAME,getLibraryVersion:()=>cs.LIB_VERSION}}ht(e){return new Promise(t=>{var n=!1,r=s=>{n||(n=!0,clearTimeout(a),t(s))},a=setTimeout(()=>r({kind:"retry-later",error:new Error("logs request timed out")}),9e4);this._instance._send_request({method:"POST",url:this.Pa(),data:e,compression:"best-available",batchKey:"logs",fireCallbackOnDrop:!0,callback(s){var i=s.statusCode;if(i>=200&&300>i)r({kind:"ok"});else if(i===413)r({kind:"too-large"});else if(i!==0&&i!==429&&500>i)r({kind:"fatal",error:new Error("logs request failed with status "+i)});else{var l;r({kind:"retry-later",error:(l=s.error)!==null&&l!==void 0?l:new Error("logs request failed with status "+i)})}}})})}Ma(e){this._r.length>0&&this.Ra(e,this._r,this.Sa,cs.LIB_NAME,t=>{this._r=t}),this.pa.length>0&&this.Ra(e,this.pa,this.Ta,p3,t=>{this.pa=t})}Ra(e,t,n,r,a){if(t.length!==0){var s=t.map(l=>l.record);a([]);var i=qB(s,GB(n,cs.LIB_NAME,cs.LIB_VERSION),r,cs.LIB_VERSION);this._instance._send_request({method:"POST",url:this.Pa(),data:i,compression:"best-available",batchKey:"logs",transport:e})}}Pa(){return this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token)}wa(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n,windowId:r,sessionStartTimestamp:a,lastActivityTimestamp:s}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n,t.windowId=r,Ar(a)||(t.sessionStartTimestamp=a),Ar(s)||(t.lastActivityTimestamp=s)}if(Kn!=null&&(e=Kn.location)!=null&&e.href&&(t.currentUrl=this._instance.config.disable_capture_url_hashes?Kd(Kn.location.href):Kn.location.href),this._instance.featureFlags){var i=this._instance.featureFlags.getFlags();i&&i.length>0&&(t.activeFeatureFlags=i)}return t}}});wl.__defaultExtensionClasses=Qt({},Wde);var zv=function(){cs.SDK_DIST_CHANNEL="npm";var e=Z0[yh]=new wl;return function(){function t(){t.done||(t.done=!0,Uj=!1,Ta(Z0,function(n){n._dom_loaded()}))}_n!=null&&_n.addEventListener?_n.readyState==="complete"?t():ns(_n,"DOMContentLoaded",t,{capture:!1}):ft&&sn.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),e}();const ni=[];for(let e=0;e<256;++e)ni.push((e+256).toString(16).slice(1));function Gde(e,t=0){return(ni[e[t+0]]+ni[e[t+1]]+ni[e[t+2]]+ni[e[t+3]]+"-"+ni[e[t+4]]+ni[e[t+5]]+"-"+ni[e[t+6]]+ni[e[t+7]]+"-"+ni[e[t+8]]+ni[e[t+9]]+"-"+ni[e[t+10]]+ni[e[t+11]]+ni[e[t+12]]+ni[e[t+13]]+ni[e[t+14]]+ni[e[t+15]]).toLowerCase()}let HC;const qde=new Uint8Array(16);function Yde(){if(!HC){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");HC=crypto.getRandomValues.bind(crypto)}return HC(qde)}const Kde=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),g3={randomUUID:Kde};function $f(e,t,n){var a;if(g3.randomUUID&&!t&&!e)return g3.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??Yde();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let s=0;s<16;++s)t[n+s]=r[s];return t}return Gde(r)}let bw=localStorage.getItem("segments-anonymousId"),Bj=!1;bw||(bw=`anonymous@${$f()}`,localStorage.setItem("segments-anonymousId",bw),Bj=!0);let Hv=!1,v3=null;const Zde=()=>{if(Hv||typeof window>"u")return;const e="phc_oLZ4nJDe8TejBGLouSDbJUmbm8Pd9Tz8E6bSsn7ZYuLp",t="https://us.i.posthog.com";try{zv.init(e,{api_host:t,autocapture:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,disable_surveys:!0,disable_external_dependency_loading:!0,advanced_disable_decide:!0,bootstrap:{distinctID:bw,isIdentifiedID:!1},loaded:n=>{/localhost|127\.0\.0\.1/.test(window.location.hostname)&&n.opt_out_capturing()}}),Hv=!0}catch(n){console.error("PostHog init failed:",n)}};Zde();const VC=(e,t)=>{!Hv||!e||(v3!==e?(zv.identify(e,t||{}),v3=e):t&&Object.keys(t).length&&zv.setPersonProperties(t))},Xde=()=>({environment:"production",platform_type:"standard",brand:za.domain,app_version:"4.3.0"}),jj={analyticsTrack:({userId:e=null,event:t="Unspecified",codeName:n="general-unspecified",properties:r={}}={})=>new Promise(a=>{try{e&&VC(e),Hv&&zv.capture(t,{...r,code_name:n,auto:Xde()})}catch(s){console.error("PostHog capture failed:",s)}a({status:"sent"})}),analyticsIdentify:({userId:e=null,event:t="general-unspecified",traits:n={}}={})=>new Promise(r=>{try{e&&VC(e,n)}catch(a){console.error("PostHog identify failed:",a)}r({status:"sent"})}),analyticsPage:({userId:e=null,name:t=null,properties:n={}}={})=>new Promise(r=>{try{e&&VC(e),Hv&&zv.capture("$pageview",{$current_url:typeof window<"u"?window.location.href:void 0,page_name:t,...n})}catch(a){console.error("PostHog page failed:",a)}r({status:"sent"})})};Bj&&jj.analyticsTrack({event:"Anonymous - 1st Entry",codeName:"anonymous-action-1stentry"});const Jn=jj;let UC;const Qde=()=>(UC||(UC=Ir(xr())),UC),Jde=()=>String("https://bookmark.it.com").replace(/\/$/,""),efe=(e,t)=>
1190{const n=e.includes("?")?"&":"?";return`${e}${n}auth_handoff=${encodeURIComponent(t)}`},Wj=async(e,t={})=>{var i,l;const{context:n=null}=t,r=Jde(),a=String(e||"").startsWith("/")?String(e):`/${String(e||"")}`,s=`${r}${a}`;try{const c=await pt(Qde(),Ze("users-auth-handoff-create"))(n?{context:n}:{}),u=(l=(i=c==null?void 0:c.data)==null?void 0:i.output)==null?void 0:l.handoffID;if(u)return efe(s,u)}catch(c){console.warn("auth handoff mint failed; opening unauthenticated URL instead.",c)}return s},y3=async(e,t={})=>{const{target:n="_blank",...r}=t,a=await Wj(e,r);window.open(a,n)},Gj=()=>{if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).has("auth_handoff")}catch{return!1}},o1="auth_handoff";let rh={},b3={};const re={on(e,t,n){rh[e]=r=>t(r.detail),n&&(document.removeEventListener(e,b3[n]),b3[n]=rh[e]),document.addEventListener(e,rh[e])},dispatch(e,t){document.dispatchEvent(new CustomEvent(e,{detail:t}))},remove(e){rh[e]&&(document.removeEventListener(e,rh[e]),delete rh[e])}},ah=Object.freeze(Object.defineProperty({__proto__:null,default:re},Symbol.toStringTag,{value:"Module"})),tfe={apiKey:"AIzaSyDpZTFhwsSj9sJ7n5xAXR-QvUzQxxAwVnE",authDomain:"iteratingly.firebaseapp.com",databaseURL:"https://iteratingly-default-rtdb.firebaseio.com",projectId:"iteratingly",storageBucket:"iteratingly.appspot.com",messagingSenderId:"425228237353",appId:"1:425228237353:web:f4021a26d98382a9ab7a38"},$P=Pre(tfe),Ki=of($P),fk=Ts($P),l1=Boe($P),nfe={}.VITE_FIREBASE_FUNCTIONS_REGION||"us-central1",Cl=Ir(xr(),nfe);re.on("refresh-usercontext",({responseItem:e,callback:t,options:n={resetInitialIsLive:!1}}={})=>{n.resetInitialIsLive&&Zn.dispatch({type:"auth/resetInitialIsLive"}),qj({userItem:of().currentUser,skipPreload:n.resetInitialIsLive}).then(({userContextItem:r,teamsList:a,finalizeSetGlobalStore:s})=>{t&&t({userContextItem:r,teamsList:a,finalizeSetGlobalStore:s})}).catch(r=>{console.error("### ERROR - Failed to refresh user access! ###",r)})});const jE=({userItem:e,userContextItem:t,organizationsList:n,teamsList:r,isLoading:a=!1,isAllTeamView:s,overrideTeamID:i})=>{var l,c;if(t&&r&&(Zn.dispatch({type:"auth/setLoginState",data:{currentUser:e,isLoggedIn:!0,isLoading:a,userContext:t,globalMeta:{organizations:n,teams:r}}}),r.length>0)){let u=r.find(f=>i&&f.id===i||!i&&f.lastViewed)||r[0];u.skipSetAllTeam=!0;let d=(c=(l=Zn.getState())==null?void 0:l.redirect)==null?void 0:c.skipAPIredirect;Zn.dispatch({type:"ui/setUser_currentTeam",data:u}),d||Zn.dispatch({type:"ui/setUser_allTeam",data:{setToFalse:!s}})}},rfe="__TAURI_INTERNALS__"in window||"__TAURI__"in window;if(rfe)try{const e=localStorage.getItem("userLoader-userContext"),t=localStorage.getItem("userLoader-teamsList");if(e&&t){const n=JSON.parse(e),r=JSON.parse(t);n&&r&&r.length>0&&jE({userItem:{uid:n.uid||"optimistic",emailVerified:!0},userContextItem:n,organizationsList:null,teamsList:r,isLoading:!1,isAllTeamView:!0})}}catch(e){console.warn("Optimistic UI preload failed",e)}const qj=({userItem:e,isDelayAPIglobalStoreSet:t=!1,overrideSetTeamID:n,skipPreload:r=!1})=>new Promise((s,i)=>{let l=JSON.parse(localStorage.getItem("userLoader-teamsList"));r||re.dispatch("check-matchurl",{callback:({resultsStatus:m})=>jE({userItem:e,userContextItem:JSON.parse(localStorage.getItem("userLoader-userContext")),organizationsList:null,teamsList:l,isLoading:!0,isAllTeamView:m["/workspace/all/bookmarks/updated"]||m["/workspace/all/bookmarks/recently-viewed"]||m["/workspace/all/bookmarks/starred"]||m["/workspace/all/activity"]||m["/workspace/all/activity/:filterAction"]||m["/prototypes"]||m["/workspace/all/map"]||m["/workspace/all/map/:mapID"],overrideTeamID:n})});let c=null,u=null,d=null;(async()=>{var v,y;const m=await pt(Cl,Ze("validate-userContext"))(),h=(y=(v=m.data)==null?void 0:v.output)==null?void 0:y.userContext,g=e&&e.emailVerified===!1;if(h&&!h.organization_manage_edit&&!g)try{return await pt(Cl,Ze("users-organization-create-ensureOwned"))(),await pt(Cl,Ze("validate-userContext"))()}catch(b){console.warn("ensureOwnedOrganization safety valve failed; continuing with original context",b)}return m})().then(m=>{var h,g;return c=(h=m.data.output)==null?void 0:h.userContext,localStorage.setItem("userLoader-userContext",JSON.stringify(c)),(g=m.data.output.userContext)!=null&&g.team_projects_edit?pt(Cl,Ze("users-info-teams-list"))():Promise.resolve()}).then(m=>{var y,b;u=((y=m==null?void 0:m.data.output)==null?void 0:y.organizations)||[],d=((b=m==null?void 0:m.data.output)==null?void 0:b.teams)||[];let h=null;for(var g=0;g<(l==null?void 0:l.length);g++)l[g].lastViewed&&(h=l[g].id);for(g=0;g<(d==null?void 0:d.length);g++)h&&(d[g].id===h?d[g].lastViewed=!0:d[g].lastViewed=!1);localStorage.setItem("userLoader-teamsList",JSON.stringify(d));try{localStorage.setItem("userLoader-organizationsList",JSON.stringify(u))}catch(E){console.warn("Failed to cache organizations list",E)}const v=({isAllTeamView:E}={})=>
1190{jE({userItem:e,userContextItem:c,organizationsList:u,teamsList:d,isLoading:!1,isAllTeamView:E,overrideTeamID:n}),Zn.dispatch({type:"ui/setsRedirect_skip",data:{isSkipping:!1}})};t||v(),s({userContextItem:c,teamsList:d,finalizeSetGlobalStore:v})}).catch(m=>{var g,v;((m==null?void 0:m.code)==="functions/unauthenticated"||(m==null?void 0:m.code)==="functions/permission-denied"||((g=m==null?void 0:m.message)==null?void 0:g.toLowerCase().includes("unauthenticated"))||((v=m==null?void 0:m.message)==null?void 0:v.toLowerCase().includes("not authorized")))&&(localStorage.removeItem("userLoader-userContext"),localStorage.removeItem("userLoader-teamsList"),localStorage.removeItem("userLoader-organizationsList")),i(m)})});fg(Ki,e=>{var t,n,r,a,s,i,l,c,u;if(e)localStorage.setItem("hasSignedInBefore","yes"),e.email&&localStorage.setItem("lastSignInEmail",e.email),qj({userItem:e,isDelayAPIglobalStoreSet:!0,overrideSetTeamID:(s=(a=(r=(n=(t=Zn.getState())==null?void 0:t.redirect)==null?void 0:n.retainedPreviousURL)==null?void 0:r.pathname)==null?void 0:a.split("/"))==null?void 0:s.pop()}).then(({userContextItem:d,teamsList:f,finalizeSetGlobalStore:m})=>{var y,b,E,w;let h=(b=(y=Zn.getState())==null?void 0:y.redirect)==null?void 0:b.assetGO,g=(w=(E=Zn.getState())==null?void 0:E.redirect)==null?void 0:w.organizationSubscribe,v=localStorage.getItem("pendingJoinTeamCode");h?(re.dispatch("redirect-to",{path:"/go/:assetID",params:[{key:"assetID",value:h}]}),Zn.dispatch({type:"ui/setAssetGO_assetID",data:{assetID:null}}),m()):g?(re.dispatch("redirect-to",{path:"/organization/:organizationID/subscribe",params:[{key:"organizationID",value:g}]}),Zn.dispatch({type:"ui/setOrganizationSubscribe_organizationID",data:{organizationID:null}}),m()):v?(re.dispatch("redirect-to",{path:`/workspace/join/${v}`,params:[]}),m()):(re.dispatch("check-matchurl",{callback:async({resultsStatus:x,pathname:S})=>{var A,O,T,M,L,D,j,H,Y;let N=!1,k=(O=(A=Zn.getState())==null?void 0:A.redirect)==null?void 0:O.skipAPIredirect;if((L=(M=(T=Zn.getState())==null?void 0:T.redirect)==null?void 0:M.retainedPreviousURL)!=null&&L.isApplicableView&&((H=(j=(D=Zn.getState())==null?void 0:D.redirect)==null?void 0:j.retainedPreviousURL)!=null&&H.pathname)&&(!Zn.getState().redirect.retainedPreviousURL.UID||Zn.getState().redirect.retainedPreviousURL.UID&&Zn.get
1190State().redirect.retainedPreviousURL.UID===(e==null?void 0:e.uid)))re.dispatch("redirect-to",{path:Zn.getState().redirect.retainedPreviousURL.pathname,search:Zn.getState().redirect.retainedPreviousURL.params}),Zn.dispatch({type:"ui/setsRedirect_retainedURL"});else if(!(x["/import"]||x["/import-bookmark-bar"]||x["/import-bookmark-history"]||S!=null&&S.startsWith("/import")))if(x["/"]||x["/login"]||x["/workspace/all/bookmarks/updated"]||S!=null&&S.includes("/recently-viewed")||S==="/workspace/all/bookmarks/updated"||S==="/workspace/all/bookmarks/updated/")if(f.length>0){if(N=!0,!k){let z=Zc.defaults.loginRedirect;(x["/workspace/all/bookmarks/updated"]||S==="/workspace/all/bookmarks/updated"||S==="/workspace/all/bookmarks/updated/")&&(z="/workspace/all/bookmarks/updated");try{const K=(Y=Qe==null?void 0:Qe.$dexie)==null?void 0:Y.base;if(K){const ee=async se=>{try{return await Promise.race([se.count(),new Promise((B,U)=>setTimeout(()=>U(new Error("Timeout")),1e3))])}catch(B){return console.warn("Count check failed/timed out",B),0}},oe=await ee(K["Assets-RecentlyViewed-All"]),J=await ee(K["Assets-RecentlyViewed-Team"]);oe===0&&J===0&&(z="/workspace/all/bookmarks/updated")}}catch(K){console.warn("Failed to check local history for redirect",K)}f.length===1&&z.startsWith("/workspace/all/")&&(z=z.replace("/workspace/all/",`/workspace/${f[0].id}/`)),S&&S.includes(z)||re.dispatch("redirect-to",z)}}else k||re.dispatch("redirect-to","/dashboard");else(f==null?void 0:f.length)===1&&S.startsWith("/workspace/all/")&&re.dispatch("redirect-to",S.replace("/workspace/all/",`/workspace/${f[0].id}/`));const C=(f==null?void 0:f.length)===1;m({isAllTeamView:C?!1:N||x["/workspace/all/bookmarks/updated"]||x["/workspace/all/bookmarks/recently-viewed"]||x["/workspace/all/bookmarks/starred"]||x["/workspace/all/activity"]||x["/workspace/all/activity/:filterAction"]||x["/prototypes"]||x["/workspace/all/map"]||x["/workspace/all/map/:mapID"]})}}),setTimeout(()=>{var x,S,N,k;(k=(N=(S=(x=Zn.getState())==null?void 0:x.FB)==null?void 0:S.auth)==null?void 0:N.user)!=null&&k.uid||m({isAllTeamView:!1})},0))}).catch(d=>{var m,h;if(console.error("### ERROR - Failed to initiate user access! ###",d),(d==null?void 0:d.code)==="functions/unauthenticated"||(d==null?void 0:d.code)==="functions/permission-denied"||((m=d==null?void 0:d.message)==null?void 0:m.toLowerCase().includes("unauthenticated"))||((h=d==null?void 0:d.message)==null?void 0:h.toLowerCase().includes("not authorized")))Ki.signOut().then(()=>{localStorage.removeItem("maps_last_opened"),re.dispatch("redirect-to","/login"),re.dispatch("login-freeup"),re.dispatch("trigger-alert",{message:"Sorry, something went wrong with your session. Please sign in again.",intent:"danger"})});else{let g=!1;try{const v=JSON.parse(localStorage.getItem("userLoader-userContext")),y=JSON.parse(localStorage.getItem("userLoader-teamsList"));let b=null;try{b=JSON.parse(localStorage.getItem("userLoader-organizationsList"))}catch{b=null}v&&y&&(jE({userItem:e,userContextItem:v,organizationsList:Array.isArray(b)?b:null,teamsList:y,isLoading:!1,isAllTeamView:!0}),g=!0)}catch(v){console.warn("Offline cache hydration failed",v)}g||Zn.dispatch({type:"auth/setLoginState",data:{currentUser:null,isLoggedIn:!1,isLoading:!1,userContext:null,globalMeta:null}}),re.dispatch("login-freeup"),re.dispatch("trigger-alert",{message:"Network error while connecting. Retrying or working offline...",intent:"warning"})}}),Jn.analyticsIdentify({userId:e==null?void 0:e.uid,traits:{email:e==null?void 0:e.email}});else{let d=(u=(c=(l=(i=Zn.getState())==null?void 0:i.FB)==null?void 0:l.auth)==null?void 0:c.user)==null?void 0:u.uid;if(Qe.action.selfDestruct().catch(f=>console.error("Error: LocalDatabase.action.selfDestruct()",f)),Zn.dispatch({type:"auth/setLoginState",data:{currentUser:null,isLoggedIn:!1,isLoading:!1,userContext:null,globalMeta:null}}),Zn.dispatch({type:"ui/setUser_currentTeam",data:null}),re.dispatch("asset-content-processing-queue",{isResetQueue:!0}),localStorage.removeItem("userLoader-userContext"),localStorage.removeItem("userLoader-teamsList"),localStorage.removeItem("userLoader-organizationsList"),localStorage.removeItem("userLoader-isAllTeam"),Object.keys(localStorage).filter(f=>f.startsWith("assetsGeneral-lastDownload")||f.startsWith("assetList-lastDownload")||f.startsWith("team_invitationCode_")||f.startsWith("team_legacyInv
1190iteCode_")||f.startsWith("maps_cache_")||f.startsWith("boards_cache_")||f==="maps_last_opened"||f==="boards_last_opened").forEach(f=>localStorage.removeItem(f)),Gj())return;re.dispatch("check-matchurl",{callback:({resultsStatus:f,pathname:m})=>{!f["/"]&&!f["/privacy"]&&!f["/terms"]&&!f["/go/:assetID"]&&!f["/verify"]&&!f["/signup"]&&!f["/join/:code"]&&!f["/workspace/join/:code"]&&!f["/workspace/join"]&&!f["/organization/:organizationID/subscribe"]&&!f["/import"]&&!f["/import-bookmark-bar"]&&!f["/import-bookmark-history"]&&!f["/share/board/:shareToken"]&&!f["/share/flow/:shareToken"]&&!(m!=null&&m.startsWith("/import"))&&!(m!=null&&m.startsWith("/share/"))&&re.dispatch("redirect-to",{path:"/login",retainPreviousURLforLogin:{active:!0,lastUID:d,isApplicableView:f["/workspace/all/bookmarks/updated"]||f["/workspace/:teamID/bookmarks/updated"]||f["/workspace/all/bookmarks/recently-viewed"]||f["/workspace/:teamID/bookmarks/recently-viewed"]||f["/workspace/all/bookmarks/starred"]||f["/workspace/:teamID/bookmarks/starred"]||f["/workspace/all/activity"]||f["/workspace/all/activity/:filterAction"]||f["/workspace/:teamID/activity"]||f["/workspace/:teamID/activity/:filterAction"]||f["/workspace/all/map"]||f["/workspace/all/map/:mapID"]||f["/workspace/:teamID/map"]||f["/workspace/:teamID/map/:mapID"]}})}}),re.dispatch("login-freeup"),Jn.analyticsIdentify()}});const Vf={CENTER:"center",END:"end",LEFT:"left",RIGHT:"right",START:"start"},qn={ZERO:0,ONE:1,TWO:2,THREE:3,FOUR:4},jr={NONE:"none",PRIMARY:"primary",SUCCESS:"success",WARNING:"warning",DANGER:"danger"},va={BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",LEFT:"left",LEFT_BOTTOM:"left-bottom",LEFT_TOP:"left-top",RIGHT:"right",RIGHT_BOTTOM:"right-bottom",RIGHT_TOP:"right-top",TOP:"top",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"};function afe(e){return e===va.TOP||e===va.TOP_LEFT||e===va.TOP_RIGHT||e===va.BOTTOM||e===va.BOTTOM_LEFT||e===va.BOTTOM_RIGHT}function w3(e){return e===va.TOP||e===va.TOP_LEFT||e===va.TOP_RIGHT?va.TOP:e===va.BOTTOM||e===va.BOTTOM_LEFT||e===va.BOTTOM_RIGHT?va.BOTTOM:e===va.LEFT||e===va.LEFT_TOP||e===va.LEFT_BOTTOM?va.LEFT:va.RIGHT}let an="bp6";typeof BLUEPRINT_NAMESPACE<"u"?an=BLUEPRINT_NAMESPACE:typeof REACT_APP_BLUEPRINT_NAMESPACE<"u"&&(an=REACT_APP_BLUEPRINT_NAMESPACE);const Xd=`${an}-active`,sfe=`${an}-align-left`,ife=`${an}-align-right`,mk=`${an}-compact`,Xr=`${an}-dark`,wc=`${an}-disabled`,Qi=`${an}-fill`,ofe=`${an}-fixed-top`,Yj=`${an}-inline`,Kj=`${an}-interactive`,Dp=`${an}-large`,FP=`${an}-loading`,Lp=`${an}-minimal`,E3=`${an}-outlined`,lfe=`${an}-multiline`,cfe=`${an}-read-only`,Zj=`${an}-round`,zP=`${an}-selected`,WE=`${an}-small`,HP=`${an}-vertical`;Rs(jr.PRIMARY);Rs(jr.SUCCESS);Rs(jr.WARNING);Rs(jr.DANGER);const Xj=`${an}-text-muted`,ufe=`${an}-text-overflow-ellipsis`,dfe=`${an}-blockquote`,ffe=`${an}-code`,mfe=`${an}-code-block`,yg=`${an}-heading`,Qj=`${an}-list`,hk=`${an}-alert`,hfe=`${hk}-body`,pfe=`${hk}-contents`,gfe=`${hk}-footer`,eZe=`${an}-breadcrumb`,Wy=`${an}-button`,vfe=`${Wy}-group`,yfe=`${Wy}-spinner`,bfe=`${Wy}-text`,VP=`${an}-callout`,wfe=`${VP}-has-body-content`,Efe=`${VP}-icon`,xfe=`${an}-card`,Jj=`${an}-control-card`,_fe=`${Jj}-label`,kfe=`${an}-radio-control-card`,pk=`${an}-context-menu`,Sfe=`${pk}-virtual-target`,Cfe=`${pk}-popover`,Nfe=`${pk}-backdrop`,cf=`${an}-dialog`,Rfe=`${cf}-container`,Tfe=`${cf}-header`,Fs=`${cf}-body`,Afe=`${cf}-body-scroll-container`,eW=`${cf}-close-button`,Hi=`${cf}-footer`,Vi=`${cf}-footer-actions`,Ife=`${an}-divider`,UP=`${an}-drawer`,GE=`${UP}-body`,Ofe=`${UP}-header`,Gy=`${an}-editable-text`,Mfe=`${Gy}-content`,Pfe=`${Gy}-editing`,tW=`${Gy}-input`,Dfe=`${Gy}-placeholder`,Lfe=`${an}-flex-expander`,$fe=`${an}-html-select`,nW=`${an}-html-table`,tZe=`${nW}-bordered`,nZe=`${nW}-striped`,qy=`${an}-input`,Ffe=`${qy}-group`,zfe=`${qy}-left-container`,Hfe=`${qy}-action`,rW=`${an}-text-area`,Vfe=`${rW}-auto-resize`,BP=`${an}-control`,Ufe=`${BP}-input`,aW=`${BP}-indicator`,x3=`${aW}-child`,Bfe=`${an}-checkbox`,jfe=`${an}-radio`,Wfe=`${an}-radio-group`,sW=`${an}-switch`,_3=`${sW}-inner-text`,Gfe=`${an}-file-input`,qfe=`${an}-file-input-has-selection`,Yfe=`${an}-file-upload-input`,Kfe=`${an}-file-upload-input-custom-text`,jP=`${an}-label`,Zfe=`${an}-form-group`,Xfe=`${an}-form-content`,Qfe=`${an}-form-helper-text`,Jfe=`${an}-form-group-sub-label`,gk=`${an}-menu`,Yy=`${gk}-item`,eme=`${Yy}-is-selectable`,tme=`${Yy}-selected-icon`,nme=`${Yy}-icon`,rme=`${Yy}-label`,hT=`${an}-submenu`,ame=`${hT}-icon`,sme=`${gk}-divider`,ime=`${gk}-header`,vk=`${an}-navbar`,ome=`${vk}-group`,lme=`${vk}-heading`,cme=`${vk}-divider`,qE=`${an}-non-ideal-state`,ume=`${qE}-visual`,dme=`${qE}-text`,Pl=`${an}-overlay`,iW=`${Pl}-backdrop`,fme=`${Pl}-container`,pT=`${Pl}-content`,oW=`${Pl}-inline`,zd=`${Pl}-open`,mme=`${Pl}-scroll-container`,WP=`${Pl}-start-focus-trap`,GP=`${Pl}-end-focus-trap`,us=`${an}-popover`,BC=`${us}-arrow`,lW=`${us}-backdrop`,X0=`${us}-capturing-dismiss`,cW=`${us}-content`,uW=`${us}-placement`,Ho=`${us}-dismiss`,dW=`${Ho}-override`,fW=`${us}-match-target-width`,mW=`${us}-open`,hW=`${us}-popper-escaped`,pW=`${us}-reference-hidden`,gW=`${us}-target`,vW=`${us}-transition-container`,hme=`${us}-minimal-animation`,pme=`${an}-progress-bar`,gme=`${an}-progress-meter`,vme=`${an}-no-stripes`,yme=`${an}-no-animation`,bme=`${an}-portal`,Q0=`${an}-skeleton`,ym=`${an}-slider`,wme=`${ym}-axis`,yW=`${ym}
1190-handle`,bW=`${ym}-label`,Eme=`${ym}-track`,xme=`${ym}-progress`,_me=`${an}-start`,kme=`${an}-end`,yk=`${an}-spinner`,Sme=`${yk}-animation`,Cme=`${yk}-head`,Nme=`${an}-no-spin`,Rme=`${yk}-track`,cd=`${an}-tab`,Tme=`${cd}-icon`,Ame=`${cd}-tag`,wW=`${cd}-indicator`,Ime=`${wW}-wrapper`,Ome=`${cd}-list`,qP=`${cd}-panel`,Mme=`${cd}s`,EW=`${an}-tag`,Pme=`${EW}-remove`,Dme=`${an}-tooltip`,bk=`${an}-icon`,Lme=`${bk}-standard`,$me=`${bk}-large`,Fme=`${bk}-muted`;function xW(){return an}function wk(e){switch(e){case Vf.LEFT:case Vf.START:return sfe;case Vf.RIGHT:case Vf.END:return ife;default:return}}function zme(e){if(e!==void 0)return`${an}-elevation-${e}`}function Hme(e){if(e!=null)return e.indexOf(`${an}-icon-`)===0?e:`${an}-icon-${e}`}function Rs(e){if(!(e==null||e===jr.NONE))return`${an}-intent-${e.toLowerCase()}`}function Vme(e){if(e!==void 0)return`${an}-position-${e}`}function ud(e,t){if(e==="small")return WE;if(e==="large")return Dp;const{large:n=!1,small:r=!1}=t;return{[Dp]:n,[WE]:r}}function _W(e,t){if(e==="outlined")return E3;if(e==="minimal")return Lp;const{minimal:n=!1,outlined:r=!1}=t;return{[Lp]:n,[E3]:r}}function Qd(e,t,n=(r,a)=>r===a){return e==null&&t==null?!0:e==null||t==null||e.length!==t.length?!1:e.every((r,a)=>n(r,t[a]))}function oi(e,t,n){if(e==null&&t==null)return!0;if(e==null||t==null)return!1;if(Array.isArray(e)||Array.isArray(t))return!1;if(n!=null)return jC(e,t,n);{const r=Object.keys(e),a=Object.keys(t);return jC(e,t,{include:r})&&jC(e,t,{include:a})}}function qo(e,t,n){if(e===t)return!0;if(e==null&&t==null)return!0;if(e==null||t==null)return!1;if(Array.isArray(e)||Array.isArray(t))return Qd(e,t,qo);if(S3(e)||S3(t))return e===t;if(n!=null)return k3(e,t,n);if(e.constructor!==t.constructor)return!1;{const r=Object.keys(e),a=Object.keys(t);return r==null||a==null?!1:r.length===0&&a.length===0?!0:Qd(r,a)&&k3(e,t,r)}}function jC(e,t,n){return Ume(e,t,n).every(r=>e.hasOwnProperty(r)===t.hasOwnProperty(r)&&e[r]===t[r])}function k3(e,t,n){return n.every(r=>e.hasOwnProperty(r)===t.hasOwnProperty(r)&&qo(e[r],t[r]))}function S3(e){return typeof e=="number"||typeof e=="string"||typeof e=="boolean"}function Ume(e,t,n){if(Bme(n))return n.include;if(jme(n)){const r=Object.keys(e),a=Object.keys(t),s=Wme(r.concat(a));return n.exclude.forEach(i=>delete s[i]),Object.keys(s)}return[]}function Bme(e){return e!=null&&e.include!=null}function jme(e){return e!=null&&e.exclude!=null}function Wme(e){return e.reduce((t,n)=>(t[n]=!0,t),{})}function kW(){return typeof window<"u"&&window.document!=null}function SW(e,t){return e===t||e.contains(t)}function gT(e){if(e==null||e.closest==null)return!1;const t=e.closest("input, textarea, [contenteditable=true]");if(t==null)return!1;if(t.tagName.toLowerCase()==="input"){const n=t.type;if(n==="checkbox"||n==="radio")return!1}return!t.readOnly}function Vv(e,t){const r=((e==null?void 0:e.getRootNode(t))??document).activeElement;return r instanceof HTMLElement?r:null}function C3(e,t={}){return Gme(e,r=>{t.preventDefault&&r.preventDefault()},r=>r.persist())}function Gme(e,t,n){let r=!1;return(...s)=>{t==null||t(...s),!r&&(r=!0,n==null||n(...s),requestAnimationFrame(()=>{e(...s),r=!1}))}}function qme(e){return t=>{e.some(n=>t.key===n)&&(gT(t.target)||t.preventDefault(),t.target.dispatchEvent(new MouseEvent("click",{...t,view:void 0})))}}const Yme=['a[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','details:not([tabindex="-1"])','input:not([disabled]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].join(",");function Kme(e){return Array.from(e.querySelectorAll(Yme))}function Nl(e){return typeof e=="function"}const ia="[Blueprint]",Zme=ia+" clamp: max cannot be less than min",Xme=ia+" <Alert> cancelButtonText and onCancel should be set together.",Qme=ia+" <Alert> canEscapeKeyCancel enabled without onCancel or onClose handler.",Jme=ia+" <Alert> canOutsideClickCancel enabled without onCancel or onClose handler.",ehe=ia+" useHotkeys() was used outside of a <HotkeysProvider> context. These hotkeys will not be shown in the hotkeys help dialog.",the=ia+" <HotkeysTarget> was configured with local hotkeys, but you did not use the generated event handlers to bind their event handlers. Try using a render function as the child of this component.",nhe=ia+" <InputGroup> leftElement and leftIcon prop are mutually exclusive, with leftElement taking priority.",rhe=ia+' <NavbarGroup> does not support align="center". Only "left" or "right" alignment is allowed, and align="center" will be ignored.',CW=`${ia} <Popover> requires renderTarget prop or a child element.`,NW=`${ia} <Popover hasBackdrop={true}> requires interactionKind="click".`,RW=`${ia} <Popover> supports only one child which is rendered as its target; additional children are ignored.`,TW=ia+" <Popover> with children ignores renderTarget prop; use either prop or children.",AW=ia+" Disabling <Popover> with empty/whitespace content...",IW=ia+" <Popover usePortal={fal
1190se}> ignores hasBackdrop",OW=ia+" <Popover> supports either placement or position prop, not both.",MW=ia+" <Popover> onInteraction is ignored when uncontrolled.",PW=ia+" <Popover> targetProps value is ignored when renderTarget API is used.",ahe=ia+" <Popover> positions content incorrectly under React 19 (especially in StrictMode); migrate to <PopoverNext>.",she=ia+" <RadioGroup> children and options prop are mutually exclusive, with options taking priority.",ihe=ia+" <Slider> stepSize must be greater than zero.",ohe=ia+" <Slider> labelStepSize must be greater than zero.",lhe=ia+" <Slider> min prop must be a finite number.",che=ia+" <Slider> max prop must be a finite number.",uhe=ia+" <MultiSlider> children must be <SliderHandle>s or <SliderTrackStop>s",dhe=ia+" <MultiSlider> labelStepSize and labelValues prop are mutually exclusive, with labelStepSize taking priority.",fhe=ia+" <Spinner> Classes.SMALL/LARGE are ignored if size prop is set.",DW=ia+" <Dialog> iconName is ignored if title is omitted.",LW=ia+" <Dialog> isCloseButtonShown prop is ignored if title is omitted.",mhe=ia+" <Drawer> all angle positions are casted into pure position (TOP, BOTTOM, LEFT or RIGHT)",hhe=ia+" <Overlay2> was used outside of a <OverlaysProvider> context. This will no longer be supported in Blueprint v6. See https://github.com/palantir/blueprint/wiki/Overlay2-migration",phe=ia+" <Overlay2> cannot use childRef and childRefs props simultaneously",ghe=ia+" <Overlay2> requires childRefs prop when rendering multiple child elements",vhe=ia+" <Overlay2> requires each child element to have a unique key prop when childRefs is used";function Jo(e){return typeof NODE_ENV<"u"&&NODE_ENV===e}function yhe(){return parseInt(p.version,10)}function bhe(e,t,n=1e-5){return Math.abs(e-t)<=n}function bg(e,t,n){if(e==null)return e;if(n<t)throw new Error(Zme);return Math.min(Math.max(e,t),n)}function $W(e){if(!isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}const N3=new Map;function FW(e){const t=N3.get(e)??0;return N3.set(e,t+1),`${e}-${t}`}function Ek(e){return typeof e=="string"&&e.trim().length===0}function Uv(e,t=!1){return e==null||e===""||e===!1||!t&&Array.isArray(e)&&(e.length===0||e.every(n=>Uv(n,!0)))}function xk(e,t="span",n={}){if(!(e==null||typeof e=="boolean"||Ek(e)))return typeof e=="string"||typeof e=="number"||whe(e)||Ehe(e)?p.createElement(t,n,e):zW(e)?Object.keys(n).length>0?p.cloneElement(e,n):e:void 0}function zW(e){return typeof e=="object"&&typeof e.type<"u"&&typeof e.props<"u"}function whe(e){return typeof e.type=="symbol"}function Ehe(e){return Array.isArray(e)}function Jd(e,t){return e!=null&&e.type!=null&&e.type.displayName!=null&&e.type.displayName===t.displayName}function bm(e){return e.key==="Enter"||e.key===" "}const xhe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function _he(e){return xhe.includes(e.key)}function HW(e,t,n){if(t.includes(e.key))return-1;if(n.includes(e.key))return 1}function khe(e){return e!=null&&e instanceof Element&&e.closest(`.${Xr}`)!=null}function She(e){return e!=null&&typeof e!="function"}function Che(e){return typeof e=="function"}function zu(e,t){She(e)?e.current=t:Che(e)&&e(t)}function mc(...e){return t=>{e.forEach(n=>{zu(n,t)})}}function Oo(e){return e===null?null:typeof e.current>"u"?e:e.current}function vT(e,t,n){return r=>{e[t]=r,zu(n,r)}}class Ky extends p.Component{constructor(n){super(n);G(this,"componentWillUpdate");G(this,"componentWillReceiveProps");G(this,"componentWillMount");G(this,"getDerivedStateFromProps");G(this,"displayName");G(this,"timeoutIds",[]);G(this,"requestIds",[]);G(this,"clearTimeouts",()=>{if(this.timeoutIds.length>0){for(const n of this.timeoutIds)window.clearTimeout(n);this.timeoutIds=[]}});G(this,"cancelAnimationFrames",()=>{if(this.requestIds.length>0){for(const n of this.requestIds)window.cancelAnimationFrame(n);this.requestIds=[]}});Jo("production")||this.validateProps(this.props)}componentDidUpdate(n,r,a){Jo("production")||this.validateProps(this.props)}componentWillUnmount(){this.clearTimeouts(),this.cancelAnimationFrames()}requestAnimationFrame(n){const r=window.requestAnimationFrame(n);return this.requestIds.push(r),()=>window.cancelAnimationFrame(r)}setTimeout(n,r){const a=window.setTimeout(n,r);return this.timeoutIds.push(a),()=>window.clearTimeout(a)}validateProps(n){}}class Bs extends p.PureComponent{constructor(n){super(n);G(this,"componentWillUpdate");G(this,"componentWillReceiveProps");G(this,"componentWillMount");G(this,"getDerivedStateFromProps");G(this,"displayName");G(this,"timeoutIds",[]);G(this,"requestIds",[]);G(this,"clearTimeouts",()=>{if(this.timeoutIds.length>0){for(const n of this.timeoutIds)window.clearTimeout(n);this.timeoutIds=[]}});G(this,"cancelAnimationFrames",()=>{if(this.requestIds.length>0){for(const n of this.requestIds)window.cancelAnimationFrame(n);this.requestIds=[]}});Jo("production")||this.validateProps(this.props)}componentDidUpdate(n,r,a){Jo("production")||this.validateProps(this.props)}componentWillUnmount(){this.clearTimeouts(),this.cancelAnimationFrames()}requestAnimationFrame(n){const r=window.requestAnimationFrame(n);return this.requestIds.push(r),()=>window.cancelAnimationFrame(r)}setTimeout(n,r){const a=window.setTimeout(n,r);return this.timeoutIds.push(a),()=>window.clearTimeout(a)}validateProps(n){}}const $n="Blueprint6",R3=["active","alignText","asyncControl","containerRef","current","elementRef","ellipsizeText","endIcon","fill","icon","iconSize","inputClassName","inputRef","intent","inline","large","loading","leftElement","leftIcon","minimal","onRemove","outlined","panel","panelClassName","popoverProps","rightElement","rightIcon","round","selectedValue","size","small","tagName","text","textClassName","variant"];function Ju(e,t=R3,n=!1){return n&&(t=t.concat(R3)),t.reduce((r,a)=>(a.indexOf("-")!==-1||r.hasOwnProperty(a)&&delete r[a],r),{...e})}var VW={exports:{}},_k={};/** 1191 * @license React 1192 * react-jsx-runtime.production.min.js 1193 * 1194 * Copyright (c) Facebook, Inc. and its affiliates. 1195 * 1196 * This source code is licensed under the MIT license found in the 1197 * LICENSE file in the root directory of this source tree. 1198 */var Nhe=p,Rhe=Symbol.for("react.element"),The=Symbol.for("react.fragment"),Ahe=Object.prototype.hasOwnProperty,Ihe=Nhe.__SECRET_INT
1198ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ohe={key:!0,ref:!0,__self:!0,__source:!0};function UW(e,t,n){var r,a={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Ahe.call(t,r)&&!Ohe.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)a[r]===void 0&&(a[r]=t[r]);return{$$typeof:Rhe,type:e,key:s,ref:i,props:a,_owner:Ihe.current}}_k.Fragment=The;_k.jsx=UW;_k.jsxs=UW;VW.exports=_k;var F=VW.exports,BW={exports:{}};/*! 1199 Copyright (c) 2018 Jed Watson. 1200 Licensed under the MIT License (MIT), see 1201 http://jedwatson.github.io/classnames 1202*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],a=0;a<arguments.length;a++){var s=arguments[a];if(s){var i=typeof s;if(i==="string"||i==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var l=n.apply(null,s);l&&r.push(l)}}else if(i==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var c in s)t.call(s,c)&&s[c]&&r.push(c)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(BW);var Mhe=BW.exports;const At=id(Mhe);function wg(e,t=[]){p.useEffect(()=>{Jo("production")||e()},t)}const Phe={defaultTabIndex:void 0,disabledTabIndex:-1};function jW(e,t,n,r=Phe){const{defaultTabIndex:a,disabledTabIndex:s}=r,{active:i,onClick:l,onFocus:c,onKeyDown:u,onKeyUp:d,onBlur:f,tabIndex:m=a}=t,[h,g]=p.useState(),[v,y]=p.useState(!1),b=p.useRef(null),E=p.useCallback(N=>{v&&y(!1),f==null||f(N)},[v,f]),w=p.useCallback(N=>{bm(N)&&(N.preventDefault(),N.key!==h&&y(!0)),g(N.key),u==null||u(N)},[h,u]),x=p.useCallback(N=>{var k;bm(N)&&(y(!1),(k=b.current)==null||k.click()),g(void 0),d==null||d(N)},[d,b]);return[e&&(i||v),{onBlur:E,onClick:e?l:void 0,onFocus:e?c:void 0,onKeyDown:w,onKeyUp:x,ref:mc(b,n),tabIndex:e?m:s}]}function Dhe(e){return e.toLowerCase()}var Lhe=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],$he=/[^A-Z0-9]+/gi;function WW(e,t){t===void 0&&(t={});for(var n=t.splitRegexp,r=n===void 0?Lhe:n,a=t.stripRegexp,s=a===void 0?$he:a,i=t.transform,l=i===void 0?Dhe:i,c=t.delimiter,u=c===void 0?" ":c,d=T3(T3(e,r,"$1\0$2"),s,"\0"),f=0,m=d.length;d.charAt(f)==="\0";)f++;for(;d.charAt(m-1)==="\0";)m--;return d.slice(f,m).split("\0").map(l).join(u)}function T3(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce(function(r,a){return r.replace(a,n)},e)}function Fhe(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function zhe(e,t){return t===void 0&&(t={}),WW(e,vM({delimiter:"",transform:Fhe},t))}function Hhe(e,t){return t===void 0&&(t={}),WW(e,vM({delimiter:"."},t))}function Vhe(e,t){return t===void 0&&(t={}),Hhe(e,vM({delimiter:"_"},t))}var Nt;(function(e){e[e.STANDARD=16]="STANDARD",e[e.LARGE=20]="LARGE"})(Nt||(Nt={}));var I;(function(e){e.AddApplication="add-application",e.AddChild="add-child",e.AddClip="add-clip",e.AddColumnLeft="add-column-left",e.AddColumnRight="add-column-right",e.AddDerivedColumn="add-derived-column",e.AddLocation="add-location",e.AddParent="add-parent",e.AddRowBottom="add-row-bottom",e.AddRowTop="add-row-top",e.AddTile="add-tile",e.AddToArtifact="add-to-artifact",e.AddToFolder="add-to-folder",e.Add="add",e.AimpointsTarget="aimpoints-target",e.Airplane="airplane",e.AlignCenter="align-center",e.AlignJustify="align-justify",e.AlignLeft="align-left",e.AlignRight="align-right",e.AlignmentBottom="alignment-bottom",e.AlignmentHorizontalCenter="alignment-horizontal-center",e.AlignmentLeft="alignment-left",e.AlignmentRight="alignment-right",e.AlignmentTop="alignment-top",e.AlignmentVerticalCenter="alignment-vertical-center",e.Ammunition="ammunition",e.Anchor="anchor",e.Annotation="annotation",e.Announcement="announcement",e.Antenna="antenna",e.AppHeader="app-header",e.Application="application",e.Applications="applications",e.Archive="archive",e.AreaOfInterest="area-of-interest",e.ArrayBoolean="array-boolean",e.ArrayDate="array-date",e.ArrayFloatingPoint="array-floating-point",e.ArrayNumeric="array-numeric",e.ArrayObject="array-object",e.ArrayString="array-string",e.ArrayTimestamp="array-timestamp",e.Array="array",e.ArrowBottomLeft="arrow-bottom-left",e.ArrowBottomRight="arrow-bottom-right",e.ArrowDown="arrow-down",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowTopLeft="arrow-top-left",e.ArrowTopRight="arrow-top-right",e.ArrowUp="arrow-up",e.ArrowsArc="arrows-arc",e.ArrowsHorizontal="arrows-horizontal",e.ArrowsVertical="arrows-vertical",e.Asterisk="asterisk",e.At="at",e.AutomaticUpdates="automatic-updates",e.Axle="axle",e.Backlink="backlink",e.BackwardTen="backward-ten",e.Badge="badge",e.BanCircle="ban-circle",e.BankAccount="bank-account",e.Barcode="barcode",e.BinaryNumber="binary-number",e.Blank="blank",e.BlockPromote="block-promote",e.BlockedPerson="blocked-person",e.Bold="bold",e.Book="book",e.Bookmark="bookmark",e.Box="box",e.BranchLocked="branch-locked",e.BranchUnlocked="branch-unlocked",e.Briefcase="briefcase",e.BringData="bring-data",e.BringForward="bring-forward",e.BritishPound="british-pound",e.Bug="bug",e.Buggy="buggy",e.Build="build",e.Bullseye="bullseye",e.Calculator="calculator",e.Calendar="calendar",e.Camera="camera",e.CaretDown="caret-down",e.CaretLeft="caret-left",e.CaretRight="caret-right",e.CaretUp="caret-up",e.CargoShip="cargo-ship",e.CellTower="cell-tower",e.Changes="changes",e.Chart="chart",e.Chat="chat",e.ChevronBackward="chevron-backward",e.ChevronDown="chevron-down",e.ChevronForward="chevron-forward",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.ChevronUp="chevron-up",e.CircleArrowDown="circle-arrow-down",e.CircleArrowLeft="circle-arrow-left",e.Cir
1202cleArrowRight="circle-arrow-right",e.CircleArrowUp="circle-arrow-up",e.CircleDashed="circle-dashed",e.Circle="circle",e.Citation="citation",e.Clean="clean",e.Clip="clip",e.ClipboardFile="clipboard-file",e.Clipboard="clipboard",e.CloudDownload="cloud-download",e.CloudServer="cloud-server",e.CloudTick="cloud-tick",e.CloudUpload="cloud-upload",e.Cloud="cloud",e.CodeBlock="code-block",e.Code="code",e.Cog="cog",e.CollapseAll="collapse-all",e.ColorFill="color-fill",e.ColumnLayout="column-layout",e.Comment="comment",e.Comparison="comparison",e.Compass="compass",e.Compressed="compressed",e.Confirm="confirm",e.ConsoleAlert="console-alert",e.Console="console",e.Construction="construction",e.Contrast="contrast",e.Control="control",e.CreditCard="credit-card",e.Crop="crop",e.CrossCircle="cross-circle",e.Cross="cross",e.Crown="crown",e.CrystalBall="crystal-ball",e.CssStyle="css-style",e.CubeAdd="cube-add",e.CubeCutout="cube-cutout",e.CubeCutouts="cube-cutouts",e.CubeEdit="cube-edit",e.CubeRemove="cube-remove",e.Cube="cube",e.Cubes="cubes",e.CurlyBraces="curly-braces",e.CurvedRangeChart="curved-range-chart",e.Cut="cut",e.Cycle="cycle",e.Dashboard="dashboard",e.DataCloud="data-cloud",e.DataConnection="data-connection",e.DataLineage="data-lineage",e.DataSearch="data-search",e.DataSync="data-sync",e.Database="database",e.DeleteClip="delete-clip",e.Delete="delete",e.Delta="delta",e.DeriveColumn="derive-column",e.Descendant="descendant",e.Desktop="desktop",e.Detection="detection",e.Diagnosis="diagnosis",e.DiagramTree="diagram-tree",e.DirectionLeft="direction-left",e.DirectionRight="direction-right",e.Disable="disable",e.Divide="divide",e.DocumentCode="document-code",e.DocumentLocked="document-locked",e.DocumentOpen="document-open",e.DocumentShare="document-share",e.Document="document",e.Dollar="dollar",e.Dot="dot",e.DoubleCaretHorizontal="double-caret-horizontal",e.DoubleCaretVertical="double-caret-vertical",e.DoubleChevronDown="double-chevron-down",e.DoubleChevronLeft="double-chevron-left",e.DoubleChevronRight="double-chevron-right",e.DoubleChevronUp="double-chevron-up",e.DoughnutChart="doughnut-chart",e.Download="download",e.DragHandleHorizontal="drag-handle-horizontal",e.DragHandleVertical="drag-handle-vertical",e.Draw="draw",e.DrawerLeftFilled="drawer-left-filled",e.DrawerLeft="drawer-left",e.DrawerRightFilled="drawer-right-filled",e.DrawerRight="drawer-right",e.DriveTime="drive-time",e.DroneUav="drone-uav",e.Drone="drone",e.Duplicate="duplicate",e.Edit="edit",e.Eject="eject",e.Emoji="emoji",e.Endnote="endnote",e.Endorsed="endorsed",e.Engagement="engagement",e.Envelope="envelope",e.Equals="equals",e.Eraser="eraser",e.Error="error",e.Euro="euro",e.Excavator="excavator",e.Exchange="exchange",e.ExcludeRow="exclude-row",e.ExpandAll="expand-all",e.Explain="explain",e.Export="export",e.EyeOff="eye-off",e.EyeOn="eye-on",e.EyeOpen="eye-open",e.FastBackward="fast-backward",e.FastForward="fast-forward",e.FeedSubscribed="feed-subscribed",e.Feed="feed",e.FighterJet="fighter-jet",e.Film="film",e.FilterKeep="filter-keep",e.FilterList="filter-list",e.FilterOpen="filter-open",e.FilterRemove="filter-remove",e.FilterSortAsc="filter-sort-asc",e.FilterSortDesc="filter-sort-desc",e.Filter="filter",e.Flag="flag",e.Flame="flame",e.Flash="flash",e.FloatingPoint="floating-point",e.FloppyDisk="floppy-disk",e.FlowBranch="flow-branch",e.FlowEnd="flow-end",e.FlowLinear="flow-linear",e.FlowReviewBranch="flow-review-branch",e.FlowReview="flow-review",e.Flows="flows",e.FolderClose="folder-close",e.FolderNew="folder-new",e.FolderOpen="folder-open",e.FolderSharedOpen="folder-shared-open",e.FolderShared="folder-shared",e.Follower="follower",e.Following="following",e.Font="font",e.ForkEnd="fork-end",e.Fork="fork",e.Form="form",e.ForwardTen="forward-ten",e.FrameToFrame="frame-to-frame",e.Fuel="fuel",e.FullCircle="full-circle",e.FullStackedCh
1202art="full-stacked-chart",e.Fullscreen="fullscreen",e.FunctionMinimal="function-minimal",e.Function="function",e.GanttChart="gantt-chart",e.Generate="generate",e.Geofence="geofence",e.Geolocation="geolocation",e.Geosearch="geosearch",e.Geotime="geotime",e.GiftBox="gift-box",e.GitBranch="git-branch",e.GitCommit="git-commit",e.GitMerge="git-merge",e.GitNewBranch="git-new-branch",e.GitPull="git-pull",e.GitPush="git-push",e.GitRebase="git-rebase",e.GitRepo="git-repo",e.Glass="glass",e.GlobeNetworkAdd="globe-network-add",e.GlobeNetwork="globe-network",e.Globe="globe",e.GraphRemove="graph-remove",e.Graph="graph",e.GreaterThanOrEqualTo="greater-than-or-equal-to",e.GreaterThan="greater-than",e.GridView="grid-view",e.Grid="grid",e.GroupItem="group-item",e.GroupObjects="group-objects",e.GroupedBarChart="grouped-bar-chart",e.HandDown="hand-down",e.HandLeft="hand-left",e.HandRight="hand-right",e.HandUp="hand-up",e.Hand="hand",e.Hat="hat",e.HeaderOne="header-one",e.HeaderThree="header-three",e.HeaderTwo="header-two",e.Header="header",e.Headset="headset",e.HeartBroken="heart-broken",e.Heart="heart",e.HeatGrid="heat-grid",e.Heatmap="heatmap",e.Helicopter="helicopter",e.Help="help",e.HelperManagement="helper-management",e.Hexagon="hexagon",e.HighPriority="high-priority",e.HighVoltagePole="high-voltage-pole",e.Highlight="highlight",e.History="history",e.Home="home",e.HorizontalBarChartAsc="horizontal-bar-chart-asc",e.HorizontalBarChartDesc="horizontal-bar-chart-desc",e.HorizontalBarChart="horizontal-bar-chart",e.HorizontalDistribution="horizontal-distribution",e.HorizontalInbetween="horizontal-inbetween",e.Hurricane="hurricane",e.IdNumber="id-number",e.ImageRotateLeft="image-rotate-left",e.ImageRotateRight="image-rotate-right",e.Import="import",e.InboxFiltered="inbox-filtered",e.InboxGeo="inbox-geo",e.InboxSearch="inbox-search",e.InboxUpdate="inbox-update",e.Inbox="inbox",e.InfoSign="info-sign",e.Inheritance="inheritance",e.InheritedGroup="inherited-group",e.InnerJoin="inner-join",e.Input="input",e.Insert="insert",e.Intelligence="intelligence",e.Intersection="intersection",e.IpAddress="ip-address",e.IssueClosed="issue-closed",e.IssueNew="issue-new",e.Issue="issue",e.Italic="italic",e.JoinTable="join-table",e.KeyBackspace="key-backspace",e.KeyCommand="key-command",e.KeyControl="key-control",e.KeyDelete="key-delete",e.KeyEnter="key-enter",e.KeyEscape="key-escape",e.KeyOption="key-option",e.KeyShift="key-shift",e.KeyTab="key-tab",e.Key="key",e.KnownVehicle="known-vehicle",e.LabTest="lab-test",e.Label="label",e.LayerOutline="layer-outline",e.Layer="layer",e.Layers="layers",e.LayoutAuto="layout-auto",e.LayoutBalloon="layout-balloon",e.LayoutBottomRowThreeTiles="layout-bottom-row-three-tiles",e.LayoutBottomRowTwoTiles="layout-bottom-row-two-tiles",e.LayoutCircle="layout-circle",e.LayoutGrid="layout-grid",e.LayoutGroupBy="layout-group-by",e.LayoutHierarchy="layout-hierarchy",e.LayoutLeftColumnThreeTiles="layout-left-column-three-tiles",e.LayoutLeftColumnTwoTiles="layout-left-column-two-tiles",e.LayoutLinear="layout-linear",e.LayoutRightColumnThreeTiles="layout-right-column-three-tiles",e.LayoutRightColumnTwoTiles="layout-right-column-two-tiles",e.LayoutSkewGrid="layout-skew-grid",e.LayoutSortedClusters="layout-sorted-clusters",e.LayoutThreeColumns="layout-three-columns",e.LayoutThreeRows="layout-three-rows",e.LayoutTopRowThreeTiles="layout-top-row-three-tiles",e.LayoutTopRowTwoTiles="layout-top-row-two-tiles",e.LayoutTwoColumns="layout-two-columns",e.LayoutTwoRows="layout-two-rows",e.Layout="layout",e.Learning="learning",e.LeftJoin="left-join",e.LengthenText="lengthen-text",e.LessThanOrEqualTo="less-than-or-equal-to",e.LessThan="less-than",e.Lifesaver="lifesaver",e.Lightbulb="lightbulb",e.Lightning="lightning",e.Link="link",e.LinkedSquares="linked-squares",e.ListColumns="list-columns",e.ListDetailView="list-detail-view",e.List="list",e.Locate="locate",e.Lock="lock",e.Locomotive="locomotive",e.LogIn="log-in",e.LogOut="log-out",e.LowVoltagePole="low-voltage-pole",e.Manual="manual",e.ManuallyEnteredData="manually-entered-data",e.ManyToMany="many-to-many",e.ManyToOne="many-to-one",e.MapCreate="map-create",e.MapMarker="map-marker",e.Map="map",e.Markdown="markdown",e.Maximize="maximize",e.Media="media",e.MenuClosed="menu-closed",e.MenuOpen="menu-open",e.Menu="menu",e.MergeColumns="merge-columns",e.MergeLinks="merge-links",e.Microphone="microphone",e.Minim
1202ize="minimize",e.Minus="minus",e.MobilePhone="mobile-phone",e.MobileVideo="mobile-video",e.ModalFilled="modal-filled",e.Modal="modal",e.Model="model",e.Moon="moon",e.More="more",e.Mountain="mountain",e.Move="move",e.Mugshot="mugshot",e.MultiSelect="multi-select",e.Music="music",e.Nest="nest",e.NewComment="new-comment",e.NewDrawing="new-drawing",e.NewGridItem="new-grid-item",e.NewLayer="new-layer",e.NewLayers="new-layers",e.NewLink="new-link",e.NewObject="new-object",e.NewPerson="new-person",e.NewPrescription="new-prescription",e.NewShield="new-shield",e.NewTextBox="new-text-box",e.Ninja="ninja",e.NotEqualTo="not-equal-to",e.NotificationsAdd="notifications-add",e.NotificationsSnooze="notifications-snooze",e.NotificationsUpdated="notifications-updated",e.Notifications="notifications",e.NumberedList="numbered-list",e.Numerical="numerical",e.ObjectView="object-view",e.Office="office",e.Offline="offline",e.OilField="oil-field",e.OneColumn="one-column",e.OneToMany="one-to-many",e.OneToOne="one-to-one",e.OpenApplication="open-application",e.Outdated="outdated",e.OuterJoin="outer-join",e.Output="output",e.Package="package",e.PageBreak="page-break",e.PageLayout="page-layout",e.PanelStats="panel-stats",e.PanelTable="panel-table",e.Panel="panel",e.Paperclip="paperclip",e.Paragraph="paragraph",e.PasteVariable="paste-variable",e.PathSearch="path-search",e.Path="path",e.Pause="pause",e.People="people",e.Percentage="percentage",e.Person="person",e.PhoneCall="phone-call",e.PhoneForward="phone-forward",e.PhoneSearch="phone-search",e.Phone="phone",e.PieChart="pie-chart",e.Pill="pill",e.Pin="pin",e.Pistol="pistol",e.PivotTable="pivot-table",e.Pivot="pivot",e.Play="play",e.Playbook="playbook",e.Plus="plus",e.PolygonFilter="polygon-filter",e.Popout="popout",e.Power="power",e.PredictiveAnalysis="predictive-analysis",e.Prescription="prescription",e.Presentation="presentation",e.Print="print",e.Projects="projects",e.Properties="properties",e.Property="property",e.PublishFunction="publish-function",e.Pulse="pulse",e.Rain="rain",e.Random="random",e.RangeRing="range-ring",e.Record="record",e.RectHeight="rect-height",e.RectWidth="rect-width",e.Rectangle="rectangle",e.Redo="redo",e.RefreshOff="refresh-off",e.Refresh="refresh",e.Regex="regex",e.RegressionChart="regression-chart",e.RemoveColumnLeft="remove-column-left",e.RemoveColumnRight="remove-column-right",e.RemoveColumn="remove-column",e.RemoveRowBottom="remove-row-bottom",e.RemoveRowTop="remove-row-top",e.Remove="remove",e.Repeat="repeat",e.Reset="reset",e.Resolve="resolve",e.Rig="rig",e.RightJoin="right-join",e.Ring="ring",e.RocketSlant="rocket-slant",e.Rocket="rocket",e.RootFolder="root-folder",e.RotateCcw="rotate-ccw",e.RotateCw="rotate-cw",e.RotateDocument="rotate-document",e.RotatePage="rotate-page",e.Route="route",e.RunHistory="run-history",e.Satellite="satellite",e.Saved="saved",e.ScatterPlot="scatter-plot",e.SearchAround="search-around",e.SearchTemplate="search-template",e.SearchText="search-text",e.Search="search",e.SegmentedControl="segmented-control",e.Select="select",e.SelectionBoxAdd="selection-box-add",e.SelectionBoxEdit="selection-box-edit",e.SelectionBoxRemove="selection-box-remove",e.SelectionBox="selection-box",e.Selection="selection",e.SendBackward="send-backward",e.SendMessage="send-message",e.SendToGraph="send-to-graph",e.SendToMap="send-to-map",e.SendTo="send-to",e.Sensor="sensor",e.SeriesAdd="series-add",e.SeriesConfiguration="series-configuration",e.SeriesDerived="series-derived",e.SeriesFiltered="series-filtered",e.SeriesSearch="series-search",e.ServerInstall="server-install",e.Server="server",e.Settings="settings",e.Shapes="shapes",e.Share="share",e.SharedFilter="shared-filter",e.Shield="shield",e.Ship="ship",e.Shop="shop",e.ShoppingCart="shopping-cart",e.ShortenText="shorten-text",e.SignalSearch="signal-search",e.SimCard="sim-card",e.Slash="slash",e.SmallCross="small-cross",e.SmallInfoSign="small-info-sign",e.SmallMinus="small-minus",e.SmallPlus="small-plus",e.SmallSquare="small-square",e.SmallTick="small-tick",e.Snowflake="snowflake",e.SoccerBall="soccer-ball",e.SocialMedia="social-media",e.SortAlphabeticalDesc="sort-alphabetical-desc",e.SortAlphabetical="sort-alphabetical",e.SortAsc="sort-asc",e.SortDesc="sort-desc",e.SortNumericalDesc="sort-numerical-desc",e.SortNumerical="sort-numerical",e.Sort="sort",e.SpellCheck="spell-check",e.Spin="spin",e.SplitColumns="split-columns",e.SportsStadium="sports-stadium",e.Square="square",e.StackedCh
1202art="stacked-chart",e.StadiumGeometry="stadium-geometry",e.StarEmpty="star-empty",e.Star="star",e.StepBackward="step-backward",e.StepChart="step-chart",e.StepForward="step-forward",e.Stop="stop",e.Stopwatch="stopwatch",e.Strikethrough="strikethrough",e.Style="style",e.Subscript="subscript",e.SubtractRightJoin="subtract-right-join",e.Superscript="superscript",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.Sweep="sweep",e.Switch="switch",e.SymbolCircle="symbol-circle",e.SymbolCross="symbol-cross",e.SymbolDiamond="symbol-diamond",e.SymbolRectangle="symbol-rectangle",e.SymbolSquare="symbol-square",e.SymbolTriangleDown="symbol-triangle-down",e.SymbolTriangleUp="symbol-triangle-up",e.Syringe="syringe",e.TableSync="table-sync",e.TagAdd="tag-add",e.TagPromote="tag-promote",e.TagRefresh="tag-refresh",e.TagUndo="tag-undo",e.Tag="tag",e.Tags="tags",e.TakeAction="take-action",e.Tank="tank",e.Target="target",e.Taxi="taxi",e.Team="team",e.Temperature="temperature",e.TextHighlight="text-highlight",e.ThAdd="th-add",e.ThDerived="th-derived",e.ThDisconnect="th-disconnect",e.ThFiltered="th-filtered",e.ThListAdd="th-list-add",e.ThList="th-list",e.ThVirtualAdd="th-virtual-add",e.ThVirtual="th-virtual",e.Th="th",e.ThirdParty="third-party",e.ThumbsDown="thumbs-down",e.ThumbsUp="thumbs-up",e.TickCircle="tick-circle",e.Tick="tick",e.Time="time",e.TimelineAreaChart="timeline-area-chart",e.TimelineBarChart="timeline-bar-chart",e.TimelineEvents="timeline-events",e.TimelineLineChart="timeline-line-chart",e.Tint="tint",e.Torch="torch",e.Tractor="tractor",e.Train="train",e.Translate="translate",e.Trash="trash",e.Tree="tree",e.TrendingDown="trending-down",e.TrendingUp="trending-up",e.Trophy="trophy",e.Truck="truck",e.TwoColumns="two-columns",e.Unarchive="unarchive",e.Underline="underline",e.Undo="undo",e.UngroupObjects="ungroup-objects",e.UnknownVehicle="unknown-vehicle",e.Unlink="unlink",e.Unlock="unlock",e.Unpin="unpin",e.Unresolve="unresolve",e.Updated="updated",e.Upload="upload",e.User="user",e.VariableLayer="variable-layer",e.Variable="variable",e.Vector="vector",e.VerticalBarChartAsc="vertical-bar-chart-asc",e.VerticalBarChartDesc="vertical-bar-chart-desc",e.VerticalDistribution="vertical-distribution",e.VerticalInbetween="vertical-inbetween",e.Video="video",e.Virus="virus",e.VolumeDown="volume-down",e.VolumeOff="volume-off",e.VolumeUp="volume-up",e.Walk="walk",e.WarningSign="warning-sign",e.WaterfallChart="waterfall-chart",e.Waves="waves",e.WidgetButton="widget-button",e.WidgetFooter="widget-footer",e.WidgetHeader="widget-header",e.Widget="widget",e.Wind="wind",e.Won="won",e.WrapLines="wrap-lines",e.WrenchRedo="wrench-redo",e.WrenchSnooze="wrench-snooze",e.WrenchTime="wrench-time",e.Wrench="wrench",e.Yen="yen",e.ZoomIn="zoom-in",e.ZoomOut="zoom-out",e.ZoomToFit="zoom-to-fit"})(I||(I={}));I.AddApplication+"",I.AddChild+"",I.AddClip+"",I.AddColumnLeft+"",I.AddColumnRight+"",I.AddDerivedColumn+"",I.AddLocation+"",I.AddParent+"",I.AddRowBottom+"",I.AddRowTop+"",I.AddTile+"",I.AddToArtifact+"",I.AddToFolder+"",I.Add+"",I.AimpointsTarget+"",I.Airplane+"",I.AlignCenter+"",I.AlignJustify+"",I.AlignLeft+"",I.AlignRight+"",I.AlignmentBottom+"",I.AlignmentHorizontalCenter+"",I.AlignmentLeft+"",I.AlignmentRight+"",I.AlignmentTop+"",I.AlignmentVerticalCenter+"",I.Ammunition+"",I.Anchor+"",I.Annotation+"",I.Announcement+"",I.Antenna+"",I.AppHeader+"",I.Application+"",I.Applications+"",I.Archive+"",I.AreaOfInterest+"",I.ArrayBoolean+"",I.ArrayDate+"",I.ArrayFloatingPoint+"",I.ArrayNumeric+"",I.ArrayObject+"",I.ArrayString+"",I.ArrayTimestamp+"",I.Array+"",I.ArrowBottomLeft+"",I.ArrowBottomRight+"",I.ArrowDown+"",I.ArrowLeft+"",I.ArrowRight+"",I.ArrowTopLeft+"",I.ArrowTopRight+"",I.ArrowUp+"",I.ArrowsArc+"",I.ArrowsHorizontal+"",I.ArrowsVertical+"",I.Asterisk+"",I.At+"",I.AutomaticUpdates+"",I.Axle+"",I.Backlink+"",I.BackwardTen+"",I.Badge+"",I.BanCircle+"",I.BankAccount+"",I.Barcode+"",I.BinaryNumber+"",I.Blank+"",I.BlockPromote+"",I.BlockedPerson+"",I.Bold+"",I.Book+"",I.Bookmark+"",I.Box+"",I.BranchLocked+"",I.BranchUnlocked+"",I.Briefcase+"",I.BringData+"",I.BringForward+"",I.BritishPound+"",I.Bug+"",I.Buggy+"",I.Build+"",I.Bullseye+"",I.Calculator+"",I.Calendar+"",I.Camera+"",I.CaretDown+"",I.CaretLeft+"",I.CaretRight+"",I.CaretUp+"",I.CargoShip+"",I.CellTower+"",I.Changes+"",I.Chart+"",I.Chat+"",I.ChevronBackward+"",I.ChevronDown+"",I.ChevronForward+"",I.ChevronLeft+"",I.ChevronRight+"",I.ChevronUp+"",I.CircleArrowDown+"",I.CircleArrowLeft+"",I.CircleArrowRight+"",I.CircleArrowUp+"",I.CircleDashed+"",I.Circle+"",I.Citation+"",I.Clean+"",I.Clip+"",I.ClipboardFile+"",I.Clipboard+"",I.CloudDownload+"",I.CloudServer+"",I.CloudTick+"",I.CloudUpload+"",I.Cloud+"",I.CodeBlock+"",I.Code+"",I.Cog+"",I.CollapseAll+"",I.ColorFill+"",I.ColumnLayout+"",I.Comment+"",I.Comparison+"",I.Compass+"",I.Compressed+"",I.Confirm+"",I.ConsoleAlert+"",I.Console+"",I.Construction+"",I.Contrast+"",I.Control+"",I.CreditCard+"",I.Crop+"",I.CrossCircle+"",I.Cross+"",I.Crown+"",I.CrystalBall+"",I.CssStyle+"",I.CubeAdd+"",I.CubeCutout+"",I.CubeCutouts+"",I.CubeEdit+"",I.CubeRemove+"",I.Cube+"",I.Cubes+"",I.CurlyBraces+"",I.CurvedRangeChart+"",I.Cut+"",I.Cycle+"",I.Dashboard+"",I.DataCloud+"",I.DataConnection+"",I.DataLineage+"",I.DataSearch+"",I.DataSync+"",I.Database+"",I.DeleteClip+"",I.Delete+"",I.Delta+"",I.DeriveColumn+"",I.Descendant+"",I.Desktop+"",I.Detection+"",I.Diagnosis+"",I.DiagramTree+"",I.DirectionLeft+"",I.DirectionRight+"",I.Disable+"",I.Divide+"",I.DocumentCode+"",I.DocumentLocked+"",I.DocumentOpen+"",I.DocumentShare+"",I.Document+"",I.Dollar+"",I.Dot+"",I.DoubleCaretHorizontal+"",I.DoubleCaretVertical+"",I.DoubleChevronDown+"",I.DoubleChevronLeft+"",I.DoubleChevronRight+"",I.DoubleChevronUp+"",I.DoughnutChart+"",I.Download+"",I.DragHandleHorizontal+"",I.DragHandleVertical+"",I.Draw+"",I.DrawerLeftFilled+"",I.DrawerLeft+"",I.DrawerRightFilled+"",I.DrawerRight+"",I.DriveTime+"",I.DroneUav+"",I.Drone+"",I.Duplicate+"",I.Edit+"",I.Eject+"",I.Emoji+"",I.Endnote+"",I.Endorsed+"",I.Engagement+"",I.Envelope+"",I.Equals+"",I.Eraser+"",I.Error+"",I.Euro+"",I.Excavator+"",I.Exchange+"",I.ExcludeRow+"",I.ExpandAll+"",I.Explain+"",I.Export+"",I.EyeOff+"",I.EyeOn+"",I.EyeOpen+"",I.FastBackward+"",I.FastForward+"",I.FeedSubscribed+"",I.Feed+"",I.FighterJet+"",I.Film+"",I.FilterKeep+"",I.FilterList+"",I.FilterOpen+"",I.FilterRemove+"",I.FilterSortAsc+"",I.FilterSortDesc+"",I.Filter+"",I.Flag+"",I.Flame+"",I.Flash+"",I.FloatingPoint+"",I.FloppyDisk+"",I.FlowBranch+"",I.FlowEnd+"",I.FlowLinear+"",I.FlowReviewBranch+"",I.FlowReview+"",I.Flows+"",I.FolderClose+"",I.Folder
1202New+"",I.FolderOpen+"",I.FolderSharedOpen+"",I.FolderShared+"",I.Follower+"",I.Following+"",I.Font+"",I.ForkEnd+"",I.Fork+"",I.Form+"",I.ForwardTen+"",I.FrameToFrame+"",I.Fuel+"",I.FullCircle+"",I.FullStackedChart+"",I.Fullscreen+"",I.FunctionMinimal+"",I.Function+"",I.GanttChart+"",I.Generate+"",I.Geofence+"",I.Geolocation+"",I.Geosearch+"",I.Geotime+"",I.GiftBox+"",I.GitBranch+"",I.GitCommit+"",I.GitMerge+"",I.GitNewBranch+"",I.GitPull+"",I.GitPush+"",I.GitRebase+"",I.GitRepo+"",I.Glass+"",I.GlobeNetworkAdd+"",I.GlobeNetwork+"",I.Globe+"",I.GraphRemove+"",I.Graph+"",I.GreaterThanOrEqualTo+"",I.GreaterThan+"",I.GridView+"",I.Grid+"",I.GroupItem+"",I.GroupObjects+"",I.GroupedBarChart+"",I.HandDown+"",I.HandLeft+"",I.HandRight+"",I.HandUp+"",I.Hand+"",I.Hat+"",I.HeaderOne+"",I.HeaderThree+"",I.HeaderTwo+"",I.Header+"",I.Headset+"",I.HeartBroken+"",I.Heart+"",I.HeatGrid+"",I.Heatmap+"",I.Helicopter+"",I.Help+"",I.HelperManagement+"",I.Hexagon+"",I.HighPriority+"",I.HighVoltagePole+"",I.Highlight+"",I.History+"",I.Home+"",I.HorizontalBarChartAsc+"",I.HorizontalBarChartDesc+"",I.HorizontalBarChart+"",I.HorizontalDistribution+"",I.HorizontalInbetween+"",I.Hurricane+"",I.IdNumber+"",I.ImageRotateLeft+"",I.ImageRotateRight+"",I.Import+"",I.InboxFiltered+"",I.InboxGeo+"",I.InboxSearch+"",I.InboxUpdate+"",I.Inbox+"",I.InfoSign+"",I.Inheritance+"",I.InheritedGroup+"",I.InnerJoin+"",I.Input+"",I.Insert+"",I.Intelligence+"",I.Intersection+"",I.IpAddress+"",I.IssueClosed+"",I.IssueNew+"",I.Issue+"",I.Italic+"",I.JoinTable+"",I.KeyBackspace+"",I.KeyCommand+"",I.KeyControl+"",I.KeyDelete+"",I.KeyEnter+"",I.KeyEscape+"",I.KeyOption+"",I.KeyShift+"",I.KeyTab+"",I.Key+"",I.KnownVehicle+"",I.LabTest+"",I.Label+"",I.LayerOutline+"",I.Layer+"",I.Layers+"",I.LayoutAuto+"",I.LayoutBalloon+"",I.LayoutBottomRowThreeTiles+"",I.LayoutBottomRowTwoTiles+"",I.LayoutCircle+"",I.LayoutGrid+"",I.LayoutGroupBy+"",I.LayoutHierarchy+"",I.LayoutLeftColumnThreeTiles+"",I.LayoutLeftColumnTwoTiles+"",I.LayoutLinear+"",I.LayoutRightColumnThreeTiles+"",I.LayoutRightColumnTwoTiles+"",I.LayoutSkewGrid+"",I.LayoutSortedClusters+"",I.LayoutThreeColumns+"",I.LayoutThreeRows+"",I.LayoutTopRowThreeTiles+"",I.LayoutTopRowTwoTiles+"",I.LayoutTwoColumns+"",I.LayoutTwoRows+"",I.Layout+"",I.Learning+"",I.LeftJoin+"",I.LengthenText+"",I.LessThanOrEqualTo+"",I.LessThan+"",I.Lifesaver+"",I.Lightbulb+"",I.Lightning+"",I.Link+"",I.LinkedSquares+"",I.ListColumns+"",I.ListDetailView+"",I.List+"",I.Locate+"",I.Lock+"",I.Locomotive+"",I.LogIn+"",I.LogOut+"",I.LowVoltagePole+"",I.Manual+"",I.ManuallyEnteredData+"",I.ManyToMany+"",I.ManyToOne+"",I.MapCreate+"",I.MapMarker+"",I.Map+"",I.Markdown+"",I.Maximize+"",I.Media+"",I.MenuClosed+"",I.MenuOpen+"",I.Menu+"",I.MergeColumns+"",I.MergeLinks+"",I.Microphone+"",I.Minimize+"",I.Minus+"",I.MobilePhone+"",I.MobileVideo+"",I.ModalFilled+"",I.Modal+"",I.Model+"",I.Moon+"",I.More+"",I.Mountain+"",I.Move+"",I.Mugshot+"",I.MultiSelect+"",I.Music+"",I.Nest+"",I.NewComment+"",I.NewDrawing+"",I.NewGridItem+"",I.NewLayer+"",I.NewLayers+"",I.NewLink+"",I.NewObject+"",I.NewPerson+"",I.NewPrescription+"",I.NewShield+"",I.NewTextBox+"",I.Ninja+"",I.NotEqualTo+"",I.NotificationsAdd+"",I.NotificationsSnooze+"",I.NotificationsUpdated+"",I.Notifications+"",I.NumberedList+"",I.Numerical+"",I.ObjectView+"",I.Office+"",I.Offline+"",I.OilField+"",I.OneColumn+"",I.OneToMany+"",I.OneToOne+"",I.OpenApplication+"",I.Outdated+"",I.OuterJoin+"",I.Output+"",I.Package+"",I.PageBreak+"",I.PageLayout+"",I.PanelStats+"",I.PanelTable+"",I.Panel+"",I.Paperclip+"",I.Paragraph+"",I.PasteVariable+"",I.PathSearch+"",I.Path+"",I.Pause+"",I.People+"",I.Percentage+"",I.Person+"",I.PhoneCall+"",I.PhoneForward+"",I.PhoneSearch+"",I.Phone+"",I.PieChart+"",I.Pill+"",I.Pin+"",I.Pistol+"",I.PivotTable+"",I.Pivot+"",I.Play+"",I.Playbook+"",I.Plus+"",I.PolygonFilter+"",I.Popout+"",I.Power+"",I.PredictiveAnalysis+"",I.Prescription+"",I.Presentation+"",I.Print+"",I.Projects+"",I.Properties+"",I.Property+"",I.PublishFunction+"",I.Pulse+"",I.Rain+"",I.Random+"",I.RangeRing+"",I.Record+"",I.RectHeight+"",I.RectWidth+"",I.Rectangle+"",I.Redo+"",I.RefreshOff+"",I.Refresh+"",I.Regex+"",I.RegressionChart+"",I.RemoveColumnLeft+"",I.RemoveColumnRight+"",I.RemoveColumn+"",I.RemoveRowBottom+"",I.RemoveRowTop+"",I.Remove+"",I.Repeat+"",I.Reset+"",I.Resolve+"",I.Rig+"",I.RightJoin+"",I.Ring+"",I.RocketSlant+"",I.Rocket+"",I.RootFolder+"",I.RotateCcw+"",I.RotateCw+"",I.RotateDocument+"",I.RotatePage+"",I.Route+"",I.RunHistory+"",I.Satellite+"",I.Saved+"",I.ScatterPlot+"",I.SearchAround+"",I.SearchTemplate+"",I.SearchText+"",I.Search+"",I.SegmentedControl+"",I.Select+"",I.SelectionBoxAdd+"",I.SelectionBoxEdit+"",I.SelectionBoxRemove+"",I.SelectionBox+"",I.Selection+"",I.SendBackward+"",I.SendMessage+"",I.SendToGraph+"",I.SendToMap+"",I.SendTo+"",I.Sensor+"",I.SeriesAdd+"",I.SeriesConfiguration+"",I.SeriesDerived+"",I.SeriesFiltered+"",I.SeriesSearch+"",I.ServerInstall+"",I.Server+"",I.Settings+"",I.Shapes+"",I.Share+"",I.SharedFilter+"",I.Shield+"",I.Ship+"",I.Shop+"",I.ShoppingCart+"",I.ShortenText+"",I.SignalSearch+"",I.SimCard+"",I.Slash+"",I.SmallCross+"",I.SmallInfoSign+"",I.SmallMinus+"",I.SmallPlus+"",I.SmallSquare+"",I.SmallTick+"",I.Snowflake+"",I.SoccerBall+"",I.SocialMedia+"",I.SortAlphabeticalDesc+"",I.SortAlphabetical+"",I.SortAsc+"",I.SortDesc+"",I.SortNumericalDesc+"",I.SortNumerical+"",I.Sort+"",I.SpellCheck+"",I.Spin+"",I.SplitColumns+"",I.SportsStadium+"",I.Square+"",I.StackedCh
1202art+"",I.StadiumGeometry+"",I.StarEmpty+"",I.Star+"",I.StepBackward+"",I.StepChart+"",I.StepForward+"",I.Stop+"",I.Stopwatch+"",I.Strikethrough+"",I.Style+"",I.Subscript+"",I.SubtractRightJoin+"",I.Superscript+"",I.SwapHorizontal+"",I.SwapVertical+"",I.Sweep+"",I.Switch+"",I.SymbolCircle+"",I.SymbolCross+"",I.SymbolDiamond+"",I.SymbolRectangle+"",I.SymbolSquare+"",I.SymbolTriangleDown+"",I.SymbolTriangleUp+"",I.Syringe+"",I.TableSync+"",I.TagAdd+"",I.TagPromote+"",I.TagRefresh+"",I.TagUndo+"",I.Tag+"",I.Tags+"",I.TakeAction+"",I.Tank+"",I.Target+"",I.Taxi+"",I.Team+"",I.Temperature+"",I.TextHighlight+"",I.ThAdd+"",I.ThDerived+"",I.ThDisconnect+"",I.ThFiltered+"",I.ThListAdd+"",I.ThList+"",I.ThVirtualAdd+"",I.ThVirtual+"",I.Th+"",I.ThirdParty+"",I.ThumbsDown+"",I.ThumbsUp+"",I.TickCircle+"",I.Tick+"",I.Time+"",I.TimelineAreaChart+"",I.TimelineBarChart+"",I.TimelineEvents+"",I.TimelineLineChart+"",I.Tint+"",I.Torch+"",I.Tractor+"",I.Train+"",I.Translate+"",I.Trash+"",I.Tree+"",I.TrendingDown+"",I.TrendingUp+"",I.Trophy+"",I.Truck+"",I.TwoColumns+"",I.Unarchive+"",I.Underline+"",I.Undo+"",I.UngroupObjects+"",I.UnknownVehicle+"",I.Unlink+"",I.Unlock+"",I.Unpin+"",I.Unresolve+"",I.Updated+"",I.Upload+"",I.User+"",I.VariableLayer+"",I.Variable+"",I.Vector+"",I.VerticalBarChartAsc+"",I.VerticalBarChartDesc+"",I.VerticalDistribution+"",I.VerticalInbetween+"",I.Video+"",I.Virus+"",I.VolumeDown+"",I.VolumeOff+"",I.VolumeUp+"",I.Walk+"",I.WarningSign+"",I.WaterfallChart+"",I.Waves+"",I.WidgetButton+"",I.WidgetFooter+"",I.WidgetHeader+"",I.Widget+"",I.Wind+"",I.Won+"",I.WrapLines+"",I.WrenchRedo+"",I.WrenchSnooze+"",I.WrenchTime+"",I.Wrench+"",I.Yen+"",I.ZoomIn+"",I.ZoomOut+"",I.ZoomToFit+"";const GW={},qW={};for(const e of Object.values(I))GW[zhe(e)]=e,qW[Vhe(e).toUpperCase()]=e;const YW={...GW,...qW},Uhe=new Set(Object.values(YW));function Bhe(e){return typeof NODE_ENV<"u"&&NODE_ENV===e}async function jhe(e,t){const n=Bhe("development")&&typeof performance<"u";let r;if(n&&(r=performance.now(),`${e}`),await t(),n){const a=Math.round(performance.now()-r);`${e}${a}`}}async function Whe(e){const{loader:t=bh.defaultLoader}=e;return typeof t=="function"?t:t==="all"?(await yn(()=>function(){return(r=>import(r))("./allPathsLoader.1defc6c6.js")}(),[])).allPathsLoader:(await yn(()=>function(){return(r=>import(r))("./splitPathsBySizeLoader.52e3b910.js")}(),[])).splitPathsBySizeLoader}class R0{constructor(){G(this,"defaultLoader","split-by-size");G(this,"loadedIconPaths16",new Map);G(this,"loadedIconPaths20",new Map)}static setLoaderOptions(t){t.loader!==void 0&&(bh.defaultLoader=t.loader)}static async load(t,n,r){Array.isArray(t)||(t=[t]),await Promise.all(t.map(a=>this.loadImpl(a,n,r)))}static async loadAll(t){const n=Object.values(YW);jhe("[Blueprint] loading all icons",async()=>{await Promise.all([this.load(n,Nt.STANDARD,t),this.load(n,Nt.LARGE,t)])})}static getPaths(t,n){return this.isValidIconName(t)?(n<Nt.LARGE?bh.loadedIconPaths16:bh.loadedIconPaths20).get(t):void 0}static async loadImpl(t,n,r={}){if(!this.isValidIconName(t)){console.error(`[Blueprint] Unknown icon '${t}'`);return}const a=n<Nt.LARGE?bh.loadedIconPaths16:bh.loadedIconPaths20;if(a.has(t))return;const s=await Whe(r);try{const i=n<Nt.LARGE?Nt.STANDARD:Nt.LARGE,l=await s(t,i);a.set(t,l)}catch(i){console.error(`[Blueprint] Unable to load ${n}px icon '${t}'`,i)}}static isValidIconName(t){return Uhe.has(t)}}const bh=new R0,Ghe="bp6",A3=`${Ghe}-icon`,I3=new Map;function qhe(e){const t=I3.get(e)??0;return I3.set(e,t+1),`${e}-${t}`}const gr=p.forwardRef((e,t)=>{const{children:n,className:r,color:a,htmlTitle:s,iconName:i,size:l=Nt.STANDARD,svgProps:c,tagName:u="span",title:d,...f}=e,h=l>=Nt.LARGE?Nt.LARGE:Nt.STANDARD,g=`0 0 ${h} ${h}`,v=qhe("iconTitle"),y={fill:a,height:l,role:"img",viewBox:g,width:l,...c};return u===null?F.jsxs("svg",{"aria-labelledby":d?v:void 0,"data-icon":i,ref:t,...y,...f,className:At(r,c==null?void 0:c.className),children:[d&&F.jsx("title",{id:v,children:d}),n]}):p.createElement(u,{"aria-hidden":d?void 0:!0,...f,className:At(A3,`${A3}-${i}`,r),ref:t,title:s},F.jsxs("svg",{"data-icon":i,...y,className:c==null?void 0:c.className,children:[d&&F.jsx("title",{children:d}),n]}))});gr.displayName="Blueprint6.SVGIconContainer";
1202const Yhe=["M.01 7V5H16v7c0 .55-.45 1-1 1H9.005v-2.99C8.974 8.332 7.644 7 5.996 7zM15 2H7.416L5.706.29a1 1 0 0 0-.71-.29H1C.45 0 0 .45 0 1v3h15.99V3c.01-.55-.44-1-.99-1M5.997 9H2c-.55 0-1 .45-1 1s.45 1 1 1h1.589L.3 14.29a1.003 1.003 0 0 0 1.42 1.42l3.287-3.29v1.59c0 .55.45 1 1 1 .549 0 .999-.45.999-1v-4A1.02 1.02 0 0 0 5.996 9"],Khe=["M.01 10V6H20v10c0 .55-.45 1-1 1H9.995v-3.99C9.965 11.332 8.635 10 6.987 10zM19 3c.55 0 1 .45.99 1v1H0V2c0-.55.45-1 1-1h5.997c.28 0 .53.11.71.29L9.414 3zM6.987 12c.55 0 .999.45 1.009 1.01v5c0 .55-.45 1-1 1s-.999-.45-.999-1v-2.59l-4.288 4.29a1.003 1.003 0 0 1-1.42-1.42L4.579 14h-2.59c-.55 0-1-.45-1-1s.45-1 1-1z"],KW=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Khe:Yhe;return F.jsx(gr,{iconName:"add-to-folder",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});KW.displayName="Blueprint6.Icon.AddToFolderIcon";const Zhe=KW,Xhe=["M3.5 7h7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-7c-.28 0-.5.22-.5.5s.22.5.5.5M15 1H1c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1m-1 12H2V5h12zM3.5 9h4c.28 0 .5-.22.5-.5S7.78 8 7.5 8h-4c-.28 0-.5.22-.5.5s.22.5.5.5m0 2h5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-5c-.28 0-.5.22-.5.5s.22.5.5.5"],Qhe=["M3.5 9h9c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-9c-.28 0-.5.22-.5.5s.22.5.5.5m0 2h5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-5c-.28 0-.5.22-.5.5s.22.5.5.5M19 1H1c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1m-1 16H2V6h16zM3.5 13h7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-7c-.28 0-.5.22-.5.5s.22.5.5.5"],ZW=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Qhe:Xhe;return F.jsx(gr,{iconName:"application",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});ZW.displayName="Blueprint6.Icon.ApplicationIcon";const XW=ZW,Jhe=["M14 10a1 1 0 1 1 0 2h-.585l2.292 2.293a1 1 0 0 1-1.32 1.497l-.094-.083L12 13.415V14a1 1 0 1 1-2 0l.003-3.075.012-.1.012-.059.033-.108.034-.081.052-.098.067-.096.08-.09a1 1 0 0 1 .112-.097l.11-.071.143-.065.076-.024.091-.02.116-.014zM6.036 6.136l-3.45 3.45-.117.127a2 2 0 0 0 2.818 2.818l.127-.117 3.45-3.449a4 4 0 0 1-.885 3.704l-.15.16-1 1A4 4 0 0 1 1.02 8.33l.15-.16 1-1a4 4 0 0 1 3.865-1.035m4.671-1.843a1 1 0 0 1 .083 1.32l-.083.094-5 5a1 1 0 0 1-1.497-1.32l.083-.094 5-5a1 1 0 0 1 1.414 0m3.121-3.121a4 4 0 0 1 .151 5.497l-.15.16-1 1a4 4 0 0 1-3.864 1.036l3.45-3.45.116-.128a2 2 0 0 0-2.818-2.818l-.127.117-3.45 3.45A4 4 0 0 1 7.02 2.33l.15-.16 1-1a4 4 0 0 1 5.657 0"],epe=["m18.387 19.79-.094-.083L14 15.415V18a1 1 0 0 1-2 0l.003-5.075.017-.126.03-.111.044-.111.052-.098.067-.096.08-.09a1 1 0 0 1 .112-.097l.11-.071.114-.054.105-.035.15-.03L13 12h5a1 1 0 1 1 0 2h-2.585l4.292 4.293a1 1 0 0 1-1.32 1.497M7.036 9.136l-4.45 4.45-.117.127a2 2 0 0 0 2.818 2.818l.127-.117 4.45-4.449a4 4 0 0 1-.885 3.704l-.15.16-2 2A4 4 0 0 1 1.02 12.33l.15-.16 2-2a4 4 0 0 1 3.865-1.035m6.671-3.843a1 1 0 0 1 .083 1.32l-.083.094-7 7a1 1 0 0 1-1.497-1.32l.083-.094 7-7a1 1 0 0 1 1.414 0m4.121-4.121a4 4 0 0 1 .151 5.497l-.15.16-2 2a4 4 0 0 1-3.864 1.036l4.45-4.45.116-.128a2 2 0 0 0-2.818-2.818l-.127.117-4.45 4.45a4 4 0 0 1 .885-3.705l.15-.16 2-2a4 4 0 0 1 5.657 0"],QW=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?epe:Jhe;return F.jsx(gr,{iconName:"backlink",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});QW.displayName="Blueprint6.Icon.BacklinkIcon";const tpe=QW,npe=["M12 6.5c0-.28-.22-.5-.5-.5h-7a.495.495 0 0 0-.37.83l3.5 4c.09.1.22.17.37.17s.28-.07.37-.17l3.5-4c.08-.09.13-.2.13-.33"],rpe=["M16 7c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1 0 .24.1.46.24.63l-.01.01 5 6 .01-.01c.19.22.45.37.76.37s.57-.15.76-.37l.01.01 5-6-.01-.01c.14-.17.24-.39.24-.63"],JW=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?rpe:npe;return F.jsx(gr,{iconName:"caret-down",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});JW.displayName="Blueprint6.Icon.CaretDownIcon";const ape=["M11 8c0-.15-.07-.28-.17-.37l-4-3.5A.495.495 0 0 0 6 4.5v7a.495.495 0 0 0 .83.37l4-3.5c.1-.09.17-.22.17-.37"],spe=["M14 10c0-.31-.15-.57-.37-.76l.01-.01-6-5-.01.01C7.46 4.1 7.24 4 7 4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1 .24 0 .46-.1.63-.24l.01.01 6-5-.01-.01c.22-.19.37-.45.37-.76"],eG=p.forwardRef((e,t)=>
1202{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?spe:ape;return F.jsx(gr,{iconName:"caret-right",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});eG.displayName="Blueprint6.Icon.CaretRightIcon";const ipe=["m12 8-1.2 2.796-2.8 1.2 2.8 1.197L12 16l1.2-2.807L16 12l-2.8-1.204zM5 0 3.5 3.5 0 4.995 3.5 6.5 5 10l1.5-3.5L10 5 6.5 3.5z"],ope=["M7 0 5 5 0 6.998 5 9l2 5 2-5 5-1.995L9 5zm8 10-1.5 3.496-3.5 1.499 3.5 1.498L15 20l1.5-3.507L20 15l-3.5-1.504z"],tG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?ope:ipe;return F.jsx(gr,{iconName:"clean",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});tG.displayName="Blueprint6.Icon.CleanIcon";const nG=tG,lpe=["M15.19 6.39h-1.85c-.11-.37-.27-.71-.45-1.04l1.36-1.36c.31-.31.31-.82 0-1.13l-1.13-1.13a.803.803 0 0 0-1.13 0l-1.36 1.36c-.33-.17-.67-.33-1.04-.44V.79c0-.44-.36-.8-.8-.8h-1.6c-.44 0-.8.36-.8.8v1.86c-.39.12-.75.28-1.1.47l-1.3-1.3c-.3-.3-.79-.3-1.09 0L1.82 2.91c-.3.3-.3.79 0 1.09l1.3 1.3c-.2.34-.36.7-.48 1.09H.79c-.44 0-.8.36-.8.8v1.6c0 .44.36.8.8.8h1.85c.11.37.27.71.45 1.04l-1.36 1.36c-.31.31-.31.82 0 1.13l1.13 1.13c.31.31.82.31 1.13 0l1.36-1.36c.33.18.67.33 1.04.44v1.86c0 .44.36.8.8.8h1.6c.44 0 .8-.36.8-.8v-1.86c.39-.12.75-.28 1.1-.47l1.3 1.3c.3.3.79.3 1.09 0l1.09-1.09c.3-.3.3-.79 0-1.09l-1.3-1.3c.19-.35.36-.71.48-1.1h1.85c.44 0 .8-.36.8-.8v-1.6a.816.816 0 0 0-.81-.79m-7.2 4.6c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"],cpe=["M19 8h-2.31c-.14-.46-.33-.89-.56-1.3l1.7-1.7a.996.996 0 0 0 0-1.41l-1.41-1.41a.996.996 0 0 0-1.41 0l-1.7 1.7c-.41-.22-.84-.41-1.3-.55V1c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v2.33c-.48.14-.94.34-1.37.58L5 2.28a.97.97 0 0 0-1.36 0L2.28 3.64c-.37.38-.37.99 0 1.36L3.9 6.62c-.24.44-.44.89-.59 1.38H1c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1h2.31c.14.46.33.89.56 1.3L2.17 15a.996.996 0 0 0 0 1.41l1.41 1.41c.39.39 1.02.39 1.41 0l1.7-1.7c.41.22.84.41 1.3.55V19c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.33c.48-.14.94-.35 1.37-.59L15 17.72c.37.37.98.37 1.36 0l1.36-1.36c.37-.37.37-.98 0-1.36l-1.62-1.62c.24-.43.45-.89.6-1.38H19c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1m-9 6c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4"],rG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?cpe:lpe;return F.jsx(gr,{iconName:"cog",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});rG.displayName="Blueprint6.Icon.CogIcon";const YP=rG,upe=["M14.99 2.95h-14c-.55 0-1 .45-1 1v1h16v-1c0-.55-.45-1-1-1m-15 10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-6h-16zm5.5-2h5c.28 0 .5.22.5.5s-.22.5-.5.5h-5c-.28 0-.5-.22-.5-.5s.23-.5.5-.5m-3 0h1c.28 0 .5.22.5.5s-.22.5-.5.5h-1c-.28 0-.5-.22-.5-.5s.23-.5.5-.5"],dpe=["M19 3H1c-.55 0-1 .45-1 1v2h20V4c0-.55-.45-1-1-1M0 16c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V8H0zm6.5-2h7c.28 0 .5.22.5.5s-.22.5-.5.5h-7c-.28 0-.5-.22-.5-.5s.22-.5.5-.5m-4 0h2c.28 0 .5.22.5.5s-.22.5-.5.5h-2c-.28 0-.5-.22-.5-.5s.22-.5.5-.5"],aG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?dpe:upe;return F.jsx(gr,{iconName:"credit-card",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});aG.displayName="Blueprint6.Icon.CreditCardIcon";const fpe=aG,mpe=["m9.41 8 3.29-3.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-3.29-3.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 3.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71z"],hpe=["m11.41 10 4.29-4.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L10 8.59l-4.29-4.3a1.003 1.003 0 0 0-1.42 1.42L8.59 10 4.3 14.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71l4.29-4.3 4.29 4.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71z"],sG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?hpe:mpe;return F.jsx(gr,{iconName:"cross",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});sG.displayName="Blueprint6.Icon.CrossIcon";const wm=sG,ppe=["M15 0H1C.45 0 0 .45 0 1v10c0 .55.45 1 1 1h4.75l-.5 2H4c-.55 0-1 .45-1 1s.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1h-1.25l-.5-2H15c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1m-1 10H2V2h12z"],gpe=["M19 0H1C.45 0 0 .45 0 1v13c0 .55.45 1 1 1h5.67l-.5 3H5c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1h-1.17l-.5-3H19c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1m-1 13H2V2h16z"],iG=p.forwardRef((e,t)=>
1202{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?gpe:ppe;return F.jsx(gr,{iconName:"desktop",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});iG.displayName="Blueprint6.Icon.DesktopIcon";const vpe=iG,ype=["M5 7h6a1.003 1.003 0 0 0 .71-1.71l-3-3C8.53 2.11 8.28 2 8 2s-.53.11-.71.29l-3 3A1.003 1.003 0 0 0 5 7m6 2H5a1.003 1.003 0 0 0-.71 1.71l3 3c.18.18.43.29.71.29s.53-.11.71-.29l3-3A1.003 1.003 0 0 0 11 9"],bpe=["M5 9h10c.55 0 1-.45 1-1 0-.24-.1-.46-.24-.63l.01-.01-5-6-.01.01C10.57 1.15 10.31 1 10 1s-.57.15-.76.37l-.01-.01-5 6 .01.01C4.1 7.54 4 7.76 4 8c0 .55.45 1 1 1m10 2H5c-.55 0-1 .45-1 1 0 .24.1.46.24.63l-.01.01 5 6 .01-.01c.19.22.45.37.76.37s.57-.15.76-.37l.01.01 5-6-.01-.01c.14-.17.24-.39.24-.63 0-.55-.45-1-1-1"],oG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?bpe:ype;return F.jsx(gr,{iconName:"double-caret-vertical",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});oG.displayName="Blueprint6.Icon.DoubleCaretVerticalIcon";const wpe=["M6 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m4-6c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m4 8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1m0 8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1"],Epe=["M7.5 6C6.67 6 6 6.67 6 7.5S6.67 9 7.5 9 9 8.33 9 7.5 8.33 6 7.5 6m0 5c-.83 0-1.5.67-1.5 1.5S6.67 14 7.5 14 9 13.33 9 12.5 8.33 11 7.5 11m0 5c-.83 0-1.5.67-1.5 1.5S6.67 19 7.5 19 9 18.33 9 17.5 8.33 16 7.5 16m5-12c.83 0 1.5-.67 1.5-1.5S13.33 1 12.5 1 11 1.67 11 2.5 11.67 4 12.5 4m-5-3C6.67 1 6 1.67 6 2.5S6.67 4 7.5 4 9 3.33 9 2.5 8.33 1 7.5 1m5 10c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0 5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-10c-.83 0-1.5.67-1.5 1.5S11.67 9 12.5 9 14 8.33 14 7.5 13.33 6 12.5 6"],lG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Epe:wpe;return F.jsx(gr,{iconName:"drag-handle-vertical",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});lG.displayName="Blueprint6.Icon.DragHandleVerticalIcon";const xpe=["M15 0H5c-.55 0-1 .45-1 1v2h2V2h8v7h-1v2h2c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1m-4 4H1c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1m-1 10H2V6h8z"],_pe=["M15 4H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1m-1 14H2V6h12zm5-18H5c-.55 0-1 .45-1 1v2h2V2h12v12h-1v2h2c.55 0 1-.45 1-1V1c0-.55-.45-1-1-1"],cG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?_pe:xpe;return F.jsx(gr,{iconName:"duplicate",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});cG.displayName="Blueprint6.Icon.DuplicateIcon";const O3=cG,kpe=["m3.25 10.26 2.47 2.47 6.69-6.69-2.46-2.48zM.99 14.99l3.86-1.39-2.46-2.44zm12.25-14c-.48 0-.92.2-1.24.51l-1.44 1.44 2.47 2.47 1.44-1.44c.32-.32.51-.75.51-1.24.01-.95-.77-1.74-1.74-1.74"],Spe=["m4.59 12.59 2.83 2.83 7.65-7.65-2.83-2.83zM2 18l4.41-1.59-2.81-2.79zM16 2c-.55 0-1.05.22-1.41.59l-1.65 1.65 2.83 2.83 1.65-1.65A2.006 2.006 0 0 0 16 2"],uG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Spe:kpe;return F.jsx(gr,{iconName:"edit",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});uG.displayName="Blueprint6.Icon.EditIcon";const dG=uG,Cpe=["m15.86 7.5-.81-1.42V4.5c0-.36-.19-.68-.49-.87l-1.37-.8-.81-1.41c-.19-.31-.51-.49-.86-.49H9.89L8.5.14a.95.95 0 0 0-1 0l-1.39.8H4.52a1 1 0 0 0-.86.49l-.8 1.37-1.44.83c-.3.19-.49.51-.49.87v1.65l-.8 1.37c-.08.15-.13.32-.13.49s.05.34.14.49l.8 1.37v1.65c0 .36.19.68.49.87l1.42.81.8 1.37c.19.31.51.49.86.49H6.1l1.39.8c.15.09.32.14.48.14s.34-.05.49-.14l1.39-.8h1.63a1 1 0 0 0 .86-.49l.81-1.41 1.37-.8c.3-.19.49-.51.49-.87V9.93l.81-1.42a.89.89 0 0 0 .04-1.01m-4.12-.82-4.01 4.01c-.18.18-.43.29-.71.29s-.53-.11-.71-.29l-2-2c-.18-.19-.3-.44-.3-.71a1.003 1.003 0 0 1 1.71-.71l1.3 1.3 3.3-3.3a1.003 1.003 0 0 1 1.71.71.95.95 0 0 1-.29.7"],Npe=["M19.83 9.38 18.81 7.6V5.62c0-.45-.23-.85-.61-1.08l-1.71-1-1.02-1.76a1.25 1.25 0 0 0-1.08-.61h-2.03l-1.74-1c-.38-.23-.87-.23-1.25 0l-1.74 1H5.65c-.44 0-.85.23-1.08.61L3.58 3.5l-1.8 1.04c-.38.24-.62.64-.62 1.08v2.06L.17 9.4c-.11.19-.17.4-.17.61s.06.42.17.61l.99 1.72v2.06c0 .45.23.85.61 1.08l1.78 1.02.99 1.72c.23.38.63.61 1.08.61h1.99l1.74 1c.19.11.41.17.62.17s.42-.06.61-.17l1.74-1h2.03c.44 0 .85-.23 1.08-.61l1.02-1.76 1.71-1c.38-.23.61-.64.61-1.08v-1.97l1.02-1.78c.27-.38.27-.85.04-1.25m-5.08-.71-5.01 5.01c-.18.18-.43.29-.71.29s-.53-.11-.71-.29l-3.01-3.01a1.003 1.003 0 0 1 1.42-1.42l2.3 2.3 4.31-4.3a1.003 1.003 0 0 1 1.71.71c0 .28-.12.53-.3.71"],fG=p.forwardRef((e,t)=>
1202{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Npe:Cpe;return F.jsx(gr,{iconName:"endorsed",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});fG.displayName="Blueprint6.Icon.EndorsedIcon";const Rpe=fG,Tpe=["M7.99-.01c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8m1 13h-2v-2h2zm0-3h-2v-7h2z"],Ape=["M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0m1 16H9v-2h2zm0-3H9V4h2z"],mG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Ape:Tpe;return F.jsx(gr,{iconName:"error",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});mG.displayName="Blueprint6.Icon.ErrorIcon";const Ipe=["M13.5 6a2.5 2.5 0 0 0-2.45 2h-1.3L5.74 4l-.75.75L8.25 8h-3.3a2.5 2.5 0 1 0 0 1h3.3l-3.26 3.25.75.75 4.01-4h1.3a2.5 2.5 0 1 0 2.45-3"],Ope=["M17.5 7.93a2.5 2.5 0 0 0-2.45 2h-2.3l-4.01-4-.75.75 3.26 3.25h-6.3a2.5 2.5 0 1 0 0 1h6.3l-3.26 3.25.75.75 4.01-4h2.3a2.5 2.5 0 1 0 2.45-3"],hG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Ope:Ipe;return F.jsx(gr,{iconName:"flows",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});hG.displayName="Blueprint6.Icon.FlowsIcon";const Mpe=hG,Ppe=["M-.01 14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1V7h-16zm15-10H7.41L5.7 2.3a.97.97 0 0 0-.71-.3h-4c-.55 0-1 .45-1 1v3h16V5c0-.55-.45-1-1-1"],Dpe=["M0 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V7H0zM19 4H9.41l-1.7-1.71A1 1 0 0 0 7 2H1c-.55 0-1 .45-1 1v3h20V5c0-.55-.45-1-1-1"],pG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Dpe:Ppe;return F.jsx(gr,{iconName:"folder-close",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});pG.displayName="Blueprint6.Icon.FolderCloseIcon";const Lpe=pG,$pe=["M10.165 7a3 3 0 0 0 2.827 2 3 3 0 0 0 2.827-2H16v7c0 .55-.45 1-1 1H1.01c-.55 0-1-.45-1-1V7zM8.76 6H0V3c0-.55.45-1 1-1h1.998c.28 0 .53.11.71.29L5.417 4h2.578c0 .768.29 1.469.765 2m6.23-3c.55 0 1 .45 1 1s-.45 1-1 1h-.999v1c0 .55-.45 1-1 1-.549 0-.998-.45-.998-1V5h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V2c0-.55.45-1 .999-1 .55 0 1 .45 1 1v1z"],Fpe=["M12.994 7c0 1.655 1.344 3 2.998 3a3 3 0 0 0 2.999-3H20v10c0 .55-.45 1-1 1H1.01c-.55 0-1-.45-1-1V7zM10.76 6H0V3c0-.55.45-1 1-1h3.998c.28 0 .53.11.71.29L7.415 4h2.579c0 .768.29 1.469.765 2m8.23-3c.55 0 1 .45 1 1s-.45 1-1 1h-1.998v2c0 .55-.45 1-1 1s-1-.45-1-1V5h-1.998c-.55 0-1-.45-1-1s.45-1 1-1h1.999V1c0-.55.45-1 .999-1 .55 0 1 .45 1 1v2z"],gG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Fpe:$pe;return F.jsx(gr,{iconName:"folder-new",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});gG.displayName="Blueprint6.Icon.FolderNewIcon";const M3=gG,zpe=["M2.06 6.69c.14-.4.5-.69.94-.69h11V5c0-.55-.45-1-1-1H6.41l-1.7-1.71A1 1 0 0 0 4 2H1c-.55 0-1 .45-1 1v9.84l2.05-6.15zM16 8c0-.55-.45-1-1-1H4a.99.99 0 0 0-.94.69l-2 6c-.04.09-.06.2-.06.31 0 .55.45 1 1 1h11c.44 0 .81-.29.94-.69l2-6c.04-.09.06-.2.06-.31"],Hpe=["M20 9c0-.55-.45-1-1-1H5c-.43 0-.79.27-.93.65h-.01l-3 8h.01c-.04.11-.07.23-.07.35 0 .55.45 1 1 1h14c.43 0 .79-.27.93-.65h.01l3-8h-.01c.04-.11.07-.23.07-.35M3.07 7.63C3.22 7.26 3.58 7 4 7h14V5c0-.55-.45-1-1-1H8.41l-1.7-1.71A1 1 0 0 0 6 2H1c-.55 0-1 .45-1 1v12.31z"],vG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Hpe:zpe;return F.jsx(gr,{iconName:"folder-open",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});vG.displayName="Blueprint6.Icon.FolderOpenIcon";const Vpe=vG,Upe=["M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8m5.17 5h-2.44c-.21-1.11-.51-2.03-.91-2.69 1.43.46 2.61 1.43 3.35 2.69M10 8c0 .73-.05 1.39-.12 2H6.12C6.05 9.39 6 8.73 6 8s.05-1.39.12-2h3.76c.07.61.12 1.27.12 2M8 2c.67 0 1.36 1.1 1.73 3H6.27C6.64 3.1 7.33 2 8 2m-1.82.31c-.4.66-.71 1.58-.91 2.69H2.83a6.03 6.03 0 0 1 3.35-2.69M2 8c0-.7.13-1.37.35-2h2.76C5.04 6.62 5 7.28 5 8s.04 1.38.11 2H2.35C2.13 9.37 2 8.7 2 8m.83 3h2.44c.21 1.11.51 2.03.91 2.69A6.03 6.03 0 0 1 2.83 11M8 14c-.67 0-1.36-1.1-1.73-3h3.46c-.37 1.9-1.06 3-1.73 3m1.82-.31c.4-.66.7-1.58.91-2.69h2.44a6.03 6.03 0 0 1-3.35 2.69M13.65 10h-2.76c.07-.62.11-1.28.11-2s-.04-1.38-.11-2h2.76c.22.63.35 1.3.35 2s-.13 1.37-.35 2"],Bpe=["M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0m7.39 7h-3.63c-.31-1.99-.92-3.66-1.72-4.73 2.45.65 4.41 2.42 5.35 4.73M13 10c0 .69-.04 1.36-.11 2H7.11a18.4 18.4 0 0 1 0-4h5.77c.08.64.12 1.31.12 2m-3-8c1.07 0 2.25 2.05 2.75 5h-5.5c.5-2.95 1.68-5 2.75-5m-2.04.27C7.16 3.34 6.55 5.01 6.24 7H2.61c.94-2.31 2.9-4.08 5.35-4.73M2 10c0-.69.11-1.36.28-2h3.83a18.4 18.4 0 0 0 0 4H2.28c-.17-.64-.28-1.31-.28-2m.61 3h3.63c.31 1.99.92 3.66 1.72 4.73A8 8 0 0 1 2.61 13M10 18c-1.07 0-2.25-2.05-2.75-5h5.5c-.5 2.95-1.68 5-2.75 5m2.04-.27c.79-1.07 1.4-2.74 1.72-4.73h3.63a8 8 0 0 1-5.35 4.73M13.89 12a18.4 18.4 0 0 0 0-4h3.83c.17.64.28 1.31.28 2s-.11 1.36-.28 2z"],yG=p.forwardRef((e,t)=>
1202{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Bpe:Upe;return F.jsx(gr,{iconName:"globe-network",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});yG.displayName="Blueprint6.Icon.GlobeNetworkIcon";const bG=yG,jpe=["M14 3c-1.06 0-1.92.83-1.99 1.88l-1.93.97A2.95 2.95 0 0 0 8 5c-.56 0-1.08.16-1.52.43L3.97 3.34C3.98 3.23 4 3.12 4 3c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2c.24 0 .47-.05.68-.13l2.51 2.09C5.08 7.29 5 7.63 5 8c0 .96.46 1.81 1.16 2.35l-.56 1.69c-.91.19-1.6.99-1.6 1.96 0 1.1.9 2 2 2s2-.9 2-2c0-.51-.2-.97-.51-1.32l.56-1.69A2.99 2.99 0 0 0 11 8c0-.12-.02-.24-.04-.36l1.94-.97c.32.21.69.33 1.1.33 1.1 0 2-.9 2-2s-.9-2-2-2"],Wpe=["M17.5 4A2.5 2.5 0 0 0 15 6.5c0 .06.01.12.02.18l-1.9.84C12.38 6.6 11.27 6 10 6c-.83 0-1.59.25-2.23.68L4.91 4.14c.05-.21.09-.42.09-.64a2.5 2.5 0 0 0-5 0A2.5 2.5 0 0 0 2.5 6c.42 0 .81-.11 1.16-.3l2.79 2.48C6.17 8.73 6 9.34 6 10c0 1.41.73 2.64 1.83 3.35l-.56 1.67A2.5 2.5 0 0 0 5 17.5a2.5 2.5 0 0 0 5 0c0-.74-.32-1.39-.83-1.85l.56-1.68c.09.01.18.03.27.03 2.21 0 4-1.79 4-4 0-.22-.03-.44-.07-.65l2.02-.9c.43.34.96.55 1.55.55a2.5 2.5 0 0 0 0-5"],wG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Wpe:jpe;return F.jsx(gr,{iconName:"graph",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});wG.displayName="Blueprint6.Icon.GraphIcon";const Gpe=wG,qpe=["M8 3c-.55 0-1 .45-1 1v4c0 .28.11.53.29.71l2 2a1.003 1.003 0 0 0 1.42-1.42L9 7.59V4c0-.55-.45-1-1-1m0-3a7.95 7.95 0 0 0-6 2.74V1c0-.55-.45-1-1-1S0 .45 0 1v4c0 .55.45 1 1 1h4c.55 0 1-.45 1-1s-.45-1-1-1H3.54C4.64 2.78 6.23 2 8 2c3.31 0 6 2.69 6 6 0 2.61-1.67 4.81-4 5.63v-.01c-.63.23-1.29.38-2 .38-3.31 0-6-2.69-6-6 0-.55-.45-1-1-1s-1 .45-1 1c0 4.42 3.58 8 8 8 .34 0 .67-.03 1-.07.02 0 .04-.01.06-.01C12.98 15.4 16 12.06 16 8c0-4.42-3.58-8-8-8"],Ype=["M10 0C6.71 0 3.82 1.6 2 4.05V2c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1h4c.55 0 1-.45 1-1s-.45-1-1-1H3.76C5.23 3.17 7.47 2 10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8c0-.55-.45-1-1-1s-1 .45-1 1c0 5.52 4.48 10 10 10s10-4.48 10-10S15.52 0 10 0m0 3c-.55 0-1 .45-1 1v6c0 .28.11.53.29.71l3 3a1.003 1.003 0 0 0 1.42-1.42L11 9.59V4c0-.55-.45-1-1-1"],EG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Ype:qpe;return F.jsx(gr,{iconName:"history",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});EG.displayName="Blueprint6.Icon.HistoryIcon";const Kpe=EG,Zpe=["M7.29 11.71c.18.18.43.29.71.29s.53-.11.71-.29l4-4a1.003 1.003 0 0 0-1.42-1.42L9 8.59V1c0-.55-.45-1-1-1S7 .45 7 1v7.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42zM15 11c-.55 0-1 .45-1 1v2H2v-2c0-.55-.45-1-1-1s-1 .45-1 1v3c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1"],Xpe=["M9.29 15.71c.18.18.43.29.71.29s.53-.11.71-.29l5-5a1.003 1.003 0 0 0-1.42-1.42L11 12.59V1c0-.55-.45-1-1-1S9 .45 9 1v11.59l-3.29-3.3a1.003 1.003 0 0 0-1.42 1.42zM19 14c-.55 0-1 .45-1 1v3H2v-3c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1h18c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1"],xG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Xpe:Zpe;return F.jsx(gr,{iconName:"import",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});xG.displayName="Blueprint6.Icon.ImportIcon";const Qpe=xG,Jpe=["M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8M7 3h2v2H7zm3 10H6v-1h1V7H6V6h3v6h1z"],ege=["M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0M9 4h2v2H9zm4 12H7v-1h2V8H8V7h3v8h2z"],Au=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?ege:Jpe;return F.jsx(gr,{iconName:"info-sign",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});Au.displayName="Blueprint6.Icon.InfoSignIcon";const T0=Au,tge=["M11 0C8.24 0 6 2.24 6 5c0 1.02.31 1.96.83 2.75L.29 14.29a1.003 1.003 0 0 0 1.42 1.42L3 14.41l1.29 1.29c.18.19.43.3.71.3s.53-.11.71-.29l2-2c.18-.18.29-.43.29-.71s-.11-.53-.29-.71L6.41 11l1.83-1.83c.8.52 1.74.83 2.76.83 2.76 0 5-2.24 5-5s-2.24-5-5-5m0 8c-.23 0-.45-.03-.66-.08-.01 0-.02-.01-.03-.01q-.315-.075-.6-.21a3.01 3.01 0 0 1-1.62-2c0-.01-.01-.02-.01-.03C8.03 5.45 8 5.23 8 5c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3"],nge=["M14 0c-3.31 0-6 2.69-6 6 0 1.11.32 2.14.85 3.03L.44 17.44a1.498 1.498 0 1 0 2.12 2.12l.79-.79.94.94c.18.18.43.29.71.29s.53-.11.71-.29l3-3c.18-.18.29-.43.29-.71s-.11-.53-.29-.71l-.94-.94 3.2-3.2A5.9 5.9 0 0 0 14 12c3.31 0 6-2.69 6-6s-2.69-6-6-6m0 9c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"],_G=p.forwardRef((e,t)=>
1202{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?nge:tge;return F.jsx(gr,{iconName:"key",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});_G.displayName="Blueprint6.Icon.KeyIcon";const rge=_G,age=["M4.99 11.99c.28 0 .53-.11.71-.29l6-6a1.003 1.003 0 0 0-1.42-1.42l-6 6a1.003 1.003 0 0 0 .71 1.71m3.85-2.02L6.4 12.41l-1 1-.01-.01c-.36.36-.85.6-1.4.6-1.1 0-2-.9-2-2 0-.55.24-1.04.6-1.4l-.01-.01 1-1 2.44-2.44c-.33-.1-.67-.16-1.03-.16-1.1 0-2.09.46-2.81 1.19l-.02-.02-1 1 .02.02c-.73.72-1.19 1.71-1.19 2.81 0 2.21 1.79 4 4 4 1.1 0 2.09-.46 2.81-1.19l.02.02 1-1-.02-.02c.73-.72 1.19-1.71 1.19-2.81 0-.35-.06-.69-.15-1.02m7.15-5.98c0-2.21-1.79-4-4-4-1.1 0-2.09.46-2.81 1.19l-.02-.02-1 1 .02.02c-.72.72-1.19 1.71-1.19 2.81 0 .36.06.69.15 1.02l2.44-2.44 1-1 .01.01c.36-.36.85-.6 1.4-.6 1.1 0 2 .9 2 2 0 .55-.24 1.04-.6 1.4l.01.01-1 1-2.43 2.45c.33.09.67.15 1.02.15 1.1 0 2.09-.46 2.81-1.19l.02.02 1-1-.02-.02a3.92 3.92 0 0 0 1.19-2.81"],sge=["m10.85 11.98-4.44 4.44-1 1c-.36.36-.86.58-1.41.58-1.1 0-2-.9-2-2 0-.55.22-1.05.59-1.41l5.44-5.44C7.69 9.06 7.36 9 7 9c-1.11 0-2.09.46-2.82 1.18l-.01-.01-3 3 .01.01C.46 13.91 0 14.89 0 16c0 2.21 1.79 4 4 4 1.11 0 2.09-.46 2.82-1.18l.01.01 3-3-.01-.01C10.54 15.09 11 14.11 11 13c0-.36-.06-.69-.15-1.02M20 4c0-2.21-1.79-4-4-4-1.11 0-2.09.46-2.82 1.18l-.01-.01-3 3 .01.01C9.46 4.91 9 5.89 9 7c0 .36.06.69.15 1.02l4.44-4.44 1-1c.36-.36.86-.58 1.41-.58 1.1 0 2 .9 2 2 0 .55-.22 1.05-.59 1.41l-5.44 5.44c.34.09.67.15 1.03.15 1.11 0 2.09-.46 2.82-1.18l.01.01 3-3-.01-.01C19.54 6.09 20 5.11 20 4M5 14a1.003 1.003 0 0 0 1.71.71l8-8a1.003 1.003 0 0 0-1.42-1.42l-2 2-2 2-2 2-2 2c-.18.18-.29.43-.29.71"],kG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?sge:age;return F.jsx(gr,{iconName:"link",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});kG.displayName="Blueprint6.Icon.LinkIcon";const ige=kG,oge=["M11.99 6.99c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1m3-5h-14c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-10c0-.55-.45-1-1-1m-1 9-5-3-1 2-3-4-3 5v-7h12z"],lge=["M15 9c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m4-7H1c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h18c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1m-1 13-6-5-2 2-4-5-4 8V4h16z"],SG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?lge:oge;return F.jsx(gr,{iconName:"media",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});SG.displayName="Blueprint6.Icon.MediaIcon";const CG=SG,cge=["M1 4h14c.55 0 1-.45 1-1s-.45-1-1-1H1c-.55 0-1 .45-1 1s.45 1 1 1m14 8H1c-.55 0-1 .45-1 1s.45 1 1 1h14c.55 0 1-.45 1-1s-.45-1-1-1m0-5H1c-.55 0-1 .45-1 1s.45 1 1 1h14c.55 0 1-.45 1-1s-.45-1-1-1"],uge=["M1 6h18c.55 0 1-.45 1-1s-.45-1-1-1H1c-.55 0-1 .45-1 1s.45 1 1 1m18 3H1c-.55 0-1 .45-1 1s.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1m0 5H1c-.55 0-1 .45-1 1s.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1"],NG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?uge:cge;return F.jsx(gr,{iconName:"menu",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});NG.displayName="Blueprint6.Icon.MenuIcon";const dge=NG,fge=["M2 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4m6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4m6 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4"],mge=["M3.5 8a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5m7 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5m7 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5"],YE=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?mge:fge;return F.jsx(gr,{iconName:"more",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});YE.displayName="Blueprint6.Icon.MoreIcon";const hge=YE,pge=["M9.12 12.69c-1.17-.53-1.01-.85-1.05-1.29-.01-.06-.01-.12-.01-.19.4-.37.73-.87.94-1.44 0 0 .01-.03.01-.04.05-.14.09-.27.12-.4.27-.06.43-.36.49-.63.06-.11.19-.39.16-.7-.04-.41-.2-.6-.38-.68v-.07c0-.51-.05-1.25-.14-1.74-.02-.13-.05-.27-.09-.4-.17-.6-.53-1.14-1.01-1.52C7.66 3.2 6.96 3 6.33 3c-.62 0-1.33.2-1.82.59-.49.38-.85.92-1.02 1.52-.04.13-.07.26-.09.4-.09.49-.13 1.23-.13 1.74v.06c-.19.08-.35.27-.39.68-.03.31.1.59.16.7.06.28.22.59.5.64.03.14.07.27.11.4 0 .01.01.02.01.02v.01c.22.59.55 1.1.96 1.46 0 .06-.01.12-.01.17-.04.44.08.76-1.09 1.29S.59 13.78.23 14.63C-.12 15.5.03 16 .03 16h12.6s.15-.5-.22-1.36c-.36-.85-2.12-1.42-3.29-1.95M14.89 2h-1V1c0-.55-.45-1-1-1s-1 .45-1 1v1h-1c-.55 0-1 .45-1 1s.45 1 1 1h1v1c0 .55.45 1 1 1s1-.45 1-1V4h1c.55 0 1-.45 1-1s-.45-1-1-1"],gge=["M11.41 15.92c-1.46-.65-1.26-1.05-1.31-1.59-.01-.07-.01-.15-.01-.23.5-.45.91-1.07 1.18-1.78 0 0 .01-.04.02-.05.06-.
120215.11-.32.15-.48.33-.07.53-.44.6-.78.08-.14.23-.48.2-.87-.05-.5-.24-.73-.47-.82v-.09c0-.63-.06-1.55-.17-2.15-.02-.17-.06-.33-.11-.5-.22-.73-.67-1.4-1.27-1.86C9.58 4.25 8.7 4 7.92 4s-1.66.25-2.28.73c-.61.47-1.06 1.13-1.27 1.86-.05.16-.08.33-.11.5-.12.6-.18 1.51-.18 2.14v.08c-.23.09-.43.32-.48.83-.04.39.12.73.2.87.08.35.28.72.62.78q.06.255.15.48c0 .01.01.02.01.03l.01.01c.27.72.69 1.35 1.21 1.8 0 .07-.01.14-.01.21-.05.54.1.94-1.36 1.59S.77 17.26.32 18.31C-.14 19.38.04 20 .04 20h15.75s.18-.62-.27-1.67c-.45-1.06-2.65-1.75-4.11-2.41M18.87 3h-2V1c0-.55-.45-1-1-1s-1 .45-1 1v2h-2c-.55 0-1 .45-1 1s.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1V5h2c.55 0 1-.45 1-1s-.45-1-1-1"],RG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?gge:pge;return F.jsx(gr,{iconName:"new-person",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});RG.displayName="Blueprint6.Icon.NewPersonIcon";const vge=RG,yge=["M8 16c1.1 0 2-.9 2-2H6c0 1.1.9 2 2 2m6-5c-.55 0-1-.45-1-1V6c0-2.43-1.73-4.45-4.02-4.9 0-.04.02-.06.02-.1 0-.55-.45-1-1-1S7 .45 7 1c0 .04.02.06.02.1A4.99 4.99 0 0 0 3 6v4c0 .55-.45 1-1 1s-1 .45-1 1 .45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1"],bge=["M10 20c1.1 0 2-.9 2-2H8c0 1.1.9 2 2 2m7-5c-.55 0-1-.45-1-1V8c0-2.61-1.67-4.81-4-5.63V2c0-1.1-.9-2-2-2S8 .9 8 2v.37C5.67 3.19 4 5.39 4 8v6c0 .55-.45 1-1 1s-1 .45-1 1 .45 1 1 1h14c.55 0 1-.45 1-1s-.45-1-1-1"],TG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?bge:yge;return F.jsx(gr,{iconName:"notifications",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});TG.displayName="Blueprint6.Icon.NotificationsIcon";const wge=TG,Ege=["M13.69 13.98c-.05-.24-.14-.5-.25-.76-.36-.86-1.12-1.33-2.69-2-.14-.06-.59-.25-.6-.25-.21-.09-.36-.15-.5-.22.02-.1.02-.2.03-.31 0-.04.01-.08.01-.13-.07-.06-.13-.12-.19-.19q.33-.48.54-1.05c.02-.06.02-.06.03-.1.29-.23.48-.57.59-.96.16-.33.25-.73.21-1.16-.03-.4-.16-.76-.37-1.03-.02-.53-.07-1.13-.15-1.54-.01-.06-.02-.12-.03-.19.23-.06.48-.09.72-.09.49 0 1.05.16 1.44.46.38.29.67.7.8 1.17.03.1.05.21.07.31.07.37.11.94.11 1.33v.05c.14.06.27.21.29.51.02.25-.07.45-.13.54-.05.21-.16.44-.38.48q-.03.15-.09.3c0 .01-.01.03-.01.03-.17.44-.43.83-.75 1.11v.14c.03.35-.09.59.83 1 .93.41 2.32.84 2.6 1.5.29.66.17 1.04.17 1.04h-2.3zm-1.17-.38c.37.86.22 1.36.22 1.36H.06s-.14-.5.22-1.36 2.13-1.43 3.31-1.96c1.17-.54 1.05-.86 1.09-1.3 0-.05.01-.11.01-.17-.41-.35-.75-.86-.97-1.45v-.01s-.01-.01-.01-.02c-.04-.12-.09-.26-.12-.39-.28-.05-.44-.36-.5-.64-.06-.12-.19-.39-.16-.71.04-.41.21-.6.39-.68v-.06c0-.51.05-1.26.14-1.74.02-.13.05-.27.09-.4.17-.6.54-1.13 1.02-1.51.5-.39 1.21-.6 1.84-.6s1.34.21 1.84.6c.48.38.85.91 1.02 1.52.04.13.07.27.09.4.09.48.14 1.22.14 1.73v.07c.18.08.34.27.37.67.03.32-.09.59-.16.71-.06.28-.21.58-.48.63q-.045.195-.12.39c0 .01-.01.04-.01.04-.22.58-.55 1.08-.95 1.45v.18c.04.45-.12.77 1.06 1.3s2.95 1.09 3.31 1.95"],xge=["M16.94 17a5 5 0 0 0-.33-1.06c-.45-.97-1.37-1.52-3.24-2.3-.17-.07-.76-.31-.77-.32-.1-.04-.2-.08-.28-.12.05-.14.04-.29.06-.45 0-.05.01-.11.01-.16-.25-.21-.47-.48-.65-.79.22-.34.41-.71.56-1.12l.04-.11c-.01.02-.01.02-.02.08l.06-.15c.36-.26.6-.67.72-1.
120213.18-.37.29-.82.25-1.3-.05-.5-.21-.92-.47-1.22-.02-.53-.06-1.11-.12-1.59.38-.17.83-.26 1.24-.26.59 0 1.26.19 1.73.55.46.35.8.85.97 1.4.04.13.07.25.08.38.08.45.13 1.14.13 1.61v.07c.16.07.31.24.35.62.02.29-.09.55-.15.65-.05.26-.2.53-.46.59-.03.12-.07.25-.11.36-.01.01-.01.04-.01.04-.2.53-.51 1-.89 1.34 0 .06 0 .12.01.17.04.41-.11.71 1 1.19 1.1.5 2.77 1.01 3.13 1.79.34.79.2 1.25.2 1.25h-3.04zm-5.42-3.06c1.47.66 3.7 1.35 4.18 2.39.45 1.05.27 1.67.27 1.67H.04s-.19-.62.27-1.67 2.68-1.75 4.16-2.4 1.33-1.05 1.38-1.59c0-.07.01-.14.01-.21-.52-.45-.95-1.08-1.22-1.8l-.01-.01c0-.01-.01-.02-.01-.03-.07-.15-.12-.32-.16-.49-.34-.06-.54-.43-.62-.78-.08-.14-.24-.48-.2-.87.05-.51.26-.74.49-.83v-.08c0-.64.05-1.55.17-2.15a3.65 3.65 0 0 1 1.4-2.36C6.32 2.25 7.21 2 8 2s1.68.25 2.31.73a3.63 3.63 0 0 1 1.4 2.36c.11.6.17 1.52.17 2.15v.09c.22.09.42.32.47.82.03.39-.12.73-.2.87-.07.34-.27.71-.61.78-.04.16-.09.33-.15.48-.01.01-.02.05-.02.05-.27.71-.68 1.33-1.19 1.78 0 .08 0 .16.01.23.05.55-.15.95 1.33 1.6"],AG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?xge:Ege;return F.jsx(gr,{iconName:"people",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});AG.displayName="Blueprint6.Icon.PeopleIcon";const IG=AG,_ge=["M15.68 14.32c-.46-1.05-2.68-1.75-4.16-2.4s-1.28-1.05-1.33-1.59c-.01-.07-.01-.15-.01-.23.51-.45.92-1.07 1.19-1.78 0 0 .01-.04.02-.05.06-.15.11-.32.15-.48.34-.07.54-.44.61-.78.08-.14.23-.48.2-.87-.05-.5-.25-.73-.47-.82v-.09c0-.63-.06-1.55-.17-2.15A3.67 3.67 0 0 0 10.32.72C9.68.25 8.79-.01 8-.01S6.32.24 5.69.72c-.61.47-1.06 1.13-1.28 1.86-.05.17-.09.33-.11.5-.12.6-.17 1.51-.17 2.15v.08c-.24.09-.45.32-.5.83-.03.38.13.72.2.86.08.35.28.72.63.78.04.17.09.33.15.49 0 .01.01.02.01.03l.01.01c.27.72.7 1.35 1.22 1.8 0 .07-.01.14-.01.21-.05.54.1.94-1.37 1.59-1.48.65-3.7 1.35-4.16 2.4s-.27 1.67-.27 1.67h15.92c-.01.01.18-.61-.28-1.66"],kge=["M19.61 17.91c-.57-1.32-3.35-2.19-5.19-3.01-1.85-.82-1.59-1.31-1.66-1.99-.01-.09-.01-.19-.02-.29.63-.56 1.15-1.33 1.49-2.22 0 0 .02-.05.02-.06.07-.19.13-.39.19-.6.42-.09.67-.55.76-.98.1-.17.29-.6.25-1.08-.06-.62-.31-.91-.59-1.03v-.11c0-.79-.07-1.93-.22-2.68A4.55 4.55 0 0 0 12.9.92C12.11.32 11 0 10.01 0s-2.1.32-2.89.92a4.55 4.55 0 0 0-1.74 2.94c-.14.75-.22 1.89-.22 2.68v.1c-.29.11-.55.4-.61 1.04-.04.48.15.91.25 1.08.1.44.35.91.79.98.05.21.12.41.19.6 0 .01.01.03.01.04l.01.02c.34.91.87 1.69 1.52 2.25 0 .09-.01.18-.02.26-.07.68.13 1.17-1.72 1.99S.96 16.59.39 17.91.05 20 .05 20h19.9s.23-.77-.34-2.09"],OG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?kge:_ge;return F.jsx(gr,{iconName:"person",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});OG.displayName="Blueprint6.Icon.PersonIcon";const Sge=OG,Cge=["M13 7H9V3c0-.55-.45-1-1-1s-1 .45-1 1v4H3c-.55 0-1 .45-1 1s.45 1 1 1h4v4c0 .55.45 1 1 1s1-.45 1-1V9h4c.55 0 1-.45 1-1s-.45-1-1-1"],Nge=["M16 9h-5V4c0-.55-.45-1-1-1s-1 .45-1 1v5H4c-.55 0-1 .45-1 1s.45 1 1 1h5v5c0 .55.45 1 1 1s1-.45 1-1v-5h5c.55 0 1-.45 1-1s-.45-1-1-1"],MG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Nge:Cge;return F.jsx(gr,{iconName:"plus",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});MG.displayName="Blueprint6.Icon.PlusIcon";const Rge=["M8 3a5 5 0 0 0-5 5 1 1 0 0 1-2 0 7 7 0 0 1 7-7c1.72 0 3.62.416 5 1.567V2a1 1 0 1 1 2 0v3a1 1 0 0 1-1 1h-3a1 1 0 1 1 0-2h.586C10.702 3.334 9.417 3 8 3m0 10a5 5 0 0 0 5-5 1 1 0 1 1 2 0 7 7 0 0 1-7 7c-1.72 0-3.62-.416-5-1.568V14a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1h3a1 1 0 1 1 0 2h-.586c.884.666 2.169 1 3.586 1"],Tge=["M3.636 3.636A9 9 0 0 1 10 1c2.439 0 5.182.717 7 2.471V2a1 1 0 1 1 2 0v4a1 1 0 0 1-1 1h-4a1 1 0 1 1 0-2h1.7c-1.304-1.32-3.483-2-5.7-2a7 7 0 0 0-7 7 1 1 0 1 1-2 0 9 9 0 0 1 2.636-6.364m12.728 12.728A9 9 0 0 1 10 19c-2.439 0-5.182-.717-7-2.471V18a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2H4.3c1.304 1.32 3.483 2 5.7 2a7 7 0 0 0 7-7 1 1 0 1 1 2 0 9 9 0 0 1-2.636 6.364"],PG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Tge:Rge;return F.jsx(gr,{iconName:"refresh",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});
1202PG.displayName="Blueprint6.Icon.RefreshIcon";const Hd=PG,Age=["m9.41 8 2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71z"],Ige=["m11.41 10 3.29-3.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L10 8.59l-3.29-3.3a1.003 1.003 0 0 0-1.42 1.42L8.59 10 5.3 13.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71l3.29-3.3 3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71z"],kk=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Ige:Age;return F.jsx(gr,{iconName:"small-cross",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});kk.displayName="Blueprint6.Icon.SmallCrossIcon";const Oge=["M14 8A6 6 0 1 1 2 8a6 6 0 0 1 12 0M9 4H7v2h2zm0 3H6v1h1v3H6v1h4v-1H9z"],Mge=["M17 10a7.001 7.001 0 0 1-11.95 4.95A7 7 0 1 1 17 10m-6-5H9v2h2zm0 3H8v1h1v5H8v1h4v-1h-1z"],DG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Mge:Oge;return F.jsx(gr,{iconName:"small-info-sign",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});DG.displayName="Blueprint6.Icon.SmallInfoSignIcon";const Pge=DG,Dge=["M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0 0 12 5"],Lge=["M15 5c-.28 0-.53.11-.71.29L8 11.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l7-7A1.003 1.003 0 0 0 15 5"],LG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Lge:Dge;return F.jsx(gr,{iconName:"small-tick",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});LG.displayName="Blueprint6.Icon.SmallTickIcon";const $ge=["m8 0 2.5 5.3 5.5.8-4 4.1.9 5.8L8 13.3 3.1 16l.9-5.8-4-4.1 5.5-.8z"],Fge=["m10 0 3.1 6.6 6.9 1-5 5.1 1.2 7.3-6.2-3.4L3.8 20 5 12.7 0 7.6l6.9-1z"],$G=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Fge:$ge;return F.jsx(gr,{iconName:"star",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});$G.displayName="Blueprint6.Icon.StarIcon";const P3=$G,zge=["m16 6.11-5.53-.84L8 0 5.53 5.27 0 6.11l4 4.1L3.06 16 8 13.27 12.94 16 12 10.21zM4.91 13.2l.59-3.62L3 7.02l3.45-.53L8 3.2l1.55 3.29 3.45.53-2.5 2.56.59 3.62L8 11.49z"],Hge=["m20 7.6-6.9-1.1L10 0 6.9 6.6 0 7.6l5 5.1L3.8 20l6.2-3.4 6.2 3.4-1.2-7.2zM10 15l-4.5 2.4.9-5.2-3.6-3.6 5-.8L10 3.1l2.2 4.7 5 .8-3.6 3.7.9 5.2z"],FG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Hge:zge;return F.jsx(gr,{iconName:"star-empty",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});FG.displayName="Blueprint6.Icon.StarEmptyIcon";const D3=FG,Vge=["M1 3a2 2 0 0 1 2-2h4.584a2 2 0 0 1 1.414.586l5.413 5.412a2 2 0 0 1 0 2.829L9.827 14.41a2 2 0 0 1-2.829 0L1.586 8.998A2 2 0 0 1 1 7.584zm3.487-.007a1.494 1.494 0 1 0 0 2.988 1.494 1.494 0 0 0 0-2.988"],Uge=["M2 4a2 2 0 0 1 2-2h4.588a2 2 0 0 1 1.414.586l7.41 7.41a2 2 0 0 1 0 2.828l-4.588 4.588a2 2 0 0 1-2.829 0l-7.41-7.41A2 2 0 0 1 2 8.588zm3.489-.006a1.495 1.495 0 1 0 0 2.99 1.495 1.495 0 0 0 0-2.99"],zG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Uge:Vge;return F.jsx(gr,{iconName:"tag",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});zG.displayName="Blueprint6.Icon.TagIcon";const Bge=zG,jge=["M11.328 10.238c1.015.413 2.16.878 2.439 1.516.303.69.248 2.67.235 3.143L14 15H2s-.113-2.465.232-3.253c.28-.638 1.424-1.104 2.44-1.517.238-.097.47-.191.682-.284.985-.436 1-.722 1.02-1.067l.008-.127q0-.039.004-.079l.004-.078a3.35 3.35 0 0 1-.916-1.351l-.008-.008q0-.005-.003-.01l-.004-.012a3 3 0 0 1-.113-.368c-.262-.045-.412-.323-.472-.585-.053-.105-.173-.36-.15-.646.037-.382.195-.555.375-.623v-.06c0-.48.037-1.163.127-1.613.015-.128.045-.248.083-.375a2.8 2.8 0 0 1 .96-1.396C6.742 1.188 7.41 1 8.003 1s1.261.195 1.741.548a2.76 2.76 0 0 1 1.043 1.77c.083.451.128 1.142.128 1.614V5c.165.068.315.24.353.615a1.2 1.2 0 0 1-.15.653c-.053.255-.203.533-.458.586a3 3 0 0 1-.113.36c-.007.007-.015.037-.015.037-.202.533-.51.998-.893 1.336 0 .06 0 .12.008.173q.006.078.008.15c.011.335.021.618.99 1.043.212.093.444.187.683.285M4.5 7.521a1.6 1.6 0 0 1-.282-.308 2 2 0 0 1-.279-.593c-.304-.652-.29-1.486.153-2.074.023-.628.065-1.278.244-1.884a4 4 0 0 1 .177-.473A2.9 2.9 0 0 0 3.497 2c-.543 0-1.156.179-1.596.502a2.53 2.53 0 0 0-.956 1.624 9.5 9.5 0 0 0-.117 1.479v.062c-.152.062-.29.22-.323.564a1.1 1.1 0 0 0 .137.598c.048.234.186.489.42.537.027.
120211.062.227.103.33a3.1 3.1 0 0 0 .832 1.259q.002.084-.007.158-.006.072-.007.139c-.01.306-.02.565-.908.955C.281 10.556 0 11.046 0 12v3h1s-.16-2.356 0-3 .572-1.184 1.108-1.59c.61-.46 1.333-.753 2.04-1.039l.213-.087c.857-.35.7-.644.421-1.164a5 5 0 0 1-.282-.6m7 .001a1.6 1.6 0 0 0 .282-.308c.136-.193.224-.401.278-.593.305-.652.292-1.486-.152-2.074-.024-.628-.065-1.278-.244-1.884a4 4 0 0 0-.177-.473A2.9 2.9 0 0 1 12.503 2c.543 0 1.156.179 1.596.502a2.53 2.53 0 0 1 .956 1.624c.076.412.117 1.045.117 1.479v.062c.151.062.289.22.323.564a1.1 1.1 0 0 1-.137.598c-.048.234-.186.489-.42.537-.027.11-.062.227-.103.33a3.1 3.1 0 0 1-.832 1.259q-.002.084.006.158.006.072.008.139c.01.306.02.565.907.955C15.72 10.556 16 11.046 16 12v3h-1s.16-2.356 0-3-.572-1.184-1.108-1.59c-.61-.46-1.333-.753-2.04-1.039l-.213-.087c-.857-.35-.7-.644-.421-1.164a5 5 0 0 0 .283-.599"],Wge=["M17.691 15.328c-.456-1.056-2.68-1.752-4.154-2.408-1.48-.656-1.272-1.048-1.328-1.592-.008-.072-.008-.152-.016-.232.504-.448.92-1.064 1.192-1.776 0 0 .016-.04.016-.048q.082-.228.152-.48c.337-.072.537-.44.609-.784.08-.136.232-.48.2-.864-.048-.496-.248-.728-.472-.824v-.088c0-.632-.056-1.544-.177-2.144a3.64 3.64 0 0 0-1.393-2.352C11.69 1.256 10.8 1 10.009 1s-1.68.256-2.313.736a3.64 3.64 0 0 0-1.393 2.352c-.112.6-.176 1.512-.176 2.144v.08c-.232.088-.44.32-.488.832-.032.384.12.728.2.864.08.352.28.728.633.784.04.168.096.328.152.48 0 .008.008.024.008.032l.008.016c.272.728.696 1.352 1.216 1.8 0 .072-.008.144-.016.208-.056.544.104.936-1.376 1.592-1.481.656-3.698 1.352-4.154 2.408S2 19 2 19h16s.147-2.616-.309-3.672M1.34 15.15c-.148.302-.34.693-.34 3.85H0v-4c0-1.3.851-2.103 1.905-2.57 1.149-.51 1.168-.837 1.192-1.236l.012-.157q.012-.086.014-.182c-.455-.392-.826-.938-1.064-1.575l-.007-.014q0-.006-.004-.014l-.001-.005-.002-.009a4 4 0 0 1-.133-.42c-.308-.049-.484-.378-.554-.686a1.37 1.37 0 0 1-.175-.756c.042-.448.224-.651.428-.728v-.07c0-.553.056-1.351.154-1.876a3.2 3.2 0 0 1 1.218-2.058C3.536 2.224 4.313 2 5.007 2c.327 0 .673.05 1.005.147a4.5 4.5 0 0 0-.505 1.121 4.4 4.4 0 0 0-.139.612 14 14 0 0 0-.184 1.94c-.286.305-.45.729-.497 1.217v.009c-.045.541.12 1.007.254 1.277.064.227.167.479.33.707.102.141.238.287.41.406l.026.079c.017.056.034.11.064.17a5.5 5.5 0 0 0 1.128 1.818c-.01.151-.03.186-.159.277-.13.092-.343.214-.686.366-.24.106-.538.228-.858.36-.545.223-1.157.474-1.664.721
1202a7.4 7.4 0 0 0-1.222.725c-.358.271-.721.63-.924 1.098zm12.606-3.004h.002c.282.126.59.253.924.39h.003l.27.112c.43.177.888.37 1.32.579a7.5 7.5 0 0 1 1.223.724c.359.271.75.73.953 1.2C18.792 15.5 19 16 19 19h1v-4c0-1.274-.875-2.111-1.905-2.57-1.123-.498-1.136-.822-1.15-1.209a3 3 0 0 0-.012-.184l-.007-.088v-.013l-.007-.102a4 4 0 0 0 1.043-1.554s.014-.035.014-.042c.05-.133.091-.273.133-.42.294-.063.47-.385.532-.686.07-.119.204-.42.176-.756-.043-.434-.218-.637-.414-.721v-.077c0-.553-.049-1.351-.154-1.876a3.2 3.2 0 0 0-1.219-2.058C16.478 2.224 15.7 2 15.008 2c-.327 0-.672.05-1.004.146.219.35.39.727.506 1.122.056.187.106.392.138.606.112.574.17 1.346.186 1.97.273.301.433.713.48 1.19v.012c.045.537-.118 1-.251 1.271a2.2 2.2 0 0 1-.32.696c-.097.14-.228.285-.395.406l-.01.03a5.65 5.65 0 0 1-1.19 2.025v.04l.001.018q.001.077.01.153c.033.039.195.198.788.461"],HG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Wge:jge;return F.jsx(gr,{iconName:"team",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});HG.displayName="Blueprint6.Icon.TeamIcon";const Gge=HG,qge=["M14 3c-.28 0-.53.11-.71.29L6 10.59l-3.29-3.3a1.003 1.003 0 0 0-1.42 1.42l4 4c.18.18.43.29.71.29s.53-.11.71-.29l8-8A1.003 1.003 0 0 0 14 3"],Yge=["M17 4c-.28 0-.53.11-.71.29L7 13.59 3.71 10.3A.97.97 0 0 0 3 10a1.003 1.003 0 0 0-.71 1.71l4 4c.18.18.43.29.71.29s.53-.11.71-.29l10-10A1.003 1.003 0 0 0 17 4"],VG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Yge:qge;return F.jsx(gr,{iconName:"tick",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});VG.displayName="Blueprint6.Icon.TickIcon";const Kge=["M14.49 3.99h-13c-.28 0-.5.22-.5.5s.22.5.5.5h.5v10c0 .55.45 1 1 1h10c.55 0 1-.45 1-1v-10h.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5m-8.5 9c0 .55-.45 1-1 1s-1-.45-1-1v-6c0-.55.45-1 1-1s1 .45 1 1zm3 0c0 .55-.45 1-1 1s-1-.45-1-1v-6c0-.55.45-1 1-1s1 .45 1 1zm3 0c0 .55-.45 1-1 1s-1-.45-1-1v-6c0-.55.45-1 1-1s1 .45 1 1zm2-12h-4c0-.55-.45-1-1-1h-2c-.55 0-1 .45-1 1h-4c-.55 0-1 .45-1 1v1h14v-1c0-.55-.45-1-1-1"],Zge=["M17 1h-5c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1H3c-.55 0-1 .45-1 1v1h16V2c0-.55-.45-1-1-1m.5 3h-15c-.28 0-.5.22-.5.5s.22.5.5.5H3v14c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5h.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5M7 16c0 .55-.45 1-1 1s-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1zm4 0c0 .55-.45 1-1 1s-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1zm4 0c0 .55-.45 1-1 1s-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1z"],KE=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Zge:Kge;return F.jsx(gr,{iconName:"trash",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});KE.displayName="Blueprint6.Icon.TrashIcon";const KP=KE,Xge=["m15.84 13.5.01-.01-7-12-.01.01c-.17-.3-.48-.5-.85-.5s-.67.2-.85.5l-.01-.01-7 12 .01.01c-.09.15-.15.31-.15.5 0 .55.45 1 1 1h14c.55 0 1-.45 1-1 0-.19-.06-.35-.15-.5m-6.85-.51h-2v-2h2zm0-3h-2v-5h2z"],Qge=["m19.86 17.52.01-.01-9-16-.01.01C10.69 1.21 10.37 1 10 1s-.69.21-.86.52l-.01-.01-9 16 .01.01c-.08.14-.14.3-.14.48 0 .55.45 1 1 1h18c.55 0 1-.45 1-1 0-.18-.06-.34-.14-.48M11 17H9v-2h2zm0-3H9V6h2z"],UG=p.forwardRef((e,t)=>{const r=(e.size??Nt.STANDARD)>=Nt.LARGE?Qge:Xge;return F.jsx(gr,{iconName:"warning-sign",ref:t,...e,children:r.map((a,s)=>F.jsx("path",{d:a,fillRule:"evenodd"},s))})});UG.displayName="Blueprint6.Icon.WarningSignIcon";const Ft=p.forwardRef((e,t)=>{const{autoLoad:n=!0,className:r,color:a,icon:s,intent:i,tagName:l="span",svgProps:c,title:u,htmlTitle:d,...f}=e,m=e.size??Nt.STANDARD,[h,g]=p.useState(()=>typeof s=="string"?R0.getPaths(s,m):void 0);if(p.useEffect(()=>{let v=!1;if(typeof s=="string"){const y=R0.getPaths(s,m);y!==void 0?g(y):n?R0.load(s,m).then(()=>{v||g(R0.getPaths(s,m))}).catch(b=>{console.error(`[Blueprint] Icon '${s}' (${m}px) could not be loaded.`,b)}):console.error(`[Blueprint] Icon '${s}' (${m}px) is not loaded yet and autoLoad={false}, did you call Icons.load('${s}', ${m})?`)}return()=>{v=!0}},[n,s,m]),s==null||typeof s=="boolean")return null;if(typeof s!="string")return p.isValidElement(s)?p.cloneElement(s,{className:At(s.props.className,r,Rs(i)),color:s.props.color??a,size:s.props.size??e.size}):s;
1202if(h==null){const v=m===Nt.STANDARD?Lme:m===Nt.LARGE?$me:void 0;return p.createElement(l||"span",{"aria-hidden":u?void 0:!0,...Ju(f),className:At(bk,v,Hme(s),Rs(i),r),"data-icon":s,ref:t,title:d})}else{const v=h.map((y,b)=>F.jsx("path",{d:y,fillRule:"evenodd"},b));return F.jsx(gr,{children:v,className:At(Rs(i),r),color:a,htmlTitle:d,iconName:s,ref:t,size:m,svgProps:c,tagName:l,title:u,...Ju(f)})}});Ft.displayName=`${$n}.Icon`;var rm;(function(e){e[e.SMALL=20]="SMALL",e[e.STANDARD=50]="STANDARD",e[e.LARGE=100]="LARGE"})(rm||(rm={}));const xd=45,L3=`M 50,50 m 0,-${xd} a ${xd},${xd} 0 1 1 0,${xd*2} a ${xd},${xd} 0 1 1 0,-${xd*2}`,s0=280,Jge=10,e0e=4,t0e=16,os=e=>{const{className:t="",intent:n,value:r,tagName:a="div",size:s,...i}=e;wg(()=>{const f=s!=null,m=t.indexOf(WE)>=0||t.indexOf(Dp)>=0;f&&m&&console.warn(fhe)},[t,s]);const l=n0e(s,t),c=Math.min(t0e,e0e*rm.LARGE/l),u=s0-s0*(r==null?.25:bg(r,0,1)),d=At(yk,Rs(n),{[Nme]:r!=null},t);return p.createElement(a,{"aria-label":"loading","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":r===void 0?void 0:r*100,className:d,role:"progressbar",...i},p.createElement(a,{className:Sme},F.jsxs("svg",{width:l,height:l,strokeWidth:c.toFixed(2),viewBox:r0e(c),children:[F.jsx("path",{className:Rme,d:L3}),F.jsx("path",{className:Cme,d:L3,pathLength:s0,strokeDasharray:`${s0} ${s0}`,strokeDashoffset:u})]})))};os.displayName=`${$n}.Spinner`;const n0e=(e,t)=>e==null?t.indexOf(WE)>=0?rm.SMALL:t.indexOf(Dp)>=0?rm.LARGE:rm.STANDARD:Math.max(Jge,e),r0e=e=>{const t=xd+e/2,n=(50-t).toFixed(2),r=(t*2).toFixed(2);return`${n} ${n} ${r} ${r}`},a0e=kW()?p.useLayoutEffect:p.useEffect,Sk=p.forwardRef(({children:e,tagName:t="div",title:n,className:r,ellipsize:a=!1,...s},i)=>{const l=p.useRef(),c=p.useMemo(()=>mc(l,i),[i]),[u,d]=p.useState(""),[f,m]=p.useState();return a0e(()=>{var h;((h=l.current)==null?void 0:h.textContent)!=null&&(m(a&&l.current.scrollWidth>l.current.clientWidth),d(l.current.textContent))},[l,e,a]),p.createElement(t,{...s,className:At({[ufe]:a},r),ref:c,title:n??(f?u:void 0)},e)});Sk.displayName=`${$n}.Text`;const De=p.forwardRef((e,t)=>{const n=jG(e,t);return F.jsx("button",{type:"button",...Ju(e),...n,children:WG(e)})});De.displayName=`${$n}.Button`;const BG=p.forwardRef((e,t)=>{const{href:n}=e,r=jG(e,t,{defaultTabIndex:0,disabledTabIndex:-1});return F.jsx("a",{role:"button",...Ju(e),...r,"aria-disabled":r.disabled,href:r.disabled?void 0:n,children:WG(e)})});BG.displayName=`${$n}.AnchorButton`;function jG(e,t,n){const{alignText:r,fill:a,large:s,loading:i=!1,minimal:l,outlined:c,size:u="medium",small:d,variant:f="solid"}=e,m=e.disabled||i,[h,g]=jW(!m,e,t,n),v=At(Wy,{[Xd]:h,[wc]:m,[Qi]:a,[FP]:i},wk(r),Rs(e.intent),ud(u,{large:s,small:d}),_W(f,{minimal:l,outlined:c}),e.className);return{...g,className:v,disabled:m}}function WG(e){const{children:t,ellipsizeText:n,endIcon:r,icon:a,loading:s,rightIcon:i,text:l,textClassName:c}=e,u=!Uv(l)||!Uv(t);return F.jsxs(F.Fragment,{children:[s&&F.jsx(os,{className:yfe,size:rm.SMALL}),F.jsx(Ft,{icon:a}),u&&F.jsxs(Sk,{className:At(bfe,c),ellipsize:n,tagName:"span",children:[l,t]}),F.jsx(Ft,{icon:r??i})]})}function Hl(e,t){return p.forwardRef((n,r)=>{const{className:a,children:s,...i}=n;return p.createElement(e,{...i,className:At(t,a),ref:r},s)})}Hl("h1",yg);const s0e=Hl("h2",yg),rZe=Hl("h3",yg),GG=Hl("h4",yg),i0e=Hl("h5",yg),o0e=Hl("h6",yg);Hl("blockquote",dfe);Hl("code",ffe);const l0e=Hl("pre",mfe);Hl("label",jP);Hl("ol",Qj);Hl("ul",Qj);function ZE(){return ZE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZE.apply(this,arguments)}function ZP(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function yT(e,t){return yT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},yT(e,t)}function XP(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yT(e,t)}var qG={exports:{}},c0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",u0e=c0e,d0e=u0e;function YG(){}function KG(){}KG.resetWarningCache=YG;var f0e=function(){function e(r,a,s,i,l,c){if(c!==d0e){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
vendor: 4,588 bytes, line 1202
1202:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:KG,resetWarningCache:YG};return n.PropTypes=n,n};qG.exports=f0e();var m0e=qG.exports;const Mn=id(m0e);function h0e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function p0e(e,t){e.classList?e.classList.add(t):h0e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function $3(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function g0e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=$3(e.className,t):e.setAttribute("class",$3(e.className&&e.className.baseVal||"",t))}const F3={disabled:!1},XE=o.createContext(null);var ZG=function(t){return t.scrollTop},A0="unmounted",Af="exited",If="entering",wh="entered",bT="exiting",dd=function(e){XP(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var i=a,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=Af,s.appearStatus=If):c=wh:r.unmountOnExit||r.mountOnEnter?c=A0:c=Af,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(a,s){var i=a.in;return i&&s.status===A0?{status:Af}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var s=null;if(a!==this.props){var i=this.state.status;this.props.in?i!==If&&i!==wh&&(s=If):(i===If||i===wh)&&(s=bT)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,s,i,l;return s=i=l=a,a!=null&&typeof a!="number"&&(s=a.exit,i=a.enter,l=a.appear!==void 0?a.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(a,s){if(a===void 0&&(a=!1),s!==null)if(this.cancelNextCallback(),s===If){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Ub.findDOMNode(this);i&&ZG(i)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Af&&this.setState({status:A0})},n.performEnter=function(a){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:a,c=this.props.nodeRef?[l]:[Ub.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),m=l?f.appear:f.enter;if(!a&&!i||F3.disabled){this.safeSetState({status:wh},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:If},function(){s.props.onEntering(u,d),s.onTransitionEnd(m,function(){s.safeSetState({status:wh},function(){s.props.onEntered(u,d)})})})},n.performExit=function(){var a=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:Ub.findDOMNode(this);if(!s||F3.disabled){this.safeSetState({status:Af},function(){a.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:bT},function(){a.props.onExiting(l),a.onTransitionEnd(i.exit,function(){a.safeSetState({status:Af},function(){a.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,s){s=this.setNextCallback(s),this.setState(a,s)},n.setNextCallback=function(a){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,a(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(a,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:Ub.findDOMNode(this),l=a==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===A0)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=ZP(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return o.createElement(XE.Provider,{value:null},typeof i=="function"?i(a,l):o.cloneElement(o.Children.only(i),l))},t}(o.Component);dd.contextType=XE;dd.propTypes={};function sh(){}dd.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
vendor: 4,176 bytes, line 1202
1202:!0,exit:!0,onEnter:sh,onEntering:sh,onEntered:sh,onExit:sh,onExiting:sh,onExited:sh};dd.UNMOUNTED=A0;dd.EXITED=Af;dd.ENTERING=If;dd.ENTERED=wh;dd.EXITING=bT;const v0e=dd;var y0e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return p0e(t,r)})},WC=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return g0e(t,r)})},QP=function(e){XP(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];return r=e.call.apply(e,[this].concat(s))||this,r.appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(l,c){var u=r.resolveArguments(l,c),d=u[0],f=u[1];r.removeClasses(d,"exit"),r.addClass(d,f?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(l,c)},r.onEntering=function(l,c){var u=r.resolveArguments(l,c),d=u[0],f=u[1],m=f?"appear":"enter";r.addClass(d,m,"active"),r.props.onEntering&&r.props.onEntering(l,c)},r.onEntered=function(l,c){var u=r.resolveArguments(l,c),d=u[0],f=u[1],m=f?"appear":"enter";r.removeClasses(d,m),r.addClass(d,m,"done"),r.props.onEntered&&r.props.onEntered(l,c)},r.onExit=function(l){var c=r.resolveArguments(l),u=c[0];r.removeClasses(u,"appear"),r.removeClasses(u,"enter"),r.addClass(u,"exit","base"),r.props.onExit&&r.props.onExit(l)},r.onExiting=function(l){var c=r.resolveArguments(l),u=c[0];r.addClass(u,"exit","active"),r.props.onExiting&&r.props.onExiting(l)},r.onExited=function(l){var c=r.resolveArguments(l),u=c[0];r.removeClasses(u,"exit"),r.addClass(u,"exit","done"),r.props.onExited&&r.props.onExited(l)},r.resolveArguments=function(l,c){return r.props.nodeRef?[r.props.nodeRef.current,l]:[l,c]},r.getClassNames=function(l){var c=r.props.classNames,u=typeof c=="string",d=u&&c?c+"-":"",f=u?""+d+l:c[l],m=u?f+"-active":c[l+"Active"],h=u?f+"-done":c[l+"Done"];return{baseClassName:f,activeClassName:m,doneClassName:h}},r}var n=t.prototype;return n.addClass=function(a,s,i){var l=this.getClassNames(s)[i+"ClassName"],c=this.getClassNames("enter"),u=c.doneClassName;s==="appear"&&i==="done"&&u&&(l+=" "+u),i==="active"&&a&&ZG(a),l&&(this.appliedClasses[s][i]=l,y0e(a,l))},n.removeClasses=function(a,s){var i=this.appliedClasses[s],l=i.base,c=i.active,u=i.done;this.appliedClasses[s]={},l&&WC(a,l),c&&WC(a,c),u&&WC(a,u)},n.render=function(){var a=this.props;a.classNames;var s=ZP(a,["classNames"]);return o.createElement(v0e,ZE({},s,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(o.Component);QP.defaultProps={classNames:""};QP.propTypes={};const Gh=QP;function b0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JP(e,t){var n=function(s){return t&&p.isValidElement(s)?t(s):s},r=Object.create(null);return e&&p.Children.map(e,function(a){return a}).forEach(function(a){r[a.key]=n(a)}),r}function w0e(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),a=[];for(var s in e)s in t?a.length&&(r[s]=a,a=[]):a.push(s);var i,l={};for(var c in t){if(r[c])for(i=0;i<r[c].length;i++){var u=r[c][i];l[r[c][i]]=n(u)}l[c]=n(c)}for(i=0;i<a.length;i++)l[a[i]]=n(a[i]);return l}function Uf(e,t,n){return n[t]!=null?n[t]:e.props[t]}function E0e(e,t){return JP(e.children,function(n){return p.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:Uf(n,"appear",e),enter:Uf(n,"enter",e),exit:Uf(n,"exit",e)})})}function x0e(e,t,n){var r=JP(e.children),a=w0e(t,r);return Object.keys(a).forEach(function(s){var i=a[s];if(p.isValidElement(i)){var l=s in t,c=s in r,u=t[s],d=p.isValidElement(u)&&!u.props.in;c&&(!l||d)?a[s]=p.cloneElement(i,{onExited:n.bind(null,i),in:!0,exit:Uf(i,"exit",e),enter:Uf(i,"enter",e)}):!c&&l&&!d?a[s]=p.cloneElement(i,{in:!1}):c&&l&&p.isValidElement(u)&&(a[s]=p.cloneElement(i,{onExited:n.bind(null,i),in:u.props.in,exit:Uf(i,"exit",e),enter:Uf(i,"enter",e)}))}}),a}var _0e=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},k0e={component:"div",childFactory:function(t){return t}},eD=function(e){XP(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var i=s.handleExited.bind(b0e(s));return s.state={contextValue:{isMounting:!0}
1202,handleExited:i,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(a,s){var i=s.children,l=s.handleExited,c=s.firstRender;return{children:c?E0e(a,l):x0e(a,i,l),firstRender:!1}},n.handleExited=function(a,s){var i=JP(this.props.children);a.key in i||(a.props.onExited&&a.props.onExited(s),this.mounted&&this.setState(function(l){var c=ZE({},l.children);return delete c[a.key],{children:c}}))},n.render=function(){var a=this.props,s=a.component,i=a.childFactory,l=ZP(a,["component","childFactory"]),c=this.state.contextValue,u=_0e(this.state.children).map(i);return delete l.appear,delete l.enter,delete l.exit,s===null?o.createElement(XE.Provider,{value:c},u):o.createElement(XE.Provider,{value:c},o.createElement(s,l,u))},t}(o.Component);eD.propTypes={};eD.defaultProps=k0e;const XG=eD,QG=p.createContext({hasProvider:!1,stack:{current:[]}}),S0e=({children:e})=>{const t=p.useRef([]),n=p.useMemo(()=>({hasProvider:!0,stack:t}),[t]);return F.jsx(QG.Provider,{value:n,children:e})},J0=[],ww=[],C0e=e=>{e(J0),ww.forEach(t=>t())},GC={getSnapshot:()=>J0,subscribe:e=>(ww.push(e),()=>{const t=ww.indexOf(e);ww.splice(t,1)})};function N0e(){const e=p.useSyncExternalStore(GC.subscribe,GC.getSnapshot,GC.getSnapshot),t=p.useCallback(()=>e[e.length-1],[e]),n=p.useCallback(i=>{const l=e.findIndex(c=>c.id===i);return e.slice(l)},[e]),r=p.useCallback(()=>{C0e(i=>i.splice(0,i.length))},[]),a=p.useCallback(i=>{J0.push(i),i.props.usePortal&&i.props.hasBackdrop&&document.body.classList.add(zd)},[]);return{closeOverlay:p.useCallback(i=>{const l=e.filter(u=>u.props.usePortal&&u.props.hasBackdrop&&u.id!==i),c=J0.findIndex(u=>u.id===i);c>-1&&J0.splice(c,1),l.length===0&&document.body.classList.remove(zd)},[e]),getLastOpened:t,getThisOverlayAndDescendants:n,openOverlay:a,resetStack:r}}function R0e(){const{stack:e,hasProvider:t}=p.useContext(QG),n=N0e(),r=p.useCallback(()=>e.current[e.current.length-1],[e]),a=p.useCallback(c=>{const u=e.current.findIndex(d=>d.id===c);return u===-1?[]:e.current.slice(u)},[e]),s=p.useCallback(()=>{e.current=[]},[e]),i=p.useCallback(c=>{e.current.push(c),c.props.usePortal&&c.props.hasBackdrop&&document.body.classList.add(zd)},[e]),l=p.useCallback(c=>{const u=e.current.filter(f=>f.props.usePortal&&f.props.hasBackdrop&&f.id!==c),d=e.current.findIndex(f=>f.id===c);d>-1&&e.current.splice(d,1),u.length===0&&document.body.classList.remove(zd)},[e]);return t?{closeOverlay:l,getLastOpened:r,getThisOverlayAndDescendants:a,openOverlay:i,resetStack:s}:(Jo("development")&&console.error(hhe),n)}function T0e(e){const t=p.useRef();return p.useEffect(()=>{t.current=e},[e]),t.current}function qh(e){const t=Oo(e);return(t!=null?Kme(t):[]).filter(r=>!r.classList.contains(WP)&&!r.classList.contains(GP))}const A0e=p.createContext({});function Ck({className:e,stopPropagationEvents:t,container:n,onChildrenMount:r,children:a}){const s=p.useContext(A0e),i=n??s.portalContainer??(typeof document<"u"?document.body:void 0),[l,c]=p.useState(),u=p.useCallback(()=>{const d=document.createElement("div");return d.classList.add(bme),qC(d.classList,e),qC(d.classList,s.portalClassName),z3(d,t),d},[e,s.portalClassName,t]);return p.useEffect(()=>{if(i==null)return;const d=u();return i.appendChild(d),c(d),()=>{H3(d,t),d.remove(),c(void 0)}},[i,u,t]),p.useEffect(()=>{l!=null&&(r==null||r())},[l,r]),p.useEffect(()=>{if(l!=null)return qC(l.classList,e),()=>I0e(l.classList,e)},[e,l]),p.useEffect(()=>{if(l!=null)return z3(l,t),()=>H3(l,t)},[l,t]),typeof document>"u"||l==null?null:kl.createPortal(a,l)}Ck.displayName=`${$n}.Portal`;function I0e(e,t){t!=null&&t!==""&&e.remove(...t.split(" "))}function qC(e,t){t!=null&&t!==""&&e.add(...t.split(" "))}function z3(e,t){t==null||t.forEach(n=>e.addEventListener(n,JG))}function H3(e,t){t==null||t.forEach(n=>e.removeEventListener(n,JG))}function JG(e){e.stopPropagation()}const Eg=p.forwardRef((e,t)=>{const{autoFocus:n=!0,backdropClassName:r,backdropProps:a={},canEscapeKeyClose:s=!0,canOutsideClickClose:i=!0,childRef:l,childRefs:c,children:u,className:d,enforceFocus:f=!0,hasBackdrop:m=!0,isOpen:h=!1,lazy:g=kW(),onClose:v,onClosed:y,onClosing:b,onOpened:E,onOpening:w,portalClassName:x,portalContainer:S,shouldReturnFocusOnClose
1202:N=!0,transitionDuration:k=300,transitionName:C=Pl,usePortal:A=!0}=e;O0e(e);const{closeOverlay:O,getLastOpened:T,getThisOverlayAndDescendants:M,openOverlay:L}=R0e(),[D,j]=p.useState(!1),[H,Y]=p.useState(!1),[z,K]=p.useState(!1),ee=p.useRef(null),oe=p.useRef(null),J=p.useRef(null),se=p.useRef(null),B=p.useRef(null),U=p.useRef(null),$=p.useCallback(rt=>requestAnimationFrame(()=>{var xt;const et=rt??Oo(oe),Kt=Vv(et);if(et==null||Kt==null)return;!et.contains(Kt)&&((xt=Oo(se))==null||xt.focus({preventScroll:!0}),j(!1))}),[]),ce=p.useCallback(rt=>{rt!=null&&z&&(K(!1),j(!0),$(rt))},[$,z]),be=p.useMemo(()=>mc(oe,ce),[ce]),ue=M0e(),Ie=p.useRef(null),Ae=p.useCallback(rt=>{const et=rt.composed?rt.composedPath()[0]:rt.target,Kt=Oo(oe);Kt!=null&&et instanceof Node&&!Kt.contains(et)&&(rt.preventDefault(),rt.stopImmediatePropagation(),$())},[$]),he=p.useCallback(rt=>{const et=rt.composed?rt.composedPath()[0]:rt.target;M(ue).some(({containerElement:xt})=>{const rr=Oo(xt);return(rr==null?void 0:rr.contains(et))&&!rr.isSameNode(et)})||v==null||v(rt)},[M,ue,v]),_e=p.useCallback(rt=>{if(rt.key==="Escape"&&s){const et=T();(et==null?void 0:et.id)===ue&&(v==null||v(rt),rt.stopPropagation(),rt.preventDefault())}},[s,T,ue,v]),ie=p.useMemo(()=>mc(t,Ie),[t]);p.useImperativeHandle(ie,()=>({bringFocusInsideOverlay:$,containerElement:oe,handleDocumentFocus:Ae,handleDocumentMousedown:he,id:ue,props:{autoFocus:n,enforceFocus:f,hasBackdrop:m,usePortal:A}}),[n,$,f,Ae,he,m,ue,A]);const Ue=p.useCallback(rt=>{rt.key==="Escape"&&s&&(v==null||v(rt),rt.stopPropagation(),rt.preventDefault())},[s,v]),ae=p.useCallback(()=>{if(Ie.current==null)return;const rt=T();(rt==null?void 0:rt.handleDocumentFocus)!==void 0&&document.removeEventListener("focus",rt.handleDocumentFocus,!0),L(Ie.current),n&&(Oo(oe)!=null?(j(!0),$()):K(!0)),zu(ee,Vv(Oo(oe)))},[n,$,T,L]),pe=p.useCallback(()=>{var et;document.removeEventListener("focus",Ae,!0),document.removeEventListener("mousedown",he),O(ue);const rt=T();rt!==void 0&&rt.props.autoFocus&&rt.props.enforceFocus&&((et=rt.bringFocusInsideOverlay)==null||et.call(rt),rt.handleDocumentFocus!==void 0&&document.addEventListener("focus",rt.handleDocumentFocus,!0))},[O,T,Ae,he,ue]),W=T0e(h)??!1;p.useEffect(()=>{h&&Y(!0),!W&&h&&ae(),W&&!h&&pe()},[h,ae,pe,W]),p.useEffect(()=>{if(!(!h||!(i&&!m)))return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[he,h,i,m]),p.useEffect(()=>{if(!(!h||n!==!1||!s))return document.addEventListener("keydown",_e),()=>{document.removeEventListener("keydown",_e)}},[_e,h,n,s]),p.useEffect(()=>{if(!h||!f)return;const rt=T();if((rt==null?void 0:rt.id)===ue)return document.addEventListener("focus",Ae,!0),()=>{document.removeEventListener("focus",Ae,!0)}},[Ae,f,h,T,ue]);const q=p.useRef(pe);q.current=pe,p.useEffect(()=>()=>{q.current()},[]);const te=p.useCallback(rt=>{const et=Oo(ee);N&&et instanceof HTMLElement&&et.focus(),y==null||y(rt)},[y,N]),X=p.useCallback(()=>{},[]),le=p.useCallback(rt=>{if(l!=null)return l;if(c!=null){const et=rt.key;if(et==null){Jo("production")||console.error(vhe);return}return c[et]}},[l,c]),me=p.useCallback(rt=>{if(rt==null||Ek(rt))return null;const et=le(rt),Kt=zW(rt)?rt.props:{},zn=xk(rt,"span",{className:At(Kt.className,pT),ref:et===void 0?U:void 0,tabIndex:f||n?0:void 0}),xt=et??U;return F.jsx(Gh,{addEndListener:X,classNames:C,nodeRef:xt,onEntered:c1(E,xt),onEntering:c1(w,xt),onExited:c1(te,xt),onExiting:c1(b,xt),timeout:k,children:zn})},[n,f,le,X,te,b,E,w,k,C]),fe=p.useCallback(rt=>{var et;i&&(v==null||v(rt)),f&&$(),(et=a==null?void 0:a.onMouseDown)==null||et.call(a,rt)},[a,$,i,f,v]),ke=p.useCallback((rt,et)=>F.jsx(Gh,{addEndListener:X,classNames:C,nodeRef:et.ref,timeout:k,unmountOnExit:!0,children:F.jsx("div",{tabIndex:0,...et})},rt),[X,k,C]),Se=p.useCallback(rt=>{if(!f||D)return;const et=Oo(oe),Kt=Oo(B);rt.relatedTarget!=null&&(et!=null&&et.contains(rt.relatedTarget))&&rt.relatedTarget!==Kt&&(Kt==null||Kt.focus({preventScroll:!0}))},[f,D]),Et=p.useCallback(rt=>{var et;if(f&&rt.shiftKey&&rt.key==="Tab"){const Kt=qh(oe).pop();Kt!=null?Kt.focus():(et=Oo(B))==null||et.focus({preventScroll:!0})}},[f]),nt=p.useCallback(rt=>{var Kt;
1202const et=Oo(se);if(rt.relatedTarget!=null&&((Kt=Oo(oe))!=null&&Kt.contains(rt.relatedTarget))&&rt.relatedTarget!==et){const zn=qh(oe).shift();!D&&zn!=null&&zn!==rt.relatedTarget?zn.focus():et==null||et.focus({preventScroll:!0})}else{const zn=qh(oe).pop();zn!=null?zn.focus():et==null||et.focus({preventScroll:!0})}},[D]),Pt=p.useMemo(()=>m&&h?F.jsx(Gh,{classNames:C,nodeRef:J,timeout:k,addEndListener:X,children:F.jsx("div",{...a,className:At(iW,r,a==null?void 0:a.className),onMouseDown:fe,ref:J})},"__backdrop"):null,[r,a,fe,X,m,h,k,C]);if(g&&!H)return null;const en=h?p.Children.map(u,me)??[]:[];Pt!==null&&en.unshift(Pt),h&&(n||f)&&en.length>0&&(en.unshift(ke("__start",{className:WP,onFocus:Se,onKeyDown:Et,ref:se})),f&&en.push(ke("__end",{className:GP,onFocus:nt,ref:B})));const hn=F.jsx("div",{"aria-live":"polite",className:At(Pl,{[zd]:h,[oW]:!A},d),onKeyDown:Ue,ref:be,children:F.jsx(XG,{appear:!0,component:null,children:en})});return A?F.jsx(Ck,{className:x,container:S,children:hn}):hn});Eg.displayName=`${$n}.Overlay2`;function O0e({childRef:e,childRefs:t,children:n}){const r=p.Children.count(n);p.useEffect(()=>{Jo("production")||(e!=null&&t!=null&&console.error(phe),r>1&&t==null&&console.error(ghe))},[e,t,r])}function M0e(){const e=p.useId();return`${Eg.displayName}-${e}`}function c1(e,t){return()=>{(t==null?void 0:t.current)!=null&&(e==null||e(t.current))}}const ya=e=>{const{canOutsideClickClose:t=!0,children:n,className:r,containerRef:a,icon:s,isCloseButtonShown:i,isOpen:l=!1,onClose:c,role:u="dialog",style:d,title:f,titleTagName:m=s0e,...h}=e,g=p.useRef(null),v=p.useMemo(()=>`title-${FW("bp-dialog")}`,[]);return wg(()=>{f==null&&(e.icon!=null&&console.warn(DW),e.isCloseButtonShown!=null&&console.warn(LW))},[f,e.icon,e.isCloseButtonShown]),F.jsx(Eg,{...h,isOpen:l,canOutsideClickClose:t,className:mme,childRef:g,hasBackdrop:!0,onClose:c,children:F.jsx("div",{className:Rfe,ref:mc(a,g),children:F.jsxs("div",{"aria-describedby":h["aria-describedby"],"aria-labelledby":h["aria-labelledby"]||(f!=null?v:void 0),"aria-modal":h.enforceFocus??!0,className:At(cf,r),role:u,style:d,children:[f!=null&&F.jsxs("div",{className:Tfe,children:[F.jsx(Ft,{icon:s,size:Nt.STANDARD,"aria-hidden":!0,tabIndex:-1}),F.jsx(m,{id:v,children:f}),i!==!1&&F.jsx(De,{"aria-label":"Close",className:eW,icon:F.jsx(kk,{size:Nt.STANDARD}),onClick:c,variant:"minimal"})]}),n]})})})};ya.displayName=`${$n}.Dialog`;const xg=e=>{const{cancelButtonText:t,canEscapeKeyCancel:n=!1,canOutsideClickCancel:r=!1,children:a,className:s,confirmButtonText:i="OK",icon:l,intent:c,isOpen:u=!1,loading:d=!1,onCancel:f,onClose:m,onConfirm:h,...g}=e;wg(()=>{m==null&&t==null!=(f==null)&&console.warn(Xme);const E=f!=null||m!=null;n&&!E&&console.warn(Qme),r&&!E&&console.warn(Jme)},[n,r,t,f,m]);const v=p.useCallback((E,w)=>{var x;(x=E?h:f)==null||x(w),m==null||m(E,w)},[f,m,h]),y=p.useCallback(E=>v(!1,E),[v]),b=p.useCallback(E=>v(!0,E),[v]);return F.jsxs(ya,{...g,role:"alertdialog",className:At(hk,s),canEscapeKeyClose:n,canOutsideClickClose:r,isOpen:u,onClose:y,children:[F.jsxs("div",{className:hfe,children:[F.jsx(Ft,{icon:l,size:40,intent:c}),F.jsx("div",{className:pfe,children:a})]}),F.jsxs("div",{className:gfe,children:[F.jsx(De,{loading:d,intent:c,text:i,onClick:b}),t&&F.jsx(De,{text:t,disabled:d,onClick:y})]})]})};xg.displayName=`${$n}.Alert`;const Cr=e=>{const{className:t,children:n,large:r,size:a="medium",small:s,ulRef:i,...l}=e;return F.jsx("ul",{role:"menu",...l,className:At(t,gk,ud(a,{large:r,small:s})),ref:i,children:n})};Cr.displayName=`${$n}.Menu`;var po="top",Dl="bottom",Ll="right",go="left",tD="auto",Zy=[po,Dl,Ll,go],$p="start",Bv="end",P0e="clippingParents",eq="viewport",i0="popper",D0e="reference",V3=Zy.reduce(function(e,t){return e.concat([t+"-"+$p,t+"-"+Bv])},[]),tq=[].concat(Zy,[tD]).reduce(function(e,t){return e.concat([t,t+"-"+$p,t+"-"+Bv])},[]),L0e="beforeRead",$0e="read",F0e="afterRead",z0e="beforeMain",H0e="main",V0e="afterMain",U0e="beforeWrite",B0e="write",j0e="afterWrite",W0e=[L0e,$0e,F0e,z0e,H0e,V0e,U0e,B0e,j0e];function Xc(e){return e?(e.nodeName||"").toLowerCase():null}function el(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Em(e){var t=el(e).Element;return e instanceof t||e instanceof Element}function Ol(e){var t=el(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function nD(e){if(typeof ShadowRoot>"u")return!1;var t=el(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function G0e(e){var t=e.state;
vendor: 17,102 bytes, line 1202
1202Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},s=t.elements[n];!Ol(s)||!Xc(s)||(Object.assign(s.style,r),Object.keys(a).forEach(function(i){var l=a[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function q0e(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var a=t.elements[r],s=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=i.reduce(function(c,u){return c[u]="",c},{});!Ol(a)||!Xc(a)||(Object.assign(a.style,l),Object.keys(s).forEach(function(c){a.removeAttribute(c)}))})}}const Y0e={name:"applyStyles",enabled:!0,phase:"write",fn:G0e,effect:q0e,requires:["computeStyles"]};function jc(e){return e.split("-")[0]}var am=Math.max,QE=Math.min,Fp=Math.round;function wT(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function nq(){return!/^((?!chrome|android).)*safari/i.test(wT())}function zp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,s=1;t&&Ol(e)&&(a=e.offsetWidth>0&&Fp(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Fp(r.height)/e.offsetHeight||1);var i=Em(e)?el(e):window,l=i.visualViewport,c=!nq()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/a,d=(r.top+(c&&l?l.offsetTop:0))/s,f=r.width/a,m=r.height/s;return{width:f,height:m,top:d,right:u+f,bottom:d+m,left:u,x:u,y:d}}function rD(e){var t=zp(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function rq(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&nD(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ed(e){return el(e).getComputedStyle(e)}function K0e(e){return["table","td","th"].indexOf(Xc(e))>=0}function uf(e){return((Em(e)?e.ownerDocument:e.document)||window.document).documentElement}function Nk(e){return Xc(e)==="html"?e:e.assignedSlot||e.parentNode||(nD(e)?e.host:null)||uf(e)}function U3(e){return!Ol(e)||ed(e).position==="fixed"?null:e.offsetParent}function Z0e(e){var t=/firefox/i.test(wT()),n=/Trident/i.test(wT());if(n&&Ol(e)){var r=ed(e);if(r.position==="fixed")return null}var a=Nk(e);for(nD(a)&&(a=a.host);Ol(a)&&["html","body"].indexOf(Xc(a))<0;){var s=ed(a);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return a;a=a.parentNode}return null}function Xy(e){for(var t=el(e),n=U3(e);n&&K0e(n)&&ed(n).position==="static";)n=U3(n);return n&&(Xc(n)==="html"||Xc(n)==="body"&&ed(n).position==="static")?t:n||Z0e(e)||t}function aD(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ev(e,t,n){return am(e,QE(t,n))}function X0e(e,t,n){var r=ev(e,t,n);return r>n?n:r}function aq(){return{top:0,right:0,bottom:0,left:0}}function sq(e){return Object.assign({},aq(),e)}function iq(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Q0e=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,sq(typeof t!="number"?t:iq(t,Zy))};function J0e(e){var t,n=e.state,r=e.name,a=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=jc(n.placement),c=aD(l),u=[go,Ll].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=Q0e(a.padding,n),m=rD(s),h=c==="y"?po:go,g=c==="y"?Dl:Ll,v=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],y=i[c]-n.rects.reference[c],b=Xy(s),E=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,w=v/2-y/2,x=f[h],S=E-m[d]-f[g],N=E/2-m[d]/2+w,k=ev(x,N,S),C=c;n.modifiersData[r]=(t={},t[C]=k,t.centerOffset=k-N,t)}}function eve(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||rq(t.elements.popper,a)&&(t.elements.arrow=a))}const tve={name:"arrow",enabled:!0,phase:"main",fn:J0e,effect:eve,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Hp(e){return e.split("-")[1]}var nve={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rve(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:Fp(n*a)/a||0,y:Fp(r*a)/a||0}}function B3(e){var t,n=e.popper,r=e.popperRect,a=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,m=i.x,h=m===void 0?0:m,g=i.y,v=g===void 0?0:g,y=typeof d=="function"?d({x:h,y:v}):{x:h,y:v};h=y.x,v=y.y;var b=i.hasOwnProperty("x"),E=i.hasOwnProperty("y"),w=go,x=po,S=window;if(u){var N=Xy(n),k="clientHeight",C="clientWidth";if(N===el(n)&&(N=uf(n),ed(N).position!=="static"&&l==="absolute"&&(k="scrollHeight",C="scrollWidth")),N=N,a===po||(a===go||a===Ll)&&s===Bv){x=Dl;var A=f&&N===S&&S.visualViewport?S.visualViewport.height:N[k];v-=A-r.height,v*=c?1:-1}if(a===go||(a===po||a===Dl)&&s===Bv){w=Ll;var O=f&&N===S&&S.visualViewport?S.visualViewport.width:N[C];h-=O-r.width,h*=c?1:-1}}var T=Object.assign({position:l},u&&nve),M=d===!0?rve({x:h,y:v},el(n)):{x:h,y:v};if(h=M.x,v=M.y,c){var L;return Object.assign({},T,(L={},L[x]=E?"0":"",L[w]=b?"0":"",L.transform=(S.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",L))}return Object.assign({},T,(t={},t[x]=E?v+"px":"",t[w]=b?h+"px":"",t.transform="",t))}function ave(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:jc(t.placement),variation:Hp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,B3(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,B3(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const sve={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ave,data:{}};var u1={passive:!0};function ive(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,s=a===void 0?!0:a,i=r.resize,l=i===void 0?!0:i,c=el(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,u1)}),l&&c.addEventListener("resize",n.update,u1),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,u1)}),l&&c.removeEventListener("resize",n.update,u1)}}const ove={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ive,data:{}};var lve={left:"right",right:"left",bottom:"top",top:"bottom"};function Ew(e){return e.replace(/left|right|bottom|top/g,function(t){return lve[t]})}var cve={start:"end",end:"start"};function j3(e){return e.replace(/start|end/g,function(t){return cve[t]})}function sD(e){var t=el(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function iD(e){return zp(uf(e)).left+sD(e).scrollLeft}function uve(e,t){var n=el(e),r=uf(e),a=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){s=a.width,i=a.height;var u=nq();(u||!u&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:s,height:i,x:l+iD(e),y:c}}function dve(e){var t,n=uf(e),r=sD(e),a=(t=e.ownerDocument)==null?void 0:t.body,s=am(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=am(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-r.scrollLeft+iD(e),c=-r.scrollTop;return ed(a||n).direction==="rtl"&&(l+=am(n.clientWidth,a?a.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function oD(e){var t=ed(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function oq(e){return["html","body","#document"].indexOf(Xc(e))>=0?e.ownerDocument.body:Ol(e)&&oD(e)?e:oq(Nk(e))}function tv(e,t){var n;t===void 0&&(t=[]);var r=oq(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),s=el(r),i=a?[s].concat(s.visualViewport||[],oD(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(tv(Nk(i)))}function ET(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fve(e,t){var n=zp(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function W3(e,t,n){return t===eq?ET(uve(e,n)):Em(t)?fve(t,n):ET(dve(uf(e)))}function mve(e){var t=tv(Nk(e)),n=["absolute","fixed"].indexOf(ed(e).position)>=0,r=n&&Ol(e)?Xy(e):e;return Em(r)?t.filter(function(a){return Em(a)&&rq(a,r)&&Xc(a)!=="body"}):[]}function hve(e,t,n,r){var a=t==="clippingParents"?mve(e):[].concat(t),s=[].concat(a,[n]),i=s[0],l=s.reduce(function(c,u){var d=W3(e,u,r);return c.top=am(d.top,c.top),c.right=QE(d.right,c.right),c.bottom=QE(d.bottom,c.bottom),c.left=am(d.left,c.left),c},W3(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function lq(e){var t=e.reference,n=e.element,r=e.placement,a=r?jc(r):null,s=r?Hp(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(a){case po:c={x:i,y:t.y-n.height};break;case Dl:c={x:i,y:t.y+t.height};break;case Ll:c={x:t.x+t.width,y:l};break;case go:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=a?aD(a):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case $p:c[u]=c[u]-(t[d]/2-n[d]/2);break;case Bv:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function jv(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,l=n.boundary,c=l===void 0?P0e:l,u=n.rootBoundary,d=u===void 0?eq:u,f=n.elementContext,m=f===void 0?i0:f,h=n.altBoundary,g=h===void 0?!1:h,v=n.padding,y=v===void 0?0:v,b=sq(typeof y!="number"?y:iq(y,Zy)),E=m===i0?D0e:i0,w=e.rects.popper,x=e.elements[g?E:m],S=hve(Em(x)?x:x.contextElement||uf(e.elements.popper),c,d,i),N=zp(e.elements.reference),k=lq({reference:N,element:w,strategy:"absolute",placement:a}),C=ET(Object.assign({},w,k)),A=m===i0?C:N,O={top:S.top-A.top+b.top,bottom:A.bottom-S.bottom+b.bottom,left:S.left-A.left+b.left,right:A.right-S.right+b.right},T=e.modifiersData.offset;if(m===i0&&T){var M=T[a];Object.keys(O).forEach(function(L){var D=[Ll,Dl].indexOf(L)>=0?1:-1,j=[po,Dl].indexOf(L)>=0?"y":"x";O[L]+=M[j]*D})}return O}function pve(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?tq:c,d=Hp(r),f=d?l?V3:V3.filter(function(g){return Hp(g)===d}):Zy,m=f.filter(function(g){return u.indexOf(g)>=0});m.length===0&&(m=f);var h=m.reduce(function(g,v){return g[v]=jv(e,{placement:v,boundary:a,rootBoundary:s,padding:i})[jc(v)],g},{});return Object.keys(h).sort(function(g,v){return h[g]-h[v]})}function gve(e){if(jc(e)===tD)return[];var t=Ew(e);return[j3(e),t,j3(t)]}function vve(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,s=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,m=n.altBoundary,h=n.flipVariations,g=h===void 0?!0:h,v=n.allowedAutoPlacements,y=t.options.placement,b=jc(y),E=b===y,w=c||(E||!g?[Ew(y)]:gve(y)),x=[y].concat(w).reduce(function(B,U){return B.concat(jc(U)===tD?pve(t,{placement:U,boundary:d,rootBoundary:f,padding:u,flipVariations:g,allowedAutoPlacements:v}):U)},[]),S=t.rects.reference,N=t.rects.popper,k=new Map,C=!0,A=x[0],O=0;O<x.length;O++){var T=x[O],M=jc(T),L=Hp(T)===$p,D=[po,Dl].indexOf(M)>=0,j=D?"width":"height",H=jv(t,{placement:T,boundary:d,rootBoundary:f,altBoundary:m,padding:u}),Y=D?L?Ll:go:L?Dl:po;S[j]>N[j]&&(Y=Ew(Y));var z=Ew(Y),K=[];if(s&&K.push(H[M]<=0),l&&K.push(H[Y]<=0,H[z]<=0),K.every(function(B){return B})){A=T,C=!1;break}k.set(T,K)}if(C)for(var ee=g?3:1,oe=function(U){var $=x.find(function(ce){var be=k.get(ce);if(be)return be.slice(0,U).every(function(ue){return ue})});if($)return A=$,"break"},J=ee;J>0;J--){var se=oe(J);if(se==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const yve={name:"flip",enabled:!0,phase:"main",fn:vve,requiresIfExists:["offset"],data:{_skip:!1}};function G3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function q3(e){return[po,Ll,Dl,go].some(function(t){return e[t]>=0})}function bve(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,s=t.modifiersData.preventOverflow,i=jv(t,{elementContext:"reference"}),l=jv(t,{altBoundary:!0}),c=G3(i,r),u=G3(l,a,s),d=q3(c),f=q3(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const wve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bve};function Eve(e,t,n){var r=jc(e),a=[go,po].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*a,[go,Ll].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function xve(e){var t=e.state,n=e.options,r=e.name,a=n.offset,s=a===void 0?[0,0]:a,i=tq.reduce(function(d,f){return d[f]=Eve(f,t.rects,s),d},{}),l=i[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const _ve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xve};function kve(e){var t=e.state,n=e.name;t.modifiersData[n]=lq({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Sve={name:"popperOffsets",enabled:!0,phase:"read",fn:kve,data:{}};function Cve(e){return e==="x"?"y":"x"}function Nve(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,s=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,m=n.tether,h=m===void 0?!0:m,g=n.tetherOffset,v=g===void 0?0:g,y=jv(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),b=jc(t.placement),E=Hp(t.placement),w=!E,x=aD(b),S=Cve(x),N=t.modifiersData.popperOffsets,k=t.rects.reference,C=t.rects.popper,A=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,O=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(N){if(s){var L,D=x==="y"?po:go,j=x==="y"?Dl:Ll,H=x==="y"?"height":"width",Y=N[x],z=Y+y[D],K=Y-y[j],ee=h?-C[H]/2:0,oe=E===$p?k[H]:C[H],J=E===$p?-C[H]:-k[H],se=t.elements.arrow,B=h&&se?rD(se):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aq(),$=U[D],ce=U[j],be=ev(0,k[H],B[H]),ue=w?k[H]/2-ee-be-$-O.mainAxis:oe-be-$-O.mainAxis,Ie=w?-k[H]/2+ee+be+ce+O.mainAxis:J+be+ce+O.mainAxis,Ae=t.elements.arrow&&Xy(t.elements.arrow),he=Ae?x==="y"?Ae.clientTop||0:Ae.clientLeft||0:0,_e=(L=T==null?void 0:T[x])!=null?L:0,ie=Y+ue-_e-he,Ue=Y+Ie-_e,ae=ev(h?QE(z,ie):z,Y,h?am(K,Ue):K);N[x]=ae,M[x]=ae-Y}if(l){var pe,W=x==="x"?po:go,q=x==="x"?Dl:Ll,te=N[S],X=S==="y"?"height":"width",le=te+y[W],me=te-y[q],fe=[po,go].indexOf(b)!==-1,ke=(pe=T==null?void 0:T[S])!=null?pe:0,Se=fe?le:te-k[X]-C[X]-ke+O.altAxis,Et=fe?te+k[X]+C[X]-ke-O.altAxis:me,nt=h&&fe?X0e(Se,te,Et):ev(h?Se:le,te,h?Et:me);N[S]=nt,M[S]=nt-te}t.modifiersData[r]=M}}const Rve={name:"preventOverflow",enabled:!0,phase:"main",fn:Nve,requiresIfExists:["offset"]};function Tve(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ave(e){return e===el(e)||!Ol(e)?sD(e):Tve(e)}function Ive(e){var t=e.getBoundingClientRect(),n=Fp(t.width)/e.offsetWidth||1,r=Fp(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ove(e,t,n){n===void 0&&(n=!1);var r=Ol(t),a=Ol(t)&&Ive(t),s=uf(t),i=zp(e,a,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Xc(t)!=="body"||oD(s))&&(l=Ave(t)),Ol(t)?(c=zp(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=iD(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function Mve(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function a(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&a(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||a(s)}),r}function Pve(e){var t=Mve(e);return W0e.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function Dve(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}
1202function Lve(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Y3={placement:"bottom",modifiers:[],strategy:"absolute"};function K3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function $ve(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,a=t.defaultOptions,s=a===void 0?Y3:a;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Y3,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],m=!1,h={state:d,setOptions:function(b){var E=typeof b=="function"?b(d.options):b;v(),d.options=Object.assign({},s,d.options,E),d.scrollParents={reference:Em(l)?tv(l):l.contextElement?tv(l.contextElement):[],popper:tv(c)};var w=Pve(Lve([].concat(r,d.options.modifiers)));return d.orderedModifiers=w.filter(function(x){return x.enabled}),g(),h.update()},forceUpdate:function(){if(!m){var b=d.elements,E=b.reference,w=b.popper;if(K3(E,w)){d.rects={reference:Ove(E,Xy(w),d.options.strategy==="fixed"),popper:rD(w)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(O){return d.modifiersData[O.name]=Object.assign({},O.data)});for(var x=0;x<d.orderedModifiers.length;x++){if(d.reset===!0){d.reset=!1,x=-1;continue}var S=d.orderedModifiers[x],N=S.fn,k=S.options,C=k===void 0?{}:k,A=S.name;typeof N=="function"&&(d=N({state:d,options:C,name:A,instance:h})||d)}}}},update:Dve(function(){return new Promise(function(y){h.forceUpdate(),y(d)})}),destroy:function(){v(),m=!0}};if(!K3(l,c))return h;h.setOptions(u).then(function(y){!m&&u.onFirstUpdate&&u.onFirstUpdate(y)});function g(){d.orderedModifiers.forEach(function(y){var b=y.name,E=y.options,w=E===void 0?{}:E,x=y.effect;if(typeof x=="function"){var S=x({state:d,name:b,instance:h,options:w}),N=function(){};f.push(S||N)}})}function v(){f.forEach(function(y){return y()}),f=[]}return h}}var Fve=[ove,Sve,sve,Y0e,_ve,yve,Rve,tve,wve],zve=$ve({defaultModifiers:Fve});function Qy(e){return e.split("-")[0]}function Z3(e){return["left","right"].indexOf(e)!==-1}function d1(e){switch(e){case"top":return"bottom";case"left":return"right";case"bottom":return"top";default:return"left"}}function X3(e){switch(e.split("-")[1]){case"start":return"left";case"end":return"right";default:return"center"}}function cq(e,t){const n=Qy(e);return t===void 0?Z3(n)?`${d1(n)} ${X3(n)}`:`${X3(n)} ${d1(n)}`:Z3(n)?`${d1(n)} ${parseInt(t.top,10)+15}px`:`${parseInt(t.left,10)+15}px ${d1(n)}`}const Hve="M8.11 6.302c1.015-.936 1.887-2.922 1.887-4.297v26c0-1.378-.868-3.357-1.888-4.297L.925 17.09c-1.237-1.14-1.233-3.034 0-4.17L8.11 6.302z",Vve="M8.787 7.036c1.22-1.125 2.21-3.376 2.21-5.03V0v30-2.005c0-1.654-.983-3.9-2.21-5.03l-7.183-6.616c-.81-.746-.802-1.96 0-2.7l7.183-6.614z",Uve=4,Vp=30,Bve=22;function jve(e){if(e==null)return 0;switch(Qy(e)){case"top":return-90;case"left":return 180;case"bottom":return 90;default:return 0}}function Wve(e){const t=Vp/2-Uve;switch(Qy(e)){case"top":return{bottom:-t};case"left":return{right:-t};case"bottom":return{top:-t};default:return{left:-t}}}const lD=({arrowProps:{ref:e,style:t},placement:n})=>F.jsx("div",{"aria-hidden":!0,className:BC,"data-popper-arrow":!0,ref:e,style:{...t,...Wve(n)},children:F.jsxs("svg",{viewBox:`0 0 ${Vp} ${Vp}`,style:{transform:`rotate(${jve(n)}deg)`}
vendor: 4,480 bytes, line 1202
1202,children:[F.jsx("path",{className:BC+"-border",d:Hve}),F.jsx("path",{className:BC+"-fill",d:Vve})]})});lD.displayName=`${$n}.PopoverArrow`;const Ka={CLICK:"click",CLICK_TARGET_ONLY:"click-target",HOVER:"hover",HOVER_TARGET_ONLY:"hover-target"},Q3={MINIMAL:"minimal",SCALE:"scale"};function Rk(){return typeof window<"u"}function _g(e){return uq(e)?(e.nodeName||"").toLowerCase():"#document"}function Yo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function iu(e){var t;return(t=(uq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function uq(e){return Rk()?e instanceof Node||e instanceof Yo(e).Node:!1}function bs(e){return Rk()?e instanceof Element||e instanceof Yo(e).Element:!1}function il(e){return Rk()?e instanceof HTMLElement||e instanceof Yo(e).HTMLElement:!1}function xT(e){return!Rk()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yo(e).ShadowRoot}function Jy(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=$l(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function Gve(e){return/^(table|td|th)$/.test(_g(e))}function Tk(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const qve=/transform|translate|scale|rotate|perspective|filter/,Yve=/paint|layout|strict|content/,Ef=e=>!!e&&e!=="none";let YC;function cD(e){const t=bs(e)?$l(e):e;return Ef(t.transform)||Ef(t.translate)||Ef(t.scale)||Ef(t.rotate)||Ef(t.perspective)||!Ak()&&(Ef(t.backdropFilter)||Ef(t.filter))||qve.test(t.willChange||"")||Yve.test(t.contain||"")}function Kve(e){let t=td(e);for(;il(t)&&!Wu(t);){if(cD(t))return t;if(Tk(t))return null;t=td(t)}return null}function Ak(){return YC==null&&(YC=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),YC}function Wu(e){return/^(html|body|#document)$/.test(_g(e))}function $l(e){return Yo(e).getComputedStyle(e)}function Ik(e){return bs(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function td(e){if(_g(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xT(e)&&e.host||iu(e);return xT(t)?t.host:t}function dq(e){const t=td(e);return Wu(t)?e.ownerDocument?e.ownerDocument.body:e.body:il(t)&&Jy(t)?t:dq(t)}function Vd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=dq(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),i=Yo(a);if(s){const l=_T(i);return t.concat(i,i.visualViewport||[],Jy(a)?a:[],l&&n?Vd(l):[])}else return t.concat(a,Vd(a,[],n))}function _T(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const fq=["top","right","bottom","left"],J3=["start","end"],eF=fq.reduce((e,t)=>e.concat(t,t+"-"+J3[0],t+"-"+J3[1]),[]),hc=Math.min,Ei=Math.max,JE=Math.round,f1=Math.floor,Wc=e=>({x:e,y:e}),Zve={left:"right",right:"left",bottom:"top",top:"bottom"};function kT(e,t,n){return Ei(e,hc(t,n))}function fd(e,t){return typeof e=="function"?e(t):e}function Fl(e){return e.split("-")[0]}function lc(e){return e.split("-")[1]}function mq(e){return e==="x"?"y":"x"}function uD(e){return e==="y"?"height":"width"}function zc(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dD(e){return mq(zc(e))}function hq(e,t,n){n===void 0&&(n=!1);const r=lc(e),a=dD(e),s=uD(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=tx(i)),[i,tx(i)]}function Xve(e){const t=tx(e);return[ex(e),t,ex(t)]}function ex(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const tF=["left","right"],nF=["right","left"],Qve=["top","bottom"],Jve=["bottom","top"];function eye(e,t,n){switch(e){case"top":case"bottom":return n?t?nF:tF:t?tF:nF;case"left":case"right":return t?Qve:Jve;default:return[]}}function tye(e,t,n,r){const a=lc(e);let s=eye(Fl(e),n==="start",r);return a&&(s=s.map(i=>i+"-"+a),t&&(s=s.concat(s.map(ex)))),s}function tx(e){const t=Fl(e);return Zve[t]+e.slice(t.length)}function nye(e){return{top:0,right:0,bottom:0,left:0,...e}}function fD(e){return typeof e!="number"?nye(e):{top:e,right:e,bottom:e,left:e}}function Up(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}const rye="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function rF(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;
1202if(n&&xT(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function o0(e){return"composedPath"in e?e.composedPath()[0]:e.target}function KC(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function aye(e){return e.matches("html,body")}function aF(e){return(e==null?void 0:e.ownerDocument)||document}function sye(e){return il(e)&&e.matches(rye)}function xw(e,t,n){return n===void 0&&(n=!0),e.filter(a=>{var s;return a.parentId===t&&(!n||((s=a.context)==null?void 0:s.open))}).flatMap(a=>[a,...xw(e,a.id,n)])}function iye(e){return"nativeEvent"in e}function sF(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var oye=typeof document<"u",lye=function(){},ST=oye?p.useLayoutEffect:lye;const cye={...rE},uye=cye.useInsertionEffect,dye=uye||(e=>e());function Eh(e){const t=p.useRef(()=>{});return dye(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return t.current==null?void 0:t.current(...r)},[])}function iF(e,t,n){let{reference:r,floating:a}=e;const s=zc(t),i=dD(t),l=uD(i),c=Fl(t),u=s==="y",d=r.x+r.width/2-a.width/2,f=r.y+r.height/2-a.height/2,m=r[l]/2-a[l]/2;let h;switch(c){case"top":h={x:d,y:r.y-a.height};break;case"bottom":h={x:d,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-a.width,y:f};break;default:h={x:r.x,y:r.y}}switch(lc(t)){case"start":h[i]-=m*(n&&u?-1:1);break;case"end":h[i]+=m*(n&&u?-1:1);break}return h}async function fye(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=fd(t,e),g=fD(h),y=l[m?f==="floating"?"reference":"floating":f],b=Up(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),E=f==="floating"?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),x=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},S=Up(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:w,strategy:c}):E);return{top:(b.top-S.top+g.top)/x.y,bottom:(S.bottom-b.bottom+g.bottom)/x.y,left:(b.left-S.left+g.left)/x.x,right:(S.right-b.right+g.right)/x.x}}const mye=50,hye=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:fye},c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:f}=iF(u,r,c),m=r,h=0;const g={};for(let v=0;v<s.length;v++){const y=s[v];if(!y)continue;const{name:b,fn:E}=y,{x:w,y:x,data:S,reset:N}=await E({x:d,y:f,initialPlacement:r,placement:m,strategy:a,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});d=w??d,f=x??f,g[b]={...g[b],...S},N&&h<mye&&(h++,typeof N=="object"&&(N.placement&&(m=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:d,y:f}=iF(u,m,c)),v=-1)}return{x:d,y:f,placement:m,strategy:a,middlewareData:g}},pye=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:s,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=fd(e,t)||{};if(u==null)return{};const f=fD(d),m={x:n,y:r},h=dD(a),g=uD(h),v=await i.getDimensions(u),y=h==="y",b=y?"top":"left",E=y?"bottom":"right",w=y?"clientHeight":"clientWidth",x=s.reference[g]+s.reference[h]-m[h]-s.floating[g],S=m[h]-s.reference[h],N=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let k=N?N[w]:0;(!k||!await(i.isElement==null?void 0:i.isElement(N)))&&(k=l.floating[w]||s.floating[g]);const C=x/2-S/2,A=k/2-v[g]/2-1,O=hc(f[b],A),T=hc(f[E],A),M=O,L=k-v[g]-T,D=k/2-v[g]/2+C,j=kT(M,D,L),H=!c.arrow&&lc(a)!=null&&D!==j&&s.reference[g]/2-(D<M?O:T)-v[g]/2<0,Y=H?D<M?D-M:D-L:0;return{[h]:m[h]+Y,data:{[h]:j,centerOffset:D-j-Y,...H&&{alignmentOffset:Y}},reset:H}}});function gye(e,t,n){return(e?[...n.filter(a=>lc(a)===e),...n.filter(a=>lc(a)!==e)]:n.filter(a=>Fl(a)===a)).filter(a=>e?lc(a)===e||(t?ex(a)!==a:!1):!0)}const vye=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,a;const{rects:s,middlewareData:i,placement:l,platform:c,elements:u}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:m=eF,autoAlignment:h=!0,...g}=fd(e,t),v=f!==void 0||m===eF?gye(f||null,h,m):m,y=await c.detectOverflow(t,g),b=((n=i.autoPlacement)==null?void 0:n.index)||0,E=v[b];if(E==null)return{};const w=hq(E,s,await(c.isRTL==null?void 0:c.isRTL(u.floating)));if(l!==E)return{reset:{placement:v[0]}};const x=[y[Fl(E)],y[w[0]],y[w[1]]],S=[...((r=i.autoPlacement)==null?void 0:r.overflows)||[],{placement:E,overflows:x}],N=v[b+1];if(N)return{data:{index:b+1,overflows:S},reset:{placement:N}};const k=S.map(O=>{const T=lc(O.placement);return[O.placement,T&&d?O.overflows.slice(0,2).reduce((M,L)=>M+L,0):O.overflows[0],O.overflows]}).sort((O,T)=>O[1]-T[1]),A=((a=k.filter(O=>O[2].slice(0,lc(O[0])?2:3).every(T=>T<=0))[0])==null?void 0:a[0])||k[0][0];return A!==l?{data:{index:b+1,overflows:S},reset:{placement:A}}:{}}}},yye=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...y}=fd(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=Fl(a),E=zc(l),w=Fl(l)===l,x=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=m||(w||!v?[tx(l)]:Xve(l)),N=g!=="none";!m&&N&&S.push(...tye(l,v,g,x));
1202const k=[l,...S],C=await c.detectOverflow(t,y),A=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&A.push(C[b]),f){const D=hq(a,i,x);A.push(C[D[0]],C[D[1]])}if(O=[...O,{placement:a,overflows:A}],!A.every(D=>D<=0)){var T,M;const D=(((T=s.flip)==null?void 0:T.index)||0)+1,j=k[D];if(j&&(!(f==="alignment"?E!==zc(j):!1)||O.every(z=>zc(z.placement)===E?z.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:j}};let H=(M=O.filter(Y=>Y.overflows[0]<=0).sort((Y,z)=>Y.overflows[1]-z.overflows[1])[0])==null?void 0:M.placement;if(!H)switch(h){case"bestFit":{var L;const Y=(L=O.filter(z=>{if(N){const K=zc(z.placement);return K===E||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,ee)=>K+ee,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:L[0];Y&&(H=Y);break}case"initialPlacement":H=l;break}if(a!==H)return{reset:{placement:H}}}return{}}}};function oF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lF(e){return fq.some(t=>e[t]>=0)}const bye=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...s}=fd(e,t);switch(a){case"referenceHidden":{const i=await r.detectOverflow(t,{...s,elementContext:"reference"}),l=oF(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:lF(l)}}}case"escaped":{const i=await r.detectOverflow(t,{...s,altBoundary:!0}),l=oF(i,n.floating);return{data:{escapedOffsets:l,escaped:lF(l)}}}default:return{}}}}};function pq(e){const t=hc(...e.map(s=>s.left)),n=hc(...e.map(s=>s.top)),r=Ei(...e.map(s=>s.right)),a=Ei(...e.map(s=>s.bottom));return{x:t,y:n,width:r-t,height:a-n}}function wye(e){const t=e.slice().sort((a,s)=>a.y-s.y),n=[];let r=null;for(let a=0;a<t.length;a++){const s=t[a];!r||s.y-r.y>r.height/2?n.push([s]):n[n.length-1].push(s),r=s}return n.map(a=>Up(pq(a)))}const Eye=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:a,platform:s,strategy:i}=t,{padding:l=2,x:c,y:u}=fd(e,t),d=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(r.reference))||[]),f=wye(d),m=Up(pq(d)),h=fD(l);function g(){if(f.length===2&&f[0].left>f[1].right&&c!=null&&u!=null)return f.find(y=>c>y.left-h.left&&c<y.right+h.right&&u>y.top-h.top&&u<y.bottom+h.bottom)||m;if(f.length>=2){if(zc(n)==="y"){const O=f[0],T=f[f.length-1],M=Fl(n)==="top",L=O.top,D=T.bottom,j=M?O.left:T.left,H=M?O.right:T.right,Y=H-j,z=D-L;return{top:L,bottom:D,left:j,right:H,width:Y,height:z,x:j,y:L}}const y=Fl(n)==="left",b=Ei(...f.map(O=>O.right)),E=hc(...f.map(O=>O.left)),w=f.filter(O=>y?O.left===E:O.right===b),x=w[0].top,S=w[w.length-1].bottom,N=E,k=b,C=k-N,A=S-x;return{top:x,bottom:S,left:N,right:k,width:C,height:A,x:N,y:x}}return m}const v=await s.getElementRects({reference:{getBoundingClientRect:g},floating:r.floating,strategy:i});return a.reference.x!==v.reference.x||a.reference.y!==v.reference.y||a.reference.width!==v.reference.width||a.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},xye=new Set(["left","top"]);async function _ye(e,t){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=Fl(n),l=lc(n),c=zc(n)==="y",u=xye.has(i)?-1:1,d=s&&c?-1:1,f=fd(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof g=="number"&&(h=l==="end"?g*-1:g),c?{x:h*d,y:m*u}:{x:m*u,y:h*d}}const kye=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:s,placement:i,middlewareData:l}=t,c=await _ye(t,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:i}}}}},Sye=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:s}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x:E,y:w}=b;return{x:E,y:w}}},...u}=fd(e,t),d={x:n,y:r},f=await s.detectOverflow(t,u),m=zc(Fl(a)),h=mq(m);let g=d[h],v=d[m];if(i){const b=h==="y"?"top":"left",E=h==="y"?"bottom":"right",w=g+f[b],x=g-f[E];g=kT(w,g,x)}if(l){const b=m==="y"?"top":"left",E=m==="y"?"bottom":"right",w=v+f[b],x=v-f[E];v=kT(w,v,x)}const y=c.fn({...t,[h]:g,[m]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[h]:i,[m]:l}}}}}},Cye=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:s,platform:i,elements:l}=t,{apply:c=()=>{},...u}=fd(e,t),d=await i.detectOverflow(t,u),f=Fl(a),m=lc(a),h=zc(a)==="y",{width:g,height:v}=s.floating;let y,b;f==="top"||f==="bottom"?(y=f,b=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(b=f,y=m==="end"?"top":"bottom");const E=v-d.top-d.bottom,w=g-d.left-d.right,x=hc(v-d[y],E),S=hc(g-d[b],w),N=!t.middlewareData.shift;let k=x,C=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=E),N&&
vendor: 4,868 bytes, line 1202
1202!m){const O=Ei(d.left,0),T=Ei(d.right,0),M=Ei(d.top,0),L=Ei(d.bottom,0);h?C=g-2*(O!==0||T!==0?O+T:Ei(d.left,d.right)):k=v-2*(M!==0||L!==0?M+L:Ei(d.top,d.bottom))}await c({...t,availableWidth:C,availableHeight:k});const A=await i.getDimensions(l.floating);return g!==A.width||v!==A.height?{reset:{rects:!0}}:{}}}};function gq(e){const t=$l(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=il(e),s=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=JE(n)!==s||JE(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function mD(e){return bs(e)?e:e.contextElement}function Yh(e){const t=mD(e);if(!il(t))return Wc(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=gq(t);let i=(s?JE(n.width):n.width)/r,l=(s?JE(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Nye=Wc(0);function vq(e){const t=Yo(e);return!Ak()||!t.visualViewport?Nye:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Rye(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yo(e)?!1:t}function xm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=mD(e);let i=Wc(1);t&&(r?bs(r)&&(i=Yh(r)):i=Yh(e));const l=Rye(s,n,r)?vq(s):Wc(0);let c=(a.left+l.x)/i.x,u=(a.top+l.y)/i.y,d=a.width/i.x,f=a.height/i.y;if(s){const m=Yo(s),h=r&&bs(r)?Yo(r):r;let g=m,v=_T(g);for(;v&&r&&h!==g;){const y=Yh(v),b=v.getBoundingClientRect(),E=$l(v),w=b.left+(v.clientLeft+parseFloat(E.paddingLeft))*y.x,x=b.top+(v.clientTop+parseFloat(E.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=w,u+=x,g=Yo(v),v=_T(g)}}return Up({width:d,height:f,x:c,y:u})}function Ok(e,t){const n=Ik(e).scrollLeft;return t?t.left+n:xm(iu(e)).left+n}function yq(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ok(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function Tye(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",i=iu(r),l=t?Tk(t.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Wc(1);const d=Wc(0),f=il(r);if((f||!f&&!s)&&((_g(r)!=="body"||Jy(i))&&(c=Ik(r)),f)){const h=xm(r);u=Yh(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const m=i&&!f&&!s?yq(i,c):Wc(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-c.scrollTop*u.y+d.y+m.y}}function Aye(e){return Array.from(e.getClientRects())}function Iye(e){const t=iu(e),n=Ik(e),r=e.ownerDocument.body,a=Ei(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ei(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ok(e);const l=-n.scrollTop;return $l(r).direction==="rtl"&&(i+=Ei(t.clientWidth,r.clientWidth)-a),{width:a,height:s,x:i,y:l}}const cF=25;function Oye(e,t){const n=Yo(e),r=iu(e),a=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){s=a.width,i=a.height;const d=Ak();(!d||d&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const u=Ok(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-h);g<=cF&&(s-=g)}else u<=cF&&(s+=u);return{width:s,height:i,x:l,y:c}}function Mye(e,t){const n=xm(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=il(e)?Yh(e):Wc(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=a*s.x,u=r*s.y;return{width:i,height:l,x:c,y:u}}function uF(e,t,n){let r;if(t==="viewport")r=Oye(e,n);else if(t==="document")r=Iye(iu(e));else if(bs(t))r=Mye(t,n);else{const a=vq(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Up(r)}function bq(e,t){const n=td(e);return n===t||!bs(n)||Wu(n)?!1:$l(n).position==="fixed"||bq(n,t)}function Pye(e,t){const n=t.get(e);if(n)return n;let r=Vd(e,[],!1).filter(l=>bs(l)&&_g(l)!=="body"),a=null;const s=$l(e).position==="fixed";let i=s?td(e):e;for(;bs(i)&&!Wu(i);){const l=$l(i),c=cD(i);!c&&l.position==="fixed"&&(a=null),(s?!c&&!a:!c&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Jy(i)&&!c&&bq(e,i))?r=r.filter(d=>d!==i):a=l,i=td(i)}return t.set(e,r),r}function Dye(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?Tk(t)?[]:Pye(t,this._c):[].concat(n),r],l=uF(t,i[0],a);let c=l.top,u=l.right,d=l.bottom,f=l.left;for(let m=1;m<i.length;m++){const h=uF(t,i[m],a);c=Ei(h.top,c),u=hc(h.right,u),d=hc(h.bottom,d),f=Ei(h.left,f)}return{width:u-f,height:d-c,x:f,y:c}}function Lye(e){const{width:t,height:n}=gq(e);return{width:t,height:n}}function $ye(e,t,n){const r=il(t),a=iu(t),s=n==="fixed",i=xm(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=Wc(0);function u(){c.x=Ok(a)}if(r||!r&&!s)if((_g(t)!=="body"||Jy(a))&&(l=Ik(t)),r){const h=xm(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else a&&u();s&&!r&&a&&u();const d=a&&!r&&!s?yq(a,l):Wc(0),f=i.left+l.scrollLeft-c.x-d.x,m=i.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:i.width,height:i.height}}
vendor: 4,211 bytes, line 1202
1202function ZC(e){return $l(e).position==="static"}function dF(e,t){if(!il(e)||$l(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return iu(e)===n&&(n=n.ownerDocument.body),n}function wq(e,t){const n=Yo(e);if(Tk(e))return n;if(!il(e)){let a=td(e);for(;a&&!Wu(a);){if(bs(a)&&!ZC(a))return a;a=td(a)}return n}let r=dF(e,t);for(;r&&Gve(r)&&ZC(r);)r=dF(r,t);return r&&Wu(r)&&ZC(r)&&!cD(r)?n:r||Kve(e)||n}const Fye=async function(e){const t=this.getOffsetParent||wq,n=this.getDimensions,r=await n(e.floating);return{reference:$ye(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zye(e){return $l(e).direction==="rtl"}const Hye={convertOffsetParentRelativeRectToViewportRelativeRect:Tye,getDocumentElement:iu,getClippingRect:Dye,getOffsetParent:wq,getElementRects:Fye,getClientRects:Aye,getDimensions:Lye,getScale:Yh,isElement:bs,isRTL:zye};function Eq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vye(e,t){let n=null,r;const a=iu(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:h}=u;if(l||t(),!m||!h)return;const g=f1(f),v=f1(a.clientWidth-(d+m)),y=f1(a.clientHeight-(f+h)),b=f1(d),w={rootMargin:-g+"px "+-v+"px "+-y+"px "+-b+"px",threshold:Ei(0,hc(1,c))||1};let x=!0;function S(N){const k=N[0].intersectionRatio;if(k!==c){if(!x)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Eq(u,e.getBoundingClientRect())&&i(),x=!1}try{n=new IntersectionObserver(S,{...w,root:a.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(e)}return i(!0),s}function fF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mD(e),d=a||s?[...u?Vd(u):[],...t?Vd(t):[]]:[];d.forEach(b=>{a&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=u&&l?Vye(u,n):null;let m=-1,h=null;i&&(h=new ResizeObserver(b=>{let[E]=b;E&&E.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!c&&h.observe(u),t&&h.observe(t));let g,v=c?xm(e):null;c&&y();function y(){const b=xm(e);v&&!Eq(v,b)&&n(),v=b,g=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(E=>{a&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),f==null||f(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const Uye=kye,Bye=vye,jye=Sye,Wye=yye,Gye=Cye,qye=bye,mF=pye,Yye=Eye,Kye=(e,t,n)=>{const r=new Map,a={platform:Hye,...n},s={...a.platform,_c:r};return hye(e,t,{...a,platform:s})};var Zye=typeof document<"u",Xye=function(){},_w=Zye?p.useLayoutEffect:Xye;function nx(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nx(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const s=a[r];if(!(s==="_owner"&&e.$$typeof)&&!nx(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function xq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hF(e,t){const n=xq(e);return Math.round(t*n)/n}function XC(e){const t=p.useRef(e);return _w(()=>{t.current=e}),t}function Qye(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:s,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=p.useState(r);nx(m,r)||h(r);const[g,v]=p.useState(null),[y,b]=p.useState(null),E=p.useCallback(z=>{z!==N.current&&(N.current=z,v(z))},[]),w=p.useCallback(z=>{z!==k.current&&(k.current=z,b(z))},[]),x=s||g,S=i||y,N=p.useRef(null),k=p.useRef(null),C=p.useRef(d),A=c!=null,O=XC(c),T=XC(a),M=XC(u),L=p.useCallback(()=>
1202{if(!N.current||!k.current)return;const z={placement:t,strategy:n,middleware:m};T.current&&(z.platform=T.current),Kye(N.current,k.current,z).then(K=>{const ee={...K,isPositioned:M.current!==!1};D.current&&!nx(C.current,ee)&&(C.current=ee,kl.flushSync(()=>{f(ee)}))})},[m,t,n,T,M]);_w(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[u]);const D=p.useRef(!1);_w(()=>(D.current=!0,()=>{D.current=!1}),[]),_w(()=>{if(x&&(N.current=x),S&&(k.current=S),x&&S){if(O.current)return O.current(x,S,L);L()}},[x,S,L,O,A]);const j=p.useMemo(()=>({reference:N,floating:k,setReference:E,setFloating:w}),[E,w]),H=p.useMemo(()=>({reference:x,floating:S}),[x,S]),Y=p.useMemo(()=>{const z={position:n,left:0,top:0};if(!H.floating)return z;const K=hF(H.floating,d.x),ee=hF(H.floating,d.y);return l?{...z,transform:"translate("+K+"px, "+ee+"px)",...xq(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:ee}},[n,l,H.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:L,refs:j,elements:H,floatingStyles:Y}),[d,L,j,H,Y])}const Jye=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mF({element:r.current,padding:a}).fn(n):{}:r?mF({element:r,padding:a}).fn(n):{}}}},ebe=(e,t)=>{const n=Uye(e);return{name:n.name,fn:n.fn,options:[e,t]}},tbe=(e,t)=>{const n=jye(e);return{name:n.name,fn:n.fn,options:[e,t]}},nbe=(e,t)=>{const n=Wye(e);return{name:n.name,fn:n.fn,options:[e,t]}},rbe=(e,t)=>{const n=Gye(e);return{name:n.name,fn:n.fn,options:[e,t]}},pF=(e,t)=>{const n=Bye(e);return{name:n.name,fn:n.fn,options:[e,t]}},abe=(e,t)=>{const n=qye(e);return{name:n.name,fn:n.fn,options:[e,t]}},sbe=(e,t)=>{const n=Yye(e);return{name:n.name,fn:n.fn,options:[e,t]}},ibe=(e,t)=>{const n=Jye(e);return{name:n.name,fn:n.fn,options:[e,t]}},obe="data-floating-ui-focusable",gF="active",vF="selected",lbe={...rE};let yF=!1,cbe=0;const bF=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+cbe++;function ube(){const[e,t]=p.useState(()=>yF?bF():void 0);return ST(()=>{e==null&&t(bF())},[]),p.useEffect(()=>{yF=!0},[]),e}const dbe=lbe.useId,fbe=dbe||ube;function mbe(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(a=>a(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const hbe=p.createContext(null),pbe=p.createContext(null),gbe=()=>{var e;return((e=p.useContext(hbe))==null?void 0:e.id)||null},_q=()=>p.useContext(pbe);function vbe(e){return"data-floating-ui-"+e}function wF(e){return il(e.target)&&e.target.tagName==="BUTTON"}function ybe(e){return il(e.target)&&e.target.tagName==="A"}function EF(e){return sye(e)}function bbe(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:a,elements:{domReference:s}}=e,{enabled:i=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=t,m=p.useRef(),h=p.useRef(!1),g=p.useMemo(()=>({onPointerDown(v){m.current=v.pointerType},onMouseDown(v){const y=m.current;v.button===0&&l!=="click"&&(sF(y,!0)&&u||(n&&c&&(!(a.current.openEvent&&f)||a.current.openEvent.type==="mousedown")?r(!1,v.nativeEvent,"click"):(v.preventDefault(),r(!0,v.nativeEvent,"click"))))},onClick(v){const y=m.current;if(l==="mousedown"&&m.current){m.current=void 0;return}sF(y,!0)&&u||(n&&c&&(!(a.current.openEvent&&f)||a.current.openEvent.type==="click")?r(!1,v.nativeEvent,"click"):r(!0,v.nativeEvent,"click"))},onKeyDown(v){m.current=void 0,!(v.defaultPrevented||!d||wF(v))&&(v.key===" "&&!EF(s)&&(v.preventDefault(),h.current=!0),!ybe(v)&&v.key==="Enter"&&r(!(n&&c),v.nativeEvent,"click"))},onKeyUp(v){v.defaultPrevented||!d||wF(v)||EF(s)||v.key===" "&&h.current&&(h.current=!1,r(!(n&&c),v.nativeEvent,"click"))}}),[a,s,l,u,d,r,n,f,c]);return p.useMemo(()=>i?{reference:g}:{},[i,g])}const wbe={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ebe={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xF=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function xbe(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:a,dataRef:s}=e,{enabled:i=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:g}=t,v=_q(),y=Eh(typeof c=="function"?c:()=>!1),b=typeof c=="function"?y:c,E=p.useRef(!1),{escapeKey:w,outsidePress:x}=xF(h),{escapeKey:S,outsidePress:N}=xF(g),k=p.useRef(!1),C=Eh(D=>{var j;if(!n||!i||!l||D.key!=="Escape"||k.current)return;const H=(j=s.current.floatingContext)==null?void 0:j.nodeId,Y=v?xw(v.nodesRef.current,H):[];if(!w&&(D.stopPropagation(),Y.length>0)){let z=!0;if(Y.forEach(K=>{var ee;if((ee=K.context)!=null&&ee.open&&!K.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,iye(D)?D.nativeEvent:D,"escape-key")}),A=Eh(D=>{var j;const H=()=>{var Y;C(D),(Y=o0(D))==null||Y.removeEventListener("keydown",H)};(j=o0(D))==null||j.addEventListener("keydown",H)}),O=Eh(D=>{var j;const H=s.current.insideReactTree;s.current.insideReactTree=!1;const Y=E.current;if(E.current=!1,u==="click"&&Y||H||typeof b=="function"&&!b(D))return;const z=o0(D),K="["+vbe("inert")+"]",ee=aF(a.floating).querySelectorAll(K);let oe=bs(z)?z:null;for(;oe&&!Wu(oe);){const U=td(oe);if(Wu(U)||!bs(U))break;oe=U}if(ee.length&&bs(z)&&!aye(z)&&!rF(z,a.floating)&&Array.from(ee).every(U=>!rF(oe,U)))return;if(il(z)&&L){const U=Wu(z),$=$l(z),ce=/auto|scroll/,be=U||ce.test($.overflowX),ue=U||
1202ce.test($.overflowY),Ie=be&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,Ae=ue&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,he=$.direction==="rtl",_e=Ae&&(he?D.offsetX<=z.offsetWidth-z.clientWidth:D.offsetX>z.clientWidth),ie=Ie&&D.offsetY>z.clientHeight;if(_e||ie)return}const J=(j=s.current.floatingContext)==null?void 0:j.nodeId,se=v&&xw(v.nodesRef.current,J).some(U=>{var $;return KC(D,($=U.context)==null?void 0:$.elements.floating)});if(KC(D,a.floating)||KC(D,a.domReference)||se)return;const B=v?xw(v.nodesRef.current,J):[];if(B.length>0){let U=!0;if(B.forEach($=>{var ce;if((ce=$.context)!=null&&ce.open&&!$.context.dataRef.current.__outsidePressBubbles){U=!1;return}}),!U)return}r(!1,D,"outside-press")}),T=Eh(D=>{var j;const H=()=>{var Y;O(D),(Y=o0(D))==null||Y.removeEventListener(u,H)};(j=o0(D))==null||j.addEventListener(u,H)});p.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=x;let D=-1;function j(ee){r(!1,ee,"ancestor-scroll")}function H(){window.clearTimeout(D),k.current=!0}function Y(){D=window.setTimeout(()=>{k.current=!1},Ak()?5:0)}const z=aF(a.floating);l&&(z.addEventListener("keydown",S?A:C,S),z.addEventListener("compositionstart",H),z.addEventListener("compositionend",Y)),b&&z.addEventListener(u,N?T:O,N);let K=[];return m&&(bs(a.domReference)&&(K=Vd(a.domReference)),bs(a.floating)&&(K=K.concat(Vd(a.floating))),!bs(a.reference)&&a.reference&&a.reference.contextElement&&(K=K.concat(Vd(a.reference.contextElement)))),K=K.filter(ee=>{var oe;return ee!==((oe=z.defaultView)==null?void 0:oe.visualViewport)}),K.forEach(ee=>{ee.addEventListener("scroll",j,{passive:!0})}),()=>{l&&(z.removeEventListener("keydown",S?A:C,S),z.removeEventListener("compositionstart",H),z.removeEventListener("compositionend",Y)),b&&z.removeEventListener(u,N?T:O,N),K.forEach(ee=>{ee.removeEventListener("scroll",j)}),window.clearTimeout(D)}},[s,a,l,b,u,n,r,m,i,w,x,C,S,A,O,N,T]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,b,u]);const M=p.useMemo(()=>({onKeyDown:C,...d&&{[wbe[f]]:D=>{r(!1,D.nativeEvent,"reference-press")},...f!=="click"&&{onClick(D){r(!1,D.nativeEvent,"reference-press")}}}}),[C,r,d,f]),L=p.useMemo(()=>{function D(j){j.button===0&&(E.current=!0)}return{onKeyDown:C,onMouseDown:D,onMouseUp:D,[Ebe[u]]:()=>{s.current.insideReactTree=!0}}},[C,u,s]);return p.useMemo(()=>i?{reference:M,floating:L}:{},[i,M,L])}function _be(e){const{open:t=!1,onOpenChange:n,elements:r}=e,a=fbe(),s=p.useRef({}),[i]=p.useState(()=>mbe()),l=gbe()!=null,[c,u]=p.useState(r.reference),d=Eh((h,g,v)=>{s.current.openEvent=h?g:void 0,i.emit("openchange",{open:h,event:g,reason:v,nested:l}),n==null||n(h,g,v)}),f=p.useMemo(()=>({setPositionReference:u}),[]),m=p.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return p.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:m,events:i,floatingId:a,refs:f}),[t,d,m,i,a,f])}function kbe(e){e===void 0&&(e={});const{nodeId:t}=e,n=_be({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,a=r.elements,[s,i]=p.useState(null),[l,c]=p.useState(null),d=(a==null?void 0:a.domReference)||s,f=p.useRef(null),m=_q();ST(()=>{d&&(f.current=d)},[d]);const h=Qye({...e,elements:{...a,...l&&{reference:l}}}),g=p.useCallback(w=>{const x=bs(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;c(x),h.refs.setReference(x)},[h.refs]),v=p.useCallback(w=>{(bs(w)||w===null)&&(f.current=w,i(w)),(bs(h.refs.reference.current)||h.refs.reference.current===null||w!==null&&!bs(w))&&h.refs.setReference(w)},[h.refs]),y=p.useMemo(()=>({...h.refs,setReference:v,setPositionReference:g,domReference:f}),[h.refs,v,g]),b=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),E=p.useMemo(()=>({...h,...r,refs:y,elements:b,nodeId:t}),[h,y,b,t,r]);return ST(()=>{r.dataRef.current.floatingContext=E;const w=m==null?void 0:m.nodesRef.current.find(x=>x.id===t);w&&(w.context=E)}),p.useMemo(()=>({...h,context:E,refs:y,elements:b}),[h,y,b,E])}function QC(e,t,n){const r=new Map,a=n==="item";let s=e;if(a&&e){const{[gF]:i,[vF]:l,...c}=e;s=c}return{...n==="floating"&&{tabIndex:-1,[obe]:""},...s,...t.map(i=>{const l=i?i[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((i,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(a&&[gF,vF].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;
1202(f=r.get(u))==null||f.push(d),i[u]=function(){for(var m,h=arguments.length,g=new Array(h),v=0;v<h;v++)g[v]=arguments[v];return(m=r.get(u))==null?void 0:m.map(y=>y(...g)).find(y=>y!==void 0)}}}else i[u]=d}),i),{})}}function Sbe(e){e===void 0&&(e=[]);const t=e.map(l=>l==null?void 0:l.reference),n=e.map(l=>l==null?void 0:l.floating),r=e.map(l=>l==null?void 0:l.item),a=p.useCallback(l=>QC(l,e,"reference"),t),s=p.useCallback(l=>QC(l,e,"floating"),n),i=p.useCallback(l=>QC(l,e,"item"),r);return p.useMemo(()=>({getReferenceProps:a,getFloatingProps:s,getItemProps:i}),[a,s,i])}function Cbe(e){const t=[];return e.offset&&t.push(ebe(e.offset)),e.inline&&t.push(sbe(e.inline)),e.autoPlacement&&e.flip?(console.warn("autoPlacement and flip are mutually exclusive. Using autoPlacement and ignoring flip."),t.push(pF(e.autoPlacement))):e.flip?t.push(nbe(e.flip)):t.push(pF(e.autoPlacement)),e.shift&&t.push(tbe(e.shift)),e.size&&t.push(rbe(e.size)),e.arrow&&e.arrow.element&&t.push(ibe({element:e.arrow.element,padding:e.arrow.padding})),e.hide&&t.push(abe(e.hide)),t}function Nbe(e){var ce,be,ue,Ie;const{animation:t=Q3.SCALE,arrow:n=!0,arrowRef:r,autoFocus:a,backdropProps:s,canEscapeKeyClose:i,captureDismiss:l=!1,content:c,enforceFocus:u=!0,floatingData:d,handleMouseEnter:f,handleMouseLeave:m,handleOverlayClose:h,handlePopoverClick:g,hasBackdrop:v=!1,hasDarkParent:y,inheritDarkTheme:b=!0,interactionKind:E=Ka.CLICK,isClosingViaEscapeKeypress:w,isHoverInteractionKind:x,lazy:S=!1,matchTargetWidth:N=!1,onClosed:k,onClosing:C,onOpened:A,onOpening:O,popoverClassName:T,popoverRef:M,portalClassName:L,portalContainer:D,transitionDuration:j=300,usePortal:H=!0}=e,Y=p.useRef(null),z={left:(ce=d.middlewareData.arrow)==null?void 0:ce.x,position:"absolute",top:(be=d.middlewareData.arrow)==null?void 0:be.y},K=((ue=d.context.middlewareData.hide)==null?void 0:ue.referenceHidden)??!1,ee=((Ie=d.context.middlewareData.hide)==null?void 0:Ie.escaped)??!1,oe=cq(d.placement,n?{left:_F(z.left),top:_F(z.top)}:void 0),J={onClick:g,onKeyDown:Ae=>bm(Ae)&&g(Ae)};(E===Ka.HOVER||!H&&E===Ka.HOVER_TARGET_ONLY)&&(J.onMouseEnter=f,J.onMouseLeave=m);const se=Qy(d.placement),B=At(us,{[Xr]:b&&y,[hme]:t===Q3.MINIMAL,[X0]:l,[fW]:N,[pW]:K,[hW]:ee},`${uW}-${se}`,T),U=x?!1:void 0,$=x?!1:w||e.shouldReturnFocusOnClose;return F.jsx(Eg,{autoFocus:a??U,backdropClassName:lW,backdropProps:s,canEscapeKeyClose:i,canOutsideClickClose:E===Ka.CLICK,childRef:Y,enforceFocus:u,hasBackdrop:v,isOpen:d.isOpen,lazy:S,onClose:h,onClosed:k,onClosing:C,onOpened:A,onOpening:O,portalClassName:L,portalContainer:D,shouldReturnFocusOnClose:$,transitionDuration:j,transitionName:us,usePortal:H,children:F.jsx("div",{className:vW,style:d.floatingStyles,ref:mc(d.refs.setFloating,Y),...J,children:F.jsxs("div",{className:B,ref:M,style:{transformOrigin:oe},children:[n&&F.jsx(lD,{arrowProps:{ref:r,style:z},placement:d.placement}),F.jsx("div",{className:cW,children:c})]})})})}function _F(e){return e===""?e:e==null||isNaN(Number(e))?"":`${e}px`}const kq=p.forwardRef((e,t)=>{const{children:n,className:r,floatingData:a,disabled:s=!1,fill:i=!1,handleMouseEnter:l,handleMouseLeave:c,handleTargetBlur:u,handleTargetContextMenu:d,handleTargetFocus:f,interactionKind:m,isContentEmpty:h,isControlled:g,isHoverInteractionKind:v,openOnTargetFocus:y=!0,popupKind:b,renderTarget:E=void 0,targetProps:w,targetTagName:x="span"}=e,S=i?"div":x,{isOpen:N}=a,k=mc(a.refs.setReference,t),C=p.useCallback(H=>{if(!bm(H)||H.repeat)return;const Y=H.target;if(!Tbe(Y)){if(H.key===" "){if(Y.closest("button")!=null)return;H.preventDefault()}else if(H.key==="Enter"&&Y.closest("button, a")!=null)return;H.currentTarget.click()}},[]),A=v?{onBlur:u,onContextMenu:d,onFocus:f,onMouseEnter:l,onMouseLeave:c}:{},O=!h&&!s&&y&&v?0:void 0,T=v?{}:a.getReferenceProps({onKeyDown:C}),M={className:At(r,gW,{[mW]:N,[Xd]:N&&!g&&!v,[Qi]:i}),ref:k,...A},L={"aria-expanded":v?void 0:N,"aria-haspopup":m===Ka.HOVER_TARGET_ONLY?void 0:b??"menu"},D={[Xd]:N&&!g&&!v,[Qi]:i};let j;if(E!==void 0)j=E({...M,...L,...T,className:At(M.className,D),isOpen:N,tabIndex:O});else{const H=xk(p.Children.toArray(n)[0]);if(H===void 0)return null;const Y=p.cloneElement(H,{...L,className:At(H.props.className,D),disabled:N&&Rbe(H)||H.props.disabled,tabIndex:H.props.tabIndex??O});j=p.createElement(S,{...M,...w,...T},Y)}return j});kq.displayName=`${$n}.PopoverTarget`;function Rbe(e){return(e==null?void 0:e.type)!=null&&typeof e.type!="string"&&typeof e.type=="function"&&"displayName"in e.type&&e.type.displayName===`${$n}.Tooltip`}function Tbe(e){const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function Abe({autoUpdateOptions:e,disabled:t=!1,isControlled:n=!1,isHoverInteractionKind:r=!1,isOpen:a=!1,middleware:s,placement:i,positioningStrategy:l="absolute",onOpenChange:c}={}){const[u,d]=p.useState(a);p.useEffect(()=>{d(a)},[a]);const f=p.useCallback((w,x)=>{n||d(w),c&&c(w,x)},[c,n]),m=p.useRef(e);m.current=e;const h=p.useMemo(()=>e!=null?(w,x,S)=>fF(w,x,S,m.current):fF,[e!=null]),g=kbe({middleware:s,onOpenChange:f,open:u,placement:i,strategy:l,whileElementsMounted:h}),{context:v}=g,y=bbe(v,{enabled:!t&&!r,keyboardHandlers:!1}),b=xbe(v,{escapeKey:!1,outsidePress:!1}),E=Sbe([y,b]);return p.useMemo(()=>({isOpen:u,setIsOpen:d,...E,...g}),[g,E,u])}const kg=p.forwardRef((e,t)=>
1202{const{animation:n="scale",autoUpdateOptions:r,arrow:a=!0,boundary:s="clippingAncestors",children:i,content:l,defaultIsOpen:c=!1,disabled:u=!1,hasBackdrop:d=!1,hoverCloseDelay:f=300,hoverOpenDelay:m=150,interactionKind:h=Ka.CLICK,isOpen:g,matchTargetWidth:v=!1,middleware:y,onClose:b,onInteraction:E,openOnTargetFocus:w=!0,popoverRef:x,placement:S,positioningStrategy:N="absolute",renderTarget:k,rootBoundary:C,shouldReturnFocusOnClose:A=!0,targetProps:O,usePortal:T=!0}=e;wg(()=>{g==null&&E!=null&&console.warn(MW),d&&!T&&console.warn(IW),d&&h!==Ka.CLICK&&console.warn(NW);const X=p.Children.count(i),le=k!==void 0,me=O!==void 0;X===0&&!le&&console.warn(CW),X>1&&console.warn(RW),X>0&&le&&console.warn(TW),le&&me&&console.warn(PW)},[a,i,d,h,g,E,S,k,O,T]);const[M,L]=p.useState(!1),[D,j]=p.useState(!1),H=p.useRef(null),Y=p.useRef(void 0),z=p.useRef(!1),K=p.useRef(!0),ee=p.useRef(null),oe=p.useRef([]),J=g!==void 0,se=l==null||Ek(l),B=u?!1:g??c,U=h===Ka.HOVER||h===Ka.HOVER_TARGET_ONLY,$=p.useMemo(()=>{const le={...{...S===void 0?{autoPlacement:{boundary:s,rootBoundary:C}}:{flip:{boundary:s,rootBoundary:C}},...a?{arrow:{element:H},offset:{mainAxis:Vp/2}}:{}
1202,shift:{boundary:s,rootBoundary:C},size:v?{apply({rects:me,elements:fe}){Object.assign(fe.floating.style,{width:`${me.reference.width}px`})}}:void 0},...y};return Cbe(le)},[S,s,C,a,H,v,y]),ce=Abe({autoUpdateOptions:r,disabled:u,isControlled:J,isHoverInteractionKind:U,isOpen:B,middleware:$,onOpenChange:(X,le)=>{he(X,le)},placement:S,positioningStrategy:N});p.useImperativeHandle(t,()=>({reposition:()=>{ce.update()}}),[ce]);const be=ce.refs.floating.current,ue=p.useCallback(()=>be==null?void 0:be.querySelector(`.${us}`),[be]),Ie=p.useCallback(X=>{var le;return((le=ue())==null?void 0:le.contains(X))??!1},[ue]),Ae=p.useCallback((X,le)=>{const me=window.setTimeout(X,le);return oe.current.push(me),()=>window.clearTimeout(me)},[]),he=p.useCallback((X,le,me)=>{var fe;(fe=Y.current)==null||fe.call(Y),me!==void 0&&me>0?(le==null||le.persist(),Y.current=Ae(()=>{he(X,le)},me)):(g==null?ce.setIsOpen(X):E==null||E(X,le),X||(b==null||b(le),j(Ibe(le==null?void 0:le.nativeEvent))))},[ce,g,E,b,Ae]),_e=p.useCallback(X=>{X.defaultPrevented&&he(!1,X)},[he]),ie=p.useCallback(X=>{z.current=!1,X.persist(),Ae(()=>{z.current||he(!1,X,f)})},[f,he,Ae]),Ue=p.useCallback(X=>{z.current=!0,!T&&Ie(X.target)&&h===Ka.HOVER_TARGET_ONLY&&!w?ie(X):u||he(!0,X,m)},[u,ie,m,h,Ie,w,he,T]),ae=p.useCallback(X=>{if(w&&U){if(X.relatedTarget==null&&!K.current)return;Ue(X)}},[Ue,U,w]),pe=p.useCallback(X=>{w&&U&&(X.relatedTarget!=null?X.relatedTarget!==be&&!Ie(X.relatedTarget)&&ie(X):ie(X)),K.current=X.relatedTarget!=null},[ie,Ie,U,w,be]),W=p.useCallback(X=>{const le=X.target,me=le.closest(`.${us}`),fe=me===ue(),ke=(me==null?void 0:me.classList.contains(X0))??!1,Se=le.closest(`.${Ho}, .${dW}`),Et=(Se==null?void 0:Se.classList.contains(Ho))??!1,nt=le.closest(`:disabled, .${wc}`)!=null;Et&&!nt&&(!ke||fe)&&he(!1,X)},[ue,he]),q=p.useCallback(X=>{if(ee.current==null||X===void 0)return;const le=X.nativeEvent??X,me=le.composed?le.composedPath()[0]:le.target;(!SW(ee.current,me)||X.nativeEvent instanceof KeyboardEvent)&&he(!1,X)},[he,ee]),te=p.useCallback(()=>{var X;T&&ce.isOpen&&L(((X=ee.current)==null?void 0:X.closest(`.${Xr}`))!=null)},[ce.isOpen,ee,T]);return p.useEffect(()=>{te(),g!=null&&B!==ce.isOpen?he(B):u&&ce.isOpen&&g==null&&he(!1),se&&!u&&B!==!1&&!Jo("production")&&console.warn(AW)},[B,u,ce,se,g,he,te]),F.jsxs(F.Fragment,{children:[F.jsx(kq,{floatingData:ce,handleMouseEnter:Ue,handleMouseLeave:ie,handleTargetBlur:pe,handleTargetContextMenu:_e,handleTargetFocus:ae,isContentEmpty:se,isControlled:J,isHoverInteractionKind:U,openOnTargetFocus:w,ref:ee,...e,children:i}),!se&&F.jsx(Nbe,{animation:n,arrowRef:H,floatingData:ce,handleMouseEnter:Ue,handleMouseLeave:ie,handleOverlayClose:q,handlePopoverClick:W,hasDarkParent:M,isClosingViaEscapeKeypress:D,isHoverInteractionKind:U,popoverRef:x,shouldReturnFocusOnClose:A,...e})]})});kg.displayName=`${$n}.PopoverNext`;function Ibe(e){return e instanceof KeyboardEvent&&e.key==="Escape"}const ml={...va,AUTO:"auto",AUTO_END:"auto-end",AUTO_START:"auto-start"};function Sq(e){switch(e){case ml.TOP_LEFT:return"top-start";case ml.TOP:return"top";case ml.TOP_RIGHT:return"top-end";case ml.RIGHT_TOP:return"right-start";case ml.RIGHT:return"right";case ml.RIGHT_BOTTOM:return"right-end";case ml.BOTTOM_RIGHT:return"bottom-end";case ml.BOTTOM:return"bottom";case ml.BOTTOM_LEFT:return"bottom-start";case ml.LEFT_BOTTOM:return"left-end";case ml.LEFT:return"left";case ml.LEFT_TOP:return"left-start";case"auto":case"auto-start":case"auto-end":return e;default:return Obe(e)}}function Obe(e){throw new Error("Unexpected position: "+e)}function Mbe(e){const t={};if(e.flip&&e.flip.enabled!==!1){const{options:n}=e.flip;t.flip={...(n==null?void 0:n.boundary)!=null?{boundary:CT(n.boundary)}:{},...(n==null?void 0:n.rootBoundary)!=null?{rootBoundary:n.rootBoundary}:{},...(n==null?void 0:n.padding)!=null?{padding:n.padding}:{},...(n==null?void 0:n.fallbackPlacements)!=null?{fallbackPlacements:n.fallbackPlacements}:{},...(n==null?void 0:n.flipVariations)!=null?{flipAlignment:n.flipVariations}:{},...(n==null?void 0:n.mainAxis)!=null?{mainAxis:n.mainAxis}:{},...(n==null?void 0:n.altAxis)!=null?{crossAxis:n.altAxis}:{}}}if(e.preventOverflow&&e.preventOverflow.enabled!==!1){const{options:n}=e.preventOverflow;t.shift={...(n==null?void 0:n.boundary)!=null?{boundary:CT(n.boundary)}:{},...(n==null?void 0:n.rootBoundary)!=null?{rootBoundary:n.rootBoundary}:{},...(n==null?void 0:n.padding)!=null?{padding:n.padding}:{},...(n==null?void 0:n.mainAxis)!=null?{mainAxis:n.mainAxis}:{},...(n==null?void 0:n.altAxis)!=null?{crossAxis:n.altAxis}:{}}}if(e.offset&&e.offset.enabled!==!1){const{options:n}=e.offset;if((n==null?void 0:n.offset)!=null)if(typeof n.offset=="function")console.warn("popperModifiersToNextMiddleware: The Popper.js `offset` function cannot be automatically converted to a Floating UI middleware config. Migrate it manually to a `{ mainAxis, crossAxis }` object in the `middleware` prop.");else{const[r,a]=n.offset;t.offset={...r!=null?{crossAxis:r}:{},...a!=null?{mainAxis:a}:{}}}else t.offset={mainAxis:Vp/2}}if(e.arrow&&e.arrow.enabled!==!1){const{options:n}=e.arrow;(n==null?void 0:n.element)!=null&&typeof n.element!="string"&&(t.arrow={element:n.element,...n.padding!=null&&typeof n.padding!="function"?{padding:n.padding}:{}})}return e.hide&&e.hide.enabled!==!1&&(t.hide={}),t}function Mk(e){const{boundary:t,minimal:n,modifiers:r,modifiersCustom:a,onClose:s,placement:i,popoverRef:l,portalStopPropagationEvents:c,position:u,shouldReturnFocusOnClose
1202:d,...f}=e??{};Jo("production")||(a!==void 0&&console.warn("[Blueprint] popoverPropsToNextProps: `modifiersCustom` has no equivalent in PopoverNext and will be dropped. Migrate to the `middleware` prop manually."),c!==void 0&&console.warn("[Blueprint] popoverPropsToNextProps: `portalStopPropagationEvents` has no equivalent in PopoverNext and will be dropped."),i!==void 0&&u!==void 0&&console.warn(OW));const m={...f};return t!==void 0&&(m.boundary=CT(t)),i!==void 0?m.placement=Cq(i):u!==void 0&&(m.placement=Pbe(u)),r!==void 0&&(m.middleware=Mbe(r)),n===!0&&(m.animation??(m.animation="minimal"),m.arrow??(m.arrow=!1)),s!==void 0&&(m.onClose=h=>{h!==void 0&&s(h)}),l!==void 0&&(m.popoverRef=l),m.shouldReturnFocusOnClose=d??!1,m}function CT(e){return e==="clippingParents"?"clippingAncestors":e}function Cq(e){switch(e){case"auto":case"auto-start":case"auto-end":return;default:return e}}function Pbe(e){return Cq(Sq(e))}const Bt=p.forwardRef((e,t)=>{const{active:n=!1,className:r,children:a,disabled:s=!1,icon:i,intent:l,labelClassName:c,labelElement:u,multiline:d=!1,popoverProps:f={},roleStructure:m="menuitem",selected:h,shouldDismissPopover:g=!0,submenuProps:v,text:y="",textClassName:b,tagName:E="a",htmlTitle:w,...x}=e,[S,N,k]=m==="listoption"?["option",void 0,!!h]:m==="menuitem"?["none","menuitem",void 0]:m==="none"?["none",void 0,void 0]:[void 0,void 0,void 0],C=m==="listoption",A=C&&h,O=i!=null,T=a!=null,M=Rs(l),L=At(Yy,M,{[Xd]:n,[wc]:s,[Ho]:g&&!s&&!T,[eme]:C,[zP]:A},r),D=e.label==null&&u==null?null:F.jsxs("span",{className:At(rme,c),children:[e.label,u]}),j=Ju(x),H=p.createElement(E,{onKeyDown:qme(["Enter"," "]),role:T?"none":N,...j,tabIndex:T?-1:j.tabIndex!=null?j.tabIndex:0,...s?Lbe:{},className:L},A?F.jsx(LG,{className:tme}):void 0,O?F.jsx("span",{className:nme,"aria-hidden":!0,children:F.jsx(Ft,{icon:i,tabIndex:-1})}):void 0,F.jsx(Sk,{className:At(Qi,b),ellipsize:!d,title:w,children:y}),D,T?F.jsx(eG,{className:ame,title:"Open sub menu"}):void 0),Y=At({[hT]:T}),z=Mk(f);return F.jsx("li",{className:Y,ref:t,role:S,"aria-selected":k,children:a==null?H:F.jsx(kg,{autoFocus:!1,captureDismiss:!1,disabled:s,enforceFocus:!1,hoverCloseDelay:0,interactionKind:"hover",targetProps:{role:N,tabIndex:0},placement:"right-start",usePortal:!1,...z,middleware:{...Dbe,...z.middleware},content:F.jsx(Cr,{...v,children:a}),animation:"minimal",arrow:!1,popoverClassName:At(hT,f==null?void 0:f.popoverClassName),children:H})})});Bt.displayName=`${$n}.MenuItem`;const Dbe={flip:{padding:20,rootBoundary:"viewport"},offset:{crossAxis:-5},shift:{padding:20,rootBoundary:"viewport"}},Lbe={"aria-disabled":!0,href:void 0,onClick:void 0,onMouseDown:void 0,onMouseEnter:void 0,onMouseLeave:void 0,tabIndex:-1};var tR;let kF=(tR=class extends Bs{constructor(){super(...arguments);G(this,"targetRef",this.props.targetRef??p.createRef());G(this,"prevElement");G(this,"observer")}render(){const n=p.Children.only(this.props.children);return this.props.targetRef!==void 0?n:p.cloneElement(n,{ref:this.targetRef})}componentDidMount(){this.observer=globalThis.ResizeObserver!=null?new ResizeObserver(n=>{var r,a;return(a=(r=this.props).onResize)==null?void 0:a.call(r,n)}):void 0,this.observeElement()}componentDidUpdate(n){this.observeElement(this.props.observeParents!==n.observeParents)}componentWillUnmount(){var n;(n=this.observer)==null||n.disconnect(),this.prevElement=void 0}observeElement(n=!1){if(this.observer!==void 0){if(!(this.targetRef.current instanceof Element)){this.observer.disconnect();return}if(!(this.targetRef.current===this.prevElement&&!n)&&(this.observer.disconnect(),this.prevElement=this.targetRef.current,this.observer.observe(this.targetRef.current),this.props.observeParents)){let r=this.targetRef.current.parentElement;for(;r!=null;)this.observer.observe(r),r=r.parentElement}}}},G(tR,"displayName",`${$n}.ResizeSensor`),tR);const hD=p.forwardRef((e,t)=>{const{alignText:n,className:r,fill:a,minimal:s,outlined:i,large:l,size:c="medium",variant:u="solid",vertical:d,...f}=e,m=At(vfe,{[Qi]:a,[HP]:d},wk(n),ud(c,{large:l}),_W(u,{minimal:s,outlined:i}),r);return F.jsx("div",{...f,ref:t,className:m,children:e.children})});hD.displayName=`${$n}.ButtonGroup`;const Wv=e=>{const{className:t,children:n,icon:r,intent:a,title:s,compact:i,minimal:l=!1,...c}=e,u=$be(r,a),d=At(VP,Rs(a),t,{[wfe]:!Uv(n),[Efe]:u!=null,[mk]:i,[Lp]:l});return F.jsxs("div",{className:d,...c,children:[u,s&&F.jsx(i0e,{children:s}),n]})};Wv.displayName=`${$n}.Callout`;const $be=(e,t)=>
1202{if(e===null||e===!1)return;const n={"aria-hidden":!0,tabIndex:-1};if(e!==void 0)return F.jsx(Ft,{icon:e,...n});switch(t){case jr.DANGER:return F.jsx(mG,{...n});case jr.PRIMARY:return F.jsx(Au,{...n});case jr.WARNING:return F.jsx(UG,{...n});case jr.SUCCESS:return F.jsx(VG,{...n});default:return}},jn=p.forwardRef((e,t)=>{const{className:n,elevation:r=qn.ZERO,interactive:a=!1,selected:s,compact:i,...l}=e,c=At(n,xfe,zme(r),{[Kj]:a,[mk]:i,[zP]:s});return F.jsx("div",{className:c,ref:t,...l})});jn.displayName=`${$n}.Card`;const Fbe=()=>null,pD=p.createContext([{},Fbe]),zbe=(e,t)=>{switch(t.type){case"FORCE_DISABLED_STATE":return{forceDisabled:!0};case"RESET_DISABLED_STATE":return{};default:return e}},Nq=({children:e,forceDisable:t})=>{const[n,r]=p.useReducer(zbe,{}),a=p.useMemo(()=>[n,r],[n,r]);return p.useEffect(()=>{r(t?{type:"FORCE_DISABLED_STATE"}:{type:"RESET_DISABLED_STATE"})},[t]),F.jsx(pD.Provider,{value:a,children:typeof e=="function"?e(n):e})},Rq=p.memo(function(t){const{content:n,popoverClassName:r,onClose:a,isDarkTheme:s=!1,rootBoundary:i="viewport",targetOffset:l,transitionDuration:c=100,...u}=t,d=p.useCallback(h=>h.preventDefault(),[]),f=p.useCallback(({ref:h})=>F.jsx(Ck,{children:F.jsx("div",{className:Sfe,style:l,ref:h})}),[l]),m=p.useCallback(h=>{h||a==null||a()},[a]);return p.createElement(kg,{placement:"right-start",rootBoundary:i,transitionDuration:c,...Mk(u),content:F.jsx("div",{onContextMenu:d,children:n}),enforceFocus:!1,key:Hbe(l),hasBackdrop:!0,backdropProps:{className:Nfe},animation:"minimal",arrow:!1,onInteraction:m,popoverClassName:At(Cfe,r,{[Xr]:s}),positioningStrategy:"fixed",renderTarget:f})});Rq.displayName=`${$n}.ContextMenuPopover`;function Hbe(e){return e===void 0?"default":`${e.left}x${e.top}`}const gD=p.forwardRef((e,t)=>{const{className:n,children:r,content:a,disabled:s=!1,onClose:i,onContextMenu:l,popoverProps:c,tagName:u="div",...d}=e,[,f]=p.useContext(pD),[m,h]=p.useState(void 0),[g,v]=p.useState(),[y,b]=p.useState(!1),E=p.useRef(null);p.useEffect(()=>{b(!1),f({type:"RESET_DISABLED_STATE"})},[s,f]);const w=p.useCallback(()=>{b(!1),v(void 0),f({type:"RESET_DISABLED_STATE"}),i==null||i()},[i,f]),x=p.useMemo(()=>khe(E.current),[E,y]),S=p.useMemo(()=>({isOpen:y,mouseEvent:g,targetOffset:m}),[y,g,m]),N=p.useCallback(M=>s?void 0:Nl(a)?a(M):a,[s,a]),k=p.useMemo(()=>N(S),[S,N]),C=k===void 0?void 0:F.jsx(Rq,{...c,content:k,isDarkTheme:x,isOpen:y,targetOffset:m,onClose:w}),A=p.useCallback(M=>{if(M.defaultPrevented)return;if(!s&&(Nl(r)||Nl(a)||a!==void 0)){b(!0),M.persist(),v(M);const D={left:M.clientX,top:M.clientY};h(D),f({type:"FORCE_DISABLED_STATE"}),N({isOpen:!0,mouseEvent:M,targetOffset:D})===void 0||M.preventDefault()}l==null||l(M)},[s,r,a,l,f,N]),O=At(n,pk),T=Nl(r)?r({className:O,contentProps:S,onContextMenu:A,popover:C,ref:E}):F.jsxs(F.Fragment,{children:[C,p.createElement(u,{className:O,onContextMenu:A,ref:mc(E,t),...d},r)]});return F.jsx(Nq,{forceDisable:y,children:T})});gD.displayName=`${$n}.ContextMenu`;const Pk=p.forwardRef((e,t)=>{const{children:n,className:r,useOverflowScrollContainer:a=!0,...s}=e;return F.jsx("div",{...s,className:At(Fs,r,{[Afe]:a}),ref:t,children:n})});Pk.displayName=`${$n}.DialogBody`;class fr extends Bs{constructor(){super(...arguments);G(this,"popoverRef",p.createRef());G(this,"renderPopover",n=>{const{children:r,compact:a,disabled:s,intent:i,popoverClassName:l,...c}=this.props,u=At(Dme,Rs(i),l,{[mk]:a}),d=Mk(c);return F.jsx(kg,{...d,middleware:{offset:{mainAxis:Bve/2},...d.middleware},autoFocus:!1,disabled:n.forceDisabled??s,enforceFocus:!1,lazy:!0,popoverClassName:u,portalContainer:this.props.portalContainer,ref:this.popoverRef,children:r})})}render(){return F.jsx(pD.Consumer,{children:([n])=>F.jsx(Nq,{...n,children:this.renderPopover})})}reposition(){var n;(n=this.popoverRef.current)==null||n.reposition()}}G(fr,"displayName",`${$n}.Tooltip`),G(fr,"defaultProps",{compact:!1,hoverCloseDelay:0,hoverOpenDelay:100,interactionKind:"hover-target",minimal:!1,transitionDuration:100});const Es=({className:e,compact:t=!1,tagName:n="div",...r})=>{const a=At(Ife,{[mk]:t},e);return p.createElement(n,{...r,className:a})};Es.displayName=`${$n}.Divider`;var SF;(function(e){e.SMALL="360px",e.STANDARD="50%",e.LARGE="90%"})(SF||(SF={}));class Bp extends Bs{render(){const{hasBackdrop:t,size:n,style:r,position:a}=this.props,{className:s,children:i,...l}=this.props,c=w3(a),u=At(UP,{[Vme(c)??""]:!0},s),d=n==null?r:{...r,[afe(c)?"height":"width"]:n};return F.jsx(Eg,{...l,className:At({[fme]:t}),children:F.jsxs("div",{className:u,style:d,children:[this.maybeRenderHeader(),i]})})}validateProps(t){t.title==null&&(t.icon!=null&&console.warn(DW),t.isCloseButtonShown!=null&&console.warn(LW)),t.position!=null&&t.position!==w3(t.position)&&console.warn(mhe)}maybeRenderCloseButton(){return this.props.isCloseButtonShown!==!1?F.jsx(De,{"aria-label":"Close",className:eW,icon:F.jsx(kk,{size:Nt.LARGE}),onClick:this.props.onClose,variant:"minimal"}):null}maybeRenderHeader(){const{icon:t,title:n}=this.props;return n==null?null:F.jsxs("div",{className:Ofe,children:[F.jsx(Ft,{icon:t,size:Nt.LARGE}),F.jsx(GG,{children:n}),this.maybeRenderCloseButton()]})}}G(Bp,"displayName",`${$n}.Drawer`),G(Bp,"defaultProps",{canOutsideClickClose:!0,isOpen:!1,position:"right",style:{}});const Vbe=5;class rx extends Bs{constructor(n){super(n);G(this,"inputElement",null);G(this,"valueElement",null);G(this,"refHandlers",{content:n=>{this.valueElement=n}
1202,input:n=>{if(n!=null&&(this.inputElement=n,this.props.alwaysRenderInput||this.inputElement.focus(),this.state!=null&&this.state.isEditing)){const r=jbe(n);if(r){const{length:a}=n.value;n.setSelectionRange(this.props.selectAllOnFocus?0:a,a)}(!r||!this.props.selectAllOnFocus)&&(n.scrollLeft=n.scrollWidth)}}});G(this,"cancelEditing",()=>{var a,s,i,l;const{lastValue:n,value:r}=this.state;this.setState({isEditing:!1,value:n}),r!==n&&((s=(a=this.props).onChange)==null||s.call(a,n)),(l=(i=this.props).onCancel)==null||l.call(i,n)});G(this,"toggleEditing",()=>{var n,r;if(this.state.isEditing){const{value:a}=this.state;this.setState({isEditing:!1,lastValue:a}),(r=(n=this.props).onConfirm)==null||r.call(n,a)}else this.props.disabled||this.setState({isEditing:!0})});G(this,"handleFocus",()=>{const{alwaysRenderInput:n,disabled:r,selectAllOnFocus:a}=this.props;if(r||this.setState({isEditing:!0}),n&&a&&this.inputElement!=null){const{length:s}=this.inputElement.value;this.inputElement.setSelectionRange(0,s)}});G(this,"handleTextChange",n=>{var a,s;const r=n.target.value;this.props.value==null&&this.setState({value:r}),(s=(a=this.props).onChange)==null||s.call(a,r)});G(this,"handleKeyEvent",n=>{if(n.nativeEvent.isComposing)return;const{altKey:r,ctrlKey:a,metaKey:s,shiftKey:i}=n;if(n.key==="Escape"){this.cancelEditing();return}const l=r||a||s||i;n.key==="Enter"&&((r||i)&&n.preventDefault(),this.props.confirmOnEnterKey&&this.props.multiline?n.target!=null&&l?(Bbe(n.target,` 1203`),this.handleTextChange(n)):this.toggleEditing():(!this.props.multiline||l)&&this.toggleEditing())});const r=n.value==null?n.defaultValue:n.value;this.state={inputHeight:0,inputWidth:0,isEditing:n.isEditing===!0&&n.disabled===!1,lastValue:r,value:r}}render(){const{alwaysRenderInput:n,disabled:r,elementRef:a,multiline:s,contentId:i}=this.props,l=this.props.value??this.state.value,c=l!=null&&l!=="",u=At(Gy,Rs(this.props.intent),{[wc]:r,[Pfe]:this.state.isEditing,[Dfe]:!c,[lfe]:s},this.props.className);let d;s?d={height:this.state.isEditing?void 0:this.state.inputHeight}:d={height:this.state.inputHeight,lineHeight:this.state.inputHeight!=null?`${this.state.inputHeight}px`:void 0,minWidth:this.props.minWidth};const f=n||this.state.isEditing||r?void 0:0,m=n&&!this.state.isEditing,h=i!=null?{id:i}:{};return F.jsxs("div",{className:u,onFocus:this.handleFocus,tabIndex:f,ref:a,children:[n||this.state.isEditing?this.renderInput(l):void 0,m?void 0:F.jsx("span",{...h,className:Mfe,ref:this.refHandlers.content,style:d,children:c?l:this.props.placeholder})]})}componentDidMount(){this.updateInputDimensions()}componentDidUpdate(n,r){var s,i;const a={};this.props.value!==n.value&&(n.value!=null||this.props.value!=null)&&(a.value=this.props.value),this.props.isEditing!=null&&this.props.isEditing!==n.isEditing&&(a.isEditing=this.props.isEditing),(this.props.disabled||this.props.disabled==null&&n.disabled)&&(a.isEditing=!1),this.setState(a),this.state.isEditing&&!r.isEditing&&((i=(s=this.props).onEdit)==null||i.call(s,this.state.value)),(this.state.value!==r.value||this.props.alwaysRenderInput!==n.alwaysRenderInput||this.props.maxLines!==n.maxLines||this.props.minLines!==n.minLines||this.props.minWidth!==n.minWidth||this.props.multiline!==n.multiline||this.props.placeholder!==n.placeholder)&&this.updateInputDimensions()}renderInput(n){const{disabled:r,maxLength:a,multiline:s,type:i,placeholder:l,customInputAttributes:c}=this.props,u={className:tW,disabled:r,maxLength:a,onBlur:this.toggleEditing,onChange:this.handleTextChange,onKeyDown:this.handleKeyEvent,placeholder:l,value:n},{inputHeight:d,inputWidth:f}=this.state;return d!==0&&f!==0&&(u.style={height:d,lineHeight:!s&&d!=null?`${d}px`:void 0,width:s?"100%":f}),s?F.jsx("textarea",{ref:this.refHandlers.input,...u,...c}):F.jsx("input",{ref:this.refHandlers.input,type:i,...u,...c})}updateInputDimensions(){if(this.valueElement!=null){const{maxLines:n,minLines:r,minWidth:a,multiline:s}=this.props,{parentElement:i,textContent:l}=this.valueElement;let{scrollHeight:c,scrollWidth:u}=this.valueElement;const d=CF(this.valueElement);s&&this.state.isEditing&&/\n$/.test(l??"")&&(c+=d),d>0&&(c=bg(c,r*d,n*d)),c=Math.max(c,Ube(this.valueElement)+1,CF(i)),u+=Vbe,this.setState({inputHeight:c,inputWi
1203dth:Math.max(u,a)}),s&&this.state.isEditing&&this.setTimeout(()=>i.style.height=`${c}px`)}}}G(rx,"displayName",`${$n}.EditableText`),G(rx,"defaultProps",{alwaysRenderInput:!1,confirmOnEnterKey:!1,defaultValue:"",disabled:!1,maxLines:1/0,minLines:1,minWidth:80,multiline:!1,placeholder:"Click to Edit",type:"text"});function Ube(e){const t=getComputedStyle(e).fontSize;return t===""?0:parseInt(t.slice(0,-2),10)}function CF(e){let t=parseInt(getComputedStyle(e).lineHeight.slice(0,-2),10);if(isNaN(t)){const n=document.createElement("span");n.innerHTML="<br>",e.appendChild(n);const r=e.offsetHeight;n.innerHTML="<br><br>";const a=e.offsetHeight;e.removeChild(n),t=a-r}return t}function Bbe(e,t){const{selectionEnd:n,selectionStart:r,value:a}=e;if(r>=0){const s=a.substring(0,r),i=a.substring(n,a.length),l=t.length;e.value=`${s}${t}${i}`,e.selectionStart=r+l,e.selectionEnd=r+l}}function jbe(e){switch(e.type){case"textarea":return!0;case"text":case"search":case"tel":case"url":case"password":return!0;default:return!1}}const Dk=p.forwardRef((e,t)=>{const{alignIndicator:n,children:r,className:a,indicatorChildren:s,inline:i,inputRef:l,label:c,labelElement:u,large:d,size:f="medium",style:m,type:h,typeClassName:g,tagName:v="label",...y}=e,b=At(BP,g,{[wc]:y.disabled,[Yj]:i},wk(n),ud(f,{large:d}),a);return p.createElement(v,{className:b,ref:t,style:m},F.jsx("input",{className:Ufe,...y,ref:l,type:h}),F.jsx("span",{className:aW,children:s}),c,u,r)});Dk.displayName=`${$n}.Control`;const ds=p.forwardRef((e,t)=>{const{innerLabelChecked:n,innerLabel:r,...a}=e,s=r||n?[F.jsx("div",{className:x3,children:F.jsx("div",{className:_3,children:n||r})},"checked"),F.jsx("div",{className:x3,children:F.jsx("div",{className:_3,children:r})},"unchecked")]:null;return F.jsx(Dk,{...a,indicatorChildren:s,ref:t,type:"checkbox",typeClassName:sW})});ds.displayName=`${$n}.Switch`;const Hc=p.forwardRef((e,t)=>F.jsx(Dk,{...e,ref:t,type:"radio",typeClassName:jfe}));Hc.displayName=`${$n}.Radio`;const ef=p.forwardRef((e,t)=>{const{defaultIndeterminate:n,indeterminate:r,onChange:a,...s}=e,[i,l]=p.useState(r||n||!1),c=p.useRef(null),u=mc(e.inputRef,c),d=p.useCallback(f=>{r===void 0&&l(f.target.indeterminate),a==null||a(f)},[r,a]);return p.useEffect(()=>{r!==void 0&&l(r)},[r]),p.useEffect(()=>{c.current!=null&&(c.current.indeterminate=i)},[c,i]),F.jsx(Dk,{...s,inputRef:u,onChange:d,ref:t,type:"checkbox",typeClassName:Bfe})});ef.displayName=`${$n}.Checkbox`;const Wbe=xW(),Tq=e=>{const{buttonText:t,className:n,disabled:r,fill:a,hasSelection:s=!1,inputProps:i={},large:l=!1,onInputChange:c,size:u="medium",small:d=!1,text:f="Choose file...",...m}=e,h=At(n,Gfe,{[wc]:r,[Qi]:a,[qfe]:s},ud(u,{large:l,small:d})),g={[`${Wbe}-button-text`]:t,className:At(Yfe,{[Kfe]:!!t})},v=y=>{var b;c==null||c(y),(b=i==null?void 0:i.onChange)==null||b.call(i,y)};return F.jsxs("label",{...m,className:h,children:[F.jsx("input",{...i,onChange:v,type:"file",disabled:r}),F.jsx("span",{...g,children:f})]})};Tq.displayName=`${$n}.FileInput`;const Ra=e=>{const{children:t,className:n,contentClassName:r,disabled:a,fill:s,helperText:i,inline:l,intent:c,label:u,labelFor:d,labelInfo:f,style:m,subLabel:h,...g}=e,v=At(Zfe,Rs(c),{[wc]:a,[Qi]:s,[Yj]:l},n);return F.jsxs("div",{className:v,style:m,...g,children:[u&&F.jsxs("label",{className:jP,htmlFor:d,children:[u," ",F.jsx("span",{className:Xj,children:f})]}),h&&F.jsx("div",{className:Jfe,children:h}),F.jsxs("div",{className:At(Xfe,r),children:[t,i&&F.jsx("div",{className:Qfe,children:i})]})]})};Ra.displayName=`${$n}.FormGroup`;const wv=class wv extends Bs{constructor(){super(...arguments);G(this,"state",{hasPendingUpdate:!1,isComposing:!1,nextValue:this.props.value,value:this.props.value});G(this,"cancelPendingCompositionEnd",null);G(this,"handleCompositionStart",n=>{var r,a,s;(r=this.cancelPendingCompositionEnd)==null||r.call(this),this.setState({isComposing:!0}),(s=(a=this.props).onCompositionStart)==null||s.call(a,n)});G(this,"handleCompositionEnd",n=>{var r,a;this.cancelPendingCompositionEnd=this.setTimeout(()=>this.setState({isComposing:!1}),wv.COMPOSITION_END_DELAY),(a=(r=this.props).onCompositionEnd)==null||a.call(r,n)});G(this,"handleChange",n=>{var a,s;const{value:r}=n.target;this.setState({nextValue:r}),(s=(a=this.props).onChange)==null||s.call(a,n)})}static getDerivedStateFromProps(n,r){return r.isComposing||n.value===void 0?null:r.nextValue!==r.value?n.value===r.
1203nextValue?r.hasPendingUpdate?{hasPendingUpdate:!1,value:n.value}:{value:r.nextValue}:n.value===r.value?{hasPendingUpdate:!0}:{hasPendingUpdate:!1,nextValue:n.value,value:n.value}:{hasPendingUpdate:!1,nextValue:n.value,value:n.value}}render(){const{isComposing:n,hasPendingUpdate:r,value:a,nextValue:s}=this.state,{inputRef:i,...l}=this.props;return F.jsx("input",{...l,ref:i,value:n||r?s:a,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onChange:this.handleChange})}};G(wv,"displayName",`${$n}.AsyncControllableInput`),G(wv,"COMPOSITION_END_DELAY",10);let NT=wv;const Gbe=["inputSize","onValueChange"];class Cs extends Bs{constructor(){super(...arguments);G(this,"state",{});G(this,"leftElement",null);G(this,"rightElement",null);G(this,"refHandlers",{leftElement:n=>this.leftElement=n,rightElement:n=>this.rightElement=n});G(this,"handleInputChange",n=>{var a,s,i,l;const r=n.target.value;(s=(a=this.props).onChange)==null||s.call(a,n),(l=(i=this.props).onValueChange)==null||l.call(i,r,n.target)})}render(){const{asyncControl:n=!1,className:r,disabled:a,fill:s,inputClassName:i,inputRef:l,inputSize:c,intent:u,large:d,readOnly:f,round:m,size:h="medium",small:g,tagName:v="div"}=this.props,y=At(Ffe,Rs(u),{[wc]:a,[cfe]:f,[Qi]:s,[Zj]:m},ud(h,{large:d,small:g}),r),b={...this.props.style,paddingLeft:this.state.leftElementWidth,paddingRight:this.state.rightElementWidth},E={type:"text",...Ju(this.props,Gbe,!0),"aria-disabled":a,className:At(qy,i),onChange:this.handleInputChange,size:c,style:b},w=n?F.jsx(NT,{...E,inputRef:l}):F.jsx("input",{...E,ref:l});return p.createElement(v,{className:y},this.maybeRenderLeftElement(),w,this.maybeRenderRightElement())}componentDidMount(){this.updateInputWidth()}componentDidUpdate(n){const{leftElement:r,rightElement:a}=this.props;(n.leftElement!==r||n.rightElement!==a)&&this.updateInputWidth()}validateProps(n){n.leftElement!=null&&n.leftIcon!=null&&console.warn(nhe)}maybeRenderLeftElement(){const{leftElement:n,leftIcon:r}=this.props;if(n!=null)return F.jsx("span",{className:zfe,ref:this.refHandlers.leftElement,children:n});if(r!=null)return F.jsx(Ft,{icon:r,"aria-hidden":!0,tabIndex:-1})}maybeRenderRightElement(){const{rightElement:n}=this.props;if(n!=null)return F.jsx("span",{className:Hfe,ref:this.refHandlers.rightElement,children:n})}updateInputWidth(){const{leftElementWidth:n,rightElementWidth:r}=this.state;if(this.leftElement!=null){const{clientWidth:a}=this.leftElement;(n===void 0||Math.abs(a-n)>2)&&this.setState({leftElementWidth:a})}else this.setState({leftElementWidth:void 0});if(this.rightElement!=null){const{clientWidth:a}=this.rightElement;(r===void 0||Math.abs(a-r)>2)&&this.setState({rightElementWidth:a})}else this.setState({rightElementWidth:void 0})}}G(Cs,"displayName",`${$n}.InputGroup`);function qbe(e){const[t,n]=p.useState(()=>e.defaultChecked??!1),r=e.checked??t,a=p.useCallback(s=>{var i;
1203n(l=>!l),(i=e.onChange)==null||i.call(e,s)},[e.onChange]);return{checked:r,onChange:a}}const Aq=p.forwardRef((e,t)=>{const{alignIndicator:n=Vf.END,checked:r,children:a,className:s,controlKind:i,defaultChecked:l,disabled:c,inputProps:u,inputRef:d,label:f,onChange:m,showAsSelectedWhenChecked:h=!0,value:g,...v}=e,{checked:y,onChange:b}=qbe(e),E=F.jsx("div",{className:_fe,children:a??f}),w={alignIndicator:n,checked:y,disabled:c,inline:!0,inputRef:d,labelElement:E,onChange:b,value:g,...u},x=At(Jj,s,{[zP]:h&&y});return F.jsx(jn,{interactive:!c,className:x,ref:t,...v,children:i==="switch"?F.jsx(ds,{...w}):i==="checkbox"?F.jsx(ef,{...w}):i==="radio"?F.jsx(Hc,{...w}):E})});Aq.displayName=`${$n}.ControlCard`;const Iq=p.forwardRef((e,t)=>{const n=At(e.className,kfe);return F.jsx(Aq,{...e,className:n,controlKind:"radio",ref:t})});Iq.displayName=`${$n}.RadioCard`;const Gv=e=>{const{children:t,className:n,disabled:r,inline:a,label:s,name:i,onChange:l,options:c,selectedValue:u,...d}=e,f=p.useMemo(()=>Kbe(),[]),m=p.useMemo(()=>FW("label"),[]);wg(()=>{t!=null&&c!=null&&console.warn(she)},[t,c]);const h=p.useCallback(y=>{const{className:b,disabled:E,value:w}=y;return{checked:w===u,className:b,disabled:E||r,inline:a,name:i??f,onChange:l,value:w}},[f,r,a,i,l,u]),g=()=>p.Children.map(t,y=>Jd(y,Hc)||Jd(y,Iq)?p.cloneElement(y,h(y.props)):y),v=()=>c==null?void 0:c.map(y=>p.createElement(Hc,{...h(y),key:y.value,labelElement:y.label||y.value}));return F.jsxs("div",{role:"radiogroup","aria-labelledby":s?m:void 0,...Ju(d),className:At(Wfe,n),children:[s&&F.jsx("label",{className:jP,id:m,children:s}),Array.isArray(c)?v():g()]})};Gv.displayName=`${$n}.RadioGroup`;let Ybe=0;function Kbe(){return`${Gv.displayName}-${Ybe++}`}const Zbe=10;function Xbe(e){const{onCompositionStart:t,onCompositionEnd:n,value:r,onChange:a}=e,[s,i]=p.useState(r),[l,c]=p.useState(r),[u,d]=p.useState(!1),[f,m]=p.useState(!1),h=p.useRef(),g=p.useCallback(w=>{var x;(x=h.current)==null||x.call(h),d(!0),t==null||t(w)},[t]),v=p.useCallback(()=>{const w=window.setTimeout(()=>d(!1),Zbe);return()=>window.clearTimeout(w)},[]),y=p.useCallback(w=>{h.current=v(),n==null||n(w)},[v,n]),b=p.useCallback(w=>{const{value:x}=w.target;c(x),a==null||a(w)},[a]);if(!(u||r===void 0)){const w=l!==s;w&&r===l?(i(r),m(!1)):w&&r===s?f||m(!0):w&&r!==s?(i(r),c(r),m(!1)):w||(s!==r||f)&&(i(r),c(r),m(!1))}return{onChange:b,onCompositionEnd:y,onCompositionStart:g,value:u||f?l:s}}const Oq=p.forwardRef(function(t,n){const{value:r,onChange:a,onCompositionStart:s,onCompositionEnd:i,...l}=t,{value:c,onChange:u,onCompositionStart:d,onCompositionEnd:f}=Xbe({onChange:a,onCompositionEnd:i,onCompositionStart:s,value:r});return F.jsx("textarea",{...l,value:c,onChange:u,onCompositionStart:d,onCompositionEnd:f,ref:n})});Oq.displayName=`${$n}.AsyncControllableTextArea`;class RT extends Bs{constructor(){super(...arguments);G(this,"state",{});G(this,"textareaElement",null);G(this,"handleRef",vT(this,"textareaElement",this.props.inputRef));G(this,"maybeSyncHeightToScrollHeight",()=>{const{autoResize:n}=this.props;if(this.textareaElement!=null){const{scrollHeight:r}=this.textareaElement;n&&(this.textareaElement.style.height="0px",this.textareaElement.style.height=r.toString()+"px",this.setState({height:r}))}if(this.props.autoResize&&this.textareaElement!=null){this.textareaElement.style.height="0px";const{scrollHeight:r}=this.textareaElement;this.textareaElement.style.height=r.toString()+"px",this.setState({height:r})}});G(this,"handleChange",n=>{var r,a;this.maybeSyncHeightToScrollHeight(),(a=(r=this.props).onChange)==null||a.call(r,n)})}componentDidMount(){this.maybeSyncHeightToScrollHeight()}componentDidUpdate(n){n.inputRef!==this.props.inputRef&&(zu(n.inputRef,null),this.handleRef=vT(this,"textareaElement",this.props.inputRef),zu(this.props.inputRef,this.textareaElement)),(n.value!==this.props.value||n.style!==this.props.style)&&this.maybeSyncHeightToScrollHeight()}render(){const{asyncControl:n,autoResize:r,className:a,fill:s,inputRef:i,intent:l,large:c,size:u="medium",small:d,...f}=this.props,m=At(qy,rW,Rs(l),ud(u,{large:c,small:d}),{[Qi]:s,[Vfe]:r},a);let{style:h={}}=f;r&&this.state.height!=null&&(h={...h,height:`${this.state.height}px`});const g=n?Oq:"textarea";return F.jsx(g,{...f,className:m,onChange:this.handleChange,style:h,ref:this.handleRef})}}G(RT,"defaultProps",{autoResize:!1,fill:!1,large:!1,size:"medium",small:!1}),G(RT,"displayName",`${$n}.TextArea`);const Ko=p.forwardRef((e,t)=>
1203{const{className:n,children:r,disabled:a,fill:s,iconName:i="double-caret-vertical",iconProps:l,large:c,minimal:u,options:d=[],value:f,...m}=e,h=At($fe,{[wc]:a,[Qi]:s,[Dp]:c,[Lp]:u},n),g="Open dropdown",v=i==="double-caret-vertical"?F.jsx(oG,{title:g,...l}):F.jsx(JW,{title:g,...l}),y=d.map(b=>{const E=typeof b=="object"?b:{value:b};return p.createElement("option",{...E,key:E.value,children:E.label||E.value})});return F.jsxs("div",{className:h,children:[F.jsxs("select",{disabled:a,ref:t,value:f,...m,multiple:!1,children:[y,r]}),v]})});Ko.displayName=`${$n}.HTMLSelect`;const Qbe=new Set(["Shift","Control","Alt","Meta"]),Bf={alt:1,ctrl:2,meta:4,shift:8},NF={cmd:"meta",command:"meta",del:"delete",esc:"escape",escape:"escape",minus:"-",mod:t1e(void 0)?"meta":"ctrl",option:"alt",plus:"+",return:"enter",win:"meta",up:"ArrowUp",left:"ArrowLeft",down:"ArrowDown",right:"ArrowRight"},ax={"~":"`",_:"-","+":"=","{":"[","}":"]","|":"\\",":":";",'"':"'","<":",",">":".","?":"/"};function RF(e,t){return e.modifiers===t.modifiers&&e.key===t.key}const JC=e=>{const t=e.replace(/\s/g,"").toLowerCase().split("+");let n=0,r;for(let a of t){if(a==="")throw new Error(`Failed to parse key combo "${e}". 1204 Valid key combos look like "cmd + plus", "shift+p", or "!"`);NF[a]!==void 0&&(a=NF[a]),Bf[a]!==void 0?n+=Bf[a]:ax[a]!==void 0?(n+=Bf.shift,r=ax[a]):r=a.toLowerCase()}return{modifiers:n,key:r}},TF="Key",TT="Digit";function Jbe(e){if(e.code!=null){if(e.code.startsWith(TF))return e.code.substring(TF.length).toLowerCase();if(e.code.startsWith(TT))return e.code.substring(TT.length).toLowerCase();if(e.code==="Space"||e.code==="Delete")return e.code.toLowerCase()}}const m1=e=>{var r,a;let t;if(!Qbe.has(e.key)){const s=Jbe(e);e.code==="Space"||e.code==="Delete"||e.altKey&&e1e(e.key)&&s!==void 0||(r=e.code)!=null&&r.startsWith(TT)&&s!==void 0?t=s:t=((a=e.key)==null?void 0:a.toLowerCase())??s}let n=0;return e.altKey&&(n+=Bf.alt),e.ctrlKey&&(n+=Bf.ctrl),e.metaKey&&(n+=Bf.meta),e.shiftKey&&(n+=Bf.shift,ax[e.key]!==void 0&&(t=ax[e.key])),{modifiers:n,key:t}};function e1e(e){if(e==null||e.length!==1)return!1;const t=e.charCodeAt(0);return t>127||t<32}function t1e(e){const t=e??(typeof navigator<"u"?navigator.platform:void 0);return t===void 0?!1:/Mac|iPod|iPhone|iPad/.test(t)}const n1e={hasProvider:!1,hotkeys:[],isDialogOpen:!1},r1e=()=>null,a1e=p.createContext([n1e,r1e]);function s1e(e,t={}){const{document:n=i1e(),showDialogKeyCombo:r="?"}=t,a=p.useMemo(()=>e.filter(h=>!h.global).map(h=>({combo:JC(h.combo),config:h})),[e]),s=p.useMemo(()=>e.filter(h=>h.global).map(h=>({combo:JC(h.combo),config:h})),[e]),[i,l]=p.useContext(a1e);p.useEffect(()=>{i.hasProvider||console.warn(ehe)},[i.hasProvider]),p.useEffect(()=>{const h=[...s.map(g=>g.config),...a.map(g=>g.config)];return l({payload:h,type:"ADD_HOTKEYS"}),()=>l({payload:h,type:"REMOVE_HOTKEYS"})},[l,s,a]);const c=p.useCallback((h,g,v,y)=>{var E,w;const b=gT(y.target);for(const x of h?s:a){const{allowInInput:S=!1,disabled:N=!1,preventDefault:k=!1,stopPropagation:C=!1}=x.config;!(b&&!S||N)&&RF(x.combo,g)&&(k&&y.preventDefault(),C&&(y.isPropagationStopped=!0,y.stopPropagation()),(w=(E=x.config)[v])==null||w.call(E,y))}},[s,a]),u=p.useCallback(h=>{const g=m1(h);if(r!==!1&&!gT(h.target)&&RF(JC(r),g)){l({type:"OPEN_DIALOG"});return}c(!0,g,"onKeyDown",h)},[l,c,r]),d=p.useCallback(h=>c(!0,m1(h),"onKeyUp",h),[c]),f=p.useCallback(h=>c(!1,m1(h.nativeEvent),"onKeyDown",h.nativeEvent),[c]),m=p.useCallback(h=>c(!1,m1(h.nativeEvent),"onKeyUp",h.nativeEvent),[c]);return p.useEffect(()=>(n.addEventListener("keydown",u),n.addEventListener("keyup",d),()=>{n.removeEventListener("keydown",u),n.removeEventListener("keyup",d)}),[n,u,d]),{handleKeyDown:f,handleKeyUp:m}}function i1e(){if(!(typeof window>"u"))return window.document}const Mq=({children:e,hotkeys:t,options:n})=>{const{handleKeyDown:r,handleKeyUp:a}=s1e(t,n);return p.useEffect(()=>{Jo("production")||typeof e!="function"&&t.some(s=>!s.global)&&console.error(the)},[t,e]),Nl(e)?e({handleKeyDown:r,handleKeyUp:a}):e},Zi=({className:e,title:t,titleId:n})=>{const r=At(t?ime:sme,e);return F.jsx("li",{className:r,role:"separator",children:t&&F.jsx(o0e,{id:n,children:t})})};Zi.displayName=`${$n}.MenuDivider`;const Pq=({className:e,...t})=>F.jsx("div",{className:At(cme,e),...t});Pq.displayName=`${$n}.NavbarDivider`;const Dq=({align:e=Vf.START,children:t,className:n,...r})=>{const a=At(ome,wk(e),n);return wg(()=>{e===Vf.CENTER&&console.warn(rhe)},[e]),F.jsx("div",{className:a,...r,children:t})};Dq.displayName=`${$n}.NavbarGroup`;const Lq=({children:e,className:t,...n})=>F.jsx("div",{className:At(lme,t),...n,children:e});Lq.displayName=`${$n}.NavbarHeading`;const xi=e=>{const{children:t,className:n,fixedToTop:r,...a}=e,s=At(vk,{[ofe]:r},n);return F.jsx("div",{className:s,...a,children:t})};xi.displayName=`${$n}.Navbar`;xi.Divider=Pq;xi.Group=Dq;xi.Heading=Lq;var AT;(function(e){e[e.STANDARD=48]="STANDARD",e[e.SMALL=32]="SMALL",e[e.EXTRA_SMALL=20]="EXTRA_SMALL"})(AT||(AT={}));const fs=e=>{const{action:t,children:n,className:r,description:a,icon:s,iconMuted:i=!0,iconSize:l=AT.STANDARD,layout:c="vertical",title:u}=e;return F.jsxs("div",{className:At(qE,`${qE}-${c}`,r),children:[s==null?void 0:F.jsx("div",{className:ume,style:{fontSize:`${l}px`,lineHeight:`${l}px`},children:F.jsx(Ft,{className:At({[Fme]:i}),icon:s,size:l,"aria-hidden":!0,tabIndex:-1})}),u==null&&a==null?void 0:F.jsxs("div",{className:dme,children:[u&&F.jsx(GG,{children:u}),a&&xk(a,"div")]}),t,n]})};fs.displayName=`${$n}.NonIdealState`;const Po=class Po extends Bs{constructor(){super(...arguments);G(this,"isAutoFocusing",!1);G(this,"lastActiveElementBeforeOpened");G(this,"state",{hasEverOpened:this.props.isOpen});G(this,"containerElement",p.createRef());G(this,"startFocusTrapElement",p.createRef());G(this,"endFocusTrapElement",p.createRef());G(this,"maybeRenderChild",n=>{if(Nl(n)&&(n=n()),n==null)return null;const r=this.props.enforceFocus||this.props.autoFocus?0:void 0,a=typeof n=="object"?p.cloneElement(n,{className:At(n.props.className,pT),tabIndex:r}):F.jsx("span",{className:pT,tabIndex:r,children:n}),{onOpening:s,onOpened:i,onClosing:l,transitionDuration:c,transitionName:u}=this.props;return F.jsx(Gh,{classNames:u,onEntering:s,onEntered:i,onExiting:l,onExited:this.handleTransitionExited,timeout:c,addEndListener:this.handleTransitionAddEnd,children:a})});G(this,"handleStartFocusTrapElementFocus",n=>{var r,a;!this.props.enforceFocus||this.isAutoFocusing||n.relatedTarget!=null&&((r=this.containerElement.current)!=null&&r.contains(n.relatedTarget))&&n.relatedTarget!==this.endFocusTrapElement.current&&((a=this.endFocusTrapElement.current)==null||a.focus({preventScroll:!0}))});G(this,"handleStartFocusTrapElementKeyDown",n=>{var r;if(this.props.enforceFocus&&n.shiftKey&&n.key==="Tab"){const a=qh(this.containerElement).pop();a!=null?a.focus():(r=this.endFocusTrapElement.current)==null||r.focus({preventScroll:!0})}});G(this,"handleEndFocusTrapElementFocus",n=>{var r,a,s;if(n.relatedTarget!=null&&((r=this.containerElement.current)!=null&&r.contains(n.relatedTarget))&&n.relatedTarget!==this.startFocusTrapElement.current){const i=qh(this.containerElement).shift();!this.isAutoFocusing&&i!=null&&i!==n.relatedTarget?i.focus():(a=this.startFocusTrapElement.current)==null||a.focus({preventScroll:!0})}else{const i=qh(this.containerElement).pop();i!=null?i.focus():(s=this.startFocusTrapElement.current)==null||s.focus({preventScroll:!0})}});
1204G(this,"handleTransitionExited",n=>{var r,a;this.props.shouldReturnFocusOnClose&&this.lastActiveElementBeforeOpened instanceof HTMLElement&&this.lastActiveElementBeforeOpened.focus(),(a=(r=this.props).onClosed)==null||a.call(r,n)});G(this,"handleBackdropMouseDown",n=>{var l;const{backdropProps:r,canOutsideClickClose:a,enforceFocus:s,onClose:i}=this.props;a&&(i==null||i(n)),s&&this.bringFocusInsideOverlay(),(l=r==null?void 0:r.onMouseDown)==null||l.call(r,n)});G(this,"handleDocumentClick",n=>{const{canOutsideClickClose:r,isOpen:a,onClose:s}=this.props,i=n.composed?n.composedPath()[0]:n.target,l=Po.openStack.indexOf(this),c=Po.openStack.slice(l).some(({containerElement:u})=>{var d;return((d=u.current)==null?void 0:d.contains(i))&&!u.current.isSameNode(i)});a&&!c&&r&&(s==null||s(n))});G(this,"handleDocumentFocus",n=>{const r=n.composed?n.composedPath()[0]:n.target;this.props.enforceFocus&&this.containerElement.current!=null&&r instanceof Node&&!this.containerElement.current.contains(r)&&(n.preventDefault(),n.stopImmediatePropagation(),this.bringFocusInsideOverlay())});G(this,"handleKeyDown",n=>{const{canEscapeKeyClose:r,onClose:a}=this.props;n.key==="Escape"&&r&&(a==null||a(n),n.stopPropagation(),n.preventDefault())});G(this,"handleTransitionAddEnd",()=>{})}static getDerivedStateFromProps({isOpen:n}){return n?{hasEverOpened:n}:null}render(){if(this.props.lazy&&!this.state.hasEverOpened)return null;const{autoFocus:n,children:r,className:a,enforceFocus:s,usePortal:i,isOpen:l}=this.props,c=l?p.Children.map(r,this.maybeRenderChild)??[]:[],u=this.maybeRenderBackdrop();u!==null&&c.unshift(u),l&&(n||s)&&c.length>0&&(c.unshift(this.renderDummyElement("__start",{className:WP,onFocus:this.handleStartFocusTrapElementFocus,onKeyDown:this.handleStartFocusTrapElementKeyDown,ref:this.startFocusTrapElement})),s&&c.push(this.renderDummyElement("__end",{className:GP,onFocus:this.handleEndFocusTrapElementFocus,ref:this.endFocusTrapElement})));const d=At(Pl,{[zd]:l,[oW]:!i},a),f=F.jsx("div",{"aria-live":"polite",className:d,onKeyDown:this.handleKeyDown,ref:this.containerElement,children:F.jsx(XG,{appear:!0,component:null,children:c})});return i?F.jsx(Ck,{className:this.props.portalClassName,container:this.props.portalContainer,stopPropagationEvents:this.props.portalStopPropagationEvents,children:f}):f}componentDidMount(){this.props.isOpen&&this.overlayWillOpen()}componentDidUpdate(n){n.isOpen&&!this.props.isOpen?this.overlayWillClose():!n.isOpen&&this.props.isOpen&&this.overlayWillOpen()}componentWillUnmount(){this.overlayWillClose()}bringFocusInsideOverlay(){return this.requestAnimationFrame(()=>{var s;const n=Vv(this.containerElement.current);if(this.containerElement.current==null||n==null||!this.props.isOpen)return;!this.containerElement.current.contains(n)&&((s=this.startFocusTrapElement.current)==null||s.focus({preventScroll:!0}),this.isAutoFocusing=!1)})}maybeRenderBackdrop(){const{backdropClassName:n,backdropProps:r,hasBackdrop:a,isOpen:s,transitionDuration:i,transitionName:l}=this.props;return a&&s?F.jsx(Gh,{classNames:l,timeout:i,addEndListener:this.handleTransitionAddEnd,children:F.jsx("div",{...r,className:At(iW,n,r==null?void 0:r.className),onMouseDown:this.handleBackdropMouseDown})},"__backdrop"):null}renderDummyElement(n,r){const{transitionDuration:a,transitionName:s}=this.props;return F.jsx(Gh,{classNames:s,addEndListener:this.handleTransitionAddEnd,timeout:a,unmountOnExit:!0,children:F.jsx("div",{tabIndex:0,...r})},n)}overlayWillClose(){document.removeEventListener("focus",this.handleDocumentFocus,!0),document.removeEventListener("mousedown",this.handleDocumentClick);const{openStack:n}=Po,r=n.indexOf(this);if(r!==-1){if(n.splice(r,1),n.length>0){const a=Po.getLastOpened();a.props.autoFocus&&a.props.enforceFocus&&(a.bringFocusInsideOverlay(),document.addEventListener("focus",a.handleDocumentFocus,!0))}n.filter(a=>a.props.usePortal&&a.props.hasBackdrop).length===0&&document.body.classList.remove(zd)}}overlayWillOpen(){const{getLastOpened:n,openStack:r}=Po;r.length>0&&document.removeEventListener("focus",n().handleDocumentFocus,!0),r.push(this),this.props.autoFocus&&(this.isAutoFocusing=!0,this.bringFocusInsideOverlay()),this.props.enforceFocus&&document.addEventListener("focus",this.handleDocumentFocus,!0),this.props.canOutsideClickClose&&!this.props.hasBackdrop&&document.addEventListener("mousedown",this.handleDocumentClick),this.props.hasBackdrop&&this.props.usePortal&&document.body.classList.add(zd),this.lastActiveElementBeforeOpened=Vv(this.containerElement.current)}};G(Po,"displayName",`${$n}.Overlay`),G(Po,"defaultProps",{autoFocus:!0,backdropProps:{},canEscapeKeyClose:!0,canOutsideClickClose:!0,enforceFocus:!0,hasBackdrop:!0,isOpen:!1,lazy:!0,shouldReturnFocusOnClose
1204:!0,transitionDuration:300,transitionName:Pl,usePortal:!0}),G(Po,"openStack",[]),G(Po,"getLastOpened",()=>Po.openStack[Po.openStack.length-1]);let IT=Po;var $q=p.createContext(),Fq=p.createContext();function o1e(e){var t=e.children,n=p.useState(null),r=n[0],a=n[1],s=p.useRef(!1);p.useEffect(function(){return function(){s.current=!0}},[]);var i=p.useCallback(function(l){s.current||a(l)},[]);return p.createElement($q.Provider,{value:r},p.createElement(Fq.Provider,{value:i},t))}var zq=function(t){return Array.isArray(t)?t[0]:t},Hq=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t.apply(void 0,r)}},OT=function(t,n){if(typeof t=="function")return Hq(t,n);t!=null&&(t.current=n)},AF=function(t){return t.reduce(function(n,r){var a=r[0],s=r[1];return n[a]=s,n},{})},IF=typeof window<"u"&&window.document&&window.document.createElement?p.useLayoutEffect:p.useEffect,l1e=typeof Element<"u",c1e=typeof Map=="function",u1e=typeof Set=="function",d1e=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function kw(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,a;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!kw(e[r],t[r]))return!1;return!0}var s;if(c1e&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(s=e.entries();!(r=s.next()).done;)if(!t.has(r.value[0]))return!1;for(s=e.entries();!(r=s.next()).done;)if(!kw(r.value[1],t.get(r.value[0])))return!1;return!0}if(u1e&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(s=e.entries();!(r=s.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(d1e&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;if(l1e&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((a[r]==="_owner"||a[r]==="__v"||a[r]==="__o")&&e.$$typeof)&&!kw(e[a[r]],t[a[r]]))return!1;return!0}return e!==e&&t!==t}var f1e=function(t,n){try{return kw(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const m1e=id(f1e);var h1e=[],p1e=function(t,n,r){r===void 0&&(r={});var a=p.useRef(null),s={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||h1e},i=p.useState({styles:{popper:{position:s.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=i[0],c=i[1],u=p.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(h){var g=h.state,v=Object.keys(g.elements);kl.flushSync(function(){c({styles:AF(v.map(function(y){return[y,g.styles[y]||{}]}
1204)),attributes:AF(v.map(function(y){return[y,g.attributes[y]]}))})})},requires:["computeStyles"]}},[]),d=p.useMemo(function(){var m={onFirstUpdate:s.onFirstUpdate,placement:s.placement,strategy:s.strategy,modifiers:[].concat(s.modifiers,[u,{name:"applyStyles",enabled:!1}])};return m1e(a.current,m)?a.current||m:(a.current=m,m)},[s.onFirstUpdate,s.placement,s.strategy,s.modifiers,u]),f=p.useRef();return IF(function(){f.current&&f.current.setOptions(d)},[d]),IF(function(){if(!(t==null||n==null)){var m=r.createPopper||zve,h=m(t,n,d);return f.current=h,function(){h.destroy(),f.current=null}}},[t,n,r.createPopper]),{state:f.current?f.current.state:null,styles:l.styles,attributes:l.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}},g1e=function(){},v1e=function(){return Promise.resolve(null)},y1e=[];function b1e(e){var t=e.placement,n=t===void 0?"bottom":t,r=e.strategy,a=r===void 0?"absolute":r,s=e.modifiers,i=s===void 0?y1e:s,l=e.referenceElement,c=e.onFirstUpdate,u=e.innerRef,d=e.children,f=p.useContext($q),m=p.useState(null),h=m[0],g=m[1],v=p.useState(null),y=v[0],b=v[1];p.useEffect(function(){OT(u,h)},[u,h]);var E=p.useMemo(function(){return{placement:n,strategy:a,onFirstUpdate:c,modifiers:[].concat(i,[{name:"arrow",enabled:y!=null,options:{element:y}}])}},[n,a,c,i,y]),w=p1e(l||f,h,E),x=w.state,S=w.styles,N=w.forceUpdate,k=w.update,C=p.useMemo(function(){return{ref:g,style:S.popper,placement:x?x.placement:n,hasPopperEscaped:x&&x.modifiersData.hide?x.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:x&&x.modifiersData.hide?x.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:S.arrow,ref:b},forceUpdate:N||g1e,update:k||v1e}},[g,b,n,x,S,k,N]);return zq(d)(C)}var w1e=function(){},E1e=w1e;const x1e=id(E1e);function _1e(e){var t=e.children,n=e.innerRef,r=p.useContext(Fq),a=p.useCallback(function(s){OT(n,s),Hq(r,s)},[n,r]);return p.useEffect(function(){return function(){return OT(n,null)}},[]),p.useEffect(function(){x1e(!!r,"`Reference` should not be used outside of a `Manager` component.")},[r]),zq(t)({ref:a})}const k1e={enabled:!0,name:"matchReferenceWidth",phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>{const t=e.elements.reference.getBoundingClientRect().width;e.elements.popper.style.width=`${t}px`}};class Hr extends Bs{constructor(){super(...arguments);G(this,"state",{hasDarkParent:!1,isClosingViaEscapeKeypress:!1,isOpen:this.getIsOpen(this.props)});G(this,"popoverElement",null);G(this,"popoverRef",vT(this,"popoverElement",this.props.popoverRef));G(this,"targetRef",p.createRef());G(this,"transitionContainerElement",p.createRef());G(this,"cancelOpenTimeout");G(this,"isMouseInTargetOrPopover",!1);G(this,"lostFocusOnSamePage",!0);G(this,"didWarnReact19",!1);G(this,"popperScheduleUpdate");G(this,"isControlled",()=>this.props.isOpen!==void 0);G(this,"isArrowEnabled",()=>{var n,r;return!this.props.minimal&&((r=(n=this.props.modifiers)==null?void 0:n.arrow)==null?void 0:r.enabled)!==!1});G(this,"isHoverInteractionKind",()=>this.props.interactionKind===Ka.HOVER||this.props.interactionKind===Ka.HOVER_TARGET_ONLY);G(this,"reposition",()=>{var n;return(n=this.popperScheduleUpdate)==null?void 0:n.call(this)});G(this,"renderTarget",({ref:n})=>{const{children:r,className:a,disabled:s,fill:i,openOnTargetFocus:l,renderTarget:c}=this.props,{isOpen:u}=this.state,d=this.isControlled(),f=this.isHoverInteractionKind();let{targetTagName:m}=this.props;i&&(m="div");const h=mc(n,this.targetRef),g=f?{onBlur:this.handleTargetBlur,onContextMenu:this.handleTargetContextMenu,onFocus:this.handleTargetFocus,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave}:{onClick:this.handleTargetClick,onKeyDown:this.handleKeyDown},v=!this.getIsContentEmpty()&&!s&&l&&f?0:void 0,y={className:At(a,gW,{[mW]:u,[Xd]:u&&!d&&!f,[Qi]:i}),ref:h,...g},b={"aria-expanded":f?void 0:u,"aria-haspopup":this.props.interactionKind===Ka.HOVER_TARGET_ONLY?void 0:this.props.popupKind??"menu"},E={[Xd]:u&&!d&&!f,[Qi]:i};let w;if(c!==void 0)w=c({...y,...b,className:At(y.className,E),isOpen:u,tabIndex:v});else{const x=xk(p.Children.toArray(r)[0]);if(x===void 0)return null;const S=p.cloneElement(x,{...b,className:At(x.props.className,E),disabled:u&&S1e(x)?!0:x.props.disabled,tabIndex:x.props.tabIndex??v});w=p.createElement(m,{...y,...this.props.targetProps},S)}
1204return F.jsx(kF,{targetRef:this.targetRef,onResize:this.reposition,children:w})});G(this,"renderPopover",n=>{const{autoFocus:r,enforceFocus:a,backdropProps:s,canEscapeKeyClose:i,hasBackdrop:l,interactionKind:c,usePortal:u}=this.props,{isClosingViaEscapeKeypress:d,isOpen:f}=this.state,m=cq(n.placement,this.isArrowEnabled()?n.arrowProps.style:void 0);this.popperScheduleUpdate=n.update;const h={onClick:this.handlePopoverClick,onKeyDown:E=>bm(E)&&this.handlePopoverClick(E)};(c===Ka.HOVER||!u&&c===Ka.HOVER_TARGET_ONLY)&&(h.onMouseEnter=this.handleMouseEnter,h.onMouseLeave=this.handleMouseLeave);const g=Qy(n.placement),v=At(us,{[Xr]:this.props.inheritDarkTheme&&this.state.hasDarkParent,[Lp]:this.props.minimal,[X0]:this.props.captureDismiss,[fW]:this.props.matchTargetWidth,[pW]:n.isReferenceHidden===!0,[hW]:n.hasPopperEscaped===!0},`${uW}-${g}`,this.props.popoverClassName),y=this.isHoverInteractionKind()?!1:void 0,b=this.isHoverInteractionKind()?!1:d?!0:this.props.shouldReturnFocusOnClose;return F.jsx(Eg,{autoFocus:r??y,backdropClassName:lW,backdropProps:s,canEscapeKeyClose:i,canOutsideClickClose:c===Ka.CLICK,childRef:this.transitionContainerElement,enforceFocus:a,hasBackdrop:l,isOpen:f,lazy:this.props.lazy,onClose:this.handleOverlayClose,onClosed:this.props.onClosed,onClosing:this.props.onClosing,onOpened:this.props.onOpened,onOpening:this.props.onOpening,transitionDuration:this.props.transitionDuration,transitionName:us,usePortal:u,portalClassName:this.props.portalClassName,portalContainer:this.props.portalContainer,portalStopPropagationEvents:this.props.portalStopPropagationEvents,shouldReturnFocusOnClose:b,children:F.jsx("div",{className:vW,ref:mc(n.ref,this.transitionContainerElement),style:n.style,children:F.jsx(kF,{onResize:this.reposition,children:F.jsxs("div",{className:v,style:{transformOrigin:m},ref:this.popoverRef,...h,children:[this.isArrowEnabled()&&F.jsx(lD,{arrowProps:n.arrowProps,placement:n.placement}),F.jsx("div",{className:cW,children:this.props.content})]})})})})});G(this,"handleTargetFocus",n=>{if(this.props.openOnTargetFocus&&this.isHoverInteractionKind()){if(n.relatedTarget==null&&!this.lostFocusOnSamePage)return;this.handleMouseEnter(n)}});G(this,"handleTargetBlur",n=>{this.props.openOnTargetFocus&&this.isHoverInteractionKind()&&(n.relatedTarget!=null?n.relatedTarget!==this.popoverElement&&!this.isElementInPopover(n.relatedTarget)&&this.handleMouseLeave(n):this.handleMouseLeave(n)),this.lostFocusOnSamePage=n.relatedTarget!=null});G(this,"handleTargetContextMenu",n=>{n.defaultPrevented&&this.setOpenState(!1,n)});G(this,"handleMouseEnter",n=>{this.isMouseInTargetOrPopover=!0,!this.props.usePortal&&this.isElementInPopover(n.target)&&this.props.interactionKind===Ka.HOVER_TARGET_ONLY&&!this.props.openOnTargetFocus?this.handleMouseLeave(n):this.props.disabled||this.setOpenState(!0,n,this.props.hoverOpenDelay)});G(this,"handleMouseLeave",n=>{this.isMouseInTargetOrPopover=!1,n.persist(),this.setTimeout(()=>{this.isMouseInTargetOrPopover||this.setOpenState(!1,n,this.props.hoverCloseDelay)})});G(this,"handlePopoverClick",n=>{const r=n.target,a=r.closest(`.${us}`),s=r.closest(`.${us}`),i=(a??s)===this.getPopoverElement(),l=(a==null?void 0:a.classList.contains(X0))??(s==null?void 0:s.classList.contains(X0))??!1,c=r.closest(`.${Ho}, .${dW}`),u=(c==null?void 0:c.classList.contains(Ho))??!1,d=r.closest(`:disabled, .${wc}`)!=null;u&&!d&&(!l||i)&&this.setOpenState(!1,n)});G(this,"handleOverlayClose",n=>{if(this.targetRef.current==null||n===void 0)return;const r=n.nativeEvent??n,a=r.composed?r.composedPath()[0]:r.target,s=n.nativeEvent instanceof KeyboardEvent||n instanceof KeyboardEvent;(!SW(this.targetRef.current,a)||s)&&this.setOpenState(!1,n)});G(this,"handleKeyDown",n=>{bm(n)&&this.handleTargetClick(n)});G(this,"handleTargetClick",n=>{this.state.isOpen&&this.isSimulatedButtonClick(n)||!this.props.disabled&&!this.isElementInPopover(n.target)&&(this.props.isOpen==null?this.setState(a=>({isOpen:!a.isOpen})):this.setOpenState(!this.props.isOpen,n))});G(this,"isSimulatedButtonClick",n=>!n.isTrusted&&n.target.matches(`.${Wy}`))}getPopoverElement(){var n;return(n=this.popoverElement)==null?void 0:n.querySelector(`.${us}`)}getIsOpen(n){return n.disabled?!1:n.isOpen??n.defaultIsOpen}render(){const{disabled:n,placement:r,position:a="auto",positioningStrategy:s}=this.props,{isOpen:i}=this.state;return this.getIsContentEmpty()?(!n&&i!==!1&&!Jo("production")&&console.warn(AW),this.renderTarget({ref:N1e})):F.jsxs(o1e,{children:[F.jsx(_1e,{children:this.renderTarget}),F.jsx(b1e,{innerRef:this.popoverRef,placement:r??Sq(a),strategy:s,modifiers:this.getPopperModifiers(),children:this.renderPopover})]})}componentDidMount(){this.updateDarkParent(),this.warnIfReact19()}warnIfReact19(){this.didWarnReact19||Jo("production")||yhe()<19||(this.didWarnReact19=!0,console.warn(ahe))}componentDidUpdate(n,r){super.componentDidUpdate(n,r),this.updateDarkParent();const a=this.getIsOpen(this.props);this.props.isOpen!=null&&a!==this.state.isOpen?(this.setOpenState(a),this.setState({isOpen:a})):this.props.disabled&&this.state.isOpen&&this.props.isOpen==null&&this.setOpenState(!1)}validateProps(n){n.isOpen==null&&n.onInteraction!=null&&console.warn(MW),n.hasBackdrop&&!n.usePortal&&console.warn(IW),n.hasBackdrop&&n.interactionKind!==Ka.CLICK&&console.warn(NW),n.placement!==void 0&&n.position!==void 0&&console.warn(OW);const r=p.Children.count(n.children),a=n.renderTarget!==void 0,s=n.targetProps!==void 0;r===0&&!a&&console.warn(CW),r>1&&console.warn(RW),r>0&&a&&console.warn(TW),a&&s&&console.warn(PW)}getPopperModifiers(){var i,l,c,u;const{matchTargetWidth:n,modifiers:r,modifiersCustom:a}=this.props,s=[{enabled:this.isArrowEnabled(),name:"arrow",...r==null?void 0:r.arrow},{name:"computeStyles",...r==null?void 0:r.computeStyles,options:{adaptive:!0,gpuAcceleration:!1,...(i=r==null?void 0:r.computeStyles)==null?void 0:i.options}},{enabled:this.isArrowEnabled(),name:"offset",...r==null?void 0:r.offset,options:{offset:[0,Vp/2],...(l=r==null?void 0:r.offset)==null?void 0:l.options}},{name:"flip",...r==null?void 0:r.flip,options:{boundary:this.props.boundary,rootBoundary:this.props.rootBoundary,...(c=r==null?void 0:r.flip)==null?void 0:c.options}},{name:"preventOverflow",...r==null?void 0:r.preventOverflow,options:{boundary:this.props.boundary,rootBoundary:this.props.rootBoundary,...(u=r==null?void 0:r.preventOverflow)==null?void 0:u.options}}];return n&&s.push(k1e),a!==void 0&&s.push(...a),s}setOpenState(n,r,a){var s,i,l,c,u;(s=this.cancelOpenTimeout)==null||s.call(this),a!==void 0&&a>0?(r==null||r.persist(),this.cancelOpenTimeout=this.setTimeout(()=>{this.setOpenState(n,r)},a)):(this.props.isOpen==null?this.setState({isOpen:n}):(l=(i=this.props).onInteraction)==null||l.call(i,n,r),n||((u=(c=this.props).onClose)==null||u.call(c,r),this.setState({isClosingViaEscapeKeypress:C1e(r==null?void 0:r.nativeEvent)})))}updateDarkParent(){var n;if(this.props.usePortal&&this.state.isOpen){const r=((n=this.targetRef.current)==null?void 0:n.closest(`.${Xr}`))!=null;this.setState({hasDarkParent:r})}}isElementInPopover(n){var r;return((r=this.getPopoverElement())==null?void 0:r.contains(n))??!1}getIsContentEmpty(){const{content:n}=this.props;return n==null||Ek(n)}}G(Hr,"displayName",`${$n}.Popover`),G(Hr,"defaultProps",{boundary:"clippingParents",captureDism
1204iss:!1,defaultIsOpen:!1,disabled:!1,fill:!1,hasBackdrop:!1,hoverCloseDelay:300,hoverOpenDelay:150,inheritDarkTheme:!0,interactionKind:Ka.CLICK,matchTargetWidth:!1,minimal:!1,openOnTargetFocus:!0,positioningStrategy:"absolute",renderTarget:void 0,shouldReturnFocusOnClose:!1,targetTagName:"span",transitionDuration:300,usePortal:!0});function S1e(e){var t;return((t=e==null?void 0:e.type)==null?void 0:t.displayName)===`${$n}.Tooltip`}function C1e(e){return e instanceof KeyboardEvent&&e.key==="Escape"}function N1e(){}const Vq=e=>{const{animate:t=!0,className:n,intent:r,stripes:a=!0,value:s,...i}=e,l=At(pme,Rs(r),{[yme]:!t,[vme]:!a},n),c=s==null?void 0:100*bg(s,0,1),u=c==null?void 0:c+"%";return F.jsx("div",{...i,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c==null?void 0:Math.round(c),className:l,role:"progressbar",children:F.jsx("div",{className:gme,style:{width:u}})})};Vq.displayName=`${$n}.ProgressBar`;const OF={FULL:"full",START:"start",END:"end"},Uq={LOCK:"lock",PUSH:"push",NONE:"none"};function Sw(e){return`${(e*100).toFixed(2)}%`}function MF(e,t,n,r){const a=t<n?1:-1;for(let s=t;s!==n+a;s+=a)e[s]=r}function R1e(e,t){if(e.length===0)return;let n=e[0],r=t(n);for(let a=1;a<e.length;a++){const s=e[a],i=t(s);i<r&&(n=s,r=i)}return n}const T1e=["max","min","stepSize","tickSize","value"];var nR;let A1e=(nR=class extends Bs{constructor(){super(...arguments);G(this,"state",{isMoving:!1});G(this,"handleElement",null);G(this,"refHandlers",{handle:n=>this.handleElement=n});G(this,"beginHandleMovement",n=>{document.addEventListener("mousemove",this.handleHandleMovement),document.addEventListener("mouseup",this.endHandleMovement),this.setState({isMoving:!0}),this.changeValue(this.clientToValue(this.mouseEventClientOffset(n)))});G(this,"beginHandleTouchMovement",n=>{document.addEventListener("touchmove",this.handleHandleTouchMovement),document.addEventListener("touchend",this.endHandleTouchMovement),document.addEventListener("touchcancel",this.endHandleTouchMovement),this.setState({isMoving:!0}),this.changeValue(this.clientToValue(this.touchEventClientOffset(n)))});G(this,"getStyleProperties",()=>{if(this.handleElement==null)return{};const{min:n=0,tickSizeRatio:r,value:a,vertical:s}=this.props,{handleMidpoint:i}=this.getHandleMidpointAndOffset(this.handleElement,!0),l=(a-n)*r,c=`calc(${Sw(l)} - ${i}px)`;return s?{bottom:c}:{left:c}});G(this,"endHandleMovement",n=>{this.handleMoveEndedAt(this.mouseEventClientOffset(n))});G(this,"endHandleTouchMovement",n=>{this.handleMoveEndedAt(this.touchEventClientOffset(n))});G(this,"handleMoveEndedAt",n=>{var a,s;this.removeDocumentEventListeners(),this.setState({isMoving:!1});const r=this.changeValue(this.clientToValue(n));(s=(a=this.props).onRelease)==null||s.call(a,r)});G(this,"handleHandleMovement",n=>{this.handleMovedTo(this.mouseEventClientOffset(n))});G(this,"handleHandleTouchMovement",n=>{this.handleMovedTo(this.touchEventClientOffset(n))});G(this,"handleMovedTo",n=>{this.state.isMoving&&!this.props.disabled&&this.changeValue(this.clientToValue(n))});G(this,"handleKeyDown",n=>{const{stepSize:r,value:a}=this.props,s=HW(n,["ArrowLeft","ArrowDown"],["ArrowRight","ArrowUp"]);s!==void 0&&(this.changeValue(a+r*s),n.preventDefault())});G(this,"handleKeyUp",n=>{var r,a;_he(n)&&((a=(r=this.props).onRelease)==null||a.call(r,this.props.value))})}componentDidMount(){this.forceUpdate()}render(){const{className:n,disabled:r,label:a,min:s,max:i,value:l,vertical:c,htmlProps:u}=this.props,{isMoving:d}=this.state;return F.jsx("span",{role:"slider",tabIndex:0,...u,className:At(yW,{[Xd]:d},n),onKeyDown:r?void 0:this.handleKeyDown,onKeyUp:r?void 0:this.handleKeyUp,onMouseDown:r?void 0:this.beginHandleMovement,onTouchStart:r?void 0:this.beginHandleTouchMovement,ref:this.refHandlers.handle,style:this.getStyleProperties(),"aria-valuemin":s,"aria-valuemax":i,"aria-valuenow":l,"aria-disabled":r,"aria-orientation":c?"vertical":"horizontal",children:a==null?null:F.jsx("span",{className:bW,children:a})})}componentWillUnmount(){this.removeDocumentEventListeners()}clientToValue(n){const{stepSize:r,tickSize:a,value:s,vertical:i}=this.props;if(this.handleElement==null)return s;const l=i?window.innerHeight-n:n,c=this.getHandleElementCenterPixel(this.handleElement),u=l-c;return isNaN(u)?s:s+Math.round(u/(a*r))*r}mouseEventClientOffset(n){return this.props.vertical?n.clientY:n.clientX}touchEventClientOffset(n){const r=n.changedTouches[0];return this.props.vertical?r.clientY:r.clientX}validateProps(n){for(const r of T1e)if(typeof n[r]!="number")throw new Error(`[Blueprint] <Handle> requires number value for ${r} prop`)}changeValue(n,r=this.props.onChange){return n=this.clamp(n),!isNaN(n)&&this.props.value!==n&&(r==null||r(n)),n}clamp(n){return bg(n,this.props.min,this.props.max)}getHandleElementCenterPixel(n){const{handleMidpoint:r,handleOffset:a}=this.getHandleMidpointAndOffset(n);return a+r}getHandleMidpointAndOffset(n,r=!1){if(n==null)return{handleMidpoint:0,handleOffset:0};const{vertical:a}=this.props,s=n.getBoundingClientRect();s.width=n.offsetWidth,s.height=n.offsetHeight;const i=a?r?"width":"height":r?"height":"width",l=a?window.innerHeight-(s.top+s[i]):s.left;return{handleMidpoint:s[i]/2,handleOffset:l}}removeDocumentEventListeners(){document.removeEventListener("mousemove",this.handleHandleMovement),document.removeEventListener("mouseup",this.endHandleMovement),document.removeEventListener("touchmove",this.handleHandleTouchMovement),document.removeEventListener("touchend",this.endHandleTouchMovement),document.removeEventListener("touchcancel",this.endHandleTouchMovement)}},G(nR,"displayName",`${$n}.SliderHandle`),nR);const jp=()=>null;jp.displayName=`${$n}.MultiSliderHandle`;const Nd=class Nd extends Bs{constructor(){super(...arguments);G(this,"state",{labelPrecision:I1e(this.props),tickSize:0,tickSizeRatio:0});G(this,"handleElements",[]);G(this,"trackElement",null);G(this,"addHandleRef",n=>{n!=null&&this.handleElements.push(n)});
1204G(this,"maybeHandleTrackClick",n=>{if(this.canHandleTrackEvent(n)){const r=this.nearestHandleForValue(this.handleElements,a=>a.mouseEventClientOffset(n));r&&r.beginHandleMovement(n)}});G(this,"maybeHandleTrackTouch",n=>{if(this.canHandleTrackEvent(n)){const r=this.nearestHandleForValue(this.handleElements,a=>a.touchEventClientOffset(n));r&&r.beginHandleTouchMovement(n)}});G(this,"canHandleTrackEvent",n=>{const r=n.target;return!this.props.disabled&&r.closest(`.${yW}`)==null});G(this,"getHandlerForIndex",(n,r)=>a=>{r==null||r(this.getNewHandleValues(a,n))});G(this,"handleChange",n=>{var s,i;const r=xf(this.props),a=r.map(l=>l.value);Qd(n,a)||((i=(s=this.props).onChange)==null||i.call(s,n),r.forEach((l,c)=>{var u;a[c]!==n[c]&&((u=l.onChange)==null||u.call(l,n[c]))}))});G(this,"handleRelease",n=>{var a,s;const r=xf(this.props);(s=(a=this.props).onRelease)==null||s.call(a,n),r.forEach((i,l)=>{var c;(c=i.onRelease)==null||c.call(i,n[l])})})}static getDerivedStateFromProps(n){return{labelPrecision:Nd.getLabelPrecision(n)}}static getLabelPrecision({labelPrecision:n,stepSize:r}){return n??$W(r)}getSnapshotBeforeUpdate(n){const r=xf(n);return xf(this.props).length!==r.length&&(this.handleElements=[]),null}render(){const n=At(ym,{[wc]:this.props.disabled,[`${ym}-unlabeled`]:this.props.labelRenderer===!1,[HP]:this.props.vertical},this.props.className);return F.jsxs("div",{className:n,onMouseDown:this.maybeHandleTrackClick,onTouchStart:this.maybeHandleTrackTouch,children:[F.jsx("div",{className:Eme,ref:r=>this.trackElement=r,children:this.renderTracks()}),F.jsx("div",{className:wme,children:this.renderLabels()}),this.renderHandles()]})}componentDidMount(){this.updateTickSize()}componentDidUpdate(n,r){super.componentDidUpdate(n,r),(n.min!==this.props.min||n.max!==this.props.max||n.vertical!==this.props.vertical)&&this.updateTickSize()}validateProps(n){if(n.stepSize<=0)throw new Error(ihe);if(n.labelStepSize!==void 0&&n.labelValues!==void 0)throw new Error(dhe);if(n.labelStepSize!==void 0&&n.labelStepSize<=0)throw new Error(ohe);if(n.min!==void 0&&!isFinite(n.min))throw new Error(lhe);if(n.max!==void 0&&!isFinite(n.max))throw new Error(che);let r=!1;if(p.Children.forEach(n.children,a=>{a&&!Jd(a,jp)&&(r=!0)}),r)throw new Error(uhe)}formatLabel(n,r=!1){const{labelRenderer:a}=this.props;if(a!==!1)return Nl(a)?a(n,{isHandleTooltip:r}):n.toFixed(this.state.labelPrecision)}renderLabels(){if(this.props.labelRenderer===!1)return null;const n=this.getLabelValues(),{max:r,min:a}=this.props;return n.map((i,l)=>{const c=Sw((i-a)/(r-a)),u=this.props.vertical?{bottom:c}:{left:c};return F.jsx("div",{className:bW,style:u,children:this.formatLabel(i)},l)})}renderTracks(){const n=Bq(this.props);n.push({value:this.props.max});let r={value:this.props.min};const a=[];for(let s=0;s<n.length;s++){const i=n[s];a.push(this.renderTrackFill(s,r,i)),r=i}return a}renderTrackFill(n,r,a){const[s,i]=[this.getOffsetRatio(r.value),this.getOffsetRatio(a.value)].sort((m,h)=>m-h),l=Sw(s),c=Sw(1-i),d={...this.props.vertical?{bottom:l,left:0,top:c}:{left:l,right:c,top:0},...r.trackStyleAfter||a.trackStyleBefore||{}},f=At(xme,Rs(this.getTrackIntent(r,a)));return F.jsx("div",{className:f,style:d},`track-${n}`)}renderHandles(){const{disabled:n,max:r,min:a,stepSize:s,vertical:i}=this.props,l=xf(this.props);return l.length===0?null:l.map(({value:c,type:u,className:d,htmlProps:f},m)=>F.jsx(A1e,{htmlProps:f,className:At({[_me]:u===OF.START,[kme]:u===OF.END},d),disabled:n,label:this.formatLabel(c,!0),max:r,min:a,onChange:this.getHandlerForIndex(m,this.handleChange),onRelease:this.getHandlerForIndex(m,this.handleRelease),ref:this.addHandleRef,stepSize:s,tickSize:this.state.tickSize,tickSizeRatio:this.state.tickSizeRatio,value:c,vertical:i},`${m}-${l.length}`))}nearestHandleForValue(n,r){return R1e(n,a=>{const s=r(a),i=a.clientToValue(s),l=a.props.value;return Math.abs(i-l)})}getNewHandleValues(n,r){const s=xf(this.props).map(u=>u.value),i=s.slice();i[r]=n,i.sort((u,d)=>u-d);const l=i.indexOf(n),c=this.findFirstLockedHandleIndex(r,l);if(c===-1)MF(i,r,l,n);else{const u=s[c];return MF(s,r,c,u),s}return i}findFirstLockedHandleIndex(n,r){const a=n<r?1:-1,s=xf(this.props);for(let i=n+a;i!==r+a;i+=a)if(s[i].interactionKind!==Uq.PUSH)return i;return-1}getLabelValues(){const{labelStepSize:n,labelValues:r,min:a,max:s}=this.props;let i=[];if(r!==void 0)i=r.slice();else for(let l=a;l<s||bhe(l,s);l+=n??1)i.push(l);return i}getOffsetRatio(n){return bg((n-this.props.min)*this.state.tickSizeRatio,0,1)}getTrackIntent(n,r){return this.props.showTrackFill?n.intentAfter!==void 0?n.intentAfter:r!==void 0&&r.intentBefore!==void 0?r.intentBefore:this.props.defaultTrackIntent:jr.NONE}updateTickSize(){if(this.trackElement!=null){const n=this.props.vertical?this.trackElement.clientHeight:this.trackElement.clientWidth,r=1/(this.props.max-this.props.min),a=n*r;this.setState({tickSize:a,tickSizeRatio:r})}}};G(Nd,"defaultSliderProps",{disabled:!1,max:10,min:0,showTrackFill:!0,stepSize:1,vertical:!1}),G(Nd,"defaultProps",{...Nd.defaultSliderProps,defaultTrackIntent:jr.NONE}),G(Nd,"displayName",`${$n}.MultiSlider`),G(Nd,"Handle",jp);let qv=Nd;function I1e({labelPrecision:e,stepSize:t=qv.defaultSliderProps.stepSize}){return e??$W(t)}function xf(e){return Bq(e,t=>t.interactionKind!==Uq.NONE)}function Bq({children:e},t=()=>!0){const n=p.Children.map(e,a=>Jd(a,jp)&&t(a.props)?a.props:null);let r=n??[];return r=r.filter(a=>a!==null),r.sort((a,s)=>a.value-s.value),r}class sx extends Bs{render(){const{initialValue:t,intent:n,value:r,onChange:a,onRelease:s,handleHtmlProps:i,...l}=this.props;return F.jsxs(qv,{...l,children:[F.jsx(jp,{value:r,intentAfter:r<t?n:void 0,intentBefore:r>t?n:void 0,onChange:a,onRelease:s,htmlProps:i}),F.jsx(jp,{value:t,interactionKind:"none"})]})}}G(sx,"defaultProps",{...qv.defaultSliderProps,initialValue:0,intent:jr.PRIMARY,value:0}),G(sx,"displayName",`${$n}.Slider`);class Wp extends Bs{render(){const{className:t,panel:n}=this.props;return F.jsx("div",{className:At(qP,t),role:"tablist",children:Nl(n)?n({tabPanelId:"",tabTitleId:""}):n}
1204)}}G(Wp,"defaultProps",{disabled:!1}),G(Wp,"displayName",`${$n}.Tab`);const jq=e=>{const{className:t,large:n,onRemove:r,size:a,tabIndex:s}=e,i=n||a==="large"||(t==null?void 0:t.includes(Dp)),l=p.useCallback(c=>{r==null||r(c,e)},[r,e]);return F.jsx("button",{"aria-label":"Remove tag",type:"button",className:Pme,onClick:l,tabIndex:s,children:F.jsx(kk,{size:i?Nt.LARGE:Nt.STANDARD})})};jq.displayName=`${$n}.TagRemoveButton`;const li=p.forwardRef((e,t)=>{const{children:n,className:r,endIcon:a,fill:s=!1,icon:i,intent:l,interactive:c,large:u=!1,minimal:d=!1,multiline:f,onRemove:m,rightIcon:h,round:g=!1,size:v="medium",tabIndex:y=0,htmlTitle:b,...E}=e,w=Nl(m),x=c??E.onClick!=null,[S,N]=jW(x,e,t,{defaultTabIndex:0,disabledTabIndex:void 0}),k=At(EW,Rs(l),ud(v,{large:u}),{[Xd]:S,[Qi]:s,[Kj]:x,[Lp]:d,[Zj]:g},r);return F.jsxs("span",{...Ju(E),...N,className:k,role:x?"button":void 0,children:[F.jsx(Ft,{icon:i}),!Uv(n)&&F.jsx(Sk,{className:Qi,ellipsize:!f,tagName:"span",title:b,children:n}),F.jsx(Ft,{icon:a??h}),w&&F.jsx(jq,{...e})]})});li.displayName=`${$n}.Tag`;class Wq extends Bs{constructor(){super(...arguments);G(this,"handleClick",n=>this.props.onClick(this.props.id,n))}render(){const{className:n,children:r,disabled:a,id:s,parentId:i,selected:l,title:c,icon:u,tagContent:d,tagProps:f,...m}=this.props,h=l?jr.PRIMARY:jr.NONE,{tabPanelId:g,tabTitleId:v}=Gq(i,s);return F.jsxs("div",{...Ju(m),"aria-controls":g,"aria-disabled":a,"aria-expanded":l,"aria-selected":l,className:At(cd,n),"data-tab-id":s,id:v,onClick:a?void 0:this.handleClick,role:"tab",tabIndex:a?void 0:l?0:-1,children:[u!=null&&F.jsx(Ft,{icon:u,intent:h,className:Tme}),c,r,d!=null&&F.jsx(li,{minimal:!0,intent:h,...f,className:At(Ame,f==null?void 0:f.className),children:d})]})}}G(Wq,"displayName",`${$n}.TabTitle`);function Gq(e,t){return{tabPanelId:`${qP}_${e}_${t}`,tabTitleId:`${cd}-title_${e}_${t}`}}class O1e extends Bs{render(){const{className:t,id:n,parentId:r,selectedTabId:a,panel:s,renderActiveTabPanelOnly:i}=this.props,l=n===a;if(s===void 0||i&&!l)return;const{tabTitleId:c,tabPanelId:u}=Gq(r,n);return F.jsx("div",{"aria-labelledby":c,"aria-hidden":!l,className:At(qP,t),id:u,role:"tabpanel",children:Nl(s)?s({tabPanelId:u,tabTitleId:c}):s})}}const M1e=()=>F.jsx("div",{className:Lfe}),h1=`.${cd}`;class Cw extends Bs{constructor(n){super(n);G(this,"tablistElement",null);G(this,"refHandlers",{tablist:n=>this.tablistElement=n});G(this,"handleKeyDown",n=>{var u;const r=HW(n,["ArrowLeft","ArrowUp"],["ArrowRight","ArrowDown"]);if(r===void 0)return;const a=(u=Vv(this.tablistElement))==null?void 0:u.closest(h1);if(!a)return;const s=this.getTabElements('[aria-disabled="false"]'),i=s.indexOf(a);if(i<0)return;n.preventDefault();const{length:l}=s,c=(i+r+l)%l;s[c].focus()});G(this,"handleKeyPress",n=>{const r=n.target.closest(h1);r!=null&&bm(n)&&(n.preventDefault(),r.click())});G(this,"handleTabClick",(n,r)=>{var a,s;(s=(a=this.props).onChange)==null||s.call(a,n,this.state.selectedTabId,r),this.props.selectedTabId===void 0&&this.setState({selectedTabId:n})});G(this,"renderTabPanel",n=>{const{className:r,panel:a,id:s,panelClassName:i}=n.props;if(a!==void 0)return p.createElement(O1e,{...n.props,key:s,className:At(r,i),parentId:this.props.id,selectedTabId:this.state.selectedTabId})});G(this,"renderTabTitle",n=>{if(PF(n)){const{id:r}=n.props;return F.jsx(Wq,{...n.props,parentId:this.props.id,onClick:this.handleTabClick,selected:r===this.state.selectedTabId})}return n});const r=this.getInitialSelectedTabId();this.state={selectedTabId:r}}static getDerivedStateFromProps({selectedTabId:n}){return n!==void 0?{selectedTabId:n}:null}render(){const{animate:n,children:r,className:a,fill:s,large:i,renderActiveTabPanelOnly:l,size:c="medium",vertical:u}=this.props,{indicatorWrapperStyle:d,selectedTabId:f}=this.state,m=p.Children.map(r,this.renderTabTitle),h=this.getTabChildren().filter(l?b=>b.props.id===f:()=>!0).map(this.renderTabPanel),g=n?F.jsx("div",{className:Ime,style:d,children:F.jsx("div",{className:wW})}):null,v=At(Mme,a,{[HP]:u,[Qi]:s}),y=At(Ome,ud(c,{large:i}));return F.jsxs("div",{className:v,children:[F.jsxs("div",{className:y,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,ref:this.refHandlers.tablist,role:"tablist",children:[g,m]}),h]})}componentDidMount(){this.moveSelectionIndicator(!1)}componentDidUpdate(n,r){this.state.selectedTabId!==r.selectedTabId?this.moveSelectionIndicator():r.selectedTabId!=null&&!Qd(this.getTabChildrenProps(n),this.getTabChildrenProps(),oi)&&this.moveSelectionIndicator()}getInitialSelectedTabId(){const{defaultSelectedTabId:n,selectedTabId:r}=this.props;if(r!==void 0)return r;if(n!==void 0)return n;{const a=this.getTabChildren();return a.length===0?void 0:a[0].props.id}}getTabChildrenProps(n=this.props){return this.getTabChildren(n).map(r=>r.props)}getTabChildren(n=this.props){return p.Children.toArray(n.children).filter(PF)}getTabElements(n=""){return this.tablistElement==null?[]:Array.from(this.tablistElement.querySelectorAll(h1+n))}moveSelectionIndicator(n=!0){if(this.tablistElement==null||!this.props.animate)return;const r=`${h1}[data-tab-id="${this.state.selectedTabId}"]`,a=this.tablistElement.querySelector(r);let s={display:"none"};if(a!=null){const{clientHeight:i,clientWidth:l,offsetLeft:c,offsetTop:u}=a;s={height:i,transform:`translateX(${Math.floor(c)}px) translateY(${Math.floor(u)}px)`,width:l},n||(s.transition="none")}this.setState({indicatorWrapperStyle:s})}}G(Cw,"Tab",Wp),G(Cw,"defaultProps",{animate:!0,fill:!1,large:!1,renderActiveTabPanelOnly:!1,size:"medium",vertical:!1}),G(Cw,"displayName",`${$n}.Tabs`);function PF(e){return Jd(e,Wp)}/** 1205 * @remix-run/router v1.6.2 1206 * 1207 * Copyright (c) Remix Software Inc. 1208 * 1209 * This source code is licensed under the MIT license found in the 1210 * LICENSE.md file in the root directory of this source tree. 1211 * 1212 * @license MIT 1213 */function Yv(){return Yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yv.apply(this,arguments)}var Rl;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Rl||(Rl={}));const DF="popstate";function P1e(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,a;a=t.map((h,g)=>d(h,typeof h=="string"?null:h.state,g===0?"default":void 0));let s=c(n??a.length-1),i=Rl.Pop,l=null;function c(h){return Math.min(Math.max(h,0),a.length-1)}function u(){return a[s]}function d(h,g,v){g===void 0&&(g=null);let y=ix(a?u().pathname:"/",h,g,v);return eb(y.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),y}function f(h){return typeof h=="string"?h:Kv(h)}return{get index(){return s},get action(){return i},get location(){return u()},createHref:f,createURL(h){return new URL(f(h),"http://localhost")},encodeLocation(h){let g=typeof h=="string"?Vm(h):h;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(h,g){i=Rl.Push;let v=d(h,g);s+=1,a.splice(s,a.length,v),r&&l&&l({action:i,location:v,delta:1})},replace(h,g){i=Rl.Replace;let v=d(h,g);a[s]=v,r&&l&&l({action:i,location:v,delta:0})},go(h){i=Rl.Pop;let g=c(s+h),v=a[g];s=g,l&&l({action:i,location:v,delta:h})},listen(h){return l=h,()=>{l=null}}}}function D1e(e){e===void 0&&(e={});function t(r,a){let{pathname:s,search:i,hash:l}=r.location;return ix("",{pathname:s,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}
vendor: 4,408 bytes, line 1213
1213function n(r,a){return typeof a=="string"?a:Kv(a)}return $1e(t,n,null,e)}function ss(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function eb(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function L1e(){return Math.random().toString(36).substr(2,8)}function LF(e,t){return{usr:e.state,key:e.key,idx:t}}function ix(e,t,n,r){return n===void 0&&(n=null),Yv({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vm(t):t,{state:n,key:t&&t.key||r||L1e()})}function Kv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Vm(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function $1e(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:s=!1}=r,i=a.history,l=Rl.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Yv({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function f(){l=Rl.Pop;let y=d(),b=y==null?null:y-u;u=y,c&&c({action:l,location:v.location,delta:b})}function m(y,b){l=Rl.Push;let E=ix(v.location,y,b);n&&n(E,y),u=d()+1;let w=LF(E,u),x=v.createHref(E);try{i.pushState(w,"",x)}catch{a.location.assign(x)}s&&c&&c({action:l,location:v.location,delta:1})}function h(y,b){l=Rl.Replace;let E=ix(v.location,y,b);n&&n(E,y),u=d();let w=LF(E,u),x=v.createHref(E);i.replaceState(w,"",x),s&&c&&c({action:l,location:v.location,delta:0})}function g(y){let b=a.location.origin!=="null"?a.location.origin:a.location.href,E=typeof y=="string"?y:Kv(y);return ss(b,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,b)}let v={get action(){return l},get location(){return e(a,i)},listen(y){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(DF,f),c=y,()=>{a.removeEventListener(DF,f),c=null}},createHref(y){return t(a,y)},createURL:g,encodeLocation(y){let b=g(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:m,replace:h,go(y){return i.go(y)}};return v}var $F;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($F||($F={}));function F1e(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Vm(t):t,a=vD(r.pathname||"/",n);if(a==null)return null;let s=qq(e);z1e(s);let i=null;for(let l=0;i==null&&l<s.length;++l)i=Y1e(s[l],Z1e(a));return i}function qq(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(s,i,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};c.relativePath.startsWith("/")&&(ss(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ud([r,c.relativePath]),d=n.concat(c);s.children&&s.children.length>0&&(ss(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),qq(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:G1e(u,s.index),routesMeta:d})};return e.forEach((s,i)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))a(s,i);else for(let c of Yq(s.path))a(s,i,c)}),t}function Yq(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return a?[s,""]:[s];let i=Yq(r.join("/")),l=[];return l.push(...i.map(c=>c===""?s:[s,c].join("/"))),a&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function z1e(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:q1e(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const H1e=/^:\w+$/,V1e=3,U1e=2,B1e=1,j1e=10,W1e=-2,FF=e=>e==="*";function G1e(e,t){let n=e.split("/"),r=n.length;return n.some(FF)&&(r+=W1e),t&&(r+=U1e),n.filter(a=>!FF(a)).reduce((a,s)=>a+(H1e.test(s)?V1e:s===""?B1e:j1e),r)}function q1e(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Y1e(e,t){let{routesMeta:n}=e,r={},a="/",s=[];for(let i=0;i<n.length;++i){let l=n[i],c=i===n.length-1,u=a==="/"?t:t.slice(a.length)||"/",d=Kq({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u);if(!d)return null;
1213Object.assign(r,d.params);let f=l.route;s.push({params:r,pathname:Ud([a,d.pathname]),pathnameBase:ewe(Ud([a,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(a=Ud([a,d.pathnameBase]))}return s}function Pn(e,t){t===void 0&&(t={});let n=e;n.endsWith("*")&&n!=="*"&&!n.endsWith("/*")&&(eb(!1,'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".')),n=n.replace(/\*$/,"/*"));const r=n.startsWith("/")?"/":"",a=n.split(/\/+/).map((s,i,l)=>{if(i===l.length-1&&s==="*")return t["*"];const u=s.match(/^:(\w+)(\??)$/);if(u){const[,d,f]=u;let m=t[d];return f==="?"?m??"":(m==null&&ss(!1,'Missing ":'+d+'" param'),m)}return s.replace(/\?$/g,"")}).filter(s=>!!s);return r+a.join("/")}function Kq(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=K1e(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let s=a[0],i=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((u,d,f)=>{if(d==="*"){let m=l[f]||"";i=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}return u[d]=X1e(l[f]||"",d),u},{}),pathname:s,pathnameBase:i,pattern:e}}function K1e(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),eb(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,l)=>(r.push(l),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Z1e(e){try{return decodeURI(e)}catch(t){return eb(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function X1e(e,t){try{return decodeURIComponent(e)}catch(n){return eb(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function vD(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Q1e(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Vm(e):e;return{pathname:n?n.startsWith("/")?n:J1e(n,t):t,search:twe(r),hash:nwe(a)}}function J1e(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function e2(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function yD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bD(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Vm(e):(a=Yv({},e),ss(!a.pathname||!a.pathname.includes("?"),e2("?","pathname","search",a)),ss(!a.pathname||!a.pathname.includes("#"),e2("#","pathname","hash",a)),ss(!a.search||!a.search.includes("#"),e2("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,l;if(r||i==null)l=n;else{let f=t.length-1;if(i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;a.pathname=m.join("/")}l=f>=0?t[f]:"/"}let c=Q1e(a,l),u=i&&i!=="/"&&i.endsWith("/"),d=(s||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ud=e=>e.join("/").replace(/\/\/+/g,"/"),ewe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),twe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nwe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rwe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Zq=["post","put","patch","delete"];new Set(Zq);const awe=["get",...Zq];new Set(awe);/** 1214 * React Router v6.11.2 1215 * 1216 * Copyright (c) Remix Software Inc. 1217 * 1218 * This source code is licensed under the MIT license found in the 1219 * LICENSE.md file in the root directory of this source tree. 1220 * 1221 * @license MIT 1222 */function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ox.apply(this,arguments)}const wD=p.createContext(null),swe=p.createContext(null),Sg=p.createContext(null),Lk=p.createContext(null),ou=p.createContext({outlet:null,matches:[],isDataRoute:!1}),Xq=p.createContext(null);function iwe(e,t){let{relative:n}=t===void 0?{}:t;Um()||ss(!1);let{basename:r,navigator:a}=p.useContext(Sg),{hash:s,pathname:i,search:l}=Jq(e,{relative:n}),c=i;return r!=="/"&&(c=i==="/"?r:Ud([r,i])),a.createHref({pathname:c,search:l,hash:s})}function Um(){return p.useContext(Lk)!=null}function hs(){return Um()||ss(!1),p.useContext(Lk).location}function Ea(e){Um()||ss(!1);let{pathname:t}=hs();return p.useMemo(()=>Kq(e,t),[t,e])}function Qq(e){p.useContext(Sg).static||p.useLayoutEffect(e)}function yr(){let{isDataRoute:e}=p.useContext(ou);return e?Ewe():owe()}function owe(){Um()||ss(!1);let e=p.useContext(wD),{basename:t,navigator:n}=p.useContext(Sg),{matches:r}=p.useContext(ou),{pathname:a}=hs(),s=JSON.stringify(yD(r).map(c=>c.pathnameBase)),i=p.useRef(!1);return Qq(()=>{i.current=!0}),p.useCallback(function(c,u){if(u===void 0&&(u={}),!i.current)return;if(typeof c=="number"){n.go(c);return}let d=bD(c,JSON.parse(s),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ud([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,s,a,e])}const lwe=p.createContext(null);function cwe(e){let t=p.useContext(ou).outlet;return t&&p.createElement(lwe.Provider,{value:e},t)}function xs(){let{matches:e}=p.useContext(ou),t=e[e.length-1];return t?t.params:{}}function Jq(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=p.useContext(ou),{pathname:a}=hs(),s=JSON.stringify(yD(r).map(i=>i.pathnameBase));return p.useMemo(()=>bD(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function uwe(e,t){return dwe(e,t)}function dwe(e,t,n){Um()||ss(!1);let{navigator:r}=p.useContext(Sg),{matches:a}=p.useContext(ou),s=a[a.length-1],i=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=hs(),u;if(t){var d;let v=typeof t=="string"?Vm(t):t;l==="/"||(d=v.pathname)!=null&&d.startsWith(l)||ss(!1),u=v}else u=c;let f=u.pathname||"/",m=l==="/"?f:f.slice(l.length)||"/",h=F1e(e,{pathname:m}),g=gwe(h&&h.map(v=>Object.assign({},v,{params:Object.assign({},i,v.params),pathname:Ud([l,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Ud([l,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,n);return t&&g?p.createElement(Lk.Provider,{value:{location:ox({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Rl.Pop}},g):g}function fwe(){let e=wwe(),t=rwe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application
1222Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:a},n):null,s)}const mwe=p.createElement(fwe,null);class hwe extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?p.createElement(ou.Provider,{value:this.props.routeContext},p.createElement(Xq.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pwe(e){let{routeContext:t,match:n,children:r}=e,a=p.useContext(wD);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(ou.Provider,{value:t},r)}function gwe(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,i=(r=n)==null?void 0:r.errors;if(i!=null){let l=s.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id]));l>=0||ss(!1),s=s.slice(0,Math.min(s.length,l+1))}return s.reduceRight((l,c,u)=>{let d=c.route.id?i==null?void 0:i[c.route.id]:null,f=null;n&&(f=c.route.errorElement||mwe);let m=t.concat(s.slice(0,u+1)),h=()=>{let g;return d?g=f:c.route.Component?g=p.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=l,p.createElement(pwe,{match:c,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:g})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?p.createElement(hwe,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var MT;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(MT||(MT={}));var Zv;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Zv||(Zv={}));function vwe(e){let t=p.useContext(wD);return t||ss(!1),t}function ywe(e){let t=p.useContext(swe);return t||ss(!1),t}function bwe(e){let t=p.useContext(ou);return t||ss(!1),t}function eY(e){let t=bwe(),n=t.matches[t.matches.length-1];return n.route.id||ss(!1),n.route.id}function wwe(){var e;let t=p.useContext(Xq),n=ywe(Zv.UseRouteError),r=eY(Zv.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function Ewe(){let{router:e}=vwe(MT.UseNavigateStable),t=eY(Zv.UseNavigateStable),n=p.useRef(!1);return Qq(()=>{n.current=!0}),p.useCallback(function(a,s){s===void 0&&(s={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ox({fromRouteId:t},s)))},[e,t])}function xwe(e){let{basename:t,children:n,initialEntries:r,initialIndex:a}=e,s=p.useRef();s.current==null&&(s.current=P1e({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=s.current,[l,c]=p.useState({action:i.action,location:i.location});return p.useLayoutEffect(()=>i.listen(c),[i]),p.createElement(tY,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i})}function jf(e){let{to:t,replace:n,state:r,relative:a}=e;Um()||ss(!1);let{matches:s}=p.useContext(ou),{pathname:i}=hs(),l=yr(),c=bD(t,yD(s).map(d=>d.pathnameBase),i,a==="path"),u=JSON.stringify(c);return p.useEffect(()=>l(JSON.parse(u),{replace:n,state:r,relative:a}),[l,u,a,n,r]),null}function iZe(e){return cwe(e.context)}function lx(e){ss(!1)}function tY(e){let{basename:t="/",children:n=null,location:r,navigationType:a=Rl.Pop,navigator:s,static:i=!1}=e;Um()&&ss(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:s,static:i}),[l,s,i]);typeof r=="string"&&(r=Vm(r));
1222let{pathname:u="/",search:d="",hash:f="",state:m=null,key:h="default"}=r,g=p.useMemo(()=>{let v=vD(u,l);return v==null?null:{location:{pathname:v,search:d,hash:f,state:m,key:h},navigationType:a}},[l,u,d,f,m,h,a]);return g==null?null:p.createElement(Sg.Provider,{value:c},p.createElement(Lk.Provider,{children:n,value:g}))}function nY(e){let{children:t,location:n}=e;return uwe(PT(t),n)}var zF;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(zF||(zF={}));new Promise(()=>{});function PT(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,a)=>{if(!p.isValidElement(r))return;let s=[...t,a];if(r.type===p.Fragment){n.push.apply(n,PT(r.props.children,s));return}r.type!==lx&&ss(!1),!r.props.index||!r.props.children||ss(!1);let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=PT(r.props.children,s)),n.push(i)}),n}/** 1223 * React Router DOM v6.11.2 1224 * 1225 * Copyright (c) Remix Software Inc. 1226 * 1227 * This source code is licensed under the MIT license found in the 1228 * LICENSE.md file in the root directory of this source tree. 1229 * 1230 * @license MIT 1231 */function DT(){return DT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DT.apply(this,arguments)}function _we(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function kwe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Swe(e,t){return e.button===0&&(!t||t==="_self")&&!kwe(e)}function Gp(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function Cwe(e,t){let n=Gp(e);if(t)for(let r of t.keys())n.has(r)||t.getAll(r).forEach(a=>{n.append(r,a)});return n}const Nwe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function Rwe(e){let{basename:t,children:n,window:r}=e,a=p.useRef();a.current==null&&(a.current=D1e({window:r,v5Compat:!0}));let s=a.current,[i,l]=p.useState({action:s.action,location:s.location});return p.useLayoutEffect(()=>s.listen(l),[s]),p.createElement(tY,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:s})}const Twe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Awe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ci=p.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:s,replace:i,state:l,target:c,to:u,preventScrollReset:d}=t,f=_we(t,Nwe),{basename:m}=p.useContext(Sg),h,g=!1;if(typeof u=="string"&&Awe.test(u)&&(h=u,Twe))try{let E=new URL(window.location.href),w=u.startsWith("//")?new URL(E.protocol+u):new URL(u),x=vD(w.pathname,m);w.origin===E.origin&&x!=null?u=x+w.search+w.hash:g=!0}catch{}let v=iwe(u,{relative:a}),y=Iwe(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:a});function b(E){r&&r(E),E.defaultPrevented||y(E)}return p.createElement("a",DT({},f,{href:h||v,onClick:g||s?r:b,ref:n,target:c}))});var HF;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(HF||(HF={}));var VF;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(VF||(VF={}));function Iwe(e,t){let{target:n,replace:r,state:a,preventScrollReset:s,relative:i}=t===void 0?{}:t,l=yr(),c=hs(),u=Jq(e,{relative:i});return p.useCallback(d=>{if(Swe(d,n)){d.preventDefault();let f=r!==void 0?r:Kv(c)===Kv(u);l(e,{replace:f,state:a,preventScrollReset:s,relative:i})}},[c,l,u,r,a,n,e,s,i])}function df(e){let t=p.useRef(Gp(e)),n=p.useRef(!1),r=hs(),a=p.useMemo(()=>Cwe(r.search,n.current?null:t.current),[r.search]),s=yr(),i=p.useCallback((l,c)=>{const u=Gp(typeof l=="function"?l(a):l);n.current=!0,s("?"+u,c)},[s,a]);return[a,i]}//! moment.js 1232//! version : 2.29.4 1233//! authors : Tim Wood, Iskren Chernev, Moment.js contributors 1234//! license : MIT 1235//! momentjs.com 1236var rY;function Ht(){return rY.apply(null,arguments)}function Owe(e){rY=e}function pc(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function sm(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function oa(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ED(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(oa(e,t))return!1;return!0}function io(e){return e===void 0}
vendor: 4,240 bytes, lines 1236-1239
1236function nd(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function tb(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function aY(e,t){var n=[],r,a=e.length;for(r=0;r<a;++r)n.push(t(e[r],r));return n}function Od(e,t){for(var n in t)oa(t,n)&&(e[n]=t[n]);return oa(t,"toString")&&(e.toString=t.toString),oa(t,"valueOf")&&(e.valueOf=t.valueOf),e}function lu(e,t,n,r){return RY(e,t,n,r,!0).utc()}function Mwe(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function $r(e){return e._pf==null&&(e._pf=Mwe()),e._pf}var LT;Array.prototype.some?LT=Array.prototype.some:LT=function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function xD(e){if(e._isValid==null){var t=$r(e),n=LT.call(t.parsedDateParts,function(a){return a!=null}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r}return e._isValid}function $k(e){var t=lu(NaN);return e!=null?Od($r(t),e):$r(t).userInvalidated=!0,t}var UF=Ht.momentProperties=[],t2=!1;function _D(e,t){var n,r,a,s=UF.length;if(io(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),io(t._i)||(e._i=t._i),io(t._f)||(e._f=t._f),io(t._l)||(e._l=t._l),io(t._strict)||(e._strict=t._strict),io(t._tzm)||(e._tzm=t._tzm),io(t._isUTC)||(e._isUTC=t._isUTC),io(t._offset)||(e._offset=t._offset),io(t._pf)||(e._pf=$r(t)),io(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=UF[n],a=t[r],io(a)||(e[r]=a);return e}function nb(e){_D(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),t2===!1&&(t2=!0,Ht.updateOffset(this),t2=!1)}function gc(e){return e instanceof nb||e!=null&&e._isAMomentObject!=null}function sY(e){Ht.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function Vl(e,t){var n=!0;return Od(function(){if(Ht.deprecationHandler!=null&&Ht.deprecationHandler(null,e),n){var r=[],a,s,i,l=arguments.length;for(s=0;s<l;s++){if(a="",typeof arguments[s]=="object"){a+=` 1237[`+s+"] ";for(i in arguments[0])oa(arguments[0],i)&&(a+=i+": "+arguments[0][i]+", ");a=a.slice(0,-2)}else a=arguments[s];r.push(a)}sY(e+` 1238Arguments: `+Array.prototype.slice.call(r).join("")+` 1239`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var BF={};function iY(e,t){Ht.deprecationHandler!=null&&Ht.deprecationHandler(e,t),BF[e]||(sY(t),BF[e]=!0)}Ht.suppressDeprecationWarnings=!1;Ht.deprecationHandler=null;function cu(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Pwe(e){var t,n;for(n in e)oa(e,n)&&(t=e[n],cu(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function $T(e,t){var n=Od({},e),r;for(r in t)oa(t,r)&&(sm(e[r])&&sm(t[r])?(n[r]={},Od(n[r],e[r]),Od(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)oa(e,r)&&!oa(t,r)&&sm(e[r])&&(n[r]=Od({},n[r]));return n}function kD(e){e!=null&&this.set(e)}var FT;Object.keys?FT=Object.keys:FT=function(e){var t,n=[];for(t in e)oa(e,t)&&n.push(t);return n};var Dwe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function Lwe(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return cu(r)?r.call(t,n):r}function Qc(e,t,n){var r=""+Math.abs(e),a=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var SD=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}
1239|x|X|zz?|ZZ?|.)/g,p1=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,n2={},Kh={};function er(e,t,n,r){var a=r;typeof r=="string"&&(a=function(){return this[r]()}),e&&(Kh[e]=a),t&&(Kh[t[0]]=function(){return Qc(a.apply(this,arguments),t[1],t[2])}),n&&(Kh[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function $we(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Fwe(e){var t=e.match(SD),n,r;for(n=0,r=t.length;n<r;n++)Kh[t[n]]?t[n]=Kh[t[n]]:t[n]=$we(t[n]);return function(a){var s="",i;for(i=0;i<r;i++)s+=cu(t[i])?t[i].call(a,e):t[i];return s}}function Nw(e,t){return e.isValid()?(t=oY(t,e.localeData()),n2[t]=n2[t]||Fwe(t),n2[t](e)):e.localeData().invalidDate()}function oY(e,t){var n=5;function r(a){return t.longDateFormat(a)||a}for(p1.lastIndex=0;n>=0&&p1.test(e);)e=e.replace(p1,r),p1.lastIndex=0,n-=1;return e}var zwe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Hwe(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(SD).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var Vwe="Invalid date";function Uwe(){return this._invalidDate}var Bwe="%d",jwe=/\d{1,2}/;function Wwe(e){return this._ordinal.replace("%d",e)}var Gwe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function qwe(e,t,n,r){var a=this._relativeTime[n];return cu(a)?a(e,t,n,r):a.replace(/%d/i,e)}function Ywe(e,t){var n=this._relativeTime[e>0?"future":"past"];return cu(n)?n(t):n.replace(/%s/i,t)}var nv={};function Ni(e,t){var n=e.toLowerCase();nv[n]=nv[n+"s"]=nv[t]=e}function Ul(e){return typeof e=="string"?nv[e]||nv[e.toLowerCase()]:void 0}function CD(e){var t={},n,r;for(r in e)oa(e,r)&&(n=Ul(r),n&&(t[n]=e[r]));return t}var lY={};function Ri(e,t){lY[e]=t}function Kwe(e){var t=[],n;for(n in e)oa(e,n)&&t.push({unit:n,priority:lY[n]});return t.sort(function(r,a){return r.priority-a.priority}),t}function Fk(e){return e%4===0&&e%100!==0||e%400===0}function El(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Kr(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=El(t)),n}function Cg(e,t){return function(n){return n!=null?(cY(this,e,n),Ht.updateOffset(this,t),this):cx(this,e)}}function cx(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function cY(e,t,n){e.isValid()&&!isNaN(n)&&(t==="FullYear"&&Fk(e.year())&&e.month()===1&&e.date()===29?(n=Kr(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),jk(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Zwe(e){return e=Ul(e),cu(this[e])?this[e]():this}function Xwe(e,t){if(typeof e=="object"){e=CD(e);var n=Kwe(e),r,a=n.length;for(r=0;r<a;r++)this[n[r].unit](e[n[r].unit])}else if(e=Ul(e),cu(this[e]))return this[e](t);return this}var uY=/\d/,ol=/\d\d/,dY=/\d{3}/,ND=/\d{4}/,zk=/[+-]?\d{6}/,Va=/\d\d?/,fY=/\d\d\d\d?/,mY=/\d\d\d\d\d\d?/,Hk=/\d{1,3}/,RD=/\d{1,4}/,Vk=/[+-]?\d{1,6}/,Ng=/\d+/,Uk=/[+-]?\d+/,Qwe=/Z|[+-]\d\d:?\d\d/gi,Bk=/Z|[+-]\d\d(?::?\d\d)?/gi,Jwe=/[+-]?\d+(\.\d{1,3})?/,rb=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ux;ux={};function Fn(e,t,n){ux[e]=cu(t)?t:function(r,a){return r&&n?n:t}}function eEe(e,t){return oa(ux,e)?ux[e](t._strict,t._locale):new RegExp(tEe(e))}function tEe(e){return zo(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,a,s){return n||r||a||s}))}function zo(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var zT={};function Sa(e,t){var n,r=t,a;for(typeof e=="string"&&(e=[e]),nd(t)&&(r=function(s,i){i[t]=Kr(s)}),a=e.length,n=0;n<a;n++)zT[e[n]]=r}function ab(e,t){Sa(e,function(n,r,a,s){a._w=a._w||{},t(n,a._w,a,s)})}function nEe(e,t,n){t!=null&&oa(zT,e)&&zT[e](t,n._a,n,e)}var ki=0,Hu=1,$c=2,Vs=3,ac=4,Vu=5,Wf=6,rEe=7,aEe=8;function sEe(e,t){return(e%t+t)%t}var vs;Array.prototype.indexOf?vs=Array.prototype.indexOf:vs=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function jk(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=sEe(t,12);return e+=(t-n)/12,n===1?Fk(e)?29:28:31-n%7%2}er("M",["MM",2],"Mo",function(){return this.month()+1});er("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});er("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ni("month","M");Ri("month",8);Fn("M",Va);Fn("MM",Va,ol);Fn("MMM",function(e,t){return t.monthsShortRegex(e)});Fn("MMMM",function(e,t){return t.monthsRegex(e)});Sa(["M","MM"],function(e,t){t[Hu]=Kr(e)-1});Sa(["MMM","MMMM"],function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._str
vendor: 11,495 bytes, line 1239
1239ict);a!=null?t[Hu]=a:$r(n).invalidMonth=e});var iEe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),hY="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),pY=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,oEe=rb,lEe=rb;function cEe(e,t){return e?pc(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||pY).test(t)?"format":"standalone"][e.month()]:pc(this._months)?this._months:this._months.standalone}function uEe(e,t){return e?pc(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[pY.test(t)?"format":"standalone"][e.month()]:pc(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function dEe(e,t,n){var r,a,s,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=lu([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?t==="MMM"?(a=vs.call(this._shortMonthsParse,i),a!==-1?a:null):(a=vs.call(this._longMonthsParse,i),a!==-1?a:null):t==="MMM"?(a=vs.call(this._shortMonthsParse,i),a!==-1?a:(a=vs.call(this._longMonthsParse,i),a!==-1?a:null)):(a=vs.call(this._longMonthsParse,i),a!==-1?a:(a=vs.call(this._shortMonthsParse,i),a!==-1?a:null))}function fEe(e,t,n){var r,a,s;if(this._monthsParseExact)return dEe.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=lu([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[r].test(e))return r;if(n&&t==="MMM"&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function gY(e,t){var n;if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Kr(t);else if(t=e.localeData().monthsParse(t),!nd(t))return e}return n=Math.min(e.date(),jk(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function vY(e){return e!=null?(gY(this,e),Ht.updateOffset(this,!0),this):cx(this,"Month")}function mEe(){return jk(this.year(),this.month())}function hEe(e){return this._monthsParseExact?(oa(this,"_monthsRegex")||yY.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(oa(this,"_monthsShortRegex")||(this._monthsShortRegex=oEe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pEe(e){return this._monthsParseExact?(oa(this,"_monthsRegex")||yY.call(this),e?this._monthsStrictRegex:this._monthsRegex):(oa(this,"_monthsRegex")||(this._monthsRegex=lEe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function yY(){function e(i,l){return l.length-i.length}var t=[],n=[],r=[],a,s;for(a=0;a<12;a++)s=lu([2e3,a]),t.push(this.monthsShort(s,"")),n.push(this.months(s,"")),r.push(this.months(s,"")),r.push(this.monthsShort(s,""));for(t.sort(e),n.sort(e),r.sort(e),a=0;a<12;a++)t[a]=zo(t[a]),n[a]=zo(n[a]);for(a=0;a<24;a++)r[a]=zo(r[a]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}er("Y",0,0,function(){var e=this.year();return e<=9999?Qc(e,4):"+"+e});er(0,["YY",2],0,function(){return this.year()%100});er(0,["YYYY",4],0,"year");er(0,["YYYYY",5],0,"year");er(0,["YYYYYY",6,!0],0,"year");Ni("year","y");Ri("year",1);Fn("Y",Uk);Fn("YY",Va,ol);Fn("YYYY",RD,ND);Fn("YYYYY",Vk,zk);Fn("YYYYYY",Vk,zk);Sa(["YYYYY","YYYYYY"],ki);Sa("YYYY",function(e,t){t[ki]=e.length===2?Ht.parseTwoDigitYear(e):Kr(e)});Sa("YY",function(e,t){t[ki]=Ht.parseTwoDigitYear(e)});Sa("Y",function(e,t){t[ki]=parseInt(e,10)});function rv(e){return Fk(e)?366:365}Ht.parseTwoDigitYear=function(e){return Kr(e)+(Kr(e)>68?1900:2e3)};var bY=Cg("FullYear",!0);function gEe(){return Fk(this.year())}function vEe(e,t,n,r,a,s,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,a,s,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,a,s,i),l}function Xv(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function dx(e,t,n){var r=7+t-n,a=(7+Xv(e,0,r).getUTCDay()-t)%7;return-a+r-1}function wY(e,t,n,r,a){var s=(7+n-r)%7,i=dx(e,r,a),l=1+7*(t-1)+s+i,c,u;return l<=0?(c=e-1,u=rv(c)+l):l>rv(e)?(c=e+1,u=l-rv(e)):(c=e,u=l),{year:c,dayOfYear:u}}function Qv(e,t,n){var r=dx(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1,s,i;return a<1?(i=e.year()-1,s=a+Gu(i,t,n)):a>Gu(e.year(),t,n)?(s=a-Gu(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Gu(e,t,n){var r=dx(e,t,n),a=dx(e+1,t,n);return(rv(e)-r+a)/7}er("w",["ww",2],"wo","week");er("W",["WW",2],"Wo","isoWeek");Ni("week","w");Ni("isoWeek","W");Ri("week",5);Ri("isoWeek",5);Fn("w",Va);Fn("ww",Va,ol);Fn("W",Va);Fn("WW",Va,ol);ab(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Kr(e)});function yEe(e){return Qv(e,this._week.dow,this._week.doy).week}var bEe={dow:0,doy:6};function wEe(){return this._week.dow}function EEe(){return this._week.doy}function xEe(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function _Ee(e){var t=Qv(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}er("d",0,"do","day");er("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});er("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});er("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});er("e",0,0,"weekday");er("E",0,0,"isoWeekday");Ni("day","d");Ni("weekday","e");Ni("isoWeekday","E");Ri("day",11);Ri("weekday",11);Ri("isoWeekday",11);Fn("d",Va);Fn("e",Va);Fn("E",Va);Fn("dd",function(e,t){return t.weekdaysMinRegex(e)});Fn("ddd",function(e,t){return t.weekdaysShortRegex(e)});Fn("dddd",function(e,t){return t.weekdaysRegex(e)});ab(["dd","ddd","dddd"],function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);a!=null?t.d=a:$r(n).invalidWeekday=e});ab(["d","e","E"],function(e,t,n,r){t[r]=Kr(e)});function kEe(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function SEe(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function TD(e,t){return e.slice(t,7).concat(e.slice(0,t))}var CEe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),EY="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),NEe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),REe=rb,TEe=rb,AEe=rb;function IEe(e,t){var n=pc(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?TD(n,this._week.dow):e?n[e.day()]:n}function OEe(e){return e===!0?TD(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function MEe(e){return e===!0?TD(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function PEe(e,t,n){var r,a,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=lu([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(a=vs.call(this._weekdaysParse,i),a!==-1?a:null):t==="ddd"?(a=vs.call(this._shortWeekdaysParse,i),a!==-1?a:null):(a=vs.call(this._minWeekdaysParse,i),a!==-1?a:null):t==="dddd"?(a=vs.call(this._weekdaysParse,i),a!==-1||(a=vs.call(this._shortWeekdaysParse,i),a!==-1)?a:(a=vs.call(this._minWeekdaysParse,i),a!==-1?a:null)):t==="ddd"?(a=vs.call(this._shortWeekdaysParse,i),a!==-1||(a=vs.call(this._weekdaysParse,i),a!==-1)?a:(a=vs.call(this._minWeekdaysParse,i),a!==-1?a:null)):(a=vs.call(this._minWeekdaysParse,i),a!==-1||(a=vs.call(this._weekdaysParse,i),a!==-1)?a:(a=vs.call(this._shortWeekdaysParse,i),a!==-1?a:null))}function DEe(e,t,n){var r,a,s;if(this._weekdaysParseExact)return PEe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=lu([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function LEe(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=kEe(e,this.localeData()),this.add(e-t,"d")):t}function $Ee(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function FEe(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=SEe(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function zEe(e){return this._weekdaysParseExact?(oa(this,"_weekdaysRegex")||AD.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(oa(this,"_weekdaysRegex")||(this._weekdaysRegex=REe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function HEe(e){return this._weekdaysParseExact?(oa(this,"_weekdaysRegex")||AD.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(oa(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=TEe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function VEe(e){return this._weekdaysParseExact?(oa(this,"_weekdaysRegex")||AD.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(oa(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=AEe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function AD(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],a=[],s,i,l,c,u;for(s=0;s<7;s++)i=lu([2e3,1]).day(s),l=zo(this.weekdaysMin(i,"")),c=zo(this.weekdaysShort(i,"")),u=zo(this.weekdays(i,"")),t.push(l),n.push(c),r.push(u),a.push(l),a.push(c),a.push(u);t.sort(e),n.sort(e),r.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ID(){return this.hours()%12||12}function UEe(){return this.hours()||24}er("H",["HH",2],0,"hour");er("h",["hh",2],0,ID);er("k",["kk",2],0,UEe);er("hmm",0,0,function(){return""+ID.apply(this)+Qc(this.minutes(),2)}
vendor: 6,363 bytes, line 1239
1239);er("hmmss",0,0,function(){return""+ID.apply(this)+Qc(this.minutes(),2)+Qc(this.seconds(),2)});er("Hmm",0,0,function(){return""+this.hours()+Qc(this.minutes(),2)});er("Hmmss",0,0,function(){return""+this.hours()+Qc(this.minutes(),2)+Qc(this.seconds(),2)});function xY(e,t){er(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xY("a",!0);xY("A",!1);Ni("hour","h");Ri("hour",13);function _Y(e,t){return t._meridiemParse}Fn("a",_Y);Fn("A",_Y);Fn("H",Va);Fn("h",Va);Fn("k",Va);Fn("HH",Va,ol);Fn("hh",Va,ol);Fn("kk",Va,ol);Fn("hmm",fY);Fn("hmmss",mY);Fn("Hmm",fY);Fn("Hmmss",mY);Sa(["H","HH"],Vs);Sa(["k","kk"],function(e,t,n){var r=Kr(e);t[Vs]=r===24?0:r});Sa(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});Sa(["h","hh"],function(e,t,n){t[Vs]=Kr(e),$r(n).bigHour=!0});Sa("hmm",function(e,t,n){var r=e.length-2;t[Vs]=Kr(e.substr(0,r)),t[ac]=Kr(e.substr(r)),$r(n).bigHour=!0});Sa("hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[Vs]=Kr(e.substr(0,r)),t[ac]=Kr(e.substr(r,2)),t[Vu]=Kr(e.substr(a)),$r(n).bigHour=!0});Sa("Hmm",function(e,t,n){var r=e.length-2;t[Vs]=Kr(e.substr(0,r)),t[ac]=Kr(e.substr(r))});Sa("Hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[Vs]=Kr(e.substr(0,r)),t[ac]=Kr(e.substr(r,2)),t[Vu]=Kr(e.substr(a))});function BEe(e){return(e+"").toLowerCase().charAt(0)==="p"}var jEe=/[ap]\.?m?\.?/i,WEe=Cg("Hours",!0);function GEe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var kY={calendar:Dwe,longDateFormat:zwe,invalidDate:Vwe,ordinal:Bwe,dayOfMonthOrdinalParse:jwe,relativeTime:Gwe,months:iEe,monthsShort:hY,week:bEe,weekdays:CEe,weekdaysMin:NEe,weekdaysShort:EY,meridiemParse:jEe},Ya={},l0={},Jv;function qEe(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function jF(e){return e&&e.toLowerCase().replace("_","-")}function YEe(e){for(var t=0,n,r,a,s;t<e.length;){for(s=jF(e[t]).split("-"),n=s.length,r=jF(e[t+1]),r=r?r.split("-"):null;n>0;){if(a=Wk(s.slice(0,n).join("-")),a)return a;if(r&&r.length>=n&&qEe(s,r)>=n-1)break;n--}t++}return Jv}function KEe(e){return e.match("^[^/\\\\]*$")!=null}function Wk(e){var t=null,n;if(Ya[e]===void 0&&typeof module<"u"&&module&&module.exports&&KEe(e))try{t=Jv._abbr,n=require,n("./locale/"+e),Bd(t)}catch{Ya[e]=null}return Ya[e]}function Bd(e,t){var n;return e&&(io(t)?n=md(e):n=OD(e,t),n?Jv=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Jv._abbr}function OD(e,t){if(t!==null){var n,r=kY;if(t.abbr=e,Ya[e]!=null)iY("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Ya[e]._config;else if(t.parentLocale!=null)if(Ya[t.parentLocale]!=null)r=Ya[t.parentLocale]._config;else if(n=Wk(t.parentLocale),n!=null)r=n._config;else return l0[t.parentLocale]||(l0[t.parentLocale]=[]),l0[t.parentLocale].push({name:e,config:t}),null;return Ya[e]=new kD($T(r,t)),l0[e]&&l0[e].forEach(function(a){OD(a.name,a.config)}),Bd(e),Ya[e]}else return delete Ya[e],null}function ZEe(e,t){if(t!=null){var n,r,a=kY;Ya[e]!=null&&Ya[e].parentLocale!=null?Ya[e].set($T(Ya[e]._config,t)):(r=Wk(e),r!=null&&(a=r._config),t=$T(a,t),r==null&&(t.abbr=e),n=new kD(t),n.parentLocale=Ya[e],Ya[e]=n),Bd(e)}else Ya[e]!=null&&(Ya[e].parentLocale!=null?(Ya[e]=Ya[e].parentLocale,e===Bd()&&Bd(e)):Ya[e]!=null&&delete Ya[e]);return Ya[e]}function md(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jv;if(!pc(e)){if(t=Wk(e),t)return t;e=[e]}return YEe(e)}function XEe(){return FT(Ya)}function MD(e){var t,n=e._a;return n&&$r(e).overflow===-2&&(t=n[Hu]<0||n[Hu]>11?Hu:n[$c]<1||n[$c]>jk(n[ki],n[Hu])?$c:n[Vs]<0||n[Vs]>24||n[Vs]===24&&(n[ac]!==0||n[Vu]!==0||n[Wf]!==0)?Vs:n[ac]<0||n[ac]>59?ac:n[Vu]<0||n[Vu]>59?Vu:n[Wf]<0||n[Wf]>999?Wf:-1,$r(e)._overflowDayOfYear&&(t<ki||t>$c)&&(t=$c),$r(e)._overflowWeeks&&t===-1&&(t=rEe),$r(e)._overflowWeekday&&t===-1&&(t=aEe),$r(e).overflow=t),e}var QEe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,JEe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,exe=/Z|[+-]\d\d(?::?\d\d)?/,g1=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],r2=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],txe=/^\/?Date\((-?\d+)/i,nxe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,rxe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function SY(e){var t,n,r=e._i,a=QEe.exec(r)||JEe.exec(r),s,i,l,c,u=g1.length,d=r2.length;if(a){for($r(e).iso=!0,t=0,n=u;t<n;t++)if(g1[t][1].exec(a[1])){i=g1[t][0],s=g1[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(a[3]){for(t=0,n=d;t<n;t++)if(r2[t][1].exec(a[3])){l=(a[2]||" ")+r2[t][0];break}if(l==null){e._isValid=!1;return}}if(!s&&l!=null){e._isValid=!1;return}if(a[4])if(exe.exec(a[4]))c="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(c||""),DD(e)}else e._isValid=!1}function axe(e,t,n,r,a,s){var i=[sxe(e),hY.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(a,10)];return s&&i.push(parseInt(s,10)),i}function sxe(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function ixe(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function oxe(e,t,n){if(e){var r=EY.indexOf(e),a=new Date(t[0],t[1],t[2]).getDay();if(r!==a)return $r(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function lxe(e,t,n){if(e)return rxe[e];
vendor: 20,022 bytes, line 1239
1239if(t)return 0;var r=parseInt(n,10),a=r%100,s=(r-a)/100;return s*60+a}function CY(e){var t=nxe.exec(ixe(e._i)),n;if(t){if(n=axe(t[4],t[3],t[2],t[5],t[6],t[7]),!oxe(t[1],n,e))return;e._a=n,e._tzm=lxe(t[8],t[9],t[10]),e._d=Xv.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),$r(e).rfc2822=!0}else e._isValid=!1}function cxe(e){var t=txe.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(SY(e),e._isValid===!1)delete e._isValid;else return;if(CY(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Ht.createFromInputFallback(e)}Ht.createFromInputFallback=Vl("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function xh(e,t,n){return e??t??n}function uxe(e){var t=new Date(Ht.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function PD(e){var t,n,r=[],a,s,i;if(!e._d){for(a=uxe(e),e._w&&e._a[$c]==null&&e._a[Hu]==null&&dxe(e),e._dayOfYear!=null&&(i=xh(e._a[ki],a[ki]),(e._dayOfYear>rv(i)||e._dayOfYear===0)&&($r(e)._overflowDayOfYear=!0),n=Xv(i,0,e._dayOfYear),e._a[Hu]=n.getUTCMonth(),e._a[$c]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=a[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Vs]===24&&e._a[ac]===0&&e._a[Vu]===0&&e._a[Wf]===0&&(e._nextDay=!0,e._a[Vs]=0),e._d=(e._useUTC?Xv:vEe).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Vs]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&($r(e).weekdayMismatch=!0)}}function dxe(e){var t,n,r,a,s,i,l,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,n=xh(t.GG,e._a[ki],Qv(Ha(),1,4).year),r=xh(t.W,1),a=xh(t.E,1),(a<1||a>7)&&(c=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,u=Qv(Ha(),s,i),n=xh(t.gg,e._a[ki],u.year),r=xh(t.w,u.week),t.d!=null?(a=t.d,(a<0||a>6)&&(c=!0)):t.e!=null?(a=t.e+s,(t.e<0||t.e>6)&&(c=!0)):a=s),r<1||r>Gu(n,s,i)?$r(e)._overflowWeeks=!0:c!=null?$r(e)._overflowWeekday=!0:(l=wY(n,r,a,s,i),e._a[ki]=l.year,e._dayOfYear=l.dayOfYear)}Ht.ISO_8601=function(){};Ht.RFC_2822=function(){};function DD(e){if(e._f===Ht.ISO_8601){SY(e);return}if(e._f===Ht.RFC_2822){CY(e);return}e._a=[],$r(e).empty=!0;var t=""+e._i,n,r,a,s,i,l=t.length,c=0,u,d;for(a=oY(e._f,e._locale).match(SD)||[],d=a.length,n=0;n<d;n++)s=a[n],r=(t.match(eEe(s,e))||[])[0],r&&(i=t.substr(0,t.indexOf(r)),i.length>0&&$r(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),c+=r.length),Kh[s]?(r?$r(e).empty=!1:$r(e).unusedTokens.push(s),nEe(s,r,e)):e._strict&&!r&&$r(e).unusedTokens.push(s);$r(e).charsLeftOver=l-c,t.length>0&&$r(e).unusedInput.push(t),e._a[Vs]<=12&&$r(e).bigHour===!0&&e._a[Vs]>0&&($r(e).bigHour=void 0),$r(e).parsedDateParts=e._a.slice(0),$r(e).meridiem=e._meridiem,e._a[Vs]=fxe(e._locale,e._a[Vs],e._meridiem),u=$r(e).era,u!==null&&(e._a[ki]=e._locale.erasConvertYear(u,e._a[ki])),PD(e),MD(e)}function fxe(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function mxe(e){var t,n,r,a,s,i,l=!1,c=e._f.length;if(c===0){$r(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;a<c;a++)s=0,i=!1,t=_D({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[a],DD(t),xD(t)&&(i=!0),s+=$r(t).charsLeftOver,s+=$r(t).unusedTokens.length*10,$r(t).score=s,l?s<r&&(r=s,n=t):(r==null||s<r||i)&&(r=s,n=t,i&&(l=!0));Od(e,n||t)}function hxe(e){if(!e._d){var t=CD(e._i),n=t.day===void 0?t.date:t.day;e._a=aY([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(r){return r&&parseInt(r,10)}),PD(e)}}function pxe(e){var t=new nb(MD(NY(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function NY(e){var t=e._i,n=e._f;return e._locale=e._locale||md(e._l),t===null||n===void 0&&t===""?$k({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),gc(t)?new nb(MD(t)):(tb(t)?e._d=t:pc(n)?mxe(e):n?DD(e):gxe(e),xD(e)||(e._d=null),e))}function gxe(e){var t=e._i;io(t)?e._d=new Date(Ht.now()):tb(t)?e._d=new Date(t.valueOf()):typeof t=="string"?cxe(e):pc(t)?(e._a=aY(t.slice(0),function(n){return parseInt(n,10)}),PD(e)):sm(t)?hxe(e):nd(t)?e._d=new Date(t):Ht.createFromInputFallback(e)}function RY(e,t,n,r,a){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(sm(e)&&ED(e)||pc(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=a,s._l=n,s._i=e,s._f=t,s._strict=r,pxe(s)}function Ha(e,t,n,r){return RY(e,t,n,r,!1)}var vxe=Vl("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:$k()}),yxe=Vl("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ha.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:$k()});function TY(e,t){var n,r;if(t.length===1&&pc(t[0])&&(t=t[0]),!t.length)return Ha();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function bxe(){var e=[].slice.call(arguments,0);return TY("isBefore",e)}function wxe(){var e=[].slice.call(arguments,0);return TY("isAfter",e)}var Exe=function(){return Date.now?Date.now():+new Date},c0=["year","quarter","month","week","day","hour","minute","second","millisecond"];function xxe(e){var t,n=!1,r,a=c0.length;for(t in e)if(oa(e,t)&&!(vs.call(c0,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<a;++r)if(e[c0[r]]){if(n)return!1;parseFloat(e[c0[r]])!==Kr(e[c0[r]])&&(n=!0)}return!0}function _xe(){return this._isValid}function kxe(){return Ec(NaN)}function Gk(e){var t=CD(e),n=t.year||0,r=t.quarter||0,a=t.month||0,s=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=xxe(t),this._milliseconds=+d+u*1e3+c*6e4+l*1e3*60*60,this._days=+i+s*7,this._months=+a+r*3+n*12,this._data={},this._locale=md(),this._bubble()}function Rw(e){return e instanceof Gk}function HT(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Sxe(e,t,n){var r=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),s=0,i;for(i=0;i<r;i++)(n&&e[i]!==t[i]||!n&&Kr(e[i])!==Kr(t[i]))&&s++;return s+a}function AY(e,t){er(e,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Qc(~~(n/60),2)+t+Qc(~~n%60,2)})}AY("Z",":");AY("ZZ","");Fn("Z",Bk);Fn("ZZ",Bk);Sa(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=LD(Bk,e)});var Cxe=/([\+\-]|\d\d)/gi;function LD(e,t){var n=(t||"").match(e),r,a,s;return n===null?null:(r=n[n.length-1]||[],a=(r+"").match(Cxe)||["-",0,0],s=+(a[1]*60)+Kr(a[2]),s===0?0:a[0]==="+"?s:-s)}function $D(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(gc(e)||tb(e)?e.valueOf():Ha(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Ht.updateOffset(n,!1),n):Ha(e).local()}function VT(e){return-Math.round(e._d.getTimezoneOffset())}Ht.updateOffset=function(){};function Nxe(e,t,n){var r=this._offset||0,a;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=LD(Bk,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(a=VT(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,"m"),r!==e&&(!t||this._changeInProgress?MY(this,Ec(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Ht.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:VT(this)}function Rxe(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Txe(e){return this.utcOffset(0,e)}function Axe(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(VT(this),"m")),this}function Ixe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=LD(Qwe,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Oxe(e){return this.isValid()?(e=e?Ha(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Mxe(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Pxe(){if(!io(this._isDSTShifted))return this._isDSTShifted;var e={},t;return _D(e,this),e=NY(e),e._a?(t=e._isUTC?lu(e._a):Ha(e._a),this._isDSTShifted=this.isValid()&&Sxe(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Dxe(){return this.isValid()?!this._isUTC:!1}function Lxe(){return this.isValid()?this._isUTC:!1}function IY(){return this.isValid()?this._isUTC&&this._offset===0:!1}var $xe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Fxe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ec(e,t){var n=e,r=null,a,s,i;return Rw(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:nd(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=$xe.exec(e))?(a=r[1]==="-"?-1:1,n={y:0,d:Kr(r[$c])*a,h:Kr(r[Vs])*a,m:Kr(r[ac])*a,s:Kr(r[Vu])*a,ms:Kr(HT(r[Wf]*1e3))*a}):(r=Fxe.exec(e))?(a=r[1]==="-"?-1:1,n={y:_f(r[2],a),M:_f(r[3],a),w:_f(r[4],a),d:_f(r[5],a),h:_f(r[6],a),m:_f(r[7],a),s:_f(r[8],a)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=zxe(Ha(n.from),Ha(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),s=new Gk(n),Rw(e)&&oa(e,"_locale")&&(s._locale=e._locale),Rw(e)&&oa(e,"_isValid")&&(s._isValid=e._isValid),s}Ec.fn=Gk.prototype;Ec.invalid=kxe;function _f(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function WF(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zxe(e,t){var n;return e.isValid()&&t.isValid()?(t=$D(t,e),e.isBefore(t)?n=WF(e,t):(n=WF(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function OY(e,t){return function(n,r){var a,s;return r!==null&&!isNaN(+r)&&(iY(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),a=Ec(n,r),MY(this,a,e),this}}function MY(e,t,n,r){var a=t._milliseconds,s=HT(t._days),i=HT(t._months);e.isValid()&&(r=r??!0,i&&gY(e,cx(e,"Month")+i*n),s&&cY(e,"Date",cx(e,"Date")+s*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&Ht.updateOffset(e,s||i))}var Hxe=OY(1,"add"),Vxe=OY(-1,"subtract");function PY(e){return typeof e=="string"||e instanceof String}function Uxe(e){return gc(e)||tb(e)||PY(e)||nd(e)||jxe(e)||Bxe(e)||e===null||e===void 0}function Bxe(e){var t=sm(e)&&!ED(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,s,i=r.length;for(a=0;a<i;a+=1)s=r[a],n=n||oa(e,s);return t&&n}function jxe(e){var t=pc(e),n=!1;return t&&(n=e.filter(function(r){return!nd(r)&&PY(e)}).length===0),t&&n}function Wxe(e){var t=sm(e)&&!ED(e),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,s;for(a=0;a<r.length;a+=1)s=r[a],n=n||oa(e,s);return t&&n}function Gxe(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function qxe(e,t){arguments.length===1&&(arguments[0]?Uxe(arguments[0])?(e=arguments[0],t=void 0):Wxe(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ha(),r=$D(n,this).startOf("day"),a=Ht.calendarFormat(this,r)||"sameElse",s=t&&(cu(t[a])?t[a].call(this,n):t[a]);return this.format(s||this.localeData().calendar(a,this,Ha(n)))}function Yxe(){return new nb(this)}function Kxe(e,t){var n=gc(e)?e:Ha(e);return this.isValid()&&n.isValid()?(t=Ul(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Zxe(e,t){var n=gc(e)?e:Ha(e);return this.isValid()&&n.isValid()?(t=Ul(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Xxe(e,t,n,r){var a=gc(e)?e:Ha(e),s=gc(t)?t:Ha(t);return this.isValid()&&a.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(a,n):!this.isBefore(a,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function Qxe(e,t){var n=gc(e)?e:Ha(e),r;return this.isValid()&&n.isValid()?(t=Ul(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Jxe(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function e_e(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function t_e(e,t,n){var r,a,s;if(!this.isValid())return NaN;if(r=$D(e,this),!r.isValid())return NaN;switch(a=(r.utcOffset()-this.utcOffset())*6e4,t=Ul(t),t){case"year":s=Tw(this,r)/12;break;case"month":s=Tw(this,r);break;case"quarter":s=Tw(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-a)/864e5;break;case"week":s=(this-r-a)/6048e5;break;default:s=this-r}return n?s:El(s)}function Tw(e,t){if(e.date()<t.date())return-Tw(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,"months"),a,s;return t-r<0?(a=e.clone().add(n-1,"months"),s=(t-r)/(r-a)):(a=e.clone().add(n+1,"months"),s=(t-r)/(a-r)),-(n+s)||0}Ht.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Ht.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function n_e(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function r_e(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Nw(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):cu(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Nw(n,"Z")):Nw(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function a_e(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,a,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+a+s)}function s_e(e){e||(e=this.isUtc()?Ht.defaultFormatUtc:Ht.defaultFormat);var t=Nw(this,e);return this.localeData().postformat(t)}function i_e(e,t){return this.isValid()&&(gc(e)&&e.isValid()||Ha(e).isValid())?Ec({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function o_e(e){return this.from(Ha(),e)}function l_e(e,t){return this.isValid()&&(gc(e)&&e.isValid()||Ha(e).isValid())?Ec({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function c_e(e){return this.to(Ha(),e)}function DY(e){var t;return e===void 0?this._locale._abbr:(t=md(e),t!=null&&(this._locale=t),this)}var LY=Vl("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function $Y(){return this._locale}var fx=1e3,Zh=60*fx,mx=60*Zh,FY=(365*400+97)*24*mx;function Xh(e,t){return(e%t+t)%t}function zY(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-FY:new Date(e,t,n).valueOf()}function HY(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-FY:Date.UTC(e,t,n)}function u_e(e){var t,n;if(e=Ul(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?HY:zY,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Xh(t+(this._isUTC?0:this.utcOffset()*Zh),mx);break;case"minute":t=this._d.valueOf(),t-=Xh(t,Zh);break;case"second":t=this._d.valueOf(),t-=Xh(t,fx);break}return this._d.setTime(t),Ht.updateOffset(this,!0),this}function d_e(e){var t,n;if(e=Ul(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?HY:zY,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=mx-Xh(t+(this._isUTC?0:this.utcOffset()*Zh),mx)-1;break;case"minute":t=this._d.valueOf(),t+=Zh-Xh(t,Zh)-1;break;case"second":t=this._d.valueOf(),t+=fx-Xh(t,fx)-1;break}return this._d.setTime(t),Ht.updateOffset(this,!0),this}function f_e(){return this._d.valueOf()-(this._offset||0)*6e4}function m_e(){return Math.floor(this.valueOf()/1e3)}function h_e(){return new Date(this.valueOf())}function p_e(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function g_e(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function v_e(){return this.isValid()?this.toISOString():null}function y_e(){return xD(this)}function b_e(){return Od({},$r(this))}function w_e(){return $r(this).overflow}function E_e(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}er("N",0,0,"eraAbbr");er("NN",0,0,"eraAbbr");er("NNN",0,0,"eraAbbr");er("NNNN",0,0,"eraName");er("NNNNN",0,0,"eraNarrow");er("y",["y",1],"yo","eraYear");er("y",["yy",2],0,"eraYear");er("y",["yyy",3],0,"eraYear");er("y",["yyyy",4],0,"eraYear");Fn("N",FD);Fn("NN",FD);Fn("NNN",FD);Fn("NNNN",O_e);Fn("NNNNN",M_e);Sa(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var a=n._locale.erasParse(e,r,n._strict);a?$r(n).era=a:$r(n).invalidEra=e});Fn("y",Ng);Fn("yy",Ng);Fn("yyy",Ng);Fn("yyyy",Ng);Fn("yo",P_e);Sa(["y","yy","yyy","yyyy"],ki);Sa(["yo"],function(e,t,n,r){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ki]=n._locale.eraYearOrdinalParse(e,a):t[ki]=parseInt(e,10)});function x_e(e,t){var n,r,a,s=this._eras||md("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":a=Ht(s[n].since).startOf("day"),s[n].since=a.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":a=Ht(s[n].until).startOf("day").valueOf(),s[n].until=a.valueOf();break}}return s}function __e(e,t,n){var r,a,s=this.eras(),i,l,c;for(e=e.toUpperCase(),r=0,a=s.length;r<a;++r)if(i=s[r].name.toUpperCase(),l=s[r].abbr.toUpperCase(),c=s[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(l===e)return s[r];break;case"NNNN":if(i===e)return s[r];break;case"NNNNN":if(c===e)return s[r];break}else if([i,l,c].indexOf(e)>=0)return s[r]}function k_e(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Ht(e.since).year():Ht(e.since).year()+(t-e.offset)*n}function S_e(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return""}function C_e(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return""}function N_e(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return""}
1239function R_e(){var e,t,n,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-Ht(a[e].since).year())*n+a[e].offset;return this.year()}function T_e(e){return oa(this,"_erasNameRegex")||zD.call(this),e?this._erasNameRegex:this._erasRegex}function A_e(e){return oa(this,"_erasAbbrRegex")||zD.call(this),e?this._erasAbbrRegex:this._erasRegex}function I_e(e){return oa(this,"_erasNarrowRegex")||zD.call(this),e?this._erasNarrowRegex:this._erasRegex}function FD(e,t){return t.erasAbbrRegex(e)}function O_e(e,t){return t.erasNameRegex(e)}function M_e(e,t){return t.erasNarrowRegex(e)}function P_e(e,t){return t._eraYearOrdinalRegex||Ng}function zD(){var e=[],t=[],n=[],r=[],a,s,i=this.eras();for(a=0,s=i.length;a<s;++a)t.push(zo(i[a].name)),e.push(zo(i[a].abbr)),n.push(zo(i[a].narrow)),r.push(zo(i[a].name)),r.push(zo(i[a].abbr)),r.push(zo(i[a].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}er(0,["gg",2],0,function(){return this.weekYear()%100});er(0,["GG",2],0,function(){return this.isoWeekYear()%100});function qk(e,t){er(0,[e,e.length],0,t)}qk("gggg","weekYear");qk("ggggg","weekYear");qk("GGGG","isoWeekYear");qk("GGGGG","isoWeekYear");Ni("weekYear","gg");Ni("isoWeekYear","GG");Ri("weekYear",1);Ri("isoWeekYear",1);Fn("G",Uk);Fn("g",Uk);Fn("GG",Va,ol);Fn("gg",Va,ol);Fn("GGGG",RD,ND);Fn("gggg",RD,ND);Fn("GGGGG",Vk,zk);Fn("ggggg",Vk,zk);ab(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Kr(e)});ab(["gg","GG"],function(e,t,n,r){t[r]=Ht.parseTwoDigitYear(e)});function D_e(e){return VY.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function L_e(e){return VY.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function $_e(){return Gu(this.year(),1,4)}function F_e(){return Gu(this.isoWeekYear(),1,4)}function z_e(){var e=this.localeData()._week;return Gu(this.year(),e.dow,e.doy)}function H_e(){var e=this.localeData()._week;return Gu(this.weekYear(),e.dow,e.doy)}function VY(e,t,n,r,a){var s;return e==null?Qv(this,r,a).year:(s=Gu(e,r,a),t>s&&(t=s),V_e.call(this,e,t,n,r,a))}function V_e(e,t,n,r,a){var s=wY(e,t,n,r,a),i=Xv(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}er("Q",0,"Qo","quarter");Ni("quarter","Q");Ri("quarter",7);Fn("Q",uY);Sa("Q",function(e,t){t[Hu]=(Kr(e)-1)*3});function U_e(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}er("D",["DD",2],"Do","date");Ni("date","D");Ri("date",9);Fn("D",Va);Fn("DD",Va,ol);Fn("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});Sa(["D","DD"],$c);Sa("Do",function(e,t){t[$c]=Kr(e.match(Va)[0])});var UY=Cg("Date",!0);er("DDD",["DDDD",3],"DDDo","dayOfYear");Ni("dayOfYear","DDD");Ri("dayOfYear",4);Fn("DDD",Hk);Fn("DDDD",dY);Sa(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Kr(e)});function B_e(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}er("m",["mm",2],0,"minute");Ni("minute","m");Ri("minute",14);Fn("m",Va);Fn("mm",Va,ol);Sa(["m","mm"],ac);var j_e=Cg("Minutes",!1);er("s",["ss",2],0,"second");Ni("second","s");Ri("second",15);Fn("s",Va);Fn("ss",Va,ol);Sa(["s","ss"],Vu);var W_e=Cg("Seconds",!1);er("S",0,0,function(){return~~(this.millisecond()/100)});er(0,["SS",2],0,function(){return~~(this.millisecond()/10)});er(0,["SSS",3],0,"millisecond");er(0,["SSSS",4],0,function(){return this.millisecond()*10});er(0,["SSSSS",5],0,function(){return this.millisecond()*100});er(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});er(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});er(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});er(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ni("millisecond","ms");Ri("millisecond",16);Fn("S",Hk,uY);Fn("SS",Hk,ol);Fn("SSS",Hk,dY);var Md,BY;for(Md="SSSS";Md.length<=9;Md+="S")Fn(Md,Ng);function G_e(e,t){t[Wf]=Kr(("0."+e)*1e3)}for(Md="S";Md.length<=9;Md+="S")Sa(Md,G_e);BY=Cg("Milliseconds",!1);er("z",0,0,"zoneAbbr");er("zz",0,0,"zoneName");function q_e(){return this._isUTC?"UTC":""}function Y_e(){return this._isUTC?"Coordinated Universal Time":""}var Gt=nb.prototype;Gt.add=Hxe;Gt.calendar=qxe;Gt.clone=Yxe;Gt.diff=t_e;Gt.endOf=d_e;Gt.format=s_e;Gt.from=i_e;Gt.fromNow=o_e;Gt.to=l_e;Gt.toNow=c_e;Gt.get=Zwe;Gt.invalidAt=w_e;Gt.isAfter=Kxe;Gt.isBefore=Zxe;Gt.isBetween=Xxe;Gt.isSame=Qxe;Gt.isSameOrAfter=Jxe;Gt.isSameOrBefore=e_e;Gt.isValid=y_e;Gt.lang=LY;Gt.locale=DY;Gt.localeData=$Y;Gt.max=yxe;Gt.min=vxe;Gt.parsingFlags=b_e;Gt.set=Xwe;Gt.startOf=u_e;Gt.subtract=Vxe;Gt.toArray=p_e;Gt.toObject=g_e;Gt.toDate=h_e;Gt.toISOString=r_e;Gt.inspect=a_e;typeof Symbol<"u"&&Symbol.for!=null&&(Gt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Gt.toJSON=v_e;Gt.toString=n_e;Gt.unix=m_e;Gt.valueOf=f_e;Gt.creationData=E_e;Gt.eraName=S_e;Gt.eraNarrow=C_e;Gt.eraAbbr=N_e;Gt.eraYear=R_e;Gt.year=bY;Gt.isLeapYear=gEe;Gt.weekYear=D_e;Gt.isoWeekYear=L_e;Gt.quarter=Gt.quarters=U_e;Gt.month=vY;Gt.daysInMonth=mEe;Gt.week=Gt.weeks=xEe;Gt.isoWeek=Gt.isoWeeks=_Ee;Gt.weeksInYear=z_e;Gt.weeksInWeekYear=H_e;Gt.isoWeeksInYear=$_e;Gt.isoWeeksInISOWeekYear=F_e;Gt.date=UY;Gt.day=Gt.days=LEe;Gt.weekday=$Ee;Gt.isoWeekday=FEe;Gt.dayOfYear=B_e;Gt.hour=Gt.hours=WEe;Gt.minute=Gt.minutes=j_e;Gt.second=Gt.seconds=W_e;Gt.millisecond=Gt.milliseconds=BY;Gt.utcOffset=Nxe;Gt.utc=Txe;Gt.local=Axe;Gt.parseZone=Ixe;Gt.hasAlignedHourOffset=Oxe;Gt.isDST=Mxe;Gt.isLocal=Dxe;Gt.isUtcOffset=Lxe;Gt.isUtc=IY;Gt.isUTC=IY;Gt.zoneAbbr=q_e;Gt.zoneName=Y_e;Gt.dates=Vl("dates accessor is deprecated. Use date instead.",UY);Gt.months=Vl("months accessor is deprecated. Use month instead",vY);Gt.years=Vl("years accessor is deprecated. Use year instead",bY);Gt.zone=Vl("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Rxe);Gt.isDSTShifted=Vl("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Pxe);function K_e(e){return Ha(e*1e3)}function Z_e(){return Ha.apply(null,arguments).parseZone()}function jY(e){return e}var la=kD.prototype;la.calendar=Lwe;la.longDateFormat=Hwe;la.invalidDate=Uwe;la.ordinal=Wwe;la.preparse=jY;la.postformat=jY;la.relativeTime=qwe;la.pastFuture=Ywe;la.set=Pwe;la.eras=x_e;la.erasParse=__e;la.erasConvertYear=k_e;la.erasAbbrRegex=A_e;la.erasNameRegex=T_e;la.erasNarrowRegex=I_e;la.months=cEe;la.monthsShort=uEe;la.monthsParse=fEe;la.monthsRegex=pEe;la.monthsShortRegex=hEe;la.week=yEe;la.firstDayOfYear=EEe;la.firstDayOfWeek=wEe;la.weekdays=IEe;la.weekdaysMin=MEe;la.weekdaysShort=OEe;la.weekdaysParse=DEe;la.weekdaysRegex=zEe;la.weekdaysShortRegex=HEe;la.weekdaysMinRegex=VEe;la.isPM=BEe;la.meridiem=GEe;function hx(e,t,n,r){var a=md(),s=lu().set(r,t);return a[n](s,e)}function WY(e,t,n){if(nd(e)&&(t=e,e=void 0),e=e||"",t!=null)return hx(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=hx(e,r,n,"month");return a}function HD(e,t,n,r){typeof e=="boolean"?(nd(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,nd(t)&&(n=t,t=void 0),t=t||"");var a=md(),s=e?a._week.dow:0,i,l=[];
vendor: 5,534 bytes, lines 1239-1240
1239if(n!=null)return hx(t,(n+s)%7,r,"day");for(i=0;i<7;i++)l[i]=hx(t,(i+s)%7,r,"day");return l}function X_e(e,t){return WY(e,t,"months")}function Q_e(e,t){return WY(e,t,"monthsShort")}function J_e(e,t,n){return HD(e,t,n,"weekdays")}function eke(e,t,n){return HD(e,t,n,"weekdaysShort")}function tke(e,t,n){return HD(e,t,n,"weekdaysMin")}Bd("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=Kr(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Ht.lang=Vl("moment.lang is deprecated. Use moment.locale instead.",Bd);Ht.langData=Vl("moment.langData is deprecated. Use moment.localeData instead.",md);var vu=Math.abs;function nke(){var e=this._data;return this._milliseconds=vu(this._milliseconds),this._days=vu(this._days),this._months=vu(this._months),e.milliseconds=vu(e.milliseconds),e.seconds=vu(e.seconds),e.minutes=vu(e.minutes),e.hours=vu(e.hours),e.months=vu(e.months),e.years=vu(e.years),this}function GY(e,t,n,r){var a=Ec(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function rke(e,t){return GY(this,e,t,1)}function ake(e,t){return GY(this,e,t,-1)}function GF(e){return e<0?Math.floor(e):Math.ceil(e)}function ske(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,a,s,i,l,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=GF(UT(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,a=El(e/1e3),r.seconds=a%60,s=El(a/60),r.minutes=s%60,i=El(s/60),r.hours=i%24,t+=El(i/24),c=El(qY(t)),n+=c,t-=GF(UT(c)),l=El(n/12),n%=12,r.days=t,r.months=n,r.years=l,this}function qY(e){return e*4800/146097}function UT(e){return e*146097/4800}function ike(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Ul(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+qY(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(UT(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function oke(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+Kr(this._months/12)*31536e6:NaN}function hd(e){return function(){return this.as(e)}}var lke=hd("ms"),cke=hd("s"),uke=hd("m"),dke=hd("h"),fke=hd("d"),mke=hd("w"),hke=hd("M"),pke=hd("Q"),gke=hd("y");function vke(){return Ec(this)}function yke(e){return e=Ul(e),this.isValid()?this[e+"s"]():NaN}function Bm(e){return function(){return this.isValid()?this._data[e]:NaN}}var bke=Bm("milliseconds"),wke=Bm("seconds"),Eke=Bm("minutes"),xke=Bm("hours"),_ke=Bm("days"),kke=Bm("months"),Ske=Bm("years");function Cke(){return El(this.days()/7)}var Su=Math.round,Th={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Nke(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}function Rke(e,t,n,r){var a=Ec(e).abs(),s=Su(a.as("s")),i=Su(a.as("m")),l=Su(a.as("h")),c=Su(a.as("d")),u=Su(a.as("M")),d=Su(a.as("w")),f=Su(a.as("y")),m=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||i<=1&&["m"]||i<n.m&&["mm",i]||l<=1&&["h"]||l<n.h&&["hh",l]||c<=1&&["d"]||c<n.d&&["dd",c];return n.w!=null&&(m=m||d<=1&&["w"]||d<n.w&&["ww",d]),m=m||u<=1&&["M"]||u<n.M&&["MM",u]||f<=1&&["y"]||["yy",f],m[2]=t,m[3]=+e>0,m[4]=r,Nke.apply(null,m)}function Tke(e){return e===void 0?Su:typeof e=="function"?(Su=e,!0):!1}function Ake(e,t){return Th[e]===void 0?!1:t===void 0?Th[e]:(Th[e]=t,e==="s"&&(Th.ss=t-1),!0)}function Ike(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Th,a,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Th,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),a=this.localeData(),s=Rke(this,!n,r,a),n&&(s=a.pastFuture(+this,s)),a.postformat(s)}var a2=Math.abs;function ih(e){return(e>0)-(e<0)||+e}function Yk(){if(!this.isValid())return this.localeData().invalidDate();var e=a2(this._milliseconds)/1e3,t=a2(this._days),n=a2(this._months),r,a,s,i,l=this.asSeconds(),c,u,d,f;return l?(r=El(e/60),a=El(r/60),e%=60,r%=60,s=El(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=l<0?"-":"",u=ih(this._months)!==ih(l)?"-":"",d=ih(this._days)!==ih(l)?"-":"",f=ih(this._milliseconds)!==ih(l)?"-":"",c+"P"+(s?u+s+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(a||r||e?"T":"")+(a?f+a+"H":"")+(r?f+r+"M":"")+(e?f+i+"S":"")):"P0D"}var aa=Gk.prototype;aa.isValid=_xe;aa.abs=nke;aa.add=rke;aa.subtract=ake;aa.as=ike;aa.asMilliseconds=lke;aa.asSeconds=cke;aa.asMinutes=uke;aa.asHours=dke;aa.asDays=fke;aa.asWeeks=mke;aa.asMonths=hke;aa.asQuarters=pke;aa.asYears=gke;aa.valueOf=oke;aa._bubble=ske;aa.clone=vke;aa.get=yke;aa.milliseconds=bke;aa.seconds=wke;aa.minutes=Eke;aa.hours=xke;aa.days=_ke;aa.weeks=Cke;aa.months=kke;aa.years=Ske;aa.humanize=Ike;aa.toISOString=Yk;aa.toString=Yk;aa.toJSON=Yk;aa.locale=DY;aa.localeData=$Y;aa.toIsoString=Vl("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yk);aa.lang=LY;er("X",0,0,"unix");er("x",0,0,"valueOf");Fn("x",Uk);Fn("X",Jwe);Sa("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});Sa("x",function(e,t,n){n._d=new Date(Kr(e))});//! moment.js 1240Ht.version="2.29.4";Owe(Ha);Ht.fn=Gt;Ht.min=bxe;Ht.max=wxe;Ht.now=Exe;Ht.utc=lu;Ht.unix=K_e;Ht.months=X_e;Ht.isDate=tb;Ht.locale=Bd;
1240Ht.invalid=$k;Ht.duration=Ec;Ht.isMoment=gc;Ht.weekdays=J_e;Ht.parseZone=Z_e;Ht.localeData=md;Ht.isDuration=Rw;Ht.monthsShort=Q_e;Ht.weekdaysMin=tke;Ht.defineLocale=OD;Ht.updateLocale=ZEe;Ht.locales=XEe;Ht.weekdaysShort=eke;Ht.normalizeUnits=Ul;Ht.relativeTimeRounding=Tke;Ht.relativeTimeThreshold=Ake;Ht.calendarFormat=Gxe;Ht.prototype=Gt;Ht.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Oke={minutes:15};Ts();const s2=Ir(xr());let YY={getAllAssets:({teamID:e=null,forceUpdate:t=!1,ignoreStale:n=!1,triggerPath:r=null,filterSet:a=null,onProgress:s=null}={})=>new Promise(i=>{let l={filters:[]};e&&l.filters.push({type:"match",key:"$team_id",value:e}),a&&(l.filters=l.filters.concat(a)),Qe.$dexie.action.get({tableID:"Assets-General-All",options:l}).then(c=>{const d=`assetsGeneral-lastDownload-${r?r.replace("users-asset-view-",""):"lastupdated_team_all"}-${e||"all"}`;let f=localStorage.getItem(d)?JSON.parse(localStorage.getItem(d)):null,m=f?Ht.duration(Ht().diff(Ht.unix(f))).asMinutes():void 0;!t&&!n&&m&&m<Oke.minutes&&(c==null?void 0:c.length)>0?i({is_syncing:!1,list:c,last_download_time:f}):(s&&s({state:"fetching",message:"Fetching from the cloud",value:.1}),i({is_syncing:!0,list:c,$get_upcoming_list:new Promise((h,g)=>{pt(s2,Ze(r||"users-asset-view-lastupdated_team_all"))({teamID:e,is_search:!0,last_sync_timestamp:t||!(c!=null&&c.length)?null:f}).then(v=>{var N;s&&s({state:"processing",message:"Processing data...",value:.5});const y=ta.clone(v.data);let b=((N=y==null?void 0:y.output)==null?void 0:N.assets)||[],E=b.filter(k=>k._is_deleted||k.internal&&k.internal.mark_deleted);const w=b.filter(k=>!k._is_deleted&&!(k.internal&&k.internal.mark_deleted)),x=k=>{try{if(!k)return null;const C=new URL(k);let A=(C.host+C.pathname).toLowerCase();return A.endsWith("/")&&(A=A.slice(0,-1)),A}catch{return null}};if(c&&c.length>0){const k=new Map,C=new Map;c.forEach(A=>{var M;A.$client_request_id&&k.set(A.$client_request_id,A);const O=((M=A.active_iteration)==null?void 0:M.url)||A.url,T=x(O);T&&(C.has(T)||C.set(T,[]),C.get(T).push(A))}
1240),w.forEach(A=>{var L;const O=A.$client_request_id;if(O&&k.has(O)){const D=k.get(O);D.$id!==A.$id&&(E.some(j=>j.$id===D.$id)||E.push(D))}const T=((L=A.active_iteration)==null?void 0:L.url)||A.url,M=x(T);M&&C.has(M)&&C.get(M).forEach(D=>{D.$id!==A.$id&&D.$team_id===A.$team_id&&(E.some(j=>j.$id===D.$id)||E.push(D))})})}(E.length>0?(()=>(s&&s({state:"deleting",message:`Removing ${E.length} obsolete items...`,value:.7}),Promise.all(E.map(k=>Qe.action.delete({tableID:"Assets-General-All",id:k.$id})))))():Promise.resolve()).then(()=>{s&&s({state:"saving",message:`Saving ${w.length} items to local database...`,value:.85}),Qe.action.set({tableID:"Assets-General-All",dataList:w,options:{includeIndex:!0,additionalData:void 0,skipClear:!0}}).then(()=>{localStorage.setItem(d,Ht().unix()),Qe.$dexie.action.get({tableID:"Assets-General-All",options:l}).then(k=>{s&&s({state:"finished",message:"Sync complete",value:1}),h({is_syncing_finished:!0,list:k})})})})}).catch(v=>g({error:v}))})}))}).catch(c=>{console.error("LocalDatabase.get failed",c),i({is_syncing:!1,list:[],error:c})})}),searchAllAssetsForExistingURL:({targetURL:e=null,teamID:t=null}={})=>new Promise(n=>{let r=!1;if(e){let a=null;t&&(a=[{type:"match",key:"$team_id",value:t}]),Qe.$dexie.action.get({tableID:"Assets-General-All",options:{filters:a}}).then(s=>{let i=ta.find(s,l=>{var c;return((c=l==null?void 0:l.active_iteration)==null?void 0:c.url)===e&&(!t||t&&(l==null?void 0:l.$team_id)===t)});i&&(r=!0),n({foundMatchingURL:r,matchedAssetItem:i,searchedAssetsList:s})})}else n({foundMatchingURL:r,searchedAssetsList:null})}),searchAssets:({query:e="",teamID:t=null,onProgress:n=null,filterSet:r=null}={})=>new Promise((a,s)=>{const i=e.toLowerCase();YY.getAllAssets({teamID:t,forceUpdate:!1,triggerPath:t?"users-asset-view-lastupdated_team":"users-asset-view-lastupdated_team_all",onProgress:n,filterSet:r}).then(l=>{const c=(l.list||[]).filter(d=>{var f;return(f=d.name)==null?void 0:f.toLowerCase().includes(i)});let u=null;l.$get_upcoming_list&&(u=l.$get_upcoming_list.then(d=>({list:((d==null?void 0:d.list)||[]).filter(h=>{var g;return(g=h.name)==null?void 0:g.toLowerCase().includes(i)})}))),a({is_syncing:l.is_syncing,last_download_time:l.last_download_time,list:c,$get_upcoming_list:u})}).catch(l=>{console.error("Local search wrapping failed",l),s(l)})}),getCollections:({teamID:e})=>new Promise((t,n)=>{pt(s2,Ze("users-collection-view-optionsList"))({teamID:e}).then(r=>{var a,s;t(((s=(a=r.data)==null?void 0:a.output)==null?void 0:s.collections)||[])}).catch(r=>{console.error("Failed to fetch collections",r),n(r)})}),getTags:({teamID:e})=>new Promise((t,n)=>{pt(s2,Ze("users-tag-view-optionsList"))({teamID:e}).then(r=>{var a,s;t(((s=(a=r.data)==null?void 0:a.output)==null?void 0:s.tags)||[])}).catch(r=>{console.error("Failed to fetch tags",r),n(r)})})};const ec=YY;function _m(e){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_m(e)}function Mke(e,t){if(_m(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(_m(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KY(e){var t=Mke(e,"string");return _m(t)=="symbol"?t:String(t)}function I0(e,t,n){return t=KY(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qF(Object(n),!0).forEach(function(r){I0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pke(e){if(Array.isArray(e))return e}function Dke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,s,i,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}
1240finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}function BT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZY(e,t){if(e){if(typeof e=="string")return BT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BT(e,t)}}function Lke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1241In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qu(e,t){return Pke(e)||Dke(e,t)||ZY(e,t)||Lke()}function $ke(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function uu(e,t){if(e==null)return{};var n=$ke(e,t),r,a;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Fke=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function XY(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,a=r===void 0?!1:r,s=e.defaultValue,i=s===void 0?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,m=e.onMenuOpen,h=e.value,g=uu(e,Fke),v=p.useState(l!==void 0?l:n),y=qu(v,2),b=y[0],E=y[1],w=p.useState(c!==void 0?c:a),x=qu(w,2),S=x[0],N=x[1],k=p.useState(h!==void 0?h:i),C=qu(k,2),A=C[0],O=C[1],T=p.useCallback(function(z,K){typeof u=="function"&&u(z,K),O(z)},[u]),M=p.useCallback(function(z,K){var ee;typeof d=="function"&&(ee=d(z,K)),E(ee!==void 0?ee:z)},[d]),L=p.useCallback(function(){typeof m=="function"&&m(),N(!0)},[m]),D=p.useCallback(function(){typeof f=="function"&&f(),N(!1)},[f]),j=l!==void 0?l:b,H=c!==void 0?c:S,Y=h!==void 0?h:A;return nr(nr({},g),{},{inputValue:j,menuIsOpen:H,onChange:T,onInputChange:M,onMenuClose:D,onMenuOpen:L,value:Y})}function lr(){return lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lr.apply(this,arguments)}function zke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,KY(r.key),r)}}function Hke(e,t,n){return t&&YF(e.prototype,t),n&&YF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jT(e,t){return jT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},jT(e,t)}function Vke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jT(e,t)}function px(e){return px=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},px(e)}function Uke(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jke(e,t){if(t&&(_m(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bke(e)}function Wke(e){var t=Uke();return function(){var r=px(e),a;if(t){var s=px(this).constructor;a=Reflect.construct(r,arguments,s)}else a=r.apply(this,arguments);return jke(this,a)}}function Gke(e){if(Array.isArray(e))return BT(e)}function qke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1242In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qh(e){return Gke(e)||qke(e)||ZY(e)||Yke()}function Kke(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Zke(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Xke=function(){function e(n){var r=this;this._insertTag=function(a){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Zke(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Kke(a);
vendor: 9,875 bytes, line 1242
1242try{s.insertRule(r,s.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),pi="-ms-",gx="-moz-",da="-webkit-",QY="comm",VD="rule",UD="decl",Qke="@import",JY="@keyframes",Jke="@layer",eSe=Math.abs,Kk=String.fromCharCode,tSe=Object.assign;function nSe(e,t){return si(e,0)^45?(((t<<2^si(e,0))<<2^si(e,1))<<2^si(e,2))<<2^si(e,3):0}function eK(e){return e.trim()}function rSe(e,t){return(e=t.exec(e))?e[0]:e}function fa(e,t,n){return e.replace(t,n)}function WT(e,t){return e.indexOf(t)}function si(e,t){return e.charCodeAt(t)|0}function ey(e,t,n){return e.slice(t,n)}function Mc(e){return e.length}function BD(e){return e.length}function v1(e,t){return t.push(e),e}function aSe(e,t){return e.map(t).join("")}var Zk=1,qp=1,tK=0,bo=0,Ns=0,Rg="";function Xk(e,t,n,r,a,s,i){return{value:e,root:t,parent:n,type:r,props:a,children:s,line:Zk,column:qp,length:i,return:""}}function u0(e,t){return tSe(Xk("",null,null,"",null,null,0),e,{length:-e.length},t)}function sSe(){return Ns}function iSe(){return Ns=bo>0?si(Rg,--bo):0,qp--,Ns===10&&(qp=1,Zk--),Ns}function Zo(){return Ns=bo<tK?si(Rg,bo++):0,qp++,Ns===10&&(qp=1,Zk++),Ns}function Gc(){return si(Rg,bo)}function Aw(){return bo}function sb(e,t){return ey(Rg,e,t)}function ty(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nK(e){return Zk=qp=1,tK=Mc(Rg=e),bo=0,[]}function rK(e){return Rg="",e}function Iw(e){return eK(sb(bo-1,GT(e===91?e+2:e===40?e+1:e)))}function oSe(e){for(;(Ns=Gc())&&Ns<33;)Zo();return ty(e)>2||ty(Ns)>3?"":" "}function lSe(e,t){for(;--t&&Zo()&&!(Ns<48||Ns>102||Ns>57&&Ns<65||Ns>70&&Ns<97););return sb(e,Aw()+(t<6&&Gc()==32&&Zo()==32))}function GT(e){for(;Zo();)switch(Ns){case e:return bo;case 34:case 39:e!==34&&e!==39&>(Ns);break;case 40:e===41&>(e);break;case 92:Zo();break}return bo}function cSe(e,t){for(;Zo()&&e+Ns!==47+10;)if(e+Ns===42+42&&Gc()===47)break;return"/*"+sb(t,bo-1)+"*"+Kk(e===47?e:Zo())}function uSe(e){for(;!ty(Gc());)Zo();return sb(e,bo)}function dSe(e){return rK(Ow("",null,null,null,[""],e=nK(e),0,[0],e))}function Ow(e,t,n,r,a,s,i,l,c){for(var u=0,d=0,f=i,m=0,h=0,g=0,v=1,y=1,b=1,E=0,w="",x=a,S=s,N=r,k=w;y;)switch(g=E,E=Zo()){case 40:if(g!=108&&si(k,f-1)==58){WT(k+=fa(Iw(E),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Iw(E);break;case 9:case 10:case 13:case 32:k+=oSe(g);break;case 92:k+=lSe(Aw()-1,7);continue;case 47:switch(Gc()){case 42:case 47:v1(fSe(cSe(Zo(),Aw()),t,n),c);break;default:k+="/"}break;case 123*v:l[u++]=Mc(k)*b;case 125*v:case 59:case 0:switch(E){case 0:case 125:y=0;case 59+d:b==-1&&(k=fa(k,/\f/g,"")),h>0&&Mc(k)-f&&v1(h>32?ZF(k+";",r,n,f-1):ZF(fa(k," ","")+";",r,n,f-2),c);break;case 59:k+=";";default:if(v1(N=KF(k,t,n,u,d,a,l,w,x=[],S=[],f),s),E===123)if(d===0)Ow(k,t,N,N,x,s,f,l,S);else switch(m===99&&si(k,3)===110?100:m){case 100:case 108:case 109:case 115:Ow(e,N,N,r&&v1(KF(e,N,N,0,0,a,l,w,a,x=[],f),S),a,S,f,l,r?x:S);break;default:Ow(k,N,N,N,[""],S,0,l,S)}}u=d=h=0,v=b=1,w=k="",f=i;break;case 58:f=1+Mc(k),h=g;default:if(v<1){if(E==123)--v;else if(E==125&&v++==0&&iSe()==125)continue}switch(k+=Kk(E),E*v){case 38:b=d>0?1:(k+="\f",-1);break;case 44:l[u++]=(Mc(k)-1)*b,b=1;break;case 64:Gc()===45&&(k+=Iw(Zo())),m=Gc(),d=f=Mc(w=k+=uSe(Aw())),E++;break;case 45:g===45&&Mc(k)==2&&(v=0)}}return s}function KF(e,t,n,r,a,s,i,l,c,u,d){for(var f=a-1,m=a===0?s:[""],h=BD(m),g=0,v=0,y=0;g<r;++g)for(var b=0,E=ey(e,f+1,f=eSe(v=i[g])),w=e;b<h;++b)(w=eK(v>0?m[b]+" "+E:fa(E,/&\f/g,m[b])))&&(c[y++]=w);return Xk(e,t,n,a===0?VD:l,c,u,d)}function fSe(e,t,n){return Xk(e,t,n,QY,Kk(sSe()),ey(e,2,-2),0)}function ZF(e,t,n,r){return Xk(e,t,n,UD,ey(e,0,r),ey(e,r+1,-1),r)}function Jh(e,t){for(var n="",r=BD(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function mSe(e,t,n,r){switch(e.type){case Jke:if(e.children.length)break;case Qke:case UD:return e.return=e.return||e.value;case QY:return"";case JY:return e.return=e.value+"{"+Jh(e.children,r)+"}";case VD:e.value=e.props.join(",")}return Mc(n=Jh(e.children,r))?e.return=e.value+"{"+n+"}":""}function hSe(e){var t=BD(e);return function(n,r,a,s){for(var i="",l=0;l<t;l++)i+=e[l](n,r,a,s)||"";return i}}function pSe(e){return function(t){t.root||(t=t.return)&&e(t)}}function gSe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var vSe=function(t,n,r){for(var a=0,s=0;a=s,s=Gc(),a===38&&s===12&&(n[r]=1),!ty(s);)Zo();return sb(t,bo)},ySe=function(t,n){var r=-1,a=44;do switch(ty(a)){case 0:a===38&&Gc()===12&&(n[r]=1),t[r]+=vSe(bo-1,n,r);break;case 2:t[r]+=Iw(a);break;case 4:if(a===44){t[++r]=Gc()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Kk(a)}while(a=Zo());return t},bSe=function(t,n){return rK(ySe(nK(t),n))},XF=new WeakMap,wSe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!XF.get(r))&&!a){XF.set(t,!0);for(var s=[],i=bSe(n,s),l=r.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},ESe=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function aK(e,t){switch(nSe(e,t)){case 5103:return da+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return da+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return da+e+gx+e+pi+e+e;case 6828:case 4268:return da+e+pi+e+e;case 6165:return da+e+pi+"flex-"+e+e;case 5187:return da+e+fa(e,/(\w+).+(:[^]+)/,da+"box-$1$2"+pi+"flex-$1$2")+e;case 5443:return da+e+pi+"flex-item-"+fa(e,/flex-|-self/,"")+e;case 4675:return da+e+pi+"flex-line-pack"+fa(e,/align-content|flex-|-self/,"")+e;case 5548:return da+e+pi+fa(e,"shrink","negative")+e;case 5292:return da+e+pi+fa(e,"basis","preferred-size")+e;case 6060:return da+"box-"+fa(e,"-grow","")+da+e+pi+fa(e,"grow","positive")+e;case 4554:return da+fa(e,/([^-])(transform)/g,"$1"+da+"$2")+e;case 6187:return fa(fa(fa(e,/(zoom-|grab)/,da+"$1"),/(image-set)/,da+"$1"),e,"")+e;case 5495:case 3959:return fa(e,/(image-set\([^]*)/,da+"$1$`$1");case 4968:return fa(fa(e,/(.+:)(flex-)?(.*)/,da+"box-pack:$3"+pi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+da+e+e;case 4095:case 3583:case 4068:case 2532:return fa(e,/(.+)-inline(.+)/,da+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Mc(e)-1-t>6)switch(si(e,t+1)){case 109:if(si(e,t+4)!==45)break;case 102:return fa(e,/(.+:)(.+)-([^]+)/,"$1"+da+"$2-$3$1"+gx+(si(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~WT(e,"stretch")?aK(fa(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(si(e,t+1)!==115)break;case 6444:switch(si(e,Mc(e)-3-(~WT(e,"!important")&&10))){case 107:return fa(e,":",":"+da)+e;case 101:return fa(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+da+(si(e,14)===45?"inline-":"")+"box$3$1"+da+"$2$3$1"+pi+"$2box$3")+e}break;case 5936:switch(si(e,t+11)){case 114:return da+e+pi+fa(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return da+e+pi+fa(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return da+e+pi+fa(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return da+e+pi+e+e}return e}var xSe=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case UD:t.return=aK(t.value,t.length);break;case JY:return Jh([u0(t,{value:fa(t.value,"@","@"+da)})],a);case VD:if(t.length)return aSe(t.props,function(s){switch(rSe(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jh([u0(t,{props:[fa(s,/:(read-\w+)/,":"+gx+"$1")]})],a);case"::placeholder":return Jh([u0(t,{props:[fa(s,/:(plac\w+)/,":"+da+"input-$1")]}),u0(t,{props:[fa(s,/:(plac\w+)/,":"+gx+"$1")]}),u0(t,{props:[fa(s,/:(plac\w+)/,pi+"input-$1")]})],a)}return""})}},_Se=[xSe],kSe=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var y=v.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var a=t.stylisPlugins||_Se,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var y=v.getAttribute("data-emotion").split(" "),b=1;b<y.length;b++)s[y[b]]=!0;l.push(v)});var c,u=[wSe,ESe];{var d,f=[mSe,pSe(function(v){d.insert(v)})],m=hSe(u.concat(a,f)),h=function(y){return Jh(dSe(y),m)};c=function(y,b,E,w){d=E,h(y?y+"{"+b.styles+"}":b.styles),w&&(g.inserted[b.name]=!0)}}var g={key:n,sheet:new Xke({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return g.sheet.hydrate(l),g},SSe=!0;function CSe(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):r+=a+" "}),r}var sK=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||SSe===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},NSe=function(t,n,r){sK(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+a:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function RSe(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>
vendor: 4,490 bytes, line 1242
1242>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var TSe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ASe=/[A-Z]|^ms/g,ISe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,iK=function(t){return t.charCodeAt(1)===45},QF=function(t){return t!=null&&typeof t!="boolean"},i2=gSe(function(e){return iK(e)?e:e.replace(ASe,"-$&").toLowerCase()}),JF=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(ISe,function(r,a,s){return Pc={name:a,styles:s,next:Pc},a})}return TSe[t]!==1&&!iK(t)&&typeof n=="number"&&n!==0?n+"px":n};function ny(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Pc={name:n.name,styles:n.styles,next:Pc},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Pc={name:r.name,styles:r.styles,next:Pc},r=r.next;var a=n.styles+";";return a}return OSe(e,t,n)}case"function":{if(e!==void 0){var s=Pc,i=n(e);return Pc=s,ny(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function OSe(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=ny(e,t,n[a])+";";else for(var s in n){var i=n[s];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=s+"{"+t[i]+"}":QF(i)&&(r+=i2(s)+":"+JF(s,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)QF(i[l])&&(r+=i2(s)+":"+JF(s,i[l])+";");else{var c=ny(e,t,i);switch(s){case"animation":case"animationName":{r+=i2(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var e6=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Pc,oK=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var a=!0,s="";Pc=void 0;var i=t[0];i==null||i.raw===void 0?(a=!1,s+=ny(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=ny(r,n,t[l]),a&&(s+=i[l]);e6.lastIndex=0;for(var c="",u;(u=e6.exec(s))!==null;)c+="-"+u[1];var d=RSe(s)+c;return{name:d,styles:s,next:Pc}},MSe=function(t){return t()},PSe=rE["useInsertionEffect"]?rE["useInsertionEffect"]:!1,DSe=PSe||MSe,jD={}.hasOwnProperty,lK=p.createContext(typeof HTMLElement<"u"?kSe({key:"css"}):null);lK.Provider;var LSe=function(t){return p.forwardRef(function(n,r){var a=p.useContext(lK);return t(n,a,r)})},$Se=p.createContext({}),qT="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",FSe=function(t,n){var r={};for(var a in n)jD.call(n,a)&&(r[a]=n[a]);return r[qT]=t,r},zSe=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return sK(n,r,a),DSe(function(){return NSe(n,r,a)}),null},HSe=LSe(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[qT],s=[r],i="";typeof e.className=="string"?i=CSe(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=oK(s,void 0,p.useContext($Se));i+=t.key+"-"+l.name;var c={};for(var u in e)jD.call(e,u)&&u!=="css"&&u!==qT&&(c[u]=e[u]);return c.ref=n,c.className=i,p.createElement(p.Fragment,null,p.createElement(zSe,{cache:t,serialized:l,isStringTag:typeof a=="string"}),p.createElement(a,c))}),VSe=HSe,sr=function(t,n){var r=arguments;if(n==null||!jD.call(n,"css"))return p.createElement.apply(void 0,r);var a=r.length,s=new Array(a);s[0]=VSe,s[1]=FSe(t,n);for(var i=2;i<a;i++)s[i]=r[i];return p.createElement.apply(null,s)};function WD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return oK(t)}var USe=function(){var t=WD.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function BSe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
vendor: 4,650 bytes, line 1242
1242function jSe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}const WSe=Math.min,GSe=Math.max,vx=Math.round,y1=Math.floor,yx=e=>({x:e,y:e});function cK(e){return dK(e)?(e.nodeName||"").toLowerCase():"#document"}function cc(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uK(e){var t;return(t=(dK(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dK(e){return e instanceof Node||e instanceof cc(e).Node}function YT(e){return e instanceof Element||e instanceof cc(e).Element}function GD(e){return e instanceof HTMLElement||e instanceof cc(e).HTMLElement}function t6(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cc(e).ShadowRoot}function fK(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=qD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function qSe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function YSe(e){return["html","body","#document"].includes(cK(e))}function qD(e){return cc(e).getComputedStyle(e)}function KSe(e){if(cK(e)==="html")return e;const t=e.assignedSlot||e.parentNode||t6(e)&&e.host||uK(e);return t6(t)?t.host:t}function mK(e){const t=KSe(e);return YSe(t)?e.ownerDocument?e.ownerDocument.body:e.body:GD(t)&&fK(t)?t:mK(t)}function bx(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=mK(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),i=cc(a);return s?t.concat(i,i.visualViewport||[],fK(a)?a:[],i.frameElement&&n?bx(i.frameElement):[]):t.concat(a,bx(a,[],n))}function ZSe(e){const t=qD(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=GD(e),s=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=vx(n)!==s||vx(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function YD(e){return YT(e)?e:e.contextElement}function o2(e){const t=YD(e);if(!GD(t))return yx(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:s}=ZSe(t);let i=(s?vx(n.width):n.width)/r,l=(s?vx(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const XSe=yx(0);function QSe(e){const t=cc(e);return!qSe()||!t.visualViewport?XSe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function JSe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==cc(e)?!1:t}function n6(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=YD(e);let i=yx(1);t&&(r?YT(r)&&(i=o2(r)):i=o2(e));const l=JSe(s,n,r)?QSe(s):yx(0);let c=(a.left+l.x)/i.x,u=(a.top+l.y)/i.y,d=a.width/i.x,f=a.height/i.y;if(s){const m=cc(s),h=r&&YT(r)?cc(r):r;let g=m.frameElement;for(;g&&r&&h!==m;){const v=o2(g),y=g.getBoundingClientRect(),b=qD(g),E=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,w=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=E,u+=w,g=cc(g).frameElement}}return jSe({width:d,height:f,x:c,y:u})}function eCe(e,t){let n=null,r;const a=uK(e);function s(){clearTimeout(r),n&&n.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:u,top:d,width:f,height:m}=e.getBoundingClientRect();if(l||t(),!f||!m)return;const h=y1(d),g=y1(a.clientWidth-(u+f)),v=y1(a.clientHeight-(d+m)),y=y1(u),E={rootMargin:-h+"px "+-g+"px "+-v+"px "+-y+"px",threshold:GSe(0,WSe(1,c))||1};let w=!0;function x(S){const N=S[0].intersectionRatio;if(N!==c){if(!w)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(x,{...E,root:a.ownerDocument})}catch{n=new IntersectionObserver(x,E)}n.observe(e)}return i(!0),s}function tCe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=YD(e),d=a||s?[...u?bx(u):[],...bx(t)]:[];d.forEach(b=>{a&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=u&&l?eCe(u,n):null;let m=-1,h=null;i&&(h=new ResizeObserver(b=>{let[E]=b;E&&E.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let g,v=c?n6(e):null;c&&y();function y(){const b=n6(e);v&&(b.x!==v.x||b.y!==v.y||b.width!==v.width||b.height!==v.height)&&n(),v=b,g=requestAnimationFrame(y)}return n(),()=>{d.forEach(b=>{a&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(g)}}var KT=p.useLayoutEffect,nCe=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","
1242setValue","theme"],wx=function(){};function rCe(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function aCe(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var s=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(rCe(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var Ex=function(t){return mCe(t)?t.filter(Boolean):_m(t)==="object"&&t!==null?[t]:[]},hK=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=uu(t,nCe);return nr({},n)},ms=function(t,n,r){var a=t.cx,s=t.getStyles,i=t.getClassNames,l=t.className;return{css:s(n,t),className:a(r??{},i(n,t),l)}};function Qk(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function sCe(e){return Qk(e)?window.innerHeight:e.clientHeight}function pK(e){return Qk(e)?window.pageYOffset:e.scrollTop}function xx(e,t){if(Qk(e)){window.scrollTo(0,t);return}e.scrollTop=t}function iCe(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var a=e;a=a.parentElement;)if(t=getComputedStyle(a),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return a;return document.documentElement}function oCe(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function b1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:wx,a=pK(e),s=t-a,i=10,l=0;function c(){l+=i;var u=oCe(l,a,s,n);xx(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function r6(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=t.offsetHeight/3;r.bottom+a>n.bottom?xx(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+a,e.scrollHeight)):r.top-a<n.top&&xx(e,Math.max(t.offsetTop-a,0))}function lCe(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function a6(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function cCe(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var gK=!1,uCe={get passive(){return gK=!0}},w1=typeof window<"u"?window:{};w1.addEventListener&&w1.removeEventListener&&(w1.addEventListener("p",wx,uCe),w1.removeEventListener("p",wx,!1));var dCe=gK;function fCe(e){return e!=null}function mCe(e){return Array.isArray(e)}function O0(e,t,n){return e?t:n}var hCe=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];var s=Object.entries(t).filter(function(i){var l=qu(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=qu(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},pCe=["children","innerProps"],gCe=["children","innerProps"];function vCe(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,a=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=iCe(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,m=n.getBoundingClientRect(),h=m.bottom,g=m.height,v=m.top,y=n.offsetParent.getBoundingClientRect(),b=y.top,E=i?window.innerHeight:sCe(c),w=pK(c),x=parseInt(getComputedStyle(n).marginBottom,10),S=parseInt(getComputedStyle(n).marginTop,10),N=b-S,k=E-v,C=N+w,A=f-w-v,O=h-E+w+x,T=w+v-S,M=160;switch(a){case"auto":case"bottom":if(k>=g)return{placement:"bottom",maxHeight:t};if(A>=g&&!i)return s&&b1(c,O,M),{placement:"bottom",maxHeight:t};if(!i&&A>=r||i&&k>=r){s&&b1(c,O,M);var L=i?k-x:A-x;return{placement:"bottom",maxHeight:L}}if(a==="auto"||i){var D=t,j=i?N:C;return j>=r&&(D=Math.min(j-x-l,t)),{placement:"top",maxHeight:D}}if(a==="bottom")return s&&xx(c,O),{placement:"bottom",maxHeight:t};break;case"top":if(N>=g)return{placement:"top",maxHeight:t};if(C>=g&&!i)return s&&b1(c,T,M),{placement:"top",maxHeight:t};if(!i&&C>=r||i&&N>=r){var H=t;return(!i&&C>=r||i&&N>=r)&&(H=i?N-S:C-S),s&&b1(c,T,M),{placement:"top",maxHeight:H}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return u}function yCe(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var vK=function(t){return t==="auto"?"bottom":t},bCe=function(t,n){var r,a=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return nr((r={label:"menu"},I0(r,yCe(a),"100%"),I0(r,"position","absolute"),I0(r,"width","100%"),I0(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},yK=p.createContext(null),wCe=function(t){var n=t.children,r=t.minMenuHeight,a=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=p.useContext(yK)||{},d=u.setPortalPlacement,f=p.useRef(null),m=p.useState(a),h=qu(m,2),g=h[0],v=h[1],y=p.useState(null),b=qu(y,2),E=b[0],w=b[1],x=c.spacing.controlHeight;return KT(function(){var S=f.current;if(S){var N=i==="fixed",k=l&&!N,C=vCe({maxHeight:a,menuEl:S,minHeight:r,placement:s,shouldScroll:k,isFixedPosition:N,controlHeight:x});v(C.maxHeight),w(C.placement),d==null||d(C.placement)}},[a,s,i,l,r,d,x]),n({ref:f,placerProps:nr(nr({},t),{},{placement:E||vK(s),maxHeight:g})})},ECe=function(t){var n=t.children,r=t.innerRef,a=t.innerProps;return sr("div",lr({},ms(t,"menu",{menu:!0}),{ref:r},a),n)},xCe=ECe,_Ce=function(t,n){var r=t.maxHeight,a=t.theme.spacing.baseUnit;return nr({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:a,paddingTop:a})}
1242,kCe=function(t){var n=t.children,r=t.innerProps,a=t.innerRef,s=t.isMulti;return sr("div",lr({},ms(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:a},r),n)},bK=function(t,n){var r=t.theme,a=r.spacing.baseUnit,s=r.colors;return nr({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(a*2,"px ").concat(a*3,"px")})},SCe=bK,CCe=bK,NCe=function(t){var n=t.children,r=n===void 0?"No options":n,a=t.innerProps,s=uu(t,pCe);return sr("div",lr({},ms(nr(nr({},s),{},{children:r,innerProps:a}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),a),r)},RCe=function(t){var n=t.children,r=n===void 0?"Loading...":n,a=t.innerProps,s=uu(t,gCe);return sr("div",lr({},ms(nr(nr({},s),{},{children:r,innerProps:a}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),a),r)},TCe=function(t){var n=t.rect,r=t.offset,a=t.position;return{left:n.left,position:a,top:r,width:n.width,zIndex:1}},ACe=function(t){var n=t.appendTo,r=t.children,a=t.controlElement,s=t.innerProps,i=t.menuPlacement,l=t.menuPosition,c=p.useRef(null),u=p.useRef(null),d=p.useState(vK(i)),f=qu(d,2),m=f[0],h=f[1],g=p.useMemo(function(){return{setPortalPlacement:h}},[]),v=p.useState(null),y=qu(v,2),b=y[0],E=y[1],w=p.useCallback(function(){if(a){var k=lCe(a),C=l==="fixed"?0:window.pageYOffset,A=k[m]+C;(A!==(b==null?void 0:b.offset)||k.left!==(b==null?void 0:b.rect.left)||k.width!==(b==null?void 0:b.rect.width))&&E({offset:A,rect:k})}},[a,l,m,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);KT(function(){w()},[w]);var x=p.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),a&&c.current&&(u.current=tCe(a,c.current,w,{elementResize:"ResizeObserver"in window}))},[a,w]);KT(function(){x()},[x]);var S=p.useCallback(function(k){c.current=k,x()},[x]);if(!n&&l!=="fixed"||!b)return null;var N=sr("div",lr({ref:S},ms(nr(nr({},t),{},{offset:b.offset,position:l,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),r);return sr(yK.Provider,{value:g},n?kl.createPortal(N,n):N)},ICe=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},OCe=function(t){var n=t.children,r=t.innerProps,a=t.isDisabled,s=t.isRtl;return sr("div",lr({},ms(t,"container",{"--is-disabled":a,"--is-rtl":s}),r),n)},MCe=function(t,n){var r=t.theme.spacing,a=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return nr({alignItems:"center",display:a&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},PCe=function(t){var n=t.children,r=t.innerProps,a=t.isMulti,s=t.hasValue;return sr("div",lr({},ms(t,"valueContainer",{"value-container":!0,"value-container--is-multi":a,"value-container--has-value":s}),r),n)},DCe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},LCe=function(t){var n=t.children,r=t.innerProps;return sr("div",lr({},ms(t,"indicatorsContainer",{indicators:!0}),r),n)},s6,$Ce=["size"],FCe=["innerProps","isRtl","size"],zCe={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},wK=function(t){var n=t.size,r=uu(t,$Ce);return sr("svg",lr({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:zCe},r))},KD=function(t){return sr(wK,lr({size:20},t),sr("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},EK=function(t){return sr(wK,lr({size:20},t),sr("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},xK=function(t,n){var r=t.isFocused,a=t.theme,s=a.spacing.baseUnit,i=a.colors;
1242return nr({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},HCe=xK,VCe=function(t){var n=t.children,r=t.innerProps;return sr("div",lr({},ms(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||sr(EK,null))},UCe=xK,BCe=function(t){var n=t.children,r=t.innerProps;return sr("div",lr({},ms(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||sr(KD,null))},jCe=function(t,n){var r=t.isDisabled,a=t.theme,s=a.spacing.baseUnit,i=a.colors;return nr({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},WCe=function(t){var n=t.innerProps;return sr("span",lr({},n,ms(t,"indicatorSeparator",{"indicator-separator":!0})))},GCe=USe(s6||(s6=BSe([` 1243 0%, 80%, 100% { opacity: 0; } 1244 40% { opacity: 1; } 1245`]))),qCe=function(t,n){var r=t.isFocused,a=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return nr({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:a,lineHeight:1,marginRight:a,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:l*2})},l2=function(t){var n=t.delay,r=t.offset;return sr("span",{css:WD({animation:"".concat(GCe," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},YCe=function(t){var n=t.innerProps,r=t.isRtl,a=t.size,s=a===void 0?4:a,i=uu(t,FCe);return sr("div",lr({},ms(nr(nr({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),sr(l2,{delay:0,offset:r}),sr(l2,{delay:160,offset:!0}),sr(l2,{delay:320,offset:!r}))},KCe=function(t,n){var r=t.isDisabled,a=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return nr({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:a?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:a?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:a?i.primary:i.neutral30}})},ZCe=function(t){var n=t.children,r=t.isDisabled,a=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return sr("div",lr({ref:s},ms(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":a,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},XCe=ZCe,QCe=["data"],JCe=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},e2e=function(t){var n=t.children,r=t.cx,a=t.getStyles,s=t.getClassNames,i=t.Heading,l=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return sr("div",lr({},ms(t,"group",{group:!0}),c),sr(i,lr({},l,{selectProps:f,theme:d,getStyles:a,getClassNames:s,cx:r}),u),sr("div",null,n))},t2e=function(t,n){var r=t.theme,a=r.colors,s=r.spacing;return nr({label:"group",cursor:"default",display:"block"},n?{}:{color:a.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},n2e=function(t){var n=hK(t);n.data;var r=uu(n,QCe);return sr("div",lr({},ms(t,"groupHeading",{"group-heading":!0}),r))},r2e=e2e,a2e=["innerRef","isDisabled","isHidden","inputClassName"],s2e=function(t,n){var r=t.isDisabled,a=t.value,s=t.theme,i=s.spacing,l=s.colors;return nr(nr({visibility:r?"hidden":"visible",transform:a?"translateZ(0)":""},i2e),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},_K={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},i2e={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":nr({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},_K)},o2e=function(t){return nr({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},_K)},l2e=function(t){var n=t.cx,r=t.value,a=hK(t),s=a.innerRef,i=a.isDisabled,l=a.isHidden,c=a.inputClassName,u=uu(a,a2e);return sr("div",lr({},ms(t,"input",{"input-container":!0}),{"data-value":r||""}),sr("input",lr({className:n({input:!0},c),ref:s,style:o2e(l),disabled:i},u)))},c2e=l2e,u2e=function(t,n){var r=t.theme,a=r.spacing,s=r.borderRadius,i=r.colors;return nr({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:a.baseUnit/2})},d2e=function(t,n){var r=t.theme,a=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return nr({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:a/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},f2e=function(t,n){var r=t.theme,a=r.spacing,s=r.borderRadius,i=r.colors,l=t.is
1245Focused;return nr({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:a.baseUnit,paddingRight:a.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},kK=function(t){var n=t.children,r=t.innerProps;return sr("div",r,n)},m2e=kK,h2e=kK;function p2e(e){var t=e.children,n=e.innerProps;return sr("div",lr({role:"button"},n),t||sr(KD,{size:14}))}var g2e=function(t){var n=t.children,r=t.components,a=t.data,s=t.innerProps,i=t.isDisabled,l=t.removeProps,c=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return sr(u,{data:a,innerProps:nr(nr({},ms(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},sr(d,{data:a,innerProps:nr({},ms(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),sr(f,{data:a,innerProps:nr(nr({},ms(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},v2e=g2e,y2e=function(t,n){var r=t.isDisabled,a=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return nr({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:a?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},b2e=function(t){var n=t.children,r=t.isDisabled,a=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return sr("div",lr({},ms(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":a,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},w2e=b2e,E2e=function(t,n){var r=t.theme,a=r.spacing,s=r.colors;return nr({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},x2e=function(t){var n=t.children,r=t.innerProps;return sr("div",lr({},ms(t,"placeholder",{placeholder:!0}),r),n)},_2e=x2e,k2e=function(t,n){var r=t.isDisabled,a=t.theme,s=a.spacing,i=a.colors;return nr({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},S2e=function(t){var n=t.children,r=t.isDisabled,a=t.innerProps;return sr("div",lr({},ms(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),a),n)},C2e=S2e,ZD={ClearIndicator:BCe,Control:XCe,DropdownIndicator:VCe,DownChevron:EK,CrossIcon:KD,Group:r2e,GroupHeading:n2e,IndicatorsContainer:LCe,IndicatorSeparator:WCe,Input:c2e,LoadingIndicator:YCe,Menu:xCe,MenuList:kCe,MenuPortal:ACe,LoadingMessage:RCe,NoOptionsMessage:NCe,MultiValue:v2e,MultiValueContainer:m2e,MultiValueLabel:h2e,MultiValueRemove:p2e,Option:w2e,Placeholder:_2e,SelectContainer:OCe,SingleValue:C2e,ValueContainer:PCe},N2e=function(t){return nr(nr({},ZD),t.components)},i6=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function R2e(e,t){return!!(e===t||i6(e)&&i6(t))}function T2e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;
vendor: 5,562 bytes, line 1245
1245n++)if(!R2e(e[n],t[n]))return!1;return!0}function A2e(e,t){t===void 0&&(t=T2e);var n=null;function r(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(n&&n.lastThis===this&&t(a,n.lastArgs))return n.lastResult;var i=e.apply(this,a);return n={lastResult:i,lastArgs:a,lastThis:this},i}return r.clear=function(){n=null},r}var I2e={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},O2e=function(t){return sr("span",lr({css:I2e},t))},o6=O2e,M2e={guidance:function(t){var n=t.isSearchable,r=t.isMulti,a=t.tabSelectsValue,s=t.context,i=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(a?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,a=r===void 0?"":r,s=t.labels,i=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(a,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return i?"option ".concat(a," is disabled. Select another option."):"option ".concat(a,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,a=t.options,s=t.label,i=s===void 0?"":s,l=t.selectValue,c=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(v,y){return v&&v.length?"".concat(v.indexOf(y)+1," of ").concat(v.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var m=c?" disabled":"",h="".concat(u?" selected":"").concat(m);return"".concat(i).concat(h,", ").concat(f(a,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},P2e=function(t){var n=t.ariaSelection,r=t.focusedOption,a=t.focusedValue,s=t.focusableOptions,i=t.isFocused,l=t.selectValue,c=t.selectProps,u=t.id,d=t.isAppleDevice,f=c.ariaLiveMessages,m=c.getOptionLabel,h=c.inputValue,g=c.isMulti,v=c.isOptionDisabled,y=c.isSearchable,b=c.menuIsOpen,E=c.options,w=c.screenReaderStatus,x=c.tabSelectsValue,S=c.isLoading,N=c["aria-label"],k=c["aria-live"],C=p.useMemo(function(){return nr(nr({},M2e),f||{})},[f]),A=p.useMemo(function(){var j="";if(n&&C.onChange){var H=n.option,Y=n.options,z=n.removedValue,K=n.removedValues,ee=n.value,oe=function(be){return Array.isArray(be)?null:be},J=z||H||oe(ee),se=J?m(J):"",B=Y||K||void 0,U=B?B.map(m):[],$=nr({isDisabled:J&&v(J,l),label:se,labels:U},n);j=C.onChange($)}return j},[n,C,v,l,m]),O=p.useMemo(function(){var j="",H=r||a,Y=!!(r&&l&&l.includes(r));if(H&&C.onFocus){var z={focused:H,label:m(H),isDisabled:v(H,l),isSelected:Y,options:s,context:H===r?"menu":"value",selectValue:l,isAppleDevice:d};j=C.onFocus(z)}return j},[r,a,m,v,C,s,l,d]),T=p.useMemo(function(){var j="";if(b&&E.length&&!S&&C.onFilter){var H=w({count:s.length});j=C.onFilter({inputValue:h,resultsMessage:H})}return j},[s,h,b,C,E,w,S]),M=(n==null?void 0:n.action)==="initial-input-focus",L=p.useMemo(function(){var j="";if(C.guidance){var H=a?"value":b?"menu":"input";j=C.guidance({"aria-label":N,context:H,isDisabled:r&&v(r,l),isMulti:g,isSearchable:y,tabSelectsValue:x,isInitialFocus:M})}return j},[N,r,a,g,v,y,b,C,l,x,M]),D=sr(p.Fragment,null,sr("span",{id:"aria-selection"},A),sr("span",{id:"aria-focused"},O),sr("span",{id:"aria-results"},T),sr("span",{id:"aria-guidance"},L));return sr(p.Fragment,null,sr(o6,{id:u},M&&D),sr(o6,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&D))},D2e=P2e,ZT=[{base:"A",letters:"Aâ¶ï¼¡ÃÃÃẦẤẪẨÃÄÄáº°áº®áº´áº²È¦Ç ÃÇẢÃ
ǺÇÈÈẠẬẶá¸ÄȺⱯ"},{base:"AA",letters:"ê²"},{base:"AE",letters:"ÃǼǢ"},{base:"AO",letters:"ê´"},{base:"AU",letters:"ê¶"},{base:"AV",letters:"ê¸êº"},{base:"AY",letters:"ê¼"},{base:"B",letters:"Bâ·ï¼¢á¸á¸á¸ÉÆÆ"},{base:"C",letters:"Câ¸ï¼£ÄÄÄÄÃá¸ÆÈ»ê¾"},{base:"D",letters:"Dâ¹ï¼¤á¸Äá¸á¸á¸á¸ÄÆÆÆê¹"},{base:"DZ",letters:"DZÇ"},{base:"Dz",letters:"DzÇ
"},{base:"E",letters:"Eâºï¼¥ÃÃÃá»áº¾á»á»áº¼Äá¸á¸ÄÄÃẺÄÈÈẸá»È¨á¸Äá¸á¸ÆÆ"},{base:"F",letters:"Fâ»ï¼¦á¸Æê»"},{base:"G",letters:"Gâ¼ï¼§Ç´ÄḠÄÄ Ç¦Ä¢Ç¤Æê ê½ê¾"},{base:"H",letters:"Hâ½ï¼¨Ä¤á¸¢á¸¦ÈḤḨḪĦⱧⱵê"},{base:"I",letters:"Iâ¾ï¼©ÃÃÃĨĪĬİÃḮá»ÇÈÈá»Ä®á¸¬Æ"},{base:"J",letters:"Jâ¿ï¼ªÄ´É"},{base:"K",letters:"KâKḰǨḲĶḴÆâ±©êêêê¢"},{base:"L",letters:"LâLĿĹĽḶḸĻḼḺÅȽⱢⱠêêê"},{base:"LJ",letters:"Ç"},{base:"Lj",letters:"Ç"},{base:"M",letters:"Mâï¼á¸¾á¹á¹â±®Æ"},{base:"N",letters:"NâNǸÅÃá¹Åá¹Å
á¹á¹È Æêê¤"},{base:"NJ",letters:"Ç"},{base:"Nj",letters:"Ç"},{base:"O",letters:"OâOÃÃÃá»á»á»á»Ãá¹È¬á¹Åá¹á¹ÅȮȰÃȪá»ÅÇÈÈÆ á»á»á» á»á»¢á»á»ÇªÇ¬ÃÇ¾ÆÆêê"},{base:"OI",letters:"Æ¢"},{base:"OO",letters:"ê"},{base:"OU",letters:"È¢"},{base:"P",letters:"Pâ
ï¼°á¹á¹Æ¤â±£êêê"},{base:"Q",letters:"Qâï¼±êêÉ"}
vendor: 5,871 bytes, line 1245
1245,{base:"R",letters:"Râï¼²Åá¹ÅÈÈá¹á¹Åá¹ÉⱤêê¦ê"},{base:"S",letters:"Sâï¼³áºÅṤÅṠŠṦṢṨÈÅâ±¾ê¨ê"},{base:"T",letters:"TâTṪŤṬÈŢṰṮŦƬƮȾê"},{base:"TZ",letters:"ê¨"},{base:"U",letters:"Uâï¼µÃÃÃŨṸŪṺŬÃÇÇÇÇỦŮŰÇÈÈÆ¯á»ªá»¨á»®á»¬á»°á»¤á¹²Å²á¹¶á¹´É"},{base:"V",letters:"VâVṼṾƲêÉ
"},{base:"VY",letters:"ê "},{base:"W",letters:"Wâï¼·áºáºÅ´áºáºáºâ±²"},{base:"X",letters:"XâXáºáº"},{base:"Y",letters:"YâYỲÃŶỸȲáºÅ¸á»¶á»´Æ³ÉỾ"},{base:"Z",letters:"ZâZŹáºÅ»Å½áºáºÆµÈ¤â±¿â±«ê¢"},{base:"a",letters:"aâï½áºÃ áâầấẫẩãÄÄằắẵẳȧǡäÇảåǻÇÈÈạáºáº·á¸Ä
â±¥É"},{base:"aa",letters:"ê³"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"êµ"},{base:"au",letters:"ê·"},{base:"av",letters:"ê¹ê»"},{base:"ay",letters:"ê½"},{base:"b",letters:"bâï½á¸á¸
á¸ÆÆÉ"},{base:"c",letters:"câï½ÄÄÄÄÃ§á¸ÆÈ¼ê¿â"},{base:"d",letters:"dâï½á¸Äá¸á¸á¸á¸ÄÆÉÉêº"},{base:"dz",letters:"dzÇ"},{base:"e",letters:"eâï½
èéêá»áº¿á»
á»áº½Äá¸á¸ÄÄëẻÄÈ
Èẹá»È©á¸Äá¸á¸ÉÉÇ"},{base:"f",letters:"fâï½á¸Æê¼"},{base:"g",letters:"gâï½ÇµÄḡÄÄ¡Ç§Ä£Ç¥É ê¡áµ¹ê¿"},{base:"h",letters:"hâï½Ä¥á¸£á¸§ÈḥḩḫáºÄ§â±¨â±¶É¥"},{base:"hv",letters:"Æ"},{base:"i",letters:"iâï½Ã¬ÃîĩīÄïḯá»ÇÈÈá»Ä¯á¸É¨Ä±"},{base:"j",letters:"jâï½ÄµÇ°É"},{base:"k",letters:"kâï½á¸±Ç©á¸³Ä·á¸µÆâ±ªêêê
ê£"},{base:"l",letters:"lâï½ÅÄºÄ¾á¸·á¸¹Ä¼á¸½á¸»Å¿ÅÆÉ«â±¡êêê"},{base:"lj",letters:"Ç"},{base:"m",letters:"mâï½á¸¿á¹á¹É±É¯"},{base:"n",letters:"nâï½Ç¹Åñá¹
Åá¹Åá¹á¹ÆÉ²Åêê¥"},{base:"nj",letters:"Ç"},{base:"o",letters:"oâï½Ã²Ã³Ã´á»á»á»á»Ãµá¹Èá¹Åá¹á¹Åȯȱöȫá»ÅÇÈÈÆ¡á»á»á»¡á»á»£á»á»Ç«ÇøǿÉêêɵ"},{base:"oi",letters:"Æ£"},{base:"ou",letters:"È£"},{base:"oo",letters:"ê"},{base:"p",letters:"pâï½á¹á¹Æ¥áµ½êêê"},{base:"q",letters:"qâ ï½Éêê"},{base:"r",letters:"râ¡ï½Åá¹ÅÈÈá¹á¹Åá¹Éɽêê§ê"},{base:"s",letters:"sâ¢ï½ÃÅá¹¥ÅṡšṧṣṩÈÅÈ¿ê©ê
áº"},{base:"t",letters:"tâ£ï½á¹«áºÅ¥á¹ÈţṱṯŧÆÊⱦê"},{base:"tz",letters:"ê©"},{base:"u",letters:"uâ¤ï½Ã¹ÃºÃ»Å©á¹¹Å«á¹»ÅüÇÇÇÇủůűÇÈÈÆ°á»«á»©á»¯á»á»±á»¥á¹³Å³á¹·á¹µÊ"},{base:"v",letters:"vâ¥ï½á¹½á¹¿ÊêÊ"},{base:"vy",letters:"ê¡"},{base:"w",letters:"wâ¦ï½áºáºÅµáºáº
áºáºâ±³"},{base:"x",letters:"xâ§ï½áºáº"},{base:"y",letters:"yâ¨ï½á»³Ã½Å·á»¹È³áºÃ¿á»·áºá»µÆ´Éỿ"},{base:"z",letters:"zâ©ï½ÅºáºÅ¼Å¾áºáºÆ¶È¥Éⱬê£"}],L2e=new RegExp("["+ZT.map(function(e){return e.letters}).join("")+"]","g"),SK={};for(var c2=0;c2<ZT.length;c2++)for(var u2=ZT[c2],d2=0;d2<u2.letters.length;d2++)SK[u2.letters[d2]]=u2.base;var CK=function(t){return t.replace(L2e,function(n){return SK[n]})},$2e=A2e(CK),l6=function(t){return t.replace(/^\s+|\s+$/g,"")},F2e=function(t){return"".concat(t.label," ").concat(t.value)},z2e=function(t){return function(n,r){if(n.data.__isNew__)return!0;var a=nr({ignoreCase:!0,ignoreAccents:!0,stringify:F2e,trim:!0,matchFrom:"any"},t),s=a.ignoreCase,i=a.ignoreAccents,l=a.stringify,c=a.trim,u=a.matchFrom,d=c?l6(r):r,f=c?l6(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=$2e(d),f=CK(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},H2e=["innerRef"];function V2e(e){var t=e.innerRef,n=uu(e,H2e),r=hCe(n,"onExited","in","enter","exit","appear");return sr("input",lr({ref:t},r,{css:WD({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var U2e=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function B2e(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,a=e.onTopArrive,s=e.onTopLeave,i=p.useRef(!1),l=p.useRef(!1),c=p.useRef(0),u=p.useRef(null),d=p.useCallback(function(y,b){if(u.current!==null){var E=u.current,w=E.scrollTop,x=E.scrollHeight,S=E.clientHeight,N=u.current,k=b>0,C=x-S-w,A=!1;C>b&&i.current&&(r&&r(y),i.current=!1),k&&l.current&&(s&&s(y),l.current=!1),k&&b>C?(n&&!i.current&&n(y),N.scrollTop=x,A=!0,i.current=!0):!k&&-b>w&&(a&&!l.current&&a(y),N.scrollTop=0,A=!0,l.current=!0),A&&U2e(y)}},[n,r,a,s]),f=p.useCallback(function(y){d(y,y.deltaY)},[d]),m=p.useCallback(function(y){c.current=y.changedTouches[0].clientY},[]),h=p.useCallback(function(y){var b=c.current-y.changedTouches[0].clientY;d(y,b)},[d]),g=p.useCallback(function(y){if(y){var b=dCe?{passive:!1}:!1;y.addEventListener("wheel",f,b),y.addEventListener("touchstart",m,b),y.addEventListener("touchmove",h,b)}},[h,m,f]),v=p.useCallback(function(y){y&&(y.removeEventListener("wheel",f,!1),y.removeEventListener("touchstart",m,!1),y.removeEventListener("touchmove",h,!1))},[h,m,f]);return p.useEffect(function(){if(t){var y=u.current;return g(y),function(){v(y)}}},[t,g,v]),function(y){u.current=y}}var c6=["boxSizing","height","overflow","paddingRight","position"],u6={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function d6(e){e.preventDefault()}function f6(e){e.stopPropagation()}function m6(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function h6(){return"ontouchstart"in window||navigator.maxTouchPoints}var p6=!!(typeof window<"u"&&window.document&&window.document.createElement),d0=0,oh={capture:!1,passive:!1};function j2e(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,a=p.useRef({}),s=p.useRef(null),i=p.useCallback(function(c){if(p6){var u=document.body,d=u&&u.style;if(r&&c6.forEach(function(g){var v=d&&d[g];a.current[g]=v}),r&&d0<1){var f=parseInt(a.current.paddingRight,10)||0,m=document.body?document.body.clientWidth:0,h=window.innerWidth-m+f||0;
1245Object.keys(u6).forEach(function(g){var v=u6[g];d&&(d[g]=v)}),d&&(d.paddingRight="".concat(h,"px"))}u&&h6()&&(u.addEventListener("touchmove",d6,oh),c&&(c.addEventListener("touchstart",m6,oh),c.addEventListener("touchmove",f6,oh))),d0+=1}},[r]),l=p.useCallback(function(c){if(p6){var u=document.body,d=u&&u.style;d0=Math.max(d0-1,0),r&&d0<1&&c6.forEach(function(f){var m=a.current[f];d&&(d[f]=m)}),u&&h6()&&(u.removeEventListener("touchmove",d6,oh),c&&(c.removeEventListener("touchstart",m6,oh),c.removeEventListener("touchmove",f6,oh)))}},[r]);return p.useEffect(function(){if(t){var c=s.current;return i(c),function(){l(c)}}},[t,i,l]),function(c){s.current=c}}var W2e=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},G2e={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function q2e(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,a=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,c=e.onTopLeave,u=B2e({isEnabled:a,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=j2e({isEnabled:n}),f=function(h){u(h),d(h)};return sr(p.Fragment,null,n&&sr("div",{onClick:W2e,css:G2e}),t(f))}var Y2e={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},K2e=function(t){var n=t.name,r=t.onFocus;return sr("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:Y2e,value:"",onChange:function(){}})},Z2e=K2e;function XD(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}
1245function X2e(){return XD(/^iPhone/i)}function NK(){return XD(/^Mac/i)}function Q2e(){return XD(/^iPad/i)||NK()&&navigator.maxTouchPoints>1}function J2e(){return X2e()||Q2e()}function eNe(){return NK()||J2e()}var tNe=function(t){return t.label},RK=function(t){return t.label},TK=function(t){return t.value},nNe=function(t){return!!t.isDisabled},rNe={clearIndicator:UCe,container:ICe,control:KCe,dropdownIndicator:HCe,group:JCe,groupHeading:t2e,indicatorsContainer:DCe,indicatorSeparator:jCe,input:s2e,loadingIndicator:qCe,loadingMessage:CCe,menu:bCe,menuList:_Ce,menuPortal:TCe,multiValue:u2e,multiValueLabel:d2e,multiValueRemove:f2e,noOptionsMessage:SCe,option:y2e,placeholder:E2e,singleValue:k2e,valueContainer:MCe},aNe={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},sNe=4,AK=4,iNe=38,oNe=AK*2,lNe={baseUnit:AK,controlHeight:iNe,menuGutter:oNe},f2={borderRadius:sNe,colors:aNe,spacing:lNe},cNe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:a6(),captureMenuScroll:!a6(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:z2e(),formatGroupLabel:tNe,getOptionLabel:RK,getOptionValue:TK,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:nNe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!cCe(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function g6(e,t,n,r){var a=MK(e,t,n),s=PK(e,t,n),i=OK(e,t),l=_x(e,t);return{type:"option",data:t,isDisabled:a,isSelected:s,label:i,value:l,index:r}}function Mw(e,t){return e.options.map(function(n,r){if("options"in n){var a=n.options.map(function(i,l){return g6(e,i,t,l)}).filter(function(i){return y6(e,i)});return a.length>0?{type:"group",data:n,options:a,index:r}:void 0}var s=g6(e,n,t,r);return y6(e,s)?s:void 0}).filter(fCe)}function IK(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Qh(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function v6(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Qh(r.options.map(function(a){return{data:a.data,id:"".concat(t,"-").concat(r.index,"-").concat(a.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function uNe(e,t){return IK(Mw(e,t))}function y6(e,t){var n=e.inputValue,r=n===void 0?"":n,a=t.data,s=t.isSelected,i=t.label,l=t.value;return(!LK(e)||!s)&&DK(e,{label:i,value:l,data:a},r)}function dNe(e,t){var n=e.focusedValue,r=e.selectValue,a=r.indexOf(n);if(a>-1){var s=t.indexOf(n);if(s>-1)return n;if(a<t.length)return t[a]}return null}function fNe(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var m2=function(t,n){var r,a=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return a||null},OK=function(t,n){return t.getOptionLabel(n)},_x=function(t,n){return t.getOptionValue(n)};function MK(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function PK(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=_x(e,t);return n.some(function(a){return _x(e,a)===r})}function DK(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var LK=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},mNe=1,QD=function(e){Vke(n,e);var t=Wke(n);function n(r){var a;if(zke(this,n),a=t.call(this,r),a.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},a.blockOptionHover=!1,a.isComposing=!1,a.commonProps=void 0,a.initialTouchX=0,a.initialTouchY=0,a.openAfterFocus=!1,a.scrollToFocusedOptionOnUpdate=!1,a.userIsDragging=void 0,a.isAppleDevice=eNe(),a.controlRef=null,a.getControlRef=function(c){a.controlRef=c},a.focusedOptionRef=null,a.getFocusedOptionRef=function(c){a.focusedOptionRef=c},a.menuListRef=null,a.getMenuListRef=function(c){a.menuListRef=c},a.inputRef=null,a.getInputRef=function(c){a.inputRef=c},a.focus=a.focusInput,a.blur=a.blurInput,a.onChange=function(c,u){var d=a.props,f=d.onChange,m=d.name;u.name=m,a.ariaOnChange(c,u),f(c,u)},a.setValue=function(c,u,d){var f=a.props,m=f.closeMenuOnSelect,h=f.isMulti,g=f.inputValue;a.onInputChange("",{action:"set-value",prevInputValue:g}
1245),m&&(a.setState({inputIsHiddenAfterUpdate:!h}),a.onMenuClose()),a.setState({clearFocusValueOnUpdate:!0}),a.onChange(c,{action:u,option:d})},a.selectOption=function(c){var u=a.props,d=u.blurInputOnSelect,f=u.isMulti,m=u.name,h=a.state.selectValue,g=f&&a.isOptionSelected(c,h),v=a.isOptionDisabled(c,h);if(g){var y=a.getOptionValue(c);a.setValue(h.filter(function(b){return a.getOptionValue(b)!==y}),"deselect-option",c)}else if(!v)f?a.setValue([].concat(Qh(h),[c]),"select-option",c):a.setValue(c,"select-option");else{a.ariaOnChange(c,{action:"select-option",option:c,name:m});return}d&&a.blurInput()},a.removeValue=function(c){var u=a.props.isMulti,d=a.state.selectValue,f=a.getOptionValue(c),m=d.filter(function(g){return a.getOptionValue(g)!==f}),h=O0(u,m,m[0]||null);a.onChange(h,{action:"remove-value",removedValue:c}),a.focusInput()},a.clearValue=function(){var c=a.state.selectValue;a.onChange(O0(a.props.isMulti,[],null),{action:"clear",removedValues:c})},a.popValue=function(){var c=a.props.isMulti,u=a.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),m=O0(c,f,f[0]||null);a.onChange(m,{action:"pop-value",removedValue:d})},a.getFocusedOptionId=function(c){return m2(a.state.focusableOptionsWithIds,c)},a.getFocusableOptionsWithIds=function(){return v6(Mw(a.props,a.state.selectValue),a.getElementId("option"))},a.getValue=function(){return a.state.selectValue},a.cx=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return aCe.apply(void 0,[a.props.classNamePrefix].concat(u))},a.getOptionLabel=function(c){return OK(a.props,c)},a.getOptionValue=function(c){return _x(a.props,c)},a.getStyles=function(c,u){var d=a.props.unstyled,f=rNe[c](u,d);f.boxSizing="border-box";var m=a.props.styles[c];return m?m(f,u):f},a.getClassNames=function(c,u){var d,f;return(d=(f=a.props.classNames)[c])===null||d===void 0?void 0:d.call(f,u)},a.getElementId=function(c){return"".concat(a.state.instancePrefix,"-").concat(c)},a.getComponents=function(){return N2e(a.props)},a.buildCategorizedOptions=function(){return Mw(a.props,a.state.selectValue)},a.getCategorizedOptions=function(){return a.props.menuIsOpen?a.buildCategorizedOptions():[]},a.buildFocusableOptions=function(){return IK(a.buildCategorizedOptions())},a.getFocusableOptions=function(){return a.props.menuIsOpen?a.buildFocusableOptions():[]},a.ariaOnChange=function(c,u){a.setState({ariaSelection:nr({value:c},u)})},a.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),a.focusInput())},a.onMenuMouseMove=function(c){a.blockOptionHover=!1},a.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=a.props.openMenuOnClick;a.state.isFocused?a.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&a.onMenuClose():u&&a.openMenu("first"):(u&&(a.openAfterFocus=!0),a.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},a.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!a.props.isDisabled){var u=a.props,d=u.isMulti,f=u.menuIsOpen;a.focusInput(),f?(a.setState({inputIsHiddenAfterUpdate:!d}),a.onMenuClose()):a.openMenu("first"),c.preventDefault()}},a.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(a.clearValue(),c.preventDefault(),a.openAfterFocus=!1,c.type==="touchend"?a.focusInput():setTimeout(function(){return a.focusInput()}))},a.onScroll=function(c){typeof a.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&Qk(c.target)&&a.props.onMenuClose():typeof a.props.closeMenuOnScroll=="function"&&a.props.closeMenuOnScroll(c)&&a.props.onMenuClose()},a.onCompositionStart=function(){a.isComposing=!0},a.onCompositionEnd=function(){a.isComposing=!1},a.onTouchStart=function(c){var u=c.touches,d=u&&u.item(0);d&&(a.initialTouchX=d.clientX,a.initialTouchY=d.clientY,a.userIsDragging=!1)},a.onTouchMove=function(c){var u=c.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-a.initialTouchX),m=Math.abs(d.clientY-a.initialTouchY),h=5;a.userIsDragging=f>h||m>h}},a.onTouchEnd=function(c){a.userIsDragging||(a.controlRef&&!a.controlRef.contains(c.target)&&a.menuListRef&&!a.menuListRef.contains(c.target)&&a.blurInput(),a.initialTouchX=0,a.initialTouchY=0)},a.onControlTouchEnd=function(c){a.userIsDragging||a.onControlMouseDown(c)},a.onClearIndicatorTouchEnd=function(c){a.userIsDragging||a.onClearIndicatorMouseDown(c)},a.onDropdownIndicatorTouchEnd=function(c){a.userIsDragging||a.onDropdownIndicatorMouseDown(c)},a.handleInputChange=function(c){var u=a.props.inputValue,d=c.currentTarget.value;a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange(d,{action:"input-change",prevInputValue:u}),a.props.menuIsOpen||a.onMenuOpen()},a.onInputFocus=function(c){a.props.onFocus&&a.props.onFocus(c),a.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(a.openAfterFocus||a.props.openMenuOnFocus)&&a.openMenu("first"),a.openAfterFocus=!1},a.onInputBlur=function(c){var u=a.props.inputValue;if(a.menuListRef&&a.menuListRef.contains(document.activeElement)){a.inputRef.focus();return}a.props.onBlur&&a.props.onBlur(c),a.onInputChange("",{action:"input-blur",prevInputValue:u}),a.onMenuClose(),a.setState({focusedValue:null,isFocused:!1})},a.onOptionHover=function(c){if(!(a.blockOptionHover||a.state.focusedOption===c)){var u=a.getFocusableOptions(),d=u.indexOf(c);a.setState({focusedOption:c,focusedOptionId:d>-1?a.getFocusedOptionId(c):null})}},a.shouldHideSelectedOptions=function(){return LK(a.props)},a.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),a.focus()},a.onKeyDown=function(c){var u=a.props,d=u.isMulti,f=u.backspaceRemovesValue,m=u.escapeClearsValue,h=u.inputValue,g=u.isClearable,v=u.isDisabled,y=u.menuIsOpen,b=u.onKeyDown,E=u.tabSelectsValue,w=u.openMenuOnFocus,x=a.state,S=x.focusedOption,N=x.focusedValue,k=x.selectValue;if(!v&&!(typeof b=="function"&&(b(c),c.defaultPrevented))){switch(a.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||h)return;a.focusValue("previous");break;case"ArrowRight":if(!d||h)return;a.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(N)a.removeValue(N);else{if(!f)return;d?a.popValue():g&&a.clearValue()}break;
vendor: 11,287 bytes, line 1245
1245case"Tab":if(a.isComposing||c.shiftKey||!y||!E||!S||w&&a.isOptionSelected(S,k))return;a.selectOption(S);break;case"Enter":if(c.keyCode===229)break;if(y){if(!S||a.isComposing)return;a.selectOption(S);break}return;case"Escape":y?(a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange("",{action:"menu-close",prevInputValue:h}),a.onMenuClose()):g&&m&&a.clearValue();break;case" ":if(h)return;if(!y){a.openMenu("first");break}if(!S)return;a.selectOption(S);break;case"ArrowUp":y?a.focusOption("up"):a.openMenu("last");break;case"ArrowDown":y?a.focusOption("down"):a.openMenu("first");break;case"PageUp":if(!y)return;a.focusOption("pageup");break;case"PageDown":if(!y)return;a.focusOption("pagedown");break;case"Home":if(!y)return;a.focusOption("first");break;case"End":if(!y)return;a.focusOption("last");break;default:return}c.preventDefault()}},a.state.instancePrefix="react-select-"+(a.props.instanceId||++mNe),a.state.selectValue=Ex(r.value),r.menuIsOpen&&a.state.selectValue.length){var s=a.getFocusableOptionsWithIds(),i=a.buildFocusableOptions(),l=i.indexOf(a.state.selectValue[0]);a.state.focusableOptionsWithIds=s,a.state.focusedOption=i[l],a.state.focusedOptionId=m2(s,i[l])}return a}return Hke(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&r6(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(a){var s=this.props,i=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!i&&a.isDisabled||c&&l&&!a.menuIsOpen)&&this.focusInput(),c&&i&&!a.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!i&&a.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(r6(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(a,s){this.props.onInputChange(a,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(a){var s=this,i=this.state,l=i.selectValue,c=i.isFocused,u=this.buildFocusableOptions(),d=a==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(a){var s=this.state,i=s.selectValue,l=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=i.indexOf(l);l||(c=-1);var u=i.length-1,d=-1;if(i.length){switch(a){case"previous":c===0?d=0:c===-1?d=u:d=c-1;break;case"next":c>-1&&c<u&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:i[d]})}}}},{key:"focusOption",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var c=0,u=l.indexOf(i);i||(u=-1),a==="up"?c=u>0?u-1:l.length-1:a==="down"?c=(u+1)%l.length:a==="pageup"?(c=u-s,c<0&&(c=0)):a==="pagedown"?(c=u+s,c>l.length-1&&(c=l.length-1)):a==="last"&&(c=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(f2):nr(nr({},f2),this.props.theme):f2}},{key:"getCommonProps",value:function(){var a=this.clearValue,s=this.cx,i=this.getStyles,l=this.getClassNames,c=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,m=f.isMulti,h=f.isRtl,g=f.options,v=this.hasValue();return{clearValue:a,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:v,isMulti:m,isRtl:h,options:g,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var a=this.state.selectValue;return a.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var a=this.props,s=a.isClearable,i=a.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(a,s){return MK(this.props,a,s)}},{key:"isOptionSelected",value:function(a,s){return PK(this.props,a,s)}},{key:"filterOption",value:function(a,s){return DK(this.props,a,s)}},{key:"formatOptionLabel",value:function(a,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(a,{context:s,inputValue:i,selectValue:l})}else return this.getOptionLabel(a)}},{key:"formatGroupLabel",value:function(a){return this.props.formatGroupLabel(a)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var a=this.props,s=a.isDisabled,i=a.isSearchable,l=a.inputId,c=a.inputValue,u=a.tabIndex,d=a.form,f=a.menuIsOpen,m=a.required,h=this.getComponents(),g=h.Input,v=this.state,y=v.inputIsHidden,b=v.ariaSelection,E=this.commonProps,w=l||this.getElementId("input"),x=nr(nr(nr({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":m,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?p.createElement(g,lr({},E,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:w,innerRef:this.getInputRef,isDisabled:s,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},x)):p.createElement(V2e,lr({id:w,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:wx,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:d,value:""},x))}},{key:"renderPlaceholderOrValue",value:function(){var a=this,s=this.getComponents(),i=s.MultiValue,l=s.MultiValueContainer,c=s.MultiValueLabel,u=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,m=this.commonProps,h=this.props,g=h.controlShouldRenderValue,v=h.isDisabled,y=h.isMulti,b=h.inputValue,E=h.placeholder,w=this.state,x=w.selectValue,S=w.focusedValue,N=w.isFocused;if(!this.hasValue()||!g)return b?null:p.createElement(f,lr({},m,{key:"placeholder",isDisabled:v,isFocused:N,innerProps:{id:this.getElementId("placeholder")}}),E);if(y)return x.map(function(C,A){var O=C===S,T="".concat(a.getOptionLabel(C),"-").concat(a.getOptionValue(C));return p.createElement(i,lr({},m,{components:{Container:l,Label:c,Remove:u},isFocused:O,isDisabled:v,key:T,index:A,removeProps:{onClick:function(){return a.removeValue(C)},onTouchEnd:function(){return a.removeValue(C)},onMouseDown:function(L){L.preventDefault()}},data:C}),a.formatOptionLabel(C,"value"))});if(b)return null;var k=x[0];return p.createElement(d,lr({},m,{data:k,isDisabled:v}),this.formatOptionLabel(k,"value"))}},{key:"renderClearIndicator",value:function(){var a=this.getComponents(),s=a.ClearIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(s,lr({},i,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var a=this.getComponents(),s=a.LoadingIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!s||!u)return null;var f={"aria-hidden":"true"};return p.createElement(s,lr({},i,{innerProps:f,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var a=this.getComponents(),s=a.DropdownIndicator,i=a.IndicatorSeparator;if(!s||!i)return null;var l=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return p.createElement(i,lr({},l,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var a=this.getComponents(),s=a.DropdownIndicator;if(!s)return null;var i=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p.createElement(s,lr({},i,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderMenu",value:function(){var a=this,s=this.getComponents(),i=s.Group,l=s.GroupHeading,c=s.Menu,u=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,m=s.NoOptionsMessage,h=s.Option,g=this.commonProps,v=this.state.focusedOption,y=this.props,b=y.captureMenuScroll,E=y.inputValue,w=y.isLoading,x=y.loadingMessage,S=y.minMenuHeight,N=y.maxMenuHeight,k=y.menuIsOpen,C=y.menuPlacement,A=y.menuPosition,O=y.menuPortalTarget,T=y.menuShouldBlockScroll,M=y.menuShouldScrollIntoView,L=y.noOptionsMessage,D=y.onMenuScrollToTop,j=y.onMenuScrollToBottom;if(!k)return null;var H=function(se,B){var U=se.type,$=se.data,ce=se.isDisabled,be=se.isSelected,ue=se.label,Ie=se.value,Ae=v===$,he=ce?void 0:function(){return a.onOptionHover($)},_e=ce?void 0:function(){return a.selectOption($)},ie="".concat(a.getElementId("option"),"-").concat(B),Ue={id:ie,onClick:_e,onMouseMove:he,onMouseOver:he,tabIndex:-1,role:"option","aria-selected":a.isAppleDevice?void 0:be};return p.createElement(h,lr({},g,{innerProps:Ue,data:$,isDisabled:ce,isSelected:be,key:ie,label:ue,type:U,value:
1245Ie,isFocused:Ae,innerRef:Ae?a.getFocusedOptionRef:void 0}),a.formatOptionLabel(se.data,"menu"))},Y;if(this.hasOptions())Y=this.getCategorizedOptions().map(function(J){if(J.type==="group"){var se=J.data,B=J.options,U=J.index,$="".concat(a.getElementId("group"),"-").concat(U),ce="".concat($,"-heading");return p.createElement(i,lr({},g,{key:$,data:se,options:B,Heading:l,headingProps:{id:ce,data:J.data},label:a.formatGroupLabel(J.data)}),J.options.map(function(be){return H(be,"".concat(U,"-").concat(be.index))}))}else if(J.type==="option")return H(J,"".concat(J.index))});else if(w){var z=x({inputValue:E});if(z===null)return null;Y=p.createElement(f,g,z)}else{var K=L({inputValue:E});if(K===null)return null;Y=p.createElement(m,g,K)}var ee={minMenuHeight:S,maxMenuHeight:N,menuPlacement:C,menuPosition:A,menuShouldScrollIntoView:M},oe=p.createElement(wCe,lr({},g,ee),function(J){var se=J.ref,B=J.placerProps,U=B.placement,$=B.maxHeight;return p.createElement(c,lr({},g,ee,{innerRef:se,innerProps:{onMouseDown:a.onMenuMouseDown,onMouseMove:a.onMenuMouseMove},isLoading:w,placement:U}),p.createElement(q2e,{captureEnabled:b,onTopArrive:D,onBottomArrive:j,lockEnabled:T},function(ce){return p.createElement(u,lr({},g,{innerRef:function(ue){a.getMenuListRef(ue),ce(ue)},innerProps:{role:"listbox","aria-multiselectable":g.isMulti,id:a.getElementId("listbox")},isLoading:w,maxHeight:$,focusedOption:v}),Y)}))});return O||A==="fixed"?p.createElement(d,lr({},g,{appendTo:O,controlElement:this.controlRef,menuPlacement:C,menuPosition:A}),oe):oe}},{key:"renderFormField",value:function(){var a=this,s=this.props,i=s.delimiter,l=s.isDisabled,c=s.isMulti,u=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return p.createElement(Z2e,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var m=f.map(function(v){return a.getOptionValue(v)}).join(i);return p.createElement("input",{name:u,type:"hidden",value:m})}else{var h=f.length>0?f.map(function(v,y){return p.createElement("input",{key:"i-".concat(y),name:u,type:"hidden",value:a.getOptionValue(v)})}):p.createElement("input",{name:u,type:"hidden",value:""});return p.createElement("div",null,h)}else{var g=f[0]?this.getOptionValue(f[0]):"";return p.createElement("input",{name:u,type:"hidden",value:g})}}},{key:"renderLiveRegion",value:function(){var a=this.commonProps,s=this.state,i=s.ariaSelection,l=s.focusedOption,c=s.focusedValue,u=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return p.createElement(D2e,lr({},a,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:c,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var a=this.getComponents(),s=a.Control,i=a.IndicatorsContainer,l=a.SelectContainer,c=a.ValueContainer,u=this.props,d=u.className,f=u.id,m=u.isDisabled,h=u.menuIsOpen,g=this.state.isFocused,v=this.commonProps=this.getCommonProps();return p.createElement(l,lr({},v,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:m,isFocused:g}),this.renderLiveRegion(),p.createElement(s,lr({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:m,isFocused:g,menuIsOpen:h}),p.createElement(c,lr({},v,{isDisabled:m}),this.renderPlaceholderOrValue(),this.renderInput()),p.createElement(i,lr({},v,{isDisabled:m}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(a,s){var i=s.prevProps,l=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,m=s.instancePrefix,h=a.options,g=a.value,v=a.menuIsOpen,y=a.inputValue,b=a.isMulti,E=Ex(g),w={};if(i&&(g!==i.value||h!==i.options||v!==i.menuIsOpen||y!==i.inputValue)){var x=v?uNe(a,E):[],S=v?v6(Mw(a,E),"".concat(m,"-option")):[],N=l?dNe(s,E):null,k=fNe(s,x),C=m2(S,k);w={selectValue:E,focusedOption:k,focusedOptionId:C,focusableOptionsWithIds:S,focusedValue:N,clearFocusValueOnUpdate:!1}}var A=c!=null&&a!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},O=u,T=d&&f;return d&&!T&&(O={value:O0(b,E,E[0]||null),options:E,action:"initial-input-focus"},T=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(O=null),nr(nr(nr({},w),A),{},{prevProps:a,ariaSelection:O,prevWasFocused:T})}}]),n}(p.Component);QD.defaultProps=cNe;var hNe=p.forwardRef(function(e,t){var n=XY(e);return p.createElement(QD,lr({ref:t},n))}),km=hNe,pNe=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],b6=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,a=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),i=String(r.getOptionLabel(n)).toLowerCase();return s===a||i===a},h2={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,a){return!(!t||n.some(function(s){return b6(t,s,a)})||r.some(function(s){return b6(t,s,a)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function gNe(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,a=r===void 0?"last":r,s=e.formatCreateLabel,i=s===void 0?h2.formatCreateLabel:s,l=e.isValidNewOption,c=l===void 0?h2.
1245isValidNewOption:l,u=e.getNewOptionData,d=u===void 0?h2.getNewOptionData:u,f=e.onCreateOption,m=e.options,h=m===void 0?[]:m,g=e.onChange,v=uu(e,pNe),y=v.getOptionValue,b=y===void 0?TK:y,E=v.getOptionLabel,w=E===void 0?RK:E,x=v.inputValue,S=v.isLoading,N=v.isMulti,k=v.value,C=v.name,A=p.useMemo(function(){return c(x,Ex(k),h,{getOptionValue:b,getOptionLabel:w})?d(x,i(x)):void 0},[i,d,w,b,x,c,h,k]),O=p.useMemo(function(){return(n||!S)&&A?a==="first"?[A].concat(Qh(h)):[].concat(Qh(h),[A]):h},[n,a,S,A,h]),T=p.useCallback(function(M,L){if(L.action!=="select-option")return g(M,L);var D=Array.isArray(M)?M:[M];if(D[D.length-1]===A){if(f)f(x);else{var j=d(x,x),H={action:"create-option",name:C,option:j};g(O0(N,[].concat(Qh(Ex(k)),[j]),j),H)}return}g(M,L)},[d,x,N,C,A,f,g,k]);return nr(nr({},v),{},{options:O,onChange:T})}var vNe=p.forwardRef(function(e,t){var n=XY(e),r=gNe(n);return p.createElement(QD,lr({ref:t},r))}),JD=vNe,XT={exports:{}},QT={exports:{}},JT={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function n(a){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},n(a)}function r(a){var s=typeof a=="string"||a instanceof String;if(!s){var i=n(a);throw a===null?i="null":i==="object"&&(i=a.constructor.name),new TypeError("Expected a string but received a ".concat(i))}}e.exports=t.default,e.exports.default=t.default})(JT,JT.exports);var qt=JT.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s),s=Date.parse(s),isNaN(s)?null:new Date(s)}e.exports=t.default,e.exports.default=t.default})(QT,QT.exports);var eL=QT.exports,eA={exports:{}},Tg={},Za={};Object.defineProperty(Za,"__esModule",{value:!0});Za.farsiLocales=Za.englishLocales=Za.dotDecimal=Za.decimal=Za.commaDecimal=Za.bengaliLocales=Za.arabicLocales=Za.alphanumeric=Za.alpha=void 0;var wo=Za.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÃÆÄİıÃÅÃ]+$/i,"bg-BG":/^[Ð-Я]+$/i,"cs-CZ":/^[A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ]+$/i,"da-DK":/^[A-ZÃÃÃ
]+$/i,"de-DE":/^[A-ZÃÃÃÃ]+$/i,"el-GR":/^[Î-Ï]+$/i,"es-ES":/^[A-ZÃÃÃÃÃÃÃ]+$/i,"fa-IR":/^[Ø§Ø¨Ù¾ØªØ«Ø¬ÚØØ®Ø¯Ø°Ø±Ø²ÚØ³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÚ©Ú¯ÙÙ
ÙÙÙÛ]+$/i,"fi-FI":/^[A-ZÃ
ÃÃ]+$/i,"fr-FR":/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß]+$/i,"it-IT":/^[A-ZÃÃÃÃÃÃÃÃ]+$/i,"ja-JP":/^[ã-ãã¡-ã¶ï½¦-ï¾ä¸-é¾ ã¼ã»ãã]+$/i,"nb-NO":/^[A-ZÃÃÃ
]+$/i,"nl-NL":/^[A-ZÃÃÃÃÃÃÃÃ]+$/i,"nn-NO":/^[A-ZÃÃÃ
]+$/i,"hu-HU":/^[A-ZÃÃÃÃÃÅÃÃŰ]+$/i,"pl-PL":/^[A-ZÄÄÄÅÅÅÃŻŹ]+$/i,"pt-PT":/^[A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ]+$/i,"ru-RU":/^[Ð-ЯÐ]+$/i,"kk-KZ":/^[Ð-ЯÐ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZÄÄÄŠŽ]+$/i,"sk-SK":/^[A-ZÃÄÄÃÃÅÊŤÃÃŽĹÅĽÃÃ]+$/i,"sr-RS@latin":/^[A-ZÄÄŽŠÄ]+$/i,"sr-RS":/^[Ð-ЯÐÐÐÐÐÐ]+$/i,"sv-SE":/^[A-ZÃ
ÃÃ]+$/i,"th-TH":/^[à¸-à¹\s]+$/i,"tr-TR":/^[A-ZÃÄİıÃÅÃ]+$/i,"uk-UA":/^[Ð-ЩЬЮЯÐIÐÒÑ]+$/i,"vi-VN":/^[A-ZÃÃẠẢÃÃẦẤẬẨẪÄẰẮẶẲẴÄÃÃẸẺẼÃá»áº¾á»á»á»ÃÃá»á»Ä¨ÃÃá»á»ÃÃá»á»á»á»á»Æ á»á»á»¢á»á» ÃÃỤỦŨƯỪỨỰỬỮỲÃỴỶỸ]+$/i,"ko-KR":/^[ã±-ã
ã
-ã
£ê°-í£]*$/,"ku-IQ":/^[Ø¦Ø§Ø¨Ù¾ØªØ¬ÚØØ®Ø¯Ø±ÚØ²ÚسشعغÙÚ¤ÙÚ©Ú¯ÙÚµÙ
ÙÙÛÚ¾ÛÛÛÙØ·Ø¤Ø«Ø¢Ø¥Ø£Ùضصةظذ]+$/i,ar:/^[Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°]+$/,he:/^[×-ת]+$/,fa:/^['Ø¢Ø§Ø¡Ø£Ø¤Ø¦Ø¨Ù¾ØªØ«Ø¬ÚØØ®Ø¯Ø°Ø±Ø²ÚØ³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÚ©Ú¯ÙÙ
ÙÙÙØ©Û']+$/i,bn:/^['à¦à¦à¦à¦à¦
à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦ ডঢণতথদধনপফবà¦à¦®à¦¯à¦°à¦²à¦¶à¦·à¦¸à¦¹à¦¼à¦½à¦¾à¦¿à§à§à§à§à§à§à§à§à§à§à§à§à§à§à§à§ ৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCÄD-GÄHĤIJÄ´K-PRSÅTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},Eo=Za.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÃÆÄİıÃÅÃ]+$/i,"bg-BG":/^[0-9Ð-Я]+$/i,"cs-CZ":/^[0-9A-ZÃÄÄÃÄÃÅÃÅŠŤÃŮÎ]+$/i,"da-DK":/^[0-9A-ZÃÃÃ
]+$/i,"de-DE":/^[0-9A-ZÃÃÃÃ]+$/i,"el-GR":/^[0-9Î-Ï]+$/i,"es-ES":/^[0-9A-ZÃÃÃÃÃÃÃ]+$/i,"fi-FI":/^[0-9A-ZÃ
ÃÃ]+$/i,"fr-FR":/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÅÃÃß]+$/i,"it-IT":/^[0-9A-ZÃÃÃÃÃÃÃÃ]+$/i,"ja-JP":/^[0-9ï¼-ï¼ã-ãã¡-ã¶ï½¦-ï¾ä¸-é¾ ã¼ã»ãã]+$/i,"hu-HU":/^[0-9A-ZÃÃÃÃÃÅÃÃŰ]+$/i,"nb-NO":/^[0-9A-ZÃÃÃ
]+$/i,"nl-NL":/^[0-9A-ZÃÃÃÃÃÃÃÃ]+$/i,"nn-NO":/^[0-9A-ZÃÃÃ
]+$/i,"pl-PL":/^[0-9A-ZÄÄÄÅÅÅÃŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ]+$/i,"ru-RU":/^[0-9Ð-ЯÐ]+$/i,"kk-KZ":/^[0-9Ð-ЯÐ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZÄÄÄŠŽ]+$/i,"sk-SK":/^[0-9A-ZÃÄÄÃÃÅÊŤÃÃŽĹÅĽÃÃ]+$/i,"sr-RS@latin":/^[0-9A-ZÄÄŽŠÄ]+$/i,"sr-RS":/^[0-9Ð-ЯÐÐÐÐÐÐ]+$/i,"sv-SE":/^[0-9A-ZÃ
ÃÃ]+$/i,"th-TH":/^[à¸-à¹\s]+$/i,"tr-TR":/^[0-9A-ZÃÄİıÃÅÃ]+$/i,"uk-UA":/^[0-9Ð-ЩЬЮЯÐIÐÒÑ]+$/i,"ko-KR":/^[0-9ã±-ã
ã
-ã
£ê°-í£]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9Ø¦Ø§Ø¨Ù¾ØªØ¬ÚØØ®Ø¯Ø±ÚØ²ÚسشعغÙÚ¤ÙÚ©Ú¯ÙÚµÙ
ÙÙÛÚ¾ÛÛÛÙØ·Ø¤Ø«Ø¢Ø¥Ø£Ùضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÃÃẠẢÃÃẦẤẬẨẪÄẰẮẶẲẴÄÃÃẸẺẼÃá»áº¾á»á»á»ÃÃá»á»Ä¨ÃÃá»á»ÃÃá»á»á»á»á»Æ á»á»á»¢á»á» ÃÃỤỦŨƯỪỨỰỬỮỲÃỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9Ø¡Ø¢Ø£Ø¤Ø¥Ø¦Ø§Ø¨Ø©ØªØ«Ø¬ØØ®Ø¯Ø°Ø±Ø²Ø³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÙÙÙ
ÙÙÙÙÙÙÙÙÙÙÙÙÙÙ°]+$/,he:/^[0-9×-ת]+$/,fa:/^['0-9Ø¢Ø§Ø¡Ø£Ø¤Ø¦Ø¨Ù¾ØªØ«Ø¬ÚØØ®Ø¯Ø°Ø±Ø²ÚØ³Ø´ØµØ¶Ø·Ø¸Ø¹ØºÙÙÚ©Ú¯ÙÙ
ÙÙÙØ©ÛÛ±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹Û°']+$/i,bn:/^['à¦à¦à¦à¦à¦
à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦à¦ ডঢণতথদধনপফবà¦à¦®à¦¯à¦°à¦²à¦¶à¦·à¦¸à¦¹à¦¼à¦½à¦¾à¦¿à§à§à§à§à§à§à§à§à§à§à§à§à§à§à§à§ ৡৢৣ০১২৩৪৫৬à§à§®à§¯à§°à§±à§²à§³à§´à§µà§¶à§·à§¸à§¹à§ºà§»']+$/,eo:/^[0-9ABCÄD-GÄHĤIJÄ´K-PRSÅTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},Ji=Za.decimal={"en-US":".",ar:"Ù«"},w6=Za.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(var E1,p2=0;p2<w6.length;p2++)E1="en-".concat(w6[p2]),wo[E1]=wo["en-US"],Eo[E1]=Eo["en-US"],Ji[E1]=Ji["en-US"];var E6=Za.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(var x1,g2=0;g2<E6.length;g2++)x1="ar-".concat(E6[g2]),wo[x1]=wo.ar,Eo[x1]=Eo.ar,Ji[x1]=Ji.ar;var x6=Za.farsiLocales=["IR","AF"];for(var v2,y2=0;y2<x6.length;y2++)v2="fa-".concat(x6[y2]),Eo[v2]=Eo.fa,Ji[v2]=Ji.ar;
1245var _6=Za.bengaliLocales=["BD","IN"];for(var _1,b2=0;b2<_6.length;b2++)_1="bn-".concat(_6[b2]),wo[_1]=wo.bn,Eo[_1]=Eo.bn,Ji[_1]=Ji["en-US"];var k6=Za.dotDecimal=["ar-EG","ar-LB","ar-LY"],S6=Za.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];for(var w2=0;w2<k6.length;w2++)Ji[k6[w2]]=Ji["en-US"];for(var E2=0;E2<S6.length;E2++)Ji[S6[E2]]=",";wo["fr-CA"]=wo["fr-FR"];Eo["fr-CA"]=Eo["fr-FR"];wo["pt-BR"]=wo["pt-PT"];Eo["pt-BR"]=Eo["pt-PT"];Ji["pt-BR"]=Ji["pt-PT"];wo["pl-Pl"]=wo["pl-PL"];Eo["pl-Pl"]=Eo["pl-PL"];Ji["pl-Pl"]=Ji["pl-PL"];wo["fa-AF"]=wo.fa;Object.defineProperty(Tg,"__esModule",{value:!0});Tg.default=wNe;Tg.locales=void 0;var yNe=bNe(qt),$K=Za;function bNe(e){return e&&e.__esModule?e:{default:e}}function wNe(e,t){(0,yNe.default)(e),t=t||{};var n=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(t.locale?$K.decimal[t.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(e===""||e==="."||e===","||e==="-"||e==="+")return!1;var r=parseFloat(e.replace(",","."));return n.test(e)&&(!t.hasOwnProperty("min")||r>=t.min)&&(!t.hasOwnProperty("max")||r<=t.max)&&(!t.hasOwnProperty("lt")||r<t.lt)&&(!t.hasOwnProperty("gt")||r>t.gt)}Tg.locales=Object.keys($K.decimal);(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(Tg);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s)?parseFloat(s):NaN}e.exports=t.default,e.exports.default=t.default})(eA,eA.exports);var FK=eA.exports,tA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){return(0,n.default)(s),parseInt(s,i||10)}e.exports=t.default,e.exports.default=t.default})(tA,tA.exports);var ENe=tA.exports,nA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){return(0,n.default)(s),i?s==="1"||/^true$/i.test(s):s!=="0"&&!/^false$/i.test(s)&&s!==""}e.exports=t.default,e.exports.default=t.default})(nA,nA.exports);var xNe=nA.exports,rA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){return(0,n.default)(s),s===i}e.exports=t.default,e.exports.default=t.default})(rA,rA.exports);var _Ne=rA.exports,aA={exports:{}},sA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function n(a){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},n(a)}function r(a){return n(a)==="object"&&a!==null?typeof a.toString=="function"?a=a.toString():a="[object Object]":(a===null||typeof a>"u"||isNaN(a)&&!a.length)&&(a=""),String(a)}
1245e.exports=t.default,e.exports.default=t.default})(sA,sA.exports);var zK=sA.exports,iA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;for(var s in a)typeof r[s]>"u"&&(r[s]=a[s]);return r}e.exports=t.default,e.exports.default=t.default})(iA,iA.exports);var eo=iA.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=s(qt),r=s(zK),a=s(eo);function s(c){return c&&c.__esModule?c:{default:c}}var i={ignoreCase:!1,minOccurrences:1};function l(c,u,d){return(0,n.default)(c),d=(0,a.default)(d,i),d.ignoreCase?c.toLowerCase().split((0,r.default)(u).toLowerCase()).length>d.minOccurrences:c.split((0,r.default)(u)).length>d.minOccurrences}e.exports=t.default,e.exports.default=t.default})(aA,aA.exports);var kNe=aA.exports,oA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i,l){return(0,n.default)(s),Object.prototype.toString.call(i)!=="[object RegExp]"&&(i=new RegExp(i,l)),!!s.match(i)}e.exports=t.default,e.exports.default=t.default})(oA,oA.exports);var SNe=oA.exports,lA={exports:{}},cA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}function a(i){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},a(i)}function s(i,l){(0,n.default)(i);var c,u;a(l)==="object"?(c=l.min||0,u=l.max):(c=arguments[1],u=arguments[2]);var d=encodeURI(i).split(/%..|./).length-1;return d>=c&&(typeof u>"u"||d<=u)}e.exports=t.default,e.exports.default=t.default})(cA,cA.exports);var HK=cA.exports,uA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=a(eo);function a(l){return l&&l.__esModule?l:{default:l}}var s={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function i(l,c){(0,n.default)(l),c=(0,r.default)(c,s),c.allow_trailing_dot&&l[l.length-1]==="."&&(l=l.substring(0,l.length-1)),c.allow_wildcard===!0&&l.indexOf("*.")===0&&(l=l.substring(2));var u=l.split("."),d=u[u.length-1];return c.require_tld&&(u.length<2||!c.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(d)||/\s/.test(d))||!c.allow_numeric_tld&&/^\d+$/.test(d)?!1:u.every(function(f){return!(f.length>63&&!c.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(f)||/[\uff01-\uff5e]/.test(f)||/^-|-$/.test(f)||!c.allow_underscores&&/_/.test(f))})}e.exports=t.default,e.exports.default=t.default})(uA,uA.exports);var tL=uA.exports,dA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=r(qt);function r(d){return d&&d.__esModule?d:{default:d}}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",s="(".concat(a,"[.]){3}").concat(a),i=new RegExp("^".concat(s,"$")),l="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(l,":){7}(?:").concat(l,"|:)|")+"(?:".concat(l,":){6}(?:").concat(s,"|:").concat(l,"|:)|")+"(?:".concat(l,":){5}(?::").concat(s,"|(:").concat(l,"){1,2}|:)|")+"(?:".concat(l,":){4}(?:(:").concat(l,"){0,1}:").concat(s,"|(:").concat(l,"){1,3}|:)|")+"(?:".concat(l,":){3}(?:(:").concat(l,"){0,2}:").concat(s,"|(:").concat(l,"){1,4}|:)|")+"(?:".concat(l,":){2}(?:(:").concat(l,"){0,3}:").concat(s,"|(:").concat(l,"){1,5}|:)|")+"(?:".concat(l,":){1}(?:(:").concat(l,"){0,4}:").concat(s,"|(:").concat(l,"){1,6}|:)|")+"(?::((?::".concat(l,"){0,5}:").concat(s,"|(?::").concat(l,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function u(d){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,n.default)(d),f=String(f),f?f==="4"?i.test(d):f==="6"?c.test(d):!1:u(d,4)||u(d,6)}e.exports=t.default,e.exports.default=t.default})(dA,dA.exports);var Jk=dA.exports;
1245(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var n=l(qt),r=l(HK),a=l(tL),s=l(Jk),i=l(eo);function l(E){return E&&E.__esModule?E:{default:E}}var c={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},u=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,d=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,f=/^[a-z\d]+$/,m=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,g=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,v=254;function y(E){var w=E.replace(/^"(.+)"$/,"$1");if(!w.trim())return!1;var x=/[\.";<>]/.test(w);if(x){if(w===E)return!1;var S=w.split('"').length===w.split('\\"').length;if(!S)return!1}return!0}function b(E,w){if((0,n.default)(E),w=(0,i.default)(w,c),w.require_display_name||w.allow_display_name){var x=E.match(u);if(x){var S=x[1];if(E=E.replace(S,"").replace(/(^<|>$)/g,""),S.endsWith(" ")&&(S=S.slice(0,-1)),!y(S))return!1}else if(w.require_display_name)return!1}if(!w.ignore_max_length&&E.length>v)return!1;var N=E.split("@"),k=N.pop(),C=k.toLowerCase();if(w.host_blacklist.includes(C)||w.host_whitelist.length>0&&!w.host_whitelist.includes(C))return!1;var A=N.join("@");if(w.domain_specific_validation&&(C==="gmail.com"||C==="googlemail.com")){A=A.toLowerCase();var O=A.split("+")[0];if(!(0,r.default)(O.replace(/\./g,""),{min:6,max:30}))return!1;for(var T=O.split("."),M=0;M<T.length;M++)if(!f.test(T[M]))return!1}if(w.ignore_max_length===!1&&(!(0,r.default)(A,{max:64})||!(0,r.default)(k,{max:254})))return!1;if(!(0,a.default)(k,{require_tld:w.require_tld,ignore_max_length:w.ignore_max_length,allow_underscores:w.allow_underscores})){if(!w.allow_ip_domain)return!1;if(!(0,s.default)(k)){if(!k.startsWith("[")||!k.endsWith("]"))return!1;var L=k.slice(1,-1);if(L.length===0||!(0,s.default)(L))return!1}}if(A[0]==='"')return A=A.slice(1,A.length-1),w.allow_utf8_local_part?g.test(A):m.test(A);for(var D=w.allow_utf8_local_part?h:d,j=A.split("."),H=0;H<j.length;H++)if(!D.test(j[H]))return!1;return!(w.blacklisted_chars&&A.search(new RegExp("[".concat(w.blacklisted_chars,"]+"),"g"))!==-1)}e.exports=t.default,e.exports.default=t.default})(lA,lA.exports);var VK=lA.exports,fA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var n=i(qt),r=i(tL),a=i(Jk),s=i(eo);function i(E){return E&&E.__esModule?E:{default:E}}function l(E,w){return m(E)||f(E,w)||u(E,w)||c()}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1246In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(E,w){if(E){if(typeof E=="string")return d(E,w);var x=Object.prototype.toString.call(E).slice(8,-1);if(x==="Object"&&E.constructor&&(x=E.constructor.name),x==="Map"||x==="Set")return Array.from(E);if(x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x))return d(E,w)}}function d(E,w){(w==null||w>E.length)&&(w=E.length);for(var x=0,S=new Array(w);x<w;x++)S[x]=E[x];return S}function f(E,w){var x=E==null?null:typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(x!=null){var S,N,k,C,A=[],O=!0,T=!1;try{if(k=(x=x.call(E)).next,w===0){if(Object(x)!==x)return;O=!1}else for(;!(O=(S=k.call(x)).done)&&(A.push(S.value),A.length!==w);O=!0);}catch(M){T=!0,N=M}finally{try{if(!O&&x.return!=null&&(C=x.return(),Object(C)!==C))return}finally{if(T)throw N}}return A}}function m(E){if(Array.isArray(E))return E}var h={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},g=/^\[([^\]]+)\](?::([0-9]+))?$/;function v(E){return Object.prototype.toString.call(E)==="[object RegExp]"}function y(E,w){for(var x=0;x<w.length;x++){var S=w[x];if(E===S||v(S)&&S.test(E))return!0}return!1}function b(E,w){if((0,n.default)(E),!E||/[\s<>]/.test(E)||E.indexOf("mailto:")===0||(w=(0,s.default)(w,h),w.val
1246idate_length&&E.length>=2083)||!w.allow_fragments&&E.includes("#")||!w.allow_query_components&&(E.includes("?")||E.includes("&")))return!1;var x,S,N,k,C,A,O,T;if(O=E.split("#"),E=O.shift(),O=E.split("?"),E=O.shift(),O=E.split("://"),O.length>1){if(x=O.shift().toLowerCase(),w.require_valid_protocol&&w.protocols.indexOf(x)===-1)return!1}else{if(w.require_protocol)return!1;if(E.slice(0,2)==="//"){if(!w.allow_protocol_relative_urls)return!1;O[0]=E.slice(2)}}if(E=O.join("://"),E==="")return!1;if(O=E.split("/"),E=O.shift(),E===""&&!w.require_host)return!0;if(O=E.split("@"),O.length>1){if(w.disallow_auth||O[0]===""||(S=O.shift(),S.indexOf(":")>=0&&S.split(":").length>2))return!1;var M=S.split(":"),L=l(M,2),D=L[0],j=L[1];if(D===""&&j==="")return!1}k=O.join("@"),A=null,T=null;var H=k.match(g);if(H?(N="",T=H[1],A=H[2]||null):(O=k.split(":"),N=O.shift(),O.length&&(A=O.join(":"))),A!==null&&A.length>0){if(C=parseInt(A,10),!/^[0-9]+$/.test(A)||C<=0||C>65535)return!1}else if(w.require_port)return!1;return w.host_whitelist?y(N,w.host_whitelist):N===""&&!w.require_host?!0:!(!(0,a.default)(N)&&!(0,r.default)(N,w)&&(!T||!(0,a.default)(T,6))||(N=N||T,w.host_blacklist&&y(N,w.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(fA,fA.exports);var CNe=fA.exports,mA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var n=r(qt);function r(f){return f&&f.__esModule?f:{default:f}}var a=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,s=/^([0-9a-fA-F]){12}$/,i=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/,l=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/,c=/^([0-9a-fA-F]){16}$/,u=/^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;function d(f,m){return(0,n.default)(f),m!=null&&m.eui&&(m.eui=String(m.eui)),m!=null&&m.no_colons||m!=null&&m.no_separators?m.eui==="48"?s.test(f):m.eui==="64"?c.test(f):s.test(f)||c.test(f):(m==null?void 0:m.eui)==="48"?a.test(f)||i.test(f):(m==null?void 0:m.eui)==="64"?l.test(f)||u.test(f):d(f,{eui:"48"})||d(f,{eui:"64"})}e.exports=t.default,e.exports.default=t.default})(mA,mA.exports);var NNe=mA.exports,hA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=a(qt),r=a(Jk);function a(u){return u&&u.__esModule?u:{default:u}}var s=/^\d{1,3}$/,i=32,l=128;function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(0,n.default)(u);var f=u.split("/");if(f.length!==2||!s.test(f[1])||f[1].length>1&&f[1].startsWith("0"))return!1;var m=(0,r.default)(f[0],d);if(!m)return!1;var h=null;switch(String(d)){case"4":h=i;break;case"6":h=l;break;default:h=(0,r.default)(f[0],"6")?l:i}return f[1]<=h&&f[1]>=0}e.exports=t.default,e.exports.default=t.default})(hA,hA.exports);var RNe=hA.exports,pA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var n=r(eo);function r(v){return v&&v.__esModule?v:{default:v}}function a(v,y){return l(v)||i(v,y)||u(v,y)||s()}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1247In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i(v,y){var b=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(b!=null){var E,w,x,S,N=[],k=!0,C=!1;try{if(x=(b=b.call(v)).next,y===0){if(Object(b)!==b)return;k=!1}else for(;!(k=(E=x.call(b)).done)&&(N.push(E.value),N.length!==y);k=!0);}catch(A){C=!0,w=A}finally{try{if(!k&&b.return!=null&&(S=b.return(),Object(S)!==S))return}finally{if(C)throw w}}return N}}function l(v){if(Array.isArray(v))return v}function c(v,y){var b=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!b){if(Array.isArray(v)||(b=u(v))||y&&v&&typeof v.length=="number"){b&&(v=b);var E=0,w=function(){};return{s:w,n:function(){return E>=v.length?{done:!0}:{done:!1,value:v[E++]}},e:function(C){throw C},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 1248In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,S=!1,N;return{s:function(){b=b.call(v)},n:function(){var C=b.next();return x=C.done,C},e:function(C){S=!0,N=C},f:function(){try{!x&&b.return!=null&&b.return()}finally{if(S)throw N}}}}function u(v,y){if(v){if(typeof v=="string")return d(v,y);var b=Object.prototype.toString.call(v).slice(8,-1);if(b==="Object"&&v.constructor&&(b=v.constructor.name),b==="Map"||b==="Set")return Array.from(v);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return d(v,y)}}function d(v,y){(y==null||y>v.length)&&(y=v.length);for(var b=0,E=new Array(y);b<y;b++)E[b]=v[b];return E}var f={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};function m(v){return/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(v)}function h(v,y){for(var b=[],E=Math.min(v.length,y.length),w=0;w<E;w++)b.push([v[w],y[w]]);return b}function g(v,y){if(typeof y=="string"?y=(0,n.default)({format:y},f):y=(0,n.default)(y,f),typeof v=="string"&&m(y.format)){var b=y.delimiters.find(function(j){return y.format.indexOf(j)!==-1}),E=y.strictMode?b:y.delimiters.find(function(j){return v.indexOf(j)!==-1}),w=h(v.split(E),y.format.toLowerCase().split(b)),x={},S=c(w),N;try{for(S.s();!(N=S.n()).done;){var k=a(N.value,2),C=k[0],A=k[1];if(C.length!==A.length)return!1;x[A.charAt(0)]=C}}catch(j){S.e(j)}finally{S.f()}var O=x.y;if(O.startsWith("-"))return!1;if(x.y.length===2){var T=parseInt(x.y,10);if(isNaN(T))return!1;var M=new Date().getFullYear()%100;T<M?O="20".concat(x.y):O="19".concat(x.y)}var L=x.m;x.m.length===1&&(L="0".concat(x.m));var D=x.d;return x.d.length===1&&(D="0".concat(x.d)),new Date("".concat(O,"-").concat(L,"-").concat(D,"T00:00:00.000Z")).getUTCDate()===+x.d}return y.strictMode?!1:Object.prototype.toString.call(v)==="[object Date]"&&isFinite(v)}e.exports=t.default,e.exports.default=t.default})(pA,pA.exports);var UK=pA.exports,gA={exports:{}};
1248(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(eo);function r(l){return l&&l.__esModule?l:{default:l}}var a={hourFormat:"hour24",mode:"default"},s={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/}};function i(l,c){return c=(0,n.default)(c,a),typeof l!="string"?!1:s[c.hourFormat][c.mode].test(l)}e.exports=t.default,e.exports.default=t.default})(gA,gA.exports);var TNe=gA.exports,vA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=r(qt);function r(c){return c&&c.__esModule?c:{default:c}}var a={loose:!1},s=["true","false","1","0"],i=[].concat(s,["yes","no"]);function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a;return(0,n.default)(c),u.loose?i.includes(c.toLowerCase()):s.includes(c)}e.exports=t.default,e.exports.default=t.default})(vA,vA.exports);var ANe=vA.exports,yA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=E;var n=r(qt);function r(w){return w&&w.__esModule?w:{default:w}}var a="([A-Za-z]{3}(-[A-Za-z]{3}){0,2})",s="(([a-zA-Z]{2,3}(-".concat(a,")?)|([a-zA-Z]{5,8}))"),i="([A-Za-z]{4})",l="([A-Za-z]{2}|\\d{3})",c="([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))",u="(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])",d="(".concat(u,"(-[A-Za-z0-9]{2,8})+)"),f="(x(-[A-Za-z0-9]{1,8})+)",m="((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))",h="((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))",g="(".concat(m,"|").concat(h,")"),v="(-|_)",y="".concat(s,"(").concat(v).concat(i,")?(").concat(v).concat(l,")?(").concat(v).concat(c,")*(").concat(v).concat(d,")*(").concat(v).concat(f,")?"),b=new RegExp("(^".concat(f,"$)|(^").concat(g,"$)|(^").concat(y,"$)"));function E(w){return(0,n.default)(w),b.test(w)}e.exports=t.default,e.exports.default=t.default})(yA,yA.exports);var INe=yA.exports,bA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;function s(i){if((0,n.default)(i),!a.test(i))return!1;for(var l=0,c=0;c<i.length;c++)c%3===0?l+=i[c]*3:c%3===1?l+=i[c]*7:l+=i[c]*1;return l%10===0}e.exports=t.default,e.exports.default=t.default})(bA,bA.exports);var ONe=bA.exports,ib={};Object.defineProperty(ib,"__esModule",{value:!0});ib.default=DNe;ib.locales=void 0;var MNe=PNe(qt),wA=Za;function PNe(e){return e&&e.__esModule?e:{default:e}}function DNe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,MNe.default)(e);var r=e,a=n.ignore;if(a)if(a instanceof RegExp)r=r.replace(a,"");else if(typeof a=="string")r=r.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(t in wA.alpha)return wA.alpha[t].test(r);throw new Error("Invalid locale '".concat(t,"'"))}ib.locales=Object.keys(wA.alpha);var ob={};Object.defineProperty(ob,"__esModule",{value:!0});ob.default=FNe;ob.locales=void 0;var LNe=$Ne(qt),EA=Za;function $Ne(e){return e&&e.__esModule?e:{default:e}}function FNe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,LNe.default)(e);var r=e,a=n.ignore;if(a)if(a instanceof RegExp)r=r.replace(a,"");else if(typeof a=="string")r=r.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(t in EA.alphanumeric)return EA.alphanumeric[t].test(r);throw new Error("Invalid locale '".concat(t,"'"))}ob.locales=Object.keys(EA.alphanumeric);var xA={exports:{}};
1248(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=Za;function a(l){return l&&l.__esModule?l:{default:l}}var s=/^[0-9]+$/;function i(l,c){return(0,n.default)(l),c&&c.no_symbols?s.test(l):new RegExp("^[+-]?([0-9]*[".concat((c||{}).locale?r.decimal[c.locale]:".","])?[0-9]+$")).test(l)}e.exports=t.default,e.exports.default=t.default})(xA,xA.exports);var zNe=xA.exports,_A={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function s(i,l){(0,n.default)(i);var c=i.replace(/\s/g,"").toUpperCase();return l.toUpperCase()in a&&a[l].test(c)}e.exports=t.default,e.exports.default=t.default})(_A,_A.exports);var HNe=_A.exports,kA={exports:{}},SA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(qt);function r(l){return l&&l.__esModule?l:{default:l}}var a=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,s=/^[-+]?[0-9]+$/;function i(l,c){(0,n.default)(l),c=c||{};var u=c.allow_leading_zeroes===!1?a:s,d=!c.hasOwnProperty("min")||l>=c.min,f=!c.hasOwnProperty("max")||l<=c.max,m=!c.hasOwnProperty("lt")||l<c.lt,h=!c.hasOwnProperty("gt")||l>c.gt;return u.test(l)&&d&&f&&m&&h}e.exports=t.default,e.exports.default=t.default})(SA,SA.exports);var nL=SA.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(nL);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s,{allow_leading_zeroes:!1,min:0,max:65535})}
1248e.exports=t.default,e.exports.default=t.default})(kA,kA.exports);var VNe=kA.exports,CA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s),s===s.toLowerCase()}e.exports=t.default,e.exports.default=t.default})(CA,CA.exports);var UNe=CA.exports,NA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s),s===s.toUpperCase()}e.exports=t.default,e.exports.default=t.default})(NA,NA.exports);var BNe=NA.exports,RA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(qt);function r(l){return l&&l.__esModule?l:{default:l}}var a=/^[0-9]{15}$/,s=/^\d{2}-\d{6}-\d{6}-\d{1}$/;function i(l,c){(0,n.default)(l),c=c||{};var u=a;if(c.allow_hyphens&&(u=s),!u.test(l))return!1;l=l.replace(/-/g,"");for(var d=0,f=2,m=14,h=0;h<m;h++){var g=l.substring(m-h-1,m-h),v=parseInt(g,10)*f;v>=10?d+=v%10+1:d+=v,f===1?f+=1:f-=1}var y=(10-d%10)%10;return y===parseInt(l.substring(14,15),10)}e.exports=t.default,e.exports.default=t.default})(RA,RA.exports);var jNe=RA.exports,TA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^[\x00-\x7F]+$/;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(TA,TA.exports);var WNe=TA.exports,Ag={};Object.defineProperty(Ag,"__esModule",{value:!0});Ag.default=KNe;Ag.fullWidth=void 0;var GNe=qNe(qt);function qNe(e){return e&&e.__esModule?e:{default:e}}var YNe=Ag.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function KNe(e){return(0,GNe.default)(e),YNe.test(e)}var Ig={};Object.defineProperty(Ig,"__esModule",{value:!0});Ig.default=JNe;Ig.halfWidth=void 0;var ZNe=XNe(qt);function XNe(e){return e&&e.__esModule?e:{default:e}}var QNe=Ig.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;function JNe(e){return(0,ZNe.default)(e),QNe.test(e)}var AA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=s(qt),r=Ag,a=Ig;function s(l){return l&&l.__esModule?l:{default:l}}function i(l){return(0,n.default)(l),r.fullWidth.test(l)&&a.halfWidth.test(l)}e.exports=t.default,e.exports.default=t.default})(AA,AA.exports);var eRe=AA.exports,IA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/[^\x00-\x7F]/;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(IA,IA.exports);var tRe=IA.exports,OA={exports:{}},MA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r,a){var s=r.join("");return new RegExp(s,a)}e.exports=t.default,e.exports.default=t.default})(MA,MA.exports);var nRe=MA.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=a(nRe);function a(l){return l&&l.__esModule?l:{default:l}}var s=(0,r.default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");function i(l){return(0,n.default)(l),s.test(l)}e.exports=t.default,e.exports.default=t.default})(OA,OA.exports);var rRe=OA.exports,PA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(PA,PA.exports);var aRe=PA.exports,DA={exports:{}},LA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(a,s){return a.some(function(i){return s===i})};t.default=n,e.exports=t.default,e.exports.default=t.default}
1248)(LA,LA.exports);var sRe=LA.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var n=i(eo),r=i(qt),a=i(sRe),s=Za;function i(f){return f&&f.__esModule?f:{default:f}}function l(f){var m=new RegExp("^[-+]?([0-9]+)?(\\".concat(s.decimal[f.locale],"[0-9]{").concat(f.decimal_digits,"})").concat(f.force_decimal?"":"?","$"));return m}var c={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},u=["","-","+"];function d(f,m){if((0,r.default)(f),m=(0,n.default)(m,c),m.locale in s.decimal)return!(0,a.default)(u,f.replace(/ /g,""))&&l(m).test(f);throw new Error("Invalid locale '".concat(m.locale,"'"))}e.exports=t.default,e.exports.default=t.default})(DA,DA.exports);var iRe=DA.exports,$A={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^(0x|0h)?[0-9A-F]+$/i;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})($A,$A.exports);var BK=$A.exports,FA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^(0o)?[0-7]+$/i;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(FA,FA.exports);var oRe=FA.exports,zA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=a(qt),r=a(FK);function a(i){return i&&i.__esModule?i:{default:i}}function s(i,l){return(0,n.default)(i),(0,r.default)(i)%parseInt(l,10)===0}e.exports=t.default,e.exports.default=t.default})(zA,zA.exports);var lRe=zA.exports,HA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(HA,HA.exports);var cRe=HA.exports,VA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=r(qt);function r(u){return u&&u.__esModule?u:{default:u}}var a=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,s=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/,i=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,l=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,n.default)(u),d?a.test(u)||s.test(u)||i.test(u)||l.test(u):a.test(u)||s.test(u)}e.exports=t.default,e.exports.default=t.default})(VA,VA.exports);var uRe=VA.exports,UA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(qt);function r(l){return l&&l.__esModule?l:{default:l}}var a=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,s=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;function i(l){(0,n.default)(l);var c=l.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/ig,"$1");return c.indexOf(",")!==-1?a.test(c):s.test(c)}e.exports=t.default,e.exports.default=t.default})(UA,UA.exports);var dRe=UA.exports,BA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(BA,BA.exports);var fRe=BA.exports,lb={};Object.defineProperty(lb,"__esModule",{value:!0});lb.default=yRe;lb.locales=void 0;var mRe=hRe(qt);
1248function hRe(e){return e&&e.__esModule?e:{default:e}}var kx={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function pRe(e){var t=e.filter(function(n){return!(n in kx)});return!(t.length>0)}function gRe(e,t){var n=e.replace(/[\s\-]+/gi,"").toUpperCase(),r=n.slice(0,2).toUpperCase(),a=r in kx;if(t.whitelist){if(!pRe(t.whitelist))return!1;var s=t.whitelist.includes(r);if(!s)return!1}if(t.blacklist){var i=t.blacklist.includes(r);if(i)return!1}return a&&kx[r].test(n)}function vRe(e){var t=e.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),n=t.slice(4)+t.slice(0,4),r=n.replace(/[A-Z]/g,function(s){return s.charCodeAt(0)-55}),a=r.match(/\d{1,7}/g).reduce(function(s,i){return Number(s+i)%97},"");return a===1}function yRe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,mRe.default)(e),gRe(e,t)&&vRe(e)}lb.locales=Object.keys(kx);var jA={exports:{}},Og={};Object.defineProperty(Og,"__esModule",{value:!0});Og.CountryCodes=void 0;Og.default=ERe;var bRe=wRe(qt);function wRe(e){return e&&e.__esModule?e:{default:e}}var jK=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);function ERe(e){return(0,bRe.default)(e),jK.has(e.toUpperCase())}Og.CountryCodes=jK;
1248(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=Og;function a(l){return l&&l.__esModule?l:{default:l}}var s=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;function i(l){(0,n.default)(l);var c=l.slice(4,6).toUpperCase();return!r.CountryCodes.has(c)&&c!=="XK"?!1:s.test(l)}e.exports=t.default,e.exports.default=t.default})(jA,jA.exports);var xRe=jA.exports,WA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^[a-f0-9]{32}$/;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(WA,WA.exports);var _Re=WA.exports,GA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};function s(i,l){(0,n.default)(i);var c=new RegExp("^[a-fA-F0-9]{".concat(a[l],"}$"));return c.test(i)}e.exports=t.default,e.exports.default=t.default})(GA,GA.exports);var kRe=GA.exports,qA={exports:{}},YA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=a(qt),r=a(eo);function a(u){return u&&u.__esModule?u:{default:u}}var s=/[^A-Z0-9+\/=]/i,i=/^[A-Z0-9_\-]*$/i,l={urlSafe:!1};function c(u,d){(0,n.default)(u),d=(0,r.default)(d,l);var f=u.length;if(d.urlSafe)return i.test(u);if(f%4!==0||s.test(u))return!1;var m=u.indexOf("=");return m===-1||m===f-1||m===f-2&&u[f-1]==="="}e.exports=t.default,e.exports.default=t.default})(YA,YA.exports);var WK=YA.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=a(qt),r=a(WK);function a(i){return i&&i.__esModule?i:{default:i}}function s(i){(0,n.default)(i);var l=i.split("."),c=l.length;return c!==3?!1:l.reduce(function(u,d){return u&&(0,r.default)(d,{urlSafe:!0})},!0)}e.exports=t.default,e.exports.default=t.default})(qA,qA.exports);var SRe=qA.exports,KA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=a(qt),r=a(eo);function a(c){return c&&c.__esModule?c:{default:c}}function s(c){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},s(c)}var i={allow_primitives:!1};function l(c,u){(0,n.default)(c);try{u=(0,r.default)(u,i);var d=[];u.allow_primitives&&(d=[null,!1,!0]);var f=JSON.parse(c);return d.includes(f)||!!f&&s(f)==="object"}catch{}return!1}e.exports=t.default,e.exports.default=t.default})(KA,KA.exports);var CRe=KA.exports,ZA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=a(eo);function a(l){return l&&l.__esModule?l:{default:l}}var s={ignore_whitespace:!1};function i(l,c){return(0,n.default)(l),c=(0,r.default)(c,s),(c.ignore_whitespace?l.trim().length:l.length)===0}e.exports=t.default,e.exports.default=t.default})(ZA,ZA.exports);var NRe=ZA.exports,XA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}function a(i){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},a(i)}function s(i,l){(0,n.default)(i);var c,u;a(l)==="object"?(c=l.min||0,u=l.max):(c=arguments[1]||0,u=arguments[2]);var d=i.match(/(\uFE0F|\uFE0E)/g)||[],f=i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],m=i.length-d.length-f.length;return m>=c&&(typeof u>"u"||m<=u)}e.exports=t.default,e.exports.default=t.default})(XA,XA.exports);var RRe=XA.exports,QA={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function s(i,l){(0,n.default)(i);var c=a[[void 0,null].includes(l)?"all":l];return!!c&&c.test(i)}e.exports=t.default,e.exports.default=t.default})(QA,QA.exports);var TRe=QA.exports,JA={exports:{}};
1248(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=a(qt),r=a(BK);function a(i){return i&&i.__esModule?i:{default:i}}function s(i){return(0,n.default)(i),(0,r.default)(i)&&i.length===24}e.exports=t.default,e.exports.default=t.default})(JA,JA.exports);var ARe=JA.exports,eI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(eL);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){var l=(i==null?void 0:i.comparisonDate)||i||Date().toString(),c=(0,n.default)(l),u=(0,n.default)(s);return!!(u&&c&&u>c)}e.exports=t.default,e.exports.default=t.default})(eI,eI.exports);var IRe=eI.exports,tI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=a(qt),r=a(eL);function a(i){return i&&i.__esModule?i:{default:i}}function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:String(new Date);(0,n.default)(i);var c=(0,r.default)(l),u=(0,r.default)(i);return!!(u&&c&&u<c)}e.exports=t.default,e.exports.default=t.default})(tI,tI.exports);var ORe=tI.exports,nI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=a(zK);function a(l){return l&&l.__esModule?l:{default:l}}function s(l){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},s(l)}function i(l,c){(0,n.default)(l);var u;if(Object.prototype.toString.call(c)==="[object Array]"){var d=[];for(u in c)({}).hasOwnProperty.call(c,u)&&(d[u]=(0,r.default)(c[u]));return d.indexOf(l)>=0}else{if(s(c)==="object")return c.hasOwnProperty(l);if(c&&typeof c.indexOf=="function")return c.indexOf(l)>=0}return!1}e.exports=t.default,e.exports.default=t.default})(nI,nI.exports);var MRe=nI.exports,rI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){(0,n.default)(s);for(var i=s.replace(/[- ]+/g,""),l=0,c,u,d,f=i.length-1;f>=0;f--)c=i.substring(f,f+1),u=parseInt(c,10),d?(u*=2,u>=10?l+=u%10+1:l+=u):l+=u,d=!d;return!!(l%10===0&&i)}e.exports=t.default,e.exports.default=t.default})(rI,rI.exports);var GK=rI.exports,aI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=a(qt),r=a(GK);function a(c){return c&&c.__esModule?c:{default:c}}var s={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},i=function(){var c=[];for(var u in s)s.hasOwnProperty(u)&&c.push(s[u]);return c}();function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(c);var d=u.provider,f=c.replace(/[- ]+/g,"");if(d&&d.toLowerCase()in s){if(!s[d.toLowerCase()].test(f))return!1}else{if(d&&!(d.toLowerCase()in s))throw new Error("".concat(d," is not a valid credit card provider."));if(!i.some(function(m){return m.test(f)}))return!1}return(0,r.default)(c)}e.exports=t.default,e.exports.default=t.default})(aI,aI.exports);var PRe=aI.exports,sI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=a(qt),r=a(nL);function a(l){return l&&l.__esModule?l:{default:l}}var s={PL:function(c){(0,n.default)(c);var u={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(c!=null&&c.length===11&&(0,r.default)(c,{allow_leading_zeroes:!0})){var d=c.split("").slice(0,-1),f=d.reduce(function(g,v,y){return g+Number(v)*u[y+1]},0),m=f%10,h=Number(c.charAt(c.length-1));if(m===0&&h===0||h===10-m)return!0}return!1},ES:function(c){(0,n.default)(c);var u=/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/,d={X:0,Y:1,Z:2},f=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"],m=c.trim().toUpperCase();if(!u.test(m))return!1;var h=m.slice(0,-1).replace(/[X,Y,Z]/g,function(g){return d[g]});return m.endsWith(f[h%23])},FI:function(c){if((0,n.default)(c),c.length!==11||!c.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;var u="0123456789ABCDEFHJKLMNPRSTUVWXY",d=parseInt(c.slice(0,6),10)*1e3+parseInt(c.slice(7,10),10),f=d%31,m=u[f];return m===c.slice(10,11)},IN:function(c){var u=/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/,d=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],f=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],m=c.trim();if(!u.test(m))return!1;var h=0,g=m.replace(/\s/g,"").split("").map(Number).reverse();return g.forEach(function(v,y){h=d[h][f[y%8][v]]}),h===0},IR:function(c){if(!c.match(/^\d{10}$/)||(c="0000".concat(c).slice(c.length-6),parseInt(c.slice(3,9),10)===0))return!1;for(var u=parseInt(c.slice(9,10),10),d=0,f=0;f<9;f++)d+=parseInt(c.slice(f,f+1),10)*(10-f);return d%=11,d<2&&u===d||d>=2&&u===11-d},IT:function(c){return c.length!==9||c==="CA00000AA"?!1:c.search(/C[A-Z]\d{5}[A-Z]{2}/i)>-1},NO:function(c){var u=c.trim();if(isNaN(Number(u))||u.length!==11||u==="00000000000")return!1;var d=u.split("").map(Number),f=(11-(3*d[0]+7*d[1]+6*d[2]+1*d[3]+8*d[4]+9*d[5]+4*d[6]+5*d[7]+2*d[8])%11)%11,m=(11-(5*d[
12480]+4*d[1]+3*d[2]+2*d[3]+7*d[4]+6*d[5]+5*d[6]+4*d[7]+3*d[8]+2*f)%11)%11;return!(f!==d[9]||m!==d[10])},TH:function(c){if(!c.match(/^[1-8]\d{12}$/))return!1;for(var u=0,d=0;d<12;d++)u+=parseInt(c[d],10)*(13-d);return c[12]===((11-u%11)%10).toString()},LK:function(c){var u=/^[1-9]\d{8}[vx]$/i,d=/^[1-9]\d{11}$/i;return c.length===10&&u.test(c)?!0:!!(c.length===12&&d.test(c))},"he-IL":function(c){var u=/^\d{9}$/,d=c.trim();if(!u.test(d))return!1;for(var f=d,m=0,h,g=0;g<f.length;g++)h=Number(f[g])*(g%2+1),m+=h>9?h-9:h;return m%10===0},"ar-LY":function(c){var u=/^(1|2)\d{11}$/,d=c.trim();return!!u.test(d)},"ar-TN":function(c){var u=/^\d{8}$/,d=c.trim();return!!u.test(d)},"zh-CN":function(c){var u=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],d=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],f=["1","0","X","9","8","7","6","5","4","3","2"],m=function(x){return u.includes(x)},h=function(x){var S=parseInt(x.substring(0,4),10),N=parseInt(x.substring(4,6),10),k=parseInt(x.substring(6),10),C=new Date(S,N-1,k);return C>new Date?!1:C.getFullYear()===S&&C.getMonth()===N-1&&C.getDate()===k},g=function(x){for(var S=x.substring(0,17),N=0,k=0;k<17;k++)N+=parseInt(S.charAt(k),10)*parseInt(d[k],10);
1248var C=N%11;return f[C]},v=function(x){return g(x)===x.charAt(17).toUpperCase()},y=function(x){var S=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(x);if(!S)return!1;var N=x.substring(0,2);if(S=m(N),!S)return!1;var k="19".concat(x.substring(6,12));return S=h(k),!!S},b=function(x){var S=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(x);if(!S)return!1;var N=x.substring(0,2);if(S=m(N),!S)return!1;var k=x.substring(6,14);return S=h(k),S?v(x):!1},E=function(x){var S=/^\d{15}|(\d{17}(\d|x|X))$/.test(x);return S?x.length===15?y(x):b(x):!1};return E(c)},"zh-HK":function(c){c=c.trim();var u=/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/,d=/^[0-9]$/;if(c=c.toUpperCase(),!u.test(c))return!1;c=c.replace(/\[|\]|\(|\)/g,""),c.length===8&&(c="3".concat(c));for(var f=0,m=0;m<=7;m++){var h=void 0;d.test(c[m])?h=c[m]:h=(c[m].charCodeAt(0)-55)%11,f+=h*(9-m)}f%=11;var g;return f===0?g="0":f===1?g="A":g=String(11-f),g===c[c.length-1]},"zh-TW":function(c){var u={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},d=c.trim().toUpperCase();return/^[A-Z][0-9]{9}$/.test(d)?Array.from(d).reduce(function(f,m,h){if(h===0){var g=u[m];return g%10*9+Math.floor(g/10)}return h===9?(10-f%10-Number(m))%10===0:f+Number(m)*(9-h)},0):!1}};function i(l,c){if((0,n.default)(l),c in s)return s[c](l);if(c==="any"){for(var u in s)if(s.hasOwnProperty(u)){var d=s[u];if(d(l))return!0}return!1}throw new Error("Invalid locale '".concat(c,"'"))}e.exports=t.default,e.exports.default=t.default})(sI,sI.exports);var DRe=sI.exports,iI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var n=r(qt);function r(d){return d&&d.__esModule?d:{default:d}}var a=8,s=14,i=/^(\d{8}|\d{13}|\d{14})$/;function l(d,f){return d===a||d===s?f%2===0?3:1:f%2===0?1:3}function c(d){var f=d.slice(0,-1).split("").map(function(h,g){return Number(h)*l(d.length,g)}).reduce(function(h,g){return h+g},0),m=10-f%10;return m<10?m:0}function u(d){(0,n.default)(d);var f=Number(d.slice(-1));return i.test(d)&&f===c(d)}e.exports=t.default,e.exports.default=t.default})(iI,iI.exports);var LRe=iI.exports,oI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;function s(i){if((0,n.default)(i),!a.test(i))return!1;for(var l=!0,c=0,u=i.length-2;u>=0;u--)if(i[u]>="A"&&i[u]<="Z")for(var d=i[u].charCodeAt(0)-55,f=d%10,m=Math.trunc(d/10),h=0,g=[f,m];h<g.length;h++){var v=g[h];l?v>=5?c+=1+(v-5)*2:c+=v*2:c+=v,l=!l}else{var y=i[u].charCodeAt(0)-"0".charCodeAt(0);l?y>=5?c+=1+(y-5)*2:c+=y*2:c+=y,l=!l}var b=Math.trunc((c+9)/10)*10-c;return+i[i.length-1]===b}e.exports=t.default,e.exports.default=t.default})(oI,oI.exports);var $Re=oI.exports,lI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=r(qt);function r(c){return c&&c.__esModule?c:{default:c}}var a=/^(?:[0-9]{9}X|[0-9]{10})$/,s=/^(?:[0-9]{13})$/,i=[1,3];function l(c,u){(0,n.default)(c);var d=String((u==null?void 0:u.version)||u);if(!(u!=null&&u.version||u))return l(c,{version:10})||l(c,{version:13});var f=c.replace(/[\s-]+/g,""),m=0;if(d==="10"){if(!a.test(f))return!1;for(var h=0;h<d-1;h++)m+=(h+1)*f.charAt(h);if(f.charAt(9)==="X"?m+=10*10:m+=10*f.charAt(9),m%11===0)return!0}else if(d==="13"){if(!s.test(f))return!1;for(var g=0;g<12;g++)m+=i[g%2]*f.charAt(g);if(f.charAt(12)-(10-m%10)%10===0)return!0}return!1}e.exports=t.default,e.exports.default=t.default})(lI,lI.exports);var FRe=lI.exports,cI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a="^\\d{4}-?\\d{3}[\\dX]$";function s(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(i);var c=a;if(c=l.require_hyphen?c.replace("?",""):c,c=l.case_sensitive?new RegExp(c):new RegExp(c,"i"),!c.test(i))return!1;for(var u=i.replace("-","").toUpperCase(),d=0,f=0;f<u.length;f++){var m=u[f];d+=(m==="X"?10:+m)*(8-f)}return d%11===0}e.exports=t.default,e.exports.default=t.default}
1248)(cI,cI.exports);var zRe=cI.exports,uI={exports:{}},jm={};Object.defineProperty(jm,"__esModule",{value:!0});jm.iso7064Check=HRe;jm.luhnCheck=VRe;jm.reverseMultiplyAndSum=URe;jm.verhoeffCheck=BRe;function HRe(e){for(var t=10,n=0;n<e.length-1;n++)t=(parseInt(e[n],10)+t)%10===0?10*2%11:(parseInt(e[n],10)+t)%10*2%11;return t=t===1?0:11-t,t===parseInt(e[10],10)}function VRe(e){for(var t=0,n=!1,r=e.length-1;r>=0;r--){if(n){var a=parseInt(e[r],10)*2;a>9?t+=a.toString().split("").map(function(s){return parseInt(s,10)}).reduce(function(s,i){return s+i},0):t+=a}else t+=parseInt(e[r],10);n=!n}return t%10===0}function URe(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r]*(t-r);return n}function BRe(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],n=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],r=e.split("").reverse().join(""),a=0,s=0;s<r.length;s++)a=t[a][n[s%8][parseInt(r[s],10)]];return a===0}(function(e,t){function n(W){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},n(W)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=pe;var r=c(qt),a=l(jm),s=c(UK);function i(W){if(typeof WeakMap!="function")return null;var q=new WeakMap,te=new WeakMap;return(i=function(le){return le?te:q})(W)}function l(W,q){if(!q&&W&&W.__esModule)return W;if(W===null||n(W)!="object"&&typeof W!="function")return{default:W};var te=i(q);if(te&&te.has(W))return te.get(W);var X={__proto__:null},le=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in W)if(me!=="default"&&{}.hasOwnProperty.call(W,me)){var fe=le?Object.getOwnPropertyDescriptor(W,me):null;fe&&(fe.get||fe.set)?Object.defineProperty(X,me,fe):X[me]=W[me]}return X.default=W,te&&te.set(W,X),X}function c(W){return W&&W.__esModule?W:{default:W}}function u(W){return h(W)||m(W)||f(W)||d()}function d(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 1249In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(W,q){if(W){if(typeof W=="string")return g(W,q);var te=Object.prototype.toString.call(W).slice(8,-1);if(te==="Object"&&W.constructor&&(te=W.constructor.name),te==="Map"||te==="Set")return Array.from(W);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return g(W,q)}}function m(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}function h(W){if(Array.isArray(W))return g(W)}function g(W,q){(q==null||q>W.length)&&(q=W.length);for(var te=0,X=new Array(q);te<q;te++)X[te]=W[te];return X}function v(W){var q=W.slice(0,2),te=parseInt(W.slice(2,4),10);te>40?(te-=40,q="20".concat(q)):te>20?(te-=20,q="18".concat(q)):q="19".concat(q),te<10&&(te="0".concat(te));var X="".concat(q,"/").concat(te,"/").concat(W.slice(4,6));if(!(0,s.default)(X,"YYYY/MM/DD"))return!1;for(var le=W.split("").map(function(Se){return parseInt(Se,10)}),me=[2,4,8,5,10,9,7,3,6],fe=0,ke=0;ke<me.length;ke++)fe+=le[ke]*me[ke];return fe=fe%11===10?0:fe%11,fe===le[9]}function y(W){var q=W.split(""),te=q.filter(function(le,me){return me%2}).map(function(le){return Number(le)*2}).join("").split(""),X=q.filter(function(le,me){return!(me%2)}).concat(te).map(function(le){return Number(le)}).reduce(function(le,me){return le+me});return X%10===0}function b(W){W=W.replace(/\W/,"");var q=parseInt(W.slice(0,2),10);if(W.length===10)q<54?q="20".concat(q):q="19".concat(q);else{if(W.slice(6)==="000")return!1;if(q<54)q="19".concat(q);else return!1}q.length===3&&(q=[q.slice(0,2),"0",q.slice(2)].join(""));var te=parseInt(W.slice(2,4),10);if(te>50&&(te-=50),te>20){if(parseInt(q,10)<2004)return!1;te-=20}te<10&&(te="0".concat(te));
1249var X="".concat(q,"/").concat(te,"/").concat(W.slice(4,6));if(!(0,s.default)(X,"YYYY/MM/DD"))return!1;if(W.length===10&&parseInt(W,10)%11!==0){var le=parseInt(W.slice(0,9),10)%11;if(parseInt(q,10)<1986&&le===10){if(parseInt(W.slice(9),10)!==0)return!1}else return!1}return!0}function E(W){return a.luhnCheck(W)}function w(W){for(var q=W.split("").map(function(Se){return parseInt(Se,10)}),te=[],X=0;X<q.length-1;X++){te.push("");for(var le=0;le<q.length-1;le++)q[X]===q[le]&&(te[X]+=le)}if(te=te.filter(function(Se){return Se.length>1}),te.length!==2&&te.length!==3)return!1;if(te[0].length===3){for(var me=te[0].split("").map(function(Se){return parseInt(Se,10)}),fe=0,ke=0;ke<me.length-1;ke++)me[ke]+1===me[ke+1]&&(fe+=1);if(fe===2)return!1}return a.iso7064Check(W)}function x(W){W=W.replace(/\W/,"");var q=parseInt(W.slice(4,6),10),te=W.slice(6,7);switch(te){case"0":case"1":case"2":case"3":q="19".concat(q);break;case"4":case"9":q<37?q="20".concat(q):q="19".concat(q);break;default:if(q<37)q="20".concat(q);else if(q>58)q="18".concat(q);else return!1;break}q.length===3&&(q=[q.slice(0,2),"0",q.slice(2)].join(""));var X="".concat(q,"/").concat(W.slice(2,4),"/").concat(W.slice(0,2));if(!(0,s.default)(X,"YYYY/MM/DD"))return!1;for(var le=W.split("").map(function(Se){return parseInt(Se,10)}),me=0,fe=4,ke=0;ke<9;ke++)me+=le[ke]*fe,fe-=1,fe===1&&(fe=7);return me%=11,me===1?!1:me===0?le[9]===0:le[9]===11-me}function S(W){for(var q=W.slice(0,8).split("").map(function(me){return parseInt(me,10)}),te=0,X=1;X<q.length;X+=2)te+=q[X];for(var le=0;le<q.length;le+=2)q[le]<2?te+=1-q[le]:(te+=2*(q[le]-2)+5,q[le]>4&&(te+=2));return String.fromCharCode(te%26+65)===W.charAt(8)}function N(W){for(var q=W.split("").map(function(le){return parseInt(le,10)}),te=0,X=0;X<8;X++)te+=q[X]*Math.pow(2,8-X);return te%11%10===q[8]}function k(W){var q=a.reverseMultiplyAndSum(W.split("").slice(0,7).map(function(te){return parseInt(te,10)}),8);return W.length===9&&W[8]!=="W"&&(q+=(W[8].charCodeAt(0)-64)*9),q%=23,q===0?W[7].toUpperCase()==="W":W[7].toUpperCase()===String.fromCharCode(64+q)}var C={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function A(){var W=[];for(var q in C)C.hasOwnProperty(q)&&W.push.apply(W,u(C[q]));return W}function O(W){return A().indexOf(W.slice(0,2))!==-1}function T(W){for(var q=0,te=W.split(""),X=parseInt(te.pop(),10),le=0;le<te.length;le++)q+=te[9-le]*(2+le%6);var me=11-q%11;return me===11?me=0:me===10&&(me=9),X===me}function M(W){var q=W.toUpperCase().split("");if(isNaN(parseInt(q[0],10))&&q.length>1){var te=0;switch(q[0]){case"Y":te=1;break;case"Z":te=2;break}q.splice(0,1,te)}else for(;q.length<9;)q.unshift(0);var X=["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"];q=q.join("");var le=parseInt(q.slice(0,8),10)%23;return q[8]===X[le]}function L(W){var q=W.slice(1,3),te=W.slice(0,1);switch(te){case"1":case"2":q="18".concat(q);break;case"3":case"4":q="19".concat(q);break;default:q="20".concat(q);break}var X="".concat(q,"/").concat(W.slice(3,5),"/").concat(W.slice(5,7));if(!(0,s.default)(X,"YYYY/MM/DD"))return!1;for(var le=W.split("").map(function(Et){return parseInt(Et,10)}),me=0,fe=1,ke=0;ke<10;ke++)me+=le[ke]*fe,fe+=1,fe===10&&(fe=1);if(me%11===10){me=0,fe=3;for(var Se=0;Se<10;Se++)me+=le[Se]*fe,fe+=1,fe===10&&(fe=1);if(me%11===10)return le[10]===0}return me%11===le[10]}function D(W){var q=W.slice(4,6),te=W.slice(6,7);switch(te){case"+":q="18".concat(q);break;case"-":q="19".concat(q);break;default:q="20".concat(q);break}var X="".concat(q,"/").concat(W.slice(2,4),"/").concat(W.slice(0,2));if(!(0,s.default)(X,"YYYY/MM/DD"))return!1;
vendor: 9,121 bytes, line 1249
1249var le=parseInt(W.slice(0,6)+W.slice(7,10),10)%31;if(le<10)return le===parseInt(W.slice(10),10);le-=10;var me=["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"];return me[le]===W.slice(10)}function j(W){if(W.slice(2,4)!=="00"||W.slice(4,6)!=="00"){var q="".concat(W.slice(0,2),"/").concat(W.slice(2,4),"/").concat(W.slice(4,6));if(!(0,s.default)(q,"YY/MM/DD"))return!1}var te=97-parseInt(W.slice(0,9),10)%97,X=parseInt(W.slice(9,11),10);return!(te!==X&&(te=97-parseInt("2".concat(W.slice(0,9)),10)%97,te!==X))}function H(W){W=W.replace(/\s/g,"");var q=parseInt(W.slice(0,10),10)%511,te=parseInt(W.slice(10,13),10);return q===te}function Y(W){var q="".concat(W.slice(0,4),"/").concat(W.slice(4,6),"/").concat(W.slice(6,8));return!(0,s.default)(q,"YYYY/MM/DD")||!a.luhnCheck(W.slice(0,12))?!1:a.verhoeffCheck("".concat(W.slice(0,11)).concat(W[12]))}function z(W){return a.iso7064Check(W)}function K(W){for(var q=W.split("").map(function(le){return parseInt(le,10)}),te=8,X=1;X<9;X++)te+=q[X]*(X+1);return te%11===q[9]}function ee(W){for(var q=!1,te=!1,X=0;X<3;X++)if(!q&&/[AEIOU]/.test(W[X]))q=!0;else if(!te&&q&&W[X]==="X")te=!0;else if(X>0&&(q&&!te&&!/[AEIOU]/.test(W[X])||te&&!/X/.test(W[X])))return!1;return!0}function oe(W){var q=W.toUpperCase().split("");if(!ee(q.slice(0,3))||!ee(q.slice(3,6)))return!1;for(var te=[6,7,9,10,12,13,14],X={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},le=0,me=te;le<me.length;le++){var fe=me[le];q[fe]in X&&q.splice(fe,1,X[q[fe]])}var ke={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"},Se=ke[q[8]],Et=parseInt(q[9]+q[10],10);Et>40&&(Et-=40),Et<10&&(Et="0".concat(Et));var nt="".concat(q[6]).concat(q[7],"/").concat(Se,"/").concat(Et);if(!(0,s.default)(nt,"YY/MM/DD"))return!1;for(var Pt=0,en=1;en<q.length-1;en+=2){var hn=parseInt(q[en],10);isNaN(hn)&&(hn=q[en].charCodeAt(0)-65),Pt+=hn}for(var rt={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},et=0;et<q.length-1;et+=2){var Kt=0;if(q[et]in rt)Kt=rt[q[et]];else{var zn=parseInt(q[et],10);Kt=2*zn+1,zn>4&&(Kt+=2)}Pt+=Kt}return String.fromCharCode(65+Pt%26)===q[15]}function J(W){W=W.replace(/\W/,"");var q=W.slice(0,2);if(q!=="32"){var te=W.slice(2,4);if(te!=="00"){var X=W.slice(4,6);switch(W[6]){case"0":X="18".concat(X);break;case"1":X="19".concat(X);break;default:X="20".concat(X);break}var le="".concat(X,"/").concat(W.slice(2,4),"/").concat(q);if(!(0,s.default)(le,"YYYY/MM/DD"))return!1}for(var me=1101,fe=[1,6,3,7,9,10,5,8,4,2],ke=0;ke<W.length-1;ke++)me-=parseInt(W[ke],10)*fe[ke];return parseInt(W[10],10)===me%11}return!0}function se(W){if(W.length!==9){for(var q=W.toUpperCase().split("");q.length<8;)q.unshift(0);switch(W[7]){case"A":case"P":if(parseInt(q[6],10)===0)return!1;break;default:{var te=parseInt(q.join("").slice(0,5),10);if(te>32e3)return!1;var X=parseInt(q.join("").slice(5,7),10);if(te===X)return!1}}}return!0}function B(W){return a.reverseMultiplyAndSum(W.split("").slice(0,8).map(function(q){return parseInt(q,10)}),9)%11===parseInt(W[8],10)}function U(W){if(W.length===10){for(var q=[6,5,7,2,3,4,5,6,7],te=0,X=0;X<q.length;X++)te+=parseInt(W[X],10)*q[X];return te%=11,te===10?!1:te===parseInt(W[9],10)}var le=W.slice(0,2),me=parseInt(W.slice(2,4),10);me>80?(le="18".concat(le),me-=80):me>60?(le="22".concat(le),me-=60):me>40?(le="21".concat(le),me-=40):me>20?(le="20".concat(le),me-=20):le="19".concat(le),me<10&&(me="0".concat(me));var fe="".concat(le,"/").concat(me,"/").concat(W.slice(4,6));if(!(0,s.default)(fe,"YYYY/MM/DD"))return!1;for(var ke=0,Se=1,Et=0;Et<W.length-1;Et++)ke+=parseInt(W[Et],10)*Se%10,Se+=2,Se>10?Se=1:Se===5&&(Se+=2);return ke=10-ke%10,ke===parseInt(W[10],10)}function $(W){if(W.length===11){var q,te;if(q=0,W==="11111111111"||W==="22222222222"||W==="33333333333"||W==="44444444444"||W==="55555555555"||W==="66666666666"||W==="77777777777"||W==="88888888888"||W==="99999999999"||W==="00000000000")return!1;for(var X=1;X<=9;X++)q+=parseInt(W.substring(X-1,X),10)*(11-X);if(te=q*10%11,te===10&&(te=0),te!==parseInt(W.substring(9,10),10))return!1;q=0;for(var le=1;le<=10;le++)q+=parseInt(W.substring(le-1,le),10)*(12-le);return te=q*10%11,te===10&&(te=0),te===parseInt(W.substring(10,11),10)}if(W==="00000000000000"||W==="11111111111111"||W==="22222222222222"||W==="33333333333333"||W==="44444444444444"||W==="55555555555555"||W==="66666666666666"||W==="77777777777777"||W==="88888888888888"||W==="99999999999999")return!1;for(var me=W.length-2,fe=W.substring(0,me),ke=W.substring(me),Se=0,Et=me-7,nt=me;nt>=1;nt--)Se+=fe.charAt(me-nt)*Et,Et-=1,Et<2&&(Et=9);var Pt=Se%11<2?0:11-Se%11;if(Pt!==parseInt(ke.charAt(0),10))return!1;me+=1,fe=W.substring(0,me),Se=0,Et=me-7;for(var en=me;en>=1;en--)Se+=fe.charAt(me-en)*Et,Et-=1,Et<2&&(Et=9);return Pt=Se%11<2?0:11-Se%11,Pt===parseInt(ke.charAt(1),10)}function ce(W){var q=11-a.reverseMultiplyAndSum(W.split("").slice(0,8).map(function(te){return parseInt(te,10)}),9)%11;return q>9?parseInt(W[8],10)===0:q===parseInt(W[8],10)}function be(W){if(W.slice(0,4)!=="9000"){var q=W.slice(1,3);switch(W[0]){case"1":case"2":q="19".concat(q);break;case"3":case"4":q="18".concat(q);break;case"5":case"6":q="20".concat(q);break}var te="".concat(q,"/").concat(W.slice(3,5),"/").concat(W.slice(5,7));if(te.length===8){if(!(0,s.default)(te,"YY/MM/DD"))return!1}else if(!(0,s.default)(te,"YYYY/MM/DD"))return!1;for(var X=W.split("").map(function(ke){return parseInt(ke,10)}),le=[2,7,9,1,4,6,3,5,8,2,7,9],me=0,fe=0;fe<le.length;fe++)me+=X[fe]*le[fe];return me%11===10?X[12]===1:X[12]===me%11}return!0}function ue(W){if(W.length===9){if(W=W.replace(/\W/,""),W.slice(6)==="000")return!1;var q=parseInt(W.slice(0,2),10);if(q>53)return!1;q<10?q="190".concat(q):q="19".concat(q);var te=parseInt(W.slice(2,4),10);te>50&&(te-=50),te<10&&(te="0".concat(te));var X="".concat(q,"/").concat(te,"/").concat(W.slice(4,6));if(!(0,s.default)(X,"YYYY/MM/DD"))return!1}return!0}function Ie(W){var q=11-a.reverseMultiplyAndSum(W.split("").slice(0,7).map(function(te){return parseInt(te,10)}),8)%11;return q===10?parseInt(W[7],10)===0:q===parseInt(W[7],10)}function Ae(W){var q=W.slice(0);W.length>11&&(q=q.slice(2));var te="",X=q.slice(2,4),le=parseInt(q.slice(4,6),10);if(W.length>11)te=W.slice(0,4);else if(te=W.slice(0,2),W.length===11&&le<60){var me=new Date().getFullYear().toString(),fe=parseInt(me.slice(0,2),10);if(me=parseInt(me,10),W[6]==="-")parseInt("".concat(fe).concat(te),10)>me?te="".concat(fe-1).concat(te):te="".concat(fe).concat(te);else if(te="".concat(fe-1).concat(te),me-parseInt(te,10)<100)return!1}le>60&&(le-=60),le<10&&(le="0".concat(le));var ke="".concat(te,"/").concat(X,"/").concat(le);if(ke.length===8){if(!(0,s.default)(ke,"YY/MM/DD"))return!1}else if(!(0,s.default)(ke,"YYYY/MM/DD"))return!1;return a.luhnCheck(W.replace(/\W/,""))}function he(W){for(var q=W.split("").map(function(me){return parseInt(me,10)}),te=[-1,5,7,9,4,6,10,5,7],X=0,le=0;le<te.length;le++)X+=q[le]*te[le];return X%11===10?q[9]===0:q[9]===X%11}var _e={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-AR":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,"uk-UA":/^\d{10}$/};_e["lb-LU"]=_e["fr-LU"],_e["lt-LT"]=_e["et-EE"],_e["nl-BE"]=_e["fr-BE"],_e["fr-CA"]=_e["en-CA"];var ie={"bg-BG":v,"cs-CZ":b,"de-AT":E,"de-DE":w,"dk-DK":x,"el-CY":S,"el-GR":N,"en-CA":y,"en-IE":k,"en-US":O,"es-AR":T,"es-ES":M,"et-EE":L,"fi-FI":D,"fr-BE":j,"fr-FR":H,"fr-LU":Y,"hr-HR":z,"hu-HU":K,"it-IT":oe,"lv-LV":J,"mt-MT":se,"nl-NL":B,"pl-PL":U,"pt-BR":$,"pt-PT":ce,"ro-RO":be,"sk-SK":ue,"sl-SI":Ie,"sv-SE":Ae,"uk-UA":he};ie["lb-LU"]=ie["fr-LU"],ie["lt-LT"]=ie["et-EE"],ie["nl-BE"]=ie["fr-BE"],ie["fr-CA"]=ie["en-CA"];var Ue=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,ae={"de-AT":Ue,"de-DE":/[\/\\]/g,"fr-BE":Ue};ae["nl-BE"]=ae["fr-BE"];function pe(W){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US";(0,r.default)(W);var te=W.slice(0);if(q in _e)return q in ae&&(te=te.replace(ae[q],"")),_e[q].test(te)?q in ie?ie[q](te):!0:!1;throw new Error("Invalid locale '".concat(q,"'"))}e.exports=t.default,e.exports.default=t.default}
1249)(uI,uI.exports);var jRe=uI.exports,cb={};Object.defineProperty(cb,"__esModule",{value:!0});cb.default=qRe;cb.locales=void 0;var WRe=GRe(qt);function GRe(e){return e&&e.__esModule?e:{default:e}}var Xa={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}
1249$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};Xa["en-CA"]=Xa["en-US"];Xa["fr-CA"]=Xa["en-CA"];Xa["fr-BE"]=Xa["nl-BE"];Xa["zh-HK"]=Xa["en-HK"];Xa["zh-MO"]=Xa["en-MO"];Xa["ga-IE"]=Xa["en-IE"];Xa["fr-CH"]=Xa["de-CH"];Xa["it-CH"]=Xa["fr-CH"];function qRe(e,t,n){if((0,WRe.default)(e),n&&n.strictMode&&!e.startsWith("+"))return!1;if(Array.isArray(t))return t.some(function(s){if(Xa.hasOwnProperty(s)){var i=Xa[s];if(i.test(e))return!0}return!1});if(t in Xa)return Xa[t].test(e);if(!t||t==="any"){for(var r in Xa)if(Xa.hasOwnProperty(r)){var a=Xa[r];if(a.test(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))}cb.locales=Object.keys(Xa);var dI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^(0x)[0-9a-f]{40}$/i;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(dI,dI.exports);var YRe=dI.exports,fI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=a(eo),r=a(qt);function a(c){return c&&c.__esModule?c:{default:c}}function s(c){var u="\\d{".concat(c.digits_after_decimal[0],"}");c.digits_after_decimal.forEach(function(E,w){w!==0&&(u="".concat(u,"|\\d{").concat(E,"}"))});var d="(".concat(c.symbol.replace(/\W/,function(E){return"\\".concat(E)}),")").concat(c.require_symbol?"":"?"),f="-?",m="[1-9]\\d*",h="[1-9]\\d{0,2}(\\".concat(c.thousands_separator,"\\d{3})*"),g=["0",m,h],v="(".concat(g.join("|"),")?"),y="(\\".concat(c.decimal_separator,"(").concat(u,"))").concat(c.require_decimal?"":"?"),b=v+(c.allow_decimal||c.require_decimal?y:"");return c.allow_negatives&&!c.parens_for_negatives&&(c.negative_sign_after_digits?b+=f:c.negative_sign_before_digits&&(b=f+b)),c.allow_negative_sign_placeholder?b="( (?!\\-))?".concat(b):c.allow_space_after_symbol?b=" ?".concat(b):c.allow_space_after_digits&&(b+="( (?!$))?"),c.symbol_after_digits?b+=d:b=d+b,c.allow_negatives&&(c.parens_for_negatives?b="(\\(".concat(b,"\\)|").concat(b,")"):c.negative_sign_before_digits||c.negative_sign_after_digits||(b=f+b)),new RegExp("^(?!-? )(?=.*\\d)".concat(b,"$"))}var i={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal
1249:!1,digits_after_decimal:[2],allow_space_after_digits:!1};function l(c,u){return(0,r.default)(c),u=(0,n.default)(u,i),s(u).test(c)}e.exports=t.default,e.exports.default=t.default})(fI,fI.exports);var KRe=fI.exports,mI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=r(qt);function r(l){return l&&l.__esModule?l:{default:l}}var a=/^(bc1)[a-z0-9]{25,39}$/,s=/^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;function i(l){return(0,n.default)(l),a.test(l)||s.test(l)}e.exports=t.default,e.exports.default=t.default})(mI,mI.exports);var ZRe=mI.exports,ub={};Object.defineProperty(ub,"__esModule",{value:!0});ub.isFreightContainerID=void 0;ub.isISO6346=qK;var XRe=QRe(qt);function QRe(e){return e&&e.__esModule?e:{default:e}}var JRe=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,eTe=/^[0-9]$/;function qK(e){if((0,XRe.default)(e),e=e.toUpperCase(),!JRe.test(e))return!1;if(e.length===11){for(var t=0,n=0;n<e.length-1;n++)if(eTe.test(e[n]))t+=e[n]*Math.pow(2,n);else{var r=void 0,a=e.charCodeAt(n)-55;a<11?r=a:a>=11&&a<=20?r=12+a%11:a>=21&&a<=30?r=23+a%21:r=34+a%31,t+=r*Math.pow(2,n)}var s=t%11;return Number(e[e.length-1])===s}return!0}ub.isFreightContainerID=qK;var hI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]);function s(i){return(0,n.default)(i),a.has(i)}e.exports=t.default,e.exports.default=t.default})(hI,hI.exports);var tTe=hI.exports,pI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=r(qt);function r(c){return c&&c.__esModule?c:{default:c}}var a=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,s=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,i=function(u){var d=u.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(d){var f=Number(d[1]),m=Number(d[2]);return f%4===0&&f%100!==0||f%400===0?m<=366:m<=365}var h=u.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),g=h[1],v=h[2],y=h[3],b=v&&"0".concat(v).slice(-2),E=y&&"0".concat(y).slice(-2),w=new Date("".concat(g,"-").concat(b||"01","-").concat(E||"01"));return v&&y?w.getUTCFullYear()===g&&w.getUTCMonth()+1===v&&w.getUTCDate()===y:!0};function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(c);var d=u.strictSeparator?s.test(c):a.test(c);return d&&u.strict?i(c):d}e.exports=t.default,e.exports.default=t.default})(pI,pI.exports);var nTe=pI.exports,gI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=b;var n=r(qt);function r(E){return E&&E.__esModule?E:{default:E}}var a=/[0-9]{4}/,s=/(0[1-9]|1[0-2])/,i=/([12]\d|0[1-9]|3[01])/,l=/([01][0-9]|2[0-3])/,c=/[0-5][0-9]/,u=/([0-5][0-9]|60)/,d=/(\.[0-9]+)?/,f=new RegExp("[-+]".concat(l.source,":").concat(c.source)),m=new RegExp("([zZ]|".concat(f.source,")")),h=new RegExp("".concat(l.source,":").concat(c.source,":").concat(u.source).concat(d.source)),g=new RegExp("".concat(a.source,"-").concat(s.source,"-").concat(i.source)),v=new RegExp("".concat(h.source).concat(m.source)),y=new RegExp("^".concat(g.source,"[ tT]").concat(v.source,"$"));function b(E){return(0,n.default)(E),y.test(E)}e.exports=t.default,e.exports.default=t.default}
1249)(gI,gI.exports);var rTe=gI.exports,vI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);function s(i){return(0,n.default)(i),a.has(i.toUpperCase())}e.exports=t.default,e.exports.default=t.default})(vI,vI.exports);var aTe=vI.exports,db={};Object.defineProperty(db,"__esModule",{value:!0});db.CurrencyCodes=void 0;db.default=oTe;var sTe=iTe(qt);function iTe(e){return e&&e.__esModule?e:{default:e}}var YK=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);function oTe(e){return(0,sTe.default)(e),YK.has(e.toUpperCase())}db.CurrencyCodes=YK;var yI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var n=a(qt),r=a(eo);function a(u){return u&&u.__esModule?u:{default:u}}var s=/^[A-Z2-7]+=*$/,i=/^[A-HJKMNP-TV-Z0-9]+$/,l={crockford:!1};function c(u,d){if((0,n.default)(u),d=(0,r.default)(d,l),d.crockford)return i.test(u);var f=u.length;return!!(f%8===0&&s.test(u))}e.exports=t.default,e.exports.default=t.default})(yI,yI.exports);var lTe=yI.exports,bI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^[A-HJ-NP-Za-km-z1-9]*$/;function s(i){return(0,n.default)(i),!!a.test(i)}e.exports=t.default,e.exports.default=t.default})(bI,bI.exports);var cTe=bI.exports,wI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=r(qt);function r(c){return c&&c.__esModule?c:{default:c}}var a=/^[a-z]+\/[a-z0-9\-\+\._]+$/i,s=/^[a-z\-]+=[a-z0-9\-]+$/i,i=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;function l(c){(0,n.default)(c);var u=c.split(",");if(u.length<2)return!1;var d=u.shift().trim().split(";"),f=d.shift();if(f.slice(0,5)!=="data:")return!1;var m=f.slice(5);if(m!==""&&!a.test(m))return!1;for(var h=0;h<d.length;h++)if(!(h===d.length-1&&d[h].toLowerCase()==="base64")&&!s.test(d[h]))return!1;for(var g=0;g<u.length;g++)if(!i.test(u[g]))return!1;return!0}e.exports=t.default,e.exports.default=t.default}
1249)(wI,wI.exports);var uTe=wI.exports,EI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;function s(i){return(0,n.default)(i),i.indexOf("magnet:?")!==0?!1:a.test(i)}e.exports=t.default,e.exports.default=t.default})(EI,EI.exports);var dTe=EI.exports,xI={exports:{}},_I={exports:{}},kI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){if((0,n.default)(s),i){var l=new RegExp("[".concat(i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return s.replace(l,"")}for(var c=s.length-1;/\s/.test(s.charAt(c));)c-=1;return s.slice(0,c+1)}e.exports=t.default,e.exports.default=t.default})(kI,kI.exports);var KK=kI.exports,SI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){(0,n.default)(s);var l=i?new RegExp("^[".concat(i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return s.replace(l,"")}e.exports=t.default,e.exports.default=t.default})(SI,SI.exports);var ZK=SI.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=a(KK),r=a(ZK);function a(i){return i&&i.__esModule?i:{default:i}}function s(i,l){return(0,n.default)((0,r.default)(i,l),l)}e.exports=t.default,e.exports.default=t.default})(_I,_I.exports);var XK=_I.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var n=s(XK),r=s(VK),a=s(qt);function s(v){return v&&v.__esModule?v:{default:v}}function i(v,y){return u(v)||c(v,y)||f(v,y)||l()}function l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 1250In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(v,y){var b=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(b!=null){var E,w,x,S,N=[],k=!0,C=!1;try{if(x=(b=b.call(v)).next,y===0){if(Object(b)!==b)return;k=!1}else for(;!(k=(E=x.call(b)).done)&&(N.push(E.value),N.length!==y);k=!0);}catch(A){C=!0,w=A}finally{try{if(!k&&b.return!=null&&(S=b.return(),Object(S)!==S))return}finally{if(C)throw w}}return N}}function u(v){if(Array.isArray(v))return v}function d(v,y){var b=typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(!b){if(Array.isArray(v)||(b=f(v))||y&&v&&typeof v.length=="number"){b&&(v=b);var E=0,w=function(){};return{s:w,n:function(){return E>=v.length?{done:!0}:{done:!1,value:v[E++]}},e:function(C){throw C},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 1251In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var x=!0,S=!1,N;return{s:function(){b=b.call(v)},n:function(){var C=b.next();return x=C.done,C},e:function(C){S=!0,N=C},f:function(){try{!x&&b.return!=null&&b.return()}finally{if(S)throw N}}}}function f(v,y){if(v){if(typeof v=="string")return m(v,y);var b=Object.prototype.toString.call(v).slice(8,-1);if(b==="Object"&&v.constructor&&(b=v.constructor.name),b==="Map"||b==="Set")return Array.from(v);if(b==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return m(v,y)}}function m(v,y){(y==null||y>v.length)&&(y=v.length);for(var b=0,E=new Array(y);b<y;b++)E[b]=v[b];return E}function h(v){var y=new Set(["subject","body","cc","bcc"]),b={cc:"",bcc:""},E=!1,w=v.split("&");if(w.length>4)return!1;var x=d(w),S;try{for(x.s();!(S=x.n()).done;){var N=S.value,k=N.split("="),C=i(k,2),A=C[0],O=C[1];if(A&&!y.has(A)){E=!0;break}O&&(A==="cc"||A==="bcc")&&(b[A]=O),A&&y.delete(A)}}catch(T){x.e(T)}finally{x.f()}return E?!1:b}function g(v,y){if((0,a.default)(v),v.indexOf("mailto:")!==0)return!1;var b=v.replace("mailto:","").split("?"),E=i(b,2),w=E[0],x=E[1],S=x===void 0?"":x;if(!w&&!S)return!0;var N=h(S);return N?"".concat(w,",").concat(N.cc,",").concat(N.bcc).split(",").every(function(k){return k=(0,n.default)(k," "),k?(0,r.default)(k,y):!0}):!1}e.exports=t.default,e.exports.default=t.default}
1251)(xI,xI.exports);var fTe=xI.exports,CI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var n=r(qt);function r(c){return c&&c.__esModule?c:{default:c}}var a=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,s=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,i=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;function l(c){return(0,n.default)(c),a.test(c)||s.test(c)||i.test(c)}e.exports=t.default,e.exports.default=t.default})(CI,CI.exports);var mTe=CI.exports,NI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var n=a(qt),r=a(eo);function a(f){return f&&f.__esModule?f:{default:f}}var s=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,i=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,l=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,c=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,u={checkDMS:!1};function d(f,m){if((0,n.default)(f),m=(0,r.default)(m,u),!f.includes(","))return!1;var h=f.split(",");return h[0].startsWith("(")&&!h[1].endsWith(")")||h[1].endsWith(")")&&!h[0].startsWith("(")?!1:m.checkDMS?l.test(h[0])&&c.test(h[1]):s.test(h[0])&&i.test(h[1])}e.exports=t.default,e.exports.default=t.default})(NI,NI.exports);var hTe=NI.exports,fb={};Object.defineProperty(fb,"__esModule",{value:!0});fb.default=vTe;fb.locales=void 0;var pTe=gTe(qt);function gTe(e){return e&&e.__esModule?e:{default:e}}var C6=/^\d{3}$/,Ao=/^\d{4}$/,Oi=/^\d{5}$/,x2=/^\d{6}$/,_h={AD:/^AD\d{3}$/,AT:Ao,AU:Ao,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:Ao,BG:Ao,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:Ao,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:Oi,DK:Ao,DO:Oi,DZ:Oi,EE:Oi,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:Oi,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:Ao,ID:Oi,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:C6,IT:Oi,JP:/^\d{3}\-\d{4}$/,KE:Oi,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:Ao,LV:/^LV\-\d{4}$/,LK:Oi,MG:C6,MX:Oi,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:Oi,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:Ao,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:Ao,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:x2,RU:x2,SA:Oi,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:x2,SI:Ao,SK:/^\d{3}\s?\d{2}$/,TH:Oi,TN:Ao,TW:/^\d{3}(\d{2})?$/,UA:Oi,US:/^\d{5}(-\d{4})?$/,ZA:Ao,ZM:Oi};fb.locales=Object.keys(_h);function vTe(e,t){if((0,pTe.default)(e),t in _h)return _h[t].test(e);if(t==="any"){for(var n in _h)if(_h.hasOwnProperty(n)){var r=_h[n];if(r.test(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))}var RI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s),s.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}e.exports=t.default,e.exports.default=t.default})(RI,RI.exports);var yTe=RI.exports,TI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s){return(0,n.default)(s),s.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/\/g,"\\").replace(/`/g,"`").replace(/&/g,"&")}e.exports=t.default,e.exports.default=t.default}
1251)(TI,TI.exports);var bTe=TI.exports,AI={exports:{}},II={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){return(0,n.default)(s),s.replace(new RegExp("[".concat(i,"]+"),"g"),"")}e.exports=t.default,e.exports.default=t.default})(II,II.exports);var QK=II.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=a(qt),r=a(QK);function a(i){return i&&i.__esModule?i:{default:i}}function s(i,l){(0,n.default)(i);var c=l?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,r.default)(i,c)}e.exports=t.default,e.exports.default=t.default})(AI,AI.exports);var wTe=AI.exports,OI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){return(0,n.default)(s),s.replace(new RegExp("[^".concat(i,"]+"),"g"),"")}e.exports=t.default,e.exports.default=t.default})(OI,OI.exports);var ETe=OI.exports,MI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var n=r(qt);function r(s){return s&&s.__esModule?s:{default:s}}function a(s,i){(0,n.default)(s);for(var l=s.length-1;l>=0;l--)if(i.indexOf(s[l])===-1)return!1;return!0}e.exports=t.default,e.exports.default=t.default})(MI,MI.exports);var xTe=MI.exports,PI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var n=r(eo);function r(f){return f&&f.__esModule?f:{default:f}}var a={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},s=["icloud.com","me.com"],i=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],l=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],c=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function u(f){return f.length>1?f:""}function d(f,m){m=(0,n.default)(m,a);var h=f.split("@"),g=h.pop(),v=h.join("@"),y=[v,g];if(y[1]=y[1].toLowerCase(),y[1]==="gmail.com"||y[1]==="googlemail.com"){if(m.gmail_remove_subaddress&&(y[0]=y[0].split("+")[0]),m.gmail_remove_dots&&(y[0]=y[0].replace(/\.+/g,u)),!y[0].length)return!1;(m.all_lowercase||m.gmail_lowercase)&&(y[0]=y[0].toLowerCase()),y[1]=m.gmail_convert_googlemaildotcom?"gmail.com":y[1]}else if(s.indexOf(y[1])>=0){if(m.icloud_remove_subaddress&&(y[0]=y[0].split("+")[0]),!y[0].length)return!1;(m.all_lowercase||m.icloud_lowercase)&&(y[0]=y[0].toLowerCase())}else if(i.indexOf(y[1])>=0){if(m.outlookdotcom_remove_subaddress&&(y[0]=y[0].split("+")[0]),!y[0].length)return!1;(m.all_lowercase||m.outlookdotcom_lowercase)&&(y[0]=y[0].toLowerCase())}else if(l.indexOf(y[1])>=0){if(m.yahoo_remove_subaddress){var b=y[0].split("-");y[0]=b.length>1?b.slice(0,-1).join("-"):b[0]}if(!y[0].length)return!1;(m.all_lowercase||m.yahoo_lowercase)&&(y[0]=y[0].toLowerCase())}else c.indexOf(y[1])>=0?((m.all_lowercase||m.yandex_lowercase)&&(y[0]=y[0].toLowerCase()),y[1]="yandex.ru"):m.all_lowercase&&(y[0]=y[0].toLowerCase());return y.join("@")}e.exports=t.default,e.exports.default=t.default}
1251)(PI,PI.exports);var _Te=PI.exports,DI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function s(i){return(0,n.default)(i),a.test(i)}e.exports=t.default,e.exports.default=t.default})(DI,DI.exports);var kTe=DI.exports,LI={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=r(qt);function r(i){return i&&i.__esModule?i:{default:i}}var a={"cs-CZ":function(l){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(l)},"de-DE":function(l){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÃ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÃ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÃ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÃ|GP|GR|GS|GT|GÃ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÃ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÃ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÃ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÃ|ÃB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÃ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÃD|BUL|BÃR|BÃS|BÃZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÃW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÃ|FOR|FRG|FRI|FRW|FTL|FÃS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÃ|HOG|HOH|HOL|HOM|HOR|HÃS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÃL|KEH|KEL|KEM|KIB|KLE|KLZ|KÃN|KÃT|KÃZ|KRU|KÃN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÃB|LOS|LRO|LSZ|LÃN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÃB|MÃR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÃHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÃ|PRÃ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÃD|RÃG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÃ|SLZ|SMÃ|SOB|SOG|SOK|SÃM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÃW|SWA|SZB|TBB|TDO|TET|TIR|TÃL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÃM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(l)},"de-LI":function(l){return/^FL[- ]?\d{1,5}[UZ]?$/.test(l)},"en-IN":function(l){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(l)},"es-AR":function(l){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(l)},"fi-FI":function(l){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(l)},"hu-HU":function(l){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(l)},"pt-BR":function(l){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(l)},"pt-PT":function(l){return/^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(l)},"sq-AL":function(l){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(l)},"sv-SE":function(l){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}
1251[A-HJ-PR-UW-Z1-9]$|(^[A-ZÃ
Ãà ]{2,7}$)/.test(l.trim())},"en-PK":function(l){return/(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(l.trim())}};function s(i,l){if((0,n.default)(i),l in a)return a[l](i);if(l==="any"){for(var c in a){var u=a[c];if(u(i))return!0}return!1}throw new Error("Invalid locale '".concat(l,"'"))}e.exports=t.default,e.exports.default=t.default})(LI,LI.exports);var STe=LI.exports,$I={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var n=a(eo),r=a(qt);function a(g){return g&&g.__esModule?g:{default:g}}var s=/^[A-Z]$/,i=/^[a-z]$/,l=/^[0-9]$/,c=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/,u={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};function d(g){var v={};return Array.from(g).forEach(function(y){var b=v[y];b?v[y]+=1:v[y]=1}),v}function f(g){var v=d(g),y={length:g.length,uniqueChars:Object.keys(v).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(v).forEach(function(b){s.test(b)?y.uppercaseCount+=v[b]:i.test(b)?y.lowercaseCount+=v[b]:l.test(b)?y.numberCount+=v[b]:c.test(b)&&(y.symbolCount+=v[b])}),y}function m(g,v){var y=0;return y+=g.uniqueChars*v.pointsPerUnique,y+=(g.length-g.uniqueChars)*v.pointsPerRepeat,g.lowercaseCount>0&&(y+=v.pointsForContainingLower),g.uppercaseCount>0&&(y+=v.pointsForContainingUpper),g.numberCount>0&&(y+=v.pointsForContainingNumber),g.symbolCount>0&&(y+=v.pointsForContainingSymbol),y}function h(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;(0,r.default)(g);var y=f(g);return v=(0,n.default)(v||{},u),v.returnScore?m(y,v):y.length>=v.minLength&&y.lowercaseCount>=v.minLowercase&&y.uppercaseCount>=v.minUppercase&&y.numberCount>=v.minNumbers&&y.symbolCount>=v.minSymbols}e.exports=t.default,e.exports.default=t.default})($I,$I.exports);var CTe=$I.exports,mb={};function FI(e){"@babel/helpers - typeof";return FI=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},FI(e)}Object.defineProperty(mb,"__esModule",{value:!0});mb.default=MTe;mb.vatMatchers=void 0;var N6=TTe(qt),NTe=RTe(jm);function JK(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(JK=function(a){return a?n:t})(e)}function RTe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||FI(e)!="object"&&typeof e!="function")return{default:e};var n=JK(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var i=a?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function TTe(e){return e&&e.__esModule?e:{default:e}}var ATe=function(t){var n=t.match(/^(AU)?(\d{11})$/);if(!n)return!1;var r=[10,1,3,5,7,9,11,13,15,17,19];t=t.replace(/^AU/,"");for(var a=(parseInt(t.slice(0,1),10)-1).toString()+t.slice(1),s=0,i=0;i<11;i++)s+=r[i]*a.charAt(i);return s!==0&&s%89===0},ITe=function(t){var n=function(a){var s=a.pop(),i=[5,4,3,2,7,6,5,4],l=(11-a.reduce(function(c,u,d){return c+u*i[d]},0)%11)%11;return s===l};return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(t)&&n(t.match(/\d/g).map(function(r){return+r}))},OTe=function(t){var n=t.match(/^(PT)?(\d{9})$/);if(!n)return!1;var r=n[2],a=11-NTe.reverseMultiplyAndSum(r.split("").slice(0,8).map(function(s){return parseInt(s,10)}),9)%11;return a>9?parseInt(r[8],10)===0:a===parseInt(r[8],10)},R6=mb.vatMatchers={AT:function(t){return/^(AT)?U\d{8}$/.test(t)},BE:function(t){return/^(BE)?\d{10}$/.test(t)},BG:function(t){return/^(BG)?\d{9,10}$/.test(t)},HR:function(t){return/^(HR)?\d{11}$/.test(t)},CY:function(t){return/^(CY)?\w{9}$/.test(t)},CZ:function(t){return/^(CZ)?\d{8,10}$/.test(t)},DK:function(t){return/^(DK)?\d{8}$/.test(t)},EE:function(t){return/^(EE)?\d{9}$/.test(t)},FI:function(t){return/^(FI)?\d{8}$/.test(t)},FR:function(t){return/^(FR)?\w{2}\d{9}$/.test(t)},DE:function(t){return/^(DE)?\d{9}$/.test(t)},EL:function(t){return/^(EL)?\d{9}$/.test(t)},HU:function(t){return/^(HU)?\d{8}$/.test(t)},IE:function(t){return/^(IE)?\d{7}\w{1}(W)?$/.test(t)},IT:function(t){return/^(IT)?\d{11}$/.test(t)},LV:function(t){return/^(LV)?\d{11}$/.test(t)},LT:function(t){return/^(LT)?\d{9,12}$/.test(t)},LU:function(t){return/^(LU)?\d{8}$/.test(t)},MT:function(t){return/^(MT)?\d{8}$/.test(t)},NL:function(t){return/^(NL)?\d{9}B\d{2}$/.test(t)},PL:function(t){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(t)},PT:OTe,RO:function(t){return/^(RO)?\d{2,10}$/.test(t)},SK:function(t){return/^(SK)?\d{10}$/.test(t)},SI:function(t){return/^(SI)?\d{8}$/.test(t)},ES:function(t){return/^(ES)?\w\d{7}[A-Z]$/.test(t)},SE:function(t){return/^(SE)?\d{12}$/.test(t)},AL:function(t){return/^(AL)?\w{9}[A-Z]$/.test(t)},MK:function(t){return/^(MK)?\d{13}$/.test(t)},AU:ATe,BY:function(t){return/^(УÐÐ )?\d{9}$/.test(t)},CA:function(t){return/^(CA)?\d{9}$/.test(t)},IS:function(t){return/^(IS)?\d{5,6}$/.test(t)},IN:function(t){return/^(IN)?\d{15}$/.test(t)},ID:function(t){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(t)},IL:function(t){return/^(IL)?\d{9}$/.test(t)},KZ:function(t){return/^(KZ)?\d{12}$/.test(t)}
1251,NZ:function(t){return/^(NZ)?\d{9}$/.test(t)},NG:function(t){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(t)},NO:function(t){return/^(NO)?\d{9}MVA$/.test(t)},PH:function(t){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(t)},RU:function(t){return/^(RU)?(\d{10}|\d{12})$/.test(t)},SM:function(t){return/^(SM)?\d{5}$/.test(t)},SA:function(t){return/^(SA)?\d{15}$/.test(t)},RS:function(t){return/^(RS)?\d{9}$/.test(t)},CH:ITe,TR:function(t){return/^(TR)?\d{10}$/.test(t)},UA:function(t){return/^(UA)?\d{12}$/.test(t)},GB:function(t){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(t)},UZ:function(t){return/^(UZ)?\d{9}$/.test(t)},AR:function(t){return/^(AR)?\d{11}$/.test(t)},BO:function(t){return/^(BO)?\d{7}$/.test(t)},BR:function(t){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(t)},CL:function(t){return/^(CL)?\d{8}-\d{1}$/.test(t)},CO:function(t){return/^(CO)?\d{10}$/.test(t)},CR:function(t){return/^(CR)?\d{9,12}$/.test(t)},EC:function(t){return/^(EC)?\d{13}$/.test(t)},SV:function(t){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(t)},GT:function(t){return/^(GT)?\d{7}-\d{1}$/.test(t)},HN:function(t){return/^(HN)?$/.test(t)},MX:function(t){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(t)},NI:function(t){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(t)},PA:function(t){return/^(PA)?$/.test(t)},PY:function(t){return/^(PY)?\d{6,8}-\d{1}$/.test(t)},PE:function(t){return/^(PE)?\d{11}$/.test(t)},DO:function(t){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(t)},UY:function(t){return/^(UY)?\d{12}$/.test(t)},VE:function(t){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(t)}};function MTe(e,t){if((0,N6.default)(e),(0,N6.default)(t),t in R6)return R6[t](e);throw new Error("Invalid country code: '".concat(t,"'"))}(function(e,t){function n(fn){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ne){return typeof Ne}:function(Ne){return Ne&&typeof Symbol=="function"&&Ne.constructor===Symbol&&Ne!==Symbol.prototype?"symbol":typeof Ne},n(fn)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=we(eL),a=we(FK),s=we(ENe),i=we(xNe),l=we(_Ne),c=we(kNe),u=we(SNe),d=we(VK),f=we(CNe),m=we(NNe),h=we(Jk),g=we(RNe),v=we(tL),y=we(UK),b=we(TNe),E=we(ANe),w=we(INe),x=we(ONe),S=mt(ib),N=mt(ob),k=we(zNe),C=we(HNe),A=we(VNe),O=we(UNe),T=we(BNe),M=we(jNe),L=we(WNe),D=we(Ag),j=we(Ig),H=we(eRe),Y=we(tRe),z=we(rRe),K=we(aRe),ee=we(nL),oe=mt(Tg),J=we(iRe),se=we(BK),B=we(oRe),U=we(lRe),$=we(cRe),ce=we(uRe),be=we(dRe),ue=we(fRe),Ie=mt(lb),Ae=we(xRe),he=we(_Re),_e=we(kRe),ie=we(SRe),Ue=we(CRe),ae=we(NRe),pe=we(RRe),W=we(HK),q=we(TRe),te=we(ARe),X=we(IRe),le=we(ORe),me=we(MRe),fe=we(GK),ke=we(PRe),Se=we(DRe),Et=we(LRe),nt=we($Re),Pt=we(FRe),en=we(zRe),hn=we(jRe),rt=mt(cb),et=we(YRe),Kt=we(KRe),zn=we(ZRe),xt=ub,rr=we(tTe),ir=we(nTe),Tn=we(rTe),Ct=we(Og),_r=we(aTe),Qn=we(db),Ce=we(lTe),ut=we(cTe),pn=we(WK),Jt=we(uTe),In=we(dTe),Dn=we(fTe),or=we(mTe),Zt=we(hTe),tr=mt(fb),Fe=we(ZK),st=we(KK),gt=we(XK),ht=we(yTe),Ee=we(bTe),We=we(wTe),it=we(ETe),_t=we(QK),vn=we(xTe),An=we(_Te),je=we(kTe),kt=we(STe),Lt=we(CTe),ne=we(mb);function Be(fn){if(typeof WeakMap!="function")return null;var Ne=new WeakMap,lt=new WeakMap;return(Be=function(Ke){return Ke?lt:Ne})(fn)}function mt(fn,Ne){if(!Ne&&fn&&fn.__esModule)return fn;if(fn===null||n(fn)!="object"&&typeof fn!="function")return{default:fn};var lt=Be(Ne);if(lt&<.has(fn))return lt.get(fn);var wt={__proto__:null},Ke=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var St in fn)if(St!=="default"&&{}.hasOwnProperty.call(fn,St)){var ln=Ke?Object.getOwnPropertyDescriptor(fn,St):null;ln&&(ln.get||ln.set)?Object.defineProperty(wt,St,ln):wt[St]=fn[St]}return wt.default=fn,lt&<.set(fn,wt),wt}function we(fn){return fn&&fn.__esModule?fn:{default:fn}}var vt="13.12.0",It={version:vt,toDate:r.default,toFloat:a.default,toInt:s.default,toBoolean:i.default,equals:l.default,contains:c.default,matches:u.default,isEmail:d.default,isURL:f.default,isMACAddress:m.default,isIP:h.default,isIPRange:g.default,isFQDN:v.default,isBoolean:E.default,isIBAN:Ie.default,isBIC:Ae.default,isAbaRouting:x.default,isAlpha:S.default,isAlphaLocales:S.locales,isAlphanumeric:N.default,isAlphanumericLocales:N.locales,isNumeric:k.default,isPassportNumber:C.default,isPort:A.default,isLowercase:O.default,isUppercase:T.default,isAscii:L.default,isFullWidth:D.default,isHalfWidth:j.default,isVariableWidth:H.default,isMultibyte:Y.default,isSemVer:z.default,isSurrogatePair:K.default,isInt:ee.default,isIMEI:M.default,isFloat:oe.default,isFloatLocales:oe.locales,isDecimal:J.default,isHexadecimal:se.default,isOctal:B.default,isDiv
1251isibleBy:U.default,isHexColor:$.default,isRgbColor:ce.default,isHSL:be.default,isISRC:ue.default,isMD5:he.default,isHash:_e.default,isJWT:ie.default,isJSON:Ue.default,isEmpty:ae.default,isLength:pe.default,isLocale:w.default,isByteLength:W.default,isUUID:q.default,isMongoId:te.default,isAfter:X.default,isBefore:le.default,isIn:me.default,isLuhnNumber:fe.default,isCreditCard:ke.default,isIdentityCard:Se.default,isEAN:Et.default,isISIN:nt.default,isISBN:Pt.default,isISSN:en.default,isMobilePhone:rt.default,isMobilePhoneLocales:rt.locales,isPostalCode:tr.default,isPostalCodeLocales:tr.locales,isEthereumAddress:et.default,isCurrency:Kt.default,isBtcAddress:zn.default,isISO6346:xt.isISO6346,isFreightContainerID:xt.isFreightContainerID,isISO6391:rr.default,isISO8601:ir.default,isRFC3339:Tn.default,isISO31661Alpha2:Ct.default,isISO31661Alpha3:_r.default,isISO4217:Qn.default,isBase32:Ce.default,isBase58:ut.default,isBase64:pn.default,isDataURI:Jt.default,isMagnetURI:In.default,isMailtoURI:Dn.default,isMimeType:or.default,isLatLong:Zt.default,ltrim:Fe.default,rtrim:st.default,trim:gt.default,escape:ht.default,unescape:Ee.default,stripLow:We.default,whitelist:it.default,blacklist:_t.default,isWhitelisted:vn.default,normalizeEmail:An.default,toString,isSlug:je.default,isStrongPassword:Lt.default,isTaxID:hn.default,isDate:y.default,isTime:b.default,isLicensePlate:kt.default,isVAT:ne.default,ibanLocales:Ie.locales};t.default=It,e.exports=t.default,e.exports.default=t.default})(XT,XT.exports);var PTe=XT.exports;const zI=id(PTe),Tr={organization:{subscription:{plan:{free:{price_amount:0,team_count_limit:1,users_per_team_limit:1,collection_limit:3,flow_limit:1,board_limit:1,has:{iterations:!1,collections:!0,notifications:!1,user_roles:!1,flow_linking:!1}},personal:{price_amount:400,team_count_limit:1,users_per_team_limit:10,has:{iterations:!0,collections:!0,notifications:!0,user_roles:!0,flow_linking:!1}},professional:{price_amount:1200,team_count_limit:3,users_per_team_limit:25,has:{iterations:!0,collections:!0,notifications:!0,user_roles:!0,public_sharing_policy:!0,flow_linking:!1}},organization:{price_amount:2e3,team_count_limit:1e6,users_per_team_limit:1e5,has:{iterations:!0,collections:!0,notifications:!0,user_roles:!0,domain_specific_invitations:!0,public_sharing_policy:!0,flow_linking:!0}}}}},iteration:{url:{adjustmentList:[{allowed_for:{prototypes_viewer:!0,sidepanel:!0},conditions:[{type:"match-tldts-domainWithoutSuffix",target:"example"}],modifications:[{type:"search-add",key:"hello",value:"world"},{type:"search-add",key:"foo",value:"bar"}]},{allowed_for:{prototypes_viewer:!0,sidepanel:!1},conditions:[{type:"require-iteration-displayformat",target:"inline"},{type:"match-tldts-domainWithoutSuffix",target:"figma"}],modifications:[{type:"search-add",key:"embed-host",value:"share"},{type:"search-remove",key:"show-proto-sidebar"}]}]}}};function DTe(e,t){return e.endsWith(t)?e.length===t.length||e[e.length-t.length-1]===".":!1}function LTe(e,t){const n=e.length-t.length-2,r=e.lastIndexOf(".",n);return r===-1?e:e.slice(r+1)}function $Te(e,t,n){if(n.validHosts!==null){const a=n.validHosts;for(const s of a)if(DTe(t,s))return s}let r=0;if(t.startsWith("."))for(;r<t.length&&t[r]===".";)r+=1;return e.length===t.length-r?null:LTe(t,e)}function FTe(e,t){return e.slice(0,-t.length-1)}function T6(e,t){let n=0,r=e.length,a=!1;if(!t){if(e.startsWith("data:"))return null;for(;n<e.length&&e.charCodeAt(n)<=32;)n+=1;for(;r>n+1&&e.charCodeAt(r-1)<=32;)r-=1;if(e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47)n+=2;else{const u=e.indexOf(":/",n);if(u!==-1){const d=u-n,f=e.charCodeAt(n),m=e.charCodeAt(n+1),h=e.charCodeAt(n+2),g=e.charCodeAt(n+3),v=e.charCodeAt(n+4);if(!(d===5&&f===104&&m===116&&h===116&&g===112&&v===115)){if(!(d===4&&f===104&&m===116&&h===116&&g===112)){if(!(d===3&&f===119&&m===115&&h===115)){if(!(d===2&&f===119&&m===115))for(let y=n;y<u;y+=1){const b=e.charCodeAt(y)|32;if(!(b>=97&&b<=122||b>=48&&b<=57||b===46||b===45||b===43))return null}}}}for(n=u+2;e.charCodeAt(n)===47;)n+=1}}let i=-1,l=-1,c=-1;for(let u=n;u<r;u+=1){const d=e.charCodeAt(u);if(d===35||d===47||d===63){r=u;break}else d===64?i=u:d===93?l=u:d===58?c=u:d>=65&&d<=90&&(a=!0)}if(i!==-1&&i>n&&i<r&&(n=i+1),e.charCodeAt(n)===91)return l!==-1?e.slice(n+1,l).toLowerCase():null;c!==-1&&c>n&&c<r&&(r=c)}for(;r>n+1&&e.charCodeAt(r-1)===46;)r-=1;const s=n!==0||r!==e.length?e.slice(n,r):e;return a?s.toLowerCase():s}function zTe(e){if(e.length<7||e.length>15)return!1;let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);if(r===46)t+=1;else if(r<48||r>57)return!1}return t===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function HTe(e){if(e.length<3)return!1;let t=e.startsWith("[")?1:0,n=e.length;if(e[n-1]==="]"&&(n-=1),n-t>39)return!1;let r=!1;for(;t<n;t+=1){const a=e.charCodeAt(t);if(a===58)r=!0;else if(!(a>=48&&a<=57||a>=97&&a<=102||a>=65&&a<=90))return!1}return r}function VTe(e){return HTe(e)||zTe(e)}function A6(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function I6(e){if(e.length>255||e.length===0||!A6(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let t=-1,n=-1;const r=e.length;for(let a=0;a<r;a+=1){const s=e.charCodeAt(a);if(s===46){if(a-t>64||n===46||n===45||n===95)return!1;t=a}else if(!(A6(s)||s===45||s===95))return!1;n=s}return r-t-1<=63&&n!==45}
1251function eZ({allowIcannDomains:e=!0,allowPrivateDomains:t=!1,detectIp:n=!0,extractHostname:r=!0,mixedInputs:a=!0,validHosts:s=null,validateHostname:i=!0}){return{allowIcannDomains:e,allowPrivateDomains:t,detectIp:n,extractHostname:r,mixedInputs:a,validHosts:s,validateHostname:i}}const UTe=eZ({});function BTe(e){return e===void 0?UTe:eZ(e)}function jTe(e,t){return t.length===e.length?"":e.slice(0,-t.length-1)}function WTe(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,publicSuffix:null,subdomain:null}}function GTe(e,t,n,r,a){const s=BTe(r);return typeof e!="string"||(s.extractHostname?s.mixedInputs?a.hostname=T6(e,I6(e)):a.hostname=T6(e,!1):a.hostname=e,t===0||a.hostname===null)||s.detectIp&&(a.isIp=VTe(a.hostname),a.isIp)?a:s.validateHostname&&s.extractHostname&&!I6(a.hostname)?(a.hostname=null,a):(n(a.hostname,s,a),t===2||a.publicSuffix===null||(a.domain=$Te(a.publicSuffix,a.hostname,s),t===3||a.domain===null)||(a.subdomain=jTe(a.hostname,a.domain),t===4)||(a.domainWithoutSuffix=FTe(a.domain,a.publicSuffix)),a)}function qTe(e,t,n){if(!t.allowPrivateDomains&&e.length>3){const r=e.length-1,a=e.charCodeAt(r),s=e.charCodeAt(r-1),i=e.charCodeAt(r-2),l=e.charCodeAt(r-3);if(a===109&&s===111&&i===99&&l===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="com",!0;if(a===103&&s===114&&i===111&&l===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="org",!0;if(a===117&&s===100&&i===101&&l===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="edu",!0;if(a===118&&s===111&&i===103&&l===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="gov",!0;if(a===116&&s===101&&i===110&&l===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="net",!0;if(a===101&&s===100&&i===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="de",!0}return!1}const YTe=function(){const e=[1,{}],t=[2,{}],n=[0,{city:e}];return[0,{ck:[0,{www:e}],jp:[0,{kawasaki:n,kitakyushu:n,kobe:n,nagoya:n,sapporo:n,sendai:n,yokohama:n}],dev:[0,{hrsn:[0,{psl:[0,{wc:[0,{ignored:t,sub:[0,{ignored:t}]}]}]}]}]}]}(),KTe=function(){const e=[1,{}],t=[2,{}],n=[1,{com:e,edu:e,gov:e,net:e,org:e}],r=[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e}],a=[0,{"*":t}],s=[2,{s:a}],i=[0,{relay:t}],l=[2,{id:t}],c=[1,{gov:e}],u=[0,{"transfer-webapp":t}],d=[0,{notebook:t,studio:t}],f=[0,{labeling:t,notebook:t,studio:t}],m=[0,{notebook:t}],h=[0,{labeling:t,notebook:t,"notebook-fips":t,studio:t}],g=[0,{notebook:t,"notebook-fips":t,studio:t,"studio-fips":t}],v=[0,{"*":e}],y=[1,{co:t}],b=[0,{objects:t}],E=[2,{nodes:t}],w=[0,{my:a}],x=[0,{s3:t,"s3-accesspoint":t,"s3-website":t}],S=[0,{s3:t,"s3-accesspoint":t}],N=[0,{direct:t}],k=[0,{"webview-assets":t}],C=[0,{vfs:t,"webview-assets":t}],A=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":k,cloud9:C}],O=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:S,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":k,cloud9:C}],T=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":k,cloud9:C}],M=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t}],L=[0,{s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-website":t}],D=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:L,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":k,cloud9:C}],j=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:L,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-deprecated":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":k,cloud9:C}],H=[0,{s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t}],Y=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:H,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t}],z=[0,{auth:t}],K=[0,{auth:t,"auth-fips":t}],ee=[0,{"auth-fips":t}],oe=[0,{apps:t}],J=[0,{paas:t}],se=[2,{eu:t}],B=[0,{app:t}],U=[0,{site:t}],$=[1,{com:e,edu:e,net:e,org:e}],ce=[0,{j:t}],be=[0,{dyn:t}],ue=[1,{co:e,com:e,edu:e,gov:e,net:e,org:e}],Ie=[0,{p:t}],Ae=[0,{user:t}],he=[0,{shop:t}],_e=[0,{cdn:t}],ie=[0,{cust:t,reservd:t}],Ue=[0,{cust:t}],ae=[0,{s3:t}],pe=[1,{biz:e,com:e,edu:e,gov:e,info:e,net:e,org:e}],W=[0,{ipfs:t}],q=[1,{framer:t}],te=[0,{forgot:t}],X=[1,{gs:e}],le=[0,{nes:e}],me=[1,{k12:e,cc:e,lib:e}],fe=[1,{cc:e,lib:e}];return[0,{ac:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,drr:t,feedback:t,forms:t}],ad:e,ae:[1,{ac:e,co:e,gov:e,mil:e,net:e,org:e,sch:e}],aero:[1,{airline:e,airport:e,"accident-investigation":e,"accident-prevention":e,aerobatic:e,aeroclub:e,aerodrome:e,agents:e,"air-surveillance":e,"air-traffic-control":e,aircraft:e,airtraffic:e,ambulance:e,association:e,author:e,ballooning:e,broker:e,caa:e,cargo:e,catering:e,certification:e,championship:e,charter:e,civilaviation:e,club:e,conference:e,consultant:e,consulting:e,control:e,council:e,crew:e,design:e,dgca:e,educator:e,emergency:e,engine:e,engineer:e,entertainment:e,equipment:e,exchange:e,express:e,federation:e,flight:e,freight:e,fuel:e,gliding:e,government:e,groundhandling:e,group:e,hanggliding:e,homebuilt:e,insurance:e,journal:e,journalist:e,leasing:e,logistics:e,magazine:e,maintenance:e,marketplace:e,media:e,microlight:e,modelling:e,navigation:e,parachuting:e,paragliding:e,"passenger-association":e,pilot:e,press:e,production:e,recreation:e,repbody:e,res:e,research:e,rotorcraft:e,safety:e,scientist:e,services:e,show:e,skydiving:e,software:e,student:e,taxi:e,trader:e,trading:e,trainer:e,union:e,workinggroup:e,works:e}],af:n,ag:[1,{co:e,com:e,net:e,nom:e,org:e,obj:t}
vendor: 8,796 bytes, line 1251
1251],ai:[1,{com:e,net:e,off:e,org:e,uwu:t,framer:t}],al:r,am:[1,{co:e,com:e,commune:e,net:e,org:e,radio:t}],ao:[1,{co:e,ed:e,edu:e,gov:e,gv:e,it:e,og:e,org:e,pb:e}],aq:e,ar:[1,{bet:e,com:e,coop:e,edu:e,gob:e,gov:e,int:e,mil:e,musica:e,mutual:e,net:e,org:e,seg:e,senasa:e,tur:e}],arpa:[1,{e164:e,home:e,"in-addr":e,ip6:e,iris:e,uri:e,urn:e}],as:c,asia:[1,{cloudns:t,daemon:t,dix:t}],at:[1,{ac:[1,{sth:e}],co:e,gv:e,or:e,funkfeuer:[0,{wien:t}],futurecms:[0,{"*":t,ex:a,in:a}],futurehosting:t,futuremailing:t,ortsinfo:[0,{ex:a,kunden:a}],biz:t,info:t,"123webseite":t,priv:t,myspreadshop:t,"12hp":t,"2ix":t,"4lima":t,"lima-city":t}],au:[1,{asn:e,com:[1,{cloudlets:[0,{mel:t}],myspreadshop:t}],edu:[1,{act:e,catholic:e,nsw:[1,{schools:e}],nt:e,qld:e,sa:e,tas:e,vic:e,wa:e}],gov:[1,{qld:e,sa:e,tas:e,vic:e,wa:e}],id:e,net:e,org:e,conf:e,oz:e,act:e,nsw:e,nt:e,qld:e,sa:e,tas:e,vic:e,wa:e}],aw:[1,{com:e}],ax:e,az:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,int:e,mil:e,name:e,net:e,org:e,pp:e,pro:e}],ba:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,rs:t}],bb:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,net:e,org:e,store:e,tv:e}],bd:v,be:[1,{ac:e,cloudns:t,webhosting:t,interhostsolutions:[0,{cloud:t}],kuleuven:[0,{ezproxy:t}],"123website":t,myspreadshop:t,transurl:a}],bf:c,bg:[1,{0:e,1:e,2:e,3:e,4:e,5:e,6:e,7:e,8:e,9:e,a:e,b:e,c:e,d:e,e,f:e,g:e,h:e,i:e,j:e,k:e,l:e,m:e,n:e,o:e,p:e,q:e,r:e,s:e,t:e,u:e,v:e,w:e,x:e,y:e,z:e,barsy:t}],bh:n,bi:[1,{co:e,com:e,edu:e,or:e,org:e}],biz:[1,{activetrail:t,"cloud-ip":t,cloudns:t,jozi:t,dyndns:t,"for-better":t,"for-more":t,"for-some":t,"for-the":t,selfip:t,webhop:t,orx:t,mmafan:t,myftp:t,"no-ip":t,dscloud:t}],bj:[1,{africa:e,agro:e,architectes:e,assur:e,avocats:e,co:e,com:e,eco:e,econo:e,edu:e,info:e,loisirs:e,money:e,net:e,org:e,ote:e,restaurant:e,resto:e,tourism:e,univ:e}],bm:n,bn:[1,{com:e,edu:e,gov:e,net:e,org:e,co:t}],bo:[1,{com:e,edu:e,gob:e,int:e,mil:e,net:e,org:e,tv:e,web:e,academia:e,agro:e,arte:e,blog:e,bolivia:e,ciencia:e,cooperativa:e,democracia:e,deporte:e,ecologia:e,economia:e,empresa:e,indigena:e,industria:e,info:e,medicina:e,movimiento:e,musica:e,natural:e,nombre:e,noticias:e,patria:e,plurinacional:e,politica:e,profesional:e,pueblo:e,revista:e,salud:e,tecnologia:e,tksat:e,transporte:e,wiki:e}],br:[1,{"9guacu":e,abc:e,adm:e,adv:e,agr:e,aju:e,am:e,anani:e,aparecida:e,app:e,arq:e,art:e,ato:e,b:e,barueri:e,belem:e,bet:e,bhz:e,bib:e,bio:e,blog:e,bmd:e,boavista:e,bsb:e,campinagrande:e,campinas:e,caxias:e,cim:e,cng:e,cnt:e,com:[1,{simplesite:t}],contagem:e,coop:e,coz:e,cri:e,cuiaba:e,curitiba:e,def:e,des:e,det:e,dev:e,ecn:e,eco:e,edu:e,emp:e,enf:e,eng:e,esp:e,etc:e,eti:e,far:e,feira:e,flog:e,floripa:e,fm:e,fnd:e,fortal:e,fot:e,foz:e,fst:e,g12:e,geo:e,ggf:e,goiania:e,gov:[1,{ac:e,al:e,am:e,ap:e,ba:e,ce:e,df:e,es:e,go:e,ma:e,mg:e,ms:e,mt:e,pa:e,pb:e,pe:e,pi:e,pr:e,rj:e,rn:e,ro:e,rr:e,rs:e,sc:e,se:e,sp:e,to:e}],gru:e,imb:e,ind:e,inf:e,jab:e,jampa:e,jdf:e,joinville:e,jor:e,jus:e,leg:[1,{ac:t,al:t,am:t,ap:t,ba:t,ce:t,df:t,es:t,go:t,ma:t,mg:t,ms:t,mt:t,pa:t,pb:t,pe:t,pi:t,pr:t,rj:t,rn:t,ro:t,rr:t,rs:t,sc:t,se:t,sp:t,to:t}],leilao:e,lel:e,log:e,londrina:e,macapa:e,maceio:e,manaus:e,maringa:e,mat:e,med:e,mil:e,morena:e,mp:e,mus:e,natal:e,net:e,niteroi:e,nom:v,not:e,ntr:e,odo:e,ong:e,org:e,osasco:e,palmas:e,poa:e,ppg:e,pro:e,psc:e,psi:e,pvh:e,qsl:e,radio:e,rec:e,recife:e,rep:e,ribeirao:e,rio:e,riobranco:e,riopreto:e,salvador:e,sampa:e,santamaria:e,santoandre:e,saobernardo:e,saogonca:e,seg:e,sjc:e,slg:e,slz:e,sorocaba:e,srv:e,taxi:e,tc:e,tec:e,teo:e,the:e,tmp:e,trd:e,tur:e,tv:e,udi:e,vet:e,vix:e,vlog:e,wiki:e,zlg:e}],bs:[1,{com:e,edu:e,gov:e,net:e,org:e,we:t}],bt:n,bv:e,bw:[1,{ac:e,co:e,gov:e,net:e,org:e}],by:[1,{gov:e,mil:e,com:e,of:e,mediatech:t}],bz:[1,{co:e,com:e,edu:e,gov:e,net:e,org:e,za:t,mydns:t,gsj:t}],ca:[1,{ab:e,bc:e,mb:e,nb:e,nf:e,nl:e,ns:e,nt:e,nu:e,on:e,pe:e,qc:e,sk:e,yk:e,gc:e,barsy:t,awdev:a,co:t,"no-ip":t,myspreadshop:t,box:t}],cat:e,cc:[1,{cleverapps:t,cloudns:t,ftpaccess:t,"game-server":t,myphotos:t,scrapping:t,twmail:t,csx:t,fantasyleague:t,spawn:[0,{instances:t}]}],cd:c,cf:e,cg:e,ch:[1,{square7:t,cloudns:t,cloudscale:[0,{cust:t,lpg:b,rma:b}],flow:[0,{ae:[0,{alp1:t}],appengine:t}],"linkyard-cloud":t,gotdns:t,dnsking:t,"123website":t,myspreadshop:t,firenet:[0,{"*":t,svc:a}],"12hp":t,"2ix":t,"4lima":t,"lima-city":t}],ci:[1,{ac:e,"xn--aroport-bya":e,aéroport:e,asso:e,co:e,com:e,ed:e,edu:e,go:e,gouv:e,int:e,net:e,or:e,org:e}],ck:v,cl:[1,{co:e,gob:e,gov:e,mil:e,cloudns:t}],cm:[1,{co:e,com:e,gov:e,net:e}],cn:[1,{ac:e,com:[1,{amazonaws:[0,{"cn-north-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t}],"cn-northwest-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:S,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t}],compute:a,airflow:[0,{"cn-north-1":a,"cn-northwest-1":a}],eb:[0,{"cn-north-1":t,"cn-northwest-1":t}],elb:a}],sagemaker:[0,{"cn-north-1":d,"cn-northwest-1":d}]}],edu:e,gov:e,mil:e,net:e,org:e,"xn--55qx5d":e,å
¬å¸:e,"xn--od0alg":e,網絡:e,"xn--io0a7i":e,ç½ç»:e,ah:e,bj:e,cq:e,fj:e,gd:e,gs:e,gx:e,gz:e,ha:e,hb:e,he:e,hi:e,hk:e,hl:e,hn:e,jl:e,js:e,jx:e,ln:e,mo:e,nm:e,nx:e,qh:e,sc:e,sd:e,sh:[1,{as:t}],sn:e,sx:e,tj:e,tw:e,xj:e,xz:e,yn:e,zj:e,"canva-apps":t,canvasite:w,myqnapcloud:t,quickconnect:N}],co:[1,{com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e,carrd:t,crd:t,otap:a,leadpages:t,lpages:t,mypi:t,xmit:a,firewalledreplit:l,repl:l,supabase:t}],com:[1,{a2hosted:t,cpserver:t,adobeaemcloud:[2,{dev:a}],africa:t,airkitapps:t,"airkitapps-au":t,aivencloud:t,alibabacloudcs:t,kasserver:t,amazonaws:[0,{"af-south-1":A,"ap-east-1":O,"ap-northeast-1":T,"ap-northeast-2":T,"ap-northeast-3":A,"ap-south-1":T,"ap-south-2":M,"ap-southeast-1":T,"ap-southeast-2":T,"ap-southeast-3":M,"ap-southeast-4":M,"ap-southeast-5":[0,{"execute-api":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t}],"ca-central-1":D,"ca-west-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:L,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t}],"eu-central-1":T,"eu-central-2":M,"eu-north-1":O,"eu-south-1":A,"eu-south-2":M,"eu-west-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":k,cloud9:C}],"eu-west-2":O,"eu-west-3":A,"il-central-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:x,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":k,cloud9:[0,{vfs:t}]}],"me-central-1":M,"me-south-1":O,"sa-east-1":A,"us-east-1":[2,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:L,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-deprecated":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":k,cloud9:C}],"us-east-2":j,"us-gov-east-1":Y,"us-gov-west-1":Y,"us-west-1":D,"us-west-2":j,compute:a,"compute-1":a,airflow:[0,{"af-south-1":a,"ap-east-1":a,"ap-northeast-1":a,"ap-northeast-2":a,"ap-northeast-3":a,"ap-south-1":a,"ap-south-2":a,"ap-southeast-1":a,"ap-southeast-2":a,"ap-southeast-3":a,"ap-southeast-4":a,"ca-central-1":a,"ca-west-1":a,"eu-central-1":a,"eu-central-2":a,"eu-north-1":a,"eu-south-1":a,"eu-south-2":a,"eu-west-1":a,"eu-west-2":a,"eu-west-3":a,"il-central-1":a,"me-central-1":a,"me-south-1":a,"sa-east-1":a,"us-east-1":a,"us-east-2":a,"us-west-1":a,"us-west-2":a}],s3:t,"s3-1":t,"s3-ap-east-1":t,"s3-ap-northeast-1":t,"s3-ap-northeast-2":t,"s3-ap-northeast-3":t,"s3-ap-south-1":t,"s3-ap-southeast-1":t,"s3-ap-southeast-2":t,"s3-ca-central-1":t,"s3-eu-central-1":t,"s3-eu-north-1":t,"s3-eu-west-1":t,"s3-eu-west-2":t,"s3-eu-west-3":t,"s3-external-1":t,"s3-fips-us-gov-east-1":t,"s3-fips-us-gov-west-1":t,"s3-global":[0,{accesspoint:[0,{mrap:t}]}],"s3-me-south-1":t,"s3-sa-east-1":t,"s3-us-east-2":t,"s3-us-gov-east-1":t,"s3-us-gov-west-1":t,"s3-us-west-1":t,"s3-us-west-2":t,"s3-website-ap-northeast-1":t,"s3-website-ap-southeast-1":t,"s3-website-ap-southeast-2":t,"s3-website-eu-west-1":t,"s3-website-sa-east-1":t,"s3-website-us-east-1":t,"s3-website-us-gov-west-1":t,"s3-website-us-west-1":t,"s3-website-us-west-2":t,elb:a}],amazoncognito:[0,{"af-south-1":z,"ap-east-1":z,"ap-northeast-1":z,"ap-northeast-2":z,"ap-northeast-3":z,"ap-south-1":z,"ap-south-2":z,"ap-southeast-1":z,"ap-southeast-2":z,"ap-southeast-3":z,"ap-southeast-4":z,"ap-southeast-5":z,"ca-central-1":z,"ca-west-1":z,"eu-central-1":z,"eu-central-2":z,"eu-north-1":z,"eu-south-1":z,"eu-south-2":z,"eu-west-1":z,"eu-west-2":z,"eu-west-3":z,"il-ce
1251ntral-1":z,"me-central-1":z,"me-south-1":z,"sa-east-1":z,"us-east-1":K,"us-east-2":K,"us-gov-east-1":ee,"us-gov-west-1":ee,"us-west-1":K,"us-west-2":K}],amplifyapp:t,awsapprunner:a,awsapps:t,elasticbeanstalk:[2,{"af-south-1":t,"ap-east-1":t,"ap-northeast-1":t,"ap-northeast-2":t,"ap-northeast-3":t,"ap-south-1":t,"ap-southeast-1":t,"ap-southeast-2":t,"ap-southeast-3":t,"ca-central-1":t,"eu-central-1":t,"eu-north-1":t,"eu-south-1":t,"eu-west-1":t,"eu-west-2":t,"eu-west-3":t,"il-central-1":t,"me-south-1":t,"sa-east-1":t,"us-east-1":t,"us-east-2":t,"us-gov-east-1":t,"us-gov-west-1":t,"us-west-1":t,"us-west-2":t}],awsglobalaccelerator:t,siiites:t,appspacehosted:t,appspaceusercontent:t,"on-aptible":t,myasustor:t,"balena-devices":t,boutir:t,bplaced:t,cafjs:t,"canva-apps":t,"cdn77-storage":t,br:t,cn:t,de:t,eu:t,jpn:t,mex:t,ru:t,sa:t,uk:t,us:t,za:t,"clever-cloud":[0,{services:a}],dnsabr:t,"ip-ddns":t,jdevcloud:t,wpdevcloud:t,"cf-ipfs":t,"cloudflare-ipfs":t,trycloudflare:t,co:t,devinapps:a,builtwithdark:t,datadetect:[0,{demo:t,instance:t}],dattolocal:t,dattorelay:t,dattoweb:t,mydatto:t,digitaloceanspaces:a,discordsays:t,discordsez:t,drayddns:t,dreamhosters:t,durumis:t,mydrobo:t,blogdns:t,cechire:t,dnsalias:t,dnsdojo:t,doesntexist:t,dontexist:t,doomdns:t,"dyn-o-saur":t,dynalias:t,"dyndns-at-home":t,"dyndns-at-work":t,"dyndns-blog":t,"dyndns-free":t,"dyndns-home":t,"dyndns-ip":t,"dyndns-mail":t,"dyndns-office":t,"dyndns-pics":t,"dyndns-remote":t,"dyndns-server":t,"dyndns-web":t,"dyndns-wiki":t,"dyndns-work":t,"est-a-la-maison":t,"est-a-la-masion":t,"est-le-patron":t,"est-mon-blogueur":t,"from-ak":t,"from-al":t,"from-ar":t,"from-ca":t,"from-ct":t,"from-dc":t,"from-de":t,"from-fl":t,"from-ga":t,"from-hi":t,"from-ia":t,"from-id":t,"from-il":t,"from-in":t,"from-ks":t,"from-ky":t,"from-ma":t,"from-md":t,"from-mi":t,"from-mn":t,"from-mo":t,"from-ms":t,"from-mt":t,"from-nc":t,"from-nd":t,"from-ne":t,"from-nh":t,"from-nj":t,"from-nm":t,"from-nv":t,"from-oh":t,"from-ok":t,"from-or":t,"from-pa":t,"from-pr":t,"from-ri":t,"from-sc":t,"from-sd":t,"from-tn":t,"from-tx":t,"from-ut":t,"from-va":t,"from-vt":t,"from-wa":t,"from-wi":t,"from-wv":t,"from-wy":t,getmyip:t,gotdns:t,"hobby-site":t,homelinux:t,homeunix:t,iamallama:t,"is-a-anarchist":t,"is-a-blogger":t,"is-a-bookkeeper":t,"is-a-bulls-fan":t,"is-a-caterer":t,"is-a-chef":t,"is-a-conservative":t,"is-a-cpa":t,"is-a-cubicle-slave":t,"is-a-democrat":t,"is-a-designer":t,"is-a-doctor":t,"is-a-financialadvisor":t,"is-a-geek":t,"is-a-green":t,"is-a-guru":t,"is-a-hard-worker":t,"is-a-hunter":t,"is-a-landscaper":t,"is-a-lawyer":t,"is-a-liberal":t,"is-a-libertarian":t,"is-a-llama":t,"is-a-musician":t,"is-a-nascarfan":t,"is-a-nurse":t,"is-a-painter":t,"is-a-personaltrainer":t,"is-a-photographer":t,"is-a-player":t,"is-a-republican":t,"is-a-rockstar":t,"is-a-socialist":t,"is-a-student":t,"is-a-teacher":t,"is-a-techie":t,"is-a-therapist":t,"is-an-accountant":t,"is-an-actor":t,"is-an-actress":t,"is-an-anarchist":t,"is-an-artist":t,"is-an-engineer":t,"is-an-entertainer":t,"is-certified":t,"is-gone":t,"is-into-anime":t,"is-into-cars":t,"is-into-cartoons":t,"is-into-games":t,"is-leet":t,"is-not-certified":t,"is-slick":t,"is-uberleet":t,"is-with-theband":t,"isa-geek":t,"isa-hockeynut":t,issmarterthanyou:t,"likes-pie":t,likescandy:t,"neat-url":t,"saves-the-whales":t,selfip:t,"sells-for-less":t,"sells-for-u":t,servebbs:t,"simple-url":t,"space-to-rent":t,"teaches-yoga":t,writesthisblog:t,ddnsfree:t,ddnsgeek:t,giize:t,gleeze:t,kozow:t,loseyourip:t,ooguy:t,theworkpc:t,mytuleap:t,"tuleap-partners":t,encoreapi:t,evennode:[0,{"eu-1":t,"eu-2":t,"eu-3":t,"eu-4":t,"us-1":t,"us-2":t,"us-3":t,"us-4":t}],onfabrica:t,"fastly-edge":t,"fastly-terrarium":t,"fastvps-server":t,mydobiss:t,firebaseapp:t,fldrv:t,forgeblocks:t,framercanvas:t,"freebox-os":t,freeboxos:t,freemyip:t,aliases121:t,gentapps:t,gentlentapis:t,githubusercontent:t,"0emm":a,appspot:[2,{r:a}],blogspot:t,codespot:t,googleapis:t,googlecode:t,pagespeedmobilizer:t,withgoogle:t,withyoutube:t,grayjayleagues:t,hatenablog:t,hatenadiary:t,herokuapp:t,gr:t,smushcdn:t,wphostedmail:t,wpmucdn:t,pixolino:t,"apps-1and1":t,"live-website":t,dopaas:t,"hosted-by-previder":J,hosteur:[0,{"rag-cloud":t,"rag-cloud-ch":t}],"ik-server":[0,{jcloud:t,"jcloud-ver-jpc":t}],jelastic:[0,{demo:t}],massivegrid:J,wafaicloud:[0,{jed:t,ryd:t}],webadorsite:t,joyent:[0,{cns:a}],lpusercontent:t,linode:[0,{members:t,nodebalancer:a}],linodeobjects:a,linodeusercontent:[0,{ip:t}],localtonet:t,lovableproject:t,barsycenter:t,barsyonline:t,modelscape:t,mwcloudnonprod:t,polyspace:t,mazeplay:t,miniserver:t,atmeta:t,fbsbx:oe,meteorapp:se,routingthecloud:t,mydbserver:t,hostedpi:t,"mythic-beasts":[0,{caracal:t,customer:t,fentiger:t,lynx:t,ocelot:t,oncilla:t,onza:t,sphinx:t,vs:t,x:t,yali:t}
vendor: 9,268 bytes, line 1251
1251],nospamproxy:[0,{cloud:[2,{o365:t}]}],"4u":t,nfshost:t,"3utilities":t,blogsyte:t,ciscofreak:t,damnserver:t,ddnsking:t,ditchyourip:t,dnsiskinky:t,dynns:t,geekgalaxy:t,"health-carereform":t,homesecuritymac:t,homesecuritypc:t,myactivedirectory:t,mysecuritycamera:t,myvnc:t,"net-freaks":t,onthewifi:t,point2this:t,quicksytes:t,securitytactics:t,servebeer:t,servecounterstrike:t,serveexchange:t,serveftp:t,servegame:t,servehalflife:t,servehttp:t,servehumour:t,serveirc:t,servemp3:t,servep2p:t,servepics:t,servequake:t,servesarcasm:t,stufftoread:t,unusualperson:t,workisboring:t,myiphost:t,observableusercontent:[0,{static:t}],simplesite:t,orsites:t,operaunite:t,"customer-oci":[0,{"*":t,oci:a,ocp:a,ocs:a}],oraclecloudapps:a,oraclegovcloudapps:a,"authgear-staging":t,authgearapps:t,skygearapp:t,outsystemscloud:t,ownprovider:t,pgfog:t,pagexl:t,gotpantheon:t,paywhirl:a,upsunapp:t,"postman-echo":t,prgmr:[0,{xen:t}],pythonanywhere:se,qa2:t,"alpha-myqnapcloud":t,"dev-myqnapcloud":t,mycloudnas:t,mynascloud:t,myqnapcloud:t,qualifioapp:t,ladesk:t,qbuser:t,quipelements:a,rackmaze:t,"readthedocs-hosted":t,rhcloud:t,onrender:t,render:B,"subsc-pay":t,"180r":t,dojin:t,sakuratan:t,sakuraweb:t,x0:t,code:[0,{builder:a,"dev-builder":a,"stg-builder":a}],salesforce:[0,{platform:[0,{"code-builder-stg":[0,{test:[0,{"001":a}]}]}]}],logoip:t,scrysec:t,"firewall-gateway":t,myshopblocks:t,myshopify:t,shopitsite:t,"1kapp":t,appchizi:t,applinzi:t,sinaapp:t,vipsinaapp:t,streamlitapp:t,"try-snowplow":t,"playstation-cloud":t,myspreadshop:t,"w-corp-staticblitz":t,"w-credentialless-staticblitz":t,"w-staticblitz":t,"stackhero-network":t,stdlib:[0,{api:t}],strapiapp:[2,{media:t}],"streak-link":t,streaklinks:t,streakusercontent:t,"temp-dns":t,dsmynas:t,familyds:t,mytabit:t,taveusercontent:t,"tb-hosting":U,reservd:t,thingdustdata:t,"townnews-staging":t,typeform:[0,{pro:t}],hk:t,it:t,"deus-canvas":t,vultrobjects:a,wafflecell:t,hotelwithflight:t,"reserve-online":t,cprapid:t,pleskns:t,remotewd:t,wiardweb:[0,{pages:t}],wixsite:t,wixstudio:t,messwithdns:t,"woltlab-demo":t,wpenginepowered:[2,{js:t}],xnbay:[2,{u2:t,"u2-local":t}],yolasite:t}],coop:e,cr:[1,{ac:e,co:e,ed:e,fi:e,go:e,or:e,sa:e}],cu:[1,{com:e,edu:e,gob:e,inf:e,nat:e,net:e,org:e}],cv:[1,{com:e,edu:e,id:e,int:e,net:e,nome:e,org:e,publ:e}],cw:$,cx:[1,{gov:e,cloudns:t,ath:t,info:t,assessments:t,calculators:t,funnels:t,paynow:t,quizzes:t,researched:t,tests:t}],cy:[1,{ac:e,biz:e,com:[1,{scaleforce:ce}],ekloges:e,gov:e,ltd:e,mil:e,net:e,org:e,press:e,pro:e,tm:e}],cz:[1,{contentproxy9:[0,{rsc:t}],realm:t,e4:t,co:t,metacentrum:[0,{cloud:a,custom:t}],muni:[0,{cloud:[0,{flt:t,usr:t}]}]}],de:[1,{bplaced:t,square7:t,com:t,cosidns:be,dnsupdater:t,"dynamisches-dns":t,"internet-dns":t,"l-o-g-i-n":t,ddnss:[2,{dyn:t,dyndns:t}],"dyn-ip24":t,dyndns1:t,"home-webserver":[2,{dyn:t}],"myhome-server":t,dnshome:t,fuettertdasnetz:t,isteingeek:t,istmein:t,lebtimnetz:t,leitungsen:t,traeumtgerade:t,frusky:a,goip:t,"xn--gnstigbestellen-zvb":t,günstigbestellen:t,"xn--gnstigliefern-wob":t,günstigliefern:t,"hs-heilbronn":[0,{it:[0,{pages:t,"pages-research":t}]}],"dyn-berlin":t,"in-berlin":t,"in-brb":t,"in-butter":t,"in-dsl":t,"in-vpn":t,iservschule:t,"mein-iserv":t,schulplattform:t,schulserver:t,"test-iserv":t,keymachine:t,"git-repos":t,"lcube-server":t,"svn-repos":t,barsy:t,webspaceconfig:t,"123webseite":t,rub:t,"ruhr-uni-bochum":[2,{noc:[0,{io:t}]}],logoip:t,"firewall-gateway":t,"my-gateway":t,"my-router":t,spdns:t,speedpartner:[0,{customer:t}],myspreadshop:t,"taifun-dns":t,"12hp":t,"2ix":t,"4lima":t,"lima-city":t,"dd-dns":t,"dray-dns":t,draydns:t,"dyn-vpn":t,dynvpn:t,"mein-vigor":t,"my-vigor":t,"my-wan":t,"syno-ds":t,"synology-diskstation":t,"synology-ds":t,uberspace:a,"virtual-user":t,virtualuser:t,"community-pro":t,diskussionsbereich:t}],dj:e,dk:[1,{biz:t,co:t,firm:t,reg:t,store:t,"123hjemmeside":t,myspreadshop:t}],dm:ue,do:[1,{art:e,com:e,edu:e,gob:e,gov:e,mil:e,net:e,org:e,sld:e,web:e}],dz:[1,{art:e,asso:e,com:e,edu:e,gov:e,net:e,org:e,pol:e,soc:e,tm:e}],ec:[1,{com:e,edu:e,fin:e,gob:e,gov:e,info:e,k12:e,med:e,mil:e,net:e,org:e,pro:e,base:t,official:t}],edu:[1,{rit:[0,{"git-pages":t}]}],ee:[1,{aip:e,com:e,edu:e,fie:e,gov:e,lib:e,med:e,org:e,pri:e,riik:e}],eg:[1,{ac:e,com:e,edu:e,eun:e,gov:e,info:e,me:e,mil:e,name:e,net:e,org:e,sci:e,sport:e,tv:e}],er:v,es:[1,{com:e,edu:e,gob:e,nom:e,org:e,"123miweb":t,myspreadshop:t}],et:[1,{biz:e,com:e,edu:e,gov:e,info:e,name:e,net:e,org:e}],eu:[1,{airkitapps:t,cloudns:t,dogado:[0,{jelastic:t}],barsy:t,spdns:t,transurl:a,diskstation:t}],fi:[1,{aland:e,dy:t,"xn--hkkinen-5wa":t,häkkinen:t,iki:t,cloudplatform:[0,{fi:t}],datacenter:[0,{demo:t,paas:t}],kapsi:t,"123kotisivu":t,myspreadshop:t}],fj:[1,{ac:e,biz:e,com:e,gov:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],fk:v,fm:[1,{com:e,edu:e,net:e,org:e,radio:t,user:a}],fo:e,fr:[1,{asso:e,com:e,gouv:e,nom:e,prd:e,tm:e,avoues:e,cci:e,greta:e,"huissier-justice":e,"en-root":t,"fbx-os":t,fbxos:t,"freebox-os":t,freeboxos:t,goupile:t,"123siteweb":t,"on-web":t,"chirurgiens-dentistes-en-france":t,dedibox:t,aeroport:t,avocat:t,chambagri:t,"chirurgiens-dentistes":t,"experts-comptables":t,medecin:t,notaires:t,pharmacien:t,port:t,veterinaire:t,myspreadshop:t,ynh:t}],ga:e,gb:e,gd:[1,{edu:e,gov:e}],ge:[1,{com:e,edu:e,gov:e,net:e,org:e,pvt:e,school:e}],gf:e,gg:[1,{co:e,net:e,org:e,botdash:t,kaas:t,stackit:t,panel:[2,{daemon:t}]}],gh:[1,{com:e,edu:e,gov:e,mil:e,org:e}],gi:[1,{com:e,edu:e,gov:e,ltd:e,mod:e,org:e}],gl:[1,{co:e,com:e,edu:e,net:e,org:e,biz:t}],gm:e,gn:[1,{ac:e,com:e,edu:e,gov:e,net:e,org:e}],gov:e,gp:[1,{asso:e,com:e,edu:e,mobi:e,net:e,org:e}],gq:e,gr:[1,{com:e,edu:e,gov:e,net:e,org:e,barsy:t,simplesite:t}],gs:e,gt:[1,{com:e,edu:e,gob:e,ind:e,mil:e,net:e,org:e}],gu:[1,{com:e,edu:e,gov:e,guam:e,info:e,net:e,org:e,web:e}],gw:e,gy:ue,hk:[1,{com:e,edu:e,gov:e,idv:e,net:e,org:e,"xn--ciqpn":e,个人:e,"xn--gmqw5a":e,å人:e,"xn--55qx5d":e,å
¬å¸:e,"xn--mxtq1m":e,æ¿åº:e,"xn--lcvr32d":e,æè²:e,"xn--wcvs22d":e,æè²:e,"xn--gmq050i":e,ç®äºº:e,"xn--uc0atv":e,çµç¹:e,"xn--uc0ay4a":e,çµç»:e,"xn--od0alg":e,網絡:e,"xn--zf0avx":e,ç¶²ç»:e,"xn--mk0axi":e,ç»ç¹:e,"xn--tn0ag":e,ç»ç»:e,"xn--od0aq3b":e,ç½çµ¡:e,"xn--io0a7i":e,ç½ç»:e,inc:t,ltd:t}],hm:e,hn:[1,{com:e,edu:e,gob:e,mil:e,net:e,org:e}],hr:[1,{com:e,from:e,iz:e,name:e,brendly:he}],ht:[1,{adult:e,art:e,asso:e,com:e,coop:e,edu:e,firm:e,gouv:e,info:e,med:e,net:e,org:e,perso:e,pol:e,pro:e,rel:e,shop:e,rt:t}],hu:[1,{2e3:e,agrar:e,bolt:e,casino:e,city:e,co:e,erotica:e,erotika:e,film:e,forum:e,games:e,hotel:e,info:e,ingatlan:e,jogasz:e,konyvelo:e,lakas:e,media:e,news:e,org:e,priv:e,reklam:e,sex:e,shop:e,sport:e,suli:e,szex:e,tm:e,tozsde:e,utazas:e,video:e}],id:[1,{ac:e,biz:e,co:e,desa:e,go:e,mil:e,my:e,net:e,or:e,ponpes:e,sch:e,web:e,zone:t}],ie:[1,{gov:e,myspreadshop:t}],il:[1,{ac:e,co:[1,{ravpage:t,mytabit:t,tabitorder:t}],gov:e,idf:e,k12:e,muni:e,net:e,org:e}],"xn--4dbrk0ce":[1,{"xn--4dbgdty6c":e,"xn--5dbhl8d":e,"xn--8dbq2a":e,"xn--hebda8b":e}],×שר××:[1,{××§××××:e,×ש××:e,צ××:e,××ש×:e}],im:[1,{ac:e,co:[1,{ltd:e,plc:e}],com:e,net:e,org:e,tt:e,tv:e}],in:[1,{"5g":e,"6g":e,ac:e,ai:e,am:e,bihar:e,biz:e,business:e,ca:e,cn:e,co:e,com:e,coop:e,cs:e,delhi:e,dr:e,edu:e,er:e,firm:e,gen:e,gov:e,gujarat:e,ind:e,info:e,int:e,internet:e,io:e,me:e,mil:e,net:e,nic:e,org:e,pg:e,post:e,pro:e,res:e,travel:e,tv:e,uk:e,up:e,us:e,cloudns:t,barsy:t,web:t,supabase:t}],info:[1,{cloudns:t,"dynamic-dns":t,"barrel-of-knowledge":t,"barrell-of-knowledge":t,dyndns:t,"for-our":t,"groks-the":t,"groks-this":t,"here-for-more":t,knowsitall:t,selfip:t,webhop:t,barsy:t,mayfirst:t,mittwald:t,mittwaldserver:t,typo3server:t,dvrcam:t,ilovecollege:t,"no-ip":t,forumz:t,nsupdate:t,dnsupdate:t,"v-info":t}],int:[1,{eu:e}],io:[1,{2038:t,co:e,com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e,"on-acorn":a,myaddr:t,apigee:t,"b-data":t,beagleboard:t,bitbucket:t,bluebite:t,boxfuse:t,brave:s,browsersafetymark:t,bubble:_e,bubbleapps:t,bigv:[0,{uk0:t}],cleverapps:t,cloudbeesusercontent:t,dappnode:[0,{dyndns:t}],darklang:t,definima:t,dedyn:t,"fh-muenster":t,shw:t,forgerock:[0,{id:t}],github:t,gitlab:t,lolipop:t,"hasura-app":t,hostyhosting:t,hypernode:t,moonscale:a,beebyte:J,beebyteapp:[0,{sekd1:t}],jele:t,webthings:t,loginline:t,barsy:t,azurecontainer:a,ngrok:[2,{ap:t,au:t,eu:t,in:t,jp:t,sa:t,us:t}],nodeart:[0,{stage:t}],pantheonsite:t,pstmn:[2,{mock:t}],protonet:t,qcx:[2,{sys:a}],qoto:t,vaporcloud:t,myrdbx:t,"rb-hosting":U,"on-k3s":a,"on-rio":a,readthedocs:t,resindevice:t,resinstaging:[0,{devices:t}],hzc:t,sandcats:t,scrypted:[0,{client:t}],"mo-siemens":t,lair:oe,stolos:a,musician:t,utwente:t,edugit:t,telebit:t,thingdust:[0,{dev:ie,disrec:ie,prod:Ue,testing:ie}],tickets:t,webflow:t,webflowtest:t,editorx:t,wixstudio:t,basicserver:t,virtualserver:t}],iq:r,ir:[1,{ac:e,co:e,gov:e,id:e,net:e,org:e,sch:e,"xn--mgba3a4f16a":e,Ø§ÛØ±Ø§Ù:e,"xn--mgba3a4fra":e,Ø§ÙØ±Ø§Ù:e,arvanedge:t}],is:e,it:[1,{edu:e,gov:e,abr:e,abruzzo:e,"aosta-valley":e,aostavalley:e,bas:e,basilicata:e,cal:e,calabria:e,cam:e,campania:e,"emilia-romagna":e,emiliaromagna:e,emr:e,"friuli-v-giulia":e,"friuli-ve-giulia":e,"friuli-vegiulia":e,"friuli-venezia-giulia":e,"friuli-veneziagiulia":e,"friuli-vgiulia":e,"friuliv-giulia":e,"friulive-giulia":e,friulivegiulia:e,"friulivenez
1251ia-giulia":e,friuliveneziagiulia:e,friulivgiulia:e,fvg:e,laz:e,lazio:e,lig:e,liguria:e,lom:e,lombardia:e,lombardy:e,lucania:e,mar:e,marche:e,mol:e,molise:e,piedmont:e,piemonte:e,pmn:e,pug:e,puglia:e,sar:e,sardegna:e,sardinia:e,sic:e,sicilia:e,sicily:e,taa:e,tos:e,toscana:e,"trentin-sud-tirol":e,"xn--trentin-sd-tirol-rzb":e,"trentin-süd-tirol":e,"trentin-sudtirol":e,"xn--trentin-sdtirol-7vb":e,"trentin-südtirol":e,"trentin-sued-tirol":e,"trentin-suedtirol":e,trentino:e,"trentino-a-adige":e,"trentino-aadige":e,"trentino-alto-adige":e,"trentino-altoadige":e,"trentino-s-tirol":e,"trentino-stirol":e,"trentino-sud-tirol":e,"xn--trentino-sd-tirol-c3b":e,"trentino-süd-tirol":e,"trentino-sudtirol":e,"xn--trentino-sdtirol-szb":e,"trentino-südtirol":e,"trentino-sued-tirol":e,"trentino-suedtirol":e,"trentinoa-adige":e,trentinoaadige:e,"trentinoalto-adige":e,trentinoaltoadige:e,"trentinos-tirol":e,trentinostirol:e,"trentinosud-tirol":e,"xn--trentinosd-tirol-rzb":e,"trentinosüd-tirol":e,trentinosudtirol:e,"xn--trentinosdtirol-7vb":e,trentinosüdtirol:e,"trentinosued-tirol":e,trentinosuedtirol:e,"trentinsud-tirol":e,"xn--trentinsd-tirol-6vb":e,"trentinsüd-tirol":e,trentinsudtirol:e,"xn--trentinsdtirol-nsb":e,trentinsüdtirol:e,"trentinsued-tirol":e,trentinsuedtirol:e,tuscany:e,umb:e,umbria:e,"val-d-aosta":e,"val-daosta":e,"vald-aosta":e,valdaosta:e,"valle-aosta":e,"valle-d-aosta":e,"valle-daosta":e,valleaosta:e,"valled-aosta":e,valledaosta:e,"vallee-aoste":e,"xn--valle-aoste-ebb":e,"vallée-aoste":e,"vallee-d-aoste":e,"xn--valle-d-aoste-ehb":e,"vallée-d-aoste":e,valleeaoste:e,"xn--valleaoste-e7a":e,valléeaoste:e,valleedaoste:e,"xn--valledaoste-ebb":e,valléedaoste:e,vao:e,vda:e,ven:e,veneto:e,ag:e,agrigento:e,al:e,alessandria:e,"alto-adige":e,altoadige:e,an:e,ancona:e,"andria-barletta-trani":e,"andria-trani-barletta":e,andriabarlettatrani:e,andriatranibarletta:e,ao:e,aosta:e,aoste:e,ap:e,aq:e,aquila:e,ar:e,arezzo:e,"ascoli-piceno":e,ascolipiceno:e,asti:e,at:e,av:e,avellino:e,ba:e,balsan:e,"balsan-sudtirol":e,"xn--balsan-sdtirol-nsb":e,"balsan-südtirol":e,"balsan-suedtirol":e,bari:e,"barletta-trani-andria":e,barlettatraniandria:e,belluno:e,benevento:e,bergamo:e,bg:e,bi:e,biella:e,bl:e,bn:e,bo:e,bologna:e,bolzano:e,"bolzano-altoadige":e,bozen:e,"bozen-sudtirol":e,"xn--bozen-sdtirol-2ob":e,"bozen-südtirol":e,"bozen-suedtirol":e,br:e,brescia:e,brindisi:e,bs:e,bt:e,bulsan:e,"bulsan-sudtirol":e,"xn--bulsan-sdtirol-nsb":e,"bulsan-südtirol":e,"bulsan-suedtirol":e,bz:e,ca:e,cagliari:e,caltanissetta:e,"campidano-medio":e,campidanomedio:e,campobasso:e,"carbonia-iglesias":e,carboniaiglesias:e,"carrara-massa":e,carraramassa:e,caserta:e,catania:e,catanzaro:e,cb:e,ce:e,"cesen
1251a-forli":e,"xn--cesena-forl-mcb":e,"cesena-forlì":e,cesenaforli:e,"xn--cesenaforl-i8a":e,cesenaforlì:e,ch:e,chieti:e,ci:e,cl:e,cn:e,co:e,como:e,cosenza:e,cr:e,cremona:e,crotone:e,cs:e,ct:e,cuneo:e,cz:e,"dell-ogliastra":e,dellogliastra:e,en:e,enna:e,fc:e,fe:e,fermo:e,ferrara:e,fg:e,fi:e,firenze:e,florence:e,fm:e,foggia:e,"forli-cesena":e,"xn--forl-cesena-fcb":e,"forlì-cesena":e,forlicesena:e,"xn--forlcesena-c8a":e,forlìcesena:e,fr:e,frosinone:e,ge:e,genoa:e,genova:e,go:e,gorizia:e,gr:e,grosseto:e,"iglesias-carbonia":e,iglesiascarbonia:e,im:e,imperia:e,is:e,isernia:e,kr:e,"la-spezia":e,laquila:e,laspezia:e,latina:e,lc:e,le:e,lecce:e,lecco:e,li:e,livorno:e,lo:e,lodi:e,lt:e,lu:e,lucca:e,macerata:e,mantova:e,"massa-carrara":e,massacarrara:e,matera:e,mb:e,mc:e,me:e,"medio-campidano":e,mediocampidano:e,messina:e,mi:e,milan:e,milano:e,mn:e,mo:e,modena:e,monza:e,"monza-brianza":e,"monza-e-della-brianza":e,monzabrianza:e,monzaebrianza:e,monzaedellabrianza:e,ms:e,mt:e,na:e,naples:e,napoli:e,no:e,novara:e,nu:e,nuoro:e,og:e,ogliastra:e,"olbia-tempio":e,olbiatempio:e,or:e,oristano:e,ot:e,pa:e,padova:e,padua:e,palermo:e,parma:e,pavia:e,pc:e,pd:e,pe:e,perugia:e,"pesaro-urbino":e,pesarourbino:e,pescara:e,pg:e,pi:e,piacenza:e,pisa:e,pistoia:e,pn:e,po:e,pordenone:e,potenza:e,pr:e,prato:e,pt:e,pu:e,pv:e,pz:e,ra:e,ragusa:e,ravenna:e,rc:e,re:e,"reggio-calabria":e,"reggio-emilia":e,reggiocalabria:e,reggioemilia:e,rg:e,ri:e,rieti:e,rimini:e,rm:e,rn:e,ro:e,roma:e,rome:e,rovigo:e,s
1251a:e,salerno:e,sassari:e,savona:e,si:e,siena:e,siracusa:e,so:e,sondrio:e,sp:e,sr:e,ss:e,"xn--sdtirol-n2a":e,südtirol:e,suedtirol:e,sv:e,ta:e,taranto:e,te:e,"tempio-olbia":e,tempioolbia:e,teramo:e,terni:e,tn:e,to:e,torino:e,tp:e,tr:e,"trani-andria-barletta":e,"trani-barletta-andria":e,traniandriabarletta:e,tranibarlettaandria:e,trapani:e,trento:e,treviso:e,trieste:e,ts:e,turin:e,tv:e,ud:e,udine:e,"urbino-pesaro":e,urbinopesaro:e,va:e,varese:e,vb:e,vc:e,ve:e,venezia:e,venice:e,verbania:e,vercelli:e,verona:e,vi:e,"vibo-valentia":e,vibovalentia:e,vicenza:e,viterbo:e,vr:e,vs:e,vt:e,vv:e,"12chars":t,ibxos:t,iliadboxos:t,neen:[0,{jc:t}],"123homepage":t,"16-b":t,"32-b":t,"64-b":t,myspreadshop:t,syncloud:t}],je:[1,{co:e,net:e,org:e,of:t}],jm:v,jo:[1,{agri:e,ai:e,com:e,edu:e,eng:e,fm:e,gov:e,mil:e,net:e,org:e,per:e,phd:e,sch:e,tv:e}],jobs:e,jp:[1,{ac:e,ad:e,co:e,ed:e,go:e,gr:e,lg:e,ne:[1,{aseinet:Ae,gehirn:t,ivory:t,"mail-box":t,mints:t,mokuren:t,opal:t,sakura:t,sumomo:t,topaz:t}],or:e,aichi:[1,{aisai:e,ama:e,anjo:e,asuke:e,chiryu:e,chita:e,fuso:e,gamagori:e,handa:e,hazu:e,hekinan:e,higashiura:e,ichinomiya:e,inazawa:e,inuyama:e,isshiki:e,iwakura:e,kanie:e,kariya:e,kasugai:e,kira:e,kiyosu:e,komaki:e,konan:e,kota:e,mihama:e,miyoshi:e,nishio:e,nisshin:e,obu:e,oguchi:e,oharu:e,okazaki:e,owariasahi:e,seto:e,shikatsu:e,shinshiro:e,shitara:e,tahara:e,takahama:e,tobishima:e,toei:e,togo:e,tokai:e,tokoname:e,toyoake:e,toyohashi:e,toyokawa:e,toyone:e,toyota:e,tsushima:e,yatomi:e}],akita:[1,{akita:e,daisen:e,fujisato:e,gojome:e,hachirogata:e,happou:e,higashinaruse:e,honjo:e,honjyo:e,ikawa:e,kamikoani:e,kamioka:e,katagami:e,kazuno:e,kitaakita:e,kosaka:e,kyowa:e,misato:e,mitane:e,moriyoshi:e,nikaho:e,noshiro:e,odate:e,oga:e,ogata:e,semboku:e,yokote:e,yurihonjo:e}],aomori:[1,{aomori:e,gonohe:e,hachinohe:e,hashikami:e,hiranai:e,hirosaki:e,itayanagi:e,kuroishi:e,misawa:e,mutsu:e,nakadomari:e,noheji:e,oirase:e,owani:e,rokunohe:e,sannohe:e,shichinohe:e,shingo:e,takko:e,towada:e,tsugaru:e,tsuruta:e}],chiba:[1,{abiko:e,asahi:e,chonan:e,chosei:e,choshi:e,chuo:e,funabashi:e,futtsu:e,hanamigawa:e,ichihara:e,ichikawa:e,ichinomiya:e,inzai:e,isumi:e,kamagaya:e,kamogawa:e,kashiwa:e,katori:e,katsuura:e,kimitsu:e,kisarazu:e,kozaki:e,kujukuri:e,kyonan:e,matsudo:e,midori:e,mihama:e,minamiboso:e,mobara:e,mutsuzawa:e,nagara:e,nagareyama:e,narashino:e,narita:e,noda:e,oamishirasato:e,omigawa:e,onjuku:e,otaki:e,sakae:e,sakura:e,shimofusa:e,shirako:e,shiroi:e,shisui:e,sodegaura:e,sosa:e,tako:e,tateyama:e,togane:e,tohnosho:e,tomisato:e,urayasu:e,yachimata:e,yachiyo:e,yokaichiba:e,yokoshibahikari:e,yotsukaido:e}],ehime:[1,{ainan:e,honai:e,ikata:e,imabari:e,iyo:e,kamijima:e,kihoku:e,kumakogen:e,masaki:e,matsuno:e,matsuyama:e,namikata:e,niihama:e,ozu:e,saijo:e,seiyo:e,shikokuchuo:e,tobe:e,toon:e,uchiko:e,uwajima:e,yawatahama:e}],fukui:[1,{echizen:e,eiheiji:e,fukui:e,ikeda:e,katsuyama:e,mihama:e,minamiechizen:e,obama:e,ohi:e,ono:e,sabae:e,sakai:e,takahama:e,tsuruga:e,wakasa:e}],fukuoka:[1,{ashiya:e,buzen:e,chikugo:e,chikuho:e,chikujo:e,chikushino:e,chikuzen:e,chuo:e,dazaifu:e,fukuchi:e,hakata:e,higashi:e,hirokawa:e,hisayama:e,iizuka:e,inatsuki:e,kaho:e,kasuga:e,kasuya:e,kawara:e,keisen:e,koga:e,kurate:e,kurogi:e,kurume:e,minami:e,miyako:e,miyama:e,miyawaka:e,mizumaki:e,munakata:e,nakagawa:e,nakama:e,nishi:e,nogata:e,ogori:e,okagaki:e,okawa:e,oki:e,omuta:e,onga:e,onojo:e,oto:e,saigawa:e,sasaguri:e,shingu:e,shinyoshitomi:e,shonai:e,soeda:e,sue:e,tachiarai:e,tagawa:e,takata:e,toho:e,toyotsu:e,tsuiki:e,ukiha:e,umi:e,usui:e,yamada:e,yame:e,yanagawa:e,yukuhashi:e}],fukushima:[1,{aizubange:e,aizumisato:e,aizuwakamatsu:e,asakawa:e,bandai:e,date:e,fukushima:e,furudono:e,futaba:e,hanawa:e,higashi:e,hirata:e,hirono:e,iitate:e,inawashiro:e,ishikawa:e,iwaki:e,izumizaki:e,kagamiishi:e,kaneyama:e,kawamata:e,kitakata:e,kitashiobara:e,koori:e,koriyama:e,kunimi:e,miharu:e,mishima:e,namie:e,nango:e,nishiaizu:e,nishigo:e,okuma:e,omotego:e,ono:e,otama:e,samegawa:e,shimogo:e,shirakawa:e,showa:e,soma:e,sukagawa:e,taishin:e,tamakawa:e,tanagura:e,tenei:e,yabuki:e,yamato:e,yamatsuri:e,yanaizu:e,yugawa:e}],gifu:[1,{anpachi:e,ena:e,gifu:e,ginan:e,godo:e,gujo:e,hashima:e,hichiso:e,hida:e,higashishirakawa:e,ibigawa:e,ikeda:e,kakamigahara:e,kani:e,kasahara:e,kasamatsu:e,kawaue:e,kitagata:e,mino:e,minokamo:e,mitake:e,mizunami:e,motosu:e,nakatsugawa:e,ogaki:e,sakahogi:e,seki:e,sekigahara:e,shirakawa:e,tajimi:e,takayama:e,tarui:e,toki:e,tomika:e,wanouchi:e,yamagata:e,yaotsu:e,yoro:e}],gunma:[1,{annaka:e,chiyoda:e,fujioka:e,higashiagatsuma:e,isesaki:e,itakura:e,kanna:e,kanra:e,katashina:e,kawaba:e,kiryu:e,kusatsu:e,maebashi:e,meiwa:e,midori:e,minakami:e,naganohara:e,nakanojo:e,nanmoku:e,numata:e,oizumi:e,ora:e,ota:e,shibukawa:e,shimonita:e,shinto:e,showa:e,takasaki:e,takayama:e,tamamura:e,tatebayashi:e,tomioka:e,tsukiyono:e,tsumagoi:e,ueno:e,yoshioka:e}],hiroshima:[1,{asaminami:e,daiwa:e,etajima:e,fuchu:e,fukuyama:e,hatsukaichi:e,higashihiroshima:e,hongo:e,jinsekikogen:e,kaita:e,kui:e,kumano:e,kure:e,mihara:e,miyoshi:e,naka:e,onomichi:e,osakikamijima:e,otake:e,saka:e,sera:e,seranishi:e,shinichi:e,shobara:e,takehara:e}],hokkaido:[1,{abashiri:e,abira:e,aibetsu:e,akabira:e,akkeshi:e,asahikawa:e,ashibetsu:e,ashoro:e,assabu:e,atsuma:e,bibai:e,biei:e,bifuka:e,bihoro:e,biratori:e,chippubetsu:e,chitose:e,date:e,ebetsu:e,embetsu:e,eniwa:e,erimo:e,esan:e,esashi:e,fukagawa:e,fukushima:e,furano:e,furubira:e,haboro:e,hakodate:e,hamatonbetsu:e,hidaka:e,higashikagura:e,higashikawa:e,hiroo:e,hokuryu:e,hokuto:e,honbetsu:e,horokanai:e,horonobe:e,ikeda:e,imakane:e,ishikari:e,iwamizawa:e,iwanai:e,kamifurano:e,kamikawa:e,kamishihoro:e,kamisunagawa:e,kamoenai:e,kayabe:e,kembuchi:e,kikonai:e,kimobetsu:e,kitahiroshima:e,kitami:e,kiyosato:e,koshimizu:e,kunneppu:e,kuriyama:e,kuromatsunai:e,kushiro:e,kutchan:e,kyowa:e,mashike:e,matsumae:e,mikasa:e,minamifurano:e,mombetsu:e,moseushi:e,mukawa:e,muroran:e,naie:e,nakagawa:e,nakasatsunai:e,nakatombetsu:e,nanae:e,nanporo:e,nayoro:e,nemuro:e,niikappu:e,niki:e,nishiokoppe:e,noboribetsu:e,numata:e,obihiro:e,obira:e,oketo:e,okoppe:e,otaru:e,otobe:e,otofuke:e,otoineppu:e,oumu:e,ozora:e,pippu:e,rankoshi:e,rebun:e,rikubetsu:e,rishiri:e,rishirifuji:e,saroma:e,sarufutsu:e,shakotan:e,shari:e,shibecha:e,shibetsu:e,shikabe:e,shikaoi:e,shimamaki:e,shimizu:e,shimokawa:e,shinshinotsu:e,shintoku:e,shiranuka:e,shiraoi:e,shiriuchi:e,sobetsu:e,sunagawa:e,taiki:e,takasu:e,takikawa:e,takinoue:e,teshikaga:e,tobetsu:e,tohma:e,tomakomai:e,tomari:e,toya:e,toyako:e,toyotomi:e,toyoura:e,tsubetsu:e,tsukigata:e,urakawa:e,urausu:e,uryu:e,utashinai:e,wakkanai:e,wassamu:e,yakumo:e,yoichi:e}],hyogo:[1,{aioi:e,akashi:e,ako:e,amagasaki:e,aogaki:e,asago:e,ashiya:e,awaji:e,fukusaki:e,goshiki:e,harima:e,himeji:e,ichikawa:e,inagawa:e,itami:e,kakogawa:e,kamigori:e,kamikawa:e,kasai:e,kasuga:e,kawanishi:e,miki:e,minamiawaji:e,nishinomiya:e,nishiwaki:e,ono:e,sanda:e,sannan:e,sasayama:e,sayo:e,shingu:e,shinonsen:e,shiso:e,sumoto:e,taishi:e,taka:e,takarazuka:e,takasago:e,takino:e,tamba:e,tatsuno:e,toyooka:e,yabu:e,yashiro:e,yoka:e,yokawa:e}],ibaraki:[1,{ami:e,asahi:e,bando:e,chikusei:e,daigo:e,fujishiro:e,hitachi:e,hitachinaka:e,hitachiomiya:e,hitachiota:e,ibaraki:e,ina:e,inashiki:e,itako:e,iwama:e,joso:e,kamisu:e,kasama:e,kashima:e,kasumigaura:e,koga:e,miho:e,mito:e,moriya:e,naka:e,namegata:e,oarai:e,ogawa:e,omitama:e,ryugasaki:e,sakai:e,sakuragawa:e,shimodate:e,shimotsuma:e,shirosato:e,sowa:e,suifu:e,takahagi:e,tamatsukuri:e,tokai:e,tomobe:e,tone:e,toride:e,tsuchiura:e,tsukuba:e,uchihara:e,ushiku:e,yachiyo:e,yamagata:e,yawara:e,yuki:e}],ishikawa:[1,{anamizu:e,hakui:e,hakusan:e,kaga:e,kahoku:e,kanazawa:e,kawakita:e,komatsu:e,nakanoto:e,nanao:e,nomi:e,nonoichi:e,noto:e,shika:e,suzu:e,tsubata:e,tsurugi:e,uchinada:e,wajima:e}],iwate:[1,{fudai:e,fujisawa:e,hanamaki:e,hiraizumi:e,hirono:e,ichinohe:e,ichinoseki:e,iwaizumi:e,iwate:e,joboji:e,kamaishi:e,kanegasaki:e,karumai:e,kawai:e,kitakami:e,kuji:e,kunohe:e,kuzumaki:e,miyako:e,mizusawa:e,morioka:e,ninohe:e,noda:e,ofunato:e,oshu:e,otsuchi:e,rikuzentakata:e,shiwa:e,shizukuishi:e,sumita:e,tanohata:e,tono:e,yahaba:e,yamada:e}],kagawa:[1,{ayagawa:e,higashikagawa:e,kanonji:e,kotohira:e,manno:e,marugame:e,mitoyo:e,naoshima:e,sanuki:e,tadotsu:e,takamatsu:e,tonosho:e,uchinomi:e,utazu:e,zentsuji:e}],kagoshima:[1,{akune:e,amami:e,hioki:e,isa:e,isen:e,izumi:e,kagoshima:e,kanoya:e,kawanabe:e,kinko:e,kouyama:e,makurazaki:e,matsumoto:e,minamitane:e,nakatane:e,nishinoomote:e,satsumasendai:e,soo:e,tarumizu:e,yusui:e}],kanagawa:[1,{aikawa:e,atsugi:e,ayase:e,chigasaki:e,ebina:e,fujisawa:e,hadano:e,hakone:e,hiratsuka:e,isehara:e,kaisei:e,kamakura:e,kiyokawa:e,matsuda:e,minamiashigara:e,miura:e,nakai:e,ninomiya:e,odawara:e,oi:e,oiso:e,sagamihara:e,samukawa:e,tsukui:e,yamakita:e,yamato:e,yokosuka:e,yugawara:e,zama:e,zushi:e}],kochi:[1,{aki:e,geisei:e,hidaka:e,higashitsuno:e,ino:e,kagami:e,kami:e,kitagawa:e,kochi:e,mihara:e,motoyama:e,muroto:e,nahari:e,nakamura:e,nankoku:e,nishitosa:e,niyodogawa:e,ochi:e,okawa:e,otoyo:e,otsuki:e,sakawa:e,sukumo:e,susaki:e,tosa:e,tosashimizu:e,toyo:e,tsuno:e,umaji:e,yasuda:e,yusuhara:e}],kumamoto:[1,{amakusa:e,arao:e,aso:e,choyo:e,gyokuto:e,kamiamakusa:e,kikuchi:e,kumamoto:e,mashiki:e,mifune:e,minamata:e,minamioguni:e,nagasu:e,nishihara:e,oguni:e,ozu:e,sumoto:e,takamori:e,uki:e,uto:e,yamaga:e,yamato:e,yatsushiro:e}],kyoto:[1,{ayabe:e,fukuchiyama:e,higashiyama:e,ide:e,ine:e,joyo:e,kameoka:e,kamo:e,kita:e,kizu:e,kumiyama:e,kyotamba:e,kyotanabe:e,kyotango:e,maizuru:e,minami:e,minamiyamashiro:e,miyazu:e,muko:e,nagaokakyo:e,nakagyo:e,nantan:e,oyamazaki:e,sakyo:e,seika:e,tanabe:e,uji:e,ujitawara:e,wazuka:e,yamashina:e,yawata:e}],mie:[1,{asahi:e,inabe:e,ise:e,kameyama:e,kawagoe:e,kiho:e,kisosaki:e,kiwa:e,komono:e,kumano:e,kuwana:e,matsusaka:e,meiwa:e,mihama:e,minamiise:e,misugi:e,miyama:e,nabari:e,shima:e,suzuka:e,tado:e,taiki:e,taki:e,tamaki:e,toba:e,tsu:e,udono:e,ureshino:e,watarai:e,yokkaichi:e}],miyagi:[1,{furukawa:e,higashimatsushima:e,ishinomaki:e,iwanuma:e,kakuda:e,kami:e,kawasaki:e,marumori:e,matsushima:e,minamisanriku:e,misato:e,murata:e,natori:e,ogawara:e,ohira:e,onagawa:e,osaki:e,rifu:e,semine:e,shibata:e,shichikashuku:e,shikama:e,shiogama:e,shiroishi:e,tagajo:e,taiwa:e,tome:e,tomiya:e,wakuya:e,watari:e,yamamoto:e,zao:e}],miyazaki:[1,{aya:e,ebino:e,gokase:e,hyuga:e,kadogawa:e,kawaminami:e,kijo:e,kitagawa:e,kitakata:e,kitaura:e,kobayashi:e,kunitomi:e,kushima:e,mimata:e,miyakonojo:e,miyazaki:e,morotsuka:e,nichinan:e,nishimera:e,nobeoka:e,saito:e,shiiba:e,shintomi:e,takaharu:e,takanabe:e,takazaki:e,tsuno:e}],nagano:[1,{achi:e,agematsu:e,anan:e,aoki:e,asahi:e,azumino:e,chikuhoku:e,chikuma:e,chino:e,fujimi:e,hakuba:e,hara:e,hiraya:e,iida:e,iijima:e,iiyama:e,iizuna:e,ikeda:e,ikusaka:e,ina:e,karuizawa:e,kawakami:e,kiso:e,kisofukushima:e,kitaaiki:e,komagane:e,komoro:e,matsukawa:e,matsumoto:e,miasa:e,minamiaiki:e,minamimaki:e,minamiminowa:e,minowa:e,miyada:e,miyota:e,mochizuki:e,nagano:e,nagawa:e,nagiso:e,nakagawa:e,nakano:e,nozawaonsen:e,obuse:e,ogawa:e,okaya:e,omachi:e,omi:e,ookuwa:e,ooshika:e,otaki:e,otari:e,sakae:e,sakaki:e,saku:e,sakuho:e,shimosuwa:e,shinanomachi:e,shiojiri:e,suwa:e,suzaka:e,takagi:e,takamori:e,takayama:e,tateshina:e,tatsuno:e,togakushi:e,togura:e,tomi:e,ueda:e,wada:e,yamagata:e,yamanouchi:e,yasaka:e,yasuoka:e}],nagasaki:[1,{chijiwa:e,futsu:e,goto:e,hasami:e,hirado:e,iki:e,isahaya:e,kawatana:e,kuchinotsu:e,matsuura:e,nagasaki:e,obama:e,omura:e,oseto:e,saikai:e,sasebo:e,seihi:e,shimabara:e,shinkamigoto:e,togitsu:e,tsushima:e,unzen:e}],nara:[1,{ando:e,gose:e,heguri:e,higashiyoshino:e,ikaruga:e,ikoma:e,kamikitayama:e,kanmaki:e,kashiba:e,kashihara:e,katsuragi:e,kawai:e,kawakami:e,kawanishi:e,koryo:e,kurotaki:e,mitsue:e,miyake:e,nara:e,nosegawa:e,oji:e,ouda:e,oyodo:e,sakurai:e,sango:e,shimoichi:e,shimokitayama:e,shinjo:e,soni:e,takatori:e,tawaramoto:e,tenkawa:e,tenri:e,uda:e,yamatokoriyama:e,yamatotakada:e,yamazoe:e,yoshino:e}],niigata:[1,{aga:e,agano:e,gosen:e,itoigawa:e,izumozaki:e,joetsu:e,kamo:e,kariwa:e,kashiwazaki:e,minamiuonuma:e,mitsuke:e,muika:e,murakami:e,myoko:e,nagaoka:e,niigata:e,ojiya:e,omi:e,sado:e,sanjo:e,seiro:e,seirou:e,sekikawa:e,shibata:e,tagami:e,tainai:e,tochio:e,tokamachi:e,tsubame:e,tsunan:e,uonuma:e,yahiko:e,yoita:e,yuzawa:e}],oita:[1,{beppu:e,bungoono:e,bungotakada:e,hasama:e,hiji:e,himeshima:e,hita:e,kamitsue:e,kokonoe:e,kuju:e,kunisaki:e,kusu:e,oita:e,saiki:e,taketa:e,tsukumi:e,usa:e,usuki:e,yufu:e}],okayama:[1,{akaiwa:e,asakuchi:e,bizen:e,hayashima:e,ibara:e,kagamino:e,kasaoka:e,kibichuo:e,kumenan:e,kurashiki:e,maniwa:e,misaki:e,n
1251agi:e,niimi:e,nishiawakura:e,okayama:e,satosho:e,setouchi:e,shinjo:e,shoo:e,soja:e,takahashi:e,tamano:e,tsuyama:e,wake:e,yakage:e}],okinawa:[1,{aguni:e,ginowan:e,ginoza:e,gushikami:e,haebaru:e,higashi:e,hirara:e,iheya:e,ishigaki:e,ishikawa:e,itoman:e,izena:e,kadena:e,kin:e,kitadaito:e,kitanakagusuku:e,kumejima:e,kunigami:e,minamidaito:e,motobu:e,nago:e,naha:e,nakagusuku:e,nakijin:e,nanjo:e,nishihara:e,ogimi:e,okinawa:e,onna:e,shimoji:e,taketomi:e,tarama:e,tokashiki:e,tomigusuku:e,tonaki:e,urasoe:e,uruma:e,yaese:e,yomitan:e,yonabaru:e,yonaguni:e,zamami:e}],osaka:[1,{abeno:e,chihayaakasaka:e,chuo:e,daito:e,fujiidera:e,habikino:e,hannan:e,higashiosaka:e,higashisumiyoshi:e,higashiyodogawa:e,hirakata:e,ibaraki:e,ikeda:e,izumi:e,izumiotsu:e,izumisano:e,kadoma:e,kaizuka:e,kanan:e,kashiwara:e,katano:e,kawachinagano:e,kishiwada:e,kita:e,kumatori:e,matsubara:e,minato:e,minoh:e,misaki:e,moriguchi:e,neyagawa:e,nishi:e,nose:e,osakasayama:e,sakai:e,sayama:e,sennan:e,settsu:e,shijonawate:e,shimamoto:e,suita:e,tadaoka:e,taishi:e,tajiri:e,takaishi:e,takatsuki:e,tondabayashi:e,toyonaka:e,toyono:e,yao:e}],saga:[1,{ariake:e,arita:e,fukudomi:e,genkai:e,hamatama:e,hizen:e,imari:e,kamimine:e,kanzaki:e,karatsu:e,kashima:e,kitagata:e,kitahata:e,kiyama:e,kouhoku:e,kyuragi:e,nishiarita:e,ogi:e,omachi:e,ouchi:e,saga:e,shiroishi:e,taku:e,tara:e,tosu:e,yoshinogari:e}],saitama:[1,{arakawa:e,asaka:e,chichibu:e,fujimi:e,fujimino:e,fukaya:e,hanno:e,hanyu:e,hasuda:e,hatogaya:e,hatoyama:e,hidaka:e,higashichichibu:e,higashimatsuyama:e,honjo:e,ina:e,iruma:e,iwatsuki:e,kamiizumi:e,kamikawa:e,kamisato:e,kasukabe:e,kawagoe:e,kawaguchi:e,kawajima:e,kazo:e,kitamoto:e,koshigaya:e,kounosu:e,kuki:e,kumagaya:e,matsubushi:e,minano:e,misato:e,miyashiro:e,miyoshi:e,moroyama:e,nagatoro:e,namegawa:e,niiza:e,ogano:e,ogawa:e,ogose:e,okegawa:e,omiya:e,otaki:e,ranzan:e,ryokami:e,saitama:e,sakado:e,satte:e,sayama:e,shiki:e,shiraoka:e,soka:e,sugito:e,toda:e,tokigawa:e,tokorozawa:e,tsurugashima:e,urawa:e,warabi:e,yashio:e,yokoze:e,yono:e,yorii:e,yoshida:e,yoshikawa:e,yoshimi:e}],shiga:[1,{aisho:e,gamo:e,higashiomi:e,hikone:e,koka:e,konan:e,kosei:e,koto:e,kusatsu:e,maibara:e,moriyama:e,nagahama:e,nishiazai:e,notogawa:e,omihachiman:e,otsu:e,ritto:e,ryuoh:e,takashima:e,takatsuki:e,torahime:e,toyosato:e,yasu:e}],shimane:[1,{akagi:e,ama:e,gotsu:e,hamada:e,higashiizumo:e,hikawa:e,hikimi:e,izumo:e,kakinoki:e,masuda:e,matsue:e,misato:e,nishinoshima:e,ohda:e,okinoshima:e,okuizumo:e,shimane:e,tamayu:e,tsuwano:e,unnan:e,yakumo:e,yasugi:e,yatsuka:e}],shizuoka:[1,{arai:e,atami:e,fuji:e,fujieda:e,fujikawa:e,fujinomiya:e,fukuroi:e,gotemba:e,haibara:e,hamamatsu:e,higashiizu:e,ito:e,iwata:e,izu:e,izunokuni:e,kakegawa:e,kannami:e,kawanehon:e,kawazu:e,kikugawa:e,kosai:e,makinohara:e,matsuzaki:e,minamiizu:e,mishima:e,morimachi:e,nishiizu:e,numazu:e,omaezaki:e,shimada:e,shimizu:e,shimoda:e,shizuoka:e,susono:e,yaizu:e,yoshida:e}],tochigi:[1,{ashikaga:e,bato:e,haga:e,ichikai:e,iwafune:e,kaminokawa:e,kanuma:e,karasuyama:e,kuroiso:e,mashiko:e,mibu:e,moka:e,motegi:e,nasu:e,nasushiobara:e,nikko:e,nishikata:e,nogi:e,ohira:e,ohtawara:e,oyama:e,sakura:e,sano:e,shimotsuke:e,shioya:e,takanezawa:e,tochigi:e,tsuga:e,ujiie:e,utsunomiya:e,yaita:e}],tokushima:[1,{aizumi:e,anan:e,ichiba:e,itano:e,kainan:e,komatsushima:e,matsushige:e,mima:e,minami:e,miyoshi:e,mugi:e,nakagawa:e,naruto:e,sanagochi:e,shishikui:e,tokushima:e,wajiki:e}],tokyo:[1,{adachi:e,akiruno:e,akishima:e,aogashima:e,arakawa:e,bunkyo:e,chiyoda:e,chofu:e,chuo:e,edogawa:e,fuchu:e,fussa:e,hachijo:e,hachioji:e,hamura:e,higashikurume:e,higashimurayama:e,higashiyamato:e,hino:e,hinode:e,hinohara:e,inagi:e,itabashi:e,katsushika:e,kita:e,kiyose:e,kodaira:e,koganei:e,kokubunji:e,komae:e,koto:e,kouzushima:e,kunitachi:e,machida:e,meguro:e,minato:e,mitaka:e,mizuho:e,musashimurayama:e,musashino:e,nakano:e,nerima:e,ogasawara:e,okutama:e,ome:e,oshima:e,ota:e,setagaya:e,shibuya:e,shinagawa:e,shinjuku:e,suginami:e,sumida:e,tachikawa:e,taito:e,tama:e,toshima:e}],tottori:[1,{chizu:e,hino:e,kawahara:e,koge:e,kotoura:e,misasa:e,nanbu:e,nichinan:e,sakaiminato:e,tottori:e,wakasa:e,yazu:e,yonago:e}],toyama:[1,{asahi:e,fuchu:e,fukumitsu:e,funahashi:e,himi:e,imizu:e,inami:e,johana:e,kamiichi:e,kurobe:e,nakaniikawa:e,namerikawa:e,nanto:e,nyuzen:e,oyabe:e,taira:e,takaoka:e,tateyama:e,toga:e,tonami:e,toyama:e,unazuki:e,uozu:e,yamada:e}],wakayama:[1,{arida:e,aridagawa:e,gobo:e,hashimoto:e,hidaka:e,hirogawa:e,inami:e,iwade:e,kainan:e,kamitonda:e,katsuragi:e,kimino:e,kinokawa:e,kitayama:e,koya:e,koza:e,kozagawa:e,kudoyama:e,kushimoto:e,mihama:e,misato:e,nachikatsuura:e,shingu:e,shirahama:e,taiji:e,tanabe:e,w
vendor: 12,723 bytes, line 1251
1251akayama:e,yuasa:e,yura:e}],yamagata:[1,{asahi:e,funagata:e,higashine:e,iide:e,kahoku:e,kaminoyama:e,kaneyama:e,kawanishi:e,mamurogawa:e,mikawa:e,murayama:e,nagai:e,nakayama:e,nanyo:e,nishikawa:e,obanazawa:e,oe:e,oguni:e,ohkura:e,oishida:e,sagae:e,sakata:e,sakegawa:e,shinjo:e,shirataka:e,shonai:e,takahata:e,tendo:e,tozawa:e,tsuruoka:e,yamagata:e,yamanobe:e,yonezawa:e,yuza:e}],yamaguchi:[1,{abu:e,hagi:e,hikari:e,hofu:e,iwakuni:e,kudamatsu:e,mitou:e,nagato:e,oshima:e,shimonoseki:e,shunan:e,tabuse:e,tokuyama:e,toyota:e,ube:e,yuu:e}],yamanashi:[1,{chuo:e,doshi:e,fuefuki:e,fujikawa:e,fujikawaguchiko:e,fujiyoshida:e,hayakawa:e,hokuto:e,ichikawamisato:e,kai:e,kofu:e,koshu:e,kosuge:e,"minami-alps":e,minobu:e,nakamichi:e,nanbu:e,narusawa:e,nirasaki:e,nishikatsura:e,oshino:e,otsuki:e,showa:e,tabayama:e,tsuru:e,uenohara:e,yamanakako:e,yamanashi:e}],"xn--ehqz56n":e,ä¸é:e,"xn--1lqs03n":e,京é½:e,"xn--qqqt11m":e,ä½è³:e,"xn--f6qx53a":e,å
µåº«:e,"xn--djrs72d6uy":e,åæµ·é:e,"xn--mkru45i":e,åè:e,"xn--0trq7p7nn":e,åæå±±:e,"xn--5js045d":e,å¼ç:e,"xn--kbrq7o":e,大å:e,"xn--pssu33l":e,大éª:e,"xn--ntsq17g":e,å¥è¯:e,"xn--uisz3g":e,å®®å:e,"xn--6btw5a":e,å®®å´:e,"xn--1ctwo":e,å¯å±±:e,"xn--6orx2r":e,å±±å£:e,"xn--rht61e":e,山形:e,"xn--rht27z":e,山梨:e,"xn--nit225k":e,å²é:e,"xn--rht3d":e,岡山:e,"xn--djty4k":e,岩æ:e,"xn--klty5x":e,å³¶æ ¹:e,"xn--kltx9a":e,åºå³¶:e,"xn--kltp7d":e,徳島:e,"xn--c3s14m":e,æåª:e,"xn--vgu402c":e,æç¥:e,"xn--efvn9s":e,æ°æ½:e,"xn--1lqs71d":e,æ±äº¬:e,"xn--4pvxs":e,æ æ¨:e,"xn--uuwu58a":e,æ²ç¸:e,"xn--zbx025d":e,æ»è³:e,"xn--8pvr4u":e,çæ¬:e,"xn--5rtp49c":e,ç³å·:e,"xn--ntso0iqx3a":e,ç¥å¥å·:e,"xn--elqq16h":e,ç¦äº:e,"xn--4it168d":e,ç¦å²¡:e,"xn--klt787d":e,ç¦å³¶:e,"xn--rny31h":e,ç§ç°:e,"xn--7t0a264c":e,群馬:e,"xn--uist22h":e,è¨å:e,"xn--8ltr62k":e,é·å´:e,"xn--2m4a15e":e,é·é:e,"xn--32vp30h":e,鿣®:e,"xn--4it797k":e,é岡:e,"xn--5rtq34k":e,é¦å·:e,"xn--k7yn95e":e,é«ç¥:e,"xn--tor131o":e,é³¥å:e,"xn--d5qv7z876c":e,鹿å
å³¶:e,kawasaki:v,kitakyushu:v,kobe:v,nagoya:v,sapporo:v,sendai:v,yokohama:v,buyshop:t,fashionstore:t,handcrafted:t,kawaiishop:t,supersale:t,theshop:t,"0am":t,"0g0":t,"0j0":t,"0t0":t,mydns:t,pgw:t,wjg:t,usercontent:t,angry:t,babyblue:t,babymilk:t,backdrop:t,bambina:t,bitter:t,blush:t,boo:t,boy:t,boyfriend:t,but:t,candypop:t,capoo:t,catfood:t,cheap:t,chicappa:t,chillout:t,chips:t,chowder:t,chu:t,ciao:t,cocotte:t,coolblog:t,cranky:t,cutegirl:t,daa:t,deca:t,deci:t,digick:t,egoism:t,fakefur:t,fem:t,flier:t,floppy:t,fool:t,frenchkiss:t,girlfriend:t,girly:t,gloomy:t,gonna:t,greater:t,hacca:t,heavy:t,her:t,hiho:t,hippy:t,holy:t,hungry:t,icurus:t,itigo:t,jellybean:t,kikirara:t,kill:t,kilo:t,kuron:t,littlestar:t,lolipopmc:t,lolitapunk:t,lomo:t,lovepop:t,lovesick:t,main:t,mods:t,mond:t,mongolian:t,moo:t,namaste:t,nikita:t,nobushi:t,noor:t,oops:t,parallel:t,parasite:t,pecori:t,peewee:t,penne:t,pepper:t,perma:t,pigboat:t,pinoko:t,punyu:t,pupu:t,pussycat:t,pya:t,raindrop:t,readymade:t,sadist:t,schoolbus:t,secret:t,staba:t,stripper:t,sub:t,sunnyday:t,thick:t,tonkotsu:t,under:t,upper:t,velvet:t,verse:t,versus:t,vivian:t,watson:t,weblike:t,whitesnow:t,zombie:t,hateblo:t,hatenablog:t,hatenadiary:t,"2-d":t,bona:t,crap:t,daynight:t,eek:t,flop:t,halfmoon:t,jeez:t,matrix:t,mimoza:t,netgamers:t,nyanta:t,o0o0:t,rdy:t,rgr:t,rulez:t,sakurastorage:[0,{isk01:ae,isk02:ae}],saloon:t,sblo:t,skr:t,tank:t,"uh-oh":t,undo:t,webaccel:[0,{rs:t,user:t}],websozai:t,xii:t}],ke:[1,{ac:e,co:e,go:e,info:e,me:e,mobi:e,ne:e,or:e,sc:e}],kg:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,us:t}],kh:v,ki:pe,km:[1,{ass:e,com:e,edu:e,gov:e,mil:e,nom:e,org:e,prd:e,tm:e,asso:e,coop:e,gouv:e,medecin:e,notaires:e,pharmaciens:e,presse:e,veterinaire:e}],kn:[1,{edu:e,gov:e,net:e,org:e}],kp:[1,{com:e,edu:e,gov:e,org:e,rep:e,tra:e}],kr:[1,{ac:e,ai:e,co:e,es:e,go:e,hs:e,io:e,it:e,kg:e,me:e,mil:e,ms:e,ne:e,or:e,pe:e,re:e,sc:e,busan:e,chungbuk:e,chungnam:e,daegu:e,daejeon:e,gangwon:e,gwangju:e,gyeongbuk:e,gyeonggi:e,gyeongnam:e,incheon:e,jeju:e,jeonbuk:e,jeonnam:e,seoul:e,ulsan:e,c01:t,"eliv-dns":t}],kw:[1,{com:e,edu:e,emb:e,gov:e,ind:e,net:e,org:e}],ky:$,kz:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,jcloud:t}],la:[1,{com:e,edu:e,gov:e,info:e,int:e,net:e,org:e,per:e,bnr:t}],lb:n,lc:[1,{co:e,com:e,edu:e,gov:e,net:e,org:e,oy:t}],li:e,lk:[1,{ac:e,assn:e,com:e,edu:e,gov:e,grp:e,hotel:e,int:e,ltd:e,net:e,ngo:e,org:e,sch:e,soc:e,web:e}],lr:n,ls:[1,{ac:e,biz:e,co:e,edu:e,gov:e,info:e,net:e,org:e,sc:e}],lt:c,lu:[1,{"123website":t}],lv:[1,{asn:e,com:e,conf:e,edu:e,gov:e,id:e,mil:e,net:e,org:e}],ly:[1,{com:e,edu:e,gov:e,id:e,med:e,net:e,org:e,plc:e,sch:e}],ma:[1,{ac:e,co:e,gov:e,net:e,org:e,press:e}],mc:[1,{asso:e,tm:e}],md:[1,{ir:t}],me:[1,{ac:e,co:e,edu:e,gov:e,its:e,net:e,org:e,priv:e,c66:t,craft:t,edgestack:t,filegear:t,glitch:t,"filegear-sg":t,lohmus:t,barsy:t,mcdir:t,brasilia:t,ddns:t,dnsfor:t,hopto:t,loginto:t,noip:t,webhop:t,soundcast:t,tcp4:t,vp4:t,diskstation:t,dscloud:t,i234:t,myds:t,synology:t,transip:U,nohost:t}],mg:[1,{co:e,com:e,edu:e,gov:e,mil:e,nom:e,org:e,prd:e}],mh:e,mil:e,mk:[1,{com:e,edu:e,gov:e,inf:e,name:e,net:e,org:e}],ml:[1,{ac:e,art:e,asso:e,com:e,edu:e,gouv:e,gov:e,info:e,inst:e,net:e,org:e,pr:e,presse:e}],mm:v,mn:[1,{edu:e,gov:e,org:e,nyc:t}],mo:n,mobi:[1,{barsy:t,dscloud:t}],mp:[1,{ju:t}],mq:e,mr:c,ms:[1,{com:e,edu:e,gov:e,net:e,org:e,minisite:t}],mt:$,mu:[1,{ac:e,co:e,com:e,gov:e,net:e,or:e,org:e}],museum:e,mv:[1,{aero:e,biz:e,com:e,coop:e,edu:e,gov:e,info:e,int:e,mil:e,museum:e,name:e,net:e,org:e,pro:e}],mw:[1,{ac:e,biz:e,co:e,com:e,coop:e,edu:e,gov:e,int:e,net:e,org:e}],mx:[1,{com:e,edu:e,gob:e,net:e,org:e}],my:[1,{biz:e,com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e}],mz:[1,{ac:e,adv:e,co:e,edu:e,gov:e,mil:e,net:e,org:e}],na:[1,{alt:e,co:e,com:e,gov:e,net:e,org:e}],name:[1,{her:te,his:te}],nc:[1,{asso:e,nom:e}],ne:e,net:[1,{adobeaemcloud:t,"adobeio-static":t,adobeioruntime:t,akadns:t,akamai:t,"akamai-staging":t,akamaiedge:t,"akamaiedge-staging":t,akamaihd:t,"akamaihd-staging":t,akamaiorigin:t,"akamaiorigin-staging":t,akamaized:t,"akamaized-staging":t,edgekey:t,"edgekey-staging":t,edgesuite:t,"edgesuite-staging":t,alwaysdata:t,myamaze:t,cloudfront:t,appudo:t,"atlassian-dev":[0,{prod:_e}],myfritz:t,onavstack:t,shopselect:t,blackbaudcdn:t,boomla:t,bplaced:t,square7:t,cdn77:[0,{r:t}],"cdn77-ssl":t,gb:t,hu:t,jp:t,se:t,uk:t,clickrising:t,"ddns-ip":t,"dns-cloud":t,"dns-dynamic":t,cloudaccess:t,cloudflare:[2,{cdn:t}],cloudflareanycast:_e,cloudflarecn:_e,cloudflareglobal:_e,ctfcloud:t,"feste-ip":t,"knx-server":t,"static-access":t,cryptonomic:a,dattolocal:t,mydatto:t,debian:t,definima:t,deno:t,"at-band-camp":t,blogdns:t,"broke-it":t,buyshouses:t,dnsalias:t,dnsdojo:t,"does-it":t,dontexist:t,dynalias:t,dynathome:t,endofinternet:t,"from-az":t,"from-co":t,"from-la":t,"from-ny":t,"gets-it":t,"ham-radio-op":t,homeftp:t,homeip:t,homelinux:t,homeunix:t,"in-the-band":t,"is-a-chef":t,"is-a-geek":t,"isa-geek":t,"kicks-ass":t,"office-on-the":t,podzone:t,"scrapper-site":t,selfip:t,"sells-it":t,servebbs:t,serveftp:t,thruhere:t,webhop:t,casacam:t,dynu:t,dynv6:t,twmail:t,ru:t,channelsdvr:[2,{u:t}],fastly:[0,{freetls:t,map:t,prod:[0,{a:t,global:t}],ssl:[0,{a:t,b:t,global:t}]}],fastlylb:[2,{map:t}],edgeapp:t,"keyword-on":t,"live-on":t,"server-on":t,"cdn-edges":t,heteml:t,cloudfunctions:t,"grafana-dev":t,iobb:t,moonscale:t,"in-dsl":t,"in-vpn":t,oninferno:t,botdash:t,"apps-1and1":t,ipifony:t,cloudjiffy:[2,{"fra1-de":t,"west1-us":t}],elastx:[0,{"jls-sto1":t,"jls-sto2":t,"jls-sto3":t}],massivegrid:[0,{paas:[0,{"fr-1":t,"lon-1":t,"lon-2":t,"ny-1":t,"ny-2":t,"sg-1":t}]}],saveincloud:[0,{jelastic:t,"nordeste-idc":t}],scaleforce:ce,kinghost:t,uni5:t,krellian:t,ggff:t,localcert:t,localhostcert:t,localto:a,barsy:t,memset:t,"azure-api":t,"azure-mobile":t,azureedge:t,azurefd:t,azurestaticapps:[2,{1:t,2:t,3:t,4:t,5:t,6:t,7:t,centralus:t,eastasia:t,eastus2:t,westeurope:t,westus2:t}],azurewebsites:t,cloudapp:t,trafficmanager:t,windows:[0,{core:[0,{blob:t}],servicebus:t}],mynetname:[0,{sn:t}],routingthecloud:t,bounceme:t,ddns:t,"eating-organic":t,mydissent:t,myeffect:t,mymediapc:t,mypsx:t,mysecuritycamera:t,nhlfan:t,"no-ip":t,pgafan:t,privatizehealthinsurance:t,redirectme:t,serveblog:t,serveminecraft:t,sytes:t,dnsup:t,hicam:t,"now-dns":t,ownip:t,vpndns:t,cloudycluster:t,ovh:[0,{hosting:a,webpaas:a}],rackmaze:t,myradweb:t,in:t,"subsc-pay":t,squares:t,schokokeks:t,"firewall-gateway":t,seidat:t,senseering:t,siteleaf:t,mafelo:t,myspreadshop:t,"vps-host":[2,{jelastic:[0,{atl:t,njs:t,ric:t}]}],srcf:[0,{soc:t,user:t}],supabase:t,dsmynas:t,familyds:t,ts:[2,{c:a}],torproject:[2,{pages:t}],vusercontent:t,"reserve-online":t,"community-pro":t,meinforum:t,yandexcloud:[2,{storage:t,website:t}],za:t}],nf:[1,{arts:e,com:e,firm:e,info:e,net:e,other:e,per:e,rec:e,store:e,web:e}],ng:[1,{com:e,edu:e,gov:e,i:e,mil:e,mobi:e,name:e,net:e,org:e,sch:e,biz:[2,{co:t,dl:t,go:t,lg:t,on:t}],col:t,firm:t,gen:t,ltd:t,ngo:t,plc:t}],ni:[1,{ac:e,biz:e,co:e,com:e,edu:e,gob:e,in:e,info:e,int:e,mil:e,net:e,nom:e,org:e,web:e}],nl:[1,{co:t,"hosting-cluster":t,gov:t,khplay:t,"123website":t,myspreadshop:t,transurl:a,cistron:t,demon:t}],no:[1,{fhs:e,folkebibl:e,fylkesbibl:e,idrett:e,museum:e,priv:e,vgs:e,dep:e,herad:e,kommune:e,mil:e,stat:e,aa:X,ah:X,bu:X,fm:X,hl:X,hm:X,"jan-mayen":X,mr:X,nl:X,nt:X,of:X,ol:X,oslo:X,rl:X,sf:X,st:X,svalbard:X,tm:X,tr:X,va:X,vf:X,akrehamn:e,"xn--krehamn-dxa":e,Ã¥krehamn:e,algard:e,"xn--lgrd-poac":e,Ã¥lgÃ¥rd:e,arna:e,bronnoysund:e,"xn--brnnysund-m8ac":e,brønnøysund:e,brumunddal:e,bryne:e,drobak:e,"xn--drbak-wua":e,drøbak:e,egersund:e,fetsund:e,floro:e,"xn--flor-jra":e,florø:e,fredrikstad:e,hokksund:e,honefoss:e,"xn--hnefoss-q1a":e,hønefoss:e,jessheim:e,jorpeland:e,"xn--jrpeland-54a":e,jørpeland:e,kirkenes:e,kopervik:e,krokstadelva:e,langevag:e,"xn--langevg-jxa":e,langevÃ¥g:e,leirvik:e,mjondalen:e,"xn--mjndalen-64a":e,mjøndalen:e,"mo-i-rana":e,mosjoen:e,"xn--mosjen-eya":e,mosjøen:e,nesoddtangen:e,orkanger:e,osoyro:e,"xn--osyro-wua":e,osøyro:e,raholt:e,"xn--rholt-mra":e,rÃ¥holt:e,sandnessjoen:e,"xn--sandnessjen-ogb":e,sandnessjøen:e,skedsmokorset:e,slattum:e,spjelkavik:e,stathelle:e,stavern:e,stjordalshalsen:e,"xn--stjrdalshalsen-sqb":e,stjørdalshalsen:e,tananger:e,tranby:e,vossevangen:e,aarborte:e,aejrie:e,afjord:e,"xn--fjord-lra":e,Ã¥fjord:e,agdenes:e,akershus:le,aknoluokta:e,"xn--koluokta-7ya57h":e,ákÅoluokta:e,al:e,"xn--l-1fa":e,Ã¥l:e,alaheadju:e,"xn--laheadju-7ya":e,álaheadju:e,alesund:e,"xn--lesund-hua":e,Ã¥lesund:e,alstahaug:e,alta:e,"xn--lt-liac":e,áltá:e,alvdal:e,amli:e,"xn--mli-tla":e,Ã¥mli:e,amot:e,"xn--mot-tla":e,Ã¥mot:e,andasuolo:e,andebu:e,andoy:e,"xn--andy-ira":e,andøy:e,ardal:e,"xn--rdal-poa":e,Ã¥rdal:e,aremark:e,arendal:e,"xn--s-1fa":e,Ã¥s:e,aseral:e,"xn--seral-lra":e,Ã¥seral:e,asker:e,askim:e,askoy:e,"xn--asky-ira":e,askøy:e,askvoll:e,asnes:e,"xn--snes-poa":e,Ã¥snes:e,audnedaln:e,aukra:e,aure:e,aurland:e,"aurskog-holand":e,"xn--aurskog-hland-jnb":e,"aurskog-høland":e,austevoll:e,austrheim:e,averoy:e,"xn--avery-yua":e,averøy:e,badaddja:e,"xn--bdddj-mrabd":e,bÃ¥dÃ¥ddjÃ¥:e,"xn--brum-voa":e,bærum:e,bahcavuotna:e,"xn--bhcavuotna-s4a":e,báhcavuotna:e,bahccavuotna:e,"xn--bhccavuotna-k7a":e,báhccavuotna:e,baidar:e,"xn--bidr-5nac":e,báidár:e,bajddar:e,"xn--bjddar-pta":e,bájddar:e,balat:e,"xn--blt-elab":e,bálát:e,balestrand:e,ballangen:e,balsfjord:e,bamble:e,bardu:e,barum:e,batsfjord:e,"xn--btsfjord-9za":e,bÃ¥tsfjord:e,bearalvahki:e,"xn--bearalvhki-y4a":e,bearalváhki:e,beardu:e,beiarn:e,berg:e,bergen:e,berlevag:e,"xn--berlevg-jxa":e,berlevÃ¥g:e,bievat:e,"xn--bievt-0qa":e,bievát:e,bindal:e,birkenes:e,bjarkoy:e,"xn--bjarky-fya":e,bjarkøy:e,bjerkreim:e,bjugn:e,bodo:e,"xn--bod-2na":e,bodø:e,bokn:e,bomlo:e,"xn--bmlo-gra":e,bømlo:e,bremanger:e,bronnoy:e,"xn--brnny-wuac":e,brønnøy:e,budejju:e,buskerud:le,bygland:e,bykle:e,cahcesuolo:e,"xn--hcesuolo-7ya35b":e,Äáhcesuolo:e,davvenjarga:e,"xn--davvenjrga-y4a":e,davvenjárga:e,davvesiida:e,deatnu:e,dielddanuorri:e,divtasvuodna:e,divttasvuotna:e,donna:e,"xn--dnna-gra":e,dønna:e,dovre:e,drammen:e,drangedal:e,dyroy:e,"xn--dyry-ira":e,dyrøy:e,eid:e,eidfjord:e,eidsberg:e,eidskog:e,eidsvoll:e,eigersund:e,elverum:e,enebakk:e,engerdal:e,etne:e,etnedal:e,evenassi:e,"xn--eveni-0qa01ga":e,evenášši:e,evenes:e,"evje-og-hornnes":e,farsund:e,fauske:e,fedje:e,fet:e,finnoy:e,"xn--finny-yua":e,finnøy:e,fitjar:e,fjaler:e,fjell:e,fla:e,"xn--fl-zia":e,flÃ¥:e,flakstad:e,flatanger:e,flekkefjord:e,flesberg:e,flora:e,folldal:e,forde:e,"xn--frde-gra":e,førde:e,forsand:e,fosnes:e,"xn--frna-woa":e,fræna:e,frana:e,frei:e,frogn:e,froland:e,frosta:e,froya:e,"xn--frya-hra":e,frøya:e,fuoisku:e,fuossko:e,fusa:e,fyresdal:e,gaivuotna:e,"xn--givuotna-8y
1251a":e,gáivuotna:e,galsa:e,"xn--gls-elac":e,gálsá:e,gamvik:e,gangaviika:e,"xn--ggaviika-8ya47h":e,gáÅgaviika:e,gaular:e,gausdal:e,giehtavuoatna:e,gildeskal:e,"xn--gildeskl-g0a":e,gildeskÃ¥l:e,giske:e,gjemnes:e,gjerdrum:e,gjerstad:e,gjesdal:e,gjovik:e,"xn--gjvik-wua":e,gjøvik:e,gloppen:e,gol:e,gran:e,grane:e,granvin:e,gratangen:e,grimstad:e,grong:e,grue:e,gulen:e,guovdageaidnu:e,ha:e,"xn--h-2fa":e,hÃ¥:e,habmer:e,"xn--hbmer-xqa":e,hábmer:e,hadsel:e,"xn--hgebostad-g3a":e,hægebostad:e,hagebostad:e,halden:e,halsa:e,hamar:e,hamaroy:e,hammarfeasta:e,"xn--hmmrfeasta-s4ac":e,hámmárfeasta:e,hammerfest:e,hapmir:e,"xn--hpmir-xqa":e,hápmir:e,haram:e,hareid:e,harstad:e,hasvik:e,hattfjelldal:e,haugesund:e,hedmark:[0,{os:e,valer:e,"xn--vler-qoa":e,vÃ¥ler:e}],hemne:e,hemnes:e,hemsedal:e,hitra:e,hjartdal:e,hjelmeland:e,hobol:e,"xn--hobl-ira":e,hobøl:e,hof:e,hol:e,hole:e,holmestrand:e,holtalen:e,"xn--holtlen-hxa":e,holtÃ¥len:e,hordaland:[0,{os:e}],hornindal:e,horten:e,hoyanger:e,"xn--hyanger-q1a":e,høyanger:e,hoylandet:e,"xn--hylandet-54a":e,høylandet:e,hurdal:e,hurum:e,hvaler:e,hyllestad:e,ibestad:e,inderoy:e,"xn--indery-fya":e,inderøy:e,iveland:e,ivgu:e,jevnaker:e,jolster:e,"xn--jlster-bya":e,jølster:e,j
vendor: 26,556 bytes, line 1251
1251ondal:e,kafjord:e,"xn--kfjord-iua":e,kÃ¥fjord:e,karasjohka:e,"xn--krjohka-hwab49j":e,kárášjohka:e,karasjok:e,karlsoy:e,karmoy:e,"xn--karmy-yua":e,karmøy:e,kautokeino:e,klabu:e,"xn--klbu-woa":e,klæbu:e,klepp:e,kongsberg:e,kongsvinger:e,kraanghke:e,"xn--kranghke-b0a":e,krÃ¥anghke:e,kragero:e,"xn--krager-gya":e,kragerø:e,kristiansand:e,kristiansund:e,krodsherad:e,"xn--krdsherad-m8a":e,krødsherad:e,"xn--kvfjord-nxa":e,kvæfjord:e,"xn--kvnangen-k0a":e,kvænangen:e,kvafjord:e,kvalsund:e,kvam:e,kvanangen:e,kvinesdal:e,kvinnherad:e,kviteseid:e,kvitsoy:e,"xn--kvitsy-fya":e,kvitsøy:e,laakesvuemie:e,"xn--lrdal-sra":e,lærdal:e,lahppi:e,"xn--lhppi-xqa":e,láhppi:e,lardal:e,larvik:e,lavagis:e,lavangen:e,leangaviika:e,"xn--leagaviika-52b":e,leaÅgaviika:e,lebesby:e,leikanger:e,leirfjord:e,leka:e,leksvik:e,lenvik:e,lerdal:e,lesja:e,levanger:e,lier:e,lierne:e,lillehammer:e,lillesand:e,lindas:e,"xn--linds-pra":e,lindÃ¥s:e,lindesnes:e,loabat:e,"xn--loabt-0qa":e,loabát:e,lodingen:e,"xn--ldingen-q1a":e,lødingen:e,lom:e,loppa:e,lorenskog:e,"xn--lrenskog-54a":e,lørenskog:e,loten:e,"xn--lten-gra":e,løten:e,lund:e,lunner:e,luroy:e,"xn--lury-ira":e,lurøy:e,luster:e,lyngdal:e,lyngen:e,malatvuopmi:e,"xn--mlatvuopmi-s4a":e,málatvuopmi:e,malselv:e,"xn--mlselv-iua":e,mÃ¥lselv:e,malvik:e,mandal:e,marker:e,marnardal:e,masfjorden:e,masoy:e,"xn--msy-ula0h":e,mÃ¥søy:e,"matta-varjjat":e,"xn--mtta-vrjjat-k7af":e,"mátta-várjjat":e,meland:e,meldal:e,melhus:e,meloy:e,"xn--mely-ira":e,meløy:e,meraker:e,"xn--merker-kua":e,merÃ¥ker:e,midsund:e,"midtre-gauldal":e,moareke:e,"xn--moreke-jua":e,moÃ¥reke:e,modalen:e,modum:e,molde:e,"more-og-romsdal":[0,{heroy:e,sande:e}],"xn--mre-og-romsdal-qqb":[0,{"xn--hery-ira":e,sande:e}],"møre-og-romsdal":[0,{herøy:e,sande:e}],moskenes:e,moss:e,mosvik:e,muosat:e,"xn--muost-0qa":e,muosát:e,naamesjevuemie:e,"xn--nmesjevuemie-tcba":e,nååmesjevuemie:e,"xn--nry-yla5g":e,nærøy:e,namdalseid:e,namsos:e,namsskogan:e,nannestad:e,naroy:e,narviika:e,narvik:e,naustdal:e,navuotna:e,"xn--nvuotna-hwa":e,návuotna:e,"nedre-eiker":e,nesna:e,nesodden:e,nesseby:e,nesset:e,nissedal:e,nittedal:e,"nord-aurdal":e,"nord-fron":e,"nord-odal":e,norddal:e,nordkapp:e,nordland:[0,{bo:e,"xn--b-5ga":e,bø:e,heroy:e,"xn--hery-ira":e,herøy:e}],"nordre-land":e,nordreisa:e,"nore-og-uvdal":e,notodden:e,notteroy:e,"xn--nttery-byae":e,nøtterøy:e,odda:e,oksnes:e,"xn--ksnes-uua":e,øksnes:e,omasvuotna:e,oppdal:e,oppegard:e,"xn--oppegrd-ixa":e,oppegÃ¥rd:e,orkdal:e,orland:e,"xn--rland-uua":e,ørland:e,orskog:e,"xn--rskog-uua":e,ørskog:e,orsta:e,"xn--rsta-fra":e,ørsta:e,osen:e,osteroy:e,"xn--ostery-fya":e,osterøy:e,ostfold:[0,{valer:e}],"xn--stfold-9xa":[0,{"xn--vler-qoa":e}],østfold:[0,{vÃ¥ler:e}],"ostre-toten":e,"xn--stre-toten-zcb":e,"østre-toten":e,overhalla:e,"ovre-eiker":e,"xn--vre-eiker-k8a":e,"øvre-eiker":e,oyer:e,"xn--yer-zna":e,øyer:e,oygarden:e,"xn--ygarden-p1a":e,øygarden:e,"oystre-slidre":e,"xn--ystre-slidre-ujb":e,"øystre-slidre":e,porsanger:e,porsangu:e,"xn--porsgu-sta26f":e,porsáÅgu:e,porsgrunn:e,rade:e,"xn--rde-ula":e,rÃ¥de:e,radoy:e,"xn--rady-ira":e,radøy:e,"xn--rlingen-mxa":e,rælingen:e,rahkkeravju:e,"xn--rhkkervju-01af":e,ráhkkerávju:e,raisa:e,"xn--risa-5na":e,ráisa:e,rakkestad:e,ralingen:e,rana:e,randaberg:e,rauma:e,rendalen:e,rennebu:e,rennesoy:e,"xn--rennesy-v1a":e,rennesøy:e,rindal:e,ringebu:e,ringerike:e,ringsaker:e,risor:e,"xn--risr-ira":e,risør:e,rissa:e,roan:e,rodoy:e,"xn--rdy-0nab":e,rødøy:e,rollag:e,romsa:e,romskog:e,"xn--rmskog-bya":e,rømskog:e,roros:e,"xn--rros-gra":e,røros:e,rost:e,"xn--rst-0na":e,røst:e,royken:e,"xn--ryken-vua":e,røyken:e,royrvik:e,"xn--ryrvik-bya":e,røyrvik:e,ruovat:e,rygge:e,salangen:e,salat:e,"xn--slat-5na":e,sálat:e,"xn--slt-elab":e,sálát:e,saltdal:e,samnanger:e,sandefjord:e,sandnes:e,sandoy:e,"xn--sandy-yua":e,sandøy:e,sarpsborg:e,sauda:e,sauherad:e,sel:e,selbu:e,selje:e,seljord:e,siellak:e,sigdal:e,siljan:e,sirdal:e,skanit:e,"xn--sknit-yqa":e,skánit:e,skanland:e,"xn--sknland-fxa":e,skÃ¥nland:e,skaun:e,skedsmo:e,ski:e,skien:e,skierva:e,"xn--skierv-uta":e,skiervá:e,skiptvet:e,skjak:e,"xn--skjk-soa":e,skjÃ¥k:e,skjervoy:e,"xn--skjervy-v1a":e,skjervøy:e,skodje:e,smola:e,"xn--smla-hra":e,smøla:e,snaase:e,"xn--snase-nra":e,snÃ¥ase:e,snasa:e,"xn--snsa-roa":e,snÃ¥sa:e,snillfjord:e,snoasa:e,sogndal:e,sogne:e,"xn--sgne-gra":e,søgne:e,sokndal:e,sola:e,solund:e,somna:e,"xn--smna-gra":e,sømna:e,"sondre-land":e,"xn--sndre-land-0cb":e,"søndre-land":e,songdalen:e,"sor-aurdal":e,"xn--sr-aurdal-l8a":e,"sør-aurdal":e,"sor-fron":e,"xn--sr-fron-q1a":e,"sør-fron":e,"sor-odal":e,"xn--sr-odal-q1a":e,"sør-odal":e,"sor-varanger":e,"xn--sr-varanger-ggb":e,"sør-varanger":e,sorfold:e,"xn--srfold-bya":e,sørfold:e,sorreisa:e,"xn--srreisa-q1a":e,sørreisa:e,sortland:e,sorum:e,"xn--srum-gra":e,sørum:e,spydeberg:e,stange:e,stavanger:e,steigen:e,steinkjer:e,stjordal:e,"xn--stjrdal-s1a":e,stjørdal:e,stokke:e,"stor-elvdal":e,stord:e,stordal:e,storfjord:e,strand:e,stranda:e,stryn:e,sula:e,suldal:e,sund:e,sunndal:e,surnadal:e,sveio:e,svelvik:e,sykkylven:e,tana:e,telemark:[0,{bo:e,"xn--b-5ga":e,bø:e}],time:e,tingvoll:e,tinn:e,tjeldsund:e,tjome:e,"xn--tjme-hra":e,tjøme:e,tokke:e,tolga:e,tonsberg:e,"xn--tnsberg-q1a":e,tønsberg:e,torsken:e,"xn--trna-woa":e,træna:e,trana:e,tranoy:e,"xn--trany-yua":e,tranøy:e,troandin:e,trogstad:e,"xn--trgstad-r1a":e,trøgstad:e,tromsa:e,tromso:e,"xn--troms-zua":e,tromsø:e,trondheim:e,trysil:e,tvedestrand:e,tydal:e,tynset:e,tysfjord:e,tysnes:e,"xn--tysvr-vra":e,tysvær:e,tysvar:e,ullensaker:e,ullensvang:e,ulvik:e,unjarga:e,"xn--unjrga-rta":e,unjárga:e,utsira:e,vaapste:e,vadso:e,"xn--vads-jra":e,vadsø:e,"xn--vry-yla5g":e,værøy:e,vaga:e,"xn--vg-yiab":e,vÃ¥gÃ¥:e,vagan:e,"xn--vgan-qoa":e,vÃ¥gan:e,vagsoy:e,"xn--vgsy-qoa0j":e,vÃ¥gsøy:e,vaksdal:e,valle:e,vang:e,vanylven:e,vardo:e,"xn--vard-jra":e,vardø:e,varggat:e,"xn--vrggt-xqad":e,várggát:e,varoy:e,vefsn:e,vega:e,vegarshei:e,"xn--vegrshei-c0a":e,vegÃ¥rshei:e,vennesla:e,verdal:e,verran:e,vestby:e,vestfold:[0,{sande:e}],vestnes:e,"vestre-slidre":e,"vestre-toten":e,vestvagoy:e,"xn--vestvgy-ixa6o":e,vestvÃ¥gøy:e,vevelstad:e,vik:e,vikna:e,vindafjord:e,voagat:e,volda:e,voss:e,co:t,"123hjemmeside":t,myspreadshop:t}],np:v,nr:pe,nu:[1,{merseine:t,mine:t,shacknet:t,enterprisecloud:t}],nz:[1,{ac:e,co:e,cri:e,geek:e,gen:e,govt:e,health:e,iwi:e,kiwi:e,maori:e,"xn--mori-qsa":e,mÄori:e,mil:e,net:e,org:e,parliament:e,school:e,cloudns:t}],om:[1,{co:e,com:e,edu:e,gov:e,med:e,museum:e,net:e,org:e,pro:e}],onion:e,org:[1,{altervista:t,pimienta:t,poivron:t,potager:t,sweetpepper:t,cdn77:[0,{c:t,rsc:t}],"cdn77-secure":[0,{origin:[0,{ssl:t}]}],ae:t,cloudns:t,"ip-dynamic":t,ddnss:t,dpdns:t,duckdns:t,tunk:t,blogdns:t,blogsite:t,boldlygoingnowhere:t,dnsalias:t,dnsdojo:t,doesntexist:t,dontexist:t,doomdns:t,dvrdns:t,dynalias:t,dyndns:[2,{go:t,home:t}],endofinternet:t,endoftheinternet:t,"from-me":t,"game-host":t,gotdns:t,"hobby-site":t,homedns:t,homeftp:t,homelinux:t,homeunix:t,"is-a-bruinsfan":t,"is-a-candidate":t,"is-a-celticsfan":t,"is-a-chef":t,"is-a-geek":t,"is-a-knight":t,"is-a-linux-user":t,"is-a-patsfan":t,"is-a-soxfan":t,"is-found":t,"is-lost":t,"is-saved":t,"is-very-bad":t,"is-very-evil":t,"is-very-good":t,"is-very-nice":t,"is-very-sweet":t,"isa-geek":t,"kicks-ass":t,misconfused:t,podzone:t,readmyblog:t,selfip:t,sellsyourhome:t,servebbs:t,serveftp:t,servegame:t,"stuff-4-sale":t,webhop:t,accesscam:t,camdvr:t,freeddns:t,mywire:t,webredirect:t,twmail:t,eu:[2,{al:t,asso:t,at:t,au:t,be:t,bg:t,ca:t,cd:t,ch:t,cn:t,cy:t,cz:t,de:t,dk:t,edu:t,ee:t,es:t,fi:t,fr:t,gr:t,hr:t,hu:t,ie:t,il:t,in:t,int:t,is:t,it:t,jp:t,kr:t,lt:t,lu:t,lv:t,me:t,mk:t,mt:t,my:t,net:t,ng:t,nl:t,no:t,nz:t,pl:t,pt:t,ro:t,ru:t,se:t,si:t,sk:t,tr:t,uk:t,us:t}],fedorainfracloud:t,fedorapeople:t,fedoraproject:[0,{cloud:t,os:B,stg:[0,{os:B}]}],freedesktop:t,hatenadiary:t,hepforge:t,"in-dsl":t,"in-vpn":t,js:t,barsy:t,mayfirst:t,routingthecloud:t,bmoattachments:t,"cable-modem":t,collegefan:t,couchpotatofries:t,hopto:t,mlbfan:t,myftp:t,mysecuritycamera:t,nflfan:t,"no-ip":t,"read-books":t,ufcfan:t,zapto:t,dynserv:t,"now-dns":t,"is-local":t,httpbin:t,pubtls:t,jpn:t,"my-firewall":t,myfirewall:t,spdns:t,"small-web":t,dsmynas:t,familyds:t,teckids:ae,tuxfamily:t,diskstation:t,hk:t,us:t,toolforge:t,wmcloud:t,wmflabs:t,za:t}],pa:[1,{abo:e,ac:e,com:e,edu:e,gob:e,ing:e,med:e,net:e,nom:e,org:e,sld:e}],pe:[1,{com:e,edu:e,gob:e,mil:e,net:e,nom:e,org:e}],pf:[1,{com:e,edu:e,org:e}],pg:v,ph:[1,{com:e,edu:e,gov:e,i:e,mil:e,net:e,ngo:e,org:e,cloudns:t}],pk:[1,{ac:e,biz:e,com:e,edu:e,fam:e,gkp:e,gob:e,gog:e,gok:e,gop:e,gos:e,gov:e,net:e,org:e,web:e}],pl:[1,{com:e,net:e,org:e,agro:e,aid:e,atm:e,auto:e,biz:e,edu:e,gmina:e,gsm:e,info:e,mail:e,media:e,miasta:e,mil:e,nieruchomosci:e,nom:e,pc:e,powiat:e,priv:e,realestate:e,rel:e,sex:e,shop:e,sklep:e,sos:e,szkola:e,targi:e,tm:e,tourism:e,travel:e,turystyka:e,gov:[1,{ap:e,griw:e,ic:e,is:e,kmpsp:e,konsulat:e,kppsp:e,kwp:e,kwpsp:e,mup:e,mw:e,oia:e,oirm:e,oke:e,oow:e,oschr:e,oum:e,pa:e,pinb:e,piw:e,po:e,pr:e,psp:e,psse:e,pup:e,rzgw:e,sa:e,sdn:e,sko:e,so:e,sr:e,starostwo:e,ug:e,ugim:e,um:e,umig:e,upow:e,uppo:e,us:e,uw:e,uzs:e,wif:e,wiih:e,winb:e,wios:e,witd:e,wiw:e,wkz:e,wsa:e,wskr:e,wsse:e,wuoz:e,wzmiuw:e,zp:e,zpisdn:e}],augustow:e,"babia-gora":e,bedzin:e,beskidy:e,bialowieza:e,bialystok:e,bielawa:e,bieszczady:e,boleslawiec:e,bydgoszcz:e,bytom:e,cieszyn:e,czeladz:e,czest:e,dlugoleka:e,elblag:e,elk:e,glogow:e,gniezno:e,gorlice:e,grajewo:e,ilawa:e,jaworzno:e,"jelenia-gora":e,jgora:e,kalisz:e,karpacz:e,kartuzy:e,kaszuby:e,katowice:e,"kazimierz-dolny":e,kepno:e,ketrzyn:e,klodzko:e,kobierzyce:e,kolobrzeg:e,konin:e,konskowola:e,kutno:e,lapy:e,lebork:e,legnica:e,lezajsk:e,limanowa:e,lomza:e,lowicz:e,lubin:e,lukow:e,malbork:e,malopolska:e,mazowsze:e,mazury:e,mielec:e,mielno:e,mragowo:e,naklo:e,nowaruda:e,nysa:e,olawa:e,olecko:e,olkusz:e,olsztyn:e,opoczno:e,opole:e,ostroda:e,ostroleka:e,ostrowiec:e,ostrowwlkp:e,pila:e,pisz:e,podhale:e,podlasie:e,polkowice:e,pomorskie:e,pomorze:e,prochowice:e,pruszkow:e,przeworsk:e,pulawy:e,radom:e,"rawa-maz":e,rybnik:e,rzeszow:e,sanok:e,sejny:e,skoczow:e,slask:e,slupsk:e,sosnowiec:e,"stalowa-wola":e,starachowice:e,stargard:e,suwalki:e,swidnica:e,swiebodzin:e,swinoujscie:e,szczecin:e,szczytno:e,tarnobrzeg:e,tgory:e,turek:e,tychy:e,ustka:e,walbrzych:e,warmia:e,warszawa:e,waw:e,wegrow:e,wielun:e,wlocl:e,wloclawek:e,wodzislaw:e,wolomin:e,wroclaw:e,zachpomor:e,zagan:e,zarow:e,zgora:e,zgorzelec:e,art:t,gliwice:t,krakow:t,poznan:t,wroc:t,zakopane:t,beep:t,"ecommerce-shop":t,cfolks:t,dfirma:t,dkonto:t,you2:t,shoparena:t,homesklep:t,sdscloud:t,unicloud:t,lodz:t,pabianice:t,plock:t,sieradz:t,skierniewice:t,zgierz:t,krasnik:t,leczna:t,lubartow:t,lublin:t,poniatowa:t,swidnik:t,co:t,torun:t,simplesite:t,myspreadshop:t,gda:t,gdansk:t,gdynia:t,med:t,sopot:t,bielsko:t}],pm:[1,{own:t,name:t}],pn:[1,{co:e,edu:e,gov:e,net:e,org:e}],post:e,pr:[1,{biz:e,com:e,edu:e,gov:e,info:e,isla:e,name:e,net:e,org:e,pro:e,ac:e,est:e,prof:e}],pro:[1,{aaa:e,aca:e,acct:e,avocat:e,bar:e,cpa:e,eng:e,jur:e,law:e,med:e,recht:e,"12chars":t,cloudns:t,barsy:t,ngrok:t}],ps:[1,{com:e,edu:e,gov:e,net:e,org:e,plo:e,sec:e}],pt:[1,{com:e,edu:e,gov:e,int:e,net:e,nome:e,org:e,publ:e,"123paginaweb":t}],pw:[1,{gov:e,cloudns:t,x443:t}],py:[1,{com:e,coop:e,edu:e,gov:e,mil:e,net:e,org:e}],qa:[1,{com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e,sch:e}],re:[1,{asso:e,com:e,netlib:t,can:t}],ro:[1,{arts:e,com:e,firm:e,info:e,nom:e,nt:e,org:e,rec:e,store:e,tm:e,www:e,co:t,shop:t,barsy:t}],rs:[1,{ac:e,co:e,edu:e,gov:e,in:e,org:e,brendly:he,barsy:t,ox:t}],ru:[1,{ac:t,edu:t,gov:t,int:t,mil:t,eurodir:t,adygeya:t,bashkiria:t,bir:t,cbg:t,com:t,dagestan:t,grozny:t,kalmykia:t,kustanai:t,marine:t,mordovia:t,msk:t,mytis:t,nalchik:t,nov:t,pyatigorsk:t,spb:t,vladikavkaz:t,vladimir:t,na4u:t,mircloud:t,myjino:[2,{hosting:a,landing:a,spectrum:a,vps:a}],cldmail:[0,{hb:t}],mcdir:[2,{vps:t}],mcpre:t,net:t,org:t,pp:t,lk3:t,ras:t}],rw:[1,{ac:e,co:e,coop:e,gov:e,mil:e,net:e,org:e}],sa:[1,{com:e,edu:e,gov:e,med:e,net:e,org:e,pub:e,sch:e}],sb:n,sc:n,sd:[1,{com:e,edu:e,gov:e,info:e,med:e,net:e,org:e,tv:e}],se:[1,{a:e,ac:e,b:e,bd:e,brand:e,c:e,d:e,e,f:e,fh:e,fhsk:e,fhv:e,g:e,h:e,i:e,k:e,komforb:e,kommunalforbund:e,komvux:e,l:e,lanbib:e,m:e,n:e,naturbruksgymn:e,o:e,org:e,p:e,parti:e,pp:e,press:e,r:e,s:e,t:e,tm:e,u:e,w:e,x:e,y:e,z:e,com:t,iopsys:t,"123minsida":t,itcouldbewor:t,myspreadshop:t}],sg:[1,{com:e,edu:e,gov:e,net:e,org:e,enscaled:t}],sh:[1,{com:e,gov:e,mil:e,net:e,org:e,hashbang:t,botda:t,platform:[0,{ent:t,eu:t,us:t}],now:t}],si:[1,{f5:t,gitapp:t,gitpage:t}],sj:e,sk:e,sl:n,sm:e,sn:[1,{art:e,com:e,edu:e,gouv:e,org:e,perso:e,univ:e}],so:[1,{com:e,edu:e,gov:e,me:e,net:e,org:e,surveys:t}],sr:e,ss:[1,{biz:e,co:e,com:e,edu:e,gov:e,me:e,net:e,org:e,sch:e}],st:[1,{co:e,com:e,consulado:e,edu:e,embaixada:e,mil:e,net:e,org:e,principe:e,saotome:e,store:e,helioho:t,kirara:t,noho:t}],su:[1,{abkhazia:t,adygeya:t,aktyubinsk:t,arkhangelsk:t,armenia:t,ashgabad:t,azerbaijan:t,balashov:t,bashkiria:t,bryansk:t,bukhara:t,chimkent:t,dagestan:t,"east-kazakhstan":t,exnet:t,georgia:t,grozny:t,ivanovo:t,jambyl:t,kalmykia:t,kaluga:t,karacol:t,karaganda:t,karelia:t,khakassia:t,krasnodar:t,kurgan:t,kustanai:t,lenug:t,mangyshlak:t,mordovia:t,msk:t,murmansk:t,nalchik:t,navoi:t,"north-kazakhstan":t,nov:t,obninsk:t,penza:t,pokrovsk:t,sochi:t,spb:t,tashkent:t,termez:t,togliatti:t,troitsk:t,tselinograd:t,tula:t,tuva:t,vladikavkaz:t,vladimir:t,vologda:t}],sv:[1,{com:e,edu:e,gob:e,org:e,red:e}],sx:c,sy:r,sz:[1,{ac:e,co:e,org:e}],tc:e,td:e,tel:e,tf:[1,{sch:t}],tg:e,th:[1,{ac:e,co:e,go:e,in:e,mi:e,net:e,or:e,online:t,shop:t}],tj:[1,{ac:e,biz:e,co:e,com:e,edu:e,go:e,gov:e,int:e,mil:e,name:e,net:e,nic:e,org:e,test:e,web:e}],tk:e,tl:c,tm:[1,{co:e,com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e}],tn:[1,{com:e,ens:e,fin:e,gov:e,ind:e,info:e,intl:e,mincom:e,nat:e,net:e,org:e,perso:e,tourism:e,orangecloud:t}],to:[1,{611:t,com:e,edu:e,gov:e,mil:e,net:e,org:e,oya:t,x0:t,quickconnect:N,vpnplus:t}],tr:[1,{av:e,bbs:e,bel:e,biz:e,com:e,dr:e,edu:e,gen:e,gov:e,info:e,k12:e,kep:e,mil:e,name:e,net:e,org:e,pol:e,tel:e,tsk:e,tv:e,web:e,nc:c}],tt:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],tv:[1,{"better-than":t,dyndns:t,"on-the-web":t,"worse-than":t,from:t,sakura:t}],tw:[1,{club:e,com:[1,{mymailer:t}],ebiz:e,edu:e,game:e,gov:e,idv:e,mil:e,net:e,org:e,url:t,mydns:t}],tz:[1,{ac:e,co:e,go:e,hotel:e,info:e,me:e,mil:e,mobi:e,ne:e,or:e,sc:e,tv:e}],ua:[1,{com:e,edu:e,gov:e,in:e,net:e,org:e,cherkassy:e,cherkasy:e,chernigov:e,chernihiv:e,chernivtsi:e,chernovtsy:e,ck:e,cn:e,cr:e,crimea:e,cv:e,dn:e,dnepropetrovsk:e,dnipropetrovsk:e,donetsk:e,dp:e,if:e,"ivano-frankivsk":e,kh:e,kharkiv:e,kharkov:e,kherson:e,khmelnitskiy:e,khmelnytskyi:e,kiev:e,kirovograd:e,km:e,kr:e,kropyvnytskyi:e,krym:e,ks:e,kv:e,kyiv:e,lg:e,lt:e,lugansk:e,luhansk:e,lutsk:e,lv:e,lviv:e,mk:e,mykolaiv:e,nikolaev:e,od:e,odesa:e,odessa:e,pl:e,poltava:e,rivne:e,rovno:e,rv:e,sb:e,sebastopol:e,sevastopol:e,sm:e,sumy:e,te:e,ternopil:e,uz:e,uzhgorod:e,uzhhorod:e,vinnica:e,vinnytsia:e,vn:e,volyn:e,yalta:e,zakarpattia:e,zaporizhzhe:e,zaporizhzhia:e,zhitomir:e,zhytomyr:e,zp:e,zt:e,cc:t,inf:t,ltd:t,cx:t,ie:t,biz:t,co:t,pp:t,v:t}],ug:[1,{ac:e,co:e,com:e,edu:e,go:e,gov:e,mil:e,ne:e,or:e,org:e,sc:e,us:e}],uk:[1,{ac:e,co:[1,{bytemark:[0,{dh:t,vm:t}],layershift:ce,barsy:t,barsyonline:t,retrosnub:Ue,"nh-serv":t,"no-ip":t,adimo:t,myspreadshop:t}],gov:[1,{api:t,campaign:t,service:t}],ltd:e,me:e,net:e,nhs:e,org:[1,{glug:t,lug:t,lugs:t,affinitylottery:t,raffleentry:t,weeklylottery:t}],plc:e,police:e,sch:v,conn:t,copro:t,hosp:t,"independent-commission":t,"independent-inquest":t,"independent-inquiry":t,"independent-panel":t,"independent-review":t,"public-inquiry":t,"royal-commission":t,pymnt:t,barsy:t,nimsite:t,oraclegovcloudapps:a}],us:[1,{dni:e,isa:e,nsn:e,ak:me,al:me,ar:me,as:me,az:me,ca:me,co:me,ct:me,dc:me,de:[1,{cc:e,lib:t}],fl:me,ga:me,gu:me,hi:fe,ia:me,id:me,il:me,in:me,ks:me,ky:me,la:me,ma:[1,{k12:[1,{chtr:e,paroch:e,pvt:e}],cc:e,lib:e}],md:me,me,mi:[1,{k12:e,cc:e,lib:e,"ann-arbor":e,cog:e,dst:e,eaton:e,gen:e,mus:e,tec:e,washtenaw:e}],mn:me,mo:me,ms:me,mt:me,nc:me,nd:fe,ne:me,nh:me,nj:me,nm:me,nv:me,ny:me,oh:me,ok:me,or:me,pa:me,pr:me,ri:fe,sc:me,sd:fe,tn:me,tx:me,ut:me,va:me,vi:me,vt:me,wa:me,wi:me,wv:[1,{cc:e}],wy:me,cloudns:t,"is-by":t,"land-4-sale":t,"stuff-4-sale":t,heliohost:t,enscaled:[0,{phx:t}],mircloud:t,ngo:t,golffan:t,noip:t,pointto:t,freeddns:t,srv:[2,{gh:t,gl:t}],platterp:t,servername:t}],uy:[1,{com:e,edu:e,gub:e,mil:e,net:e,org:e}],uz:[1,{co:e,com:e,net:e,org:e}],va:e,vc:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,gv:[2,{d:t}],"0e":a,mydns:t}],ve:[1,{arts:e,bib:e,co:e,com:e,e12:e,edu:e,emprende:e,firm:e,gob:e,gov:e,info:e,int:e,mil:e,net:e,nom:e,org:e,rar:e,rec:e,store:e,tec:e,web:e}],vg:[1,{edu:e}],vi:[1,{co:e,com:e,k12:e,net:e,org:e}],vn:[1,{ac:e,ai:e,biz:e,com:e,edu:e,gov:e,health:e,id:e,info:e,int:e,io:e,name:e,net:e,org:e,pro:e,angiang:e,bacgiang:e,backan:e,baclieu:e,bacninh:e,"baria-vungtau":e,bentre:e,binhdinh:e,binhduong:e,binhphuoc:e,binhthuan:e,camau:e,cantho:e,caobang:e,daklak:e,daknong:e,danang:e,dienbien:e,dongnai:e,dongthap:e,gialai:e,hagiang:e,haiduong:e,haiphong:e,hanam:e,hanoi:e,hatinh:e,haugiang:e,hoabinh:e,hungyen:e,khanhhoa:e,kiengiang:e,kontum:e,laichau:e,lamdong:e,langson:e,laocai:e,longan:e,namdinh:e,nghean:e,ninhbinh:e,ninhthuan:e,phutho:e,phuyen:e,quangbinh:e,quangnam:e,quangngai:e,quangninh:e,quangtri:e,soctrang:e,sonla:e,tayninh:e,thaibinh:e,thainguyen:e,thanhhoa:e,thanhphohochiminh:e,thuathienhue:e,tiengiang:e,travinh:e,tuyenquang:e,vinhlong:e,vinhphuc:e,yenbai:e}],vu:$,wf:[1,{biz:t,sch:t}],ws:[1,{com:e,edu:e,gov:e,net:e,org:e,advisor:a,cloud66:t,dyndns:t,mypets:t}],yt:[1,{org:t}],"xn--mgbaam7a8h":e,اÙ
ارات:e,"xn--y9a3aq":e,Õ°Õ¡Õµ:e,"xn--54b7fta0cc":e,বাà¦à¦²à¦¾:e,"xn--90ae":e,бг:e,"xn--mgbcpq6gpa1a":e,Ø§ÙØ¨ØØ±ÙÙ:e,"xn--90ais":e,бел:e,"xn--fiqs8s":e,ä¸å½:e,"xn--fiqz9s":e,ä¸å:e,"xn--lgbbat1ad8j":e,Ø§ÙØ¬Ø²Ø§Ø¦Ø±:e,"xn--wgbh1c":e,Ù
صر:e,"xn--e1a4c":e,еÑ:e,"xn--qxa6a":e,εÏ
:e,"xn--mgbah1a3hjkrd":e,Ù
ÙØ±ÙتاÙÙØ§:e,"xn--node":e,áá:e,"xn--qxam":e,ελ:e,"xn--j6w193g":[1,{"xn--gmqw5a":e,"xn--55qx5d":e,"xn--mxtq1m":e,"xn--wcvs22d":e,"xn--uc0atv":e,"xn--od0alg":e}],馿¸¯:[1,{å人:e,å
¬å¸:e,æ¿åº:e,æè²:e,çµç¹:e,網絡:e}],"xn--2scrj9c":e,à²à²¾à²°à²¤:e,"xn--3hcrj9c":e,à¬à¬¾à¬°à¬¤:e,"xn--45br5cyl":e,à¦à¦¾à§°à¦¤:e,"xn--h2breg3eve":e,à¤à¤¾à¤°à¤¤à¤®à¥:e,"xn--h2brj9c8c":e,à¤à¤¾à¤°à¥à¤¤:e,"xn--mgbgu82a":e,ÚØ§Ø±Øª:e,"xn--rvc1e0am3e":e,à´à´¾à´°à´¤à´:e,"xn--h2brj9c":e,à¤à¤¾à¤°à¤¤:e,"xn--mgbbh1a":e,بارت:e,"xn--mgbbh1a71e":e,بھارت:e,"xn--fpcrj9c3d":e,à°à°¾à°°à°¤à±:e,"xn--gecrj9c":e,àªàª¾àª°àª¤:e,"xn--s9brj9c":e,à¨à¨¾à¨°à¨¤:e,"xn--45brj9c":e,à¦à¦¾à¦°à¦¤:e,"xn--xkc2dl3a5ee0h":e,à®à®¨à¯à®¤à®¿à®¯à®¾:e,"xn--mgba3a4f16a":e,Ø§ÛØ±Ø§Ù:e,"xn--mgba3a4fra":e,Ø§ÙØ±Ø§Ù:e,"xn--mgbtx2b":e,عراÙ:e,"xn--mgbayh7gpa":e,Ø§ÙØ§Ø±Ø¯Ù:e,"xn--3e0b707e":e,íêµ:e,"xn--80ao21a":e,Òаз:e,"xn--q7ce6a":e,ລາວ:e,"xn--fzc2c9e2c":e,à¶½à¶à¶à·:e,"xn--xkc2al3hye2a":e,à®à®²à®à¯à®à¯:e,"xn--mgbc0a9azcg":e,اÙÙ
غرب:e,"xn--d1alf":e,мкд:e,"xn--l1acc":e,мон:e,"xn--mix891f":e,æ¾³é:e,"xn--mix082f":e,æ¾³é¨:e,"xn--mgbx4cd0ab":e,Ù
ÙÙØ³Ùا:e,"xn--mgb9awbf":e,عÙ
اÙ:e,"xn--mgbai9azgqp6j":e,پاکستاÙ:e,"xn--mgbai9a5eva00b":e,Ù¾Ø§ÙØ³ØªØ§Ù:e,"xn--ygbi2ammx":e,ÙÙØ³Ø·ÙÙ:e,"xn--90a3ac":[1,{"xn--80au":e,"xn--90azh":e,"xn--d1at":e,"xn--c1avg":e,"xn--o1ac":e,"xn--o1ach":e}],ÑÑб:[1,{ак:e,обÑ:e,од:e,оÑг:e,пÑ:e,ÑпÑ:e}],"xn--p1ai":e,ÑÑ:e,"xn--wgbl6a":e,ÙØ·Ø±:e,"xn--mgberp4a5d4ar":e,Ø§ÙØ³Ø¹ÙØ¯ÙØ©:e,"xn--mgberp4a5d4a87g":e,Ø§ÙØ³Ø¹ÙØ¯ÛØ©:e,"xn--mgbqly7c0a67fbc":e,Ø§ÙØ³Ø¹ÙدÛÛ:e,"xn--mgbqly7cvafr":e,Ø§ÙØ³Ø¹ÙدÙÙ:e,"xn--mgbpl2fh":e,Ø³ÙØ¯Ø§Ù:e,"xn--yfro4i67o":e,æ°å å¡:e,"xn--clchc0ea0b2g2a9gcd":e,à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯:e,"xn--ogbpf8fl":e,Ø³ÙØ±ÙØ©:e,"xn--mgbtf8fl":e,Ø³ÙØ±Ùا:e,"xn--o3cw4h":[1,{"xn--o3cyx2a":e,"xn--12co0c3b4eva":e,"xn--m3ch0j3a":e,"xn--h3cuzk1di":e,"xn--12c1fe0br":e,"xn--12cfi8ixb8l":e}],à¹à¸à¸¢:[1,{à¸à¸«à¸²à¸£:e,à¸à¸¸à¸£à¸à¸´à¸:e,à¹à¸à¹à¸:e,รัà¸à¸à¸²à¸¥:e,ศึà¸à¸©à¸²:e,à¸à¸à¸à¹à¸à¸£:e}],"xn--pgbs0dh":e,تÙÙØ³:e,"xn--kpry57d":e,å°ç£:e,"xn--kprw13d":e,å°æ¹¾:e,"xn--nnx388a":e,èºç£:e,"xn--j1amh":e,ÑкÑ:e,"xn--mgb2ddes":e,اÙÙÙ
Ù:e,xxx:e,ye:r,za:[0,{ac:e,agric:e,alt:e,co:e,edu:e,gov:e,grondar:e,law:e,mil:e,net:e,ngo:e,nic:e,nis:e,nom:e,org:e,school:e,tm:e,web:e}],zm:[1,{ac:e,biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,net:e,org:e,sch:e}],zw:[1,{ac:e,co:e,gov:e,mil:e,org:e}],aaa:e,aarp:e,abb:e,abbott:e,abbvie:e,abc:e,able:e,abogado:e,abudhabi:e,academy:[1,{official:t}],accenture:e,accountant:e,accountants:e,aco:e,actor:e,ads:e,adult:e,aeg:e,aetna:e,afl:e,africa:e,agakhan:e,agency:e,aig:e,airbus:e,airforce:e,airtel:e,akdn:e,alibaba:e,alipay:e,allfinanz:e,allstate:e,ally:e,alsace:e,alstom:e,amazon:e,americanexpress:e,americanfamily:e,amex:e,amfam:e,amica:e,amsterdam:e,analytics:e,android:e,anquan:e,anz:e,aol:e,apartments:e,app:[1,{adaptable:t,aiven:t,beget:a,brave:s,clerk:t,clerkstage:t,wnext:t,csb:[2,{preview:t}],convex:t,deta:t,ondigitalocean:t,easypanel:t,encr:t,evervault:i,expo:[2,{staging:t}],edgecompute:t,"on-fleek":t,flutterflow:t,e2b:t,framer:t,hosted:a,run:a,web:t,hasura:t,botdash:t,loginline:t,lovable:t,medusajs:t,messerli:t,netfy:t,netlify:t,ngrok:t,"ngrok-free":t,developer:a,noop:t,northflank:a,upsun:a,replit:l,nyat:t,snowflake:[0,{"*":t,privatelink:a}],streamlit:t,storipress:t,telebit:t,typedream:t,vercel:t,bookonline:t,wdh:t,windsurf:t,zeabur:t,zerops:a}],apple:e,aquarelle:e,arab:e,aramco:e,archi:e,army:e,art:e,arte:e,asda:e,associates:e,athleta:e,attorney:e,auction:e,audi:e,audible:e,audio:e,auspost:e,author:e,auto:e,autos:e,aws:[1,{sagemaker:[0,{"ap-northeast-1":f,"ap-northeast-2":f,"ap-south-1":f,"ap-southeast-1":f,"ap-southeast-2":f,"ca-central-1":h,"eu-central-1":f,"eu-west-1":f,"eu-west-2":f,"us-east-1":h,"us-east-2":h,"us-west-2":h,"af-south-1":d,"ap-east-1":d,"ap-northeast-3":d,"ap-south-2":m,"ap-southeast-3":d,"ap-southeast-4":m,"ca-west-1":[0,{notebook:t,"notebook-fips":t}],"eu-central-2":d,"eu-north-1":d,"eu-south-1":d,"eu-south-2":d,"eu-west-3":d,"il-central-1":d,"me-central-1":d,"me-south-1":d,"sa-east-1":d,"us-gov-east-1":g,"us-gov-west-1":g,"us-west-1":[0,{notebook:t,"notebook-fips":t,studio:t}],experiments:a}],repost:[0,{private:a}],on:[0,{"ap-northeast-1":u,"ap-southeast-1":u,"ap-southeast-2":u,"eu-central-1":u,"eu-north-1":u,"eu-west-1":u,"us-east-1":u,"us-east-2":u,"us-west-2":u}]}],axa:e,azure:e,baby:e,baidu:e,banamex:e,band:e,bank:e,bar:e,barcelona:e,barclaycard:e,barclays:e,barefoot:e,bargains:e,baseball:e,basketball:[1,{aus:t,nz:t}],bauhaus:e,bayern:e,bbc:e,bbt:e,bbva:e,bcg:e,bcn:e,beats:e,beauty:e,beer:e,bentley:e,berlin:e,best:e,bestbuy:e,bet:e,bharti:e,bible:e,bid:e,bike:e,bing:e,bingo:e,bio:e,black:e,blackfriday:e,blockbuster:e,blog:e,bloomberg:e,blue:e,bms:e,bmw:e,bnpparibas:e,boats:e,boehringer:e,bofa:e,bom:e,bond:e,boo:e,book:e,booking:e,bosch:e,bostik:e,boston:e,bot:e,boutique:e,box:e,bradesco:e,bridgestone:e,broadway:e,broker:e,brother:e,brussels:e,build:[1,{v0:t,windsurf:t}],builders:[1,{cloudsite:t}],business:y,buy:e,buzz:e,bzh:e,cab:e,cafe:e,cal:e,call:e,calvinklein:e,cam:e,camera:e,camp:[1,{emf:[0,{at:t}]}],canon:e,capetown:e,capital:e,capitalone:e,car:e,caravan:e,cards:e,care:e,career:e,careers:e,cars:e,casa:[1,{nabu:[0,{ui:t}]}],case:e,cash:e,casino:e,catering:e,catholic:e,cba:e,cbn:e,cbre:e,center:e,ceo:e,cern:e,cfa:e,cfd:e,chanel:e,channel:e,charity:e,chase:e,chat:e,cheap:e,chintai:e,christmas:e,chrome:e,church:e,cipriani:e,circle:e,cisco:e,citadel:e,citi:e,citic:e,city:e,claims:e,cleaning:e,click:e,clinic:e,clinique:e,clothing:e,cloud:[1,{convex:t,elementor:t,encoway:[0,{eu:t}],statics:a,ravendb:t,axarnet:[0,{"es-1":t}],diadem:t,jelastic:[0,{vip:t}],jele:t,"jenv-aruba":[0,{aruba:[0,{eur:[0,{it1:t}]}],it1:t}],keliweb:[2,{cs:t}],oxa:[2,{tn:t,uk:t}],primetel:[2,{uk:t}],reclaim:[0,{ca:t,uk:t,us:t}],trendhosting:[0,{ch:t,de:t}],jotelulu:t,kuleuven:t,laravel:t,linkyard:t,magentosite:a,matlab:t,observablehq:t,perspecta:t,vapor:t,"on-rancher":a,scw:[0,{baremetal:[0,{"fr-par-1":t,"fr-par-2":t,"nl-ams-1":t}],"fr-par":[0,{cockpit:t,fnc:[2,{functions:t}],k8s:E,s3:t,"s3-website":t,whm:t}],instances:[0,{priv:t,pub:t}],k8s:t,"nl-ams":[0,{cockpit:t,k8s:E,s3:t,"s3-website":t,whm:t}],"pl-waw":[0,{cockpit:t,k8s:E,s3:t,"s3-website":t}],scalebook:t,smartlabeling:t}],servebolt:t,onstackit:[0,{runs:t}],trafficplex:t,"unison-services":t,urown:t,voorloper:t,zap:t}],club:[1,{cloudns:t,jele:t,barsy:t}],clubmed:e,coach:e,codes:[1,{owo:a}],coffee:e,college:e,cologne:e,commbank:e,community:[1,{nog:t,ravendb:t,myforum:t}],company:e,compare:e,computer:e,comsec:e,condos:e,construction:e,consulting:e,contact:e,contractors:e,cooking:e,cool:[1,{elementor:t,de:t}],corsica:e,country:e,coupon:e,coupons:e,courses:e,cpa:e,credit:e,creditcard:e,creditunion:e,cricket:e,crown:e,crs:e,cruise:e,cruises:e,cuisinella:e,cymru:e,cyou:e,dad:e,dance:e,data:e,date:e,dating:e,datsun:e,day:e,dclk:e,dds:e,deal:e,dealer:e,deals:e,degree:e,delivery:e,dell:e,deloitte:e,delta:e,democrat:e,dental:e,dentist:e,desi:e,design:[1,{graphic:t,bss:t}],dev:[1,{"12chars":t,myaddr:t,panel:t,lcl:a,lclstage:a,stg:a,stgstage:a,pages:t,r2:t,workers:t,deno:t,"deno-staging":t,deta:t,evervault:i,fly:t,githubpreview:t,gateway:a,hrsn:[2,{psl:[0,{sub:t,wc:[0,{"*":t,sub:a}]}]}],botdash:t,inbrowser:a,"is-a-good":t,"is-a":t,iserv:t,runcontainers:t,localcert:[0,{user:a}],loginline:t,barsy:t,mediatech:t,modx:t,ngrok:t,"ngrok-free":t,"is-a-fullstack":t,"is-cool":t,"is-not-a":t,localplayer:t,xmit:t,"platter-app":t,replit:[2,{archer:t,bones:t,canary:t,global:t,hacker:t,id:t,janeway:t,kim:t,kira:t,kirk:t,odo:t,paris:t,picard:t,pike:t,prerelease:t,reed:t,riker:t,sisko:t,spock:t,staging:t,sulu:t,tarpit:t,teams:t,tucker:t,wesley:t,worf:t}],crm:[0,{d:a,w:a,wa:a,wb:a,wc:a,wd:a,we:a,wf:a}],vercel:t,webhare:a}],dhl:e,diamonds:e,diet:e,digital:[1,{cloudapps:[2,{london:t}]}],direct:[1,{libp2p:t}],directory:e,discount:e,discover:e,dish:e,diy:e,dnp:e,docs:e,doctor:e,dog:e,domains:e,dot:e,download:e,drive:e,dtv:e,dubai:e,dunlop:e,dupont:e,durban:e,dvag:e,dvr:e,earth:e,eat:e,eco:e,edeka:e,education:y,email:[1,{crisp:[0,{on:t}],tawk:Ie,tawkto:Ie}],emerck:e,energy:e,engineer:e,engineering:e,enterprises:e,epson:e,equipment:e,ericsson:e,erni:e,esq:e,estate:[1,{compute:a}],eurovision:e,eus:[1,{party:Ae}
1251],events:[1,{koobin:t,co:t}],exchange:e,expert:e,exposed:e,express:e,extraspace:e,fage:e,fail:e,fairwinds:e,faith:e,family:e,fan:e,fans:e,farm:[1,{storj:t}],farmers:e,fashion:e,fast:e,fedex:e,feedback:e,ferrari:e,ferrero:e,fidelity:e,fido:e,film:e,final:e,finance:e,financial:y,fire:e,firestone:e,firmdale:e,fish:e,fishing:e,fit:e,fitness:e,flickr:e,flights:e,flir:e,florist:e,flowers:e,fly:e,foo:e,food:e,football:e,ford:e,forex:e,forsale:e,forum:e,foundation:e,fox:e,free:e,fresenius:e,frl:e,frogans:e,frontier:e,ftr:e,fujitsu:e,fun:e,fund:e,furniture:e,futbol:e,fyi:e,gal:e,gallery:e,gallo:e,gallup:e,game:e,games:[1,{pley:t,sheezy:t}],gap:e,garden:e,gay:[1,{pages:t}],gbiz:e,gdn:[1,{cnpy:t}],gea:e,gent:e,genting:e,george:e,ggee:e,gift:e,gifts:e,gives:e,giving:e,glass:e,gle:e,global:[1,{appwrite:t}],globo:e,gmail:e,gmbh:e,gmo:e,gmx:e,godaddy:e,gold:e,goldpoint:e,golf:e,goo:e,goodyear:e,goog:[1,{cloud:t,translate:t,usercontent:a}],google:e,gop:e,got:e,grainger:e,graphics:e,gratis:e,green:e,gripe:e,grocery:e,group:[1,{discourse:t}],gucci:e,guge:e,guide:e,guitars:e,guru:e,hair:e,hamburg:e,hangout:e,haus:e,hbo:e,hdfc:e,hdfcbank:e,health:[1,{hra:t}],healthcare:e,help:e,helsinki:e,here:e,hermes:e,hiphop:e,hisamitsu:e,hitachi:e,hiv:e,hkt:e,hockey:e,holdings:e,holiday:e,homedepot:e,homegoods:e,homes:e,homesense:e,honda:e,horse:e,hospital:e,host:[1,{cloudaccess:t,freesite:t,easypanel:t,fastvps:t,myfast:t,tempurl:t,wpmudev:t,jele:t,mircloud:t,wp2:t,half:t}],hosting:[1,{opencraft:t}],hot:e,hotels:e,hotmail:e,house:e,how:e,hsbc:e,hughes:e,hyatt:e,hyundai:e,ibm:e,icbc:e,ice:e,icu:e,ieee:e,ifm:e,ikano:e,imamat:e,imdb:e,immo:e,immobilien:e,inc:e,industries:e,infiniti:e,ing:e,ink:e,institute:e,insurance:e,insure:e,international:e,intuit:e,investments:e,ipiranga:e,irish:e,ismaili:e,ist:e,istanbul:e,itau:e,itv:e,jaguar:e,java:e,jcb:e,jeep:e,jetzt:e,jewelry:e,jio:e,jll:e,jmp:e,jnj:e,joburg:e,jot:e,joy:e,jpmorgan:e,jprs:e,juegos:e,juniper:e,kaufen:e,kddi:e,kerryhotels:e,kerryproperties:e,kfh:e,kia:e,kids:e,kim:e,kindle:e,kitchen:e,kiwi:e,koeln:e,komatsu:e,kosher:e,kpmg:e,kpn:e,krd:[1,{co:t,edu:t}],kred:e,kuokgroup:e,kyoto:e,lacaixa:e,lamborghini:e,lamer:e,lancaster:e,land:e,landrover:e,lanxess:e,lasalle:e,lat:e,latino:e,latrobe:e,law:e,lawyer:e,lds:e,lease:e,leclerc:e,lefrak:e,legal:e,lego:e,lexus:e,lgbt:e,lidl:e,life:e,lifeinsurance:e,lifestyle:e,lighting:e,like:e,lilly:e,limited:e,limo:e,lincoln:e,link:[1,{myfritz:t,cyon:t,dweb:a,inbrowser:a,nftstorage:W,mypep:t,storach
vendor: 4,696 bytes, line 1251
1251a:W,w3s:W}],live:[1,{aem:t,hlx:t,ewp:a}],living:e,llc:e,llp:e,loan:e,loans:e,locker:e,locus:e,lol:[1,{omg:t}],london:e,lotte:e,lotto:e,love:e,lpl:e,lplfinancial:e,ltd:e,ltda:e,lundbeck:e,luxe:e,luxury:e,madrid:e,maif:e,maison:e,makeup:e,man:e,management:e,mango:e,map:e,market:e,marketing:e,markets:e,marriott:e,marshalls:e,mattel:e,mba:e,mckinsey:e,med:e,media:q,meet:e,melbourne:e,meme:e,memorial:e,men:e,menu:[1,{barsy:t,barsyonline:t}],merck:e,merckmsd:e,miami:e,microsoft:e,mini:e,mint:e,mit:e,mitsubishi:e,mlb:e,mls:e,mma:e,mobile:e,moda:e,moe:e,moi:e,mom:[1,{ind:t}],monash:e,money:e,monster:e,mormon:e,mortgage:e,moscow:e,moto:e,motorcycles:e,mov:e,movie:e,msd:e,mtn:e,mtr:e,music:e,nab:e,nagoya:e,navy:e,nba:e,nec:e,netbank:e,netflix:e,network:[1,{alces:a,co:t,arvo:t,azimuth:t,tlon:t}],neustar:e,new:e,news:[1,{noticeable:t}],next:e,nextdirect:e,nexus:e,nfl:e,ngo:e,nhk:e,nico:e,nike:e,nikon:e,ninja:e,nissan:e,nissay:e,nokia:e,norton:e,now:e,nowruz:e,nowtv:e,nra:e,nrw:e,ntt:e,nyc:e,obi:e,observer:e,office:e,okinawa:e,olayan:e,olayangroup:e,ollo:e,omega:e,one:[1,{kin:a,service:t}],ong:[1,{obl:t}],onl:e,online:[1,{eero:t,"eero-stage":t,websitebuilder:t,barsy:t}],ooo:e,open:e,oracle:e,orange:[1,{tech:t}],organic:e,origins:e,osaka:e,otsuka:e,ott:e,ovh:[1,{nerdpol:t}],page:[1,{aem:t,hlx:t,hlx3:t,translated:t,codeberg:t,heyflow:t,prvcy:t,rocky:t,pdns:t,plesk:t}],panasonic:e,paris:e,pars:e,partners:e,parts:e,party:e,pay:e,pccw:e,pet:e,pfizer:e,pharmacy:e,phd:e,philips:e,phone:e,photo:e,photography:e,photos:q,physio:e,pics:e,pictet:e,pictures:[1,{1337:t}],pid:e,pin:e,ping:e,pink:e,pioneer:e,pizza:[1,{ngrok:t}],place:y,play:e,playstation:e,plumbing:e,plus:e,pnc:e,pohl:e,poker:e,politie:e,porn:e,pramerica:e,praxi:e,press:e,prime:e,prod:e,productions:e,prof:e,progressive:e,promo:e,properties:e,property:e,protection:e,pru:e,prudential:e,pub:[1,{id:a,kin:a,barsy:t}],pwc:e,qpon:e,quebec:e,quest:e,racing:e,radio:e,read:e,realestate:e,realtor:e,realty:e,recipes:e,red:e,redstone:e,redumbrella:e,rehab:e,reise:e,reisen:e,reit:e,reliance:e,ren:e,rent:e,rentals:e,repair:e,report:e,republican:e,rest:e,restaurant:e,review:e,reviews:e,rexroth:e,rich:e,richardli:e,ricoh:e,ril:e,rio:e,rip:[1,{clan:t}],rocks:[1,{myddns:t,stackit:t,"lima-city":t,webspace:t}],rodeo:e,rogers:e,room:e,rsvp:e,rugby:e,ruhr:e,run:[1,{appwrite:a,development:t,ravendb:t,liara:[2,{iran:t}],servers:t,build:a,code:a,database:a,migration:a,onporter:t,repl:t,stackit:t,val:[0,{express:t,web:t}],wix:t}],rwe:e,ryukyu:e,saarland:e,safe:e,safety:e,sakura:e,sale:e,salon:e,samsclub:e,samsung:e,sandvik:e,sandvikcoromant:e,sanofi:e,sap:e,sarl:e,sas:e,save:e,saxo:e,sbi:e,sbs:e,scb:e,schaeffler:e,schmidt:e,scholarships:e,school:e,schule:e,schwarz:e,science:e,scot:[1,{gov:[2,{service:t}]}],search:e,seat:e,secure:e,security:e,seek:e,select:e,sener:e,services:[1,{loginline:t}],seven:e,sew:e,sex:e,sexy:e,sfr:e,shangrila:e,sharp:e,shell:e,shia:e,shiksha:e,shoes:e,shop:[1,{base:t,hoplix:t,barsy:t,barsyonline:t,shopware:t}],shopping:e,shouji:e,show:e,silk:e,sina:e,singles:e,site:[1,{square:t,canva:w,cloudera:a,convex:t,cyon:t,fastvps:t,figma:t,heyflow:t,jele:t,jouwweb:t,loginline:t,barsy:t,notion:t,omniwe:t,opensocial:t,madethis:t,platformsh:a,tst:a,byen:t,srht:t,novecore:t,cpanel:t,wpsquared:t}],ski:e,skin:e,sky:e,skype:e,sling:e,smart:e,smile:e,sncf:e,soccer:e,social:e,softbank:e,software:e,sohu:e,solar:e,solutions:e,song:e,sony:e,soy:e,spa:e,space:[1,{myfast:t,heiyu:t,hf:[2,{static:t}],"app-ionos":t,project:t,uber:t,xs4all:t}],sport:e,spot:e,srl:e,stada:e,staples:e,star:e,statebank:e,statefarm:e,stc:e,stcgroup:e,stockholm:e,storage:e,store:[1,{barsy:t,sellfy:t,shopware:t,storebase:t}],stream:e,studio:e,study:e,style:e,sucks:e,supplies:e,supply:e,support:[1,{barsy:t}],surf:e,surgery:e,suzuki:e,swatch:e,swiss:e,sydney:e,systems:[1,{knightpoint:t}],tab:e,taipei:e,talk:e,taobao:e,target:e,tatamotors:e,tatar:e,tattoo:e,tax:e,taxi:e,tci:e,tdk:e,team:[1,{discourse:t,jelastic:t}],tech:[1,{cleverapps:t}],technology:y,temasek:e,tennis:e,teva:e,thd:e,theater:e,theatre:e,tiaa:e,tickets:e,tienda:e,tips:e,tires:e,tirol:e,tjmaxx:e,tjx:e,tkmaxx:e,tmall:e,today:[1,{prequalifyme:t}],tokyo:e,tools:[1,{addr:be,myaddr:t}],top:[1,{ntdll:t,wadl:a}],toray:e,toshiba:e,total:e,tours:e,town:e,toyota:e,toys:e,trade:e,trading:e,training:e,travel:e,travelers:e,travelersinsurance:e,trust:e,trv:e,tube:e,tui:e,tunes:e,tushu:e,tvs:e,ubank:e,ubs:e,unicom:e,university:e,uno:e,uol:e,ups:e,vacations:e,vana:e,vanguard:e,vegas:e,ventures:e,verisign:e,versicherung:e,vet:e,viajes:e,video:e,vig:e,viking:e,villas:e,vin:e,vip:e,virgin:e,visa:e,vision:e,viva:e,vivo:e,vlaanderen:e,vodka:e,volvo:e,vote:e,voting:e,voto:e,voyage:e,w
1251ales:e,walmart:e,walter:e,wang:e,wanggou:e,watch:e,watches:e,weather:e,weatherchannel:e,webcam:e,weber:e,website:q,wed:e,wedding:e,weibo:e,weir:e,whoswho:e,wien:e,wiki:q,williamhill:e,win:e,windows:e,wine:e,winners:e,wme:e,wolterskluwer:e,woodside:e,work:e,works:e,world:e,wow:e,wtc:e,wtf:e,xbox:e,xerox:e,xihuan:e,xin:e,"xn--11b4c3d":e,à¤à¥à¤®:e,"xn--1ck2e1b":e,ã»ã¼ã«:e,"xn--1qqw23a":e,ä½å±±:e,"xn--30rr7y":e,æ
å:e,"xn--3bst00m":e,éå¢:e,"xn--3ds443g":e,å¨çº¿:e,"xn--3pxu8k":e,ç¹ç:e,"xn--42c2d9a":e,à¸à¸à¸¡:e,"xn--45q11c":e,å
«å¦:e,"xn--4gbrim":e,Ù
ÙÙØ¹:e,"xn--55qw42g":e,å
¬ç:e,"xn--55qx5d":e,å
¬å¸:e,"xn--5su34j936bgsg":e,馿 ¼éæ:e,"xn--5tzm5g":e,ç½ç«:e,"xn--6frz82g":e,ç§»å¨:e,"xn--6qq986b3xl":e,æç±ä½ :e,"xn--80adxhks":e,моÑква:e,"xn--80aqecdr1a":e,каÑолик:e,"xn--80asehdb":e,онлайн:e,"xn--80aswg":e,ÑайÑ:e,"xn--8y0a063a":e,èé:e,"xn--9dbq2a":e,×§××:e,"xn--9et52u":e,æ¶å°:e,"xn--9krt00a":e,å¾®å:e,"xn--b4w605ferd":e,淡马é¡:e,"xn--bck1b9a5dre4c":e,ãã¡ãã·ã§ã³:e,"xn--c1avg":e,оÑг:e,"xn--c2br7g":e,नà¥à¤:e,"xn--cck2b3b":e,ã¹ãã¢:e,"xn--cckwcxetd":e,ã¢ãã¾ã³:e,"xn--cg4bki":e,ì¼ì±:e,"xn--czr694b":e,åæ :e,"xn--czrs0t":e,ååº:e,"xn--czru2d":e,åå:e,"xn--d1acj3b":e,деÑи:e,"xn--eckvdtc9d":e,ãã¤ã³ã:e,"xn--efvy88h":e,æ°é»:e,"xn--fct429k":e,å®¶é»:e,"xn--fhbei":e,ÙÙÙ
:e,"xn--fiq228c5hs":e,䏿ç½:e,"xn--fiq64b":e,ä¸ä¿¡:e,"xn--fjq720a":e,娱ä¹:e,"xn--flw351e":e,è°·æ:e,"xn--fzys8d69uvgm":e,é»è¨çç§:e,"xn--g2xx48c":e,è´ç©:e,"xn--gckr3f0f":e,ã¯ã©ã¦ã:e,"xn--gk3at1e":e,é販:e,"xn--hxt814e":e,ç½åº:e,"xn--i1b6b1a6a2e":e,सà¤à¤à¤ न:e,"xn--imr513n":e,é¤å
:e,"xn--io0a7i":e,ç½ç»:e,"xn--j1aef":e,ком:e,"xn--jlq480n2rg":e,äºé©¬é:e,"xn--jvr189m":e,é£å:e,"xn--kcrx77d1x4a":e,é£å©æµ¦:e,"xn--kput3i":e,ææº:e,"xn--mgba3a3ejt":e,اراÙ
ÙÙ:e,"xn--mgba7c0bbn0a":e,Ø§ÙØ¹ÙÙØ§Ù:e,"xn--mgbab2bd":e,بازار:e,"xn--mgbca7dzdo":e,Ø§Ø¨ÙØ¸Ø¨Ù:e,"xn--mgbi4ecexp":e,ÙØ§Ø«ÙÙÙÙ:e,"xn--mgbt3dhd":e,ÙÙ
راÙ:e,"xn--mk1bu44c":e,ë·ì»´:e,"xn--mxtq1m":e,æ¿åº:e,"xn--ngbc5azd":e,Ø´Ø¨ÙØ©:e,"xn--ngbe9e0a":e,Ø¨ÙØªÙ:e,"xn--ngbrx":e,عرب:e,"xn--nqv7f":e,æºæ:e,"xn--nqv7fs00ema":e,ç»ç»æºæ:e,"xn--nyqy26a":e,å¥åº·:e,"xn--otu796d":e,æè:e,"xn--p1acf":[1,{"xn--90amc":t,"xn--j1aef":t,"xn--j1ael8b":t,"xn--h1ahn":t,"xn--j1adp":t,"xn--c1avg":t,"xn--80aaa0cvac":t,"xn--h1aliz":t,"xn--90a1af":t,"xn--41a":t}],ÑÑÑ:[1,{биз:t,ком:t,кÑÑм:t,миÑ:t,мÑк:t,оÑг:t,ÑамаÑа:t,ÑоÑи:t,Ñпб:t,Ñ:t}],"xn--pssy2u":e,大æ¿:e,"xn--q9jyb4c":e,ã¿ããª:e,"xn--qcka1pmc":e,ã°ã¼ã°ã«:e,"xn--rhqv96g":e,ä¸ç:e,"xn--rovu88b":e,æ¸ç±:e,"xn--ses554g":e,ç½å:e,"xn--t60b56a":e,ë·ë·:e,"xn--tckwe":e,ã³ã :e,"xn--tiq49xqyj":e,天主æ:e,"xn--unup4y":e,游æ:e,"xn--vermgensberater-ctb":e,vermögensberater:e,"xn--vermgensberatung-pwb":e,vermögensberatung:e,"xn--vhquv":e,ä¼ä¸:e,"xn--vuq861b":e,ä¿¡æ¯:e,"xn--w4r85el8fhu5dnra":e,åé大é
åº:e,"xn--w4rs40l":e,åé:e,"xn--xhq521b":e,广ä¸:e,"xn--zfr164b":e,æ¿å¡:e,xyz:[1,{botdash:t,telebit:a}],yachts:e,yahoo:e,yamaxun:e,yandex:e,yodobashi:e,yoga:e,yokohama:e,you:e,youtube:e,yun:e,zappos:e,zara:e,zero:e,zip:e,zone:[1,{cloud66:t,triton:a,stackit:t,lima:t}],zuerich:e}]}();function O6(e,t,n,r){let a=null,s=t;for(;s!==void 0&&(s[0]&r&&(a={index:n+1,isIcann:s[0]===1,isPrivate:s[0]===2}),n!==-1);){const i=s[1];s=Object.prototype.hasOwnProperty.call(i,e[n])?i[e[n]]:i["*"],n-=1}return a}function ZTe(e,t,n){var r;if(qTe(e,t,n))return;const a=e.split("."),s=(t.allowPrivateDomains?2:0)|(t.allowIcannDomains?1:0),i=O6(a,YTe,a.length-1,s);if(i!==null){n.isIcann=i.isIcann,n.isPrivate=i.isPrivate,n.publicSuffix=a.slice(i.index+1).join(".");return}const l=O6(a,KTe,a.length-1,s);if(l!==null){n.isIcann=l.isIcann,n.isPrivate=l.isPrivate,n.publicSuffix=a.slice(l.index).join(".");return}n.isIcann=!1,n.isPrivate=!1,n.publicSuffix=(r=a[a.length-1])!==null&&r!==void 0?r:null}function tZ(e,t={}){return GTe(e,5,ZTe,t,WTe())}const Vc={match:(e,t={view:null})=>{var i;let n=tZ(e),r=[],a=!1,s=l=>{let c=!0;for(const u of l)u.type==="require-iteration-displayformat"?c=c&&u.target===t.iterationDisplayFormat:u.type==="match-tldts-domainWithoutSuffix"&&(c=c&&u.target===(n==null?void 0:n.domainWithoutSuffix));return c};for(const l of Tr.iteration.url.adjustmentList)(!t.view||(i=l==null?void 0:l.allowed_for)!=null&&i[t.view])&&s(l.conditions)&&(a=!0,r=r.concat(l.modifications));return{modificationList:r,hasAdjustment:a,$tldtsResults:n}},adjust:(e,t)=>
1251{var r,a,s;let n=null;if(e&&zI.isURL(e,{require_protocol:!0})&&(n=new URL(e)),n&&(t==null?void 0:t.length)>0){for(const i of t)i.type==="search-add"&&!((r=n==null?void 0:n.searchParams)!=null&&r.get(i.key))?(a=n==null?void 0:n.searchParams)==null||a.append(i.key,i.value):i.type==="search-remove"&&((s=n==null?void 0:n.searchParams)==null||s.delete(i.key));return n.toString()}else return e},full_process:(e,t={view:null})=>{let{modificationList:n,hasAdjustment:r,$tldtsResults:a}=Vc.match(e,t),s=Vc.adjust(e,n);return{finalizedURL:r?s:e,modificationList:n,sampleParsedURL:s,hasAdjustment:r,$tldts:a}}},du=()=>o.createElement("div",{className:"interstitial-content w-full flex flex-col items-center justify-center mx-auto"}),XTe=()=>o.createElement("div",{className:"flex items-center whitespace-nowrap mr-2 gap-2 dark__text text-xs"},o.createElement("span",null,"Syncing..."),o.createElement(os,{size:14}));/** 1252 * @license 1253 * Copyright 2017 Google LLC 1254 * 1255 * Licensed under the Apache License, Version 2.0 (the "License"); 1256 * you may not use this file except in compliance with the License. 1257 * You may obtain a copy of the License at 1258 * 1259 * http://www.apache.org/licenses/LICENSE-2.0 1260 * 1261 * Unless required by applicable law or agreed to in writing, software 1262 * distributed under the License is distributed on an "AS IS" BASIS, 1263 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1264 * See the License for the specific language governing permissions and 1265 * limitations under the License. 1266 */const nZ="firebasestorage.googleapis.com",rZ="storageBucket",QTe=2*60*1e3,JTe=10*60*1e3;/** 1267 * @license 1268 * Copyright 2017 Google LLC 1269 * 1270 * Licensed under the Apache License, Version 2.0 (the "License"); 1271 * you may not use this file except in compliance with the License. 1272 * You may obtain a copy of the License at 1273 * 1274 * http://www.apache.org/licenses/LICENSE-2.0 1275 * 1276 * Unless required by applicable law or agreed to in writing, software 1277 * distributed under the License is distributed on an "AS IS" BASIS, 1278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1279 * See the License for the specific language governing permissions and 1280 * limitations under the License. 1281 */class ti extends Dre{constructor(t,n,r=0){super(_2(t),`Firebase Storage: ${n} (${_2(t)})`),this.status_=r,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,ti.prototype)}get status(){return this.status_}set status(t){this.status_=t}_codeEquals(t){return _2(t)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(t){this.customData.serverResponse=t,this.customData.serverResponse?this.message=`${this._baseMessage} 1282${this.customData.serverResponse}`:this.message=this._baseMessage}}var Js;(function(e){e.UNKNOWN="unknown",e.OBJECT_NOT_FOUND="object-not-found",e.BUCKET_NOT_FOUND="bucket-not-found",e.PROJECT_NOT_FOUND="project-not-found",e.QUOTA_EXCEEDED="quota-exceeded",e.UNAUTHENTICATED="unauthenticated",e.UNAUTHORIZED="unauthorized",e.UNAUTHORIZED_APP="unauthorized-app",e.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",e.INVALID_CHECKSUM="invalid-checksum",e.CANCELED="canceled",e.INVALID_EVENT_NAME="invalid-event-name",e.INVALID_URL="invalid-url",e.INVALID_DEFAULT_BUCKET="invalid-default-bucket",e.NO_DEFAULT_BUCKET="no-default-bucket",e.CANNOT_SLICE_BLOB="cannot-slice-blob",e.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",e.NO_DOWNLOAD_URL="no-download-url",e.INVALID_ARGUMENT="invalid-argument",e.INVALID_ARGUMENT_COUNT="invalid-argument-count",e.APP_DELETED="app-deleted",e.INVALID_ROOT_OPERATION="invalid-root-operation",e.INVALID_FORMAT="invalid-format",e.INTERNAL_ERROR="internal-error",e.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(Js||(Js={}));function _2(e){return"storage/"+e}function aZ(){const e="An unknown error occurred, please check the error payload for server response.";return new ti(Js.UNKNOWN,e)}function eAe(e){return new ti(Js.OBJECT_NOT_FOUND,"Object '"+e+"' does not exist.")}function tAe(e){return new ti(Js.QUOTA_EXCEEDED,"Quota for bucket '"+e+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function nAe(){const e="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new ti(Js.UNAUTHENTICATED,e)}function rAe(){return new ti(Js.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function aAe(e){return new ti(Js.UNAUTHORIZED,"User does not have permission to access '"+e+"'.")}function sAe(){return new ti(Js.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function iAe(){return new ti(Js.CANCELED,"User canceled the upload/download.")}function oAe(e){return new ti(Js.INVALID_URL,"Invalid URL '"+e+"'.")}function lAe(e){return new ti(Js.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}function cAe(){return new ti(Js.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+rZ+"' property when initializing the app?")}function uAe(){return new ti(Js.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function HI(e){return new ti(Js.INVALID_ARGUMENT,e)}function sZ(){return new ti(Js.APP_DELETED,"The Firebase app was deleted.")}function dAe(e){return new ti(Js.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function f0(e){throw new ti(Js.INTERNAL_ERROR,"Internal error: "+e)}/** 1283 * @license 1284 * Copyright 2017 Google LLC 1285 * 1286 * Licensed under the Apache License, Version 2.0 (the "License");
1287 * you may not use this file except in compliance with the License. 1288 * You may obtain a copy of the License at 1289 * 1290 * http://www.apache.org/licenses/LICENSE-2.0 1291 * 1292 * Unless required by applicable law or agreed to in writing, software 1293 * distributed under the License is distributed on an "AS IS" BASIS, 1294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1295 * See the License for the specific language governing permissions and 1296 * limitations under the License. 1297 */class Bo{constructor(t,n){this.bucket=t,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(t,n){let r;try{r=Bo.makeFromUrl(t,n)}catch{return new Bo(t,"")}if(r.path==="")return r;throw lAe(t)}static makeFromUrl(t,n){let r=null;const a="([A-Za-z0-9.\\-_]+)";function s(x){x.path.charAt(x.path.length-1)==="/"&&(x.path_=x.path_.slice(0,-1))}const i="(/(.*))?$",l=new RegExp("^gs://"+a+i,"i"),c={bucket:1,path:3};function u(x){x.path_=decodeURIComponent(x.path)}const d="v[A-Za-z0-9_]+",f=n.replace(/[.]/g,"\\."),m="(/([^?#]*).*)?$",h=new RegExp(`^https?://${f}/${d}/b/${a}/o${m}`,"i"),g={bucket:1,path:3},v=n===nZ?"(?:storage.googleapis.com|storage.cloud.google.com)":n,y="([^?#]*)",b=new RegExp(`^https?://${v}/${a}/${y}`,"i"),w=[{regex:l,indices:c,postModify:s},{regex:h,indices:g,postModify:u},{regex:b,indices:{bucket:1,path:2},postModify:u}];for(let x=0;x<w.length;x++){const S=w[x],N=S.regex.exec(t);if(N){const k=N[S.indices.bucket];let C=N[S.indices.path];C||(C=""),r=new Bo(k,C),S.postModify(r);break}}if(r==null)throw oAe(t);return r}}class fAe{constructor(t){this.promise_=Promise.reject(t)}getPromise(){return this.promise_}cancel(t=!1){}}/** 1298 * @license 1299 * Copyright 2017 Google LLC 1300 * 1301 * Licensed under the Apache License, Version 2.0 (the "License"); 1302 * you may not use this file except in compliance with the License. 1303 * You may obtain a copy of the License at 1304 * 1305 * http://www.apache.org/licenses/LICENSE-2.0 1306 * 1307 * Unless required by applicable law or agreed to in writing, software 1308 * distributed under the License is distributed on an "AS IS" BASIS, 1309 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1310 * See the License for the specific language governing permissions and 1311 * limitations under the License. 1312 */function mAe(e,t,n){let r=1,a=null,s=null,i=!1,l=0;function c(){return l===2}let u=!1;function d(...y){u||(u=!0,t.apply(null,y))}function f(y){a=setTimeout(()=>{a=null,e(h,c())},y)}function m(){s&&clearTimeout(s)}function h(y,...b){if(u){m();return}if(y){m(),d.call(null,y,...b);return}if(c()||i){m(),d.call(null,y,...b);return}r<64&&(r*=2);let w;l===1?(l=2,w=0):w=(r+Math.random())*1e3,f(w)}let g=!1;function v(y){g||(g=!0,m(),!u&&(a!==null?(y||(l=2),clearTimeout(a),f(0)):y||(l=1)))}return f(0),s=setTimeout(()=>{i=!0,v(!0)},n),v}function hAe(e){e(!1)}/** 1313 * @license 1314 * Copyright 2017 Google LLC 1315 * 1316 * Licensed under the Apache License, Version 2.0 (the "License"); 1317 * you may not use this file except in compliance with the License. 1318 * You may obtain a copy of the License at 1319 * 1320 * http://www.apache.org/licenses/LICENSE-2.0 1321 * 1322 * Unless required by applicable law or agreed to in writing, software 1323 * distributed under the License is distributed on an "AS IS" BASIS, 1324 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1325 * See the License for the specific language governing permissions and 1326 * limitations under the License. 1327 */function pAe(e){return e!==void 0}function gAe(e){return typeof e=="object"&&!Array.isArray(e)}function iZ(e){return typeof e=="string"||e instanceof String}function M6(e,t,n,r){if(r<t)throw HI(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw HI(`Invalid value for '${e}'. Expected ${n} or less.`)}/** 1328 * @license 1329 * Copyright 2017 Google LLC 1330 * 1331 * Licensed under the Apache License, Version 2.0 (the "License"); 1332 * you may not use this file except in compliance with the License. 1333 * You may obtain a copy of the License at 1334 * 1335 * http://www.apache.org/licenses/LICENSE-2.0 1336 * 1337 * Unless required by applicable law or agreed to in writing, softw
1337are 1338 * distributed under the License is distributed on an "AS IS" BASIS, 1339 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1340 * See the License for the specific language governing permissions and 1341 * limitations under the License. 1342 */function oZ(e,t,n){let r=t;return n==null&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function lZ(e){const t=encodeURIComponent;let n="?";for(const r in e)if(e.hasOwnProperty(r)){const a=t(r)+"="+t(e[r]);n=n+a+"&"}return n=n.slice(0,-1),n}var im;(function(e){e[e.NO_ERROR=0]="NO_ERROR",e[e.NETWORK_ERROR=1]="NETWORK_ERROR",e[e.ABORT=2]="ABORT"})(im||(im={}));/** 1343 * @license 1344 * Copyright 2022 Google LLC 1345 * 1346 * Licensed under the Apache License, Version 2.0 (the "License"); 1347 * you may not use this file except in compliance with the License. 1348 * You may obtain a copy of the License at 1349 * 1350 * http://www.apache.org/licenses/LICENSE-2.0 1351 * 1352 * Unless required by applicable law or agreed to in writing, software 1353 * distributed under the License is distributed on an "AS IS" BASIS, 1354 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1355 * See the License for the specific language governing permissions and 1356 * limitations under the License. 1357 */function vAe(e,t){const n=e>=500&&e<600,a=[408,429].indexOf(e)!==-1,s=t.indexOf(e)!==-1;return n||a||s}/** 1358 * @license 1359 * Copyright 2017 Google LLC 1360 * 1361 * Licensed under the Apache License, Version 2.0 (the "License"); 1362 * you may not use this file except in compliance with the License. 1363 * You may obtain a copy of the License at 1364 * 1365 * http://www.apache.org/licenses/LICENSE-2.0 1366 * 1367 * Unless required by applicable law or agreed to in writing, software 1368 * distributed under the License is distributed on an "AS IS" BASIS, 1369 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1370 * See the License for the specific language governing permissions and 1371 * limitations under the License. 1372 */class yAe{constructor(t,n,r,a,s,i,l,c,u,d,f,m=!0){this.url_=t,this.method_=n,this.headers_=r,this.body_=a,this.successCodes_=s,this.additionalRetryCodes_=i,this.callback_=l,this.errorCallback_=c,this.timeout_=u,this.progressCallback_=d,this.connectionFactory_=f,this.retry=m,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((h,g)=>{this.resolve_=h,this.reject_=g,this.start_()})}start_(){const t=(r,a)=>{if(a){r(!1,new k1(!1,null,!0));return}const s=this.connectionFactory_();this.pendingConnection_=s;const i=l=>{const c=l.loaded,u=l.lengthComputable?l.total:-1;this.progressCallback_!==null&&this.progressCallback_(c,u)};this.progressCallback_!==null&&s.addUploadProgressListener(i),s.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&s.removeUploadProgressListener(i),this.pendingConnection_=null;const l=s.getErrorCode()===im.NO_ERROR,c=s.getStatus();if(!l||vAe(c,this.additionalRetryCodes_)&&this.retry){const d=s.getErrorCode()===im.ABORT;r(!1,new k1(!1,null,d));return}const u=this.successCodes_.indexOf(c)!==-1;r(!0,new k1(u,s))})},n=(r,a)=>{const s=this.resolve_,i=this.reject_,l=a.connection;if(a.wasSuccessCode)try{const c=this.callback_(l,l.getResponse());pAe(c)?s(c):s()}catch(c){i(c)}else if(l!==null){const c=aZ();c.serverResponse=l.getErrorText(),this.errorCallback_?i(this.errorCallback_(l,c)):i(c)}else if(a.canceled){const c=this.appDelete_?sZ():iAe();i(c)}else{const c=sAe();i(c)}};this.canceled_?n(!1,new k1(!1,null,!0)):this.backoffId_=mAe(t,n,this.timeout_)}getPromise(){return this.promise_}cancel(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&hAe(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class k1{constructor(t,n,r){this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}}function bAe(e,t){t!==null&&t.length>0&&(e.Authorization="Firebase "+t)}function wAe(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function EAe(e,t){t&&(e["X-Firebase-GMPID"]=t)}function xAe(e,t){t!==null&&(e["X-Firebase-AppCheck"]=t)}
1372function _Ae(e,t,n,r,a,s,i=!0){const l=lZ(e.urlParams),c=e.url+l,u=Object.assign({},e.headers);return EAe(u,t),bAe(u,n),wAe(u,s),xAe(u,r),new yAe(c,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,a,i)}/** 1373 * @license 1374 * Copyright 2017 Google LLC 1375 * 1376 * Licensed under the Apache License, Version 2.0 (the "License"); 1377 * you may not use this file except in compliance with the License. 1378 * You may obtain a copy of the License at 1379 * 1380 * http://www.apache.org/licenses/LICENSE-2.0 1381 * 1382 * Unless required by applicable law or agreed to in writing, software 1383 * distributed under the License is distributed on an "AS IS" BASIS, 1384 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1385 * See the License for the specific language governing permissions and 1386 * limitations under the License. 1387 */function cZ(e){let t;try{t=JSON.parse(e)}catch{return null}return gAe(t)?t:null}/** 1388 * @license 1389 * Copyright 2017 Google LLC 1390 * 1391 * Licensed under the Apache License, Version 2.0 (the "License"); 1392 * you may not use this file except in compliance with the License. 1393 * You may obtain a copy of the License at 1394 * 1395 * http://www.apache.org/licenses/LICENSE-2.0 1396 * 1397 * Unless required by applicable law or agreed to in writing, software 1398 * distributed under the License is distributed on an "AS IS" BASIS, 1399 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1400 * See the License for the specific language governing permissions and 1401 * limitations under the License. 1402 */function kAe(e){if(e.length===0)return null;const t=e.lastIndexOf("/");return t===-1?"":e.slice(0,t)}function SAe(e,t){const n=t.split("/").filter(r=>r.length>0).join("/");return e.length===0?n:e+"/"+n}function uZ(e){const t=e.lastIndexOf("/",e.length-2);return t===-1?e:e.slice(t+1)}/** 1403 * @license 1404 * Copyright 2017 Google LLC 1405 * 1406 * Licensed under the Apache License, Version 2.0 (the "License"); 1407 * you may not use this file except in compliance with the License. 1408 * You may obtain a copy of the License at 1409 * 1410 * http://www.apache.org/licenses/LICENSE-2.0 1411 * 1412 * Unless required by applicable law or agreed to in writing, software 1413 * distributed under the License is distributed on an "AS IS" BASIS, 1414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1415 * See the License for the specific language governing permissions and 1416 * limitations under the License. 1417 */function CAe(e,t){return t}class Mi{constructor(t,n,r,a){this.server=t,this.local=n||t,this.writable=!!r,this.xform=a||CAe}}let S1=null;function NAe(e){return!iZ(e)||e.length<2?e:uZ(e)}function RAe(){if(S1)return S1;const e=[];e.push(new Mi("bucket")),e.push(new Mi("generation")),e.push(new Mi("metageneration")),e.push(new Mi("name","fullPath",!0));function t(s,i){return NAe(i)}const n=new Mi("name");n.xform=t,e.push(n);function r(s,i){return i!==void 0?Number(i):i}const a=new Mi("size");return a.xform=r,e.push(a),e.push(new Mi("timeCreated")),e.push(new Mi("updated")),e.push(new Mi("md5Hash",null,!0)),e.push(new Mi("cacheControl",null,!0)),e.push(new Mi("contentDisposition",null,!0)),e.push(new Mi("contentEncoding",null,!0)),e.push(new Mi("contentLanguage",null,!0)),e.push(new Mi("contentType",null,!0)),e.push(new Mi("metadata","customMetadata",!0)),S1=e,S1}function TAe(e,t){function n(){const r=e.bucket,a=e.fullPath,s=new Bo(r,a);return t._makeStorageReference(s)}Object.defineProperty(e,"ref",{get:n})}function AAe(e,t,n){const r={};r.type="file";const a=n.length;for(let s=0;s<a;s++){const i=n[s];r[i.local]=i.xform(r,t[i.server])}return TAe(r,e),r}function IAe(e,t,n){const r=cZ(t);return r===null?null:AAe(e,r,n)}function OAe(e,t,n,r){const a=cZ(t);if(a===null||!iZ(a.downloadTokens))return null;const s=a.downloadTokens;if(s.length===0)return null;const i=encodeURIComponent;return s.split(",").map(u=>{const d=e.bucket,f=e.fullPath,m="/b/"+i(d)+"/o/"+i(f),h=oZ(m,n,r),g=lZ({alt:"media",token:u});return h+g})[0]}class MAe{constructor(t,n,r,a){this.url=t,this.method=n,this.handler=r,this.timeout=a,this.urlParams={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 1418 * @license 1419 * Copyright 2017 Google LLC 1420 * 1421 * Licensed under the Apache License, Version 2.0 (the "License");
1422 * you may not use this file except in compliance with the License. 1423 * You may obtain a copy of the License at 1424 * 1425 * http://www.apache.org/licenses/LICENSE-2.0 1426 * 1427 * Unless required by applicable law or agreed to in writing, software 1428 * distributed under the License is distributed on an "AS IS" BASIS, 1429 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1430 * See the License for the specific language governing permissions and 1431 * limitations under the License. 1432 */function PAe(e){if(!e)throw aZ()}function DAe(e,t){function n(r,a){const s=IAe(e,a,t);return PAe(s!==null),OAe(s,a,e.host,e._protocol)}return n}function LAe(e){function t(n,r){let a;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?a=rAe():a=nAe():n.getStatus()===402?a=tAe(e.bucket):n.getStatus()===403?a=aAe(e.path):a=r,a.status=n.getStatus(),a.serverResponse=r.serverResponse,a}return t}function $Ae(e){const t=LAe(e);function n(r,a){let s=t(r,a);return r.getStatus()===404&&(s=eAe(e.path)),s.serverResponse=a.serverResponse,s}return n}function FAe(e,t,n){const r=t.fullServerUrl(),a=oZ(r,e.host,e._protocol),s="GET",i=e.maxOperationRetryTime,l=ne
1432w MAe(a,s,DAe(e,n),i);return l.errorHandler=$Ae(t),l}class zAe{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=im.NO_ERROR,this.sendPromise_=new Promise(t=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=im.ABORT,t()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=im.NETWORK_ERROR,t()}),this.xhr_.addEventListener("load",()=>{t()})})}send(t,n,r,a){if(this.sent_)throw f0("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,t,!0),a!==void 0)for(const s in a)a.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,a[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw f0("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw f0("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw f0("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw f0("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(t){return this.xhr_.getResponseHeader(t)}addUploadProgressListener(t){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",t)}removeUploadProgressListener(t){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",t)}}class HAe extends zAe{initXhr(){this.xhr_.responseType="text"}}function VAe(){return new HAe}/** 1433 * @license 1434 * Copyright 2019 Google LLC 1435 * 1436 * Licensed under the Apache License, Version 2.0 (the "License"); 1437 * you may not use this file except in compliance with the License. 1438 * You may obtain a copy of the License at 1439 * 1440 * http://www.apache.org/licenses/LICENSE-2.0 1441 * 1442 * Unless required by applicable law or agreed to in writing, software 1443 * distributed under the License is distributed on an "AS IS" BASIS, 1444 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1445 * See the License for the specific language governing permissions and 1446 * limitations under the License. 1447 */class Sm{constructor(t,n){this._service=t,n instanceof Bo?this._location=n:this._location=Bo.makeFromUrl(n,t.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(t,n){return new Sm(t,n)}get root(){const t=new Bo(this._location.bucket,"");return this._newRef(this._service,t)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return uZ(this._location.path)}get storage(){return this._service}get parent(){const t=kAe(this._location.path);if(t===null)return null;const n=new Bo(this._location.bucket,t);return new Sm(this._service,n)}_throwIfRoot(t){if(this._location.path==="")throw dAe(t)}}function UAe(e){e._throwIfRoot("getDownloadURL");const t=FAe(e.storage,e._location,RAe());return e.storage.makeRequestWithTokens(t,VAe).then(n=>{if(n===null)throw uAe();return n})}function BAe(e,t){const n=SAe(e._location.path,t),r=new Bo(e._location.bucket,n);return new Sm(e.storage,r)}/** 1448 * @license 1449 * Copyright 2017 Google LLC 1450 * 1451 * Licensed under the Apache License, Version 2.0 (the "License"); 1452 * you may not use this file except in compliance with the License. 1453 * You may obtain a copy of the License at 1454 * 1455 * http://www.apache.org/licenses/LICENSE-2.0 1456 * 1457 * Unless required by applicable law or agreed to in writing, software 1458 * distributed under the License is distributed on an "AS IS" BASIS, 1459 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1460 * See the License for the specific language governing permissions and 1461 * limitations under the License. 1462 */function jAe(e){return/^[A-Za-z]+:\/\//.test(e)}function WAe(e,t){return new Sm(e,t)}function dZ(e,t){if(e instanceof rL){const n=e;if(n._bucket==null)throw cAe();const r=new Sm(n,n._bucket);return t!=null?dZ(r,t):r}else return t!==void 0?BAe(e,t):e}function GAe(e,t){if(t&&jAe(t)){if(e instanceof rL)return WAe(e,t);throw HI("To use ref(service, url), the first argument must be a Storage instance.")}else return dZ(e,t)}function P6(e,t){const n=t==null?void 0:t[rZ];return n==null?null:Bo.makeFromBucketSpec(n,e)}function qAe(e,t,n,r={}){e.host=`${t}:${n}`,e._protocol="http";const{mockUserToken:a}=r;
1462a&&(e._overrideAuthToken=typeof a=="string"?a:BH(a,e.app.options.projectId))}class rL{constructor(t,n,r,a,s){this.app=t,this._authProvider=n,this._appCheckProvider=r,this._url=a,this._firebaseVersion=s,this._bucket=null,this._host=nZ,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=QTe,this._maxUploadRetryTime=JTe,this._requests=new Set,a!=null?this._bucket=Bo.makeFromBucketSpec(a,this._host):this._bucket=P6(this._host,this.app.options)}get host(){return this._host}set host(t){this._host=t,this._url!=null?this._bucket=Bo.makeFromBucketSpec(this._url,t):this._bucket=P6(t,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(t){M6("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(t){M6("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const t=this._authProvider.getImmediate({optional:!0});if(t){const n=await t.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){const t=this._appCheckProvider.getImmediate({optional:!0});return t?(await t.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(t=>t.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(t){return new Sm(this,t)}_makeRequest(t,n,r,a,s=!0){if(this._deleted)return new fAe(sZ());{const i=_Ae(t,this._appId,r,a,n,this._firebaseVersion,s);return this._requests.add(i),i.getPromise().then(()=>this._requests.delete(i),()=>this._requests.delete(i)),i}}async makeRequestWithTokens(t,n){const[r,a]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(t,n,r,a).getPromise()}}const D6="@firebase/storage",L6="0.13.2";/** 1463 * @license 1464 * Copyright 2020 Google LLC 1465 * 1466 * Licensed under the Apache License, Version 2.0 (the "License"); 1467 * you may not use this file except in compliance with the License. 1468 * You may obtain a copy of the License at 1469 * 1470 * http://www.apache.org/licenses/LICENSE-2.0 1471 * 1472 * Unless required by applicable law or agreed to in writing, software 1473 * distributed under the License is distributed on an "AS IS" BASIS, 1474 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1475 * See the License for the specific language governing permissions and 1476 * limitations under the License. 1477 */const fZ="storage";function mZ(e){return e=od(e),UAe(e)}function hZ(e,t){return e=od(e),GAe(e,t)}function pZ(e=xr(),t){e=od(e);const r=VH(e,fZ).getImmediate({identifier:t}),a=UH("storage");return a&&YAe(r,...a),r}function YAe(e,t,n,r={}){qAe(e,t,n,r)}function KAe(e,{instanceIdentifier:t}){const n=e.getProvider("app").getImmediate(),r=e.getProvider("auth-internal"),a=e.getProvider("app-check-internal");return new rL(n,r,a,t,YH)}function ZAe(){jH(new WH(fZ,KAe,"PUBLIC").setMultipleInstances(!0)),aE(D6,L6,""),aE(D6,L6,"esm2017")}ZAe();const XAe=pZ(),Cm=({storagePath:e=null})=>{var c,u;const t=p.useRef(null),[n,r]=p.useState(!1),a=Wn(d=>{var f;return(f=d==null?void 0:d.FB)==null?void 0:f.images}),[s,i]=p.useState(((c=a==null?void 0:a.previouslyLoaded)==null?void 0:c[e])==="NOT_FOUND"?null:((u=a==null?void 0:a.previouslyLoaded)==null?void 0:u[e])||null);p.useEffect(()=>{const d=new IntersectionObserver(([f])=>{f.isIntersecting&&(r(!0),d.disconnect())},{rootMargin:"50px"});return t.current&&d.observe(t.current),()=>{d&&d.disconnect()}},[]);const l=()=>{var f;if(!e)return;const d=(f=a==null?void 0:a.previouslyLoaded)==null?void 0:f[e];d!==void 0?i(d==="NOT_FOUND"?null:d):e.startsWith("http://")||e.startsWith("https://")?(i(e),Zn.dispatch({type:"images/setPreviouslyLoadedImages",data:{storagePath:e,url:e}})):n&&(i(null),mZ(hZ(XAe,e)).then(m=>{Zn.dispatch({type:"images/setPreviouslyLoadedImages",data:{storagePath:e,url:m}}),i(m)}).catch(m=>{if(m&&m.code==="storage/object-not-found"){Zn.dispatch({type:"images/setPreviouslyLoadedImages",data:{storagePath:e,url:"NOT_FOUND"}});return}console.error("Favicon image load error",m)}))};return p.useEffect(()=>{l()},[e,n]),o.createElement("div",{ref:t,style:{width:"100%",height:"100%"}},s?o.createElement("img",{src:s,alt:""}):null)};/** 1478 * @license lucide-react v0.468.0 - ISC 1479 * 1480 * This source code is licensed under the ISC license. 1481 * See the LICENSE file in the root directory of this source tree. 1482 */const QAe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gZ=(...e)=>
vendor: 5,357 bytes, lines 1482-1557
1482e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 1483 * @license lucide-react v0.468.0 - ISC 1484 * 1485 * This source code is licensed under the ISC license. 1486 * See the LICENSE file in the root directory of this source tree. 1487 */var JAe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 1488 * @license lucide-react v0.468.0 - ISC 1489 * 1490 * This source code is licensed under the ISC license. 1491 * See the LICENSE file in the root directory of this source tree. 1492 */const eIe=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...l},c)=>p.createElement("svg",{ref:c,...JAe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gZ("lucide",a),...l},[...i.map(([u,d])=>p.createElement(u,d)),...Array.isArray(s)?s:[s]]));/** 1493 * @license lucide-react v0.468.0 - ISC 1494 * 1495 * This source code is licensed under the ISC license. 1496 * See the LICENSE file in the root directory of this source tree. 1497 */const wn=(e,t)=>{const n=p.forwardRef(({className:r,...a},s)=>p.createElement(eIe,{ref:s,iconNode:t,className:gZ(`lucide-${QAe(e)}`,r),...a}));return n.displayName=`${e}`,n};/** 1498 * @license lucide-react v0.468.0 - ISC 1499 * 1500 * This source code is licensed under the ISC license. 1501 * See the LICENSE file in the root directory of this source tree. 1502 */const $6=wn("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 1503 * @license lucide-react v0.468.0 - ISC 1504 * 1505 * This source code is licensed under the ISC license. 1506 * See the LICENSE file in the root directory of this source tree. 1507 */const vZ=wn("ArrowDownAZ",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);/** 1508 * @license lucide-react v0.468.0 - ISC 1509 * 1510 * This source code is licensed under the ISC license. 1511 * See the LICENSE file in the root directory of this source tree. 1512 */const tIe=wn("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** 1513 * @license lucide-react v0.468.0 - ISC 1514 * 1515 * This source code is licensed under the ISC license. 1516 * See the LICENSE file in the root directory of this source tree. 1517 */const nIe=wn("ArrowLeftFromLine",[["path",{d:"m9 6-6 6 6 6",key:"7v63n9"}],["path",{d:"M3 12h14",key:"13k4hi"}],["path",{d:"M21 19V5",key:"b4bplr"}]]);/** 1518 * @license lucide-react v0.468.0 - ISC 1519 * 1520 * This source code is licensed under the ISC license. 1521 * See the LICENSE file in the root directory of this source tree. 1522 */const rIe=wn("ArrowRightFromLine",[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M21 12H7",key:"13ipq5"}],["path",{d:"m15 18 6-6-6-6",key:"6tx3qv"}]]);/** 1523 * @license lucide-react v0.468.0 - ISC 1524 * 1525 * This source code is licensed under the ISC license. 1526 * See the LICENSE file in the root directory of this source tree. 1527 */const Du=wn("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 1528 * @license lucide-react v0.468.0 - ISC 1529 * 1530 * This source code is licensed under the ISC license. 1531 * See the LICENSE file in the root directory of this source tree. 1532 */const aIe=wn("ArrowUpAZ",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]]);/** 1533 * @license lucide-react v0.468.0 - ISC 1534 * 1535 * This source code is licensed under the ISC license. 1536 * See the LICENSE file in the root directory of this source tree. 1537 */const aL=wn("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** 1538 * @license lucide-react v0.468.0 - ISC 1539 * 1540 * This source code is licensed under the ISC license. 1541 * See the LICENSE file in the root directory of this source tree. 1542 */const sIe=wn("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 1543 * @license lucide-react v0.468.0 - ISC 1544 * 1545 * This source code is licensed under the ISC license. 1546 * See the LICENSE file in the root directory of this source tree. 1547 */const iIe=wn("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 1548 * @license lucide-react v0.468.0 - ISC 1549 * 1550 * This source code is licensed under the ISC license. 1551 * See the LICENSE file in the root directory of this source tree. 1552 */const tf=wn("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/** 1553 * @license lucide-react v0.468.0 - ISC 1554 * 1555 * This source code is licensed under the ISC license. 1556 * See the LICENSE file in the root directory of this source tree. 1557 */const F6=wn("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
1557],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 1558 * @license lucide-react v0.468.0 - ISC 1559 * 1560 * This source code is licensed under the ISC license. 1561 * See the LICENSE file in the root directory of this source tree. 1562 */const yZ=wn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 1563 * @license lucide-react v0.468.0 - ISC 1564 * 1565 * This source code is licensed under the ISC license. 1566 * See the LICENSE file in the root directory of this source tree. 1567 */const eS=wn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 1568 * @license lucide-react v0.468.0 - ISC 1569 * 1570 * This source code is licensed under the ISC license. 1571 * See the LICENSE file in the root directory of this source tree. 1572 */const oIe=wn("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 1573 * @license lucide-react v0.468.0 - ISC 1574 * 1575 * This source code is licensed under the ISC license. 1576 * See the LICENSE file in the root directory of this source tree. 1577 */const lIe=wn("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 1578 * @license lucide-react v0.468.0 - ISC 1579 * 1580 * This source code is licensed under the ISC license. 1581 * See the LICENSE file in the root directory of this source tree. 1582 */const z6=wn("CircleUserRound",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 1583 * @license lucide-react v0.468.0 - ISC 1584 * 1585 * This source code is licensed under the ISC license. 1586 * See the LICENSE file in the root directory of this source tree. 1587 */const Sx=wn("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 1588 * @license lucide-react v0.468.0 - ISC 1589 * 1590 * This source code is licensed under the ISC license. 1591 * See the LICENSE file in the root directory of this source tree. 1592 */const Yu=wn("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** 1593 * @license lucide-react v0.468.0 - ISC 1594 * 1595 * This source code is licensed under the ISC license. 1596 * See the LICENSE file in the root directory of this source tree. 1597 */const Mg=wn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 1598 * @license lucide-react v0.468.0 - ISC 1599 * 1600 * This source code is licensed under the ISC license. 1601 * See the LICENSE file in the root directory of this source tree. 1602 */const cIe=wn("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 1603 * @license lucide-react v0.468.0 - ISC 1604 * 1605 * This source code is licensed under the ISC license. 1606 * See the LICENSE file in the root directory of this source tree. 1607 */const uIe=wn("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 1608 * @license lucide-react v0.468.0 - ISC 1609 * 1610 * This source code is licensed under the ISC license. 1611 * See the LICENSE file in the root directory of this source tree. 1612 */const dIe=wn("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 1613 * @license lucide-react v0.468.0 - ISC 1614 * 1615 * This source code is licensed under the ISC license. 1616 * See the LICENSE file in the root directory of this source tree. 1617 */const Pg=wn("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 1618 * @license lucide-react v0.468.0 - ISC 1619 * 1620 * This source code is licensed under the ISC license. 1621 * See the LICENSE file in the root directory of this source tree. 1622 */const fIe=wn("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 1623 * @license lucide-react v0.468.0 - ISC 1624 * 1625 * This source code is licensed under the ISC license. 1626 * See the LICENSE file in the root directory of this source tree. 1627 */const mIe=wn("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 1628 * @license lucide-react v0.468.0 - ISC 1629 * 1630 * This source code is licensed under the ISC license. 1631 * See the LICENSE file in the root directory of this source tree. 1632 */const sL=wn("FileStack",[["path",{d:"M21 7h-3a2 2 0 0 1-2-2V2",key:"9rb54x"}],["path",{d:"M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17Z",key:"1059l0"}],["path",{d:"M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15",key:"16874u"}],["path",{d:"M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11",key:"k2ox98"}]]);/** 1633 * @license lucide-react v0.468.0 - ISC 1634 * 1635 * This source code is licensed under the ISC license. 1636 * See the LICENSE file in the root directory of this source tree. 1637 */const hIe=wn("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 1638 * @license lucide-react v0.468.0 - ISC 1639 * 1640 * This source code is licensed under the ISC license. 1641 * See the LICENSE file in the root directory of this source tree. 1642 */const iL=wn("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/** 1643 * @license lucide-react v0.468.0 - ISC 1644 * 1645 * This source code is licensed under the ISC license. 1646 * See the LICENSE file in the root directory of this source tree. 1647 */const pIe=wn("Focus",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** 1648 * @license lucide-react v0.468.0 - ISC 1649 * 1650 * This source code is licensed under the ISC license. 1651 * See the LICENSE file in the root directory of this source tree. 1652 */const av=wn("FolderClosed",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}
1652],["path",{d:"M2 10h20",key:"1ir3d8"}]]);/** 1653 * @license lucide-react v0.468.0 - ISC 1654 * 1655 * This source code is licensed under the ISC license. 1656 * See the LICENSE file in the root directory of this source tree. 1657 */const gIe=wn("FolderInput",[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]]);/** 1658 * @license lucide-react v0.468.0 - ISC 1659 * 1660 * This source code is licensed under the ISC license. 1661 * See the LICENSE file in the root directory of this source tree. 1662 */const tS=wn("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/** 1663 * @license lucide-react v0.468.0 - ISC 1664 * 1665 * This source code is licensed under the ISC license. 1666 * See the LICENSE file in the root directory of this source tree. 1667 */const Jc=wn("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 1668 * @license lucide-react v0.468.0 - ISC 1669 * 1670 * This source code is licensed under the ISC license. 1671 * See the LICENSE file in the root directory of this source tree. 1672 */const bZ=wn("Grid2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/** 1673 * @license lucide-react v0.468.0 - ISC 1674 * 1675 * This source code is licensed under the ISC license. 1676 * See the LICENSE file in the root directory of this source tree. 1677 */const wZ=wn("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** 1678 * @license lucide-react v0.468.0 - ISC 1679 * 1680 * This source code is licensed under the ISC license. 1681 * See the LICENSE file in the root directory of this source tree. 1682 */const VI=wn("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 1683 * @license lucide-react v0.468.0 - ISC 1684 * 1685 * This source code is licensed under the ISC license. 1686 * See the LICENSE file in the root directory of this source tree. 1687 */const ry=wn("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 1688 * @license lucide-react v0.468.0 - ISC 1689 * 1690 * This source code is licensed under the ISC license. 1691 * See the LICENSE file in the root directory of this source tree. 1692 */const UI=wn("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** 1693 * @license lucide-react v0.468.0 - ISC 1694 * 1695 * This source code is licensed under the ISC license. 1696 * See the LICENSE file in the root directory of this source tree. 1697 */const Yp=wn("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 1698 * @license lucide-react v0.468.0 - ISC 1699 * 1700 * This source code is licensed under the ISC license. 1701 * See the LICENSE file in the root directory of this source tree. 1702 */const EZ=wn("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/** 1703 * @license lucide-react v0.468.0 - ISC 1704 * 1705 * This source code is licensed under the ISC license. 1706 * See the LICENSE file in the root directory of this source tree. 1707 */const xZ=wn("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);/** 1708 * @license lucide-react v0.468.0 - ISC 1709 * 1710 * This source code is licensed under the ISC license. 1711 * See the LICENSE file in the root directory of this source tree. 1712 */const Wm=wn("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 1713 * @license lucide-react v0.468.0 - ISC 1714 * 1715 * This source code is licensed under the ISC license. 1716 * See the LICENSE file in the root directory of this source tree. 1717 */const vIe=wn("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/** 1718 * @license lucide-react v0.468.0 - ISC 1719 * 1720 * This source code is licensed under the ISC license. 1721 * See the LICENSE file in the root directory of this source tree. 1722 */const _Z=wn("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/** 1723 * @license lucide-react v0.468.0 - ISC 1724 * 1725 * This source code is licensed under the ISC license. 1726 * See the LICENSE file in the root directory of this source tree.
1727 */const BI=wn("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 1728 * @license lucide-react v0.468.0 - ISC 1729 * 1730 * This source code is licensed under the ISC license. 1731 * See the LICENSE file in the root directory of this source tree. 1732 */const yIe=wn("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 1733 * @license lucide-react v0.468.0 - ISC 1734 * 1735 * This source code is licensed under the ISC license. 1736 * See the LICENSE file in the root directory of this source tree. 1737 */const H6=wn("Logs",[["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 18h1",key:"1eiwyy"}],["path",{d:"M3 6h1",key:"rgxa97"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 18h1",key:"13wk12"}],["path",{d:"M8 6h1",key:"tn6mkg"}]]);/** 1738 * @license lucide-react v0.468.0 - ISC 1739 * 1740 * This source code is licensed under the ISC license. 1741 * See the LICENSE file in the root directory of this source tree. 1742 */const bIe=wn("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** 1743 * @license lucide-react v0.468.0 - ISC 1744 * 1745 * This source code is licensed under the ISC license. 1746 * See the LICENSE file in the root directory of this source tree. 1747 */const wIe=wn("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 1748 * @license lucide-react v0.468.0 - ISC 1749 * 1750 * This source code is licensed under the ISC license. 1751 * See the LICENSE file in the root directory of this source tree. 1752 */const jI=wn("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 1753 * @license lucide-react v0.468.0 - ISC 1754 * 1755 * This source code is licensed under the ISC license. 1756 * See the LICENSE file in the root directory of this source tree. 1757 */const EIe=wn("MoveHorizontal",[["path",{d:"m18 8 4 4-4 4",key:"1ak13k"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}]]);/** 1758 * @license lucide-react v0.468.0 - ISC 1759 * 1760 * This source code is licensed under the ISC license. 1761 * See the LICENSE file in the root directory of this source tree. 1762 */const xIe=wn("MoveVertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/** 1763 * @license lucide-react v0.468.0 - ISC 1764 * 1765 * This source code is licensed under the ISC license. 1766 * See the LICENSE file in the root directory of this source tree. 1767 */const ay=wn("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** 1768 * @license lucide-react v0.468.0 - ISC 1769 * 1770 * This source code is licensed under the ISC license. 1771 * See the LICENSE file in the root directory of this source tree. 1772 */const eu=wn("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 1773 * @license lucide-react v0.468.0 - ISC 1774 * 1775 * This source code is licensed under the ISC license. 1776 * See the LICENSE file in the root directory of this source tree. 1777 */const zs=wn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 1778 * @license lucide-react v0.468.0 - ISC 1779 * 1780 * This source code is licensed under the ISC license. 1781 * See the LICENSE file in the root directory of this source tree. 1782 */const _Ie=wn("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/** 1783 * @license lucide-react v0.468.0 - ISC 1784 * 1785 * This source code is licensed under the ISC license. 1786 * See the LICENSE file in the root directory of this source tree. 1787 */const oL=wn("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 1788 * @license lucide-react v0.468.0 - ISC 1789 * 1790 * This source code is licensed under the ISC license. 1791 * See the LICENSE file in the root directory of this source tree. 1792 */const kIe=wn("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 1793 * @license lucide-react v0.468.0 - ISC 1794 * 1795 * This source code is licensed under the ISC license. 1796 * See the LICENSE file in the root directory of this source tree. 1797 */const SIe=wn("Rows3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}
1797],["path",{d:"M21 15H3",key:"9uk58r"}]]);/** 1798 * @license lucide-react v0.468.0 - ISC 1799 * 1800 * This source code is licensed under the ISC license. 1801 * See the LICENSE file in the root directory of this source tree. 1802 */const CIe=wn("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 1803 * @license lucide-react v0.468.0 - ISC 1804 * 1805 * This source code is licensed under the ISC license. 1806 * See the LICENSE file in the root directory of this source tree. 1807 */const kZ=wn("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** 1808 * @license lucide-react v0.468.0 - ISC 1809 * 1810 * This source code is licensed under the ISC license. 1811 * See the LICENSE file in the root directory of this source tree. 1812 */const hb=wn("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 1813 * @license lucide-react v0.468.0 - ISC 1814 * 1815 * This source code is licensed under the ISC license. 1816 * See the LICENSE file in the root directory of this source tree. 1817 */const NIe=wn("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 1818 * @license lucide-react v0.468.0 - ISC 1819 * 1820 * This source code is licensed under the ISC license. 1821 * See the LICENSE file in the root directory of this source tree. 1822 */const RIe=wn("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 1823 * @license lucide-react v0.468.0 - ISC 1824 * 1825 * This source code is licensed under the ISC license. 1826 * See the LICENSE file in the root directory of this source tree. 1827 */const TIe=wn("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 1828 * @license lucide-react v0.468.0 - ISC 1829 * 1830 * This source code is licensed under the ISC license. 1831 * See the LICENSE file in the root directory of this source tree. 1832 */const lL=wn("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 1833 * @license lucide-react v0.468.0 - ISC 1834 * 1835 * This source code is licensed under the ISC license. 1836 * See the LICENSE file in the root directory of this source tree. 1837 */const SZ=wn("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/** 1838 * @license lucide-react v0.468.0 - ISC 1839 * 1840 * This source code is licensed under the ISC license. 1841 * See the LICENSE file in the root directory of this source tree. 1842 */const Gm=wn("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 1843 * @license lucide-react v0.468.0 - ISC 1844 * 1845 * This source code is licensed under the ISC license. 1846 * See the LICENSE file in the root directory of this source tree. 1847 */const AIe=wn("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/** 1848 * @license lucide-react v0.468.0 - ISC 1849 * 1850 * This source code is licensed under the ISC license. 1851 * See the LICENSE file in the root directory of this source tree. 1852 */const IIe=wn("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/** 1853 * @license lucide-react v0.468.0 - ISC 1854 * 1855 * This source code is licensed under the ISC license. 1856 * See the LICENSE file in the root directory of this source tree. 1857 */const tu=wn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
1857],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 1858 * @license lucide-react v0.468.0 - ISC 1859 * 1860 * This source code is licensed under the ISC license. 1861 * See the LICENSE file in the root directory of this source tree. 1862 */const Cx=wn("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]);/** 1863 * @license lucide-react v0.468.0 - ISC 1864 * 1865 * This source code is licensed under the ISC license. 1866 * See the LICENSE file in the root directory of this source tree. 1867 */const CZ=wn("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 1868 * @license lucide-react v0.468.0 - ISC 1869 * 1870 * This source code is licensed under the ISC license. 1871 * See the LICENSE file in the root directory of this source tree. 1872 */const OIe=wn("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** 1873 * @license lucide-react v0.468.0 - ISC 1874 * 1875 * This source code is licensed under the ISC license. 1876 * See the LICENSE file in the root directory of this source tree. 1877 */const MIe=wn("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 1878 * @license lucide-react v0.468.0 - ISC 1879 * 1880 * This source code is licensed under the ISC license. 1881 * See the LICENSE file in the root directory of this source tree. 1882 */const NZ=wn("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 1883 * @license lucide-react v0.468.0 - ISC 1884 * 1885 * This source code is licensed under the ISC license. 1886 * See the LICENSE file in the root directory of this source tree. 1887 */const uc=wn("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 1888 * @license lucide-react v0.468.0 - ISC 1889 * 1890 * This source code is licensed under the ISC license. 1891 * See the LICENSE file in the root directory of this source tree. 1892 */const PIe=wn("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** 1893 * @license lucide-react v0.468.0 - ISC 1894 * 1895 * This source code is licensed under the ISC license. 1896 * See the LICENSE file in the root directory of this source tree. 1897 */const Nm=wn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var sv=class{constructor(t,n,r,a,s,i){G(this,"type",3);G(this,"name","");G(this,"prefix","");G(this,"value","");G(this,"suffix","");G(this,"modifier",3);this.type=t,this.name=n,this.prefix=r,this.value=a,this.suffix=s,this.modifier=i}hasCustomName(){return this.name!==""&&typeof this.name!="number"}},DIe=/[$_\p{ID_Start}]/u,LIe=/[$_\u200C\u200D\p{ID_Continue}]/u,WI=".*";function $Ie(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}function RZ(e,t=!1){let n=[],r=0;for(;r<e.length;){let a=e[r],s=function(i){if(!t)throw new TypeError(i);n.push({type:"INVALID_CHAR",index:r,value:e[r++]})};if(a==="*"){n.push({type:"ASTERISK",index:r,value:e[r++]});continue}if(a==="+"||a==="?"){n.push({type:"OTHER_MODIFIER",index:r,value:e[r++]});continue}if(a==="\\"){n.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});continue}if(a==="{"){n.push({type:"OPEN",index:r,value:e[r++]});continue}if(a==="}"){n.push({type:"CLOSE",index:r,value:e[r++]});continue}if(a===":"){let i="",l=r+1;for(;l<e.length;){let c=e.substr(l,1);if(l===r+1&&DIe.test(c)||l!==r+1&&LIe.test(c)){i+=e[l++];continue}break}if(!i){s(`Missing parameter name at ${r}`);continue}n.push({type:"NAME",index:r,value:i}),r=l;continue}if(a==="("){let i=1,l="",c=r+1,u=!1;if(e[c]==="?"){s(`Pattern cannot start with "?" at ${c}`);continue}for(;c<e.length;){if(!$Ie(e[c],!1)){s(`Invalid character '${e[c]}' at ${c}.`),u=!0;break}if(e[c]==="\\"){l+=e[c++]+e[c++];continue}if(e[c]===")"){if(i--,i===0){c++;break}}else if(e[c]==="("&&(i++,e[c+1]!=="?")){s(`Capturing groups are not allowed at ${c}`),u=!0;break}l+=e[c++]}if(u)continue;if(i){s(`Unbalanced pattern at ${r}`);continue}if(!l){s(`Missing pattern at ${r}`);continue}n.push({type:"REGEX",index:r,value:l}),r=c;continue}n.push({type:"CHAR",index:r,value:e[r++]})}return n.push({type:"END",index:r,value:""}),n}function TZ(e,t={}){let n=RZ(e);t.delimiter??(t.delimiter="/#?"),t.prefixes??(t.prefixes="./");let r=`[^${hl(t.delimiter)}]+?`,a=[],s=0,i=0,l=new Set,c=E=>{if(i<n.length&&n[i].type===E)return n[i++].value},u=()=>c("OTHER_MODIFIER")??c("ASTERISK"),d=E=>{let w=c(E);if(w!==void 0)return w;let{type:x,index:S}=n[i];throw new TypeError(`Unexpected ${x} at ${S}, expected ${E}`)},f=()=>{let E="",w;for(;w=c("CHAR")??c("ESCAPED_CHAR");)E+=w;return E},m=E=>E,h=t.encodePart||m,g="",v=E=>{g+=E},y=()=>{g.length&&(a.push(new sv(3,"","",h(g),"",3)),g="")},b=(E,w,x,S,N)=>{let k=3;switch(N){case"?":k=1;break;case"*":k=0;break;case"+":k=2;break}if(!w&&!x&&k===3){v(E);return}
1897if(y(),!w&&!x){if(!E)return;a.push(new sv(3,"","",h(E),"",k));return}let C;x?x==="*"?C=WI:C=x:C=r;let A=2;C===r?(A=1,C=""):C===WI&&(A=0,C="");let O;if(w?O=w:x&&(O=s++),l.has(O))throw new TypeError(`Duplicate name '${O}'.`);l.add(O),a.push(new sv(A,O,h(E),C,h(S),k))};for(;i<n.length;){let E=c("CHAR"),w=c("NAME"),x=c("REGEX");if(!w&&!x&&(x=c("ASTERISK")),w||x){let N=E??"";t.prefixes.indexOf(N)===-1&&(v(N),N=""),y();let k=u();b(N,w,x,"",k);continue}let S=E??c("ESCAPED_CHAR");if(S){v(S);continue}if(c("OPEN")){let N=f(),k=c("NAME"),C=c("REGEX");!k&&!C&&(C=c("ASTERISK"));let A=f();d("CLOSE");let O=u();b(N,k,C,A,O);continue}y(),d("END")}return a}function hl(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function V6(e){return e&&e.ignoreCase?"ui":"u"}function FIe(e,t,n){return AZ(TZ(e,n),t,n)}function Ah(e){switch(e){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function AZ(e,t,n={}){n.delimiter??(n.delimiter="/#?"),n.prefixes??(n.prefixes="./"),n.sensitive??(n.sensitive=!1),n.strict??(n.strict=!1),n.end??(n.end=!0),n.start??(n.start=!0),n.endsWith="";let r=n.start?"^":"";for(let l of e){if(l.type===3){l.modifier===3?r+=hl(l.value):r+=`(?:${hl(l.value)})${Ah(l.modifier)}`;continue}t&&t.push(l.name);let c=`[^${hl(n.delimiter)}]+?`,u=l.value;if(l.type===1?u=c:l.type===0&&(u=WI),!l.prefix.length&&!l.suffix.length){l.modifier===3||l.modifier===1?r+=`(${u})${Ah(l.modifier)}`:r+=`((?:${u})${Ah(l.modifier)})`;continue}if(l.modifier===3||l.modifier===1){r+=`(?:${hl(l.prefix)}(${u})${hl(l.suffix)})`,r+=Ah(l.modifier);continue}r+=`(?:${hl(l.prefix)}`,r+=`((?:${u})(?:`,r+=hl(l.suffix),r+=hl(l.prefix),r+=`(?:${u}))*)${hl(l.suffix)})`,l.modifier===0&&(r+="?")}let a=`[${hl(n.endsWith)}]|$`,s=`[${hl(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${s}?`),n.endsWith.length?r+=`(?=${a})`:r+="$",new RegExp(r,V6(n));n.strict||(r+=`(?:${s}(?=${a}))?`);let i=!1;if(e.length){let l=e[e.length-1];l.type===3&&l.modifier===3&&(i=n.delimiter.indexOf(l)>-1)}return i||(r+=`(?=${s}|${a})`),new RegExp(r,V6(n))}var _d={delimiter:"",prefixes:"",sensitive:!0,strict:!0},zIe={delimiter:".",prefixes:"",sensitive:!0,strict:!0},HIe={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function VIe(e,t){return e.length?e[0]==="/"?!0:!t||e.length<2?!1:(e[0]=="\\"||e[0]=="{")&&e[1]=="/":!1}function IZ(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}function UIe(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}function OZ(e){return!e||e.length<2?!1:e[0]==="["||(e[0]==="\\"||e[0]==="{")&&e[1]==="["}var MZ=["ftp","file","http","https","ws","wss"];function PZ(e){if(!e)return!0;for(let t of MZ)if(e.test(t))return!0;return!1}function BIe(e,t){if(e=IZ(e,"#"),t||e==="")return e;let n=new URL("https://example.com");return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):""}function jIe(e,t){if(e=IZ(e,"?"),t||e==="")return e;let n=new URL("https://example.com");return n.search=e,n.search?n.search.substring(1,n.search.length):""}function WIe(e,t){return t||e===""?e:OZ(e)?$Z(e):LZ(e)}function GIe(e,t){if(t||e==="")return e;let n=new URL("https://example.com");return n.password=e,n.password}function qIe(e,t){if(t||e==="")return e;let n=new URL("https://example.com");return n.username=e,n.username}function YIe(e,t,n){if(n||e==="")return e;if(t&&!MZ.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]=="/";return e=new URL(r?e:"/-"+e,"https://example.com").pathname,r||(e=e.substring(2,e.length)),e}function KIe(e,t,n){return DZ(t)===e&&(e=""),n||e===""?e:FZ(e)}function ZIe(e,t){return e=UIe(e,":"),t||e===""?e:cL(e)}function DZ(e){switch(e){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function cL(e){if(e==="")return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw new TypeError(`Invalid protocol '${e}'.`)}function XIe(e){if(e==="")return e;let t=new URL("https://example.com");return t.username=e,t.username}function QIe(e){if(e==="")return e;let t=new URL("https://example.com");return t.password=e,t.password}function LZ(e){if(e==="")return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw new TypeError(`Invalid hostname '${e}'`);let t=new URL("https://example.com");return t.hostname=e,t.hostname}function $Z(e){if(e==="")return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw new TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}function FZ(e){if(e===""||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw new TypeError(`Invalid port '${e}'.`)}function JIe(e){if(e==="")return e;let t=new URL("https://example.com");return t.pathname=e[0]!=="/"?"/-"+e:e,e[0]!=="/"?t.pathname.substring(2,t.pathname.length):t.pathname}function eOe(e){return e===""?e:new URL(`data:${e}`).pathname}function tOe(e){if(e==="")return e;let t=new URL("https://example.com");return t.search=e,t.search.substring(1,t.search.length)}function nOe(e){if(e==="")return e;let t=new URL("https://example.com");return t.hash=e,t.hash.substring(1,t.hash.length)}var cp,Li,Gs,Ma,Qf,up,Lo,dp,fp,mp,gs,Ps,g_,zZ,Oy,GI,Jf,M0,hp,Pw,oo,pl,My,qI,v_,HZ,pp,Dw,y_,VZ,b_,UZ,gp,Lw,Ad,kh,Ou,Of,w_,BZ,E_,jZ,x_,WZ,__,GZ,yl,Nc,k_,qZ,FH,rOe=(FH=class{constructor(t){Zr(this,gs);Zr(this,g_);Zr(this,Oy);Zr(this,Jf);Zr(this,hp);Zr(this,oo);Zr(this,My);Zr(this,v_);Zr(this,pp);Zr(this,y_);Zr(this,b_);Zr(this,gp);Zr(this,Ad);Zr(this,Ou);Zr(this,w_);Zr(this,E_);Zr(this,x_);Zr(this,__);Zr(this,yl);Zr(this,k_);Zr(this,cp,void 0);Zr(this,Li,[]);Zr(this,Gs,{});Zr(this,Ma,0);Zr(this,Qf,1);Zr(this,up,0);Zr(this,Lo,0);Zr(this,dp,0);Zr(this,fp,0);Zr(this,mp,!1);Os(this,cp,t)}get result(){return Dt(this,Gs)}parse(){for(Os(this,Li,RZ(Dt(this,cp),!0));Dt(this,Ma)<Dt(this,Li).length;Os(this,Ma,Dt(this,Ma)+Dt(this,Qf))){if(Os(this,Qf,1),Dt(this,Li)[Dt(this,Ma)].type==="END"){if(Dt(this,Lo)===0){Rn(this,Oy,GI).call(this),Rn(this,Ou,Of).call(this)?Rn(this,gs,Ps).call(this,9,1):Rn(this,Ad,kh).call(this)?Rn(this,gs,Ps).call(this,8,1):Rn(this,gs,Ps).call(this,7,0);continue}else if(Dt(this,Lo)===2){Rn(this,Jf,M0).call(this,5);continue}Rn(this,gs,Ps).call(this,10,0);break}if(Dt(this,dp)>0)if(Rn(this,E_,jZ).call(this))Os(this,dp,Dt(this,dp)-1);else continue;if(Rn(this,w_,BZ).call(this)){Os(this,dp,Dt(this,dp)+1);continue}switch(Dt(this,Lo)){case 0:Rn(this,My,qI).call(this)&&Rn(this,Jf,M0).call(this,1);break;case 1:if(Rn(this,My,qI).call(this)){Rn(this,k_,qZ).call(this);let t=7,n=1;
1897Rn(this,v_,HZ).call(this)?(t=2,n=3):Dt(this,mp)&&(t=2),Rn(this,gs,Ps).call(this,t,n)}break;case 2:Rn(this,pp,Dw).call(this)?Rn(this,Jf,M0).call(this,3):(Rn(this,gp,Lw).call(this)||Rn(this,Ad,kh).call(this)||Rn(this,Ou,Of).call(this))&&Rn(this,Jf,M0).call(this,5);break;case 3:Rn(this,y_,VZ).call(this)?Rn(this,gs,Ps).call(this,4,1):Rn(this,pp,Dw).call(this)&&Rn(this,gs,Ps).call(this,5,1);break;case 4:Rn(this,pp,Dw).call(this)&&Rn(this,gs,Ps).call(this,5,1);break;case 5:Rn(this,x_,WZ).call(this)?Os(this,fp,Dt(this,fp)+1):Rn(this,__,GZ).call(this)&&Os(this,fp,Dt(this,fp)-1),Rn(this,b_,UZ).call(this)&&!Dt(this,fp)?Rn(this,gs,Ps).call(this,6,1):Rn(this,gp,Lw).call(this)?Rn(this,gs,Ps).call(this,7,0):Rn(this,Ad,kh).call(this)?Rn(this,gs,Ps).call(this,8,1):Rn(this,Ou,Of).call(this)&&Rn(this,gs,Ps).call(this,9,1);break;case 6:Rn(this,gp,Lw).call(this)?Rn(this,gs,Ps).call(this,7,0):Rn(this,Ad,kh).call(this)?Rn(this,gs,Ps).call(this,8,1):Rn(this,Ou,Of).call(this)&&Rn(this,gs,Ps).call(this,9,1);break;case 7:Rn(this,Ad,kh).call(this)?Rn(this,gs,Ps).call(this,8,1):Rn(this,Ou,Of).call(this)&&Rn(this,gs,Ps).call(this,9,1);break;case 8:Rn(this,Ou,Of).call(this)&&Rn(this,gs,Ps).call(this,9,1);break}}Dt(this,Gs).hostname!==void 0&&Dt(this,Gs).port===void 0&&(Dt(this,Gs).port="")}},cp=new WeakMap,Li=new WeakMap,Gs=new WeakMap,Ma=new WeakMap,Qf=new WeakMap,up=new WeakMap,Lo=new WeakMap,dp=new WeakMap,fp=new WeakMap,mp=new WeakMap,gs=new WeakSet,Ps=function(t,n){var r,a,s;switch(Dt(this,Lo)){case 0:break;case 1:Dt(this,Gs).protocol=Rn(this,yl,Nc).call(this);break;case 2:break;case 3:Dt(this,Gs).username=Rn(this,yl,Nc).call(this);break;case 4:Dt(this,Gs).password=Rn(this,yl,Nc).call(this);break;case 5:Dt(this,Gs).hostname=Rn(this,yl,Nc).call(this);break;case 6:Dt(this,Gs).port=Rn(this,yl,Nc).call(this);break;case 7:Dt(this,Gs).pathname=Rn(this,yl,Nc).call(this);break;case 8:Dt(this,Gs).search=Rn(this,yl,Nc).call(this);break;
1897case 9:Dt(this,Gs).hash=Rn(this,yl,Nc).call(this);break}Dt(this,Lo)!==0&&t!==10&&([1,2,3,4].includes(Dt(this,Lo))&&[6,7,8,9].includes(t)&&((r=Dt(this,Gs)).hostname??(r.hostname="")),[1,2,3,4,5,6].includes(Dt(this,Lo))&&[8,9].includes(t)&&((a=Dt(this,Gs)).pathname??(a.pathname=Dt(this,mp)?"/":"")),[1,2,3,4,5,6,7].includes(Dt(this,Lo))&&t===9&&((s=Dt(this,Gs)).search??(s.search=""))),Rn(this,g_,zZ).call(this,t,n)},g_=new WeakSet,zZ=function(t,n){Os(this,Lo,t),Os(this,up,Dt(this,Ma)+n),Os(this,Ma,Dt(this,Ma)+n),Os(this,Qf,0)},Oy=new WeakSet,GI=function(){Os(this,Ma,Dt(this,up)),Os(this,Qf,0)},Jf=new WeakSet,M0=function(t){Rn(this,Oy,GI).call(this),Os(this,Lo,t)},hp=new WeakSet,Pw=function(t){return t<0&&(t=Dt(this,Li).length-t),t<Dt(this,Li).length?Dt(this,Li)[t]:Dt(this,Li)[Dt(this,Li).length-1]},oo=new WeakSet,pl=function(t,n){let r=Rn(this,hp,Pw).call(this,t);return r.value===n&&(r.type==="CHAR"||r.type==="ESCAPED_CHAR"||r.type==="INVALID_CHAR")},My=new WeakSet,qI=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),":")},v_=new WeakSet,HZ=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma)+1,"/")&&Rn(this,oo,pl).call(this,Dt(this,Ma)+2,"/")},pp=new WeakSet,Dw=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),"@")},y_=new WeakSet,VZ=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),":")},b_=new WeakSet,UZ=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),":")},gp=new WeakSet,Lw=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),"/")},Ad=new WeakSet,kh=function(){if(Rn(this,oo,pl).call(this,Dt(this,Ma),"?"))return!0;if(Dt(this,Li)[Dt(this,Ma)].value!=="?")return!1;let t=Rn(this,hp,Pw).call(this,Dt(this,Ma)-1);return t.type!=="NAME"&&t.type!=="REGEX"&&t.type!=="CLOSE"&&t.type!=="ASTERISK"},Ou=new WeakSet,Of=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),"#")},w_=new WeakSet,BZ=function(){return Dt(this,Li)[Dt(this,Ma)].type=="OPEN"},E_=new WeakSet,jZ=function(){return Dt(this,Li)[Dt(this,Ma)].type=="CLOSE"},x_=new WeakSet,WZ=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),"[")},__=new WeakSet,GZ=function(){return Rn(this,oo,pl).call(this,Dt(this,Ma),"]")},yl=new WeakSet,Nc=function(){let t=Dt(this,Li)[Dt(this,Ma)],n=Rn(this,hp,Pw).call(this,Dt(this,up)).index;return Dt(this,cp).substring(n,t.index)},k_=new WeakSet,qZ=function(){let t={};Object.assign(t,_d),t.encodePart=cL;let n=FIe(Rn(this,yl,Nc).call(this),void 0,t);Os(this,mp,PZ(n))},FH),k2=["protocol","username","password","hostname","port","pathname","search","hash"],vd="*";function U6(e,t){if(typeof e!="string")throw new TypeError("parameter 1 is not of type 'string'.");let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search!==""?n.search.substring(1,n.search.length):void 0,hash:n.hash!==""?n.hash.substring(1,n.hash.length):void 0}}function yu(e,t){return t?P0(e):e}function m0(e,t,n){let r;if(typeof t.baseURL=="string")try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=yu(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=yu(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=yu(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=yu(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=yu(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=yu(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=yu(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=yu(r.hash.substring(1,r.hash.length),n))}catch{throw new TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol=="string"&&(e.protocol=ZIe(t.protocol,n)),typeof t.username=="string"&&(e.username=qIe(t.username,n)),typeof t.password=="str
1897ing"&&(e.password=GIe(t.password,n)),typeof t.hostname=="string"&&(e.hostname=WIe(t.hostname,n)),typeof t.port=="string"&&(e.port=KIe(t.port,e.protocol,n)),typeof t.pathname=="string"){if(e.pathname=t.pathname,r&&!VIe(e.pathname,n)){let a=r.pathname.lastIndexOf("/");a>=0&&(e.pathname=yu(r.pathname.substring(0,a+1),n)+e.pathname)}e.pathname=YIe(e.pathname,e.protocol,n)}return typeof t.search=="string"&&(e.search=jIe(t.search,n)),typeof t.hash=="string"&&(e.hash=BIe(t.hash,n)),e}function P0(e){return e.replace(/([+*?:{}()\\])/g,"\\$1")}function aOe(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function sOe(e,t){t.delimiter??(t.delimiter="/#?"),t.prefixes??(t.prefixes="./"),t.sensitive??(t.sensitive=!1),t.strict??(t.strict=!1),t.end??(t.end=!0),t.start??(t.start=!0),t.endsWith="";let n=".*",r=`[^${aOe(t.delimiter)}]+?`,a=/[$_\u200C\u200D\p{ID_Continue}]/u,s="";for(let i=0;i<e.length;++i){let l=e[i];if(l.type===3){if(l.modifier===3){s+=P0(l.value);continue}s+=`{${P0(l.value)}}${Ah(l.modifier)}`;continue}let c=l.hasCustomName(),u=!!l.suffix.length||!!l.prefix.length&&(l.prefix.length!==1||!t.prefixes.includes(l.prefix)),d=i>0?e[i-1]:null,f=i<e.length-1?e[i+1]:null;if(!u&&c&&l.type===1&&l.modifier===3&&f&&!f.prefix.length&&!f.suffix.length)if(f.type===3){let m=f.value.length>0?f.value[0]:"";u=a.test(m)}else u=!f.hasCustomName();if(!u&&!l.prefix.length&&d&&d.type===3){let m=d.value[d.value.length-1];u=t.prefixes.includes(m)}u&&(s+="{"),s+=P0(l.prefix),c&&(s+=`:${l.name}`),l.type===2?s+=`(${l.value})`:l.type===1?c||(s+=`(${r})`):l.type===0&&(!c&&(!d||d.type===3||d.modifier!==3||u||l.prefix!=="")?s+="*":s+=`(${n})`),l.type===1&&c&&l.suffix.length&&a.test(l.suffix[0])&&(s+="\\"),s+=P0(l.suffix),u&&(s+="}"),l.modifier!==3&&(s+=Ah(l.modifier))}return s}var Ac,em,vp,qs,Xl,yp,zH,YZ=(zH=class{constructor(e={},t,n){Zr(this,Ac,void 0);Zr(this,em,{});Zr(this,vp,{});Zr(this,qs,{});Zr(this,Xl,{});Zr(this,yp,!1);try{let r;if(typeof t=="string"?r=t:n=t,typeof e=="string"){let l=new rOe(e);if(l.parse(),e=l.result,r===void 0&&typeof e.protocol!="string")throw new TypeError("A base URL must be provided for a relative constructor string.");e.baseURL=r}else{if(!e||typeof e!="object")throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(r)throw new TypeError("parameter 1 is not of type 'string'.")}typeof n>"u"&&(n={ignoreCase:!1});let a={ignoreCase:n.ignoreCase===!0};Os(this,Ac,m0({pathname:vd,protocol:vd,username:vd,password:vd,hostname:vd,port:vd,search:vd,hash:vd},e,!0)),DZ(Dt(this,Ac).protocol)===Dt(this,Ac).port&&(Dt(this,Ac).port="");let i;for(i of k2){if(!(i in Dt(this,Ac)))continue;let l={},c=Dt(this,Ac)[i];switch(Dt(this,vp)[i]=[],i){case"protocol":Object.assign(l,_d),l.encodePart=cL;break;case"username":Object.assign(l,_d),l.encodePart=XIe;break;case"password":Object.assign(l,_d),l.encodePart=QIe;break;case"hostname":Object.assign(l,zIe),OZ(c)?l.encodePart=$Z:l.encodePart=LZ;break;case"port":Object.assign(l,_d),l.encodePart=FZ;break;case"pathname":PZ(Dt(this,em).protocol)?(Object.assign(l,HIe,a),l.encodePart=JIe):(Object.assign(l,_d,a),l.encodePart=eOe);break;case"search":Object.assign(l,_d,a),l.encodePart=tOe;break;case"hash":Object.assign(l,_d,a),l.encodePart=nOe;break}try{Dt(this,Xl)[i]=TZ(c,l),Dt(this,em)[i]=AZ(Dt(this,Xl)[i],Dt(this,vp)[i],l),Dt(this,qs)[i]=sOe(Dt(this,Xl)[i],l),Os(this,yp,Dt(this,yp)||Dt(this,Xl)[i].some(u=>u.type===2))}catch{throw new TypeError(`invalid ${i} pattern '${Dt(this,Ac)[i]}'.`)}}}catch(r){throw new TypeError(`Failed to construct 'URLPattern': ${r.message}`)}}test(e={},t){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return!1;try{typeof e=="object"?n=m0(n,e,!1):n=m0(n,U6(e,t),!1)}catch{return!1}let r;for(r of k2)if(!Dt(this,em)[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if(typeof e!="string"&&t)throw new TypeError("parameter 1 is not of type 'string'.");if(typeof e>"u")return;try{typeof e=="object"?n=m0(n,e,!1):n=m0(n,U6(e,t),!1)}catch{return null}let r={};t?r.inputs=[e,t]:r.inputs=[e];let a;for(a of k2){let s=Dt(this,em)[a].exec(n[a]);if(!s)return null;let i={};for(let[l,c]of Dt(this,vp)[a].entries())if(typeof c=="string"||typeof c=="number"){let u=s[l+1];i[c]=u}r[a]={input:n[a]??"",groups:i}}return r}static compareComponent(e,t,n){let r=(l,c)=>{for(let u of["type","modifier","prefix","value","suffix"]){if(l[u]<c[u])return-1;if(l[u]!==c[u])return 1}return 0},a=new sv(3,"","","","",3),s=new sv(0,"","","","",3),i=(l,c)=>{let u=0;for(;u<Math.min(l.length,c.length);++u){let d=r(l[u],c[u]);if(d)return d}return l.length===c.length?0:r(l[u]??a,c[u]??a)};return!Dt(t,qs)[e]&&!Dt(n,qs)[e]?0:Dt(t,qs)[e]&&!Dt(n,qs)[e]?i(Dt(t,Xl)[e],[s]):!Dt(t,qs)[e]&&Dt(n,qs)[e]?i([s],Dt(n,Xl)[e]):i(Dt(t,Xl)[e],Dt(n,Xl)[e])}get protocol(){return Dt(this,qs).protocol}get username(){return Dt(this,qs).username}get password(){return Dt(this,qs).password}get hostname(){return Dt(this,qs).hostname}get port(){return Dt(this,qs).port}get pathname(){return Dt(this,qs).pathname}get search(){return Dt(this,qs).search}get hash(){return Dt(this,qs).hash}get hasRegExpGroups(){return Dt(this,yp)}},Ac=new WeakMap,em=new WeakMap,vp=new WeakMap,qs=new WeakMap,Xl=new WeakMap,yp=new WeakMap,zH);globalThis.URLPattern||(globalThis.URLPattern=YZ);const iOe=e=>String(e||"").trim().toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,""),B6=e=>
1897String(e||"").split(/[-_\s]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),oOe=e=>String(e||"").split("/").filter(Boolean),lOe=(e,t)=>e===t||e.startsWith(t.endsWith("/")?t:t+"/"),cOe=e=>{let t;try{t=new URL(e)}catch{return{host:null,domain:null,subdomain:null,pathname:null,hash:null}}const n=tZ(e,{allowPrivateDomains:!0});return{host:(t.hostname||"").toLowerCase()||null,domain:n.domain||null,subdomain:n.subdomain||null,pathname:t.pathname||"/",hash:t.hash||""}},uOe=(e,t)=>{const n=e.productFrom||{};if(n.strategy==="path")return oOe(t.pathname)[n.index||0]||null;if(n.strategy==="subdomain")return(t.subdomain||"").split(".").filter(Boolean)[n.index||0]||null;if(n.strategy==="hashRegex")try{const r=new RegExp(n.regex).exec(t.hash||"");return r&&r[n.group!=null?n.group:1]||null}catch{return null}return null},dOe=(e,t)=>{if(e.domain&&t.domain!==e.domain||e.host&&t.host!==e.host||e.subdomain&&t.subdomain!==e.subdomain||e.pathPrefix&&!lOe(t.pathname,e.pathPrefix))return!1;if(e.pathPattern)try{if(!new YZ({pathname:e.pathPattern}).test({pathname:t.pathname}))return!1}catch{return!1}return!0},fOe=(e,t)=>{if(e.domain&&t.domain!==e.domain||e.host&&t.host!==e.host)return!1;if(e.hostSuffix){const n=t.host||"";if(n!==e.hostSuffix&&!n.endsWith("."+e.hostSuffix))return!1}return!0},mOe=(e,t={version:0,rules:[]})=>{const n=t.version||0,r=cOe(e),a={host:r.host,domain:r.domain,subdomain:r.
1897subdomain,classifier_version:n};if(!r.host)return{...a,provider:null,product:null,label:null};for(const s of t.rules||[]){if(s.kind==="extractor"){if(!fOe(s,r))continue;const i=uOe(s,r);if(!i)return{...a,provider:s.provider,product:null,label:s.providerLabel||B6(s.provider)};const l=iOe(i),c=s.labels&&s.labels[l]||B6(l);return{...a,provider:s.provider,product:l,label:c}}if(dOe(s,r))return{...a,provider:s.provider,product:s.product,label:s.label}}return{...a,provider:r.domain,product:null,label:r.domain}},KZ="internalPlatformRole",ZZ="root",hOe="admin";function pOe(e){return e===ZZ||e===hOe}function uL(e){const t=e==null?void 0:e[KZ];if(typeof t!="string")return!1;const n=t.trim().toLowerCase();return pOe(n)}function gOe(e){return uL(e)}function cZe(e){const t=e==null?void 0:e[KZ];return typeof t!="string"?!1:t.trim().toLowerCase()===ZZ}const vOe=(e,t,n)=>!!e||!!t||!!n,yOe=async(e,t,n)=>{const r=(t==null?void 0:t.uid)||null,a=n.getFlagDoc().then(d=>{var f;return d.exists()&&!!((f=d.data())!=null&&f[e])}).catch(()=>!1),s=r?n.getOverrideDoc(r).then(d=>{var f,m;return d.exists()&&((m=(f=d.data())==null?void 0:f.flags)==null?void 0:m[e])===!0}).catch(()=>!1):Promise.resolve(!1),i=t?t.getIdTokenResult().then(d=>!!n.isStaff(d==null?void 0:d.claims)).catch(()=>!1):Promise.resolve(!1),[l,c,u]=await Promise.all([a,s,i]);return vOe(l,c,u)},bOe=(e,t)=>{let n=!1;const r=t.subscribeAuth(a=>{yOe(e,a,t).then(s=>
1897{n||t.onResult(s)})});return()=>{n=!0,typeof r=="function"&&r()}},nS=e=>{const[t,n]=p.useState(!1);return p.useEffect(()=>{const r=Ts();return bOe(e,{subscribeAuth:a=>fg(Ki,a),getFlagDoc:()=>Ep(xp(r,"General_Settings","feature_flags")),getOverrideDoc:a=>Ep(xp(r,"Feature_Flag_Overrides",a)),isStaff:a=>uL(a),onResult:n})},[e]),t},rS=()=>nS("site_classifier_enabled"),wOe="Canonical seed for the bookmark site-classification registry. Deployed to Firestore at General_Library/site_registry. Rule ORDER matters: the classifier returns the first matching rule, so place more specific rules (host + path) before broader ones (domain-only). Two rule kinds: 'static' (one product) and 'extractor' (product derived from a URL part). See site-classifier.js for matching semantics.",EOe=2,xOe=[{kind:"static",provider:"google",product:"sheets",label:"Google Sheets",domain:"google.com",host:"docs.google.com",pathPrefix:"/spreadsheets"},{kind:"static",provider:"google",product:"docs",label:"Google Docs",domain:"google.com",host:"docs.google.com",pathPrefix:"/document"},{kind:"static",provider:"google",product:"slides",label:"Google Slides",domain:"google.com",host:"docs.google.com",pathPrefix:"/presentation"},{kind:"static",provider:"google",product:"forms",label:"Google Forms",domain:"google.com",host:"docs.google.com",pathPrefix:"/forms"},{kind:"static",provider:"google",product:"forms",label:"Google Forms",domain:"google.com",host:"forms.google.com"},{kind:"static",provider:"google",product:"drive",label:"Google Drive",domain:"google.com",host:"drive.google.com"},{kind:"static",provider:"google",product:"gmail",label:"Gmail",domain:"google.com",host:"mail.google.com"},{kind:"static",provider:"google",product:"calendar",label:"Google Calendar",domain:"google.com",host:"calendar.google.com"},{kind:"static",provider:"google",product:"meet",label:"Google Meet",domain:"google.com",host:"meet.google.com"},{kind:"static",provider:"google",product:"keep",label:"Google Keep",domain:"google.com",host:"keep.google.com"},{kind:"static",provider:"google",product:"chrome-web-store",label:"Chrome Web Store",domain:"google.com",host:"chromewebstore.google.com"},{kind:"static",provider:"google",product:"chrome-web-store",label:"Chrome Web Store",domain:"google.com",host:"chrome.google.com",pathPrefix:"/webstore"},{kind:"extractor",provider:"gcp",providerLabel:"Google Cloud",domain:"google.com",host:"console.cloud.google.com",productFrom:{strategy:"path",index:0},labels:{"iam-admin":"IAM & Admin",bigquery:"BigQuery",sql:"Cloud SQL",run:"Cloud Run",functions:"Cloud Functions",storage:"Cloud Storage",compute:"Compute Engine",kubernetes:"GKE",apis:"APIs & Services"}},{kind:"static",provider:"atlassian",product:"jira",label:"Jira",domain:"atlassian.net",pathPrefix:"/browse"},{kind:"static",provider:"atlassian",product:"jira",label:"Jira",domain:"atlassian.net",pathPrefix:"/jira"},{kind:"static",provider:"atlassian",product:"jira",label:"Jira",domain:"atlassian.net",pathPrefix:"/secure"},{kind:"static",provider:"atlassian",product:"confluence",label:"Confluence",domain:"atlassian.net",pathPrefix:"/wiki"},{kind:"static",provider:"atlassian",product:"confluence",label:"Confluence",domain:"atlassian.net",pathPrefix:"/confluence"},{kind:"static",provider:"atlassian",product:"atlassian",label:"Atlassian",domain:"atlassian.net"},{kind:"static",provider:"atlassian",product:"bitbucket",label:"Bitbucket",domain:"bitbucket.org"},{kind:"static",provider:"atlassian",product:"trello",label:"Trello",domain:"trello.com"},{kind:"static",provider:"microsoft",product:"teams",label:"Microsoft Teams",domain:"microsoft.com",host:"teams.microsoft.com"},{kind:"static",provider:"microsoft",product:"sharepoint",label:"SharePoint",domain:"sharepoint.com"},{kind:"static",provider:"microsoft",product:"outlook",label:"Outlook",domain:"office.com",host:"outlook.office.com"},{kind:"static",provider:"microsoft",product:"outlook",label:"Outlook",domain:"office365.com",host:"outlook.office365.com"},{kind:"static",provider:"microsoft",product:"azure-devops",label:"Azure DevOps",domain:"azure.com",host:"dev.azure.com"},{kind:"static",provider:"microsoft",product:"office",label:"Microsoft 365",domain:"office.com"},{kind:"extractor",provider:"microsoft",providerLabel:"Microsoft 365",domain:"cloud.microsoft",productFrom:{strategy:"subdomain",index:0},labels:{excel:"Microsoft Excel",word:"Microsoft Word",powerpoint:"Microsoft PowerPoint",onenote:"Microsoft OneNote",outlook:"Outlook",onedrive:"OneDrive",team
1897s:"Microsoft Teams",forms:"Microsoft Forms",sway:"Microsoft Sway",visio:"Microsoft Visio",loop:"Microsoft Loop",planner:"Microsoft Planner",todo:"Microsoft To Do",whiteboard:"Microsoft Whiteboard",stream:"Microsoft Stream"}},{kind:"extractor",provider:"azure",providerLabel:"Microsoft Azure",domain:"azure.com",host:"portal.azure.com",productFrom:{strategy:"hashRegex",regex:"Microsoft\\.([A-Za-z0-9]+)",group:1},labels:{compute:"Compute",sql:"SQL",web:"App Service",storage:"Storage",keyvault:"Key Vault",network:"Networking",containerservice:"AKS"}},{kind:"extractor",provider:"aws",providerLabel:"AWS",domain:"amazon.com",hostSuffix:"console.aws.amazon.com",productFrom:{strategy:"path",index:0},labels:{s3:"S3",ec2:"EC2",rds:"RDS",lambda:"Lambda",iam:"IAM",cloudwatch:"CloudWatch",cloudformation:"CloudFormation",ecs:"ECS",eks:"EKS",dynamodb:"DynamoDB",vpc:"VPC",sns:"SNS",sqs:"SQS",route53:"Route 53"}},{kind:"extractor",provider:"zoho",providerLabel:"Zoho",domain:"zoho.com",productFrom:{strategy:"subdomain",index:0},labels:{crm:"Zoho CRM",books:"Zoho Books",desk:"Zoho Desk",mail:"Zoho Mail",people:"Zoho People",projects:"Zoho Projects",analytics:"Zoho Analytics"}},{kind:"static",provider:"github",product:"gist",label:"GitHub Gist",domain:"github.com",host:"gist.github.com"},{kind:"static",provider:"github",product:"github",label:"GitHub",domain:"github.com"},{kind:"static",provider:"gitlab",product:"gitlab",label:"GitLab",domain:"gitlab.com"},{kind:"static",provider:"figma",product:"figma",label:"Figma",domain:"figma.com"},{kind:"static",provider:"notion",product:"notion",label:"Notion",domain:"notion.so"},{kind:"static",provider:"notion",product:"notion",label:"Notion",domain:"notion.site"},{kind:"static",provider:"slack",product:"slack",label:"Slack",domain:"slack.com"},{kind:"static",provider:"linear",product:"linear",label:"Linear",domain:"linear.app"},{kind:"static",provider:"asana",product:"asana",label:"Asana",domain:"asana.com"},{kind:"static",provider:"salesforce",product:"salesforce",label:"Salesforce",domain:"force.com"},{kind:"static",provider:"salesforce",product:"salesforce",label:"Salesforce",domain:"salesforce.com"},{kind:"static",provider:"hubspot",product:"hubspot",label:"HubSpot",domain:"hubspot.com"},{kind:"static",provider:"zoom",product:"zoom",label:"Zoom",domain:"zoom.us"},{kind:"static",provider:"miro",product:"miro",label:"Miro",domain:"miro.com"},{kind:"static",provider:"airtable",product:"airtable",label:"Airtable",domain:"airtable.com"},{kind:"static",provider:"clickup",product:"clickup",label:"ClickUp",domain:"clickup.com"},{kind:"static",provider:"monday",product:"monday",label:"monday.com",domain:"monday.com"},{kind:"static",provider:"dropbox",product:"dropbox",label:"Dropbox",domain:"dropbox.com"},{kind:"static",provider:"loom",product:"loom",label:"Loom",domain:"loom.com"},{kind:"static",provider:"youtube",product:"youtube",label:"YouTube",domain:"youtube.com"}],_Oe={_comment:wOe,version:EOe,rules:xOe},kOe=()=>{const[e,t]=p.useState(_Oe);return p.useEffect(()=>{let n=!1;return Ep(xp(Ts(),"General_Library","site_registry")).then(r=>{if(n)return;const a=r.exists()?r.data():null;a&&Array.isArray(a.rules)&&a.rules.length>0&&t(a)}).catch(()=>{}),()=>{n=!0}},[]),{registry:e}};function SOe(e,t,n){var r,a;typeof e=="function"?(r=t||[],a=n):(r=[],a=t);var s=o.useRef({hasResult:!1,result:a,error:null}),i=o.useReducer(function(u){return u+1},0);i[0];var l=i[1],c=o.useMemo(function(){var u=typeof e=="function"?e():e;if(!u||typeof u.subscribe!="function")throw e===u?new TypeError("Given argument to useObservable() was neither a valid observable nor a function."):new TypeError("Observable factory given to useObservable() did not return a valid observable.");if(!s.current.hasResult&&typeof window<"u"&&(typeof u.hasValue!="function"||u.hasValue()))if(typeof u.getValue=="function")s.current.result=u.getValue(),s.current.hasResult=!0;else{var d=u.subscribe(function(f){s.current.result=f,s.current.hasResult=!0});typeof d=="function"?d():d.unsubscribe()}return u},r);if(o.useDebugValue(s.current.result),o.useEffect(function(){var u=c.subscribe(function(d){var f=s.current;(f.error!==null||f.result!==d)&&(f.error=null,f.result=d,f.hasResult=!0,l())},function(d){var f=s.current;f.error!==d&&(f.error=d,l())});return typeof u=="function"?u:u.unsubscribe.bind(u)},r),s.current.error)throw s.current.error;return s.current.result}function Xo(e,t,n){return SOe(function(){return Cce(e)},t||[],n)}const dL=(e,{sortBy:t="date_modified",sortDesc:n=!0,allWorkspaces:r=!1}={})=>{const a=Xo(async()=>
1897{if(!Qe.base)return;const i=Qe.base["Assets-General-All"];return r?i.toArray():e?i.where("$team_id").equals(e).toArray():[]},[e,r]),s=p.useMemo(()=>{if(!a)return a;const i=[...a],l=n?-1:1;return i.sort((c,u)=>{var g,v;if(t==="name"){const y=(c.name||"").toLowerCase(),b=(u.name||"").toLowerCase();return y.localeCompare(b)*l}if(t==="view_count"){const y=((g=c.view_count)==null?void 0:g.total)||0,b=((v=u.view_count)==null?void 0:v.total)||0;return(y-b)*l}if(t==="is_favorited"){const y=c.is_favorited?1:0,b=u.is_favorited?1:0;return(y-b)*l}let d=c[t],f=u[t];if(t==="date_viewed"){if(d==null&&f==null)return 0;if(d==null)return 1;if(f==null)return-1}return t==="date_modified"&&(d=d||c.date_created,f=f||u.date_created),((d||0)-(f||0))*l}),i},[a,t,n]);return{bookmarks:s,isLoading:s===void 0}},COe=6,j6=e=>String(e||"").replace(/\/+$/,""),NOe=({url:e,teamID:t})=>{const n=rS(),{registry:r}=kOe(),{bookmarks:a}=dL(t||null,{sortBy:"date_modified",sortDesc:!0}),s=p.useMemo(()=>n&&e?mOe(e,r):null,[n,e,r]),i=p.useMemo(()=>{if(!s||!s.provider||!a)return[];const c=j6(e);return a.filter(u=>{var f,m;const d=(f=u.active_iteration)==null?void 0:f.site;return!d||!d.provider||j6((m=u.active_iteration)==null?void 0:m.url)===c?!1:s.product?d.provider===s.provider&&d.product===s.product:d.provider===s.provider})},[s,a,e]);if(!n||!s||!s.provider||i.length===0)return null;const l=i.slice(0,COe);return o.createElement("div",{className:"mb-4 rounded border border-gray-200 dark:border-none p-2 mt-1 dark:mt-2 bg-gray-100 dark:bg-gray-900"},o.createElement("div",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1 max-w-[460px] truncate"},i.length," other ",s.label," bookmark",i.length===1?"":"s"," in this workspace"),o.createElement("ul",{className:"flex flex-col gap-1"},l.map(c=>{var f,m;const u=(f=c.active_iteration)==null?void 0:f.url,d=(m=c.active_iteration)==null?void 0:m.favicon_url;return o.createElement("li",{key:c.$id},o.createElement("button",{type:"button",onClick:()=>u&&window.open(u,"_blank","noopener,noreferrer"),className:"flex items-center gap-2 w-full text-left text-xs text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 bg-transparent border-0 p-0 cursor-pointer truncate",title:u||""},d?o.createElement("img",{src:d,alt:"",className:"w-3.5 h-3.5 rounded-sm object-contain flex-shrink-0"}):o.createElement(Jc,{size:14,className:"text-gray-400 flex-shrink-0"}),o.createElement("span",{className:"truncate"},c.name||u)))})))},ROe=Ir(xr()),ea={ping:e=>{pt(ROe,e)({warmUp:!0}).catch(()=>{})}},TOe=pZ(),nu=({storagePath:e=null,fallback:t=null,...n})=>{var m,h,g,v,y,b;const r=p.useRef(null),[a,s]=p.useState(!1),i=Wn(E=>{var w;return(w=E==null?void 0:E.FB)==null?void 0:w.images}),[l,c]=p.useState(((m=i==null?void 0:i.previouslyLoaded)==null?void 0:m[e])==="NOT_FOUND"?null:((h=i==null?void 0:i.previouslyLoaded)==null?void 0:h[e])||null);p.useEffect(()=>{var w;if((w=i==null?void 0:i.previouslyLoaded)!=null&&w[e]){s(!0);return}const E=new IntersectionObserver(([x])=>{x.isIntersecting&&(s(!0),E.disconnect())},{rootMargin:"100px"});return r.current&&E.observe(r.current),()=>{E&&E.disconnect()}},[e,(g=i==null?void 0:i.previouslyLoaded)==null?void 0:g[e]]);const u=()=>{var w;if(!e)return;if(e.startsWith("data:")||e.startsWith("http")){c(e);return}const E=(w=i==null?void 0:i.previouslyLoaded)==null?void 0:w[e];E!==void 0?c(E==="NOT_FOUND"?null:E):a&&(l||c(null),mZ(hZ(TOe,e)).then(x=>{Zn.dispatch({type:"images/setPreviouslyLoadedImages",data:{storagePath:e,url:x}}),c(x)}).catch(x=>
1897{if(x&&x.code==="storage/object-not-found"){Zn.dispatch({type:"images/setPreviouslyLoadedImages",data:{storagePath:e,url:"NOT_FOUND"}});return}console.error("Firebase Storage image load error",x)}))};p.useEffect(()=>{u()},[e,a]);let d=o.createElement("img",{src:l,loading:"lazy",decoding:"async",...n}),f=t||(((v=i==null?void 0:i.previouslyLoaded)==null?void 0:v[e])==="NOT_FOUND"?o.createElement("div",{className:"flex flex-col items-center justify-center w-full h-full bg-gray-50 dark:bg-[#1a1425] rounded-sm border border-dashed border-gray-200 dark:border-gray-800"},o.createElement(Ft,{icon:"image-rotate",size:20,className:"opacity-20 mb-2 dark:text-white"}),o.createElement("span",{className:"text-[10px] text-gray-400 dark:text-gray-600 font-medium uppercase tracking-wider"},"Snapshot Unavailable")):o.createElement("div",{className:"flex items-center justify-center w-full h-full animate-pulse bg-gray-50 dark:bg-[#1a1425] rounded-sm"},o.createElement("span",{className:"text-[10px] text-gray-400 dark:text-gray-600 font-medium uppercase tracking-wider"},"Loading...")));return o.createElement("div",{ref:r,style:{width:((y=n.style)==null?void 0:y.width)||"100%",height:((b=n.style)==null?void 0:b.height)||"100%"}},l?d:f)};function Rm(){if(typeof window>"u")return!1;if(typeof document<"u"&&document.body.classList.contains("tauri-menubar"))return!0;const e=new URLSearchParams(window.location.search),t="__TAURI_INTERNALS__"in window||"__TAURI__"in window;return e.get("tauri-menubar")==="true"||t&&window.__TAURI_WINDOW_TYPE__!=="app"}const S2=Ir(xr());const lh="bookmark",C1="default",ua={AddAsset:{name:()=>"Add Bookmark",subname:()=>"",actionType:"add",activeFields:{asset:!0,iteration:!0,collection:!0,tags:!0,notifications:!0},FBF_api:{target:Ze("users-asset-manage-add"),submitItem:(e,t={})=>{var a,s,i,l;let n={asset:{id_team:e.asset.id_team,id_project:e.asset.id_project,id_collection:null,id_tags:[],ids_notifications_team_members:(c=>{let u=[];for(var d=0;d<(c==null?void 0:c.length);d++)u.push({id:c[d].value,is_enabled:!0});return u})((a=e.asset)==null?void 0:a.$notificationTeamMembers),property_name:e.asset.property_name,property_description:e.asset.property_description,property_type:e.asset.property_type,$new_tags:[]},iteration:{property_url:Vc.adjust(e.iteration.property_url,(s=t==null?void 0:t.statusIterationURL)==null?void 0:s.modificationList),property_url_original:e.iteration.property_url,property_display_format:e.iteration.property_display_format,property_change_notes:e.iteration.property_change_notes,property_screenshot_strategy:e.iteration.property_screenshot_strategy,property_auto_preview_thumbnail:e.iteration.property_screenshot_strategy==="custom"||t.initialIterationURL&&t.initialIterationURL===e.iteration.property_url?e.iteration.property_auto_preview_thumbnail:null},source:t.isPopupWebMode?"extension":"webapp",collection:{property_name:null},client_request_id:t.client_request_id||null};e.asset.id_collection==="$createNew"?n.collection.property_name=e.collection.property_name:e.asset.id_collection&&(n.asset.id_collection=e.asset.id_collection);for(var r=0;r<((l=(i=e.asset)==null?void 0:i.$tags)==null?void 0:l.length);r++)e.asset.$tags[r].__isNew__?n.asset.$new_tags.push({name:e.asset.$tags[r].value}):n.asset.id_tags.push(e.asset.$tags[r].value);return n}},alert:{success:({assetName:e})=>`Added "${e.new}".`},extension:{enableAutoURL:!0,enableAutoTitle:!0,enableAutoPreviewThumbnail:!0}},AddIteration:{name:()=>"Add Version",subname:e=>{var t;return`${(t=e.asset)==null?void 0:t.name}`},actionType:"add",activeFields:{iteration:!0,notifications:!0},FBF_api:{target:Ze("users-asset-iteration-add"),submitItem:(e,t={})=>{var n,r;return{asset:{ids_notifications_team_members:(a=>{var c,u;let s=[];for(var i=0;i<(a==null?void 0:a.length);i++)s.push({id:a[i].value,is_enabled:!0});for(var l=0;l<((u=(c=t.metaData.targetAsset)==null?void 0:c.notified_members)==null?void 0:u.length);l++)ta.find(a,f=>f.value===t.metaData.targetAsset.notified_members[l])||s.push({id:t.metaData.targetAsset.notified_members[l],is_enabled:!1});return s})((n=e.asset)==null?void 0:n.$notificationTeamMembers)},iteration:{id_asset:e.iteration.id_asset,property_url:Vc.adjust(e.iteration.property_url,(r=t==null?void 0:t.statusIterationURL)==null?void 0:r.modificationList),property_url_original:e.iteration.property_url,property_display_format:e.iteration.property_display_format,property_change_notes:e.iteration.property_change_notes,property_screenshot_strategy:e.iteration.property_screenshot_strategy,property_auto_preview_thumbnail:e.iteration.property_screenshot_strategy==="custom"||t.initialIterationURL&&t.initialIterationURL===e.iteration.property_url?e.iteration.property_auto_preview_thumbnail:null},source:t.isPopupWebMode?"extension":"webapp",client_request_id:t.client_request_id||null}}},alert:{success:({assetName:e})=>`Added a version to "${e.old}".`},extension:{enableAutoURL:!0,enableAutoPreviewThumbnail:!0}},AddCollection:{name:()=>"Add Collection",subname:()=>"",actionType:"add",activeFields:{asset:!0}
1897,FBF_api:{target:Ze("users-collection-manage-add"),submitItem:(e,t={})=>({collection:{id_team:e.asset.id_team,id_project:e.asset.id_project,id_collection:e.asset.id_collection,property_name:e.asset.property_name,property_description:e.asset.property_description},client_request_id:t.client_request_id||null})},alert:{success:({assetName:e})=>`Added "${e.new}" collection.`}},AddTag:{name:()=>"Add Tag",subname:()=>"",actionType:"add",activeFields:{asset:!0},FBF_api:{target:Ze("users-tag-manage-add"),submitItem:(e,t={})=>({tag:{id_team:e.asset.id_team,property_name:e.asset.property_name,property_description:e.asset.property_description},client_request_id:t.client_request_id||null})},alert:{success:({assetName:e})=>`Added "${e.new}" tag.`}},EditAsset:{name:()=>"Edit Bookmark",subname:()=>"",actionType:"edit",activeFields:{asset:!0,iteration:!0,collection:!0,tags:!0},FBF_api:{target:Ze("users-asset-manage-edit"),submitItem:(e,t={})=>{var a,s,i;let n={asset:{$id:e.asset.$id,id_project:e.asset.id_project,id_collection:null,id_tags:[],property_name:e.asset.property_name,property_description:e.asset.property_description,property_type:e.asset.property_type,$new_tags:[]},iteration:{$id:e.iteration.$id,id_asset:e.iteration.id_asset,property_url:Vc.adjust(e.iteration.property_url,(a=t==null?void 0:t.statusIterationURL)==null?void 0:a.modificationList),property_url_original:e.iteration.property_url,property_display_format:e.iteration.property_display_format,property_change_notes:e.iteration.property_change_notes,property_screenshot_strategy:e.iteration.property_screenshot_strategy,property_auto_preview_thumbnail:e.iteration.property_auto_preview_thumbnail},silent_log:!1,collection:{property_name:null},client_request_id:t.client_request_id||null};e.asset.id_collection==="$createNew"?n.collection.property_name=e.collection.property_name:e.asset.id_collection&&(n.asset.id_collection=e.asset.id_collection);for(var r=0;r<((i=(s=e.asset)==null?void 0:s.$tags)==null?void 0:i.length);r++)e.asset.$tags[r].__isNew__?n.asset.$new_tags.push({name:e.asset.$tags[r].value}):n.asset.id_tags.push(e.asset.$tags[r].value);return n}},alert:{success:({assetName:e})=>`Updated "${e.old}"${e.old!==e.new?` (now known as "${e.new}")`:""}!`}},EditCollection:{name:()=>"Edit Collection",subname:()=>"",actionType:"edit",activeFields:{asset:!0},FBF_api:{target:Ze("users-collection-manage-edit"),submitItem:(e,t={})=>({collection:{$id:e.asset.$id,id_project:e.asset.id_project,id_collection:e.asset.id_collection,property_name:e.asset.property_name,property_description:e.asset.property_description},client_request_id:t.client_request_id||null})},alert:{success:({assetName:e})=>`Updated collection "${e.old}"${e.old!==e.new?` (now known as "${e.new}")`:""}!`}},EditIteration:{name:()=>"Edit Version",subname:e=>{var t;return`${(t=e.asset)==null?void 0:t.name}`},actionType:"edit",activeFields:{iteration:!0},FBF_api:{target:Ze("users-asset-iteration-edit"),submitItem:(e,t={})=>{var n;return{iteration:{$id:e.iteration.$id,id_asset:e.iteration.id_asset,property_url:Vc.adjust(e.iteration.property_url,(n=t==null?void 0:t.statusIterationURL)==null?void 0:n.modificationList),property_url_original:e.iteration.property_url,property_display_format:e.iteration.property_display_format,property_change_notes:e.iteration.property_change_notes,property_screenshot_strategy:e.iteration.property_screenshot_strategy,property_auto_preview_thumbnail:e.iteration.property_auto_preview_thumbnail},client_request_id:t.client_request_id||null}}},alert:{success:({assetName:e})=>`Updated an iteration for ${e.old}.`}},EditTag:{name:()=>"Edit Tag",subname:()=>"",actionType:"edit",activeFields:{asset:!0},FBF_api:{target:Ze("users-tag-manage-edit"),submitItem:(e,t={})=>({tag:{$id:e.asset.$id,property_name:e.asset.property_name,property_description:e.asset.property_description},client_request_id:t.client_request_id||null})},alert:{success:({assetName:e})=>`Updated tag "${e.old}"${e.old!==e.new?` (now known as "${e.new}")`:""}!`}}},XZ=({targetAsset:e,targetIteration:t,targetType:n,targetRestoreState:r,teamID:a,isDrawerOpen:s,forceRefresh:i=0,handleSuccessfulSave:l=ta.noop,handleCloseDrawer:c=ta.noop})=>{var rr,ir,Tn,Ct,_r,Qn,Ce,ut,pn,Jt,In,Dn,or,Zt,tr,Fe,st,gt,ht,Ee,We,it,_t,vn,An,je,kt,Lt,ne,Be,mt,we,vt,It,f
1897n,Ne,lt,wt,Ke,St,ln,vr,Yn,Cn,Hn,Re,ot,jt,En,ar,ye,qe,Me,Ve,Je,bt;yr();const[u,d]=p.useState(""),[f,m]=p.useState("");p.useState("AddAsset");const h=Rm(),g=h,[v,y]=p.useState(()=>typeof window<"u"&&window.matchMedia("(max-width: 767px)").matches);p.useEffect(()=>{const $e=window.matchMedia("(max-width: 767px)"),dt=()=>y($e.matches);return $e.addEventListener("change",dt),()=>$e.removeEventListener("change",dt)},[]);const[b,E]=p.useState(""),[w,x]=p.useState(""),[S,N]=p.useState(null),[k,C]=p.useState("auto"),[A,O]=p.useState(!1),[T,M]=p.useState(null),[L,D]=p.useState(null),j=$e=>{if(!$e)return;if($e.size>5*1024*1024){alert("File size must be less than 5MB");return}const dt=new FileReader;dt.onloadend=()=>{M(dt.result),D(dt.result)},dt.readAsDataURL($e)},H=async $e=>{const dt=$e.target.files[0];M(dt),O(!1),j(dt)};p.useEffect(()=>{const $e=dt=>{if(k!=="custom")return;const Rt=(dt.clipboardData||dt.originalEvent.clipboardData).items;for(const Vt of Rt)if(Vt.kind==="file"&&Vt.type.indexOf("image/")!==-1){const Wt=Vt.getAsFile();j(Wt),dt.preventDefault();break}};return document.addEventListener("paste",$e),()=>{document.removeEventListener("paste",$e)}},[k]);const[Y,z]=p.useState(""),[K,ee]=p.useState(navigator.onLine);p.useEffect(()=>{const $e=()=>ee(!0),dt=()=>ee(!1);return window.addEventListener("online",$e),window.addEventListener("offline",dt),()=>{window.removeEventListener("online",$e),window.removeEventListener("offline",dt)}},[]);const[oe,J]=p.useState(lh),[se,B]=p.useState(C1),[U,$]=p.useState(""),[ce,be]=p.useState(""),[ue,Ie]=p.useState([]),[Ae,he]=p.useState([]),[_e,ie]=p.useState(null),[Ue,ae]=p.useState([]),[pe,W]=p.useState([]),[q,te]=p.useState([]),[X,le]=p.useState({subscription:{}}),[me,fe]=p.useState(null),[ke,Se]=p.useState(!1),[Et,nt]=p.useState(!1),[Pt,en]=p.useState(!1),[hn,rt]=p.useState(!1),et=Wn($e=>{var dt;return(dt=$e==null?void 0:$e.FB)==null?void 0:dt.auth}),Kt=()=>{d(""),E(""),x(""),N(null),z(""),J(lh),B(C1),$(""),Ie([]),he([]),be(""),C("auto"),M(null),D(null),O(!1),fe(null),Se(!1),nt(!1),en(!1),rt(!1)},zn=({teamID:$e})=>{var Rt,Vt;const dt=typeof $e=="object"&&($e!=null&&$e.id)?$e.id:$e;if(!dt||typeof dt!="string"){console.warn("SidePanel: Invalid Team ID for stats retrieval",$e);return}nt(!0),pt(S2,Ze("users-collection-view-optionsList"))({teamID:dt}).then(({data:Wt})=>{ae(Wt.output.collections),nt(!1)}).catch(Wt=>{console.error("errorItem",Wt),re.dispatch("trigger-alert",{message:Wt.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),nt(!1)}),en(!0),pt(S2,Ze("users-tag-view-optionsList"))({teamID:dt}).then(({data:Wt})=>{let On=[];for(var Nn=0;Nn<Wt.output.tags.length;Nn++)On.push({label:Wt.output.tags[Nn].name,value:Wt.output.tags[Nn].$id});W(On),en(!1)}).catch(Wt=>{console.error("errorItem",Wt),re.dispatch("trigger-alert",{message:Wt.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),en(!1)}),(Vt=(Rt=ua[n])==null?void 0:Rt.activeFields)!=null&&Vt.notifications&&(rt(!0),pt(S2,Ze("users-team-view-manage"))({teamID:dt}).then(({data:Wt})=>{let On=[];for(var Nn=0;Nn<Wt.output.members.length;Nn++)On.push({label:`${Wt.output.members[Nn].name_first} ${Wt.output.members[Nn].name_last}`,value:Wt.output.members[Nn].memberID});if(te(On),e!=null&&e.notified_members){let br=[];for(var tn=0;tn<e.notified_members.length;tn++){let ca=ta.find(On,sa=>
1897sa.value===e.notified_members[tn]);ca&&br.push({label:ca.label,value:ca.value})}he(br)}rt(!1)}).catch(Wt=>{console.error("errorItem",Wt),re.dispatch("trigger-alert",{message:Wt.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),rt(!1)}))},xt=({teamID:$e})=>{var On,Nn,tn,br,ca,sa,Gn,wr,Er,Nr,Wr,Ca,Pr;let dt={collection:!1,notification:!1},Rt=ta.find(((On=et==null?void 0:et.globalMeta)==null?void 0:On.teams)||[],ge=>ge.id===$e),Vt=ta.find((Nn=et==null?void 0:et.globalMeta)==null?void 0:Nn.organizations,ge=>{var at;return ge.id===((at=Rt==null?void 0:Rt.organization)==null?void 0:at.$id)});dt.collection=((tn=Vt==null?void 0:Vt.subscription)==null?void 0:tn.active)&&((sa=(ca=Tr.organization.subscription.plan[(br=Vt==null?void 0:Vt.subscription)==null?void 0:br.plan])==null?void 0:ca.has)==null?void 0:sa.collections)||!((Gn=Vt==null?void 0:Vt.subscription)!=null&&Gn.active)&&Tr.organization.subscription.plan.free.has.collections||!1,dt.notification=((wr=Vt==null?void 0:Vt.subscription)==null?void 0:wr.active)&&((Wr=(Nr=Tr.organization.subscription.plan[(Er=Vt==null?void 0:Vt.subscription)==null?void 0:Er.plan])==null?void 0:Nr.has)==null?void 0:Wr.notifications)||!1;let Wt={team:Rt,organization:Vt,subscription:dt,userHasMoreThanOneTeam:((Pr=(Ca=et==null?void 0:et.globalMeta)==null?void 0:Ca.teams)==null?void 0:Pr.length)>1};le(Wt)};return p.useEffect(()=>{var $e,dt,Rt,Vt,Wt,On,Nn,tn,br,ca,sa,Gn,wr,Er,Ca,Pr,ge;if(r)d(r.assetName??""),m(r.assetTeamID??""),E(r.iterationURL??""),x(r.iterationURL_initial??""),z(r.iterationChangeNotes??""),J(r.assetType??lh),B(r.iterationDisplayFormat??C1),$(r.associatedCollectionID??""),be(r.newCollectionName??""),Ie(r.checkedTagIDs??[]),he(r.checkedNotificationTeamMemberIDs??[]),ie(r.autoPreviewThumbnail??null),C(r.screenshotStrategy??"auto"),M(r.customScreenshotFile??null),D(r.customScreenshotPreview??null);else if(e&&ua[n].actionType==="edit")if(d((e==null?void 0:e.name)??""),J((e==null?void 0:e.type)??lh),B((($e=e==null?void 0:e.active_iteration)==null?void 0:$e.display_format)??C1),$((e==null?void 0:e.$collection_id)??""),Ie((()=>{var cn;let at=[];for(var zt=0;zt<((cn=e==null?void 0:e.tags)==null?void 0:cn.length);zt++)at.push({label:e.tags[zt].name,value:e.tags[zt].$id});return at})()),t){E((t==null?void 0:t.url)??""),x((t==null?void 0:t.url)??""),z((t==null?void 0:t.change_notes)??"");const at=t==null?void 0:t.screenshot_strategy,zt=t==null?void 0:t.auto_preview_thumbnail;at==="custom"||!at&&zt?(C("custom"),zt&&(D(zt),O(!0),zt.startsWith("gs://")||fetch(zt).then(cn=>cn.blob()).then(cn=>{M(cn)}).catch(cn=>{console.error("Failed to fetch existing screenshot",cn)}))):C((t==null?void 0:t.screenshot_strategy)??"auto")}else{E(((dt=e==null?void 0:e.active_iteration)==null?void 0:dt.url)??""),x(((Rt=e==null?void 0:e.active_iteration)==null?void 0:Rt.url)??""),z(((Vt=e==null?void 0:e.active_iteration)==null?void 0:Vt.change_notes)??"");const at=(Wt=e==null?void 0:e.active_iteration)==null?void 0:Wt.screenshot_strategy,zt=(On=e==null?void 0:e.active_iteration)==null?void 0:On.auto_preview_thumbnail;at==="custom"||!at&&zt?(C("custom"),zt&&(D(zt),O(!0),zt.startsWith("gs://")||fetch(zt).then(cn=>cn.blob()).then(cn=>{M(cn)}).catch(cn=>{console.error("Failed to fetch existing screenshot",cn)}))):C(((Nn=e==null?void 0:e.active_iteration)==null?void 0:Nn.screenshot_strategy)??"auto")}else if(ua[n].actionType==="add"){if(Kt(),n==="AddIteration"&&e){d(e.name||""),J(e.type||lh),J(e.type||lh);const at=(tn=e.active_iteration)==null?void 0:tn.screenshot_strategy,zt=(br=e.active_iteration)==null?void 0:br.auto_preview_thumbnail;(at==="custom"||!at&&zt)&&(C("custom"),zt&&(D(zt),O(!0),zt.startsWith("gs://")||fetch(zt).then(cn=>cn.blob()).then(cn=>{M(cn)}).catch(cn=>{console.error("Failed to fetch existing screenshot",cn)})))}(ca=ua[n].extension)!=null&&ca.enableAutoTitle,(sa=ua[n].extension)!=null&&sa.enableAutoURL,(wr=(Gn=ua[n])==null?void 0:Gn.FBF_api)!=null&&wr.target&&(ea.ping(ua[n].FBF_api.target),ea.ping(Ze("users-collection-view-optionsList")),ea.ping(Ze("users-tag-view-optionsList")),ea.ping(Ze("users-info-teams-list"))),(Er=ua[n].extension)!=null&&Er.enableAutoPreviewThumbnail}m((e==null?void 0:e.$team_id)||a||((ge=(Pr=(Ca=et==null?void 0:et.globalMeta)==null?void 0:Ca.teams)==null?void 0:Pr[0])==null?void 0:ge.id)||""),fe(null),r||be("")},[a,e,t,r,s,(rr=et==null?void 0:et.globalMeta)==null?void 0:rr.teams]),p.useEffect(()=>{if(s&&n==="AddAsset"){const $e=window.__sidePanelTriggerSource||(g?"popup":null);($e==="tray"||$e==="popup")&&(async()=>{try{let Rt="";if("__TAURI_INTERNALS__"in window||"__TAURI__"in window){const{readText:Wt}=await yn(()=>function(){return(Nn=>import(Nn))("./index.12a6c0d9.js")}(),[]);Rt=await Wt()}else navigator.clipboard&&navigator.clipboard.readText&&(Rt=await navigator.clipboard.readText());Rt&&zI.isURL(Rt.trim(),{require_protocol:!0})&&E(Rt.trim())}catch(Rt){console.warn("Failed to read clipboard for auto-paste",Rt)}})()}},[s,n,g]),p.useEffect(()=>{var dt,Rt,Vt,Wt;let $e=f||a||null;ae([]),s&&$e&&((Rt=(dt=ua[n])==null?void 0:dt.activeFields)!=null&&Rt.collection||(Wt=(Vt=ua[n])==null?void 0:Vt.activeFields)!=null&&Wt.notifications)&&zn({teamID:$e}),xt({teamID:$e})},[f,et==null?void 0:et.globalMeta,i]),p.useEffect(()=>{N(Vc.full_process(b,{view:"sidepanel",iterationDisplayFormat:se}))},[b,se]),p.useEffect(()=>{var Rt,Vt,Wt;let $e=f||a||null,dt=()=>{zI.isURL(b,{require_protocol:!0})?fe(null):fe("invalid-url")};b?((Rt=ua[n])==null?void 0:Rt.actionType)==="add"&&((Wt=(Vt=ua[n])==null?void 0:Vt.activeFields)!=null&&Wt.iteration)?ec.searchAllAssetsForE
1897xistingURL({teamID:$e,targetURL:b}).then(({foundMatchingURL:On})=>{On?fe("repeated-url"):dt()}):dt():fe(null)},[n,f,a,b,i]),o.createElement(Bp,{usePortal:!g,className:"asset-drawer-container",portalClassName:"asset-drawer",isOpen:s,onClose:()=>{c({targetAsset:e,targetIteration:t,targetType:n,teamID:f})},canOutsideClickClose:!1,autoFocus:!0,hasBackdrop:!0},o.createElement("nav",{className:"asset-drawer-navbar flex justify-between"},o.createElement("div",{className:"bp6-navbar-group bp6-align-left"},o.createElement("div",{className:"bp6-navbar-heading dark__text whitespace-nowrap"},(ir=ua[n])==null?void 0:ir.name())),o.createElement("div",{className:"bp6-navbar-group bp6-align-right"},o.createElement("button",{onClick:async()=>{var Wr,Ca,Pr,ge,at,zt,cn,Mt,kr,Dr,es,cl,ko,Ti,So,Co,Bl,Ai,Ba,Is,js,ui,no;if(ke)return;Se(!0),Jn.analyticsTrack({userId:(Wr=et==null?void 0:et.user)==null?void 0:Wr.uid,event:"Sidepanel - Save - Click",codeName:"user-ui-sidepanel-action-button-save-click"});const $e=((Ca=ua[n])==null?void 0:Ca.actionType)||"add";let dt=[...ue];const Rt=dt.some(mr=>mr.__isNew__);let Vt=U;if(U==="$createNew")try{const{getFunctions:mr,httpsCallable:ja,connectFunctionsEmulator:_c}=await yn(()=>function(){return(Sn=>import(Sn))("./index.esm.52e5c072.js")}(),[]),{getApp:No}=await yn(()=>function(){return(Sn=>import(Sn))("./brand.924cec70.js")}().then(nn=>nn.a8),[]),{$FF_trigger:Ro}=await yn(()=>function(){return(Sn=>import(Sn))("./brand.924cec70.js")}().then(nn=>nn.a9),[]),Le=mr(No()),mn=await ja(Le,Ro("users-collection-manage-add"))({collection:{property_name:ce.trim(),id_team:f},client_request_id:`req-coll-${$f()}`});(ge=(Pr=mn.data)==null?void 0:Pr.output)!=null&&ge.collectionID&&(Vt=mn.data.output.collectionID)}catch(mr){console.error("Failed to pre-create collection",mr)}if(Rt)try{const{getFunctions:mr,httpsCallable:ja,connectFunctionsEmulator:_c}=await yn(()=>function(){return(nn=>import(nn))("./index.esm.52e5c072.js")}(),[]),{getApp:No}=await yn(()=>function(){return(nn=>import(nn))("./brand.924cec70.js")}().then(mn=>mn.a8),[]),{$FF_trigger:Ro}=await yn(()=>function(){return(nn=>import(nn))("./brand.924cec70.js")}().then(mn=>mn.a9),[]),Le=mr(No()),$t=ja(Le,Ro("users-tag-manage-add"));for(let mn=0;mn<dt.length;mn++){const nn=dt[mn];if(nn.__isNew__){nn.label;try{const Sn=await $t({tag:{property_name:nn.label,id_team:f},client_request_id:`req-tag-${$f()}`}),Lr=((zt=(at=Sn.data)==null?void 0:at.output)==null?void 0:zt.tagID)||((kr=(Mt=(cn=Sn.data)==null?void 0:cn.output)==null?void 0:Mt.tag)==null?void 0:kr.$id)||((cl=(es=(Dr=Sn.data)==null?void 0:Dr.output)==null?void 0:es.tag)==null?void 0:cl.id);Lr&&(dt[mn]={...nn,value:Lr,__isNew__:!1},Qe.action.set({tableID:"Tags",dataList:[{$id:Lr,id:Lr,name:nn.label,teamID:f,count:1,$optimistic:!1}],options:{skipClear:!0}}))}catch(Sn){console.error("Failed to pre-create tag",nn.label,Sn)}}}}catch(mr){console.error("Failed to pre-create tags",mr)}const Wt=$e==="edit"||n==="AddIteration";let On,Nn,tn=null;const br=Ue.find(mr=>mr.$id===Vt),ca=Vt==="$createNew",sa=ca?ce:(br==null?void 0:br.name)||"",Gn=ca?`temp-coll-${$f()}`:Vt,wr=`req-${$f()}`;Wt?(On=e.$id,tn=e,Nn={...e,$client_request_id:wr,...e.$localDB?{$localDB:e.$localDB}:{},name:u,type:oe,$team_id:f,active_iteration:{...e.active_iteration,url:Vc.adjust(b,S==null?void 0:S.modificationList),favicon_url:b!==((ko=e.active_iteration)==null?void 0:ko.url)?`https://www.google.com/s2/favicons?domain=${b}`:(Ti=e.active_iteration)==null?void 0:Ti.favicon_url,...k==="custom"&&L?{auto_preview_thumbnail:L}:k==="auto"&&_e?{auto_preview_thumbnail:_e}:{}},$optimistic:!0,...n==="AddIteration"?{iteration_count:(e.iteration_count||0)+1}:{},tags:dt.map(mr=>({$id:mr.value,name:mr.label})),$collection_id:Gn||null,collection_name:sa||null,date_modified:Math.floor(Date.now()/1e3)}):(On=`temp-${$f()}`,Nn={$id:On,$client_request_id:wr,name:u,type:oe,$team_id:f,active_iteration:{url:Vc.adjust(b,S==null?void 0:S.modificationList),favicon_url:`https://www.google.com/s2/favicons?domain=${b}`,auto_preview_thumbnail:_e||null},$localDB:{$index:-1},$optimistic:!0,from_member:{created:{name:"You"},modified:{name:"You"}},tags:dt.map(mr=>({$id:mr.value,name:mr.label})),$collection_id:Gn||null,collection_name:sa||null,iteration_count:1,date_created:Math.floor(Date.now()/1e3),date_modified:Math.floor(Date.now()/1e3)}),await Qe.action.set({tableID:"Assets-General-All",dataList:[Nn],options:{includeIndex:!1,skipClear:!0,preserveLocalDB:!0}}),l({actionType:Wt?"edit":"add",asset:Nn}),U==="$createNew"&&Qe.action.set({tableID:"Collections",dataList:[{$id:Gn,id:Gn,name:ce,teamID:f,count:1,$optimistic:!0}],options:{skipClear:!0}}),n==="AddIteration"||((Co=(So=ua[n])==null?void 0:So.FBF_api)==null?void 0:Co.target)===Ze("users-asset-iteration-add")||Wt&&tn&&(tn.name!==u&&tn.name,(Bl=tn.active_iteration)==null||Bl.url),c({targetAsset:e,targetIteration:t,targetType:n,teamID:f}),re.dispatch("trigger-alert",{message:(Ba=(Ai=ua[n])==null?void 0:Ai.alert)==null?void 0:Ba.success({assetName:{old:e==null?void 0:e.name,new:u}}),intent:"success"}),Kt();let Er=(js=(Is=ua[n])==null?void 0:Is.FBF_api)==null?void 0:js.submitItem({asset:{$id:e==null?void 0:e.$i
1897d,id_team:f,id_project:null,id_collection:Vt==="$createNew"?null:Vt,$tags:(()=>{let mr=[];for(var ja=0;ja<dt.length;ja++)mr.push(dt[ja]);return mr})(),$notificationTeamMembers:(()=>{let mr=[];for(var ja=0;ja<Ae.length;ja++)mr.push(Ae[ja]);return mr})(),property_name:u,property_description:"",property_type:oe},iteration:{$id:t==null?void 0:t.$id,id_asset:e==null?void 0:e.$id,property_url:b,property_change_notes:Y,property_auto_preview_thumbnail:k==="custom"?T||(A?L:null):_e,property_display_format:se,property_screenshot_strategy:k},collection:{property_name:ce,id_team:f}},{initialIterationURL:w,statusIterationURL:S,isPopupWebMode:g,metaData:{targetAsset:e},client_request_id:wr});const Nr={url:(no=(ui=ua[n])==null?void 0:ui.FBF_api)==null?void 0:no.target,data:Er,optimisticData:{tempID:On,asset:Nn,originalAsset:tn,actionType:$e},success:async mr=>{var No,Ro,Le,$t,mn;let ja={},_c=!1;if((Ro=(No=mr==null?void 0:mr.data)==null?void 0:No.collection)!=null&&Ro.$id){const nn=mr.data.collection.$id,Sn=mr.data.collection.property_name||mr.data.collection.name;await Qe.action.set({tableID:"Collections",dataList:[{$id:nn,id:nn,name:Sn,teamID:(e==null?void 0:e.$team_id)||f,count:1,$optimistic:!1}],options:{skipClear:!0}}),$(nn),ja.$collection_id=nn,ja.id_collection=nn,ja.collection_name=Sn,_c=!0}if((Le=mr==null?void 0:mr.data)!=null&&Le.tags||(mn=($t=mr==null?void 0:mr.data)==null?void 0:$t.asset)!=null&&mn.tags){const nn=mr.data.tags||mr.data.asset.tags||[];let Sn=!1;const Lr=(Nn.tags||[]).map(hr=>{const Bn=nn.find(Vr=>Vr.name===hr.name);return Bn&&Bn.$id!==hr.$id?(Sn=!0,Qe.action.delete({tableID:"Tags",id:hr.$id}),Qe.action.set({tableID:"Tags",dataList:[{$id:Bn.$id,id:Bn.$id,name:Bn.name,teamID:(e==null?void 0:e.$team_id)||f,count:1,$optimistic:!1}],options:{skipClear:!0}}),{$id:Bn.$id,name:Bn.name}):hr});Sn&&(ja.tags=Lr,_c=!0)}if(_c){const nn={...Nn,...ja};try{await Qe.action.set({tableID:"Assets-General-All",dataList:[nn],options:{includeIndex:!1,skipClear:!0,preserveLocalDB:!0}})}catch(Sn){console.error("Failed to update optimistic asset in DB",Sn)}}re.dispatch("REFRESH_ASSETS_LIST",{callback:()=>{}}),e!=null&&e.$team_id},error:mr=>{console.error("Background save failed",JSON.stringify(mr,null,2))}};re.dispatch("asset-content-processing-queue",{request:Nr,contingency:{restore:{external:{targetAsset:e,targetIteration:t,targetType:n,teamID:a},internal:{assetName:u,assetType:oe,iterationURL:b,iterationURL_initial:w,iterationDisplayFormat:se,iterationChangeNotes:Y,associatedCollectionID:U,checkedTagIDs:ue,checkedNotificationTeamMemberIDs:Ae,newCollectionName:ce,assetTeamID:f,autoPreviewThumbnail:_e}}}})},disabled:ke||!K||((Ct=(Tn=ua[n])==null?void 0:Tn.activeFields)==null?void 0:Ct.asset)&&!u||((Qn=(_r=ua[n])==null?void 0:_r.activeFields)==null?void 0:Qn.iteration)&&!b||me||k==="custom"&&!T&&!A,className:"bp6-button bp6-intent-primary bp6-minimal font-bold max-w-60 sm:max-w-[600px] dark__text"},o.createElement("span",{className:"w-full truncate"},ke?"Saving...":K?((Ce=ua[n])==null?void 0:Ce.actionType)==="add"?h||v?"Save":(pn=(ut=ua[n])==null?void 0:ut.activeFields)!=null&&pn.asset&&((Jt=X==null?void 0:X.team)!=null&&Jt.id)&&(X!=null&&X.userHasMoreThanOneTeam)?`Add to "${(In=X==null?void 0:X.team)==null?void 0:In.name}"`:"Add":"Save":"Offline")),o.createElement("button",{onClick:()=>{c({targetAsset:e,targetIteration:t,targetType:n,teamID:f}),Kt()},className:"bp6-button bp6-intent-primary bp6-minimal"},o.createElement(Ft,{icon:o.createElement(wm,{size:16})})))),ke?o.createElement(du,null):o.createElement("div",{className:`${GE} asset-drawer-body h-full overflow-y-auto pb-96 sm:pb-0`},o.createElement("div",{className:"asset-drawer-acol"},(Dn=ua[n])!=null&&Dn.subname({asset:e})?o.createElement("div",{className:"flex gap-2 mb-4 items-center justify-between dark__text"},o.createElement("span",null,o.createElement("span",{className:"xs:max-w-[300px] md:max-w-[500px] lg:max-w-[700px] inline-flex text-ellipsis overflow-hidden whitespace-nowrap"},ua[n].subname({asset:e})),["dev","qa"].includes("production")&&((or=e==null?void 0:e.active_iteration)!=null&&or.favicon_type)?o.createElement("span",{className:"ml-2"},"[",(Zt=e==null?void 0:e.active_iteration)==null?void 0:Zt.favicon_type,"]"):null),(tr=e==null?void 0:e.active_iteration)!=null&&tr.favicon_url?o.createElement("span",{className:"favicon-container mt-1"}
1897,o.createElement("img",{src:(Fe=e==null?void 0:e.active_iteration)==null?void 0:Fe.favicon_url})):(st=e==null?void 0:e.active_iteration)!=null&&st.favicon?o.createElement("span",{className:"favicon-container mt-1"},o.createElement(Cm,{storagePath:(gt=e==null?void 0:e.active_iteration)==null?void 0:gt.favicon})):null):null,e!=null&&e.$id?e.team_name?o.createElement("div",{className:"mb-4 dark__text"},"Workspace: ",e.team_name):null:(Ee=(ht=et==null?void 0:et.globalMeta)==null?void 0:ht.teams)!=null&&Ee[0]?((it=(We=et==null?void 0:et.globalMeta)==null?void 0:We.teams)==null?void 0:it.length)>1?o.createElement("div",{className:"mb-4"},o.createElement("label",{htmlFor:"assetTeamID"},"Workspace",o.createElement("select",{id:"assetTeamID",value:f,onChange:$e=>{$(""),Ie([]),he([]),m($e.target.value)}},(vn=(_t=et==null?void 0:et.globalMeta)==null?void 0:_t.teams)==null?void 0:vn.map($e=>o.createElement("option",{key:$e.id,value:$e.id},$e.name))))):null:{},(je=(An=ua[n])==null?void 0:An.activeFields)!=null&&je.asset?o.createElement("div",{className:"mb-4"},o.createElement("label",null,o.createElement("span",{className:"flex justify-between"},o.createElement("span",null,"Name"),["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:$e=>{$e.preventDefault();const dt=["Red","Blue","Green","Yellow","Purple","Orange","Pink","Teal","Cyan","Magenta","Violet","Indigo","Crimson","Azure","Emerald","Golden","Silver","Bronze"],Rt=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","octopus","penguin","owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],Vt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Wt=dt[Math.floor(Math.random()*dt.length)],On=Rt[Math.floor(Math.random()*Rt.length)],Nn=Vt[Math.floor(Math.random()*Vt.length)],tn=Math.floor(1e3+Math.random()*9e3),br=`${Wt} ${On} ${Nn} ${tn}`;d(br)}},"Generate name"):null),o.createElement("input",{id:"assetName",type:"text",placeholder:"",onChange:$e=>d($e.target.value),value:u}))):null,(Lt=(kt=ua[n])==null?void 0:kt.activeFields)!=null&&Lt.asset&&((Be=(ne=ua[n])==null?void 0:ne.activeFields)!=null&&Be.iteration)&&(t!=null&&t.is_manually_selected)?o.createElement(Wv,{className:"mb-4 callout manual-published"},o.createElement("div",{className:"flex gap-2 items-center"},o.createElement(Ft,{icon:o.createElement(wge,{size:14})}),o.createElement("span",null," Note: The published iteration is set to manual."))):null,(we=(mt=ua[n])==null?void 0:mt.activeFields)!=null&&we.iteration?o.createElement("div",null,o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"flex flex-col"},me==="repeated-url"?o.createElement("label",{className:"flex justify-between"},o.createElement("span",null,"URL"),o.createElement("span",{className:"text-red-500 dark:text-amber-300"},"This URL has been bookmarked in this workspace.")):o.createElement("div",{className:"flex justify-between"},o.createElement("label",null,"URL"),["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:$e=>{$e.preventDefault();const Rt=`https://google.com/${Math.floor(1e5+Math.random()*9e5)}`;E(Rt)}},"Generate bookmark"):null),o.createElement("textarea",{id:"url",rows:2,placeholder:"Must contain full url including https://",onChange:$e=>{const dt=$e.target.value;E(dt),dt!==w&&C("auto")},value:b})),me==="invalid-url"?o.createElement("div",{className:"mt-2 dark__text"},o.createElement("span",null,"Must contain full web url. Example"),o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"https://domain.com/..."))):null,((vt=S==null?void 0:S.modificationList)==null?void 0:vt.length)>0&&b!==(S==null?void 0:S.sampleParsedURL)?o.createElement("div",{className:"mt-2 dark__text"},o.createElement("span",null,"This URL will be adjusted to ",o.
1897createElement("pre",null,S==null?void 0:S.sampleParsedURL),".")):null,o.createElement(NOe,{url:b,teamID:f||a})),h?null:o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"mb-4 select-tag-container"},o.createElement("label",{className:"xs:block xs:w-full word-break"},"URL Snapshot"),o.createElement(km,{value:[{value:"auto",label:"Auto-generate"},{value:"custom",label:"Upload custom"},{value:"none",label:"Do not generate"}].find($e=>$e.value===k),onChange:$e=>C($e.value),options:[{value:"auto",label:"Auto-generate"},{value:"custom",label:"Upload custom"},{value:"none",label:"Do not generate"}],classNamePrefix:"select-tag",classNames:{control:$e=>$e.isFocused?"select-tag drawer-open focused":"select-tag drawer-open"}})),k==="custom"&&o.createElement("div",{className:"mt-2"},o.createElement(Tq,{key:T?"loaded":"empty",text:A?o.createElement("span",null,o.createElement("b",null,"Keep existing snapshot"),", upload or paste from clipboard."):T?"Image selected":"Choose image or paste from clipboard...",onInputChange:H,inputProps:{accept:"image/*"},className:"w-full screenshot-file-input"}),L&&o.createElement("div",{className:"mt-2 relative inline-block group"},L.startsWith("gs://")?o.createElement("div",{className:"max-w-full h-auto max-h-32 rounded border border-gray-200 dark:border-gray-700 block overflow-hidden"},o.createElement(nu,{storagePath:L,style:{width:"auto",height:"8rem",objectFit:"contain"},className:"w-full h-full object-contain"})):o.createElement("img",{src:L,alt:"Preview",className:"max-w-full h-auto max-h-32 rounded border border-gray-200 dark:border-gray-700 block"}),o.createElement("button",{type:"button",onClick:()=>{M(null),D(null),O(!1)},className:"absolute -top-2 -right-2 p-1 bg-white dark:bg-gray-800 rounded-full shadow-md hover:bg-gray-100 dark:hover:bg-gray-700 border border-gray-200 dark:border-gray-600 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-200 dark:text-gray-200",title:"Remove image"},o.createElement(Ft,{icon:o.createElement(wm,{size:12}),className:"text-red-500 dark:text-red-400"}))))),h?null:o.createElement(Wv,{className:"mb-4 callout"},o.createElement(Gv,{onChange:$e=>B($e.target.value),selectedValue:se,large:!0,className:"flex gap-4 flex-col"},o.createElement("label",{className:"xs:block xs:w-full word-break"},"URL Behavior"),o.createElement(Hc,{value:"default",className:"m-0 flex gap-2 items-center"},o.createElement("span",{className:"text-gray-900 whitespace-nowrap dark__text"},"New tab"),o.createElement("span",null,"â"),o.createElement("span",null,"Go to original url.")),o.createElement(Hc,{value:"inline",className:"m-0 flex gap-2 items-center"},o.createElement("span",{className:"text-gray-900 whitespace-nowrap dark__text"},"Hidden URL"),o.createElement("span",null,"â"),o.createElement("span",null,"Display URL in an iframe. This helps obfuscate the source.")))),h?null:o.createElement("div",{className:"mb-4"},o.createElement("label",null,o.createElement("div",{className:"flex items-center gap-2 justify-between"},o.createElement("span",null,"Version note"),null),o.createElement("textarea",{id:"changeNotes",rows:2,onChange:$e=>z($e.target.value),value:Y})))):null),o.createElement("div",{className:"asset-drawer-bcol"},(fn=(It=ua[n])==null?void 0:It.activeFields)!=null&&fn.collection?o.createElement("div",{className:"mb-4"},o.createElement("label",{htmlFor:"collection",className:"mb-4"},(Ne=X==null?void 0:X.subscription)!=null&&Ne.collection?o.createElement("span",null,o.createElement("span",{className:"mr-1"},"Collection"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Collection is like a folder. Bookmarks can be assigned to only one collection."},o.createElement(Ft,{className:"ml-2",icon:o.createElement(T0,{size:14})}))):o.createElement("span",null,o.createElement("span",{className:"mr-1"},"Collection"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Collection is like a folder. Bookmarks can be assigned to only one collection."},o.createElement(Ft,{className:"ml-2",icon:o.createElement(T0,{size:14})}))),(lt=X==null?void 0:X.subscription)!=null&<.collection?o.createElement("select",{id:"collection",value:U,onChange:$e=>{$($e.target.value),$e.target.value==="$createNew"&&ea.ping(Ze("users-collection-manage-ad
1897d"))},className:Et?Q0:null},o.createElement("option",{value:""}),!((Ke=(wt=X==null?void 0:X.organization)==null?void 0:wt.subscription)!=null&&Ke.active)&&Ue.length>=Tr.organization.subscription.plan.free.collection_limit?null:o.createElement("option",{value:"$createNew"},"New collection"),Ue.map($e=>o.createElement("option",{key:$e.$id,value:$e.$id},$e.name))):o.createElement("div",{className:"note"},o.createElement("select",{disabled:!0}))),U==="$createNew"?o.createElement("label",{htmlFor:"newCollectionName",className:"block mt-4"},o.createElement("div",{className:"flex items-center justify-between"},o.createElement("span",null,"Collection name"),["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:$e=>{$e.preventDefault();const dt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Rt=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],Vt=Rt[Math.floor(Math.random()*Rt.length)],Wt=dt[Math.floor(Math.random()*dt.length)],On=Math.floor(10+Math.random()*90),Nn=`${Wt} ${Vt} ${On}`;be(Nn)}},"Generate collection"):null),o.createElement("input",{id:"newCollectionName",type:"text",placeholder:"",onChange:$e=>be($e.target.value),value:ce})):null,!((ln=(St=X==null?void 0:X.organization)==null?void 0:St.subscription)!=null&&ln.active)&&Ue.length>=Tr.organization.subscription.plan.free.collection_limit?(()=>{var Rt,Vt,Wt,On;const $e=(Vt=(Rt=et==null?void 0:et.globalMeta)==null?void 0:Rt.teams)==null?void 0:Vt.find(Nn=>Nn.id===f),dt=((Wt=$e==null?void 0:$e.organization)==null?void 0:Wt.$id)||((On=$e==null?void 0:$e.organization)==null?void 0:On.id);return dt?o.createElement("div",{className:"mt-1"},o.createElement(ci,{className:"cursor-pointer text-xs text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-500 text-decoration-none",to:Pn("/organization/:organizationID/subscribe",{organizationID:dt}),onClick:()=>c()},"Upgrade for unlimited collections")):null})():null):null,(Yn=(vr=ua[n])==null?void 0:vr.activeFields)!=null&&Yn.tags?o.createElement("div",{className:"mb-4 select-tag-container"},o.createElement("label",{htmlFor:"tags",className:"mb-4"},o.createElement(fr,{compact:!0,usePortal:!1,content:"Bookmarks can be assigned to one or many tags. To create a new tag, type the tag name and press enter."},"Tags"),o.createElement(JD,{value:ue,onChange:$e=>Ie($e),onFocus:()=>ea.ping(Ze("users-tag-manage-add")),options:pe,isMulti:!0,className:`${Pt?Q0:null}`,classNames:{control:$e=>$e.isFocused?"select-tag drawer-open focused":"select-tag drawer-open"},classNamePrefix:"select-tag"})),["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:$e=>{$e.preventDefault();const dt=["January","February","March","April","May","June","July","August","September","October","November","December"],Rt=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],Vt=Rt[Math.floor(Math.random()*Rt.length)],Wt=dt[Math.floor(Math.random()*dt.length)],On=Math.floor(10+Math.random()*90),Nn=`${Wt} ${Vt} ${On}`;Ie(tn=>[...tn||[],{label:Nn,value:Nn,__isNew__:!0}])}},"Generate tag"):null):null,(Hn=(Cn=ua[n])==null?void 0:Cn.activeFields)!=null&&Hn.notifications?o.createElement("div",{className:"mb-4 select-tag-container"},o.createElement("label",{htmlFor:"notifications",className:"mb-4"},(Re=X==null?void 0:X.subscription)!=null&&Re.notification?o.createElement("span",{className:"mb-2"},o.createElement("span",{className:"mr-1"},"Notify"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Email selected users in your workspace a link to this bookmark."},o.createElement(Ft,{className:"ml-2",icon:o.createElement(T0,{size:14})}))):o.createElement("span",null,o.createElement("span",{className:"mr-1"},"Notify"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Email selected users in your workspace a link to this bookmark."},o.createElement(Ft,{className:"ml-2",icon:o.createElement(T0,{size:14})}))," ",!(et!=null&&et.isLoading)&&(et!=null&&et.isLive)?o.createElement(fr,{compact:!0,usePortal:!1,content:"The selected workspace does not have a subscription plan to activate this feature."},(ot=X==null?void 0:X.organization)!=null&&ot.id?o.createElement(ci,{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text !no-underline",to:Pn("/organization/:organizationID/subscribe",{organizationID:X.organization.id}),onClick:()=>c()},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription")):o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription"))):null),(jt=X==null?void 0:X.subscription)!=null&&jt.notification?o.createElement(km,{value:Ae,onChange:$e=>he($e),options:q,isMulti:!0,className:`${hn?Q0:null}`,classNames:{control:$e=>
1897$e.isFocused?"select-tag drawer-open focused":"select-tag drawer-open"},classNamePrefix:"select-tag"}):o.createElement("div",{className:"note"},o.createElement("label",{htmlFor:"assetNotification"},o.createElement("select",{id:"assetNotification",disabled:!0}))))):null,o.createElement("ul",{className:"py-4 flex flex-col gap-2"},(ar=(En=e==null?void 0:e.from_member)==null?void 0:En.created)!=null&&ar.$id?o.createElement("li",{className:"flex gap-1 items-center"},o.createElement("label",{className:"min-w-[100px]"},"Added by"),o.createElement("span",null,e.from_member.created.name)):null,(qe=(ye=e==null?void 0:e.from_member)==null?void 0:ye.modified)!=null&&qe.$id?o.createElement("li",{className:"flex gap-1 items-center"},o.createElement("label",{className:"min-w-[100px]"},"Modified by"),o.createElement("span",null,e.from_member.modified.name)):null,(Ve=(Me=t==null?void 0:t.from_member)==null?void 0:Me.created)!=null&&Ve.$id?o.createElement("li",{className:"flex gap-1 items-center"},o.createElement("label",{className:"min-w-[100px]"},"Version Added by"),o.createElement("span",null,t.from_member.created.name)):null,(bt=(Je=t==null?void 0:t.from_member)==null?void 0:Je.modified)!=null&&bt.$id?o.createElement("li",{className:"flex gap-1 items-center"},o.createElement("label",{className:"min-w-[100px]"},"Version modified by"),o.createElement("span",null,t.from_member.modified.name)):null))))},W6=Ir(xr());Ts(xr());const AOe=({activeTeam:e,hidePeopleButton:t=!1,brandPrimaryButton:n=!1})=>{const[r,a]=p.useState("link"),[s,i]=p.useState(!1),[l,c]=p.useState(!1),[u,d]=p.useState((e==null?void 0:e.invitationCode)||null),[f,m]=p.useState((e==null?void 0:e.legacyInviteCode)||null),[h,g]=p.useState(()=>e!=null&&e.invitationCode||!(e!=null&&e.id)?!0:!!localStorage.getItem(`team_invitationCode_${e.id}`));p.useEffect(()=>{if(!(e!=null&&e.id))return;const S=localStorage.getItem(`team_invitationCode_${e.id}`),N=localStorage.getItem(`team_legacyInviteCode_${e.id}`),k=e.invitationCode||S,C=e.legacyInviteCode||N||null;if(k){d(k),m(C),g(!0);return}let A=!1;return(async()=>{var O;try{const T=await pt(W6,Ze("users-team-invitation-code-fetch"))({teamID:e.id});if(A)return;(O=T==null?void 0:T.data)!=null&&O.invitationCode&&(d(T.data.invitationCode),m(T.data.legacyInviteCode||null),localStorage.setItem(`team_invitationCode_${e.id}`,T.data.invitationCode),T.data.legacyInviteCode?localStorage.setItem(`team_legacyInviteCode_${e.id}`,T.data.legacyInviteCode):localStorage.removeItem(`team_legacyInviteCode_${e.id}`),Zn.dispatch({type:"ui/setUser_currentTeam",data:{...e,invitationCode:T.data.invitationCode,legacyInviteCode:T.data.legacyInviteCode}}))}catch(T){console.error("Error loading team data:",T)}finally{A||g(!0)}})(),()=>{A=!0}},[e==null?void 0:e.id]);const v=async(S=!1)=>{var N;if(e!=null&&e.id){i(!0);try{const k=await pt(W6,Ze("users-team-invitation-code-generate"))({teamID:e.id});if((N=k==null?void 0:k.data)!=null&&N.invitationCode){const C=k.data.invitationCode,A=k.data.legacyInviteCode;d(C),m(A||null),localStorage.setItem(`team_invitationCode_${e.id}`,C),A?localStorage.setItem(`team_legacyInviteCode_${e.id}`,A):localStorage.removeItem(`team_legacyInviteCode_${e.id}`),Zn.dispatch({type:"ui/setUser_currentTeam",data:{...e,invitationCode:C,legacyInviteCode:A}});const O="https://bookmark.it.com",M=O&&String(O).replace(/\/$/,"")||""||window.location.origin;S?re.dispatch("trigger-alert",{message:"New invite link generated. The old link no longer works.",intent:"success"}):y(`${M}/join/${C}`)}}catch(k){console.error(k),re.dispatch("trigger-alert",{message:k.message||"Failed to generate invitation code.",intent:"danger"})}finally{i(!1)}}},y=S=>{navigator.clipboard.writeText(S),re.dispatch("trigger-alert",{message:"Copied to clipboard!",intent:"success"})};if(!u)return h?o.createElement("div",{className:"p-4 w-full"},o.createElement("p",{className:"text-gray-700 dark:text-gray-300 text-sm mb-3"},"This workspace is private. Enable a join link so others can join"," ",o.createElement("strong",{className:"dark:text-gray-200"},e==null?void 0:e.name),"."),o.createElement(De,{fill:!0,intent:n?void 0:"primary",className:n?"!bg-primary !text-white dark:!bg-primary-600 dark:hover:!bg-primary-700 !border-none
1897!shadow-none rounded-sm text-sm px-4 py-2":"",onClick:()=>v(!1),loading:s},"Enable members to join this workspace")):o.createElement("div",{className:"p-4 w-full flex items-center justify-center min-h-[120px]"},o.createElement(os,{size:22}));const x=`${String("https://bookmark.it.com").replace(/\/$/,"")||""||window.location.origin}/join/${u}`;return o.createElement("div",{className:"p-4 w-full invitation-panel"},o.createElement(Cw,{id:"sharing-tabs",selectedTabId:r,onChange:S=>a(S)},o.createElement(Wp,{id:"link",title:"Link",className:"focus:outline-none flex gap-1 dark__text",icon:o.createElement(ige,{size:14}),panel:o.createElement("div",{className:"invitation-panel__link w-full"},o.createElement(Es,{className:"mb-4 p-0"}),o.createElement("p",{className:"text-muted text-sm mb-2 space-x-1 dark:text-gray-400"},o.createElement("span",null,"Anyone with this link can join"),o.createElement("strong",{className:"dark:text-gray-200"},e==null?void 0:e.name)),o.createElement("div",{className:"flex gap-2"},o.createElement(Cs,{className:"flex-1",readOnly:!0,value:x}),o.createElement(De,{icon:o.createElement(O3,{size:14}),onClick:()=>y(x)})),o.createElement("div",{className:"flex mt-2"},o.createElement(De,{variant:"minimal",size:"small",className:"dark__text !text-xs",loading:s,onClick:()=>c(!0)},"Generate a new link")))}),o.createElement(Wp,{id:"code",title:"Code",className:"focus:outline-none flex gap-1 dark__text ",icon:o.createElement(rge,{size:14}),panel:o.createElement("div",{className:"invitation-panel__code w-full"},o.createElement(Es,{className:"mb-4 p-0"}),o.createElement("p",{className:"text-muted text-sm mb-2 space-x-1 dark:text-gray-400"},o.createElement("span",null,"Anyone with this code can join"),o.createElement("strong",{className:"dark:text-gray-200"},e==null?void 0:e.name)),o.createElement("div",{className:"flex gap-2"},o.createElement(Cs,{className:"flex-1",readOnly:!0,value:f||u}),o.createElement(De,{icon:o.createElement(O3,{size:14}),onClick:()=>{navigator.clipboard.writeText(f||u),re.dispatch("trigger-alert",{message:"Workspace invitation code copied to clipboard",intent:"success"})}})),o.createElement("div",{className:"flex mt-2"},o.createElement(De,{variant:"minimal",size:"small",className:"dark__text !text-xs",loading:s,onClick:()=>c(!0)},"Generate a new code")))}),o.createElement(M1e,null),!t&&o.createElement(De,{className:Ho+" dark__text",variant:"minimal",icon:o.createElement(IG,{size:14,className:"dark__text"}),onClick:()=>{re.dispatch("redirect-to",`/workspace/${e.id}/manage`)}},"People")),o.createElement(xg,{isOpen:l,intent:"danger",icon:o.createElement(Hd,{size:16}),confirmButtonText:"Generate new link",cancelButtonText:"Cancel",className:"dark__text",onCancel:()=>c(!1),onConfirm:()=>{c(!1),v(!0)}},o.createElement("p",null,"Generate a new link? The current invite link and code will stop working â anyone who already has them (including places you shared or published them) won't be able to join with them again.")))},IOe=()=>nS("boards_enabled"),OOe=()=>nS("tables_enabled"),MOe=()=>nS("flows_enabled"),aS=({onChange:e}={})=>{var m;const t=yr(),{pathname:n}=hs(),r=Wn(h=>{var g;return(g=h==null?void 0:h.UI)==null?void 0:g.user}),a=Wn(h=>{var g;return(g=h==null?void 0:h.FB)==null?void 0:g.auth}),s=!!(r!=null&&r.isAllTeam),i=(r==null?void 0:r.activeTeam)||null,l=((m=a==null?void 0:a.globalMeta)==null?void 0:m.teams)||[],c=p.useCallback(h=>{if(n.includes("/bookmarks/updated"))t({pathname:Pn("/workspace/:teamID/bookmarks/updated",{teamID:h})});else if(n.includes("/bookmarks/recently-viewed"))t({pathname:Pn("/workspace/:teamID/bookmarks/recently-viewed",{teamID:h})});else if(n.includes("/bookmarks/starred"))t({pathname:Pn("/workspace/:teamID/bookmarks/starred",{teamID:h})});else if(n.startsWith("/prototypes"))t({pathname:Pn("/prototypes/:teamID",{teamID:h})});else if(n.includes("/activity"))t({pathname:Pn("/workspace/:teamID/activity/all",{teamID:h})});else if(n.includes("/map")){const g=n.match(/\/map\/([^/?#]+)/);t({pathname:g?`/workspace/${h}/map/${g[1]}`:Pn("/workspace/:teamID/map",{teamID:h})})}else if(n.includes("/board")){const g=n.match(/\/board\/([^/?#]+)/);t({pathname:g?`/workspace/${h}/board/${g[1]}`:Pn("/workspace/:teamID/board",{teamID:h})})}else t({pathname:Pn("/workspace/:teamID/bookmarks/updated",{teamID:h}),search:""})},[t,n]),u=p.useCallback(()=>
1897{if(n.includes("/bookmarks/updated"))t({pathname:Pn("/workspace/all/bookmarks/updated")});else if(n.includes("/bookmarks/recently-viewed"))t({pathname:Pn("/workspace/all/bookmarks/recently-viewed")});else if(n.includes("/bookmarks/starred"))t({pathname:Pn("/workspace/all/bookmarks/starred")});else if(n.startsWith("/prototypes"))t({pathname:Pn("/prototypes")});else if(n.includes("/activity"))t({pathname:Pn("/workspace/all/activity/all")});else if(n.includes("/map")){const h=n.match(/\/map\/([^/?#]+)/);t({pathname:h?`/workspace/all/map/${h[1]}`:Pn("/workspace/all/map")})}else if(n.includes("/board")){const h=n.match(/\/board\/([^/?#]+)/);t({pathname:h?`/workspace/all/board/${h[1]}`:Pn("/workspace/all/board")})}else t({pathname:Pn("/workspace/all/bookmarks/updated"),search:""})},[t,n]),d=p.useCallback((h,g={})=>{const{navigate:v=!0}=g;Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:h.id,name:h.name}}),e&&e(),v&&c(h.id)},[c,e]),f=p.useCallback(()=>{Zn.dispatch({type:"ui/setUser_allTeam"}),e&&e(),u()},[u,e]);return{selectWorkspace:d,selectAllWorkspaces:f,isAllWorksp
1897aces:s,activeTeam:i,workspaces:l}};const POe=Ir(xr()),G6={assetContentProcessingQueue:new BroadcastChannel("asset-content-processing-queue"),baseServiceWorkerRenew:new BroadcastChannel("base-serviceworker-renew"),baseServiceWorkerRenew_response:new BroadcastChannel("base-serviceworker-renew-response")},DOe=({external:e})=>{const[t,n]=p.useState([]);Wn(a=>a==null?void 0:a.SW);let r=({queueItem:a})=>{re.dispatch("asset-content-processing-queue-errorrestoreform",{queueItem:a}),n([])};return p.useEffect(()=>{re.on("asset-content-processing-queue",({request:a={url:null,data:{},success:l=>null,error:l=>null},contingency:s=null,isResetQueue:i=!1})=>{if(i){n([]);return}let l={date:new Date,request:a,contingency:s};{a.optimisticData||n([l]);const c=u=>{pt(POe,a.url)(a.data).then(d=>{const f=()=>{a.success(d),e.action({type:"request-success",dataSet:{resultItem:d,actionMeta:s==null?void 0:s.restore}}),n([])};a.optimisticData?(async()=>{var h,g,v,y,b,E;if(a.optimisticData.actionType==="add"){const w=a.optimisticData.tempID,x=(g=(h=d.data)==null?void 0:h.output)==null?void 0:g.assetID,S=(y=(v=d.data)==null?void 0:v.output)==null?void 0:y.iterationThumbnailStoragePath,N=a.optimisticData.asset;try{await Qe.action.delete({tableID:"Assets-General-All",id:w})}catch(C){console.error("Failed to delete temp optimistic asset",C)}const k=(E=(b=d.data)==null?void 0:b.output)!=null&&E.asset?d.data.output.asset:x&&N?{...N,$id:x,id:x,$optimistic:!1,...S?{active_iteration:{...N.active_iteration,auto_preview_thumbnail:S}}:{}}:null;if(k){await Qe.action.set({tableID:"Assets-General-All",dataList:[k],options:{skipClear:!0,includeIndex:!0,preserveLocalDB:!0}}),re.dispatch("optimistic-asset-resolved",{tempID:w,realAssetID:x});try{localStorage.setItem(`map_temp_resolve_${w}`,x)}catch{}}}})().then(()=>{f()}):f()}).catch(d=>{u<3?(console.warn(`[ProcessingQueue] Retry ${u+1}/3 for ${a.url}`),setTimeout(()=>c(u+1),2e3)):(a.error(d),r({queueItem:l}),a.optimisticData?(a.optimisticData.actionType==="add"?Qe.$dexie.base.table("Assets-General-All").delete(a.optimisticData.tempID):a.optimisticData.originalAsset&&Qe.action.set({tableID:"Assets-General-All",dataList:[a.optimisticData.originalAsset],options:{skipClear:!0,includeIndex:!1,preserveLocalDB:!0}}),re.dispatch("trigger-alert",{message:"Failed to save asset. Please try again.",intent:"danger"})):n([]))})};c(0)}localStorage.removeItem("assetList-lastDownload"),localStorage.removeItem("assetsGeneral-lastDownload")},"Reset-AssetContentProcessingQueue"),setInterval(()=>G6.baseServiceWorkerRenew.postMessage({}),5*1e3),G6.baseServiceWorkerRenew_response.onmessage=a=>{const s=a.data;Zn.dispatch({type:"sw/setActive",data:{active:s.active}})}},[]),o.createElement("div",null,t.length>0?o.createElement("div",null,t.map((a,s)=>o.createElement("div",{key:s,className:"saving-interstitial flex items-center whitespace-nowrap gap-2 dark__text"},o.createElement(os,{size:14}),o.createElement("span",null,"Saving...",["dev","qa"].includes("production")?o.createElement("span",null,"(",Ht(a.date).format("h:mm A"),") [",s,"]:"," ",a.request.url):null)))):null)},vc=e=>{var t;return((t=e==null?void 0:e.parsedMeta)==null?void 0:t.subscriptionStatesResolved)===!0},QZ=(e,t)=>{var n,r,a;return!t||!vc(e)?null:((a=(r=(n=e==null?void 0:e.parsedMeta)==null?void 0:n.subscriptionStates)==null?void 0:r.teams)==null?void 0:a[t])||null},sy=(e,t)=>{var n;return!!((n=QZ(e,t))!=null&&n.active)},Kp=(e,t)=>{var n;return(n=QZ(e,t))==null?void 0:n.plan},sS=(e,t)=>Kp(e,t)==="free",q6=(e,t)=>{var n,r,a;return!t||!vc(e)?null:((a=(r=(n=e==null?void 0:e.parsedMeta)==null?void 0:n.subscriptionStates)==null?void 0:r.organizations)==null?void 0:a[t])||null},iy=[["#5e6ad2","#2a2f6b"],["#d97706","#92400e"],["#16a34a","#0c6b32"],["#db2777","#8a1850"],["#2563eb","#1a3f8a"],["#e0563f","#9c2d1c"],["#38bdf8","#0c6e9e"],["#ea4c89","#b32063"],["#a259ff","#5b1fb0"],["#635bff","#332ea8"]],LOe=iy.map(e=>e[0]);function $Oe(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return Math.abs(t)}const FOe=(e,t)=>((e|0)%t+t)%t;function zOe(e){const t=iy[FOe(e,iy.length)];return[t[0],t[1]]}function HOe(e){const t=iy[$Oe(e||"")%iy.length];return[t[0],t[1]]}const JZ=([e,t])=>`linear-gradient(150deg, ${e}, ${t})`;function YI(e){return JZ(HOe(e))}function KI(e){return JZ(zOe(e))}function pb(e){if(!e)return"";try{return new URL(/^https?:\/\//.test(e)?e:"https://"+e).hostname.replace(/^www\./,"")}catch{return e}}function Gf(e){if(!e)return"â¢";const t=e.match(/[A-Za-z0-9]/);return(t?t[0]:e[0]||"â¢").toUpperCase()}class is{static sortTeams(t){return!t||!Array.isArray(t)?[]:[...t].sort((n,r)=>(n.name||"").localeCompare(r.name||""))}static getPaletteColorForIndex(t){return t==null||t<0?null:this.PALETTE[t%this.PALETTE.length]}static getStoredColors(){try{const t=localStorage.getItem(this.STORAGE_KEY);return t?JSON.parse(t):{}}catch(t){return console.error("Failed to parse team colors from local storage",t),{}}}static saveColors(t){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(t))}catch(n){console.error("Failed to save team colors to local storage",n)}}static assignColors(t){if(!t||!Array.isArray(t))return;const n=this.sortTeams(t),r={};let a=!1;const s=this.getStoredColors();
1897n.forEach((l,c)=>{const u=this.getPaletteColorForIndex(c);r[l.id]=u,s[l.id]!==u&&(a=!0)}),Object.keys(s).length!==n.length&&(a=!0),a&&this.saveColors(r)}static getColor(t,n){if(!t)return null;const r=this.getStoredColors();if(r[t])return r[t];if(n!=null&&n.length){const a=this.sortTeams(n).findIndex(s=>s.id===t);if(a>=0)return this.getPaletteColorForIndex(a)}return null}static resetColors(){localStorage.removeItem(this.STORAGE_KEY)}}G(is,"PALETTE",[...LOe]),G(is,"STORAGE_KEY","iteratingly_team_colors");const jd=({size:e=16,color:t,strokeWidth:n=2,className:r})=>o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t||"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r},o.createElement("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}),o.createElement("path",{d:"M6.376 18.91a6 6 0 0 1 11.249.003"}),o.createElement("circle",{cx:"12",cy:"11",r:"4"})),eX=" / ",zi="$personal",VOe="https://chromewebstore.google.com/detail/team-bookmarks/nnkccijjkjplbeidbpchalgdahjajeim",fL=32,UOe=30,BOe=4,jOe=200,WOe=240,GOe=360,tX=()=>{const[e,t]=p.useState(typeof window<"u"?window.innerHeight:800);return p.useEffect(()=>{if(typeof window>"u")return;const n=()=>t(window.innerHeight);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e},nX=(e,t)=>{const n=UOe+e*fL+BOe;if(e<=jOe)return n;const r=typeof t=="number"?t:typeof window<"u"?window.innerHeight:800,a=Math.max(GOe,r-WOe);return Math.min(n,a)},mL=za.bridgeSourceExtension,rX=za.bridgeSourceApp,qOe=1500,YOe=15e3,oy=()=>{var e,t,n,r;return!!(typeof window<"u"&&((t=(e=window.chrome)==null?void 0:e.bookmarks)!=null&&t.getTree)&&((r=(n=window.chrome)==null?void 0:n.history)!=null&&r.search))};let ZI=null,Y6=!1;const KOe=()=>{Y6||typeof window>"u"||(Y6=!0,window.addEventListener("message",e=>{if(e.source!==window||e.origin!==window.location.origin)return;const t=e.data;!t||t.source!==mL||t.type==="hello"&&(ZI={version:t.version||null})}))};KOe();const ZOe=(e=qOe)=>new Promise(t=>{if(oy()){t({present:!0,version:null,mode:"extension"});return}if(ZI){t({present:!0,version:ZI.version,mode:"web-bridge"});return}if(typeof window>"u"){t({present:!1,version:null,mode:"none"});return}let n=!1;const r=s=>{if(n||s.source!==window||s.origin!==window.location.origin)return;const i=s.data;!i||i.source!==mL||i.type==="hello"&&(n=!0,window.removeEventListener("message",r),clearTimeout(a),t({present:!0,version:i.version||null,mode:"web-bridge"}))};window.addEventListener("message",r);try{window.postMessage({source:rX,type:"handshake"},window.location.origin)}catch{}const a=setTimeout(()=>{n||(n=!0,window.removeEventListener("message",r),t({present:!1,version:null,mode:"none"}))},e)}),aX=(e,t=null,n=YOe)=>new Promise((r,a)=>{if(typeof window>"u"){a(new Error("Window is unavailable"));return}const s=`req-${Date.now()}-${Math.random().toString(36).slice(2,10)}`;let i=!1;const l=u=>{if(i||u.source!==window||u.origin!==window.location.origin)return;const d=u.data;!d||d.source!==mL||d.type==="response"&&d.requestId===s&&(i=!0,window.removeEventListener("message",l),clearTimeout(c),d.ok?r(d.data||null):a(new Error(d.error||"Bridge call failed")))};window.addEventListener("message",l);const c=setTimeout(()=>{i||(i=!0,window.removeEventListener("message",l),a(new Error("Bridge call timed out")))},n);window.postMessage({source:rX,type:e,requestId:s,payload:t},window.location.origin)}),XI="Import Bookmark Bar",K6=e=>{const t=e==null?void 0:e[0],n=((t==null?void 0:t.children)||[]).find(s=>s.id==="1"||/bookmark.*bar/i.test(s.title||""));if(!n)return[];const r=[],a=(s,i)=>{if(s.url){const c=i.length>0?i.join(eX):XI;r.push({id:`bm-${s.id}`,name:s.title||s.url,url:s.url,collectionPath:c,originalCollectionPath:c});return}const l=i.concat(s.title?[s.title]:[]);(s.children||[]).forEach(c=>a(c,l))};return(n.children||[]).forEach(s=>a(s,[])),r},XOe=async()=>{if(oy()){const t=await new Promise((n,r)=>{window.chrome.bookmarks.getTree(a=>{var i;const s=(i=window.chrome.runtime)==null?void 0:i.lastError;if(s){r(new Error(s.message||"Bookmarks access denied"));return}n(a)})});return K6(t)}const e=await aX("bookmarks/getTree");return K6(e==null?void 0:e.tree)},QOe=e=>{try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}},JOe="Import History",Z6=e=>{const t=(e||[]).filter(n=>n.url&&/^https?:/i.test(n.url)).map(n=>{const r=QOe(n.url);return{id:`hist-${n.id||n.url}`,name:n.title||n.url,url:n.url,collectionPath:JOe,group:r,visitCount:n.visitCount||0}});return t.sort((n,r)=>n.group!==r.group?n.group.localeCompare(r.group):r.visitCount-n.visitCount),t},eMe=async e=>{if(oy()){const n=await new Promise((r,a)=>{const s=Date.now()-e*24*60*60*1e3;window.chrome.history.search({text:"",startTime:s,maxResults:1e4},i=>{var c;const l=(c=window.chrome.runtime)==null?void 0:c.lastError;if(l){a(new Error(l.message||"History access denied"));return}r(i)})});return Z6(n)}const t=await aX("history/search",{days:e,maxResults:1e4});return Z6(t==null?void 0:t.items)},tMe=Ir(xr()),Nx=(e,t)=>pt(tMe,e)(t).then(n=>n.data),iS="Personal Workspace",jo=e=>
1897(e==null?void 0:e.name)||(e!=null&&e.is_personal?iS:"Workspace"),sX=async()=>{var t;const e=await Nx(Ze("users-team-create-startPersonal"),{});return(t=e==null?void 0:e.output)==null?void 0:t.teamID},nMe=e=>String(e||"").split(eX).map(t=>t.trim()).filter(Boolean),iX=e=>(e||[]).join("\0"),rMe=async({teamID:e,paths:t})=>{var s;const n=new Map;if(!t.length)return n;const r=await Nx(Ze("users-collection-manage-importBatch"),{teamID:e,paths:t.map(i=>({path:i}))}),a=((s=r==null?void 0:r.output)==null?void 0:s.resolved)||[];for(const i of a){const l=iX(i.path);n.set(l,i.skipped?null:i.collectionID||null)}return n},aMe=25,hL=e=>{if(!e)return"";try{const t=new URL(e);let n=t.host+t.pathname;return n.endsWith("/")&&(n=n.slice(0,-1)),n.toLowerCase()}catch{let t=String(e).replace(/^https?:\/\//i,"").split("?")[0].split("#")[0];return t.endsWith("/")&&(t=t.slice(0,-1)),t.toLowerCase()}},oX=async e=>{var n,r,a,s;const t=new Set;try{const{default:i}=await yn(()=>Promise.resolve().then(()=>Nce),void 0),l=(r=(n=i==null?void 0:i.$dexie)==null?void 0:n.base)==null?void 0:r["Assets-General-All"];if(!l)return t;const c=new Set(e.filter(Boolean)),u=await l.toArray();for(const d of u){if(c.size&&!c.has(d==null?void 0:d.$team_id))continue;const f=((a=d==null?void 0:d.active_iteration)==null?void 0:a.url)||(d==null?void 0:d.url)||(d==null?void 0:d.property_url)||((s=d==null?void 0:d.iteration)==null?void 0:s.property_url);f&&t.add(hL(f))}}catch(i){console.warn("buildLocalDuplicateSet failed",i)}return t},lX=async(e,t={})=>{var f,m,h;const{onProgress:n,chunkSize:r=aMe}=t,a=new Map;for(const g of e)!g.teamID||!g.url||(a.has(g.teamID)||a.set(g.teamID,[]),a.get(g.teamID).push(g));const s=Array.from(a.values()).reduce((g,v)=>g+v.length,0);let i=0,l=0,c=0;const u=[],d=g=>{if(typeof n=="function")try{n({phase:g,processed:i,total:s,imported:l,skippedDuplicates:c,errors:u.slice()})}catch(v){console.warn("import progress callback threw",v)}};d("collections");for(const[g,v]of a.entries()){const y=new Map,b=new Map;for(const x of v){const S=nMe(x.collectionPath),N=S.join("\0");b.has(N)||b.set(N,{parts:S,items:[]}),b.get(N).items.push(x)}const E=Array.from(b.values()).map(x=>x.parts).filter(x=>x.length>0);let w=new Map;try{w=await rMe({teamID:g,paths:E})}catch(x){console.warn("importBatch failed; bookmarks will land at team root.",x)}for(const{parts:x,items:S}of b.values()){let N=null;if(x.length>0){const C=w.get(iX(x));N=typeof C=="string"?C:null}let k=y.get(N||"__none__");if(!k){k=new Set;try{const C=await Nx(Ze("users-collection-view-content"),N?{collectionID:N,teamID:g}:{teamID:g,filter:{id_collection:null}});(((f=C==null?void 0:C.output)==null?void 0:f.list)||((h=(m=C==null?void 0:C.output)==null?void 0:m.results)==null?void 0:h.list)||[]).forEach(O=>{var M;const T=O.property_url||O.url||((M=O.iteration)==null?void 0:M.property_url);T&&k.add(T)})}catch(C){console.warn("Dedupe fetch failed for collection",N,C)}y.set(N||"__none__",k)}for(let C=0;C<S.length;C+=r){const A=S.slice(C,C+r),O=await Promise.all(A.map(async T=>{if(k.has(T.url))return{kind:"duplicate"};try{return await Nx(Ze("users-asset-manage-add"),{asset:{id_team:g,id_project:null,id_collection:N,id_tags:[],ids_notifications_team_members:[],property_name:T.name||T.url,property_description:"",property_type:"bookmark",$new_tags:[]},iteration:{property_url:T.url,property_url_original:T.url,property_display_format:"default",property_change_notes:"",property_screenshot_strategy:"auto",property_auto_preview_thumbnail:null},source:"extension-import",collection:{property_name:null},client_request_id:`import-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}),{kind:"ok",url:T.url}}catch(M){return{kind:"error",url:T.url,error:(M==null?void 0:M.message)||String(M)}}}));for(const T of O)i++,T.kind==="ok"?(l++,k.add(T.url)):T.kind==="duplicate"?c++:u.push({url:T.url,error:T.error});d("assets")}}}return d("done"),{imported:l,skippedDuplicates:c,errors:u}},C2=Ir(xr()),X6="(max-width: 779px)",Q6=({width:e=14,height:t=18,className:n})=>o.createElement("svg",{width:e,height:t,viewBox:"0 0 16 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0}
1897,o.createElement("g",{filter:"url(#filter0_d_app_logo)"},o.createElement("path",{d:"M13.3877 0.25C14.14 0.250065 14.75 0.859958 14.75 1.6123V18.8867C14.7497 20.0546 13.3759 20.6809 12.4941 19.915L8.41406 16.3691C8.03344 16.0384 7.46656 16.0384 7.08594 16.3691L3.00586 19.915C2.12407 20.6809 0.750302 20.0546 0.75 18.8867V1.6123C0.750036 0.859941 1.35994 0.250036 2.1123 0.25H13.3877ZM7.2002 3.19922C6.92405 3.19922 6.7002 3.42308 6.7002 3.69922V6.39941H4C3.72386 6.39941 3.5 6.62327 3.5 6.89941V7.99902C3.5 8.27517 3.72386 8.49902 4 8.49902H6.7002V11.1992C6.7002 11.4754 6.92405 11.6992 7.2002 11.6992H8.2998C8.57595 11.6992 8.7998 11.4754 8.7998 11.1992V8.49902H11.5C11.7761 8.49902 12 8.27517 12 7.99902V6.89941C12 6.62327 11.7761 6.39941 11.5 6.39941H8.7998V3.69922C8.7998 3.42308 8.57595 3.19922 8.2998 3.19922H7.2002Z",fill:"url(#paint0_linear_app_logo)"})),o.createElement("defs",null,o.createElement("filter",{id:"filter0_d_app_logo",x:"0",y:"0",width:"15.5",height:"21.501",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},o.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),o.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),o.createElement("feOffset",{dy:"0.5"}),o.createElement("feGaussianBlur",{stdDeviation:"0.375"}),o.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),o.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),o.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_app_logo"}),o.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_app_logo",result:"shape"})),o.createElement("linearGradient",{id:"paint0_linear_app_logo",x1:"7.75",y1:"3.93919",x2:"7.75",y2:"24.6699",gradientUnits:"userSpaceOnUse"},o.createElement("stop",{stopColor:"#FF41D6"}),o.createElement("stop",{offset:"1",stopColor:"#9D00B9"})))),sMe=({external:e,sibling_meta_action:t={},sibling_meta_reset:n})=>{var q,te,X,le,me,fe,ke,Se,Et,nt,Pt,en,hn,rt,et,Kt,zn,xt,rr,ir,Tn,Ct,_r,Qn,Ce,ut,pn,Jt,In,Dn,or,Zt,tr,Fe,st,gt,ht,Ee,We,it,_t,vn,An,je,kt,Lt,ne,Be,mt,we,vt,It,f
1897n,Ne,lt,wt,Ke,St,ln,vr,Yn,Cn,Hn;const r=IOe(),a=OOe(),s=MOe(),[i,l]=p.useState(!1),[c,u]=p.useState(0),[d,f]=p.useState("AddAsset"),[m,h]=p.useState(null),[g,v]=p.useState(null),[y,b]=p.useState(null),[E,w]=p.useState({count:0,isManageMode:!1}),[x,S]=p.useState(!1),[N,k]=p.useState(null),[C,A]=p.useState(!1),O=Re=>{E.isManageMode&&E.count>0?(k(()=>Re),S(!0)):Re()},T=()=>{e.action({type:"sibling-body",subType:"bulk-clear-selections"}),w({count:0,isManageMode:!1}),N&&N(),S(!1),k(null)},M=Re=>{var ot;Re&&(re.dispatch("interstitial-run","on"),Jn.analyticsTrack({userId:(ot=$==null?void 0:$.user)==null?void 0:ot.uid,event:"Header - Billing & Payments - Click",codeName:"user-ui-header-action-button-billingandpayments-click",properties:{organization_id:Re}}),pt(C2,Ze("users-organization-subscription-stripeBillingPortalSession"))({organizationID:Re,successHostBase:"https://bookmark.it.com"}).then(({data:jt})=>{const En=jt.output.stripe_billing_portal_session_url,ar=typeof window<"u"&&(window.__TAURI_INTERNALS__||window.__TAURI__),ye=typeof chrome<"u"&&chrome.tabs&&typeof chrome.tabs.create=="function";ar?yn(()=>function(){return(Me=>import(Me))("./index.a906e697.js")}(),[]).then(({openUrl:qe})=>qe(En)).catch(()=>window.open(En,"_blank","noopener,noreferrer")):ye?chrome.tabs.create({url:En}):window.location.href=En,re.dispatch("interstitial-run","off")}).catch(jt=>{console.error("errorItem",jt),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:jt.message||"Sorry, something went wrong.",intent:"danger"})}))},L=hs();({}).VITE_APP_PLATFORM==="extension"||L.pathname.includes("popup");const D=yr(),j=Ea("/go/:assetID"),[H,Y]=p.useState(()=>{try{const Re=localStorage.getItem("header_search_history");return Re?JSON.parse(Re):[]}catch{return[]}}),[z,K]=p.useState(!1),[ee,oe]=p.useState(!1),[J,se]=p.useState(()=>typeof window<"u"&&window.matchMedia(X6).matches);p.useEffect(()=>{const Re=window.matchMedia(X6),ot=()=>se(Re.matches);return Re.addEventListener("change",ot),()=>Re.removeEventListener("change",ot)},[]);const B=Re=>{if(!Re||!Re.trim())return;const ot=Re.trim();Y(jt=>{const En=jt.filter(ye=>ye.toLowerCase()!==ot.toLowerCase()),ar=[ot,...En].slice(0,10);return localStorage.setItem("header_search_history",JSON.stringify(ar)),ar})},U=Re=>{O(()=>{var En;B(Re),K(!1);const ot=new URLSearchParams(L.search);ot.set("search",Re);const jt=ce.isAllTeam?"/workspace/all/bookmarks/updated":`/workspace/${(En=ce.activeTeam)==null?void 0:En.id}/bookmarks/updated`;L.pathname.includes("/bookmarks/updated")?D(`${L.pathname}?${ot.toString()}`,{replace:!0}):D(`${jt}?${ot.toString()}`)})},$=Wn(Re=>{var ot;return(ot=Re==null?void 0:Re.FB)==null?void 0:ot.auth}),ce=Wn(Re=>{var ot;return(ot=Re==null?void 0:Re.UI)==null?void 0:ot.user}),be=p.useMemo(()=>{var En,ar,ye,qe;const Re=(En=ce==null?void 0:ce.activeTeam)==null?void 0:En.id;if(!Re)return!1;const ot=(((ar=$==null?void 0:$.globalMeta)==null?void 0:ar.teams)||[]).find(Me=>String(Me.id)===String(Re));return!ot||ot.is_personal?!1:!!((qe=(ye=$==null?void 0:$.context)==null?void 0:ye.team_manage_edit_team_map)!=null&&qe[Re])},[(q=$==null?void 0:$.globalMeta)==null?void 0:q.teams,(te=$==null?void 0:$.context)==null?void 0:te.team_manage_edit_team_map,(X=ce==null?void 0:ce.activeTeam)==null?void 0:X.id]);p.useEffect(()=>{const Re=fg(Ki,ot=>{if(!ot){A(!1);return}ot.getIdTokenResult(!0).then(jt=>{A(uL(jt.claims))}).catch(()=>A(!1))});return()=>Re()},[]),p.useEffect(()=>{var Re;(Re=$==null?void 0:$.globalMeta)!=null&&Re.teams&&is.assignColors($.globalMeta.teams)},[(le=$==null?void 0:$.globalMeta)==null?void 0:le.teams]);const ue=({targetType:Re="AddAsset",targetAssetItem:ot=null,targetIterationItem:jt=null,targetRestoreState:En=null,triggerSource:ar=null}={})=>{f(Re),h(ot),v(jt),b(En),ar?window.__sidePanelTriggerSource=ar:window.__sidePanelTriggerSource=null,l(!0),u(ye=>ye+1)},Ie={editCollection:Re=>ue({targetType:"EditCollection",targetAssetItem:{$id:Re.value,name:Re.label}}),deleteCollection:Re=>{confirm(`Delete the collection "${Re.label}"?`)&&(re.dispatch("interstitial-run","on"),pt(C2,Ze("users-collection-manage-delete"))({collection:{$id:Re.value}}).then(({data:ot})=>{e.action({type:"sibling-body",subType:"assetlist-clearCollectionsTags",dataSet:{clearTarget:"collection"}}),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`Successfully deleted the collection "${Re.label}".`,intent:"success"})}).catch(ot=>{console.error("errorItem",ot),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:ot.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))},editTag:Re=>ue({targetType:"EditTag",targetAssetItem:{$id:Re.value,name:Re.label}}),deleteTag:Re=>{confirm(`Delete the tag "${Re.label}"?`)&&(re.dispatch("interstitial-run","on"),pt(C2,Ze("users-tag-manage-delete"))({tag:{$id:Re.value}}).then(({data:ot})=>{e.action({type:"sibling-body",subType:"assetlist-clearCollectionsTags",dataSet:{clearTarget:"tag",targetTag:Re.value}}),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`Successfully deleted the tag "${Re.label}".`,intent:"success"})}).catch(ot=>{console.error("errorItem",ot),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:ot.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))}},Ae=()=>{h(null),v(null),l(!1)},he=aS(),_e=({id:Re,name:ot},jt)=>{jt==="manage"?(Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:Re,name:ot}}),D({pathname:Pn("/workspace/:teamID/manage",{teamID:Re})})):jt==="default"?he.selectWorkspace({id:Re,name:ot}):he.selectWorkspace({id:Re,name:ot},{navigate:!1})};p.useEffect(()=>{var Re;(Re=$==null?void 0:$.globalMeta)!=null&&Re.teams?(re.on("select-current-team",({teamID:ot})=>{let jt=$.globalMeta.teams.find(En=>En.id===ot);jt?_e(jt):console.warn(`# Event "select-current-team": Team ${ot} not found. #`)}),re.on("open-side-panel",ot=>{ue(ot)})):(re.remove("select-current-team"),re.remove("open-side-panel"))},[$]),p.useEffect(()=>
1897{var Re,ot,jt,En,ar,ye,qe,Me,Ve,Je,bt,$e,dt;(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="bulk-selection-count"?(w(t.settings),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="team-select-current"&&((Re=t==null?void 0:t.settings)!=null&&Re.targetTeam)?(_e(t.settings.targetTeam,((ot=t==null?void 0:t.settings)==null?void 0:ot.viewType)||"default"),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="sidepanel-open-editcollection"&&((jt=t==null?void 0:t.settings)!=null&&jt.targetCollection)?(Ie.editCollection(t.settings.targetCollection),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="content-delete-collection"&&((En=t==null?void 0:t.settings)!=null&&En.targetCollection)?(Ie.deleteCollection(t.settings.targetCollection),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="sidepanel-open-edittag"&&((ar=t==null?void 0:t.settings)!=null&&ar.targetTag)?(Ie.editTag(t.settings.targetTag),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="content-delete-tag"&&((ye=t==null?void 0:t.settings)!=null&&ye.targetTag)?(Ie.deleteTag(t.settings.targetTag),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="sidepanel-open-restoreform"&&((Me=(qe=t==null?void 0:t.settings)==null?void 0:qe.contingency)!=null&&Me.restore)?(ue({targetType:(Ve=t.settings.contingency.restore.external)==null?void 0:Ve.targetType,targetAssetItem:(Je=t.settings.contingency.restore.external)==null?void 0:Je.targetAsset,targetIterationItem:(bt=t.settings.contingency.restore.external)==null?void 0:bt.targetIteration,targetRestoreState:t.settings.contingency.restore.internal}),n()):(t==null?void 0:t.type)==="header"&&(t==null?void 0:t.subType)==="currentteam-set-match-assetslist-ismemberofcurrentteam"&&!ta.isUndefined(($e=t==null?void 0:t.settings)==null?void 0:$e.isMemberOfCurrentTeam)&&((dt=t==null?void 0:t.settings)!=null&&dt.isSpecific||Zn.dispatch({type:"ui/setUser_allTeam"}),n())},[t]);const Ue=J&&!!1,ae=Ue&&!ee,pe=!Ue||ee,W=o.createElement("div",null,o.createElement("nav",{className:"primary-nav"},o.createElement("div",{className:"primary-nav-group flex min-w-0 flex-1 gap-0 xs:gap-2 sm:gap-4 dark__text"},((fe=(me=$==null?void 0:$.globalMeta)==null?void 0:me.teams)==null?void 0:fe.length)>0?o.createElement("div",{className:"search-container flex items-center relative shrink-0"},ae?o.createElement(De,{"aria-label":"Open search",variant:"minimal",className:"search-toggle",icon:o.createElement(CIe,{size:18}),onClick:()=>{oe(!0),setTimeout(()=>{var Re;return(Re=document.getElementById("search-input"))==null?void 0:Re.focus()},0)}}):null,pe?o.createElement("div",{className:`search-input-wrap flex items-center ${Ue?"flex-1 min-w-0":""}`},o.createElement(Hr,{isOpen:z&&H.filter(Re=>Re&&Re.trim()).length>0,onInteraction:(Re,ot)=>{if(!Re&&(ot==null?void 0:ot.type)==="click"){const jt=document.getElementById("search-input");if(jt&&jt.contains(ot.target))return}K(Re)},minimal:!0,placement:"bottom-start",autoFocus:!1,enforceFocus:!1,content:o.createElement(Cr,{className:"history-menu row-actions__menu max-h-[300px] overflow-y-auto"},o.createElement("li",{className:"bp6-menu-header flex justify-between items-center pr-1"},o.createElement("h6",{className:"bp6-heading mb-0"},"Recent Searches"),o.createElement(De,{variant:"minimal",icon:o.createElement(tu,{size:14}),title:"Clear History",onClick:Re=>{Re.stopPropagation(),Y([]),localStorage.removeItem("header_search_history"),K(!1)}})),H.filter(Re=>Re&&Re.trim()).map((Re,ot)=>o.createElement(Bt,{key:ot,text:Re,icon:o.createElement(ry,{size:14}),onClick:()=>O(()=>U(Re))})))},o.createElement("input",{type:"search",id:"search-input",className:"primary-nav-item__search-input focus:outline-none focus:ring-1 dark:text-white",placeholder:"Search",autoFocus:!0,value:new URLSearchParams(L.search).get("search")||"",onClick:()=>{H.filter(Re=>Re&&Re.trim()).length>0&&K(!0)},onKeyDown:Re=>{Re.key==="Enter"&&(B(Re.currentTarget.value),K(!1)),Re.key==="Escape"&&Ue&&oe(!1)},onBlur:Re=>{Ue&&!Re.currentTarget.value&&oe(!1)},onChange:Re=>{var ar;const ot=Re.target.value,jt=new URLSearchParams(L.search);ot?jt.set("search",ot):jt.delete("search");const En=ce.isAllTeam?"/workspace/all/bookmarks/updated":`/workspace/${(ar=ce.activeTeam)==null?void 0:ar.id}/bookmarks/updated`;L.pathname.includes("/bookmarks/updated")?D(`${L.pathname}?${jt.toString()}`,{replace:!0}):D(`${En}?${jt.toString()}`)}}))):null):null,((Se=(ke=$==null?void 0:$.globalMeta)==null?void 0:ke.teams)==null?void 0:Se.length)<1?o.createElement("span",{className:"flex items-center logo-nav hd curs
1897or-pointer"},o.createElement(De,{className:"!px-2",variant:"minimal",text:"Quick Start",onClick:()=>O(()=>D("/dashboard")),icon:o.createElement(Q6,null)})):null,((nt=(Et=$==null?void 0:$.globalMeta)==null?void 0:Et.teams)==null?void 0:nt.length)>0?ce.isAllTeam?o.createElement(De,{onClick:()=>{O(()=>{var En,ar;e.action({type:"sibling-body",subType:"assetlist-fullReset"});const Re=((En=$==null?void 0:$.user)==null?void 0:En.uid)||((ar=$==null?void 0:$.currentUser)==null?void 0:ar.uid),ot=Re?localStorage.getItem(`user-nav-bookmarks-default-${Re}`):null;let jt=ot||"/workspace/all/bookmarks/updated";ot&&ot.includes("/bookmarks/")&&(jt=`/workspace/all/bookmarks/${ot.split("/bookmarks/")[1]}`),D(jt)})},variant:"minimal",className:L.pathname.startsWith("/workspace/all/bookmarks/updated")||L.pathname.startsWith("/workspace/all/bookmarks/recently-viewed")||L.pathname.startsWith("/workspace/all/bookmarks/starred")?"primary-nav-item primary-nav-item__active":"primary-nav-item"},((en=(Pt=$==null?void 0:$.globalMeta)==null?void 0:Pt.teams)==null?void 0:en.length)>0?o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{icon:o.createElement(tf,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Bookmarks")):null):o.createElement(De,{onClick:()=>{O(()=>{var En,ar,ye,qe;e.action({type:"sibling-body",subType:"assetlist-fullReset"});const Re=((En=$==null?void 0:$.user)==null?void 0:En.uid)||((ar=$==null?void 0:$.currentUser)==null?void 0:ar.uid),ot=Re?localStorage.getItem(`user-nav-bookmarks-default-${Re}`):null;let jt=ot||`/workspace/${(ye=ce.activeTeam)==null?void 0:ye.id}/bookmarks/updated`;ot&&ot.includes("/bookmarks/")&&(jt=`/workspace/${(qe=ce.activeTeam)==null?void 0:qe.id}/bookmarks/${ot.split("/bookmarks/")[1]}`),D(jt)})},variant:"minimal",className:L.pathname.startsWith(`/workspace/${(hn=ce.activeTeam)==null?void 0:hn.id}/bookmarks/updated`)||L.pathname.startsWith(`/workspace/${(rt=ce.activeTeam)==null?void 0:rt.id}/bookmarks/recently-viewed`)||L.pathname.startsWith(`/workspace/${(et=ce.activeTeam)==null?void 0:et.id}/bookmarks/starred`)?"primary-nav-item primary-nav-item__active zzz !pl-0":"primary-nav-item !pl-0"},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobilez",icon:o.createElement(tf,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Bookmarks"))):null,r&&((zn=(Kt=$==null?void 0:$.globalMeta)==null?void 0:Kt.teams)==null?void 0:zn.length)>0?ce.isAllTeam?o.createElement(De,{onClick:()=>{O(()=>{e.action({type:"sibling-body",subType:"assetlist-fullReset"});let Re="/workspace/all/board";try{const ot=localStorage.getItem("boards_last_opened");if(ot){const{boardID:jt,teamID:En}=JSON.parse(ot);jt&&En&&(Re=`/workspace/all/board/${jt}`)}}catch{}D(Re)})},variant:"minimal",className:L.pathname==="/workspace/all/board"||L.pathname.startsWith("/workspace/all/board/")?"primary-nav-item hd primary-nav-item__active":"primary-nav-item hd"},o.createElement("span",{className:"flex gap-1 items-center hd"},o.createElement(Ft,{className:"mobile",icon:o.createElement(Yp,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Boards"))):o.createElement(De,{onClick:()=>{O(()=>{var jt;e.action({type:"sibling-body",subType:"assetlist-fullReset"});const Re=(jt=ce.activeTeam)==null?void 0:jt.id;let ot=`/workspace/${Re}/board`;try{const En=localStorage.getItem("boards_last_opened");if(En){const{boardID:ar,teamID:ye}=JSON.parse(En);ar&&ye&&ye===Re&&(ot=`/workspace/${ye}/board/${ar}`)}}catch{}D(ot)})},variant:"minimal",className:L.pathname.startsWith(`/workspace/${(xt=ce.activeTeam)==null?void 0:xt.id}/board`)?"primary-nav-item hd primary-nav-item__active":"primary-nav-item hd"},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobile",icon:o.createElement(Yp,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Boards"))):null,s&&((ir=(rr=$==null?void 0:$.globalMeta)==null?void 0:rr.teams)==null?void 0:ir.length)>0?ce.isAllTeam?o.createElement(De,{onClick:()=>{O(()=>{e.action({type:"sibling-body",subType:"assetlist-fullReset"});let Re="/workspace/all/map";try{const ot=localStorage.getItem("maps_last_opened");if(ot){const{mapID:jt,teamID:En}=JSON.parse(ot);jt&&En&&(Re=`/workspace/all/map/${jt}`)}}catch{}D(Re)})},variant:"minimal",className:L.pathname==="/workspace/all/map"||L.pathname.startsWith("/workspace/all/map/")?"primary-nav-item hd primary-nav-item__active":"primary-nav-item hd"},((Ct=(Tn=$==null?void 0:$.globalMeta)==null?void 0:Tn.teams)==null?void 0:Ct.length)>0?o.createElement("span",{className:"flex gap-1 items-center hd"},o.createElement(Ft,{className:"mobile",icon:o.createElement(ay,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Flows")):null):o.createElement(De,{onClick:()=>{O(()=>{var jt;e.action({type:"sibling-body",subType:"assetlist-fullReset"});const Re=(jt=ce.activeTeam)==null?void 0:jt.id;let ot=`/workspace/${Re}/map`;try{const En=localStorage.getItem("maps_last_opened");if(En){const{mapID:ar,teamID:ye}=JSON.parse(En);
1897ar&&ye&&ye===Re&&(ot=`/workspace/${ye}/map/${ar}`)}}catch{}D(ot)})},variant:"minimal",className:L.pathname.startsWith(`/workspace/${(_r=ce.activeTeam)==null?void 0:_r.id}/map`)?"primary-nav-item hd primary-nav-item__active":"primary-nav-item hd"},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobile",icon:o.createElement(ay,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Flows"))):null,a&&((Ce=(Qn=$==null?void 0:$.globalMeta)==null?void 0:Qn.teams)==null?void 0:Ce.length)>0?o.createElement(De,{onClick:()=>{O(()=>{var jt,En,ar,ye,qe,Me;let ot=((jt=ce.activeTeam)==null?void 0:jt.id)||((ye=(ar=(En=$==null?void 0:$.globalMeta)==null?void 0:En.teams)==null?void 0:ar[0])==null?void 0:ye.id);try{const Ve=localStorage.getItem("tables_last_opened");if(Ve){const{teamID:Je}=JSON.parse(Ve);Je&&((Me=(qe=$==null?void 0:$.globalMeta)==null?void 0:qe.teams)==null?void 0:Me.some($e=>$e.id===Je))&&(ot=Je)}}catch{}ot&&D(`/workspace/${ot}/tables`)})},variant:"minimal",className:L.pathname.includes("/tables")?"primary-nav-item hd primary-nav-item__active":"primary-nav-item hd"},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobile",icon:o.createElement(SZ,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Tables"))):null,((pn=(ut=$==null?void 0:$.globalMeta)==null?void 0:ut.teams)==null?void 0:pn.length)>0?ce.isAllTeam?o.createElement(De,{onClick:()=>{O(()=>{e.action({type:"sibling-body",subType:"assetlist-fullReset"}),D("/workspace/all/activity/all")})},variant:"minimal",className:L.pathname==="/workspace/all/activity/all"||L.pathname.startsWith("/workspace/all/activity")?"primary-nav-item primary-nav-item__active":"primary-nav-item"},((In=(Jt=$==null?void 0:$.globalMeta)==null?void 0:Jt.teams)==null?void 0:In.length)>0?o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobile",icon:o.createElement(H6,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Activities")):null):o.createElement(De,{onClick:()=>{O(()=>{var Re;e.action({type:"sibling-body",subType:"assetlist-fullReset"}),D(`/workspace/${(Re=ce.activeTeam)==null?void 0:Re.id}/activity/all`)})},variant:"minimal",className:L.pathname.startsWith(`/workspace/${(Dn=ce.activeTeam)==null?void 0:Dn.id}/activity`)?"primary-nav-item primary-nav-item__active":"primary-nav-item"},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobile",icon:o.createElement(H6,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"hd"},"Activities"))):null),o.createElement(DOe,{external:{action:({type:Re=null,subType:ot=null,dataSet:jt={},callback:En=ta.noop})=>{Re==="request-success"&&e.action({type:"sibling-body",subType:"assetlist-adjustselectedcollectiontags",dataSet:jt})}}}),o.createElement(hD,{variant:"minimal",className:"xs:space-x-1 space-x-0 shrink-0"},((Zt=(or=$==null?void 0:$.globalMeta)==null?void 0:or.teams)==null?void 0:Zt.length)>0&&((st=(tr=$==null?void 0:$.context)==null?void 0:tr.team_projects_edit_team_map)!=null&&st[(Fe=ce.activeTeam)==null?void 0:Fe.id])?o.createElement(De,{className:"add-bookmark primary-nav-item",onClick:()=>{var Re,ot;ue({targetType:"AddAsset"}),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Add Asset - Click",codeName:"user-ui-header-action-button-addasset-click",properties:{active_team:(ot=ce.activeTeam)==null?void 0:ot.id}})}},o.createElement("span",{className:"flex items-center gap-1.5"},o.createElement(Q6,{size:16}),o.createElement("span",{className:"hd text-sm dark:text-white font-size-[13px]"},"Bookmark It"))):null,!ce.isAllTeam&&ce.activeTeam&&be&&(((gt=$==null?void 0:$.context)==null?void 0:gt.organization_manage_edit)||((We=(ht=$==null?void 0:$.context)==null?void 0:ht.team_invitations_create_team_map)==null?void 0:We[(Ee=ce.activeTeam)==null?void 0:Ee.id]))&&o.createElement(Hr,{content:o.createElement(AOe,{activeTeam:ce.activeTeam}),placement:"bottom",popoverClassName:"bp5-popover-content-sizing invitation-popover"},o.createElement(De,{variant:"minimal",className:"hd primary-nav-item"},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{className:"mobile",icon:o.createElement(uc,{size:16,strokeWidth:1.5})}),o.createElement("span",{className:"text-sm dark:text-white font-size-[13px]"},"Invite")))),o.createElement(Hr,{minimal:!0,placement:"bottom-end",boundary:"viewport",content:o.createElement(Cr,{className:"row-actions row-actions__menu"},o.createElement(Bt,{to:"/account/profile",className:"bp6-submenu",icon:o.createElement(z6,{size:16,strokeWidth:1.5}),text:`${(it=$==null?void 0:$.user)==null?void 0:it.email}`,onClick:()=>{O(()=>D("/account/profile"))}}),o.createElement(Bt,{className:"bp6-submenu",icon:o.createElement(_Z,{size:16}),text:"Join Workspace",onClick:()=>{O(()=>{var Re;D("/workspace/join"),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Join Team - Click",codeName:"user-ui-header-action-button-jointeam-click"})})}}),(_t=$==null?void 0:$.context)!=null&&_t.organization_manage_edit?o.createElement(Bt,{to:"/workspace/add",className:"bp6-submenu",icon:o.createElement(zs,{size:16}
1897),text:"Create Workspace",onClick:()=>{O(()=>{var Re;D("/workspace/add"),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Add Team (Team) - Click",codeName:"user-ui-header-action-button-addteam_team-click"})})}}):o.createElement(Bt,{to:"/add-organization",className:"bp6-submenu",icon:o.createElement(zs,{size:16}),text:"Create Workspace",onClick:()=>{O(()=>{var Re;D("/add-organization"),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Add Team (Organization) - Click",codeName:"user-ui-header-action-button-addteam_organization-click"})})}}),((An=(vn=$==null?void 0:$.globalMeta)==null?void 0:vn.teams)==null?void 0:An.length)>0?o.createElement(Bt,{icon:o.createElement(uc,{size:16}),text:"Workspaces"},(((je=$==null?void 0:$.globalMeta)==null?void 0:je.teams)||[]).slice().sort((Re,ot)=>Re.is_personal&&!ot.is_personal?-1:!Re.is_personal&&ot.is_personal?1:(Re.name||"").localeCompare(ot.name||"")).map(Re=>{var ar,ye,qe;const ot=(ye=(ar=$==null?void 0:$.context)==null?void 0:ar.team_manage_owner_map)==null?void 0:ye[Re.id],jt=(((qe=$==null?void 0:$.globalMeta)==null?void 0:qe.teams)||[]).length>1,En=Re.is_personal?" (Private)":ot&&jt?" (Owner)":"";return o.createElement(Cr,{className:"row-actions__submenu profile_team_menuitem",key:Re.id},o.createElement(Bt,{onClick:()=>_e(Re,"manage"),icon:Re.is_personal?o.createElement(jd,{size:16,color:is.getColor(Re.id),strokeWidth:1.75}):o.createElement(uc,{size:16,color:is.getColor(Re.id)}),className:"container max-w-[400px] text-ellipsis overflow-hidden whitespace-nowrap",text:`${jo(Re)}${En}`}))})):null,(kt=$==null?void 0:$.context)!=null&&kt.organization_manage_edit&&((Be=(ne=(Lt=$==null?void 0:$.context)==null?void 0:Lt.organization_manage_edit_list)==null?void 0:ne[0])!=null&&Be.id)?o.createElement(Bt,{icon:o.createElement(F6,{size:16}),text:"Billings"},o.createElement(Cr,{className:"row-actions__submenu"},o.createElement(Bt,{to:`/organization/${(vt=(we=(mt=$==null?void 0:$.context)==null?void 0:mt.organization_manage_edit_list)==null?void 0:we[0])==null?void 0:vt.id}/manage`,icon:o.createElement(F6,{size:16}),text:"Manage Organization",onClick:()=>{O(()=>{var Re,ot,jt,En;D({pathname:Pn("/organization/:organizationID/manage",{organizationID:(jt=(ot=(Re=$==null?void 0:$.context)==null?void 0:Re.organization_manage_edit_list)==null?void 0:ot[0])==null?void 0:jt.id})}),Jn.analyticsTrack({userId:(En=$==null?void 0:$.user)==null?void 0:En.uid,event:"Header - Manage Organization - Click",codeName:"user-ui-header-action-button-manageorganization-click"})})}}),o.createElement(Bt,{onClick:()=>O(()=>{var Re,ot,jt;D({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:(jt=(ot=(Re=$==null?void 0:$.context)==null?void 0:Re.organization_manage_edit_list)==null?void 0:ot[0])==null?void 0:jt.id})})}),icon:o.createElement(cIe,{size:16}),text:"Subscription"}),(lt=q6($,(Ne=(fn=(It=$==null?void 0:$.context)==null?void 0:It.organization_manage_edit_list)==null?void 0:fn[0])==null?void 0:Ne.id))!=null&<.has_invoices?o.createElement(Bt,{onClick:()=>{var Re,ot,jt;return M((jt=(ot=(Re=$==null?void 0:$.context)==null?void 0:Re.organization_manage_edit_list)==null?void 0:ot[0])==null?void 0:jt.id)},className:"bp6-submenu",icon:o.createElement(PIe,{size:16}),text:"Billing & Payments"}):null,(ln=q6($,(St=(Ke=(wt=$==null?void 0:$.context)==null?void 0:wt.organization_manage_edit_list)==null?void 0:Ke[0])==null?void 0:St.id))!=null&&ln.has_invoices?o.createElement(Bt,{onClick:()=>{var Re,ot,jt;return D({pathname:Pn("/organization/:organizationID/invoices",{organizationID:(jt=(ot=(Re=$==null?void 0:$.context)==null?void 0:Re.organization_manage_edit_list)==null?void 0:ot[0])==null?void 0:jt.id})})},className:"bp6-submenu",icon:o.createElement(_Ie,{size:16}),text:"Invoice"}):null)):null,o.createElement(Bt,{to:"/import",className:"bp6-submenu",icon:o.createElement(Yu,{size:16,strokeWidth:1.5}),text:"Import",onClick:()=>{O(()=>{var ot;if(typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window)){const En=String("https://bookmark.it.com").replace(/\/$/,"")||"",ar=En?`${En}/import?from=tauri`:"https://bookmark.it.com/import?from=tauri";yn(()=>function(){return(qe=>import(qe))("./index.a906e697.js")}(),[]).then(({openUrl:ye})=>ye(ar)).catch(ye=>{console.error("Failed to open /import in default browser",ye)})}else D("/import");Jn.analyticsTrack({userId:(ot=$==null?void 0:$.user)==null?void 0:ot.uid,event:"Header - Import Bookmarks - Click",codeName:"user-ui-header-action-button-import-bookmarks-click"})})}}),o.createElement(Bt,{to:"/Support",className:"bp6-submenu",icon:o.createElement(lIe,{size:16}),text:"Support",onClick:()=>{O(()=>{var Re;D("/account/support"),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Support - Click",codeName:"user-ui-header-action-button-support-click"})})}}),o.createElement(Bt,{onClick:()=>{O(()=>{var Re;localStorage.removeItem("maps_last_opened"),localStorage.removeItem("it8-assets-hide-thumbnail"),Dy(Ki),re.dispatch("login-freeup"),setTimeout(()=>{D("/login")},500),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Logout - Click",codeName:"user-ui-header-action-button-logout-click"})})},icon:o.createElement(yIe,{size:16}),text:"Logout"}))},o.createElement(De,{icon:o.createElement(z6,{size:16,strokeWidth:1.5}),className:"primary-nav-item"})),C?o.createElement(De,{icon:o.createElement(hb,{size:16}),title:"Internal admin","aria-label":"Internal admin",onClick:()=>{O(()=>{var Re;D("/admin"),Jn.analyticsTrack({userId:(Re=$==null?void 0:$.user)==null?void 0:Re.uid,event:"Header - Internal admin - Click",codeName:"user-ui-header-internal-admin-click"})})},className:"primary-nav-item"}):null)),((Yn=(vr=$==null?void 0:$.globalMeta)==null?void 0:vr.teams)==null?void 0:Yn.length)>0?o.createElement(XZ,{targetType:d,targetAsset:m,targetIteration:g,targetRestoreState:y,teamID:(Cn=ce==null?void 0:ce.activeTeam)==null?void 0:Cn.id,isDrawerOpen:i,forceRefresh:c,handleSuccessfulSave:({actionType:Re,asset:ot})=>{var jt;e.action({type:"sibling-body",subType:"assetlist-refreshtable",dataSet:{isOptimistic:!0,actionType:Re,asset:ot}}),re.dispatch("sidepanel-asset-saved",{actionType:Re,asset:ot}
1897),Re==="add"&&(ot!=null&&ot.$team_id)&&!he.isAllWorkspaces&&((jt=he.activeTeam)!=null&&jt.id)&&ot.$team_id!==he.activeTeam.id&&he.selectAllWorkspaces()},handleCloseDrawer:({targetAsset:Re,targetIteration:ot,targetType:jt,teamID:En})=>Ae()}):null,o.createElement(xg,{cancelButtonText:"Cancel",confirmButtonText:"Proceed",icon:"warning-sign",intent:jr.DANGER,isOpen:x,onCancel:()=>{S(!1),k(null)},onConfirm:T},o.createElement("p",null,"You have ",E.count," bookmark",E.count>1?"s":""," selected. Navigating away will clear your selections and exit management mode. Proceed?")));if((Hn=$==null?void 0:$.user)!=null&&Hn.uid&&!j)return W},J6=()=>{const[e,t]=p.useState(null),[n,r]=p.useState(!1),[a,s]=p.useState(null),[i,l]=p.useState(null);let c=xs().teamID;const u=({forceUpdate:f=!1}={})=>ec.getAllAssets({teamID:c,forceUpdate:f,filterSet:[{key:"type",value:"prototypes"}]}).then(({is_syncing:m,list:h,last_download_time:g,$get_upcoming_list:v})=>{t(h),s(g),m&&(r(!0),v.then(({list:y})=>{t(y),r(!1),s(null)}))});return p.useEffect(()=>{u()},[c]),o.createElement("div",{className:"asset-list"},o.createElement(xi,{className:"sort-filter-nav table-header flex items-center justify-between fixed top-[50px] container"},o.createElement(xi.Group,{align:"left"},o.createElement("span",null,"Prototype options")),o.createElement(xi.Group,{align:"right"},o.createElement("div",{className:"flex items-center gap-2"},n?o.createElement(XTe,null):o.createElement("div",{className:"flex items-center"},o.createElement(Hr,{enforceFocus:!1,placement:"left-end",interactionKind:"hover",content:o.createElement("div",null,a?o.createElement("div",null,o.createElement("span",null,"Last synced"),o.createElement("span",null,Ht(a*1e3).format("MM/DD/YY h:mm:ss A"))):null)},o.createElement("span",{className:"mr-1"},"Sync")),o.createElement(fr,{compact:!0,usePortal:!1,content:"Sync now",placement:"bottom-end"},o.createElement(De,{minimal:!0,onClick:()=>u({forceUpdate:!0}),icon:o.createElement(Hd,{size:12})}))))," ")),o.createElement("div",{className:"container fixed top-[100px] w-full flex flex-col bg-gray-950"},o.createElement("div",{className:"flex columns-2"},o.createElement("aside",{className:"w-1/6 bg-gray-50 dark:bg-gray-800 dark:text-gray-300 sm:w-1/4 md:w-1/5 lg:w-1/6"},o.createElement("div",{className:"prototype-list h-screen overflow-auto flex flex-col",style:{paddingBottom:"300px"}},e==null?void 0:e.map(f=>o.createElement(jn,{key:f.$id,compact:"true",interactive:!1,elevation:qn.Zero,className:"dark:bg-gray-900 dark:text-gray-300 py-2 px-4 group"},o.createElement("div",{className:"flex items-center items-start justify-between gap-2"},o.createElement("a",{onClick:()=>{var m;return l((m=f.active_iteration)==null?void 0:m.url)},className:"break-all"},f.name),o.createElement(Hr,{className:"opacity-0 group-hover:opacity-100",minimal:!0,placement:"bottom-start",content:o.createElement("div",{className:"flex flex-col gap-2 p-2"},o.createElement("span",null,"Add version"),o.createElement("span",null,"Version History (n)"),o.createElement("span",null,"Copy Shortlink"),o.createElement("span",null,"Edit"),o.createElement("span",null,"Add to Collection"),o.createElement("span",null,"Delete"))},o.createElement(De,{variant:"minimal"},o.createElement(Ft,{icon:o.createElement(hge,{size:14}),size:16,intent:"primary"})))),o.createElement("div",{className:"collection-n-tags flex flex-wrap gap-1"},o.createElement("span",{className:"bp6-popover-target text__dark"},o.createElement("a",{href:""},o.createElement("span",{className:"bp6-tag bp6-minimal collection-badge"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark:text-gray-500"},"Lorem Ipsum")))),o.createElement("span",{className:"bp6-popover-target text__dark"},o.createElement("a",{href:""},o.createElement("span",{className:"bp6-tag bp6-minimal collection-badge"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark:text-gray-500"},"Dolor Sit"))))),o.createElement("div",{className:"flex flex-wrap gap-1"},o.createElement("ul",null,o.createElement("li",null,"Related prototype"),o.createElement("li",null,"Related prototype"),o.createElement("li",null,"Related prototype"))))))),o.createElement("main",{role:"main",className:"w-full sm:w-3/4 md:w-4/5 lg:w-5/6"},i?o.createElement("iframe",{className:"xs:h-screen sm:h-screen w-full",allowFullScreen:"",src:i}):o.createElement("div",{className:"text-white"},"Select an asset")))))},ll=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches);return p.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia("(prefers-color-scheme: dark)"),r=a=>t(a.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e},pL=p.createContext({});function gL(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const cX=typeof window<"u",uX=cX?p.useLayoutEffect:p.useEffect,oS=p.createContext(null);function vL(e,t){e.indexOf(t)===-1&&e.push(t)}function yL(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}
vendor: 9,591 bytes, line 1897
1897const ru=(e,t,n)=>n>t?t:n<e?e:n;function e9(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let gb=()=>{},Tm=()=>{};var HH;typeof process<"u"&&((HH=process.env)==null?void 0:HH.NODE_ENV)!=="production"&&(gb=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(e9(t,n))},Tm=(e,t,n)=>{if(!e)throw new Error(e9(t,n))});const rd={},dX=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function fX(e){return typeof e=="object"&&e!==null}const mX=e=>/^0[^.\s]+$/u.test(e);function bL(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ml=e=>e,iMe=(e,t)=>n=>t(e(n)),vb=(...e)=>e.reduce(iMe),ly=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class wL{constructor(){this.subscriptions=[]}add(t){return vL(this.subscriptions,t),()=>yL(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let s=0;s<a;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qc=e=>e*1e3,Tl=e=>e/1e3;function hX(e,t){return t?e*(1e3/t):0}const pX=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oMe=1e-7,lMe=12;function cMe(e,t,n,r,a){let s,i,l=0;do i=t+(n-t)/2,s=pX(i,r,a)-e,s>0?n=i:t=i;while(Math.abs(s)>oMe&&++l<lMe);return i}function yb(e,t,n,r){if(e===t&&n===r)return Ml;const a=s=>cMe(s,0,1,e,n);return s=>s===0||s===1?s:pX(a(s),t,r)}const gX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vX=e=>t=>1-e(1-t),yX=yb(.33,1.53,.69,.99),EL=vX(yX),bX=gX(EL),wX=e=>(e*=2)<1?.5*EL(e):.5*(2-Math.pow(2,-10*(e-1))),xL=e=>1-Math.sin(Math.acos(e)),EX=vX(xL),xX=gX(xL),uMe=yb(.42,0,1,1),dMe=yb(0,0,.58,1),_X=yb(.42,0,.58,1),fMe=e=>Array.isArray(e)&&typeof e[0]!="number",kX=e=>Array.isArray(e)&&typeof e[0]=="number",t9={linear:Ml,easeIn:uMe,easeInOut:_X,easeOut:dMe,circIn:xL,circInOut:xX,circOut:EX,backIn:EL,backInOut:bX,backOut:yX,anticipate:wX},mMe=e=>typeof e=="string",n9=e=>{if(kX(e)){Tm(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,a]=e;return yb(t,n,r,a)}else if(mMe(e))return Tm(t9[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),t9[e];return e},N1=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],r9={value:null,addProjectionMetrics:null};function hMe(e,t){let n=new Set,r=new Set,a=!1,s=!1;const i=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(f){i.has(f)&&(d.schedule(f),e()),c++,f(l)}const d={schedule:(f,m=!1,h=!1)=>{const v=h&&a?n:r;return m&&i.add(f),v.has(f)||v.add(f),f},cancel:f=>{r.delete(f),i.delete(f)},process:f=>{if(l=f,a){s=!0;return}a=!0,[n,r]=[r,n],n.forEach(u),t&&r9.value&&r9.value.frameloop[t].push(c),c=0,n.clear(),a=!1,s&&(s=!1,d.process(f))}};return d}const pMe=40;function SX(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=N1.reduce((w,x)=>(w[x]=hMe(s,t?x:void 0),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:m,render:h,postRender:g}=i,v=()=>{const w=rd.useManualTiming?a.timestamp:performance.now();n=!1,rd.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(w-a.timestamp,pMe),1)),a.timestamp=w,a.isProcessing=!0,l.process(a),c.process(a),u.process(a),d.process(a),f.process(a),m.process(a),h.process(a),g.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(v))},y=()=>{n=!0,r=!0,a.isProcessing||e(v)};return{schedule:N1.reduce((w,x)=>{const S=i[x];return w[x]=(N,k=!1,C=!1)=>(n||y(),S.schedule(N,k,C)),w},{}),cancel:w=>{for(let x=0;x<N1.length;x++)i[N1[x]].cancel(w)},state:a,steps:i}}const{schedule:Fa,cancel:nf,state:ri,steps:N2}=SX(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ml,!0);let $w;function gMe(){$w=void 0}const Wi={now:()=>($w===void 0&&Wi.set(ri.isProcessing||rd.useManualTiming?ri.timestamp:performance.now()),$w),set:e=>{$w=e,queueMicrotask(gMe)}},CX=e=>t=>typeof t=="string"&&t.startsWith(e),NX=CX("--"),vMe=CX("var(--"),_L=e=>vMe(e)?yMe.test(e.split("/*")[0].trim()):!1,yMe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function a9(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Dg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},cy={...Dg,transform:e=>ru(0,1,e)},R1={...Dg,default:1},iv=e=>Math.round(e*1e5)/1e5,kL=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bMe(e){return e==null}const wMe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,SL=(e,t)=>n=>!!(typeof n=="string"&&wMe.test(n)&&n.startsWith(e)||t&&!bMe(n)&&Object.prototype.hasOwnProperty.call(n,t)),RX=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,s,i,l]=r.match(kL);return{[e]:parseFloat(a),[t]:parseFloat(s),[n]:parseFloat(i),alpha:l!==void 0?parseFloat(l):1}},EMe=e=>ru(0,255,e),R2={...Dg,transform:e=>Math.round(EMe(e))},qf={test:SL("rgb","red"),parse:RX("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+R2.transform(e)+", "+R2.transform(t)+", "+R2.transform(n)+", "+iv(cy.transform(r))+")"};function xMe(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const QI={test:SL("#"),parse:xMe,transform:qf.transform},bb=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kd=bb("deg"),Yc=bb("%"),Vn=bb("px"),_Me=bb("vh"),kMe=bb("vw"),s9=(()=>({...Yc,parse:e=>Yc.parse(e)/100,transform:e=>Yc.transform(e*100)}))(),Ih={test:SL("hsl","hue"),parse:RX("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yc.transform(iv(t))+", "+Yc.transform(iv(n))+", "+iv(cy.transform(r))+")"},ks={test:e=>qf.test(e)||QI.test(e)||Ih.test(e),parse:e=>qf.test(e)?qf.parse(e):Ih.test(e)?Ih.parse(e):QI.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qf.transform(e):Ih.transform(e),getAnimatableNone:e=>{const t=ks.parse(e);return t.alpha=0,ks.transform(t)}},SMe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function CMe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kL))==null?void 0:t.length)||0)+(((n=e.match(SMe))==null?void 0:n.length)||0)>0}const TX="number",AX="color",NMe="var",RMe="var(",i9="${}",TMe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function uy(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let s=0;const l=t.replace(TMe,c=>(ks.test(c)?(r.color.push(s),a.push(AX),n.push(ks.parse(c))):c.startsWith(RMe)?(r.var.push(s),a.push(NMe),n.push(c)):(r.number.push(s),a.push(TX),n.push(parseFloat(c))),++s,i9)).split(i9);return{values:n,split:l,indexes:r,types:a}}function IX(e){return uy(e).values}function OX(e){const{split:t,types:n}=uy(e),r=t.length;return a=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],a[i]!==void 0){const l=n[i];l===TX?s+=iv(a[i]):l===AX?s+=ks.transform(a[i]):s+=a[i]}return s}}const AMe=e=>typeof e=="number"?0:ks.test(e)?ks.getAnimatableNone(e):e;function IMe(e){const t=IX(e);return OX(e)(t.map(AMe))}const rf={test:CMe,parse:IX,createTransformer:OX,getAnimatableNone:IMe};function T2(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function OMe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,s=0,i=0;if(!t)a=s=i=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;a=T2(c,l,e+1/3),s=T2(c,l,e),i=T2(c,l,e-1/3)}return{red:Math.round(a*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Rx(e,t){return n=>n>0?t:e}const rs=(e,t,n)=>e+(t-e)*n,A2=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},MMe=[QI,qf,Ih],PMe=e=>MMe.find(t=>t.test(e));function o9(e){const t=PMe(e);if(gb(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ih&&(n=OMe(n)),n}const l9=(e,t)=>{const n=o9(e),r=o9(t);if(!n||!r)return Rx(e,t);const a={...n};return s=>(a.red=A2(n.red,r.red,s),a.green=A2(n.green,r.green,s),a.blue=A2(n.blue,r.blue,s),a.alpha=rs(n.alpha,r.alpha,s),qf.transform(a))},JI=new Set(["none","hidden"]);function DMe(e,t){return JI.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function LMe(e,t){return n=>rs(e,t,n)}function CL(e){return typeof e=="number"?LMe:typeof e=="string"?_L(e)?Rx:ks.test(e)?l9:zMe:Array.isArray(e)?MX:typeof e=="object"?ks.test(e)?l9:$Me:Rx}function MX(e,t){const n=[...e],r=n.length,a=e.map((s,i)=>CL(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=a[i](s);return n}}function $Me(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=CL(e[a])(e[a],t[a]));return a=>{for(const s in r)n[s]=r[s](a);return n}}function FMe(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const s=t.types[a],i=e.indexes[s][r[s]],l=e.values[i]??0;n[a]=l,r[s]++}return n}const zMe=(e,t)=>{const n=rf.createTransformer(t),r=uy(e),a=uy(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?JI.has(e)&&!a.values.length||JI.has(t)&&!r.values.length?DMe(e,t):vb(MX(FMe(r,a),a.values),n):(gb(!0,`Complex values '${e}' and '${t}
1897' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Rx(e,t))};function PX(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rs(e,t,n):CL(e)(e,t)}const HMe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Fa.update(t,n),stop:()=>nf(t),now:()=>ri.isProcessing?ri.timestamp:Wi.now()}},DX=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let s=0;s<a;s++)r+=Math.round(e(s/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Tx=2e4;function NL(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Tx;)t+=n,r=e.next(t);return t>=Tx?1/0:t}function VMe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(NL(r),Tx);return{type:"keyframes",ease:s=>r.next(a*s).value/t,duration:Tl(a)}}const UMe=5;function LX(e,t,n){const r=Math.max(t-UMe,0);return hX(n-e(r),t-r)}const ts={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},I2=.001;function BMe({duration:e=ts.duration,bounce:t=ts.bounce,velocity:n=ts.velocity,mass:r=ts.mass}){let a,s;gb(e<=qc(ts.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=ru(ts.minDamping,ts.maxDamping,i),e=ru(ts.minDuration,ts.maxDuration,Tl(e)),i<1?(a=u=>{const d=u*i,f=d*e,m=d-n,h=eO(u,i),g=Math.exp(-f);return I2-m/h*g},s=u=>{const f=u*i*e,m=f*n+n,h=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-f),v=eO(Math.pow(u,2),i);return(-a(u)+I2>0?-1:1)*((m-h)*g)/v}):(a=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-I2+d*f},s=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=WMe(a,s,l);if(e=qc(e),isNaN(c))return{stiffness:ts.stiffness,damping:ts.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const jMe=12;function WMe(e,t,n){let r=n;for(let a=1;a<jMe;a++)r=r-e(r)/t(r);return r}function eO(e,t){return e*Math.sqrt(1-t*t)}const GMe=["duration","bounce"],qMe=["stiffness","damping","mass"];function c9(e,t){return t.some(n=>e[n]!==void 0)}function YMe(e){let t={velocity:ts.velocity,stiffness:ts.stiffness,damping:ts.damping,mass:ts.mass,isResolvedFromDuration:!1,...e};if(!c9(e,qMe)&&c9(e,GMe))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,s=2*ru(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:ts.mass,stiffness:a,damping:s}}else{const n=BMe(e);t={...t,...n,mass:ts.mass},t.isResolvedFromDuration=!0}return t}function Ax(e=ts.visualDuration,t=ts.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:f,velocity:m,isResolvedFromDuration:h}=YMe({...n,velocity:-Tl(n.velocity||0)}),g=m||0,v=u/(2*Math.sqrt(c*d)),y=i-s,b=Tl(Math.sqrt(c/d)),E=Math.abs(y)<5;r||(r=E?ts.restSpeed.granular:ts.restSpeed.default),a||(a=E?ts.restDelta.granular:ts.restDelta.default);let w;if(v<1){const S=eO(b,v);w=N=>{const k=Math.exp(-v*b*N);return i-k*((g+v*b*y)/S*Math.sin(S*N)+y*Math.cos(S*N))}}else if(v===1)w=S=>i-Math.exp(-b*S)*(y+(g+b*y)*S);else{const S=b*Math.sqrt(v*v-1);w=N=>{const k=Math.exp(-v*b*N),C=Math.min(S*N,300);return i-k*((g+v*b*y)*Math.sinh(C)+S*y*Math.cosh(C))/S}}const x={calculatedDuration:h&&f||null,next:S=>{const N=w(S);if(h)l.done=S>=f;else{let k=S===0?g:0;v<1&&(k=S===0?qc(g):LX(w,S,N));const C=Math.abs(k)<=r,A=Math.abs(i-N)<=a;l.done=C&&A}return l.value=l.done?i:N,l},toString:()=>{const S=Math.min(NL(x),Tx),N=DX(k=>x.next(S*k).value,S,30);return S+"ms "+N},toTransition:()=>{}};return x}Ax.applyToOptions=e=>{const t=VMe(e,100,Ax);return e.ease=t.ease,e.duration=qc(t.duration),e.type="keyframes",e};function tO({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:s=500,modifyTarget:i,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},h=C=>l!==void 0&&C<l||c!==void 0&&C>c,g=C=>l===void 0?c:c===void 0||Math.abs(l-C)<Math.abs(c-C)?l:c;let v=n*t;const y=f+v,b=i===void 0?y:i(y);b!==y&&(v=b-f);const E=C=>-v*Math.exp(-C/r),w=C=>b+E(C),x=C=>{const A=E(C),O=w(C);m.done=Math.abs(A)<=u,m.value=m.done?b:O};let S,N;const k=C=>{h(m.value)&&(S=C,N=Ax({keyframes:[m.value,g(m.value)],velocity:LX(w,C,m.value),damping:a,stiffness:s,restDelta:u,restSpeed:d}))};return k(0),{calculatedDuration:null,next:C=>{let A=!1;return!N&&S===void 0&&(A=!0,x(C),k(C)),S!==void 0&&C>=S?N.next(C-S):(!A&&x(C),m)}}}function KMe(e,t,n){const r=[],a=n||rd.mix||PX,s=e.length-1;for(let i=0;i<s;i++){let l=a(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||Ml:t;l=vb(c,l)}r.push(l)}return r}function ZMe(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const s=e.length;if(Tm(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=KMe(t,r,a),c=l.length,u=d=>{if(i&&d<e[0])return t[0];let f=0;if(c>1)for(;
vendor: 9,451 bytes, line 1897
1897f<e.length-2&&!(d<e[f+1]);f++);const m=ly(e[f],e[f+1],d);return l[f](m)};return n?d=>u(ru(e[0],e[s-1],d)):u}function XMe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=ly(0,t,r);e.push(rs(n,1,a))}}function QMe(e){const t=[0];return XMe(t,e.length-1),t}function JMe(e,t){return e.map(n=>n*t)}function ePe(e,t){return e.map(()=>t||_X).splice(0,e.length-1)}function ov({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=fMe(r)?r.map(n9):n9(r),s={done:!1,value:t[0]},i=JMe(n&&n.length===t.length?n:QMe(t),e),l=ZMe(i,t,{ease:Array.isArray(a)?a:ePe(t,a)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const tPe=e=>e!==null;function RL(e,{repeat:t,repeatType:n="loop"},r,a=1){const s=e.filter(tPe),l=a<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!l||r===void 0?s[l]:r}const nPe={decay:tO,inertia:tO,tween:ov,keyframes:ov,spring:Ax};function $X(e){typeof e.type=="string"&&(e.type=nPe[e.type])}class TL{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const rPe=e=>e/100;class AL extends TL{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,a;const{motionValue:n}=this.options;n&&n.updatedAt!==Wi.now()&&this.tick(Wi.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;$X(t);const{type:n=ov,repeat:r=0,repeatDelay:a=0,repeatType:s,velocity:i=0}=t;let{keyframes:l}=t;const c=n||ov;c!==ov&&typeof l[0]!="number"&&(this.mixKeyframes=vb(rPe,PX(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});s==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=NL(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:a,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:h,type:g,onUpdate:v,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?b<0:b>a;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let w=this.currentTime,x=r;if(f){const C=Math.min(this.currentTime,a)/l;let A=Math.floor(C),O=C%1;!O&&C>=1&&(O=1),O===1&&A--,A=Math.min(A,f+1),!!(A%2)&&(m==="reverse"?(O=1-O,h&&(O-=h/l)):m==="mirror"&&(x=i)),w=ru(0,1,O)*l}const S=E?{done:!1,value:d[0]}:x.next(w);s&&(S.value=s(S.value));let{done:N}=S;!E&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return k&&g!==tO&&(S.value=RL(d,this.options,y,this.speed)),v&&v(S.value),k&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Tl(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tl(t)}get time(){return Tl(this.currentTime)}set time(t){var n;t=qc(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Wi.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Tl(this.currentTime))}play(){var a,s;if(this.isStopped)return;const{driver:t=HMe,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(a=this.options).onPlay)==null||s.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Wi.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function aPe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yf=e=>e*180/Math.PI,nO=e=>{const t=Yf(Math.atan2(e[1],e[0]));return rO(t)},sPe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:nO,rotateZ:nO,skewX:e=>Yf(Math.atan(e[1])),skewY:e=>Yf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rO=e=>(e=e%360,e<0&&(e+=360),e),u9=nO,d9=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),f9=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),iPe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:d9,scaleY:f9,scale:e=>(d9(e)+f9(e))/2,rotateX:e=>rO(Yf(Math.atan2(e[6],e[5]))),rotateY:e=>rO(Yf(Math.atan2(-e[2],e[0]))),rotateZ:u9,rotate:u9,skewX:e=>Yf(Math.atan(e[4])),skewY:e=>Yf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function aO(e){return e.includes("scale")?1:0}function sO(e,t){if(!e||e==="none")return aO(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=iPe,a=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=sPe,a=l}if(!a)return aO(t);const s=r[t],i=a[1].split(",").map(lPe);return typeof s=="function"?s(i):i[s]}const oPe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sO(n,t)};function lPe(e){return parseFloat(e.trim())}const Lg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$g=(()=>new Set(Lg))(),m9=e=>e===Dg||e===Vn,cPe=new Set(["x","y","z"]),uPe=Lg.filter(e=>!cPe.has(e));function dPe(e){const t=[];return uPe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Pd={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>sO(t,"x"),y:(e,{transform:t})=>sO(t,"y")};Pd.translateX=Pd.x;Pd.translateY=Pd.y;const om=new Set;let iO=!1,oO=!1,lO=!1;function FX(){if(oO){const e=Array.from(om).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=dPe(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([s,i])=>{var l;(l=r.getValue(s))==null||l.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}oO=!1,iO=!1,om.forEach(e=>e.complete(lO)),om.clear()}function zX(){om.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(oO=!0)})}function fPe(){lO=!0,zX(),FX(),lO=!1}class IL{constructor(t,n,r,a,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(om.add(this),iO||(iO=!0,Fa.read(zX),Fa.resolveKeyframes(FX))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const s=a==null?void 0:a.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,i);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=i),a&&s===void 0&&a.set(t[0])}aPe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),om.delete(this)}cancel(){this.state==="scheduled"&&(om.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const mPe=e=>e.startsWith("--");function hPe(e,t,n){mPe(t)?e.style.setProperty(t,n):e.style[t]=n}const pPe=bL(()=>window.ScrollTimeline!==void 0),gPe={};function vPe(e,t){const n=bL(e);return()=>gPe[t]??n()}const HX=vPe(()=>{try{document.createElement("div").animate({opacity:0}
1897,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),D0=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,h9={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:D0([0,.65,.55,1]),circOut:D0([.55,0,1,.45]),backIn:D0([.31,.01,.66,-.59]),backOut:D0([.33,1.53,.69,.99])};function VX(e,t){if(e)return typeof e=="function"?HX()?DX(e,t):"ease-out":kX(e)?D0(e):Array.isArray(e)?e.map(n=>VX(n,t)||h9.easeOut):h9[e]}function yPe(e,t,n,{delay:r=0,duration:a=300,repeat:s=0,repeatType:i="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=VX(l,a);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(d,m)}function UX(e){return typeof e=="function"&&"applyToOptions"in e}function bPe({type:e,...t}){return UX(e)&&HX()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wPe extends TL{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,Tm(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=bPe(t);this.animation=yPe(n,r,a,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=RL(a,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):hPe(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,a;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((a=(r=this.animation).commitStyles)==null||a.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Tl(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tl(t)}get time(){return Tl(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=qc(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&pPe()?(this.animation.timeline=t,Ml):n(this)}}const BX={anticipate:wX,backInOut:bX,circInOut:xX};function EPe(e){return e in BX}function xPe(e){typeof e.ease=="string"&&EPe(e.ease)&&(e.ease=BX[e.ease])}const O2=10;class _Pe extends wPe{constructor(t){xPe(t),$X(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new AL({...i,autoplay:!1}),c=Math.max(O2,Wi.now()-this.startTime),u=ru(0,O2,c-O2);n.setWithVelocity(l.sample(Math.max(0,c-u)).value,l.sample(c).value,u),l.stop()}}const p9=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(rf.test(e)||e==="0")&&!e.startsWith("url("));function kPe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function SPe(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=p9(a,t),l=p9(s,t);return gb(i===l,`You are trying to animate ${t} from "${a}" to "${s}". "${i?s:a}" is not an animatable value.`,"value-not-animatable"),!i||!l?!1:kPe(e)||(n==="spring"||UX(n))&&r}function cO(e){e.duration=0,e.type="keyframes"}const CPe=new Set(["opacity","clipPath","filter","transform"]),NPe=bL(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function RPe(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:s,type:i}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return NPe()&&n&&CPe.has(n)&&(n!=="transform"||!u)&&!c&&!r&&a!=="mirror"&&s!==0&&i!=="inertia"}const TPe=40;class APe extends TL{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:i="loop",keyframes:l,name:c,motionValue:u,element:d,...f}){var g;super(),this.stop=()=>{var v,y;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=Wi.now();const m={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:s,repeatType:i,name:c,motionValue:u,element:d,...f},h=(d==null?void 0:d.KeyframeResolver)||IL;this.keyframeResolver=new h(l,(v,y,b)=>this.onKeyframesResolved(v,y,m,!b),c,u,d),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,a){var y,b;this.keyframeResolver=void 0;const{name:s,type:i,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Wi.now(),SPe(t,s,i,l)||((rd.instantAnimations||!c)&&(d==null||d(RL(t,r,n))),t[0]=t[t.length-1],cO(r),r.repeat=0);const m={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>TPe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&RPe(m),g=(b=(y=m.motionValue)==null?void 0:y.owner)==null?void 0:b.current,v=h?new _Pe({...m,element:g}):new AL(m);v.finished.then(()=>{this.notifyFinished()}).catch(Ml),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),fPe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function jX(e,t,n,r=0,a=1){const s=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),i=e.size,l=(i-1)*r;return typeof n=="function"?n(s,i):a===1?s*r:l-s*r}const IPe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function OPe(e){const t=IPe.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}const MPe=4;function WX(e,t,n=1){Tm(n<=MPe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,a]=OPe(e);
vendor: 17,043 bytes, line 1897
1897if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return dX(i)?parseFloat(i):i}return _L(a)?WX(a,t,n+1):a}const PPe={type:"spring",stiffness:500,damping:25,restSpeed:10},DPe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LPe={type:"keyframes",duration:.8},$Pe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},FPe=(e,{keyframes:t})=>t.length>2?LPe:$g.has(e)?e.startsWith("scale")?DPe(t[1]):PPe:$Pe,zPe=e=>e!==null;function HPe(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(zPe),s=t&&n!=="loop"&&t%2===1?0:a.length-1;return!s||r===void 0?a[s]:r}function OL(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function VPe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:s,repeatType:i,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const ML=(e,t,n,r={},a,s)=>i=>{const l=OL(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-qc(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{i(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:a};VPe(l)||Object.assign(d,FPe(e,d)),d.duration&&(d.duration=qc(d.duration)),d.repeatDelay&&(d.repeatDelay=qc(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(cO(d),d.delay===0&&(f=!0)),(rd.instantAnimations||rd.skipAnimations||a!=null&&a.shouldSkipAnimations)&&(f=!0,cO(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,f&&!s&&t.get()!==void 0){const m=HPe(d.keyframes,l);if(m!==void 0){Fa.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new AL(d):new APe(d)};function g9(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function PL(e,t,n,r){if(typeof t=="function"){const[a,s]=g9(r);t=t(n!==void 0?n:e.custom,a,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,s]=g9(r);t=t(n!==void 0?n:e.custom,a,s)}return t}function ep(e,t,n){const r=e.getProps();return PL(r,t,n!==void 0?n:r.custom,e)}const GX=new Set(["width","height","top","left","right","bottom",...Lg]),v9=30,UPe=e=>!isNaN(parseFloat(e));class BPe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const a=Wi.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Wi.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=UPe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new wL);const r=this.events[t].add(n);return t==="change"?()=>{r(),Fa.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Wi.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>v9)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,v9);return hX(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zp(e,t){return new BPe(e,t)}const uO=e=>Array.isArray(e);function jPe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zp(n))}function WPe(e){return uO(e)?e[e.length-1]||0:e}function GPe(e,t){const n=ep(e,t);let{transitionEnd:r={},transition:a={},...s}=n||{};s={...s,...r};for(const i in s){const l=WPe(s[i]);jPe(e,i,l)}}const _i=e=>!!(e&&e.getVelocity);function qPe(e){return!!(_i(e)&&e.add)}function dO(e,t){const n=e.getValue("willChange");if(qPe(n))return n.add(t);if(!n&&rd.WillChange){const r=new rd.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function DL(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const YPe="framerAppearId",qX="data-"+DL(YPe);function YX(e){return e.props[qX]}function KPe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function KX(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...l}=t;const c=s==null?void 0:s.reduceMotion;r&&(s=r);const u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(const f in l){const m=e.getValue(f,e.latestValues[f]??null),h=l[f];if(h===void 0||d&&KPe(d,f))continue;const g={delay:n,...OL(s||{},f)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(h)&&h===v&&!g.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const w=YX(e);if(w){const x=window.MotionHandoffAnimation(w,f,Fa);x!==null&&(g.startTime=x,y=!0)}}dO(e,f);const b=c??e.shouldReduceMotion;m.start(ML(f,m,h,b&&GX.has(f)?{type:!1}:g,e,y));const E=m.animation;E&&u.push(E)}return i&&Promise.all(u).then(()=>{Fa.update(()=>{i&&GPe(e,i)})}),u}function fO(e,t,n={}){var c;const r=ep(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const s=r?()=>Promise.all(KX(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:m}=a;return ZPe(e,t,u,d,f,m,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[u,d]=l==="beforeChildren"?[s,i]:[i,s];return u().then(()=>d())}else return Promise.all([s(),i(n.delay)])}function ZPe(e,t,n=0,r=0,a=0,s=1,i){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(fO(c,t,{...i,delay:n+(typeof r=="function"?0:r)+jX(e.variantChildren,c,r,a,s)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function XPe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(s=>fO(e,s,n));r=Promise.all(a)}else if(typeof t=="string")r=fO(e,t,n);else{const a=typeof t=="function"?ep(e,t,n.custom):t;r=Promise.all(KX(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const QPe={test:e=>e==="auto",parse:e=>e},ZX=e=>t=>t.test(e),XX=[Dg,Vn,Yc,kd,kMe,_Me,QPe],y9=e=>XX.find(ZX(e));function JPe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mX(e):!0}const eDe=new Set(["brightness","contrast","saturate","opacity"]);function tDe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kL)||[];if(!r)return e;const a=n.replace(r,"");let s=eDe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+a+")"}const nDe=/\b([a-z-]*)\(.*?\)/gu,mO={...rf,getAnimatableNone:e=>{const t=e.match(nDe);return t?t.map(tDe).join(" "):e}},b9={...Dg,transform:Math.round},rDe={rotate:kd,rotateX:kd,rotateY:kd,rotateZ:kd,scale:R1,scaleX:R1,scaleY:R1,scaleZ:R1,skew:kd,skewX:kd,skewY:kd,distance:Vn,translateX:Vn,translateY:Vn,translateZ:Vn,x:Vn,y:Vn,z:Vn,perspective:Vn,transformPerspective:Vn,opacity:cy,originX:s9,originY:s9,originZ:Vn},LL={borderWidth:Vn,borderTopWidth:Vn,borderRightWidth:Vn,borderBottomWidth:Vn,borderLeftWidth:Vn,borderRadius:Vn,borderTopLeftRadius:Vn,borderTopRightRadius:Vn,borderBottomRightRadius:Vn,borderBottomLeftRadius:Vn,width:Vn,maxWidth:Vn,height:Vn,maxHeight:Vn,top:Vn,right:Vn,bottom:Vn,left:Vn,inset:Vn,insetBlock:Vn,insetBlockStart:Vn,insetBlockEnd:Vn,insetInline:Vn,insetInlineStart:Vn,insetInlineEnd:Vn,padding:Vn,paddingTop:Vn,paddingRight:Vn,paddingBottom:Vn,paddingLeft:Vn,paddingBlock:Vn,paddingBlockStart:Vn,paddingBlockEnd:Vn,paddingInline:Vn,paddingInlineStart:Vn,paddingInlineEnd:Vn,margin:Vn,marginTop:Vn,marginRight:Vn,marginBottom:Vn,marginLeft:Vn,marginBlock:Vn,marginBlockStart:Vn,marginBlockEnd:Vn,marginInline:Vn,marginInlineStart:Vn,marginInlineEnd:Vn,fontSize:Vn,backgroundPositionX:Vn,backgroundPositionY:Vn,...rDe,zIndex:b9,fillOpacity:cy,strokeOpacity:cy,numOctaves:b9},aDe={...LL,color:ks,backgroundColor:ks,outlineColor:ks,fill:ks,stroke:ks,borderColor:ks,borderTopColor:ks,borderRightColor:ks,borderBottomColor:ks,borderLeftColor:ks,filter:mO,WebkitFilter:mO},QX=e=>aDe[e];function JX(e,t){let n=QX(e);return n!==mO&&(n=rf),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sDe=new Set(["auto","none","0"]);function iDe(e,t,n){let r=0,a;for(;r<e.length&&!a;){const s=e[r];typeof s=="string"&&!sDe.has(s)&&uy(s).values.length&&(a=e[r]),r++}if(a&&n)for(const s of t)e[s]=JX(n,a)}class oDe extends IL{constructor(t,n,r,a,s){super(t,n,r,a,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),_L(f))){const m=WX(f,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!GX.has(r)||t.length!==2)return;const[a,s]=t,i=y9(a),l=y9(s),c=a9(a),u=a9(s);if(c!==u&&Pd[r]){this.needsMeasurement=!0;return}if(i!==l)if(m9(i)&&m9(l))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else Pd[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||JPe(t[a]))&&r.push(a);r.length&&iDe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pd[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=Pd[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function lDe(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const a=(n==null?void 0:n[e])??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(r=>r!=null)}const eQ=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hO(e){return fX(e)&&"offsetHeight"in e}const{schedule:$L,cancel:uZe}=SX(queueMicrotask,!1),Zl={x:!1,y:!1};function tQ(){return Zl.x||Zl.y}function cDe(e){return e==="x"||e==="y"?Zl[e]?null:(Zl[e]=!0,()=>{Zl[e]=!1}):Zl.x||Zl.y?null:(Zl.x=Zl.y=!0,()=>{Zl.x=Zl.y=!1})}function nQ(e,t){const n=lDe(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function w9(e){return!(e.pointerType==="touch"||tQ())}function uDe(e,t,n={}){const[r,a,s]=nQ(e,n),i=l=>{if(!w9(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{w9(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,a)};return r.forEach(l=>{l.addEventListener("pointerenter",i,a)}),s}const rQ=(e,t)=>t?e===t?!0:rQ(e,t.parentElement):!1,FL=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dDe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aQ(e){return dDe.has(e.tagName)||e.isContentEditable===!0}const Fw=new WeakSet;function E9(e){return t=>{t.key==="Enter"&&e(t)}}function M2(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const fDe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=E9(()=>{if(Fw.has(n))return;M2(n,"down");const a=E9(()=>{M2(n,"up")}),s=()=>M2(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function x9(e){return FL(e)&&!tQ()}function mDe(e,t,n={}){const[r,a,s]=nQ(e,n),i=l=>{const c=l.currentTarget;if(!x9(l))return;Fw.add(c);const u=t(c,l),d=(h,g)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),Fw.has(c)&&Fw.delete(c),x9(h)&&typeof u=="function"&&u(h,{success:g})},f=h=>{d(h,c===window||c===document||n.useGlobalTarget||rQ(c,h.target))},m=h=>{d(h,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",m,a)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",i,a),hO(l)&&(l.addEventListener("focus",u=>fDe(u,a)),!aQ(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}function sQ(e){return fX(e)&&"ownerSVGElement"in e}function hDe(e){return sQ(e)&&e.tagName==="svg"}const pDe=[...XX,ks,rf],gDe=e=>pDe.find(ZX(e)),_9=()=>({translate:0,scale:1,origin:0,originPoint:0}),Oh=()=>({x:_9(),y:_9()}),k9=()=>({min:0,max:0}),Ds=()=>({x:k9(),y:k9()}),Ix={current:null},zL={current:!1},vDe=typeof window<"u";function iQ(){if(zL.current=!0,!!vDe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ix.current=e.matches;e.addEventListener("change",t),t()}else Ix.current=!1}const yDe=new WeakMap;function lS(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dy(e){return typeof e=="string"||Array.isArray(e)}const HL=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],VL=["initial",...HL];function cS(e){return lS(e.animate)||VL.some(t=>dy(e[t]))}function oQ(e){return!!(cS(e)||e.variants)}function bDe(e,t,n){for(const r in t){const a=t[r],s=n[r];if(_i(a))e.addValue(r,a);else if(_i(s))e.addValue(r,Zp(a,{owner:e}));else if(s!==a)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(a):i.hasAnimated||i.set(a)}else{const i=e.getStaticValue(r);e.addValue(r,Zp(i!==void 0?i:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const S9=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ox={};function lQ(e){Ox=e}function wDe(){return Ox}class EDe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,skipAnimations:s,blockInitialAnimation:i,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=IL,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Wi.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Fa.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.skipAnimationsConfig=s,this.options=c,this.blockInitialAnimation=!!i,this.isControllingVariants=cS(n),this.isVariantNode=oQ(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in m){const g=m[h];u[h]!==void 0&&_i(g)&&g.set(u[h])}}mount(t){var n;this.current=t,yDe.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 4,750 bytes, line 1897
1897h((r,a)=>this.bindToMotionValue(a,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(zL.current||iQ(),this.shouldReduceMotion=Ix.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),nf(this.notifyUpdate),nf(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=$g.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Fa.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ox){const n=Ox[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ds()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<S9.length;r++){const a=S9[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const s="on"+a,i=t[s];i&&(this.propEventSubscriptions[a]=this.on(a,i))}this.prevMotionValues=bDe(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zp(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(dX(r)||mX(r))?r=parseFloat(r):!gDe(r)&&rf.test(n)&&(r=JX(t,n)),this.setBaseTarget(t,_i(r)?r.get():r)),_i(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=PL(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!_i(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new wL),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){$L.render(this.render)}}
vendor: 9,562 bytes, line 1897
1897class cQ extends EDe{constructor(){super(...arguments),this.KeyframeResolver=oDe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;_i(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ff{constructor(t){this.isMounted=!1,this.node=t}update(){}}function uQ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xDe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _De(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function P2(e){return e===void 0||e===1}function pO({scale:e,scaleX:t,scaleY:n}){return!P2(e)||!P2(t)||!P2(n)}function Mf(e){return pO(e)||dQ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dQ(e){return C9(e.x)||C9(e.y)}function C9(e){return e&&e!=="0%"}function Mx(e,t,n){const r=e-n,a=t*r;return n+a}function N9(e,t,n,r,a){return a!==void 0&&(e=Mx(e,a,r)),Mx(e,n,r)+t}function gO(e,t=0,n=1,r,a){e.min=N9(e.min,t,n,r,a),e.max=N9(e.max,t,n,r,a)}function fQ(e,{x:t,y:n}){gO(e.x,t.translate,t.scale,t.originPoint),gO(e.y,n.translate,n.scale,n.originPoint)}const R9=.999999999999,T9=1.0000000000001;function kDe(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let s,i;for(let l=0;l<a;l++){s=n[l],i=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Ph(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,fQ(e,i)),r&&Mf(s.latestValues)&&Ph(e,s.latestValues))}t.x<T9&&t.x>R9&&(t.x=1),t.y<T9&&t.y>R9&&(t.y=1)}function Mh(e,t){e.min=e.min+t,e.max=e.max+t}function A9(e,t,n,r,a=.5){const s=rs(e.min,e.max,a);gO(e,t,n,s,r)}function Ph(e,t){A9(e.x,t.x,t.scaleX,t.scale,t.originX),A9(e.y,t.y,t.scaleY,t.scale,t.originY)}function mQ(e,t){return uQ(_De(e.getBoundingClientRect(),t))}function SDe(e,t,n){const r=mQ(e,n),{scroll:a}=t;return a&&(Mh(r.x,a.offset.x),Mh(r.y,a.offset.y)),r}const CDe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},NDe=Lg.length;function RDe(e,t,n){let r="",a=!0;for(let s=0;s<NDe;s++){const i=Lg[s],l=e[i];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(i.startsWith("scale")?1:0);else{const u=parseFloat(l);c=i.startsWith("scale")?u===1:u===0}if(!c||n){const u=eQ(l,LL[i]);if(!c){a=!1;const d=CDe[i]||i;r+=`${d}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function UL(e,t,n){const{style:r,vars:a,transformOrigin:s}=e;let i=!1,l=!1;for(const c in t){const u=t[c];if($g.has(c)){i=!0;continue}else if(NX(c)){a[c]=u;continue}else{const d=eQ(u,LL[c]);c.startsWith("origin")?(l=!0,s[c]=d):r[c]=d}}if(t.transform||(i||n?r.transform=RDe(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${c} ${u} ${d}`}}function hQ(e,{style:t,vars:n},r,a){const s=e.style;let i;for(i in t)s[i]=t[i];a==null||a.applyProjectionStyles(s,r);for(i in n)s.setProperty(i,n[i])}function I9(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const h0={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Vn.test(e))e=parseFloat(e);else return e;const n=I9(e,t.target.x),r=I9(e,t.target.y);return`${n}% ${r}%`}},TDe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=rf.parse(e);if(a.length>5)return r;const s=rf.createTransformer(e),i=typeof a[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;a[0+i]/=l,a[1+i]/=c;const u=rs(l,c,.5);return typeof a[2+i]=="number"&&(a[2+i]/=u),typeof a[3+i]=="number"&&(a[3+i]/=u),s(a)}},vO={borderRadius:{...h0,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:h0,borderTopRightRadius:h0,borderBottomLeftRadius:h0,borderBottomRightRadius:h0,boxShadow:TDe};function pQ(e,{layout:t,layoutId:n}){return $g.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vO[e]||e==="opacity")}function BL(e,t,n){var i;const r=e.style,a=t==null?void 0:t.style,s={};if(!r)return s;for(const l in r)(_i(r[l])||a&&_i(a[l])||pQ(l,e)||((i=n==null?void 0:n.getValue(l))==null?void 0:i.liveStyle)!==void 0)&&(s[l]=r[l]);return s}function ADe(e){return window.getComputedStyle(e)}class IDe extends cQ{constructor(){super(...arguments),this.type="html",this.renderInstance=hQ}readValueFromInstance(t,n){var r;if($g.has(n))return(r=this.projection)!=null&&r.isProjecting?aO(n):oPe(t,n);{const a=ADe(t),s=(NX(n)?a.getPropertyValue(n):a[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return mQ(t,n)}build(t,n,r){UL(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return BL(t,n,r)}}const ODe={offset:"stroke-dashoffset",array:"stroke-dasharray"},MDe={offset:"strokeDashoffset",array:"strokeDasharray"};function PDe(e,t,n=1,r=0,a=!0){e.pathLength=1;const s=a?ODe:MDe;e[s.offset]=`${-r}`,e[s.array]=`${t} ${n}`}const DDe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function gQ(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:s=1,pathOffset:i=0,...l},c,u,d){if(UL(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox);for(const h of DDe)f[h]!==void 0&&(m[h]=f[h],delete f[h]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&PDe(f,a,s,i,!1)}const vQ=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),yQ=e=>typeof e=="string"&&e.toLowerCase()==="svg";function LDe(e,t,n,r){hQ(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(vQ.has(a)?a:DL(a),t.attrs[a])}function bQ(e,t,n){const r=BL(e,t,n);for(const a in e)if(_i(e[a])||_i(t[a])){const s=Lg.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[s]=e[a]}return r}class $De extends cQ{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ds}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if($g.has(n)){const r=QX(n);return r&&r.default||0}return n=vQ.has(n)?n:DL(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return bQ(t,n,r)}build(t,n,r){gQ(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){LDe(t,n,r,a)}mount(t){this.isSVGTag=yQ(t.tagName),super.mount(t)}}const FDe=VL.length;function wQ(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?wQ(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<FDe;n++){const r=VL[n],a=e.props[r];(dy(a)||a===!1)&&(t[r]=a)}return t}function EQ(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const zDe=[...HL].reverse(),HDe=HL.length;function VDe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>XPe(e,n,r)))}function UDe(e){let t=VDe(e),n=O9(),r=!0;const a=c=>(u,d)=>{var m;const f=ep(e,d,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:h,transitionEnd:g,...v}=f;u={...u,...v,...g}}return u};function s(c){t=c(e)}function i(c){const{props:u}=e,d=wQ(e.parent)||{},f=[],m=new Set;let h={},g=1/0;for(let y=0;y<HDe;y++){const b=zDe[y],E=n[b],w=u[b]!==void 0?u[b]:d[b],x=dy(w),S=b===c?E.isActive:null;S===!1&&(g=y);let N=w===d[b]&&w!==u[b]&&x;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),E.protectedKeys={...h},!E.isActive&&S===null||!w&&!E.prevProp||lS(w)||typeof w=="boolean")continue;const k=BDe(E.prevProp,w);let C=k||b===c&&E.isActive&&!N&&x||y>g&&x,A=!1;const O=Array.isArray(w)?w:[w];let T=O.reduce(a(b),{});S===!1&&(T={});const{prevResolvedValues:M={}}=E,L={...M,...T},D=Y=>{C=!0,m.has(Y)&&(A=!0,m.delete(Y)),E.needsAnimating[Y]=!0;const z=e.getValue(Y);z&&(z.liveStyle=!1)};for(const Y in L){const z=T[Y],K=M[Y];if(h.hasOwnProperty(Y))continue;let ee=!1;uO(z)&&uO(K)?ee=!EQ(z,K):ee=z!==K,ee?z!=null?D(Y):m.add(Y):z!==void 0&&m.has(Y)?D(Y):E.protectedKeys[Y]=!0}E.prevProp=w,E.prevResolvedValues=T,E.isActive&&(h={...h,...T}),r&&e.blockInitialAnimation&&(C=!1);const j=N&&k;C&&(!j||A)&&f.push(...O.map(Y=>{const z={type:b};if(typeof Y=="string"&&r&&!j&&e.manuallyAnimateOnMount&&e.parent){const{parent:K}=e,ee=ep(K,Y);if(K.enteringChildren&&ee){const{delayChildren:oe}=ee.transition||{};z.delay=jX(K.enteringChildren,e,oe)}}return{animation:Y,options:z}}))}if(m.size){const y={};if(typeof u.initial!="boolean"){const b=ep(e,Array.isArray(u.initial)?u.initial[0]:u.initial);b&&b.transition&&(y.transition=b.transition)}m.forEach(b=>{const E=e.getBaseTarget(b),w=e.getValue(b);w&&(w.liveStyle=!0),y[b]=E??null}),f.push({animation:y})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Prom
vendor: 3,666 bytes, line 1897
1897ise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(m=>{var h;return(h=m.animationState)==null?void 0:h.setActive(c,u)}),n[c].isActive=u;const d=i(c);for(const m in n)n[m].protectedKeys={};return d}return{animateChanges:i,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=O9()}}}function BDe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!EQ(t,e):!1}function kf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function O9(){return{animate:kf(!0),whileInView:kf(),whileHover:kf(),whileTap:kf(),whileDrag:kf(),whileFocus:kf(),exit:kf()}}function M9(e,t){e.min=t.min,e.max=t.max}function Wl(e,t){M9(e.x,t.x),M9(e.y,t.y)}function P9(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const xQ=1e-4,jDe=1-xQ,WDe=1+xQ,_Q=.01,GDe=0-_Q,qDe=0+_Q;function Gi(e){return e.max-e.min}function YDe(e,t,n){return Math.abs(e-t)<=n}function D9(e,t,n,r=.5){e.origin=r,e.originPoint=rs(t.min,t.max,e.origin),e.scale=Gi(n)/Gi(t),e.translate=rs(n.min,n.max,e.origin)-e.originPoint,(e.scale>=jDe&&e.scale<=WDe||isNaN(e.scale))&&(e.scale=1),(e.translate>=GDe&&e.translate<=qDe||isNaN(e.translate))&&(e.translate=0)}function lv(e,t,n,r){D9(e.x,t.x,n.x,r?r.originX:void 0),D9(e.y,t.y,n.y,r?r.originY:void 0)}function L9(e,t,n){e.min=n.min+t.min,e.max=e.min+Gi(t)}function KDe(e,t,n){L9(e.x,t.x,n.x),L9(e.y,t.y,n.y)}function $9(e,t,n){e.min=t.min-n.min,e.max=e.min+Gi(t)}function Px(e,t,n){$9(e.x,t.x,n.x),$9(e.y,t.y,n.y)}function F9(e,t,n,r,a){return e-=t,e=Mx(e,1/n,r),a!==void 0&&(e=Mx(e,1/a,r)),e}function ZDe(e,t=0,n=1,r=.5,a,s=e,i=e){if(Yc.test(t)&&(t=parseFloat(t),t=rs(i.min,i.max,t/100)-i.min),typeof t!="number")return;let l=rs(s.min,s.max,r);e===s&&(l-=t),e.min=F9(e.min,t,n,l,a),e.max=F9(e.max,t,n,l,a)}function z9(e,t,[n,r,a],s,i){ZDe(e,t[n],t[r],t[a],t.scale,s,i)}const XDe=["x","scaleX","originX"],QDe=["y","scaleY","originY"];function H9(e,t,n,r){z9(e.x,t,XDe,n?n.x:void 0,r?r.x:void 0),z9(e.y,t,QDe,n?n.y:void 0,r?r.y:void 0)}function V9(e){return e.translate===0&&e.scale===1}function kQ(e){return V9(e.x)&&V9(e.y)}function U9(e,t){return e.min===t.min&&e.max===t.max}function JDe(e,t){return U9(e.x,t.x)&&U9(e.y,t.y)}function B9(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function SQ(e,t){return B9(e.x,t.x)&&B9(e.y,t.y)}function j9(e){return Gi(e.x)/Gi(e.y)}function W9(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function gl(e){return[e("x"),e("y")]}function eLe(e,t,n){let r="";const a=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((a||s||i)&&(r=`translate3d(${a}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:m,skewX:h,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const CQ=["TopLeft","TopRight","BottomLeft","BottomRight"],tLe=CQ.length,G9=e=>typeof e=="string"?parseFloat(e):e,q9=e=>typeof e=="number"||Vn.test(e);function nLe(e,t,n,r,a,s){a?(e.opacity=rs(0,n.opacity??1,rLe(r)),e.opacityExit=rs(t.opacity??1,0,aLe(r))):s&&(e.opacity=rs(t.opacity??1,n.opacity??1,r));for(let i=0;i<tLe;i++){const l=`border${CQ[i]}Radius`;let c=Y9(t,l),u=Y9(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||q9(c)===q9(u)?(e[l]=Math.max(rs(G9(c),G9(u),r),0),(Yc.test(u)||Y
vendor: 18,260 bytes, line 1897
1897c.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=rs(t.rotate||0,n.rotate||0,r))}function Y9(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rLe=NQ(0,.5,EX),aLe=NQ(.5,.95,Ml);function NQ(e,t,n){return r=>r<e?0:r>t?1:n(ly(e,t,r))}function sLe(e,t,n){const r=_i(e)?e:Zp(e);return r.start(ML("",r,t,n)),r.animation}function fy(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const iLe=(e,t)=>e.depth-t.depth;class oLe{constructor(){this.children=[],this.isDirty=!1}add(t){vL(this.children,t),this.isDirty=!0}remove(t){yL(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iLe),this.isDirty=!1,this.children.forEach(t)}}function lLe(e,t){const n=Wi.now(),r=({timestamp:a})=>{const s=a-n;s>=t&&(nf(r),e(s-t))};return Fa.setup(r,!0),()=>nf(r)}function zw(e){return _i(e)?e.get():e}class cLe{constructor(){this.members=[]}add(t){vL(this.members,t),t.scheduleRender()}remove(t){if(yL(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const s=this.members[a];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const a=r.options.layoutDependency,s=t.options.layoutDependency;a!==void 0&&s!==void 0&&a===s||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:l}=t.options;l===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Hw={hasAnimatedSinceResize:!0,hasEverUpdated:!1},D2=["","X","Y","Z"],uLe=1e3;let dLe=0;function L2(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function RQ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=YX(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Fa,!(a||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&RQ(r)}function TQ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(i={},l=t==null?void 0:t()){this.id=dLe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(hLe),this.nodes.forEach(yLe),this.nodes.forEach(bLe),this.nodes.forEach(pLe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new oLe)}addEventListener(i,l){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new wL),this.eventHandlers.get(i).add(l)}notifyListeners(i,...l){const c=this.eventHandlers.get(i);c&&c.notify(...l)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=sQ(i)&&!hDe(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;Fa.read(()=>{f=window.innerWidth}),e(i,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,d&&d(),d=lLe(m,250),Hw.hasAnimatedSinceResize&&(Hw.hasAnimatedSinceResize=!1,this.nodes.forEach(X9)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||kLe,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!SQ(this.targetLayout,h),E=!f&&m;if(this.options.layoutRoot||this.resumeFrom||E||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...OL(g,"layout"),onPlay:v,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,E)}else f||X9(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),nf(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(wLe),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&RQ(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(K9);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Z9);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vLe),this.nodes.forEach(fLe),this.nodes.forEach(mLe)):this.nodes.forEach(Z9),this.clearAllSnapshots();const l=Wi.now();ri.delta=ru(0,1e3/60,l-ri.timestamp),ri.timestamp=l,ri.isProcessing=!0,N2.update.process(ri),N2.preRender.process(ri),N2.render.process(ri),ri.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$L.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gLe),this.sharedNodes.forEach(ELe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Fa.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Fa.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Gi(this.snapshot.measuredBox.x)&&!Gi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ds(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!kQ(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;i&&this.instance&&(l||Mf(this.latestValues)||d)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return i&&(c=this.removeTransform(c)),SLe(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:i}=this.options;if(!i)return Ds();const l=i.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(CLe))){const{scroll:d}=this.root;d&&(Mh(l.x,d.offset.x),Mh(l.y,d.offset.y))}return l}removeElementScroll(i){var c;const l=Ds();if(Wl(l,i),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:m}=d;d!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&Wl(l,i),Mh(l.x,f.offset.x),Mh(l.y,f.offset.y))}return l}applyTransform(i,l=!1){const c=Ds();Wl(c,i);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Ph(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Mf(d.latestValues)&&Ph(c,d.latestValues)}return Mf(this.latestValues)&&Ph(c,this.latestValues),c}removeTransform(i){const l=Ds();Wl(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Mf(u.latestValues))continue;pO(u.latestValues)&&u.updateSnapshot();const d=Ds(),f=u.measurePageBox();Wl(d,f),H9(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Mf(this.latestValues)&&H9(l,this.latestValues),l}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ri.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var h;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=ri.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ds(),this.targetWithTransforms=Ds()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),KDe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Wl(this.target,this.layout.layoutBox),fQ(this.target,this.targetDelta)):Wl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pO(this.parent.latestValues)||dQ(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,l,c){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ds(),this.relativeTargetOrigin=Ds(),Px(this.relativeTargetOrigin,l,c),Wl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const i=this.getLead(),l=!!this.resumingFrom||this!==i;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ri.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Wl(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;kDe(this.layoutCorrected,this.treeScale,this.path,l),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Ds());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(P9(this.prevProjectionDelta.x,this.projectionDelta.x),P9(this.prevProjectionDelta.y,this.projectionDelta.y)),lv(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!W9(this.projectionDelta.x,this.prevProjectionDelta.x)||!W9(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),i){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Oh(),this.projectionDelta=Oh(),this.projectionDeltaWithTransform=Oh()}setAnimationOrigin(i,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Oh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=Ds(),h=c?c.source:void 0,g=this.layout?this.layout.source:void 0,v=h!==g,y=this.getStack(),b=!y||y.members.length<=1,E=!!(v&&!b&&this.options.crossfade===!0&&!this.path.some(_Le));this.animationProgress=0;let w;this.mixTargetDelta=x=>{const S=x/1e3;Q9(f.x,i.x,S),Q9(f.y,i.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Px(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),xLe(this.relativeTarget,this.relativeTargetOrigin,m,S),w&&JDe(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ds()),Wl(w,this.relativeTarget)),v&&(this.animationValues=d,nLe(d,u,this.latestValues,S,E,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(nf(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Fa.update(()=>{Hw.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zp(0)),this.currentAnimation=sLe(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),i.onUpdate&&i.onUpdate(d)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uLe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=i;if(!(!l||!c||!u)){if(this!==i&&this.layout&&u&&AQ(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ds();const f=Gi(this.layout.layoutBox.x);
vendor: 4,189 bytes, line 1897
1897c.x.min=i.target.x.min,c.x.max=c.x.min+f;const m=Gi(this.layout.layoutBox.y);c.y.min=i.target.y.min,c.y.max=c.y.min+m}Wl(l,c),Ph(l,d),lv(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(i,l){this.sharedNodes.has(i)||this.sharedNodes.set(i,new cLe),this.sharedNodes.get(i).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var l;const{layoutId:i}=this.options;return i?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:i}=this.options;return i?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),i&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let l=!1;const{latestValues:c}=i;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&L2("z",i,u,this.animationValues);for(let d=0;d<D2.length;d++)L2(`rotate${D2[d]}`,i,u,this.animationValues),L2(`skew${D2[d]}`,i,u,this.animationValues);i.render();for(const d in u)i.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);i.scheduleRender()}applyProjectionStyles(i,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=zw(l==null?void 0:l.pointerEvents)||"",i.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=zw(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Mf(this.latestValues)&&(i.transform=c?c({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=eLe(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),i.transform=f;const{x:m,y:h}=this.projectionDelta;i.transformOrigin=`${m.origin*100}% ${h.origin*100}% 0`,u.animationValues?i.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:i.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in vO){if(d[g]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:b}=vO[g],E=f==="none"?d[g]:v(d[g],u);if(y){const w=y.length;for(let x=0;x<w;x++)i[y[x]]=E}else b?this.options.visualElement.renderState.vars[g]=E:i[g]=E}this.options.layoutId&&(i.pointerEvents=u===this?zw(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var l;return(l=i.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(K9),this.root.sharedNodes.clear()}}}function fLe(e){e.updateLayout()}function mLe(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?gl(f=>{const m=i?t.measuredBox[f]:t.layoutBox[f],h=Gi(m);m.min=r[f].min,m.max=m.min+h}):AQ(s,t.layoutBox,r)&&gl(f=>{const m=i?t.measuredBox[f]:t.layoutBox[f],h=Gi(r[f]);m.max=m.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const l=Oh();lv(l,r,t.layoutBox);const c=Oh();i?lv(c,e.applyTransform(a,!0),t.measuredBox):lv(c,r,t.layoutBox);const u=!kQ(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:h}=f;if(m&&h){const g=Ds();Px(g,t.layoutBox,m.layoutBox);const v=Ds();
vendor: 10,696 bytes, lines 1897-1905
1897Px(v,r,h.layoutBox),SQ(g,v)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function hLe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function pLe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gLe(e){e.clearSnapshot()}function K9(e){e.clearMeasurements()}function Z9(e){e.isLayoutDirty=!1}function vLe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function X9(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function yLe(e){e.resolveTargetDelta()}function bLe(e){e.calcProjection()}function wLe(e){e.resetSkewAndRotation()}function ELe(e){e.removeLeadSnapshot()}function Q9(e,t,n){e.translate=rs(t.translate,0,n),e.scale=rs(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function J9(e,t,n,r){e.min=rs(t.min,n.min,r),e.max=rs(t.max,n.max,r)}function xLe(e,t,n,r){J9(e.x,t.x,n.x,r),J9(e.y,t.y,n.y,r)}function _Le(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const kLe={duration:.45,ease:[.4,0,.1,1]},e7=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),t7=e7("applewebkit/")&&!e7("chrome/")?Math.round:Ml;function n7(e){e.min=t7(e.min),e.max=t7(e.max)}function SLe(e){n7(e.x),n7(e.y)}function AQ(e,t,n){return e==="position"||e==="preserve-aspect"&&!YDe(j9(t),j9(n),.2)}function CLe(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const NLe=TQ({attachResizeListener:(e,t)=>fy(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),$2={current:void 0},IQ=TQ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!$2.current){const e=new NLe({});e.mount(window),e.setOptions({layoutScroll:!0}),$2.current=e}return $2.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),jL=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function r7(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function RLe(...e){return t=>{let n=!1;const r=e.map(a=>{const s=r7(a,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let a=0;a<r.length;a++){const s=r[a];typeof s=="function"?s():r7(e[a],null)}}}}function TLe(...e){return p.useCallback(RLe(...e),e)}class ALe extends p.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,a=hO(r)&&r.offsetWidth||0,s=hO(r)&&r.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=a-i.width-i.left,i.bottom=s-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function ILe({children:e,isPresent:t,anchorX:n,anchorY:r,root:a}){var f;const s=p.useId(),i=p.useRef(null),l=p.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=p.useContext(jL),u=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),d=TLe(i,u);return p.useInsertionEffect(()=>{const{width:m,height:h,top:g,left:v,right:y,bottom:b}=l.current;if(t||!i.current||!m||!h)return;const E=n==="left"?`left: ${v}`:`right: ${y}`,w=r==="bottom"?`bottom: ${b}`:`top: ${g}`;i.current.dataset.motionPopId=s;const x=document.createElement("style");c&&(x.nonce=c);const S=a??document.head;return S.appendChild(x),x.sheet&&x.sheet.insertRule(` 1898 [data-motion-pop-id="${s}"] { 1899 position: absolute !important; 1900 width: ${m}px !important; 1901 height: ${h}px !important; 1902 ${E}px !important; 1903 ${w}px !important; 1904 } 1905 `),()=>{S.contains(x)&&S.removeChild(x)}},[t]),F.jsx(ALe,{isPresent:t,childRef:i,sizeRef:l,children:p.cloneElement(e,{ref:d})})}const OLe=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:s,mode:i,anchorX:l,anchorY:c,root:u})=>{const d=gL(MLe),f=p.useId();let m=!0,h=p.useMemo(()=>(m=!1,{id:f,initial:t,isPresent:n,custom:a,onExitComplete:g=>{d.set(g,!0);for(const v of d.values())if(!v)return;r&&r()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[n,d,r]);return s&&m&&(h={...h}),p.useMemo(()=>{d.forEach((g,v)=>d.set(v,!1))},[n]),p.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),i==="popLayout"&&(e=F.jsx(ILe,{isPresent:n,anchorX:l,anchorY:c,root:u,children:e})),F.jsx(oS.Provider,{value:h,children:e})};function MLe(){return new Map}function OQ(e=!0){const t=p.useContext(oS);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,s=p.useId();p.useEffect(()=>{if(e)return a(s)},[e]);const i=p.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const T1=e=>e.key||"";function a7(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const $i=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:s="sync",propagate:i=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,f]=OQ(i),m=p.useMemo(()=>a7(e),[e]),h=i&&!d?[]:m.map(T1),g=p.useRef(!0),v=p.useRef(m),y=gL(()=>new Map),b=p.useRef(new Set),[E,w]=p.useState(m),[x,S]=p.useState(m);uX(()=>{g.current=!1,v.current=m;for(let C=0;C<x.length;C++){const A=T1(x[C]);h.includes(A)?(y.delete(A),b.current.delete(A)):y.get(A)!==!0&&y.set(A,!1)}},[x,h.length,h.join("-")]);const N=[];if(m!==E){let C=[...m];for(let A=0;A<x.length;A++){const O=x[A],T=T1(O);h.includes(T)||(C.splice(A,0,O),N.push(O))}return s==="wait"&&N.length&&(C=N),S(a7(C)),w(m),null}const{forceRender:k}=p.useContext(pL);return F.jsx(F.Fragment,{children:x.map(C=>{const A=T1(C),O=i&&!d?!1:m===x||h.includes(A),T=()=>{if(b.current.has(A))return;if(b.current.add(A),y.has(A))y.set(A,!0);else return;let M=!0;y.forEach(L=>{L||(M=!1)}),M&&(k==null||k(),S(v.current),i&&(f==null||f()),r&&r())};return F.jsx(OLe,{isPresent:O,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:s,root:u,onExitComplete:O?void 0:T,anchorX:l,anchorY:c,children:C},A)})})},MQ=p.createContext({strict:!1}),s7={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let i7=!1;function PLe(){if(i7)return;const e={};for(const t in s7)e[t]={isEnabled:n=>s7[t].some(r=>!!n[r])};lQ(e),i7=!0}function PQ(){return PLe(),wDe()}function DLe(e){const t=PQ();for(const n in e)t[n]={...t[n],...e[n]};lQ(t)}const LLe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Dx(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||LLe.has(e)}let DQ=e=>!Dx(e);function $Le(e){typeof e=="function"&&(DQ=t=>t.startsWith("on")?!Dx(t):e(t))}try{$Le(require("@emotion/is-prop-valid").default)}catch{}function FLe(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(DQ(a)||n===!0&&Dx(a)||!t&&!Dx(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}const uS=p.createContext({});function zLe(e,t){if(cS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||dy(n)?n:void 0,animate:dy(r)?r:void 0}}return e.inherit!==!1?t:{}}function HLe(e){const{initial:t,animate:n}=zLe(e,p.useContext(uS));return p.useMemo(()=>({initial:t,animate:n}),[o7(t),o7(n)])}function o7(e){return Array.isArray(e)?e.join(" "):e}const WL=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function LQ(e,t,n){for(const r in t)!_i(t[r])&&!pQ(r,n)&&(e[r]=t[r])}function VLe({transformTemplate:e},t){return p.useMemo(()=>{const n=WL();return UL(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ULe(e,t){const n=e.style||{},r={};return LQ(r,n,e),Object.assign(r,VLe(e,t)),r}function BLe(e,t){const n={},r=ULe(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const $Q=()=>({...WL(),attrs:{}});function jLe(e,t,n,r){const a=p.useMemo(()=>{const s=$Q();return gQ(s,t,yQ(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};LQ(s,e.style,e),a.style={...s,...a.style}}return a}const WLe=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function GL(e){return typeof e!="string"||e.includes("-")?!1:!!(WLe.indexOf(e)>-1||/[A-Z]/u.test(e))}function GLe(e,t,n,{latestValues:r},a,s=!1,i){const c=(i??GL(e)?jLe:BLe)(t,r,a,e),u=FLe(t,typeof e=="string",s),d=e!==p.Fragment?{...u,...c,ref:n}:{},{children:f}=t,m=p.useMemo(()=>_i(f)?f.get():f,[f]);return p.createElement(e,{...d,children:m})}function qLe({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:YLe(n,r,a,e),renderState:t()}}function YLe(e,t,n,r){const a={},s=r(e,{});for(const m in s)a[m]=zw(s[m]);let{initial:i,animate:l}=e;const c=cS(e),u=oQ(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const f=d?l:i;if(f&&typeof f!="boolean"&&!lS(f)){const m=Array.isArray(f)?f:[f];for(let h=0;h<m.length;h++){const g=PL(e,m[h]);if(g){const{transitionEnd:v,transition:y,...b}=g;
vendor: 3,767 bytes, line 1905
1905for(const E in b){let w=b[E];if(Array.isArray(w)){const x=d?w.length-1:0;w=w[x]}w!==null&&(a[E]=w)}for(const E in v)a[E]=v[E]}}}return a}const FQ=e=>(t,n)=>{const r=p.useContext(uS),a=p.useContext(oS),s=()=>qLe(e,t,r,a);return n?s():gL(s)},KLe=FQ({scrapeMotionValuesFromProps:BL,createRenderState:WL}),ZLe=FQ({scrapeMotionValuesFromProps:bQ,createRenderState:$Q}),XLe=Symbol.for("motionComponentSymbol");function QLe(e,t,n){const r=p.useRef(n);p.useInsertionEffect(()=>{r.current=n});const a=p.useRef(null);return p.useCallback(s=>{var l;s&&((l=e.onMount)==null||l.call(e,s)),t&&(s?t.mount(s):t.unmount());const i=r.current;if(typeof i=="function")if(s){const c=i(s);typeof c=="function"&&(a.current=c)}else a.current?(a.current(),a.current=null):i(s);else i&&(i.current=s)},[t])}const zQ=p.createContext({});function L0(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JLe(e,t,n,r,a,s){var w,x;const{visualElement:i}=p.useContext(uS),l=p.useContext(MQ),c=p.useContext(oS),u=p.useContext(jL),d=u.reducedMotion,f=u.skipAnimations,m=p.useRef(null),h=p.useRef(!1);r=r||l.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:i,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:s}),h.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const g=m.current,v=p.useContext(zQ);g&&!g.projection&&a&&(g.type==="html"||g.type==="svg")&&e4e(m.current,n,a,v);const y=p.useRef(!1);p.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[qX],E=p.useRef(!!b&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,b))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,b)));return uX(()=>{h.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),E.current&&g.animationState&&g.animationState.animateChanges())}),p.useEffect(()=>{g&&(!E.current&&g.animationState&&g.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,b)}),E.current=!1),g.enteringChildren=void 0)}),g}function e4e(e,t,n,r){const{layoutId:a,layout:s,drag:i,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:HQ(e.parent)),e.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:!!i||l&&L0(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function HQ(e){if(e)return e.options.allowProjection!==!1?e.projection:HQ(e.parent)}function F2(e,{forwardMotionProps:t=!1,type:n}={},r,a){r&&DLe(r);const s=n?n==="svg":GL(e),i=s?ZLe:KLe;function l(u,d){let f;const m={...p.useContext(jL),...u,layoutId:t4e(u)},{isStatic:h}=m,g=HLe(u),v=i(u,h);if(!h&&cX){n4e();const y=r4e(m);f=y.MeasureLayout,g.visualElement=JLe(e,v,m,a,y.ProjectionNode,s)}return F.jsxs(uS.Provider,{value:g,children:[f&&g.visualElement?F.jsx(f,{visualElement:g.visualElement,...m}):null,GLe(e,u,QLe(v,g.visualElement,d),v,h,t,s)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=p.forwardRef(l);return c[XLe]=e,c}function t4e({layoutId:e}){const t=p.useContext(pL).id;return t&&e!==void 0?t+"-"+e:e}function n4e(e,t){p.useContext(MQ).strict}function r4e(e){const t=PQ(),{drag:n,layout:r}=t;if(!n&&!r)return{};const a={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function a4e(e,t){if(typeof Proxy>"u")return F2;const n=new Map,r=(s,i)=>F2(s,i,e,t),a=(s,i)=>r(s,i);return new Proxy(a,{get:(s,i)=>i==="create"?r:(n.has(i)||n.set(i,F2(i,void 0,e,t)),n.get(i))})}const s4e=(e,t)=>
vendor: 16,384 bytes, line 1905
1905t.isSVG??GL(e)?new $De(t):new IDe(t,{allowProjection:e!==p.Fragment});class i4e extends ff{constructor(t){super(t),t.animationState||(t.animationState=UDe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();lS(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let o4e=0;class l4e extends ff{constructor(){super(...arguments),this.id=o4e++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const c4e={animation:{Feature:i4e},exit:{Feature:l4e}};function wb(e){return{point:{x:e.pageX,y:e.pageY}}}const u4e=e=>t=>FL(t)&&e(t,wb(t));function cv(e,t,n,r){return fy(e,t,u4e(n),r)}const VQ=({current:e})=>e?e.ownerDocument.defaultView:null,l7=(e,t)=>Math.abs(e-t);function d4e(e,t){const n=l7(e.x,t.x),r=l7(e.y,t.y);return Math.sqrt(n**2+r**2)}const c7=new Set(["auto","scroll"]);class UQ{constructor(t,n,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:s=!1,distanceThreshold:i=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=H2(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=d4e(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!v)return;const{point:y}=h,{timestamp:b}=ri;this.history.push({...y,timestamp:b});const{onStart:E,onMove:w}=this.handlers;g||(E&&E(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=z2(g,this.transformPagePoint),Fa.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();const{onEnd:v,onSessionEnd:y,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=H2(h.type==="pointercancel"?this.lastMoveEventInfo:z2(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(h,E),y&&y(h,E)},!FL(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=a||window;const c=wb(t),u=z2(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=ri;this.history=[{...d,timestamp:f}];const{onSessionStart:m}=n;m&&m(t,H2(u,this.history)),this.removeListeners=vb(cv(this.contextWindow,"pointermove",this.handlePointerMove),cv(this.contextWindow,"pointerup",this.handlePointerUp),cv(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(c7.has(r.overflowX)||c7.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,a=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},s={x:a.x-n.x,y:a.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(t,a),Fa.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),nf(this.updatePoint)}}function z2(e,t){return t?{point:t(e.point)}:e}function u7(e,t){return{x:e.x-t.x,y:e.y-t.y}}function H2({point:e},t){return{point:e,delta:u7(e,BQ(t)),offset:u7(e,f4e(t)),velocity:m4e(t,.1)}}function f4e(e){return e[0]}function BQ(e){return e[e.length-1]}function m4e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=BQ(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>qc(t)));)n--;if(!r)return{x:0,y:0};const s=Tl(a.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(a.x-r.x)/s,y:(a.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function h4e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?rs(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?rs(n,e,r.max):Math.min(e,n)),e}function d7(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function p4e(e,{top:t,left:n,bottom:r,right:a}){return{x:d7(e.x,n,a),y:d7(e.y,t,r)}}function f7(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function g4e(e,t){return{x:f7(e.x,t.x),y:f7(e.y,t.y)}}function v4e(e,t){let n=.5;const r=Gi(e),a=Gi(t);return a>r?n=ly(t.min,t.max-r,e.min):r>a&&(n=ly(e.min,e.max-a,t.min)),ru(0,1,n)}function y4e(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const yO=.35;function b4e(e=yO){return e===!1?e=0:e===!0&&(e=yO),{x:m7(e,"left","right"),y:m7(e,"top","bottom")}}function m7(e,t,n){return{min:h7(e,t),max:h7(e,n)}}function h7(e,t){return typeof e=="number"?e:e[t]||0}const w4e=new WeakMap;class E4e{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ds(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const s=f=>{n?(this.stopAnimation(),this.snapToCursor(wb(f).point)):this.pauseAnimation()},i=(f,m)=>{this.stopAnimation();const{drag:h,dragPropagation:g,onDragStart:v}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=cDe(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gl(b=>{let E=this.getAxisMotionValue(b).get()||0;if(Yc.test(E)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[b];x&&(E=Gi(x)*(parseFloat(E)/100))}}this.originPoint[b]=E}),v&&Fa.postRender(()=>v(f,m)),dO(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:v,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=m;if(g&&this.currentDirection===null){this.currentDirection=x4e(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,b),this.updateAxis("y",m.point,b),this.visualElement.render(),y&&y(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>gl(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new UQ(t,{onSessionStart:s,onStart:i,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:VQ(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,a=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!a||!r)return;const{velocity:i}=a;this.startAnimation(i);const{onDragEnd:l}=this.getProps();l&&Fa.postRender(()=>l(r,a))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!A1(t,a,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=h4e(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,a=this.constraints;t&&L0(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=p4e(r.layoutBox,t):this.constraints=!1,this.elastic=b4e(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&gl(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=y4e(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!L0(t))return!1;const r=t.current;Tm(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const s=SDe(r,a.root,this.visualElement.getTransformPagePoint());let i=g4e(a.layout.layoutBox,s);if(n){const l=n(xDe(i));this.hasMutatedConstraints=!!l,l&&(i=uQ(l))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=gl(d=>{if(!A1(d,n,this.currentDirection))return;let f=c&&c[d]||{};i&&(f={min:0,max:0});const m=a?200:1e6,h=a?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return dO(this.visualElement,t),r.start(ML(t,r,0,n,this.visualElement,!1))}stopAnimation(){gl(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){gl(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){gl(n=>{const{drag:r}=this.getProps();if(!A1(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,s=this.getAxisMotionValue(n);if(a&&a.layout){const{min:i,max:l}=a.layout.layoutBox[n],c=s.get()||0;s.set(t[n]-rs(i,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!L0(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};gl(i=>{const l=this.getAxisMotionValue(i);if(l&&this.constraints!==!1){const c=l.get();a[i]=v4e({min:c,max:c},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),gl(i=>{if(!A1(i,t,null))return;const l=this.getAxisMotionValue(i),{min:c,max:u}=this.constraints[i];l.set(rs(c,u,a[i]))})}addListeners(){if(!this.visualElement.current)return;w4e.set(this.visualElement,this);const t=this.visualElement.current,n=cv(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,m=f!==t&&aQ(f);u&&d&&!m&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();L0(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,s=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Fa.read(r);const i=fy(window,"resize",()=>this.scalePositionWithinConstraints()),l=a.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(gl(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:s=!1,dragElastic:i=yO,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:s,dragElastic:i,dragMomentum:l}}}function A1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function x4e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _4e extends ff{constructor(t){super(t),this.removeGroupControls=Ml,this.removeListeners=Ml,this.controls=new E4e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ml}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const p7=e=>(t,n)=>{e&&Fa.postRender(()=>e(t,n))};class k4e extends ff{constructor(){super(...arguments),this.removePointerDownListener=Ml}onPointerDown(t){this.session=new UQ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:VQ(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:p7(t),onStart:p7(n),onMove:r,onEnd:(s,i)=>{delete this.session,a&&Fa.postRender(()=>a(s,i))}}}mount(){this.removePointerDownListener=cv(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let V2=!1;class S4e extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:s}=t;s&&(n.group&&n.group.add(s),r&&r.register&&a&&r.register(s),V2&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Hw.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),V2=!0,a||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||Fa.postRender(()=>{const l=i.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),$L.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;V2=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jQ(e){const[t,n]=OQ(),r=p.useContext(pL);return F.jsx(S4e,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(zQ),isPresent:t,safeToRemove:n})}const C4e={pan:{Feature:k4e},drag:{Feature:_4e,Projectio
1905nNode:IQ,MeasureLayout:jQ}};function g7(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,s=r[a];s&&Fa.postRender(()=>s(t,wb(t)))}class N4e extends ff{mount(){const{current:t}=this.node;t&&(this.unmount=uDe(t,(n,r)=>(g7(this.node,r,"Start"),a=>g7(this.node,a,"End"))))}unmount(){}}class R4e extends ff{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=vb(fy(this.node.current,"focus",()=>this.onFocus()),fy(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function v7(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),s=r[a];s&&Fa.postRender(()=>s(t,wb(t)))}class T4e extends ff{mount(){const{current:t}=this.node;t&&(this.unmount=mDe(t,(n,r)=>(v7(this.node,r,"Start"),(a,{success:s})=>v7(this.node,a,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bO=new WeakMap,U2=new WeakMap,A4e=e=>{const t=bO.get(e.target);t&&t(e)},I4e=e=>{e.forEach(A4e)};function O4e({root:e,...t}){const n=e||document;U2.has(n)||U2.set(n,{});const r=U2.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(I4e,{root:e,...t})),r[a]}function M4e(e,t,n){const r=O4e(t);return bO.set(e,n),r.observe(e),()=>{bO.delete(e),r.unobserve(e)}}const P4e={some:0,all:1};class D4e extends ff{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:P4e[a]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=u?d:f;m&&m(c)};return M4e(this.node.current,i,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(L4e(t,n))&&this.startObserver()}unmount(){}}function L4e({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $4e={inView:{Feature:D4e},tap:{Feature:T4e},focus:{Feature:R4e},hover:{Feature:N4e}},F4e={layout:{ProjectionNode:IQ,MeasureLayout:jQ}},z4e={...c4e,...$4e,...C4e,...F4e},_s=a4e(z4e,s4e);function dS(){!zL.current&&iQ();const[e]=p.useState(Ix.current);return e}const y7=Tr.organization.subscription.plan.free.flow_limit,I1=e=>{try{const t=localStorage.getItem(`maps_cache_${e}`);if(t)return JSON.parse(t)}catch{}return null},O1=(e,t)=>{try{localStorage.setItem(`maps_cache_${e}`,JSON.stringify(t))}catch{}},qL=o.memo(({map:e,index:t,isHovered:n,isMenuOpen:r,isSelected:a,isCloning:s,iconSize:i,handleMapMouseEnter:l,handleMapMouseLeave:c,setMenuOpenMapId:u,setHoveredMapId:d,handleRenameMapClick:f,handleCloneMapClick:m,handleDeleteMapClick:h,handleMapClick:g,hasMultipleTeams:v,showTeamSubtitle:y,isCloneDisabled:b,handleShareMapLinkClick:E})=>{const w=e.$id||e.id||`map-${t}`;return o.createElement("div",{onMouseEnter:()=>l(e.$id),onMouseLeave:c,className:`sidebar-item ${a?"sidebar-item__active":""} ${n?"sidebar-item__hover":""}`},o.createElement(Bt,{key:w,className:`text-xs sm:text-sm flex items-center relative ${a?"dark:!text-white":""} ${n||r?"!pl-0":""}`,icon:n||r?o.createElement(Hr,{interactionKind:"click",placement:"bottom-start",isOpen:r,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:x=>{x||u(null)},onClose:()=>u(null),content:o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(eu,{size:16}),text:"Rename",onClick:x=>{x.stopPropagation(),f(e)}}),o.createElement(fr,{content:"Upgrade to clone flows",disabled:!b},o.createElement(Bt,{icon:o.createElement(Mg,{size:16}),text:"Clone",className:"dark__text",disabled:b,onClick:x=>{x.stopPropagation(),m(e)}})),o.createElement(Bt,{icon:o.createElement(Wm,{size:16}),text:"Copy share link",className:"dark__text",onClick:x=>{x.stopPropagation(),E(e)}}),o.createElement(Bt,{icon:o.createElement(Cx,{size:16}),text:"Delete",onClick:x=>{x.stopPropagation(),h(e)},className:"dark__text"}))},o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700",onClick:x=>{x.stopPropagation(),x.preventDefault(),r?u(null):(u(e.$id),d(e.$id))}},o.createElement(Ft,{icon:o.createElement(Pg,{size:16}),className:"text-gray-500 dark:text-gray-400"}))):o.createElement(ay,{size:16,color:v&&is.getColor(e.teamID)||void 0}),text:y&&e.teamName?o.createElement("span",{className:"flex flex-col min-w-0 leading-tight"},o.createElement("span",{className:"truncate"},e.name),o.createElement("span",{className:"text-[10px] truncate text-gray-400 dark:text-gray-500"},e.teamName)):e.name,onClick:()=>g(e)}),s&&o.createElement("div",{className:"flex items-center gap-1 px-2 pb-1 text-xs text-gray-400 dark:text-gray-500 italic"},o.createElement("span",{className:"animate-pulse"},"Cloning...")))}),WQ=({containerWidth:e,setContainerWidth:t,mapNameOverrides:n={},onMapTitleChanged:r,refreshKey:a=0,paneClickCount:s=0})=>{var st,gt,ht,Ee,We,it,_t,vn,An,je,kt,Lt;const[i,l]=p.useState(!1),c=ll(),u=yr(),d=hs(),f=xs(),m=f.teamID,h=Wn(ne=>{var Be;return(Be=ne==null?void 0:ne.FB)==null?void 0:Be.auth}),g=Wn(ne=>{var Be;return(Be=ne==null?void 0:ne.UI)==null?void 0:Be.user}),v=m||((st=g==null?void 0:g.activeTeam)==null?void 0:st.id),[y,b]=p.useState(0),[E,w]=p.useState(null),x=()=>{b(ne=>ne+1)},S=g==null?void 0:g.isAllTeam,N=((gt=h==null?void 0:h.globalMeta)==null?void 0:gt.teams)||[],k="all",[C,A]=
1905p.useState(()=>I1(k)||[]),[O,T]=p.useState(()=>!I1(k)),[M,L]=p.useState(!1),D=N,j=ne=>{const Be=(ne==null?void 0:ne.code)||"";return Be==="functions/permission-denied"||Be==="functions/unauthenticated"},H=async()=>{if(D.length===0){A([]),T(!1);return}const ne=I1(k);ne?(A(ne),T(!1)):(T(!0),A([])),L(!1);try{const[{getFunctions:Be,httpsCallable:mt,connectFunctionsEmulator:we},{getApp:vt},{$FF_trigger:It}]=await Promise.all([yn(()=>function(){return(ln=>import(ln))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(ln=>import(ln))("./brand.924cec70.js")}().then(St=>St.a8),[]),yn(()=>function(){return(ln=>import(ln))("./brand.924cec70.js")}().then(St=>St.a9),[])]),fn=Be(vt()),Ne=mt(fn,It("users-map-view-list")),lt=await Promise.allSettled(D.map(St=>Ne({id_team:St.id}).then(ln=>{var vr;return(((vr=ln.data)==null?void 0:vr.output)||[]).map(Yn=>({...Yn,teamID:St.id,teamName:jo(St)}))})));if(lt.length>0&<.every(St=>St.status==="rejected"&&j(St.reason))){L(!0),A([]);return}let Ke=[];lt.forEach(St=>{St.status==="fulfilled"&&(Ke=Ke.concat(St.value))}),Ke.sort((St,ln)=>(St.name||"").localeCompare(ln.name||"")),O1(k,Ke),A(Ke)}catch(Be){console.error("Error fetching maps:",Be)}finally{T(!1)}};p.useEffect(()=>{D.length>0?H():(A([]),T(!1))},[y,a,h]);const[Y,z]=p.useState(!1),[K,ee]=p.useState(""),[oe,J]=p.useState(""),[se,B]=p.useState(!1),[U,$]=p.useState(!1),[ce,be]=p.useState(null),[ue,Ie]=p.useState(""),[Ae,he]=p.useState(!1),[_e,ie]=p.useState(!1),[Ue,ae]=p.useState(null),[pe,W]=p.useState(!1),q=async()=>{var ne,Be,mt,we;if(K.trim()){B(!0);try{const[{getFunctions:vt,httpsCallable:It,connectFunctionsEmulator:fn},{getApp:Ne},{$FF_trigger:lt}]=await Promise.all([yn(()=>function(){return(Cn=>import(Cn))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(Cn=>import(Cn))("./brand.924cec70.js")}().then(Yn=>Yn.a8),[]),yn(()=>function(){return(Cn=>import(Cn))("./brand.924cec70.js")}().then(Yn=>Yn.a9),[])]),wt=vt(Ne());let Ke=Se&&oe||v;if((Ke==="all"||!Ke)&&(Ke=((ne=g==null?void 0:g.activeTeam)==null?void 0:ne.id)||((Be=N[0])==null?void 0:Be.id)||null),!Ke){console.error("Refusing to create flow â no resolvable target workspace"),B(!1);return}const ln=await It(wt,lt("users-map-manage-add"))({map:{property_name:K.trim(),id_team:Ke}});z(!1),ee(""),J("");const vr=(we=(mt=ln==null?void 0:ln.data)==null?void 0:mt.output)==null?void 0:we.mapID;vr&&Ke&&u(Pn("/workspace/:teamID/map/:mapID",{teamID:Ke,mapID:vr})),x()}catch(vt){console.error("Error adding map:",vt)}finally{B(!1)}}},te=async()=>{if(!(!ue.trim()||!ce)){he(!0);try{const[{getFunctions:ne,httpsCallable:Be,connectFunctionsEmulator:mt},{getApp:we},{$FF_trigger:vt}]=await Promise.all([yn(()=>function(){return(St=>import(St))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(St=>import(St))("./brand.924cec70.js")}().then(Ke=>Ke.a8),[]),yn(()=>function(){return(St=>import(St))("./brand.924cec70.js")}().then(Ke=>Ke.a9),[])]),It=ne(we()),fn=Be(It,vt("users-map-manage-edit")),Ne=ce.$id||ce.id,lt=ue.trim();await fn({map:{$id:Ne,property_name:lt}});const wt=C.map(Ke=>(Ke.$id||Ke.id)===Ne?{...Ke,name:lt}:Ke).sort((Ke,St)=>(Ke.name||"").localeCompare(St.name||""));A(wt),O1(k,wt),r==null||r(Ne,lt),$(!1),Ie(""),be(null)}catch(ne){console.error("Error renaming map:",ne)}finally{he(!1)}}},X=async()=>{if(Ue){W(!0);try{const[{getFunctions:ne,httpsCallable:Be,connectFunctionsEmulator:mt},{getApp:we},{$FF_trigger:vt}]=await Promise.all([yn(()=>function(){return(Ke=>import(Ke))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(Ke=>import(Ke))("./brand.924cec70.js")}().then(wt=>wt.a8),[]),yn(()=>function(){return(Ke=>import(Ke))("./brand.924cec70.js")}().then(wt=>wt.a9),[])]),It=ne(we());await Be(It,vt("users-map-manage-delete"))({map:{$id:Ue.$id||Ue.id}}),ie(!1),ae(null);const Ne=Ue.$id||Ue.id,lt=I1(k);lt&&O1(k,lt.filter(wt=>(wt.$id||wt.id)!==Ne)),f.mapID===Ne&&(localStorage.removeItem("maps_last_opened"),u(Pn("/workspace/:teamID/map",{teamID:v}))),x()}catch(ne){console.error("Error deleting map:",ne)}finally{W(!1)}}},[le,me]=p.useState(window.innerWidth>=780?16:12),[fe,ke]=p.useState(window.innerWidth<780),Se=(((Ee=(ht=h==null?void 0:h.globalMeta)==null?void 0:ht.teams)==null?void 0:Ee.length)||0)>1;p.useEffect(()=>{const ne=()=>{me(window.innerWidth>=780?16:12),ke(window.innerWidth<780)};return window.addEventListener("resize",ne),()=>window.removeEventListener("resize",ne)},[]);const Et=ne=>{l(!0),ne.preventDefault()};p.useEffect(()=>{const ne=mt=>{if(!i)return;const we=mt.clientX;we>=120&&we<=600&&t(we)},Be=()=>{l(!1)};return i&&(document.addEventListener("mousemove",ne),document.addEventListener("mouseup",Be)),()=>{document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",Be)}},[i,t]);const[nt,Pt]=p.useState(null),[en,hn]=p.useState(null),rt=o.useRef(null),et="maps_sort_mode",[Kt,zn]=p.useState(()=>{try{const ne=localStorage.getItem(et);if(ne==="name"||ne==="workspace")return ne}catch{}return"name"}),[xt,rr]=p.useState(!1),ir=ne=>{zn(ne);try{localStorage.setItem(et,ne)}catch{}rr(!1)};p.useEffect(()=>{s>0&&(hn(null),rr(!1))},[s]);const Tn=o.useCallback(ne=>{rt.current&&clearTimeout(rt.current),rt.current=setTimeout(()=>{Pt(ne)},500)},[]),Ct=o.useCallback(()=>{rt.current&&clearTimeout(rt.current),Pt(null)},[]),_r=ne=>{var mt;const Be=S?"all":ne.teamID||((mt=ne.id_Base_Teams)==null?void 0:mt.split("/").pop());u(Pn("/workspace/:teamID/map/:mapID",{teamID:Be,mapID:ne.$id}))},Qn=ne=>{var It;
1905const Be=(ne==null?void 0:ne.access_mode)||(ne==null?void 0:ne.property_access_mode)||(ne==null?void 0:ne.sharing_access_mode),mt=(ne==null?void 0:ne.share_token)||(ne==null?void 0:ne.property_share_token)||(ne==null?void 0:ne.sharing_token);if((Be==="anyone_with_link"||(ne==null?void 0:ne.is_public)===!0||(ne==null?void 0:ne.property_is_public)===!0)&&mt){const Ne=`https://bookmark.it.com/share/flow/${mt}`;navigator.clipboard.writeText(Ne).then(()=>{re.dispatch("trigger-alert",{message:`Copied share link to "${ne.name}" to clipboard.`,intent:"success"})}),hn(null);return}const vt=ne.teamID||((It=ne.id_Base_Teams)==null?void 0:It.split("/").pop());vt&&ne.$id&&u(Pn("/workspace/:teamID/map/:mapID",{teamID:vt,mapID:ne.$id}),{state:{openShare:!0}}),hn(null)},Ce=((it=(We=h==null?void 0:h.globalMeta)==null?void 0:We.teams)==null?void 0:it.find(ne=>ne.id===v))||(()=>{try{const ne=localStorage.getItem("userLoader-teamsList");if(ne)return JSON.parse(ne).find(mt=>mt.id===v)}catch{}return null})(),ut=((_t=Ce==null?void 0:Ce.organization)==null?void 0:_t.$id)||((vn=Ce==null?void 0:Ce.organization)==null?void 0:vn.id),pn=(je=(An=h==null?void 0:h.globalMeta)==null?void 0:An.organizations)==null?void 0:je.find(ne=>ne.id===ut||ne.$id===ut),Jt=vc(h),In=(()=>{var ne;return Jt?sS(h,v)?!0:pn?!((ne=pn.subscription)!=null&&ne.active):!1:!1})(),Dn=ne=>C.filter(Be=>{var mt;return(Be.teamID||((mt=Be.id_Base_Teams)==null?void 0:mt.split("/").pop()))===ne&&!Be._is_deleted}).length,or=v?Dn(v):0,Zt=In&&or>=y7,tr=ne=>{var vt;const Be=ne.teamID||((vt=ne.id_Base_Teams)==null?void 0:vt.split("/").pop());return Be?Jt?Kp(h,Be)==="free"||(()=>{var lt,wt,Ke,St,ln,vr,Yn;const It=((wt=(lt=h==null?void 0:h.globalMeta)==null?void 0:lt.teams)==null?void 0:wt.find(Cn=>Cn.id===Be))||(()=>{try{const Cn=localStorage.getItem("userLoader-teamsList");if(Cn)return JSON.parse(Cn).find(Hn=>Hn.id===Be)}catch{}return null})(),fn=((Ke=It==null?void 0:It.organization)==null?void 0:Ke.$id)||((St=It==null?void 0:It.organization)==null?void 0:St.id),Ne=(vr=(ln=h==null?void 0:h.globalMeta)==null?void 0:ln.organizations)==null?void 0:vr.find(Cn=>Cn.id===fn||Cn.$id===fn);return Ne?!((Yn=Ne.subscription)!=null&&Yn.active):!1})()?Dn(Be)>=y7:!1:!0:!1},Fe=p.useMemo(()=>{const ne=[];if(Kt==="workspace"&&Se){const mt=new Map;C.forEach(we=>{const vt=we.teamName||"â";mt.has(vt)||mt.set(vt,[]),mt.get(vt).push(we)}),Array.from(mt.keys()).sort((we,vt)=>we.localeCompare(vt)).forEach(we=>{ne.push({type:"header",teamName:we,key:`group-header-${we}`}),mt.get(we).slice().sort((vt,It)=>(vt.name||"").localeCompare(It.name||"")).forEach((vt,It)=>{ne.push({type:"map",map:vt,key:vt.$id||vt.id||`map-${we}-${It}`})})})}else C.slice().sort((mt,we)=>(mt.name||"").localeCompare(we.name||"")).forEach((mt,we)=>{ne.push({type:"map",map:mt,key:mt.$id||mt.id||`map-${we}`})});return ne},[C,Kt,Se]);return o.createElement("div",{className:"sidebar-container flex flex-col relative h-full select-none",style:{width:e,minWidth:e}},o.createElement("div",{className:"sidebar-container__content px-2 pt-2 flex-grow overflow-y-auto no-scrollbar"},o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"flex items-center justify-between rounded transition-colors select-none group p-2"},o.createElement("div",{className:"flex items-center gap-1.5 overflow-hidden"},o.createElement("span",{className:"dark__text text-gray-500 uppercase text-xs font-semibold outline-none focus:outline-none truncate"},"Flows")),o.createElement("div",{className:"flex items-center gap-0.5"},Se&&o.createElement(Hr,{interactionKind:"click",placement:"bottom-end",isOpen:xt,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:ne=>{ne||rr(!1)},content:o.createElement(Cr,null,o.createElement(Bt,{icon:Kt==="name"?"tick":"blank",text:"Name",onClick:()=>ir("name")}),o.createElement(Bt,{icon:Kt==="workspace"?"tick":"blank",text:"Workspace",onClick:()=>ir("workspace")}))},o.createElement(fr,{content:"Sort flows",disabled:xt},o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center justify-center text-gray-500 dark:text-gray-400",onClick:ne=>{ne.stopPropagation(),rr(Be=>!Be)}},o.createElement(Ft,{icon:o.createElement(aL,{size:le})})))),Jt?!Zt&&o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center justify-center text-gray-500 dark:text-gray-400",onClick:ne=>{ne.stopPropagation(),J(v&&v!=="all"?v:""),z(!0)}},o.createElement(Ft,{icon:"plus",size:le})):o.createElement("div",{className:"p-1 rounded flex items-center justify-center text-gray-500 dark:text-gray-400 bp6-skeleton"},o.createElement(Ft,{icon:"plus",size:le})))),O?o.createElement("div",{className:"text-gray-400 text-xs italic py-1 px-2"},"Loading..."):o.createElement($i,{initial:!1},o.createElement(_s.div,{initial:{height:0,opacity:0}
1905,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"}},M?o.createElement("div",{className:"text-xs px-2 py-1 text-gray-400 dark:text-gray-500 italic"},"You don't have access to this workspace's flows."):C.length===0?o.createElement("div",{className:"text-xs px-2"},Zt?o.createElement("span",{className:"text-gray-400 dark:text-gray-500 italic"},"Upgrade to create flows."):o.createElement("button",{className:"text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 hover:underline cursor-pointer bg-transparent border-none p-0 mt-1",onClick:()=>{J(v&&v!=="all"?v:""),z(!0)}},"Create your first flow")):null,o.createElement(Cr,{className:"!bg-transparent !p-0 px-2 pb-16"},o.createElement($i,{initial:!1},Fe.map((ne,Be)=>{if(ne.type==="header")return o.createElement(_s.div,{key:ne.key,initial:{opacity:0,height:0,overflow:"hidden"},animate:{opacity:1,height:"auto",overflow:"visible"},exit:{opacity:0,height:0,overflow:"hidden"},transition:{duration:.2}},o.createElement("div",{className:"flex items-center gap-1.5 px-2 pt-3 pb-1 text-[10px] uppercase font-semibold tracking-wider text-gray-400 dark:text-gray-500 truncate select-none",title:ne.teamName},o.createElement("span",{className:"inline-block w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:is.getColor((C.find(we=>we.teamName===ne.teamName)||{}).teamID)}}),o.createElement("span",{className:"truncate"},ne.teamName)));const mt=ne.map;return o.createElement(_s.div,{key:ne.key,initial:{opacity:0,height:0,overflow:"hidden"},animate:{opacity:1,height:"auto",overflow:"visible"},exit:{opacity:0,height:0,overflow:"hidden"},transition:{duration:.2}},o.createElement(qL,{map:n[mt.$id]?{...mt,name:n[mt.$id]}:mt,index:Be,isHovered:nt===mt.$id,isMenuOpen:en===mt.$id,isSelected:d.pathname.endsWith(`/map/${mt.$id}`),isCloning:E===mt.$id,iconSize:le,handleMapMouseEnter:Tn,handleMapMouseLeave:Ct,setMenuOpenMapId:hn,setHoveredMapId:Pt,handleRenameMapClick:we=>{be(we),Ie(we.name),$(!0),hn(null)},handleCloneMapClick:async we=>{var vt,It,fn;hn(null),w(we.$id||we.id);try{const[{getFunctions:Ne,httpsCallable:lt,connectFunctionsEmulator:wt},{getApp:Ke},{$FF_trigger:St}]=await Promise.all([yn(()=>function(){return(ot=>import(ot))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(ot=>import(ot))("./brand.924cec70.js")}().then(Re=>Re.a8),[]),yn(()=>function(){return(ot=>import(ot))("./brand.924cec70.js")}().then(Re=>Re.a9),[])]),ln=Ne(Ke()),Yn=await lt(ln,St("users-map-manage-clone"))({map:{$id:we.$id||we.id}}),Cn=(It=(vt=Yn==null?void 0:Yn.data)==null?void 0:vt.output)==null?void 0:It.mapID,Hn=we.teamID||((fn=we.id_Base_Teams)==null?void 0:fn.split("/").pop());if(Cn){const Re={...we,$id:Cn,name:`${we.name} copy`},ot=[...C,Re].sort((jt,En)=>(jt.name||"").localeCompare(En.name||""));A(ot),O1(k,ot),Hn&&u(Pn("/workspace/:teamID/map/:mapID",{teamID:Hn,mapID:Cn}))}}catch(Ne){console.error("Error cloning map:",Ne)}finally{w(null)}},handleDeleteMapClick:we=>{ae(we),ie(!0),hn(null)},handleMapClick:_r,handleShareMapLinkClick:Qn,hasMultipleTeams:Se,showTeamSubtitle:Se&&Kt!=="workspace",isCloneDisabled:tr(mt)}))})))))),In&&ut&&or===1&&o.createElement("div",{className:"px-2 mt-4"},o.createElement(ci,{className:"cursor-pointer text-xs text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-500 text-decoration-none",to:Pn("/organization/:organizationID/subscribe",{organizationID:ut})},"Upgrade for unlimited flows"))),!fe&&o.createElement("div",{className:"absolute top-0 -right-[7px] w-4 h-[calc(100vh-100px)] cursor-col-resize z-50 flex justify-center hover:bg-transparent group",onMouseDown:Et},o.createElement("div",{className:"w-[1px] h-full transition-colors group-hover:bg-blue-500 delay-75 group-active:bg-blue-600 bg-transparent"})),o.createElement(ya,{isOpen:Y,onClose:()=>!se&&z(!1),title:"Add Flow",style:{width:"400px"},isCloseButtonShown:!se,className:c?Xr:void 0},o.createElement("div",{className:Fs},o.createElement(Cs,{value:K,onChange:ne=>ee(ne.target.value),placeholder:"Flow Name",autoFocus:!0,disabled:se}
vendor: 16,384 bytes, line 1905
1905),Se&&o.createElement(Ra,{label:"Select Workspace",className:"mt-4",helperText:"Choose which workspace this flow belongs to"},o.createElement(Ko,{value:oe,onChange:ne=>J(ne.target.value),fill:!0,disabled:se},o.createElement("option",{value:"",disabled:!0},"Select a workspace..."),(Lt=(kt=h==null?void 0:h.globalMeta)==null?void 0:kt.teams)==null?void 0:Lt.map(ne=>o.createElement("option",{key:ne.id,value:ne.id},jo(ne)))))),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement("div",{className:"flex items-center justify-between w-full"},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"text-red-500 dark:text-pink-600 hover:underline cursor-pointer",onClick:ne=>{ne.preventDefault();const Be=["Red","Blue","Green","Yellow","Purple","Orange","Pink","Teal","Cyan","Magenta","Violet","Indigo","Crimson","Azure","Emerald","Golden","Silver","Bronze"],mt=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","octopus","penguin","owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],we=Be[Math.floor(Math.random()*Be.length)],vt=mt[Math.floor(Math.random()*mt.length)],It=Math.floor(100+Math.random()*900),fn=`${we} ${vt} ${It}`;ee(fn)}},"Create random flow"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>z(!1),disabled:se}),o.createElement(De,{text:"Create",intent:jr.PRIMARY,onClick:q,loading:se,disabled:!K.trim()||Se&&!oe})))))),o.createElement(ya,{isOpen:U,onClose:()=>!Ae&&$(!1),title:"Rename Flow",style:{width:"400px"},isCloseButtonShown:!Ae,className:c?Xr:void 0},o.createElement("div",{className:Fs},o.createElement(Cs,{value:ue,onChange:ne=>Ie(ne.target.value),placeholder:"Flow Name",autoFocus:!0,disabled:Ae})),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>$(!1),disabled:Ae}),o.createElement(De,{text:"Save",intent:jr.PRIMARY,onClick:te,loading:Ae,disabled:!ue.trim()})))),o.createElement(ya,{isOpen:_e,onClose:()=>!pe&&ie(!1),title:"Delete Flow",icon:"trash",style:{width:"400px"},isCloseButtonShown:!pe,className:c?Xr:void 0},o.createElement("div",{className:Fs},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Are you sure you want to delete the flow"," ",o.createElement("strong",null,Ue==null?void 0:Ue.name),"?")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>ie(!1),disabled:pe}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:X,loading:pe})))))};qL.displayName="SidebarMapItem";qL.propTypes={map:Mn.shape({$id:Mn.string,id:Mn.string,name:Mn.string,teamID:Mn.string,teamName:Mn.string}).isRequired,index:Mn.number.isRequired,isHovered:Mn.bool,isMenuOpen:Mn.bool,isSelected:Mn.bool,isCloning:Mn.bool,iconSize:Mn.number,handleMapMouseEnter:Mn.func.isRequired,handleMapMouseLeave:Mn.func.isRequired,setMenuOpenMapId:Mn.func.isRequired,setHoveredMapId:Mn.func.isRequired,handleRenameMapClick:Mn.func.isRequired,handleCloneMapClick:Mn.func.isRequired,handleDeleteMapClick:Mn.func.isRequired,handleMapClick:Mn.func.isRequired,handleShareMapLinkClick:Mn.func.isRequired,hasMultipleTeams:Mn.bool,showTeamSubtitle:Mn.bool,isCloneDisabled:Mn.bool};WQ.propTypes={containerWidth:Mn.number.isRequired,setContainerWidth:Mn.func.isRequired,mapNameOverrides:Mn.objectOf(Mn.string),onMapTitleChanged:Mn.func};function As(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=As(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var H4e={value:()=>{}};function fS(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Vw(n)}function Vw(e){this._=e}function V4e(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Vw.prototype=fS.prototype={constructor:Vw,on:function(e,t){var n=this._,r=V4e(e+"",n),a,s=-1,i=r.length;if(arguments.length<2){for(;++s<i;)if((a=(e=r[s]).type)&&(a=U4e(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<i;)if(a=(e=r[s]).type)n[a]=b7(n[a],e.name,t);else if(t==null)for(a in n)n[a]=b7(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Vw(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,s;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,a=s.length;r<a;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,s=r.length;a<s;++a)r[a].value.apply(t,n)}};function U4e(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function b7(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=H4e,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var wO="http://www.w3.org/1999/xhtml";const w7={svg:"http://www.w3.org/2000/svg",xhtml:wO,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mS(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),w7.hasOwnProperty(t)?{space:w7[t],local:e}:e}function B4e(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===wO&&t.documentElement.namespaceURI===wO?t.createElement(e):t.createElementNS(n,e)}}function j4e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function GQ(e){var t=mS(e);return(t.local?j4e:B4e)(t)}function W4e(){}function YL(e){return e==null?W4e:function(){return this.querySelector(e)}}function G4e(e){typeof e!="function"&&(e=YL(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var s=t[a],i=s.length,l=r[a]=new Array(i),c,u,d=0;d<i;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new tl(r,this._parents)}function q4e(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Y4e(){return[]}function qQ(e){return e==null?Y4e:function(){return this.querySelectorAll(e)}}function K4e(e){return function(){return q4e(e.apply(this,arguments))}}function Z4e(e){typeof e=="function"?e=K4e(e):e=qQ(e);for(var t=this._groups,n=t.length,r=[],a=[],s=0;s<n;++s)for(var i=t[s],l=i.length,c,u=0;u<l;++u)(c=i[u])&&(r.push(e.call(c,c.__data__,u,i)),a.push(c));return new tl(r,a)}function YQ(e){return function(){return this.matches(e)}}function KQ(e){return function(t){return t.matches(e)}}var X4e=Array.prototype.find;function Q4e(e){return function(){return X4e.call(this.children,e)}}function J4e(){return this.firstElementChild}function e5e(e){return this.select(e==null?J4e:Q4e(typeof e=="function"?e:KQ(e)))}var t5e=Array.prototype.filter;function n5e(){return Array.from(this.children)}function r5e(e){return function(){return t5e.call(this.children,e)}}function a5e(e){return this.selectAll(e==null?n5e:r5e(typeof e=="function"?e:KQ(e)))}function s5e(e){typeof e!="function"&&(e=YQ(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var s=t[a],i=s.length,l=r[a]=[],c,u=0;u<i;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new tl(r,this._parents)}function ZQ(e){return new Array(e.length)}function i5e(){return new tl(this._enter||this._groups.map(ZQ),this._parents)}function Lx(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Lx.prototype={constructor:Lx,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function o5e(e){return function(){return e}}function l5e(e,t,n,r,a,s){for(var i=0,l,c=t.length,u=s.length;i<u;++i)(l=t[i])?(l.__data__=s[i],r[i]=l):n[i]=new Lx(e,s[i]);for(;i<c;++i)(l=t[i])&&(a[i]=l)}function c5e(e,t,n,r,a,s,i){var l,c,u=new Map,d=t.length,f=s.length,m=new Array(d),h;for(l=0;l<d;++l)(c=t[l])&&(m[l]=h=i.call(c,c.__data__,l,t)+"",u.has(h)?a[l]=c:u.set(h,c));for(l=0;l<f;++l)h=i.call(e,s[l],l,s)+"",(c=u.get(h))?(r[l]=c,c.__data__=s[l],u.delete(h)):n[l]=new Lx(e,s[l]);for(l=0;l<d;++l)(c=t[l])&&u.get(m[l])===c&&(a[l]=c)}function u5e(e){return e.__data__}function d5e(e,t){if(!arguments.length)return Array.from(this,u5e);var n=t?c5e:l5e,r=this._parents,a=this._groups;typeof e!="function"&&(e=o5e(e));for(var s=a.length,i=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var d=r[u],f=a[u],m=f.length,h=f5e(e.call(d,d&&d.__data__,u,r)),g=h.length,v=l[u]=new Array(g),y=i[u]=new Array(g),b=c[u]=new Array(m);n(d,f,v,y,b,h,t);for(var E=0,w=0,x,S;E<g;++E)if(x=v[E]){for(E>=w&&(w=E+1);!(S=y[w])&&++w<g;);x._next=S||null}}return i=new tl(i,r),i._enter=l,i._exit=c,i}function f5e(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function m5e(){return new tl(this._exit||this._groups.map(ZQ),this._parents)}function h5e(e,t,n){var r=this.enter(),a=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?s.remove():n(s),r&&a?r.merge(a).order():a}function p5e(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,s=r.length,i=Math.min(a,s),l=new Array(a),c=0;c<i;++c)for(var u=n[c],d=r[c],f=u.length,m=l[c]=new Array(f),h,g=0;g<f;++g)(h=u[g]||d[g])&&(m[g]=h);for(;c<a;++c)l[c]=n[c];return new tl(l,this._parents)}function g5e(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,s=r[a],i;--a>=0;)(i=r[a])&&(s&&i.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(i,s),s=i);return this}function v5e(e){e||(e=y5e);function t(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var n=this._groups,r=n.length,a=new Array(r),s=0;s<r;++s){for(var i=n[s],l=i.length,c=a[s]=new Array(l),u,d=0;d<l;++d)(u=i[d])&&(c[d]=u);c.sort(t)}return new tl(a,this._parents).order()}function y5e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function b5e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function w5e(){return Array.from(this)}function E5e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,s=r.length;a<s;++a){var i=r[a];if(i)return i}return null}function x5e(){let e=0;for(const t of this)++e;return e}function _5e(){return!this.node()}function k5e(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],s=0,i=a.length,l;s<i;++s)(l=a[s])&&e.call(l,l.__data__,s,a);return this}function S5e(e){return function(){this.removeAttribute(e)}}function C5e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function N5e(e,t){return function(){this.setAttribute(e,t)}}function R5e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function T5e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function A5e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function I5e(e,t){var n=mS(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?C5e:S5e:typeof t=="function"?n.local?A5e:T5e:n.local?R5e:N5e)(n,t))}function XQ(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function O5e(e){return function(){this.style.removeProperty(e)}}function M5e(e,t,n){return function(){this.style.setProperty(e,t,n)}}function P5e(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function D5e(e,t,n){return arguments.length>1?this.each((t==null?O5e:typeof t=="function"?P5e:M5e)(e,t,n??"")):Xp(this.node(),e)}function Xp(e,t){return e.style.getPropertyValue(t)||XQ(e).getComputedStyle(e,null).getPropertyValue(t)}function L5e(e){return function(){delete this[e]}}function $5e(e,t){return function(){this[e]=t}}function F5e(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function z5e(e,t){return arguments.length>1?this.each((t==null?L5e:typeof t=="function"?F5e:$5e)(e,t)):this.node()[e]}function QQ(e){return e.trim().split(/^|\s+/)}function KL(e){return e.classList||new JQ(e)}function JQ(e){this._node=e,this._names=QQ(e.getAttribute("class")||"")}JQ.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function eJ(e,t){for(var n=KL(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function tJ(e,t){for(var n=KL(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function H5e(e){return function(){eJ(this,e)}}function V5e(e){return function(){tJ(this,e)}}function U5e(e,t){return function(){(t.apply(this,arguments)?eJ:tJ)(this,e)}}function B5e(e,t){var n=QQ(e+"");if(arguments.length<2){for(var r=KL(this.node()),a=-1,s=n.length;++a<s;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?U5e:t?H5e:V5e)(n,t))}function j5e(){this.textContent=""}function W5e(e){return function(){this.textContent=e}}function G5e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q5e(e){return arguments.length?this.each(e==null?j5e:(typeof e=="function"?G5e:W5e)(e)):this.node().textContent}function Y5e(){this.innerHTML=""}function K5e(e){return function(){this.innerHTML=e}}function Z5e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function X5e(e){return arguments.length?this.each(e==null?Y5e:(typeof e=="function"?Z5e:K5e)(e)):this.node().innerHTML}function Q5e(){this.nextSibling&&this.parentNode.appendChild(this)}function J5e(){return this.each(Q5e)}function e$e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function t$e(){return this.each(e$e)}function n$e(e){var t=typeof e=="function"?e:GQ(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function r$e(){return null}function a$e(e,t){var n=typeof e=="function"?e:GQ(e),r=t==null?r$e:typeof t=="function"?t:YL(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function s$e(){var e=this.parentNode;e&&e.removeChild(this)}function i$e(){return this.each(s$e)}function o$e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function l$e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c$e(e){return this.select(e?l$e:o$e)}function u$e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function d$e(e){return function(t){e.call(this,t,this.__data__)}}function f$e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function m$e(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,s;n<a;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function h$e(e,t,n){return function(){var r=this.__on,a,s=d$e(t);if(r){for(var i=0,l=r.length;i<l;++i)if((a=r[i]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=n),a.value=t;return}}this.addEventListener(e.type,s,n),a={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(a):this.__on=[a]}}function p$e(e,t,n){var r=f$e(e+""),a,s=r.length,i;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(a=0,d=l[c];a<s;++a)if((i=r[a]).type===d.type&&i.name===d.name)return d.value}return}for(l=t?h$e:m$e,a=0;a<s;++a)this.each(l(r[a],
vendor: 5,942 bytes, line 1905
1905t,n));return this}function nJ(e,t,n){var r=XQ(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function g$e(e,t){return function(){return nJ(this,e,t)}}function v$e(e,t){return function(){return nJ(this,e,t.apply(this,arguments))}}function y$e(e,t){return this.each((typeof t=="function"?v$e:g$e)(e,t))}function*b$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,s=r.length,i;a<s;++a)(i=r[a])&&(yield i)}var rJ=[null];function tl(e,t){this._groups=e,this._parents=t}function Eb(){return new tl([[document.documentElement]],rJ)}function w$e(){return this}tl.prototype=Eb.prototype={constructor:tl,select:G4e,selectAll:Z4e,selectChild:e5e,selectChildren:a5e,filter:s5e,data:d5e,enter:i5e,exit:m5e,join:h5e,merge:p5e,selection:w$e,order:g5e,sort:v5e,call:b5e,nodes:w5e,node:E5e,size:x5e,empty:_5e,each:k5e,attr:I5e,style:D5e,property:z5e,classed:B5e,text:q5e,html:X5e,raise:J5e,lower:t$e,append:n$e,insert:a$e,remove:i$e,clone:c$e,datum:u$e,on:p$e,dispatch:y$e,[Symbol.iterator]:b$e};function Vo(e){return typeof e=="string"?new tl([[document.querySelector(e)]],[document.documentElement]):new tl([[e]],rJ)}function E$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ql(e,t){if(e=E$e(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const x$e={passive:!1},my={capture:!0,passive:!1};function B2(e){e.stopImmediatePropagation()}function tp(e){e.preventDefault(),e.stopImmediatePropagation()}function aJ(e){var t=e.document.documentElement,n=Vo(e).on("dragstart.drag",tp,my);"onselectstart"in t?n.on("selectstart.drag",tp,my):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sJ(e,t){var n=e.document.documentElement,r=Vo(e).on("dragstart.drag",null);t&&(r.on("click.drag",tp,my),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const M1=e=>()=>e;function EO(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:s,x:i,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}EO.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function _$e(e){return!e.ctrlKey&&!e.button}function k$e(){return this.parentNode}function S$e(e,t){return t??{x:e.x,y:e.y}}function C$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function iJ(){var e=_$e,t=k$e,n=S$e,r=C$e,a={},s=fS("start","drag","end"),i=0,l,c,u,d,f=0;function m(x){x.on("mousedown.drag",h).filter(r).on("touchstart.drag",y).on("touchmove.drag",b,x$e).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,S){if(!(d||!e.call(this,x,S))){var N=w(this,t.call(this,x,S),x,S,"mouse");N&&(Vo(x.view).on("mousemove.drag",g,my).on("mouseup.drag",v,my),aJ(x.view),B2(x),u=!1,l=x.clientX,c=x.clientY,N("start",x))}}function g(x){if(tp(x),!u){var S=x.clientX-l,N=x.clientY-c;u=S*S+N*N>f}a.mouse("drag",x)}function v(x){Vo(x.view).on("mousemove.drag mouseup.drag",null),sJ(x.view,u),tp(x),a.mouse("end",x)}function y(x,S){if(e.call(this,x,S)){var N=x.changedTouches,k=t.call(this,x,S),C=N.length,A,O;for(A=0;A<C;++A)(O=w(this,k,x,S,N[A].identifier,N[A]))&&(B2(x),O("start",x,N[A]))}}function b(x){var S=x.changedTouches,N=S.length,k,C;for(k=0;k<N;++k)(C=a[S[k].identifier])&&(tp(x),C("drag",x,S[k]))}function E(x){var S=x.changedTouches,N=S.length,k,C;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),k=0;k<N;++k)(C=a[S[k].identifier])&&(B2(x),C("end",x,S[k]))}function w(x,S,N,k,C,A){var O=s.copy(),T=Ql(A||N,S),M,L,D;if((D=n.call(x,new EO("beforestart",{sourceEvent:N,target:m,identifier:C,active:i,x:T[0],y:T[1],dx:0,dy:0,dispatch:O}),k))!=null)return M=D.x-T[0]||0,L=D.y-T[1]||0,function j(H,Y,z){var K=T,ee;switch(H){case"start":a[C]=j,ee=i++;break;case"end":delete a[C],--i;case"drag":T=Ql(z||Y,S),ee=i;break}O.call(H,x,new EO(H,{sourceEvent:Y,subject:D,target:m,identifier:C,active:ee,x:T[0]+M,y:T[1]+L,dx:T[0]-K[0],dy:T[1]-K[1],dispatch:O}),k)}}return m.filter=function(x){return arguments.length?(e=typeof x=="function"?x:M1(!!x),m):e},m.container=function(x){return arguments.length?(t=typeof x=="function"?x:M1(x),m):t},m.subject=function(x){return arguments.length?(n=typeof x=="function"?x:M1(x),m):n},m.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:M1(!!x),m):r},m.on=function(){var x=s.on.apply(s,arguments);return x===s?m:x},m.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,m):Math.sqrt(f)},m}function ZL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function oJ(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xb(){}var hy=.7,$x=1/hy,np="\\s*([+-]?\\d+)\\s*",py="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",N$e=/^#([0-9a-f]{3,8})$/,R$e=new RegExp(`^rgb\\(${np},${np},${np}\\)$`),T$e=new RegExp(`^rgb\\(${Kc},${Kc},${Kc}\\)$`),A$e=new RegExp(`^rgba\\(${np},${np},${np},${py}\\)$`),I$e=new RegExp(`^rgba\\(${Kc},${Kc},${Kc},${py}
1905\\)$`),O$e=new RegExp(`^hsl\\(${py},${Kc},${Kc}\\)$`),M$e=new RegExp(`^hsla\\(${py},${Kc},${Kc},${py}\\)$`),E7={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ZL(xb,Am,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:x7,formatHex:x7,formatHex8:P$e,formatHsl:D$e,formatRgb:_7,toString:_7});function x7(){return this.rgb().formatHex()}function P$e(){return this.rgb().formatHex8()}function D$e(){return lJ(this).formatHsl()}function _7(){return this.rgb().formatRgb()}function Am(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=N$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?k7(t):n===3?new mo(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?P1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?P1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=R$e.exec(e))?new mo(t[1],t[2],t[3],1):(t=T$e.exec(e))?new mo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=A$e.exec(e))?P1(t[1],t[2],t[3],t[4]):(t=I$e.exec(e))?P1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=O$e.exec(e))?N7(t[1],t[2]/100,t[3]/100,1):(t=M$e.exec(e))?N7(t[1],t[2]/100,t[3]/100,t[4]):E7.hasOwnProperty(e)?k7(E7[e]):e==="transparent"?new mo(NaN,NaN,NaN,0):null}function k7(e){return new mo(e>>16&255,e>>8&255,e&255,1)}function P1(e,t,n,r){return r<=0&&(e=t=n=NaN),new mo(e,t,n,r)}function L$e(e){return e instanceof xb||(e=Am(e)),e?(e=e.rgb(),new mo(e.r,e.g,e.b,e.opacity)):new mo}function xO(e,t,n,r){return arguments.length===1?L$e(e):new mo(e,t,n,r??1)}function mo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ZL(mo,xO,oJ(xb,{brighter(e){return e=e==null?$x:Math.pow($x,e),new mo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hy:Math.pow(hy,e),new mo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new mo(lm(this.r),lm(this.g),lm(this.b),Fx(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:S7,formatHex:S7,formatHex8:$$e,formatRgb:C7,toString:C7}));function S7(){return`#${Kf(this.r)}${Kf(this.g)}${Kf(this.b)}`}function $$e(){return`#${Kf(this.r)}${Kf(this.g)}${Kf(this.b)}${Kf((isNaN(this.opacity)?1:this.opacity)*255)}`}function C7(){const e=Fx(this.opacity);return`${e===1?"rgb(":"rgba("}${lm(this.r)}, ${lm(this.g)}, ${lm(this.b)}${e===1?")":`, ${e})`}`}function Fx(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lm(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kf(e){return e=lm(e),(e<16?"0":"")+e.toString(16)}function N7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new tc(e,t,n,r)}function lJ(e){if(e instanceof tc)return new tc(e.h,e.s,e.l,e.opacity);if(e instanceof xb||(e=Am(e)),!e)return new tc;if(e instanceof tc)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),s=Math.max(t,n,r),i=NaN,l=s-a,c=(s+a)/2;return l?(t===s?i=(n-r)/l+(n<r)*6:n===s?i=(r-t)/l+2:i=(t-n)/l+4,l/=c<.5?s+a:2-s-a,i*=60):l=c>0&&c<1?0:i,new tc(i,l,c,e.opacity)}function F$e(e,t,n,r){return arguments.length===1?lJ(e):new tc(e,t,n,r??1)}function tc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ZL(tc,F$e,oJ(xb,{brighter(e){return e=e==null?$x:Math.pow($x,e),new tc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hy:Math.pow(hy,e),new tc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new mo(j2(e>=240?e-240:e+120,a,r),j2(e,a,r),j2(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new tc(R7(this.h),D1(this.s),D1(this.l),Fx(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Fx(this.opacity);return`${e===1?"hsl(":"hsla("}${R7(this.h)}, ${D1(this.s)*100}%, ${D1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function R7(e){return e=(e||0)%360,e<0?e+360:e}function D1(e){return Math.max(0,Math.min(1,e||0))}function j2(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const XL=e=>()=>e;function z$e(e,t){return function(n){return e+n*t}}function H$e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function V$e(e){return(e=+e)==1?cJ:function(t,n){return n-t?H$e(t,n,e):XL(isNaN(t)?n:t)}}function cJ(e,t){var n=t-e;return n?z$e(e,n):XL(isNaN(e)?t:e)}const zx=function e(t){var n=V$e(t);function r(a,s){var i=n((a=xO(a)).r,(s=xO(s)).r),l=n(a.g,s.g),c=n(a.b,s.b),u=cJ(a.opacity,s.opacity);return function(d){return a.r=i(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return r.gamma=e,r}(1);function U$e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(s){for(a=0;a<n;++a)r[a]=e[a]*(1-s)+t[a]*s;return r}}function B$e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function j$e(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),s=new Array(n),i;for(i=0;i<r;++i)a[i]=uv(e[i],t[i]);for(;i<n;++i)s[i]=t[i];return function(l){for(i=0;i<r;++i)s[i]=a[i](l);return s}}function W$e(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Dc(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function G$e(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=uv(e[a],t[a]):r[a]=t[a];return function(s){for(a in n)r[a]=n[a](s);return r}}var _O=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,W2=new RegExp(_O.source,"g");function q$e(e){return function(){return e}}function Y$e(e){return function(t){return e(t)+""}}function uJ(e,t){var n=_O.lastIndex=W2.lastIndex=0,r,a,s,i=-1,l=[],c=[];for(e=e+"",t=t+"";(r=_O.exec(e))&&(a=W2.exec(t));)(s=a.index)>n&&(s=t.slice(n,s),l[i]?l[i]+=s:l[++i]=s),(r=r[0])===(a=a[0])?l[i]?l[i]+=a:l[++i]=a:(l[++i]=null,c.push({i,x:Dc(r,a)})),n=W2.lastIndex;return n<t.length&&(s=t.slice(n),l[i]?l[i]+=s:l[++i]=s),l.length<2?c[0]?Y$e(c[0].x):q$e(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function uv(e,t){var n=typeof t,r;return t==null||n==="boolean"?XL(t):(n==="number"?Dc:n==="string"?(r=Am(t))?(t=r,zx):uJ:t instanceof Am?zx:t instanceof Date?W$e:B$e(t)?U$e:Array.isArray(t)?j$e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?G$e:Dc)(e,t)}var T7=180/Math.PI,kO={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dJ(e,t,n,r,a,s){var i,l,c;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,i=-i),{translateX:a,translateY:s,rotate:Math.atan2(t,e)*T7,skewX:Math.atan(c)*T7,scaleX:i,scaleY:l}}var L1;function K$e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?kO:dJ(t.a,t.b,t.c,t.d,t.e,t.f)}function Z$e(e){return e==null||(L1||(L1=document.createElementNS("http://www.w3.org/2000/svg","g")),L1.setAttribute("transform",e),!(e=L1.transform.baseVal.consolidate()))?kO:(e=e.matrix,dJ(e.a,e.b,e.c,e.d,e.e,e.f))}function fJ(e,t,n,r){function a(u){return u.length?u.pop()+" ":""}function s(u,d,f,m,h,g){if(u!==f||d!==m){var v=h.push("translate(",null,t,null,n);g.push({i:v-4,x:Dc(u,f)},{i:v-2,x:Dc(d,m)})}else(f||m)&&h.push("translate("+f+t+m+n)}function i(u,d,f,m){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),m.push({i:f.push(a(f)+"rotate(",null,r)-2,x:Dc(u,d)})):d&&f.push(a(f)+"rotate("+d+r)}
vendor: 24,289 bytes, line 1905
1905function l(u,d,f,m){u!==d?m.push({i:f.push(a(f)+"skewX(",null,r)-2,x:Dc(u,d)}):d&&f.push(a(f)+"skewX("+d+r)}function c(u,d,f,m,h,g){if(u!==f||d!==m){var v=h.push(a(h)+"scale(",null,",",null,")");g.push({i:v-4,x:Dc(u,f)},{i:v-2,x:Dc(d,m)})}else(f!==1||m!==1)&&h.push(a(h)+"scale("+f+","+m+")")}return function(u,d){var f=[],m=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,m),i(u.rotate,d.rotate,f,m),l(u.skewX,d.skewX,f,m),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,m),u=d=null,function(h){for(var g=-1,v=m.length,y;++g<v;)f[(y=m[g]).i]=y.x(h);return f.join("")}}}var X$e=fJ(K$e,"px, ","px)","deg)"),Q$e=fJ(Z$e,", ",")",")"),J$e=1e-12;function A7(e){return((e=Math.exp(e))+1/e)/2}function e3e(e){return((e=Math.exp(e))-1/e)/2}function t3e(e){return((e=Math.exp(2*e))-1)/(e+1)}const Uw=function e(t,n,r){function a(s,i){var l=s[0],c=s[1],u=s[2],d=i[0],f=i[1],m=i[2],h=d-l,g=f-c,v=h*h+g*g,y,b;if(v<J$e)b=Math.log(m/u)/t,y=function(k){return[l+k*h,c+k*g,u*Math.exp(t*k*b)]};else{var E=Math.sqrt(v),w=(m*m-u*u+r*v)/(2*u*n*E),x=(m*m-u*u-r*v)/(2*m*n*E),S=Math.log(Math.sqrt(w*w+1)-w),N=Math.log(Math.sqrt(x*x+1)-x);b=(N-S)/t,y=function(k){var C=k*b,A=A7(S),O=u/(n*E)*(A*t3e(t*C+S)-e3e(S));return[l+O*h,c+O*g,u*A/A7(t*C+S)]}}return y.duration=b*1e3*t/Math.SQRT2,y}return a.rho=function(s){var i=Math.max(.001,+s),l=i*i,c=l*l;return e(i,l,c)},a}(Math.SQRT2,2,4);var Qp=0,$0=0,p0=0,mJ=1e3,Hx,F0,Vx=0,Im=0,hS=0,gy=typeof performance=="object"&&performance.now?performance:Date,hJ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function QL(){return Im||(hJ(n3e),Im=gy.now()+hS)}function n3e(){Im=0}function Ux(){this._call=this._time=this._next=null}Ux.prototype=pJ.prototype={constructor:Ux,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?QL():+n)+(t==null?0:+t),!this._next&&F0!==this&&(F0?F0._next=this:Hx=this,F0=this),this._call=e,this._time=n,SO()},stop:function(){this._call&&(this._call=null,this._time=1/0,SO())}};function pJ(e,t,n){var r=new Ux;return r.restart(e,t,n),r}function r3e(){QL(),++Qp;for(var e=Hx,t;e;)(t=Im-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qp}function I7(){Im=(Vx=gy.now())+hS,Qp=$0=0;try{r3e()}finally{Qp=0,s3e(),Im=0}}function a3e(){var e=gy.now(),t=e-Vx;t>mJ&&(hS-=t,Vx=e)}function s3e(){for(var e,t=Hx,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Hx=n);F0=e,SO(r)}function SO(e){if(!Qp){$0&&($0=clearTimeout($0));var t=e-Im;t>24?(e<1/0&&($0=setTimeout(I7,e-gy.now()-hS)),p0&&(p0=clearInterval(p0))):(p0||(Vx=gy.now(),p0=setInterval(a3e,mJ)),Qp=1,hJ(I7))}}function O7(e,t,n){var r=new Ux;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var i3e=fS("start","end","cancel","interrupt"),o3e=[],gJ=0,M7=1,CO=2,Bw=3,P7=4,NO=5,jw=6;function pS(e,t,n,r,a,s){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;l3e(e,n,{name:t,index:r,group:a,on:i3e,tween:o3e,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:gJ})}function JL(e,t){var n=xc(e,t);if(n.state>gJ)throw new Error("too late; already scheduled");return n}function fu(e,t){var n=xc(e,t);if(n.state>Bw)throw new Error("too late; already running");return n}function xc(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function l3e(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=pJ(s,0,n.time);function s(u){n.state=M7,n.timer.restart(i,n.delay,n.time),n.delay<=u&&i(u-n.delay)}function i(u){var d,f,m,h;if(n.state!==M7)return c();for(d in r)if(h=r[d],h.name===n.name){if(h.state===Bw)return O7(i);h.state===P7?(h.state=jw,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[d]):+d<t&&(h.state=jw,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[d])}if(O7(function(){n.state===Bw&&(n.state=P7,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=CO,n.on.call("start",e,e.__data__,n.index,n.group),n.state===CO){for(n.state=Bw,a=new Array(m=n.tween.length),d=0,f=-1;d<m;++d)(h=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(a[++f]=h);a.length=f+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=NO,1),f=-1,m=a.length;++f<m;)a[f].call(e,d);n.state===NO&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=jw,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Ww(e,t){var n=e.__transition,r,a,s=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){s=!1;continue}a=r.state>CO&&r.state<NO,r.state=jw,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}s&&delete e.__transition}}function c3e(e){return this.each(function(){Ww(this,e)})}function u3e(e,t){var n,r;return function(){var a=fu(this,e),s=a.tween;if(s!==n){r=n=s;for(var i=0,l=r.length;i<l;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}a.tween=r}}function d3e(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var s=fu(this,e),i=s.tween;if(i!==r){a=(r=i).slice();for(var l={name:t,value:n},c=0,u=a.length;c<u;++c)if(a[c].name===t){a[c]=l;break}c===u&&a.push(l)}s.tween=a}}function f3e(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=xc(this.node(),n).tween,a=0,s=r.length,i;a<s;++a)if((i=r[a]).name===e)return i.value;return null}return this.each((t==null?u3e:d3e)(n,e,t))}function e4(e,t,n){var r=e._id;return e.each(function(){var a=fu(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return xc(a,r).value[t]}}function vJ(e,t){var n;return(typeof t=="number"?Dc:t instanceof Am?zx:(n=Am(t))?(t=n,zx):uJ)(e,t)}function m3e(e){return function(){this.removeAttribute(e)}}function h3e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function p3e(e,t,n){var r,a=n+"",s;return function(){var i=this.getAttribute(e);return i===a?null:i===r?s:s=t(r=i,n)}}function g3e(e,t,n){var r,a=n+"",s;return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?s:s=t(r=i,n)}}function v3e(e,t,n){var r,a,s;return function(){var i,l=n(this),c;return l==null?void this.removeAttribute(e):(i=this.getAttribute(e),c=l+"",i===c?null:i===r&&c===a?s:(a=c,s=t(r=i,l)))}}function y3e(e,t,n){var r,a,s;return function(){var i,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),c=l+"",i===c?null:i===r&&c===a?s:(a=c,s=t(r=i,l)))}}function b3e(e,t){var n=mS(e),r=n==="transform"?Q$e:vJ;return this.attrTween(e,typeof t=="function"?(n.local?y3e:v3e)(n,r,e4(this,"attr."+e,t)):t==null?(n.local?h3e:m3e)(n):(n.local?g3e:p3e)(n,r,t))}function w3e(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function E3e(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function x3e(e,t){var n,r;function a(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&E3e(e,s)),n}return a._value=t,a}function _3e(e,t){var n,r;function a(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&w3e(e,s)),n}return a._value=t,a}function k3e(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=mS(e);return this.tween(n,(r.local?x3e:_3e)(r,t))}function S3e(e,t){return function(){JL(this,e).delay=+t.apply(this,arguments)}}function C3e(e,t){return t=+t,function(){JL(this,e).delay=t}}function N3e(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?S3e:C3e)(t,e)):xc(this.node(),t).delay}function R3e(e,t){return function(){fu(this,e).duration=+t.apply(this,arguments)}}function T3e(e,t){return t=+t,function(){fu(this,e).duration=t}}function A3e(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?R3e:T3e)(t,e)):xc(this.node(),t).duration}function I3e(e,t){if(typeof t!="function")throw new Error;return function(){fu(this,e).ease=t}}function O3e(e){var t=this._id;return arguments.length?this.each(I3e(t,e)):xc(this.node(),t).ease}function M3e(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;fu(this,e).ease=n}}function P3e(e){if(typeof e!="function")throw new Error;return this.each(M3e(this._id,e))}function D3e(e){typeof e!="function"&&(e=YQ(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var s=t[a],i=s.length,l=r[a]=[],c,u=0;u<i;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new ad(r,this._parents,this._name,this._id)}function L3e(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,s=Math.min(r,a),i=new Array(r),l=0;l<s;++l)for(var c=t[l],u=n[l],d=c.length,f=i[l]=new Array(d),m,h=0;h<d;++h)(m=c[h]||u[h])&&(f[h]=m);for(;l<r;++l)i[l]=t[l];return new ad(i,this._parents,this._name,this._id)}function $3e(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function F3e(e,t,n){var r,a,s=$3e(t)?JL:fu;return function(){var i=s(this,e),l=i.on;l!==r&&(a=(r=l).copy()).on(t,n),i.on=a}}function z3e(e,t){var n=this._id;return arguments.length<2?xc(this.node(),n).on.on(e):this.each(F3e(n,e,t))}function H3e(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function V3e(){return this.on("end.remove",H3e(this._id))}function U3e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=YL(e));for(var r=this._groups,a=r.length,s=new Array(a),i=0;i<a;++i)for(var l=r[i],c=l.length,u=s[i]=new Array(c),d,f,m=0;m<c;++m)(d=l[m])&&(f=e.call(d,d.__data__,m,l))&&("__data__"in d&&(f.__data__=d.__data__),u[m]=f,pS(u[m],t,n,m,u,xc(d,n)));return new ad(s,this._parents,t,n)}function B3e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=qQ(e));for(var r=this._groups,a=r.length,s=[],i=[],l=0;l<a;++l)for(var c=r[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var m=e.call(d,d.__data__,f,c),h,g=xc(d,n),v=0,y=m.length;v<y;++v)(h=m[v])&&pS(h,t,n,v,m,g);s.push(m),i.push(d)}return new ad(s,i,t,n)}var j3e=Eb.prototype.constructor;function W3e(){return new j3e(this._groups,this._parents)}function G3e(e,t){var n,r,a;return function(){var s=Xp(this,e),i=(this.style.removeProperty(e),Xp(this,e));return s===i?null:s===n&&i===r?a:a=t(n=s,r=i)}}function yJ(e){return function(){this.style.removeProperty(e)}}function q3e(e,t,n){var r,a=n+"",s;return function(){var i=Xp(this,e);return i===a?null:i===r?s:s=t(r=i,n)}}function Y3e(e,t,n){var r,a,s;return function(){var i=Xp(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Xp(this,e))),i===c?null:i===r&&c===a?s:(a=c,s=t(r=i,l))}}function K3e(e,t){var n,r,a,s="style."+t,i="end."+s,l;return function(){var c=fu(this,e),u=c.on,d=c.value[s]==null?l||(l=yJ(t)):void 0;(u!==n||a!==d)&&(r=(n=u).copy()).on(i,a=d),c.on=r}}function Z3e(e,t,n){var r=(e+="")=="transform"?X$e:vJ;return t==null?this.styleTween(e,G3e(e,r)).on("end.style."+e,yJ(e)):typeof t=="function"?this.styleTween(e,Y3e(e,r,e4(this,"style."+e,t))).each(K3e(this._id,e)):this.styleTween(e,q3e(e,r,t),n).on("end.style."+e,null)}function X3e(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Q3e(e,t,n){var r,a;function s(){var i=t.apply(this,arguments);return i!==a&&(r=(a=i)&&X3e(e,i,n)),r}return s._value=t,s}function J3e(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Q3e(e,t,n??""))}function eFe(e){return function(){this.textContent=e}}function tFe(e){return function(){var t=e(this);this.textContent=t??""}}function nFe(e){return this.tween("text",typeof e=="function"?tFe(e4(this,"text",e)):eFe(e==null?"":e+""))}function rFe(e){return function(t){this.textContent=e.call(this,t)}}function aFe(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&rFe(a)),t}return r._value=e,r}function sFe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,aFe(e))}function iFe(){for(var e=this._name,t=this._id,n=bJ(),r=this._groups,a=r.length,s=0;s<a;++s)for(var i=r[s],l=i.length,c,u=0;u<l;++u)if(c=i[u]){var d=xc(c,t);pS(c,e,n,u,i,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ad(r,this._parents,e,n)}function oFe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(s,i){var l={value:i},c={value:function(){--a===0&&s()}};n.each(function(){var u=fu(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),a===0&&s()})}var lFe=0;function ad(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bJ(){return++lFe}var bu=Eb.prototype;ad.prototype={constructor:ad,select:U3e,selectAll:B3e,selectChild:bu.selectChild,selectChildren:bu.selectChildren,filter:D3e,merge:L3e,selection:W3e,transition:iFe,call:bu.call,nodes:bu.nodes,node:bu.node,size:bu.size,empty:bu.empty,each:bu.each,on:z3e,attr:b3e,attrTween:k3e,style:Z3e,styleTween:J3e,text:nFe,textTween:sFe,remove:V3e,tween:f3e,delay:N3e,duration:A3e,ease:O3e,easeVarying:P3e,end:oFe,[Symbol.iterator]:bu[Symbol.iterator]};function cFe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var uFe={time:null,delay:0,duration:250,ease:cFe};function dFe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function fFe(e){var t,n;e instanceof ad?(t=e._id,e=e._name):(t=bJ(),(n=uFe).time=QL(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,s=0;s<a;++s)for(var i=r[s],l=i.length,c,u=0;u<l;++u)(c=i[u])&&pS(c,e,t,u,i,n||dFe(c,t));return new ad(r,this._parents,e,t)}Eb.prototype.interrupt=c3e;Eb.prototype.transition=fFe;const $1=e=>()=>e;function mFe(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function Uu(e,t,n){this.k=e,this.x=t,this.y=n}Uu.prototype={constructor:Uu,scale:function(e){return e===1?this:new Uu(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Uu(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gS=new Uu(1,0,0);wJ.prototype=Uu.prototype;function wJ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return gS;return e.__zoom}function G2(e){e.stopImmediatePropagation()}function g0(e){e.preventDefault(),e.stopImmediatePropagation()}function hFe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function pFe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function D7(){return this.__zoom||gS}function gFe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function vFe(){return navigator.maxTouchPoints||"ontouchstart"in this}function yFe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),i>s?(s+i)/2:Math.min(0,s)||Math.max(0,i))}function EJ(){var e=hFe,t=pFe,n=yFe,r=gFe,a=vFe,s=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Uw,u=fS("start","zoom","end"),d,f,m,h=500,g=150,v=0,y=10;function b(D){D.property("__zoom",D7).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",O).filter(a).on("touchstart.zoom",T).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(D,j,H,Y){var z=D.selection?D.selection():D;z.property("__zoom",D7),D!==z?S(D,j,H,Y):z.interrupt().each(function(){N(this,arguments).event(Y).start().zoom(null,typeof j=="function"?j.apply(this,arguments):j).end()})},b.scaleBy=function(D,j,H,Y){b.scaleTo(D,function(){var z=this.__zoom.k,K=typeof j=="function"?j.apply(this,arguments):j;return z*K},H,Y)},b.scaleTo=function(D,j,H,Y){b.transform(D,function(){var z=t.apply(this,arguments),K=this.__zoom,ee=H==null?x(z):typeof H=="function"?H.apply(this,arguments):H,oe=K.invert(ee),J=typeof j=="function"?j.apply(this,arguments):j;return n(w(E(K,J),ee,oe),z,i)},H,Y)},b.translateBy=function(D,j,H,Y){b.transform(D,function(){return n(this.__zoom.translate(typeof j=="function"?j.apply(this,arguments):j,typeof H=="function"?H.apply(this,arguments):H),t.apply(this,arguments),i)},null,Y)},b.translateTo=function(D,j,H,Y,z){b.transform(D,function(){var K=t.apply(this,arguments),ee=this.__zoom,oe=Y==null?x(K):typeof Y=="function"?Y.apply(this,arguments):Y;return n(gS.translate(oe[0],oe[1]).scale(ee.k).translate(typeof j=="function"?-j.apply(this,arguments):-j,typeof H=="function"?-H.apply(this,arguments):-H),K,i)},Y,z)};function E(D,j){return j=Math.max(s[0],Math.min(s[1],j)),j===D.k?D:new Uu(j,D.x,D.y)}function w(D,j,H){var Y=j[0]-H[0]*D.k,z=j[1]-H[1]*D.k;return Y===D.x&&z===D.y?D:new Uu(D.k,Y,z)}function x(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function S(D,j,H,Y){D.on("start.zoom",function(){N(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(Y).end()}).tween("zoom",function(){var z=this,K=arguments,ee=N(z,K).event(Y),oe=t.apply(z,K),J=H==null?x(oe):typeof H=="function"?H.apply(z,K):H,se=Math.max(oe[1][0]-oe[0][0],oe[1][1]-oe[0][1]),B=z.__zoom,U=typeof j=="function"?j.apply(z,K):j,$=c(B.invert(J).concat(se/B.k),U.invert(J).concat(se/U.k));return function(ce){if(ce===1)ce=U;else{var be=$(ce),ue=se/be[2];ce=new Uu(ue,J[0]-be[0]*ue,J[1]-be[1]*ue)}ee.zoom(null,ce)}})}function N(D,j,H){return!H&&D.__zooming||new k(D,j)}function k(D,j){this.that=D,this.args=j,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,j),this.taps=0}k.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,j){return this.mouse&&D!=="mouse"&&(this.mouse[1]=j.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=j.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=j.invert(this.touch1[0])),this.that.__zoom=j,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var j=Vo(this.that).datum();u.call(D,this.that,new mFe(D,{sourceEvent:this.sourceEvent,target:b,type:D,transform:this.that.__zoom,dispatch:u}),j)}};function C(D,...j){if(!e.apply(this,arguments))return;var H=N(this,j).event(D),Y=this.__zoom,z=Math.max(s[0],Math.min(s[1],Y.k*Math.pow(2,r.apply(this,arguments)))),K=Ql(D);if(H.wheel)(H.mouse[0][0]!==K[0]||H.mouse[0][1]!==K[1])&&(H.mouse[1]=Y.invert(H.mouse[0]=K)),clearTimeout(H.wheel);else{if(Y.k===z)return;H.mouse=[K,Y.invert(K)],Ww(this),H.start()}g0(D),H.wheel=setTimeout(ee,g),H.zoom("mouse",n(w(E(Y,z),H.mouse[0],H.mouse[1]),H.extent,i));function ee(){H.wheel=null,H.end()}}function A(D,...j){if(m||!e.apply(this,arguments))return;var H=D.currentTarget,Y=N(this,j,!0).event(D),z=Vo(D.view).on("mousemove.zoom",J,!0).on("mouseup.zoom",se,!0),K=Ql(D,H),ee=D.clientX,oe=D.clientY;aJ(D.view),G2(D),Y.mouse=[K,this.__zoom.invert(K)],Ww(this),Y.start();function J(B){if(g0(B),!Y.moved){var U=B.clientX-ee,$=B.clientY-oe;Y.moved=U*U+$*$>v}Y.event(B).zoom("mouse",n(w(Y.that.__zoom,Y.mouse[0]=Ql(B,H),Y.mouse[1]),Y.extent,i))}function se(B){z.on("mousemove.zoom mouseup.zoom",null),sJ(B.view,Y.moved),g0(B),Y.event(B).end()}}function O(D,...j){if(e.apply(this,arguments)){var H=this.__zoom,Y=Ql(D.changedTouches?D.changedTouches[0]:D,this),z=H.invert(Y),K=H.k*(D.shiftKey?.5:2),ee=n(w(E(H,K),Y,z),t.apply(this,j),i);g0(D),l>0?Vo(this).transition().duration(l).call(S,ee,Y,D):Vo(this).call(b.transform,ee,Y,D)}}function T(D,...j){if(e.apply(this,arguments)){var H=D.touches,Y=H.length,z=N(this,j,D.changedTouches.length===Y).event(D),K,ee,oe,J;for(G2(D),ee=0;ee<Y;++ee)oe=H[ee],J=Ql(oe,this),J=[J,this.__zoom.invert(J),oe.identifier],z.touch0?!z.touch1&&z.touch0[2]!==J[2]&&(z.touch1=J,z.taps=0):(z.touch0=J,K=!0,z.taps=1+!!d);d&&(d=clearTimeout(d)),K&&(z.taps<2&&(f=J[0],d=setTimeout(function(){d=null},h)),Ww(this),z.start())}}function M(D,...j){if(this.__zooming){var H=N(this,j).event(D),Y=D.changedTouches,z=Y.length,K,ee,oe,J;for(g0(D),K=0;K<z;++K)ee=Y[K],oe=Ql(ee,this),H.touch0&&H.touch0[2]===ee.identifier?H.touch0[0]=oe:H.touch1&&H.touch1[2]===ee.identifier&&(H.touch1[0]=oe);if(ee=H.that.__zoom,H.touch1){var se=H.touch0[0],B=H.touch0[1],U=H.touch1[0],$=H.touch1[1],ce=(ce=U[0]-se[0])*ce+(ce=U[1]-se[1])*ce,be=(be=$[0]-B[0])*be+(be=$[1]-B[1])*be;ee=E(ee,Math.sqrt(ce/be)),oe=[(se[0]+U[0])/2,(se[1]+U[1])/2],J=[(B[0]+$[0])/2,(B[1]+$[1])/2]}else if(H.touch0)oe=H.touch0[0],J=H.touch0[1];else return;H.zoom("touch",n(w(ee,oe,J),H.extent,i))}}function L(D,...j){if(this.__zooming){var H=N(this,j).event(D),Y=D.changedTouches,z=Y.length,K,ee;for(G2(D),m&&clearTimeout(m),m=setTimeout(function(){m=null},h),K=0;K<z;++K)ee=Y[K],H.touch0&&H.touch0[2]===ee.identifier?delete H.touch0:H.touch1&&H.touch1[2]===ee.identifier&&delete H.touch1;if(H.touch1&&!H.touch0&&(H.touch0=H.touch1,delete H.touch1),H.touch0)H.touch0[1]=this.__zoom.invert(H.touch0[0]);else if(H.end(),H.taps===2&&(ee=Ql(ee,this),Math.hypot(f[0]-ee[0],f[1]-ee[1])<y)){var oe=Vo(this).on("dblclick.zoom");oe&&oe.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:$1(+D),b):r},b.filter=function(D){return arguments.length?(e=typeof D=="function"?D:$1(!!D),b):e},b.touchable=function(D){return arguments.length?(a=typeof D=="function"?D:$1(!!D),b):a},b.extent=function(D){return arguments.length?(t=typeof D=="function"?D:$1([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),b):t},b.scaleExtent=function(D){return arguments.length?(s[0]=+D[0],s[1]=+D[1],b):[s[0],s[1]]},b.translateExtent=function(D){return arguments.length?(i[0][0]=+D[0][0],i[1][0]=+D[1][0],i[0][1]=+D[0][1],i[1][1]=+D[1][1],b):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},b.constrain=function(D){return arguments.length?(n=D,b):n},b.duration=function(D){return arguments.length?(l=+D,b):l},b.interpolate=function(D){return arguments.length?(c=D,b):c},b.on=function(){var D=u.on.apply(u,arguments);return D===u?b:D},b.clickDistance=function(D){return arguments.length?(v=(D=+D)*D,b):Math.sqrt(v)},b.tapDistance=function(D){return arguments.length?(y=+D,b):y},b}const au={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>
1905`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},vy=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],xJ=["Enter"," ","Escape"],_J={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Jp;(function(e){e.Strict="strict",e.Loose="loose"})(Jp||(Jp={}));var cm;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(cm||(cm={}));var yy;(function(e){e.Partial="partial",e.Full="full"})(yy||(yy={}));const kJ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Td;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Td||(Td={}));var Bx;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Bx||(Bx={}));var Xn;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Xn||(Xn={}));const L7={[Xn.Left]:Xn.Right,[Xn.Right]:Xn.Left,[Xn.Top]:Xn.Bottom,[Xn.Bottom]:Xn.Top};function SJ(e){return e===null?null:e?"valid":"invalid"}const CJ=e=>"id"in e&&"source"in e&&"target"in e,bFe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),t4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),_b=(e,t=[0,0])=>{const{width:n,height:r}=pd(e),a=e.origin??t,s=n*a[0],i=r*a[1];return{x:e.position.x-s,y:e.position.y-i}},wFe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const s=typeof a=="string";let i=!t.nodeLookup&&!s?a:void 0;t.nodeLookup&&(i=s?t.nodeLookup.get(a):t4(a)?a:t.nodeLookup.get(a.id));const l=i?jx(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return vS(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return yS(n)},kb=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=vS(n,jx(a)),r=!0)}),r?yS(n):{x:0,y:0,width:0,height:0}},n4=(e,t,[n,r,a]=[0,0,1],s=!1,i=!1)=>{const l={...Cb(t,[n,r,a]),width:t.width/a,height:t.height/a},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:m=!1}=u;if(i&&!f||m)continue;const h=d.width??u.width??u.initialWidth??null,g=d.height??u.height??u.initialHeight??null,v=by(l,tg(u)),y=(h??0)*(g??0),b=s&&v>0;(!u.internals.handleBounds||b||v>=y||u.dragging)&&c.push(u)}return c},EFe=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function xFe(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}
1905async function _Fe({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:s},i){if(e.size===0)return Promise.resolve(!0);const l=xFe(e,i),c=kb(l),u=r4(c,t,n,(i==null?void 0:i.minZoom)??a,(i==null?void 0:i.maxZoom)??s,(i==null?void 0:i.padding)??.1);return await r.setViewport(u,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function NJ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:s}){const i=n.get(e),l=i.parentId?n.get(i.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=i.origin??r;let f=i.extent||a;if(i.extent==="parent"&&!i.expandParent)if(!l)s==null||s("005",au.error005());else{const h=l.measured.width,g=l.measured.height;h&&g&&(f=[[c,u],[c+h,u+g]])}else l&&ng(i.extent)&&(f=[[i.extent[0][0]+c,i.extent[0][1]+u],[i.extent[1][0]+c,i.extent[1][1]+u]]);const m=ng(f)?Om(t,f,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(s==null||s("015",au.error015())),{position:{x:m.x-c+(i.measured.width??0)*d[0],y:m.y-u+(i.measured.height??0)*d[1]},positionAbsolute:m}}async function kFe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const s=new Set(e.map(m=>m.id)),i=[];for(const m of n){if(m.deletable===!1)continue;const h=s.has(m.id),g=!h&&m.parentId&&i.find(v=>v.id===m.parentId);(h||g)&&i.push(m)}const l=new Set(t.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),d=EFe(i,c);for(const m of c)l.has(m.id)&&!d.find(g=>g.id===m.id)&&d.push(m);if(!a)return{edges:d,nodes:i};const f=await a({nodes:i,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:i}:{edges:[],nodes:[]}:f}const eg=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Om=(e={x:0,y:0},t,n)=>({x:eg(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:eg(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function RJ(e,t,n){const{width:r,height:a}=pd(n),{x:s,y:i}=n.internals.positionAbsolute;return Om(e,[[s,i],[s+r,i+a]],t)}const $7=(e,t,n)=>e<t?eg(Math.abs(e-t),1,t)/t:e>n?-eg(Math.abs(e-n),1,t)/t:0,TJ=(e,t,n=15,r=40)=>{const a=$7(e.x,r,t.width-r)*n,s=$7(e.y,r,t.height-r)*n;return[a,s]},vS=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),RO=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),yS=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),tg=(e,t=[0,0])=>{var a,s;const{x:n,y:r}=t4(e)?e.internals.positionAbsolute:_b(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}}
1905,jx=(e,t=[0,0])=>{var a,s;const{x:n,y:r}=t4(e)?e.internals.positionAbsolute:_b(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},AJ=(e,t)=>yS(vS(RO(e),RO(t))),by=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},F7=e=>sc(e.width)&&sc(e.height)&&sc(e.x)&&sc(e.y),sc=e=>!isNaN(e)&&isFinite(e),SFe=(e,t)=>{},Sb=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Cb=({x:e,y:t},[n,r,a],s=!1,i=[1,1])=>{const l={x:(e-n)/a,y:(t-r)/a};return s?Sb(l,i):l},Wx=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function ch(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function CFe(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=ch(e,n),a=ch(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=ch(e.top??e.y??0,n),a=ch(e.bottom??e.y??0,n),s=ch(e.left??e.x??0,t),i=ch(e.right??e.x??0,t);return{top:r,right:i,bottom:a,left:s,x:s+i,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function NFe(e,t,n,r,a,s){const{x:i,y:l}=Wx(e,[t,n,r]),{x:c,y:u}=Wx({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=a-c,f=s-u;return{left:Math.floor(i),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const r4=(e,t,n,r,a,s)=>{const i=CFe(s,t,n),l=(t-i.x)/e.width,c=(n-i.y)/e.height,u=Math.min(l,c),d=eg(u,r,a),f=e.x+e.width/2,m=e.y+e.height/2,h=t/2-f*d,g=n/2-m*d,v=NFe(e,h,g,d,t,n),y={left:Math.min(v.left-i.left,0),top:Math.min(v.top-i.top,0),right:Math.min(v.right-i.right,0),bottom:Math.min(v.bottom-i.bottom,0)};return{x:h-y.left+y.right,y:g-y.top+y.bottom,zoom:d}},wy=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ng(e){return e!=null&&e!=="parent"}function pd(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function IJ(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function OJ(e,t={width:0,height:0},n,r,a){const s={...e},i=r.get(n);if(i){const l=i.origin||a;s.x+=i.internals.positionAbsolute.x-(t.width??0)*l[0],s.y+=i.internals.positionAbsolute.y-(t.height??0)*l[1]}return s}function z7(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function RFe(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function TFe(e){return{..._J,...e||{}}}function dv(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:s,y:i}=ic(e),l=Cb({x:s-((a==null?void 0:a.left)??0),y:i-((a==null?void 0:a.top)??0)},r),{x:c,y:u}=n?Sb(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const a4=e=>({width:e.offsetWidth,height:e.offsetHeight}),MJ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},AFe=["INPUT","SELECT","TEXTAREA"];function PJ(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:AFe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".
1905nokey")}const DJ=e=>"clientX"in e,ic=(e,t)=>{var s,i;const n=DJ(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,a=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},H7=(e,t,n,r,a)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(i=>{const l=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:a,position:i.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...a4(i)}})};function LJ({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:s,targetControlX:i,targetControlY:l}){const c=e*.125+a*.375+i*.375+n*.125,u=t*.125+s*.375+l*.375+r*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function F1(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function V7({pos:e,x1:t,y1:n,x2:r,y2:a,c:s}){switch(e){case Xn.Left:return[t-F1(t-r,s),n];case Xn.Right:return[t+F1(r-t,s),n];case Xn.Top:return[t,n-F1(n-a,s)];case Xn.Bottom:return[t,n+F1(a-n,s)]}}function $J({sourceX:e,sourceY:t,sourcePosition:n=Xn.Bottom,targetX:r,targetY:a,targetPosition:s=Xn.Top,curvature:i=.25}){const[l,c]=V7({pos:n,x1:e,y1:t,x2:r,y2:a,c:i}),[u,d]=V7({pos:s,x1:r,y1:a,x2:e,y2:t,c:i}),[f,m,h,g]=LJ({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${r},${a}`,f,m,h,g]}function FJ({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,s=n<e?n+a:n-a,i=Math.abs(r-t)/2,l=r<t?r+i:r-i;return[s,l,a,i]}function IFe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:s="basic"}){if(s==="manual")return r;const i=a&&n?r+1e3:r,l=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return i+l}function OFe({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const s=vS(jx(e),jx(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const i={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return by(i,yS(s))>0}const MFe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,PFe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),zJ=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||MFe;let a;return CJ(e)?a={...e}:a={...e,id:r(e)},PFe(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function HJ({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,s,i,l]=FJ({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,s,i,l]}const U7={[Xn.Left]:{x:-1,y:0},[Xn.Right]:{x:1,y:0},[Xn.Top]:{x:0,y:-1},[Xn.Bottom]:{x:0,y:1}},DFe=({source:e,sourcePosition:t=Xn.Bottom,target:n})=>t===Xn.Left||t===Xn.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},B7=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function LFe({source:e,sourcePosition:t=Xn.Bottom,target:n,targetPosition:r=Xn.Top,center:a,offset:s,stepPosition:i}){const l=U7[t],c=U7[r],u={x:e.x+l.x*s,y:e.y+l.y*s},d={x:n.x+c.x*s,y:n.y+c.y*s},f=DFe({source:u,sourcePosition:t,target:d}),m=f.x!==0?"x":"y",h=f[m];let g=[],v,y;const b={x:0,y:0},E={x:0,y:0},[,,w,x]=FJ({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[m]*c[m]===-1){m==="x"?(v=a.x??u.x+(d.x-u.x)*i,y=a.y??(u.y+d.y)/2):(v=a.x??(u.x+d.x)/2,y=a.y??u.y+(d.y-u.y)*i);const N=[{x:v,y:u.y},{x:v,y:d.y}],k=[{x:u.x,y},{x:d.x,y}];l[m]===h?g=m==="x"?N:k:g=m==="x"?k:N}else{const N=[{x:u.x,y:d.y}],k=[{x:d.x,y:u.y}];if(m==="x"?g=l.x===h?k:N:g=l.y===h?N:k,t===r){const M=Math.abs(e[m]-n[m]);if(M<=s){const L=Math.min(s-1,s-M);l[m]===h?b[m]=(u[m]>e[m]?-1:1)*L:E[m]=(d[m]>n[m]?-1:1)*L}}if(t!==r){const M=m==="x"?"y":"x",L=l[m]===c[M],D=u[M]>d[M],j=u[M]<d[M];(l[m]===1&&(!L&&D||L&&j)||l[m]!==1&&(!L&&j||L&&D))&&(g=m==="x"?N:k)}const C={x:u.x+b.x,y:u.y+b.y},A={x:d.x+E.x,y:d.y+E.y},O=Math.max(Math.abs(C.x-g[0].x),Math.abs(A.x-g[0].x)),T=Math.max(Math.abs(C.y-g[0].y),Math.abs(A.y-g[0].y));O>=T?(v=(C.x+A.x)/2,y=g[0].y):(v=g[0].x,y=(C.y+A.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...g,{x:d.x+E.x,y:d.y+E.y},n],v,y,w,x]}function $Fe(e,t,n,r){const a=Math.min(B7(e,t)/2,B7(t,n)/2,r),{x:s,y:i}=t;if(e.x===s&&s===n.x||e.y===i&&i===n.y)return`L${s} ${i}`;if(e.y===i){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${s+a*u},${i}Q ${s},${i} ${s},${i+a*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${s},${i+a*c}Q ${s},${i} ${s+a*l},${i}`}function TO({sourceX:e,sourceY:t,sourcePosition:n=Xn.Bottom,targetX:r,targetY:a,targetPosition:s=Xn.Top,borderRadius:i=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,m,h,g,v]=LFe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:s,center:{x:l,y:c},offset:u,stepPosition:d});return[f.reduce((b,E,w)=>{let x="";return w>0&&w<f.length-1?x=$Fe(f[w-1],E,f[w+1],i):x=`${w===0?"M":"L"}${E.x} ${E.y}`,b+=x,b},""),m,h,g,v]}function j7(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function FFe(e){var f;const{sourceNode:t,targetNode:n}=e;if(!j7(t)||!j7(n))return null;const r=t.internals.handleBounds||W7(t.handles),a=n.internals.handleBounds||W7(n.handles),s=G7((r==null?void 0:r.source)??[],e.sourceHandle),i=G7(e.connectionMode===Jp.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!s||!i)return(f=e.onError)==null||f.call(e,"008",au.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(s==null?void 0:s.position)||Xn.Bottom,c=(i==null?void 0:i.position)||Xn.Top,u=Mm(t,s,l),d=Mm(n,i,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function W7(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Mm(e,t,n=Xn.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:l}=t??pd(e);if(r)return{x:a+i/2,y:s+l/2};switch((t==null?void 0:t.position)??n){case Xn.Top:return{x:a+i/2,y:s};case Xn.Right:return{x:a+i,y:s+l/2};case Xn.Bottom:return{x:a+i/2,y:s+l};case Xn.Left:return{x:a,y:s+l/2}}}function G7(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function AO(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function zFe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const s=new Set;return e.reduce((i,l)=>
1905([l.markerStart||r,l.markerEnd||a].forEach(c=>{if(c&&typeof c=="object"){const u=AO(c,t);s.has(u)||(i.push({id:u,color:c.color||n,...c}),s.add(u))}}),i),[]).sort((i,l)=>i.id.localeCompare(l.id))}const VJ=1e3,HFe=10,s4={nodeOrigin:[0,0],nodeExtent:vy,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},VFe={...s4,checkEquality:!0};function i4(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function UFe(e,t,n){const r=i4(s4,n);for(const a of e.values())if(a.parentId)l4(a,e,t,r);else{const s=_b(a,r.nodeOrigin),i=ng(a.extent)?a.extent:r.nodeExtent,l=Om(s,i,pd(a));a.internals.positionAbsolute=l}}function BFe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const s={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(s):a.type==="target"&&r.push(s)}return{source:n,target:r}}function o4(e){return e==="manual"}function IO(e,t,n,r={}){var u,d;const a=i4(VFe,r),s={i:0},i=new Map(t),l=a!=null&&a.elevateNodesOnSelect&&!o4(a.zIndexMode)?VJ:0;let c=e.length>0;t.clear(),n.clear();for(const f of e){let m=i.get(f.id);if(a.checkEquality&&f===(m==null?void 0:m.internals.userNode))t.set(f.id,m);else{const h=_b(f,a.nodeOrigin),g=ng(f.extent)?f.extent:a.nodeExtent,v=Om(h,g,pd(f));m={...a.defaults,...f,measured:{width:(u=f.measured)==null?void 0:u.width,height:(d=f.measured)==null?void 0:d.height},internals:{positionAbsolute:v,handleBounds:BFe(f,m),z:UJ(f,l,a.zIndexMode),userNode:f}},t.set(f.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(c=!1),f.parentId&&l4(m,t,n,r,s)}return c}function jFe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function l4(e,t,n,r,a){const{elevateNodesOnSelect:s,nodeOrigin:i,nodeExtent:l,zIndexMode:c}=i4(s4,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}jFe(e,n),a&&!d.parentId&&d.internals.rootParentIndex===void 0&&c==="auto"&&(d.internals.rootParentIndex=++a.i,d.internals.z=d.internals.z+a.i*HFe),a&&d.internals.rootParentIndex!==void 0&&(a.i=d.internals.rootParentIndex);const f=s&&!o4(c)?VJ:0,{x:m,y:h,z:g}=WFe(e,d,i,l,f,c),{positionAbsolute:v}=e.internals,y=m!==v.x||h!==v.y;(y||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:y?{x:m,y:h}:v,z:g}})}function UJ(e,t,n){const r=sc(e.zIndex)?e.zIndex:0;return o4(n)?r:r+(e.selected?t:0)}function WFe(e,t,n,r,a,s){const{x:i,y:l}=t.internals.positionAbsolute,c=pd(e),u=_b(e,n),d=ng(e.extent)?Om(u,e.extent,c):u;let f=Om({x:i+d.x,y:l+d.y},r,c);e.extent==="parent"&&(f=RJ(f,c,t));const m=UJ(e,a,s),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=m?h+1:m}}function c4(e,t,n,r=[0,0]){var i;const a=[],s=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((i=s.get(l.parentId))==null?void 0:i.expandedRect)??tg(c),d=AJ(u,l.rect);s.set(l.parentId,{expandedRect:d,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var w;const d=c.internals.positionAbsolute,f=pd(c),m=c.origin??r,h=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,g=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,v=Math.max(f.width,Math.round(l.width)),y=Math.max(f.height,Math.round(l.height)),b=(v-f.width)*m[0],E=(y-f.height)*m[1];(h>0||g>0||b||E)&&(a.push({id:u,type:"position",position:{x:c.position.x-h+b,y:c.position.y-g+E}}),(w=n.get(u))==null||w.forEach(x=>{e.some(S=>S.id===x.id)||a.push({id:x.id,type:"position",position:{x:x.position.x+h,y:x.position.y+g}})})),(f.width<l.width||f.height<l.height||h||g)&&a.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:v+(h?m[0]*h-b:0),height:y+(g?m[1]*g-E:0)}})}),a}function GFe(e,t,n,r,a,s,i){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],d=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(d.transform),m=[];for(const h of e.values()){const g=t.get(h.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const v=a4(h.nodeElement),y=g.measured.width!==v.width||g.measured.height!==v.height;if(!!(v.width&&v.height&&(y||!g.internals.handleBounds||h.force))){const E=h.nodeElement.getBoundingClientRect(),w=ng(g.extent)?g.extent:s;let{positionAbsolute:x}=g.internals;g.parentId&&g.extent==="parent"?x=RJ(x,v,t.get(g.parentId)):w&&(x=Om(x,w,v));const S={...g,measured:v,internals:{...g.internals,positionAbsolute:x,handleBounds:{source:H7("source",h.nodeElement,E,f,g.id),target:H7("target",h.nodeElement,E,f,g.id)}}};t.set(g.id,S),g.parentId&&l4(S,t,n,{nodeOrigin:a,zIndexMode:i}),c=!0,y&&(u.push({id:g.id,type:"dimensions",dimensions:v}),g.expandParent&&g.parentId&&m.push({id:g.id,parentId:g.parentId,rect:tg(S,a)}))}}if(m.length>0){const h=c4(m,t,n,a);u.push(...h)}return{changes:u,updatedInternals:c}}async function qFe({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,s]],r),l=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(l)}function q7(e,t,n,r,a,s){let i=a;const l=r.get(i)||new Map;r.set(i,l.set(n,t)),i=`${a}-${e}`;const c=r.get(i)||new Map;if(r.set(i,c.set(n,t)),s){i=`${a}-${e}-${s}`;const u=r.get(i)||new Map;r.set(i,u.set(n,t))}}function BJ(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:s,sourceHandle:i=null,targetHandle:l=null}=r,c={edgeId:r.id,source:a,target:s,sourceHandle:i,targetHandle:l},u=`${a}-${i}--${s}-${l}`,d=`${s}-${l}--${a}-${i}`;q7("source",c,d,e,a,i),q7("target",c,u,e,s,l),t.set(r.id,r)}}function jJ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:jJ(n,t):!1}function Y7(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;
1905if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function YFe(e,t,n,r){const a=new Map;for(const[s,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!jJ(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const l=e.get(s);l&&a.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return a}function q2({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var i,l,c;const a=[];for(const[u,d]of t){const f=(i=n.get(u))==null?void 0:i.internals.userNode;f&&a.push({...f,position:d.position,dragging:r})}if(!e)return[a[0],a];const s=(l=n.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=t.get(e))==null?void 0:c.position)||s.position,dragging:r}:a[0],a]}function KFe({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const s={x:n-a.distance.x,y:r-a.distance.y},i=Sb(s,t);return{x:i.x-s.x,y:i.y-s.y}}function ZFe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let s={x:null,y:null},i=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,m=null,h=!1,g=!1,v=null;function y({noDragClassName:E,handleSelector:w,domNode:x,isSelectable:S,nodeId:N,nodeClickDistance:k=0}){m=Vo(x);function C({x:M,y:L}){const{nodeLookup:D,nodeExtent:j,snapGrid:H,snapToGrid:Y,nodeOrigin:z,onNodeDrag:K,onSelectionDrag:ee,onError:oe,updateNodePositions:J}=t();s={x:M,y:L};let se=!1;const B=l.size>1,U=B&&j?RO(kb(l)):null,$=B&&Y?KFe({dragItems:l,snapGrid:H,x:M,y:L}):null;for(const[ce,be]of l){if(!D.has(ce))continue;let ue={x:M-be.distance.x,y:L-be.distance.y};Y&&(ue=$?{x:Math.round(ue.x+$.x),y:Math.round(ue.y+$.y)}:Sb(ue,H));let Ie=null;if(B&&j&&!be.extent&&U){const{positionAbsolute:_e}=be.internals,ie=_e.x-U.x+j[0][0],Ue=_e.x+be.measured.width-U.x2+j[1][0],ae=_e.y-U.y+j[0][1],pe=_e.y+be.measured.height-U.y2+j[1][1];Ie=[[ie,ae],[Ue,pe]]}const{position:Ae,positionAbsolute:he}=NJ({nodeId:ce,nextPosition:ue,nodeLookup:D,nodeExtent:Ie||j,nodeOrigin:z,onError:oe});se=se||be.position.x!==Ae.x||be.position.y!==Ae.y,be.position=Ae,be.internals.positionAbsolute=he}if(g=g||se,!!se&&(J(l,!0),v&&(r||K||!N&&ee))){const[ce,be]=q2({nodeId:N,dragItems:l,nodeLookup:D});r==null||r(v,l,ce,be),K==null||K(v,ce,be),N||ee==null||ee(v,be)}}async function A(){if(!d)return;const{transform:M,panBy:L,autoPanSpeed:D,autoPanOnNodeDrag:j}=t();if(!j){c=!1,cancelAnimationFrame(i);return}const[H,Y]=TJ(u,d,D);(H!==0||Y!==0)&&(s.x=(s.x??0)-H/M[2],s.y=(s.y??0)-Y/M[2],await L({x:H,y:Y})&&C(s)),i=requestAnimationFrame(A)}function O(M){var B;const{nodeLookup:L,multiSelectionActive:D,nodesDraggable:j,transform:H,snapGrid:Y,snapToGrid:z,selectNodesOnDrag:K,onNodeDragStart:ee,onSelectionDragStart:oe,unselectNodesAndEdges:J}=t();f=!0,(!K||!S)&&!D&&N&&((B=L.get(N))!=null&&B.selected||J()),S&&K&&N&&(e==null||e(N));const se=dv(M.sourceEvent,{transform:H,snapGrid:Y,snapToGrid:z,containerBounds:d});if(s=se,l=YFe(L,j,se,N),l.size>0&&(n||ee||!N&&oe)){const[U,$]=q2({nodeId:N,dragItems:l,nodeLookup:L});n==null||n(M.sourceEvent,l,U,$),ee==null||ee(M.sourceEvent,U,$),N||oe==null||oe(M.sourceEvent,$)}}const T=iJ().clickDistance(k).on("start",M=>{const{domNode:L,nodeDragThreshold:D,transform:j,snapGrid:H,snapToGrid:Y}=t();d=(L==null?void 0:L.getBoundingClientRect())||null,h=!1,g=!1,v=M.sourceEvent,D===0&&O(M),s=dv(M.sourceEvent,{transform:j,snapGrid:H,snapToGrid:Y,containerBounds:d}),u=ic(M.sourceEvent,d)}).on("drag",M=>
1905{const{autoPanOnNodeDrag:L,transform:D,snapGrid:j,snapToGrid:H,nodeDragThreshold:Y,nodeLookup:z}=t(),K=dv(M.sourceEvent,{transform:D,snapGrid:j,snapToGrid:H,containerBounds:d});if(v=M.sourceEvent,(M.sourceEvent.type==="touchmove"&&M.sourceEvent.touches.length>1||N&&!z.has(N))&&(h=!0),!h){if(!c&&L&&f&&(c=!0,A()),!f){const ee=ic(M.sourceEvent,d),oe=ee.x-u.x,J=ee.y-u.y;Math.sqrt(oe*oe+J*J)>Y&&O(M)}(s.x!==K.xSnapped||s.y!==K.ySnapped)&&l&&f&&(u=ic(M.sourceEvent,d),C(K))}}).on("end",M=>{if(!(!f||h)&&(c=!1,f=!1,cancelAnimationFrame(i),l.size>0)){const{nodeLookup:L,updateNodePositions:D,onNodeDragStop:j,onSelectionDragStop:H}=t();if(g&&(D(l,!1),g=!1),a||j||!N&&H){const[Y,z]=q2({nodeId:N,dragItems:l,nodeLookup:L,dragging:!1});a==null||a(M.sourceEvent,l,Y,z),j==null||j(M.sourceEvent,Y,z),N||H==null||H(M.sourceEvent,z)}}}).filter(M=>{const L=M.target;return!M.button&&(!E||!Y7(L,`.${E}`,x))&&(!w||Y7(L,w,x))});m.call(T)}function b(){m==null||m.on(".drag",null)}return{update:y,destroy:b}}function XFe(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())by(a,tg(s))>0&&r.push(s);return r}const QFe=250;function JFe(e,t,n,r){var l,c;let a=[],s=1/0;const i=XFe(e,n,t+QFe);for(const u of i){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:m,y:h}=Mm(u,f,f.position,!0),g=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(h-e.y,2));g>t||(g<s?(a=[{...f,x:m,y:h}],s=g):g===s&&a.push({...f,x:m,y:h}))}}if(!a.length)return null;if(a.length>1){const u=r.type==="source"?"target":"source";return a.find(d=>d.type===u)??a[0]}return a[0]}function WJ(e,t,n,r,a,s=!1){var u,d,f;
1905const i=r.get(e);if(!i)return null;const l=a==="strict"?(u=i.internals.handleBounds)==null?void 0:u[t]:[...((d=i.internals.handleBounds)==null?void 0:d.source)??[],...((f=i.internals.handleBounds)==null?void 0:f.target)??[]],c=(n?l==null?void 0:l.find(m=>m.id===n):l==null?void 0:l[0])??null;return c&&s?{...c,...Mm(i,c,c.position,!0)}:c}function GJ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function e6e(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const qJ=()=>!0;function t6e(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:s,isTarget:i,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:m,cancelConnection:h,onConnectStart:g,onConnect:v,onConnectEnd:y,isValidConnection:b=qJ,onReconnectEnd:E,updateConnection:w,getTransform:x,getFromHandle:S,autoPanSpeed:N,dragThreshold:k=1,handleDomNode:C}){const A=MJ(e.target);let O=0,T;const{x:M,y:L}=ic(e),D=GJ(s,C),j=l==null?void 0:l.getBoundingClientRect();let H=!1;if(!j||!D)return;const Y=WJ(a,D,r,c,t);if(!Y)return;let z=ic(e,j),K=!1,ee=null,oe=!1,J=null;function se(){if(!d||!j)return;const[Ae,he]=TJ(z,j,N);m({x:Ae,y:he}),O=requestAnimationFrame(se)}const B={...Y,nodeId:a,type:D,position:Y.position},U=c.get(a);let ce={inProgress:!0,isValid:null,from:Mm(U,B,Xn.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:U,to:z,toHandle:null,toPosition:L7[B.position],toNode:null,pointer:z};function be(){H=!0,w(ce),g==null||g(e,{nodeId:a,handleId:r,handleType:D})}k===0&&be();function ue(Ae){if(!H){const{x:pe,y:W}=ic(Ae),q=pe-M,te=W-L;if(!(q*q+te*te>k*k))return;be()}if(!S()||!B){Ie(Ae);return}const he=x();z=ic(Ae,j),T=JFe(Cb(z,he,!1,[1,1]),n,c,B),K||(se(),K=!0);const _e=YJ(Ae,{handle:T,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:i?"target":"source",isValidConnection:b,doc:A,lib:u,flowId:f,nodeLookup:c});J=_e.handleDomNode,ee=_e.connection,oe=e6e(!!T,_e.isValid);const ie=c.get(a),Ue=ie?Mm(ie,B,Xn.Left,!0):ce.from,ae={...ce,from:Ue,isValid:oe,to:_e.toHandle&&oe?Wx({x:_e.toHandle.x,y:_e.toHandle.y},he):z,toHandle:_e.toHandle,toPosition:oe&&_e.toHandle?_e.toHandle.position:L7[B.position],toNode:_e.toHandle?c.get(_e.toHandle.nodeId):null,pointer:z};w(ae),ce=ae}function Ie(Ae){if(!("touches"in Ae&&Ae.touches.length>0)){if(H){(T||J)&&ee&&oe&&(v==null||v(ee));const{inProgress:he,..._e}=ce,ie={..._e,toPosition:ce.toHandle?ce.toPosition:null};y==null||y(Ae,ie),s&&(E==null||E(Ae,ie))}h(),cancelAnimationFrame(O),K=!1,oe=!1,ee=null,J=null,A.removeEventListener("mousemove",ue),A.removeEventListener("mouseup",Ie),A.removeEventListener("touchmove",ue),A.removeEventListener("touchend",Ie)}}A.addEventListener("mousemove",ue),A.addEventListener("mouseup",Ie),A.addEventListener("touchmove",ue),A.addEventListener("touchend",Ie)}function YJ(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:s,doc:i,lib:l,flowId:c,isValidConnection:u=qJ,nodeLookup:d}){const f=s==="target",m=t?i.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y:g}=ic(e),v=i.elementFromPoint(h,g),y=v!=null&&v.classList.contains(`${l}-flow__handle`)?v:m,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const E=GJ(void 0,y),w=y.getAttribute("data-nodeid"),x=y.getAttribute("data-handleid"),S=y.classList.contains("connectable"),N=y.classList.contains("connectableend");if(!w||!E)return b;const k={source:f?w:r,sourceHandle:f?x:a,target:f?r:w,targetHandle:f?a:x};b.connection=k;const A=S&&N&&(n===Jp.Strict?f&&E==="source"||!f&&E==="target":w!==r||x!==a);b.isValid=A&&u(k),b.toHandle=WJ(w,E,x,d,n,!0)}return b}const OO={onPointerDown:t6e,isValid:YJ};function n6e({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Vo(e);function s({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:m=!0,inversePan:h=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const x=n(),S=w.sourceEvent.ctrlKey&&wy()?10:1,N=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*d,k=x[2]*Math.pow(2,N*S);t.scaleTo(k)};let v=[0,0];const y=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(v=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},b=w=>{const x=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const S=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],N=[S[0]-v[0],S[1]-v[1]];v=S;const k=r()*Math.max(x[2],Math.log(x[2]))*(h?-1:1),C={x:x[0]-N[0]*k,y:x[1]-N[1]*k},A=[[0,0],[c,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:x[2]},A,l)},E=EJ().on("start",y).on("zoom",f?b:null).on("zoom.wheel",m?g:null);a.call(E,{})}function i(){a.on("zoom",null)}return{update:s,destroy:i,pointer:Ql}}const bS=e=>({x:e.x,y:e.y,zoom:e.k}),Y2=({x:e,y:t,zoom:n})=>gS.translate(e,t).scale(n),Dh=(e,t)=>e.target.closest(`.${t}`),KJ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),r6e=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,K2=(e,t=0,n=r6e,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},ZJ=e=>{const t=e.ctrlKey&&wy()?10:1;
1905return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function a6e({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:s,zoomOnPinch:i,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Dh(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&i){const y=Ql(d),b=ZJ(d),E=f*Math.pow(2,b);r.scaleTo(n,E,y,d);return}const m=d.deltaMode===1?20:1;let h=a===cm.Vertical?0:d.deltaX*m,g=a===cm.Horizontal?0:d.deltaY*m;!wy()&&d.shiftKey&&a!==cm.Vertical&&(h=d.deltaY*m,g=0),r.translateBy(n,-(h/f)*s,-(g/f)*s,{internal:!0});const v=bS(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(d,v),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,v),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,v))}}function s6e({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const s=r.type==="wheel",i=!t&&s&&!r.ctrlKey,l=Dh(r,e);if(r.ctrlKey&&s&&l&&r.preventDefault(),i||l)return null;r.preventDefault(),n.call(this,r,a)}}function i6e({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var s,i,l;if((s=r.sourceEvent)!=null&&s.internal)return;const a=bS(r.transform);e.mouseButton=((i=r.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function o6e({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return s=>{var i,l;e.usedRightMouseButton=!!(n&&KJ(t,e.mouseButton??0)),(i=s.sourceEvent)!=null&&i.sync||r([s.transform.x,s.transform.y,s.transform.k]),a&&!((l=s.sourceEvent)!=null&&l.internal)&&(a==null||a(s.sourceEvent,bS(s.transform)))}}function l6e({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:s}){return i=>{var l;if(!((l=i.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&KJ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&s(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const c=bS(i.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(i.sourceEvent,c)},n?150:0)}}}function c6e({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:s,userSelectionActive:i,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return f=>{var y;const m=e||t,h=n&&f.ctrlKey,g=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Dh(f,`${u}-flow__node`)||Dh(f,`${u}-flow__edge`)))return!0;if(!r&&!m&&!a&&!s&&!n||i||d&&!g||Dh(f,l)&&g||Dh(f,c)&&(!g||a&&g&&!e)||!n&&f.ctrlKey&&g)return!1;if(!n&&f.type==="touchstart"&&((y=f.touches)==null?void 0:y.length)>1)return f.preventDefault(),!1;if(!m&&!a&&!h&&g||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const v=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||g)&&v}}function u6e({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:
1905a,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=EJ().scaleExtent([t,n]).translateExtent(r),m=Vo(e).call(f);E({x:a.x,y:a.y,zoom:eg(a.zoom,t,n)},[[0,0],[d.width,d.height]],r);const h=m.on("wheel.zoom"),g=m.on("dblclick.zoom");f.wheelDelta(ZJ);function v(T,M){return m?new Promise(L=>{f==null||f.interpolate((M==null?void 0:M.interpolate)==="linear"?uv:Uw).transform(K2(m,M==null?void 0:M.duration,M==null?void 0:M.ease,()=>L(!0)),T)}):Promise.resolve(!1)}function y({noWheelClassName:T,noPanClassName:M,onPaneContextMenu:L,userSelectionActive:D,panOnScroll:j,panOnDrag:H,panOnScrollMode:Y,panOnScrollSpeed:z,preventScrolling:K,zoomOnPinch:ee,zoomOnScroll:oe,zoomOnDoubleClick:J,zoomActivationKeyPressed:se,lib:B,onTransformChange:U,connectionInProgress:$,paneClickDistance:ce,selectionOnDrag:be}){D&&!u.isZoomingOrPanning&&b();const ue=j&&!se&&!D;f.clickDistance(be?1/0:!sc(ce)||ce<0?0:ce);const Ie=ue?a6e({zoomPanValues:u,noWheelClassName:T,d3Selection:m,d3Zoom:f,panOnScrollMode:Y,panOnScrollSpeed:z,zoomOnPinch:ee,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:l}):s6e({noWheelClassName:T,preventScrolling:K,d3ZoomHandler:h});if(m.on("wheel.zoom",Ie,{passive:!1}),!D){const he=i6e({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:i});f.on("start",he);const _e=o6e({zoomPanValues:u,panOnDrag:H,onPaneContextMenu:!!L,onPanZoom:s,onTransformChange:U});f.on("zoom",_e);const ie=l6e({zoomPanValues:u,panOnDrag:H,panOnScroll:j,onPaneContextMenu:L,onPanZoomEnd:l,onDraggingChange:c});f.on("end",ie)}const Ae=c6e({zoomActivationKeyPressed:se,panOnDrag:H,zoomOnScroll:oe,panOnScroll:j,zoomOnDoubleClick:J,zoomOnPinch:ee,userSelectionActive:D,noPanClassName:M,noWheelClassName:T,lib:B,connectionInProgress:$});f.filter(Ae),J?m.on("dblclick.zoom",g):m.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function E(T,M,L){const D=Y2(T),j=f==null?void 0:f.constrain()(D,M,L);return j&&await v(j),new Promise(H=>H(j))}async function w(T,M){const L=Y2(T);return await v(L,M),new Promise(D=>D(L))}function x(T){if(m){const M=Y2(T),L=m.property("__zoom");(L.k!==T.zoom||L.x!==T.x||L.y!==T.y)&&(f==null||f.transform(m,M,null,{sync:!0}))}}function S(){const T=m?wJ(m.node()):{x:0,y:0,k:1};return{x:T.x,y:T.y,zoom:T.k}}function N(T,M){return m?new Promise(L=>{f==null||f.interpolate((M==null?void 0:M.interpolate)==="linear"?uv:Uw).scaleTo(K2(m,M==null?void 0:M.duration,M==null?void 0:M.ease,()=>L(!0)),T)}):Promise.resolve(!1)}function k(T,M){return m?new Promise(L=>{f==null||f.interpolate((M==null?void 0:M.interpolate)==="linear"?uv:Uw).scaleBy(K2(m,M==null?void 0:M.duration,M==null?void 0:M.ease,()=>L(!0)),T)}):Promise.resolve(!1)}function C(T){f==null||f.scaleExtent(T)}function A(T){f==null||f.translateExtent(T)}function O(T){const M=!sc(T)||T<0?0:T;f==null||f.clickDistance(M)}return{update:y,destroy:b,setViewport:w,setViewportConstrained:E,getViewport:S,scaleTo:N,scaleBy:k,setScaleExtent:C,setTranslateExtent:A,syncViewport:x,setClickDistance:O}}var rg;(function(e){e.Line="line",e.Handle="handle"})(rg||(rg={}));function d6e({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:s}){const i=e-t,l=n-r,c=[i>0?1:i<0?-1:0,l>0?1:l<0?-1:0];return i&&a&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function K7(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function yd(e,t){return Math.max(0,t-e)}function bd(e,t){return Math.max(0,e-t)}function z1(e,t,n){return Math.max(0,t-e,e-n)}function Z7(e,t){return e?!t:t}function f6e(e,t,n,r,a,s,i,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,m=d&&f,{xSnapped:h,ySnapped:g}=n,{minWidth:v,maxWidth:y,minHeight:b,maxHeight:E}=r,{x:w,y:x,width:S,height:N,aspectRatio:k}=e;let C=Math.floor(d?h-e.pointerX:0),A=Math.floor(f?g-e.pointerY:0);const O=S+(c?-C:C),T=N+(u?-A:A),M=-s[0]*S,L=-s[1]*N;let D=z1(O,v,y),j=z1(T,b,E);if(i){let z=0,K=0;c&&C<0?z=yd(w+C+M,i[0][0]):!c&&C>0&&(z=bd(w+O+M,i[1][0])),u&&A<0?K=yd(x+A+L,i[0][1]):!u&&A>0&&(K=bd(x+T+L,i[1][1])),D=Math.max(D,z),j=Math.max(j,K)}if(l){let z=0,K=0;c&&C>0?z=bd(w+C,l[0][0]):!c&&C<0&&(z=yd(w+O,l[1][0])),u&&A>0?K=bd(x+A,l[0][1]):!u&&A<0&&(K=yd(x+T,l[1][1])),D=Math.max(D,z),j=Math.max(j,K)}if(a){if(d){const z=z1(O/k,b,E)*k;if(D=Math.max(D,z),i){let K=0;!c&&!u||c&&!u&&m?K=bd(x+L+O/k,i[1][1])*k:K=yd(x+L+(c?C:-C)/k,i[0][1])*k,D=Math.max(D,K)}if(l){let K=0;!c&&!u||c&&!u&&m?K=yd(x+O/k,l[1][1])*k:K=bd(x+(c?C:-C)/k,l[0][1])*k,D=Math.max(D,K)}}if(f){const z=z1(T*k,v,y)/k;if(j=Math.max(j,z),i){let K=0;!c&&!u||u&&!c&&m?K=bd(w+T*k+M,i[1][0])/k:K=yd(w+(u?A:-A)*k+M,i[0][0])/k,j=Math.max(j,K)}if(l){let K=0;!c&&!u||u&&!c&&m?K=yd(w+T*k,l[1][0])/k:K=bd(w+(u?A:-A)*k,l[0][0])/k,j=Math.max(j,K)}}}A=A+(A<0?j:-j),C=C+(C<0?D:-D),a&&(m?O>T*k?A=(Z7(c,u)?-C:C)/k:C=(Z7(c,u)?-A:A)*k:d?(A=C/k,u=c):(C=A*k,c=u));
1905const H=c?w+C:w,Y=u?x+A:x;return{width:S+(c?-C:C),height:N+(u?-A:A),x:s[0]*C*(c?-1:1)+H,y:s[1]*A*(u?-1:1)+Y}}const XJ={width:0,height:0,x:0,y:0},m6e={...XJ,pointerX:0,pointerY:0,aspectRatio:1};function h6e(e){return[[0,0],[e.measured.width,e.measured.height]]}function p6e(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,s=e.measured.width??0,i=e.measured.height??0,l=n[0]*s,c=n[1]*i;return[[r-l,a-c],[r+s-l,a+i-c]]}function g6e({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const s=Vo(e);let i={controlDirection:K7("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:f,resizeDirection:m,onResizeStart:h,onResize:g,onResizeEnd:v,shouldResize:y}){let b={...XJ},E={...m6e};i={boundaries:d,resizeDirection:m,keepAspectRatio:f,controlDirection:K7(u)};let w,x=null,S=[],N,k,C,A=!1;const O=iJ().on("start",T=>{const{nodeLookup:M,transform:L,snapGrid:D,snapToGrid:j,nodeOrigin:H,paneDomNode:Y}=n();if(w=M.get(t),!w)return;x=(Y==null?void 0:Y.getBoundingClientRect())??null;const{xSnapped:z,ySnapped:K}=dv(T.sourceEvent,{transform:L,snapGrid:D,snapToGrid:j,containerBounds:x});b={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},E={...b,pointerX:z,pointerY:K,aspectRatio:b.width/b.height},N=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(N=M.get(w.parentId),k=N&&w.extent==="parent"?h6e(N):void 0),S=[],C=void 0;for(const[ee,oe]of M)if(oe.parentId===t&&(S.push({id:ee,position:{...oe.position},extent:oe.extent}),oe.extent==="parent"||oe.expandParent)){const J=p6e(oe,w,oe.origin??H);C?C=[[Math.min(J[0][0],C[0][0]),Math.min(J[0][1],C[0][1])],[Math.max(J[1][0],C[1][0]),Math.max(J[1][1],C[1][1])]]:C=J}h==null||h(T,{...b})}).on("drag",T=>
1905{const{transform:M,snapGrid:L,snapToGrid:D,nodeOrigin:j}=n(),H=dv(T.sourceEvent,{transform:M,snapGrid:L,snapToGrid:D,containerBounds:x}),Y=[];if(!w)return;const{x:z,y:K,width:ee,height:oe}=b,J={},se=w.origin??j,{width:B,height:U,x:$,y:ce}=f6e(E,i.controlDirection,H,i.boundaries,i.keepAspectRatio,se,k,C),be=B!==ee,ue=U!==oe,Ie=$!==z&&be,Ae=ce!==K&&ue;if(!Ie&&!Ae&&!be&&!ue)return;if((Ie||Ae||se[0]===1||se[1]===1)&&(J.x=Ie?$:b.x,J.y=Ae?ce:b.y,b.x=J.x,b.y=J.y,S.length>0)){const Ue=$-z,ae=ce-K;for(const pe of S)pe.position={x:pe.position.x-Ue+se[0]*(B-ee),y:pe.position.y-ae+se[1]*(U-oe)},Y.push(pe)}if((be||ue)&&(J.width=be&&(!i.resizeDirection||i.resizeDirection==="horizontal")?B:b.width,J.height=ue&&(!i.resizeDirection||i.resizeDirection==="vertical")?U:b.height,b.width=J.width,b.height=J.height),N&&w.expandParent){const Ue=se[0]*(J.width??0);J.x&&J.x<Ue&&(b.x=Ue,E.x=E.x-(J.x-Ue));const ae=se[1]*(J.height??0);J.y&&J.y<ae&&(b.y=ae,E.y=E.y-(J.y-ae))}const he=d6e({width:b.width,prevWidth:ee,height:b.height,prevHeight:oe,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),_e={...b,direction:he};(y==null?void 0:y(T,_e))!==!1&&(A=!0,g==null||g(T,_e),r(J,Y))}).on("end",T=>{A&&(v==null||v(T,{...b}),a==null||a({...b}),A=!1)});s.call(O)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var QJ={exports:{}},JJ={},eee={exports:{}},tee={};/** 1906 * @license React 1907 * use-sync-external-store-shim.production.js 1908 * 1909 * Copyright (c) Meta Platforms, Inc. and affiliates. 1910 * 1911 * This source code is licensed under the MIT license found in the 1912 * LICENSE file in the root directory of this source tree. 1913 */var ag=p;function v6e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var y6e=typeof Object.is=="function"?Object.is:v6e,b6e=ag.useState,w6e=ag.useEffect,E6e=ag.useLayoutEffect,x6e=ag.useDebugValue;function _6e(e,t){var n=t(),r=b6e({inst:{value:n,getSnapshot:t}}),a=r[0].inst,s=r[1];return E6e(function(){a.value=n,a.getSnapshot=t,Z2(a)&&s({inst:a})},[e,n,t]),w6e(function(){return Z2(a)&&s({inst:a}),e(function(){Z2(a)&&s({inst:a})})},[e]),x6e(n),n}function Z2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!y6e(e,n)}catch{return!0}}function k6e(e,t){return t()}var S6e=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k6e:_6e;tee.useSyncExternalStore=ag.useSyncExternalStore!==void 0?ag.useSyncExternalStore:S6e;eee.exports=tee;var C6e=eee.exports;/** 1914 * @license React 1915 * use-sync-external-store-shim/with-selector.production.js 1916 * 1917 * Copyright (c) Meta Platforms, Inc. and affiliates. 1918 * 1919 * This source code is licensed under the MIT license found in the 1920 * LICENSE file in the root directory of this source tree. 1921 */var wS=p,N6e=C6e;function R6e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var T6e=typeof Object.is=="function"?Object.is:R6e,A6e=N6e.useSyncExternalStore,I6e=wS.useRef,O6e=wS.useEffect,M6e=wS.useMemo,P6e=wS.useDebugValue;JJ.useSyncExternalStoreWithSelector=function(e,t,n,r,a){var s=I6e(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=M6e(function(){function c(h){if(!u){if(u=!0,d=h,h=r(h),a!==void 0&&i.hasValue){var g=i.value;if(a(g,h))return f=g}return f=h}if(g=f,T6e(d,h))return g;var v=r(h);return a!==void 0&&a(g,v)?(d=h,g):(d=h,f=v)}var u=!1,d,f,m=n===void 0?null:n;return[function(){return c(t())},m===null?void 0:function(){return c(m())}]},[t,n,r,a]);var l=A6e(e,s[0],s[1]);return O6e(function(){i.hasValue=!0,i.value=l},[l]),P6e(l),l};QJ.exports=JJ;var D6e=QJ.exports;const L6e=id(D6e),X7=e=>{let t;const n=new Set,r=(d,f)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const h=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(g=>g(t,h))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{n.clear()}},u=t=e(r,a,c);return c},$6e=e=>e?X7(e):X7,{useDebugValue:F6e}=o,{useSyncExternalStoreWithSelector:z6e}=L6e,H6e=e=>e;function nee(e,t=H6e,n){const r=z6e(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return F6e(r),r}const Q7=(e,t)=>{const n=$6e(e),r=(a,s=t)=>nee(n,a,s);return Object.assign(r,n),r}
1921,V6e=(e,t)=>e?Q7(e,t):Q7;function Ja(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const ES=p.createContext(null),U6e=ES.Provider,ree=au.error001();function ra(e,t){const n=p.useContext(ES);if(n===null)throw new Error(ree);return nee(n,e,t)}function Ua(){const e=p.useContext(ES);if(e===null)throw new Error(ree);return p.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const J7={display:"none"},B6e={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},aee="react-flow__node-desc",see="react-flow__edge-desc",j6e="react-flow__aria-live",W6e=e=>e.ariaLiveMessage,G6e=e=>e.ariaLabelConfig;function q6e({rfId:e}){const t=ra(W6e);return F.jsx("div",{id:`${j6e}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:B6e,children:t})}function Y6e({rfId:e,disableKeyboardA11y:t}){const n=ra(G6e);return F.jsxs(F.Fragment,{children:[F.jsx("div",{id:`${aee}-${e}`,style:J7,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),F.jsx("div",{id:`${see}-${e}`,style:J7,children:n["edge.a11yDescription.default"]}),!t&&F.jsx(q6e,{rfId:e})]})}const xS=p.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},s)=>{const i=`${e}`.split("-");return F.jsx("div",{className:As(["react-flow__panel",n,...i]),style:r,ref:s,...a,children:t})});xS.displayName="Panel";function K6e({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:F.jsx(xS,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:F.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Z6e=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},H1=e=>e.id;function X6e(e,t){return Ja(e.selectedNodes.map(H1),t.selectedNodes.map(H1))&&Ja(e.selectedEdges.map(H1),t.selectedEdges.map(H1))}function Q6e({onSelectionChange:e}){const t=Ua(),{selectedNodes:n,selectedEdges:r}=ra(Z6e,X6e);return p.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(s=>s(a))},[n,r,e]),null}const J6e=e=>!!e.onSelectionChangeHandlers;function e9e({onSelectionChange:e}){const t=ra(J6e);return e||t?F.jsx(Q6e,{onSelectionChange:e}):null}const iee=[0,0],t9e={x:0,y:0,zoom:1},n9e=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],e8=[...n9e,"rfId"],r9e=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setN
1921odeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),t8={translateExtent:vy,nodeOrigin:iee,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function a9e(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:s,setNodeExtent:i,reset:l,setDefaultNodesAndEdges:c}=ra(r9e,Ja),u=Ua();p.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{d.current=t8,l()}),[]);const d=p.useRef(t8);return p.useEffect(()=>{for(const f of e8){const m=e[f],h=d.current[f];m!==h&&(typeof e[f]>"u"||(f==="nodes"?t(m):f==="edges"?n(m):f==="minZoom"?r(m):f==="maxZoom"?a(m):f==="translateExtent"?s(m):f==="nodeExtent"?i(m):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:TFe(m)}):f==="fitView"?u.setState({fitViewQueued:m}):f==="fitViewOptions"?u.setState({fitViewOptions:m}):u.setState({[f]:m})))}d.current=e},e8.map(f=>e[f])),null}function n8(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function s9e(e){var r;const[t,n]=p.useState(e==="system"?null:e);return p.useEffect(()=>{if(e!=="system"){n(e);return}const a=n8(),s=()=>n(a!=null&&a.matches?"dark":"light");return s(),a==null||a.addEventListener("change",s),()=>{a==null||a.removeEventListener("change",s)}},[e]),t!==null?t:(r=n8())!=null&&r.matches?"dark":"light"}const r8=typeof document<"u"?document:null;function Ey(e=null,t={target:r8,actInsideInputWithModifier:!0}){const[n,r]=p.useState(!1),a=p.useRef(!1),s=p.useRef(new Set([])),[i,l]=p.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` 1922`).replace(` 1923 1924`,` 1925+`).split(` 1926`)),d=u.reduce((f,m)=>f.concat(...m),[]);return[u,d]}return[[],[]]},[e]);return p.useEffect(()=>{const c=(t==null?void 0:t.target)??r8,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=h=>{var y,b;if(a.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!a.current||a.current&&!u)&&PJ(h))return!1;const v=s8(h.code,l);if(s.current.add(h[v]),a8(i,s.current,!1)){const E=((b=(y=h.composedPath)==null?void 0:y.call(h))==null?void 0:b[0])||h.target,w=(E==null?void 0:E.nodeName)==="BUTTON"||(E==null?void 0:E.nodeName)==="A";t.preventDefault!==!1&&(a.current||!w)&&h.preventDefault(),r(!0)}},f=h=>{const g=s8(h.code,l);a8(i,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(h[g]),h.key==="Meta"&&s.current.clear(),a.current=!1},m=()=>{s.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function a8(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function s8(e,t){return t.includes(e)?"code":"key"}const i9e=()=>{const e=Ua();return p.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,s],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??s},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:s,maxZoom:i,panZoom:l}=e.getState(),c=r4(t,r,a,s,i,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:s,domNode:i}=e.getState();if(!i)return t;const{x:l,y:c}=i.getBoundingClientRect(),u={x:t.x-l,y:t.y-c}
1926,d=n.snapGrid??a,f=n.snapToGrid??s;return Cb(u,r,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:s}=r.getBoundingClientRect(),i=Wx(t,n);return{x:i.x+a,y:i.y+s}}}),[])};function oee(e,t){const n=[],r=new Map,a=[];for(const s of e)if(s.type==="add"){a.push(s);continue}else if(s.type==="remove"||s.type==="replace")r.set(s.id,[s]);else{const i=r.get(s.id);i?i.push(s):r.set(s.id,[s])}for(const s of t){const i=r.get(s.id);if(!i){n.push(s);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const l={...s};for(const c of i)o9e(c,l);n.push(l)}return a.length&&a.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function o9e(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function u4(e,t){return oee(e,t)}function d4(e,t){return oee(e,t)}function Pf(e,t){return{id:e,type:"select",selected:t}}function Lh(e,t=new Set,n=!1){const r=[];for(const[a,s]of e){const i=t.has(a);!(s.selected===void 0&&!i)&&s.selected!==i&&(n&&(s.selected=i),r.push(Pf(s.id,i)))}return r}function i8({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(s=>[s.id,s]));for(const[s,i]of e.entries()){const l=t.get(i.id),c=((a=l==null?void 0:l.internals)==null?void 0:a.userNode)??l;c!==void 0&&c!==i&&n.push({id:i.id,item:i,type:"replace"}),c===void 0&&n.push({item:i,type:"add",index:s})}for(const[s]of t)r.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function o8(e){return{id:e.id,type:"remove"}}const l8=e=>bFe(e),l9e=e=>CJ(e);function lee(e){return p.forwardRef(e)}const c9e=typeof window<"u"?p.useLayoutEffect:p.useEffect;function c8(e){const[t,n]=p.useState(BigInt(0)),[r]=p.useState(()=>u9e(()=>n(a=>a+BigInt(1))));return c9e(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function u9e(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const cee=p.createContext(null);function d9e({children:e}){const t=Ua(),n=p.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:m,fitViewQueued:h,onNodesChangeMiddlewareMap:g}=t.getState();let v=c;for(const b of l)v=typeof b=="function"?b(v):b;let y=i8({items:v,lookup:m});for(const b of g.values())y=b(y);d&&u(v),y.length>0?f==null||f(y):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:E,setNodes:w}=t.getState();b&&w(E)})},[]),r=c8(n),a=p.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:m}=t.getState();let h=c;for(const g of l)h=typeof g=="function"?g(h):g;d?u(h):f&&f(i8({items:h,lookup:m}))},[]),s=c8(a),i=p.useMemo(()=>({nodeQueue:r,edgeQueue:s}),[]);return F.jsx(cee.Provider,{value:i,children:e})}function f9e(){const e=p.useContext(cee);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const m9e=e=>!!e.panZoom;function _S(){const e=i9e(),t=Ua(),n=f9e(),r=ra(m9e),a=p.useMemo(()=>{const s=f=>t.getState().nodeLookup.get(f),i=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{var b,E;const{nodeLookup:m,nodeOrigin:h}=t.getState(),g=l8(f)?f:m.get(f.id),v=g.parentId?OJ(g.position,g.measured,g.parentId,m,h):g.position,y={...g,position:v,width:((b=g.measured)==null?void 0:b.width)??g.width,height:((E=g.measured)==null?void 0:E.height)??g.height};return tg(y)},u=(f,m,h={replace:!1})=>{i(g=>g.map(v=>{if(v.id===f){const y=typeof m=="function"?m(v):m;return h.replace&&l8(y)?y:{...v,...y}}return v}))},d=(f,m,h={replace:!1})=>{l(g=>g.map(v=>{if(v.id===f){const y=typeof m=="function"?m(v):m;return h.replace&&l9e(y)?y:{...v,...y}}return v}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var m;return(m=s(f))==null?void 0:m.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(m=>({...m}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:i,setEdges:l,addNodes:f=>{const m=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...m])},addEdges:f=>{const m=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...m])},toObject:()=>{const{nodes:f=[],edges:m=[],transform:h}=t.getState(),[g,v,y]=h;return{nodes:f.map(b=>({...b})),edges:m.map(b=>({...b})),viewport:{x:g,y:v,zoom:y}}},deleteElements:async({nodes:f=[],edges:m=[]})=>{const{nodes:h,edges:g,onNodesDelete:v,onEdgesDelete:y,triggerNodeChanges:b,triggerEdgeChanges:E,onDelete:w,onBeforeDelete:x}=t.getState(),{nodes:S,edges:N}=await kFe({nodesToRemove:f,edgesToRemove:m,nodes:h,edges:g,onBeforeDelete:x}),k=N.length>0,C=S.length>0;if(k){const A=N.map(o8);y==null||y(N),E(A)}if(C){const A=S.map(o8);v==null||v(S),b(A)}return(C||k)&&(w==null||w({nodes:S,edges:N})),{deletedNodes:S,deletedEdges:N}},getIntersectingNodes:(f,m=!0,h)=>{const g=F7(f),v=g?f:c(f),y=h!==void 0;return v?(h||t.getState().nodes).filter(b=>{const E=t.getState().nodeLookup.get(b.id);if(E&&!g&&(b.id===f.id||!E.internals.positionAbsolute))return!1;const w=tg(y?b:E),x=by(w,v);return m&&x>0||x>=w.width*w.height||x>=v.width*v.height}):[]},isNodeIntersecting:(f,m,h=!0)=>{const v=F7(f)?f:c(f);if(!v)return!1;const y=by(v,m);return h&&y>0||y>=m.width*m.height||y>=v.width*v.height},updateNode:u,updateNodeData:(f,m,h={replace:!1})=>{u(f,g=>{const v=typeof m=="function"?m(g):m;return h.replace?{...g,data:v}:{...g,data:{...g.data,...v}}},h)},updateEdge:d,updateEdgeData:(f,m,h={replace:!1})=>
1926{d(f,g=>{const v=typeof m=="function"?m(g):m;return h.replace?{...g,data:v}:{...g,data:{...g.data,...v}}},h)},getNodesBounds:f=>{const{nodeLookup:m,nodeOrigin:h}=t.getState();return wFe(f,{nodeLookup:m,nodeOrigin:h})},getHandleConnections:({type:f,id:m,nodeId:h})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${h}-${f}${m?`-${m}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:f,handleId:m,nodeId:h})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${h}${f?m?`-${f}-${m}`:`-${f}`:""}`))==null?void 0:g.values())??[])},fitView:async f=>{const m=t.getState().fitViewResolver??RFe();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:m}),n.nodeQueue.push(h=>[...h]),m.promise}}},[]);return p.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const u8=e=>e.selected,h9e=typeof window<"u"?window:void 0;function p9e({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ua(),{deleteElements:r}=_S(),a=Ey(e,{actInsideInputWithModifier:!1}),s=Ey(t,{target:h9e});p.useEffect(()=>{if(a){const{edges:i,nodes:l}=n.getState();r({nodes:l.filter(u8),edges:i.filter(u8)}),n.setState({nodesSelectionActive:!1})}},[a]),p.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function g9e(e){const t=Ua();p.useEffect(()=>{const n=()=>{var a,s,i,l;if(!e.current||!(((s=(a=e.current).checkVisibility)==null?void 0:s.call(a))??!0))return!1;const r=a4(e.current);(r.height===0||r.width===0)&&((l=(i=t.getState()).onError)==null||l.call(i,"004",au.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const kS={position:"absolute",width:"100%",height:"100%",top:0,left:0},v9e=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function y9e({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:s=cm.Free,zoomOnDoubleClick:i=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:m,preventScrolling:h=!0,children:g,noWheelClassName:v,noPanClassName:y,onViewportChange:b,isControlledViewport:E,paneClickDistance:w,selectionOnDrag:x}){const S=Ua(),N=p.useRef(null),{userSelectionActive:k,lib:C,connectionInProgress:A}=ra(v9e,Ja),O=Ey(m),T=p.useRef();g9e(N);const M=p.useCallback(L=>{b==null||b({x:L[0],y:L[1],zoom:L[2]}),E||S.setState({transform:L})},[b,E]);return p.useEffect(()=>{if(N.current){T.current=u6e({domNode:N.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:H=>S.setState(Y=>Y.paneDragging===H?Y:{paneDragging:H}),onPanZoomStart:(H,Y)=>{const{onViewportChangeStart:z,onMoveStart:K}=S.getState();K==null||K(H,Y),z==null||z(Y)},onPanZoom:(H,Y)=>{const{onViewportChange:z,onMove:K}=S.getState();K==null||K(H,Y),z==null||z(Y)},onPanZoomEnd:(H,Y)=>{const{onViewportChangeEnd:z,onMoveEnd:K}=S.getState();K==null||K(H,Y),z==null||z(Y)}});const{x:L,y:D,zoom:j}=T.current.getViewport();return S.setState({panZoom:T.current,transform:[L,D,j],domNode:N.current.closest(".react-flow")}),()=>{var H;(H=T.current)==null||H.destroy()}}},[]),p.useEffect(()=>{var L;(L=T.current)==null||L.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:s,zoomOnDoubleClick:i,panOnDrag:l,zoomActivationKeyPressed:O,preventScrolling:h,noPanClassName:y,userSelectionActive:k,noWheelClassName:v,lib:C,onTransformChange:M,connectionInProgress:A,selectionOnDrag:x,paneClickDistance:w})},[e,t,n,r,a,s,i,l,O,h,y,k,v,C,M,A,x,w]),F.jsx("div",{className:"react-flow__renderer",ref:N,style:kS,children:g})}const b9e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function w9e(){const{userSelectionActive:e,userSelectionRect:t}=ra(b9e,Ja);return e&&t?F.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const X2=(e,t)=>
1926n=>{n.target===t.current&&(e==null||e(n))},E9e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function x9e({isSelecting:e,selectionKeyPressed:t,selectionMode:n=yy.Full,panOnDrag:r,paneClickDistance:a,selectionOnDrag:s,onSelectionStart:i,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:m,onPaneMouseLeave:h,children:g}){const v=Ua(),{userSelectionActive:y,elementsSelectable:b,dragging:E,connectionInProgress:w}=ra(E9e,Ja),x=b&&(e||y),S=p.useRef(null),N=p.useRef(),k=p.useRef(new Set),C=p.useRef(new Set),A=p.useRef(!1),O=z=>{if(A.current||w){A.current=!1;return}c==null||c(z),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},T=z=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){z.preventDefault();return}u==null||u(z)},M=d?z=>d(z):void 0,L=z=>{A.current&&(z.stopPropagation(),A.current=!1)},D=z=>{var U,$;const{domNode:K}=v.getState();if(N.current=K==null?void 0:K.getBoundingClientRect(),!N.current)return;const ee=z.target===S.current;if(!ee&&!!z.target.closest(".nokey")||!e||!(s&&ee||t)||z.button!==0||!z.isPrimary)return;($=(U=z.target)==null?void 0:U.setPointerCapture)==null||$.call(U,z.pointerId),A.current=!1;const{x:se,y:B}=ic(z.nativeEvent,N.current);v.setState({userSelectionRect:{width:0,height:0,startX:se,startY:B,x:se,y:B}}),ee||(z.stopPropagation(),z.preventDefault())},j=z=>{const{userSelectionRect:K,transform:ee,nodeLookup:oe,edgeLookup:J,connectionLookup:se,triggerNodeChanges:B,triggerEdgeChanges:U,defaultEdgeOptions:$,resetSelectedElements:ce}=v.getState();if(!N.current||!K)return;const{x:be,y:ue}=ic(z.nativeEvent,N.current),{startX:Ie,startY:Ae}=K;if(!A.current){const ae=t?0:a;if(Math.hypot(be-Ie,ue-Ae)<=ae)return;ce(),i==null||i(z)}A.current=!0;const he={startX:Ie,startY:Ae,x:be<Ie?be:Ie,y:ue<Ae?ue:Ae,width:Math.abs(be-Ie),height:Math.abs(ue-Ae)},_e=k.current,ie=C.current;k.current=new Set(n4(oe,he,ee,n===yy.Partial,!0).map(ae=>ae.id)),C.current=new Set;const Ue=($==null?void 0:$.selectable)??!0;for(const ae of k.current){const pe=se.get(ae);if(pe)for(const{edgeId:W}of pe.values()){const q=J.get(W);q&&(q.selectable??Ue)&&C.current.add(W)}}if(!z7(_e,k.current)){const ae=Lh(oe,k.current,!0);B(ae)}if(!z7(ie,C.current)){const ae=Lh(J,C.current);U(ae)}v.setState({userSelectionRect:he,userSelectionActive:!0,nodesSelectionActive:!1})},H=z=>{var K,ee;z.button===0&&((ee=(K=z.target)==null?void 0:K.releasePointerCapture)==null||ee.call(K,z.pointerId),!y&&z.target===S.current&&v.getState().userSelectionRect&&(O==null||O(z)),v.setState({userSelectionActive:!1,userSelectionRect:null}),A.current&&(l==null||l(z),v.setState({nodesSelectionActive:k.current.size>0})))},Y=r===!0||Array.isArray(r)&&r.includes(0);return F.jsxs("div",{className:As(["react-flow__pane",{draggable:Y,dragging:E,selection:e}]),onClick:x?void 0:X2(O,S),onContextMenu:X2(T,S),onWheel:X2(M,S),onPointerEnter:x?void 0:f,onPointerMove:x?j:m,onPointerUp:x?H:void 0,onPointerDownCapture:x?D:void 0,onClickCapture:x?L:void 0,onPointerLeave:h,ref:S,style:kS,children:[g,F.jsx(w9e,{})]})}function MO({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:s,multiSelectionActive:i,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c==null||c("012",au.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&i)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):a([e])}function uee({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:s,nodeClickDistance:i}){const l=Ua(),[c,u]=p.useState(!1),d=p.useRef();return p.useEffect(()=>{d.current=ZFe({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{MO({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),p.useEffect(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:s,nodeId:a,nodeClickDistance:i}),()=>{var f;(f=d.current)==null||f.destroy()}},[n,r,t,s,e,a,i]),c}const _9e=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function dee(){const e=Ua();return p.useCallback(n=>
1926{const{nodeExtent:r,snapToGrid:a,snapGrid:s,nodesDraggable:i,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,m=_9e(i),h=a?s[0]:5,g=a?s[1]:5,v=n.direction.x*h*n.factor,y=n.direction.y*g*n.factor;for(const[,b]of u){if(!m(b))continue;let E={x:b.internals.positionAbsolute.x+v,y:b.internals.positionAbsolute.y+y};a&&(E=Sb(E,s));const{position:w,positionAbsolute:x}=NJ({nodeId:b.id,nextPosition:E,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:l});b.position=w,b.internals.positionAbsolute=x,f.set(b.id,b)}c(f)},[])}const f4=p.createContext(null),k9e=f4.Provider;f4.Consumer;const fee=()=>p.useContext(f4),S9e=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),C9e=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:s,connection:i}=r,{fromHandle:l,toHandle:c,isValid:u}=i,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:s===Jp.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!a,valid:d&&u}};function N9e({type:e="source",position:t=Xn.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:s=!0,id:i,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...m},h){var j,H;const g=i||null,v=e==="target",y=Ua(),b=fee(),{connectOnClick:E,noPanClassName:w,rfId:x}=ra(S9e,Ja),{connectingFrom:S,connectingTo:N,clickConnecting:k,isPossibleEndHandle:C,connectionInProcess:A,clickConnectionInProcess:O,valid:T}=ra(C9e(b,g,e),Ja);b||(H=(j=y.getState()).onError)==null||H.call(j,"010",au.error010());const M=Y=>{const{defaultEdgeOptions:z,onConnect:K,hasDefaultEdges:ee}=y.getState(),oe={...z,...Y};if(ee){const{edges:J,setEdges:se}=y.getState();se(zJ(oe,J))}K==null||K(oe),l==null||l(oe)},L=Y=>{if(!b)return;const z=DJ(Y.nativeEvent);if(a&&(z&&Y.button===0||!z)){const K=y.getState();OO.onPointerDown(Y.nativeEvent,{handleDomNode:Y.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:v,handleId:g,nodeId:b,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...ee)=>{var oe,J;return(J=(oe=y.getState()).onConnectEnd)==null?void 0:J.call(oe,...ee)},updateConnection:K.updateConnection,onConnect:M,isValidConnection:n||((...ee)=>{var oe,J;return((J=(oe=y.getState()).isValidConnection)==null?void 0:J.call(oe,...ee))??!0}),getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}z?d==null||d(Y):f==null||f(Y)},D=Y=>{const{onClickConnectStart:z,onClickConnectEnd:K,connectionClickStartHandle:ee,connectionMode:oe,isValidConnection:J,lib:se,rfId:B,nodeLookup:U,connection:$}=y.getState();if(!b||!ee&&!a)return;if(!ee){z==null||z(Y.nativeEvent,{nodeId:b,handleId:g,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:b,type:e,id:g}});return}const ce=MJ(Y.target),be=n||J,{connection:ue,isValid:Ie}=OO.isValid(Y.nativeEvent,{handle:{nodeId:b,id:g,type:e},connectionMode:oe,fromNodeId:ee.nodeId,fromHandleId:ee.id||null,fromType:ee.type,isValidConnection:be,flowId:B,doc:ce,lib:se,nodeLookup:U});Ie&&ue&&M(ue);const Ae=structuredClone($);delete Ae.inProgress,Ae.toPosition=Ae.toHandle?Ae.toHandle.position:null,K==null||K(Y,Ae),y.setState({connectionClickStartHandle:null})};return F.jsx("div",{"data-handleid":g,"data-nodeid":b,"data-handlepos":t,"data-id":`${x}-${b}-${g}-${e}`,className:As(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,u,{source:!v,target:v,connectable:r,connectablestart:a,connectableend:s,clickconnecting:k,connectingfrom:S,connectingto:N,valid:T,connectionindicator:r&&(!A||C)&&(A||O?s:a)}]),onMouseDown:L,onTouchStart:L,onClick:E?D:void 0,ref:h,...m,children:c})}const sg=p.memo(lee(N9e));function R9e({data:e,isConnectable:t,sourcePosition:n=Xn.Bottom}){return F.jsxs(F.Fragment,{children:[e==null?void 0:e.label,F.jsx(sg,{type:"source",position:n,isConnectable:t})]})}function T9e({data:e,isConnectable:t,targetPosition:n=Xn.Top,sourcePosition:r=Xn.Bottom}){return F.jsxs(F.Fragment,{children:[F.jsx(sg,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,F.jsx(sg,{type:"source",position:r,isConnectable:t})]})}function A9e(){return null}function I9e({data:e,isConnectable:t,targetPosition:n=Xn.Top}){return F.jsxs(F.Fragment,{children:[F.jsx(sg,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Gx={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},d8={input:R9e,default:T9e,output:I9e,group:A9e};function O9e(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const M9e=e=>{const{width:t,height:n,x:r,y:a}=kb(e.nodeLookup,{filter:s=>!!s.selected});return{width:sc(t)?t:null,height:sc(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function P9e({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ua(),{width:a,height:s,transformString:i,userSelectionActive:l}=ra(M9e,Ja),c=dee(),u=p.useRef(null);p.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]);const d=!l&&a!==null&&s!==null;
1926if(uee({nodeRef:u,disabled:!d}),!d)return null;const f=e?h=>{const g=r.getState().nodes.filter(v=>v.selected);e(h,g)}:void 0,m=h=>{Object.prototype.hasOwnProperty.call(Gx,h.key)&&(h.preventDefault(),c({direction:Gx[h.key],factor:h.shiftKey?4:1}))};return F.jsx("div",{className:As(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:F.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:m,style:{width:a,height:s}})})}const f8=typeof window<"u"?window:void 0,D9e=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function mee({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:s,onPaneScroll:i,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:v,zoomActivationKeyCode:y,elementsSelectable:b,zoomOnScroll:E,zoomOnPinch:w,panOnScroll:x,panOnScrollSpeed:S,panOnScrollMode:N,zoomOnDoubleClick:k,panOnDrag:C,defaultViewport:A,translateExtent:O,minZoom:T,maxZoom:M,preventScrolling:L,onSelectionContextMenu:D,noWheelClassName:j,noPanClassName:H,disableKeyboardA11y:Y,onViewportChange:z,isControlledViewport:K}){const{nodesSelectionActive:ee,userSelectionActive:oe}=ra(D9e,Ja),J=Ey(u,{target:f8}),se=Ey(v,{target:f8}),B=se||C,U=se||x,$=d&&B!==!0,ce=J||oe||$;return p9e({deleteKeyCode:c,multiSelectionKeyCode:g}),F.jsx(y9e,{onPaneContextMenu:s,elementsSelectable:b,zoomOnScroll:E,zoomOnPinch:w,panOnScroll:U,panOnScrollSpeed:S,panOnScrollMode:N,zoomOnDoubleClick:k,panOnDrag:!J&&B,defaultViewport:A,translateExtent:O,minZoom:T,maxZoom:M,zoomActivationKeyCode:y,preventScrolling:L,noWheelClassName:j,noPanClassName:H,onViewportChange:z,isControlledViewport:K,paneClickDistance:l,selectionOnDrag:$,children:F.jsxs(x9e,{onSelectionStart:m,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:s,onPaneScroll:i,panOnDrag:B,isSelecting:!!ce,selectionMode:f,selectionKeyPressed:J,paneClickDistance:l,selectionOnDrag:$,children:[e,ee&&F.jsx(P9e,{onSelectionContextMenu:D,noPanClassName:H,disableKeyboardA11y:Y})]})})}mee.displayName="FlowRenderer";const L9e=p.memo(mee),$9e=e=>t=>e?n4(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function F9e(e){return ra(p.useCallback($9e(e),[e]),Ja)}const z9e=e=>e.updateNodeInternals;function H9e(){const e=ra(z9e),[t]=p.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const s=a.target.getAttribute("data-id");r.set(s,{id:s,nodeElement:a.target,force:!0})}),e(r)}));return p.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function V9e({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=Ua(),s=p.useRef(null),i=p.useRef(null),l=p.useRef(e.sourcePosition),c=p.useRef(e.targetPosition),u=p.useRef(t),d=n&&!!e.internals.handleBounds;return p.useEffect(()=>{s.current&&!e.hidden&&(!d||i.current!==s.current)&&(i.current&&(r==null||r.unobserve(i.current)),r==null||r.observe(s.current),i.current=s.current)},[d,e.hidden]),p.useEffect(()=>()=>{i.current&&(r==null||r.unobserve(i.current),i.current=null)},[]),p.useEffect(()=>{if(s.current){const f=u.current!==t,m=l.current!==e.sourcePosition,h=c.current!==e.targetPosition;(f||m||h)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function U9e({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:s,onDoubleClick:i,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:m,noPanClassName:h,disableKeyboardA11y:g,rfId:v,nodeTypes:y,nodeClickDistance:b,onError:E}){const{node:w,internals:x,isParent:S}=ra(be=>{const ue=be.nodeLookup.get(e),Ie=be.parentLookup.has(e);return{node:ue,internals:ue.internals,isParent:Ie}},Ja);let N=w.type||"default",k=(y==null?void 0:y[N])||d8[N];k===void 0&&(E==null||E("003",au.error003(N)),N="default",k=(y==null?void 0:y.default)||d8.default);const C=!!(w.draggable||l&&typeof w.draggable>"u"),A=!!(w.selectable||c&&typeof w.selectable>"u"),O=!!(w.connectable||u&&typeof w.connectable>"u"),T=!!(w.focusable||d&&typeof w.focusable>"u"),M=Ua(),L=IJ(w),D=V9e({node:w,nodeType:N,hasDimensions:L,resizeObserver:f}),j=uee({nodeRef:D,disabled:w.hidden||!C,noDragClassName:m,handleSelector:w.dragHandle,nodeId:e,isSelectable:A,nodeClickDistance:b}),H=dee();if(w.hidden)return null;const Y=pd(w),z=O9e(w),K=A||C||t||n||r||a,ee=n?be=>n(be,{...x.userNode}):void 0,oe=r?be=>r(be,{...x.userNode}):void 0,J=a?be=>a(be,{...x.userNode}):void 0,se=s?be=>s(be,{...x.userNode}):void 0,B=i?be=>i(be,{...x.userNode}):void 0,U=be=>{const{selectNodesOnDrag:ue,nodeDragThreshold:Ie}=M.getState();A&&(!ue||!C||Ie>0)&&MO({id:e,store:M,nodeRef:D}),t&&t(be,{...x.userNode})},$=be=>{if(!(PJ(be.nativeEvent)||g)){if(xJ.includes(be.key)&&A){const ue=be.key==="Escape";MO({id:e,store:M,unselect:ue,nodeRef:D})}else if(C&&w.selected&&Object.prototype.hasOwnProperty.call(Gx,be.key)){be.preventDefault();const{ariaLabelConfig:ue}=M.getState();M.setState({ariaLiveMessage:ue["node.a11yDescription.ariaLiveMessage"]({direction:be.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),H({direction:Gx[be.key],factor:be.shiftKey?4:1})}}},ce=()=>{var ie;if(g||!((ie=D.current)!=null&&ie.matches(":focus-visible")))return;const{transform:be,width:ue,height:Ie,autoPanOnNodeFocus:Ae,setCenter:he}=M.getState();if(!Ae)return;n4(new Map([[e,w]]),{x:0,y:0,width:ue,height:Ie},be,!0).length>0||he(w.position.x+Y.width/2,w.position.y+Y.height/2,{zoom:be[2]})};return F.jsx("div",{className:As(["react-flow__node",`react-flow__node-${N}`,{[h]:C},w.className,{selected:w.selected,selectable:A,parent:S,draggable:C,dragging:j}]),ref:D,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:L?"visible":"hidden",...w.style,...z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:ee,onMouseMove:oe,onMouseLeave:J,onContextMenu:se,onClick:U,onDoubleClick:B,onKeyDown:T?$:void 0,tabIndex:T?0:void 0,onFocus:T?ce:void 0,role:w.ariaRole??(T?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${aee}-${v}`,"aria-label":w.ariaLabel,...w.domAttributes,children:F.jsx(k9e,{value:e,children:F.jsx(k,{id:e,data:w.data,t
1926ype:N,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:w.selected??!1,selectable:A,draggable:C,deletable:w.deletable??!0,isConnectable:O,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:j,dragHandle:w.dragHandle,zIndex:x.z,parentId:w.parentId,...Y})})})}var B9e=p.memo(U9e);const j9e=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function hee(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:s}=ra(j9e,Ja),i=F9e(e.onlyRenderVisibleElements),l=H9e();return F.jsx("div",{className:"react-flow__nodes",style:kS,children:i.map(c=>F.jsx(B9e,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}hee.displayName="NodeRenderer";const W9e=p.memo(hee);function G9e(e){return ra(p.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const s=n.nodeLookup.get(a.source),i=n.nodeLookup.get(a.target);s&&i&&OFe({sourceNode:s,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),Ja)}const q9e=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return F.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Y9e=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return F.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},m8={[Bx.Arrow]:q9e,[Bx.ArrowClosed]:Y9e};function K9e(e){const t=Ua();return p.useMemo(()=>{var a,s;return Object.prototype.hasOwnProperty.call(m8,e)?m8[e]:((s=(a=t.getState()).onError)==null||s.call(a,"009",au.error009(e)),null)},[e])}const Z9e=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:s="strokeWidth",strokeWidth:i,orient:l="auto-start-reverse"})=>{const c=K9e(t);return c?F.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:F.jsx(c,{color:n,strokeWidth:i})}):null},pee=({defaultColor:e,rfId:t})=>{const n=ra(s=>s.edges),r=ra(s=>s.defaultEdgeOptions),a=p.useMemo(()=>zFe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?F.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:F.jsx("defs",{children:a.map(s=>F.jsx(Z9e,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};pee.displayName="MarkerDefinitions";var X9e=p.memo(pee);function gee({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:s,labelBgPadding:i=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,m]=p.useState({x:1,y:0,width:0,height:0}),h=As(["react-flow__edge-textwrapper",u]),g=p.useRef(null);return p.useEffect(()=>{if(g.current){const v=g.current.getBBox();m({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?F.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...d,children:[a&&F.jsx("rect",{width:f.width+2*i[0],x:-i[0],y:-i[1],height:f.height+2*i[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),F.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:g,style:r,children:n}),c]}):null}gee.displayName="EdgeText";const Q9e=p.memo(gee);function SS({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return F.jsxs(F.Fragment,{children:[F.jsx("path",{...d,d:e,fill:"none",className:As(["react-flow__edge-path",d.className])}),u?F.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&sc(t)&&sc(n)?F.jsx(Q9e,{x:t,y:n,label:r,labelStyle:a,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function h8({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===Xn.Left||e===Xn.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function vee({sourceX:e,sourceY:t,sourcePosition:n=Xn.Bottom,targetX:r,targetY:a,targetPosition:s=Xn.Top}){const[i,l]=h8({pos:n,x1:e,y1:t,x2:r,y2:a}),[c,u]=h8({pos:s,x1:r,y1:a,x2:e,y2:t}),[d,f,m,h]=LJ({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:i,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${i},${l} ${c},${u} ${r},${a}`,d,f,m,h]}function yee(e){return p.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:s,sourcePosition:i,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:v,markerStart:y,interactionWidth:b})=>{const[E,w,x]=vee({sourceX:n,sourceY:r,sourcePosition:i,targetX:a,targetY:s,targetPosition:l}),S=e.isInternal?void 0:t;return F.jsx(SS,{id:S,path:E,labelX:w,labelY:x,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:v,markerStart:y,interactionWidth:b})})}const J9e=yee({isInternal:!1}),bee=yee({isInternal:!0});J9e.displayName="SimpleBezierEdge";bee.displayName="SimpleBezierEdgeInternal";function wee(e){return p.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:s,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,sourcePosition:h=Xn.Bottom,targetPosition:g=Xn.Top,markerEnd:v,markerStart:y,pathOptions:b,interactionWidth:E})=>{const[w,x,S]=TO({sourceX:n,sourceY:r,sourcePosition:h,targetX:a,targetY:s,targetPosition:g,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),N=e.isInternal?void 0:t;return F.jsx(SS,{id:N,path:w,labelX:x,labelY:S,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,markerEnd:v,markerStart:y,interactionWidth:E})})}const Eee=wee({isInternal:!1}),xee=wee({isInternal:!0});Eee.displayName="SmoothStepEdge";xee.displayName="SmoothStepEdgeInternal";function _ee(e){return p.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return F.jsx(Eee,{...n,id:r,pathOptions:p.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const e7e=_ee({isInternal:!1}),kee=_ee({isInternal:!0});e7e.displayName="StepEdge";kee.displayName="StepEdgeInternal";function See(e){return p.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:s,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,markerEnd:h,markerStart:g,interactionWidth:v})=>{const[y,b,E]=HJ({sourceX:n,sourceY:r,targetX:a,targetY:s}),w=e.isInternal?void 0:t;return F.jsx(SS,{id:w,path:y,labelX:b,labelY:E,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}const t7e=See({isInternal:!1}),Cee=See({isInternal:!0});t7e.displayName="StraightEdge";Cee.displayName="StraightEdgeInternal";function Nee(e){return p.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:s,sourcePosition:i=Xn.Bottom,targetPosition:l=Xn.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:v,markerStart:y,pathOptions:b,interactionWidth:E})=>{const[w,x,S]=$J({sourceX:n,sourceY:r,sourcePosition:i,targetX:a,targetY:s,targetPosition:l,curvature:b==null?void 0:b.curvature}),N=e.isInternal?void 0:t;return F.jsx(SS,{id:N,path:w,labelX:x,labelY:S,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:v,markerStart:y,interactionWidth:E})})}const n7e=Nee({isInternal:!1}),Ree=Nee({isInternal:!0});n7e.displayName="BezierEdge";Ree.displayName="BezierEdgeInternal";const p8={default:Ree,straight:Cee,step:kee,smoothstep:xee,simplebezier:bee},g8={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},r7e=(e,t,n)=>n===Xn.Left?e-t:n===Xn.Right?e+t:e,a7e=(e,t,n)=>n===Xn.Top?e-t:n===Xn.Bottom?e+t:e,v8="react-flow__edgeupdater";function y8({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:s,onMouseOut:i,type:l}){return F.jsx("circle",{onMouseDown:a,onMouseEnter:s,onMouseOut:i,className:As([v8,`${v8}-${l}`]),cx:r7e(t,r,e),cy:a7e(n,r,e),r,stroke:"transparent",fill:"transparent"})}function s7e({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:s,targetY:i,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:m,setUpdateHover:h}){const g=Ua(),v=(x,S)=>{if(x.button!==0)return;const{autoPanOnConnect:N,domNode:k,connectionMode:C,connectionRadius:A,lib:O,onConnectStart:T,cancelConnection:M,nodeLookup:L,rfId:D,panBy:j,updateConnection:H}=g.getState(),Y=S.type==="target",z=(oe,J)=>{m(!1),f==null||f(oe,n,S.type,J)},K=oe=>u==null?void 0:u(n,oe),ee=(oe,J)=>{m(!0),d==null||d(x,n,S.type),T==null||T(oe,J)};OO.onPointerDown(x.nativeEvent,{autoPanOnConnect:N,connectionMode:C,connectionRadius:A,domNode:k,handleId:S.id,nodeId:S.nodeId,nodeLookup:L,isTarget:Y,edgeUpdaterType:S.type,lib:O,flowId:D,cancelConnection:M,panBy:j,isValidConnection:(...oe)=>{var J,se;return((se=(J=g.getState()).isValidConnection)==null?void 0:se.call(J,...oe))??!0},onConnect:K,onConnectStart:ee,onConnectEnd:(...oe)=>{var J,se;return(se=(J=g.getState()).onConnectEnd)==null?void 0:se.call(J,...oe)},onReconnectEnd:z,updateConnection:H,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNo
1926de:x.currentTarget})},y=x=>v(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),b=x=>v(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),E=()=>h(!0),w=()=>h(!1);return F.jsxs(F.Fragment,{children:[(e===!0||e==="source")&&F.jsx(y8,{position:l,centerX:r,centerY:a,radius:t,onMouseDown:y,onMouseEnter:E,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&F.jsx(y8,{position:c,centerX:s,centerY:i,radius:t,onMouseDown:b,onMouseEnter:E,onMouseOut:w,type:"target"})]})}function i7e({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:s,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:m,onReconnectEnd:h,rfId:g,edgeTypes:v,noPanClassName:y,onError:b,disableKeyboardA11y:E}){let w=ra(he=>he.edgeLookup.get(e));const x=ra(he=>he.defaultEdgeOptions);w=x?{...x,...w}:w;let S=w.type||"default",N=(v==null?void 0:v[S])||p8[S];N===void 0&&(b==null||b("011",au.error011(S)),S="default",N=(v==null?void 0:v.default)||p8.default);const k=!!(w.focusable||t&&typeof w.focusable>"u"),C=typeof f<"u"&&(w.reconnectable||n&&typeof w.reconnectable>"u"),A=!!(w.selectable||r&&typeof w.selectable>"u"),O=p.useRef(null),[T,M]=p.useState(!1),[L,D]=p.useState(!1),j=Ua(),{zIndex:H,sourceX:Y,sourceY:z,targetX:K,targetY:ee,sourcePosition:oe,targetPosition:J}=ra(p.useCallback(he=>{const _e=he.nodeLookup.get(w.source),ie=he.nodeLookup.get(w.target);if(!_e||!ie)return{zIndex:w.zIndex,...g8};const Ue=FFe({id:e,sourceNode:_e,targetNode:ie,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:he.connectionMode,onError:b});return{zIndex:IFe({selected:w.selected,zIndex:w.zIndex,sourceNode:_e,targetNode:ie,elevateOnSelect:he.elevateEdgesOnSelect,zIndexMode:he.zIndexMode}),...Ue||g8}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Ja),se=p.useMemo(()=>w.markerStart?`url('#${AO(w.markerStart,g)}')`:void 0,[w.markerStart,g]),B=p.useMemo(()=>w.markerEnd?`url('#${AO(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||Y===null||z===null||K===null||ee===null)return null;const U=he=>{var ae;const{addSelectedEdges:_e,unselectNodesAndEdges:ie,multiSelectionActive:Ue}=j.getState();A&&(j.setState({nodesSelectionActive:!1}),w.selected&&Ue?(ie({nodes:[],edges:[w]}),(ae=O.current)==null||ae.blur()):_e([e])),a&&a(he,w)},$=s?he=>{s(he,{...w})}:void 0,ce=i?he=>{i(he,{...w})}:void 0,be=l?he=>{l(he,{...w})}:void 0,ue=c?he=>{c(he,{...w})}:void 0,Ie=u?he=>{u(he,{...w})}:void 0,Ae=he=>{var _e;if(!E&&xJ.includes(he.key)&&A){const{unselectNodesAndEdges:ie,addSelectedEdges:Ue}=j.getState();he.key==="Escape"?((_e=O.current)==null||_e.blur(),ie({edges:[w]})):Ue([e])}};return F.jsx("svg",{style:{zIndex:H},children:F.jsxs("g",{className:As(["react-flow__edge",`react-flow__edge-${S}`,w.className,y,{selected:w.selected,animated:w.animated,inactive:!A&&!a,updating:T,selectable:A}]),onClick:U,onDoubleClick:$,onContextMenu:ce,onMouseEnter:be,onMouseMove:ue,onMouseLeave:Ie,onKeyDown:k?Ae:void 0,tabIndex:k?0:void 0,role:w.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":k?`${see}-${g}`:void 0,ref:O,...w.domAttributes,children:[!L&&F.jsx(N,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:A,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:Y,sourceY:z,targetX:K,targetY:ee,sourcePosition:oe,targetPosition:J,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:se,markerEnd:B,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),C&&F.jsx(s7e,{edge:w,isReconnectable:C,reconnectRadius:d,onReconnect:f,onReconnectStart:m,onReconnectEnd:h,sourceX:Y,sourceY:z,targetX:K,targetY:ee,sourcePosition:oe,targetPosition:J,setUpdateHover:M,setReconnecting:D})]})})}var o7e=p.memo(i7e);const l7e=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Tee({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:s,onEdgeContextMenu:i,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:v}){const{edgesFocusable:y,edgesReconnectable:b,elementsSelectable:E,onError:w}=ra(l7e,Ja),x=G9e(t);return F.jsxs("div",{className:"react-flow__edges",children:[F.jsx(X9e,{defaultColor:e,rfId:n}),x.map(S=>F.jsx(o7e,{id:S,edgesFocusable:y,edgesReconnectable:b,elementsSelectable:E,noPanClassName:a,onReconnect:s,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:w,edgeTypes:r,disableKeyboardA11y:v},S))]})}Tee.displayName="EdgeRenderer";
1926const c7e=p.memo(Tee),u7e=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function d7e({children:e}){const t=ra(u7e);return F.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function f7e(e){const t=_S(),n=p.useRef(!1);p.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const m7e=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function h7e(e){const t=ra(m7e),n=Ua();return p.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function b8(e){return e.connection.inProgress?{...e.connection,to:Cb(e.connection.to,e.transform)}:{...e.connection}}function p7e(e){return e?n=>{const r=b8(n);return e(r)}:b8}function g7e(e){const t=p7e(e);return ra(t,Ja)}const v7e=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function y7e({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:s,height:i,isValid:l,inProgress:c}=ra(v7e,Ja);return!(s&&a&&c)?null:F.jsx("svg",{style:e,width:s,height:i,className:"react-flow__connectionline react-flow__container",children:F.jsx("g",{className:As(["react-flow__connection",SJ(l)]),children:F.jsx(Aee,{style:t,type:n,CustomComponent:r,isValid:l})})})}const Aee=({style:e,type:t=Td.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:s,fromNode:i,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:m,pointer:h}=g7e();if(!a)return;if(n)return F.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:m,connectionStatus:SJ(r),toNode:d,toHandle:f,pointer:h});let g="";const v={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:m};switch(t){case Td.Bezier:[g]=$J(v);break;case Td.SimpleBezier:[g]=vee(v);break;case Td.Step:[g]=TO({...v,borderRadius:0});break;case Td.SmoothStep:[g]=TO(v);break;default:[g]=HJ(v)}return F.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};Aee.displayName="ConnectionLine";const b7e={};function w8(e=b7e){p.useRef(e),Ua(),p.useEffect(()=>{},[e])}function w7e(){Ua(),p.useRef(!1),p.useEffect(()=>{},[])}function Iee({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:s,onEdgeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:m,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:v,connectionLineComponent:y,connectionLineContainerStyle:b,selectionKeyCode:E,selectionOnDrag:w,selectionMode:x,multiSelectionKeyCode:S,panActivationKeyCode:N,zoomActivationKeyCode:k,deleteKeyCode:C,onlyRenderVisibleElements:A,elementsSelectable:O,defaultViewport:T,translateExtent:M,minZoom:L,maxZoom:D,preventScrolling:j,defaultMarkerColor:H,zoomOnScroll:Y,zoomOnPinch:z,panOnScroll:K,panOnScrollSpeed:ee,panOnScrollMode:oe,zoomOnDoubleClick:J,panOnDrag:se,onPaneClick:B,onPaneMouseEnter:U,onPaneMouseMove:$,onPaneMouseLeave:ce,onPaneScroll:be,onPaneContextMenu:ue,paneClickDistance:Ie,nodeClickDistance:Ae,onEdgeContextMenu:he,onEdgeMouseEnter:_e,onEdgeMouseMove:ie,onEdgeMouseLeave:Ue,reconnectRadius:ae,onReconnect:pe,onReconnectStart:W,onReconnectEnd:q,noDragClassName:te,noWheelClassName:X,noPanClassName:le,disableKeyboardA11y:me,nodeExtent:fe,rfId:ke,viewport:Se,onViewportChange:Et}){return w8(e),w8(t),w7e(),f7e(n),h7e(Se),F.jsx(L9e,{onPaneClick:B,onPaneMouseEnter:U,onPaneMouseMove:$,onPaneMouseLeave:ce,onPaneContextMenu:ue,onPaneScroll:be,paneClickDistance:Ie,deleteKeyCode:C,selectionKeyCode:E,selectionOnDrag:w,selectionMode:x,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:S,panActivationKeyCode:N,zoomActivationKeyCode:k,elementsSelectable:O,zoomOnScroll:Y,zoomOnPinch:z,zoomOnDoubleClick:J,panOnScroll:K,panOnScrollSpeed:ee,panOnScrollMode:oe,panOnDrag:se,defaultViewport:T,translateExtent:M,minZoom:L,maxZoom:D,onSelectionContextMenu:f,preventScrolling:j,noDragClassName:te,noWheelClassName:X,noPanClassName:le,disableKeyboardA11y:me,onViewportChange:Et,isControlledViewport:!!Se,children:F.jsxs(d7e,{children:[F.jsx(c7e,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:i,onReconnect:pe,onReconnectStart:W,onReconnectEnd:q,onlyRenderVisibleElements:A,onEdgeContextMenu:he,onEdgeMouseEnter:_e,onEdgeMouseMove:ie,onEdgeMouseLeave:Ue,reconnectRadius:ae,defaultMarkerColor:H,noPanClassName:le,disableKeyboardA11y:me,rfId:ke}),F.jsx(y7e,{style:v,type:g,component:y,containerStyle:b}),F.jsx("div",{className:"react-flow__edgelabel-renderer"}),F.jsx(W9e,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:Ae,onlyRenderVisibleElements:A,noPanClassName:le,noDragClassName:te,disableKeyboardA11y:me,nodeExtent:fe,rfId:ke}),F.jsx("div",{className:"react-flow__viewport-portal"})]})})}Iee.displayName="GraphView";
1926const E7e=p.memo(Iee),E8=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:s,fitView:i,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f,zIndexMode:m="basic"}={})=>{const h=new Map,g=new Map,v=new Map,y=new Map,b=r??t??[],E=n??e??[],w=d??[0,0],x=f??vy;BJ(v,y,b);const S=IO(E,h,g,{nodeOrigin:w,nodeExtent:x,zIndexMode:m});let N=[0,0,1];if(i&&a&&s){const k=kb(h,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:C,y:A,zoom:O}=r4(k,a,s,c,u,(l==null?void 0:l.padding)??.1);N=[C,A,O]}return{rfId:"1",width:a??0,height:s??0,transform:N,nodes:E,nodesInitialized:S,nodeLookup:h,parentLookup:g,edges:b,edgeLookup:y,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:vy,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Jp.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:l,fitViewResolver:null,connection:{...kJ},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:SFe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:_J,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},x7e=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:s,fitView:i,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:m})=>V6e((h,g)=>{async function v(){const{nodeLookup:y,panZoom:b,fitViewOptions:E,fitViewResolver:w,width:x,height:S,minZoom:N,maxZoom:k}=g();b&&(await _Fe({nodes:y,width:x,height:S,panZoom:b,minZoom:N,maxZoom:k},E),w==null||w.resolve(!0),h({fitViewResolver:null}))}return{...E8({nodes:e,edges:t,width:a,height:s,fitView:i,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:m}),setNodes:y=>{const{nodeLookup:b,parentLookup:E,nodeOrigin:w,elevateNodesOnSelect:x,fitViewQueued:S,zIndexMode:N}=g(),k=IO(y,b,E,{nodeOrigin:w,nodeExtent:f,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:N});S&&k?(v(),h({nodes:y,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:y,nodesInitialized:k})},setEdges:y=>{const{connectionLookup:b,edgeLookup:E}=g();BJ(b,E,y),h({edges:y})},setDefaultNodesAndEdges:(y,b)=>{if(y){const{setNodes:E}=g();E(y),h({hasDefaultNodes:!0})}if(b){const{setEdges:E}=g();E(b),h({hasDefaultEdges:!0})}},updateNodeInternals:y=>{const{triggerNodeChanges:b,nodeLookup:E,parentLookup:w,domNode:x,nodeOrigin:S,nodeExtent:N,debug:k,fitViewQueued:C,zIndexMode:A}=g(),{changes:O,updatedInternals:T}=GFe(y,E,w,x,S,N,A);T&&(UFe(E,w,{nodeOrigin:S,nodeExtent:N,zIndexMode:A}),C?(v(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(O==null?void 0:O.length)>0&&(b==null||b(O)))},updateNodePositions:(y,b=!1)=>{const E=[];let w=[];const{nodeLookup:x,triggerNodeChanges:S,connection:N,updateConnection:k,onNodesChangeMiddlewareMap:C}=g();for(const[A,O]of y){const T=x.get(A),M=!!(T!=null&&T.expandParent&&(T!=null&&T.parentId)&&(O!=null&&O.position)),L={id:A,type:"position",position:M?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:b};if(T&&N.inProgress&&N.fromNode.id===T.id){const D=Mm(T,N.fromHandle,Xn.Left,!0);k({...N,from:D})}M&&T.parentId&&E.push({id:A,parentId:T.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),w.push(L)}if(E.length>0){const{parentLookup:A,nodeOrigin:O}=g(),T=c4(E,x,A,O);w.push(...T)}for(const A of C.values())w=A(w);S(w)},triggerNodeChanges:y=>{const{onNodesChange:b,setNodes:E,nodes:w,hasDefaultNodes:x,debug:S}=g();if(y!=null&&y.length){if(x){const N=u4(y,w);E(N)}b==null||b(y)}},triggerEdgeChanges:y=>{const{onEdgesChange:b,setEdges:E,edges:w,hasDefaultEdges:x,debug:S}=g();if(y!=null&&y.length){if(x){const N=d4(y,w);E(N)}b==null||b(y)}},addSelectedNodes:y=>{const{multiSelectionActive:b,edgeLookup:E,nodeLookup:w,triggerNodeChanges:x,triggerEdgeChanges:S}=g();if(b){const N=y.map(k=>Pf(k,!0));x(N);return}x(Lh(w,new Set([...y]),!0)),S(Lh(E))},addSelectedEdges:y=>{const{multiSelectionActive:b,edgeLookup:E,nodeLookup:w,triggerNodeChanges:x,triggerEdgeChanges:S}=g();if(b){const N=y.map(k=>Pf(k,!0));S(N);return}S(Lh(E,new Set([...y]))),x(Lh(w,new Set,!0))},unselectNodesAndEdges:({nodes:y,edges:b}={})=>{const{edges:E,nodes:w,nodeLookup:x,triggerNodeChanges:S,triggerEdgeChanges:N}=g(),k=y||w,C=b||E,A=[];for(const T of k){if(!T.selected)continue;const M=x.get(T.id);M&&(M.selected=!1),A.push(Pf(T.id,!1))}const O=[];for(const T of C)T.selected&&O.push(Pf(T.id,!1));S(A),N(O)},setMinZoom:y=>
1926{const{panZoom:b,maxZoom:E}=g();b==null||b.setScaleExtent([y,E]),h({minZoom:y})},setMaxZoom:y=>{const{panZoom:b,minZoom:E}=g();b==null||b.setScaleExtent([E,y]),h({maxZoom:y})},setTranslateExtent:y=>{var b;(b=g().panZoom)==null||b.setTranslateExtent(y),h({translateExtent:y})},resetSelectedElements:()=>{const{edges:y,nodes:b,triggerNodeChanges:E,triggerEdgeChanges:w,elementsSelectable:x}=g();if(!x)return;const S=b.reduce((k,C)=>C.selected?[...k,Pf(C.id,!1)]:k,[]),N=y.reduce((k,C)=>C.selected?[...k,Pf(C.id,!1)]:k,[]);E(S),w(N)},setNodeExtent:y=>{const{nodes:b,nodeLookup:E,parentLookup:w,nodeOrigin:x,elevateNodesOnSelect:S,nodeExtent:N,zIndexMode:k}=g();y[0][0]===N[0][0]&&y[0][1]===N[0][1]&&y[1][0]===N[1][0]&&y[1][1]===N[1][1]||(IO(b,E,w,{nodeOrigin:x,nodeExtent:y,elevateNodesOnSelect:S,checkEquality:!1,zIndexMode:k}),h({nodeExtent:y}))},panBy:y=>{const{transform:b,width:E,height:w,panZoom:x,translateExtent:S}=g();return qFe({delta:y,panZoom:x,transform:b,translateExtent:S,width:E,height:w})},setCenter:async(y,b,E)=>{const{width:w,height:x,maxZoom:S,panZoom:N}=g();if(!N)return Promise.resolve(!1);const k=typeof(E==null?void 0:E.zoom)<"u"?E.zoom:S;return await N.setViewport({x:w/2-y*k,y:x/2-b*k,zoom:k},{duration:E==null?void 0:E.duration,ease:E==null?void 0:E.ease,interpolate:E==null?void 0:E.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...kJ}})},updateConnection:y=>{h({connection:y})},reset:()=>h({...E8()})}},Object.is);function _7e({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:s,initialMinZoom:i,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,zIndexMode:m,children:h}){const[g]=p.useState(()=>x7e({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:s,fitView:u,minZoom:i,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f,zIndexMode:m}));return F.jsx(U6e,{value:g,children:F.jsx(d9e,{children:h})})}function k7e({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:s,height:i,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:m,zIndexMode:h}){return p.useContext(ES)?F.jsx(F.Fragment,{children:e}):F.jsx(_7e,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:s,initialHeight:i,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:m,zIndexMode:h,children:e})}const S7e={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function C7e({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:s,edgeTypes:i,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:m,onConnect:h,onConnectStart:g,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:b,onNodeMouseEnter:E,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:N,onNodeDragStart:k,onNodeDrag:C,onNodeDragStop:A,onNodesDelete:O,onEdgesDelete:T,onDelete:M,onSelectionChange:L,onSelectionDragStart:D,onSelectionDrag:j,onSelectionDragStop:H,onSelectionContextMenu:Y,onSelectionStart:z,onSelectionEnd:K,onBeforeDelete:ee,connectionMode:oe,connectionLineType:J=Td.Bezier,connectionLineStyle:se,connectionLineComponent:B,connectionLineContainerStyle:U,deleteKeyCode:$="Backspace",selectionKeyCode:ce="Shift",selectionOnDrag:be=!1,selectionMode:ue=yy.Full,panActivationKeyCode:Ie="Space",multiSelectionKeyCode:Ae=wy()?"Meta":"Control",zoomActivationKeyCode:he=wy()?"Meta":"Control",snapToGrid:_e,snapGrid:ie,onlyRenderVisibleElements:Ue=!1,selectNodesOnDrag:ae,nodesDraggable:pe,autoPanOnNodeFocus:W,nodesConnectable:q,nodesFocusable:te,nodeOrigin:X=iee,edgesFocusable:le,edgesReconnectable:me,elementsSelectable:fe=!0,defaultViewport:ke=t9e,minZoom:Se=.5,maxZoom:Et=2,translateExtent:nt=vy,preventScrolling:Pt=!0,nodeExtent:en,defaultMarkerColor:hn="#b1b1b7",zoomOnScroll:rt=!0,zoomOnPinch:et=!0,panOnScroll:Kt=!1,panOnScrollSpeed:zn=.5,panOnScrollMode:xt=cm.Free,zoomOnDoubleClick:rr=!0,panOnDrag:ir=!0,onPaneClick:Tn,onPaneMouseEnter:Ct,onPaneMouseMove:_r,onPaneMouseLeave:Qn,onPaneScroll:Ce,onPaneContextMenu:ut,paneClickDistance:pn=1,nodeClickDistance:Jt=0,children:In,onReconnect:Dn,onReconnectStart:or,onReconnectEnd:Zt,onEdgeContextMenu:tr,onEdgeDoubleClick:Fe,onEdgeMouseEnter:st,onEdgeMouseMove:gt,onEdgeMouseLeave:ht,reconnectRadius:Ee=10,onNodesChange:We,onEdgesChange:it,noDragClassName:_t="nodrag",noWheelClassName:vn="nowheel",noPanClassName:An="nopan",fitView:je,fitViewOptions:kt,connectOnClick:Lt,attributionPosition:ne,proOptions:Be,defaultEdgeOptions:mt,elevateNodesOnSelect:we=!0,elevateEdgesOnSelect:vt=!1,disableKeyboardA11y:It=!1,autoPanOnConnect:fn,autoPanOnNodeDrag:Ne,autoPanSpeed:lt,connectionRadius:wt,isValidConnection:Ke,onError:St,style:ln,id:vr,nodeDragThreshold:Yn,c
1926onnectionDragThreshold:Cn,viewport:Hn,onViewportChange:Re,width:ot,height:jt,colorMode:En="light",debug:ar,onScroll:ye,ariaLabelConfig:qe,zIndexMode:Me="basic",...Ve},Je){const bt=vr||"1",$e=s9e(En),dt=p.useCallback(Rt=>{Rt.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ye==null||ye(Rt)},[ye]);return F.jsx("div",{"data-testid":"rf__wrapper",...Ve,onScroll:dt,style:{...ln,...S7e},ref:Je,className:As(["react-flow",a,$e]),id:vr,role:"application",children:F.jsxs(k7e,{nodes:e,edges:t,width:ot,height:jt,fitView:je,fitViewOptions:kt,minZoom:Se,maxZoom:Et,nodeOrigin:X,nodeExtent:en,zIndexMode:Me,children:[F.jsx(E7e,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:E,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:N,nodeTypes:s,edgeTypes:i,connectionLineType:J,connectionLineStyle:se,connectionLineComponent:B,connectionLineContainerStyle:U,selectionKeyCode:ce,selectionOnDrag:be,selectionMode:ue,deleteKeyCode:$,multiSelectionKeyCode:Ae,panActivationKeyCode:Ie,zoomActivationKeyCode:he,onlyRenderVisibleElements:Ue,defaultViewport:ke,translateExtent:nt,minZoom:Se,maxZoom:Et,preventScrolling:Pt,zoomOnScroll:rt,zoomOnPinch:et,zoomOnDoubleClick:rr,panOnScroll:Kt,panOnScrollSpeed:zn,panOnScrollMode:xt,panOnDrag:ir,onPaneClick:Tn,onPaneMouseEnter:Ct,onPaneMouseMove:_r,onPaneMouseLeave:Qn,onPaneScroll:Ce,onPaneContextMenu:ut,paneClickDistance:pn,nodeClickDistance:Jt,onSelectionContextMenu:Y,onSelectionStart:z,onSelectionEnd:K,onReconnect:Dn,onReconnectStart:or,onReconnectEnd:Zt,onEdgeContextMenu:tr,onEdgeDoubleClick:Fe,onEdgeMouseEnter:st,onEdgeMouseMove:gt,onEdgeMouseLeave:ht,reconnectRadius:Ee,defaultMarkerColor:hn,noDragClassName:_t,noWheelClassName:vn,noPanClassName:An,rfId:bt,disableKeyboardA11y:It,nodeExtent:en,viewport:Hn,onViewportChange:Re}),F.jsx(a9e,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:g,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:b,nodesDraggable:pe,autoPanOnNodeFocus:W,nodesConnectable:q,nodesFocusable:te,edgesFocusable:le,edgesReconnectable:me,elementsSelectable:fe,elevateNodesOnSelect:we,elevateEdgesOnSelect:vt,minZoom:Se,maxZoom:Et,nodeExtent:en,onNodesChange:We,onEdgesChange:it,snapToGrid:_e,snapGrid:ie,connectionMode:oe,translateExtent:nt,connectOnClick:Lt,defaultEdgeOptions:mt,fitView:je,fitViewOptions:kt,onNodesDelete:O,onEdgesDelete:T,onDelete:M,onNodeDragStart:k,onNodeDrag:C,onNodeDragStop:A,onSelectionDrag:j,onSelectionDragStart:D,onSelectionDragStop:H,onMove:d,onMoveStart:f,onMoveEnd:m,noPanClassName:An,nodeOrigin:X,rfId:bt,autoPanOnConnect:fn,autoPanOnNodeDrag:Ne,autoPanSpeed:lt,onError:St,connectionRadius:wt,isValidConnection:Ke,selectNodesOnDrag:ae,nodeDragThreshold:Yn,connectionDragThreshold:Cn,onBeforeDelete:ee,debug:ar,ariaLabelConfig:qe,zIndexMode:Me}),F.jsx(e9e,{onSelectionChange:L}),In,F.jsx(K6e,{proOptions:Be,position:ne}),F.jsx(Y6e,{rfId:bt,disableKeyboardA11y:It})]})})}var Oee=lee(C7e);function N7e(){const e=Ua();return p.useCallback(t=>{const{domNode:n,updateNodeInternals:r}=e.getState(),a=Array.isArray(t)?t:[t],s=new Map;a.forEach(i=>{const l=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${i}"]`);l&&s.set(i,{id:i,nodeElement:l,force:!0})}),requestAnimationFrame(()=>r(s,{triggerFitView:!1}))},[])}function R7e(e){const[t,n]=p.useState(e),r=p.useCallback(a=>n(s=>u4(a,s)),[]);return[t,n,r]}function T7e(e){const[t,n]=p.useState(e),r=p.useCallback(a=>n(s=>d4(a,s)),[]);return[t,n,r]}function A7e({dimensions:e,lineWidth:t,variant:n,className:r}){return F.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:As(["react-flow__background-pattern",n,r])})}function I7e({radius:e,className:t}){return F.jsx("circle",{cx:e,cy:e,r:e,className:As(["react-flow__background-pattern","dots",t])})}var Wd;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Wd||(Wd={}));const O7e={[Wd.Dots]:1,[Wd.Lines]:1,[Wd.Cross]:6},M7e=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Mee({id:e,variant:t=Wd.Dots,gap:n=20,size:r,lineWidth:a=1,offset:s=0,color:i,bgColor:l,style:c,className:u,patternClassName:d}){const f=p.useRef(null),{transform:m,patternId:h}=ra(M7e,Ja),g=r||O7e[t],v=t===Wd.Dots,y=t===Wd.Cross,b=Array.isArray(n)?n:[n,n],E=[b[0]*m[2]||1,b[1]*m[2]||1],w=g*m[2],x=Array.isArray(s)?s:[s,s],S=y?[w,w]:E,N=[x[0]*m[2]||1+S[0]/2,x[1]*m[2]||1+S[1]/2],k=`${h}${e||""}`;return F.jsxs("svg",{className:As(["react-flow__background",u]),style:{...c,...kS,"--xy-background-color-props":l,"--xy-background-pattern-color-props":i},ref:f,"data-testid":"rf__background",children:[F.jsx("pattern",{id:k,x:m[0]%E[0],y:m[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:v?F.jsx(I7e,{radius:w/2,className:d}):F.jsx(A7e,{dimensions:S,lineWidth:a,variant:t,className:d})}),F.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}
1926Mee.displayName="Background";const Pee=p.memo(Mee);function P7e(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:F.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function D7e(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:F.jsx("path",{d:"M0 0h32v4.2H0z"})})}function L7e(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:F.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function $7e(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function F7e(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function V1({children:e,className:t,...n}){return F.jsx("button",{type:"button",className:As(["react-flow__controls-button",t]),...n,children:e})}const z7e=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Dee({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:s,onZoomOut:i,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:m="vertical","aria-label":h}){const g=Ua(),{isInteractive:v,minZoomReached:y,maxZoomReached:b,ariaLabelConfig:E}=ra(z7e,Ja),{zoomIn:w,zoomOut:x,fitView:S}=_S(),N=()=>{w(),s==null||s()},k=()=>{x(),i==null||i()},C=()=>{S(a),l==null||l()},A=()=>{g.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),c==null||c(!v)},O=m==="horizontal"?"horizontal":"vertical";return F.jsxs(xS,{className:As(["react-flow__controls",O,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??E["controls.ariaLabel"],children:[t&&F.jsxs(F.Fragment,{children:[F.jsx(V1,{onClick:N,className:"react-flow__controls-zoomin",title:E["controls.zoomIn.ariaLabel"],"aria-label":E["controls.zoomIn.ariaLabel"],disabled:b,children:F.jsx(P7e,{})}),F.jsx(V1,{onClick:k,className:"react-flow__controls-zoomout",title:E["controls.zoomOut.ariaLabel"],"aria-label":E["controls.zoomOut.ariaLabel"],disabled:y,children:F.jsx(D7e,{})})]}),n&&F.jsx(V1,{className:"react-flow__controls-fitview",onClick:C,title:E["controls.fitView.ariaLabel"],"aria-label":E["controls.fitView.ariaLabel"],children:F.jsx(L7e,{})}),r&&F.jsx(V1,{className:"react-flow__controls-interactive",onClick:A,title:E["controls.interactive.ariaLabel"],"aria-label":E["controls.interactive.ariaLabel"],children:v?F.jsx(F7e,{}):F.jsx($7e,{})}),d]})}Dee.displayName="Controls";const Lee=p.memo(Dee);function H7e({id:e,x:t,y:n,width:r,height:a,style:s,color:i,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:m,onClick:h}){const{background:g,backgroundColor:v}=s||{},y=i||g||v;return F.jsx("rect",{className:As(["react-flow__minimap-node",{selected:m},u]),x:t,y:n,rx:d,ry:d,width:r,height:a,style:{fill:y,stroke:l,strokeWidth:c},shapeRendering:f,onClick:h?b=>h(b,e):void 0})}const V7e=p.memo(H7e),U7e=e=>e.nodes.map(t=>
1926t.id),Q2=e=>e instanceof Function?e:()=>e;function B7e({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:s=V7e,onClick:i}){const l=ra(U7e,Ja),c=Q2(t),u=Q2(e),d=Q2(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return F.jsx(F.Fragment,{children:l.map(m=>F.jsx(W7e,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:s,onClick:i,shapeRendering:f},m))})}function j7e({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:s,shapeRendering:i,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:m,height:h}=ra(g=>{const v=g.nodeLookup.get(e);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const y=v.internals.userNode,{x:b,y:E}=v.internals.positionAbsolute,{width:w,height:x}=pd(y);return{node:y,x:b,y:E,width:w,height:x}},Ja);return!u||u.hidden||!IJ(u)?null:F.jsx(l,{x:d,y:f,width:m,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:a,strokeColor:n(u),strokeWidth:s,shapeRendering:i,onClick:c,id:u.id})}const W7e=p.memo(j7e);var G7e=p.memo(B7e);const q7e=200,Y7e=150,K7e=e=>!e.hidden,Z7e=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?AJ(kb(e.nodeLookup,{filter:K7e}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},X7e="react-flow__minimap-desc";function $ee({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:s=5,nodeStrokeWidth:i,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:m="bottom-right",onClick:h,onNodeClick:g,pannable:v=!1,zoomable:y=!1,ariaLabel:b,inversePan:E,zoomStep:w=1,offsetScale:x=5}){const S=Ua(),N=p.useRef(null),{boundingRect:k,viewBB:C,rfId:A,panZoom:O,translateExtent:T,flowWidth:M,flowHeight:L,ariaLabelConfig:D}=ra(Z7e,Ja),j=(e==null?void 0:e.width)??q7e,H=(e==null?void 0:e.height)??Y7e,Y=k.width/j,z=k.height/H,K=Math.max(Y,z),ee=K*j,oe=K*H,J=x*K,se=k.x-(ee-k.width)/2-J,B=k.y-(oe-k.height)/2-J,U=ee+J*2,$=oe+J*2,ce=`${X7e}-${A}`,be=p.useRef(0),ue=p.useRef();be.current=K,p.useEffect(()=>{if(N.current&&O)return ue.current=n6e({domNode:N.current,panZoom:O,getTransform:()=>S.getState().transform,getViewScale:()=>be.current}),()=>{var _e;(_e=ue.current)==null||_e.destroy()}},[O]),p.useEffect(()=>{var _e;(_e=ue.current)==null||_e.update({translateExtent:T,width:M,height:L,inversePan:E,pannable:v,zoomStep:w,zoomable:y})},[v,y,E,w,T,M,L]);const Ie=h?_e=>{var ae;const[ie,Ue]=((ae=ue.current)==null?void 0:ae.pointer(_e))||[0,0];h(_e,{x:ie,y:Ue})}:void 0,Ae=g?p.useCallback((_e,ie)=>{const Ue=S.getState().nodeLookup.get(ie).internals.userNode;g(_e,Ue)},[]):void 0,he=b??D["minimap.ariaLabel"];return F.jsx(xS,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*K:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof i=="number"?i:void 0},className:As(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:F.jsxs("svg",{width:j,height:H,viewBox:`${se} ${B} ${U} ${$}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ce,ref:N,onClick:Ie,children:[he&&F.jsx("title",{id:ce,children:he}),F.jsx(G7e,{onClick:Ae,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:a,nodeStrokeWidth:i,nodeComponent:l}),F.jsx("path",{className:"react-flow__minimap-mask",d:`M${se-J},${B-J}h${U+J*2}v${$+J*2}h${-U-J*2}z 1927 M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}$ee.displayName="MiniMap";const Q7e=p.memo($ee),J7e=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,e8e={[rg.Line]:"right",[rg.Handle]:"bottom-right"};
1927function t8e({nodeId:e,position:t,variant:n=rg.Handle,className:r,style:a=void 0,children:s,color:i,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:m,autoScale:h=!0,shouldResize:g,onResizeStart:v,onResize:y,onResizeEnd:b}){const E=fee(),w=typeof e=="string"?e:E,x=Ua(),S=p.useRef(null),N=n===rg.Handle,k=ra(p.useCallback(J7e(N&&h),[N,h]),Ja),C=p.useRef(null),A=t??e8e[n];p.useEffect(()=>{if(!(!S.current||!w))return C.current||(C.current=g6e({domNode:S.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:T,transform:M,snapGrid:L,snapToGrid:D,nodeOrigin:j,domNode:H}=x.getState();return{nodeLookup:T,transform:M,snapGrid:L,snapToGrid:D,nodeOrigin:j,paneDomNode:H}},onChange:(T,M)=>{const{triggerNodeChanges:L,nodeLookup:D,parentLookup:j,nodeOrigin:H}=x.getState(),Y=[],z={x:T.x,y:T.y},K=D.get(w);if(K&&K.expandParent&&K.parentId){const ee=K.origin??H,oe=T.width??K.measured.width??0,J=T.height??K.measured.height??0,se={id:K.id,parentId:K.parentId,rect:{width:oe,height:J,...OJ({x:T.x??K.position.x,y:T.y??K.position.y},{width:oe,height:J},K.parentId,D,ee)}},B=c4([se],D,j,H);Y.push(...B),z.x=T.x?Math.max(ee[0]*oe,T.x):void 0,z.y=T.y?Math.max(ee[1]*J,T.y):void 0}if(z.x!==void 0&&z.y!==void 0){const ee={id:w,type:"position",position:{...z}};Y.push(ee)}if(T.width!==void 0&&T.height!==void 0){const oe={id:w,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:T.width,height:T.height}};Y.push(oe)}for(const ee of M){const oe={...ee,type:"position"};Y.push(oe)}L(Y)},onEnd:({width:T,height:M})=>{const L={id:w,type:"dimensions",resizing:!1,dimensions:{width:T,height:M}};x.getState().triggerNodeChanges([L])}})),C.current.update({controlPosition:A,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:m,onResizeStart:v,onResize:y,onResizeEnd:b,shouldResize:g}),()=>{var T;(T=C.current)==null||T.destroy()}},[A,l,c,u,d,f,v,y,b,g]);const O=A.split("-");return F.jsx("div",{className:As(["react-flow__resize-control","nodrag",...O,n,r]),ref:S,style:{...a,scale:k,...i&&{[N?"backgroundColor":"borderColor"]:i}},children:s})}const n8e=p.memo(t8e);const Fee=({teamID:e,onSelectBookmark:t,currentBookmarks:n=[],paneClickCount:r})=>{const[a,s]=p.useState(!1),[i,l]=p.useState(""),[c,u]=p.useState([]),[d,f]=p.useState(!1),[m,h]=p.useState("updated"),g=p.useRef(null),[v,y]=p.useState(!1),b=ll();p.useEffect(()=>{r>0&&s(!1)},[r]),p.useEffect(()=>{if(v){const N=k=>{var O;const{actionType:C,asset:A}=k.detail||{};if(C==="add"&&A){const T=((O=A.active_iteration)==null?void 0:O.url)||A.url||"";t({assetID:A.$id,name:A.name||T,url:T}),s(!1),y(!1)}};return document.addEventListener("sidepanel-asset-saved",N),()=>{document.removeEventListener("sidepanel-asset-saved",N)}}},[v,t]);const E=async()=>{f(!0);try{const N={filters:[]};e&&N.filters.push({type:"match",key:"$team_id",value:e});const C=(await Qe.$dexie.action.get({tableID:"Assets-General-All",options:N})||[]).filter(A=>!A._is_deleted);u(C)}catch(N){console.warn("Could not load bookmarks from local DB",N),u([])}finally{f(!1)}};p.useEffect(()=>{a&&(l(""),E(),setTimeout(()=>{var N;return(N=g.current)==null?void 0:N.focus()},50))},[a]);const w=()=>{y(!0),re.dispatch("open-side-panel",{targetType:"AddAsset",...e?{targetAssetItem:{$team_id:e}}:{}})},S=[...c.filter(N=>{var A,O;if(!i)return!0;const k=i.toLowerCase(),C=((A=N.active_iteration)==null?void 0:A.url)||N.url||"";return((O=N.name)==null?void 0:O.toLowerCase().includes(k))||C.toLowerCase().includes(k)})].sort((N,k)=>{switch(m){case"viewed":return(k.date_viewed||0)>(N.date_viewed||0)?1:-1;case"favorites":return(k.is_favorited?1:0)-(N.is_favorited?1:0);case"name":return(N.name||"").localeCompare(k.name||"");case"updated":default:return(k.date_modified||0)>(N.date_modified||0)?1:-1}});return o.createElement(Hr,{isOpen:a,onClose:()=>s(!1),onInteraction:N=>s(N),position:"bottom-left",enforceFocus:!1,minimal:!0,className:"attached-bookmarks",popoverClassName:b?Xr:void 0,content:o.createElement("div",{className:"attached-bookmarks__content"},(c.length>0||d||i)&&o.createElement(Cs,{inputRef:g,placeholder:"Find",value:i,onChange:N=>l(N.target.value),className:"attached-bookmarks__search",rightElement:i?o.createElement(De,{variant:"minimal",icon:"cross",onClick:()=>l("")}):void 0}),o.createElement("div",{className:"attached-bookmarks-content max-h-52 overflow-y-auto"},d?o.createElement("div",{className:"attached-bookmarks-content__loading flex justify-center p-3"},o.createElement(os,{size:16})):S.length>0?o.createElement("div",{className:"attached-bookmarks-content__menu"},o.createElement("div",{className:"attached-bookmarks-content__sort flex justify-between"},o.createElement("div",{className:"gap-2 px-2 pr-4"},o.createElement(De,{variant:"minimal",text:"Updated",className:m==="updated"?"active":"",onClick:()=>h("updated")}),o.createElement(De,{variant:"minimal",text:"Viewed",className:m==="viewed"?"active":"",onClick:()=>h("viewed")}),o.createElement(De,{variant:"minimal",text:"Favorites",className:m==="favorites"?"active":"",onClick:()=>h("favorites")}),o.createElement(De,{variant:"minimal",text:"Name",className:"pr-4"})),o.createElement(De,{variant:"minimal",icon:o.createElement(zs,{size:16}),className:"mr-2",onClick:w})),o.createElement(Es,null),o.createElement(Cr,{className:"attached-bookmarks-content__items"},S.slice(0,30).map(N=>{var O;const k=((O=N.active_iteration)==null?void 0:O.url)||N.url||"";let C="";try{C=k?new URL(k).hostname:""}catch{}const A=n.some(T=>T.assetID===N.$id);return o.createElement(Bt,{key:N.$id,disabled:A,className:A?"selected-node-bookmark":"",onClick:()=>{A||(t({assetID:N.$id,name:N.name||k,url:k}),s(!1),l(""))},text:o.createElement("div",{className:"flex flex-col text-left overflow-hidden min-w-0 flex-1 pr-2"},o.createElement("span",{className:"text-sm font-medium truncate w-full block"},N.name||k),o.createElement("span",{className:"text-xs text-gray-500 truncate w-full block"},C)),labelElement:A?void 0:o.createElement(Ft,{icon:o.createElement(oIe,{size:16}),className:"text-gray-400 shrink-0"})})}))):o.createElement("div",{className:"flex flex-row items-center justify-between text-sm text-gray-500 text-center px-3 py-2"},o.createElement("p",null,i?"No matching bookmarks.":"No bookmarks found."),!i&&o.createElement(De,{intent:"primary",variant:"minimal",onClick:w,text:"Add bookmark",className:"w-auto"}))))},o.createElement(De,{icon:o.createElement(zs,{size:14,viewBox:"0 0 20 24",className:"mr-1"}),text:"Attach",variant:"minimal",className:"attach-bookmark-button w-full justify-start text-xs text-gray-600 dark:text-gray-400 nodrag"}))},r8e=p.memo(({assetID:e,fallbackName:t,fallbackUrl:n,onRemove:r,isPublic:a})=>{var f;const[s,i]=p.useState(!1),l=Xo(async()=>{var m;return(m=Qe==null?void 0:Qe.base)!=null&&m.isOpen()?await Qe.base.table("Assets-General-All").get(e):null},[e]);if(l&&l._is_deleted)return null;const c=(l==null?void 0:l.name)||(l==null?void 0:l.title)||t||n,u=((f=l==null?void 0:l.active_iteration)==null?void 0:f.url)||(l==null?void 0:l.url)||n,d=m=>{m.stopPropagation(),u&&(m.preventDefault(),window.open(u,"_blank","noopener,noreferrer"))};return o.createElement("div",{className:"flex items-center gap-1 overflow-hidden group/bm nodrag nopan",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1)}
1927,s&&!a?o.createElement(Ft,{icon:"cross",size:10,className:"flex-shrink-0 cursor-pointer text-red-400 hover:text-red-600",onClick:m=>{m.stopPropagation(),r&&r(e)}}):o.createElement(Ft,{icon:o.createElement(tf,{size:12}),className:"flex-shrink-0"}),o.createElement("a",{href:u||void 0,target:"_blank",rel:"noopener noreferrer",className:"truncate text-blue-600 hover:underline",title:u,onMouseDown:m=>m.stopPropagation(),onClick:d},c))}),a8e=({id:e,data:t,isConnectable:n,positionAbsoluteX:r,positionAbsoluteY:a})=>{const[s,i]=p.useState(!1),[l,c]=p.useState(t.label||"Page"),[u,d]=p.useState(!1),[f,m]=p.useState(!1),[h,g]=p.useState(!1),[v,y]=p.useState(!1),b=p.useRef(null),E=N7e();p.useEffect(()=>{E(e)},[t.layoutDirection,e,E]),p.useEffect(()=>{if(!f)return;const T=M=>{var j;const L=(j=b.current)==null?void 0:j.contains(M.target),D=M.target.closest(".bp5-popover, .bp5-menu, .bp5-overlay-content, .bp6-popover, .bp6-menu, .bp6-overlay-content");!L&&!D&&m(!1)};return document.addEventListener("mousedown",T,!0),()=>document.removeEventListener("mousedown",T,!0)},[f]);const w=()=>{i(!1),t.onUpdateNode&&l!==t.label&&t.onUpdateNode(e,{label:l})},x=T=>{const M=k.filter(L=>L.assetID!==T);t.onUpdateNode&&t.onUpdateNode(e,{bookmarks:M})},S=T=>{const M=Array.isArray(t.bookmarks)?t.bookmarks:[];if(!M.find(L=>L.assetID===T.assetID)){const L=[...M,{assetID:T.assetID,name:T.name,url:T.url||""}];t.onUpdateNode&&t.onUpdateNode(e,{bookmarks:L})}},N=Array.isArray(t.bookmarks)?t.bookmarks:[];p.useEffect(()=>{let T=!1;const M=N.map(L=>{if(L.assetID&&L.assetID.startsWith("temp-"))try{const D=localStorage.getItem(`map_temp_resolve_${L.assetID}`);if(D)return T=!0,{...L,assetID:D}}catch{}return L});T&&t.onUpdateNode&&setTimeout(()=>{t.onUpdateNode(e,{bookmarks:M})},0)},[N,t.onUpdateNode,e]);const k=N,C=t.editingBy,A=t.isOptimistic,O=t.layoutDirection==="LR";return o.createElement("div",{className:"relative w-full h-full !overflow-visible",style:{paddingTop:C?10:0,opacity:A?.65:1},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)},C&&o.createElement("div",{className:"absolute top-0 left-2 text-[10px] font-semibold text-white px-1.5 py-0.5 rounded-full z-10 whitespace-nowrap",style:{backgroundColor:C.color}},C.displayName),o.createElement(jn,{elevation:qn.TWO,className:"map-node-item w-full h-full p-0 overflow-hidden relative flex flex-col"},o.createElement("div",{className:`map-node-item__header px-2 py-1 flex items-center justify-between border-b dark:border-gray-700 ${t.isPublic?"cursor-grab active:cursor-grabbing":"cursor-move"}`},s?o.createElement(Cs,{value:l,onChange:T=>c(T.target.value),onKeyDown:T=>{T.key==="Enter"&&w(),T.key==="Escape"&&(c(t.label||"Page"),i(!1))},onBlur:w,autoFocus:!0,className:"text-sm"}):o.createElement("div",{className:"text-sm font-semibold truncate flex-grow",onDoubleClick:()=>i(!0)},t.label||"Page"),!t.isPublic&&o.createElement(Hr,{isOpen:f,onClose:()=>m(!1),content:o.createElement(Cr,null,o.createElement(Bt,{text:"Edit label",icon:o.createElement(eu,{size:16}),onClick:()=>{m(!1),requestAnimationFrame(()=>i(!0))}}),o.createElement(Bt,{text:"Add child",icon:o.createElement(ay,{size:16}),onClick:()=>{m(!1),t.onAddChildNode&&t.onAddChildNode(e,{x:r,y:a})}}),o.createElement(Bt,{text:"Delete",icon:o.createElement(tu,{size:16}),onClick:()=>{m(!1),g(!0)}}))},o.createElement(De,{elementRef:b,icon:o.createElement(Pg,{size:16}),variant:"minimal",className:"ml-1 nodrag text-gray-500 dark__text",onClick:()=>m(T=>!T),style:{visibility:u||f?"visible":"hidden"}}))),o.createElement("div",{className:"map-node-item__content flex-auto min-h-0 p-2 overflow-auto cursor-default nodrag"},k.length>0&&o.createElement("div",{className:"text-xs text-gray-500 space-y-1"},k.map((T,M)=>o.createElement(r8e,{key:T.assetID||M,assetID:T.assetID,fallbackName:T.name,fallbackUrl:T.url,onRemove:x,isPublic:t.isPublic}))),!t.isPublic&&o.createElement("div",{className:"BookmarkPicker-trigger"},!A&&o.createElement(Fee,{teamID:t.teamID,currentBookmarks:k,onSelectBookmark:S,paneClickCount:t.paneClickCount})),A&&o.createElement("div",{className:"flex items-center gap-1 text-xs text-gray-400 dark:text-gray-500 pt-1"},o.createElement(os,{size:10})))),o.createElement(sg,{type:"target",position:O?Xn.Left:Xn.Top,isConnectable:n,className:"react-flow__handle nodrag nopan target connectable",style:t.isPublic?{opacity:0,pointerEvents:"none"}:void 0}),o.createElement(sg,{type:"source",position:O?Xn.Right:Xn.Bottom,isConnectable:n,className:"react-flow__handle nodrag nopan source connectable",style:t.isPublic?{opacity:0,pointerEvents:"none"}:void 0}),!A&&!t.isPublic&&o.createElement(n8e,{minWidth:180,minHeight:80,resizeDirection:"horizontal",autoScale:!1,onResizeStart:()=>y(!0),onResizeEnd:(T,{width:M})=>{y(!1),t.onResizeNode&&t.onResizeNode(e,M)},style:{background:"transparent",border:"none",padding:0,opacity:u||v?1:0,pointerEvents:u||v?"auto":"none",transition:"opacity 0.2s",bottom:"0px",right:"0px",position:"absolute",zIndex:100}},o.createElement(De,{icon:o.createElement(Ft,{icon:"maximize",size:12,className:"text-gray-500 rotate-45"}),size:"small",variant:"minimal",style:{minWidth:24,minHeight:24,padding:0}})),o.createElement(ya,{isOpen:h,onClose:()=>g(!1),title:"Delete Node",style:{width:"400px"}},o.createElement("div",{className:"bp6-dialog-body"},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Are you sure you want to delete this node? This action cannot be undone.")),o.createElement("div",{className:"bp6-dialog-footer"},o.createElement("div",{className:"bp6-dialog-footer-actions"},o.createElement(De,{text:"Cancel",onClick:()=>g(!1)}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:()=>{g(!1),t.onDeleteNode&&t.onDeleteNode(e)}})))))},zee=p.memo(a8e),s8e="/assets/jpg/320-dandilons-pexels-photo-24828955.chunk.jpg",i8e="/assets/jpg/320-pexels-anniroenkae-14016173.chunk.jpg",o8e="/assets/jpg/320-pexels-anniroenkae-2832463.chunk.jpg",l8e="/assets/jpg/320-pexels-anniroenkae-3110502.chunk.jpg",c8e="/assets/jpg/320-pexels-codioful-6985003.chunk.jpg",u8e="/assets/jpg/320-pexels-codioful-6985119.chunk.jpg",d8e="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8
1927SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCAC0AUADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwC7CnQAVchjwKSFBVyJOM15/tj25RCGOrUUeaWJM1ajSp9sc0oiRpgVZiT1oiT2qyiVSrmEoiInPSpkSnxp61KqUOsYSgMVKlVKeiVMqcVPtTKUCJU56VKq4p4SnhPamqpi4DFWnqlSKvtTwtUqhhKBGqU7YOuKkUU4CtFUMZQGKtPApwWnAVtGZzygMAp4FO2mnBfyraMznnAbtpyjFOA4pwArZT7nPKAiinAUAcU4CtlIwlAQCn47UY496WtVIwlAAKcufSgD86ctaxlcwlAcKcBSD1p4rRMycQFLQOtOA4rRO5m4jl6VInSoxT14FKQJEi9adTV6U4VkyiRelKKRelKKRpEevWnCmr604VkzoR89Qx1cijpsSdsVbiTFfEyqn67JCxpVqOPikiTvVqNKzdY55RERKsxpilRKnjT2oVYwlGwkaVMqU5FqZUzVqsYyiMVKkVKkVB6Zp6pjtT9qZuJGqVIq1IFxTgtUqhjKJGF9qdtqQLmnBa0jMxlEj20oWpQvpS7a3jMxlEYEpQntT1WnYreMjnlAYAPxpdtPxQBW8ZHPKIgFLilApwHat4yMJQGinAUuKUdK3jI55QE707HelAyKco7VumYSgIPenY49qKcP0rRMwlEAO9OFIKcK2TuYSiKKcKRelLVxZlKIop6ntTBTh1q27kcpMvApRTVPanCoY0h6ntTqaACadUlpCqcVIpzUYp68Cs5GyPD4U74q3ElJCnFWok6CvzuUrH6/JCxJVmNKI0xVmNPasnUMpII09qnRKdGlTolR7RmLQxEqdVpyrUqpVKqZSjYYqU9UNSqnFPC1oqhk4kQj/Gn7eKk20u0VpGZm4kQWnAYqXb7Ubfat4zMZRIwvFKFzT8Uu3vXRGRhKIwLRtqTbRtzXRCRjKI3Aox7U4A04LXRFnPOJHilxT9tKBXTFnPKIwClC08ClAreLOeURo44pcYpcc04DjBroizCURAKWlo+laxZjKIClHShRzS45xWkXY53EdSikFOFbGUoiCnKfak78U5R61aZm4jl61JUdPWpYlEkSnU1SMU4Ui0haeo4pMdqcKxZZ5DClWokwOlNhT2qzGlfmspH69IdEn5VajSmxpVqJPasZOxm0EaVOqUqJU6JWTlYykhqJUqpT1SpVT1pKZDRGqU8JUoT2p4GK0jUMpRsRBKXYPSpdtLtrojMzaIQvtS7akK0beK6IyMpIjK+1IBUuKTFdcGYyiM20mKkoxXTFmEkRgc0uKdj
1927FLXVFnPKIzFLtp2KMV0xMJRG4pQKXFAFbxMJREpaWit4swlESlpQDmlAxW6MJRADB4paKUda0Rg4hilXNAHalUEGtYsylEX+KnCkxzmlFWYuI5R606mqadTYrCqD1qSoxkU8HvUjsPTrTqRacOtZspRPMIkq1EtMiXjNWY1r8zkj9ckPiWrUa8dKjjXFWol4rCZkOROKnRaRFqxGtYSM5AqcVKqU5VqVV9azuQyNVp4TipQtO201IlkAT1pdlTFfakI7muqDMmiHbSbeKmI54ppFdsDORFikK8VKV4ppHWuuBjJEZHpQBxTyKTFdkTCSGFeKTFSYpK6YbGMkNxzzQBzinYoxzXVE55IaRxmjBzinCitovUwkhMcUAUtLit1uYSQlFKKACa3RlKIUoGTSgZFLjuK0RhKIg5NOFJjnNPA7VomYyiJSijHOKcB2NambiGBSikHFOA9aZHKKBmnUDHalFIdgFSr0pg9RThWcikjz2IZFWolqCDkYq4gr83nA/VZD4l5q0i1FEtWEFc8omTdiWMZqwi1HGOlTp7VhKLMmySMVMq0xKmTpWDiSKq0pX2qROlKaUYu4ELCmkYqRutIa7KcTFkWKCKeRTcV3wiZyGEccU3FSEU0j0rrpxMmMI5pGHNPIwKMd664IxkiKjGaeRxRjtXTFGMhmO1Iaft+agjjFdMUYyQw0DpT8c0AEVtFGMkNI4oA74p/ajGa3juYyiNxg0mMGn9qMDrWxi0IvXFKBilxS1ojKSExSr1pVGaUelUjFxEx6U4UUVstjNxAU4c9KaKetMzsKBilFFKBSbHYcoxTuKQUorIaiefwVei55qjD1q9DwK+GqUz9RqItRip0FRJ0FTx1zSpnPJkyVMvWolqVOtYukZsnSpUzUK9akFZOkIlBpSSaYDkUuaFRM3IWkNFFdEKdiBKQ+3WnUnQ11wgRIYRSYpx60ldkYmTG45zQR2pSKK6IxsZy3GEdqMGnYoI4wK6YxMWMxxQKcRz0oPXitkjJobRincZoxjrW0UZNDQOaB0p2OaAPWtooyaEA5pQOKOd1LjnNamMoiAc80EGnUVaMmhF6UtFKOtWjNxExS0opwA7GtY7GTiMpyjvQV9KVRTI5RwpQM0gp9RJjsAGKcPagLTtoqA5bnnsPWrkQqrD2NWo+tfLzpH6bULkR6VZTpVWKrURrllSOSZMoqVetRrUi1j7IzJRUgqJakXpU+xZk3cdTwfWmClqvYkj6KauadWkaQhKPrilpK3jTM2xD6mkpcfnS4FdEYWM2MopxyaAK6IxM2M60Yp3figDNbKJmxtGO9KRRjitYxM2JRS4pQK0SuZtDaKdg+lIRWyRk0JiginY4oFUjNoQCjFKRzS4ya0M2htFPAFLTRk0NANKBilxS4rRSIaEpRSYNPVabZNg2in0gBpwUd6zDlFU0tIBinCkwscBEMVZQdKijWrEY5ryJUz9FmyeKrEdQRjpU8dc8qRzTLKU9ajSpkrF0jnmPHSnim04Cp9kZiinUgpRjHNNUhDhkUCgfTFLVKkQ2FFFFaqmQwpKXHrS1qoEiUlOo7VrGJmxuPSgDFOx60mK1UbEMQACkIyadjil2n0rRIzYwj0pQMU7FBHFaKJDVxKQ0uKdtNUQ0NoxinbTQVNWjOSG0AUuMU7HFUZtDMUCpMcYo2imiXEZinLx1FKBil9qZm4gKWinjgUieUaAacBRTguRRcOUQClXANO2ilwKQ7HCxrkVYRfaoID2q4i5rCVM+7mKq1Mi4FIi+1TIOOlYOmc8mOTrU0f1qNRUyDisnSMJjlFPxSKKeB71DpmYgB9KdS0oFHsyGxKUCl2ml2+9PkJbGkUAegp+0UuKpQJbGBfWl2+tOxS4NUoCG4A7UAc9KcVxRVqNjMawzSBakC+tBHpWijchkeDnNOxTwPrSFfStErEMYVFLinYOaUL60yWR4FLinbaUCqJauMxS49qftzQBirJcRm00YxT6XFBDQwDNG0in4oxQQ0MA9RS7RTsClxTuTYQCjFOA9QKdSFYZingUUoU0mxWDFAU04DmnVNx2PP7c9K0IMVlwGtG3Peu+pQPua0C6qelShfamwnPHrVlVrjlCx58nbcYqipFAp4X0pypWTgYN3EUe1PAPpTghp6rUOmRJjAvsKeF4p+0UBR6UvZkNjMe9O2j3p2BSge1HIQR49KXGRyakwaXaKOQCOipdtJtHpT5CWR4pcVJRVWJI8UYqTFG32oSJZHijFSbfajFMmxHinbTT8UYoE0M2mgLUgWjbQRYjxz3pdoqTbSbarmER7RRtNS7TSYNO4WGClp2DRtouQ4jcUoFPCilxS5ieUZg0oX1p4paVx8g3HtSgE04LTsUrisMCmjbT8UYpXJ5TzSEmr9ueBRRX0Mz7uvsaFueBWhBz+VFFefVR5NYnUDHSnqBmiiuVnMPpwFFFSzIcAMdKXAooqSGApcD0oopAFLRRSASnYoooIYAU4KKKKBMAoo2iiigQuBRiiiggCKMUUUCYYoxRRQJgKMUUUCDFGKKKCQpVGTRRQA7A9KMD0oopALRRRSABS0UUiUFOAGaKKB2P//Z",f8e="/assets/jpg/320-pexels-diva-30708624.chunk.jpg",m8e="/assets/jpg/320-pexels-diva-30708625.chunk.jpg",h8e="/assets/jpg/320-pexels-joshuaworoniecki-2607956.chunk.jpg",p8e="/assets/jpg/320-pexels-jplenio-1146714.chunk.jpg",g8e="/assets/jpg/320-pexels-jplenio-3131634.chunk.jpg",v8e="/assets/jpg/320-pexels-magda-ehlers-pexels-1279813.chunk.jpg",y8e="/assets/jpg/320-pexels-pixabay-158780.chunk.jpg",b8e="/assets/jpg/320-pexels-pixabay-459301.chunk.jpg",w8e="/assets/jpg/320-pexels-pixabay-60628.chunk.jpg",E8e="/assets/jpg/320-pexels-simon73-1323550.chunk.jpg",x8e="/assets/jpg/320-pexels-steve-12732215.chunk.jpg",_8e="/assets/jpg/320-pexels-steve-1704119.chunk.jpg",k8e="/assets/jpg/320-pexels-steve-29172403.chunk.jpg",S8e="/assets/jpg/320-pexels-steve-9798367.chunk.jpg",C8e="/assets/jpg/320-pexels-willianjusten-21207375.chunk.jpg",N8e="/assets/jpg/320-pexels-wolfgang-vrede-9996223-36297807.chunk.jpg",R8e="/assets/jpg/320-pexels-wyxina-tresse-311038210-29536148.chunk.jpg",T8e="/assets/jpg/320-pexels-yakup-pekdemir-159905-26604705.chunk.jpg",A8e="/assets/jpg/1600-dandilons-pexels-photo-24828955.chunk.jpg",I8e="/assets/jpg/1600-pexels-anniroenkae-14016173.chunk.jpg",O8e="/assets/jpg/1600-pexels-anniroenkae-2832463.chunk.jpg",M8e="/assets/jpg/1600-pexels-anniroenkae-3110502.chunk.jpg",P8e="/assets/jpg/1600-pexels-codioful-6985003.chunk.jpg",D8e="/assets/jpg/1600-pexels-codioful-6985119.chunk.jpg",L8e="/assets/jpg/1600-pexels-codioful-7130573.chunk.jpg",$8e="/assets/jpg/1600-pexels-diva-30708624.chunk.jpg",F8e="/assets/jpg/1600-pexels-diva-30708625.chunk.jpg",z8e="/assets/jpg/1600-pexels-joshuaworoniecki-2607956.chunk.jpg",H8e="/assets/jpg/1600-pexels-jplenio-1146714.chunk.jpg",V8e="/assets/jpg/1600-pexels-jplenio-3131634.chunk.jpg",U8e="/assets/jpg/1600-pexels-magda-ehlers-pexels-1279813.chunk.jpg",B8e="/assets/jpg/1600-pexels-pixabay-158780.chunk.jpg",j8e="/assets/jpg/1600-pexels-pixabay-459301.chunk.jpg",W8e="/assets/jpg/1600-pexels-pixabay-60628.chunk.jpg",G8e="/assets/jpg/1600-pexels-simon73-1323550.chunk.jpg",q8e="/assets/jpg/1600-pexels-steve-12732215.chunk.jpg",Y8e="/assets/jpg/1600-pexels-steve-1704119.chunk.jpg",K8e="/assets/jpg/1600-pexels-steve-29172403.chunk.jpg",Z8e="/assets/jpg/1600-pexels-steve-9798367.chunk.jpg",X8e="/assets/jpg/1600-pexels-willianjusten-21207375.chunk.jpg",Q8e="/assets/jpg/1600-pexels-wolfgang-vrede-9996223-36297807.chunk.jpg",J8e="/assets/jpg/1600-pexels-wyxina-tresse-311038210-29536148.chunk.jpg",eze="/assets/jpg/1600-pexels-yakup-pekdemir-159905-26604705.chunk.jpg",Hee="320-",Vee="1600-",tze=Object.assign({"/src/assets/mastheads/thumbs/320-dandilons-pexels-photo-24828955.jpg":s8e,"/src/assets/mastheads/thumbs/320-pexels-anniroenkae-14016173.jpg":i8e,"/src/assets/mastheads/thumbs/320-pexels-anniroenkae-2832463.jpg":o8e,"/src/assets/mastheads/thumbs/320-pexels-anniroenkae-3110502.jpg":l8e,"/src/assets/mastheads/thumbs/320-pexels-codioful-6985003.jpg":c8e,"/src/assets/mastheads/thumbs/320-pexels-codioful-6985119.jpg":u8e,"/src/assets/mastheads/thumbs/320-pexels-codioful-7130573.jpg":d8e,"/src/assets/mastheads/thumbs/320-pexels-diva-30708624.jpg":f8e,"/src/assets/mastheads/thumbs/320-pexels-diva-30708625.jpg":m8e,"/src/assets/mastheads/thumbs/320-pexels-joshuaworoniecki-2607956.jpg":h8e,"/src/assets/mastheads/thumbs/320-pexels-jplenio-1146714.jpg":p8e,"/src/assets/mastheads/thumbs/320-pexels-jplenio-3131634.jpg":g8e,"/src/assets/mastheads/thumbs/320-pexels-magda-ehlers-pexels-1279813.jpg":v8e,"/src/assets/mastheads/thumbs/320-pexels-pixabay-158780.jpg":y8e,"/src/assets/mastheads/thumbs/320-pexels-pixabay-459301.jpg":b8e,"/src/assets/mastheads/thumbs/320-pexels-pixabay-60628.jpg":w8e,"/src/assets/mastheads/thumbs/320-pexels-simon73-1323550.jpg":E8e,"/src/assets/mastheads/thumbs/320-pexels-steve-12732215.jpg":x8e,"/src/assets/mastheads/thumbs/320-pexels-steve-1704119.jpg":_8e,"/src/assets/mastheads/thumbs/320-pexels-steve-29172403.jpg":k8e,"/src/assets/mastheads/thumbs/320-pexels-steve-9798367.jpg":S8e,"/src/assets/mastheads/thumbs/320-pexels-willianjusten-21207375.jpg":C8e,"/src/assets/mastheads/thumbs/320-pexels-wolfgang-vrede-9996223-36297807.jpg":N8e,"/src/assets/mastheads/thumbs/320-pexels-wyxina-tresse-311038210-29536148.jpg":R8e,"/src/assets/mastheads/thumbs/320-pexels-yakup-pekdemir-159905-26604705.jpg":T8e}),nze=Object.assign({"/src/assets/mastheads/large/1600-dandilons-pexels-photo-24828955.jpg":A8e,"/src/assets/mastheads/large/1600-pexels-anniroenkae-14016173.jpg":I8e,"/src/assets/mastheads/large/1600-pexels-anniroenkae-2832463.jpg":O8e,"/src/assets/mastheads/large/1600-pexels-anniroenkae-3110502.jpg":M8e,"/src/assets/mastheads/large/1600-pexels-codioful-6985003.jpg":P8e,"/src/assets/mastheads/large/1600-pexels-codioful-6985119.jpg":D8e,"/src/assets/mastheads/large/1600-pexels-codioful-7130573.jpg":L8e,"/src/assets/mastheads/large/1600-pexels-diva-30708624.jpg":$8e,"/src/assets/mastheads/large/1600-pexels-diva-30708625.jpg":F8e,"/src/assets/mastheads/large/1600-pexels-joshuaworoniecki-2607956.jpg":z8e,"/src/assets/mastheads/large/1600-pexels-jplenio-1146714.jpg":H8e,"/src/assets/mastheads/large/1600-pexels-jplenio-3131634.jpg":V8e,"/src/assets/mastheads/large/1600-pexels-magda-ehlers-pexels-1279813.jpg":U8e,"/src/assets/mastheads/large/1600-pexels-pixabay-158780.jpg":B8e,"/src/assets/mastheads/large/1600-pexels-pixabay-459301.jpg":j8e,"/src/assets/mastheads/large/1600-pexels-pixabay-60628.jpg":W8e,"/src/assets/mastheads/large/1600-pexels-simon73-1323550.jpg":G8e,"/src/assets/mastheads/large/1600-pexels-steve-12732215.jpg":q8e,"/src/assets/mastheads/large/1600-pexels-steve-1704119.jpg":Y8e,"/src/assets/mastheads/large/1600-pexels-steve-29172403.jpg":K8e,"/src/assets/mastheads/large/1600-pexels-steve-9798367.jpg":Z8e,"/src/assets/mastheads/large/1600-pexels-willianjusten-21207375.jpg":X8e,"/src/assets/mastheads/large/1600-pexels-wolfgang-vrede-9996223-36297807.jpg":Q8e,"/src/assets/mastheads/large/1600-pexels-wyxina-tresse-311038210-29536148.jpg":J8e,"/src/assets/mastheads/large/1600-pexels-yakup-pekdemir-159905-26604705.jpg":eze}),rze=Object.assign({}),aze=Object.assign({}),sze=(e,t)=>
1927{const n=e.split("/").pop()||"";return n.startsWith(t)?n.slice(t.length):null},CS=(e,t)=>{const n={};return Object.entries(e).forEach(([r,a])=>{const s=sze(r,t);s&&(n[s]=a)}),n},PO=CS(tze,Hee),DO=CS(nze,Vee),ize=CS(rze,Hee),oze=CS(aze,Vee);({...ize,...PO});const Uee={...oze,...DO},lze=Object.keys(DO).filter(e=>PO[e]).sort().map(e=>({id:e,thumb:PO[e],large:DO[e]})),Bee=e=>typeof e=="string"&&Uee[e]||null,jee=e=>typeof e=="string"&&!!Uee[e],Wee=({masthead:e,style:t,draggable:n,alt:r=""})=>{if(jee(e==null?void 0:e.preset_id)){const a=Bee(e.preset_id);return o.createElement("img",{src:a,alt:r,draggable:n,loading:"lazy",decoding:"async",style:t})}return e!=null&&e.storage_path?o.createElement(nu,{storagePath:e.storage_path,draggable:n,style:t}):null},Gw=e=>jee(e==null?void 0:e.preset_id)||!!(e!=null&&e.storage_path),LO=0,$O=24,J2=2,m4=e=>typeof(e==null?void 0:e.position_x)=="number"?e.position_x:50,h4=e=>typeof(e==null?void 0:e.position_y)=="number"?e.position_y:50,Gee=e=>typeof(e==null?void 0:e.zoom)=="number"?e.zoom:1,FO=(e,t=200)=>typeof(e==null?void 0:e.height)=="number"?e.height:t,p4=e=>{const t=e==null?void 0:e.blur;return typeof t!="number"||Number.isNaN(t)?0:Math.max(LO,Math.min($O,Math.round(t)))},qee=({positionX:e=50,positionY:t=50,zoom:n=1,blur:r=0,isDragging:a=!1,isResizing:s=!1,isEditing:i=!1})=>{const l=r>0?r:0;return{width:"100%",height:"100%",objectFit:"cover",objectPosition:`${e}% ${t}%`,transform:`scale(${n})`,transformOrigin:`${e}% ${t}%`,...l>0?{filter:`blur(${l}px)`}:{},transition:a||s?"none":"transform 120ms ease, object-position 120ms ease, filter 120ms ease",cursor:i?a?"grabbing":"grab":"default",pointerEvents:i?"none":void 0,userSelect:"none"}},cze=({imageUrl:e,positionX:t=50,positionY:n=50,blur:r=0})=>{const a=r>0?r:0;return{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:`${t}% ${n}%`,...a>0?{filter:`blur(${a}px)`,transform:"scale(1.08)",transformOrigin:"center"}:{}}},eN=1600,x8=.9,uze=e=>new Promise((t,n)=>{const r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e}),dze=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>
1927t(r.result),r.onerror=n,r.readAsDataURL(e)}),fze=(e,t,n)=>new Promise((r,a)=>{e.toBlob(s=>s?r(s):a(new Error("toBlob failed")),t,n)}),Yee=async e=>{const t=await dze(e),n=await uze(t);if(n.naturalWidth<=eN)return{dataURL:t,mimeType:e.type,file:e,resized:!1};const r=eN/n.naturalWidth,a=eN,s=Math.round(n.naturalHeight*r),i=document.createElement("canvas");i.width=a,i.height=s;const l=i.getContext("2d");l.fillStyle="#ffffff",l.fillRect(0,0,a,s),l.drawImage(n,0,0,a,s);const c="image/jpeg",u=await fze(i,c,x8),d=i.toDataURL(c,x8),f=(e.name||"masthead").replace(/\.[^.]+$/,""),m=new File([u],`${f}.jpg`,{type:c});return{dataURL:d,mimeType:c,file:m,resized:!0}},U1=Ir(xr()),_8=5*1024*1024,mze=80,k8=480,hze=5,S8=1,C8=3,tN=.25,pze=350,v0=(e,t,n)=>Math.max(t,Math.min(n,e)),nN=(e,t)=>Math.round(e/t)*t,gze=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches);return p.useEffect(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)"),r=a=>t(a.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e},vze={board:"board",map:"flow"},Kee=({documentType:e="board",documentID:t,boardID:n,masthead:r,onMastheadChange:a,onEditingChange:s,onOpenSettings:i,onOpenBoardSettings:l,maxDisplayHeight:c})=>{const u=t||n,d=i||l,f=vze[e]||e||"item",m=gze(),h=`users-${e}-manage-edit`,g=`users-${e}-masthead-upload`,v=`users-${e}-masthead-delete`,y=ke=>({[e]:ke}),[b,E]=p.useState(!1);p.useEffect(()=>{s==null||s(b)},[b,s]);const[w,x]=p.useState(!1),[S,N]=p.useState(!1),[k,C]=p.useState(!1),[A,O]=p.useState(!1),[T,M]=p.useState(!1),[L,D]=p.useState(!1),[j,H]=p.useState(null),Y=p.useRef(null),z=p.useRef(null),K=p.useRef(null),ee=p.useRef(null),oe=p.useRef(r);p.useEffect(()=>{oe.current=r},[r]);const J=p.useRef(null),se=async()=>{const ke=oe.current;if(ke)try{await pt(U1,Ze(h))(y({$id:u,property_masthead:ke}))}catch(Se){console.error("Failed to save masthead:",Se),re.dispatch("trigger-alert",{message:"Couldn't save masthead changes. Try again.",intent:"danger"})}},B=()=>{J.current&&clearTimeout(J.current),J.current=setTimeout(se,pze)},U=ke=>{const Se={...oe.current||{},...ke};oe.current=Se,a==null||a(Se),B()},$=ke=>{var nt;if(!b||ke.button!==void 0&&ke.button!==0)return;const Se=(nt=Y.current)==null?void 0:nt.getBoundingClientRect();if(!Se)return;const Et=oe.current||{};K.current={startClientX:ke.clientX,startClientY:ke.clientY,startPosX:typeof Et.position_x=="number"?Et.position_x:50,startPosY:typeof Et.position_y=="number"?Et.position_y:50,rectWidth:Se.width,rectHeight:Se.height},N(!0),ke.preventDefault()},ce=typeof c=="number"?Math.min(k8,c):k8,be=ke=>{const Se=typeof ke=="number"?ke:FO(oe.current);return typeof c=="number"?Math.min(Se,c):Se},ue=ke=>{if(!b||ke.button!==void 0&&ke.button!==0)return;const Se=oe.current||{},Et=typeof Se.height=="number"?Se.height:200;ee.current={startClientY:ke.clientY,startHeight:be(Et)},C(!0),ke.preventDefault(),ke.stopPropagation()};p.useEffect(()=>{if(!S&&!k)return;const ke=Et=>{if(S&&K.current){const{startClientX:nt,startClientY:Pt,startPosX:en,startPosY:hn,rectWidth:rt,rectHeight:et}=K.current,Kt=Et.clientX-nt,zn=Et.clientY-Pt,xt=rt?Kt/rt*100:0,rr=et?zn/et*100:0,ir=v0(en-xt,0,100),Tn=v0(hn-rr,0,100),Ct=oe.current||{};if(Ct.position_x===ir&&Ct.position_y===Tn)return;U({position_x:ir,position_y:Tn})}else if(k&&ee.current){const{startClientY:nt,startHeight:Pt}=ee.current,en=Et.clientY-nt,hn=v0(Pt+en,mze,ce),rt=nN(hn,hze);if((oe.current||{}).height===rt)return;U({height:rt})}},Se=()=>{S&&(K.current=null,N(!1)),k&&(ee.current=null,C(!1))};return window.addEventListener("mousemove",ke),window.addEventListener("mouseup",Se),()=>{window.removeEventListener("mousemove",ke),window.removeEventListener("mouseup",Se)}},[S,k,ce]);const Ie=()=>{var ke;O(!1),J.current&&(clearTimeout(J.current),J.current=null),(ke=z.current)==null||ke.click()},Ae=async ke=>{var Et;const Se=(Et=ke.target.files)==null?void 0:Et[0];if(ke.target.value="",!!Se){if(Se.size>_8){re.dispatch("trigger-alert",{message:"Image must be under 5 MB.",intent:"danger"});return}try{const{dataURL:nt,mimeType:Pt,file:en}=await Yee(Se);if(en.size>_8){re.dispatch("trigger-alert",{message:"Image is still over 5 MB after compression. Try a smaller file.",intent:"danger"});return}
1927const hn=(j==null?void 0:j.previousSnapshot)||{...oe.current||{}};H({dataURL:nt,file:en,mimeType:Pt,previousSnapshot:hn});const rt={...oe.current||{},position_x:50,position_y:50,zoom:1};oe.current=rt,a==null||a(rt)}catch(nt){console.error("Failed to read image:",nt),re.dispatch("trigger-alert",{message:"Couldn't read image. Try a different file.",intent:"danger"})}}},he=()=>{if(!j)return;const ke=j.previousSnapshot;oe.current=ke,a==null||a(ke),H(null)},_e=async()=>{O(!1),J.current&&(clearTimeout(J.current),J.current=null),D(!0);try{await pt(U1,Ze(v))(y({$id:u})),oe.current=null,a==null||a(null)}catch(ke){console.error("Failed to remove masthead:",ke),re.dispatch("trigger-alert",{message:"Couldn't remove image. Try again.",intent:"danger"})}finally{D(!1)}},ie=()=>{O(!1),d==null||d()},Ue=async()=>{var ke,Se;if(j){M(!0);try{const Et=await pt(U1,Ze(g))(y({$id:u,mimeType:j.mimeType||j.file.type,base64Bytes:j.dataURL})),nt=(Se=(ke=Et==null?void 0:Et.data)==null?void 0:ke.output)==null?void 0:Se.masthead;if(nt){nt.preset_id=null;const Pt=oe.current||{},en={...nt,position_x:typeof Pt.position_x=="number"?Pt.position_x:nt.position_x,position_y:typeof Pt.position_y=="number"?Pt.position_y:nt.position_y,zoom:typeof Pt.zoom=="number"?Pt.zoom:nt.zoom,blur:typeof Pt.blur=="number"?Pt.blur:nt.blur,height:typeof Pt.height=="number"?Pt.height:nt.height};oe.current=en,a==null||a(en),(en.position_x!==nt.position_x||en.position_y!==nt.position_y||en.zoom!==nt.zoom||en.blur!==nt.blur||en.height!==nt.height)&&await pt(U1,Ze(h))(y({$id:u,property_masthead:en}))}H(null)}catch(Et){console.error("Failed to upload masthead:",Et),re.dispatch("trigger-alert",{message:"Couldn't upload image. Try again or cancel.",intent:"danger"}),M(!1);return}finally{M(!1)}}J.current&&(clearTimeout(J.current),J.current=null),se(),E(!1),N(!1),C(!1)};if(p.useEffect(()=>{if(!b)return;const ke=Se=>{Se.key==="Escape"&&Ue()};return window.addEventListener("keydown",ke),()=>window.removeEventListener("keydown",ke)},[b]),!Gw(r))return null;const ae=m4(r),pe=h4(r),W=Gee(r),q=p4(r),te=be(FO(r)),X=qee({positionX:ae,positionY:pe,zoom:W,blur:q,isDragging:S,isResizing:k,isEditing:b}),le=ke=>{const Se=v0(nN(W+ke,tN),S8,C8);Se!==W&&U({zoom:Se})},me=ke=>{const Se=v0(nN(q+ke,J2),LO,$O);Se!==q&&U({blur:Se})},fe=()=>{U({position_x:50,position_y:50,zoom:1})};return o.createElement("div",{ref:Y,className:`document-canvas__masthead board-canvas__masthead relative w-full overflow-hidden select-none ${b?"ring-2 ring-blue-400 dark:ring-blue-500":""}`,style:{height:`${te}px`},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),onMouseDown:b?$:void 0,role:b?"application":void 0},j?o.createElement("img",{src:j.dataURL,draggable:!1,alt:"",style:X}):o.createElement(Wee,{masthead:r,draggable:!1,style:X}),!b&&w?o.createElement("div",{className:"absolute top-2 right-2 z-10"},o.createElement(fr,{content:"Edit masthead",placement:"left",compact:!0},o.createElement(De,{icon:o.createElement(eu,{size:14}),variant:"solid",small:!0,className:"shadow-md",onClick:ke=>{ke.stopPropagation(),E(!0)},"aria-label":"Edit masthead"}))):null,b?o.createElement(o.Fragment,null,o.createElement("div",{className:`absolute top-2 right-2 z-10 flex items-center gap-1 rounded bg-white/95 dark:bg-gray-900/95 shadow-md px-1 py-1 ${m?Xr:""}`,onMouseDown:ke=>ke.stopPropagation()},o.createElement(fr,{content:"Zoom out",placement:"bottom",compact:!0},o.createElement(De,{icon:o.createElement(jI,{size:14}),variant:"minimal",small:!0,onClick:()=>le(-tN),disabled:W<=S8,"aria-label":"Zoom out"})),o.createElement("span",{className:"text-xs tabular-nums text-gray-600 dark:text-gray-300 w-10 text-center"},Math.round(W*100),"%"),o.createElement(fr,{content:"Zoom in",placement:"bottom",compact:!0},o.createElement(De,{icon:o.createElement(zs,{size:14}),variant:"minimal",small:!0,onClick:()=>le(tN),disabled:W>=C8,"aria-label":"Zoom in"})),o.createElement("span",{className:"mx-1 h-4 w-px bg-gray-300 dark:bg-gray-700"}),o.createElement(fr,{content:"Less blur",placement:"bottom",compact:!0},o.createElement(De,{icon:o.createElement(jI,{size:14}),variant:"minimal",small:!0,onClick:()=>me(-J2),disabled:q<=LO,"aria-label":"Less blur"})),o.createElement("span",{className:"text-xs tabular-nums text-gray-600 dark:text-gray-300 w-9 text-center flex items-center justify-center gap-0.5",title:"Image blur"},o.createElement(pIe,{size:11,className:"opacity-60"}),q,"px"),o.createElement(fr,{content:"More blur",placement:"bottom",compact:!0},o.createElement(De,{icon:o.createElement(zs,{size:14}),variant:"minimal",small:!0,onClick:()=>me(J2),disabled:q>=$O,"aria-label":"More blur"})),o.createElement("span",{className:"mx-1 h-4 w-px bg-gray-300 dark:bg-gray-700"}),o.createElement(Hr,{isOpen:A,onClose:()=>O(!1),onInteraction:ke=>{ke||O(!1)},placement:"bottom-end",minimal:!0,popoverClassName:m?Xr:void 0,content:o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(UI,{size:14}),text:"Free images",onClick:ie,disabled:T||L}),o.createElement(Bt,{icon:o.createElement(CZ,{size:14}),text:"Replace image",onClick:Ie,disabled:T||L}),o.createElement(Bt,{icon:o.createElement(tu,{size:14}),text:"Remove image",intent:"danger",onClick:_e,disabled:T||L}))},o.createElement(De,{icon:o.createElement(UI,{size:14}),variant:"minimal",small:!0,loading:T||L,onClick:()=>O(ke=>!ke),"aria-label":`Image options for this ${f}`})),o.createElement(fr,{content:"Reset framing",placement:"bottom",compact:!0},o.createElement(De,{icon:o.createElement(kIe,{size:14}),variant:"minimal",small:!0,onClick:fe,"aria-label":"Reset framing"}))," ",o.createElement("span",{className:"mx-1 h-4 w-px bg-gray-300 dark:bg-gray-700"}),j?o.createElement(fr,{content:"Cancel replace",placement:"bottom",compact:!0},o.createElement(De,{icon:o.createElement(Nm,{size:14}),variant:"minimal",small:!0,intent:"danger",onClick:he,disabled:T,"aria-label":"Cancel replace"})):null,o.createElement(De,{icon:o.createElement(yZ,{size:14}),text:"Done",variant:"solid",small:!0,intent:"primary",onClick:Ue,loading:T})),o.createElement("input",{ref:z,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:Ae,className:"hidden"}),o.createElement("div",{className:"absolute left-2 bottom-2 z-10 rounded bg-black/55 text-white text-[11px] px-2 py-1 pointer-events-none flex items-center gap-1"},o.createElement(bIe,{size:11}),o.createElement("span",null,te,"px")),o.createElement("div",{className:"absolute left-0 right-0 bottom-0 h-2 cursor-ns-resize z-10 flex items-center justify-center group",onMouseDown:ue},o.createElement("div",{className:`h-1 w-16 rounded-full transition-colors ${k?"bg-blue-500":"bg-white/70 group-hover:bg-blue-400"}`}))):null)},rN=Ir(xr()),N8=5*1024*1024,R8=200,yze=({currentPresetId:e,onSelectPreset:t,onUploadClick:n,isBusy:r,
1927isUploading:a})=>o.createElement("div",{className:"masthead-preset-grid grid gap-2 mt-2",style:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"}},o.createElement("button",{type:"button",onClick:n,disabled:r,className:`masthead-preset-tile masthead-preset-tile--upload flex flex-col items-center justify-center gap-1 rounded border-2 border-dashed text-xs font-medium transition-colors ${r?"border-gray-200 dark:border-gray-700 text-gray-400 cursor-not-allowed":"border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:border-blue-500 hover:text-blue-600 dark:hover:border-blue-400 dark:hover:text-blue-300 cursor-pointer"}`,style:{aspectRatio:"16 / 9"},"aria-label":"Upload your own masthead"},o.createElement(CZ,{size:18}),o.createElement("span",null,a?"Uploadingâ¦":"Upload your own")),lze.map(s=>{const i=s.id===e;return o.createElement("button",{key:s.id,type:"button",onClick:()=>t(s),disabled:r,className:`masthead-preset-tile relative rounded overflow-hidden border-2 transition-colors cursor-pointer ${i?"border-blue-500 dark:border-blue-400":"border-transparent hover:border-blue-400 dark:hover:border-blue-500"} ${r?"opacity-60 cursor-not-allowed":""}`,style:{aspectRatio:"16 / 9"},"aria-pressed":i,"aria-label":`Use preset masthead ${s.id}`},o.createElement("img",{src:s.thumb,alt:"",loading:"lazy",decoding:"async",draggable:!1,style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}}),i?o.createElement("span",{className:"absolute top-1 right-1 bg-blue-500 text-white rounded-full p-0.5 shadow"},o.createElement(yZ,{size:12})):null)})),Zee=({documentType:e="board",documentID:t,masthead:n,onMastheadChange:r,helperText:a})=>{const[s,i]=p.useState(n),[l,c]=p.useState(!1),[u,d]=p.useState(!1),f=p.useRef(null);p.useEffect(()=>{i(n)},[n]);const m=`users-${e}-manage-edit`,h=`users-${e}-masthead-upload`,g=`users-${e}-masthead-delete`,v=k=>({[e]:k}),y=()=>{var k;(k=f.current)==null||k.click()},b=async k=>{var A,O,T;const C=(A=k.target.files)==null?void 0:A[0];if(k.target.value="",!!C){if(C.size>N8){re.dispatch("trigger-alert",{message:"Image must be under 5 MB.",intent:"danger"});return}c(!0);try{const{dataURL:M,mimeType:L,file:D}=await Yee(C);if(D.size>N8){re.dispatch("trigger-alert",{message:"Image is still over 5 MB after compression. Try a smaller file.",intent:"danger"}),c(!1);return}const j=await pt(rN,Ze(h))({...v({$id:t}),mimeType:L,base64Bytes:M}),H=((T=(O=j==null?void 0:j.data)==null?void 0:O.output)==null?void 0:T.masthead)||null;if(H){const Y={...H,preset_id:null};i(Y),r==null||r(Y)}}catch(M){console.error("Failed to upload masthead:",M),re.dispatch("trigger-alert",{message:"Couldn't upload image. Try again.",intent:"danger"})}finally{c(!1)}}},E=async k=>{if(l||u)return;const C=!!(s!=null&&s.preset_id),A={storage_path:null,preset_id:k.id,position_x:C&&typeof(s==null?void 0:s.position_x)=="number"?s.position_x:50,position_y:C&&typeof(s==null?void 0:s.position_y)=="number"?s.position_y:50,zoom:C&&typeof(s==null?void 0:s.zoom)=="number"?s.zoom:1,blur:C&&typeof(s==null?void 0:s.blur)=="number"?s.blur:0,height:typeof(s==null?void 0:s.height)=="number"?s.height:R8};i(A),r==null||r(A);try{await pt(rN,Ze(m))(v({$id:t,property_masthead:A}))}catch(O){console.error("Failed to apply preset masthead:",O),re.dispatch("trigger-alert",{message:"Couldn't apply that masthead. Try again.",intent:"danger"})}},w=async()=>{if(s){d(!0);try{await pt(rN,Ze(g))(v({$id:t})),i(null),r==null||r(null)}catch(k){console.error("Failed to remove masthead:",k),re.dispatch("trigger-alert",{message:"Couldn't remove image. Try again.",intent:"danger"})}finally{d(!1)}}},x=(s==null?void 0:s.height)||R8,S=s?qee({positionX:m4(s),positionY:h4(s),zoom:Gee(s),blur:p4(s)}):null,N=Gw(s)?"Pick another preset, upload your own, or remove the current image.":"Choose a preset or upload your own (resized to 1600px wide, max 5 MB).";return o.createElement(Ra,{helperText:a||N},o.createElement("div",{className:"flex items-center justify-between mb-3"},o.createElement("label",{className:"text-xs font-medium text-gray-400 dark:text-gray-400"},"Masthead"),o.createElement(De,{icon:o.createElement(tu,{size:14}),text:"Remove image",small:!0,intent:jr.DANGER,variant:"minimal",onClick:w,loading:u,disabled:l||!Gw(s)})),o.createElement("input",{ref:f,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",onChange:b,className:"hidden"}),Gw(s)?o.createElement("div",{className:"flex flex-col gap-3"},o.createElement("div",{className:"rounded border border-gray-200 dark:border-gray-700 overflow-hidden",style:{height:`${Math.min(x,160)}px`}},o.createElement(Wee,{masthead:s,style:S}))):null,o.createElement(yze,{currentPresetId:(s==null?void 0:s.preset_id)||null,onSelectPreset:E,onUploadClick:y,isBusy:l||u,isUploading:l}))}
1927,bze="420px",wze=({isOpen:e,onClose:t,mapID:n,masthead:r,onMastheadChange:a})=>o.createElement(Bp,{isOpen:e,onClose:t,isCloseButtonShown:!1,title:o.createElement("div",{className:"flex items-center justify-between gap-2 w-full min-w-0"},o.createElement("span",{className:"truncate"},"Flow settings"),o.createElement("div",{className:"flex items-center gap-1 shrink-0"},o.createElement(De,{text:"Done",small:!0,onClick:t}),o.createElement(De,{"aria-label":"Close",icon:"cross",variant:"minimal",small:!0,onClick:t}))),size:bze,position:va.RIGHT,hasBackdrop:!1,enforceFocus:!1,canEscapeKeyClose:!0,canOutsideClickClose:!1},o.createElement("div",{className:"flow-settings-drawer p-4 overflow-y-auto h-full min-h-0"},o.createElement(Zee,{documentType:"map",documentID:n,masthead:r,onMastheadChange:a}))),Eze=e=>{const[t,n]=p.useState([]),[r,a]=p.useState(!0),[s,i]=p.useState(!1),l=p.useRef(new Set),c=p.useCallback(u=>{l.current.add(u),setTimeout(()=>l.current.delete(u),3e3)},[]);return p.useEffect(()=>{if(!e)return;a(!0),i(!1);let u=null;const d=fg(Ki,f=>{if(u&&(u(),u=null),!f){n([]),a(!1);return}i(!1);const m=yM(fk,"Base_Maps",e,"Sub_Nodes");u=KH(m,h=>{const g=[];h.forEach(v=>{g.push({$id:v.id,...v.data()})}),n(g),a(!1)},h=>{h.code==="permission-denied"?i(!0):console.error("onSnapshot error (Sub_Nodes):",h),a(!1)})});return()=>{d(),u&&u()}},[e]),{rawNodes:t,loading:r,accessDenied:s,addPending:c}};function xze(e){const t=is.PALETTE;let n=0;for(let r=0;r<e.length;r++)n=e.charCodeAt(r)+((n<<5)-n);return t[Math.abs(n)%t.length]}function T8(e,t){var a,s;const n=((a=e==null?void 0:e.trim())==null?void 0:a[0])||"",r=((s=t==null?void 0:t.trim())==null?void 0:s[0])||"";return n&&r?(n+r).toUpperCase():n?n.toUpperCase():"?"}const _ze=e=>{const[t,n]=p.useState({}),[r,a]=p.useState(Ki.currentUser),s=p.useRef(null);p.useEffect(()=>fg(Ki,l=>a(l)),[]),p.useEffect(()=>{if(!e||!r)return;let l=!1;const c=Kb(l1,`maps/${e}/presence`),u=Kb(l1,`maps/${e}/presence/${r.uid}`);s.current=u,(async()=>{var b,E,w,x,S,N,k;let h="",g="";try{const C=await Ep(xp(fk,"Users_General",r.uid));if(C.exists()){const A=(w=(E=(b=C.data())==null?void 0:b.writable)==null?void 0:E.set)==null?void 0:w.personal_data;h=((x=A==null?void 0:A.full_name)==null?void 0:x.first)||"",g=((S=A==null?void 0:A.full_name)==null?void 0:S.last)||""}}catch{}if(l)return;const v=h&&g?`${h} ${g}`:h||r.displayName||((N=r.email)==null?void 0:N.split("@")[0])||"Anonymous",y={displayName:v,email:r.email||"",initials:T8(h,g)!=="?"?T8(h,g):v.split(/\s+/).length>=2?(v.split(/\s+/)[0][0]+v.split(/\s+/).slice(-1)[0][0]).toUpperCase():((k=v[0])==null?void 0:k.toUpperCase())||"?",color:xze(r.uid),selectedNodeId:null,lastActive:K5()};fw(u,y),Ooe(u).remove()})();const f=setInterval(()=>{fw(Kb(l1,`maps/${e}/presence/${r.uid}/lastActive`),K5())},3e4),m=Doe(c,h=>{const g=h.val()||{};n(g)});return()=>{l=!0,clearInterval(f),m(),Moe(u),s.current=null}},[e,r==null?void 0:r.uid]);const i=p.useCallback(l=>{!s.current||!r||fw(Kb(l1,`maps/${e}/presence/${r.uid}/selectedNodeId`),l)},[e,r==null?void 0:r.uid]);return{allPresent:t,currentUid:r==null?void 0:r.uid,setSelectedNode:i}},B1=Ir(xr()),Xee=({documentType:e,documentID:t,accessMode:n,shareToken:r,teamID:a,isIndexable:s=!1,publicShowThumbnails:i=!0,onAccessModeChanged:l})=>{const[c,u]=p.useState(!1),[d,f]=p.useState(!1),[m,h]=p.useState(!1),[g,v]=p.useState(!1),[y,b]=p.useState(i===!1),[E,w]=p.useState(!1),x=Wn(ee=>{var se,B,U;const J=(((U=(B=(se=ee==null?void 0:ee.FB)==null?void 0:se.auth)==null?void 0:B.globalMeta)==null?void 0:U.teams)||[]).find($=>String($.id)===String(a));return J?J.allow_public_sharing!==!1:!0}),S=n==="anyone_with_link",N=S&&!x;p.useEffect(()=>{if(!S){b(!1),w(!1);return}b(i===!1)},[S,i]);const k=e==="map"?"users-map-manage-edit":"users-board-manage-edit",C=e==="map"?"map":"board",A=e==="map"?"flow":"board",O=p.useMemo(()=>!S||!r||typeof window>"u"?"":`${window.location.origin}/share/${A}/${r}`,[S,r,A]),T=a?`public_share_confirmed_${a}`:null,M=p.useMemo(()=>{if(!T||typeof window>"u")return!1;try{return window.localStorage.getItem(T)==="true"}catch{return!1}},[T]),L=async ee=>{const oe=ee==="team_only";oe&&(b(!1),w(!1)),u(!0);try{await pt(B1,Ze(k))({[C]:{$id:t,property_access_mode:ee,...oe?{property_public_show_thumbnails:!0}:{}}}),l==null||l(ee)}catch(J){const se=(J==null?void 0:J.code)||"",B=(J==null?void 0:J.message)||"";let U="Couldn't update sharing. Try again.";B.includes("share-role-insufficient")?U="Only team owners and admins can change sharing.":B.includes("share-disabled-by-team-policy")?U="Your team has disabled public sharing. Ask an owner to re-enable it in team settings.":(se==="permission-denied"||se==="functions/permission-denied")&&(U="You don't have permission to change sharing."),re.dispatch("trigger-alert",{message:U,intent:"danger"})}finally{u(!1)}},D=ee=>{const oe=ee.target.checked;if(oe&&!M){f(!0);return}L(oe?"anyone_with_link":"team_only")},j=()=>
1927{if(T)try{window.localStorage.setItem(T,"true")}catch{}f(!1),L("anyone_with_link")},H=async()=>{h(!1),v(!0);try{await pt(B1,Ze(k))({[C]:{$id:t,property_regenerate_share_token:!0}}),l==null||l("anyone_with_link"),re.dispatch("trigger-alert",{message:"Share link regenerated. Old link no longer works.",intent:"success"})}catch(ee){const oe=(ee==null?void 0:ee.message)||"";let J="Couldn't regenerate the link. Try again.";oe.includes("share-role-insufficient")?J="Only team owners and admins can regenerate the link.":oe.includes("share-regenerate-notpublic")&&(J="Turn sharing back on first."),re.dispatch("trigger-alert",{message:J,intent:"danger"})}finally{v(!1)}},Y=async ee=>{const oe=ee.target.checked===!0;try{await pt(B1,Ze(k))({[C]:{$id:t,property_is_indexable:oe}}),l==null||l(n)}catch{re.dispatch("trigger-alert",{message:"Couldn't update indexability. Try again.",intent:"danger"})}},z=async ee=>{const oe=ee.target.checked===!0,J=!oe;b(oe);try{await pt(B1,Ze(k))({[C]:{$id:t,property_public_show_thumbnails:J}}),l==null||l(n)}catch{b(i===!1),re.dispatch("trigger-alert",{message:"Couldn't update thumbnail visibility. Try again.",intent:"danger"})}},K=async()=>{if(O)try{await navigator.clipboard.writeText(O),re.dispatch("trigger-alert",{message:"Share link copied to clipboard.",intent:"success"})}catch{re.dispatch("trigger-alert",{message:"Couldn't copy. Select the URL manually.",intent:"warning"})}};return o.createElement(o.Fragment,null,o.createElement(Ra,{label:o.createElement("span",{className:"flex items-center gap-2"},o.createElement(Jc,{size:14,className:"text-gray-500"}),"Sharing")},o.createElement(ds,{checked:S,disabled:c||!x&&!S,label:"Anyone with the link can view",onChange:D,className:"text-sm text-gray-800 dark:text-gray-400"}),o.createElement("div",{className:"text-xs text-gray-500 dark:text-gray-400 -mt-1 ml-9"},N?o.createElement("span",{className:"flex items-center gap-1"},o.createElement(BI,{size:12,className:"text-gray-500 shrink-0"}),o.createElement("span",null,"This link is paused by workspace policy. Re-enable public sharing in workspace settings to restore access, or toggle off to clear the link permanently.")):!x&&!S?o.createElement("span",{className:"flex items-center gap-1"},o.createElement(BI,{size:12,className:"text-gray-500 shrink-0"}),o.createElement("span",null,"This workspace has disabled public sharing of bookmarks. Ask an owner or admin to enable it in workspace settings.")):S?`Anyone with the link can view this ${e==="map"?"flow":"board"}, but they can't edit.`:`Only members of this team can see this ${e==="map"?"flow":"board"}.`),S&&!N?o.createElement(o.Fragment,null,o.createElement("div",{className:"mt-3"},o.createElement(ds,{checked:y,onChange:z},o.createElement("span",{className:"text-sm text-gray-800 dark:text-gray-400"},"Hide bookmark thumbnails"),o.createElement("button",{type:"button",className:"ml-2 -mt-1 text-xs text-blue-600 dark:text-blue-400 hover:underline bg-transparent border-0 p-0 cursor-pointer",onClick:()=>w(ee=>!ee)},E?"Less":"More..."),E?o.createElement("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1"},"Turn on to share only titles and URLs. Thumbnails from bookmarks saved using the extension captures the page when you saved it, which may include signed-in content. If you don't use the extension, then this will not be an issue."):null)),o.createElement("div",{className:"flex items-center gap-2 mt-3"},o.createElement(Cs,{readOnly:!0,value:O||"Generating share link...",onFocus:ee=>ee.target.select(),fill:!0,className:"input-group-no-margin"}),o.createElement(De,{icon:o.createElement(Mg,{size:14}),onClick:K,disabled:!O})),o.createElement("div",{className:"flex items-center gap-2 mt-2"},o.createElement(De,{icon:o.createElement(oL,{size:14}),text:"Regenerate link",variant:"minimal",loading:g,onClick:()=>h(!0)}),o.createElement(ds,{checked:s===!0,label:"Let search engines find this page",onChange:Y}))):null),m?o.createElement(Wv,{intent:"warning",icon:"warning-sign",className:"mt-3"},o.createElement("div",{className:"font-medium mb-1"},"Regenerate share link?"),o.createElement("div",{className:"text-sm mb-3"},"The old link will stop working immediately. Anyone with the new link will be able to view this"," ",e==="map"?"flow":"board","."),o.createElement("div",{className:"flex gap-2"},o.createElement(De,{intent:"primary",small:!0,text:"Regenerate",onClick:H}),o.createElement(De,{small:!0,text:"Cancel",onClick:()=>h(!1)}))):null,d?o.createElement(Wv,{intent:"warning",icon:"warning-sign",className:"mt-3"},o.createElement("div",{className:"font-medium mb-1"},"Make this ",e==="map"?"flow":"board"," public?"),o.createElement("div",{className:"text-sm mb-3"},"Anyone with the link will be able to see every bookmark URL, title, and image on this ",e==="map"?"flow":"board",". They w
1927on't be able to edit. You can turn this off any time."),o.createElement("div",{className:"flex gap-2"},o.createElement(De,{intent:"primary",small:!0,text:"Make public",onClick:j}),o.createElement(De,{small:!0,text:"Cancel",onClick:()=>f(!1)}))):null)},kze={customMapNode:zee};function Qee({mapID:e,layoutDirection:t,nodeCount:n}){const{fitView:r}=_S(),a=p.useRef({mapID:null,layoutDirection:null});return p.useEffect(()=>{n>0&&(a.current.mapID!==e||a.current.layoutDirection!==t)&&(a.current={mapID:e,layoutDirection:t},requestAnimationFrame(()=>{setTimeout(()=>{requestAnimationFrame(()=>r({padding:.2,duration:400}))},50)}))},[e,t,n,r]),null}Qee.propTypes={mapID:Mn.string,layoutDirection:Mn.string,nodeCount:Mn.number};const y0=220,b0=130,j1=60,W1=80;function Sze(e,t,n){const r={},a=new Set;for(const l of t)r[l.source]||(r[l.source]=[]),r[l.source].push(l.target),a.add(l.target);const s=e.filter(l=>!a.has(l.id)).map(l=>l.id),i={};if(n==="LR"){let l=0;const c=(u,d)=>{const f=r[u]||[];if(!f.length)return i[u]={x:d*(y0+j1),y:l},l+=b0+W1,b0;const m=l;let h=0;for(const g of f)h+=c(g,d+1);return i[u]={x:d*(y0+j1),y:m+(h-b0)/2},h};for(const u of s)c(u,0),l+=W1}else{let l=0;const c=(u,d)=>{const f=r[u]||[];if(!f.length)return i[u]={x:l,y:d*(b0+W1)},l+=y0+j1,y0;const m=l;let h=0;for(const g of f)h+=c(g,d+1);return i[u]={x:m+(h-y0)/2,y:d*(b0+W1)},h};for(const u of s)c(u,0),l+=j1}return e.map(l=>({...l,position:i[l.id]??l.position}))}const Jee=({mapID:e,teamID:t,onMapTitleChanged:n,externalName:r,onFlowCreated:a,onFlowDeleted:s,onPaneClick:i})=>{var ut,pn,Jt,In,Dn,or,Zt,tr;const l=yr(),c=hs(),u=Wn(Fe=>{var st;return(st=Fe==null?void 0:Fe.FB)==null?void 0:st.auth}),d=((pn=(ut=u==null?void 0:u.globalMeta)==null?void 0:ut.teams)==null?void 0:pn.find(Fe=>Fe.id===t))||(()=>{try{const Fe=localStorage.getItem("userLoader-teamsList");if(Fe)return JSON.parse(Fe).find(gt=>gt.id===t)}catch{}return null})(),f=((Jt=d==null?void 0:d.organization)==null?void 0:Jt.$id)||((In=d==null?void 0:d.organization)==null?void 0:In.id),m=(or=(Dn=u==null?void 0:u.globalMeta)==null?void 0:Dn.organizations)==null?void 0:or.find(Fe=>Fe.id===f||Fe.$id===f),h=vc(u),g=(()=>{var Fe;return h?sS(u,t)?!0:m?!((Fe=m.subscription)!=null&&Fe.active):!1:!1})(),[v,y]=R7e([]),[b,E]=T7e([]),[w,x]=p.useState(null),[S,N]=p.useState(!0),[k,C]=p.useState(!1),[A,O]=p.useState(!1),[T,M]=p.useState(""),[L,D]=p.useState(!1),[j,H]=p.useState(!1),[Y,z]=p.useState(!1),[K,ee]=p.useState(!1),[oe,J]=p.useState(!1),[se,B]=p.useState(!1),[U,$]=p.useState(!1);p.useEffect(()=>{var Fe;!((Fe=c.state)!=null&&Fe.openShare)||!e||(J(!0),l(c.pathname,{replace:!0,state:{}}))},[c.pathname,c.state,e,l]);const ce=p.useRef("TB"),[be,ue]=p.useState("TB"),[Ie,Ae]=p.useState(0),he=p.useRef(0),_e=Fe=>{ce.current=Fe,ue(Fe)},{allPresent:ie,currentUid:Ue,setSelectedNode:ae}=_ze(e),pe=p.useMemo(()=>{const Fe={};for(const[st,gt]of Object.entries(ie))st!==Ue&>.selectedNodeId&&(Fe[gt.selectedNodeId]={uid:st,displayName:gt.displayName,color:gt.color});return Fe},[ie,Ue]),W=p.useRef({}),q=p.useRef(new Map),{rawNodes:te,loading:X,accessDenied:le,addPending:me}=Eze(e);p.useEffect(()=>{const Fe=new Set(te.map(ht=>ht.$id||ht.id)),st=te.map(ht=>({id:ht.$id||ht.id,type:"customMapNode",position:ht.position||{x:0,y:0},width:ht.width||200,style:{minHeight:ht.height||"auto"},data:{...ht,mapID:e,teamID:t,layoutDirection:ce.current,paneClickCount:he.current,onDeleteNode:We=>W.current.handleDeleteNode(We),onUpdateNode:(We,it)=>W.current.handleUpdateNode(We,it),onAddChildNode:(We,it)=>W.current.handleAddChildNode(We,it),onResizeNode:(We,it,_t)=>W.current.handleResizeNode(We,it,_t)}})),gt=te.filter(ht=>ht.parent_node_id).map(ht=>({id:`e-${ht.parent_node_id}-${ht.$id||ht.id}`,source:ht.parent_node_id,target:ht.$id||ht.id}));for(const[ht,{node:Ee,edge:We}]of q.current)Fe.has(ht)||(st.push(Ee),We&>.push(We));y(st),E(gt)},[te,e,t]),p.useEffect(()=>{y(Fe=>Fe.map(st=>{var ht;const gt=pe[st.id]||null;return((ht=st.data)==null?void 0:ht.editingBy)===gt?st:{...st,data:{...st.data,editingBy:gt}}}))},[pe]),p.useEffect(()=>{y(Fe=>Fe.map(st=>({...st,data:{...st.data,paneClickCount:Ie}})))},[Ie]),p.useEffect(()=>{y(Fe=>Fe.map(st=>({...st,data:{...st.data,layoutDirection:be}})))},[be]),p.useEffect(()=>{r&&r!==(w==null?void 0:w.name)&&(x(Fe=>({...Fe,name:r})),M(r))},[r]);const fe=Fe=>{x(st=>st&&{...st,masthead:Fe})},ke=async()=>Ir(xr());p.useEffect(()=>{e&&(N(!0),C(!1),(async()=>{var Fe,st;try{const gt=await ke(),We=(st=(Fe=(await pt(gt,Ze("users-map-view-content"))({map:{$id:e}})).data)==null?void 0:Fe.output)==null?void 0:st.map;We&&(x(We),M(We.name),We.layout_direction&&_e(We.layout_direction),localStorage.setItem("maps_last_opened",JSON.stringify({mapID:e,teamID:t})))}catch(gt){const ht=(gt==null?void 0:gt.code)||"",Ee=(gt==null?void 0:gt.message)||"";ht==="functions/permission-denied"||ht==="functions/unauthenticated"||Ee.includes("permission")||Ee.includes("access")||Ee.includes("nomatch")?C(!0):console.error("Failed to load map details",gt)}finally{N(!1)}})())},[e,t]);const Se=p.useCallback(Fe=>y(st=>u4(Fe,st)),[y]),Et=p.useCallback(Fe=>E(st=>d4(Fe,st)),[E]),nt=p.useCallback(Fe=>{Fe.forEach(st=>{var gt;(gt=W.current)!=null&>.handleUpdateNode&&W.current.handleUpdateNode(st.target,{parent_node_id:null})})},[]);p.useEffect(()=>{const Fe=({tempID:st,realAssetID:gt})=>{y(ht=>{let Ee=!1;const We=ht.map(it=>{if(!it.data||!it.data.bookmarks)return it;let _t=!1;const vn=it.data.bookmarks.map(An=>An.assetID===st?(_t=!0,{...An,assetID:gt}):An);return _t?(Ee=!0,setTimeout(()=>{var An;(An=W.current)!=null&&An.handleUpdateNode&&W.current.handleUpdateNode(it.id,{bookmarks:vn})},0),{...it,data:{...it.data,bookmarks:vn}}):it});return Ee?We:ht})};return re.on("optimistic-asset-resolved",Fe),()=>{re.remove("optimistic-asset-resolved",Fe)}},[y]);const Pt=p.useCallback(Fe=>{E(ht=>zJ(Fe,ht));const st=Fe.target,gt=Fe.source;y(ht=>ht.map(Ee=>Ee.id===st?{...Ee,data:{...Ee.data,parent_node_id:gt}}:Ee)),me(st),ke().then(ht=>{pt(ht,Ze("users-map-node-edit"))({map:{$id:e},node:{$id:st,parent_node_id:gt}}).catch(We=>console.error("Failed connecting node:",We))})},[E,y,e,me]),en=p.useCallback(async(Fe,st)=>{me(st.id);try{const gt=await ke();await pt(gt,Ze("users-map-node-bulkUpdate"))({map:{$id:e},nodes:[{$id:st.id,position:st.position}]})}catch(gt){console.error("Failed to update node position",gt)}},[e,me]),hn=p.useCallback((Fe,st)=>{ae(st.id)},[ae]),rt=p.useCallback(()=>{ae(null),D(!1),he.current+=1,Ae(he.current),i==null||i()},[ae,i]),et=async(Fe,st)=>{y(gt=>gt.map(ht=>
1927ht.id===Fe?{...ht,data:{...ht.data,...st}}:ht)),me(Fe);try{const gt=await ke();await pt(gt,Ze("users-map-node-edit"))({map:{$id:e},node:{$id:Fe,...st}})}catch(gt){console.error("Failed to persist node update:",gt)}},Kt=async()=>{const Fe={x:Math.random()*100,y:Math.random()*100},st=`temp_${Date.now()}`,gt={id:st,type:"customMapNode",position:Fe,data:{label:"New Page",bookmarks:[],mapID:e,teamID:t,isOptimistic:!0,onDeleteNode:ht=>W.current.handleDeleteNode(ht),onUpdateNode:(ht,Ee)=>W.current.handleUpdateNode(ht,Ee),onAddChildNode:(ht,Ee)=>W.current.handleAddChildNode(ht,Ee)}};q.current.set(st,{node:gt,edge:null}),y(ht=>[...ht,gt]);try{const ht=await ke();await pt(ht,Ze("users-map-node-add"))({map:{$id:e},node:{label:"New Page",position:Fe,type:"customMapNode",bookmarks:[]}}),q.current.delete(st),y(We=>We.filter(it=>it.id!==st))}catch(ht){console.error("Failed to add node",ht),q.current.delete(st),y(Ee=>Ee.filter(We=>We.id!==st))}},zn=async Fe=>{y(st=>st.filter(gt=>gt.id!==Fe)),E(st=>st.filter(gt=>gt.source!==Fe&>.target!==Fe)),me(Fe);try{const st=await ke();await pt(st,Ze("users-map-node-delete"))({map:{$id:e},node:{$id:Fe}})}catch(st){console.error("Failed deleting node:",st)}},xt=async(Fe,st)=>{const gt={x:((st==null?void 0:st.x)??0)+40,y:((st==null?void 0:st.y)??0)+160},ht=`temp_${Date.now()}`,Ee={id:ht,type:"customMapNode",position:gt,data:{label:"New Page",bookmarks:[],mapID:e,teamID:t,isOptimistic:!0,onDeleteNode:it=>W.current.handleDeleteNode(it),onUpdateNode:(it,_t)=>W.current.handleUpdateNode(it,_t),onAddChildNode:(it,_t)=>W.current.handleAddChildNode(it,_t)}},We={id:`e-${Fe}-${ht}`,source:Fe,target:ht};q.current.set(ht,{node:Ee,edge:We}),y(it=>[...it,Ee]),E(it=>[...it,We]);try{const it=await ke();await pt(it,Ze("users-map-node-add"))({map:{$id:e},node:{label:"New Page",position:gt,type:"customMapNode",bookmarks:[],parent_node_id:Fe}}),q.current.delete(ht),y(vn=>vn.filter(An=>An.id!==ht)),E(vn=>vn.filter(An=>An.target!==ht))}catch(it){console.error("Failed to add child node:",it),q.current.delete(ht),y(_t=>_t.filter(vn=>vn.id!==ht)),E(_t=>_t.filter(vn=>vn.target!==ht))}},rr=async(Fe,st,gt)=>{me(Fe);try{const ht=await ke(),Ee=pt(ht,Ze("users-map-node-edit")),We={$id:Fe,width:st};gt!==void 0&&(We.height=gt),await Ee({map:{$id:e},node:We})}catch(ht){console.error("Failed to persist node resize:",ht)}};W.current={handleDeleteNode:zn,handleUpdateNode:et,handleAddChildNode:xt,handleResizeNode:rr};const ir=()=>{const Fe=be==="TB"?"LR":"TB";_e(Fe),D(!1);const st=Sze(v,b,Fe);y(st.map(gt=>({...gt,data:{...gt.data,layoutDirection:Fe}}))),ke().then(gt=>{const ht=st.filter(Ee=>!Ee.id.startsWith("temp_"));ht.length>0&&pt(gt,Ze("users-map-node-bulkUpdate"))({map:{$id:e},nodes:ht.map(Ee=>({$id:Ee.id,position:Ee.position}))}).catch(Ee=>console.error("Failed to persist layout:",Ee)),pt(gt,Ze("users-map-manage-edit"))({map:{$id:e,property_name:w.name,property_description:w.description||"",property_layout_direction:Fe}}).catch(Ee=>console.error("users-map-manage-edit error",Ee))})},Tn=async()=>{var Fe,st;H(!0),D(!1);try{const gt=await ke(),ht=await pt(gt,Ze("users-map-manage-clone"))({map:{$id:e}}),Ee=(st=(Fe=ht==null?void 0:ht.data)==null?void 0:Fe.output)==null?void 0:st.mapID;Ee&&t&&(a==null||a(),l(Pn("/workspace/:teamID/map/:mapID",{teamID:t,mapID:Ee})))}catch(gt){console.error("Failed to clone flow:",gt)}finally{H(!1)}},Ct=async()=>{ee(!0);try{const Fe=await ke();await pt(Fe,Ze("users-map-manage-delete"))({map:{$id:e}}),localStorage.removeItem("maps_last_opened"),s==null||s(),l(Pn("/workspace/:teamID/map",{teamID:t}))}catch(Fe){console.error("Failed to delete flow:",Fe)}finally{ee(!1),z(!1)}},_r=async()=>{if(!T.trim()||T===(w==null?void 0:w.name)){O(!1);return}try{const Fe=await ke(),st=pt(Fe,Ze("users-map-manage-edit")),gt=T.trim();x(ht=>({...ht,name:gt})),n==null||n(e,gt),await st({map:{$id:e,property_name:gt}})}catch(Fe){console.error("Failed updating map title:",Fe),M((w==null?void 0:w.name)||"")}finally{O(!1)}},Qn=Object.entries(ie),Ce=p.useCallback(()=>{ke().then(Fe=>{pt(Fe,Ze("users-map-view-content"))({map:{$id:e}}).then(st=>{var ht,Ee;const gt=(Ee=(ht=st==null?void 0:st.data)==null?void 0:ht.output)==null?void 0:Ee.map;gt&&x(gt)}).catch(()=>{})})},[e]);return S||X?o.createElement("div",{className:"w-full h-full flex items-center justify-center"},o.createElement(os,{size:30})):k||le?o.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center gap-3 text-center p-8"},o.createElement("div",{className:"text-gray-400 dark:text-gray-500 text-5xl mb-2"},"ð"),o.createElement("h2",{className:"text-xl font-semibold text-gray-700 dark:text-gray-300 m-0"},"Access Denied"),o.createElement("p",{className:"text-sm text-gray-500 dark:text-gray-400 max-w-xs m-0"},"You don't have permission to view this map. Ask a workspace member to invite you.")):o.createElement("div",{className:"w-full h-full flex flex-col map-canvas"},(Zt=w==null?void 0:w.masthead)!=null&&Zt.storage_path||(tr=w==null?void 0:w.masthead)!=null&&tr.preset_id?o.createElement(Kee,{documentType:"map",documentID:e,masthead:w.masthead,onMastheadChange:fe,onEditingChange:$,onOpenSettings:()=>B(!0),maxDisplayHeight:void 0}):null,o.createElement("div",{className:"flex-1 min-h-0 relative"},o.createElement("div",{className:"absolute top-4 left-4 right-4 z-20 flex items-center justify-between gap-3"},o.createElement("div",{className:"flex items-center gap-2 min-w-0"},A?o.createElement(Cs,{className:"max-w-md dark__text",value:T,onChange:Fe=>M(Fe.target.value),onKeyDown:Fe=>{Fe.key==="Enter"&&_r(),Fe.key==="Escape"&&(M(w==null?void 0:w.name),O(!1))},onBlur:_r,autoFocus:!0}):o.createElement("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 m-0 cursor-pointer truncate",onClick:()=>O(!0)},(w==null?void 0:w.name)||"Untitled Flow"),(w==null?void 0:w.access_mode)==="anyone_with_link"?o.createElement("button",{type:"button",onClick:()=>J(!0),className:"inline-flex items-center gap-1 rounded-full bg-blue-50 dark:bg-blue-900/30 px-2 py-0.5 text-xs font-medium text-blue-700 dark:text-blue-300 hover:bg-blue-100 dar
1927k:hover:bg-blue-900/50 flex-shrink-0",title:"This flow is public. Click to manage sharing."},o.createElement(Jc,{size:12})," Public"):null),o.createElement("div",{className:"flex items-center gap-1"},o.createElement(De,{variant:"minimal",icon:o.createElement(zs,{size:14}),text:"Page",className:"text-gray-600 dark__text",onClick:Kt}),o.createElement(Hr,{isOpen:oe,onClose:()=>J(!1),onInteraction:Fe=>{Fe||J(!1)},placement:"bottom-end",minimal:!0,content:o.createElement("div",{className:"w-[420px] max-w-[calc(100vw-32px)] p-3"},o.createElement(Xee,{documentType:"map",documentID:e,accessMode:(w==null?void 0:w.access_mode)||"team_only",shareToken:(w==null?void 0:w.share_token)||null,teamID:t,isIndexable:(w==null?void 0:w.is_indexable)===!0,publicShowThumbnails:(w==null?void 0:w.public_show_thumbnails)!==!1,onAccessModeChanged:Ce}))},o.createElement(De,{variant:"minimal",icon:o.createElement(Wm,{size:14}),text:"Share",className:"text-gray-600 dark__text",onClick:()=>J(Fe=>!Fe)})),o.createElement(Hr,{isOpen:L,onClose:()=>D(!1),onInteraction:Fe=>{Fe||D(!1)},placement:"bottom-end",minimal:!0,content:o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(eu,{size:16}),text:"Rename flow",className:"dark__text",onClick:()=>{D(!1),requestAnimationFrame(()=>O(!0))}}),o.createElement(Bt,{icon:o.createElement(Mg,{size:16}),text:"Clone flow",className:"dark__text",onClick:Tn,disabled:j||!h||g}),o.createElement(Bt,{icon:be==="TB"?o.createElement(EIe,{size:16}):o.createElement(xIe,{size:16}),text:be==="TB"?"Horizontal layout":"Vertical layout",onClick:ir}),o.createElement(Bt,{icon:o.createElement(kZ,{size:16}),text:"Flow settings",className:"dark__text",onClick:()=>{D(!1),B(!0)}}),o.createElement(Zi,null),o.createElement(Bt,{icon:o.createElement(tu,{size:16}),text:"Delete flow",className:"dark__text",onClick:()=>{z(!0),D(!1)}}))},o.createElement(De,{variant:"minimal",icon:o.createElement(hb,{size:16}),className:"text-gray-500 dark__text",loading:j,onClick:()=>D(Fe=>!Fe)})),Qn.map(([Fe,st])=>{var We;const gt=st.displayName||st.email||"",ht=gt.replace(/[._-]/g," ").trim().split(/\s+/),Ee=ht.length>=2?(ht[0][0]+ht[ht.length-1][0]).toUpperCase():(((We=ht[0])==null?void 0:We[0])||"?").toUpperCase();return o.createElement(fr,{key:Fe,content:gt},o.createElement("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold shadow-md border-2 border-white dark:border-gray-800",style:{backgroundColor:st.color}},Ee))}))),o.createElement(Oee,{nodes:v,edges:b,onNodesChange:Se,onEdgesChange:Et,onEdgesDelete:nt,onConnect:Pt,onNodeDragStop:en,onNodeClick:hn,onPaneClick:rt,nodeTypes:kze,colorMode:"system",fitView:!0},o.createElement(Lee,null),o.createElement(Q7e,null),o.createElement(Pee,{variant:"dots",gap:12,size:1}),o.createElement(Qee,{mapID:e,layoutDirection:be,nodeCount:v.length}))),o.createElement(wze,{isOpen:se,onClose:()=>B(!1),mapID:e,masthead:(w==null?void 0:w.masthead)||null,onMastheadChange:fe}),o.createElement(ya,{isOpen:Y,onClose:()=>!K&&z(!1),title:"Delete flow",icon:"trash",isCloseButtonShown:!K,style:{width:400}},o.createElement("div",{className:Fs},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Are you sure you want to delete"," ",o.createElement("strong",null,(w==null?void 0:w.name)||"this flow"),"? This cannot be undone.")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>z(!1),disabled:K}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:Ct,loading:K})))))};Jee.propTypes={mapID:Mn.string,teamID:Mn.string,onMapTitleChanged:Mn.func,externalName:Mn.string,onFlowCreated:Mn.func,onFlowDeleted:Mn.func,onPaneClick:Mn.func};function Cze(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p.useMemo(()=>r=>{t.forEach(a=>a(r))},t)}const NS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fg(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function g4(e){return"nodeType"in e}function to(e){var t,n;return e?Fg(e)?e:g4(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function v4(e){const{Document:t}=to(e);return e instanceof t}function Nb(e){return Fg(e)?!1:e instanceof to(e).HTMLElement}function ete(e){return e instanceof to(e).SVGElement}function zg(e){return e?Fg(e)?e.document:g4(e)?v4(e)?e:Nb(e)||ete(e)?e.ownerDocument:document:document:document}const yc=NS?p.useLayoutEffect:p.useEffect;function RS(e){const t=p.useRef(e);return yc(()=>{t.current=e}),p.useCallback(function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return t.current==null?void 0:t.current(...r)},[])}function Nze(){const e=p.useRef(null),t=p.useCallback((r,a)=>{e.current=setInterval(r,a)},[]),n=p.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function xy(e,t){t===void 0&&(t=[e]);const n=p.useRef(e);return yc(()=>{n.current!==e&&(n.current=e)},t),n}function Rb(e,t){const n=p.useRef();return p.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function qx(e){const t=RS(e),n=p.useRef(null),r=p.useCallback(a=>{a!==n.current&&(t==null||t(a,n.current)),n.current=a},[]);return[n,r]}function Yx(e){const t=p.useRef();return p.useEffect(()=>{t.current=e},[e]),t.current}let aN={};function Tb(e,t){return p.useMemo(()=>
1927{if(t)return t;const n=aN[e]==null?0:aN[e]+1;return aN[e]=n,e+"-"+n},[e,t])}function tte(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.reduce((s,i)=>{const l=Object.entries(i);for(const[c,u]of l){const d=s[c];d!=null&&(s[c]=d+e*u)}return s},{...t})}}const rp=tte(1),Kx=tte(-1);function Rze(e){return"clientX"in e&&"clientY"in e}function TS(e){if(!e)return!1;const{KeyboardEvent:t}=to(e.target);return t&&e instanceof t}function Tze(e){if(!e)return!1;const{TouchEvent:t}=to(e.target);return t&&e instanceof t}function Zx(e){if(Tze(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Rze(e)?{x:e.clientX,y:e.clientY}:null}const sd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[sd.Translate.toString(e),sd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),A8="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Aze(e){return e.matches(A8)?e:e.querySelector(A8)}const Ize={display:"none"};function Oze(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Ize},n)}function Mze(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return o.createElement("div",{id:t,style:a,role:"status","aria-live":r,"aria-atomic":!0},n)}function Pze(){const[e,t]=p.useState("");return{announce:p.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const nte=p.createContext(null);function Dze(e){const t=p.useContext(nte);p.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Lze(){const[e]=p.useState(()=>new Set),t=p.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[p.useCallback(r=>{let{type:a,event:s}=r;e.forEach(i=>{var l;return(l=i[a])==null?void 0:l.call(i,s)})},[e]),t]}const $ze={draggable:` 1928 To pick up a draggable item, press the space bar. 1929 While dragging, use the arrow keys to move the item. 1930 Press space again to drop the item in its new position, or press escape to cancel. 1931 `},Fze={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function zze(e){let{announcements:t=Fze,container:n,hiddenTextDescribedById:r,screenReaderInstructions:a=$ze}=e;const{announce:s,announcement:i}=Pze(),l=Tb("DndLiveRegion"),[c,u]=p.useState(!1);if(p.useEffect(()=>{u(!0)},[]),Dze(p.useMemo(()=>({onDragStart(f){let{active:m}=f;s(t.onDragStart({active:m}))},onDragMove(f){let{active:m,over:h}=f;t.onDragMove&&s(t.onDragMove({active:m,over:h}))},onDragOver(f){let{active:m,over:h}=f;s(t.onDragOver({active:m,over:h}))},onDragEnd(f){let{active:m,over:h}=f;s(t.onDragEnd({active:m,over:h}))},onDragCancel(f){let{active:m,over:h}=f;
1931s(t.onDragCancel({active:m,over:h}))}}),[s,t])),!c)return null;const d=o.createElement(o.Fragment,null,o.createElement(Oze,{id:r,value:a.draggable}),o.createElement(Mze,{id:l,announcement:i}));return n?kl.createPortal(d,n):d}var $s;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})($s||($s={}));function Xx(){}function Pm(e,t){return p.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Ab(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const bc=Object.freeze({x:0,y:0});function y4(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Hze(e,t){const n=Zx(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function b4(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Vze(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function zO(e){let{left:t,top:n,height:r,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+r},{x:t+a,y:n+r}]}function Uze(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function I8(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const rte=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=I8(t,t.left,t.top),s=[];for(const i of r){const{id:l}=i,c=n.get(l);if(c){const u=y4(I8(c),a);s.push({id:l,data:{droppableContainer:i,value:u}})}}return s.sort(b4)},Bze=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=zO(t),s=[];for(const i of r){const{id:l}=i,c=n.get(l);if(c){const u=zO(c),d=a.reduce((m,h,g)=>m+y4(u[g],h),0),f=Number((d/4).toFixed(4));s.push({id:l,data:{droppableContainer:i,value:f}})}}return s.sort(b4)};function jze(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=a-r,l=s-n;if(r<a&&n<s){const c=t.width*t.height,u=e.width*e.height,d=i*l,f=d/(c+u-d);return Number(f.toFixed(4))}return 0}const Wze=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const a=[];for(const s of r){const{id:i}=s,l=n.get(i);if(l){const c=jze(l,t);c>0&&a.push({id:i,data:{droppableContainer:s,value:c}})}}return a.sort(Vze)};function Gze(e,t){const{top:n,left:r,bottom:a,right:s}=t;return n<=e.y&&e.y<=a&&r<=e.x&&e.x<=s}const qze=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const a=[];for(const s of t){const{id:i}=s,l=n.get(i);if(l&&Gze(r,l)){const u=zO(l).reduce((f,m)=>f+y4(r,m),0),d=Number((u/4).toFixed(4));a.push({id:i,data:{droppableContainer:s,value:d}})}}return a.sort(b4)};function Yze(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ate(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:bc}function Kze(e){return function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return a.reduce((i,l)=>({...i,top:i.top+e*l.y,bottom:i.bottom+e*l.y,left:i.left+e*l.x,right:i.right+e*l.x}),{...n})}}const Zze=Kze(1);function ste(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Xze(e,t,n){const r=ste(t);if(!r)return e;const{scaleX:a,scaleY:s,x:i,y:l}=r,c=e.left-i-(1-a)*parseFloat(n),u=e.top-l-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),d=a?e.width/a:e.width,f=s?e.height/s:e.height;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c}}const Qze={ignoreTransform:!1};function Hg(e,t){t===void 0&&(t=Qze);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=to(e).getComputedStyle(e);u&&(n=Xze(n,u,d))}const{top:r,left:a,width:s,height:i,bottom:l,right:c}=n;return{top:r,left:a,width:s,height:i,bottom:l,right:c}}function O8(e){return Hg(e,{ignoreTransform:!0})}
1931function Jze(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function eHe(e,t){return t===void 0&&(t=to(e).getComputedStyle(e)),t.position==="fixed"}function tHe(e,t){t===void 0&&(t=to(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const s=t[a];return typeof s=="string"?n.test(s):!1})}function w4(e,t){const n=[];function r(a){if(t!=null&&n.length>=t||!a)return n;if(v4(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!Nb(a)||ete(a)||n.includes(a))return n;const s=to(e).getComputedStyle(a);return a!==e&&tHe(a,s)&&n.push(a),eHe(a,s)?n:r(a.parentNode)}return e?r(e):n}function ite(e){const[t]=w4(e,1);return t??null}function sN(e){return!NS||!e?null:Fg(e)?e:g4(e)?v4(e)||e===zg(e).scrollingElement?window:Nb(e)?e:null:null}function ote(e){return Fg(e)?e.scrollX:e.scrollLeft}function lte(e){return Fg(e)?e.scrollY:e.scrollTop}function HO(e){return{x:ote(e),y:lte(e)}}var Zs;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Zs||(Zs={}));function cte(e){return!NS||!e?!1:e===document.scrollingElement}function ute(e){const t={x:0,y:0},n=cte(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},a=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,l=e.scrollLeft>=r.x;return{isTop:a,isLeft:s,isBottom:i,isRight:l,maxScroll:r,minScroll:t}}const nHe={x:.2,y:.2};function rHe(e,t,n,r,a){let{top:s,left:i,right:l,bottom:c}=n;r===void 0&&(r=10),a===void 0&&(a=nHe);const{isTop:u,isBottom:d,isLeft:f,isRight:m}=ute(e),h={x:0,y:0},g={x:0,y:0},v={height:t.height*a.y,width:t.width*a.x};return!u&&s<=t.top+v.height?(h.y=Zs.Backward,g.y=r*Math.abs((t.top+v.height-s)/v.height)):!d&&c>=t.bottom-v.height&&(h.y=Zs.Forward,g.y=r*Math.abs((t.bottom-v.height-c)/v.height)),!m&&l>=t.right-v.width?(h.x=Zs.Forward,g.x=r*Math.abs((t.right-v.width-l)/v.width)):!f&&i<=t.left+v.width&&(h.x=Zs.Backward,g.x=r*Math.abs((t.left+v.width-i)/v.width)),{direction:h,speed:g}}function aHe(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}const{top:t,left:n,right:r,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:a,width:e.clientWidth,height:e.clientHeight}}function dte(e){return e.reduce((t,n)=>rp(t,HO(n)),bc)}function sHe(e){return e.reduce((t,n)=>t+ote(n),0)}function iHe(e){return e.reduce((t,n)=>t+lte(n),0)}function fte(e,t){if(t===void 0&&(t=Hg),!e)return;const{top:n,left:r,bottom:a,right:s}=t(e);ite(e)&&(a<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const oHe=[["x",["left","right"],sHe],["y",["top","bottom"],iHe]];let E4=class{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=w4(n),a=dte(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,i,l]of oHe)for(const c of i)Object.defineProperty(this,c,{get:()=>{const u=l(r),d=a[s]-u;return this.rect[c]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}};class fv{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var a;(a=this.target)==null||a.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function lHe(e){const{EventTarget:t}=to(e);return e instanceof t?e:zg(e)}function iN(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var bl;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(bl||(bl={}));function M8(e){e.preventDefault()}function cHe(e){e.stopPropagation()}var ma;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ma||(ma={}));const mte={start:[ma.Space,ma.Enter],cancel:[ma.Esc],end:[ma.Space,ma.Enter,ma.Tab]},uHe=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ma.Right:return{...n,x:n.x+25};case ma.Left:return{...n,x:n.x-25};case ma.Down:return{...n,y:n.y+25};case ma.Up:return{...n,y:n.y-25}}};class AS{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new fv(zg(n)),this.windowListeners=new fv(to(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(bl.Resize,this.handleCancel),this.windowListeners.add(bl.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(bl.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&fte(r),n(bc)}handleKeyDown(t){if(TS(t)){const{active:n,context:r,options:a}=this.props,{keyboardCodes:s=mte,coordinateGetter:i=uHe,scrollBehavior:l="smooth"}
1931=a,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,d=u?{x:u.left,y:u.top}:bc;this.referenceCoordinates||(this.referenceCoordinates=d);const f=i(t,{active:n,context:r.current,currentCoordinates:d});if(f){const m=Kx(f,d),h={x:0,y:0},{scrollableAncestors:g}=r.current;for(const v of g){const y=t.code,{isTop:b,isRight:E,isLeft:w,isBottom:x,maxScroll:S,minScroll:N}=ute(v),k=aHe(v),C={x:Math.min(y===ma.Right?k.right-k.width/2:k.right,Math.max(y===ma.Right?k.left:k.left+k.width/2,f.x)),y:Math.min(y===ma.Down?k.bottom-k.height/2:k.bottom,Math.max(y===ma.Down?k.top:k.top+k.height/2,f.y))},A=y===ma.Right&&!E||y===ma.Left&&!w,O=y===ma.Down&&!x||y===ma.Up&&!b;if(A&&C.x!==f.x){const T=v.scrollLeft+m.x,M=y===ma.Right&&T<=S.x||y===ma.Left&&T>=N.x;if(M&&!m.y){v.scrollTo({left:T,behavior:l});return}M?h.x=v.scrollLeft-T:h.x=y===ma.Right?v.scrollLeft-S.x:v.scrollLeft-N.x,h.x&&v.scrollBy({left:-h.x,behavior:l});break}else if(O&&C.y!==f.y){const T=v.scrollTop+m.y,M=y===ma.Down&&T<=S.y||y===ma.Up&&T>=N.y;if(M&&!m.x){v.scrollTo({top:T,behavior:l});return}M?h.y=v.scrollTop-T:h.y=y===ma.Down?v.scrollTop-S.y:v.scrollTop-N.y,h.y&&v.scrollBy({top:-h.y,behavior:l});break}}this.handleMove(t,rp(Kx(f,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}AS.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=mte,onActivation:a}=t,{active:s}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const l=s.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),a==null||a({event:e.nativeEvent}),!0)}return!1}}];function P8(e){return!!(e&&"distance"in e)}function D8(e){return!!(e&&"delay"in e)}class x4{constructor(t,n,r){var a;r===void 0&&(r=lHe(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:i}=s;this.props=t,this.events=n,this.document=zg(i),this.documentListeners=new fv(this.document),this.listeners=new fv(r),this.windowListeners=new fv(to(i)),this.initialCoordinates=(a=Zx(s))!=null?a:bc,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(bl.Resize,this.handleCancel),this.windowListeners.add(bl.DragStart,M8),this.windowListeners.add(bl.VisibilityChange,this.handleCancel),this.windowListeners.add(bl.ContextMenu,M8),this.documentListeners.add(bl.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(D8(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(P8(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:a}=this.props;a(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(bl.Click,cHe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(bl.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:a,props:s}=this,{onMove:i,options:{activationConstraint:l}}=s;if(!a)return;const c=(n=Zx(t))!=null?n:bc,u=Kx(a,c);if(!r&&l){if(P8(l)){if(l.tolerance!=null&&iN(u,l.tolerance))return this.handleCancel();if(iN(u,l.distance))return this.handleStart()}if(D8(l)&&iN(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),i(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===ma.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const dHe={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class qm extends x4{constructor(t){const{event:n}=t,r=zg(n.target);super(t,dHe,r)}}qm.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const fHe={move:{name:"mousemove"},end:{name:"mouseup"}};var VO;(function(e){e[e.RightClick=2]="RightClick"})(VO||(VO={}));class mHe extends x4{constructor(t){super(t,fHe,zg(t.event.target))}}mHe.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===VO.RightClick?!1:(r==null||r({event:n}),!0)}}];const oN={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class hHe extends x4{constructor(t){super(t,oN)}static setup(){return window.addEventListener(oN.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(oN.move.name,t)};function t(){}}}hHe.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:a}=n;return a.length>1?!1:(r==null||r({event:n}),!0)}}];var mv;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(mv||(mv={}));var Qx;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
1931sedTreeOrder"})(Qx||(Qx={}));function pHe(e){let{acceleration:t,activator:n=mv.Pointer,canScroll:r,draggingRect:a,enabled:s,interval:i=5,order:l=Qx.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:m}=e;const h=vHe({delta:f,disabled:!s}),[g,v]=Nze(),y=p.useRef({x:0,y:0}),b=p.useRef({x:0,y:0}),E=p.useMemo(()=>{switch(n){case mv.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case mv.DraggableRect:return a}},[n,a,c]),w=p.useRef(null),x=p.useCallback(()=>{const N=w.current;if(!N)return;const k=y.current.x*b.current.x,C=y.current.y*b.current.y;N.scrollBy(k,C)},[]),S=p.useMemo(()=>l===Qx.TreeOrder?[...u].reverse():u,[l,u]);p.useEffect(()=>{if(!s||!u.length||!E){v();return}for(const N of S){if((r==null?void 0:r(N))===!1)continue;const k=u.indexOf(N),C=d[k];if(!C)continue;const{direction:A,speed:O}=rHe(N,C,E,t,m);for(const T of["x","y"])h[T][A[T]]||(O[T]=0,A[T]=0);if(O.x>0||O.y>0){v(),w.current=N,g(x,i),y.current=O,b.current=A;return}}y.current={x:0,y:0},b.current={x:0,y:0},v()},[t,x,r,v,s,i,JSON.stringify(E),JSON.stringify(h),g,u,S,d,JSON.stringify(m)])}const gHe={x:{[Zs.Backward]:!1,[Zs.Forward]:!1},y:{[Zs.Backward]:!1,[Zs.Forward]:!1}};function vHe(e){let{delta:t,disabled:n}=e;const r=Yx(t);return Rb(a=>{if(n||!r||!a)return gHe;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Zs.Backward]:a.x[Zs.Backward]||s.x===-1,[Zs.Forward]:a.x[Zs.Forward]||s.x===1},y:{[Zs.Backward]:a.y[Zs.Backward]||s.y===-1,[Zs.Forward]:a.y[Zs.Forward]||s.y===1}}},[n,t,r])}function yHe(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Rb(a=>{var s;return t==null?null:(s=r??a)!=null?s:null},[r,t])}function bHe(e,t){return p.useMemo(()=>e.reduce((n,r)=>{const{sensor:a}=r,s=a.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...s]},[]),[e,t])}var _y;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(_y||(_y={}));var UO;(function(e){e.Optimized="optimized"})(UO||(UO={}));const L8=new Map;function wHe(e,t){let{dragging:n,dependencies:r,config:a}=t;const[s,i]=p.useState(null),{frequency:l,measure:c,strategy:u}=a,d=p.useRef(e),f=y(),m=xy(f),h=p.useCallback(function(b){b===void 0&&(b=[]),!m.current&&i(E=>E===null?b:E.concat(b.filter(w=>!E.includes(w))))},[m]),g=p.useRef(null),v=Rb(b=>{if(f&&!n)return L8;if(!b||b===L8||d.current!==e||s!=null){const E=new Map;for(let w of e){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){E.set(w.id,w.rect.current);continue}const x=w.node.current,S=x?new E4(c(x),x):null;w.rect.current=S,S&&E.set(w.id,S)}return E}return b},[e,s,n,f,c]);return p.useEffect(()=>{d.current=e},[e]),p.useEffect(()=>{f||h()},[n,f]),p.useEffect(()=>{s&&s.length>0&&i(null)},[JSON.stringify(s)]),p.useEffect(()=>{f||typeof l!="number"||g.current!==null||(g.current=setTimeout(()=>{h(),g.current=null},l))},[l,f,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:s!=null};function y(){switch(u){case _y.Always:return!1;case _y.BeforeDragging:return n;default:return!n}}}function _4(e,t){return Rb(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function EHe(e,t){return _4(e,t)}function xHe(e){let{callback:t,disabled:n}=e;const r=RS(t),a=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return p.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function IS(e){let{callback:t,disabled:n}=e;const r=RS(t),a=p.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return p.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function _He(e){return new E4(Hg(e),e)}function $8(e,t,n){t===void 0&&(t=_He);const[r,a]=p.useState(null);function s(){a(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const d=t(e);return JSON.stringify(c)===JSON.stringify(d)?c:d})}const i=xHe({callback(c){if(e)for(const u of c){const{type:d,target:f}=u;if(d==="childList"&&f instanceof HTMLElement&&f.contains(e)){s();break}}}}),l=IS({callback:s});return yc(()=>{s(),e?(l==null||l.observe(e),i==null||i.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),i==null||i.disconnect())},[e]),r}function kHe(e){const t=_4(e);return ate(e,t)}const F8=[];function SHe(e){const t=p.useRef(e),n=Rb(r=>e?r&&r!==F8&&e&&t.current&&e.parentNode===t.current.parentNode?r:w4(e):F8,[e]);return p.useEffect(()=>{t.current=e},[e]),n}function CHe(e){const[t,n]=p.useState(null),r=p.useRef(e),a=p.useCallback(s=>{const i=sN(s.target);i&&n(l=>l?(l.set(i,HO(i)),new Map(l)):null)},[]);return p.useEffect(()=>{const s=r.current;if(e!==s){i(s);const l=e.map(c=>{const u=sN(c);return u?(u.addEventListener("scroll",a,{passive:!0}),[u,HO(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),r.current=e}return()=>{i(e),i(s)};function i(l){l.forEach(c=>{const u=sN(c);u==null||u.removeEventListener("scroll",a)})}},[a,e]),p.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,i)=>rp(s,i),bc):dte(e):bc,[e,t])}function z8(e,t){t===void 0&&(t=[]);const n=p.useRef(null);return p.useEffect(()=>{n.current=null},t),p.useEffect(()=>{const r=e!==bc;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Kx(e,n.current):bc}function NHe(e){p.useEffect(()=>{if(!NS)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function RHe(e,t){return p.useMemo(()=>e.reduce((n,r)=>{let{eventName:a,handler:s}
1931=r;return n[a]=i=>{s(i,t)},n},{}),[e,t])}function hte(e){return p.useMemo(()=>e?Jze(e):null,[e])}const H8=[];function THe(e,t){t===void 0&&(t=Hg);const[n]=e,r=hte(n?to(n):null),[a,s]=p.useState(H8);function i(){s(()=>e.length?e.map(c=>cte(c)?r:new E4(t(c),c)):H8)}const l=IS({callback:i});return yc(()=>{l==null||l.disconnect(),i(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),a}function pte(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Nb(t)?t:e}function AHe(e){let{measure:t}=e;const[n,r]=p.useState(null),a=p.useCallback(u=>{for(const{target:d}of u)if(Nb(d)){r(f=>{const m=t(d);return f?{...f,width:m.width,height:m.height}:m});break}},[t]),s=IS({callback:a}),i=p.useCallback(u=>{const d=pte(u);s==null||s.disconnect(),d&&(s==null||s.observe(d)),r(d?t(d):null)},[t,s]),[l,c]=qx(i);return p.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const IHe=[{sensor:qm,options:{}},{sensor:AS,options:{}}],OHe={current:{}},qw={draggable:{measure:O8},droppable:{measure:O8,strategy:_y.WhileDragging,frequency:UO.Optimized},dragOverlay:{measure:Hg}};class hv extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const MHe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new hv,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Xx},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:qw,measureDroppableContainers:Xx,windowRect:null,measuringScheduled:!1},gte={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Xx,draggableNodes:new Map,over:null,measureDroppableContainers:Xx},Ib=p.createContext(gte),vte=p.createContext(MHe);function PHe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new hv}}}function DHe(e,t){switch(t.type){case $s.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case $s.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case $s.DragEnd:case $s.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case $s.RegisterDroppable:{const{element:n}=t,{id:r}=n,a=new hv(e.droppable.containers);return a.set(r,n),{...e,droppable:{...e.droppable,containers:a}}}case $s.SetDroppableDisabled:{const{id:n,key:r,disabled:a}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const i=new hv(e.droppable.containers);return i.set(n,{...s,disabled:a}),{...e,droppable:{...e.droppable,containers:i}}}case $s.UnregisterDroppable:{const{id:n,key:r}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const s=new hv(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function LHe(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:a}=p.useContext(Ib),s=Yx(r),i=Yx(n==null?void 0:n.id);return p.useEffect(()=>{if(!t&&!r&&s&&i!=null){if(!TS(s)||document.activeElement===s.target)return;const l=a.get(i);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const d of[c.current,u.current]){if(!d)continue;const f=Aze(d);if(f){f.focus();break}}})}},[r,t,a,i,s]),null}function yte(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((a,s)=>s({transform:a,...r}),n):n}function $He(e){return p.useMemo(()=>({draggable:{...qw.draggable,...e==null?void 0:e.draggable},droppable:{...qw.droppable,...e==null?void 0:e.droppable},dragOverlay:{...qw.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function FHe(e){let{activeNode:t,measure:n,initialRect:r,config:a=!0}=e;const s=p.useRef(!1),{x:i,y:l}=typeof a=="boolean"?{x:a,y:a}:a;yc(()=>
1931{if(!i&&!l||!t){s.current=!1;return}if(s.current||!r)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const d=n(u),f=ate(d,r);if(i||(f.x=0),l||(f.y=0),s.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const m=ite(u);m&&m.scrollBy({top:f.y,left:f.x})}},[t,i,l,r,n])}const OS=p.createContext({...bc,scaleX:1,scaleY:1});var Sd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Sd||(Sd={}));const Ob=p.memo(function(t){var n,r,a,s;let{id:i,accessibility:l,autoScroll:c=!0,children:u,sensors:d=IHe,collisionDetection:f=Wze,measuring:m,modifiers:h,...g}=t;const v=p.useReducer(DHe,void 0,PHe),[y,b]=v,[E,w]=Lze(),[x,S]=p.useState(Sd.Uninitialized),N=x===Sd.Initialized,{draggable:{active:k,nodes:C,translate:A},droppable:{containers:O}}=y,T=k!=null?C.get(k):null,M=p.useRef({initial:null,translated:null}),L=p.useMemo(()=>{var Qn;return k!=null?{id:k,data:(Qn=T==null?void 0:T.data)!=null?Qn:OHe,rect:M}:null},[k,T]),D=p.useRef(null),[j,H]=p.useState(null),[Y,z]=p.useState(null),K=xy(g,Object.values(g)),ee=Tb("DndDescribedBy",i),oe=p.useMemo(()=>O.getEnabled(),[O]),J=$He(m),{droppableRects:se,measureDroppableContainers:B,measuringScheduled:U}=wHe(oe,{dragging:N,dependencies:[A.x,A.y],config:J.droppable}),$=yHe(C,k),ce=p.useMemo(()=>Y?Zx(Y):null,[Y]),be=_r(),ue=EHe($,J.draggable.measure);FHe({activeNode:k!=null?C.get(k):null,config:be.layoutShiftCompensation,initialRect:ue,measure:J.draggable.measure});const Ie=$8($,J.draggable.measure,ue),Ae=$8($?$.parentElement:null),he=p.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),_e=O.getNodeFor((n=he.current.over)==null?void 0:n.id),ie=AHe({measure:J.dragOverlay.measure}),Ue=(r=ie.nodeRef.current)!=null?r:$,ae=N?(a=ie.rect)!=null?a:Ie:null,pe=!!(ie.nodeRef.current&&ie.rect),W=kHe(pe?null:Ie),q=hte(Ue?to(Ue):null),te=SHe(N?_e??$:null),X=THe(te),le=yte(h,{transform:{x:A.x-W.x,y:A.y-W.y,scaleX:1,scaleY:1},activatorEvent:Y,active:L,activeNodeRect:Ie,containerNodeRect:Ae,draggingNodeRect:ae,over:he.current.over,overlayNodeRect:ie.rect,scrollableAncestors:te,scrollableAncestorRects:X,windowRect:q}),me=ce?rp(ce,A):null,fe=CHe(te),ke=z8(fe),Se=z8(fe,[Ie]),Et=rp(le,ke),nt=ae?Zze(ae,le):null,Pt=L&&nt?f({active:L,collisionRect:nt,droppableRects:se,droppableContainers:oe,pointerCoordinates:me}):null,en=Uze(Pt,"id"),[hn,rt]=p.useState(null),et=pe?le:rp(le,Se),Kt=Yze(et,(s=hn==null?void 0:hn.rect)!=null?s:null,Ie),zn=p.useRef(null),xt=p.useCallback((Qn,Ce)=>{let{sensor:ut,options:pn}=Ce;if(D.current==null)return;const Jt=C.get(D.current);if(!Jt)return;const In=Qn.nativeEvent,Dn=new ut({active:D.current,activeNode:Jt,event:In,options:pn,context:he,onAbort(Zt){if(!C.get(Zt))return;const{onDragAbort:Fe}=K.current,st={id:Zt};Fe==null||Fe(st),E({type:"onDragAbort",event:st})},onPending(Zt,tr,Fe,st){if(!C.get(Zt))return;const{onDragPending:ht}=K.current,Ee={id:Zt,constraint:tr,initialCoordinates:Fe,offset:st};ht==null||ht(Ee),E({type:"onDragPending",event:Ee})},onStart(Zt){const tr=D.current;if(tr==null)return;const Fe=C.get(tr);if(!Fe)return;const{onDragStart:st}=K.current,gt={activatorEvent:In,active:{id:tr,data:Fe.data,rect:M}};kl.unstable_batchedUpdates(()=>{st==null||st(gt),S(Sd.Initializing),b({type:$s.DragStart,initialCoordinates:Zt,active:tr}),E({type:"onDragStart",event:gt}),H(zn.current),z(In)})},onMove(Zt){b({type:$s.DragMove,coordinates:Zt})},onEnd:or($s.DragEnd),onCancel:or($s.DragCancel)});zn.current=Dn;function or(Zt){return async function(){const{active:Fe,collisions:st,over:gt,scrollAdjustedTranslate:ht}=he.current;let Ee=null;if(Fe&&ht){const{cancelDrop:We}=K.current;Ee={activatorEvent:In,active:Fe,collisions:st,delta:ht,over:gt},Zt===$s.DragEnd&&typeof We=="function"&&await Promise.resolve(We(Ee))&&(Zt=$s.DragCancel)}D.current=null,kl.unstable_batchedUpdates(()=>{b({type:Zt}),S(Sd.Uninitialized),rt(null),H(null),z(null),zn.current=null;const We=Zt===$s.DragEnd?"onDragEnd":"onDragCancel";if(Ee){const it=K.current[We];it==null||it(Ee),E({type:We,event:Ee})}})}}},[C]),rr=p.useCallback((Qn,Ce)=>(ut,pn)=>{const Jt=ut.nativeEvent,In=C.get(pn);if(D.current!==null||!In||Jt.dndKit||Jt.defaultPrevented)return;const Dn={active:In};Qn(ut,Ce.options,Dn)===!0&&(Jt.dndKit={capturedBy:Ce.sensor},D.current=pn,xt(ut,Ce))},[C,xt]),ir=bHe(d,rr);NHe(d),yc(()=>{Ie&&x===Sd.Initializing&&S(Sd.Initialized)},[Ie,x]),p.useEffect(()=>{const{onDragMove:Qn}=K.current,{active:Ce,activatorEvent:ut,collisions:pn,over:Jt}=he.current;if(!Ce||!ut)return;const In={active:Ce,activatorEvent:ut,collisions:pn,delta:{x:Et.x,y:Et.y},over:Jt};kl.unstable_batchedUpdates(()=>{Qn==null||Qn(In),E({type:"onDragMove",event:In}
1931)})},[Et.x,Et.y]),p.useEffect(()=>{const{active:Qn,activatorEvent:Ce,collisions:ut,droppableContainers:pn,scrollAdjustedTranslate:Jt}=he.current;if(!Qn||D.current==null||!Ce||!Jt)return;const{onDragOver:In}=K.current,Dn=pn.get(en),or=Dn&&Dn.rect.current?{id:Dn.id,rect:Dn.rect.current,data:Dn.data,disabled:Dn.disabled}:null,Zt={active:Qn,activatorEvent:Ce,collisions:ut,delta:{x:Jt.x,y:Jt.y},over:or};kl.unstable_batchedUpdates(()=>{rt(or),In==null||In(Zt),E({type:"onDragOver",event:Zt})})},[en]),yc(()=>{he.current={activatorEvent:Y,active:L,activeNode:$,collisionRect:nt,collisions:Pt,droppableRects:se,draggableNodes:C,draggingNode:Ue,draggingNodeRect:ae,droppableContainers:O,over:hn,scrollableAncestors:te,scrollAdjustedTranslate:Et},M.current={initial:ae,translated:nt}},[L,$,Pt,nt,C,Ue,ae,se,O,hn,te,Et]),pHe({...be,delta:A,draggingRect:nt,pointerCoordinates:me,scrollableAncestors:te,scrollableAncestorRects:X});const Tn=p.useMemo(()=>({active:L,activeNode:$,activeNodeRect:Ie,activatorEvent:Y,collisions:Pt,containerNodeRect:Ae,dragOverlay:ie,draggableNodes:C,droppableContainers:O,droppableRects:se,over:hn,measureDroppableContainers:B,scrollableAncestors:te,scrollableAncestorRects:X,measuringConfiguration:J,measuringScheduled:U,windowRect:q}),[L,$,Ie,Y,Pt,Ae,ie,C,O,se,hn,B,te,X,J,U,q]),Ct=p.useMemo(()=>({activatorEvent:Y,activators:ir,active:L,activeNodeRect:Ie,ariaDescribedById:{draggable:ee},dispatch:b,draggableNodes:C,over:hn,measureDroppableContainers:B}),[Y,ir,L,Ie,b,ee,C,hn,B]);return o.createElement(nte.Provider,{value:w},o.createElement(Ib.Provider,{value:Ct},o.createElement(vte.Provider,{value:Tn},o.createElement(OS.Provider,{value:Kt},u)),o.createElement(LHe,{disabled:(l==null?void 0:l.restoreFocus)===!1})),o.createElement(zze,{...l,hiddenTextDescribedById:ee}));function _r(){const Qn=(j==null?void 0:j.autoScrollEnabled)===!1,Ce=typeof c=="object"?c.enabled===!1:c===!1,ut=N&&!Qn&&!Ce;return typeof c=="object"?{...c,enabled:ut}:{enabled:ut}}}),zHe=p.createContext(null),V8="button",HHe="Draggable";function k4(e){let{id:t,data:n,disabled:r=!1,attributes:a}=e;const s=Tb(HHe),{activators:i,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:m}=p.useContext(Ib),{role:h=V8,roleDescription:g="draggable",tabIndex:v=0}=a??{},y=(c==null?void 0:c.id)===t,b=p.useContext(y?OS:zHe),[E,w]=qx(),[x,S]=qx(),N=RHe(i,t),k=xy(n);yc(()=>(f.set(t,{id:t,key:s,node:E,activatorNode:x,data:k}),()=>{const A=f.get(t);A&&A.key===s&&f.delete(t)}),[f,t]);const C=p.useMemo(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":y&&h===V8?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[r,h,v,y,g,d.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:C,isDragging:y,listeners:r?void 0:N,node:E,over:m,setNodeRef:w,setActivatorNodeRef:S,transform:b}}function bte(){return p.useContext(vte)}const VHe="Droppable",UHe={timeout:25};function MS(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:a}=e;const s=Tb(VHe),{active:i,dispatch:l,over:c,measureDroppableContainers:u}=p.useContext(Ib),d=p.useRef({disabled:n}),f=p.useRef(!1),m=p.useRef(null),h=p.useRef(null),{disabled:g,updateMeasurementsFor:v,timeout:y}={...UHe,...a},b=xy(v??r),E=p.useCallback(()=>{if(!f.current){f.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),h.current=null},y)},[y]),w=IS({callback:E,disabled:g||!i}),x=p.useCallback((C,A)=>{w&&(A&&(w.unobserve(A),f.current=!1),C&&w.observe(C))},[w]),[S,N]=qx(x),k=xy(t);return p.useEffect(()=>{!w||!S.current||(w.disconnect(),f.current=!1,w.observe(S.current))},[S,w]),p.useEffect(()=>(l({type:$s.RegisterDroppable,element:{id:r,key:s,disabled:n,node:S,rect:m,data:k}}),()=>l({type:$s.UnregisterDroppable,key:s,id:r})),[r]),p.useEffect(()=>{n!==d.current.disabled&&(l({type:$s.SetDroppableDisabled,id:r,key:s,disabled:n}),d.current.disabled=n)},[r,s,n,l]),{active:i,rect:m,isOver:(c==null?void 0:c.id)===r,node:S,over:c,setNodeRef:N}}function BHe(e){let{animation:t,children:n}=e;const[r,a]=p.useState(null),[s,i]=p.useState(null),l=Yx(n);return!n&&!r&&l&&a(l),yc(()=>
1931{if(!s)return;const c=r==null?void 0:r.key,u=r==null?void 0:r.props.id;if(c==null||u==null){a(null);return}Promise.resolve(t(u,s)).then(()=>{a(null)})},[t,r,s]),o.createElement(o.Fragment,null,n,r?p.cloneElement(r,{ref:i}):null)}const jHe={x:0,y:0,scaleX:1,scaleY:1};function WHe(e){let{children:t}=e;return o.createElement(Ib.Provider,{value:gte},o.createElement(OS.Provider,{value:jHe},t))}const GHe={position:"fixed",touchAction:"none"},qHe=e=>TS(e)?"transform 250ms ease":void 0,YHe=p.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:a,children:s,className:i,rect:l,style:c,transform:u,transition:d=qHe}=e;if(!l)return null;const f=a?u:{...u,scaleX:1,scaleY:1},m={...GHe,width:l.width,height:l.height,top:l.top,left:l.left,transform:sd.Transform.toString(f),transformOrigin:a&&r?Hze(r,l):void 0,transition:typeof d=="function"?d(r):d,...c};return o.createElement(n,{className:i,style:m,ref:t},s)}),KHe=e=>t=>{let{active:n,dragOverlay:r}=t;const a={},{styles:s,className:i}=e;if(s!=null&&s.active)for(const[l,c]of Object.entries(s.active))c!==void 0&&(a[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,c));if(s!=null&&s.dragOverlay)for(const[l,c]of Object.entries(s.dragOverlay))c!==void 0&&r.node.style.setProperty(l,c);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[c,u]of Object.entries(a))n.node.style.setProperty(c,u);i!=null&&i.active&&n.node.classList.remove(i.active)}},ZHe=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:sd.Transform.toString(t)},{transform:sd.Transform.toString(n)}]},XHe={duration:250,easing:"ease",keyframes:ZHe,sideEffects:KHe({styles:{active:{opacity:"0"}}})};function QHe(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:a}=e;return RS((s,i)=>{if(t===null)return;const l=n.get(s);if(!l)return;const c=l.node.current;if(!c)return;const u=pte(i);if(!u)return;const{transform:d}=to(i).getComputedStyle(i),f=ste(d);if(!f)return;const m=typeof t=="function"?t:JHe(t);return fte(c,a.draggable.measure),m({active:{id:s,data:l.data,node:c,rect:a.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:i,rect:a.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:a,transform:f})})}function JHe(e){const{duration:t,easing:n,sideEffects:r,keyframes:a}={...XHe,...e};return s=>{let{active:i,dragOverlay:l,transform:c,...u}=s;if(!t)return;const d={x:l.rect.left-i.rect.left,y:l.rect.top-i.rect.top},f={scaleX:c.scaleX!==1?i.rect.width*c.scaleX/l.rect.width:1,scaleY:c.scaleY!==1?i.rect.height*c.scaleY/l.rect.height:1},m={x:c.x-d.x,y:c.y-d.y,...f},h=a({...u,active:i,dragOverlay:l,transform:{initial:c,final:m}}),[g]=h,v=h[h.length-1];if(JSON.stringify(g)===JSON.stringify(v))return;const y=r==null?void 0:r({active:i,dragOverlay:l,...u}),b=l.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(E=>{b.onfinish=()=>{y==null||y(),E()}})}}let U8=0;function eVe(e){return p.useMemo(()=>{if(e!=null)return U8++,U8},[e])}const tVe=o.memo(e=>
1931{let{adjustScale:t=!1,children:n,dropAnimation:r,style:a,transition:s,modifiers:i,wrapperElement:l="div",className:c,zIndex:u=999}=e;const{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:h,draggableNodes:g,droppableContainers:v,dragOverlay:y,over:b,measuringConfiguration:E,scrollableAncestors:w,scrollableAncestorRects:x,windowRect:S}=bte(),N=p.useContext(OS),k=eVe(f==null?void 0:f.id),C=yte(i,{activatorEvent:d,active:f,activeNodeRect:m,containerNodeRect:h,draggingNodeRect:y.rect,over:b,overlayNodeRect:y.rect,scrollableAncestors:w,scrollableAncestorRects:x,transform:N,windowRect:S}),A=_4(m),O=QHe({config:r,draggableNodes:g,droppableContainers:v,measuringConfiguration:E}),T=A?y.setRef:void 0;return o.createElement(WHe,null,o.createElement(BHe,{animation:O},f&&k?o.createElement(YHe,{key:k,id:f.id,ref:T,as:l,activatorEvent:d,adjustScale:t,className:c,transition:s,rect:A,style:{zIndex:u,...a},transform:C},n):null))}),G1=()=>{var k,C;const{teamID:e,mapID:t}=xs(),n=yr(),r=Wn(A=>{var O;return(O=A==null?void 0:A.UI)==null?void 0:O.user}),a=(k=r==null?void 0:r.activeTeam)==null?void 0:k.id,s=e||a,[i,l]=p.useState(()=>{try{const A=localStorage.getItem("maps_sidebar_width");if(A)return Math.max(120,Math.min(600,Number(A)))}catch{}return 200});p.useState([]);const[c,u]=p.useState({}),[d,f]=p.useState(0),[m,h]=p.useState(0),[g,v]=p.useState(!1),y=p.useRef(null),b=p.useRef(!1),E=p.useCallback(()=>{b.current||(v(!1),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{v(!0),b.current=!0},30*60*1e3))},[]),w=p.useCallback(()=>{b.current=!1,E()},[E]);p.useEffect(()=>{const A=["mousemove","mousedown","keydown","touchstart","scroll"],O=()=>E();return A.forEach(T=>document.addEventListener(T,O)),E(),()=>{A.forEach(T=>document.removeEventListener(T,O)),y.current&&clearTimeout(y.current)}},[E]);const x=(A,O)=>{u(T=>({...T,[A]:O}))};p.useEffect(()=>{if(!t)try{const A=localStorage.getItem("maps_last_opened");if(A){const{mapID:O,teamID:T}=JSON.parse(A);O&&T&&T===s&&n(Pn("/workspace/:teamID/map/:mapID",{teamID:T,mapID:O}),{replace:!0})}}catch{}},[t,n,s]);const S=Wn(A=>{var O;return(O=A==null?void 0:A.FB)==null?void 0:O.auth}),N=Ab(Pm(qm,{activationConstraint:{distance:1}}),Pm(AS));return!(S!=null&&S.isLive)&&!((C=S==null?void 0:S.user)!=null&&C.uid)?null:o.createElement("div",{className:"asset-list asset-list-updated mt-[50px]"},o.createElement("div",{className:"fixed top-[50px] w-full flex flex-col bg-gray-50 dark:bg-[#241d33]"},o.createElement("div",{className:"flex columns-2 flex-grow h-[calc(100vh-50px)]"},o.createElement(Ob,{sensors:N},o.createElement(WQ,{containerWidth:i,setContainerWidth:A=>{l(A),localStorage.setItem("maps_sidebar_width",A)},mapNameOverrides:c,onMapTitleChanged:x,refreshKey:d,paneClickCount:m})),o.createElement("main",{role:"main",className:"flex-grow transition-all duration-300 relative bg-gray-100 dark:bg-[#241d33]",style:{width:`calc(100% - ${i}px)`,height:"100%"}},g?o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(fs,{icon:"time",title:"Are you still there?",description:"We paused the live map to save resources since you've been inactive for a while.",action:o.createElement(De,{text:"Resume",intent:"primary",onClick:w})})):t?o.createElement(Jee,{mapID:t,teamID:s,onMapTitleChanged:x,externalName:c[t],onFlowCreated:()=>f(A=>A+1),onFlowDeleted:()=>f(A=>A+1),onPaneClick:()=>h(A=>A+1)}):o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(fs,{icon:o.createElement(ay,{size:32}),title:"Flows",description:"Select a flow to view, or create one from the sidebar."}))))))},B8=Tr.organization.subscription.plan.free.board_limit,q1=e=>{try{const t=localStorage.getItem(`boards_cache_${e}`);if(t)return JSON.parse(t)}catch{}return null},Y1=(e,t)=>{try{localStorage.setItem(`boards_cache_${e}`,JSON.stringify(t))}catch{}},j8=["Red","Blue","Green","Yellow","Purple","Orange","Pink","Teal","Cyan","Magenta","Violet","Indigo","Crimson","Azure","Emerald","Golden","Silver","Bronze"],W8=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],G8=()=>{const e=j8[Math.floor(Math.random()*j8.length)],t=W8[Math.floor(Math.random()*W8.length)],n=Math.floor(100+Math.random()*900);return`${e} ${t} ${n}`},S4=o.memo(({board:e,index:t,isHovered:n,isMenuOpen:r,isSelected:a,isCloning:s,handleBoardMouseEnter:i,handleBoardMouseLeave:l,setMenuOpenBoardId:c,setHoveredBoardId:u,handleRenameBoardClick:d,handleCloneBoardClick:f,handleDeleteBoardClick:m,handleBoardClick:h,hasMultipleTeams:g,
1931showTeamSubtitle:v,isCloneDisabled:y,handleShareBoardLinkClick:b})=>{const E=e.$id||e.id||`board-${t}`;return o.createElement("div",{onMouseEnter:()=>i(e.$id),onMouseLeave:l,className:`sidebar-item ${a?"sidebar-item__active":""} ${n?"sidebar-item__hover":""}`},o.createElement(Bt,{key:E,className:`text-xs sm:text-sm flex items-center relative ${a?"dark:!text-white":""} ${n||r?"!pl-0":""}`,icon:n||r?o.createElement(Hr,{interactionKind:"click",placement:"bottom-start",isOpen:r,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:w=>{w||c(null)},onClose:()=>c(null),content:o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(eu,{size:16}),text:"Rename",onClick:w=>{w.stopPropagation(),d(e)}}),o.createElement(fr,{content:"Upgrade to clone boards",disabled:!y},o.createElement(Bt,{icon:o.createElement(Mg,{size:16}),text:"Clone",className:"dark__text",disabled:y,onClick:w=>{w.stopPropagation(),f(e)}})),o.createElement(Bt,{icon:o.createElement(Wm,{size:16}),text:"Copy share link",className:"dark__text",onClick:w=>{w.stopPropagation(),b(e)}}),o.createElement(Bt,{icon:o.createElement(Cx,{size:16}),text:"Delete",onClick:w=>{w.stopPropagation(),m(e)},className:"dark__text"}))},o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700",onClick:w=>{w.stopPropagation(),w.preventDefault(),r?c(null):(c(e.$id),u(e.$id))}},o.createElement(Ft,{icon:o.createElement(Pg,{size:16}),className:"text-gray-500 dark:text-gray-400"}))):o.createElement(Yp,{size:16,color:g&&is.getColor(e.teamID)||void 0}),text:v&&e.teamName?o.createElement("span",{className:"flex flex-col min-w-0 leading-tight"},o.createElement("span",{className:"truncate"},e.name),o.createElement("span",{className:"text-[10px] truncate text-gray-400 dark:text-gray-500"},e.teamName)):e.name,onClick:()=>h(e)}),s&&o.createElement("div",{className:"flex items-center gap-1 px-2 pb-1 text-xs text-gray-400 dark:text-gray-500 italic"},o.createElement("span",{className:"animate-pulse"},"Cloning...")))});S4.displayName="SidebarBoardItem";S4.propTypes={board:Mn.shape({$id:Mn.string,id:Mn.string,name:Mn.string,teamID:Mn.string,teamName:Mn.string,id_Base_Teams:Mn.string}).isRequired,index:Mn.number.isRequired,isHovered:Mn.bool,isMenuOpen:Mn.bool,isSelected:Mn.bool,isCloning:Mn.bool,handleBoardMouseEnter:Mn.func.isRequired,handleBoardMouseLeave:Mn.func.isRequired,setMenuOpenBoardId:Mn.func.isRequired,setHoveredBoardId:Mn.func.isRequired,handleRenameBoardClick:Mn.func.isRequired,handleCloneBoardClick:Mn.func.isRequired,handleDeleteBoardClick:Mn.func.isRequired,handleBoardClick:Mn.func.isRequired,hasMultipleTeams:Mn.bool,showTeamSubtitle:Mn.bool,isCloneDisabled:Mn.bool,handleShareBoardLinkClick:Mn.func.isRequired};const wte=({containerWidth:e,setContainerWidth:t,boardNameOverrides:n={},onBoardTitleChanged:r,refreshKey:a=0,paneClickCount:s=0})=>{var st,gt,ht,Ee,We,it,_t,vn,An,je,kt,Lt;const[i,l]=p.useState(!1),c=ll(),u=yr(),d=hs(),f=xs(),m=f.teamID,h=Wn(ne=>{var Be;return(Be=ne==null?void 0:ne.FB)==null?void 0:Be.auth}),g=Wn(ne=>{var Be;return(Be=ne==null?void 0:ne.UI)==null?void 0:Be.user}),v=m||((st=g==null?void 0:g.activeTeam)==null?void 0:st.id),[y,b]=p.useState(0),[E,w]=p.useState(null),x=()=>{b(ne=>ne+1)},S=g==null?void 0:g.isAllTeam,N=((gt=h==null?void 0:h.globalMeta)==null?void 0:gt.teams)||[],k="all",[C,A]=p.useState(()=>q1(k)||[]),[O,T]=p.useState(()=>!q1(k)),[M,L]=p.useState(!1),D=N,j=ne=>{const Be=(ne==null?void 0:ne.code)||"";return Be==="functions/permission-denied"||Be==="functions/unauthenticated"},H=async()=>{if(D.length===0){A([]),T(!1);return}const ne=q1(k);ne?(A(ne),T(!1)):(T(!0),A([])),L(!1);try{const[{getFunctions:Be,httpsCallable:mt,connectFunctionsEmulator:we},{getApp:vt},{$FF_trigger:It}]=await Promise.all([yn(()=>function(){return(ln=>import(ln))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(ln=>import(ln))("./brand.924cec70.js")}().then(St=>St.a8),[]),yn(()=>function(){return(ln=>import(ln))("./brand.924cec70.js")}().then(St=>St.a9),[])]),fn=Be(vt()),Ne=mt(fn,It("users-board-view-list")),lt=await Promise.allSettled(D.map(St=>Ne({id_team:St.id}
1931).then(ln=>{var vr;return(((vr=ln.data)==null?void 0:vr.output)||[]).map(Yn=>({...Yn,teamID:St.id,teamName:jo(St)}))})));if(lt.length>0&<.every(St=>St.status==="rejected"&&j(St.reason))){L(!0),A([]);return}let Ke=[];lt.forEach(St=>{St.status==="fulfilled"&&(Ke=Ke.concat(St.value))}),Ke.sort((St,ln)=>(St.name||"").localeCompare(ln.name||"")),Y1(k,Ke),A(Ke)}catch(Be){console.error("Error fetching boards:",Be)}finally{T(!1)}};p.useEffect(()=>{D.length>0?H():(A([]),T(!1))},[y,a,h]);const[Y,z]=p.useState(!1),[K,ee]=p.useState(""),[oe,J]=p.useState(""),[se,B]=p.useState(!1),[U,$]=p.useState(!1),[ce,be]=p.useState(null),[ue,Ie]=p.useState(""),[Ae,he]=p.useState(!1),[_e,ie]=p.useState(!1),[Ue,ae]=p.useState(null),[pe,W]=p.useState(!1),q=async()=>{var ne,Be,mt,we;if(K.trim()){B(!0);try{const[{getFunctions:vt,httpsCallable:It,connectFunctionsEmulator:fn},{getApp:Ne},{$FF_trigger:lt}]=await Promise.all([yn(()=>function(){return(Cn=>import(Cn))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(Cn=>import(Cn))("./brand.924cec70.js")}().then(Yn=>Yn.a8),[]),yn(()=>function(){return(Cn=>import(Cn))("./brand.924cec70.js")}().then(Yn=>Yn.a9),[])]),wt=vt(Ne());let Ke=Se&&oe||v;if((Ke==="all"||!Ke)&&(Ke=((ne=g==null?void 0:g.activeTeam)==null?void 0:ne.id)||((Be=N[0])==null?void 0:Be.id)||null),!Ke){console.error("Refusing to create board â no resolvable target workspace"),B(!1);return}const ln=await It(wt,lt("users-board-manage-add"))({board:{property_name:K.trim(),id_team:Ke}});z(!1),ee(""),J("");const vr=(we=(mt=ln==null?void 0:ln.data)==null?void 0:mt.output)==null?void 0:we.boardID;vr&&Ke&&u(Pn("/workspace/:teamID/board/:boardID",{teamID:Ke,boardID:vr})),x()}catch(vt){console.error("Error adding board:",vt)}finally{B(!1)}}},te=async()=>{if(!(!ue.trim()||!ce)){he(!0);try{const[{getFunctions:ne,httpsCallable:Be,connectFunctionsEmulator:mt},{getApp:we},{$FF_trigger:vt}]=await Promise.all([yn(()=>function(){return(St=>import(St))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(St=>import(St))("./brand.924cec70.js")}().then(Ke=>Ke.a8),[]),yn(()=>function(){return(St=>import(St))("./brand.924cec70.js")}().then(Ke=>Ke.a9),[])]),It=ne(we()),fn=Be(It,vt("users-board-manage-edit")),Ne=ce.$id||ce.id,lt=ue.trim();await fn({board:{$id:Ne,property_name:lt}});const wt=C.map(Ke=>(Ke.$id||Ke.id)===Ne?{...Ke,name:lt}:Ke).sort((Ke,St)=>(Ke.name||"").localeCompare(St.name||""));A(wt),Y1(k,wt),r==null||r(Ne,lt),$(!1),Ie(""),be(null)}catch(ne){console.error("Error renaming board:",ne)}finally{he(!1)}}},X=async()=>{if(Ue){W(!0);try{const[{getFunctions:ne,httpsCallable:Be,connectFunctionsEmulator:mt},{getApp:we},{$FF_trigger:vt}]=await Promise.all([yn(()=>function(){return(Ke=>import(Ke))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(Ke=>import(Ke))("./brand.924cec70.js")}().then(wt=>wt.a8),[]),yn(()=>function(){return(Ke=>import(Ke))("./brand.924cec70.js")}().then(wt=>wt.a9),[])]),It=ne(we());await Be(It,vt("users-board-manage-delete"))({board:{$id:Ue.$id||Ue.id}}),ie(!1),ae(null);const Ne=Ue.$id||Ue.id,lt=q1(k);lt&&Y1(k,lt.filter(wt=>(wt.$id||wt.id)!==Ne)),f.boardID===Ne&&(localStorage.removeItem("boards_last_opened"),u(Pn("/workspace/:teamID/board",{teamID:v}))),x()}catch(ne){console.error("Error deleting board:",ne)}finally{W(!1)}}},[le,me]=p.useState(window.innerWidth<780),[fe,ke]=p.useState(window.innerWidth>=780?16:12),Se=(((Ee=(ht=h==null?void 0:h.globalMeta)==null?void 0:ht.teams)==null?void 0:Ee.length)||0)>1;p.useEffect(()=>{const ne=()=>{ke(window.innerWidth>=780?16:12),me(window.innerWidth<780)};return window.addEventListener("resize",ne),()=>window.removeEventListener("resize",ne)},[]);const Et=ne=>{l(!0),ne.preventDefault()};p.useEffect(()=>{const ne=mt=>{if(!i)return;const we=mt.clientX;we>=120&&we<=600&&t(we)},Be=()=>{l(!1)};return i&&(document.addEventListener("mousemove",ne),document.addEventListener("mouseup",Be)),()=>{document.removeEventListener("mousemove",ne),document.removeEventListener("mouseup",Be)}},[i,t]);const[nt,Pt]=p.useState(null),[en,hn]=p.useState(null),rt=o.useRef(null),et="boards_sort_mode",[Kt,zn]=p.useState(()=>{try{const ne=localStorage.getItem(et);if(ne==="name"||ne==="workspace")return ne}catch{}return"name"}),[xt,rr]=p.useState(!1),ir=ne=>{zn(ne);try{localStorage.setItem(et,ne)}catch{}rr(!1)};p.useEffect(()=>{s>0&&(hn(null),rr(!1))},[s]);const Tn=o.useCallback(ne=>{rt.current&&clearTimeout(rt.current),rt.current=setTimeout(()=>{Pt(ne)},500)},[]),Ct=o.useCallback(()=>{rt.current&&clearTimeout(rt.current),Pt(null)},[]),_r=ne=>{var mt;const Be=S?"all":ne.teamID||((mt=ne.id_Base_Teams)==null?void 0:mt.split("/").pop());u(Pn("/workspace/:teamID/board/:boardID",{teamID:Be,boardID:ne.$id}))},Qn=ne=>{var It;
1931const Be=(ne==null?void 0:ne.access_mode)||(ne==null?void 0:ne.property_access_mode)||(ne==null?void 0:ne.sharing_access_mode),mt=(ne==null?void 0:ne.share_token)||(ne==null?void 0:ne.property_share_token)||(ne==null?void 0:ne.sharing_token);if((Be==="anyone_with_link"||(ne==null?void 0:ne.is_public)===!0||(ne==null?void 0:ne.property_is_public)===!0)&&mt){const Ne=`https://bookmark.it.com/share/board/${mt}`;navigator.clipboard.writeText(Ne).then(()=>{re.dispatch("trigger-alert",{message:`Copied share link to "${ne.name}" to clipboard.`,intent:"success"})}),hn(null);return}const vt=ne.teamID||((It=ne.id_Base_Teams)==null?void 0:It.split("/").pop());vt&&ne.$id&&u(Pn("/workspace/:teamID/board/:boardID",{teamID:vt,boardID:ne.$id}),{state:{openShare:!0}}),hn(null)},Ce=((it=(We=h==null?void 0:h.globalMeta)==null?void 0:We.teams)==null?void 0:it.find(ne=>ne.id===v))||(()=>{try{const ne=localStorage.getItem("userLoader-teamsList");if(ne)return JSON.parse(ne).find(mt=>mt.id===v)}catch{}return null})(),ut=((_t=Ce==null?void 0:Ce.organization)==null?void 0:_t.$id)||((vn=Ce==null?void 0:Ce.organization)==null?void 0:vn.id),pn=(je=(An=h==null?void 0:h.globalMeta)==null?void 0:An.organizations)==null?void 0:je.find(ne=>ne.id===ut||ne.$id===ut),Jt=vc(h),In=(()=>{var ne;return Jt?sS(h,v)?!0:pn?!((ne=pn.subscription)!=null&&ne.active):!1:!1})(),Dn=ne=>C.filter(Be=>{var mt;return(Be.teamID||((mt=Be.id_Base_Teams)==null?void 0:mt.split("/").pop()))===ne&&!Be._is_deleted}).length,or=v?Dn(v):0,Zt=In&&or>=B8,tr=ne=>{var vt;const Be=ne.teamID||((vt=ne.id_Base_Teams)==null?void 0:vt.split("/").pop());return Be?Jt?Kp(h,Be)==="free"||(()=>{var lt,wt,Ke,St,ln,vr,Yn;const It=((wt=(lt=h==null?void 0:h.globalMeta)==null?void 0:lt.teams)==null?void 0:wt.find(Cn=>Cn.id===Be))||(()=>{try{const Cn=localStorage.getItem("userLoader-teamsList");if(Cn)return JSON.parse(Cn).find(Hn=>Hn.id===Be)}catch{}return null})(),fn=((Ke=It==null?void 0:It.organization)==null?void 0:Ke.$id)||((St=It==null?void 0:It.organization)==null?void 0:St.id),Ne=(vr=(ln=h==null?void 0:h.globalMeta)==null?void 0:ln.organizations)==null?void 0:vr.find(Cn=>Cn.id===fn||Cn.$id===fn);return Ne?!((Yn=Ne.subscription)!=null&&Yn.active):!1})()?Dn(Be)>=B8:!1:!0:!1},Fe=p.useMemo(()=>{const ne=[];if(Kt==="workspace"&&Se){const mt=new Map;C.forEach(we=>{const vt=we.teamName||"â";mt.has(vt)||mt.set(vt,[]),mt.get(vt).push(we)}),Array.from(mt.keys()).sort((we,vt)=>we.localeCompare(vt)).forEach(we=>{ne.push({type:"header",teamName:we,key:`group-header-${we}`}),mt.get(we).slice().sort((vt,It)=>(vt.name||"").localeCompare(It.name||"")).forEach((vt,It)=>{ne.push({type:"board",board:vt,key:vt.$id||vt.id||`board-${we}-${It}`})})})}else C.slice().sort((mt,we)=>(mt.name||"").localeCompare(we.name||"")).forEach((mt,we)=>{ne.push({type:"board",board:mt,key:mt.$id||mt.id||`board-${we}`})});return ne},[C,Kt,Se]);return o.createElement("div",{className:"sidebar-container flex flex-col relative h-full select-none",style:{width:e,minWidth:e}},o.createElement("div",{className:"sidebar-container__content px-2 pt-2 flex-grow overflow-y-auto no-scrollbar"},o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"flex items-center justify-between rounded transition-colors select-none group p-2"},o.createElement("div",{className:"flex items-center gap-1.5 overflow-hidden"},o.createElement("span",{className:"dark__text text-gray-500 uppercase text-xs font-semibold outline-none focus:outline-none truncate"},"Boards")),o.createElement("div",{className:"flex items-center gap-0.5"},Se&&o.createElement(Hr,{interactionKind:"click",placement:"bottom-end",isOpen:xt,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:ne=>{ne||rr(!1)},content:o.createElement(Cr,null,o.createElement(Bt,{icon:Kt==="name"?"tick":"blank",text:"Name",onClick:()=>ir("name")}),o.createElement(Bt,{icon:Kt==="workspace"?"tick":"blank",text:"Workspace",onClick:()=>ir("workspace")}))},o.createElement(fr,{content:"Sort boards",disabled:xt},o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center justify-center text-gray-500 dark:text-gray-400",onClick:ne=>{ne.stopPropagation(),rr(Be=>!Be)}},o.createElement(Ft,{icon:o.createElement(aL,{size:fe})})))),Jt?!Zt&&o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center justify-center text-gray-500 dark:text-gray-400",onClick:ne=>{ne.stopPropagation(),J(v&&v!=="all"?v:""),z(!0)}},o.createElement(Ft,{icon:"plus",size:fe})):o.createElement("div",{className:"p-1 rounded flex items-center justify-center text-gray-500 dark:text-gray-400 bp6-skeleton"},o.createElement(Ft,{icon:"plus",size:fe})))),O?o.createElement("div",{className:"text-gray-400 text-xs italic py-1 px-2"},"Loading..."):o.createElement($i,{initial:!1},o.createElement(_s.div,{initial:{height:0,opacity:0}
1931,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"}},M?o.createElement("div",{className:"text-xs px-2 py-1 text-gray-400 dark:text-gray-500 italic"},"You don't have access to this workspace's boards."):C.length===0?o.createElement("div",{className:"text-xs px-2"},Zt?o.createElement("span",{className:"text-gray-400 dark:text-gray-500 italic"},"Upgrade to create boards."):o.createElement("button",{className:"text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-300 hover:underline cursor-pointer bg-transparent border-none p-0 mt-1",onClick:()=>{J(v&&v!=="all"?v:""),z(!0)}},"Create your first board")):null,o.createElement(Cr,{className:"!bg-transparent !p-0 px-2 pb-16"},o.createElement($i,{initial:!1},Fe.map((ne,Be)=>{if(ne.type==="header")return o.createElement(_s.div,{key:ne.key,initial:{opacity:0,height:0,overflow:"hidden"},animate:{opacity:1,height:"auto",overflow:"visible"},exit:{opacity:0,height:0,overflow:"hidden"},transition:{duration:.2}},o.createElement("div",{className:"flex items-center gap-1.5 px-2 pt-3 pb-1 text-[10px] uppercase font-semibold tracking-wider text-gray-400 dark:text-gray-500 truncate select-none",title:ne.teamName},o.createElement("span",{className:"inline-block w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:is.getColor((C.find(we=>we.teamName===ne.teamName)||{}).teamID)}}),o.createElement("span",{className:"truncate"},ne.teamName)));const mt=ne.board;return o.createElement(_s.div,{key:ne.key,initial:{opacity:0,height:0,overflow:"hidden"},animate:{opacity:1,height:"auto",overflow:"visible"},exit:{opacity:0,height:0,overflow:"hidden"},transition:{duration:.2}},o.createElement(S4,{board:n[mt.$id]?{...mt,name:n[mt.$id]}:mt,index:Be,isHovered:nt===mt.$id,isMenuOpen:en===mt.$id,isSelected:d.pathname.endsWith(`/board/${mt.$id}`),isCloning:E===mt.$id,handleBoardMouseEnter:Tn,handleBoardMouseLeave:Ct,setMenuOpenBoardId:hn,setHoveredBoardId:Pt,handleRenameBoardClick:we=>{be(we),Ie(we.name),$(!0),hn(null)},handleCloneBoardClick:async we=>{var vt,It,fn;hn(null),w(we.$id||we.id);try{const[{getFunctions:Ne,httpsCallable:lt,connectFunctionsEmulator:wt},{getApp:Ke},{$FF_trigger:St}]=await Promise.all([yn(()=>function(){return(ot=>import(ot))("./index.esm.52e5c072.js")}(),[]),yn(()=>function(){return(ot=>import(ot))("./brand.924cec70.js")}().then(Re=>Re.a8),[]),yn(()=>function(){return(ot=>import(ot))("./brand.924cec70.js")}().then(Re=>Re.a9),[])]),ln=Ne(Ke()),Yn=await lt(ln,St("users-board-manage-clone"))({board:{$id:we.$id||we.id}}),Cn=(It=(vt=Yn==null?void 0:Yn.data)==null?void 0:vt.output)==null?void 0:It.boardID,Hn=we.teamID||((fn=we.id_Base_Teams)==null?void 0:fn.split("/").pop());if(Cn){const Re={...we,$id:Cn,name:`${we.name} copy`},ot=[...C,Re].sort((jt,En)=>(jt.name||"").localeCompare(En.name||""));A(ot),Y1(k,ot),Hn&&u(Pn("/workspace/:teamID/board/:boardID",{teamID:Hn,boardID:Cn}))}}catch(Ne){console.error("Error cloning board:",Ne)}finally{w(null)}},handleDeleteBoardClick:we=>{ae(we),ie(!0),hn(null)},handleBoardClick:_r,handleShareBoardLinkClick:Qn,hasMultipleTeams:Se,showTeamSubtitle:Se&&Kt!=="workspace",isCloneDisabled:tr(mt)}))})))))),In&&ut&&or===1&&o.createElement("div",{className:"px-2 mt-4"},o.createElement(ci,{className:"cursor-pointer text-xs text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-500 text-decoration-none",to:Pn("/organization/:organizationID/subscribe",{organizationID:ut})},"Upgrade for unlimited boards"))),!le&&o.createElement("div",{className:"absolute top-0 -right-[7px] w-4 h-[calc(100vh-100px)] cursor-col-resize z-50 flex justify-center hover:bg-transparent group",onMouseDown:Et},o.createElement("div",{className:"w-[1px] h-full transition-colors group-hover:bg-blue-500 delay-75 group-active:bg-blue-600 bg-transparent"})),o.createElement(ya,{isOpen:Y,onClose:()=>!se&&z(!1),title:"Add Board",style:{width:"400px"},isCloseButtonShown:!se,className:c?Xr:void 0},o.createElement("div",{className:Fs},o.createElement(Cs,{value:K,onChange:ne=>ee(ne.target.value),placeholder:"Board Name",autoFocus:!0,disabled:se}
1931),Se&&o.createElement(Ra,{label:"Select Workspace",className:"mt-4",helperText:"Choose which workspace this board belongs to"},o.createElement(Ko,{value:oe,onChange:ne=>J(ne.target.value),fill:!0,disabled:se},o.createElement("option",{value:"",disabled:!0},"Select a workspace..."),(Lt=(kt=h==null?void 0:h.globalMeta)==null?void 0:kt.teams)==null?void 0:Lt.map(ne=>o.createElement("option",{key:ne.id,value:ne.id},jo(ne)))))),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement("div",{className:"flex items-center justify-between w-full"},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"text-red-500 dark:text-pink-600 hover:underline cursor-pointer",onClick:ne=>{ne.preventDefault(),ee(G8())}},"Create random board"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>z(!1),disabled:se}),o.createElement(De,{text:"Create",intent:jr.PRIMARY,onClick:q,loading:se,disabled:!K.trim()||Se&&!oe})))))),o.createElement(ya,{isOpen:U,onClose:()=>!Ae&&$(!1),title:"Rename Board",style:{width:"400px"},isCloseButtonShown:!Ae,className:c?Xr:void 0},o.createElement("div",{className:Fs},o.createElement(Cs,{value:ue,onChange:ne=>Ie(ne.target.value),placeholder:"Board Name",autoFocus:!0,disabled:Ae})),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement("div",{className:"flex items-center justify-between w-full"},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"text-red-500 dark:text-pink-600 hover:underline cursor-pointer",onClick:ne=>{ne.preventDefault(),Ie(G8())}},"Create random board"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>$(!1),disabled:Ae}),o.createElement(De,{text:"Save",intent:jr.PRIMARY,onClick:te,loading:Ae,disabled:!ue.trim()})))))),o.createElement(ya,{isOpen:_e,onClose:()=>!pe&&ie(!1),title:"Delete Board",icon:"trash",style:{width:"400px"},isCloseButtonShown:!pe,className:c?Xr:void 0},o.createElement("div",{className:Fs},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Are you sure you want to delete the board"," ",o.createElement("strong",null,Ue==null?void 0:Ue.name),"?")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>ie(!1),disabled:pe}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:X,loading:pe})))))};wte.propTypes={containerWidth:Mn.number.isRequired,setContainerWidth:Mn.func.isRequired,boardNameOverrides:Mn.objectOf(Mn.string),onBoardTitleChanged:Mn.func,refreshKey:Mn.number,paneClickCount:Mn.number};function PS(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function nVe(e,t){return e.reduce((n,r,a)=>{const s=t.get(r);return s&&(n[a]=s),n},Array(e.length))}function K1(e){return e!==null&&e>=0}function rVe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function aVe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const C4=e=>{let{rects:t,activeIndex:n,overIndex:r,index:a}=e;const s=PS(t,r,n),i=t[a],l=s[a];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},Z1={scaleX:1,scaleY:1},Ete=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:a,rects:s,overIndex:i}=e;const l=(t=s[n])!=null?t:r;if(!l)return null;if(a===n){const u=s[i];return u?{x:0,y:n<i?u.top+u.height-(l.top+l.height):u.top-l.top,...Z1}:null}const c=sVe(s,a,n);return a>n&&a<=i?{x:0,y:-l.height-c,...Z1}:a<n&&a>=i?{x:0,y:l.height+c,...Z1}:{x:0,y:0,...Z1}};function sVe(e,t,n){const r=e[t],a=e[t-1],s=e[t+1];return r?n<t?a?r.top-(a.top+a.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):a?r.top-(a.top+a.height):0:0}const xte="Sortable",_te=o.createContext({activeIndex:-1,containerId:xte,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:C4,disabled:{draggable:!1,droppable:!1}});function N4(e){let{children:t,id:n,items:r,strategy:a=C4,disabled:s=!1}=e;const{active:i,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:d}=bte(),f=Tb(xte,n),m=l.rect!==null,h=p.useMemo(()=>r.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),g=i!=null,v=i?h.indexOf(i.id):-1,y=u?h.indexOf(u.id):-1,b=p.useRef(h),E=!rVe(h,b.current),w=y!==-1&&v===-1||E,x=aVe(s);yc(()=>{E&&g&&d(h)},[E,h,g,d]),p.useEffect(()=>{b.current=h},[h]);const S=p.useMemo(()=>({activeIndex:v,containerId:f,disabled:x,disableTransforms:w,items:h,overIndex:y,useDragOverlay:m,sortedRects:nVe(h,c),strategy:a}),[v,f,x.draggable,x.droppable,w,h,y,c,m,a]);return o.createElement(_te.Provider,{value:S},t)}const iVe=e=>{let{id:t,items:n,activeIndex:r,overIndex:a}=e;return PS(n,r,a).indexOf(t)},oVe=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:a,items:s,newIndex:i,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!r||l!==s&&a===i?!1:n?!0:i!==a&&t===c},lVe={duration:200,easing:"ease"},kte="transform",cVe=sd.Transition.toString({property:kte,duration:0,easing:"linear"}),uVe={roleDescription:"sortable"};function dVe(e){let{disabled:t,index:n,node:r,rect:a}=e;const[s,i]=p.useState(null),l=p.useRef(n);return yc(()=>
1931{if(!t&&n!==l.current&&r.current){const c=a.current;if(c){const u=Hg(r.current,{ignoreTransform:!0}),d={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(d.x||d.y)&&i(d)}}n!==l.current&&(l.current=n)},[t,n,r,a]),p.useEffect(()=>{s&&i(null)},[s]),s}function Ste(e){let{animateLayoutChanges:t=oVe,attributes:n,disabled:r,data:a,getNewIndex:s=iVe,id:i,strategy:l,resizeObserverConfig:c,transition:u=lVe}=e;const{items:d,containerId:f,activeIndex:m,disabled:h,disableTransforms:g,sortedRects:v,overIndex:y,useDragOverlay:b,strategy:E}=p.useContext(_te),w=fVe(r,h),x=d.indexOf(i),S=p.useMemo(()=>({sortable:{containerId:f,index:x,items:d},...a}),[f,a,x,d]),N=p.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:k,node:C,isOver:A,setNodeRef:O}=MS({id:i,data:S,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...c}}),{active:T,activatorEvent:M,activeNodeRect:L,attributes:D,setNodeRef:j,listeners:H,isDragging:Y,over:z,setActivatorNodeRef:K,transform:ee}=k4({id:i,data:S,attributes:{...uVe,...n},disabled:w.draggable}),oe=Cze(O,j),J=!!T,se=J&&!g&&K1(m)&&K1(y),B=!b&&Y,U=B&&se?ee:null,ce=se?U??(l??E)({rects:v,activeNodeRect:L,activeIndex:m,overIndex:y,index:x}):null,be=K1(m)&&K1(y)?s({id:i,items:d,activeIndex:m,overIndex:y}):x,ue=T==null?void 0:T.id,Ie=p.useRef({activeId:ue,items:d,newIndex:be,containerId:f}),Ae=d!==Ie.current.items,he=t({active:T,containerId:f,isDragging:Y,isSorting:J,id:i,index:x,items:d,newIndex:Ie.current.newIndex,previousItems:Ie.current.items,previousContainerId:Ie.current.containerId,transition:u,wasDragging:Ie.current.activeId!=null}),_e=dVe({disabled:!he,index:x,node:C,rect:k});return p.useEffect(()=>{J&&Ie.current.newIndex!==be&&(Ie.current.newIndex=be),f!==Ie.current.containerId&&(Ie.current.containerId=f),d!==Ie.current.items&&(Ie.current.items=d)},[J,be,f,d]),p.useEffect(()=>{if(ue===Ie.current.activeId)return;if(ue!=null&&Ie.current.activeId==null){Ie.current.activeId=ue;return}const Ue=setTimeout(()=>{Ie.current.activeId=ue},50);return()=>clearTimeout(Ue)},[ue]),{active:T,activeIndex:m,attributes:D,data:S,rect:k,index:x,newIndex:be,items:d,isOver:A,isSorting:J,isDragging:Y,listeners:H,node:C,overIndex:y,over:z,setNodeRef:oe,setActivatorNodeRef:K,setDroppableNodeRef:O,setDraggableNodeRef:j,transform:_e??ce,transition:ie()};function ie(){if(_e||Ae&&Ie.current.newIndex===x)return cVe;if(!(B&&!TS(M)||!u)&&(J||he))return sd.Transition.toString({...u,property:kte})}}function fVe(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}ma.Down,ma.Right,ma.Up,ma.Left;const mVe=async({action:e,targetType:t,targetId:n,targetName:r,details:a={},userId:s=null,teamId:i=null})=>{try{const l=Ki.currentUser;if(!s&&!l){console.warn("ActivityLogger: No user logged in.");return}i&&typeof i=="string"&&(a.teamId=i);const c={};Object.keys(a).forEach(d=>{a[d]!==null&&a[d]!==void 0&&(c[d]=a[d])});const u=JSON.parse(JSON.stringify({userId:s||l.uid,userEmail:(l==null?void 0:l.email)||"unknown",action:e,targetType:t,targetId:n,targetName:r,details:c}));u.timestamp=Lre(),await $re(yM(fk,"Activity_Logs"),u)}catch(l){console.error("ActivityLogger Error:",l,{action:e,targetType:t,targetId:n})}},ky=({url:e,domain:t,name:n,className:r="",style:a={}})=>{const s=t||pb(e),i=s||n||"â¢",l=Gf(s||n);return o.createElement("div",{className:`flex items-center justify-center w-full h-full select-none ${r}`,style:{background:YI(i),...a},"aria-hidden":"true"},o.createElement("span",{style:{color:"#fff",fontFamily:"Domine, Georgia, serif",fontWeight:700,fontSize:"1.9em",lineHeight:1,opacity:.96}},l))},hVe=/^(https?:|mailto:)/i,pVe=e=>typeof e!="string"?"#":hVe.test(e)?e:"#",Jx=p.memo(({assetID:e,fallbackName:t,fallbackUrl:n,showThumbnail:r=!0,layout:a="full",listType:s="default",listIndex:i=0,checked:l=!1,onToggleCheck:c,toggleShowLabel:u=!1,toggleEnabledLabel:d="On",toggleDisabledLabel:f="Off",onRemove:m,isHidden:h=!1,onRestore:g,isHostMode:v=!1,isPublic:y=!1,publicFaviconUrl:b=null,publicThumbnailUrl:E=null,publicHostname:w="",dimmed:x=!1})=>{var Ie,Ae,he,_e;const[S,N]=p.useState(!1),k=x?" opacity-40":"",C=Xo(async()=>{var ie;return y||!((ie=Qe==null?void 0:Qe.base)!=null&&ie.isOpen())?null:await Qe.base.table("Assets-General-All").get(e)},[e,y]);if(C&&C._is_deleted)return null;const A=(C==null?void 0:C.name)||(C==null?void 0:C.title)||t||n,O=((Ie=C==null?void 0:C.active_iteration)==null?void 0:Ie.url)||(C==null?void 0:C.url)||n,T=pVe(O),M=y?null:(Ae=C==null?void 0:C.active_iteration)==null?void 0:Ae.auto_preview_thumbnail,L=y?b:(he=C==null?void 0:C.active_iteration)==null?void 0:he.favicon_url,D=y?null:(_e=C==null?void 0:C.active_iteration)==null?void 0:_e.favicon;let j=w||"";if(!j)try{j=T?new URL(T).hostname:""}catch{}const H=s==="checkboxes"&&!!c,Y=(()=>s==="bulleted"?o.createElement("span",{className:"board-card-bookmark__bullet inline-block w-1.5 h-1.5 rounded-full bg-gray-400 dark:bg-gray-500 flex-shrink-0","aria-hidden":"true"}):s==="numbered"?o.createElement("span",{className:"board-card-bookmark__number flex-shrink-0 w-4 text-xs text-gray-500 dark:text-gray-400 tabular-nums text-right"},i,"."):s==="checkboxes"?o.createElement("input",{type:"checkbox",className:"board-card-bookmark__checkbox flex-shrink-0 cursor-pointer accent-blue-600 disabled:cursor-default disabled:opacity-60",checked:!!l,disabled:!H,onPointerDown:ie=>ie.stopPropagation(),onClick:ie=>ie.stopPropagation(),onChange:ie=>{ie.stopPropagation(),H&&c(ie.currentTarget.checked)},"aria-label":l?"Uncheck bookmark":"Check bookmark"}):null)(),z=s!=="default"&&s!=="toggle"&&!!Y,K=s==="toggle",ee=K&&!!c,oe=l?d:f,J=K?o.createElement("button",{type:"button",role:"switch","aria-checked":!!l,disabled:!ee,onPointerDown:ie=>ie.stopPropagation(),onClick:ie=>{ie.stopPropagation(),ee&&c(!l)},"aria-label":l?"Turn off":"Turn on",title:u?oe:void 0,className:`board-card-bookmark__switch inline-flex items-center rounded-full h-3.5 px-0.5 transition-colors flex-shrink-0 ${u?"min-w-[2rem]":"w-6"} ${l?"flex-row-reverse":"flex-row"} ${l?"bg-blue-600":"bg-gray-300 dark:bg-gray-600"}
1931 ${ee?"cursor-pointer":"cursor-default opacity-80"}`},o.createElement("span",{className:"board-card-bookmark__switch-knob h-2.5 w-2.5 rounded-full bg-white shadow-sm flex-shrink-0"}),u?o.createElement("span",{className:`board-card-bookmark__switch-text flex-1 min-w-0 max-w-[110px] truncate text-center text-[10px] leading-none px-0.5 ${l?"text-white":"text-gray-700 dark:text-gray-100"}`},oe):null):null,se=s==="checkboxes"&&l?" line-through text-gray-400 dark:text-gray-500":"",B=o.createElement("div",{className:"favicon-container w-4 h-4 flex-shrink-0 relative"},o.createElement("div",{className:"group-hover/sortable:invisible"},L?o.createElement("img",{src:L,className:"w-4 h-4",alt:""}):D?o.createElement(Cm,{storagePath:D}):o.createElement(Ft,{icon:o.createElement(tf,{size:12})})),o.createElement("div",{className:"absolute inset-0 invisible group-hover/sortable:visible flex items-center justify-center text-gray-500 dark:text-gray-400"},o.createElement(VI,{size:14,strokeWidth:1.5}))),U=()=>{const ie=o.createElement(ky,{url:O,domain:j,name:A});return y?E?o.createElement("img",{src:E,alt:"",className:"w-full h-full object-cover",loading:"lazy"}):ie:M?o.createElement(nu,{storagePath:M,fallback:ie}):ie},$=v?null:h?g?{icon:"plus",onAct:()=>g(e),title:"Add back to group",iconClass:"text-blue-500",hoverClass:"cursor-pointer text-blue-500 hover:text-blue-700",bgHover:"hover:bg-blue-50 dark:hover:bg-blue-900"}:null:m?{icon:"cross",onAct:()=>m(e),title:"Remove bookmark",iconClass:"text-red-500",hoverClass:"cursor-pointer text-red-400 hover:text-red-600",bgHover:"hover:bg-red-50 dark:hover:bg-red-900"}:null,ce=S&&$?o.createElement("button",{type:"button",className:`board-card-bookmark__remove absolute top-1 right-1 z-10 flex items-center justify-center w-5 h-5 leading-none bg-white/90 dark:bg-gray-800/90 rounded-full shadow-sm ${$.bgHover}`,onClick:ie=>{ie.stopPropagation(),$.onAct()},title:$.title},o.createElement(Ft,{icon:$.icon,size:10,className:$.iconClass})):null,ue=K||!!$?o.createElement("span",{className:"board-card-bookmark__remove-slot flex-shrink-0 w-3 h-3 flex items-center justify-center"},$?o.createElement(Ft,{icon:$.icon,size:12,className:`transition-opacity ${$.hoverClass} ${S?"opacity-100":"opacity-0"}`,onClick:ie=>{ie.stopPropagation(),$.onAct()}}):null):null;return a==="list"||!r&&a!=="grid"?o.createElement("div",{className:`board-card-bookmark--compact flex items-center gap-2 overflow-hidden group/bm transition-opacity${k}`,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1)},z?Y:null,B,o.createElement("a",{href:T,target:"_blank",rel:"noopener noreferrer",draggable:!1,className:`truncate text-sm text-blue-600 hover:underline flex-1 dark:text-blue-400${se}`,title:T},A),J,ue):a==="grid"?o.createElement("div",{className:`board-card-bookmark board-card-bookmark--grid group/bm relative flex flex-col min-w-0 h-full transition-opacity${k}`,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1)},o.createElement("a",{href:T,target:"_blank",rel:"noopener noreferrer",draggable:!1,className:"board-card-bookmark__thumb board-card-bookmark__thumb--grid",title:T},U()),z?o.createElement("div",{className:"board-card-bookmark__marker-badge absolute top-1 left-1 z-10 flex items-center justify-center rounded bg-white/90 dark:bg-gray-800/90 px-1 py-0.5 shadow-sm"},Y):null,o.createElement("div",{className:"board-card-bookmark__meta board-card-bookmark__meta--grid flex items-center gap-1.5 min-w-0 px-1.5 py-1"},B,o.createElement("a",{href:T,target:"_blank",rel:"noopener noreferrer",draggable:!1,className:`truncate text-xs font-medium text-gray-900 dark:text-gray-100 hover:underline flex-1 min-w-0${se}`,title:T},A),J),ce):o.createElement("div",{className:`board-card-bookmark group/bm relative flex flex-col transition-opacity${k}`,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1)},o.createElement("a",{href:T,target:"_blank",rel:"noopener noreferrer",draggable:!1,className:"board-card-bookmark__thumb",title:T},U()),z?o.createElement("div",{className:"board-card-bookmark__marker-badge absolute top-1 left-1 z-10 flex items-center justify-center rounded bg-white/90 dark:bg-gray-800/90 px-1 py-0.5 shadow-sm"},Y):null,o.createElement("div",{className:"board-card-bookmark__meta flex items-start gap-2 min-w-0 px-2 py-1.5"},o.createElement("div",{className:"favicon-container w-4 h-4 flex-shrink-0 mt-0.5 relative"},o.createElement("div",{className:"group-hover/sortable:invisible"},L?o.createElement("img",{src:L,className:"w-4 h-4",alt:""}):D?o.createElement(Cm,{storagePath:D}):o.createElement(Ft,{icon:o.createElement(tf,{size:12})})),o.createElement("div",{className:"absolute inset-0 invisible group-hover/sortable:visible flex items-center justify-center text-gray-500 dark:text-gray-400"},o.createElement(VI,{size:14,strokeWidth:1.5}))),o.createElement("div",{className:"flex flex-col min-w-0 flex-1"},o.createElement("a",{href:T,target:"_blank",rel:"noopener noreferrer",draggable:!1,
1931className:`truncate text-sm font-medium text-gray-900 dark:text-gray-100 hover:underline${se}`,title:T},A),o.createElement("span",{className:"truncate text-xs text-gray-500 dark:text-gray-400"},j)),J?o.createElement("div",{className:"self-center flex-shrink-0"},J):null),ce)});Jx.displayName="BookmarkCardItem";const Mb=16,gVe=240;function R4(e,t,n={}){const r=Math.max(1,t),a=Mb,s=new Array(r).fill(0),i=new Map;let l=0;for(const c of e){const u=Math.max(1,Math.min(c.column_span||1,r)),d=Math.max(48,n[c.$id]||gVe);let f=0,m=1/0;for(let g=0;g<=r-u;g+=1){const v=Math.max(...s.slice(g,g+u));v<m&&(m=v,f=g)}i.set(c.$id,{top:m,columnStart:f,columnSpan:u});const h=m+d+a;for(let g=f;g<f+u;g+=1)s[g]=h;l=Math.max(l,h-a)}return{placements:i,containerHeight:l}}function Cte(e,t,n=Mb){const r=Math.max(1,e),a=Math.max(1,t);return r>=a?"100%":`calc((100% - ${(a-1)*n}px) / ${a} * ${r} + ${(r-1)*n}px)`}function Nte(e,t,n=Mb){const r=Math.max(1,t),a=Math.max(0,Math.min(e,r-1));return a===0?"0px":`calc((100% - ${(r-1)*n}px) / ${r} * ${a} + ${a*n}px)`}const vVe=[{id:"full",icon:SIe,title:"Full width"},{id:"fixed",icon:wZ,title:"Fixed size grid"},{id:"fluid",icon:bZ,title:"Fluid grid"},{id:"list",icon:xZ,title:"List view"}],yVe=140,q8=10,bVe=4,wVe=32,EVe=28,Y8=(e,t,n,r=0)=>{const a=e-r;return a<=0?0:Math.floor((a+n)/(t+n))},Yw=Mb,xVe=({cardRect:e,gridRect:t,boardColumns:n,pointerX:r,startCol:a=null,gap:s=Yw})=>{const i=Math.max(1,n),l=(t.width-s*(i-1))/i,c=e.left-t.left,u=a??Math.min(i-1,Math.max(0,Math.floor((c+1)/(l+s)))),d=i-u,f=r-e.left,m=Math.round((f+s)/(l+s));return Math.max(1,Math.min(d,m))},_Ve=({id:e,disabled:t,children:n})=>{const{attributes:r,listeners:a,setNodeRef:s,transform:i,transition:l,isDragging:c}=Ste({id:e,disabled:t}),u={transform:sd.Translate.toString(i),transition:l,opacity:c?.4:1};return o.createElement("div",{ref:s,style:u,className:"group/sortable cursor-grab active:cursor-grabbing",...r,...a},n)},kVe=({items:e,dragEnabled:t,orderMap:n,onReorder:r,cardID:a,containerClass:s,containerStyle:i,children:l})=>{const c=Ab(Pm(qm,{activationConstraint:{distance:6}}));if(!t)return o.createElement("div",{className:s,style:i},e.map((d,f)=>o.createElement(o.Fragment,{key:d.assetID},l(d,f))));const u=d=>{const{active:f,over:m}=d;if(!m||f.id===m.id)return;const h=e.findIndex(k=>k.assetID===f.id),g=e.findIndex(k=>k.assetID===m.id);if(h<0||g<0)return;const v=PS(e,h,g),y=v[g],b=v[g-1],E=v[g+1],w=k=>{var C;return k&&((C=n==null?void 0:n[k.assetID])==null?void 0:C.position_order)!=null?n[k.assetID].position_order:null},x=w(b),S=w(E);let N;x==null&&S==null?N=1:x==null?N=S-1:S==null?N=x+1:N=(x+S)/2,r({cardID:a,assetID:y.assetID,position_order:N})};return o.createElement(Ob,{sensors:c,collisionDetection:rte,onDragEnd:u},o.createElement(N4,{items:e.map(d=>d.assetID),strategy:Ete},o.createElement("div",{className:s,style:i},e.map((d,f)=>o.createElement(_Ve,{key:d.assetID,id:d.assetID,disabled:!1},l(d,f))))))},Rte=({card:e,teamID:t,boardTheme:n,boardColumns:r=3,layoutMode:a="packed",gridRef:s,gridPlacement:i,onHeightChange:l,paneClickCount:c,onEdit:u,onClone:d,onDelete:f,onOpenSettings:m,onEditingChange:h,onReorderBookmark:g,onToggleBookmarkCheck:v,isSettingsTarget:y=!1,isReadOnly:b=!1,isPublic:E=!1})=>{E&&(b=!0);const w=p.useRef(null),x=p.useRef(null),[S,N]=p.useState(!1),[k,C]=p.useState(null),A=p.useRef(1),O=p.useRef(null),T=p.useRef(0),{attributes:M,listeners:L,setNodeRef:D,transform:j,transition:H,isDragging:Y}=Ste({id:e.$id,disabled:b||S}),z=p.useCallback(Ne=>{w.current=Ne,D(Ne)},[D]),K={transform:sd.Translate.toString(j),transition:H,opacity:Y?.5:1},[ee,oe]=p.useState(e.label||""),[J,se]=p.useState(!1),[B,U]=p.useState(!1),[$,ce]=p.useState(!1),[be,ue]=p.useState(0),[Ie,Ae]=p.useState(!1),[he,_e]=p.useState(!1),ie=p.useRef(null),[Ue,ae]=p.useState(!1),[pe,W]=p.useState(null),q=ll();p.useEffect(()=>{const Ne=ie.current;if(!Ne){ae(!1);return}const lt=()=>{const Ke=Ne.firstElementChild;if(!Ke){ae(!1);return}const St=Ke.offsetHeight||0;ae(St>0&&Ne.offsetHeight>St*1.5)};lt();const wt=new ResizeObserver(lt);return wt.observe(Ne),()=>wt.disconnect()}),p.useEffect(()=>{oe(e.label||"")},[e.label]),p.useEffect(()=>
1931(h==null||h(J||B||$),()=>{h==null||h(!1)}),[J,B,$,h]);const te=Ne=>{se(!1);const lt=(Ne||"").trim();if(!lt||lt===e.label){oe(e.label||"");return}u({label:lt})},X=()=>{se(!1),oe(e.label||"")},le=Ne=>{const lt=Array.isArray(e.bookmarks)?e.bookmarks:[];if(lt.find(Ke=>Ke.assetID===Ne.assetID))return;const wt=[...lt,{assetID:Ne.assetID,name:Ne.name,url:Ne.url||""}];u({bookmarks:wt})},me=(Ne,lt)=>{if(lt){const Ke=Array.isArray(e.excluded_bookmark_ids)?e.excluded_bookmark_ids:[];if(Ke.includes(Ne))return;u({excluded_bookmark_ids:[...Ke,Ne]});return}const wt=Array.isArray(e.bookmarks)?e.bookmarks:[];u({bookmarks:wt.filter(Ke=>Ke.assetID!==Ne)})},fe=Ne=>{const lt=Array.isArray(e.excluded_bookmark_ids)?e.excluded_bookmark_ids:[];lt.includes(Ne)&&u({excluded_bookmark_ids:lt.filter(wt=>wt!==Ne)})},ke=(()=>{const Ne=e.card_color||(n==null?void 0:n.card_color);return!Ne||Ne==="#ffffff"?null:Ne})(),Se=Math.max(1,Math.min(e.column_span||1,r||4)),Et=k??Se,nt=e.show_thumbnail!==!1,Pt=e.bookmark_layout||"full",en=e.list_type||"default",hn=Array.isArray(e.bookmarks)?e.bookmarks:[],rt=Array.isArray(e.collection_ids)?e.collection_ids:[],et=Array.isArray(e.tag_ids)?e.tag_ids:[],Kt=rt.length>0||et.length>0,zn=p.useMemo(()=>{const Ne=[];return rt.length&&Ne.push(rt.length>1?"Collections":"Collection"),et.length&&Ne.push(et.length>1?"Tags":"Tag"),Ne.length?`Bookmarks from ${Ne.join(" and ")}`:"Bookmarks from this group"},[rt.length,et.length]),xt=Xo(async()=>{var wt;if(!Kt)return[];if(!((wt=Qe==null?void 0:Qe.base)!=null&&wt.isOpen()))return[];const Ne=new Set(rt),lt=new Set(et);return Qe.base.table("Assets-General-All").filter(Ke=>!Ke||Ke._is_deleted?!1:Ne.size&&Ke.$collection_id&&Ne.has(Ke.$collection_id)?!0:lt.size&&Array.isArray(Ke.tags)?Ke.tags.some(St=>(St==null?void 0:St.$id)&<.has(St.$id)):!1).toArray()},[rt.join("|"),et.join("|"),Kt],[]),rr=Xo(async()=>{var wt;if(!rt.length||!((wt=Qe==null?void 0:Qe.base)!=null&&wt.isOpen()))return[];const Ne=await Qe.base.table("Collections").where("$id").anyOf(rt).toArray(),lt=new Map(Ne.map(Ke=>[Ke.$id,Ke.name]));return rt.map(Ke=>({id:Ke,name:lt.get(Ke)||""}))},[rt.join("|")],[]),ir=Xo(async()=>{var wt;if(!et.length||!((wt=Qe==null?void 0:Qe.base)!=null&&wt.isOpen()))return[];const Ne=await Qe.base.table("Tags").where("$id").anyOf(et).toArray(),lt=new Map(Ne.map(Ke=>[Ke.$id,Ke.name]));return et.map(Ke=>({id:Ke,name:lt.get(Ke)||""}))},[et.join("|")],[]),Tn=e.bookmark_order_map||{},Ct=e.sort_mode||"manual",_r=Array.isArray(e.excluded_bookmark_ids)?e.excluded_bookmark_ids:[],Qn=p.useMemo(()=>{const Ne=new Set,lt=new Set(_r),wt=[];if(hn.forEach(Ke=>{!(Ke!=null&&Ke.assetID)||Ne.has(Ke.assetID)||(Ne.add(Ke.assetID),wt.push({...Ke,isDynamic:!1}))}),(xt||[]).forEach(Ke=>{var St;!(Ke!=null&&Ke.$id)||Ne.has(Ke.$id)||lt.has(Ke.$id)||(Ne.add(Ke.$id),wt.push({assetID:Ke.$id,name:Ke.name||Ke.title||"",url:((St=Ke.active_iteration)==null?void 0:St.url)||Ke.url||"",isDynamic:!0}))}),Ct==="name_asc"||Ct==="name_desc"){const Ke=Ct==="name_asc"?1:-1;return wt.sort((St,ln)=>{const vr=(St.name||"").localeCompare(ln.name||"",void 0,{sensitivity:"base"});return vr!==0?vr*Ke:(St.assetID||"").localeCompare(ln.assetID||"")}),wt}return wt.sort((Ke,St)=>{var Yn,Cn;const ln=((Yn=Tn[Ke.assetID])==null?void 0:Yn.position_order)??Number.MAX_SAFE_INTEGER,vr=((Cn=Tn[St.assetID])==null?void 0:Cn.position_order)??Number.MAX_SAFE_INTEGER;return ln!==vr?ln-vr:(Ke.name||"").localeCompare(St.name||"",void 0,{sensitivity:"base"})}),wt},[hn,xt,Tn,Ct,_r.join("|")]),Ce=p.useMemo(()=>new Set(hn.map(Ne=>Ne==null?void 0:Ne.assetID).filter(Boolean)),[hn]),ut=p.useMemo(()=>(xt||[]).filter(Ne=>(Ne==null?void 0:Ne.$id)&&!Ce.has(Ne.$id)).length,[xt,Ce]),pn=p.useMemo(()=>{const Ne=new Set(_r);return Ne.size?(xt||[]).filter(lt=>(lt==null?void 0:lt.$id)&&Ne.has(lt.$id)&&!Ce.has(lt.$id)).map(lt=>{var wt;return{assetID:lt.$id,name:lt.name||lt.title||"",url:((wt=lt.active_iteration)==null?void 0:wt.url)||lt.url||"",isDynamic:!0,isHidden:!0}}):[]},[xt,_r.join("|"),Ce]),Jt=pn.length,In=p.useMemo(()=>{const Ne=new Map;return(xt||[]).forEach(lt=>{if(!(lt!=null&<.$id))return;const wt=new Set,Ke=new Set;lt.$collection_id&&wt.add(lt.$collection_id),Array.isArray(lt.tags)&<.tags.forEac
1931h(St=>(St==null?void 0:St.$id)&&Ke.add(St.$id)),Ne.set(lt.$id,{collections:wt,tags:Ke})}),Ne},[xt]),Dn=In.size>0;p.useEffect(()=>{if(!pe)return;(pe.type==="collection"?rt.includes(pe.id):et.includes(pe.id))||W(null)},[pe,rt.join("|"),et.join("|")]);const or=p.useCallback((Ne,lt)=>{W(wt=>wt&&wt.type===Ne&&wt.id===lt?null:{type:Ne,id:lt})},[]),Zt=p.useCallback(Ne=>{if(!pe)return!1;const lt=In.get(Ne);return lt?!(pe.type==="collection"?lt.collections:lt.tags).has(pe.id):!0},[pe,In]),tr=(()=>typeof e.width=="number"&&e.width>0?e.width:(n==null?void 0:n.card_size_mode)==="fixed"&&typeof(n==null?void 0:n.card_width)=="number"&&n.card_width>0?n.card_width:null)(),Fe=e.card_masthead||null,st=(Fe==null?void 0:Fe.height)||80,gt=(Fe==null?void 0:Fe.position_y)??50,ht=(()=>typeof e.width=="number"&&e.width>0?e.width:typeof(n==null?void 0:n.card_width)=="number"&&n.card_width>0?n.card_width:160)(),Ee=Math.max(0,be),We=Y8(Ee,yVe,q8,bVe),it=Y8(Ee,ht,q8),_t=We>=2,vn=it>=2,An=p.useMemo(()=>vVe.filter(({id:Ne})=>Ne==="fixed"?_t:Ne==="fluid"?vn:!0),[_t,vn]),je=p.useMemo(()=>b?0:8+An.length*wVe+EVe,[b,An.length]),kt=Pt==="list"?"list":Pt==="full"?"full":"grid",Lt=(()=>{const Ne="board-card__bookmarks";return Pt==="fixed"?`${Ne} ${Ne}--fixed`:Pt==="fluid"?`${Ne} ${Ne}--fluid`:Pt==="list"?`${Ne} ${Ne}--list`:`${Ne} ${Ne}--full`})(),ne=Pt==="fluid"?{"--bookmark-tile-min":`${ht}px`}:void 0,Be=a!=="columns"&&!b&&r>1&&!tr,mt=a==="columns",we=Ne=>{if(!Be||!(s!=null&&s.current)||!w.current||Ne.button!==void 0&&Ne.button!==0)return;Ne.preventDefault(),Ne.stopPropagation();const lt=s.current.getBoundingClientRect(),wt=w.current.getBoundingClientRect(),Ke=Yw,St=(lt.width-Ke*(r-1))/r,ln=wt.left-lt.left;T.current=Math.min(r-1,Math.max(0,Math.floor((ln+1)/(St+Ke)))),A.current=Se,O.current=Se,C(Se),N(!0)};p.useEffect(()=>{if(!S)return;const Ne=wt=>{const Ke=s==null?void 0:s.current,St=w.current;if(!Ke||!St)return;const ln=xVe({cardRect:St.getBoundingClientRect(),gridRect:Ke.getBoundingClientRect(),boardColumns:r,pointerX:wt.clientX,startCol:T.current});O.current!==ln&&(O.current=ln,C(ln))},lt=()=>{const wt=O.current??A.current;N(!1),C(null),O.current=null,wt!==Se&&u({column_span:wt})};return document.addEventListener("mousemove",Ne),document.addEventListener("mouseup",lt),()=>{document.removeEventListener("mousemove",Ne),document.removeEventListener("mouseup",lt)}},[S,r,Se,s,u]),p.useEffect(()=>{if(S)return document.body.classList.add("board-card-column-resize-active"),()=>{document.body.classList.remove("board-card-column-resize-active")}},[S]),p.useEffect(()=>{const Ne=w.current,lt=x.current;if(!Ne)return;const wt=()=>{lt&&ue(lt.clientWidth),l==null||l(e.$id,Ne.getBoundingClientRect().height)};wt();const Ke=new ResizeObserver(()=>wt());return Ke.observe(Ne),lt&&Ke.observe(lt),()=>Ke.disconnect()},[e.$id,l,Et,Pt]),p.useEffect(()=>{b||be<=0||(Pt==="fixed"&&!_t?u({bookmark_layout:"full"}):Pt==="fluid"&&!vn&&u({bookmark_layout:"full"}))},[Pt,_t,vn,be,b,u]);const vt=S?T.current:(i==null?void 0:i.columnStart)??0,It=(i==null?void 0:i.top)??0,fn=mt?{width:"100%",...K,...tr?{width:`${tr}px`,maxWidth:"100%"}:{}}:{position:"absolute",top:It,left:Nte(vt,r,Yw),width:Cte(Et,r,Yw),...K,...tr?{width:`${tr}px`,maxWidth:"100%"}:{}};return o.createElement("div",{ref:z,style:fn,className:`board-card-wrapper${mt?" board-card-wrapper--column-lane":""}${S?" board-card-wrapper--resizing":""}`,"data-card-id":e.$id,"data-column-span":Et},o.createElement(jn,{interactive:!1,elevation:Y||y?qn.THREE:qn.ONE,className:`board-card flex flex-col gap-0 p-0 overflow-hidden bg-white dark:bg-gray-800${B?" board-card--menu-open":""}${S?" board-card--resizing-column":""}${y?" outline outline-1 outline-blue-500 outline-offset-1":""}`,style:ke?{backgroundColor:ke}:void 0},Fe!=null&&Fe.storage_path?o.createElement("div",{className:"board-card__masthead w-full overflow-hidden bg-gray-100 dark:bg-gray-900",style:{height:`${st}px`}},o.createElement(nu,{storagePath:Fe.storage_path,style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:`50% ${gt}%`}})):null,o.createElement("div",{className:"board-card__header flex items-center gap-1 px-3 pt-3 pb-2",style:{"--board-card-header-actions-width":`${je}px`}},b?null:o.createElement("button",{type:"button",className:"board-card__drag flex-shrink-0 text-gray-300 hover:text-gray-500 cursor-grab active:cursor-grabbing",...M,...L,"aria-label":"Drag to reorder"},o.createElement(VI,{size:14})),o.createElement("div",{className:"flex-1 min-w-0 nodrag"},o.createElement(rx,{value:ee,onChange:oe,onConfirm:te,onCancel:X,onEdit:()=>se(!0),isEditing:J,placeholder:"Untitled group",disabled:b,customInputAttributes:{className:`${tW} board-card__label-input`},className:`board-card__label text-sm font-semibold text-gray-900 dark:text-gray-100${J?" board-card__label--editing":""}${q?` ${Xr}`:""}`})),b?null:o.createElement("div",{className:"board-card__header-actions nodrag flex items-center shrink-0"},o.createElement("div",{className:"board-card__layout-toggle view-toggle flex items-center shrink-0 gap-3"},An.map(({id:Ne,icon:lt,title:wt})=>o.createElement(De,{key:Ne,variant:"minimal",icon:o.createElement(lt,{size:16,strokeWidth:1}),active:Pt===Ne,onClick:()=>{Pt!==Ne&&u({bookmark_layout:Ne})},title:wt,"aria-label":wt,className:"board-card__layout-button dark__text"})),o.createElement(Hr,{isOpen:B,onClose:()=>U(!1),onInteraction:Ne=>U(Ne),position:va.BOTTOM_RIGHT,minimal:!0,content:o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(eu,{size:14}),text:"Edit label",onClick:()=>{U(!1),requestAnimationFrame(()=>se(!0))}}),o.createElement(Bt,{icon:o.createElement(Mg,{size:14}),text:"Clone",onClick:()=>{U(!1),d()}}),o.createElement(Bt,{icon:o.createElement(aL,{size:14}),text:"Sort bookmarks"},[{id:"manual",label:"Default"},{id:"name_asc",label:"Name A-Z"},{id:"name_desc",label:"Name Z-A"}].map(Ne=>o.createElement(Bt,{key:Ne.id,text:Ne.label,icon:Ct===Ne.id?"tick":"blank",onClick:()=>{U(!1),Ct!==Ne.id&&u({sort_mode:Ne.id})}}))),o.createElement(Bt,{icon:o.createElement(hb,{size:14}),text:"Settings",onClick:()=>{U(!1),m()}}),o.createElement(Zi,null),o.createElement(Bt,{icon:o.createElement(tu,{size:14}),text:"Delete group",className:"dark__text",onClick:()=>{U(!1),ce(!0)}}))},o.createElement("button",{type:"button",className:"board-card__menu-button flex-shrink-0 p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700 nodrag","aria-label":"Group actions"},o.createElement(Pg,{size:14})))))),o.createElement("div",{ref:x,className:"board-card__body flex flex-col gap-2 px-3 pb-3"},Qn.length>0?o.createElement(kVe,{items:Qn,dragEnabled:!b&&Ct==="manual"&&!!g,orderMap:Tn,onReorder:g,cardID:e.$id,containerClass:Lt,containerStyle:ne},(Ne,lt)=>{var wt;return o.createElement(Jx,{assetID:Ne.assetID,fallbackName:Ne.name,fallbackUrl:Ne.url,dimmed:Zt(Ne.assetID),showThumbnail:nt,layout:kt,listType:en,listIndex:lt+1,toggleShowLabel:e.toggle_show_label===!0,toggleEnabledLabel:e.toggle_enabled_label??"On",toggleDisabledLabel:e.toggle_disabled_label??"Off",checked:E?!!Ne.checked:!!((wt=Tn[Ne.assetID])!=null&&wt.checked),onToggleCheck:b||en!=="checkboxes"&&en!=="toggle"?void 0:Ke=>v==null?void 0:v({cardID:e.$id,assetID:Ne.assetID,checked:Ke,bookmarkName:Ne.name,bookmarkUrl:Ne.url,listType:en}),onRemove:b?void 0:Ke=>me(Ke,Ne.isDynamic),isHostMode:b,isPublic:E,publicFaviconUrl:Ne.favicon_url,publicThumbnailUrl:Ne.thumbnail_signed_url,publicHostname:Ne.hostname})}):o.createElement("div",{className:"text-xs text-gray-400 dark:text-gray-500 italic py-1 ml-4"},Kt?"No bookmarks match the selected collections or tags yet.":"No bookmarks yet."),!b&&Ie&&pn.length>0?o.createElement("div",{className:`${Lt} board-card__bookmarks--hidden`,style:ne},o.createElement("div",{className:"text-xs text-gray-600 dark:text-gray-300 mb-1"},"Bookmarks removed from auto includes."),pn.map((Ne,lt)=>{var wt;return o.createElement(Jx,{key:`hidden-${Ne.assetID}`,assetID:Ne.assetID,fallbackName:Ne.name,fallbackUrl:Ne.url,dimmed:Zt(Ne.assetID),showThumbnail:nt,layout:kt,listType:en,listIndex:lt+1,toggleShowLabel:e.toggle_show_label===!0,toggleEnabledLabel:e.toggle_enabled_label??"On",toggleDisabledLabel:e.toggle_disabled_label??"Off",checked:!!((wt=Tn[Ne.assetID])!=null&&wt.checked),isHidden:!0,onRestore:fe})})):null,!b||Kt?o.createElement("div",{className:`board-card__footer flex justify-between gap-3 ${Ue?"items-start pt-2":"items-center"}`},b?o.createElement("span",null):o.createElement("div",{className:"nodrag flex-shrink-0"},o.createElement(Fee,{teamID:t,currentBookmarks:hn,onSelectBookmark:le})),Kt?o.createElement("div",{ref:ie,className:`board-card__filters flex items-center flex-wrap justify-end gap-x-3 gap-y-1 text-xs text-gray-600 dark:text-gray-400 min-w-0 ${Ue?"pt-2":""}`},(rr||[]).map(Ne=>{const lt=(pe==null?void 0:pe.type)==="collection"&&pe.id===Ne.id;return o.createElement("button",{key:`col-${Ne.id}`,type:"button",disabled:!Dn,onClick:()=>or("collection",Ne.id),className:`nodrag flex items-center gap-1.5 min-w-0 rounded px-1 -mx-1 transition-colors ${Dn?"cursor-pointer hover:text-gray-800 dark:hover:text-gray-200":"cursor-default"}
1931 ${lt?"text-blue-600 dark:text-blue-400 font-semibold bg-blue-50 dark:bg-blue-900/40":""}`,title:Dn?lt?"Clear spotlight":"Spotlight this collection's bookmarks":void 0,"aria-pressed":lt},o.createElement(tS,{size:14,strokeWidth:1.5,className:"flex-shrink-0"}),o.createElement("span",{className:"truncate"},Ne.name||"Collection"))}),(ir||[]).map(Ne=>{const lt=(pe==null?void 0:pe.type)==="tag"&&pe.id===Ne.id;return o.createElement("button",{key:`tag-${Ne.id}`,type:"button",disabled:!Dn,onClick:()=>or("tag",Ne.id),className:`nodrag flex items-center gap-1.5 min-w-0 rounded px-1 -mx-1 transition-colors ${Dn?"cursor-pointer hover:text-gray-800 dark:hover:text-gray-200":"cursor-default"} ${lt?"text-blue-600 dark:text-blue-400 font-semibold bg-blue-50 dark:bg-blue-900/40":""}`,title:Dn?lt?"Clear spotlight":"Spotlight this tag's bookmarks":void 0,"aria-pressed":lt},o.createElement(Gm,{size:14,strokeWidth:1.5,className:"flex-shrink-0"}),o.createElement("span",{className:"truncate"},Ne.name||"Tag"))}),!b&&Jt>0?o.createElement(Hr,{minimal:!0,position:va.BOTTOM_RIGHT,isOpen:he,onInteraction:Ne=>_e(Ne),popoverClassName:q?Xr:void 0,content:o.createElement("div",{className:"p-2 w-56"},o.createElement(ds,{checked:Ie,label:"Show hidden bookmarks",onChange:Ne=>{Ae(Ne.currentTarget.checked),_e(!1)},className:"mb-0"}))},o.createElement("button",{type:"button",className:"nodrag inline-flex items-center gap-1 flex-shrink-0 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",title:zn},o.createElement("span",null,"(",ut-Jt,"/",ut,")"),o.createElement(eS,{size:14,className:`transition-transform ${Ie?"rotate-180":""}`}))):null):null):null),Be?o.createElement("div",{className:"board-card__resize-handle nodrag",onMouseDown:we,role:"separator","aria-orientation":"vertical","aria-label":"Resize group width",title:"Drag to resize"},o.createElement("div",{className:"board-card__resize-handle-line"}
1931)):null),o.createElement(xg,{isOpen:$,canEscapeKeyCancel:!0,canOutsideClickCancel:!0,cancelButtonText:"Cancel",confirmButtonText:"Delete group",intent:"danger",onCancel:()=>ce(!1),onConfirm:()=>{ce(!1),f()}},o.createElement("p",null,'Delete "',e.label||"this group",`"? This can't be undone.`)))},BO=12,Kw={PACKED:"packed",COLUMNS:"columns"};function jO(e){const t=Math.max(1,Math.min(e,4)),n=Math.floor(BO/t),r=Array(t).fill(n);let a=BO-n*t;for(let s=0;s<a;s+=1)r[s]+=1;return r}function SVe(e,t){const n=Math.max(1,Math.min(e,4));if(!Array.isArray(t)||t.length!==n)return jO(n);const r=t.map(s=>Math.max(1,Math.round(Number(s)||1)));return r.reduce((s,i)=>s+i,0)!==BO?jO(n):r}function $h(e={}){const t=Math.max(1,Math.min(e.columns||3,4)),n=e.layout_mode===Kw.COLUMNS?Kw.COLUMNS:Kw.PACKED,r=SVe(t,e.column_tracks);return{...e,columns:t,layout_mode:n,column_tracks:r}}function Zw(e){return $h(e).layout_mode===Kw.COLUMNS}function T4(e,t){const n=Math.max(1,t),r=Array.from({length:n},()=>[]);return(e||[]).forEach(a=>{const s=Math.max(0,Math.min(a.column_index??0,n-1));r[s].push(a)}),r.forEach(a=>a.sort((s,i)=>(s.position_order??0)-(i.position_order??0))),r}function CVe(e,t,n={}){const{placements:r}=R4(e,t,n),a=Array.from({length:t},()=>[]);return(e||[]).forEach(s=>{const i=r.get(s.$id),l=Math.max(0,Math.min((i==null?void 0:i.columnStart)??0,t-1));a[l].push({card:s,top:(i==null?void 0:i.top)??0})}),a.forEach(s=>s.sort((i,l)=>i.top-l.top)),(e||[]).map(s=>{const i=r.get(s.$id),l=Math.max(0,Math.min((i==null?void 0:i.columnStart)??0,t-1)),c=a[l].findIndex(u=>u.card.$id===s.$id);return{...s,column_index:l,position_order:Math.max(0,c)}})}function NVe(e,t){return T4(e,t).flat().map((r,a)=>({...r,position_order:a}))}function RVe(e,t,n,r){if(!t||!n||t===n)return null;const a=e.find(g=>g.$id===t);if(!a)return null;const s=Math.max(1,...e.map(g=>(g.column_index??0)+1)),i=Math.max(1,Number.isFinite(r)?r:s);let l=a.column_index??0,c=null;if(String(n).startsWith("lane-")){if(l=parseInt(String(n).replace("lane-",""),10),Number.isNaN(l))return null;l=Math.max(0,Math.min(l,i-1)),c=null}else{const g=e.find(y=>y.$id===n);if(!g)return null;l=Math.max(0,Math.min(g.column_index??0,i-1));const v=e.filter(y=>(y.column_index??0)===l&&y.$id!==t).sort((y,b)=>(y.position_order??0)-(b.position_order??0));c=v.findIndex(y=>y.$id===n),c<0&&(c=v.length)}const u=a.column_index??0,d=e.map(g=>({...g})),f=g=>d.filter(v=>(v.column_index??0)===g&&v.$id!==t).sort((v,y)=>(v.position_order??0)-(y.position_order??0)),m=f(l),h={...a,column_index:l};return c===null?m.push(h):m.splice(c,0,h),m.forEach((g,v)=>{const y=d.findIndex(b=>b.$id===g.$id);y>=0&&(d[y]={...d[y],column_index:l,position_order:v})}),u!==l&&f(u).forEach((g,v)=>{const y=d.findIndex(b=>b.$id===g.$id);y>=0&&(d[y]={...d[y],position_order:v})}),d}function TVe(e,t,n){const r=[...e],a=t;if(a<0||a>=r.length-1)return e;const s=Math.max(-r[a]+1,Math.min(n,r[a+1]-1));return s?(r[a]+=s,r[a+1]-=s,r):e}const AVe=({laneIndex:e,trackUnits:t,cardIds:n,children:r})=>{const{setNodeRef:a,isOver:s}=MS({id:`lane-${e}`});return o.createElement("div",{ref:a,className:`board-column-lane flex flex-col gap-3 min-w-0${s?" board-column-lane--over":""}`,style:{flex:`${t} 1 0`},"data-lane-index":e},o.createElement(N4,{items:n,strategy:Ete},r))},IVe=({onMouseDown:e})=>o.createElement("div",{className:"board-column-divider shrink-0",onMouseDown:e,role:"separator","aria-orientation":"vertical","aria-label":"Resize columns"},o.createElement("div",{className:"board-column-divider__line"})),OVe=({cards:e,columnTracks:t,boardTheme:n,teamID:r,gridRef:a,paneClickCount:s,onEdit:i,onClone:l,onDelete:c,onOpenSettings:u,onEditingChange:d,onReorder:f,onReorderBookmark:m,onToggleBookmarkCheck:h,settingsCardID:g,onColumnTracksChange:v,isReadOnly:y=!1})=>{const b=t.length,E=p.useMemo(()=>T4(e,b),[e,b]),w=Ab(Pm(qm,{activationConstraint:{distance:4}})),[x,S]=p.useState(!1),[N,k]=p.useState(!1),C=p.useRef(null),A=L=>{S(!1);const{active:D,over:j}=L;if(!j)return;const H=RVe(e,D.id,j.id,b);H&&(f==null||f(H))},O=(L,D)=>{var j;y||!v||(D.preventDefault(),D.stopPropagation(),C.current={dividerIndex:L,startX:D.clientX,startTracks:[...t],containerWidth:((j=a==null?void 0:a.current)==null?void 0:j.getBoundingClientRect().width)||1},k(!0))};p.useEffect(()=>{if(!N)return;const L=j=>{const H=C.current;if(!H)return;const Y=H.containerWidth/12,z=Math.round((j.clientX-H.startX)/Y);if(!z)return;const K=TVe(H.startTracks,H.dividerIndex,z);K!==H.startTracks&&(v==null||v(K),C.current={...H,startTracks:K,startX:j.clientX})},D=()=>{C.current=null,k(!1)};return document.addEventListener("mousemove",L),document.addEventListener("mouseup",D),document.body.classList.add("board-column-resize-active"),()=>{document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",D),document.body.classList.remove("board-column-resize-active")}},[N,v]);const T=p.useCallback(L=>o.createElement(Rte,{key:L.$id,card:L,teamID:r,boardTheme:n,boardColumns:b,layoutMode:"columns",gridRef:a,paneClickCount:s,onEdit:D=>i==null?void 0:i(L.$id,D),onClone:()=>l==null?void 0:l(L.$id),onDelete:()=>c==null?void 0:c(L.$id),onOpenSettings:()=>u==null?void 0:u(L.$id),onEditingChange:D=>d==null?void 0:d(L.$id,D),onReorderBookmark:m,onToggleBookmarkCheck:h,isSettingsTarget:L.$id===g,isReadOnly:y}),[r,n,b,m,h,g,a,s,i,l,c,u,d,y]),M=[];for(let L=0;L<b;L+=1){const D=E[L]||[],j=D.map(H=>H.$id);M.push(o.createElement(AVe,{key:`lane-${L}`,laneIndex:L,trackUnits:t[L],cardIds:j},D.map(H=>T(H)))),L<b-1&&!y&&M.push(o.createElement(IVe,{key:`divider-${L}`,onMouseDown:H=>O(L,H)}))}return o.createElement(Ob,{sensors:w,collisionDetection:Bze,onDragStart:()=>S(!0),onDragCancel:()=>S(!1),onDragEnd:A},o.createElement("div",{ref:a,className:`board-column-lanes${x?" board-column-lanes--dragging":""}`},M))},MVe=Ir(xr()),PVe=250,K8=200,Z8=480,DVe="720px",LVe="360px",$Ve=({isOpen:e,onClose:t,boardID:n,theme:r,onThemeChange:a,masthead:s,onMastheadChange:i})=>
1931{const l=ll(),[c,u]=p.useState(r);p.useEffect(()=>{u(r)},[r,e]);const d=p.useRef(null),f=p.useRef({}),m=async()=>{const k=f.current;if(f.current={},!!Object.keys(k).length)try{await pt(MVe,Ze("users-board-manage-edit"))({board:{$id:n,property_theme:k}})}catch(C){console.error("Failed to save board settings:",C),re.dispatch("trigger-alert",{message:"Couldn't save board settings. Try again.",intent:"danger"})}},h=k=>{u(C=>({...C,...k})),a(k),f.current={...f.current,...k},d.current&&clearTimeout(d.current),d.current=setTimeout(m,PVe)},g=()=>{d.current&&(clearTimeout(d.current),d.current=null),m(),t()},v=(c==null?void 0:c.columns)||3,y=(c==null?void 0:c.layout_mode)||"packed",b=Array.isArray(c==null?void 0:c.column_tracks)?c.column_tracks:null,E=(c==null?void 0:c.card_size_mode)||"fluid",w=(c==null?void 0:c.card_width)||320,x=(c==null?void 0:c.background_color)||"#ffffff",S=(c==null?void 0:c.card_color)||"#ffffff",N=p.useMemo(()=>Math.round((Z8-K8)/4),[]);return o.createElement(Bp,{isOpen:e,onClose:g,isCloseButtonShown:!1,className:l?Xr:void 0,title:o.createElement("div",{className:"flex items-center justify-between gap-2 w-full min-w-0"},o.createElement("span",{className:"truncate"},"Board settings"),o.createElement("div",{className:"flex items-center gap-1 shrink-0"},o.createElement(De,{text:"Done",small:!0,onClick:g}),o.createElement(De,{"aria-label":"Close",icon:"cross",variant:"minimal",small:!0,onClick:g}))),size:DVe,position:va.RIGHT,hasBackdrop:!1,enforceFocus:!1,canEscapeKeyClose:!0,canOutsideClickClose:!1},o.createElement("div",{className:"board-settings-drawer flex h-full min-h-0"},o.createElement("div",{className:"board-settings-drawer__settings flex-1 min-w-0 p-4 flex flex-col gap-4 overflow-y-auto"},o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",label:"Layout",helperText:y==="columns"?"Drag groups between columns. Resize lanes on the board.":"Groups auto-pack into the shortest column."},o.createElement(Gv,{selectedValue:y,onChange:k=>h({layout_mode:k.currentTarget.value}),className:"flex gap-4"},o.createElement(Hc,{label:"Auto pack",value:"packed"}),o.createElement(Hc,{label:"Column lanes",value:"columns"}))),o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",label:"Columns",labelFor:"board-settings-columns"},o.createElement(Ko,{id:"board-settings-columns",className:"input-group-no-margin",value:v,onChange:k=>h({columns:Number(k.target.value)||3}),options:[{label:"1 column",value:1},{label:"2 columns",value:2},{label:"3 columns",value:3},{label:"4 columns",value:4}],fill:!0})),y==="columns"&&(b!=null&&b.length)?o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",label:"Lane widths",helperText:`${b.join(" + ")} = 12 grid units. Drag dividers on the board to adjust.`},o.createElement("div",{className:"flex flex-wrap gap-2"},b.map((k,C)=>o.createElement("span",{key:`lane-${C}`,className:"text-xs font-mono px-2 py-1 rounded border border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400"},"Lane ",C+1,": ",k)))):null,o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",label:"Group size"},o.createElement(Gv,{inline:!0,selectedValue:E,onChange:k=>h({card_size_mode:k.currentTarget.value})},o.createElement(Hc,{label:"Fluid",value:"fluid"}),o.createElement(Hc,{label:"Fixed",value:"fixed"}))),E==="fixed"?o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",label:"Group width",helperText:`${w}px`},o.createElement(sx,{min:K8,max:Z8,stepSize:10,labelStepSize:N,value:w,onChange:k=>h({card_width:k})})):null,o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0 items",label:"Background"},o.createElement("div",{className:"flex items-center gap-2"},o.createElement("input",{type:"color",value:x,onChange:k=>h({background_color:k.target.value}),className:"h-8 w-12 cursor-pointer rounded border border-gray-300 dark:border-gray-700 m-0"}),o.createElement("span",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono"},x.toUpperCase()))),o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",label:"Group color"},o.createElement("div",{className:"flex items-center gap-2"},o.createElement("input",{type:"color",value:S,onChange:k=>h({card_color:k.target.value}),className:"h-8 w-12 cursor-pointer rounded border border-gray-300 dark:border-gray-700 m-0"}),o.createElement("span",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono"},S.toUpperCase())))),o.createElement("div",{className:"board-settings-drawer__masthead flex-shrink-0 pr-4 pt-4 overflow-y-auto",style:{width:LVe}},o.createElement(Zee,{documentType:"board",documentID:n,masthead:s,onMastheadChange:i}))))},lN=360,FVe=Ir(xr()),zVe=250,X8=200,Q8=600,HVe=({isOpen:e,onClose:t,boardID:n,card:r,boardTheme:a,teamID:s,onLocalPatch:i,onOpenBoardSettings:l})=>{var W;const c=p.useRef(null),u=p.useRef({}),[d,f]=p.useState(r),[m,h]=p.useState(s||null),g=ll(),v=p.useRef(null),y=p.useRef(null),[b,E]=p.useState(()=>typeof window>"u"?{x:24,y:72}:{x:Math.max(16,window.innerWidth-lN-24),y:72}),[w,x]=p.useState(!1),S=q=>{q.button!==0||q.target.closest("button")||(q.preventDefault(),y.current={startX:q.clientX,startY:q.clientY,originX:(b==null?void 0:b.x)??0,originY:(b==null?void 0:b.y)??0},x(!0))};p.useEffect(()=>{if(!w)return;const q=X=>{var Se;const le=y.current;if(!le)return;const me=((Se=v.current)==null?void 0:Se.offsetWidth)||lN,fe=Math.min(Math.max(8,le.originX+(X.clientX-le.
1931startX)),window.innerWidth-me-8),ke=Math.min(Math.max(8,le.originY+(X.clientY-le.startY)),window.innerHeight-44);E({x:fe,y:ke})},te=()=>x(!1);return document.addEventListener("mousemove",q),document.addEventListener("mouseup",te),()=>{document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",te)}},[w]);const N=Wn(q=>{var te;return(te=q==null?void 0:q.FB)==null?void 0:te.auth}),k=p.useMemo(()=>{var q;return((q=N==null?void 0:N.globalMeta)==null?void 0:q.teams)||[]},[(W=N==null?void 0:N.globalMeta)==null?void 0:W.teams]),C=p.useMemo(()=>!!k.find(q=>(q.id===s||q.$id===s)&&q.is_personal),[k,s]),A=k.length>1,O=C&&A;p.useEffect(()=>{f(r)},[r==null?void 0:r.$id,e]),p.useEffect(()=>{e&&h(s||null)},[r==null?void 0:r.$id,e,s]);const T=async()=>{const q=u.current;if(u.current={},!!Object.keys(q).length&&r!=null&&r.$id&&!(typeof r.$id=="string"&&r.$id.startsWith("tmp-")))try{await pt(FVe,Ze("users-board-card-edit"))({board:{$id:n},card:{$id:r.$id,...q}})}catch(te){console.error("Failed to save card settings:",te),re.dispatch("trigger-alert",{message:"Couldn't save group settings. Try again.",intent:"danger"})}},M=q=>{f(te=>({...te||{},...q})),i==null||i(q),u.current={...u.current,...q},c.current&&clearTimeout(c.current),c.current=setTimeout(T,zVe)},L=()=>{c.current&&(clearTimeout(c.current),c.current=null),T(),t()},D=Math.max(1,Math.min((a==null?void 0:a.columns)||3,4)),j=Math.max(1,Math.min((d==null?void 0:d.column_span)||1,D)),H=typeof(d==null?void 0:d.width)=="number"&&d.width>0,Y=H?d.width:320,z=(d==null?void 0:d.show_thumbnail)!==!1,K=(d==null?void 0:d.list_type)||"default",ee=(d==null?void 0:d.toggle_show_label)===!0,oe=(d==null?void 0:d.toggle_enabled_label)??"On",J=(d==null?void 0:d.toggle_disabled_label)??"Off",se=!!(d!=null&&d.card_color),B=(d==null?void 0:d.card_color)||(a==null?void 0:a.card_color)||"#ffffff",U=p.useMemo(()=>Array.from({length:D},(q,te)=>({label:te===0?"1 column":`${te+1} columns`,value:te+1})),[D]),$=Xo(async()=>{var q;return(q=Qe==null?void 0:Qe.base)!=null&&q.isOpen()?Qe.base.table("Collections").orderBy("name").toArray():[]},[e],[]),ce=Xo(async()=>{var q;return(q=Qe==null?void 0:Qe.base)!=null&&q.isOpen()?Qe.base.table("Tags").orderBy("name").toArray():[]},[e],[]),be=q=>{var te;return((te=k.find(X=>X.id===q||X.$id===q))==null?void 0:te.name)||"Workspace"},ue=(q,te)=>C?!te||te==="all"?q:q.filter(X=>!X.$team_id||X.$team_id===te):s?q.filter(X=>!X.$team_id||X.$team_id===s):q,Ie=(q,te)=>{const X=O&&q.$team_id?be(q.$team_id):null;return{value:q.$id,label:q.name||te,teamID:q.$team_id||null,sublabel:X}},Ae=p.useMemo(()=>ue($||[],m).map(q=>Ie(q,"Untitled collection")),[$,m,O,C,s,k]),he=p.useMemo(()=>ue(ce||[],m).map(q=>Ie(q,"Untitled tag")),[ce,m,O,C,s,k]),_e=p.useMemo(()=>(Array.isArray(d==null?void 0:d.collection_ids)?d.collection_ids:[]).map(te=>{const X=($||[]).find(le=>le.$id===te);return X?Ie(X,"Untitled collection"):{value:te,label:"Unknown collection",teamID:null}}),[d==null?void 0:d.collection_ids,$,O,k]),ie=p.useMemo(()=>(Array.isArray(d==null?void 0:d.tag_ids)?d.tag_ids:[]).map(te=>{const X=(ce||[]).find(le=>le.$id===te);return X?Ie(X,"Untitled tag"):{value:te,label:"Unknown tag",teamID:null}}),[d==null?void 0:d.tag_ids,ce,O,k]),Ue=q=>!O||!(q!=null&&q.sublabel)?q.label:o.createElement("div",{className:"flex items-center justify-between gap-2"},o.createElement("span",{className:"truncate"},q.label),o.createElement("span",{className:"text-[10px] uppercase tracking-wide text-gray-400 dark:text-gray-500 shrink-0"},q.sublabel)),ae=p.useMemo(()=>{const q={menuPortal:Se=>({...Se,zIndex:9999})};if(!g)return q;const te="#2d243e",X="#3e2d5a",le="#f0e9f9",me="#9a8fb0",fe="rgb(49 46 129)",ke="#3a2d54";return{...q,control:(Se,Et)=>({...Se,backgroundColor:te,borderColor:Et.isFocused?"#6d5a9c":X,boxShadow:Et.isFocused?"0 0 0 1px #6d5a9c":"none","&:hover":{borderColor:"#6d5a9c"}}),menu:Se=>({...Se,backgroundColor:te,border:`1px solid ${X}`}),menuList:Se=>({...Se,backgroundColor:te}),option:(Se,Et)=>({...Se,backgroundColor:Et.isFocused?ke:"transparent",color:le,"&:active":{backgroundColor:ke}}),multiValue:Se=>({...Se,backgroundColor:fe}),multiValueLabel:Se=>({...Se,color:le}),multiValueRemove:Se=>({...Se,color:le,"&:hover":{backgroundColor:"#4a3a73",color:le}}
1931),input:Se=>({...Se,color:le}),singleValue:Se=>({...Se,color:le}),placeholder:Se=>({...Se,color:me}),dropdownIndicator:Se=>({...Se,color:me,"&:hover":{color:le}}),clearIndicator:Se=>({...Se,color:me,"&:hover":{color:le}}),indicatorSeparator:Se=>({...Se,backgroundColor:X}),noOptionsMessage:Se=>({...Se,color:me})}},[g]),pe=p.useMemo(()=>{const q=k.map(te=>({value:te.id||te.$id,label:te.name||"Workspace"}));return O&&q.unshift({value:"all",label:"All workspaces"}),q},[k,O]);return!e||!r?null:o.createElement("div",{ref:v,className:`card-settings-panel ${g?Xr:""} fixed z-40 flex flex-col rounded-lg border shadow-2xl`,style:{left:b.x,top:b.y,width:lN,maxWidth:"calc(100vw - 24px)",maxHeight:"calc(100vh - 96px)",backgroundColor:g?"#211a36":"#ffffff",borderColor:g?"#3e2d5a":"#e5e7eb"}},o.createElement("div",{className:"card-settings-panel__header flex items-center justify-between gap-2 px-4 py-3 border-b cursor-move select-none",style:{borderColor:g?"#3e2d5a":"#e5e7eb"},onMouseDown:S},o.createElement("div",{className:"min-w-0 flex flex-col"},o.createElement("span",{className:"text-sm font-semibold text-gray-900 dark:text-gray-100 leading-tight"},"Group settings"),o.createElement("span",{className:"text-xs text-gray-500 dark:text-gray-400 truncate leading-tight"},r.label||"Untitled group")),o.createElement("div",{className:"flex items-center gap-1 shrink-0"},o.createElement(De,{text:"Done",small:!0,onClick:L}),o.createElement(De,{"aria-label":"Close",icon:"cross",onClick:L,variant:"minimal",small:!0}))),o.createElement("div",{className:"card-settings-drawer p-4 flex flex-col overflow-y-auto"},o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",contentClassName:"flex-1 min-w-0",label:"Column span",labelFor:"card-settings-column-span",helperText:D<4?o.createElement(o.Fragment,null,o.createElement("span",{className:"flex items-center gap-1"},o.createElement("span",null,"Board set to"),l?o.createElement("button",{type:"button",className:"text-blue-600 dark:text-blue-400 hover:underline cursor-pointer bg-transparent border-0 p-0 font-inherit",onClick:l},D," columns."):null)):void 0},o.createElement(Ko,{id:"card-settings-column-span",className:"input-group-no-margin",value:j,onChange:q=>M({column_span:Number(q.target.value)||1}),options:U,fill:!0})),o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0",contentClassName:"flex-1 min-w-0",label:"List type",labelFor:"card-settings-list-type"},o.createElement(Ko,{id:"card-settings-list-type",className:"input-group-no-margin",value:K,onChange:q=>{const te=q.target.value,X={list_type:te};te!=="default"&&((d==null?void 0:d.bookmark_layout)||"full")==="full"&&(X.bookmark_layout="list"),M(X)},options:[{label:"Default (list of links)",value:"default"},{label:"Bulleted",value:"bulleted"},{label:"Numbered",value:"numbered"},{label:"Checkboxes",value:"checkboxes"},{label:"Toggle",value:"toggle"}],fill:!0})),K==="toggle"?o.createElement(Ra,{label:"Toggle options"},o.createElement(ds,{checked:ee,label:"Show label",onChange:q=>M({toggle_show_label:q.currentTarget.checked})}),ee?o.createElement("div",{className:"flex flex-col gap-3 mt-1"},o.createElement(Ra,{label:"Disabled state",labelFor:"card-settings-toggle-disabled",className:"mb-0"},o.createElement(Cs,{id:"card-settings-toggle-disabled",value:J,maxLength:40,onChange:q=>M({toggle_disabled_label:q.target.value})})),o.createElement(Ra,{label:"Enabled state",labelFor:"card-settings-toggle-enabled",className:"mb-0"},o.createElement(Cs,{id:"card-settings-toggle-enabled",value:oe,maxLength:40,onChange:q=>M({toggle_enabled_label:q.target.value})}))):null):null,o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0 m-0",label:"Thumbnails"},o.createElement(ds,{checked:z,label:z?"Show thumbnails":"Hide thumbnails",onChange:q=>M({show_thumbnail:q.currentTarget.checked})})),o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0 mb-1",label:"Fixed width"},o.createElement(ds,{checked:H,label:H?"Override board width":"Follow board width",onChange:q=>M({width:q.currentTarget.checked?Y:null})}),H?o.createElement(sx,{min:X8,max:Q8,stepSize:10,labelStepSize:Math.round((Q8-X8)/4)||100,value:Y,onChange:q=>M({width:q})}):null),O?o.createElement(Ra,{label:"Workspace",labelFor:"card-settings-workspace",helperText:"Filters the collection and tag pickers below. Existing selections are kept."},o.createElement(Ko,{id:"card-settings-workspace",value:m||"",onChange:q=>h(q.target.value||s||null),options:pe,fill:!0})):null,o.createElement(Ra,{inline:!0,fill:!0,className:"[&>label]:min-w-[100px] [&>label]:shrink-0 m-0",label:"Group color"},o.createElement(ds,{checked:se,label:se?"Override board color":"Follow board color",onChange:q=>M({card_color:q.currentTarget.checked?B:null})}),se?o.createElement("div",{className:"flex items-center gap-2 mt-2"},o.createElement("input",{type:"color",value:B,onChange:q=>M({card_color:q.target.value}),className:"h-8 w-12 cursor-pointer rounded border border-gray-300 dark:border-gray-700"}),o.createElement("span",{className:"text-xs text-gray-600 dark:text-gray-400 font-mono"},B.toUpperCase())):null),o.createElement(Ra,{label:"Collections",helperText:"Automatically add bookmarks from the collection."},o.createElement(km,{isMulti:!0,options:Ae,value:_e,formatOptionLabel:Ue,onChange:q=>M({collection_ids:(q||[]).map(te=>te.value)}),placeholder:"Search collections...",classNamePrefix:"select-collection",menuPortalTarget:document.body,styles:ae})),o.createElement(Ra,{label:"Tags",helperText:"Automatically add bookmarks from the tag."},o.createElement(km,{isMulti:!0,options:he,value:ie,formatOptionLabel:Ue,onChange:q=>M({tag_ids:(q||[]).map(te=>te.value)}),placeholder:"Search tags...",classNamePrefix:"select-tag",menuPortalTarget:document.body,styles:ae}))))},J8={background_color:"#ffffff",card_color:"#ffffff",columns:3,card_size_mode:"fluid",card_width:null,layout_mode:"packed",column_tracks:null},Pi=Ir(xr()),VVe=({boardID:e,teamID:t,onPaneClick:n,onBoardTitleChanged:r,onBoardDeleted:a,onBoardCloned:s})=>{var st,gt,ht;const i=yr(),l=hs(),c=Wn(Ee=>{var We;return(We=Ee==null?void 0:Ee.FB)==null?void 0:We.auth}),[u,d]=p.useState(null),[f,m]=p.useState([]),[h,g]=p.useState(!0),[v,y]=p.useState(!1),[b,E]=p.useState(0),[w,x]=p.useState(!1),[S,N]=p.useState(""),[k,C]=p.useState(!1),[A,O]=p.useState(!1),[T,M]=p.useState(!1),[L,D]=p.useState(!1),[j,H]=p.useState(!1),[Y,z]=p.useState(!1),[K,ee]=p.useState(null),oe=ll(),[J,se]=p.useState(!1),B=p.useRef(null),[U,$]=p.useState({}),ce=p.useCallback((Ee,We)=>{const it=Math.round(We);$(_t=>_t[Ee]===it?_t:{..._t,[Ee]:it})},[]),[be,ue]=p.useState(!1),Ie=p.useRef(new Set),Ae=p.useRef(0);p.useEffect(()=>{var Ee;!((Ee=l.state)!=null&&Ee.openShare)||!e||(z(!0),i(l.pathname,{replace:!0,state:{}}))}
1931,[l.pathname,l.state,e,i]);const he=p.useCallback((Ee,We)=>{if(!Ee)return;const it=Ie.current;We?it.add(Ee):it.delete(Ee)},[]),_e=p.useCallback(async Ee=>{Ae.current+=1;try{return await Ee()}finally{Ae.current=Math.max(0,Ae.current-1)}},[]),ie=p.useCallback((Ee,We=null)=>{const it=Ee.filter(_t=>_t.$id&&!String(_t.$id).startsWith("tmp-")).map(_t=>({$id:_t.$id,position_order:_t.position_order,column_index:_t.column_index??0}));return it.length?_e(()=>pt(Pi,Ze("users-board-card-bulkUpdate"))({board:{$id:e},cards:it})).catch(_t=>{console.error("Layout persist failed:",_t),We&&m(We),re.dispatch("trigger-alert",{message:"Couldn't save group layout. Try again.",intent:"danger"})}):Promise.resolve()},[e,_e]),Ue=Ee=>{const We=$h((u==null?void 0:u.theme)||J8);let it=$h({...We,...Ee});if(Ee.columns!==void 0&&Ee.columns!==We.columns&&(it={...it,column_tracks:jO(it.columns)}),d(_t=>_t&&{..._t,theme:it}),Ee.layout_mode&&Ee.layout_mode!==We.layout_mode){if(Zw(it)){const _t=CVe(f,it.columns,U);m(_t),ie(_t)}else{const _t=NVe(f,We.columns);m(_t),ie(_t)}return}if(Ee.columns!==void 0&&Ee.columns!==We.columns&&Zw(it)){const _t=f.map(vn=>({...vn,column_index:Math.min(vn.column_index??0,it.columns-1)}));m(_t),ie(_t)}},ae=Ee=>{d(We=>We&&{...We,masthead:Ee})},pe=p.useRef(!0),W=p.useMemo(()=>{const Ee=(u==null?void 0:u.id_Base_Teams)||"";return Ee.includes("/")?Ee.split("/").pop():Ee},[u==null?void 0:u.id_Base_Teams]),q=p.useMemo(()=>{var We,it;const Ee=(it=(We=c==null?void 0:c.globalMeta)==null?void 0:We.teams)==null?void 0:it.find(_t=>_t.id===W||_t.$id===W);return(Ee==null?void 0:Ee.name)||""},[(st=c==null?void 0:c.globalMeta)==null?void 0:st.teams,W]),te=vc(c),X=p.useMemo(()=>{var _t,vn,An,je,kt,Lt,ne;if(!te)return!1;if(sS(c,W))return!0;const Ee=(vn=(_t=c==null?void 0:c.globalMeta)==null?void 0:_t.teams)==null?void 0:vn.find(Be=>Be.id===W),We=((An=Ee==null?void 0:Ee.organization)==null?void 0:An.$id)||((je=Ee==null?void 0:Ee.organization)==null?void 0:je.id),it=(Lt=(kt=c==null?void 0:c.globalMeta)==null?void 0:kt.organizations)==null?void 0:Lt.find(Be=>Be.id===We||Be.$id===We);return it?!((ne=it.subscription)!=null&&ne.active):!1},[W,c,te]);p.useEffect(()=>(pe.current=!0,()=>{pe.current=!1}),[]),p.useEffect(()=>{if(!e)return;let Ee=!1;return g(!0),y(!1),pt(Pi,Ze("users-board-view-content"))({board:{$id:e}}).then(We=>{var _t;if(Ee||!pe.current)return;const it=(_t=We.data)==null?void 0:_t.output;if(!(it!=null&&it.board)){d(null),m([]);return}d(it.board),N(it.board.name||""),m(Array.isArray(it.cards)?it.cards:[])}).catch(We=>{if(Ee||!pe.current)return;const it=(We==null?void 0:We.code)||"",_t=(We==null?void 0:We.message)||"";it==="functions/permission-denied"||it==="functions/unauthenticated"||_t.includes("permission")||_t.includes("access")?y(!0):it==="functions/not-found"||_t.includes("not found")?(d(null),m([])):console.error("Failed to load board:",We)}).finally(()=>{!Ee&&pe.current&&g(!1)}),()=>{Ee=!0}},[e]);const le=6e4,me=p.useRef(null);p.useEffect(()=>{me.current=K},[K]);const fe=p.useRef(!1);p.useEffect(()=>{fe.current=J||j||!!K||w||be},[J,j,K,w,be]);const ke=p.useCallback(async()=>{var Ee;if(e&&!fe.current&&!(Ae.current>0))try{const We=await pt(Pi,Ze("users-board-view-content"))({board:{$id:e}});if(!pe.current||fe.current||Ae.current>0)return;const it=(Ee=We.data)==null?void 0:Ee.output;if(!(it!=null&&it.board))return;d(it.board),N(it.board.name||"");const _t=Array.isArray(it.cards)?it.cards:[];m(vn=>{const An=Ie.current,je=me.current,kt=vn.filter(Be=>typeof Be.$id=="string"&&Be.$id.startsWith("tmp-")||An.has(Be.$id)||Be.$id===je),Lt=new Set(kt.map(Be=>Be.$id)),ne=[..._t.filter(Be=>!Lt.has(Be.$id)),...kt];return ne.sort((Be,mt)=>(Be.position_order??0)-(mt.position_order??0)),ne})}catch(We){console.warn("Board sync failed:",We)}},[e]);p.useEffect(()=>{if(!e)return;const Ee=setInterval(ke,le),We=()=>{document.visibilityState==="visible"&&ke()};return document.addEventListener("visibilitychange",We),()=>{clearInterval(Ee),document.removeEventListener("visibilitychange",We)}},[e,ke]);const Se=p.useMemo(()=>$h({...J8,...(u==null?void 0:u.theme)||{}}),[u==null?void 0:u.theme]),Et=Se.columns,nt=Zw(Se),Pt=Se.column_tracks,[en,hn]=p.useState(()=>typeof window<"u"?window.matchMedia("(max-width: 779px)").matches:!1);p.useEffect(()=>{const Ee=window.matchMedia("(max-width: 779px)"),We=()=>hn(Ee.matches);return We(),Ee.addEventListener("change",We),()=>Ee.removeEventListener("change",We)},[]);const rt=en?1:Et,et=async()=>{var je,kt,Lt,ne;const Ee=`tmp-${Date.now()}`,We=0,it=nt?f.filter(Be=>(Be.column_index??0)===We):f,_t=it.length?Math.max(...it.map(Be=>Be.position_order??0)):-1,vn=Date.now(),An={$id:Ee,label:"Untitled group",position_order:_t+1,column_span:1,column_index:We,width:null,show_thumbnail:!0,card_masthead:null,bookmarks:[],card_color:null,date_created:vn,date_modified:vn};m(Be=>[...Be,An]);try{const Be=await _e(()=>
1931pt(Pi,Ze("users-board-card-add"))({board:{$id:e},card:{label:"Untitled group",column_span:1,column_index:nt?We:0,show_thumbnail:!0,bookmarks:[]}})),mt=(kt=(je=Be==null?void 0:Be.data)==null?void 0:je.output)==null?void 0:kt.cardID,we=(ne=(Lt=Be==null?void 0:Be.data)==null?void 0:Lt.output)==null?void 0:ne.position_order;mt&&m(vt=>vt.map(It=>It.$id===Ee?{...It,$id:mt,position_order:Number.isFinite(we)?we:It.position_order}:It))}catch(Be){console.error("Add card failed:",Be),m(mt=>mt.filter(we=>we.$id!==Ee)),re.dispatch("trigger-alert",{message:"Couldn't add group. Try again.",intent:"danger"})}},Kt=async({cardID:Ee,assetID:We,position_order:it})=>{const _t=f;m(vn=>vn.map(An=>{if(An.$id!==Ee)return An;const je={...An.bookmark_order_map||{}};return je[We]={...je[We]||{},position_order:it},{...An,bookmark_order_map:je}}));try{await _e(()=>pt(Pi,Ze("users-board-card-reorderBookmarks"))({board:{$id:e},card:{$id:Ee},assetID:We,position_order:it}))}catch(vn){console.error("Reorder bookmark failed:",vn),m(_t),re.dispatch("trigger-alert",{message:"Couldn't reorder bookmark. Try again.",intent:"danger"})}},zn=async({cardID:Ee,assetID:We,checked:it,bookmarkName:_t,bookmarkUrl:vn,listType:An})=>{var ne,Be,mt;const je=f,kt=((ne=c==null?void 0:c.user)==null?void 0:ne.uid)||null,Lt=((Be=c==null?void 0:c.user)==null?void 0:Be.displayName)||((mt=c==null?void 0:c.user)==null?void 0:mt.email)||null;m(we=>we.map(vt=>{if(vt.$id!==Ee)return vt;const It={...vt.bookmark_order_map||{}};return It[We]={...It[We]||{},checked:it,checked_by:it?kt:null,checked_by_name:it?Lt:null},{...vt,bookmark_order_map:It}}));try{await _e(()=>pt(Pi,Ze("users-board-card-toggleBookmarkCheck"))({board:{$id:e},card:{$id:Ee},assetID:We,checked:it})),mVe({action:An==="toggle"?it?"TOGGLE_ON":"TOGGLE_OFF":it?"CHECK":"UNCHECK",targetType:"BOARD",targetId:We,targetName:_t||"bookmark",details:{teamId:W||t,teamName:q,boardName:(u==null?void 0:u.name)||"",url:vn||""},teamId:W||t})}catch(we){console.error("Toggle bookmark check failed:",we),m(je),re.dispatch("trigger-alert",{message:"Couldn't update the checkbox. Try again.",intent:"danger"})}},xt=async(Ee,We)=>{if(typeof Ee=="string"&&Ee.startsWith("tmp-")){m(_t=>_t.map(vn=>vn.$id===Ee?{...vn,...We}:vn));return}const it=f;m(_t=>_t.map(vn=>vn.$id===Ee?{...vn,...We}:vn));try{await _e(()=>pt(Pi,Ze("users-board-card-edit"))({board:{$id:e},card:{$id:Ee,...We}}))}catch(_t){console.error("Edit card failed:",_t),m(it),re.dispatch("trigger-alert",{message:"Couldn't save group. Try again.",intent:"danger"})}},rr=async Ee=>{var An,je;const We=f.find(kt=>kt.$id===Ee);if(!We)return;const it=`tmp-${Date.now()}`,_t=Date.now(),vn={...We,$id:it,label:`${We.label||"Untitled group"} copy`,position_order:(We.position_order??0)+.5,date_created:_t,date_modified:_t};m(kt=>[...kt,vn].sort((Lt,ne)=>(Lt.position_order??0)-(ne.position_order??0)));try{const kt=await _e(()=>pt(Pi,Ze("users-board-card-clone"))({board:{$id:e},card:{$id:Ee}})),Lt=(je=(An=kt==null?void 0:kt.data)==null?void 0:An.output)==null?void 0:je.cardID;Lt&&m(ne=>ne.map(Be=>Be.$id===it?{...Be,$id:Lt}:Be))}catch(kt){console.error("Clone card failed:",kt),m(Lt=>Lt.filter(ne=>ne.$id!==it)),re.dispatch("trigger-alert",{message:"Couldn't clone group. Try again.",intent:"danger"})}},ir=async Ee=>{const We=f;if(m(it=>it.filter(_t=>_t.$id!==Ee)),!(typeof Ee=="string"&&Ee.startsWith("tmp-")))try{await _e(()=>pt(Pi,Ze("users-board-card-delete"))({board:{$id:e},card:{$id:Ee}}))}catch(it){console.error("Delete card failed:",it),m(We),re.dispatch("trigger-alert",{message:"Couldn't delete group. Try again.",intent:"danger"})}},Tn=Ee=>{ee(Ee)},Ct=(Ee,We)=>{m(it=>it.map(_t=>_t.$id===Ee?{..._t,...We}:_t))},_r=async()=>{const Ee=(S||"").trim();if(!Ee||Ee===(u==null?void 0:u.name)){x(!1),N((u==null?void 0:u.name)||"");return}d(We=>We&&{...We,name:Ee}),x(!1),r==null||r(e,Ee);try{await _e(()=>pt(Pi,Ze("users-board-manage-edit"))({board:{$id:e,property_name:Ee}}))}catch(We){console.error("Failed to update board title:",We),N((u==null?void 0:u.name)||""),d(it=>it&&{...it,name:(u==null?void 0:u.name)||""}),re.dispatch("trigger-alert",{message:"Couldn't rename board. Try again.",intent:"danger"})}},Qn=async()=>{var Ee,We;if(!(!te||X||A)){O(!0),C(!1);try{const it=await _e(()=>
1931pt(Pi,Ze("users-board-manage-clone"))({board:{$id:e}})),_t=(We=(Ee=it==null?void 0:it.data)==null?void 0:Ee.output)==null?void 0:We.boardID;_t&&W&&(s==null||s(_t),i(Pn("/workspace/:teamID/board/:boardID",{teamID:W,boardID:_t})))}catch(it){console.error("Failed to clone board:",it),re.dispatch("trigger-alert",{message:"Couldn't clone board. Try again.",intent:"danger"})}finally{O(!1)}}},Ce=async()=>{D(!0);try{await _e(()=>pt(Pi,Ze("users-board-manage-delete"))({board:{$id:e}}));try{localStorage.removeItem("boards_last_opened")}catch{}a==null||a(e),i(Pn("/workspace/:teamID/board",{teamID:W||t}))}catch(Ee){console.error("Failed to delete board:",Ee),re.dispatch("trigger-alert",{message:"Couldn't delete board. Try again.",intent:"danger"})}finally{D(!1),M(!1)}},ut=Ab(Pm(qm,{activationConstraint:{distance:4}})),pn=Ee=>{const{active:We,over:it}=Ee;if(!it||We.id===it.id)return;const _t=f.findIndex(Lt=>Lt.$id===We.id),vn=f.findIndex(Lt=>Lt.$id===it.id);if(_t===-1||vn===-1)return;const An=PS(f,_t,vn),je=An.map((Lt,ne)=>({$id:Lt.$id,position_order:ne})),kt=f;m(An.map((Lt,ne)=>({...Lt,position_order:ne}))),_e(()=>pt(Pi,Ze("users-board-card-bulkUpdate"))({board:{$id:e},cards:je})).catch(Lt=>{console.error("Bulk reorder failed:",Lt),m(kt),re.dispatch("trigger-alert",{message:"Couldn't save new order. Try again.",intent:"danger"})})},Jt=()=>{E(Ee=>Ee+1),n&&n()},In=p.useMemo(()=>nt?null:R4(f,rt,U),[f,rt,U,nt]),Dn=p.useCallback(Ee=>{const We=f;m(Ee),ie(Ee,We)},[f,ie]),or=p.useCallback(Ee=>{d(We=>We&&{...We,theme:$h({...We.theme||{},column_tracks:Ee})}),_e(()=>pt(Pi,Ze("users-board-manage-edit"))({board:{$id:e,property_theme:{column_tracks:Ee}}})).catch(We=>{console.error("Column track save failed:",We),re.dispatch("trigger-alert",{message:"Couldn't save column widths. Try again.",intent:"danger"})})},[e,_e]),Zt=en?[12]:Pt,tr=p.useCallback(()=>{pt(Pi,Ze("users-board-view-content"))({board:{$id:e}}).then(Ee=>{var it;const We=(it=Ee==null?void 0:Ee.data)==null?void 0:it.output;We!=null&&We.board&&d(We.board)}).catch(()=>{})},[e]);if(h)return o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(os,{size:40}));if(v)return o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(fs,{icon:"lock",title:"Access denied",description:"You don't have permission to view this board."}));if(!u)return o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(fs,{icon:o.createElement(Yp,{size:32}),title:"Board not found",description:"This board may have been deleted."}));const Fe=f.map(Ee=>Ee.$id);return o.createElement("div",{className:"board-canvas w-full h-full overflow-y-auto bg-white dark:bg-[#241d33]",style:Se.background_color&&Se.background_color!=="#ffffff"?{backgroundColor:Se.background_color}:void 0,onClick:Jt},(gt=u.masthead)!=null&>.storage_path||(ht=u.masthead)!=null&&ht.preset_id?o.createElement(Kee,{documentType:"board",documentID:e,masthead:u.masthead,onMastheadChange:ae,onEditingChange:ue,onOpenSettings:()=>H(!0)}):null,o.createElement("div",{className:"board-canvas__inner px-6 py-6"},o.createElement("div",{className:"board-canvas__header flex items-center justify-between gap-3 mb-4"},o.createElement("div",{className:"flex items-center gap-2 min-w-0"},w?o.createElement(Cs,{value:S,onChange:Ee=>N(Ee.target.value),onKeyDown:Ee=>{Ee.key==="Enter"&&_r(),Ee.key==="Escape"&&(N((u==null?void 0:u.name)||""),x(!1))},onBlur:_r,autoFocus:!0,large:!0,className:["board-canvas__title-input",oe?Xr:null].filter(Boolean).join(" ")}):o.createElement("h2",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100 cursor-pointer m-0 truncate",onClick:()=>x(!0)},u.name||"Untitled Board"),(u==null?void 0:u.access_mode)==="anyone_with_link"?o.createElement("button",{type:"button",onClick:()=>z(!0),className:"inline-flex items-center gap-1 rounded-full bg-blue-50 dark:bg-blue-900/30 px-2 py-0.5 text-xs font-medium text-blue-700 dark:text-blue-300 hover:bg-blue-100 dark:hover:bg-blue-900/50",title:"This board is public. Click to manage sharing."},o.createElement(Jc,{size:12})," Public"):null),o.createElement("div",{className:"flex items-center gap-1"},o.createElement(De,{variant:"minimal",icon:o.createElement(zs,{size:14}),text:"Group",className:"text-gray-600 dark__text",onClick:et}),o.createElement(Hr,{isOpen:Y,onClose:()=>z(!1),onInteraction:Ee=>{Ee||z(!1)},placement:"bottom-end",minimal:!0,content:o.createElement("div",{className:"w-[420px] max-w-[calc(100vw-32px)] p-3"},o.createElement(Xee,{documentType:"board",documentID:e,accessMode:(u==null?void 0:u.access_mode)||"team_only",shareToken:(u==null?void 0:u.share_token)||null,teamID:W||t,isIndexable:(u==null?void 0:u.is_indexable)===!0,publicShowThumbnails:(u==null?void 0:u.public_show_thumbnails)!==!1,onAccessModeChanged:tr}))},o.createElement(De,{variant:"minimal",icon:o.createElement(Wm,{size:14}),text:"Share",className:"text-gray-600 dark__text",onClick:()=>z(Ee=>!Ee)})),o.createElement(Hr,{isOpen:k,onClose:()=>C(!1),onInteraction:Ee=>{Ee||C(!1)},placement:"bottom-end",minimal:!0,content:o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(eu,{size:16}),text:"Rename board",className:"dark__text",onClick:()=>{C(!1),requestAnimationFrame(()=>x(!0))}}),o.createElement(Bt,{icon:o.createElement(Mg,{size:16}),text:"Clone board",className:"dark__text",onClick:Qn,disabled:A||!te||X}),o.createElement(Bt,{icon:o.createElement(kZ,{size:16}),text:"Board settings",className:"dark__text",onClick:()=>{C(!1),H(!0)}}),o.createElement(Zi,null),o.createElement(Bt,{icon:o.createElement(tu,{size:16}),text:"Delete board",className:"dark__text",onClick:()=>{C(!1),M(!0)}}))},o.createElement(De,{variant:"minimal",icon:o.createElement(hb,{size:16}),className:"text-gray-500 dark__text",loading:A,onClick:()=>C(Ee=>!Ee)})))),f.length===0?o.createElement("div",{className:"flex items-center justify-center py-16"},o.createElement(fs,{icon:o.createElement(Yp,{size:32}),title:"No groups yet",description:"Add your first group to start organizing bookmarks.",action:o.createElement(De,{intent:"primary",icon:o.createElement(zs,{size:14}),text:"Add group",onClick:et})})):nt?o.createElement(OVe,{cards:f,columnTracks:Zt,boardTheme:Se,teamID:W||t,gridRef:B,paneClickCount:b,onEdit:xt,onClone:rr,onDelete:ir,onOpenSettings:T
1931n,onEditingChange:he,onReorder:Dn,onReorderBookmark:Kt,onToggleBookmarkCheck:zn,settingsCardID:K,onColumnTracksChange:or}):o.createElement(Ob,{sensors:ut,collisionDetection:rte,onDragStart:()=>se(!0),onDragCancel:()=>se(!1),onDragEnd:Ee=>{se(!1),pn(Ee)}},o.createElement(N4,{items:Fe,strategy:C4},o.createElement("div",{ref:B,className:"board-canvas__grid",style:{"--board-columns":rt,minHeight:(In==null?void 0:In.containerHeight)||void 0}},f.map(Ee=>o.createElement(Rte,{key:Ee.$id,card:Ee,teamID:W||t,boardTheme:Se,boardColumns:rt,gridRef:B,gridPlacement:In.placements.get(Ee.$id),onHeightChange:ce,paneClickCount:b,onEdit:We=>xt(Ee.$id,We),onClone:()=>rr(Ee.$id),onDelete:()=>ir(Ee.$id),onOpenSettings:()=>Tn(Ee.$id),onEditingChange:We=>he(Ee.$id,We),onReorderBookmark:Kt,onToggleBookmarkCheck:zn,isSettingsTarget:Ee.$id===K})))))),o.createElement($Ve,{isOpen:j,onClose:()=>H(!1),boardID:e,theme:Se,onThemeChange:Ue,masthead:u.masthead||null,onMastheadChange:ae}),o.createElement(HVe,{isOpen:!!K,onClose:()=>ee(null),boardID:e,card:f.find(Ee=>Ee.$id===K)||null,boardTheme:Se,teamID:W||t,onLocalPatch:Ee=>K&&Ct(K,Ee),onOpenBoardSettings:()=>H(!0)}),o.createElement(ya,{isOpen:T,onClose:()=>!L&&M(!1),title:"Delete board",icon:"trash",isCloseButtonShown:!L,style:{width:400}},o.createElement("div",{className:Fs},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Are you sure you want to delete"," ",o.createElement("strong",null,(u==null?void 0:u.name)||"this board"),"? This cannot be undone.")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>M(!1),disabled:L}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:Ce,loading:L})))))},X1=()=>{var y,b;const{teamID:e,boardID:t}=xs(),n=yr(),r=Wn(E=>{var w;return(w=E==null?void 0:E.UI)==null?void 0:w.user}),a=(y=r==null?void 0:r.activeTeam)==null?void 0:y.id,s=e||a,[i,l]=p.useState(()=>{try{const E=localStorage.getItem("boards_sidebar_width");if(E)return Math.max(120,Math.min(600,Number(E)))}catch{}return 200}),[c,u]=p.useState({}),[d,f]=p.useState(0),[m,h]=p.useState(0),g=(E,w)=>{u(x=>({...x,[E]:w}))};p.useEffect(()=>{if(!t)try{const E=localStorage.getItem("boards_last_opened");if(E){const{boardID:w,teamID:x}=JSON.parse(E);w&&x&&x===s&&n(Pn("/workspace/:teamID/board/:boardID",{teamID:x,boardID:w}),{replace:!0})}}catch{}},[t,n,s]),p.useEffect(()=>{if(t&&s)try{localStorage.setItem("boards_last_opened",JSON.stringify({boardID:t,teamID:s}))}catch{}},[t,s]);const v=Wn(E=>{var w;return(w=E==null?void 0:E.FB)==null?void 0:w.auth});return!(v!=null&&v.isLive)&&!((b=v==null?void 0:v.user)!=null&&b.uid)?null:o.createElement("div",{className:"asset-list asset-list-updated mt-[50px]"},o.createElement("div",{className:"fixed top-[50px] w-full flex flex-col bg-gray-50 dark:bg-[#241d33]"},o.createElement("div",{className:"flex columns-2 flex-grow h-[calc(100vh-50px)]"},o.createElement(wte,{containerWidth:i,setContainerWidth:E=>{l(E);try{localStorage.setItem("boards_sidebar_width",String(E))}catch{}},boardNameOverrides:c,onBoardTitleChanged:g,refreshKey:d,paneClickCount:m}),o.createElement("main",{role:"main",className:"flex-grow transition-all duration-300 relative bg-gray-100 dark:bg-[#241d33]",style:{width:`calc(100% - ${i}px)`,height:"100%"}},t?o.createElement(VVe,{boardID:t,teamID:s,onPaneClick:()=>h(E=>E+1),onBoardTitleChanged:g,onBoardDeleted:()=>f(E=>E+1),onBoardCloned:()=>f(E=>E+1)}):o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(fs,{icon:o.createElement(Yp,{size:32}),title:"Boards",description:"Select a board to view, or create one from the sidebar."}))))))};function Tte(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Tte(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Dd(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Tte(e))&&(r&&(r+=" "),r+=t);return r}const Sy=e=>typeof e=="number"&&!isNaN(e),um=e=>typeof e=="string",Wo=e=>typeof e=="function",Xw=e=>um(e)||Wo(e)?e:null,WO=e=>p.isValidElement(e)||um(e)||Wo(e)||Sy(e);function UVe(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${n}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,n)})})}function DS(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:a=!0,collapseDuration:s=300}=e;return function(i){let{children:l,position:c,preventExitTransition:u,done:d,nodeRef:f,isIn:m,playToast:h}=i;const g=r?`${t}--${c}`:t,v=r?`${n}--${c}`:n,y=p.useRef(0);return p.useLayoutEffect(()=>{const b=f.current,E=g.split(" "),w=x=>{x.target===f.current&&(h(),b.removeEventListener("animationend",w),b.removeEventListener("animationcancel",w),y.current===0&&x.type!=="animationcancel"&&b.classList.remove(...E))};b.classList.add(...E),b.addEventListener("animationend",w),b.addEventListener("animationcancel",w)},[]),p.useEffect(()=>{const b=f.current,E=()=>{b.removeEventListener("animationend",E),a?UVe(b,d,s):d()};m||(u?E():(y.current=1,b.className+=` ${v}`,b.addEventListener("animationend",E)))},[m]),o.createElement(o.Fragment,null,l)}}function ez(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Ui=new Map;let Cy=[];const GO=new Set,BVe=e=>GO.forEach(t=>t(e)),Ate=()=>Ui.size>0;function Ite(e,t){var n;if(t)return!((n=Ui.get(t))==null||!n.isToastActive(e));let r=!1;return Ui.forEach(a=>{a.isToastActive(e)&&(r=!0)}),r}function Ote(e,t){WO(e)&&(Ate()||Cy.push({content:e,options:t}),Ui.forEach(n=>
1931{n.buildToast(e,t)}))}function tz(e,t){Ui.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function jVe(e){const{subscribe:t,getSnapshot:n,setProps:r}=p.useRef(function(s){const i=s.containerId||1;return{subscribe(l){const c=function(d,f,m){let h=1,g=0,v=[],y=[],b=[],E=f;const w=new Map,x=new Set,S=()=>{b=Array.from(w.values()),x.forEach(C=>C())},N=C=>{y=C==null?[]:y.filter(A=>A!==C),S()},k=C=>{const{toastId:A,onOpen:O,updateId:T,children:M}=C.props,L=T==null;C.staleId&&w.delete(C.staleId),w.set(A,C),y=[...y,C.props.toastId].filter(D=>D!==C.staleId),S(),m(ez(C,L?"added":"updated")),L&&Wo(O)&&O(p.isValidElement(M)&&M.props)};return{id:d,props:E,observe:C=>(x.add(C),()=>x.delete(C)),toggle:(C,A)=>{w.forEach(O=>{A!=null&&A!==O.props.toastId||Wo(O.toggle)&&O.toggle(C)})},removeToast:N,toasts:w,clearQueue:()=>{g-=v.length,v=[]},buildToast:(C,A)=>{if((J=>{let{containerId:se,toastId:B,updateId:U}=J;const $=se?se!==d:d!==1,ce=w.has(B)&&U==null;return $||ce})(A))return;const{toastId:O,updateId:T,data:M,staleId:L,delay:D}=A,j=()=>{N(O)},H=T==null;H&&g++;const Y={...E,style:E.toastStyle,key:h++,...Object.fromEntries(Object.entries(A).filter(J=>{let[se,B]=J;return B!=null})),toastId:O,updateId:T,data:M,closeToast:j,isIn:!1,className:Xw(A.className||E.toastClassName),bodyClassName:Xw(A.bodyClassName||E.bodyClassName),progressClassName:Xw(A.progressClassName||E.progressClassName),autoClose:!A.isLoading&&(z=A.autoClose,K=E.autoClose,z===!1||Sy(z)&&z>0?z:K),deleteToast(){const J=w.get(O),{onClose:se,children:B}=J.props;Wo(se)&&se(p.isValidElement(B)&&B.props),m(ez(J,"removed")),w.delete(O),g--,g<0&&(g=0),v.length>0?k(v.shift()):S()}};var z,K;Y.closeButton=E.closeButton,A.closeButton===!1||WO(A.closeButton)?Y.closeButton=A.closeButton:A.closeButton===!0&&(Y.closeButton=!WO(E.closeButton)||E.closeButton);let ee=C;p.isValidElement(C)&&!um(C.type)?ee=p.cloneElement(C,{closeToast:j,toastProps:Y,data:M}):Wo(C)&&(ee=C({closeToast:j,toastProps:Y,data:M}));const oe={content:ee,props:Y,staleId:L};E.limit&&E.limit>0&&g>E.limit&&H?v.push(oe):Sy(D)?setTimeout(()=>{k(oe)},D):k(oe)},setProps(C){E=C},setToggle:(C,A)=>{w.get(C).toggle=A},isToastActive:C=>y.some(A=>A===C),getSnapshot:()=>E.newestOnTop?b.reverse():b}}(i,s,BVe);Ui.set(i,c);const u=c.observe(l);return Cy.forEach(d=>Ote(d.content,d.options)),Cy=[],()=>{u(),Ui.delete(i)}},setProps(l){var c;(c=Ui.get(i))==null||c.setProps(l)},getSnapshot(){var l;return(l=Ui.get(i))==null?void 0:l.getSnapshot()}}}(e)).current;r(e);const a=p.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!a)return[];const i=new Map;return a.forEach(l=>{const{position:c}=l.props;i.has(c)||i.set(c,[]),i.get(c).push(l)}),Array.from(i,l=>s(l[0],l[1]))},isToastActive:Ite,count:a==null?void 0:a.length}}function WVe(e){const[t,n]=p.useState(!1),[r,a]=p.useState(!1),s=p.useRef(null),i=p.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:l,pauseOnHover:c,closeToast:u,onClick:d,closeOnClick:f}=e;var m,h;function g(){n(!0)}function v(){n(!1)}function y(w){const x=s.current;i.canDrag&&x&&(i.didMove=!0,t&&v(),i.delta=e.draggableDirection==="x"?w.clientX-i.start:w.clientY-i.start,i.start!==w.clientX&&(i.canCloseOnClick=!1),x.style.transform=`translate3d(${e.draggableDirection==="x"?`${i.delta}px, var(--y)`:`0, calc(${i.delta}px + var(--y))`},0)`,x.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function b(){document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",b);const w=s.current;if(i.canDrag&&i.didMove&&w){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return a(!0),e.closeToast(),void e.collapseAll();w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}(h=Ui.get((m={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||h.setToggle(m.id,m.fn),p.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||v(),window.addEventListener("focus",g),window.addEventListener("blur",v),()=>{window.removeEventListener("focus",g),window.removeEventListener("blur",v)}},[e.pauseOnFocusLoss]);const E={onPointerDown:function(w){if(e.draggable===!0||e.draggable===w.pointerType){i.didMove=!1,document.addEventListener("pointermove",y),document.addEventListener("pointerup",b);const x=s.current;i.canCloseOnClick=!0,i.canDrag=!0,x.style.transition="none",e.draggableDirection==="x"?(i.start=w.clientX,i.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(i.start=w.clientY,i.removalDistance=x.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(w){const{top:x,bottom:S,left:N,right:k}=s.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&w.clientX>=N&&w.clientX<=k&&w.clientY>=x&&w.clientY<=S?v():g()}};return l&&c&&(E.onMouseEnter=v,e.stacked||(E.onMouseLeave=g)),f&&(E.onClick=w=>{d&&d(w),i.canCloseOnClick&&u()}),{playToast:g,pauseToast:v,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:E}}function GVe(e){let{delay:t,isRunning:n,closeToast:r,type:a="default",hide:s,className:i,style:l,controlledProgress:c,progress:u,rtl:d,isIn:f,theme:m}=e;const h=s||c&&u===0,g={...l,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(g.transform=`scaleX(${u})`);const v=Dd("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${m}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":d}),y=Wo(i)?i({rtl:d,type:a,defaultClassName:v}):Dd(v,i),b={[c&&u>=1?"onTransitionEnd":"onAnimationEnd"]:c&&u<1?null:()=>{f&&r()}};return o.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":h},o.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${m} Toastify__progress-bar--${a}`}),o.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:y,style:g,...b}))}let qVe=1;const Mte=()=>""+qVe++;function YVe(e){return e&&(um(e.toastId)||Sy(e.toastId))?e.toastId:Mte()}
1931function pv(e,t){return Ote(e,t),t.toastId}function e_(e,t){return{...t,type:t&&t.type||e,toastId:YVe(t)}}function Q1(e){return(t,n)=>pv(t,e_(e,n))}function Qr(e,t){return pv(e,e_("default",t))}Qr.loading=(e,t)=>pv(e,e_("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Qr.promise=function(e,t,n){let r,{pending:a,error:s,success:i}=t;a&&(r=um(a)?Qr.loading(a,n):Qr.loading(a.render,{...n,...a}));const l={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(d,f,m)=>{if(f==null)return void Qr.dismiss(r);const h={type:d,...l,...n,data:m},g=um(f)?{render:f}:f;return r?Qr.update(r,{...h,...g}):Qr(g.render,{...h,...g}),m},u=Wo(e)?e():e;return u.then(d=>c("success",i,d)).catch(d=>c("error",s,d)),u},Qr.success=Q1("success"),Qr.info=Q1("info"),Qr.error=Q1("error"),Qr.warning=Q1("warning"),Qr.warn=Qr.warning,Qr.dark=(e,t)=>pv(e,e_("default",{theme:"dark",...t})),Qr.dismiss=function(e){(function(t){var n;if(Ate()){if(t==null||um(n=t)||Sy(n))Ui.forEach(a=>{a.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){var r;(r=Ui.get(t.containerId))!=null&&r.removeToast(t.id)||Ui.forEach(a=>{a.removeToast(t.id)})}}else Cy=Cy.filter(a=>t!=null&&a.options.toastId!==t)})(e)},Qr.clearWaitingQueue=function(e){e===void 0&&(e={}),Ui.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Qr.isActive=Ite,Qr.update=function(e,t){t===void 0&&(t={});const n=((r,a)=>{var s;let{containerId:i}=a;return(s=Ui.get(i||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:a}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:Mte()};s.toastId!==e&&(s.staleId=e);const i=s.render||a;delete s.render,pv(i,s)}},Qr.done=e=>{Qr.update(e,{progress:1})},Qr.onChange=function(e){return GO.add(e),()=>{GO.delete(e)}},Qr.play=e=>tz(!0,e),Qr.pause=e=>tz(!1,e);const KVe=typeof window<"u"?p.useLayoutEffect:p.useEffect,J1=e=>{let{theme:t,type:n,isLoading:r,...a}=e;return o.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...a})},cN={info:function(e){return o.createElement(J1,{...e},o.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return o.createElement(J1,{...e},o.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return o.createElement(J1,{...e},o.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return o.createElement(J1,{...e},o.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return o.createElement("div",{className:"Toastify__spinner"})}},ZVe=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:a,playToast:s}=WVe(e),{closeButton:i,children:l,autoClose:c,onClick:u,type:d,hideProgressBar:f,closeToast:m,transition:h,position:g,className:v,style:y,bodyClassName:b,bodyStyle:E,progressClassName:w,progressStyle:x,updateId:S,role:N,progress:k,rtl:C,toastId:A,deleteToast:O,isIn:T,isLoading:M,closeOnClick:L,theme:D}=e,j=Dd("Toastify__toast",`Toastify__toast-theme--${D}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":C},{"Toastify__toast--close-on-click":L}),H=Wo(v)?v({rtl:C,position:g,type:d,defaultClassName:j}):Dd(j,v),Y=function(oe){let{theme:J,type:se,isLoading:B,icon:U}=oe,$=null;const ce={theme:J,type:se,isLoading:B};return U===!1||(Wo(U)?$=U(ce):p.isValidElement(U)?$=p.cloneElement(U,ce):B?$=cN.spinner():(be=>be in cN)(se)&&($=cN[se](ce))),$}(e),z=!!k||!c,K={closeToast:m,type:d,theme:D};let ee=null;return i===!1||(ee=Wo(i)?i(K):p.isValidElement(i)?p.cloneElement(i,K):function(oe){let{closeToast:J,theme:se,ariaLabel:B="close"}=oe;return o.createElement("button",{className:`Toastify__close-button Toastify__close-button--${se}`,type:"button",onClick:U=>{U.stopPropagation(),J(U)},"aria-label":B},o.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},o.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(K)),o.createElement(h,{isIn:T,done:O,position:g,preventExitTransition:n,nodeRef:r,playToast:s},o.createElement("div",{id:A,onClick:u,"data-in":T,className:H,...a,style:y,ref:r},o.createElement("div",{...T&&{role:N},className:Wo(b)?b({type:d}):Dd("Toastify__toast-body",b),style:E},Y!=null&&o.createElement("div",{className:Dd("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter"
1931:!M})},Y),o.createElement("div",null,l)),ee,o.createElement(GVe,{...S&&!z?{key:`pb-${S}`}:{},rtl:C,theme:D,delay:c,isRunning:t,isIn:T,closeToast:m,hide:f,type:d,style:x,className:w,controlledProgress:z,progress:k||0})))},LS=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},XVe=DS(LS("bounce",!0));DS(LS("slide",!0));const QVe=DS(LS("zoom"));DS(LS("flip"));const JVe={position:"top-right",transition:XVe,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function eUe(e){let t={...JVe,...e};const n=e.stacked,[r,a]=p.useState(!0),s=p.useRef(null),{getToastToRender:i,isToastActive:l,count:c}=jVe(t),{className:u,style:d,rtl:f,containerId:m}=t;function h(v){const y=Dd("Toastify__toast-container",`Toastify__toast-container--${v}`,{"Toastify__toast-container--rtl":f});return Wo(u)?u({position:v,rtl:f,defaultClassName:y}):Dd(y,Xw(u))}function g(){n&&(a(!0),Qr.play())}return KVe(()=>{if(n){var v;const y=s.current.querySelectorAll('[data-in="true"]'),b=12,E=(v=t.position)==null?void 0:v.includes("top");let w=0,x=0;Array.from(y).reverse().forEach((S,N)=>{const k=S;k.classList.add("Toastify__toast--stacked"),N>0&&(k.dataset.collapsed=`${r}`),k.dataset.pos||(k.dataset.pos=E?"top":"bot");const C=w*(r?.2:1)+(r?0:b*N);k.style.setProperty("--y",`${E?C:-1*C}px`),k.style.setProperty("--g",`${b}`),k.style.setProperty("--s",""+(1-(r?x:0))),w+=k.offsetHeight,x+=.025})}},[r,c,n]),o.createElement("div",{ref:s,className:"Toastify",id:m,onMouseEnter:()=>{n&&(a(!1),Qr.pause())},onMouseLeave:g},i((v,y)=>{const b=y.length?{...d}:{...d,pointerEvents:"none"};return o.createElement("div",{className:h(v),style:b,key:`container-${v}`},y.map(E=>{let{content:w,props:x}=E;return o.createElement(ZVe,{...x,stacked:n,collapseAll:g,isIn:l(x.toastId,x.containerId),style:x.style,key:`toast-${x.key}`},w)}))}))}const nz=({containerWidth:e,setContainerWidth:t,activeTeamID:n})=>{var d;const r=yr(),a=Wn(f=>{var m;return(m=f==null?void 0:f.FB)==null?void 0:m.auth}),s=((d=a==null?void 0:a.globalMeta)==null?void 0:d.teams)||[],[i,l]=p.useState(!1),c=f=>{l(!0),f.preventDefault()};if(p.useEffect(()=>{if(!i)return;const f=h=>{const g=h.clientX;g>=120&&g<=600&&t(g)},m=()=>l(!1);return document.addEventListener("mousemove",f),document.addEventListener("mouseup",m),()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",m)}},[i,t]),s.length<1)return null;const u=[...s].sort((f,m)=>f.is_personal&&!m.is_personal?-1:!f.is_personal&&m.is_personal?1:f.name.localeCompare(m.name));return o.createElement("div",{className:"sidebar-container h-full flex flex-col relative bg-white dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800",style:{width:e,minWidth:200}},o.createElement("div",{className:"sidebar-container__content px-2 pt-2 flex-grow overflow-y-auto no-scrollbar"},o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"flex items-center justify-between rounded transition-colors select-none group p-2"},o.createElement("div",{className:"flex items-center gap-1.5 overflow-hidden"},o.createElement("span",{className:"dark__text text-gray-500 uppercase text-xs font-semibold outline-none focus:outline-none truncate"},"Workspace")),o.createElement("div",{className:"flex items-center gap-0.5"},o.createElement("div",{className:"cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 flex items-center justify-center text-gray-500 dark:text-gray-400",onClick:()=>r("/workspace/add"),title:"Add Workspace"},o.createElement(zs,{size:16})))),o.createElement(Cr,{className:"!bg-transparent !p-0"},u.map(f=>{const m=f.id===n;return o.createElement(Bt,{key:f.id,active:m,className:`text-xs sm:text-sm flex items-center ${m?"dark:!text-white sidebar-item__active":""}`,icon:f.is_personal?o.createElement(jd,{size:16,color:is.getColor(f.id),strokeWidth:1.75}):o.createElement(uc,{size:16,color:is.getColor(f.id)}),text:`${jo(f)}${f.is_personal?" (Personal)":""}`,onClick:()=>{r(Pn("/workspace/:teamID/tables",{teamID:f.id}))}})})))),o.createElement("div",{className:"absolute top-0 -right-[7px] w-4 h-full cursor-col-resize z-50 flex justify-center group",onMouseDown:c},o.createElement("div",{className:`w-[1px] h-full transition-colors delay-75 ${i?"bg-blue-600":"bg-transparent group-hover:bg-blue-500"}`})))};/** 1932 * table-core 1933 * 1934 * Copyright (c) TanStack 1935 * 1936 * This source code is licensed under the MIT license found in the 1937 * LICENSE.md file in the root directory of this source tree. 1938 * 1939 * @license MIT 1940 */function tUe(){return{accessor:(e,t)=>
vendor: 46,163 bytes, line 1940
1940typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Ld(e,t){return typeof e=="function"?e(t):e}function nl(e,t){return n=>{t.setState(r=>({...r,[e]:Ld(n,r[e])}))}}function $S(e){return e instanceof Function}function nUe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function rUe(e,t){const n=[],r=a=>{a.forEach(s=>{n.push(s);const i=t(s);i!=null&&i.length&&r(i)})};return r(e),n}function cr(e,t,n){let r=[],a;return s=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(s);if(!(l.length!==r.length||l.some((d,f)=>r[f]!==d)))return a;r=l;let u;if(n.key&&n.debug&&(u=Date.now()),a=t(...l),n==null||n.onChange==null||n.onChange(a),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-i)*100)/100,f=Math.round((Date.now()-u)*100)/100,m=f/16,h=(g,v)=>{for(g=String(g);g.length<v;)g=" "+g;return g};`${h(f,5)}${h(d,5)}`,`${Math.max(0,Math.min(120-120*m,120))}`,n==null||n.key}return a}}function ur(e,t,n,r){return{debug:()=>{var a;return(a=e==null?void 0:e.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function aUe(e,t,n,r){const a=()=>{var i;return(i=s.getValue())!=null?i:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:a,getContext:cr(()=>[e,n,t,s],(i,l,c,u)=>({table:i,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ur(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(s,n,t,e)},{}),s}function sUe(e,t,n,r){var a,s;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let u=(a=(s=l.id)!=null?s:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?a:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:c&&(c.includes(".")?d=m=>{let h=m;for(const v of c.split(".")){var g;h=(g=h)==null?void 0:g[v]}return h}:d=m=>m[l.accessorKey]),!u)throw new Error;let f={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:cr(()=>[!0],()=>{var m;return[f,...(m=f.columns)==null?void 0:m.flatMap(h=>h.getFlatColumns())]},ur(e.options,"debugColumns")),getLeafColumns:cr(()=>[e._getOrderColumnsFn()],m=>{var h;if((h=f.columns)!=null&&h.length){let g=f.columns.flatMap(v=>v.getLeafColumns());return m(g)}return[f]},ur(e.options,"debugColumns"))};for(const m of e._features)m.createColumn==null||m.createColumn(f,e);return f}const mi="debugHeaders";function rz(e,t,n){var r;let s={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(s),i},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(s,e)}),s}const iUe={createTable:e=>{e.getHeaderGroups=cr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>{var s,i;const l=(s=r==null?void 0:r.map(f=>n.find(m=>m.id===f)).filter(Boolean))!=null?s:[],c=(i=a==null?void 0:a.map(f=>n.find(m=>m.id===f)).filter(Boolean))!=null?i:[],u=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(a!=null&&a.includes(f.id)));return ew(t,[...l,...u,...c],e)},ur(e.options,mi)),e.getCenterHeaderGroups=cr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>(n=n.filter(s=>!(r!=null&&r.includes(s.id))&&!(a!=null&&a.includes(s.id))),ew(t,n,e,"center")),ur(e.options,mi)),e.getLeftHeaderGroups=cr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var a;const s=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return ew(t,s,e,"left")},ur(e.options,mi)),e.getRightHeaderGroups=cr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var a;const s=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return ew(t,s,e,"right")},ur(e.options,mi)),e.getFooterGroups=cr(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ur(e.options,mi)),e.getLeftFooterGroups=cr(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ur(e.options,mi)),e.getCenterFooterGroups=cr(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ur(e.options,mi)),e.getRightFooterGroups=cr(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ur(e.options,mi)),e.getFlatHeaders=cr(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),ur(e.options,mi)),e.getLeftFlatHeaders=cr(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),ur(e.options,mi)),e.getCenterFlatHeaders=cr(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),ur(e.options,mi)),e.getRightFlatHeaders=cr(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),ur(e.options,mi)),e.getCenterLeafHeaders=cr(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ur(e.options,mi)),e.getLeftLeafHeaders=cr(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ur(e.options,mi)),e.getRightLeafHeaders=cr(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ur(e.options,mi)),e.getLeafHeaders=cr(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var a,s,i,l,c,u;return[...(a=(s=t[0])==null?void 0:s.headers)!=null?a:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},ur(e.options,mi))}};function ew(e,t,n,r){var a,s;let i=0;const l=function(m,h){h===void 0&&(h=1),i=Math.max(i,h),m.filter(g=>g.getIsVisible()).forEach(g=>{var v;(v=g.columns)!=null&&v.length&&l(g.columns,h+1)},0)};l(e);let c=[];const u=(m,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},v=[];m.forEach(y=>{const b=[...v].reverse()[0],E=y.column.depth===g.depth;let w,x=!1;if(E&&y.column.parent?w=y.column.parent:(w=y.column,x=!0),b&&(b==null?void 0:b.column)===w)b.subHeaders.push(y);else{const S=rz(n,w,{id:[r,h,w.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:x,placeholderId:x?`${v.filter(N=>N.column===w).length}`:void 0,depth:h,index:v.length});S.subHeaders.push(y),v.push(S)}g.headers.push(y),y.headerGroup=g}),c.push(g),h>0&&u(v,h-1)},d=t.map((m,h)=>rz(n,m,{depth:i,index:h}));u(d,i-1),c.reverse();const f=m=>m.filter(g=>g.column.getIsVisible()).map(g=>{let v=0,y=0,b=[0];g.subHeaders&&g.subHeaders.length?(b=[],f(g.subHeaders).forEach(w=>{let{colSpan:x,rowSpan:S}=w;v+=x,b.push(S)})):v=1;const E=Math.min(...b);return y=y+E,g.colSpan=v,g.rowSpan=y,{colSpan:v,rowSpan:y}});return f((a=(s=c[0])==null?void 0:s.headers)!=null?a:[]),c}const A4=(e,t,n,r,a,s,i)=>{let l={id:t,index:r,original:n,depth:a,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>rUe(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:cr(()=>[e.getAllLeafColumns()],c=>c.map(u=>aUe(e,l,u,u.id)),ur(e.options,"debugRows")),_getAllCellsByColumnId:cr(()=>[l.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),ur(e.options,"debugRows"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(l,e)}return l},oUe={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Pte=(e,t,n)=>{var r,a;const s=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(s))};Pte.autoRemove=e=>dc(e);const Dte=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Dte.autoRemove=e=>dc(e);const Lte=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Lte.autoRemove=e=>dc(e);const $te=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};$te.autoRemove=e=>dc(e);const Fte=(e,t,n)=>!n.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});Fte.autoRemove=e=>dc(e)||!(e!=null&&e.length);const zte=(e,t,n)=>n.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});zte.autoRemove=e=>dc(e)||!(e!=null&&e.length);const Hte=(e,t,n)=>e.getValue(t)===n;Hte.autoRemove=e=>dc(e);const Vte=(e,t,n)=>e.getValue(t)==n;Vte.autoRemove=e=>dc(e);const I4=(e,t,n)=>{let[r,a]=n;const s=e.getValue(t);return s>=r&&s<=a};I4.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(a)?1/0:a;if(s>i){const l=s;s=i,i=l}return[s,i]};I4.autoRemove=e=>dc(e)||dc(e[0])&&dc(e[1]);const Cu={includesString:Pte,includesStringSensitive:Dte,equalsString:Lte,arrIncludes:$te,arrIncludesAll:Fte,arrIncludesSome:zte,equals:Hte,weakEquals:Vte,inNumberRange:I4};function dc(e){return e==null||e===""}const lUe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:nl("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Cu.includesString:typeof r=="number"?Cu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Cu.equals:Array.isArray(r)?Cu.arrIncludes:Cu.weakEquals},e.getFilterFn=()=>{var n,r;return $S(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Cu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,a;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const a=e.getFilterFn(),s=r==null?void 0:r.find(d=>d.id===e.id),i=Ld(n,s?s.value:void 0);if(az(a,i,e)){var l;return(l=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(s){var u;return(u=r==null?void 0:r.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=a=>{var s;return(s=Ld(t,a))==null?void 0:s.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(az(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function az(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const cUe=(e,t,n)=>n.reduce((r,a)=>{const s=a.getValue(e);return r+(typeof s=="number"?s:0)},0),uUe=(e,t,n)=>{let r;return n.forEach(a=>{const s=a.getValue(e);s!=null&&(r>s||r===void 0&&s>=s)&&(r=s)}),r},dUe=(e,t,n)=>{let r;return n.forEach(a=>{const s=a.getValue(e);s!=null&&(r<s||r===void 0&&s>=s)&&(r=s)}),r},fUe=(e,t,n)=>{let r,a;return n.forEach(s=>{const i=s.getValue(e);i!=null&&(r===void 0?i>=i&&(r=a=i):(r>i&&(r=i),a<i&&(a=i)))}),[r,a]},mUe=(e,t)=>{let n=0,r=0;if(t.forEach(a=>{let s=a.getValue(e);s!=null&&(s=+s)>=s&&(++n,r+=s)}),n)return r/n},hUe=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!nUe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),a=n.sort((s,i)=>s-i);return n.length%2!==0?a[r]:(a[r-1]+a[r])/2},pUe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),gUe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,vUe=(e,t)=>t.length,uN={sum:cUe,min:uUe,max:dUe,extent:fUe,mean:mUe,median:hUe,unique:pUe,uniqueCount:gUe,count:vUe},yUe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:nl("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return uN.sum;if(Object.prototype.toString.call(r)==="[object Date]")return uN.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return $S(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:uN[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=n.subRows)!=null&&a.length)}}};function bUe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(s=>!t.includes(s.id));return n==="remove"?r:[...t.map(s=>e.find(i=>i.id===s)).filter(Boolean),...r]}const wUe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:nl("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=cr(n=>[gv(t,n)],n=>n.findIndex(r=>r.id===e.id),ur(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=gv(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const a=gv(t,n);return((r=a[a.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=cr(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>a=>{let s=[];if(!(t!=null&&t.length))s=a;else{const i=[...t],l=[...a];for(;l.length&&i.length;){const c=i.shift(),u=l.findIndex(d=>d.id===c);u>-1&&s.push(l.splice(u,1)[0])}s=[...s,...l]}return bUe(s,n,r)},ur(e.options,"debugTable"))}},dN=()=>({left:[],right:[]}),EUe={getInitialState:e=>({columnPinning:dN(),...e}),getDefaultOptions:e=>({onColumnPinningChange:nl("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var s,i;if(n==="right"){var l,c;return{left:((l=a==null?void 0:a.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((c=a==null?void 0:a.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var u,d;return{left:[...((u=a==null?void 0:a.left)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((d=a==null?void 0:a.right)!=null?d:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((s=a==null?void 0:a.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:((i=a==null?void 0:a.right)!=null?i:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,s,i;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((s=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:a}=t.getState().columnPinning,s=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return s?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();return a?(n=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=cr(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,a)=>{const s=[...r??[],...a??[]];return n.filter(i=>!s.includes(i.column.id))},ur(t.options,"debugRows")),e.getLeftVisibleCells=cr(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),ur(t.options,"debugRows")),e.getRightVisibleCells=cr(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(s=>n.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),ur(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?dN():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:dN())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var a,s;return!!((a=r.left)!=null&&a.length||(s=r.right)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=cr(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),ur(e.options,"debugColumns")),e.getRightLeafColumns=cr(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),ur(e.options,"debugColumns")),e.getCenterLeafColumns=cr(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const a=[...n??[],...r??[]];return t.filter(s=>!a.includes(s.id))},ur(e.options,"debugColumns"))}};function xUe(e){return e||(typeof document<"u"?document:null)}const tw={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},fN=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),_Ue={getDefaultColumnDef:()=>tw,getInitialState:e=>({columnSizing:{},columnSizingInfo:fN(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:nl("columnSizing",e),onColumnSizingInfoChange:nl("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,a;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:tw.minSize,(r=s??e.columnDef.size)!=null?r:tw.size),(a=e.columnDef.maxSize)!=null?a:tw.maxSize)},e.getStart=cr(n=>[n,gv(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((a,s)=>a+s.getSize(),0),ur(t.options,"debugColumns")),e.getAfter=cr(n=>[n,gv(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((a,s)=>a+s.getSize(),0),ur(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...a}=n;return a})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var s;n+=(s=a.column.getSize())!=null?s:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),a=r==null?void 0:r.getCanResize();return s=>{if(!r||!a||(s.persist==null||s.persist(),mN(s)&&s.touches&&s.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[r.id,r.getSize()]],c=mN(s)?Math.round(s.touches[0].clientX):s.clientX,u={},d=(b,E)=>{typeof E=="number"&&(t.setColumnSizingInfo(w=>{var x,S;const N=t.options.columnResizeDirection==="rtl"?-1:1,k=(E-((x=w==null?void 0:w.startOffset)!=null?x:0))*N,C=Math.max(k/((S=w==null?void 0:w.startSize)!=null?S:0),-.999999);return w.columnSizingStart.forEach(A=>{let[O,T]=A;u[O]=Math.round(Math.max(T+T*C,0)*100)/100}),{...w,deltaOffset:k,deltaPercentage:C}}),(t.options.columnResizeMode==="onChange"||b==="end")&&t.setColumnSizing(w=>({...w,...u})))},f=b=>d("move",b),m=b=>{d("end",b),t.setColumnSizingInfo(E=>({...E,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=xUe(n),g={moveHandler:b=>f(b.clientX),upHandler:b=>{h==null||h.removeEventListener("mousemove",g.moveHandler),h==null||h.removeEventListener("mouseup",g.upHandler),m(b.clientX)}},v={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),f(b.touches[0].clientX),!1),upHandler:b=>{var E;h==null||h.removeEventListener("touchmove",v.moveHandler),h==null||h.removeEventListener("touchend",v.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),m((E=b.touches[0])==null?void 0:E.clientX)}},y=kUe()?{passive:!1}:!1;mN(s)?(h==null||h.addEventListener("touchmove",v.moveHandler,y),h==null||h.addEventListener("touchend",v.upHandler,y)):(h==null||h.addEventListener("mousemove",g.moveHandler,y),h==null||h.addEventListener("mouseup",g.upHandler,y)),t.setColumnSizingInfo(b=>({...b,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?fN():(n=e.initialState.columnSizingInfo)!=null?n:fN())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}};let nw=null;function kUe(){if(typeof nw=="boolean")return nw;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return nw=e,nw}function mN(e){return e.type==="touchstart"}const SUe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:nl("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const a=e.columns;return(n=a.length?a.some(s=>s.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=cr(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),ur(t.options,"debugRows")),e.getVisibleCells=cr(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,a)=>[...n,...r,...a],ur(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>cr(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),ur(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,s)=>({...a,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function gv(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const CUe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},NUe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:nl("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,a,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Cu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return $S(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Cu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},RUe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:nl("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var a,s;e.setExpanded(r?{}:(a=(s=e.initialState)==null?void 0:s.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const i=s.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var a;const s=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(a=n)!=null?a:!s,!s&&n)return{...i,[e.id]:!0};if(s&&!n){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,a;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},qO=0,YO=10,hN=()=>({pageIndex:qO,pageSize:YO}),TUe={getInitialState:e=>({...e,pagination:{...hN(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:nl("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const a=s=>Ld(r,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?hN():(a=e.initialState.pagination)!=null?a:hN())},e.setPageIndex=r=>{e.setPagination(a=>{let s=Ld(r,a.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...a,pageIndex:s}})},e.resetPageIndex=r=>{var a,s;e.setPageIndex(r?qO:(a=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?a:qO)},e.resetPageSize=r=>{var a,s;e.setPageSize(r?YO:(a=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?a:YO)},e.setPageSize=r=>{e.setPagination(a=>{const s=Math.max(1,Ld(r,a.pageSize)),i=a.pageSize*a.pageIndex,l=Math.floor(i/s);return{...a,pageIndex:l,pageSize:s}})},e.setPageCount=r=>e.setPagination(a=>{var s;let i=Ld(r,(s=e.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...a,pageCount:i}}),e.getPageOptions=cr(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((s,i)=>i)),a},ur(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:r<a-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},pN=()=>({top:[],bottom:[]}),AUe={getInitialState:e=>({rowPinning:pN(),...e}),getDefaultOptions:e=>({onRowPinningChange:nl("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,a)=>{const s=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],i=a?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...i,e.id,...s]);t.setRowPinning(c=>{var u,d;if(n==="bottom"){var f,m;return{top:((f=c==null?void 0:c.top)!=null?f:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((m=c==null?void 0:c.bottom)!=null?m:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(n==="top"){var h,g;return{top:[...((h=c==null?void 0:c.top)!=null?h:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((g=c==null?void 0:c.bottom)!=null?g:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((d=c==null?void 0:c.bottom)!=null?d:[]).filter(v=>!(l!=null&&l.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(n=r??a)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:a}=t.getState().rowPinning,s=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return s?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();if(!a)return-1;const s=(n=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=s==null?void 0:s.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?pN():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:pN())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var a,s;return!!((a=r.top)!=null&&a.length||(s=r.bottom)!=null&&s.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=cr(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),ur(e.options,"debugRows")),e.getBottomRows=cr(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),ur(e.options,"debugRows")),e.getCenterRows=cr(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const a=new Set([...n??[],...r??[]]);return t.filter(s=>!a.has(s.id))},ur(e.options,"debugRows"))}},IUe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:nl("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(s=>{s.getCanSelect()&&(r[s.id]=!0)}):a.forEach(s=>{delete r[s.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...n};return e.getRowModel().rows.forEach(s=>{KO(a,s.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=cr(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?gN(e,n):{rows:[],flatRows:[],rowsById:{}},ur(e.options,"debugTable")),e.getFilteredSelectedRowModel=cr(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?gN(e,n):{rows:[],flatRows:[],rowsById:{}},ur(e.options,"debugTable")),e.getGroupedSelectedRowModel=cr(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?gN(e,n):{rows:[],flatRows:[],rowsById:{}},ur(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(a=>a.getCanSelect()&&!n[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(a=>!n[a.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const a=e.getIsSelected();t.setRowSelection(s=>{var i;if(n=typeof n<"u"?n:!a,e.getCanSelect()&&a===n)return s;const l={...s};return KO(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return O4(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ZO(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ZO(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var a;n&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},KO=(e,t,n,r,a)=>{var s;const i=a.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>KO(e,l.id,n,r,a))};function gN(e,t){const n=e.getState().rowSelection,r=[],a={},s=function(i,l){return i.map(c=>{var u;const d=O4(c,n);if(d&&(r.push(c),a[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:s(c.subRows)}),d)return c}).filter(Boolean)};return{rows:s(t.rows),flatRows:r,rowsById:a}}function O4(e,t){var n;return(n=t[e.id])!=null?n:!1}function ZO(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,s=!1;return e.subRows.forEach(i=>{if(!(s&&!a)&&(i.getCanSelect()&&(O4(i,t)?s=!0:a=!1),i.subRows&&i.subRows.length)){const l=ZO(i,t);l==="all"?s=!0:(l==="some"&&(s=!0),a=!1)}}),a?"all":s?"some":!1}const XO=/([0-9]+)/gm,OUe=(e,t,n)=>Ute(af(e.getValue(n)).toLowerCase(),af(t.getValue(n)).toLowerCase()),MUe=(e,t,n)=>Ute(af(e.getValue(n)),af(t.getValue(n))),PUe=(e,t,n)=>M4(af(e.getValue(n)).toLowerCase(),af(t.getValue(n)).toLowerCase()),DUe=(e,t,n)=>M4(af(e.getValue(n)),af(t.getValue(n))),LUe=(e,t,n)=>{const r=e.getValue(n),a=t.getValue(n);return r>a?1:r<a?-1:0},$Ue=(e,t,n)=>M4(e.getValue(n),t.getValue(n));function M4(e,t){return e===t?0:e>t?1:-1}function af(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ute(e,t){const n=e.split(XO).filter(Boolean),r=t.split(XO).filter(Boolean);for(;n.length&&r.length;){const a=n.shift(),s=r.shift(),i=parseInt(a,10),l=parseInt(s,10),c=[i,l].sort();if(isNaN(c[0])){if(a>s)return 1;if(s>a)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const w0={alphanumeric:OUe,alphanumericCaseSensitive:MUe,text:PUe,textCaseSensitive:DUe,datetime:LUe,basic:$Ue},FUe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:nl("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const a of n){const s=a==null?void 0:a.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return w0.datetime;if(typeof s=="string"&&(r=!0,s.split(XO).length>1))return w0.alphanumeric}return r?w0.text:w0.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return $S(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:w0[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const a=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i==null?void 0:i.find(h=>h.id===e.id),c=i==null?void 0:i.findIndex(h=>h.id===e.id);let u=[],d,f=s?n:a==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?d="toggle":d="add":i!=null&&i.length&&c!==i.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(s||a||(d="remove")),d==="add"){var m;u=[...i,{id:e.id,desc:f}],u.splice(0,u.length-((m=t.options.maxMultiSortColCount)!=null?m:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=i.map(h=>h.id===e.id?{...h,desc:f}:h):d==="remove"?u=i.filter(h=>h.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,a;const s=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==s&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(a=t.options.enableMultiRemove)!=null)||a)?!1:i==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(a=>a.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},zUe=[iUe,SUe,wUe,EUe,oUe,lUe,CUe,NUe,FUe,yUe,RUe,TUe,AUe,IUe,_Ue];function HUe(e){var t,n;const r=[...zUe,...(t=e._features)!=null?t:[]];let a={_features:r};const s=a._features.reduce((m,h)=>Object.assign(m,h.getDefaultOptions==null?void 0:h.getDefaultOptions(a)),{}),i=m=>a.options.mergeOptions?a.options.mergeOptions(s,m):{...s,...m};let c={...{},...(n=e.initialState)!=null?n:{}};
vendor: 4,884 bytes, line 1940
1940a._features.forEach(m=>{var h;c=(h=m.getInitialState==null?void 0:m.getInitialState(c))!=null?h:c});const u=[];let d=!1;const f={_features:r,options:{...s,...e},initialState:c,_queue:m=>{u.push(m),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{a.setState(a.initialState)},setOptions:m=>{const h=Ld(m,a.options);a.options=i(h)},getState:()=>a.options.state,setState:m=>{a.options.onStateChange==null||a.options.onStateChange(m)},_getRowId:(m,h,g)=>{var v;return(v=a.options.getRowId==null?void 0:a.options.getRowId(m,h,g))!=null?v:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(m,h)=>{let g=(h?a.getPrePaginationRowModel():a.getRowModel()).rowsById[m];if(!g&&(g=a.getCoreRowModel().rowsById[m],!g))throw new Error;return g},_getDefaultColumnDef:cr(()=>[a.options.defaultColumn],m=>{var h;return m=(h=m)!=null?h:{},{header:g=>{const v=g.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:g=>{var v,y;return(v=(y=g.renderValue())==null||y.toString==null?void 0:y.toString())!=null?v:null},...a._features.reduce((g,v)=>Object.assign(g,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...m}},ur(e,"debugColumns")),_getColumnDefs:()=>a.options.columns,getAllColumns:cr(()=>[a._getColumnDefs()],m=>{const h=function(g,v,y){return y===void 0&&(y=0),g.map(b=>{const E=sUe(a,b,y,v),w=b;return E.columns=w.columns?h(w.columns,E,y+1):[],E})};return h(m)},ur(e,"debugColumns")),getAllFlatColumns:cr(()=>[a.getAllColumns()],m=>m.flatMap(h=>h.getFlatColumns()),ur(e,"debugColumns")),_getAllFlatColumnsById:cr(()=>[a.getAllFlatColumns()],m=>m.reduce((h,g)=>(h[g.id]=g,h),{}),ur(e,"debugColumns")),getAllLeafColumns:cr(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(m,h)=>{let g=m.flatMap(v=>v.getLeafColumns());return h(g)},ur(e,"debugColumns")),getColumn:m=>a._getAllFlatColumnsById()[m]};Object.assign(a,f);for(let m=0;m<a._features.length;m++){const h=a._features[m];h==null||h.createTable==null||h.createTable(a)}return a}function VUe(){return e=>cr(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(a,s,i){s===void 0&&(s=0);const l=[];for(let u=0;u<a.length;u++){const d=A4(e,e._getRowId(a[u],u,i),a[u],u,s,void 0,i==null?void 0:i.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(a[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,s+1,d))}}return l};return n.rows=r(t),n},ur(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Bte(e,t,n){return n.options.filterFromLeafRows?UUe(e,t,n):BUe(e,t,n)}function UUe(e,t,n){var r;const a=[],s={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,u){u===void 0&&(u=0);const d=[];for(let m=0;m<c.length;m++){var f;let h=c[m];const g=A4(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(g.columnFilters=h.columnFilters,(f=h.subRows)!=null&&f.length&&u<i){if(g.subRows=l(h.subRows,u+1),h=g,t(h)&&!g.subRows.length){d.push(h),s[h.id]=h,a.push(h);continue}if(t(h)||g.subRows.length){d.push(h),s[h.id]=h,a.push(h);continue}}else h=g,t(h)&&(d.push(h),s[h.id]=h,a.push(h))}return d};return{rows:l(e),flatRows:a,rowsById:s}}function BUe(e,t,n){var r;const a=[],s={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,u){u===void 0&&(u=0);const d=[];for(let m=0;m<c.length;m++){let h=c[m];if(t(h)){var f;if((f=h.subRows)!=null&&f.length&&u<i){const v=A4(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);v.subRows=l(h.subRows,u+1),h=v}d.push(h),a.push(h),s[h.id]=h}}return d};return{rows:l(e),flatRows:a,rowsById:s}}function jUe(){return(e,t)=>cr(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,a)=>{if(!n.rows.length||!(r!=null&&r.length)&&!a)return n;const s=[...r.map(l=>l.id).filter(l=>l!==t),a?"__global__":void 0].filter(Boolean),i=l=>{for(let c=0;c<s.length;c++)if(l.columnFilters[s[c]]===!1)return!1;return!0};return Bte(n.rows,i,e)},ur(e.options,"debugTable"))}function WUe(){return(e,t)=>cr(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let s=0;s<n.flatRows.length;s++){const i=n.flatRows[s].getUniqueValues(t);for(let l=0;l<i.length;l++){const c=i[l];if(r.has(c)){var a;r.set(c,((a=r.get(c))!=null?a:0)+1)}else r.set(c,1)}}return r},ur(e.options,"debugTable"))}function GUe(){return e=>cr(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let m=0;m<t.flatRows.length;m++)t.flatRows[m].columnFilters={},t.flatRows[m].columnFiltersMeta={};return t}const a=[],s=[];
1940(n??[]).forEach(m=>{var h;const g=e.getColumn(m.id);if(!g)return;const v=g.getFilterFn();v&&a.push({id:m.id,filterFn:v,resolvedValue:(h=v.resolveFilterValue==null?void 0:v.resolveFilterValue(m.value))!=null?h:m.value})});const i=(n??[]).map(m=>m.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(m=>m.getCanGlobalFilter());r&&l&&c.length&&(i.push("__global__"),c.forEach(m=>{var h;s.push({id:m.id,filterFn:l,resolvedValue:(h=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?h:r})}));let u,d;for(let m=0;m<t.flatRows.length;m++){const h=t.flatRows[m];if(h.columnFilters={},a.length)for(let g=0;g<a.length;g++){u=a[g];const v=u.id;h.columnFilters[v]=u.filterFn(h,v,u.resolvedValue,y=>{h.columnFiltersMeta[v]=y})}if(s.length){for(let g=0;g<s.length;g++){d=s[g];const v=d.id;if(d.filterFn(h,v,d.resolvedValue,y=>{h.columnFiltersMeta[v]=y})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const f=m=>{for(let h=0;h<i.length;h++)if(m.columnFilters[i[h]]===!1)return!1;return!0};return Bte(t.rows,f,e)},ur(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function qUe(){return e=>cr(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,a=[],s=r.filter(c=>{var u;return(u=e.getColumn(c.id))==null?void 0:u.getCanSort()}),i={};s.forEach(c=>{const u=e.getColumn(c.id);u&&(i[c.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const l=c=>{const u=c.map(d=>({...d}));return u.sort((d,f)=>{for(let h=0;h<s.length;h+=1){var m;const g=s[h],v=i[g.id],y=v.sortUndefined,b=(m=g==null?void 0:g.desc)!=null?m:!1;let E=0;if(y){const w=d.getValue(g.id),x=f.getValue(g.id),S=w===void 0,N=x===void 0;if(S||N){if(y==="first")return S?-1:1;if(y==="last")return S?1:-1;E=S&&N?0:S?y:-y}}if(E===0&&(E=v.sortingFn(d,f,g.id)),E!==0)return b&&(E*=-1),v.invertSorting&&(E*=-1),E}return d.index-f.index}),u.forEach(d=>{var f;a.push(d),(f=d.subRows)!=null&&f.length&&(d.subRows=l(d.subRows))}),u};return{rows:l(n.rows),flatRows:a,rowsById:n.rowsById}},ur(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** 1941 * react-table 1942 * 1943 * Copyright (c) TanStack 1944 * 1945 * This source code is licensed under the MIT license found in the 1946 * LICENSE.md file in the root directory of this source tree. 1947 * 1948 * @license MIT 1949 */function sz(e,t){return e?YUe(e)?p.createElement(e,t):e:null}function YUe(e){return KUe(e)||typeof e=="function"||ZUe(e)}function KUe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function ZUe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function XUe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=p.useState(()=>({current:HUe(t)})),[r,a]=p.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...r,...e.state},onStateChange:i=>{a(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}const Vg=Ir(xr()),P4=pt(Vg,Ze("users-asset-manage-edit")),QUe=pt(Vg,Ze("users-asset-iteration-edit")),JUe=pt(Vg,Ze("markfavorite-toggle")),eBe=pt(Vg,Ze("users-asset-manage-deleteBulk")),tBe=pt(Vg,Ze("users-tag-manage-add")),nBe=pt(Vg,Ze("users-asset-manage-add")),Qo=async(e,t,n)=>{if(!e||!t)return;const r={...t,...n};return await Qe.action.set({tableID:"Assets-General-All",dataList:[r],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r},FS=()=>Math.floor(Date.now()/1e3),iz=async(e,t)=>{const n=e.name,r=e.date_modified;await Qo(e.$id,e,{name:t,date_modified:FS()});try{await P4({asset:{$id:e.$id,property_name:t},silent_log:!0})}catch(a){throw await Qo(e.$id,e,{name:n,date_modified:r}),a}},t_=async(e,t)=>{const n=e.$collection_id,r=e.collection_name,a=e.date_modified;await Qo(e.$id,e,{$collection_id:(t==null?void 0:t.id)||null,collection_name:(t==null?void 0:t.name)||null,date_modified:FS()});try{await P4({asset:{$id:e.$id,id_collection:(t==null?void 0:t.id)||null},silent_log:!0})}catch(s){throw await Qo(e.$id,e,{$collection_id:n,collection_name:r,date_modified:a}),s}},ig=async(e,t,n=[])=>{var i,l;const r=e.tags||[],a=e.date_modified,s=FS();await Qo(e.$id,e,{tags:t,date_modified:s});try{const c=t.map(f=>f.$id).filter(f=>f&&!f.startsWith("__pending__")),u=await P4({asset:{$id:e.$id,id_tags:c,$new_tags:n.map(f=>({name:f}))},silent_log:!0}),d=((l=(i=u==null?void 0:u.data)==null?void 0:i.output)==null?void 0:l.newTagIDs)||[];
1949if(d.length===n.length){const f=t.map(h=>{if(!h.$id||!h.$id.startsWith("__pending__"))return h;const g=h.$id.replace(/^__pending__/,""),v=n.indexOf(g);return v<0?h:{$id:d[v],name:h.name}});await Qo(e.$id,e,{tags:f,date_modified:s});const m=e.$team_id;if(m&&d.length>0){const h=d.map((g,v)=>({$id:g,id:g,name:n[v],teamID:m,$team_id:m,count:0,$optimistic:!0}));await Qe.action.set({tableID:"Tags",dataList:h,options:{skipClear:!0}})}}}catch(c){throw await Qo(e.$id,e,{tags:r,date_modified:a}),c}},oz=async e=>{var n;const t=!!e.is_favorited;await Qo(e.$id,e,{is_favorited:!t});try{const{data:r}=await JUe({assetID:e.$id}),a=!!((n=r==null?void 0:r.output)!=null&&n.is_active);return a!==!t&&await Qo(e.$id,e,{is_favorited:a}),a}catch(r){throw await Qo(e.$id,e,{is_favorited:t}),r}},Ug=async e=>!e||!Qe.base?null:Qe.base["Assets-General-All"].get(e),D4=e=>{const t=e.filter(a=>a.status==="fulfilled").length,n=e.length-t,r=e.filter(a=>a.status==="rejected").map(a=>a.reason);return{ok:t,fail:n,errors:r}},rBe=async(e,t)=>{var r,a;if(!e||!t||t.length===0)return[];const n=[];for(const s of t){const i=String(s||"").trim();if(i)try{const l=await tBe({tag:{id_team:e,property_name:i}}),c=(a=(r=l==null?void 0:l.data)==null?void 0:r.output)==null?void 0:a.tagID;c&&n.push({$id:c,name:i})}catch(l){console.error("createTagsInWorkspace: failed for",i,l)}}return n},aBe=async(e,t)=>{const n=await Promise.allSettled(e.map(r=>t_(r,t)));return D4(n)},sBe=async(e,t)=>{const n=await Promise.allSettled(e.map(r=>{const a=new Set((r.tags||[]).map(l=>l.$id)),s=t.filter(l=>!a.has(l.$id));if(s.length===0)return Promise.resolve();const i=[...r.tags||[],...s];return ig(r,i,[])}));return D4(n)},iBe=async(e,t)=>{const n=new Set(t),r=await Promise.allSettled(e.map(a=>{const s=(a.tags||[]).filter(i=>!n.has(i.$id));return s.length===(a.tags||[]).length?Promise.resolve():ig(a,s,[])}));return D4(r)},jte=async e=>{var t;if(!e||e.length===0)return{ok:0,fail:0};try{const n=await eBe({assets:e.map(s=>({$id:s.$id}))}),r=((t=n==null?void 0:n.data)==null?void 0:t.output)||[],a=r.filter(s=>!s.error).length;return{ok:a,fail:r.length-a,output:r}}catch(n){return{ok:0,fail:e.length,errors:[n]}}},Wte=async e=>{await Promise.all(e.map(t=>Qe.action.delete({tableID:"Assets-General-All",id:t})))},n_=async e=>{!e||e.length===0||await Qe.action.set({tableID:"Assets-General-All",dataList:e,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}})},oBe=e=>{const t=String(e||"").trim();if(!t)return null;const n=/^https?:\/\//i.test(t)?t:`https://${t}`;try{const r=new URL(n);return!r.hostname||!r.hostname.includes(".")?null:r.href}catch{return null}},lz=e=>{try{if(!e)return null;const t=new URL(e);let n=(t.host+t.pathname).toLowerCase();return n.endsWith("/")&&(n=n.slice(0,-1)),n}catch{return null}},lBe=async(e,t)=>{var n,r;try{if(!e||!((r=(n=Qe==null?void 0:Qe.base)==null?void 0:n.isOpen)!=null&&r.call(n)))return null;const a=lz(t);return a&&(await Qe.base.table("Assets-General-All").where("$team_id").equals(e).toArray()).find(i=>{var c;if(i._is_deleted)return!1;const l=lz(((c=i.active_iteration)==null?void 0:c.url)||i.url);return l&&l===a})||null}catch{return null}},cBe=async(e,{url:t,name:n}={})=>{if(!e)throw new Error("No workspace selected.");const r=String(t||"").trim();if(!r)throw new Error("A URL is required to add a bookmark.");const a=String(n||"").trim()||r,s=Math.floor(Date.now()/1e3),i=`__optimistic__${Date.now()}_${Math.random().toString(36).slice(2)}`,l={$team_id:e,name:a,$collection_id:null,collection_name:null,tags:[],is_favorited:!1,date_created:s,date_modified:s};await Qe.action.set({tableID:"Assets-General-All",dataList:[{...l,$id:i,id:i,active_iteration:{url:r,auto_preview_thumbnail:null},$optimistic:!0,$pending:!0}],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!0}});const c=(async()=>{var h;let u;try{u=await nBe({asset:{id_team:e,id_project:null,id_collection:null,id_tags:[],ids_notifications_team_members:[],property_name:a,property_description:"",property_type:"bookmark",$new_tags:[]},iteration:{property_url:r,property_url_original:r,property_display_format:"",property_change_notes:"",property_screenshot_strategy:"auto",property_auto_preview_thumbnail:null},source:"webapp",collection:{property_name:null},client_request_id:null})}catch(g){throw await Qe.action.delete({tableID:"Assets-General-All",id:i}),g}const d=((h=u==null?void 0:u.data)==null?void 0:h.output)||{},f=d.assetID;if(!f)throw await Qe.action.delete({tableID:"Assets-General-All",id:i}),new Error("Bookmark wasn't created. Please try again.");const m={...l,$id:f,id:f,active_iteration:{url:r,auto_preview_thumbnail:d.iterationThumbnailStoragePath||null},$optimistic:!0,$localDB:{$index:0}};return await Qe.base.transaction("rw","Assets-General-All",async()=>{const g=Qe.base["Assets-General-All"];await g.delete(i),await g.put(m)}
1949),f})();return{tempID:i,settled:c}},cz=async(e,t)=>{const n=e.active_iteration||{};if(!n.$id)throw new Error("Cannot edit URL: no active iteration for this asset.");const r=e.date_modified,a=FS();await Qo(e.$id,e,{active_iteration:{...n,url:t},date_modified:a});try{const{data:s}=await QUe({iteration:{$id:n.$id,id_asset:e.$id,property_url:t},silent_log:!0}),i=(s==null?void 0:s.output)||{},l={...n,url:t,favicon:i.favicon??n.favicon,favicon_url:i.favicon_url??n.favicon_url,auto_preview_thumbnail:i.auto_preview_thumbnail??n.auto_preview_thumbnail};await Qo(e.$id,e,{active_iteration:l,date_modified:a})}catch(s){throw await Qo(e.$id,e,{active_iteration:n,date_modified:r}),s}},Gte=p.createContext({pushUndo:()=>{}}),uBe=25,qte=({children:e})=>{const t=p.useRef([]),n=p.useRef(!1),r=p.useCallback(s=>{!s||typeof s.inverse!="function"||(t.current.push(s),t.current.length>uBe&&t.current.shift())},[]),a=p.useCallback(async()=>{if(n.current)return null;const s=t.current.pop();if(!s)return null;n.current=!0;try{await s.inverse(),re.dispatch("trigger-alert",{message:s.label?`Undone: ${s.label}`:"Undone.",intent:"success"})}catch(i){re.dispatch("trigger-alert",{message:(i==null?void 0:i.message)||"Undo failed.",intent:"danger"}),t.current.push(s)}finally{n.current=!1}return s},[]);return p.useEffect(()=>{const s=i=>{if((i.metaKey||i.ctrlKey)&&!i.shiftKey&&i.key==="z"){const l=document.activeElement,c=((l==null?void 0:l.tagName)||"").toLowerCase();if(c==="input"||c==="textarea"||l!=null&&l.isContentEditable)return;i.preventDefault(),a()}};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[a]),o.createElement(Gte.Provider,{value:{pushUndo:r}},e)},Bg=()=>p.useContext(Gte),dBe=({value:e,placeholder:t="â",onCommit:n})=>{const[r,a]=p.useState(!1),[s,i]=p.useState(e||""),l=p.useRef(null);p.useEffect(()=>{r||i(e||"")},[e,r]),p.useEffect(()=>{r&&l.current&&(l.current.focus(),l.current.select())},[r]);const c=async()=>{const d=s.trim();if(a(!1),d!==(e||"").trim())try{await n(d)}catch(f){i(e||""),re.dispatch("trigger-alert",{message:(f==null?void 0:f.message)||"Failed to save change. Try again.",intent:"danger"})}},u=()=>{i(e||""),a(!1)};return r?o.createElement("input",{ref:l,type:"text",value:s,onChange:d=>i(d.target.value),onBlur:c,onKeyDown:d=>{d.key==="Enter"?(d.preventDefault(),d.currentTarget.blur()):d.key==="Escape"&&(d.preventDefault(),u()),d.stopPropagation()},className:"workspace-table-input"}):o.createElement("span",{className:"text-sm leading-6 text-gray-900 dark:text-gray-100 truncate block h-6 cursor-text border border-transparent px-1 -mx-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>a(!0),tabIndex:0,onFocus:()=>a(!0)},e||o.createElement("span",{className:"text-gray-400"},t))},L4=(e,{includeTeamless:t=!1,allWorkspaces:n=!1}={})=>{const r=Xo(async()=>{if(!Qe.base)return;const a=Qe.base.Collections;return n?a.toArray():e?t?(await a.toArray()).filter(i=>i.$team_id===e||i.$team_id==null):a.where("$team_id").equals(e).toArray():[]},[e,t,n]);return p.useMemo(()=>r&&[...r].sort((a,s)=>(a.name||"").localeCompare(s.name||"")),[r])};function Yte(e){if(!e)return{controlTokens:{},inputTokens:{},parts:{}};const t="#1f2937",n="#111827",r="#374151",a="#e5e7eb",s="#9ca3af",i="#374151",l="#2563eb",c="#374151";return{controlTokens:{backgroundColor:n,color:a,borderColor:r,"&:hover":{borderColor:r}},inputTokens:{color:a},parts:{menu:u=>({...u,backgroundColor:t,border:`1px solid ${r}`}),menuList:u=>({...u,backgroundColor:t}),singleValue:u=>({...u,color:a}),placeholder:u=>({...u,color:s}),option:(u,d)=>({...u,backgroundColor:d.isSelected?l:d.isFocused?i:"transparent",color:d.isSelected?"#ffffff":a,"&:active":{backgroundColor:l}}),multiValue:u=>({...u,backgroundColor:c}),multiValueLabel:u=>({...u,color:a})}}}const uz={value:null,label:"(No collection)"},fBe=({row:e})=>{const t=e.original,n=L4(t.$team_id),[r,a]=p.useState(!1),{pushUndo:s}=Bg(),i=ll(),l=Yte(i),c=p.useMemo(()=>{const f=(n||[]).map(m=>({value:m.$id,label:m.name}));return[uz,...f]},[n]),u=t.$collection_id?{value:t.$collection_id,label:t.collection_name}:uz,d=async f=>{a(!1);const m=f!=null&&f.value?{id:f.value,name:f.label}:null;if(((m==null?void 0:m.id)||null)===(t.$collection_id||null))return;const h=t.$collection_id?{id:t.$collection_id,name:t.collection_name}:null;try{await t_(t,m),s({label:m?`move to "${m.name}"`:"remove from collection",inverse:async()=>{const g=await Ug(t.$id);g&&await t_(g,h)}})}catch(g){re.dispatch("trigger-alert",{message:(g==null?void 0:g.message)||"Could not move bookmark. Try again.",intent:"danger"})}};return r?o.createElement(km,{autoFocus:!0,defaultMenuIsOpen:!0,value:u,onChange:d,onBlur:()=>a(!1),options:c,isClearable:!1,menuPortalTarget:typeof document<"u"?document.body:null,className:"bookmark-table_select",classNames:{menu:()=>"bookmark-table_select",menuPortal:()=>"bookmark-table_select"},styles:{menuPortal:f=>({...f,zIndex:70}),...l.parts,control:f=>({...f,minHeight:24,height:24,fontSize:13,borderColor:"#d1d5db",boxShadow:"none","&:hover":{borderColor:"#d1d5db"},...l.controlTokens}),valueContainer:f=>({...f,padding:"0 6px",height:24}),dropdownIndicator:f=>({...f,padding:2}),indicatorSeparator:f=>({...f,marginTop:4,marginBottom:4}),input:f=>({...f,margin:0,padding:0,...l.inputTokens})}}):o.createElement("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate block cursor-pointer px-1 -mx-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800",onClick:()=>a(!0)},t.collection_name||o.createElement("span",{className:"text-gray-400"},"â"))},$4=(e,{includeTeamless:t=!1,allWorkspaces:n=!1}={})=>{const r=Xo(async()=>
1949{if(!Qe.base)return;const a=Qe.base.Tags;return n?a.toArray():e?t?(await a.toArray()).filter(i=>i.$team_id===e||i.$team_id==null):a.where("$team_id").equals(e).toArray():[]},[e,t,n]);return p.useMemo(()=>r&&[...r].sort((a,s)=>(a.name||"").localeCompare(s.name||"")),[r])},mBe=e=>e.data&&e.data.__isNew__?null:o.createElement(ZD.Option,{...e}),hBe=({row:e})=>{const t=e.original,n=t.tags||[],r=$4(t.$team_id),[a,s]=p.useState(!1),[i,l]=p.useState(null),c=p.useRef(!1),u=p.useRef(null),{pushUndo:d}=Bg(),f=ll(),m=Yte(f),h=p.useMemo(()=>(r||[]).map(b=>({value:b.$id,label:b.name})),[r]),g=p.useMemo(()=>n.map(b=>({value:b.$id,label:b.name})),[n]),v=()=>{c.current=!1,l(null),s(!0)};p.useEffect(()=>{if(!a)return;const b=E=>{const w=u.current;!w||w.contains(E.target)||E.target.closest("[class*='Menu'], [class*='Option'], [class*='menu']")||y()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[a,i]);const y=async()=>{if(c.current||(c.current=!0,s(!1),!i))return;const b=[],E=[];for(const k of i)k.__isNew__?E.push(k.label):b.push({$id:k.value,name:k.label});const w=[...b,...E.map(k=>({$id:`__pending__${k}`,name:k}))],x=n.map(k=>k.$id).filter(Boolean).sort().join("|"),S=b.map(k=>k.$id).sort().join("|");if(x===S&&E.length===0)return;const N=n.map(k=>({$id:k.$id,name:k.name}));try{await ig(t,w,E),d({label:"tag edit",inverse:async()=>{const k=await Ug(t.$id);k&&await ig(k,N,[])}})}catch(k){re.dispatch("trigger-alert",{message:(k==null?void 0:k.message)||"Could not update tags. Try again.",intent:"danger"})}};return a?o.createElement("div",{ref:u,className:"tags-cell-editing",style:{position:"relative",height:24},onKeyDown:b=>b.key==="Escape"&&y()},o.createElement("div",{style:{position:"absolute",top:0,left:0,right:0,zIndex:30}},o.createElement(JD,{autoFocus:!0,defaultMenuIsOpen:!0,isMulti:!0,blurInputOnSelect:!1,closeMenuOnSelect:!1,defaultValue:g,onChange:b=>l(b||[]),options:h,placeholder:"Add tagsâ¦",components:{Option:mBe},menuPortalTarget:typeof document<"u"?document.body:null,className:"bookmark-table_select",classNames:{menu:()=>"bookmark-table_select",menuPortal:()=>"bookmark-table_select"},styles:{menuPortal:b=>({...b,zIndex:70}),...m.parts,control:b=>({...b,minHeight:24,fontSize:13,borderColor:"#d1d5db",boxShadow:"none","&:hover":{borderColor:"#d1d5db"},...m.controlTokens}),valueContainer:b=>({...b,padding:"0 6px",gap:"2px"}),multiValue:b=>({...m.parts.multiValue?m.parts.multiValue(b):b,fontSize:12,margin:0,height:18,display:"flex",alignItems:"center"}),multiValueLabel:b=>({...m.parts.multiValueLabel?m.parts.multiValueLabel(b):b,fontSize:12,padding:"0 2px 0 6px",lineHeight:"18px"}),multiValueRemove:b=>({...b,padding:"0 2px",...f?{color:"#e5e7eb"}:{}}),dropdownIndicator:b=>({...b,padding:2}),indicatorSeparator:b=>({...b,marginTop:4,marginBottom:4}),input:b=>({...b,margin:0,padding:0,...m.inputTokens})}}))):n.length===0?o.createElement("div",{className:"h-6 flex items-center w-full text-gray-400 cursor-pointer hover:text-gray-600 dark:hover:text-gray-300",onClick:v},"â"):o.createElement("div",{className:"flex flex-wrap gap-1 cursor-pointer",onClick:v},n.map(b=>o.createElement("span",{key:b.$id,className:"text-xs px-2 py-0.5 rounded bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300"},b.name)))},pBe=({row:e})=>{const t=e.original,n=!!t.is_favorited,[r,a]=p.useState(!1),{pushUndo:s}=Bg(),i=async l=>{if(l.stopPropagation(),!r){a(!0);try{const c=await oz(t);s({label:c?"star":"unstar",inverse:async()=>{const u=await Ug(t.$id);u&&await oz(u)}})}catch(c){re.dispatch("trigger-alert",{message:(c==null?void 0:c.message)||"Could not update favorite. Try again.",intent:"danger"})}finally{a(!1)}}};return o.createElement("button",{onClick:i,disabled:r,className:`inline-flex items-center justify-center w-6 h-6 rounded transition-opacity ${r?"opacity-50":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,"aria-label":n?"Unstar":"Star"},o.createElement(lL,{size:16,className:n?"fill-yellow-400 text-yellow-400":"text-gray-300 dark:text-gray-600"}))},gBe=({row:e})=>{const t=e.original,r=(t.active_iteration||{}).url||"",[a,s]=p.useState(!1),[i,l]=p.useState(r),[c,u]=p.useState(!1),d=p.useRef(null),{pushUndo:f}=Bg();p.useEffect(()=>{a||l(r)},[r,a]),p.useEffect(()=>{a&&d.current&&(d.current.focus(),d.current.select())},[a]);const m=async()=>{const g=i.trim();if(s(!1),!(!g||g===r)){u(!0);try{await cz(t,g),f({label:"URL change",inverse:async()=>{const v=await Ug(t.$id);v&&await cz(v,r)}})}catch(v){re.dispatch("trigger-alert",{message:(v==null?void 0:v.message)||"Could not update URL. Try again.",intent:"danger"})}finally{u(!1)}}},h=()=>{l(r),s(!1)};return a?o.createElement("input",{ref:d,type:"url",value:i,onChange:g=>l(g.target.value),onBlur:m,onKeyDown:g=>{g.key==="Enter"?(g.preventDefault(),g.currentTarget.blur()):g.key==="Escape"&&(g.preventDefault(),h()),g.stopPropagation()},className:"workspace-table-input"}):o.createElement("div",{className:`group flex items-center gap-1 h-6 leading-6 -mx-1 px-1 rounded border border-transparent ${c?"border-l-2 border-l-blue-400 dark:border-l-blue-500 bg-blue-50/30 dark:bg-blue-950/20":""}`},r?o.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-sm truncate block flex-1 !text-gray-900 dark:!text-gray-100 no-underline hover:!no-underline dark:hover:!text-fuchsia-500",onClick:g=>g.stopPropagation()},r):o.createElement("span",{className:"text-gray-400 flex-1"},"â"),o.createElement("button",{onClick:g=>{g.stopPropagation(),s(!0)},className:"opacity-0 group-hover:opacity-100 text-xs text-gray-500 hover:text-gray-900 dark:hover:text-gray-100 px-1",title:"Edit URL"},"Edit"))},Kte=({checked:e,indeterminate:t,onChange:n,ariaLabel:r})=>{const a=o.useRef(null);return o.useEffect(()=>{a.current&&(a.current.indeterminate=!!t)},[t]),o.createElement("input",{ref:a,type:"checkbox",checked:!!e,onChange:n,onClick:s=>s.stopPropagation(),"aria-label":r,className:"cursor-pointer w-4 h-4 accent-blue-600 dar
1949k:accent-blue-500"})},vBe=({table:e})=>o.createElement(Kte,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),ariaLabel:"Select all visible rows"}),yBe=({row:e,onShiftSelect:t})=>{const n=r=>{r.nativeEvent.shiftKey&&t?t(e):e.toggleSelected()};return o.createElement(Kte,{checked:e.getIsSelected(),onChange:n,ariaLabel:`Select row ${e.original.name||"Untitled"}`})},bBe={google:"Google",gcp:"Google Cloud",microsoft:"Microsoft",azure:"Microsoft Azure",atlassian:"Atlassian",aws:"AWS",github:"GitHub",gitlab:"GitLab",zoho:"Zoho",hubspot:"HubSpot",salesforce:"Salesforce"},Zte=e=>bBe[e]||String(e||"").split(/[-.]/)[0].replace(/^\w/,t=>t.toUpperCase()),Ny="provider:",Ry="product:",F4=e=>!e||!e.provider?null:e.product?`${Ry}${e.provider}:${e.product}`:`${Ny}${e.provider}`,wBe=(e,t)=>{if(!e||!t||!t.provider)return!1;if(e.startsWith(Ny))return t.provider===e.slice(Ny.length);if(e.startsWith(Ry)){const n=e.slice(Ry.length),r=n.indexOf(":");return r<0?!1:t.provider===n.slice(0,r)&&t.product===n.slice(r+1)}return t.provider===e||t.label===e},Xte=(e,t)=>{const n=Array.isArray(t)?t:t?[t]:[];return n.length===0?!0:!e||!e.provider?!1:n.some(r=>wBe(r,e))},z4=e=>{const t=new Map;for(const n of e||[]){if(!n||!n.provider)continue;let r=t.get(n.provider);if(r||(r={provider:n.provider,label:Zte(n.provider),count:0,products:new Map},t.set(n.provider,r)),r.count+=1,n.product){const a=r.products.get(n.product);a?a.count+=1:r.products.set(n.product,{product:n.product,label:n.label||n.product,count:1})}}return Array.from(t.values()).map(n=>({...n,products:Array.from(n.products.values()).sort((r,a)=>a.count-r.count)})).sort((n,r)=>r.count-n.count)},Qte=(e,t=[])=>{if(!e)return"";if(e.startsWith(Ny)){const n=e.slice(Ny.length),r=t.find(a=>a.provider===n);return r?r.label:Zte(n)}if(e.startsWith(Ry)){const n=e.slice(Ry.length),r=n.indexOf(":");if(r<0)return e;const a=n.slice(0,r),s=n.slice(r+1),i=t.find(c=>c.provider===a),l=i&&i.products.find(c=>c.product===s);return l?l.label:s}return e};function H4(){const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia("(hover: hover) and (pointer: fine)").matches);return p.useEffect(()=>{const n=window.matchMedia("(hover: hover) and (pointer: fine)"),r=()=>t(n.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function EBe(){const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches);return p.useEffect(()=>{const n=window.matchMedia("(pointer: coarse)"),r=()=>t(n.matches);return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}const zS=e=>Array.isArray(e)?e:e?[e]:[],ap="__empty__",xBe=e=>{const t=new Map;for(const n of e||[]){const r=n&&n.collection_name;r&&t.set(r,(t.get(r)||0)+1)}return Array.from(t.entries()).map(([n,r])=>({value:n,label:n,count:r})).sort((n,r)=>r.count-n.count)},Jte=e=>{const t=new Map;let n=0;for(const a of e||[]){const s=a&&a.tags||[];if(s.length===0){n+=1;continue}for(const i of s){const l=t.get(i.$id);l?l.count+=1:t.set(i.$id,{value:i.$id,label:i.name||i.$id,count:1})}}const r=Array.from(t.values()).sort((a,s)=>s.count-a.count);return n>0?[{value:ap,label:"Untagged",count:n},...r]:r},_Be=e=>Array.from(e||new Map).filter(([t])=>t!=null&&t!=="").map(([t,n])=>({value:t,label:String(t),count:n})).sort((t,n)=>n.count-t.count),r_=(e,t=[])=>{const n=t.find(r=>r.value===e);return n?n.label:e},kBe=(e,t)=>{const n=zS(t);return n.length===0?!0:n.includes(e)},SBe=(e,t)=>{const n=zS(t);if(n.length===0)return!0;const r=e||[];return n.some(a=>a===ap?r.length===0:r.some(s=>s.$id===a||s.name===a))},Cc=tUe(),CBe=e=>{if(!e)return"â";const t=Ht.unix(e);return Ht().diff(t,"days")<7?t.fromNow():t.format("MMM D, YYYY")},NBe=({row:e,onFaviconFilter:t})=>{const n=H4();if(e.original.$pending)return o.createElement(os,{size:14});const r=e.original.active_iteration||{},a=r.favicon_url,s=r.favicon,i=r.site,l=Wn(d=>{var f,m,h;return s?(h=(m=(f=d==null?void 0:d.FB)==null?void 0:f.images)==null?void 0:m.previouslyLoaded)==null?void 0:h[s]:void 0});let c;a?c=o.createElement("img",{src:a,alt:"",className:"w-4 h-4 rounded-sm object-contain",onError:d=>{d.currentTarget.style.display="none"}}):s&&l!=="NOT_FOUND"?c=o.createElement("span",{className:"favicon-container"},o.createElement(Cm,{storagePath:s})):c=o.createElement(Jc,{size:16,className:"text-gray-400"});const u=F4(i);if(t&&u){const d=i.label||i.domain;return o.createElement(fr,{content:`Filter to ${d}`,disabled:!n},o.createElement("button",{type:"button",onClick:()=>t(u),className:"inline-flex items-center justify-center p-0 m-0 bg-transparent border-0 cursor-pointer hover:opacity-60 transition-opacity pt-1","aria-label":`Filter to ${d}`},c))}return c},RBe=({row:e,onFaviconFilter:t})=>{var a;const n=(a=e.original.active_iteration)==null?void 0:a.site;if(!n||!n.label)return o.createElement("span",{className:"text-xs text-gray-400"},"â");const r=F4(n);return o.createElement("button",{type:"button",onClick:()=>r&&t?t(r):null,title:`Filter to ${n.label}`,className:"text-xs text-left text-gray-600 dark:text-gray-300 truncate max-w-full bg-transparent border-0 p-0 cursor-pointer no-underline hover:!no-underline dark:hover:!text-fuchsia-500"},n.label)},TBe=({row:e,getValue:t})=>{const{pushUndo:n}=Bg();return o.createElement(dBe,{value:t(),placeholder:"Untitled",onCommit:async r=>
1949{const a=e.original.name,s=e.original.$id;try{await iz(e.original,r),n({label:`rename to "${r}"`,inverse:async()=>{const i=await Ug(s);i&&await iz(i,a)}})}catch(i){throw re.dispatch("trigger-alert",{message:(i==null?void 0:i.message)||"Could not rename bookmark.",intent:"danger"}),i}}})},dz=({getValue:e})=>o.createElement("span",{className:"text-xs text-gray-600 dark:text-gray-400 truncate block"},CBe(e())),ABe=(e,t,n)=>{if(!n)return!0;const r=e.getValue(t);return String(r||"").toLowerCase().includes(String(n).toLowerCase())},IBe=(e,t,n)=>{var a;return n?(((a=e.original.active_iteration)==null?void 0:a.url)||"").toLowerCase().includes(String(n).toLowerCase()):!0},OBe=(e,t,n)=>kBe(e.getValue(t),n),MBe=(e,t,n)=>n===void 0?!0:!!e.getValue(t)==!!n,PBe=(e,t,n)=>{var r;return Xte((r=e.original.active_iteration)==null?void 0:r.site,n)},DBe=(e,t,n)=>SBe(e.original.tags,n),fz=(e,t,n)=>{if(!n)return!0;const r=e.getValue(t);if(n==="never")return!r;if(!r)return!1;const a=Ht(),s=Ht.unix(r),i=a.diff(s,"days");return n==="7d"?i<=7:n==="30d"?i<=30:n==="older"?i>30:!0},LBe=({onShiftSelect:e,onFaviconFilter:t,siteEnabled:n=!1}={})=>[Cc.display({id:"select",header:vBe,cell:r=>o.createElement(yBe,{row:r.row,onShiftSelect:e}),size:40,minSize:40,enableSorting:!1,enableColumnFilter:!1,enableResizing:!1}),Cc.display({id:"favicon",header:"",cell:r=>o.createElement(NBe,{row:r.row,onFaviconFilter:n?t:void 0}),size:40,minSize:40,enableSorting:!1,enableColumnFilter:!1,enableResizing:!0}),Cc.accessor("name",{id:"name",header:"Name",cell:TBe,size:280,minSize:80,filterFn:ABe,meta:{filterType:"text",fixedSize:!0}}),Cc.accessor(r=>{var a;return(a=r.active_iteration)==null?void 0:a.url},{id:"url",header:"URL",cell:gBe,size:320,minSize:80,enableSorting:!1,filterFn:IBe,meta:{filterType:"text",fixedSize:!0}}),...n?[Cc.accessor(r=>{var a,s;return((s=(a=r.active_iteration)==null?void 0:a.site)==null?void 0:s.label)||""},{id:"site",header:"Site",cell:r=>o.createElement(RBe,{row:r.row,onFaviconFilter:t}),size:150,minSize:80,filterFn:PBe,meta:{filterType:"site"}})]:[],Cc.accessor("collection_name",{id:"collection",header:"Collection",cell:fBe,size:180,minSize:80,filterFn:OBe,meta:{filterType:"select"}}),Cc.accessor("tags",{id:"tags",header:"Tags",cell:hBe,size:220,minSize:80,enableSorting:!1,filterFn:DBe,meta:{filterType:"tags"}}),Cc.accessor("date_modified",{id:"date_modified",header:"Modified",cell:dz,size:120,minSize:70,filterFn:fz,meta:{filterType:"date"}}),Cc.accessor("date_viewed",{id:"date_viewed",header:"Viewed",cell:dz,size:120,minSize:70,filterFn:fz,meta:{filterType:"date"}}),Cc.accessor("is_favorited",{id:"is_favorited",header:()=>o.createElement(lL,{size:14,className:"text-gray-400 ml-1"}),cell:pBe,size:85,minSize:85,filterFn:MBe,meta:{filterType:"bool"},enableResizing:!0})],$Be=8,FBe=e=>Array.isArray(e)?e:e?[e]:[],V4=({tree:e,value:t,onChange:n})=>{const[r,a]=p.useState({}),s=new Set(FBe(t)),i=c=>{const u=Array.from(c);n(u.length?u:void 0)},l=c=>{const u=new Set(s);u.has(c)?u.delete(c):u.add(c),i(u)};return!e||e.length===0?o.createElement(Cr,null,o.createElement(Bt,{text:"No classified sites yet",disabled:!0})):o.createElement(Cr,{className:"max-h-[320px] overflow-y-auto min-w-[230px]"},o.createElement(Bt,{text:"All sites",icon:s.size===0?"tick":"blank",active:s.size===0,shouldDismissPopover:!1,onClick:()=>n(void 0)}),o.createElement(Zi,null),e.map(c=>{const u=`provider:${c.provider}`,d=c.products.length>0,m=r[c.provider]?c.products:c.products.slice(0,$Be),h=d?[...m.map(g=>{const v=`product:${c.provider}:${g.product}`;return o.createElement(Bt,{key:g.product,text:g.count?`${g.label} (${g.count})`:g.label,icon:s.has(v)?"tick":"blank",active:s.has(v),shouldDismissPopover:!1,onClick:()=>l(v)})}),c.products.length>m.length?o.createElement(Bt,{key:"__more",text:`Show ${c.products.length-m.length} moreâ¦`,shouldDismissPopover:!1,onClick:g=>{g.stopPropagation(),a(v=>({...v,[c.provider]:!0}))}}):null]:void 0;return o.createElement(Bt,{key:c.provider,text:c.count?`${c.label} (${c.count})`:c.label,icon:s.has(u)?"tick":"blank",active:s.has(u),shouldDismissPopover:!1,onClick:()=>l(u)},h)}))},zBe=12,og=({options:e,value:t,onChange:n,emptyText:r="No values yet",pinnedValues:a=[]})=>{const[s,i]=p.useState(!1),l=new Set(zS(t)),c=g=>{const v=new Set(l);v.has(g)?v.delete(g):v.add(g);const y=Array.from(v);n(y.length?y:void 0)};if(!e||e.length===0)return o.createElement(Cr,null,o.createElement(Bt,{text:r,disabled:!0}));const u=g=>o.createElement(Bt,{key:g.value,text:o.createElement("span",{className:"block truncate",title:g.label},g.label),labelElement:g.count?o.createElement("span",{className:"text-xs text-gray-400"},g.count):void 0,icon:l.has(g.value)?"tick":"blank",active:l.has(g.value),shouldDismissPopover:!1,onClick:()=>c(g.value)}
1949),d=new Set(a),f=e.filter(g=>!d.has(g.value)),m=e.filter(g=>d.has(g.value)),h=s?f:f.slice(0,zBe);return o.createElement(Cr,{className:"max-h-[320px] overflow-y-auto min-w-[220px] max-w-[360px]"},o.createElement(Bt,{text:"All",icon:l.size===0?"tick":"blank",active:l.size===0,shouldDismissPopover:!1,onClick:()=>n(void 0)}),o.createElement(Zi,null),h.map(u),f.length>h.length?o.createElement(Bt,{text:`Show ${f.length-h.length} moreâ¦`,shouldDismissPopover:!1,onClick:g=>{g.stopPropagation(),i(!0)}}):null,m.length>0?o.createElement(o.Fragment,null,o.createElement(Zi,null),m.map(u)):null)},HBe=(e,t,n)=>{var a,s,i,l;const r=((a=e.columnDef.meta)==null?void 0:a.filterType)||"text";if(r==="text")return o.createElement("div",{className:"p-2 min-w-[200px]"},o.createElement("input",{type:"text",autoFocus:!0,value:t||"",onChange:c=>n(c.target.value||void 0),placeholder:`Search ${e.columnDef.header||""}â¦`,className:"w-full px-2 py-1 text-sm bg-white dark:bg-gray-950 border rounded dark:border-gray-700 outline-none focus:border-blue-400"}));if(r==="bool"){const c=[{value:void 0,label:"Any"},{value:!0,label:"Yes"},{value:!1,label:"No"}];return o.createElement(Cr,null,c.map(u=>o.createElement(Bt,{key:String(u.value),text:u.label,active:t===u.value,onClick:()=>n(u.value)})))}if(r==="date"){const c=[{value:void 0,label:"All"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"older",label:"Older than 30 days"},{value:"never",label:"Never"}];return o.createElement(Cr,null,c.map(u=>o.createElement(Bt,{key:String(u.value),text:u.label,active:t===u.value,onClick:()=>n(u.value)})))}if(r==="site"){const c=((s=e.getFacetedRowModel)==null?void 0:s.call(e).rows)||[],u=z4(c.map(d=>{var f,m;return(m=(f=d.original)==null?void 0:f.active_iteration)==null?void 0:m.site}));return o.createElement(V4,{tree:u,value:t,onChange:n})}if(r==="select"){const c=_Be((i=e.getFacetedUniqueValues)==null?void 0:i.call(e));return o.createElement(og,{options:c,value:t,onChange:n})}if(r==="tags"){const c=((l=e.getFacetedRowModel)==null?void 0:l.call(e).rows)||[],u=Jte(c.map(d=>d.original));return o.createElement(og,{options:u,value:t,onChange:n,emptyText:"No tags yet"})}return null},VBe=({column:e})=>{const[t,n]=p.useState(!1),r=ll(),a=e.getFilterValue(),s=e.setFilterValue,i=a!==void 0&&a!==""&&a!==null,l=e.getCanSort(),c=e.getCanFilter();return o.createElement(Hr,{minimal:!0,placement:"bottom-end",isOpen:t,onInteraction:u=>n(u),popoverClassName:r?Xr:void 0,content:o.createElement("div",{className:"min-w-[180px]"},l?o.createElement(Cr,null,o.createElement(Bt,{icon:o.createElement(aIe,{size:14}),text:"Sort ascending",onClick:()=>{e.toggleSorting(!1),n(!1)}}),o.createElement(Bt,{icon:o.createElement(vZ,{size:14}),text:"Sort descending",onClick:()=>{e.toggleSorting(!0),n(!1)}}),e.getIsSorted()?o.createElement(Bt,{icon:o.createElement(Nm,{size:14}),text:"Clear sort",onClick:()=>{e.clearSorting(),n(!1)}}):null):null,l&&c?o.createElement(Zi,null):null,c?HBe(e,a,s):null,c&&i?o.createElement(Cr,null,o.createElement(Zi,null),o.createElement(Bt,{icon:o.createElement(Nm,{size:14}),text:"Clear filter",onClick:()=>{s(void 0),n(!1)}})):null)},o.createElement(De,{variant:"minimal",size:"small",className:`!px-1 !py-0 ${i?"text-blue-600 dark:text-blue-400":"text-gray-400 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-100"}`,onClick:u=>{u.stopPropagation(),n(!0)},"aria-label":`Sort or filter ${e.columnDef.header||""}`},i?o.createElement(hIe,{size:12,className:"text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-gray-100"}):o.createElement(eS,{size:12,className:"text-gray-500 dark:text-gray-400 hover:text-blue-500 dark:hover:text-gray-100"})))},UBe=({table:e,teamID:t,hasExplicitSizing:n})=>{const[r,a]=p.useState(""),[s,i]=p.useState(""),l=p.useRef(null),c=p.useRef(!1),u=p.useCallback(()=>{a(""),i("")},[]),d=p.useCallback(async()=>{if(c.current)return;const g=oBe(s);if(!g){s.trim()&&re.dispatch("trigger-alert",{message:"Enter a valid URL to add a bookmark.",intent:"danger"});return}c.current=!0;try{const v=await lBe(t,g);if(v){re.dispatch("trigger-alert",{message:`"${v.name||g}" is already saved in this workspace.`,intent:"danger"});return}const{settled:y}=await cBe(t,{url:g,name:r});u(),requestAnimationFrame(()=>{var b;return(b=l.current)==null?void 0:b.focus()}),y.catch(b=>{re.dispatch("trigger-alert",{message:(b==null?void 0:b.message)||"Couldn't save that bookmark â it was removed.",intent:"danger"})})}catch(v){re.dispatch("trigger-alert",{message:(v==null?void 0:v.message)||"Could not add bookmark. Try again.",intent:"danger"})}finally{c.current=!1}},[s,r,t,u]),f=g=>{g.stopPropagation(),g.key==="Enter"?(g.preventDefault(),d()):g.key==="Escape"&&(g.preventDefault(),u(),g.currentTarget.blur())},m=g=>{const v=g.relatedTarget;v&&g.currentTarget.contains(v)||d()},h=e.getVisibleLeafColumns();return o.createElement("tr",{onBlur:m,className:"border-t border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-950"},h.map(g=>{const v=n?{width:g.getSize()}:void 0,y="workspace-table-cell px-3 py-1.5 align-middle overflow-hidden border-r border-gray-200 dark:border-gray-800";return g.id==="favicon"||g.id==="select"?o.createElement("td",{key:g.id,style:v,className:y},g.id==="favicon"?o.createElement(zs,{size:16,className:"text-gray-400"}):null):g.id==="name"?o.createElement("td",{key:g.id,style:v,className:y},o.createElement("input",{type:"text",value:r,onChange:b=>a(b.target.value),onKeyDown:f,placeholder:"Name (optional)",className:"workspace-table-input","aria-label":"New bookmark name"})):g.id==="url"?o.createElement("td",{key:g.id,style:v,className:y},o.createElement("input",{ref:l,type:"text",value:s,onChange:b=>i(b.target.value),onKeyDown:f,placeholder:"Paste a URL and press Enter to addâ¦",className:"workspace-table-input","aria-label":"New bookmark URL"})):o.createElement("td",{key:g.id,style:v,className:y})}))},ene="tables_column_widths",BBe=()=>{try{const e=localStorage.getItem(ene);if(e)return JSON.parse(e)}catch{}return{}},jBe=e=>{try{localStorage.setItem(ene,JSON.stringify(e))}catch{}},tne=({bookmarks:e,isLoading:t,teamID:n,sorting:r,onSortingChange:a,c
1949olumnFilters:s,onColumnFiltersChange:i,rowSelection:l,onRowSelectionChange:c,isMiddlebarOpen:u=!1})=>{const d=p.useMemo(()=>e||[],[e]),[f,m]=p.useState(()=>BBe()),h=Object.keys(f).length>0,g=p.useRef(null),v=p.useRef(h);p.useEffect(()=>{jBe(f)},[f]);const y=p.useRef(null),b=p.useRef(null),E=p.useCallback(O=>{if(!b.current)return;const T=b.current.getRowModel().rows,M=T.findIndex(Y=>Y.id===O.id),L=y.current;if(L==null||M<0){O.toggleSelected(),y.current=M;return}const[D,j]=[Math.min(L,M),Math.max(L,M)],H={...b.current.getState().rowSelection||{}};for(let Y=D;Y<=j;Y++)H[T[Y].id]=!0;b.current.setRowSelection(H),y.current=M},[]),w=rS(),x=p.useCallback(O=>{if(!O||!b.current)return;const T=b.current.getColumn("site");T&&T.setFilterValue([O])},[]),S=p.useMemo(()=>LBe({onShiftSelect:E,onFaviconFilter:x,siteEnabled:w}),[E,x,w]),N=XUe({data:d,columns:S,state:{sorting:r,columnFilters:s,rowSelection:l,columnSizing:f},onSortingChange:a,onColumnFiltersChange:i,onRowSelectionChange:c,onColumnSizingChange:m,enableRowSelection:!0,enableMultiRowSelection:!0,enableColumnResizing:!0,columnResizeMode:"onChange",getRowId:O=>O.$id,getCoreRowModel:VUe(),getSortedRowModel:qUe(),getFilteredRowModel:GUe(),getFacetedRowModel:jUe(),getFacetedUniqueValues:WUe()});b.current=N,p.useEffect(()=>{y.current=null},[s,r]);const k=p.useCallback(O=>{var T,M;if((O.metaKey||O.ctrlKey)&&O.key==="a"){const L=(((T=document.activeElement)==null?void 0:T.tagName)||"").toLowerCase();if(L==="input"||L==="textarea"||(M=document.activeElement)!=null&&M.isContentEditable)return;O.preventDefault(),N.toggleAllRowsSelected(!0)}else O.key==="Escape"&&Object.keys(l||{}).length>0&&N.resetRowSelection()},[N,l]);if(p.useLayoutEffect(()=>{var L;if(v.current||!e||e.length===0||!g.current)return;const O=g.current.querySelectorAll("thead th");if(!O||O.length===0)return;const T=((L=N.getHeaderGroups()[0])==null?void 0:L.headers)||[],M={};T.forEach((D,j)=>{var K;if(!O[j])return;const H=D.column.columnDef.size||0,Y=D.column.columnDef.minSize||0;if((K=D.column.columnDef.meta)!=null&&K.fixedSize){M[D.column.id]=Math.max(H,Y);return}const z=O[j].offsetWidth;M[D.column.id]=Math.max(z,H,Y)}),Object.keys(M).length>0&&(v.current=!0,m(M))},[N,e==null?void 0:e.length]),t)return o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(os,null));const C=N.getRowModel().rows,A=(s||[]).length>0;return o.createElement("div",{className:`w-full h-full outline-none flex flex-col${u?" middlebar-open":" middlebar-hide"}`,tabIndex:0,onKeyDown:k},o.createElement("div",{className:"bookmark-table-canvas mb-4 flex-1 overflow-auto rounded-lg border border-gray-200 dark:border-gray-800 shadow-md"},o.createElement("table",{ref:g,className:`bookmark-table border-collapse text-sm ${h?"table-fixed":"w-full table-auto"}`,style:h?{width:N.getTotalSize()}:void 0},o.createElement("thead",{className:"sticky top-0 z-10 bg-gray-50 dark:bg-gray-900 border-b dark:border-gray-800"},N.getHeaderGroups().map(O=>o.createElement("tr",{key:O.id},O.headers.map(T=>{const M=T.column.getCanSort(),L=T.column.getCanFilter(),D=T.column.getIsSorted(),j=T.column.getCanResize(),H=T.column.getIsResizing(),Y=T.column.getFilterValue(),z=Y!==void 0&&Y!==""&&Y!==null;return o.createElement("th",{key:T.id,style:h?{width:T.getSize()}:void 0,className:`group relative text-left px-3 py-2 font-medium text-gray-600 dark:text-gray-400 uppercase tracking-wide text-xs select-none border-r border-gray-200 dark:border-gray-800 ${M?"cursor-pointer hover:text-gray-900 dark:hover:text-gray-100":""}`,onClick:M?T.column.getToggleSortingHandler():void 0},o.createElement("span",{className:"flex items-center gap-1"},o.createElement("span",{className:"flex-1 truncate"},sz(T.column.columnDef.header,T.getContext())),D==="asc"?o.createElement(sIe,{size:12}):D==="desc"?o.createElement(tIe,{size:12}):null,M||L?o.createElement("span",{className:`transition-opacity ${z?"opacity-100":"opacity-0 group-hover:opacity-100"}`,onClick:K=>K.stopPropagation()},o.createElement(VBe,{column:T.column})):null),j?o.createElement("div",{onMouseDown:K=>{K.stopPropagation(),T.getResizeHandler()(K)},onTouchStart:K=>{K.stopPropagation(),T.getResizeHandler()(K)},onClick:K=>K.stopPropagation(),className:`absolute top-0 right-0 h-full w-1 cursor-col-resize select-none touch-none hover:bg-blue-400 ${H?"bg-blue-500":"bg-transparent"}`}):null)})))),o.createElement("tbody",null,C.length===0&&A?o.createElement("tr",null,o.createElement("td",{colSpan:S.length,className:"px-3 py-12 text-center"},o.createElement(fs,{icon:o.createElement(tf,{size:28}),title:"No matches",description:"No bookmarks match the current filter. Clear filters from the column headers or pick a different saved view."}))):C.map(O=>{var L;const T=O.getIsSelected(),M=(L=O.original)==null?void 0:L.$pending;return o.createElement("tr",{key:O.id,className:`border-b border-gray-200 dark:border-gray-800 transition-colors ${T?"bg-blue-50 dark:bg-blue-950 hover:bg-blue-100 dar
1949k:hover:bg-blue-900":"bg-white dark:bg-gray-950 hover:bg-gray-50 dark:hover:bg-gray-900"} ${M?"opacity-60":""}`},O.getVisibleCells().map(D=>o.createElement("td",{key:D.id,style:h?{width:D.column.getSize()}:void 0,className:"workspace-table-cell px-3 py-2 align-middle overflow-hidden border-r border-gray-200 dark:border-gray-800"},sz(D.column.columnDef.cell,D.getContext()))))}),n?o.createElement(UBe,{table:N,teamID:n,hasExplicitSizing:h}):null)),o.createElement("div",{className:"bounce"})))},QO={all:{id:"all",label:"All bookmarks",icon:EZ,filters:[]},untagged:{id:"untagged",label:"Untagged",icon:Gm,filters:[{id:"tags",value:["__empty__"]}]}},WBe=({activeViewId:e,onSelectView:t,selectionCount:n=0,onClearSelection:r})=>{const a=yr(),[s,i]=p.useState(!1),l=Object.values(QO),c=()=>{if(typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window)){const h=String("https://bookmark.it.com").replace(/\/$/,"")||"",g=h?`${h}/import?from=tauri`:"https://bookmark.it.com/import?from=tauri";yn(()=>function(){return(y=>import(y))("./index.a906e697.js")}(),[]).then(({openUrl:v})=>v(g)).catch(v=>{console.error("Failed to open /import in default browser",v)});return}a("/import")},u=()=>{i(!0),re.dispatch("REFRESH_ASSETS_LIST"),setTimeout(()=>i(!1),1e3)},d="flex items-center gap-1.5 px-3 py-1 rounded text-xs font-medium text-primary hover:bg-primary/5 dark:text-fuchsia-300 dark:hover:bg-fuchsia-500/10 transition-colors";return o.createElement("div",{className:"flex items-center justify-between gap-4 p-4"},o.createElement("div",{className:"flex items-center gap-2 min-w-0 overflow-x-auto"},l.map(f=>{const m=f.icon,h=f.id===e;return o.createElement("button",{key:f.id,onClick:()=>t(f.id,f.filters),className:`flex items-center gap-1 px-3 py-1 rounded text-xs font-medium transition-colors ${h?"bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`},o.createElement(m,{size:14}),o.createElement("span",null,f.label))})),o.createElement("div",{className:"flex items-center gap-2 shrink-0"},n>0?o.createElement("div",{className:"flex items-center gap-2 px-3 py-1 rounded bg-blue-600 text-white text-xs font-medium"},o.createElement("span",null,n," selected"),o.createElement("button",{onClick:r,className:"inline-flex items-center justify-center w-4 h-4 rounded hover:bg-blue-700 transition-colors","aria-label":"Clear selection"},o.createElement(Nm,{size:12}))):null,o.createElement("button",{onClick:c,className:`${d} hd`,title:"Import bookmarks"},o.createElement(Yu,{size:14}),o.createElement("span",null,"Import bookmarks")),o.createElement("button",{onClick:u,className:d,title:"Sync"},o.createElement(oL,{size:14,className:s?"animate-spin":""}),o.createElement("span",null,"Sync"))))},sp=({label:e,icon:t,value:n,onChange:r,renderMenu:a,labelForToken:s})=>{const i=zS(n),l=ll(),c=u=>{const d=i.filter(f=>f!==u);r(d.length?d:void 0)};return o.createElement("div",{className:`flex items-center gap-1.5 flex-wrap ${l?Xr:""}`},o.createElement(Hr,{minimal:!0,placement:"bottom-start",popoverClassName:l?Xr:void 0,content:a(i,r)},o.createElement(De,{minimal:!0,small:!0,icon:t,rightIcon:"caret-down",text:i.length?`${e} · ${i.length}`:e,className:i.length?"":"text-gray-600 dark:text-gray-300",style:i.length?{backgroundColor:l?"rgba(45, 114, 210, 0.2)":"rgba(45, 114, 210, 0.1)",color:l?"#8abbff":"#215db0"}:void 0})),i.map(u=>{const d=s(u);return o.createElement(li,{key:u,minimal:!0,onRemove:()=>c(u),className:"max-w-[200px]"},o.createElement("span",{className:"block truncate",title:d},d))}),i.length>1?o.createElement(De,{minimal:!0,small:!0,text:"Clear",className:"text-gray-500",onClick:()=>r(void 0)}):null)},GBe=e=>e.data&&e.data.__isNew__?null:o.createElement(ZD.Option,{...e}),nne=({selectedAssets:e,workspaceTeamID:t,onClearSelection:n,onRequestDelete:r,disableCollectionTag:a=!1,selectMenuItems:s=[],onDone:i,selectedFilterActive:l=!1,onToggleSelectedFilter:c})=>{const u=e.length,d=u>0,f=!!c,m=L4(t),h=$4(t),{pushUndo:g}=Bg(),[v,y]=p.useState(!1),b=(x,S,N)=>{g({label:x,inverse:async()=>{for(const k of S){const C=await Ug(k.$id);C&&await N(C,k)}}})},E=p.useMemo(()=>{const x=new Map;for(const S of e)for(const N of S.tags||[])N.$id&&x.set(N.$id,N);return Array.from(x.values()).sort((S,N)=>(S.name||"").localeCompare(N.name||""))},[e]),w=async(x,S)=>
1949{if(!v){y(!0);try{const N=await x();N.fail>0?re.dispatch("trigger-alert",{message:`${S}: ${N.ok} succeeded, ${N.fail} failed.`,intent:"warning"}):re.dispatch("trigger-alert",{message:`${S} (${N.ok}).`,intent:"success"})}catch(N){re.dispatch("trigger-alert",{message:(N==null?void 0:N.message)||"Bulk action failed.",intent:"danger"})}finally{y(!1)}}};return o.createElement("div",{className:"flex items-center gap-4 py-4"},s.length>0?o.createElement(qBe,{items:s}):null,o.createElement("div",{className:`flex items-center gap-2 px-2 py-1 rounded text-xs font-medium ${d?!f||l?"bg-blue-600 text-white":"bg-gray-200 text-gray-700":"bg-gray-200 text-gray-500"}`},f?o.createElement("button",{type:"button",onClick:c,disabled:!d,"aria-pressed":l,title:d?l?"Show all bookmarks":"Show only selected bookmarks":void 0,className:d?"cursor-pointer":"cursor-not-allowed"},u," selected"):o.createElement("span",null,u," selected"),o.createElement("button",{onClick:n,disabled:!d,className:`inline-flex items-center justify-center w-4 h-4 rounded transition-colors ${d?!f||l?"hover:bg-blue-700":"hover:bg-gray-300":"opacity-50 cursor-not-allowed"}`,"aria-label":"Clear selection"},o.createElement(Nm,{size:12}))),o.createElement(fr,{content:"Select bookmarks from the same workspace to manage Collections & Tags",disabled:!a,placement:"bottom"},o.createElement("span",{className:"flex items-center gap-4"},o.createElement(YBe,{collections:m||[],disabled:v||a||!d,onPick:x=>{const S=e.map(N=>({$id:N.$id,$collection_id:N.$collection_id||null,collection_name:N.collection_name||null}));w(async()=>{const N=await aBe(e,x);return N.fail<S.length&&b(x?`move ${u} to "${x.name}"`:`remove ${u} from collection`,S,(k,C)=>t_(k,C.$collection_id?{id:C.$collection_id,name:C.collection_name}:null)),N},x?`Moved to ${x.name}`:"Removed from collection")}}),o.createElement(mz,{triggerIcon:o.createElement(zs,{size:14}),triggerLabel:"Add tags",tags:h||[],disabled:v||a||!d,allowCreate:!0,emptyMessage:"Type a tag name and press Enter to create the first tag in this workspace.",onApply:async(x,S)=>{const N=e.map(k=>({$id:k.$id,tags:(k.tags||[]).map(C=>({$id:C.$id,name:C.name}))}));w(async()=>{let k=x;if(S&&S.length>0){const A=await rBe(t,S);k=[...x,...A]}const C=await sBe(e,k);return C.fail<N.length&&b(`add tags to ${u}`,N,(A,O)=>ig(A,O.tags,[])),C},"Added tags")}}),o.createElement(mz,{triggerIcon:o.createElement(jI,{size:14}),triggerLabel:"Remove tags",tags:E,disabled:v||a||!d||E.length===0,emptyMessage:"None of the selected bookmarks have tags to remove.",onApply:x=>{const S=e.map(N=>({$id:N.$id,tags:(N.tags||[]).map(k=>({$id:k.$id,name:k.name}))}));w(async()=>{const N=await iBe(e,x.map(k=>k.$id));return N.fail<S.length&&b(`remove tags from ${u}`,S,(k,C)=>ig(k,C.tags,[])),N},"Removed tags")}}))),o.createElement(De,{small:!0,intent:"danger",icon:o.createElement(tu,{size:14}),text:"Delete",disabled:v||!d,onClick:r}),i?o.createElement(De,{small:!0,text:"Done",disabled:v,onClick:i}):null)},qBe=({items:e})=>{const[t,n]=p.useState(!1);return o.createElement(Hr,{minimal:!0,isOpen:t,onInteraction:n,position:va.BOTTOM_LEFT,content:o.createElement(Cr,{className:"min-w-[220px]"},e.map((r,a)=>o.createElement(o.Fragment,{key:r.text||a},r.divider?o.createElement(Zi,null):null,o.createElement(Bt,{text:r.text,disabled:r.disabled,onClick:()=>{var s;(s=r.onClick)==null||s.call(r),n(!1)}}))))},o.createElement(De,{size:"small",variant:"minimal",text:"Select",rightIcon:o.createElement(eS,{size:14}),className:"dark__text"}))},YBe=({collections:e,disabled:t,onPick:n})=>{const[r,a]=p.useState(!1);return o.createElement(Hr,{minimal:!0,isOpen:r,onInteraction:a,position:va.BOTTOM_LEFT,content:o.createElement(Cr,{className:"max-h-[300px] overflow-y-auto min-w-[220px]"},o.createElement(Bt,{text:"(No collection)",onClick:()=>{n(null),a(!1)}}),e.length>0?o.createElement(Zi,null):null,e.map(s=>o.createElement(Bt,{key:s.$id,text:s.name,onClick:()=>{n({id:s.$id,name:s.name}),a(!1)}})))},o.createElement(De,{small:!0,icon:o.createElement(gIe,{size:14}),text:"Move toâ¦",disabled:t}))},mz=({triggerIcon:e,triggerLabel:t,tags:n,disabled:r,emptyMessage:a,onApply:s,allowCreate:i=!1})=>{const[l,c]=p.useState(!1),[u,d]=p.useState([]),f=p.useMemo(()=>n.map(g=>({value:g.$id,label:g.name})),[n]),m=()=>{if(u.length===0){c(!1);return}const g=u.filter(y=>!y.__isNew__).map(y=>
1949({$id:y.value,name:y.label})),v=u.filter(y=>y.__isNew__).map(y=>y.label);s(g,v),d([]),c(!1)},h=i?JD:km;return o.createElement(Hr,{minimal:!0,isOpen:l,onInteraction:g=>{g||d([]),c(g)},position:va.BOTTOM_LEFT,content:o.createElement("div",{className:"p-2 min-w-[240px]"},n.length===0&&!i?o.createElement("div",{className:"p-2 text-xs text-gray-500 dark:text-gray-400 max-w-[260px]"},a):o.createElement(o.Fragment,null,o.createElement(h,{autoFocus:!0,isMulti:!0,value:u,onChange:g=>d(g||[]),options:f,components:i?{Option:GBe}:void 0,placeholder:i?"Pick or type a new tagâ¦":"Pick tagsâ¦",styles:{control:g=>({...g,minHeight:32,fontSize:13}),menuPortal:g=>({...g,zIndex:70})},menuPortalTarget:typeof document<"u"?document.body:null}),o.createElement("div",{className:"flex justify-end mt-2 gap-1"},o.createElement(De,{small:!0,text:"Cancel",onClick:()=>c(!1)}),o.createElement(De,{small:!0,intent:"primary",text:"Apply",disabled:u.length===0,onClick:m}))))},o.createElement(De,{small:!0,icon:e||o.createElement(Gm,{size:14}),text:t,disabled:r}))},KBe=()=>{var oe,J,se,B;const{teamID:e}=xs(),t=Wn(U=>{var $;return($=U==null?void 0:U.UI)==null?void 0:$.user}),n=Wn(U=>{var $;return($=U==null?void 0:U.FB)==null?void 0:$.auth}),r=((oe=n==null?void 0:n.globalMeta)==null?void 0:oe.teams)||[],a=(J=t==null?void 0:t.activeTeam)==null?void 0:J.id,s=e||a,i=r.length>=1,[l,c]=p.useState(typeof window<"u"?window.innerWidth<780:!1),[u,d]=p.useState(!1);p.useEffect(()=>{const U=()=>c(window.innerWidth<780);return window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)},[]),p.useEffect(()=>{l&&d(!1)},[s,l]);const f=i&&!l,m=i&&l&&u,[h,g]=p.useState(()=>{try{const U=localStorage.getItem("tables_sidebar_width");if(U)return Math.max(120,Math.min(600,Number(U)))}catch{}return 200}),[v,y]=p.useState([{id:"date_modified",desc:!0}]),[b,E]=p.useState([]),[w,x]=p.useState("all"),[S,N]=p.useState({}),k=o.useRef({timer:null,toastId:null}),{bookmarks:C,isLoading:A}=dL(s,{sortBy:"date_modified",sortDesc:!0}),O=o.useMemo(()=>{if(!C)return[];const U=new Set(Object.keys(S));return C.filter($=>U.has($.$id))},[C,S]),T=rS(),M=o.useMemo(()=>T?z4((C||[]).map(U=>{var $;return($=U.active_iteration)==null?void 0:$.site})):[],[T,C]),L=o.useMemo(()=>xBe(C||[]),[C]),D=o.useMemo(()=>Jte(C||[]),[C]),j=o.useCallback(U=>(b.find($=>$.id===U)||{}).value,[b]),H=o.useCallback(()=>{const U=k.current;U.timer&&clearTimeout(U.timer),U.toastId!==null&&Qr.dismiss(U.toastId),k.current={timer:null,toastId:null}},[]),Y=o.useCallback(()=>{if(O.length===0)return;const U=O.map(ue=>({...ue})),$=U.map(ue=>ue.$id);H(),Wte($),N({});const ce=async()=>{k.current={timer:null,toastId:null};try{const ue=await jte(U);ue.fail>0&&re.dispatch("trigger-alert",{message:`Deleted ${ue.ok} of ${U.length}; ${ue.fail} failed.`,intent:"warning"})}catch(ue){re.dispatch("trigger-alert",{message:(ue==null?void 0:ue.message)||"Bulk delete failed.",intent:"danger"}),await n_(U)}},be=Qr(({closeToast:ue})=>o.createElement("div",{className:"flex items-center justify-between gap-3"},o.createElement("span",null,"Deleted ",U.length," ",U.length===1?"bookmark":"bookmarks","."),o.createElement("button",{onClick:()=>{H(),n_(U),ue==null||ue()},className:"px-2 py-1 text-xs font-medium bg-white/10 hover:bg-white/20 rounded text-white"},"Undo")),{autoClose:1e4,closeOnClick:!1,draggable:!1,onClose:()=>{k.current.toastId===be&&ce()}});k.current.toastId=be},[O,H]),z=(U,$)=>{var be;const ce=$||((be=QO[U])==null?void 0:be.filters);ce&&(x(U),E(ce))},K=U=>{const $=typeof U=="function"?U(b):U;E($);const ce=Object.values(QO).find(be=>JSON.stringify(be.filters)===JSON.stringify($));x(ce?ce.id:"custom")},ee=(U,$)=>{K(ce=>{const be=ce.filter(ue=>ue.id!==U);return $&&$.length?[...be,{id:U,value:$}]:be})};return!(n!=null&&n.isLive)&&!((se=n==null?void 0:n.user)!=null&&se.uid)?null:o.createElement(qte,null,o.createElement("div",{className:"asset-list asset-list-updated mt-[50px]"},o.createElement("div",{className:"fixed top-[50px] w-full flex flex-col bg-gray-50 dark:bg-[#241d33]"},o.createElement("div",{className:"flex columns-2 flex-grow h-[calc(100vh-50px)] relative"},f?o.createElement(nz,{containerWidth:h,setContainerWidth:U=>{g(U);try{localStorage.setItem("tables_sidebar_width",String(U))}catch{}},activeTeamID:s}
1949):null,i&&l?o.createElement(o.Fragment,null,m?o.createElement("div",{className:"fixed inset-0 bg-black/50 z-40",onClick:()=>d(!1)}):null,o.createElement("div",{className:`fixed inset-y-[50px] left-0 z-50 transition-transform duration-200 ease-out shadow-2xl ${m?"translate-x-0":"-translate-x-full"}`},o.createElement(nz,{containerWidth:Math.min(h,280),setContainerWidth:()=>{},activeTeamID:s}))):null,o.createElement("main",{role:"main",className:"flex-grow min-w-0 transition-all duration-300 relative bg-gray-100 dark:bg-[#241d33]",style:{width:f?`calc(100% - ${h}px)`:"100%",height:"100%"}},s?o.createElement("div",{className:"flex flex-col h-full min-w-0"},i&&l?o.createElement("div",{className:"flex items-center px-2 py-1 border-b dark:border-gray-800 bg-white dark:bg-gray-950"},o.createElement(De,{variant:"minimal",size:"small",icon:m?o.createElement(Nm,{size:16}):o.createElement(wIe,{size:16}),onClick:()=>d(U=>!U),"aria-label":"Toggle workspace sidebar"}),o.createElement("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400 truncate"},((B=r.find(U=>U.id===s))==null?void 0:B.name)||"Workspace")):null,O.length>0?o.createElement(nne,{selectedAssets:O,workspaceTeamID:s,onClearSelection:()=>N({}),onRequestDelete:Y}):o.createElement(WBe,{activeViewId:w,onSelectView:z,selectionCount:0,onClearSelection:()=>N({})}),o.createElement("div",{className:"flex items-center gap-3 px-4 pb-4 dark:border-gray-800 flex-wrap"},T?o.createElement(sp,{label:"Site",icon:o.createElement(Jc,{size:14}),value:j("site"),onChange:U=>ee("site",U),renderMenu:(U,$)=>o.createElement(V4,{tree:M,value:U,onChange:$}),labelForToken:U=>Qte(U,M)}):null,o.createElement(sp,{label:"Collection",icon:o.createElement(tS,{size:14}),value:j("collection"),onChange:U=>ee("collection",U),renderMenu:(U,$)=>o.createElement(og,{options:L,value:U,onChange:$,emptyText:"No collections yet"}),labelForToken:U=>r_(U,L)}),o.createElement(sp,{label:"Tags",icon:o.createElement(Gm,{size:14}),value:j("tags"),onChange:U=>ee("tags",U),renderMenu:(U,$)=>o.createElement(og,{options:D,value:U,onChange:$,emptyText:"No tags yet"}),labelForToken:U=>r_(U,D)})),o.createElement("div",{className:"flex-1 overflow-hidden"},o.createElement(tne,{bookmarks:C,isLoading:A,teamID:s,sorting:v,onSortingChange:y,columnFilters:b,onColumnFiltersChange:K,rowSelection:S,onRowSelectionChange:N}))):o.createElement("div",{className:"flex items-center justify-center w-full h-full"},o.createElement(fs,{icon:o.createElement(SZ,{size:32}),title:"Tables",description:"Select a workspace from the sidebar to view its bookmarks."})))))))},ZBe=e=>o.createElement(KBe,{...e}),XBe=["list","grid","full"],QBe=["list","grid","full","fixed","fluid"],hz=e=>XBe.includes(e),JBe=e=>QBe.includes(e),pz=Mb,eje=80,tje=({card:e,theme:t,boardID:n,showThumbnails:r=!0,boardColumns:a=3,gridPlacement:s,onHeightChange:i,layoutMode:l="packed"})=>{const c=p.useRef(null),u=p.useRef(null),d=e.card_color||(t==null?void 0:t.card_color)||null,f=d&&d.toLowerCase()!=="#ffffff"?d:null,m=JBe(e.bookmark_layout)?e.bookmark_layout:"full",h=e.show_thumbnail!==!1,g=Array.isArray(e.bookmarks)?e.bookmarks:[],v=p.useMemo(()=>!n||!(e!=null&&e.$id)?null:`public_card_layout_${n}_${e.$id}`,[n,e==null?void 0:e.$id]),[y,b]=p.useState(()=>{if(!v||typeof window>"u")return null;try{const Y=window.localStorage.getItem(v);return hz(Y)?Y:null}catch{return null}}),E=r?y||m:"list",w=Y=>{if(!(!hz(Y)||Y===E)&&(b(Y),v&&typeof window<"u"))try{window.localStorage.setItem(v,Y)}catch{}},x=g.length>0&&r,S=Math.max(1,Math.min(e.column_span||1,a||4)),N=(()=>typeof e.width=="number"&&e.width>0?e.width:typeof(t==null?void 0:t.card_width)=="number"&&t.card_width>0?t.card_width:160)(),k=(()=>{const Y="board-card__bookmarks";return E==="fixed"||E==="grid"?`${Y} ${Y}--fixed`:E==="fluid"?`${Y} ${Y}--fluid`:E==="list"?`${Y} ${Y}--list`:`${Y} ${Y}--full`})(),C=E==="fluid"?{"--bookmark-tile-min":`${N}px`}:void 0,A=E==="list"?"list":E==="full"?"full":"grid",O=e.card_masthead||null,T=(O==null?void 0:O.height)||80,M=(O==null?void 0:O.position_y)??50,L=l==="columns",D=(s==null?void 0:s.top)??0,j=(s==null?void 0:s.columnStart)??0,H=L?{width:"100%"}:{position:"absolute",top:D,left:Nte(j,a,pz),width:Cte(S,a,pz)};return p.useEffect(()=>{const Y=c.current;if(!Y||!i)return;const z=()=>{i(e.$id,Y.getBoundingClientRect().height)};z();const K=new ResizeObserver(()=>z());return K.observe(Y),u.current&&K.observe(u.current),()=>K.disconnect()},[e.$id,i,S,E]),o.createElement("div",{ref:c,className:`board-card-wrapper${L?" board-card-wrapper--column-lane":""}`,style:H,"data-card-id":e.$id},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"board-card group/card flex flex-col gap-0 p-0 overflow-hidden bg-white dark:bg-gray-800",style:f?{backgroundColor:f}:void 0},O!=null&&O.signed_url?o.createElement("div",{className:"board-card__masthead w-full overflow-hidden bg-gray-100 dark:bg-gray-900",style:{height:`${T}px`}},o.createElement("img",{src:O.signed_url,alt:"",className:"w-full h-full object-cover",style:{objectPosition:`50% ${M}%`},loading:"lazy"})):null,(e.label||x)&&o.createElement("div",{className:"board-card__header flex items-center gap-1 px-3 pt-3 pb-2",style:x?{"--board-card-header-actions-width":`${eje}px`}:void 0},o.createElement("div",{className:"board-card__label flex-1 min-w-0 text-sm font-semibold text-gray-900 dark:text-gray-100 truncate"},e.label),x?o.createElement("div",{className:"board-card__header-actions flex items-center shrink-0"},o.createElement(nje,{value:E,onChange:w})):null),o.createElement("div",{ref:u,className:"board-card__body flex flex-col gap-2 px-3 pb-3"},g.length===0?o.createElement("div",{className:"text-xs text-gray-400 dark:text-gray-500 italic py-1"},"No bookmarks yet."):o.createElement("div",{className:k,style:C},g.map((Y,z)=>o.createElement(Jx,{key:Y.assetID||Y.url,assetID:Y.assetID,fallbackName:Y.name,fallbackUrl:Y.url,showThumbnail:h,layout:A,listType:e.list_type||"default",listIndex:z
1949+1,toggleShowLabel:e.toggle_show_label===!0,toggleEnabledLabel:e.toggle_enabled_label??"On",toggleDisabledLabel:e.toggle_disabled_label??"Off",checked:!!Y.checked,isPublic:!0,publicFaviconUrl:Y.favicon_url,publicThumbnailUrl:Y.thumbnail_signed_url,publicHostname:Y.hostname}))))))},nje=({value:e,onChange:t})=>{const n=[{id:"list",label:"List",Icon:vIe},{id:"grid",label:"Grid",Icon:EZ},{id:"full",label:"Full thumbnails",Icon:UI}];return o.createElement("div",{className:"board-card__layout-toggle view-toggle inline-flex rounded border border-gray-200 dark:border-gray-700 overflow-hidden",role:"group","aria-label":"Bookmark layout"},n.map(({id:r,label:a,Icon:s})=>{const i=e===r;return o.createElement("button",{key:r,type:"button",onClick:()=>t(r),title:a,"aria-label":a,"aria-pressed":i,className:`px-1.5 py-1 text-xs leading-none transition-colors ${i?"bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-gray-100":"bg-transparent text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700/50"}`},o.createElement(s,{size:12}))}))},ip=({children:e,title:t,description:n,isIndexable:r,masthead:a,hideTitleBlock:s=!1,backgroundColor:i=null})=>{const l=t?`${t} â Bookmark.it`:"Bookmark.it",c=(a==null?void 0:a.signed_url)||(a!=null&&a.preset_id?Bee(a.preset_id):null);return p.useEffect(()=>{const u=document.title;document.title=l;const d=(h,g)=>{let v=document.head.querySelector(h);const y=!v;return v||(v=document.createElement("meta"),document.head.appendChild(v)),Object.entries(g).forEach(([b,E])=>v.setAttribute(b,E)),{el:v,created:y}},f=r?"index,follow":"noindex,nofollow",m=[];return m.push(d('meta[name="robots"]',{name:"robots",content:f})),m.push(d('meta[property="og:title"]',{property:"og:title",content:t||"Bookmark.it"})),n&&(m.push(d('meta[name="description"]',{name:"description",content:n})),m.push(d('meta[property="og:description"]',{property:"og:description",content:n}))),c&&m.push(d('meta[property="og:image"]',{property:"og:image",content:c})),m.push(d('meta[name="twitter:card"]',{name:"twitter:card",content:"summary_large_image"})),()=>{document.title=u,m.forEach(({el:h,created:g})=>{g&&h.parentNode&&h.parentNode.removeChild(h)})}},[l,t,n,r,c]),o.createElement("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col",style:i?{backgroundColor:i}:void 0},o.createElement("header",{className:"public-header sticky top-0 z-10 flex items-center justify-between gap-3 border-b border-gray-200 dark:border-gray-800 bg-white/90 dark:bg-gray-950/90 backdrop-blur px-4 py-2"},o.createElement("div",{className:"flex items-center gap-3 min-w-0 flex-1"},t&&!s?o.createElement("h1",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100 truncate m-0"},t):o.createElement(ci,{to:"/",className:"font-semibold text-gray-900 dark:text-gray-100 flex-shrink-0"},"Bookmark.it"),o.createElement("span",{className:"inline-flex items-center gap-1 rounded-full bg-gray-100 dark:bg-gray-800 px-2 py-0.5 text-xs text-gray-600 dark:text-gray-300 flex-shrink-0",title:"This is a read-only shared link."},o.createElement(Jc,{size:12})," View only")),o.createElement("div",{className:"flex items-center gap-2"},o.createElement(ci,{to:"/login",className:"text-sm text-gray-600 dark:text-gray-300 hover:underline"},"Sign in"),o.createElement(ci,{to:"/signup"},o.createElement(De,{intent:"primary",small:!0,text:"Sign up to make your own"})))),c&&o.createElement("div",{className:"public-masthead w-full overflow-hidden",style:{height:FO(a)}},o.createElement("div",{className:"w-full h-full",style:cze({imageUrl:c,positionX:m4(a),positionY:h4(a),blur:p4(a)}),"aria-hidden":"true"})),n&&!s&&o.createElement("div",{className:"mx-auto w-full max-w-6xl px-6 pt-6"},o.createElement("p",{className:"text-gray-600 dark:text-gray-400 m-0"},n)),o.createElement("main",{className:"flex-1 flex flex-col min-h-0"},e))},rje=Ir(xr()),aje=()=>{const{shareToken:e}=xs(),[t,n]=p.useState({status:"loading",board:null,cards:[]}),r=p.useRef(null),[a,s]=p.useState({});p.useEffect(()=>{let E=!1;return n({status:"loading",board:null,cards:[]}),s({}),pt(rje,Ze("users-share-view-byToken"))({shareToken:e}).then(w=>
1949{var S;if(E)return;const x=(S=w==null?void 0:w.data)==null?void 0:S.output;if(!x||x.type!=="board"||!x.board){n({status:"not-found",board:null,cards:[]});return}n({status:"ok",board:x.board,cards:x.cards||[]}),Jn.analyticsTrack({event:"Public View Loaded",codeName:"public-view-loaded-board",properties:{documentID:x.board.$id}}).catch(()=>{})}).catch(w=>{E||((w==null?void 0:w.code)==="functions/not-found"||(w==null?void 0:w.code)==="not-found"?n({status:"not-found",board:null,cards:[]}):(console.error("PublicBoardViewer load failed:",w),n({status:"error",board:null,cards:[]})))}),()=>{E=!0}},[e]);const i=p.useMemo(()=>{var E;return $h((E=t.board)==null?void 0:E.theme)},[t.board]),l=i.columns,c=Zw(i),u=i.column_tracks,d=p.useMemo(()=>[...t.cards||[]].sort((E,w)=>(E.position_order??0)-(w.position_order??0)),[t.cards]),f=p.useMemo(()=>c?null:R4(d,l,a),[d,l,a,c]),m=p.useMemo(()=>c?T4(d,l):[],[d,l,c]),h=p.useCallback((E,w)=>{const x=Math.round(w);s(S=>S[E]===x?S:{...S,[E]:x})},[]);if(t.status==="loading")return o.createElement("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gray-50 dark:bg-gray-900 [&_.interstitial-content]:!mt-0"},o.createElement(du,null));if(t.status==="not-found")return o.createElement(ip,{isIndexable:!1},o.createElement(fs,{className:"mt-8",title:"Link not found",description:"This share link is invalid or has been turned off. Ask the person who sent it for a new link.",action:o.createElement(ci,{to:"/login"},o.createElement(De,{intent:"primary",text:"Sign in to Bookmark.it"}))}));if(t.status==="error")return o.createElement(ip,{isIndexable:!1},o.createElement(fs,{icon:"error",title:"Couldn't load this board",description:"Try refreshing in a moment."}));const{board:g,cards:v}=t,y=g.public_show_thumbnails!==!1,b=(E,w={})=>o.createElement(tje,{key:E.$id,card:E,theme:i,boardID:g.$id,showThumbnails:y,boardColumns:l,onHeightChange:h,...w});return o.createElement(ip,{title:g.name,description:g.description,isIndexable:g.is_indexable===!0,masthead:g.masthead,backgroundColor:i.background_color&&i.background_color!=="#ffffff"?i.background_color:void 0},o.createElement("div",{className:"board-canvas__inner px-6 py-6"},v.length===0?o.createElement(fs,{icon:"bookmark",title:"No bookmarks yet",description:"The owner hasn't added anything to this board."}):c?o.createElement("div",{className:"board-column-lanes gap-4"},m.map((E,w)=>o.createElement("div",{key:`lane-${w}`,className:"board-column-lane flex flex-col gap-3 min-w-0",style:{flex:`${u[w]} 1 0`}},E.map(x=>b(x,{layoutMode:"columns"}))))):o.createElement("div",{ref:r,className:"board-canvas__grid",style:{minHeight:(f==null?void 0:f.containerHeight)||void 0}},d.map(E=>b(E,{gridPlacement:f==null?void 0:f.placements.get(E.$id)})))))},sje=Ir(xr()),ije={customMapNode:zee},oje=()=>{var c;const{shareToken:e}=xs(),[t,n]=p.useState({status:"loading",map:null,nodes:[]});p.useEffect(()=>{let u=!1;return n({status:"loading",map:null,nodes:[]}),pt(sje,Ze("users-share-view-byToken"))({shareToken:e}).then(d=>{var m;if(u)return;const f=(m=d==null?void 0:d.data)==null?void 0:m.output;if(!f||f.type!=="map"||!f.map){n({status:"not-found",map:null,nodes:[]});return}n({status:"ok",map:f.map,nodes:f.nodes||[]}),Jn.analyticsTrack({event:"Public View Loaded",codeName:"public-view-loaded-flow",properties:{documentID:f.map.$id}}).catch(()=>{})}).catch(d=>{u||((d==null?void 0:d.code)==="functions/not-found"||(d==null?void 0:d.code)==="not-found"?n({status:"not-found",map:null,nodes:[]}):(console.error("PublicFlowViewer load failed:",d),n({status:"error",map:null,nodes:[]})))}),()=>{u=!0}},[e]);const r=((c=t.map)==null?void 0:c.layout_direction)||"TB",a=p.useMemo(()=>t.nodes.map(u=>({id:u.$id,position:u.position||{x:0,y:0},type:u.type||"customMapNode",width:u.width||200,style:{minHeight:u.height||"auto"},data:{label:u.label,bookmarks:u.bookmarks,parent_node_id:u.parent_node_id,linked_map_id:u.linked_map_id,linked_is_restricted:u.linked_is_restricted===!0,layoutDirection:r,isPublic:!0},draggable:!1})),[t.nodes,r]),s=p.useMemo(()=>t.nodes.filter(u=>u.parent_node_id).map(u=>({id:`e-${u.parent_node_id}-${u.$id}`,source:u.parent_node_id,target:u.$id})),[t.nodes]);if(t.status==="loading")return o.createElement("div",{className:"flex flex-col items-center justify-center min-h-screen bg-white dark:bg-gray-900"},o.createElement(os,null));if(t.status==="not-found")return o.createElement(ip,{isIndexable:!1},o.createElement(fs,{className:"mt-8",title:"Link not found",description:"This share link is invali
1949d or has been turned off. Ask the person who sent it for a new link.",action:o.createElement(ci,{to:"/login"},o.createElement(De,{intent:"primary",text:"Sign in to Bookmark.it"}))}));if(t.status==="error")return o.createElement(ip,{isIndexable:!1},o.createElement(fs,{icon:"error",title:"Couldn't load this flow",description:"Try refreshing in a moment."}));const{map:i,nodes:l}=t;return o.createElement(ip,{title:i.name,description:i.description,isIndexable:i.is_indexable===!0,masthead:i.masthead},o.createElement("div",{className:"public-flow-canvas w-full flex-1 min-h-0 relative"},o.createElement("div",{className:"absolute inset-0"},l.length===0?o.createElement(fs,{icon:"diagram-tree",title:i.name||"Untitled flow",description:"The owner hasn't added anything to this flow yet."}):o.createElement(Oee,{nodes:a,edges:s,nodeTypes:ije,nodesDraggable:!1,nodesConnectable:!1,panOnDrag:!0,zoomOnScroll:!0,fitView:!0,proOptions:{hideAttribution:!0}},o.createElement(Pee,null),o.createElement(Lee,{showInteractive:!1})))))},lje=()=>
vendor: 5,876 bytes, line 1949
1949{const e=hs(),t=e.pathname.replace(/^\/team\//,"/workspace/").replace("/asset/","/bookmarks/");return o.createElement(jf,{to:`${t}${e.search}${e.hash}`,replace:!0})};var Pb=e=>e.type==="checkbox",Fh=e=>e instanceof Date,Fi=e=>e==null;const rne=e=>typeof e=="object";var Us=e=>!Fi(e)&&!Array.isArray(e)&&rne(e)&&!Fh(e),cje=e=>Us(e)&&e.target?Pb(e.target)?e.target.checked:e.target.value:e,uje=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dje=(e,t)=>e.has(uje(t)),fje=e=>{const t=e.constructor&&e.constructor.prototype;return Us(t)&&t.hasOwnProperty("isPrototypeOf")},U4=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fo(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(U4&&(e instanceof Blob||e instanceof FileList))&&(n||Us(e)))if(t=n?[]:{},!n&&!fje(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Fo(e[r]));else return e;return t}var jg=e=>Array.isArray(e)?e.filter(Boolean):[],La=e=>e===void 0,Un=(e,t,n)=>{if(!t||!Us(e))return n;const r=jg(t.split(/[,[\].]+?/)).reduce((a,s)=>Fi(a)?a:a[s],e);return La(r)||r===e?La(e[t])?n:e[t]:r};const gz={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xl={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},wu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mje=o.createContext(null),hje=()=>o.useContext(mje);var pje=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(a,s,{get:()=>{const i=s;return t._proxyFormState[i]!==xl.all&&(t._proxyFormState[i]=!r||xl.all),n&&(n[i]=!0),e[i]}});return a},$o=e=>Us(e)&&!Object.keys(e).length,gje=(e,t,n,r)=>{n(e);const{name:a,...s}=e;return $o(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(i=>t[i]===(!r||xl.all))},Al=e=>Array.isArray(e)?e:[e];function ane(e){const t=o.useRef(e);t.current=e,o.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Uc=e=>typeof e=="string",vje=(e,t,n,r,a)=>Uc(e)?(r&&t.watch.add(e),Un(n,e,a)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),Un(n,s))):(r&&(t.watchAll=!0),n),B4=e=>/^\w*$/.test(e),sne=e=>jg(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ia(e,t,n){let r=-1;const a=B4(t)?[t]:sne(t),s=a.length,i=s-1;for(;++r<s;){const l=a[r];let c=n;if(r!==i){const u=e[l];c=Us(u)||Array.isArray(u)?u:isNaN(+a[r+1])?{}:[]}e[l]=c,e=e[l]}return e}var yje=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{};const a_=(e,t,n)=>{for(const r of n||Object.keys(e)){const a=Un(e,r);if(a){const{_f:s,...i}=a;if(s&&t(s.name)){if(s.ref.focus){s.ref.focus();break}else if(s.refs&&s.refs[0].focus){s.refs[0].focus();break}}else Us(i)&&a_(i,t)}}};var wd=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},vN=(e,t,n={})=>n.shouldFocus||La(n.shouldFocus)?n.focusName||`${e}.${La(n.focusIndex)?t:n.focusIndex}.`:"",JO=e=>({isOnSubmit:!e||e===xl.onSubmit,isOnBlur:e===xl.onBlur,isOnChange:e===xl.onChange,isOnAll:e===xl.all,isOnTouch:e===xl.onTouched}),eM=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),ine=(e,t,n)=>{const r=jg(Un(e,n));return Ia(r,"root",t[n]),Ia(e,n,r),e},op=e=>typeof e=="boolean",j4=e=>e.type==="file",$d=e=>typeof e=="function",s_=e=>{if(!U4)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Qw=e=>Uc(e),W4=e=>e.type==="radio",i_=e=>e instanceof RegExp;const vz={value:!1,isValid:!1},yz={value:!0,isValid:!0};var one=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!La(e[0].attributes.value)?La(e[0].value)||e[0].value===""?yz:{value:e[0].value,isValid:!0}:yz:vz}return vz};const bz={isValid:!1,value:null};var lne=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,bz):bz;function wz(e,t,n="validate"){if(Qw(e)||Array.isArray(e)&&e.every(Qw)||op(e)&&!e)return{type:n,message:Qw(e)?e:"",ref:t}}var uh=e=>Us(e)&&!i_(e)?e:{value:e,message:""},tM=async(e,t,n,r,a)=>{const{ref:s,refs:i,required:l,maxLength:c,minLength:u,min:d,max:f,pattern:m,validate:h,name:g,valueAsNumber:v,mount:y,disabled:b}=e._f,E=Un(t,g);if(!y||b)return{};const w=i?i[0]:s,x=M=>{r&&w.reportValidity&&(w.setCustomValidity(op(M)?"":M||""),w.reportValidity())},S={},N=W4(s),k=Pb(s),C=N||k,A=(v||j4(s))&&La(s.value)&&La(E)||s_(s)&&s.value===""||E===""||Array.isArray(E)&&!E.length,O=yje.bind(null,g,n,S),T=(M,L,D,j=wu.maxLength,H=wu.minLength)=>{const Y=M?L:D;S[g]={type:M?j:H,message:Y,ref:s,...O(M?j:H,Y)}};if(a?!Array.isArray(E)||!E.length:l&&(!C&&(A||Fi(E))||op(E)&&!E||k&&!one(i).isValid||N&&!lne(i).isValid)){const{value:M,message:L}=Qw(l)?{value:!!l,message:l}:uh(l);if(M&&(S[g]={type:wu.required,message:L,ref:w,...O(wu.required,L)},!n))return x(L),S}if(!A&&(!Fi(d)||!Fi(f))){let M,L;const D=uh(f),j=uh(d);if(!Fi(E)&&!isNaN(E)){const H=s.valueAsNumber||E&&+E;Fi(D.value)||(M=H>D.value),Fi(j.value)||(L=H<j.value)}else{const H=s.valueAsDate||new Date(E),Y=ee=>new Date(new Date().toDateString()+" "+ee),z=s.type=="time",K=s.type=="week";Uc(D.value)&&E&&(M=z?Y(E)>Y(D.value):K?E>D.value:H>new Date(D.value)),Uc(j.value)&&E&&(L=z?Y(E)<Y(j.value):K?E<j.value:H<new Date(j.value))}if((M||L)&&(T(!!M,D.message,j.message,wu.max,wu.min),!n))return x(S[g].message),S}if((c||u)&&!A&&(Uc(E)||a&&Array.isArray(E))){const M=uh(c),L=uh(u),D=!Fi(M.value)&&E.length>+M.value,j=!Fi(L.value)&&E.length<+L.value;
vendor: 7,701 bytes, line 1949
1949if((D||j)&&(T(D,M.message,L.message),!n))return x(S[g].message),S}if(m&&!A&&Uc(E)){const{value:M,message:L}=uh(m);if(i_(M)&&!E.match(M)&&(S[g]={type:wu.pattern,message:L,ref:s,...O(wu.pattern,L)},!n))return x(L),S}if(h){if($d(h)){const M=await h(E,t),L=wz(M,w);if(L&&(S[g]={...L,...O(wu.validate,L.message)},!n))return x(L.message),S}else if(Us(h)){let M={};for(const L in h){if(!$o(M)&&!n)break;const D=wz(await h[L](E,t),w,L);D&&(M={...D,...O(L,D.message)},x(D.message),n&&(S[g]=M))}if(!$o(M)&&(S[g]={ref:w,...M},!n))return S}}return x(!0),S};function yN(e,t){return[...e,...Al(t)]}var bN=e=>Array.isArray(e)?e.map(()=>{}):void 0;function wN(e,t,n){return[...e.slice(0,t),...Al(n),...e.slice(t)]}var EN=(e,t,n)=>Array.isArray(e)?(La(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function xN(e,t){return[...Al(t),...Al(e)]}function bje(e,t){let n=0;const r=[...e];for(const a of t)r.splice(a-n,1),n++;return jg(r).length?r:[]}var _N=(e,t)=>La(t)?[]:bje(e,Al(t).sort((n,r)=>n-r)),kN=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]};function wje(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=La(e)?r++:e[t[r++]];return e}function Eje(e){for(const t in e)if(e.hasOwnProperty(t)&&!La(e[t]))return!1;return!0}function Ws(e,t){const n=Array.isArray(t)?t:B4(t)?[t]:sne(t),r=n.length===1?e:wje(e,n),a=n.length-1,s=n[a];return r&&delete r[s],a!==0&&(Us(r)&&$o(r)||Array.isArray(r)&&Eje(r))&&Ws(e,n.slice(0,-1)),e}var Ez=(e,t,n)=>(e[t]=n,e);function xje(e){const t=hje(),{control:n=t.control,name:r,keyName:a="id",shouldUnregister:s}=e,[i,l]=o.useState(n._getFieldArray(r)),c=o.useRef(n._getFieldArray(r).map(wd)),u=o.useRef(i),d=o.useRef(r),f=o.useRef(!1);d.current=r,u.current=i,n._names.array.add(r),e.rules&&n.register(r,e.rules),ane({next:({values:S,name:N})=>{if(N===d.current||!N){const k=Un(S,d.current);Array.isArray(k)&&(l(k),c.current=k.map(wd))}},subject:n._subjects.array});const m=o.useCallback(S=>{f.current=!0,n._updateFieldArray(r,S)},[n,r]),h=(S,N)=>{const k=Al(Fo(S)),C=yN(n._getFieldArray(r),k);n._names.focus=vN(r,C.length-1,N),c.current=yN(c.current,k.map(wd)),m(C),l(C),n._updateFieldArray(r,C,yN,{argA:bN(S)})},g=(S,N)=>{const k=Al(Fo(S)),C=xN(n._getFieldArray(r),k);n._names.focus=vN(r,0,N),c.current=xN(c.current,k.map(wd)),m(C),l(C),n._updateFieldArray(r,C,xN,{argA:bN(S)})},v=S=>{const N=_N(n._getFieldArray(r),S);c.current=_N(c.current,S),m(N),l(N),n._updateFieldArray(r,N,_N,{argA:S})},y=(S,N,k)=>{const C=Al(Fo(N)),A=wN(n._getFieldArray(r),S,C);n._names.focus=vN(r,S,k),c.current=wN(c.current,S,C.map(wd)),m(A),l(A),n._updateFieldArray(r,A,wN,{argA:S,argB:bN(N)})},b=(S,N)=>{const k=n._getFieldArray(r);kN(k,S,N),kN(c.current,S,N),m(k),l(k),n._updateFieldArray(r,k,kN,{argA:S,argB:N},!1)},E=(S,N)=>{const k=n._getFieldArray(r);EN(k,S,N),EN(c.current,S,N),m(k),l(k),n._updateFieldArray(r,k,EN,{argA:S,argB:N},!1)},w=(S,N)=>{const k=Fo(N),C=Ez(n._getFieldArray(r),S,k);c.current=[...C].map((A,O)=>!A||O===S?wd():c.current[O]),m(C),l([...C]),n._updateFieldArray(r,C,Ez,{argA:S,argB:k},!0,!1)},x=S=>{const N=Al(Fo(S));c.current=N.map(wd),m([...N]),l([...N]),n._updateFieldArray(r,[...N],k=>k,{},!0,!1)};return o.useEffect(()=>{if(n._state.action=!1,eM(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!JO(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const N=Un(S.errors,r),k=Un(n._formState.errors,r);(k?!N&&k.type||N&&(k.type!==N.type||k.message!==N.message):N&&N.type)&&(N?Ia(n._formState.errors,r,N):Ws(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=Un(n._fields,r);S&&S._f&&tM(S,n._formValues,n._options.criteriaMode===xl.all,n._options.shouldUseNativeValidation,!0).then(N=>!$o(N)&&n._subjects.state.next({errors:ine(n._formState.errors,N,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&a_(n._fields,S=>!!S&&S.startsWith(n._names.focus||"")),n._names.focus="",n._updateValid()},[i,r,n]),o.useEffect(()=>(!Un(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||s)&&n.unregister(r)}),[r,n,a,s]),{swap:o.useCallback(b,[m,r,n]),move:o.useCallback(E,[m,r,n]),prepend:o.useCallback(g,[m,r,n]),append:o.useCallback(h,[m,r,n]),remove:o.useCallback(v,[m,r,n]),insert:o.useCallback(y,[m,r,n]),update:o.useCallback(w,[m,r,n]),replace:o.useCallback(x,[m,r,n]),fields:o.useMemo(()=>i.map((S,N)=>({...S,[a]:c.current[N]||wd()})),[i,a])}}function SN(){let e=[];return{get observers(){return e},next:a=>{for(const s of e)s.next&&s.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(s=>s!==a)}}),unsubscribe:()=>{e=[]}}}var o_=e=>Fi(e)||!rne(e);function Zf(e,t){if(o_(e)||o_(t))return e===t;if(Fh(e)&&Fh(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const s=e[a];if(!r.includes(a))return!1;if(a!=="ref"){const i=t[a];if(Fh(s)&&Fh(i)||Us(s)&&Us(i)||Array.isArray(s)&&Array.isArray(i)?!Zf(s,i):s!==i)return!1}}return!0}var cne=e=>e.type==="select-multiple",_je=e=>W4(e)||Pb(e),CN=e=>s_(e)&&e.isConnected,une=e=>{for(const t in e)if($d(e[t]))return!0;return!1};function l_(e,t={}){const n=Array.isArray(e);if(Us(e)||n)for(const r in e)Array.isArray(e[r])||Us(e[r])&&!une(e[r])?(t[r]=Array.isArray(e[r])?[]:{},l_(e[r],t[r])):Fi(e[r])||(t[r]=!0);return t}function dne(e,t,n){const r=Array.isArray(e);if(Us(e)||r)for(const a in e)Array.isArray(e[a])||Us(e[a])&&!une(e[a])?La(t)||o_(n[a])?n[a]=Array.isArray(e[a])?l_(e[a],[]):{...l_(e[a])}:dne(e[a],Fi(t)?{}:t[a],n[a]):n[a]=!Zf(e[a],t[a]);return n}var NN=(e,t)=>dne(e,t,l_(t)),fne=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>La(e)?e:t?e===""?NaN:e&&+e:n&&Uc(e)?new Date(e):r?r(e):e;function RN(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return j4(t)?t.files:W4(t)?lne(e.refs).value:cne(t)?[...t.selectedOptions].map(({value:n})=>n):Pb(t)?one(e.refs).value:fne(La(t.value)?e.ref.value:t.value,e)}var kje=(e,t,n,r)=>{const a={};for(const s of e){const i=Un(t,s);i&&Ia(a,s,i._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},E0=e=>La(e)?e:i_(e)?e.source:Us(e)?i_(e.value)?e.value.source:e.value:e,Sje=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function xz(e,t,n){const r=Un(e,n);if(r||B4(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const s=a.join("."),i=Un(t,s),l=Un(e,s);if(i&&!Array.isArray(i)&&n!==s)return{name:n};if(l&&l.type)return{name:s,error:l};a.pop()}return{name:n}}var Cje=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,Nje=(e,t)=>!jg(Un(e,t)).length&&Ws(e,t);const Rje={mode:xl.onSubmit,reValidateMode:xl.onChange,shouldFocusError:!0};function Tje(e={},t){let n={...Rje,...e},r={submitCount:0,isDirty:!1,isLoading:$d(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},a={},s=Us(n.defaultValues)||Us(n.values)?Fo(n.defaultValues||n.values)||{}:{},i=n.shouldUnregister?{}:Fo(s),l={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={values:SN(),array:SN(),state:SN()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,g=JO(n.mode),v=JO(n.reValidateMode),y=n.criteriaMode===xl.all,b=ae=>pe=>{clearTimeout(d),d=setTimeout(ae,pe)},E=async ae=>{if(f.isValid||ae){const pe=n.resolver?$o((await A()).errors):await T(a,!0);pe!==r.isValid&&m.state.next({isValid:pe})}},w=ae=>f.isValidating&&m.state.next({isValidating:ae}),x=(ae,pe=[],W,q,te=!0,X=!0)=>
vendor: 1,197 bytes, line 1949
1949{if(q&&W){if(l.action=!0,X&&Array.isArray(Un(a,ae))){const le=W(Un(a,ae),q.argA,q.argB);te&&Ia(a,ae,le)}if(X&&Array.isArray(Un(r.errors,ae))){const le=W(Un(r.errors,ae),q.argA,q.argB);te&&Ia(r.errors,ae,le),Nje(r.errors,ae)}if(f.touchedFields&&X&&Array.isArray(Un(r.touchedFields,ae))){const le=W(Un(r.touchedFields,ae),q.argA,q.argB);te&&Ia(r.touchedFields,ae,le)}f.dirtyFields&&(r.dirtyFields=NN(s,i)),m.state.next({name:ae,isDirty:L(ae,pe),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Ia(i,ae,pe)},S=(ae,pe)=>{Ia(r.errors,ae,pe),m.state.next({errors:r.errors})},N=(ae,pe,W,q)=>{const te=Un(a,ae);if(te){const X=Un(i,ae,La(W)?Un(s,ae):W);La(X)||q&&q.defaultChecked||pe?Ia(i,ae,pe?X:RN(te._f)):H(ae,X),l.mount&&E()}},k=(ae,pe,W,q,te)=>{let X=!1,le=!1;const me={name:ae};if(!W||q){f.isDirty&&(le=r.isDirty,r.isDirty=me.isDirty=L(),X=le!==me.isDirty);const fe=Zf(Un(s,ae),pe);le=Un(r.dirtyFields,ae),fe?Ws(r.dirtyFields,ae):Ia(r.dirtyFields,ae,!0),me.dirtyFields=r.dirtyFields,X=X||f.dirtyFields&&le!==!fe}if(W){const fe=Un(r.touchedFields,ae);fe||(Ia(r.touchedFields,ae,W),me.touchedFields=r.touchedFields,X=X||f.touchedFields&&fe!==W)}return X&&te&&m.state.next(me),X?me:{}}
vendor: 5,475 bytes, line 1949
1949,C=(ae,pe,W,q)=>{const te=Un(r.errors,ae),X=f.isValid&&op(pe)&&r.isValid!==pe;if(e.delayError&&W?(u=b(()=>S(ae,W)),u(e.delayError)):(clearTimeout(d),u=null,W?Ia(r.errors,ae,W):Ws(r.errors,ae)),(W?!Zf(te,W):te)||!$o(q)||X){const le={...q,...X&&op(pe)?{isValid:pe}:{},errors:r.errors,name:ae};r={...r,...le},m.state.next(le)}w(!1)},A=async ae=>n.resolver(i,n.context,kje(ae||c.mount,a,n.criteriaMode,n.shouldUseNativeValidation)),O=async ae=>{const{errors:pe}=await A();if(ae)for(const W of ae){const q=Un(pe,W);q?Ia(r.errors,W,q):Ws(r.errors,W)}else r.errors=pe;return pe},T=async(ae,pe,W={valid:!0})=>{for(const q in ae){const te=ae[q];if(te){const{_f:X,...le}=te;if(X){const me=c.array.has(X.name),fe=await tM(te,i,y,n.shouldUseNativeValidation&&!pe,me);if(fe[X.name]&&(W.valid=!1,pe))break;!pe&&(Un(fe,X.name)?me?ine(r.errors,fe,X.name):Ia(r.errors,X.name,fe[X.name]):Ws(r.errors,X.name))}le&&await T(le,pe,W)}}return W.valid},M=()=>{for(const ae of c.unMount){const pe=Un(a,ae);pe&&(pe._f.refs?pe._f.refs.every(W=>!CN(W)):!CN(pe._f.ref))&&$(ae)}c.unMount=new Set},L=(ae,pe)=>(ae&&pe&&Ia(i,ae,pe),!Zf(oe(),s)),D=(ae,pe,W)=>vje(ae,c,{...l.mount?i:La(pe)?s:Uc(ae)?{[ae]:pe}:pe},W,pe),j=ae=>jg(Un(l.mount?i:s,ae,e.shouldUnregister?Un(s,ae,[]):[])),H=(ae,pe,W={})=>{const q=Un(a,ae);let te=pe;if(q){const X=q._f;X&&(!X.disabled&&Ia(i,ae,fne(pe,X)),te=s_(X.ref)&&Fi(pe)?"":pe,cne(X.ref)?[...X.ref.options].forEach(le=>le.selected=te.includes(le.value)):X.refs?Pb(X.ref)?X.refs.length>1?X.refs.forEach(le=>(!le.defaultChecked||!le.disabled)&&(le.checked=Array.isArray(te)?!!te.find(me=>me===le.value):te===le.value)):X.refs[0]&&(X.refs[0].checked=!!te):X.refs.forEach(le=>le.checked=le.value===te):j4(X.ref)?X.ref.value="":(X.ref.value=te,X.ref.type||m.values.next({name:ae,values:{...i}})))}(W.shouldDirty||W.shouldTouch)&&k(ae,te,W.shouldTouch,W.shouldDirty,!0),W.shouldValidate&&ee(ae)},Y=(ae,pe,W)=>{for(const q in pe){const te=pe[q],X=`${ae}.${q}`,le=Un(a,X);(c.array.has(ae)||!o_(te)||le&&!le._f)&&!Fh(te)?Y(X,te,W):H(X,te,W)}},z=(ae,pe,W={})=>{const q=Un(a,ae),te=c.array.has(ae),X=Fo(pe);Ia(i,ae,X),te?(m.array.next({name:ae,values:{...i}}),(f.isDirty||f.dirtyFields)&&W.shouldDirty&&m.state.next({name:ae,dirtyFields:NN(s,i),isDirty:L(ae,X)})):q&&!q._f&&!Fi(X)?Y(ae,X,W):H(ae,X,W),eM(ae,c)&&m.state.next({...r}),m.values.next({name:ae,values:{...i}}),!l.mount&&t()},K=async ae=>{const pe=ae.target;let W=pe.name,q=!0;const te=Un(a,W),X=()=>pe.type?RN(te._f):cje(ae);if(te){let le,me;const fe=X(),ke=ae.type===gz.BLUR||ae.type===gz.FOCUS_OUT,Se=!Sje(te._f)&&!n.resolver&&!Un(r.errors,W)&&!te._f.deps||Cje(ke,Un(r.touchedFields,W),r.isSubmitted,v,g),Et=eM(W,c,ke);Ia(i,W,fe),ke?(te._f.onBlur&&te._f.onBlur(ae),u&&u(0)):te._f.onChange&&te._f.onChange(ae);const nt=k(W,fe,ke,!1),Pt=!$o(nt)||Et;if(!ke&&m.values.next({name:W,type:ae.type,values:{...i}}),Se)return f.isValid&&E(),Pt&&m.state.next({name:W,...Et?{}:nt});if(!ke&&Et&&m.state.next({...r}),w(!0),n.resolver){const{errors:en}=await A([W]),hn=xz(r.errors,a,W),rt=xz(en,a,hn.name||W);le=rt.error,W=rt.name,me=$o(en)}else le=(await tM(te,i,y,n.shouldUseNativeValidation))[W],q=isNaN(fe)||fe===Un(i,W,fe),q&&(le?me=!1:f.isValid&&(me=await T(a,!0)));q&&(te._f.deps&&ee(te._f.deps),C(W,me,le,nt))}},ee=async(ae,pe={})=>{let W,q;const te=Al(ae);if(w(!0),n.resolver){const X=await O(La(ae)?ae:te);W=$o(X),q=ae?!te.some(le=>Un(X,le)):W}else ae?(q=(await Promise.all(te.map(async X=>{const le=Un(a,X);return await T(le&&le._f?{[X]:le}:le)}))).every(Boolean),!(!q&&!r.isValid)&&E()):q=W=await T(a);return m.state.next({...!Uc(ae)||f.isValid&&W!==r.isValid?{}:{name:ae},...n.resolver||!ae?{isValid:W}:{},errors:r.errors,isValidating:!1}),pe.shouldFocus&&!q&&a_(a,X=>X&&Un(r.errors,X),ae?te:c.mount),q},oe=ae=>{const pe={...s,...l.mount?i:{}};return La(ae)?pe:Uc(ae)?Un(pe,ae):ae.map(W=>Un(pe,W))},J=(ae,pe)=>({invalid:!!Un((pe||r).errors,ae),isDirty:!!Un((pe||r).dirtyFields,ae),isTouched:!!Un((pe||r).touchedFields,ae),error:Un((pe||r).errors,ae)}),se=ae=>{ae&&Al(ae).forEach(pe=>Ws(r.errors,pe)),m.state.next({errors:ae?r.errors:{}})},B=(ae,pe,W)=>{const q=(Un(a,ae,{_f:{}})._f||{}).ref;Ia(r.errors,ae,{...pe,ref:q}),m.state.next({name:ae,errors:r.errors,isValid:!1}),W&&W.shouldFocus&&q&&q.focus&&q.focus()},U=(ae,pe)=>$d(ae)?m.values.subscribe({next:W=>ae(D(void 0,pe),W)}):D(ae,pe,!0),$=(ae,pe={})=>{for(const W of ae?Al(ae):c.mount)c.mount.delete(W),c.array.delete(W),pe.keepValue||(Ws(a,W),Ws(i,W)),!pe.keepError&&Ws(r.errors,W),!pe.keepDirty&&Ws(r.dirtyFields,W),!pe.keepTouched&&Ws(r.touchedFields,W),!n.shouldUnregister&&!pe.keepDefaultValue&&Ws(s,W);m.values.next({values:{...i}}),m.state.next({...r,...pe.keepDirty?{isDirty:L()}:{}}),!pe.keepIsValid&&E()},ce=(ae,pe={})=>{let W=Un(a,ae);const q=op(pe.disabled);return Ia(a,ae,{...W||{},_f:{...W&&W._f?W._f:{ref:{name:ae}},name:ae,mount:!0,...pe}}),c.mount.add(ae),La(pe.value)||Ia(i,ae,pe.value),W?q&&Ia(i,ae,pe.disabled?void 0:Un(i,ae,RN(W._f))):N(ae,!0,pe.value),{...q?{disabled:pe.disabled}:{},...n.progressive?{required:!!pe.required,min:E0(pe.min),max:E0(pe.max),minLength:E0(pe.minLength),maxLength:E0(pe.maxLength),pattern:E0(pe.pattern)}:{},name:ae,onChange:K,onBlur:K,ref:te=>{if(te){ce(ae,pe),W=Un(a,ae);const X=La(te.value)&&te.querySelectorAll&&te.querySelectorAll("input,select,textarea")[0]||te,le=_je(X),me=W._f.refs||[];if(le?me.find(fe=>fe===X):X===W._f.ref)return;Ia(a,ae,{_f:{...W._f,...le?{refs:[...me.filter(CN),X,...Array.isArray(Un(s,ae))?[{}
1949]:[]],ref:{type:X.type,name:ae}}:{ref:X}}}),N(ae,!1,void 0,X)}else W=Un(a,ae,{}),W._f&&(W._f.mount=!1),(n.shouldUnregister||pe.shouldUnregister)&&!(dje(c.array,ae)&&l.action)&&c.unMount.add(ae)}}},be=()=>n.shouldFocusError&&a_(a,ae=>ae&&Un(r.errors,ae),c.mount),ue=(ae,pe)=>async W=>{W&&(W.preventDefault&&W.preventDefault(),W.persist&&W.persist());let q=Fo(i);if(m.state.next({isSubmitting:!0}),n.resolver){const{errors:te,values:X}=await A();r.errors=te,q=X}else await T(a);Ws(r.errors,"root"),$o(r.errors)?(m.state.next({errors:{}}),await ae(q,W)):(pe&&await pe({...r.errors},W),be(),setTimeout(be)),m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$o(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Ie=(ae,pe={})=>{Un(a,ae)&&(La(pe.defaultValue)?z(ae,Un(s,ae)):(z(ae,pe.defaultValue),Ia(s,ae,pe.defaultValue)),pe.keepTouched||Ws(r.touchedFields,ae),pe.keepDirty||(Ws(r.dirtyFields,ae),r.isDirty=pe.defaultValue?L(ae,Un(s,ae)):L()),pe.keepError||(Ws(r.errors,ae),f.isValid&&E()),m.state.next({...r}))},Ae=(ae,pe={})=>{const W=ae||s,q=Fo(W),te=ae&&!$o(ae)?q:s;if(pe.keepDefaultValues||(s=W),!pe.keepValues){if(pe.keepDirtyValues||h)for(const X of c.mount)Un(r.dirtyFields,X)?Ia(te,X,Un(i,X)):z(X,Un(te,X));else{if(U4&&La(ae))for(const X of c.mount){const le=Un(a,X);if(le&&le._f){const me=Array.isArray(le._f.refs)?le._f.refs[0]:le._f.ref;if(s_(me)){const fe=me.closest("form");if(fe){fe.reset();break}}}}a={}}i=e.shouldUnregister?pe.keepDefaultValues?Fo(s):{}:Fo(te),m.array.next({values:{...te}}),m.values.next({values:{...te}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!f.isValid||!!pe.keepIsValid,l.watch=!!e.shouldUnregister,m.state.next({submitCount:pe.keepSubmitCount?r.submitCount:0,isDirty:pe.keepDirty?r.isDirty:!!(pe.keepDefaultValues&&!Zf(ae,s)),isSubmitted:pe.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:pe.keepDirtyValues?r.dirtyFields:pe.keepDefaultValues&&ae?NN(s,ae):{},touchedFields:pe.keepTouched?r.touchedFields:{},errors:pe.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},he=(ae,pe)=>Ae($d(ae)?ae(i):ae,pe);return{control:{register:ce,unregister:$,getFieldState:J,handleSubmit:ue,setError:B,_executeSchema:A,_getWatch:D,_getDirty:L,_updateValid:E,_removeUnmounted:M,_updateFieldArray:x,_getFieldArray:j,_reset:Ae,_resetDefaultValues:()=>$d(n.defaultValues)&&n.defaultValues().then(ae=>{he(ae,n.resetOptions),m.state.next({isLoading:!1})}),_updateFormState:ae=>{r={...r,...ae}},_subjects:m,_proxyFormState:f,get _fields(){return a},get _formValues(){return i},get _state(){return l},set _state(ae){l=ae},get _defaultValues(){return s},get _names(){return c},set _names(ae){c=ae},get _formState(){return r},set _formState(ae){r=ae},get _options(){return n},set _options(ae){n={...n,...ae}}},trigger:ee,register:ce,handleSubmit:ue,watch:U,setValue:z,getValues:oe,reset:he,resetField:Ie,clearErrors:se,unregister:$,setError:B,setFocus:(ae,pe={})=>{const W=Un(a,ae),q=W&&W._f;if(q){const te=q.refs?q.refs[0]:q.ref;te.focus&&(te.focus(),pe.shouldSelect&&te.select())}},getFieldState:J}}function fc(e={}){const t=o.useRef(),n=o.useRef(),[r,a]=o.useState({isDirty:!1,isValidating:!1,isLoading:$d(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:$d(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Tje(e,()=>a(i=>({...i}))),formState:r});const s=t.current.control;return s._options=e,ane({subject:s._subjects.state,next:i=>{gje(i,s._proxyFormState,s._updateFormState,!0)&&a({...s._formState})}}),o.useEffect(()=>{e.values&&!Zf(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values):s._resetDefaultValues()},[e.values,s]),o.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=pje(r,s),t.current}const mne=({email:e,otpCode:t,setOtpCode:n,triggerVerifyOTP:r,isVerifyingOTP:a,hasOTPError:s,setHasOTPError:i,triggerSendOTP:l,onBackCommand:c,className:u=""})=>{const[d,f]=p.useState("Resend code"),m=p.useRef(null),h=p.useRef(null);p.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const g=()=>{var x;n(""),l(),(x=h.current)==null||x.focus(),Rm()&&(f("New code sent"),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{f("Resend code")},4e3))},v=x=>{const S=x.replace(/\D/g,"").slice(0,6);s&&i&&i(!1),n(S),S.length===6&&r(S)},y=x=>{var N;const S=(N=x.clipboardData)==null?void 0:N.getData("text");S&&(x.preventDefault(),v(S))},b=()=>{var x;n(""),i&&i(!1),(x=h.current)==null||x.focus()},E=t.length===6&&!a,w="linear-gradient(180deg, #cf30e0, #a512c4)";return o.createElement("div",{className:`app-content app-marketing ${u}`.trim()},o.createElement("div",{className:"w-full max-w-md mx-auto px-6 py-8"},c&&o.createElement("button",{type:"button",onClick:c,"aria-label":"Back",className:"mb-8 w-11 h-11 rounded-2xl bg-white dark:bg-gray-800 shadow-sm border border-gray-100 dark:border-gray-700 flex items-center justify-center hover:bg-gray-50 dark:hover:bg-gray-700"},o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-700 dark:text-gray-200"},o.createElement("polyline",{points:"15 18 9 12 15 6"}))),o.createElement("h1",{className:"font-domine text-4xl sm:text-5xl font-bold leading-[1.05] text-gray-900 dark:text-white mb-6"},"Check your",o.createElement("br",null),"email"),o.createElement("p",{className:"text-base text-gray-600 dark:text-gray-300 mb-8 flex flex-col gap-2"},o.createElement("span",null,"Enter the 6-digit code we sent to"),o.createElement("span",null,o.createElement("b",{className:"text-gray-900 dark:text-white break-all"},e),".")),o.createElement("div",{className:"relative mb-3",onClick:()=>{var x;return(x=h.current)==null?void 0:x.focus()}},o.createElement("div",{className:"flex gap-2 sm:gap-2.5"},Array.from({length:6}).map((x,S)=>{const N=S<t.length,k="flex-1 h-[58px] rounded-2xl bg-gray-50 dark:bg-gray-800 flex items-center justify-center text-2xl font-bold text-gray-900 dark:text-white select-none",C=s?"border-[1.5px] border-red-500 dark:border-red-400":N?"border-[1.5px] border-[#c026d3]":"border border-gray-300 dark:border-gray-600";return o.createElement("div",{key:S,className:`${k} ${C}`},t[S]??"")})),o.createElement("input",{ref:h,type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:"one-time-code",autoFocus:!0,maxLength:6,value:t,disabled:a,onChange:x=>v(x.target.value),onPaste:y,className:"absolute inset-0 w-full h-full opacity-0 outline-none border-none bg-transparent",style:{caretColor:"transparent"},"aria-label":"One-time verification code"})),s&&o.createElement("div",{className:"text-[13px] text-red-500 dark:text-red-400 mb-3 pl-1"},"That code didn't work. Check your email and try again."," ",o.
1949createElement("button",{type:"button",onClick:b,disabled:a,className:"font-semibold underline text-[#a512c4] hover:text-[#8f0eaa] disabled:opacity-50 disabled:cursor-not-allowed"},"Reset")),o.createElement("button",{type:"button",onClick:()=>E&&r(t),disabled:!E,className:"w-full mt-4 py-4 rounded-2xl text-white font-semibold text-lg shadow-md transition-opacity",style:{background:w,opacity:E?1:.55,boxShadow:"0 10px 22px rgba(192, 38, 211, 0.38)"}},a?"Signing inâ¦":"Verify & continue"),o.createElement("div",{className:"text-center mt-4"},o.createElement("button",{type:"button",onClick:g,disabled:a,className:"text-[#a512c4] hover:text-[#8f0eaa] font-semibold disabled:opacity-50 disabled:cursor-not-allowed"},d))))},rw=of(),_z=Ir(xr()),zh=()=>{var K,ee,oe;const[e,t]=p.useState(!1),[n,r]=p.useState(!1),[a,s]=p.useState(""),[i,l]=p.useState(!1),[c,u]=p.useState(!1),{assetID:d,organizationID:f}=xs(),m=Wn(J=>{var se;return(se=J==null?void 0:J.FB)==null?void 0:se.auth}),[h]=df();let g=h.get("email");const v=yr(),{handleSubmit:y,register:b,setValue:E,watch:w,formState:{errors:x}}=fc();p.useEffect(()=>{re.on("login-freeup",()=>{t(!1)},"Reset-IsSettingUp"),ea.ping(Ze("users-auth-otp-send"));const J=localStorage.getItem("pendingLoginOTPEmail");if(J)E("authEmailAddress",J),r(!0),ea.ping(Ze("users-auth-otp-verify")),ea.ping(Ze("validate-userContext")),ea.ping(Ze("users-info-teams-list")),ea.ping(Ze("users-team-create-seedStarter"));else if(!g){const se=localStorage.getItem("lastSignInEmail");se&&E("authEmailAddress",se)}},[]),p.useEffect(()=>{g&&E("authEmailAddress",g)},[g]);const[S,N]=p.useState(()=>!rw.currentUser&&!localStorage.getItem("userLoader-userContext")&&!localStorage.getItem("userLoader-teamsList"));p.useEffect(()=>{if(S)return;let J=!1;const se=setTimeout(()=>{J||N(!0)},3e3);return rw.authStateReady().then(()=>{!J&&!rw.currentUser&&(clearTimeout(se),N(!0))}),()=>{J=!0,clearTimeout(se)}},[]);function k({isSilent:J=!1}={}){var U;const se=w("authEmailAddress")||((U=m==null?void 0:m.user)==null?void 0:U.email);return u(!1),pt(_z,Ze("users-auth-otp-send"))({email:se,_brandKey:"bookmark.it.com"}).then($=>(J||re.dispatch("trigger-alert",{message:"Verification code sent.",intent:"success"}),$)).catch($=>{console.error("Error sending OTP",$);let ce="Could not send verification code. Please try again.";throw($==null?void 0:$.message)==="No account found with this email."&&(ce=$.message),re.dispatch("trigger-alert",{message:ce,intent:"danger"}),$})}function C(J){var $;const se=typeof J=="string"?J:a,B=w("authEmailAddress")||(($=m==null?void 0:m.user)==null?void 0:$.email);l(!0),u(!1),pt(_z,Ze("users-auth-otp-verify"))({code:se,email:B}).then(ce=>{const{token:be}=ce.data;return T_(rw,be)}).then(()=>{localStorage.removeItem("pendingLoginOTPEmail"),d&&Zn.dispatch({type:"ui/setAssetGO_assetID",data:{assetID:d}}),f&&Zn.dispatch({type:"ui/setOrganizationSubscribe_organizationID",data:{organizationID:f}})}).catch(ce=>{console.error("Error verifying OTP",ce),l(!1),u(!0),re.dispatch("trigger-alert",{message:"That code did not work. Please check your email.",intent:"danger"})})}const A=o.createElement("div",{className:"account-auth__interstitial"},o.createElement(du,null));let O=o.createElement(mne,{className:"app-marketing__auth-otp",email:w("authEmailAddress")||((K=m==null?void 0:m.user)==null?void 0:K.email),otpCode:a,setOtpCode:s,triggerVerifyOTP:C,isVerifyingOTP:i,hasOTPError:c,setHasOTPError:u,triggerSendOTP:k,onBackCommand:()=>{r(!1),localStorage.removeItem("pendingLoginOTPEmail")}});const T=Rm(),M=J=>{if(J.preventDefault(),Jn.analyticsTrack({event:"Login - Create An Account - Click",codeName:"anonymous-view-login-action-button-createanaccount-click"}),T){const B=String("https://bookmark.it.com").replace(/\/$/,"")||"",U=B?`${B}/signup`:`${window.location.origin}/signup`;yn(()=>function(){return(ce=>import(ce))("./index.a906e697.js")}(),[]).then(({openUrl:$})=>$(U)).catch(()=>{window.open(U,"_blank","noopener,noreferrer")})}else v("/signup")},L=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,j=L.test(w("authEmailAddress")||"")&&!e,H="linear-gradient(180deg, #cf30e0, #a512c4)",Y=()=>v("/");let z=o.createElement("div",{className:"app-content app-marketing app-marketing__login"},o.createElement("div",{className:"w-full max-w-md mx-auto px-6 py-8"},(ee=m==null?void 0:m.user)!=null&&ee.email?null:o.createElement("form",{className:"flex flex-col",onSubmit:y(J=>{J.authEmailAddress&&(t(!0),k({isSilent:!0}).then(()=>{ea.ping(Ze("users-auth-otp-verify")),ea.ping(Ze("validate-userContext")),ea.ping(Ze("users-info-teams-list")),ea.ping(Ze("users-team-create-seedStarter")),t(!1),r(!0),localStorage.setItem("pendingLoginOTPEmail",J.authEmailAddress)}).catch(()=>{t(!1)}))})},o.createElement("button",{type:"button",onClick:Y,"aria-label":"Go to homepage",className:"mb-8 w-11 h-11 rounded-2xl bg-white dark:bg-gray-800 shadow-sm border border-gray-100 dark:border-gray-700 flex items-center justify-center hover:bg-gray-50 dark:hover:bg-gray-700"},o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-700 dark:text-gray-200"},o.createElement("path",{d:"M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z"}))),["dev","qa"].includes("production")?o.createElement("div",{className:"flex flex-col items-center gap-2 mb-4 dark__text"},o.createElement("div",{className:"flex items-center dark__text"},o.createElement("span",{className:"dark__text"}
1949,"Environment"," ",o.createElement(li,{minimal:!0,className:"dark__text capitalize ml-1"},"production")),null),d?o.createElement("span",{className:"text-2sm text-gray-900 dark__text"},"Asset Signin",o.createElement(li,{minimal:!0,className:"dark__text capitalize ml-2"},d)):null,f?o.createElement("span",{className:"text-2sm text-gray-900 dark__text"},"Organization Signin",o.createElement(li,{minimal:!0,className:"dark__text capitalize ml-2"},f)):null):null,o.createElement("h1",{className:"font-domine text-4xl sm:text-5xl font-bold leading-[1.05] text-gray-900 dark:text-white mb-4"},"Save it for",o.createElement("br",null),"later."),o.createElement("p",{className:"text-base text-gray-600 dark:text-gray-300 mb-8"},"Your bookmarks, everywhere you are."),o.createElement("div",{className:"flex flex-col gap-2 mb-4"},o.createElement("input",{type:"email",autoComplete:"username",placeholder:"Email address",className:"w-full py-4 px-4 rounded-2xl bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-base font-medium text-gray-900 dark:text-white outline-none focus:border-[#c026d3]",...b("authEmailAddress",{required:"Please enter your email.",pattern:{value:L,message:"Please enter a valid email address."}})}),x.authEmailAddress&&o.createElement("span",{className:"text-[13px] text-red-500 dark:text-red-400 pl-1"},x.authEmailAddress.message)),o.createElement("button",{type:"submit",disabled:!j,className:"w-full py-4 rounded-2xl text-white font-semibold text-lg shadow-md transition-opacity",style:{background:H,opacity:j?1:.55,boxShadow:"0 10px 22px rgba(192, 38, 211, 0.38)"}},e?"Sending codeâ¦":"Sign in"),o.createElement("div",{className:"flex items-center justify-center gap-2 mt-8 text-sm"},o.createElement("span",{className:"text-gray-500 dark:text-gray-400"},"New here?"),o.createElement("a",{href:"#",onClick:M,className:"text-[#a512c4] hover:text-[#8f0eaa] font-bold"},"Create account")))));if((oe=m==null?void 0:m.user)!=null&&oe.uid){const J=localStorage.getItem("pendingJoinTeamCode"),se=localStorage.getItem("pendingImportRoute");return J?o.createElement(jf,{to:`/workspace/join/${J}`,replace:!0}):se?(localStorage.removeItem("pendingImportRoute"),o.createElement(jf,{to:se,replace:!0})):Rm()?o.createElement(jf,{to:"/tauri",replace:!0}):o.createElement(jf,{to:"/dashboard",replace:!0})}else if(!(m!=null&&m.isLive)&&!S)return A;return n?O:z},Aje=of(),kz=Ir(xr()),aw="pendingSignupOTP",hne=()=>{const e=Wn(M=>{var L;return(L=M==null?void 0:M.FB)==null?void 0:L.auth});let t=yr();const[n]=df(),[r]=p.useState(null),[a,s]=p.useState(!1),[i,l]=p.useState(!1),[c,u]=p.useState(""),[d,f]=p.useState(!1),[m,h]=p.useState(!1),[g,v]=p.useState({email:"",first:"",last:""}),{register:y,handleSubmit:b,setValue:E,formState:{errors:w}}=fc();p.useEffect(()=>{const M=n.get("email");M&&E("authEmailAddress",M);try{const L=JSON.parse(localStorage.getItem(aw)||"null");L&&L.email&&(E("authEmailAddress",L.email),E("targetFirstName",L.first||""),E("targetLastName",L.last||""),v({email:L.email,first:L.first||"",last:L.last||""}),l(!0),ea.ping(Ze("users-auth-otp-verify")),ea.ping(Ze("validate-userContext")),ea.ping(Ze("users-info-teams-list")))}catch{}},[n,E]);function x({email:M,isSilent:L=!1}={}){const D=M||g.email;return pt(kz,Ze("users-auth-otp-send"))({email:D,_brandKey:"bookmark.it.com"}).then(H=>(L||re.dispatch("trigger-alert",{message:"Verification code sent.",intent:"success"}),H)).catch(H=>{throw console.error("Error sending OTP",H),re.dispatch("trigger-alert",{message:"Could not send verification code. Please try again.",intent:"danger"}),H})}function S(M){const L=typeof M=="string"?M:c;f(!0),h(!1),pt(kz,Ze("users-auth-otp-verify"))({email:g.email,code:L,profile:{name:{first:g.first,last:g.last}}}).then(j=>{var Y;const H=(Y=j.data)==null?void 0:Y.token;if(!H)throw new Error("No token returned from verification.");return T_(Aje,H)}).then(()=>{localStorage.removeItem(aw);const j=()=>{const H=localStorage.getItem("pendingJoinTeamCode");H?t(`/workspace/join/${H}`):Rm()?t("/tauri",{replace:!0}):t("/dashboard")};re.dispatch("refresh-usercontext",{callback:()=>j()})}).catch(j=>{console.error("Error verifying OTP",j),f(!1),h(!0),re.dispatch("trigger-alert",{message:"That code did not work. Please check your email.",intent:"danger"})})}p.useEffect(()=>{var M;Jn.analyticsPage({userId:(M=e==null?void 0:e.user)==null?void 0:M.uid,name:"Sign Up"}),ea.ping(Ze("users-auth-otp-send"))},[]);let N=o.createElement("main",{className:"max-w-sm mx-auto bg-white shadow-md rounded px-6 pt-6 pb-4 mt-20 "},o.createElement("div",null,"Oops. Something went wrong."),o.createElement("pre",{style:{whiteSpace:"pre-wrap",fontSize:"10px",color:"#ccc"}},JSON.stringify(r))),k=o.createElement(mne,{className:"app-marketing__auth-otp",email:g.email,otpCode:c,setOtpCode:u,triggerVerifyOTP:S,isVerifyingOTP:d,hasOTPError:m,setHasOTPError:h,triggerSendOTP:x,onBackCommand:()=>{localStorage.removeItem(aw),l(!1),u("")}});const C=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,A="linear-gradient(180deg, #cf30e0, #a512c4)",O=()=>t("/");let T=o.createElement("div",{className:"app-content app-marketing app-marketing__signup"},o.createElement("div",{className:"w-full max-w-md mx-auto px-6 py-8"},o.createElement("form",{className:"flex flex-col",onSubmit:b(M=>{Jn.analyticsTrack({event:"Sign Up - Create Account - Submit",codeName:"anonymous-view-signup-action-button-createaccount-submit"});const L={email:M.authEmailAddress,first:M.targetFirstName,last:M.targetLastName};v(L),s(!0),x({email:L.email,isSilent:!0}).then(()=>{localStorage.setItem(aw,JSON.stringify(L)),ea.ping(Ze("users-auth-otp-verify")),ea.ping(Ze("validate-userContext")),ea.ping(Ze("users-info-teams-list")),s(!1),u(""),l(!0)}).catch(()=>{s(!1)})})},o.createElement("button",{type:"button",onClick:O,"aria-label":"Go to homepage",className:"mb-8 w-11 h-11 rounded-2xl bg-white dark:bg-gray-800 shadow-sm border border-gray-100 dark:border-gray-700 flex items-center justify-center hover:bg-gray-50 dark:hover:bg-gray-700"},o.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-gray-700 dark:text-gray-200"},o.createElement("path",{d:"M3 10.5 12 3l9 7.5V20a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1z"}))),o.createElement("h1",{className:"font-domine text-4xl sm:text-5xl font-bold leading-[1.05] text-gray-900 dark:text-white mb-4"},"Create your",o.createElement("br",null),"account"),o.createElement("p",{className:"text-base text-gray-600 dark:text-gray-300 mb-8"},"Free forever for personal use."),["dev","qa"].includes("production")?o.createElement("div",{className:"flex mb-2 gap-2"},o.createElement("label",{className:"text-gray-500 dark:text-gray-400 text-sm font-bold"},"Test user:"),o.createElement("a",{className:"text-[#a512c4] hover:text-[#8f0eaa] text-sm font-bold cursor-pointer",onClick:M=>{M.preventDefault();const D="production".toLowerCase()==="qa",j=Ht().format("YYYYMMDDHHmm"),H=D?`${za.testUserSignupEmailPrefix}+qa.site.${j}@gmail.com`:`${za.testUserSignupEmailPrefix}+dev.site.${j}@gmail.com`;navigator.clipboard.writeText(H),E("authEmailAddress",H),E("targetFirstName",D?"QA":"Dev"),E("targetLastName",j)}},"Gmail"),o.createElement("span",{className:"text-gray-500 dark:text-gray-400"},"|"),o.createElement("a",{className:"text-[#a512c4] hover:text-[#8f0eaa] text-sm font-bold cursor-pointer",onClick:M=>{M.preventDefault();const D="production".toLowerCase()==="qa",j=Ht().format("YYYYMMDDHHmm"),H="[email protected]";navigator.clipboard.writeText(H),E("authEmailAddress",H),E("targetFirstName",D?"QA":"Dev"),E("targetLastName",j)}},"Resend")):null,o.createElement("div",{className:"flex flex-col gap-2 mb-2"},o.createElement("input",{type:"email",id:"authEmailAddress",autoComplete:"email",placeholder:"Email address",className:"w-full py-4 px-4 roun
1949ded-2xl bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-base font-medium text-gray-900 dark:text-white outline-none focus:border-[#c026d3]",...y("authEmailAddress",{required:"Please enter your email.",pattern:{value:C,message:"Please enter a valid email address."}})}),w.authEmailAddress&&o.createElement("span",{className:"text-[13px] text-red-500 dark:text-red-400 pl-1"},w.authEmailAddress.message)),o.createElement("div",{className:"flex flex-col gap-2 mb-2"},o.createElement("input",{type:"text",id:"targetFirstName",autoComplete:"given-name",placeholder:"First name",className:"w-full py-4 px-4 rounded-2xl bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-base font-medium text-gray-900 dark:text-white outline-none focus:border-[#c026d3]",...y("targetFirstName",{required:"Please enter a first name."})}),w.targetFirstName&&o.createElement("span",{className:"text-[13px] text-red-500 dark:text-red-400 pl-1"},w.targetFirstName.message)),o.createElement("div",{className:"flex flex-col gap-2 mb-4"},o.createElement("input",{type:"text",id:"targetLastName",autoComplete:"family-name",placeholder:"Last name",className:"w-full py-4 px-4 rounded-2xl bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-base font-medium text-gray-900 dark:text-white outline-none focus:border-[#c026d3]",...y("targetLastName",{required:"Please enter a last name."})}),w.targetLastName&&o.createElement("span",{className:"text-[13px] text-red-500 dark:text-red-400 pl-1"},w.targetLastName.message)),o.createElement("button",{type:"submit",disabled:a,className:"w-full py-4 rounded-2xl text-white font-semibold text-lg shadow-md transition-opacity",style:{background:A,opacity:a?.55:1,boxShadow:"0 10px 22px rgba(192, 38, 211, 0.38)"}},a?"Sending codeâ¦":"Create account"),o.createElement("div",{className:"text-center text-xs text-gray-500 dark:text-gray-400 mt-3 leading-relaxed"},"We'll email a code to confirm. By continuing you agree to our"," ",o.createElement("a",{className:"text-[#a512c4] font-semibold hover:text-[#8f0eaa] cursor-pointer",onClick:()=>t("/terms")},"Terms & Conditions")," ","and"," ",o.createElement("a",{className:"text-[#a512c4] font-semibold hover:text-[#8f0eaa] cursor-pointer",onClick:()=>t("/privacy")},"Privacy Policy"),".")),o.createElement("div",{className:"flex gap-2 mt-8 items-center justify-center text-sm"},o.createElement("span",{className:"text-gray-500 dark:text-gray-400"},"Have an account?"),o.createElement("a",{className:"text-[#a512c4] hover:text-[#8f0eaa] font-bold cursor-pointer",onClick:()=>t("/login")},"Sign in"))));return r?N:i?k:e!=null&&e.isLoggedIn?o.createElement(jf,{to:"/dashboard",replace:!0}):T};Ts();Ir(xr());const Sz=(e,t)=>{const n=e.startsWith("/")?e:`/${e}`,r=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window),s=String("https://bookmark.it.com").replace(/\/$/,"")||"";if(r){const i=s?`${s}${n}?from=tauri`:`https://bookmark.it.com${n}?from=tauri`;yn(()=>function(){return(c=>import(c))("./index.a906e697.js")}(),[]).then(({openUrl:l})=>l(i)).catch(()=>{window.open(i,"_blank","noopener,noreferrer")});return}t(n)},Ije=()=>{var d,f,m,h;p.useState(0);const[e,t]=p.useState(!1),[n,r]=p.useState(null),a=yr(),s=Wn(g=>{var v;return(v=g==null?void 0:g.FB)==null?void 0:v.auth}),i=({id:g,name:v},y)=>{Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:g,name:v}}),a(y==="manage"?{pathname:Pn("/workspace/:teamID/manage",{teamID:g})}:y==="lastupdated"?{pathname:Pn("/workspace/:teamID/bookmarks/updated",{teamID:g})}:{pathname:Pn("/workspace/:teamID/bookmarks/recently-viewed",{teamID:g})})};p.useEffect(()=>{var g;Jn.analyticsPage({userId:(g=s==null?void 0:s.user)==null?void 0:g.uid,name:"User Dashboard"}),ea.ping(Ze("users-team-create-start")),ea.ping(Ze("users-team-create-startPersonal")),ea.ping(Ze("users-team-invitations-create")),ea.ping(Ze("users-asset-manage-add"))},[]);const l=async()=>{t(!0);try{const g=await sX();if(!g)throw new Error("Could not create workspace");Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:g,name:iS}}),re.dispatch("refresh-usercontext",{callback:()=>{t(!1),a({pathname:Pn("/workspace/:teamID/bookmarks/updated",{teamID:g})})}})}catch(g){t(!1),r((g==null?void 0:g.message)||"Couldn't create your personal workspace. Please try again."),re.dispatch("trigger-alert",{message:"Could not create workspace. Please try again.",intent:"danger"})}};p.useEffect(()=>{var g;(g=s==null?void 0:s.globalMeta)!=null&&g.teams&&is.assignColors(s.globalMeta.teams)},[(d=s==null?void 0:s.globalMeta)==null?void 0:d.teams]),p.useEffect(()=>{var y;if(e)return;const g=(y=s.globalMeta)==null?void 0:y.teams;if(!g||g.length!==1)return;const v=g[0];v!=null&&v.id&&(Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:v.id,name:v.name}}),a(Pn("/workspace/:teamID/bookmarks/updated",{teamID:v.id}),{replace:!0}))},[(f=s.globalMeta)==null?void 0:f.teams,e]);
1949const c=!(((h=(m=s.globalMeta)==null?void 0:m.teams)==null?void 0:h.length)>0)||e;return o.createElement("div",{className:"app-content"},c?o.createElement("div",{className:"flex flex-col gap-8 sm:gap-12 w-full max-w-6xl mx-auto px-2 sm:px-4"},o.createElement("div",{className:"text-center pt-2 md:pt-4"},o.createElement("h1",{className:"text-3xl sm:text-3xl md:text-4xl font-bold leading-tight tracking-tight dark__text"},o.createElement("span",null,"Letâs set up your library")),o.createElement("p",{className:"mt-4 text-base sm:text-lg text-gray-600 dark:text-gray-300 max-w-xl mx-auto"},"Bring your bookmarks, or start a workspace to collaborate with others.")),o.createElement("div",{className:"grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3 gap-4 sm:gap-6"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card relative overflow-hidden group transition-transform duration-300 hover:-translate-y-0.5"},o.createElement("div",{className:"flex flex-col gap-4 pt-2"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.fuchsia.100),theme(colors.orange.100))] dark:bg-[linear-gradient(135deg,theme(colors.fuchsia.900/40),theme(colors.orange.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300 group-hover:scale-105 transition-transform motion-reduce:transform-none"},o.createElement(Yu,{size:22,strokeWidth:1.75})),o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-0"},"Import Bookmarks"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},"Total control: import to your personal or shared workspace."))),o.createElement("h5",{className:"dark__text text-sm leading-relaxed mb-0"},"Import your Chrome Bookmarks. Only you will see the items that you import in your personal workspace."),o.createElement("div",{className:"flex sm:flex-col gap-4 mt-1"},o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-white bg-primary hover:bg-primaryHover rounded-md text-sm px-3 py-2 transition-colors",onClick:()=>{var g;Sz("/import-bookmark-bar",a),Jn.analyticsTrack({userId:(g=s==null?void 0:s.user)==null?void 0:g.uid,event:"User Dashboard - Import Bookmarks (Bar) - Click",codeName:"user-view-userdashboard-action-link-importbookmarks_bar-click"})}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Yu,{size:16,strokeWidth:1.75}),"Import bookmark bar"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"})),o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-primary bg-transparent border border-primary/30 hover:border-primary hover:bg-primary/5 rounded-md text-sm px-3 py-2 transition-colors dark:text-fuchsia-300 dark:border-fuchsia-500/40 dark:hover:border-fuchsia-400 dark:hover:bg-fuchsia-500/10",onClick:()=>{var g;Sz("/import-bookmark-history",a),Jn.analyticsTrack({userId:(g=s==null?void 0:s.user)==null?void 0:g.uid,event:"User Dashboard - Import Bookmarks (History) - Click",codeName:"user-view-userdashboard-action-link-importbookmarks_history-click"})}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Sx,{size:16,strokeWidth:1.75}),"Frequently visited sites"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"}))))),o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card relative overflow-hidden group transition-transform duration-300 hover:-translate-y-0.5"},o.createElement("div",{className:"flex flex-col gap-4 pt-2"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.purple.100),theme(colors.fuchsia.100))] dark:bg-[linear-gradient(135deg,theme(colors.purple.900/40),theme(colors.fuchsia.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300 group-hover:scale-105 transition-transform motion-reduce:transform-none"},o.createElement(uc,{size:22,strokeWidth:1.75})),o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-0"},"Shared Workspace"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},"Share a library, collaborate, and organize bookmarks together"))),o.createElement("h5",{className:"dark__text text-sm leading-relaxed mb-0"},"Create a workspace to organize bookmarks together, or join an existing workspace."),o.createElement("div",{className:"flex sm:flex-col gap-4 mt-1"},o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-white bg-primary hover:bg-primaryHover rounded-md text-sm px-3 py-2 transition-colors",onClick:()=>{var g;a("/workspace/add"),Jn.analyticsTrack({userId:(g=s==null?void 0:s.user)==null?void 0:g.uid,event:"User Dashboard - Create A Team (Add Team) - Click",codeName:"user-view-userdashboard-action-link-createateam_addteam-click"})}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(uc,{size:16,strokeWidth:1.75}),"Create a workspace"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"})),o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-primary bg-transparent border border-primary/30 hover:border-primary hover:bg-primary/5 rounded-md text-sm px-3 py-2 transition-colors dark:text-fuchsia-300 dark:border-fuchsia-500/40 dark:hover:border-fuchsia-400 dark:hover:bg-fuchsia-500/10",onClick:()=>{var g;a("/workspace/join"),Jn.analyticsTrack({userId:(g=s==null?void 0:s.user)==null?void 0:g.uid,event:"User Dashboard - Join Team - Click",codeName:"user-view-userdashboard-action-link-jointeam-click"})}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(NZ,{size:16,strokeWidth:1.75}),"Join with invitation code"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"}))))),o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card relative overflow-hidden group transition-transform duration-300 hover:-translate-y-0.5"},o.createElement("div",{className:"flex flex-col gap-4 pt-2"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.blue.100),theme(colors.purple.100))] dark:bg-[linear-gradient(135deg,theme(colors.blue.900/40),theme(colors.purple.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300 group-hover:scale-105 transition-transform motion-reduce:transform-none"},o.createElement(jd,{size:22,strokeWidth:1.75})),o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-0"},"Personal Workspace"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},"Only you can see the content in this workspace"))),o.createElement("h5",{className:"dark__text text-sm leading-relaxed mb-0"},"Create a workspace just for your own bookmarks. This is a personal space and only you can see it."),o.createElement("div",{className:"flex sm:flex-col gap-4 mt-1"},o.createElement("button",{disabled:e,className:"sm:w-full inline-flex items-center justify-between gap-2 text-white bg-primary hover:bg-primaryHover rounded-md text-sm px-3 py-2 transition-colors disabled:opacity-60 disabled:cursor-not-allowed",onClick:l},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(jd,{size:16,strokeWidth:1.75}),e?"Creating workspaceâ¦":"Create personal workspace"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"})),n?o.createElement("p",{className:"text-xs text-red-600 dark:text-red-400 mb-0",role:"alert"},n):null))))):o.createElement("div",{className:"xs:w-full sm:mx-auto sm:w-full sm:max-w-md md:max-w-lg"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("label",{className:"dark__text"},"Your workspaces"),o.createElement("ul",{className:"flex flex-col gap-2 py-2"},[...s.globalMeta.teams].sort((g,v)=>g.is_personal&&!v.is_personal?-1:!g.is_personal&&v.is_personal?1:(g.name||"").localeCompare(v.name||"")).map(g=>{var v,y,b;return o.createElement("li",{className:"flex gap-2 items-center justify-between group",key:g.id},o.createElement("div",{className:"flex gap-2 items-center"},o.createElement(Ft,{icon:g.is_personal?o.createElement(jd,{size:16,color:is.getColor(g.i
1949d)||"#BABABA",strokeWidth:1.75}):o.createElement(uc,{size:16,color:is.getColor(g.id)||"#BABABA"})}),o.createElement("a",{onClick:()=>i(g,"lastupdated"),className:"container xs:max-w-[200px] sm:max-w-[300px] text-ellipsis overflow-hidden whitespace-nowrap"},`${jo(g)}${g.is_personal?" (Private)":""}`)),(v=s.context)!=null&&v.team_manage_edit&&((b=(y=s.context)==null?void 0:y.team_manage_edit_team_map)!=null&&b[g.id])?o.createElement("a",{onClick:()=>i(g,"manage"),className:"opacity-100 sm:opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},o.createElement(Ft,{icon:o.createElement(YP,{size:16}),color:"#BABABA"})," "):null)})))))};Ts();const Oje=Ir(xr()),Mje=()=>{p.useState(0);const e=Wn(l=>{var c;return(c=l==null?void 0:l.FB)==null?void 0:c.auth}),t=yr();p.useEffect(()=>{ea.ping(Ze("users-organization-create-start"))},[]);const{handleSubmit:n,register:r,setValue:a,formState:{errors:s}}=fc({defaultValues:{organizationName:""}});let i=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("h1",{className:"mb-1 text-center text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark__text"},"Add Organization"),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("form",{className:"space-y-4",onSubmit:n(l=>{re.dispatch("interstitial-run","on"),pt(Oje,Ze("users-organization-create-start"))({organizationName:l.organizationName}).then(({data:c})=>{re.dispatch("refresh-usercontext",{responseItem:c.output,callback:()=>{a("organizationName",""),re.dispatch("trigger-alert",{message:`You have successfully created ${l.organizationName}!`,intent:"success"}),re.dispatch("interstitial-run","off"),t({pathname:Pn("/workspace/add")})}})}).catch(c=>{console.error("errorItem",c),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:c.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})})},o.createElement("div",null,o.createElement("p",{className:"mb-4"},"Since this is your first workspace, let's create an organization."),o.createElement("p",{className:"mb-4"},o.createElement("span",null,"An organization or business name manages your workspaces (example ACME LLC). This is not visible to others."),!1),o.createElement("input",{type:"text",maxLength:50,placeholder:"Organization name",...r("organizationName",{required:"Please enter an organization name.",maxLength:{value:50,message:"Organization name must be at most 50 characters."}})}),s.organizationName&&o.createElement("span",{className:"error text-left"},s.organizationName.message)),o.createElement("div",null,o.createElement("button",{type:"submit",className:"w-full text-white bg-primary rounded-sm text-sm px-5 py-2.5 text-center dark:bg-primary-600 dark:hover:bg-primary-700"},"Continue to create a workspace")))));if(e!=null&&e.user)return i},Pje="w-full sm:max-w-lg",pne=e=>({page:{hidden:{opacity:0},visible:{opacity:1,transition:e?{duration:0}:{staggerChildren:.1,delayChildren:.05}}},item:{hidden:e?{}:{opacity:0,y:18},visible:{opacity:1,y:0,transition:e?{duration:0}:{duration:.35,ease:[.22,1,.36,1]}}}}),sf=({children:e,className:t="app-content"})=>{const n=dS(),{page:r}=pne(n);return o.createElement(_s.div,{className:t,initial:"hidden",animate:"visible",variants:r},e)},yi=({children:e,className:t,fullWidth:n=!1})=>{const r=dS(),{item:a}=pne(r),i=[n?"w-full":Pje,t].filter(Boolean).join(" ");return o.createElement(_s.div,{className:i,variants:a},e)};Ts();const Jw=Ir(xr());async function Dje(e,t){t&&(async()=>{let n="";try{const r=await fetch("/img/chrome-extension-page.base64");r.ok&&(n=(await r.text()).trim())}catch(r){console.error("Sample bookmark thumbnail fetch failed:",r)}try{await pt(Jw,Ze("users-asset-manage-add"))({asset:{id_team:e,property_name:`Chrome Extension for ${za.name}`,$new_tags:[{name:"Resources"}]},iteration:{property_url:"https://chromewebstore.google.com/detail/team-bookmarks/nnkccijjkjplbeidbpchalgdahjajeim",property_change_notes:"Quickly add and access your bookmarks with the Chrome extension.",property_screenshot_strategy:"custom",property_auto_preview_thumbnail:n},client_request_id:`req-${$f()}`})}catch(r){console.error("Sample bookmark insert failed:",r)}})(),(async()=>{try{await pt(Jw,Ze("users-team-invitations-create"))({teamID:e,type:"open"});try{await pt(Jw,Ze("users-team-invitation-code-generate"))({teamID:e})}catch(n){console.error("Invitation code generation failed:",n)}}catch(n){console.error("Auto-enable team invitations failed:",n)}})()}const Lje=()=>{var m,h,g,v;const[e,t]=p.useState({organizationID:null,initialized:!1,available:!1,teamCount:0,plan:null});p.useState(0);const n=yr(),r=Wn(y=>{var b;return(b=y==null?void 0:y.FB)==null?void 0:b.auth}),{handleSubmit:a,register:s,setValue:i,formState:{errors:l,isSubmitting:c}}=fc({defaultValues:{teamName:""}});let u=()=>{var x,S,N,k,C,A,O,T,M;let y=(N=(S=(x=r.context)==null?void 0:x.organization_manage_edit_list)==null?void 0:S[0])==null?void 0:N.id,b=((A=(C=(k=r.globalMeta)==null?void 0:k.organizations)==null?void 0:C.find(({id:L})=>L===y))==null?void 0:A.subscription)||null,E={organizationID:y||null,initialized:!!((O=r.globalMeta)!=null&&O.organizations)||!1,available:!1,teamCount:0,plan:(b==null?void 0:b.plan)||null};if(y){for(var w=0;w<(((T=r.globalMeta.teams)==null?void 0:T.length)||0);w++)y===((M=r.globalMeta.teams[w].organization)==null?void 0:M.$id)&&r.globalMeta.teams[w].is_vault!==!0&&E.teamCount++;b!=null&&b.active?E.plan==="organization"?E.available=!0:E.plan==="professional"?E.teamCount<Tr.organization.subscription.plan.professional.team_count_limit&&(E.available=!0):E.plan==="personal"?E.teamCount<Tr.organization.subscription.plan.personal.team_count_limit&&(E.available=!0):E.teamCount<Tr.organization.subscription.plan.free.team_count_limit&&(E.available=!0):E.teamCount<1&&(E.available=!0)}return E};p.useEffect(()=>t(u()),[r]),p.useEffect(()=>{ea.ping(Ze("users-team-create-start")),ea.ping(Ze("users-team-invitations-create"))},[]);let d=o.createElement(sf,{className:"app-content h-full"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("div",{className:"flex items-center gap-2 justify-center"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-2 md:mb-0 md:text-2xl dark__text"}
1949,"Create Workspace")),o.createElement(Es,{className:"my-4 mx-0 hd"}),o.createElement("form",{className:"space-y-4",onSubmit:a(y=>{const b=e.teamCount===0;return re.dispatch("interstitial-run",{status:"on",message:"Creating your workspace...",variant:"logo"}),pt(Jw,Ze("users-team-create-start"))({teamName:y.teamName,organizationID:e.organizationID}).then(({data:E})=>{const w=E.output.teamID;Dje(w,b),i("teamName",""),re.dispatch("trigger-alert",{message:`You have successfully created ${y.teamName}!`,intent:"success"}),re.dispatch("refresh-usercontext",{responseItem:E.output,callback:()=>{re.dispatch("interstitial-run","off"),Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:w,name:y.teamName}}),n({pathname:Pn("/workspace/:teamID/bookmarks/updated",{teamID:w})})}})}).catch(E=>{console.error("errorItem",E),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:E.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})})},e.available?o.createElement("div",{className:"flex flex-col gap-2"},o.createElement("div",{className:"flex items-center justify-between"},o.createElement("label",null,"Create a workspace and invite people to share bookmarks"),null),o.createElement("div",{className:"sm:flex sm:gap-2 sm:items-start"},o.createElement("div",{className:"w-full"},o.createElement("input",{className:`w-full m-0 ${c?"opacity-50 cursor-not-allowed":""}`,type:"text",maxLength:50,disabled:c,placeholder:"Workspace name",...s("teamName",{required:"Please enter a workspace name.",maxLength:{value:50,message:"Workspace name must be at most 50 characters."}})}),l.teamName&&o.createElement("span",{className:"error text-left"},l.teamName.message)),o.createElement("button",{type:"submit",disabled:c,className:`w-full mt-4 sm:mt-0 sm:w-auto flex justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap ${c?"opacity-50 cursor-not-allowed":""}`},c?"Creating...":"Continue"))):e.initialized?e.plan==="professional"?o.createElement("div",{className:"text-center dark__text gap-2"},o.createElement("span",null,"You have"),o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},e.teamCount," workspaces")),o.createElement("span",null,", which is the maximum included with the Professional Plan."),o.createElement("span",{className:"mx-1"},o.createElement("a",{onClick:()=>n({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:e.organizationID})})},"Upgrade your subscription")),o.createElement("span",null,"to add more workspaces, abilities and security features.")):o.createElement("div",{className:"text-center dark__text"},o.createElement("span",null,"You have"),o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},e.teamCount," workspace")),o.createElement("span",null,", which is the maximum included with the"," ",o.createElement("span",{className:"text-primary"},e.plan==="personal"?"Personal":"Free"," Plan.")),o.createElement("span",{className:"mx-1"},o.createElement("a",{onClick:()=>n({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:e.organizationID})})},"Upgrade your subscription")),o.createElement("span",null,"to add more workspaces, abilities and security features.")):null)))),f=o.createElement(sf,{className:"app-content"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("h1",{className:"mb-1 text-center text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark__text"},"Create Team"),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("p",{className:"text-center dard__text"},"You are currently unable to create a workspace."))));if(r.isLive)return(m=r.context)!=null&&m.organization_manage_edit&&((v=(g=(h=r.context)==null?void 0:h.organization_manage_edit_list)==null?void 0:g[0])!=null&&v.id)?d:f};Ts();const $je=Ir(xr()),Fje=()=>{const e=yr();p.useState(0);const t=Wn(c=>{var u;return(u=c==null?void 0:c.FB)==null?void 0:u.auth}),{handleSubmit:n,register:r,setValue:a,watch:s,formState:{errors:i}}=fc({defaultValues:{inviteCode:""}});p.useEffect(()=>{var c;Jn.analyticsPage({userId:(c=t==null?void 0:t.user)==null?void 0:c.uid,name:"Join Workspace"})},[]);let l=o.createElement(sf,{className:"app-content h-full"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("div",{className:"flex items-center gap-2 justify-center"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-2 md:mb-0 md:text-2xl dark__text"},"Join Workspace")),o.createElement(Es,{className:"my-4 mx-0 hd"}),o.createElement("form",{className:"space-y-4",onSubmit:n(c=>{re.dispatch("interstitial-run","on");const u=c.inviteCode.includes("-"),d=u?"users-team-invitations-accept":"users-team-invitation-code-accept",f=u?{inviteCode:c.inviteCode}:{invitationCode:c.inviteCode};t.user.getIdToken(!0).then(m=>pt($je,Ze(d))(f)).then(({data:m})=>{const h=m.output?m.output:m;a("inviteCode",""),re.dispatch("trigger-alert",{message:`You have successfully joined ${h.teamName}!`,intent:"success"}),re.dispatch("trigger-confetti"),re.dispatch("refresh-usercontext",{responseItem:h,options:{resetInitialIsLive:!0},callback:()=>{e(`/workspace/${h.teamID}/bookmarks/updated?sync=true`)}}),re.dispatch("interstitial-run","off")}).catch(m=>{console.error("errorItem",m),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:m.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})})},o.createElement("div",{className:"mt-2 sm:flex sm:gap-2 sm:items-start"},o.createElement("div",{className:"w-full"},o.createElement("input",{className:"w-full m-0",type:"text",maxLength:50,placeholder:"Workspace invitation code",...r("inviteCode",{required:"Please enter an invite code.",maxLength:{value:50,message:"Invite code must be at most 50 characters."},validate:{formatCheck:c=>{if(!c)return"Please enter a valid invite code.";if(c.includes("-")){const d=c.split("-");if(d.length!==2||!d[0]||!d[1])return"Please enter a valid legacy invite code."}
1949else if(c.length<5)return"Please enter a valid short invite code."}}})}),i.inviteCode&&o.createElement("div",{className:"error text-left"},i.inviteCode.message)),o.createElement("button",{type:"submit",disabled:!s("inviteCode"),className:"w-full mt-4 sm:mt-0 sm:w-auto flex justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed"},"Let's go"))))));if(t!=null&&t.user)return l};Ts();const zje=Ir(xr()),Cz=()=>{var l;const{code:e}=xs(),t=yr(),n=Wn(c=>{var u;return(u=c==null?void 0:c.FB)==null?void 0:u.auth}),[r,a]=p.useState(null),[s,i]=p.useState(!1);return p.useEffect(()=>{var c;Jn.analyticsPage({userId:(c=n==null?void 0:n.user)==null?void 0:c.uid,name:"Join Workspace By Short Code"})},[(l=n==null?void 0:n.user)==null?void 0:l.uid]),p.useEffect(()=>{if(!e||s)return;(n==null?void 0:n.isReady)===!0||(n==null||n.user);const c=setTimeout(()=>{if(n!=null&&n.user){i(!0),re.dispatch("interstitial-run","on");const u=e.includes("-"),d=u?"users-team-invitations-accept":"users-team-invitation-code-accept",f=u?{inviteCode:e}:{invitationCode:e};n.user.getIdToken(!0).then(()=>pt(zje,Ze(d))(f)).then(({data:m})=>{const h=m.output?m.output:m;re.dispatch("trigger-alert",{message:`You have successfully joined ${h.teamName}!`,intent:"success"}),re.dispatch("trigger-confetti"),localStorage.removeItem("pendingJoinTeamCode"),re.dispatch("refresh-usercontext",{responseItem:h,options:{resetInitialIsLive:!0},callback:()=>{t(`/workspace/${h.teamID}/bookmarks/updated?sync=true`)}}),re.dispatch("interstitial-run","off")}).catch(m=>{console.error("errorItem",m),re.dispatch("interstitial-run","off");const h=String((m==null?void 0:m.message)||(m==null?void 0:m.code)||"");let g="Hmm...something unexpected happened. Try again.";/removed|banned|can no longer join/i.test(h)?g="You've been removed from this workspace and can no longer join it.":/not[-_ ]?found|does\s?not\s?exist|doesnotexist|disabled|invalid|personal/i.test(h)?g="This workspace is no longer available to join. The invite link may have been revoked, or the workspace was made private.":/already/i.test(h)&&(g="You're already a member of this workspace."),a(g),localStorage.removeItem("pendingJoinTeamCode")})}else localStorage.setItem("pendingJoinTeamCode",e),t("/signup")},n!=null&&n.user?0:500);return()=>clearTimeout(c)},[e,n==null?void 0:n.user,s,t]),o.createElement(sf,{className:"app-content h-full flex items-center justify-center p-4"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-md text-center py-10"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-4 dark__text"},r?"Can't join workspace":"Joining Workspace..."),r?o.createElement("div",{className:"text-red-500 mb-4 font-medium text-sm"},r,o.createElement("div",{className:"mt-6"},o.createElement("button",{className:"flex mx-auto justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap",onClick:()=>t("/dashboard")},"Go to Dashboard"))):o.createElement(os,{intent:"primary",size:40}))))};var gne={exports:{}};function Hje(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var TN=Hje(p),Vje=kl;function Uje(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var a=n[r],s=Object.getOwnPropertyDescriptor(t,a);s&&s.configurable&&e[a]===void 0&&Object.defineProperty(e,a,s)}return e}function nM(){return(nM=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Bje(e,t){e.prototype=Object.create(t.prototype),Uje(e.prototype.constructor=e,t)}function jje(e,t){if(e==null)return{};var n,r,a={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}function dh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Wje=function(e,t,n,r,a,s,i,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,s,i,l],d=0;(c=new Error(t.replace(/%s/g,function(){return u[d++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},Nz=Wje;function Rz(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else{var r=e.createTextRange();r.collapse(!0),r.moveStart("character",t),r.moveEnd("character",n-t),r.select()}}function Gje(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else{var r=document.selection.createRange();r.parentElement()===e&&(t=-r.moveStart("character",-e.value.length),n=-r.moveEnd("character",-e.value.length))}return{start:t,end:n,length:n-t}}var qje={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},Yje="_";function Tz(e,t,n){var r="",a="",s=null,i=[];if(t===void 0&&(t=Yje),n==null&&(n=qje),!e||typeof e!="string")return{maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var l=!1;return e.split("").forEach(function(c){l=!l&&c==="\\"||(l||!n[c]?(i.push(r.length),r.length===i.length-1&&(a+=c)):s=r.length+1,r+=c,!1)}),{maskChar:t,formatChars:n,prefix:a,mask:r,lastEditablePosition:s,permanents:i}}function rl(e,t){return e.permanents.indexOf(t)!==-1}function HS(e,t,n){var r=e.mask,a=e.formatChars;if(!n)return!1;if(rl(e,t))return r[t]===n;var s=a[r[t]];return new RegExp(s).test(n)}function Az(e,t){return t.split("").every(function(n,r){return rl(e,r)||!HS(e,r,n)})}function z0(e,t){var n=e.maskChar,r=e.prefix;if(!n){for(;t.length>r.length&&rl(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=r.length,s=t.length;s>=r.length;s--){var i=t[s];if(!rl(e,s)&&HS(e,s,i)){a=s+1;break}}return a}function vne(e,t){return z0(e,t)===e.mask.length}function Lu(e,t){var n=e.maskChar,r=e.mask,a=e.prefix;if(!n){for((t=rM(e,"",t,0)).length<a.length&&(t=a);t.length<r.length&&rl(e,t.length);)t+=r[t.length];return t}if(t)return rM(e,Lu(e,""),t,0);for(var s=0;s<r.length;s++)rl(e,s)?t+=r[s]:t+=n;return t}function Kje(e,t,n,r){var a=n+r,s=e.maskChar,i=e.mask,l=e.prefix,c=t.split("");
1949if(s)return c.map(function(d,f){return f<n||a<=f?d:rl(e,f)?i[f]:s}).join("");for(var u=a;u<c.length;u++)rl(e,u)&&(c[u]="");return n=Math.max(l.length,n),c.splice(n,a-n),t=c.join(""),Lu(e,t)}function rM(e,t,n,r){var a=e.mask,s=e.maskChar,i=e.prefix,l=n.split(""),c=vne(e,t);return!s&&r>t.length&&(t+=a.slice(t.length,r)),l.every(function(u){for(;h=u,rl(e,m=r)&&h!==a[m];){if(r>=t.length&&(t+=a[r]),d=u,f=r,s&&rl(e,f)&&d===s)return!0;if(++r>=a.length)return!1}var d,f,m,h;return!HS(e,r,u)&&u!==s||(r<t.length?t=s||c||r<i.length?t.slice(0,r)+u+t.slice(r+1):(t=t.slice(0,r)+u+t.slice(r),Lu(e,t)):s||(t+=u),++r<a.length)}),t}function Zje(e,t,n,r){var a=e.mask,s=e.maskChar,i=n.split(""),l=r;return i.every(function(c){for(;d=c,rl(e,u=r)&&d!==a[u];)if(++r>=a.length)return!1;var u,d;return(HS(e,r,c)||c===s)&&r++,r<a.length}),r-l}function Xje(e,t){for(var n=t;0<=n;--n)if(!rl(e,n))return n;return null}function vv(e,t){for(var n=e.mask,r=t;r<n.length;++r)if(!rl(e,r))return r;return null}function AN(e){return e||e===0?e+"":""}function Qje(e,t,n,r,a){var s=e.mask,i=e.prefix,l=e.lastEditablePosition,c=t,u="",d=0,f=0,m=Math.min(a.start,n.start);return n.end>a.start?f=(d=Zje(e,r,u=c.slice(a.start,n.end),m))?a.length:0:c.length<r.length&&(f=r.length-c.length),c=r,f&&(f===1&&!a.length&&(m=a.start===n.start?vv(e,n.start):Xje(e,n.start)),c=Kje(e,c,m,f)),c=rM(e,c,u,m),(m+=d)>=s.length?m=s.length:m<i.length&&!d?m=i.length:m>=i.length&&m<l&&d&&(m=vv(e,m)),u||(u=null),{value:c=Lu(e,c),enteredString:u,selection:{start:m,end:m}}}function Jje(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}function so(e){return typeof e=="function"}function eWe(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function yne(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function Iz(e){return(yne()?eWe():function(){return setTimeout(e,1e3/60)})(e)}function IN(e){(yne()||clearTimeout)(e)}var tWe=function(e){function t(r){var a=e.call(this,r)||this;a.focused=!1,a.mounted=!1,a.previousSelection=null,a.selectionDeferId=null,a.saveSelectionLoopDeferId=null,a.saveSelectionLoop=function(){a.previousSelection=a.getSelection(),a.saveSelectionLoopDeferId=Iz(a.saveSelectionLoop)},a.runSaveSelectionLoop=function(){a.saveSelectionLoopDeferId===null&&a.saveSelectionLoop()},a.stopSaveSelectionLoop=function(){a.saveSelectionLoopDeferId!==null&&(IN(a.saveSelectionLoopDeferId),a.saveSelectionLoopDeferId=null,a.previousSelection=null)},a.getInputDOMNode=function(){if(!a.mounted)return null;var g=Vje.findDOMNode(dh(dh(a))),v=typeof window<"u"&&g instanceof window.Element;if(g&&!v)return null;if(g.nodeName!=="INPUT"&&(g=g.querySelector("input")),!g)throw new Error("react-input-mask: inputComponent doesn't contain input node");return g},a.getInputValue=function(){var g=a.getInputDOMNode();return g?g.value:null},a.setInputValue=function(g){var v=a.getInputDOMNode();v&&(a.value=g,v.value=g)},a.setCursorToEnd=function(){var g=z0(a.maskOptions,a.value),v=vv(a.maskOptions,g);v!==null&&a.setCursorPosition(v)},a.setSelection=function(g,v,y){y===void 0&&(y={});var b=a.getInputDOMNode(),E=a.isFocused();b&&E&&(y.deferred||Rz(b,g,v),a.selectionDeferId!==null&&IN(a.selectionDeferId),a.selectionDeferId=Iz(function(){a.selectionDeferId=null,Rz(b,g,v)}),a.previousSelection={start:g,end:v,length:Math.abs(v-g)})},a.getSelection=function(){return Gje(a.getInputDOMNode())},a.getCursorPosition=function(){return a.getSelection().start},a.setCursorPosition=function(g){a.setSelection(g,g)},a.isFocused=function(){return a.focused},a.getBeforeMaskedValueChangeConfig=function(){var g=a.maskOptions,v=g.mask,y=g.maskChar,b=g.permanents,E=g.formatChars;return{mask:v,maskChar:y,permanents:b,alwaysShowMask:!!a.props.alwaysShowMask,formatChars:E}},a.isInputAutofilled=function(g,v,y,b){var E=a.getInputDOMNode();try{if(E.matches(":-webkit-autofill"))return!0}catch{}return!a.focused||b.end<y.length&&v.end===g.length},a.onChange=function(g){var v=dh(dh(a)).beforePasteState,y=dh(dh(a)).previousSelection,b=a.props.beforeMaskedValueChange,E=a.getInputValue(),w=a.value,x=a.getSelection();a.isInputAutofilled(E,x,w,y)&&(w=Lu(a.maskOptions,""),y={start:0,end:0,length:0}),v&&(y=v.selection,w=v.value,x={start:y.start+E.length,end:y.start+E.length,length:0},E=w.slice(0,y.start)+E+w.slice(y.end),a.beforePasteState=null);var S=Qje(a.maskOptions,E,x,w,y),N=S.enteredString,k=S.selection,C=S.value;if(so(b)){var A=b({value:C,selection:k},{value:w,selection:y},N,a.getBeforeMaskedValueChangeConfig());C=A.value,k=A.selection}a.setInputValue(C),so(a.props.onChange)&&a.props.onChange(g),a.isWindowsPhoneBrowser?a.setSelection(k.start,k.end,{deferred:!0}
1949):a.setSelection(k.start,k.end)},a.onFocus=function(g){var v=a.props.beforeMaskedValueChange,y=a.maskOptions,b=y.mask,E=y.prefix;if(a.focused=!0,a.mounted=!0,b){if(a.value)z0(a.maskOptions,a.value)<a.maskOptions.mask.length&&a.setCursorToEnd();else{var w=Lu(a.maskOptions,E),x=Lu(a.maskOptions,w),S=z0(a.maskOptions,x),N=vv(a.maskOptions,S),k={start:N,end:N};if(so(v)){var C=v({value:x,selection:k},{value:a.value,selection:null},null,a.getBeforeMaskedValueChangeConfig());x=C.value,k=C.selection}var A=x!==a.getInputValue();A&&a.setInputValue(x),A&&so(a.props.onChange)&&a.props.onChange(g),a.setSelection(k.start,k.end)}a.runSaveSelectionLoop()}so(a.props.onFocus)&&a.props.onFocus(g)},a.onBlur=function(g){var v=a.props.beforeMaskedValueChange,y=a.maskOptions.mask;if(a.stopSaveSelectionLoop(),a.focused=!1,y&&!a.props.alwaysShowMask&&Az(a.maskOptions,a.value)){var b="";so(v)&&(b=v({value:b,selection:null},{value:a.value,selection:a.previousSelection},null,a.getBeforeMaskedValueChangeConfig()).value);var E=b!==a.getInputValue();E&&a.setInputValue(b),E&&so(a.props.onChange)&&a.props.onChange(g)}so(a.props.onBlur)&&a.props.onBlur(g)},a.onMouseDown=function(g){if(!a.focused&&document.addEventListener){a.mouseDownX=g.clientX,a.mouseDownY=g.clientY,a.mouseDownTime=new Date().getTime();var v=function y(b){if(document.removeEventListener("mouseup",y),a.focused){var E=Math.abs(b.clientX-a.mouseDownX),w=Math.abs(b.clientY-a.mouseDownY),x=Math.max(E,w),S=new Date().getTime()-a.mouseDownTime;(x<=10&&S<=200||x<=5&&S<=300)&&a.setCursorToEnd()}};document.addEventListener("mouseup",v)}so(a.props.onMouseDown)&&a.props.onMouseDown(g)},a.onPaste=function(g){so(a.props.onPaste)&&a.props.onPaste(g),g.defaultPrevented||(a.beforePasteState={value:a.getInputValue(),selection:a.getSelection()},a.setInputValue(""))},a.handleRef=function(g){a.props.children==null&&so(a.props.inputRef)&&a.props.inputRef(g)};var s=r.mask,i=r.maskChar,l=r.formatChars,c=r.alwaysShowMask,u=r.beforeMaskedValueChange,d=r.defaultValue,f=r.value;a.maskOptions=Tz(s,i,l),d==null&&(d=""),f==null&&(f=d);var m=AN(f);if(a.maskOptions.mask&&(c||m)&&(m=Lu(a.maskOptions,m),so(u))){var h=r.value;r.value==null&&(h=d),m=u({value:m,selection:null},{value:h=AN(h),selection:null},null,a.getBeforeMaskedValueChangeConfig()).value}return a.value=m,a}Bje(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=Jje(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},n.componentDidUpdate=function(){var r=this.previousSelection,a=this.props,s=a.beforeMaskedValueChange,i=a.alwaysShowMask,l=a.mask,c=a.maskChar,u=a.formatChars,d=this.maskOptions,f=i||this.isFocused(),m=this.props.value!=null,h=m?AN(this.props.value):this.value,g=r?r.start:null;if(this.maskOptions=Tz(l,c,u),this.maskOptions.mask){!d.mask&&this.isFocused()&&this.runSaveSelectionLoop();var v=this.maskOptions.mask&&this.maskOptions.mask!==d.mask;if(d.mask||m||(h=this.getInputValue()),(v||this.maskOptions.mask&&(h||f))&&(h=Lu(this.maskOptions,h)),v){var y=z0(this.maskOptions,h);(g===null||y<g)&&(g=vne(this.maskOptions,h)?y:vv(this.maskOptions,y))}!this.maskOptions.mask||!Az(this.maskOptions,h)||f||m&&this.props.value||(h="");var b={start:g,end:g};if(so(s)){var E=s({value:h,selection:b},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());h=E.value,b=E.selection}this.value=h;var w=this.getInputValue()!==this.value;w?(this.setInputValue(this.value),this.forceUpdate()):v&&this.forceUpdate();var x=!1;b.start!=null&&b.end!=null&&(x=!r||r.start!==b.start||r.end!==b.end),(x||w)&&this.setSelection(b.start,b.end)}else d.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},n.componentWillUnmount=function(){this.mounted=!1,this.selectionDeferId!==null&&IN(this.selectionDeferId),this.stopSaveSelectionLoop()},n.render=function(){var r,a=this.props,s=(a.mask,a.alwaysShowMask,a.maskChar,a.formatChars,a.inputRef,a.beforeMaskedValueChange,a.children),i=jje(a,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(s){so(s)||Nz(!1);var l=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],c=nM({},i);l.forEach(function(d){return delete c[d]}),r=s(c),l.filter(function(d){return r.props[d]!=null&&r.props[d]!==i[d]}).length&&Nz(!1)}else r=TN.createElement("input",nM({ref:this.handleRef},i));
1949var u={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(i.disabled||i.readOnly||(u.onChange=this.onChange,u.onPaste=this.onPaste,u.onMouseDown=this.onMouseDown),i.value!=null&&(u.value=this.value)),r=TN.cloneElement(r,u)},t}(TN.Component),nWe=tWe;gne.exports=nWe;var rWe=gne.exports;const aWe=id(rWe),sWe=Ts(),iWe=Ir(xr()),oWe=()=>{var y,b;const[e,t]=p.useState(""),[n,r]=p.useState(0),a=Wn(E=>{var w;return(w=E==null?void 0:E.FB)==null?void 0:w.auth});p.useEffect(()=>{ea.ping(Ze("users-self-manage-edit"))},[]);const s=()=>{re.dispatch("interstitial-run","on"),Ep(xp(sWe,"Users_General",a.user.uid)).then(E=>{var w,x,S,N,k,C,A;if(E.exists()){let O=(S=(x=(w=E.data())==null?void 0:w.writable)==null?void 0:x.set)==null?void 0:S.personal_data;t(((N=O==null?void 0:O.email_address)==null?void 0:N.contact)||""),l({firstName:((k=O==null?void 0:O.full_name)==null?void 0:k.first)||"",lastName:((C=O==null?void 0:O.full_name)==null?void 0:C.last)||"",phoneNumber:((A=O==null?void 0:O.phone_number)==null?void 0:A.contact)||""})}re.dispatch("interstitial-run","off")}).catch(E=>{console.error("errorItem",E),re.dispatch("interstitial-run","off")})};p.useEffect(()=>{var E;(E=a==null?void 0:a.user)!=null&&E.uid&&s()},[n,(y=a==null?void 0:a.user)==null?void 0:y.uid]);const{handleSubmit:i,reset:l,register:c,watch:u,formState:{errors:d,isDirty:f}}=fc({defaultValues:{emailAddress:"",firstName:"",lastName:"",phoneNumber:""}}),m=u("firstName"),h=u("lastName"),g=String(m??"").trim()!==""&&String(h??"").trim()!=="";let v=o.createElement(sf,{className:"app-content"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("h1",{className:"mb-1 text-center text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark__text"},"Profile Info"),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("form",{className:"space-y-4",onSubmit:i(E=>{re.dispatch("interstitial-run","on"),pt(iWe,Ze("users-self-manage-edit"))({firstName:E.firstName,lastName:E.lastName,phoneNumber:E.phoneNumber.replace(/\D/g,"")}).then(({data:w})=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:"You have successfully updated your profile settings!",intent:"success"}),r(n+1)}).catch(w=>{console.error("errorItem",w),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:w.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})})},o.createElement("div",{className:"flex items-center gap-2 mt-2"},o.createElement("label",{className:"m-0"},"Account"),o.createElement("span",{className:"dark__text cursor-pointer hover:opacity-70 transition-opacity",title:"Click to copy",onClick:()=>{var E;navigator.clipboard.writeText((E=a==null?void 0:a.user)==null?void 0:E.email).then(()=>{re.dispatch("trigger-alert",{message:"Email copied to clipboard!",intent:"success"})})}},(b=a==null?void 0:a.user)==null?void 0:b.email)),o.createElement("div",null,o.createElement("label",null,"First Name",o.createElement("input",{type:"text",maxLength:50,...c("firstName",{required:"Please enter your first name.",maxLength:{value:50,message:"First name must be at most 50 characters."}})})),d.firstName&&o.createElement("span",{className:"error text-left"},d.firstName.message)),o.createElement("div",null,o.createElement("label",null,"Last Name",o.createElement("input",{type:"text",maxLength:50,...c("lastName",{required:"Please enter your last name.",maxLength:{value:50,message:"Last name must be at most 50 characters."}})})),d.lastName&&o.createElement("span",{className:"error text-left"},d.lastName.message)),o.createElement("div",null,o.createElement("label",null,"Contact Phone Number",o.createElement(aWe,{mask:"(999) 999-9999",maskChar:"_",...c("phoneNumber",{})})),d.phoneNumber&&o.createElement("span",{className:"error text-left"},d.phoneNumber.message)),o.createElement("div",null,o.createElement("button",{type:"submit",disabled:!f||!g,className:"w-full text-white bg-primary rounded-sm text-sm px-5 py-2 text-center dark:bg-primary-600 dark:hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed"},"Update"))))));return a!=null&&a.user?v:o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto
1949sm:pt-6 md:pt-8 lg:pt-10"},"You are not logged in.")};async function lWe(){Ki.currentUser&&await Ki.currentUser.getIdToken(!0)}const ON=2e4;function bne({className:e="",showIntro:t=!0,onSuccess:n}){const[r,a]=p.useState(""),[s,i]=p.useState(""),[l,c]=p.useState(!1);async function u(){const d=s.trim();if(!d){Qr.error("Please enter a message.");return}if(d.length>ON){Qr.error(`Message must be at most ${ON} characters.`);return}c(!0),await lWe();try{const{data:f}=await pt(Cl,Ze("users-support-sendMessage"))({subject:r.trim()||void 0,text:d,_brandKey:"bookmark.it.com"});Qr.success("Message sent. We will get back to you by email."),a(""),i(""),n==null||n(),f!=null&&f.resendOutboundId&&f.resendOutboundId}catch(f){console.error("[SupportMessageForm] send",f),Qr.error((f==null?void 0:f.message)||"Could not send your message. Please try again.")}finally{c(!1)}}return o.createElement("div",{className:`support-message-form space-y-4 text-left ${e}`.trim()},o.createElement("label",{className:"block text-sm mb-2 support-message-form__subject"},o.createElement("span",{className:"flex items-center justify-between"},o.createElement("span",{className:"text-gray-900 dark:text-gray-100"},"Subject (optional)"),!1),o.createElement("input",{type:"text",className:"mt-1 w-full focus:outline-none focus:ring-0 focus:bg-white dark:bg-white dark:text-gray-900",value:r,onChange:d=>a(d.target.value),disabled:l,maxLength:500})),o.createElement("label",{className:"block text-sm mb-3 support-message-form__message"},o.createElement(RT,{fill:!0,className:"border-spacing-1 border-gray-200 !shadow-none support-message-form__textarea dark:bg-white dark:text-gray-900",rows:6,value:s,onChange:d=>i(d.target.value),disabled:l,maxLength:ON,placeholder:"How can we help?"})),o.createElement("div",{className:"flex gap-2 items-center justify-between support-message-form__footer"},t?o.createElement("p",{className:`text-sm pl-1 text-xs ${Xj}`},"We will use your account email for replies."):null,o.createElement(De,{intent:jr.PRIMARY,text:"Send",loading:l,disabled:l||!s.trim(),onClick:()=>void u()})))}const cWe=()=>{var a;const e=yr(),t=Wn(s=>{var i;return(i=s==null?void 0:s.FB)==null?void 0:i.auth}),n=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg text-center"},o.createElement("h1",{className:"mb-1 text-center text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark__text"},"Support"),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("div",{className:"support-page-message-form"},o.createElement(bne,null))),o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg text-center"},o.createElement("div",{className:"space-y-2 my-4"},o.createElement("p",null,"Email ",za.supportEmail,"."),o.createElement("p",null,o.createElement("a",{className:"leading-6 text-indigo-600 hover:text-indigo-500",onClick:()=>{e("/terms")}},"Terms & Conditions")),o.createElement("p",null,o.createElement("a",{className:"leading-6 text-indigo-600 hover:text-indigo-500",onClick:()=>{e("/privacy")}},"Privacy Policy")),o.createElement("p",{className:"flex flex-col gap-1"},o.createElement("span",{className:"opacity-50"},"Copyright ",za.name," ",new Date().getFullYear(),". Version"," ","4.3.0",".")),["dev","qa"].includes("production")?o.createElement(o.Fragment,null,o.createElement("p",{className:"flex flex-col gap-1 opacity-50"},o.createElement("span",{className:"opacity-50"},"Release: ","10/1/2026, 3:58:44 PM"),o.createElement("span",{className:"opacity-50 font-mono text-[10px]"},"ID: ","17908953730"))):null))),r=o.createElement("p",null);return(a=t==null?void 0:t.user)!=null&&a.email?n:r},Yt=xW(),uWe=`${Yt}-table-body-cells`,dWe=`${Yt}-table-body-scrolling-indicator-overlay`,fWe=`${Yt}-table-body-is-scrolling-top`,mWe=`${Yt}-table-body-is-scrolling-bottom`,hWe=`${Yt}-table-body-is-scrolling-right`,pWe=`${Yt}-table-body-is-scrolling-left`,gWe=`${Yt}-table-body-virtual-client`,vWe=`${Yt}-table-bottom-container`,wne=`${Yt}-table-cell`,yWe=`${Yt}-table-cell-client`,bWe=`${Yt}-table-cell-ghost`,wWe=`${Yt}-table-cell-interactive`,EWe=`${Yt}-table-cell-ledger-even`,xWe=`${Yt}-table-cell-ledger-odd`,_We=`${Yt}-table-column-header-tr`,kWe=`${Yt}-table-column-headers`,SWe=`${Yt}-table-column-header-cell`,MN=`${Yt}-table-column-name`,Oz=`${Yt}-table-column-name-text`,CWe=`${Yt}-table-container`,Mz=`${Yt}-table-dragging`,NWe=`${Yt}-table-editable-name`,Pz=`${Yt}-table-editable-text`,RWe=`${Yt}-table-focus-region`,TWe=`${Yt}-table-has-interaction-bar`,AWe=`${Yt}-table-has-reorder-handle`,Ene=`${Yt}-table-header`,IWe=`${Yt}-table-header-active`,Dz=`${Yt}-table-header-content`,OWe=`${Yt}-table-header-reorderable`,MWe=`${Yt}-table-header-selected`,PWe=`${Yt}-table-horizontal-cell-divider`,Lz=`${Yt}-table-horizontal-guide`,$z=`${Yt}-table-interaction-bar`,Fz=`${Yt}-table-last-in-column`,zz=`${Yt}-table-last-in-row`,DWe=`${Yt}-table-menu`,LWe=`${Yt}-table-no-horizontal-scroll`,$We=`${Yt}-table-no-rows`,FWe=`${Yt}-table-no-vertical-scroll`,xne=`${Yt}-table-no-wrap-text`,zWe=`${Yt}-table-null`,aM=`${Yt}-table-overlay`,G4=`${Yt}-table-overlay-layer`,HWe=`${Yt}-table-reordering-cursor-overlay`,VWe=`${Yt}-table-popover-whitespace-normal`,UWe=`${Yt}-table-popover-whitespace-pre`,BWe=`${Yt}-table-quadrant`,jWe=`${Yt}-table-quadrant-body-container`,_ne=`${Yt}-table-quadrant-left`,kne=`${Yt}-table-quadrant-main`,WWe=`${Yt}-table-quadrant-scroll-container`,GWe=`${Yt}-table-quadrant-stack`,qWe=`${Yt}-table-quadrant-top`,YWe=`${Yt}-table-quadrant-top-left`,KWe=`${Yt}-table-region`,ZWe=`${Yt}-table-reorder-handle`,Hz=`${Yt}-table-reorder-handle-target`,XWe=`${Yt}-table-reordering`,QWe=`${Yt}-table-resize-guides`,JWe=`${Yt}-table-resize-handle`,eGe=`${Yt}-table-resize-handle-target`,tGe=`${Yt}-table-resize-horizontal`,nGe=`${Yt}-table-resize-sensor`,rGe=`${Yt}-table-resize-sensor-expand`,aGe=`${Yt}-table-resize-sensor-shrink`,sGe=`${Yt}-table-resize-vertical`,iGe=`${Yt}-table-row-headers`,oGe=`${Yt}-table-row-headers-cells-container`,lGe=`${Yt}-table-row-name`,cGe=`${Yt}-table-row-name-text`,sw=`${Yt}-table-selection-enabled`,uGe=`${Yt}-table-selection-region`,dGe=`${Yt}-table-th-menu`,Sne=`${Yt}-table-th-menu-container`,fGe=`${Yt}-table-th-menu-container-background`,mGe=`${Yt}-table-th-menu-open`,Cne=`${Yt}-table-th-menu-select-cells`,hGe=`${Yt}-table-thead`,pGe=`${Yt}-table-top-container`,gGe=`${Yt}-table-truncated-cell`,vGe=`${Yt}-table-truncated-format`,Nne=`${Yt}-table-truncated-format-text`,sM=`${Yt}-table-truncated-popover`,Vz=`${Yt}-table-truncated-popover-target`,VS=`${Yt}-table-truncated-text`,Rne=`${Yt}-table-truncated-value`,Uz=`${Yt}-table-vertical-guide`;function US(e,t){return typeof t=="number"?`${e}${t}`:t.indexOf(e)===0?t:`${e}${t}`}function Bz(e){return US(`${Yt}-table-col-`,e)}
1949function jz(e){return US(`${Yt}-table-row-`,e)}function q4(e){return US(`${Yt}-table-cell-col-`,e)}function Tne(e){return US(`${Yt}-table-cell-row-`,e)}class Y4 extends p.PureComponent{constructor(n){super(n);G(this,"style");this.style=this.calculateStyle(n.variableLength)}componentDidUpdate(n){(!n.loading&&this.props.loading||n.variableLength!==this.props.variableLength)&&(this.style=this.calculateStyle(this.props.variableLength))}render(){return this.props.loading?F.jsx("div",{className:Q0,style:this.style}):p.Children.only(this.props.children)}calculateStyle(n=!1){return{width:`${n?75-Math.floor(Math.random()*11)*5:100}%`}}}const K4="bp-table-text-no-measure",yGe=Nt.STANDARD,bGe=["font-style","font-variant","font-weight","font-size","font-family"],Fr={times(e,t){if(e<0)throw new Error("[Blueprint] times() cannot be called with negative numbers.");const n=Array(e);for(let r=0;r<e;r++)n[r]=t(r);return n},accumulate(e){const t=[];let n=0;for(const r of e)n+=r,t.push(n);return t},toBase26Alpha:e=>{let t="";for(;;){const n=e%26;if(t=String.fromCharCode(65+n)+t,e=e-n,e<=0)return t;e=e/26-1}},toBase26CellName:(e,t)=>`${Fr.toBase26Alpha(t)}${e+1}`,binarySearch(e,t,n){let r=0;for(;r<t;){const a=Math.floor((r+t)/2);n(a)<e?r=a+1:t=a}return t},assignSparseValues(e,t){if(t==null||e.length!==t.length)return e;e=e.slice();for(let n=0;n<e.length;n++){const r=t[n];r!=null&&(e[n]=r)}return e},measureElementTextContent(e){const t=document.createElement("canvas").getContext("2d"),n=getComputedStyle(e,null);return t.font=bGe.map(r=>n.getPropertyValue(r)).join(" "),wGe(t,e)},clamp(e,t,n){return t!=null&&e<t&&(e=t),n!=null&&e>n&&(e=n),e},guideIndexToReorderedIndex(e,t,n){return t<e?t:e<=t&&t<e+n?e:Math.max(0,t-n)},reorderedIndexToGuideIndex(e,t,n){return t<=e?t:t+n},reorderArray(e,t,n,r=1){if(r===0||r===e.length||t===n)return e.slice();if(r<0||r>e.length||t+r>e.length)return;const a=e.slice(0,t),s=e.slice(t,t+r),i=e.slice(t+r),l=[];let c=0,u=0,d=0,f=0;for(;c<n;)u<a.length?(l.push(a[u]),u+=1):(l.push(i[f]),f+=1),c+=1;for(;d<r;)l.push(s[d]),d+=1,c+=1;for(;c<e.length;)u<a.length?(l.push(a[u]),u+=1):(l.push(i[f]),f+=1),c+=1;return l},isLeftClick(e){return e.button===0},getApproxCellHeight(e,t,n,r,a,s){const i=e==null?0:e.length,u=(t-a)/n;return(Math.ceil(i/u)+s)*r},compareSparseArrays(e,t){return e!==void 0&&t!==void 0&&e.length===t.length&&e.every((n,r)=>n===t[r])}};function wGe(e,t){const n=t.querySelectorAll(`.${K4}`);let r=0;n&&n.length&&n.forEach(i=>{const l=e.measureText(i.textContent??"");r+=l.width-yGe});const a=e.measureText(t.textContent??"");return{...a,width:a.width-r}}var na;(function(e){e.CELL="cell",e.ROW="row"})(na||(na={}));var bn;(function(e){e.CELLS="cells",e.FULL_ROWS="full-rows",e.FULL_COLUMNS="full-columns",e.FULL_TABLE="full-table"})(bn||(bn={}));const EGe={ALL:[bn.FULL_TABLE,bn.FULL_COLUMNS,bn.FULL_ROWS,bn.CELLS],COLUMNS_AND_CELLS:[bn.FULL_COLUMNS,bn.CELLS],COLUMNS_ONLY:[bn.FULL_COLUMNS],NONE:[],ROWS_AND_CELLS:[bn.FULL_ROWS,bn.CELLS],ROWS_ONLY:[bn.FULL_ROWS]};var c_;(function(e){e.CELLS="cells",e.HEADER="column-header"})(c_||(c_={}));var Wz;(function(e){e.CELLS="cells",e.HEADER="row-header"})(Wz||(Wz={}));var Nu;(function(e){e.CELLS="cells",e.COLUMN_HEADERS="column-header",e.ROW_HEADERS="row-header"})(Nu||(Nu={}));class Ot{static getRegionCardinality(t){return t.cols!=null&&t.rows!=null?bn.CELLS:t.cols!=null?bn.FULL_COLUMNS:t.rows!=null?bn.FULL_ROWS:bn.FULL_TABLE}static getFocusCellCoordinatesFromRegion(t){switch(Ot.getRegionCardinality(t)){case bn.FULL_TABLE:return{col:0,row:0};case bn.FULL_COLUMNS:return{col:t.cols[0],row:0};case bn.FULL_ROWS:return{col:0,row:t.rows[0]};case bn.CELLS:return{col:t.cols[0],row:t.rows[0]}}}static copy(t){const n=Ot.getRegionCardinality(t);return n===bn.CELLS?Ot.cell(t.rows[0],t.cols[0],t.rows[1],t.cols[1]):n===bn.FULL_COLUMNS?Ot.column(t.cols[0],t.cols[1]):n===bn.FULL_ROWS?Ot.row(t.rows[0],t.rows[1]):Ot.table()}static cell(t,n,r,a){return{cols:this.normalizeInterval(n,a),rows:this.normalizeInterval(t,r)}}static row(t,n){return{rows:this.normalizeInterval(t,n)}}static column(t,n){return{cols:this.normalizeInterval(t,n)}}static table(){return{}}static add(t,n){const r=t.slice();return r.push(n),r}static update(t,n,r){const a=t.slice();return r!=null?a.splice(r,1,n):(a.pop(),a.push(n)),a}static clampRegion(t,n,r){const a=Ot.copy(t);return t.rows!=null&&(a.rows[0]=Fr.clamp(t.rows[0],0,n),a.rows[1]=Fr.clamp(t.rows[1],0,n)),t.cols!=null&&(a.cols[0]=Fr.clamp(t.cols[0],0,r),a.cols[1]=Fr.clamp(t.cols[1],0,r)),a}static lastRegionIsEqual(t,n){if(t==null||t.length===0)return!1;const r=t[t.length-1];return Ot.regionsEqual(r,n)}static findMatchingRegion(t,n){if(t==null)return-1;for(let r=0;r<t.length;r++)if(Ot.regionsEqual(t[r],n))return r;return-1}static findContainingRegion(t,n){if(t==null)return-1;for(let r=0;r<t.length;r++)if(Ot.regionContains(t[r],n))return r;return-1}
1949static hasFullColumn(t,n){if(t==null)return!1;for(const r of t){const a=Ot.getRegionCardinality(r);if(a===bn.FULL_TABLE||a===bn.FULL_COLUMNS&&Ot.intervalContainsIndex(r.cols,n))return!0}return!1}static hasFullRow(t,n){if(t==null)return!1;for(const r of t){const a=Ot.getRegionCardinality(r);if(a===bn.FULL_TABLE||a===bn.FULL_ROWS&&Ot.intervalContainsIndex(r.rows,n))return!0}return!1}static hasFullTable(t){if(t==null)return!1;for(const n of t)if(Ot.getRegionCardinality(n)===bn.FULL_TABLE)return!0;return!1}static containsRegion(t,n){return Ot.overlapsRegion(t,n,!1)}static overlapsRegion(t,n,r=!1){const a=r?Ot.intervalOverlaps:Ot.intervalContains;if(t==null||n==null)return!1;for(const s of t)switch(Ot.getRegionCardinality(s)){case bn.FULL_TABLE:return!0;case bn.FULL_COLUMNS:if(a(s.cols,n.cols))return!0;continue;case bn.FULL_ROWS:if(a(s.rows,n.rows))return!0;continue;case bn.CELLS:if(a(s.cols,n.cols)&&a(s.rows,n.rows))return!0;continue}return!1}static eachUniqueFullColumn(t,n){if(t==null||t.length===0||n==null)return;const r={};t.forEach(a=>{if(Ot.getRegionCardinality(a)===bn.FULL_COLUMNS){const[s,i]=a.cols;if(!isFinite(i))return;for(let l=s;l<=i;l++)r[l]||(r[l]=!0,n(l))}})}static eachUniqueFullRow(t,n){if(t==null||t.length===0||n==null)return;const r={};t.forEach(a=>{if(Ot.getRegionCardinality(a)===bn.FULL_ROWS){const[s,i]=a.rows;if(!isFinite(i))return;for(let l=s;l<=i;l++)r[l]||(r[l]=!0,n(l))}})}static enumerateUniqueCells(t,n,r){if(t==null||t.length===0)return[];const a={},s=[];for(const i of t)Ot.eachCellInRegion(i,n,r,(l,c)=>{const u=`${l}-${c}`;a[u]!==!0&&(a[u]=!0,s.push([l,c]))});return s.sort(Ot.rowFirstComparator),s}static getCellRegionFromRegion(t,n,r){switch(Ot.getRegionCardinality(t)){case bn.FULL_TABLE:return Ot.cell(0,0,n-1,r-1);case bn.FULL_COLUMNS:return Ot.cell(0,t.cols[0],n-1,t.cols[1]);case bn.FULL_ROWS:return Ot.cell(t.rows[0],0,t.rows[1],r-1);case bn.CELLS:return Ot.cell(t.rows[0],t.cols[0],t.rows[1],t.cols[1])}}static getRegionFromFocusedRegion(t){switch(t.type){case na.CELL:return Ot.cell(t.row,t.col);case na.ROW:return Ot.row(t.row)}}static sparseMapCells(t,n){const r=Ot.getBoundingRegion(t);if(r===void 0)return;
1949const a=r.rows[1]+1-r.rows[0],s=r.cols[1]+1-r.cols[0],i=Fr.times(a,()=>new Array(s));return t.forEach(([l,c])=>{i[l-r.rows[0]][c-r.cols[0]]=n(l,c)}),i}static getBoundingRegion(t){let n,r,a,s;for(const[i,l]of t)n=n===void 0||i<n?i:n,r=r===void 0||i>r?i:r,a=a===void 0||l<a?l:a,s=s===void 0||l>s?l:s;if(!(n===void 0||r===void 0||a===void 0||s===void 0))return{cols:[a,s],rows:[n,r]}}static isValid(t){return!(t==null||t.rows!=null&&(t.rows[0]<0||t.rows[1]<0)||t.cols!=null&&(t.cols[0]<0||t.cols[1]<0))}static isRegionValidForTable(t,n,r){return n===0||r===0||t.rows!=null&&!Gz(t.rows,0,n-1)?!1:!(t.cols!=null&&!Gz(t.cols,0,r-1))}static joinStyledRegionGroups(t,n,r){const a=r==null?void 0:"type"in r?r:{...r,type:na.CELL};let s=[];return n!=null&&(s=s.concat(n)),t!=null&&t.length>0&&s.push({className:uGe,regions:t}),a!==void 0&&s.push({className:RWe,regions:[Ot.getRegionFromFocusedRegion(a)]}),s}static regionsEqual(t,n){return Ot.intervalsEqual(t.rows,n.rows)&&Ot.intervalsEqual(t.cols,n.cols)}static expandRegion(t,n){const r=Ot.getRegionCardinality(t),a=Ot.getRegionCardinality(n);if(a!==r)return n;switch(a){case bn.FULL_ROWS:{const s=Math.min(t.rows[0],n.rows[0]),i=Math.max(t.rows[1],n.rows[1]);return Ot.row(s,i)}case bn.FULL_COLUMNS:{const s=Math.min(t.cols[0],n.cols[0]),i=Math.max(t.cols[1],n.cols[1]);return Ot.column(s,i)}case bn.CELLS:{const s=Math.min(t.rows[0],n.rows[0]),i=Math.min(t.cols[0],n.cols[0]),l=Math.max(t.rows[1],n.rows[1]),c=Math.max(t.cols[1],n.cols[1]);return Ot.cell(s,i,l,c)}default:return Ot.table()}}static eachCellInRegion(t,n,r,a){switch(Ot.getRegionCardinality(t)){case bn.FULL_TABLE:for(let i=0;i<n;i++)for(let l=0;l<r;l++)a(i,l);break;case bn.FULL_COLUMNS:for(let i=0;i<n;i++)for(let l=t.cols[0];l<=t.cols[1];l++)a(i,l);break;case bn.FULL_ROWS:for(let i=t.rows[0];i<=t.rows[1];i++)for(let l=0;l<r;l++)a(i,l);break;case bn.CELLS:for(let i=t.rows[0];i<=t.rows[1];i++)for(let l=t.cols[0];l<=t.cols[1];l++)a(i,l);break}}static regionContains(t,n){return Ot.overlapsRegion([t],n,!1)}static intervalsEqual(t,n){return t==null?n==null:n==null?!1:t[0]===n[0]&&t[1]===n[1]}static intervalContainsIndex(t,n){return t==null?!1:t[0]<=n&&t[1]>=n}static intervalContains(t,n){return t==null||n==null?!1:t[0]<=n[0]&&n[1]<=t[1]}static intervalOverlaps(t,n){return!(t==null||n==null||t[1]<n[0]||t[0]>n[1])}static rowFirstComparator(t,n){const r=t[0]-n[0];return r===0?t[1]-n[1]:r}static numericalComparator(t,n){return t-n}static normalizeInterval(t,n){n==null&&(n=t);const r=[t,n];return r.sort(Ot.numericalComparator),r}}function Gz(e,t,n){return qz(e[0],t,n)&&qz(e[1],t,n)}function qz(e,t,n){return e>=t&&e<=n}const Di=class Di{constructor(t,n,r,a){G(this,"left");G(this,"top");G(this,"width");G(this,"height");this.left=t,this.top=n,this.width=r,this.height=a}static union(t,n){const r=Di.wrap(t),a=Di.wrap(n),s=Math.min(r.top,a.top),i=Math.min(r.left,a.left),l=Math.max(r.top+r.height,a.top+a.height),c=Math.max(r.left+r.width,a.left+a.width),u=l-s,d=c-i;return new Di(i,s,d,u)}static subtractOrigin(t,n){const r=Di.wrap(t),a=Di.wrap(n);return new Di(r.left-a.left,r.top-a.top,r.width,r.height)}static style(t){return{height:`${t.height}px`,left:`${t.left}px`,position:"absolute",top:`${t.top}px`,width:`${t.width}px`}}static wrap(t){return t instanceof Di?t:new Di(t.left,t.top,t.width,t.height)}subtractOrigin(t){return Di.subtractOrigin(this,t)}union(t){return Di.union(this,t)}style(){return Di.style(this)}sizeStyle(){return{height:`${this.height}px`,width:`${this.width}px`}}containsX(t){return t>=this.left&&t<=this.left+this.width}containsY(t){return t>=this.top&&t<=this.top+this.height}equals(t){return t!=null&&this.left===t.left&&this.top===t.top&&this.width===t.width&&this.height===t.height}};G(Di,"ORIGIN",new Di(0,0,0,0));let nc=Di;const vi=class vi{constructor(t,n,r=vi.DEFAULT_BLEED,a=vi.DEFAULT_GHOST_HEIGHT,s=vi.DEFAULT_GHOST_WIDTH){G(this,"numCols");G(this,"numRows");G(this,"bleed");G(this,"columnWidths");G(this,"rowHeights");G(this,"cumulativeColumnWidths");G(this,"cumulativeRowHeights");G(this,"ghostHeight");G(this,"ghostWidth");G(this,"getCumulativeWidthBefore",t=>t===0?0:this.getCumulativeWidthAt(t-1));G(this,"getCumulativeWidthAt",t=>this.numCols===0?this.ghostWidth*t:t>=this.numCols?this.cumulativeColumnWidths[this.numCols-1]+this.ghostWidth*(t-this.numCols+1):this.cumulativeColumnWidths[t]);G(this,"getCumulativeHeightBefore",t=>t===0?0:this.getCumulativeHeightAt(t-1));G(this,"getCumulativeHeightAt",t=>this.numRows===0?this.ghostHeight*t:t>=this.numRows?this.cumulativeRowHeights[this.numRows-1]+this.ghostHeight*(t-this.numRows+1):this.cumulativeRowHeights[t]);this.columnWidths=n,this.rowHeights=t,this.cumulativeColumnWidths=Fr.accumulate(n),this.cumulativeRowHeights=Fr.accumulate(t),this.numCols=n.length,this.numRows=t.length,this.bleed=r,this.ghostHeight=a,this.ghostWidth=s}getCellRect(t,n){const r=this.rowHeights[t],a=this.cumulativeRowHeights[t]-r,s=this.columnWidths[n],i=this.cumulativeColumnWidths[n]-s;return new nc(i,a,s,r)}getGhostCellRect(t,n){let r=0,a=0,s=0,i=0;return t>=this.rowHeights.length?(i=this.ghostHeight,a=this.getHeight()+this.ghostHeight*(t-this.numRows)):(i=this.rowHeights[t],a=this.cumulativeRowHeights[t]-i),n>=this.columnWidths.length?(s=this.ghostWidth,r=this.getWidth()+this.ghostWidth*(n-this.numCols)):(s=this.columnWidths[n],r=this.cumulativeColumnWidths[n]-s),new nc(r,a,s,i)}getRowRect(t){const n=this.rowHeights[t],r=this.cumulativeRowHeights[t]-n;return new nc(0,r,this.getWidth(),n)}getColumnRect(t){const n=this.columnWidths[t],r=this.cumulativeColumnWidths[t]-n;return new nc(r,0,n,this.getHeight())}getWidth(){return this.numCols===0?0:this.cumulativeColumnWidths[this.numCols-1]}getHeight(){return this.numRows===0?0:this.cumulativeRowHeights[this.numRows-1]}getRect(){return new nc(0,0,this.getWidth(),this.getHeight())}mapCellsInRect(t,n){const r=[];if(t==null)return r;const{rowIndexStart:a,rowIndexEnd:s}=this.getRowIndicesInRect({rect:t}),{columnIndexStart:i,columnIndexEnd:l}=this.getColumnIndicesInRect(t);for(let c=a;c<=s;c++)for(let u=i;u<=l;u++)r.push(n(c,u));return r}mapRowsInRect(t,n){const r=[];if(t==null)return r;const{rowIndexStart:a,rowIndexEnd:s}=this.getRowIndicesInRect({rect:t});for(let i=a;i<=s;i++)r.push(n(i));return r}mapColumnsInRect(t,n){const r=[];if(t==null)return r;const{columnIndexStart:a,columnIndexEnd:s}=this.getColumnIndicesInRect(t);for(let i=a;i<=s;i++)r.push(n(i));return r}getRowIndicesInRect(t){const{rect:n,includeGhostCells:r=!1,columnHeaderHeight:a=0,limit:s=vi.DEFAULT_MAX_ROWS}=t;if(n==null)return{rowIndexEnd:0,rowIndexStart:0};const i=r?Math.max(this.numRows,vi.DEFAULT_MAX_ROWS):this.numRows,{top:l=0,height:c}=n,{start:u,end:d}=this.getIndicesInInterval(l,l+(c-a),i,!r,this.getCumulativeHeightAt);return{rowIndexEnd:s>0&&d-u>s?u+s:d,rowIndexStart:u}}getColumnIndicesInRect(t,n=!1,r=vi.DEFAULT_MAX_COLUMNS){if(t==null)return{columnIndexEnd:0,columnIndexStart:0};const a=n?Math.max(this.numCols,vi.DEFAULT_MAX_COLUMNS):this.numCols,{left:s=0,width:i}=t,{start:l,end:c}=this.getIndicesInInterval(s,s+i,a,!n,this.getCumulativeWidthAt);return{columnIndexEnd:r>0&&c-l>r?l+r:c,columnIndexStart:l}}isGhostIndex(t,n){return t>=this.numRows||n>=this.numCols}isGhostColumn(t){return t>=this.numCols}getExtremaClasses(t,n,r,a){return t===r&&n===a?[Fz,zz]:t===r?[Fz]:n===a?[zz]:[]}getRegionStyle(t){switch(Ot.getRegionCardinality(t)){case bn.CELLS:{const[r,a]=t.rows,[s,i]=t.cols;if(this.isGhostIndex(r,s)||this.isGhostIndex(a,i))return{display:"none"};const l=this.getCellRect(r,s),c=this.getCellRect(a,i),u=s===0?0:1,d=r===0?0:1,f=l.union(c);return f.height+=d,f.left-=u,f.width+=u,f.top-=d,{...f.style(),display:"block"}}case bn.FULL_COLUMNS:{const[r,a]=t.cols;if(this.isGhostIndex(0,r)||this.isGhostIndex(0,a))return{display:"none"};const s=this.getCellRect(0,r),i=this.getCellRect(0,a),l=s.union(i),c=r===0?0:1;return{bottom:0,display:"block",left:l.left-c,top:0,width:l.width+c}}case bn.FULL_ROWS:{const[r,a]=t.rows;if(this.isGhostIndex(r,0)||this.isGhostIndex(a,0))return{display:"none"};const s=this.getCellRect(r,0),i=this.getCellRect(a,0),l=s.union(i),c=r===0?0:1;return{display:"block",height:l.height+c,left:0,right:0,top:l.top-c}}case bn.FULL_TABLE:return{bottom:0,display:"block",left:0,right:0,top:0};default:return{display:"none"}}}getIndicesInInterval(t,n,r,a,s){let i=Fr.binarySearch(t,r-1,s),l=Fr.binarySearch(n,r-1,s);return i>=0&&t===s(i)&&(i+=1),i=Math.max(0,i-this.bleed),a?l=Math.min(r-1,l+this.bleed):l=Math.min(r-1,l),{end:l,start:i}}};G(vi,"DEFAULT_BLEED",3),G(vi,"DEFAULT_MAX_COLUMNS",50),G(vi,"DEFAULT_MAX_ROWS",200),G(vi,"DEFAULT_GHOST_HEIGHT",20),G(vi,"DEFAULT_GHOST_WIDTH",150),G(vi,"MIN_COLUMN_HEADER_HEIGHT",30),G(vi,"MIN_ROW_HEADER_WIDTH",30);let bi=vi;const S_=class S_{constructor(t,n,r){G(this,"tableElement");
1949G(this,"scrollContainerElement");G(this,"cellContainerElement");G(this,"grid");G(this,"numFrozenRows");G(this,"numFrozenColumns");G(this,"convertCellIndexToClientX",t=>this.grid.getCumulativeWidthAt(t));G(this,"convertCellMidpointToClientX",t=>{const n=this.grid.getCumulativeWidthBefore(t),r=this.grid.getCumulativeWidthAt(t);return(n+r)/2});G(this,"convertCellIndexToClientY",t=>this.grid.getCumulativeHeightAt(t));G(this,"convertCellMidpointToClientY",t=>{const n=this.grid.getCumulativeHeightBefore(t),r=this.grid.getCumulativeHeightAt(t);return(n+r)/2});G(this,"toGridX",t=>{const n=this.cellContainerElement.getBoundingClientRect().left,r=this.scrollContainerElement.scrollLeft,a=t-(n+r);return this.numFrozenColumns!=null&&this.numFrozenColumns>0&&a<=this.grid.getCumulativeWidthBefore(this.numFrozenColumns)?a:a+r});G(this,"toGridY",t=>{const n=this.cellContainerElement.getBoundingClientRect().top,r=this.scrollContainerElement.scrollTop,a=t-(n+r);return this.numFrozenRows!=null&&this.numFrozenRows>0&&a<=this.grid.getCumulativeHeightBefore(this.numFrozenRows)?a:a+r});this.tableElement=t,this.scrollContainerElement=n,this.cellContainerElement=r,this.numFrozenRows=0,this.numFrozenColumns=0}setGrid(t){return this.grid=t,this}setNumFrozenRows(t){return this.numFrozenRows=t,this}setNumFrozenColumns(t){return this.numFrozenColumns=t,this}getViewportRect(){return new nc(this.scrollContainerElement.scrollLeft||0,this.scrollContainerElement.scrollTop||0,this.scrollContainerElement.clientWidth,this.scrollContainerElement.clientHeight)}getWidestVisibleCellInColumn(t){const n=this.getColumnCellSelector(t),r=this.tableElement.querySelectorAll(n);let a=0;for(let s=0;s<r.length;s++){const i=Fr.measureElementTextContent(r.item(s)).width,l=Math.ceil(i)+S_.CELL_HORIZONTAL_PADDING*2;l>a&&(a=l)}return a}getTallestVisibleCellInColumn(t){const n=this.getColumnCellSelector(t),r=this.tableElement.querySelectorAll(`${n}.${wne}`);let a=0;for(let s=0;s<r.length;s++){const i=r.item(s),l=i.querySelector(`.${Rne}`),c=i.querySelector(`.${Nne}`),u=i.querySelector(`.${VS}`);let d=0;l!=null?d=l.scrollHeight:c!=null?d=c.scrollHeight:u!=null?d=u.scrollHeight:d=i.scrollHeight,d>a&&(a=d)}return a}hasVerticalOverflowOrExactFit(t=bi.MIN_COLUMN_HEADER_HEIGHT,n=this.getViewportRect()){return this.grid===void 0?!1:this.grid.getHeight()>=n.height-t}hasHorizontalOverflowOrExactFit(t=bi.MIN_ROW_HEADER_WIDTH,n=this.getViewportRect()){return this.grid===void 0?!1:this.grid.getWidth()>=n.width-t}convertPointToColumn(t,n){const r=this.getTableRect();if(this.grid===void 0||!r.containsX(t))return-1;const a=this.toGridX(t),s=n?this.grid.numCols:this.grid.numCols-1,i=n?this.convertCellMidpointToClientX:this.convertCellIndexToClientX;return Fr.binarySearch(a,s,i)}convertPointToRow(t,n){const r=this.getTableRect();if(this.grid===void 0||!r.containsY(t))return-1;const a=this.toGridY(t),s=n?this.grid.numRows:this.grid.numRows-1,i=n?this.convertCellMidpointToClientY:this.convertCellIndexToClientY;return Fr.binarySearch(a,s,i)}convertPointToCell(t,n){const r=this.toGridX(t),a=this.toGridY(n),s=Fr.binarySearch(r,this.grid.numCols-1,this.convertCellIndexToClientX),i=Fr.binarySearch(a,this.grid.numRows-1,this.convertCellIndexToClientY);return{col:s,row:i}}getColumnCellSelector(t){const r=t<this.numFrozenColumns?_ne:kne,a=q4(t);return`.${r} .${a}`}getTableRect(){return nc.wrap(this.tableElement.getBoundingClientRect())}};G(S_,"CELL_HORIZONTAL_PADDING",10);let Ty=S_;const xGe=25;var Iu;(function(e){e.ALWAYS="always",e.NEVER="never",e.WHEN_TRUNCATED="when-truncated",e.WHEN_TRUNCATED_APPROX="when-truncated-approx"})(Iu||(Iu={}));class u_ extends p.PureComponent{constructor(){super(...arguments);G(this,"state",{isPopoverOpen:!1,isTruncated:!1});G(this,"contentDiv");G(this,"handleContentDivRef",n=>this.contentDiv=n);G(this,"handlePopoverOpen",()=>{this.setState({isPopoverOpen:!0})});G(this,"handlePopoverClose",()=>{this.setState({isPopoverOpen:!1})})}componentDidMount(){this.setTruncationState()}componentDidUpdate(){this.setTruncationState()}render(){const{children:n,detectTruncation:r,truncateLength:a,truncationSuffix:s}=this.props,i=""+n;let l=i;if(!r&&a>0&&l.length>a&&(l=l.substring(0,a)+s),this.shouldShowPopover(i)){const c=At(this.props.className,vGe);return F.jsxs("div",{className:c,children:[F.jsx("div",{className:Rne,ref:this.handleContentDivRef,children:l}),this.renderPopover()]})}else{const c=At(this.props.className,Nne);return F.jsx("div",{className:c,ref:this.handleContentDivRef,children:l})}}renderPopover(){const{children:n,preformatted:r}=this.props;if(this.state.isPopoverOpen){const a=At(sM,r?UWe:VWe),s=F.jsx("div",{className:a,children:n});return F.jsx(kg,{className:Vz,content:s,isOpen:!0,onClose:this.handlePopoverClose,placement:"bottom",rootBoundary:"document",shouldReturnFocusOnClose
1949:!1,children:F.jsx(YE,{})})}else return F.jsx("span",{className:Vz,onClick:this.handlePopoverOpen,children:F.jsx(YE,{})})}shouldShowPopover(n){const{detectTruncation:r,measureByApproxOptions:a,showPopover:s,truncateLength:i}=this.props;switch(s){case Iu.ALWAYS:return!0;case Iu.NEVER:return!1;case Iu.WHEN_TRUNCATED:return r?this.state.isTruncated:i>0&&n.length>i;case Iu.WHEN_TRUNCATED_APPROX:if(!r)return i>0&&n.length>i;if(this.props.parentCellHeight==null||this.props.parentCellWidth==null)return!1;const{approximateCharWidth:l,approximateLineHeight:c,cellHorizontalPadding:u,numBufferLines:d}=a,f=this.props.parentCellWidth;return Fr.getApproxCellHeight(n,f,l,c,u,d)>this.props.parentCellHeight;default:return!1}}setTruncationState(){if(!this.props.detectTruncation||this.props.showPopover!==Iu.WHEN_TRUNCATED)return;if(this.contentDiv==null){this.setState({isTruncated:!1});return}const{isTruncated:n}=this.state,{clientHeight:r,clientWidth:a,scrollHeight:s,scrollWidth:i}=this.contentDiv,l=n?i-xGe:i,c=n&&l===a||l>a||s>r;this.setState({isTruncated:c})}}G(u_,"displayName",`${$n}.TruncatedFormat`),G(u_,"defaultProps",{detectTruncation:!1,measureByApproxOptions:{approximateCharWidth:8,approximateLineHeight:18,cellHorizontalPadding:2*Ty.CELL_HORIZONTAL_PADDING,numBufferLines:0},preformatted:!1,showPopover:Iu.WHEN_TRUNCATED,truncateLength:2e3,truncationSuffix:"..."});class iM extends p.Component{render(){const{children:t,omitQuotesOnStrings:n,stringify:r}=this.props;let{showPopover:a}=this.props;const s=t==null;s&&(a=Iu.NEVER);const i=At(this.props.className,{[zWe]:s});let l="";return n&&typeof t=="string"?l=t:l=r(t),F.jsx(u_,{...this.props,className:i,showPopover:a,children:l})}}G(iM,"displayName",`${$n}.JSONFormat`),G(iM,"defaultProps",{omitQuotesOnStrings:!0,stringify:t=>JSON.stringify(t,null,2)});const oM=()=>F.jsx(wi,{});class wi extends p.Component{shouldComponentUpdate(t){return!oi(this.props,t,{exclude:["style"]})||!qo(this.props.style,t.style)}render(){const{cellRef:t,tabIndex:n,onKeyDown:r,onKeyUp:a,onKeyPress:s,style:i,intent:l,interactive:c,loading:u,tooltip:d,truncated:f,className:m,wrapText:h}=this.props,g=At(wne,Rs(l),{[wWe]:c,[FP]:u,[gGe]:f},m),v=At({[VS]:f,[xne]:!h}),y=p.Children.map(this.props.children,E=>{const w=Jd(E,u_)||Jd(E,iM);return i!=null&&p.isValidElement(E)&&w?p.cloneElement(E,{parentCellHeight:i.height===void 0?void 0:parseInt(i.height.toString(),10),parentCellWidth:i.width===void 0?void 0:parseInt(i.width.toString(),10)}):E}),b=F.jsx("div",{className:v,children:y});return F.jsx("div",{className:g,title:d,ref:t,onKeyDown:r,onKeyPress:s,onKeyUp:a,style:i,tabIndex:n,children:F.jsx(Y4,{loading:u??!1,variableLength:!0,children:b})})}}G(wi,"displayName",`${$n}.Cell`),G(wi,"defaultProps",{truncated:!0,wrapText:!1});const C_=class C_{constructor(){G(this,"handler");G(this,"element");G(this,"activationCoordinates");G(this,"doubleClickTimeoutToken");G(this,"isActivated",!1);G(this,"isDragging",!1);G(this,"lastCoordinates");G(this,"handleMouseDown",t=>{this.initCoordinateData(t),!(this.handler!=null&&this.handler.onActivate!=null&&this.handler.onActivate(t)===!1)&&(this.isActivated=!0,this.maybeAlterEventChain(t),this.detachDocumentEventListeners(),this.attachDocumentEventListeners())});G(this,"handleMouseMove",t=>{var n,r;if(this.maybeAlterEventChain(t),this.isActivated&&(this.isDragging=!0),this.isDragging){const a=this.updateCoordinateData(t);a!==void 0&&((r=(n=this.handler)==null?void 0:n.onDragMove)==null||r.call(n,t,a))}});G(this,"handleMouseUp",t=>{var n,r,a,s;if(this.maybeAlterEventChain(t),this.handler!=null)if(this.isDragging){const i=this.updateCoordinateData(t);i!==void 0&&((r=(n=this.handler)==null?void 0:n.onDragMove)==null||r.call(n,t,i),(s=(a=this.handler)==null?void 0:a.onDragEnd)==null||s.call(a,t,i))}else this.isActivated&&(this.handler.onDoubleClick!=null?this.doubleClickTimeoutToken==null?this.doubleClickTimeoutToken=window.setTimeout(()=>{var i,l;delete this.doubleClickTimeoutToken,(l=(i=this.handler)==null?void 0:i.onClick)==null||l.call(i,t)},C_.DOUBLE_CLICK_TIMEOUT_MSEC):(window.clearTimeout(this.doubleClickTimeoutToken),delete this.doubleClickTimeoutToken,this.handler.onDoubleClick(t)):this.handler.onClick!=null&&this.handler.onClick(t));this.isActivated=!1,this.isDragging=!1,this.detachDocumentEventListeners()})}static isAdditive(t){return t.ctrlKey||t.metaKey}attach(t,n){return this.detach(),this.handler=n,this.element=t,this.isValidDragHandler(n)&&this.element.addEventListener("mousedown",this.handleMouseDown),this}detach(){this.element!=null&&(this.element.removeEventListener("mousedown",this.handleMouseDown),this.detachDocumentEventListeners())}isValidDragHandler(t){return t!=null&&(t.onActivate!=null||t.onDragMove!=null||t.onDragEnd!=null||t.onClick!=null||t.onDoubleClick!=null)}attachDocumentEventListeners(){document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}detachDocumentEventListeners(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}initCoordinateData(t){this.activationCoordinates=[t.clientX,t.clientY],this.lastCoordinates=this.activationCoordinates}updateCoordinateData(t){if(this.activationCoordinates===void 0)return;const n=[t.clientX,t.clientY],r=this.lastCoordinates??[0,0],a=[n[0]-r[0],n[1]-r[1]],s=[n[0]-this.activationCoordinates[0],n[1]-this.activationCoordinates[1]],i={activation:this.activationCoordinates,current:n,delta:a,last:r,offset:s};return this.lastCoordinates=[t.clientX,t.clientY],i}maybeAlterEventChain(t){var n,r;(n=this.handler)!=null&&n.preventDefault&&t.preventDefault(),(r=this.handler)!=null&&r.stopPropagation&&t.stopPropagation()}};G(C_,"DOUBLE_CLICK_TIMEOUT_MSEC",500);let lg=C_;const _Ge=["stopPropagation","preventDefault"];class Db extends p.PureComponent{constructor(){super(...arguments);G(this,"events",new lg);G(this,"targetRef",this.props.targetRef??p.createRef())}render(){const n=p.Children.only(this.props.children);return this.props.targetRef!==void 0?n:p.cloneElement(n,{ref:this.targetRef})}componentDidUpdate(n){!oi(n,this.props,{include:_Ge})&&PN(this.targetRef.current)&&this.events.attach(this.targetRef.current,this.props)}componentDidMount(){PN(this.targetRef.current)&&this.events.attach(this.targetRef.current,this.props)}componentWillUnmount(){var n;PN(this.targetRef.current)&&((n=this.events)==null||n.detach())}}G(Db,"defaultProps",{preventDefault:!0,stopPropagation:!1});function PN(e){return e!=null&&e instanceof HTMLElement}class lM extends p.Component{constructor(){super(...arguments);G(this,"cellRef",p.createRef());G(this,"contentsRef",p.createRef());G(this,"state",{isEditing:!1,savedValue:this.props.value});G(this,"renderCell",({handleKeyDown:n,handleKeyUp:r})=>{const{editableTextProps:a,onCancel:s,onChange:i,onConfirm:l,tabIndex:c=0,truncated:u,wrapText:d,...f}=this.props,{isEditing:m,dirtyValue:h,savedValue:g}=this.state,v=f.interactive||m;let y;if(m){const b=a?a.className:null;y=F.jsx(rx,{...a,isEditing:!0,className:At(Pz,NWe,b),elementRef:this.contentsRef,intent:f.intent,minWidth:0,onCancel:this.handleCancel,onChange:this.handleChange,onConfirm:this.handleConfirm,onEdit:this.handleEdit,placeholder:"",selectAllOnFocus:!1,value:h})}else{const b=At(Pz,{[VS]:u,[xne]:!d});y=F.jsx("div",{className:b,ref:this.contentsRef,children:g})}return F.jsx(wi,{...f,wrapText:d,truncated:!1,interactive:v,cellRef:this.cellRef,onKeyDown:n,onKeyPress:this.handleKeyPress,onKeyUp:r,tabIndex:c,children:F.jsx(Db,{onActivate:this.handleCellActivate,onDoubleClick:this.handleCellDoubleClick,preventDefault:!1,stopPropagation:v,targetRef
1949:this.contentsRef,children:y})})});G(this,"handleKeyPress",()=>{this.state.isEditing||!this.props.isFocused||this.setState({dirtyValue:"",isEditing:!0,savedValue:this.state.savedValue})});G(this,"handleEdit",()=>{this.setState({dirtyValue:this.state.savedValue,isEditing:!0})});G(this,"handleCancel",n=>{this.setState({dirtyValue:void 0,isEditing:!1}),this.invokeCallback(this.props.onCancel,n)});G(this,"handleChange",n=>{this.setState({dirtyValue:n}),this.invokeCallback(this.props.onChange,n)});G(this,"handleConfirm",n=>{this.setState({dirtyValue:void 0,isEditing:!1,savedValue:n}),this.invokeCallback(this.props.onConfirm,n)});G(this,"handleCellActivate",n=>!0);G(this,"handleCellDoubleClick",n=>{this.handleEdit()});G(this,"hotkeys",[{combo:"f2",group:"Table",label:"Edit the currently focused cell",onKeyDown:this.handleEdit}])}componentDidMount(){this.checkShouldFocus()}componentDidUpdate(n){const r=!oi(this.props,n,{exclude:["style"]})||!qo(this.props,n,["style"]),{value:a}=this.props;r&&a!=null&&this.setState({dirtyValue:a,savedValue:a}),this.checkShouldFocus()}shouldComponentUpdate(n,r){return!oi(this.props,n,{exclude:["style"]})||!oi(this.state,r)||!qo(this.props,n,["style"])}render(){return F.jsx(Mq,{hotkeys:this.hotkeys,children:this.renderCell})}checkShouldFocus(){var n;this.props.isFocused&&!this.state.isEditing&&((n=this.cellRef.current)==null||n.focus())}invokeCallback(n,r){const{rowIndex:a,columnIndex:s}=this.props;n==null||n(r,a,s)}}G(lM,"displayName",`${$n}.EditableCell`),G(lM,"defaultProps",{truncated:!0,wrapText:!1});const Ane=lM;class co extends p.PureComponent{}G(co,"displayName",`${$n}.Column`),G(co,"defaultProps",{cellRenderer:oM});const kGe={copyCells(e){const t=e.map(n=>n.join(" ")).join(` 1950`);return navigator.clipboard.writeText(t)},copyString(e){return navigator.clipboard.writeText(e)}};var _l;(function(e){e.BATCH="batch",e.BATCH_ON_UPDATE="batch-on-update",e.NONE="none"})(_l||(_l={}));const _o="[Blueprint Table]",SGe=_o+" TableQuadrant onScroll need not be defined for any quadrant aside from the MAIN quadrant.",CGe=_o+" Table cannot expand a FULL_COLUMNS selection using a multi-column region.",NGe=_o+" Table cannot expand a FULL_COLUMNS selection using a multi-row region.",RGe=_o+' Children of Table must be Columns"',TGe=_o+" Table numFrozenColumns must be in less than or equal to the number of columns. Clamping the value for you.",AGe=_o+" Table requires numFrozenColumns to be greater than or equal to 0.",IGe=_o+" Table numFrozenRows must be less than or equal to numRows. Clamping the value for you.",OGe=_o+" Table requires numFrozenRows to be greater than or equal to 0.",MGe=_o+" Table requires rowHeights.length to equal numRows when both props are provided.",PGe=_o+" Table requires numRows to be greater than or equal to 0.",DGe=_o+" Table requires columnWidths.length to equal the number of <Column>s if provided.",LGe=`${_o} Table resize method called while component is unmounted, this is a no-op.`,$Ge=`${_o} cellRendererDependencies should either always be defined or undefined; this feature cannot be enabled during the component lifecycle`,FGe=_o+" Copy failed.";class zGe{constructor(t,n,r,a){G(this,"target");G(this,"selectedRegions");G(this,"numRows");G(this,"numCols");G(this,"regions");this.target=t,this.selectedRegions=n,this.numRows=r,this.numCols=a,this.regions=Ot.overlapsRegion(n,t)?n:[t]}getTarget(){return this.target}getSelectedRegions(){return this.selectedRegions}getRegions(){return this.regions}getUniqueCells(){return Ot.enumerateUniqueCells(this.regions,this.numRows,this.numCols)}}var Dm;(function(e){e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=0]="VERTICAL"})(Dm||(Dm={}));class HGe extends p.PureComponent{constructor(){super(...arguments);G(this,"state",{isDragging:!1});G(this,"handleActivate",n=>(this.setState({isDragging:!0}),this.props.onLayoutLock(!0),n.stopPropagation(),n.stopImmediatePropagation(),!0));G(this,"handleDragMove",(n,r)=>{const a=this.props.orientation;this.props.onResizeMove!=null&&this.props.onResizeMove(r.offset[a],r.delta[a])});G(this,"handleDragEnd",(n,r)=>{const a=this.props.orientation;this.setState({isDragging:!1}),this.props.onLayoutLock(!1),this.props.onResizeMove!=null&&this.props.onResizeMove(r.offset[a],r.delta[a]),this.props.onResizeEnd!=null&&this.props.onResizeEnd(r.offset[a])});G(this,"handleClick",n=>{this.setState({isDragging:!1}),this.props.onLayoutLock(!1)});G(this,"handleDoubleClick",n=>{this.setState({isDragging:!1}),this.props.onLayoutLock(!1),this.props.onDoubleClick!=null&&this.props.onDoubleClick()})}render(){const{onResizeMove:n,onResizeEnd:r,onDoubleClick:a,orientation:s}=this.props;if(n==null&&r==null&&a==null)return;const i=At(eGe,{[Mz]:this.state.isDragging,[tGe]:s===Dm.HORIZONTAL,[sGe]:s===Dm.VERTICAL},this.props.className),l=At(JWe,{[Mz]:this.state.isDragging});return F.jsx(Db,{onActivate:this.handleActivate,onClick:this.handleClick,onDoubleClick:this.handleDoubleClick,onDragEnd:this.handleDragEnd,onDragMove:this.handleDragMove,children:F.jsx("div",{className:i,children:F.jsx("div",{className:l})})})}}function vl(e){const{enableFocusedCell:t,focusMode:n}=e;return n??VGe(t)}function VGe(e=!1){return e?na.CELL:void 0}function eE(e){const{focusedRegion:t,focusedCell:n}=e;return t??Ine(n)}function Ine(e){return e!=null?{type:na.CELL,...e}:void 0}function One(e,t){if(e.length!==0)return t!=null?t.focusSelectionIndex:e.length-1}function cM(e,t,n,r){return Mne(e,UGe(t,n,r))}function UGe(e,t,n){return e??t??BGe(n)}function BGe(e){if(e.length===0)return{col:0,focusSelectionIndex:0,row:0,type:na.CELL};const t=e.length-1;return{...Ot.getFocusCellCoordinatesFromRegion(e[t]),focusSelectionIndex:t,type:na.CELL}}function Mne(e,t){if(e!=null){if(t.type===e)return t;if(t.type===na.CELL&&e===na.ROW)return{focusSelectionIndex:t.focusSelectionIndex,row:t.row,type:e};if(t.type===na.ROW&&e===na.CELL)return{col:0,focusSelectionIndex:t.focusSelectionIndex,row:t.row,type:e}}}function Pne(e,t){return e.rows!=null&&t.row===e.rows[0]}function Dne(e,t){return e.rows!=null&&t.row===e.rows[1]}function Lne(e,t){return e.cols!=null&&cg(t)===e.cols[0]}function $ne(e,t){return e.cols!=null&&cg(t)===e.cols[1]}function cg(e){switch(e.type){case na.CELL:return e.col;case na.ROW:return}}
1950function Lb(e,t,n=0){switch(e){case na.CELL:return{type:na.CELL,...t,focusSelectionIndex:n};case na.ROW:return{focusSelectionIndex:n,row:t.row,type:na.ROW};case void 0:return}}function jGe(e,t){switch(Ot.getRegionCardinality(t)){case bn.FULL_COLUMNS:{const[i,l]=iw(e,t,"col","cols");return Ot.column(i,l)}case bn.FULL_ROWS:{const[i,l]=iw(e,t,"row","rows");return Ot.row(i,l)}case bn.CELLS:const[n,r]=iw(e,t,"row","rows"),[a,s]=iw(e,t,"col","cols");return Ot.cell(n,a,r,s);default:return Ot.table()}}function iw(e,t,n,r){const a=n==="row"?e.row:cg(e)??0,[s,i]=t[r];if(s!==i){if(r==="rows")throw new Error(NGe);if(r==="cols")throw new Error(CGe)}return a<=s?[a,s]:[s,a]}function Fne(e,t){return e.type===na.CELL&&t.type===na.CELL?e.row===t.row&&e.col===t.col:e.type===na.ROW&&t.type===na.ROW?e.row===t.row:!1}const WGe=Object.freeze(Object.defineProperty({__proto__:null,areFocusedRegionsEqual:Fne,expandFocusedRegion:jGe,getFocusModeFromProps:vl,getFocusedCellFromCoordinates:Ine,getFocusedColumn:cg,getFocusedOrLastSelectedIndex:One,getFocusedRegionFromProps:eE,getInitialFocusedRegion:cM,isFocusAtRegionBottom:Dne,isFocusAtRegionLeft:Lne,isFocusAtRegionRight:$ne,isFocusAtRegionTop:Pne,toFocusedRegion:Lb,validateFocusedRegion:Mne},Symbol.toStringTag,{value:"Module"}));function GGe(e){const t=e??(typeof navigator<"u"?navigator.platform:void 0);return t===void 0?!1:/Mac|iPod|iPhone|iPad/.test(t)}class d_ extends p.PureComponent{constructor(){super(...arguments);G(this,"didExpandSelectionOnActivate",!1);G(this,"lastEmittedSelectedRegions",null);G(this,"handleActivate",n=>{const{locateClick:r,selectedRegions:a,selectedRegionTransform:s}=this.props;if(this.shouldIgnoreMouseDown(n))return!1;let i=r(n);if(!Ot.isValid(i))return!1;s!=null&&(i=s(i,n));const l=Ot.findMatchingRegion(a,i),c=l!==-1;return c&&lg.isAdditive(n)?(this.handleClearSelectionAtIndex(l),!1):(c?this.handleClearAllSelectionsNotAtIndex(l):this.shouldExpandSelection(n)?this.handleExpandSelection(i):this.shouldAddDisjointSelection(n)?this.handleAddDisjointSelection(i):this.handleReplaceSelection(i),!0)});G(this,"handleDragMove",(n,r)=>{const{enableMultipleSelection:a,locateClick:s,locateDrag:i,selectedRegions:l,selectedRegionTransform:c}=this.props;let u=a?i(n,r,this.didExpandSelectionOnActivate):s(n);if(u===void 0||!Ot.isValid(u))return;c!=null&&(u=c(u,n,r));const d=this.didExpandSelectionOnActivate?this.expandSelectedRegions(l,u,this.getFocusedRegion()):Ot.update(l,u);if(this.maybeInvokeSelectionCallback(d),!a){const f=d.length-1,m=d[f];this.invokeOnFocusCallbackForRegion(m,f)}});G(this,"handleDragEnd",()=>{this.finishInteraction()});G(this,"handleClick",()=>{this.finishInteraction()});G(this,"shouldExpandSelection",n=>{const{enableMultipleSelection:r}=this.props;return r&&n.shiftKey});G(this,"shouldAddDisjointSelection",n=>{const{enableMultipleSelection:r}=this.props;return r&&lg.isAdditive(n)});G(this,"handleClearSelectionAtIndex",n=>{const{selectedRegions:r}=this.props,a=r.slice();if(a.splice(n,1),this.maybeInvokeSelectionCallback(a),a.length>0){const s=a.length-1;this.invokeOnFocusCallbackForRegion(a[s],s)}});G(this,"handleClearAllSelectionsNotAtIndex",n=>{const{selectedRegions:r}=this.props,a=r[n];this.maybeInvokeSelectionCallback([a]),this.invokeOnFocusCallbackForRegion(a,0)});G(this,"handleExpandSelection",n=>{const{selectedRegions:r}=this.props;this.didExpandSelectionOnActivate=!0;const a=this.expandSelectedRegions(r,n,this.getFocusedRegion());this.maybeInvokeSelectionCallback(a),(r==null||r.length===0)&&this.invokeOnFocusCallbackForRegion(n)});G(this,"handleAddDisjointSelection",n=>{const{selectedRegions:r}=this.props,a=Ot.add(r,n);this.maybeInvokeSelectionCallback(a),this.invokeOnFocusCallbackForRegion(n,a.length-1)});G(this,"handleReplaceSelection",n=>{const r=[n];this.maybeInvokeSelectionCallback(r),this.invokeOnFocusCallbackForRegion(n)});G(this,"invokeOnFocusCallbackForRegion",(n,r=0)=>{const{focusMode:a,onFocusedCell:s,onFocusedRegion:i}=this.props,l=Ot.getFocusCellCoordinatesFromRegion(n),c=this.focusedCellUtils.toFocusedRegion(a,l,r);c!=null&&(i==null||i(c)),s==null||s(this.focusedCellUtils.toFocusedRegion(na.CELL,l,r))});G(this,"finishInteraction",()=>{var n,r;(r=(n=this.props).onSelectionEnd)==null||r.call(n,this.props.selectedRegions),this.didExpandSelectionOnActivate=!1,this.lastEmittedSelectedRegions=null})}get focusedCellUtils(){return{...WGe,...this.props.focusedCellUtils}}render(){const n=this.getDraggableHandlers();
1950return F.jsx(Db,{...n,preventDefault:!1,targetRef:this.props.targetRef,children:this.props.children})}getDraggableHandlers(){return this.props.onSelection==null?{}:{onActivate:this.handleActivate,onClick:this.handleClick,onDragEnd:this.handleDragEnd,onDragMove:this.handleDragMove}}shouldIgnoreMouseDown(n){const{disabled:r,ignoredSelectors:a=[]}=this.props,s=n.target,i=Fr.isLeftClick(n),l=i&&n.ctrlKey&&GGe(),c=typeof r=="function"?r(n):r;return!i||l||c||a.some(u=>s.closest(u)!=null)}maybeInvokeSelectionCallback(n){const{onSelection:r}=this.props;(this.lastEmittedSelectedRegions==null||!qo(this.lastEmittedSelectedRegions,n))&&(r(n),this.lastEmittedSelectedRegions=n)}expandSelectedRegions(n,r,a){if(n.length===0)return[r];if(a!=null){const s=this.focusedCellUtils.expandFocusedRegion(a,r);return Ot.update(n,s)}else{const s=Ot.expandRegion(n[n.length-1],r);return Ot.update(n,s)}}getFocusedRegion(){const{focusedCell:n,focusedRegion:r}=this.props;if(r!=null)return r;if(n!=null)return{...n,type:na.CELL}}}G(d_,"defaultProps",{disabled:!1,enableMultipleSelection:!1,selectedRegions:[]}),G(d_,"displayName",`${$n}.DragSelectable`);class zne extends p.Component{constructor(){super(...arguments);G(this,"state",{isActive:!1})}shouldComponentUpdate(n){return!oi(this.props,n,{exclude:["style"]})||!qo(this.props,n,["style"])}render(){var a,s;const n=At(Ene,{[IWe]:this.props.isActive||this.state.isActive,[MWe]:this.props.isSelected,[FP]:this.props.loading},this.props.className),r=this.props.menuRenderer!==void 0;return F.jsx(gD,{className:n,content:(s=(a=this.props).menuRenderer)==null?void 0:s.call(a,this.props.index),disabled:!r,style:this.props.style,ref:this.props.targetRef,children:this.props.children})}}function qGe(){return F.jsx("div",{className:PWe})}class Lm extends Bs{constructor(){super(...arguments);G(this,"state",{isActive:!1});G(this,"handlePopoverOpened",()=>this.setState({isActive:!0}));G(this,"handlePopoverClosing",()=>this.setState({isActive:!1}))}static isHeaderMouseTarget(n){return n.classList.contains(Ene)||n.classList.contains(MN)||n.classList.contains($z)||n.classList.contains(Dz)}render(){const{enableColumnInteractionBar:n,enableColumnReordering:r,isColumnSelected:a,menuIcon:s,name:i,nameRenderer:l,...c}=this.props,u=At(c.className,SWe,{[TWe]:n,[AWe]:this.props.reorderHandle!=null});return F.jsxs(zne,{isReorderable:r,isSelected:a,...c,className:u,children:[this.renderName(),this.maybeRenderContent(),this.props.loading?void 0:this.props.resizeHandle]})}renderName(){const{enableColumnInteractionBar:n,index:r,loading:a,name:s,nameRenderer:i,reorderHandle:l}=this.props,c=this.maybeRenderDropdownMenu(),u=F.jsx("div",{className:VS,children:s}),d=F.jsx(Y4,{loading:a??!1,variableLength:!0,children:(i==null?void 0:i(s,r))??u});return n?F.jsxs("div",{className:MN,title:s,children:[F.jsxs("div",{className:$z,children:[l,c]}),F.jsx(qGe,{}),F.jsx("div",{className:Oz,children:d})]}):F.jsxs("div",{className:MN,title:s,children:[l,c,F.jsx("div",{className:Oz,children:d})]})}maybeRenderContent(){if(this.props.children!==null)return F.jsx("div",{className:Dz,children:this.props.children})}maybeRenderDropdownMenu(){const{index:n,menuIcon:r,menuPopoverProps:a,menuRenderer:s,selectCellsOnMenuClick:i}=this.props;if(!Nl(s))return;const l=At(Sne,K4,{[mGe]:this.state.isActive,[Cne]:i});return F.jsxs("div",{className:l,children:[F.jsx("div",{className:fGe}),F.jsx(kg,{className:At(dGe,a==null?void 0:a.className),content:s(n),onClosing:this.handlePopoverClosing,onOpened:this.handlePopoverOpened,placement:"bottom",rootBoundary:"document",...Mk(a),children:F.jsx(Ft,{icon:r})})]})}}G(Lm,"displayName",`${$n}.ColumnHeaderCell`),G(Lm,"defaultProps",{enableColumnInteractionBar:!1,isActive:!1,menuIcon:"chevron-down",selectCellsOnMenuClick:!0});class Hne extends Bs{render(){const{enableRowReordering:t,isRowSelected:n,name:r,nameRenderer:a,...s}=this.props,i=F.jsx("div",{className:cGe,children:r}),l=F.jsx(Y4,{loading:s.loading??!1,children:(a==null?void 0:a(r,s.index))??i});return F.jsxs(zne,{isReorderable:this.props.enableRowReordering,isSelected:this.props.isRowSelected,...s,children:[F.jsx("div",{className:lGe,children:l}),this.props.children,s.loading?void 0:s.resizeHandle]})}}var YGe=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},KGe=function(e,t){return e+Ay(t)},Ay=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(KGe,""):YGe(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?Ay(e.props.children):""};Ay.default=Ay;var ZGe=Ay;const XGe=id(ZGe);function QGe(e,t,n,r,a,s=0,i=0){const l=Ot.getRegionCardinality(e);let c=n,u=t;const d=r(i),f=a(s);switch(l){case bn.CELLS:{const m=a(e.rows[0]),h=r(e.cols[0]);c=ow(m,f),u=ow(h,d);break}case bn.FULL_ROWS:{const m=a(e.rows[0]);c=ow(m,f);break}case bn.FULL_COLUMNS:{const m=r(e.cols[0]);u=ow(m,d);break}default:{c=0,u=0;break}}return{scrollLeft:u,scrollTop:c}}function DN(e,t){return e==null?0:t==="horizontal"?e.offsetHeight-e.clientHeight:e.offsetWidth-e.clientWidth}function ow(e,t){return Math.max(e-t,0)}var Rc;(function(e){e.TOP="top",e.BOTTOM="bottom",e.RIGHT="right",e.LEFT="left",e.NONE="none"})(Rc||(Rc={}));class Vne extends p.PureComponent{constructor(){super(...arguments);G(this,"selectedRegionStartIndex");G(this,"selectedRegionLength",0);G(this,"handleActivate",n=>{if(this.shouldIgnoreMouseDown(n))return!1;const r=this.props.locateClick(n);if(!Ot.isValid(r))return!1;const a=Ot.getRegionCardinality(r),s=a===bn.FULL_COLUMNS,i=a===bn.FULL_ROWS;if(!s&&!i)return!1;const{selectedRegions:l=[]}=this.props,c=Ot.findContainingRegion(l,r);if(c>=0){const u=l[c];if(Ot.getRegionCardinality(u)!==a)return!1;const d=i?u.rows:u.cols;this.selectedRegionStartIndex=d[0],this.selectedRegionLength=d[1]-d[0]+1}else{this.maybeSelectRegion(r);const u=i?r.rows:r.cols;this.selectedRegionStartIndex=u[0],this.selectedRegionLength=u[1]-u[0]+1}return!0});G(this,"handleDragMove",(n,r)=>{const a=this.selectedRegionStartIndex,s=this.props.locateDrag(n,r);if(a===void 0||s===void 0)return;const i=this.selectedRegionLength,l=Fr.guideIndexToReorderedIndex(a,s,i);this.props.onReordering(a,l,i)});G(this,"handleDragEnd",(n,r)=>{const a=this.selectedRegionStartIndex,s=this.props.locateDrag(n,r);if(a===void 0||s===void 0)return;const i=this.selectedRegionLength,l=Fr.guideIndexToReorderedIndex(a,s,i);this.props.onReordered(a,l,i);const c=this.props.toRegion(l,l+i-1);this.maybeSelectRegion(c),this.selectedRegionStartIndex=void 0,this.selectedRegionLength=0})}render(){const n=this.getDraggableHandlers();
1950return F.jsx(Db,{...n,preventDefault:!1,targetRef:this.props.targetRef,children:this.props.children})}getDraggableHandlers(){return this.props.onReordered==null?{}:{onActivate:this.handleActivate,onDragEnd:this.handleDragEnd,onDragMove:this.handleDragMove}}shouldIgnoreMouseDown(n){const{disabled:r}=this.props,a=Nl(r)?r==null?void 0:r(n):r;return!Fr.isLeftClick(n)||a}maybeSelectRegion(n){const r=[n];if(!qo(r,this.props.selectedRegions)){this.props.onSelection(r);const a=Ot.getFocusCellCoordinatesFromRegion(n),s=Lb(this.props.focusMode,a);s!=null&&this.props.onFocusedRegion(s)}}}G(Vne,"defaultProps",{selectedRegions:[]});const Ev=class Ev extends Bs{constructor(){super(...arguments);G(this,"state",Ev.getDerivedStateFromProps(this.props,null));G(this,"onResizeMove",(n,r)=>{var a,s;this.offsetSize(r),(s=(a=this.props).onSizeChanged)==null||s.call(a,this.state.size)});G(this,"onResizeEnd",n=>{var r,a;this.setState({unclampedSize:this.state.size}),(a=(r=this.props).onResizeEnd)==null||a.call(r,this.state.size)})}static getDerivedStateFromProps({size:n},r){return r==null?{size:n,unclampedSize:n}:null}componentDidUpdate(n){n.size!==this.props.size&&this.setState(Ev.getDerivedStateFromProps(this.props,null))}render(){const n=p.Children.only(this.props.children),r={...n.props.style,...this.getStyle()};if(this.props.isResizable===!1)return p.cloneElement(n,{style:r});const a=this.renderResizeHandle();return p.cloneElement(n,{resizeHandle:a,style:r})}renderResizeHandle(){const{onLayoutLock:n,onDoubleClick:r,orientation:a}=this.props;return F.jsx(HGe,{onDoubleClick:r,onLayoutLock:n,onResizeEnd:this.onResizeEnd,onResizeMove:this.onResizeMove,orientation:a},"resize-handle")}getStyle(){return this.props.orientation===Dm.VERTICAL?{flexBasis:`${this.state.size}px`,minWidth:"0px",width:`${this.state.size}px`}:{flexBasis:`${this.state.size}px`,height:`${this.state.size}px`,minHeight:"0px"}}offsetSize(n){const r=this.state.unclampedSize+n;this.setState({size:Fr.clamp(r,this.props.minSize,this.props.maxSize),unclampedSize:r})}};G(Ev,"defaultProps",{isResizable:!0,minSize:0});let uM=Ev;const Yz=["focusedRegion","selectedRegions"];class Une extends p.Component{constructor(n){super(n);G(this,"activationIndex",null);G(this,"cellRefs",new Map);G(this,"reorderHandleRefs",new Map);G(this,"convertEventToIndex",n=>{const r=this.props.getMouseCoordinate(n);return this.props.convertPointToIndex(r)});G(this,"locateClick",n=>{const r=n.target.closest(`.${Sne}`);return r&&!r.classList.contains(Cne)?this.props.toRegion(-1):(this.activationIndex=this.convertEventToIndex(n),this.props.toRegion(this.activationIndex))});G(this,"locateDragForSelection",(n,r,a=!1)=>{const s=this.props.getDragCoordinate(r.current),i=this.props.convertPointToIndex(s);return a?this.props.toRegion(i):this.activationIndex!==null?this.props.toRegion(this.activationIndex,i):{}});G(this,"locateDragForReordering",(n,r)=>{const a=this.props.getDragCoordinate(r.current),s=this.props.convertPointToIndex(a,!0);return s<0?void 0:s});G(this,"renderCells",()=>{const{indexStart:n,indexEnd:r}=this.props,a=[];for(let s=n;s<=r;s++){const i=this.renderNewCell(s);i!=null&&a.push(i)}return a});G(this,"renderNewCell",n=>{const r=this.props.getCellExtremaClasses(n,this.props.indexEnd);return(this.props.isGhostIndex(n)?this.props.ghostCellRenderer:this.renderCell)(n,r)});G(this,"renderCell",(n,r)=>{const{getIndexClass:a,selectedRegions:s}=this.props,i=this.props.headerCellRenderer(n);if(i==null)return null;const l=i.props.loading!=null?i.props.loading:this.props.loading,c=this.props.isCellSelected(n),u=this.isEntireCellTargetReorderable(n),d=At(r,{[OWe]:u},this.props.getCellIndexClass(n),i.props.className),f=Kz(this.cellRefs,n),m={className:d,index:n,[this.props.headerCellIsSelectedPropName]:c,[this.props.headerCellIsReorderablePropName]:u,loading:l,reorderHandle:this.maybeRenderReorderHandle(n),targetRef:f},h=b=>this.props.handleSizeChanged(n,b),g=b=>this.props.handleResizeEnd(n,b),v=()=>{var b,E;return(E=(b=this.props).handleResizeDoubleClick)==null?void 0:E.call(b,n)},y=F.jsx(d_,{enableMultipleSelection:this.props.enableMultipleSelection,disabled:this.isDragSelectableDisabled,focusedRegion:this.props.focusedRegion,focusMode:this.props.focusMode,ignoredSelectors:[`.${Hz}`],locateClick:this.locateClick,locateDrag:this.locateDragForSelection,onFocusedRegion:this.props.onFocusedRegion,onSelection:this.handleDragSelectableSelection,onSelectionEnd:this.handleDragSelectableSelectionEnd,selectedRegions:s,selectedRegionTransform:this.props.selectedRegionTransform,targetRef
1950:f,children:F.jsx(uM,{isResizable:this.props.isResizable,maxSize:this.props.maxSize,minSize:this.props.minSize,onDoubleClick:v,onLayoutLock:this.props.onLayoutLock,onResizeEnd:g,onSizeChanged:h,orientation:this.props.resizeOrientation,size:this.props.getCellSize(n),children:p.cloneElement(i,m)})},a(n));return this.isReorderHandleEnabled()?y:this.wrapInDragReorderable(n,y,this.isDragReorderableDisabled,f)});G(this,"handleDragSelectableSelection",n=>{this.props.onSelection(n),this.setState({hasValidSelection:!1})});G(this,"handleDragSelectableSelectionEnd",()=>{this.activationIndex=null,this.setState({hasValidSelection:!0})});G(this,"isDragSelectableDisabled",n=>{if(lg.isAdditive(n))return!1;const r=this.convertEventToIndex(n);return this.isEntireCellTargetReorderable(r)});G(this,"isDragReorderableDisabled",n=>{if(!this.isDragSelectableDisabled(n))return!0;const a=this.convertEventToIndex(n);return!this.isEntireCellTargetReorderable(a)});G(this,"isEntireCellTargetReorderable",n=>{const{isReorderable:r=!1,selectedRegions:a}=this.props;return r&&this.props.isCellSelected(n)&&this.state.hasValidSelection&&Ot.getRegionCardinality(a[0])===this.props.fullRegionCardinality&&a.length===1&&!this.isReorderHandleEnabled()});this.state={hasValidSelection:this.isSelectedRegionsControlledAndNonEmpty(n)}}componentDidUpdate(n,r){const a=this.isSelectedRegionsControlledAndNonEmpty(this.props);r.hasValidSelection!==a&&this.setState({hasValidSelection:a})}shouldComponentUpdate(n,r){return!oi(this.state,r)||!oi(this.props,n,{exclude:Yz})||!qo(this.props,n,Yz)}render(){return this.props.wrapCells(this.renderCells())}isSelectedRegionsControlledAndNonEmpty(n=this.props){return n.selectedRegions!=null&&n.selectedRegions.length>0}isReorderHandleEnabled(){return this.isColumnHeader()&&this.props.isReorderable}maybeRenderReorderHandle(n){const r=Kz(this.reorderHandleRefs,n);return this.isReorderHandleEnabled()?this.wrapInDragReorderable(n,F.jsx("div",{className:Hz,ref:r,children:F.jsx("div",{className:At(ZWe,K4),children:F.jsx(lG,{title:"Press down to drag"})})}),!1,r):void 0}isColumnHeader(){return this.props.fullRegionCardinality===bn.FULL_COLUMNS}wrapInDragReorderable(n,r,a,s){return F.jsx(Vne,{disabled:a,focusMode:this.props.focusMode,locateClick:this.locateClick,locateDrag:this.locateDragForReordering,onReordered:this.props.onReordered,onReordering:this.props.onReordering,onSelection:this.props.onSelection,onFocusedRegion:this.props.onFocusedRegion,selectedRegions:this.props.selectedRegions,targetRef:s,toRegion:this.props.toRegion,children:r},this.props.getIndexClass(n))}}function Kz(e,t){if(e.has(t))return e.get(t);{const n=p.createRef();return e.set(t,n),n}}class Bne extends p.Component{constructor(){super(...arguments);G(this,"wrapCells",n=>{const{columnIndexStart:r,grid:a}=this.props,s=a.getRect().width,i=this.props.grid.getCumulativeWidthBefore(r),l={transform:`translateX(${i||0}px)`,width:s-i},c=At(hGe,_We);return F.jsx("div",{style:{width:s},children:F.jsx("div",{style:l,className:c,ref:this.props.measurableElementRef,children:n})})});G(this,"convertPointToColumn",(n,r)=>this.props.locator.convertPointToColumn(n,r));G(this,"getCellExtremaClasses",(n,r)=>this.props.grid.getExtremaClasses(0,n,1,r));G(this,"getColumnWidth",n=>this.props.grid.getColumnRect(n).width);G(this,"getDragCoordinate",n=>n[0]);G(this,"getMouseCoordinate",n=>n.clientX);G(this,"handleResizeEnd",(n,r)=>{this.props.onResizeGuide(null),this.props.onColumnWidthChanged(n,r)});G(this,"handleResizeDoubleClick",n=>{const{minColumnWidth:r,maxColumnWidth:a}=this.props,s=this.props.locator.getWidestVisibleCellInColumn(n),i=Fr.clamp(s,r,a);this.props.onResizeGuide(null),this.props.onColumnWidthChanged(n,i)});G(this,"handleSizeChanged",(n,r)=>{const a=this.props.grid.getColumnRect(n);this.props.onResizeGuide([a.left+r])});G(this,"isCellSelected",n=>Ot.hasFullColumn(this.props.selectedRegions,n));G(this,"isGhostIndex",n=>this.props.grid.isGhostIndex(-1,n));G(this,"renderGhostCell",(n,r)=>{const{grid:a,loading:s}=this.props,i=a.getGhostCellRect(0,n),l={flexBasis:`${i.width}px`,width:`${i.width}px`};return F.jsx(Lm,{className:At(r),index:n,loading:s,style:l},Bz(n))});
1950G(this,"toRegion",(n,r)=>Ot.column(n,r))}componentDidMount(){var n,r;(r=(n=this.props).onMount)==null||r.call(n,"column")}render(){const{cellRenderer:n,onColumnWidthChanged:r,minColumnWidth:a,maxColumnWidth:s,defaultColumnWidth:i,columnIndexStart:l,columnIndexEnd:c,...u}=this.props;return F.jsx(Une,{convertPointToIndex:this.convertPointToColumn,fullRegionCardinality:bn.FULL_COLUMNS,getCellExtremaClasses:this.getCellExtremaClasses,getCellIndexClass:q4,getCellSize:this.getColumnWidth,getDragCoordinate:this.getDragCoordinate,getIndexClass:Bz,getMouseCoordinate:this.getMouseCoordinate,ghostCellRenderer:this.renderGhostCell,handleResizeDoubleClick:this.handleResizeDoubleClick,handleResizeEnd:this.handleResizeEnd,handleSizeChanged:this.handleSizeChanged,headerCellIsReorderablePropName:"enableColumnReordering",headerCellIsSelectedPropName:"isColumnSelected",headerCellRenderer:n,indexEnd:c,indexStart:l,isCellSelected:this.isCellSelected,isGhostIndex:this.isGhostIndex,maxSize:s,minSize:a,resizeOrientation:Dm.VERTICAL,selectedRegions:[],toRegion:this.toRegion,wrapCells:this.wrapCells,...u})}}G(Bne,"defaultProps",{isReorderable:!1,isResizable:!0,loading:!1});class jne extends p.Component{constructor(){super(...arguments);G(this,"wrapCells",n=>{const{rowIndexStart:r,grid:a}=this.props,s=a.getRect().height,i=this.props.grid.getCumulativeHeightBefore(r),l={height:s-i,transform:`translateY(${i||0}px)`};return F.jsx("div",{style:{height:s},children:F.jsx("div",{className:oGe,style:l,children:n})})});G(this,"convertPointToRow",(n,r)=>{var a;return(a=this.props.locator)==null?void 0:a.convertPointToRow(n,r)});G(this,"getCellExtremaClasses",(n,r)=>this.props.grid.getExtremaClasses(n,0,r,1));G(this,"getRowHeight",n=>this.props.grid.getRowRect(n).height);G(this,"getDragCoordinate",n=>n[1]);G(this,"getMouseCoordinate",n=>n.clientY);G(this,"handleResizeEnd",(n,r)=>{this.props.onResizeGuide(null),this.props.onRowHeightChanged(n,r)});G(this,"handleSizeChanged",(n,r)=>{const a=this.props.grid.getRowRect(n);this.props.onResizeGuide([a.top+r])});G(this,"isCellSelected",n=>Ot.hasFullRow(this.props.selectedRegions,n));G(this,"isGhostIndex",n=>this.props.grid.isGhostIndex(n,-1));G(this,"renderGhostCell",(n,r)=>{const a=this.props.grid.getGhostCellRect(n,0);return F.jsx(Hne,{className:At(r),index:n,loading:this.props.loading,style:{height:`${a.height}px`}},jz(n))});G(this,"toRegion",(n,r)=>Ot.row(n,r))}componentDidMount(){var n,r;(r=(n=this.props).onMount)==null||r.call(n,"row")}render(){const{onRowHeightChanged:n,rowHeaderCellRenderer:r,minRowHeight:a,maxRowHeight:s,defaultRowHeight:i,rowIndexStart:l,rowIndexEnd:c,...u}=this.props;return F.jsx(Une,{convertPointToIndex:this.convertPointToRow,fullRegionCardinality:bn.FULL_ROWS,getCellExtremaClasses:this.getCellExtremaClasses,getCellIndexClass:Tne,getCellSize:this.getRowHeight,getDragCoordinate:this.getDragCoordinate,getIndexClass:jz,getMouseCoordinate:this.getMouseCoordinate,ghostCellRenderer:this.renderGhostCell,handleResizeEnd:this.handleResizeEnd,handleSizeChanged:this.handleSizeChanged,headerCellIsReorderablePropName:"enableRowReordering",headerCellIsSelectedPropName:"isRowSelected",headerCellRenderer:r,indexEnd:c,indexStart:l,isCellSelected:this.isCellSelected,isGhostIndex:this.isGhostIndex,maxSize:s,minSize:a,resizeOrientation:Dm.HORIZONTAL,selectedRegions:[],toRegion:this.toRegion,wrapCells:this.wrapCells,...u})}}G(jne,"defaultProps",{rowHeaderCellRenderer:Wne});function Wne(e){return F.jsx(Hne,{index:e,name:`${e+1}`})}const Ru=class Ru{static attach(t,n){const r=Ru.debounce(n),a=document.createElement("div");a.className=nGe,a.style.cssText=Ru.RESIZE_SENSOR_STYLE,a.innerHTML=Ru.RESIZE_SENSOR_HTML,t.appendChild(a),getComputedStyle(t,null).getPropertyValue("position")==="static"&&(t.style.position="relative");const s=a.childNodes[0],i=s.childNodes[0],l=a.childNodes[1],c=()=>{i.style.width="100000px",i.style.height="100000px",s.scrollLeft=1e5,s.scrollTop=1e5,l.scrollLeft=1e5,l.scrollTop=1e5};c();let u,d;const f=()=>{if(t==null)return;const m=t.offsetWidth,h=t.offsetHeight;(m!==u||h!==d)&&(u=m,d=h,r.trigger()),c()};return s.addEventListener("scroll",f),l.addEventListener("scroll",f),()=>{t.removeChild(a),r.cancelled=!0}}static debounce(t){const n={cancelled:!1,trigger:()=>{n.triggered||n.cancelled||(n.triggered=!0,requestAnimationFrame(()=>{n.triggered=!1,t()}))},triggered:!1};return n}};G(Ru,"RESIZE_SENSOR_STYLE","position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"),G(Ru,"RESIZE_SENSOR_HTML",`<div class="${rGe}" 1951 style="${Ru.RESIZE_SENSOR_STYLE}"><div style="position: absolute; left: 0; top: 0; transition: 0s;" 1952 ></div></div><div class="${aGe}" style="${Ru.RESIZE_SENSOR_STYLE}" 1953 ><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%;"></div></div>`);let dM=Ru;class JGe extends p.Component{constructor(){super(...arguments);G(this,"renderVerticalGuide",(n,r)=>{const a={left:`${n}px`},s=At(aM,Uz,{[`${Uz}-flush-left`]:n===0});return F.jsx("div",{className:s,style:a},r)});G(this,"renderHorizontalGuide",(n,r)=>{const a={top:`${n}px`},s=At(aM,Lz,{[`${Lz}-flush-top`]:n===0});return F.jsx("div",{className:s,style:a},r)})}shouldComponentUpdate(n){return this.props.className!==n.className?!0:!Qd(this.props.verticalGuides,n.verticalGuides)||!Qd(this.props.horizontalGuides,n.horizontalGuides)}render(){const{verticalGuides:n,horizontalGuides:r,className:a}=this.props,s=n==null?void 0:n.map(this.renderVerticalGuide),i=r==null?void 0:r.map(this.renderHorizontalGuide);return F.jsxs("div",{className:At(a,G4),children:[s,i]})}}const eqe=["className"];class tqe extends p.Component{constructor(){super(...arguments);G(this,"renderRegion",(n,r)=>{const{className:a,regionStyles:s}=this.props;return F.jsx("div",{className:At(aM,KWe,a),style:s===void 0?void 0:s[r]},r)})}shouldComponentUpdate(n){return!Qd(this.props.regions??[],n.regions??[],Ot.regionsEqual)||!Qd(this.props.regionStyles??[],n.regionStyles??[],oi)||
1953!oi(this.props,n,{include:eqe})}render(){return F.jsx("div",{className:G4,children:this.renderRegionChildren()})}renderRegionChildren(){const{regions:n}=this.props;if(n!=null)return n.map(this.renderRegion)}}var Ut;(function(e){e.MAIN="main",e.TOP="top",e.LEFT="left",e.TOP_LEFT="top-left"})(Ut||(Ut={}));class H0 extends Ky{render(){var g,v,y,b,E,w;const{grid:t,enableRowHeader:n,quadrantType:r,bodyRenderer:a,enableColumnHeader:s}=this.props,i=r===Ut.TOP||r===Ut.TOP_LEFT,l=r===Ut.LEFT||r===Ut.TOP_LEFT,c=At(BWe,this.getQuadrantCssClass(),this.props.className),u=n&&((v=(g=this.props).menuRenderer)==null?void 0:v.call(g)),d=n&&((b=(y=this.props).rowHeaderCellRenderer)==null?void 0:b.call(y,i)),f=s&&((w=(E=this.props).columnHeaderCellRenderer)==null?void 0:w.call(E,l)),m=a(r,i,l),h={height:t.getHeight(),width:t.getWidth()};return F.jsx("div",{className:c,style:this.props.style,ref:this.props.quadrantRef,children:F.jsxs("div",{className:WWe,ref:this.props.scrollContainerRef,onScroll:this.props.onScroll,onWheel:this.props.onWheel,children:[F.jsxs("div",{className:pGe,children:[u,f]}),F.jsxs("div",{className:vWe,style:h,children:[d,F.jsx("div",{className:jWe,ref:this.props.bodyRef,children:m})]})]})})}validateProps(t){const{quadrantType:n}=t;t.onScroll!=null&&n!=null&&n!==Ut.MAIN&&console.warn(SGe)}getQuadrantCssClass(){switch(this.props.quadrantType){case Ut.MAIN:return kne;case Ut.TOP:return qWe;case Ut.LEFT:return _ne;case Ut.TOP_LEFT:return YWe;default:return}}}G(H0,"defaultProps",{enableColumnHeader:!0,enableRowHeader:!0});class nqe{constructor(){G(this,"cachedRowHeaderWidth",0);G(this,"cachedColumnHeaderHeight",0);G(this,"cachedScrollLeft",0);G(this,"cachedScrollTop",0);G(this,"cachedScrollContainerClientWidth");G(this,"cachedScrollContainerClientHeight");this.reset()}reset(){this.cachedRowHeaderWidth=0,this.cachedColumnHeaderHeight=0,this.cachedScrollLeft=0,this.cachedScrollTop=0}getScrollOffset(t){return t==="scrollLeft"?this.cachedScrollLeft:this.cachedScrollTop}getRowHeaderWidth(){return this.cachedRowHeaderWidth}getColumnHeaderHeight(){return this.cachedColumnHeaderHeight}getScrollContainerClientWidth(){return this.cachedScrollContainerClientWidth}getScrollContainerClientHeight(){return this.cachedScrollContainerClientHeight}setColumnHeaderHeight(t){this.cachedColumnHeaderHeight=t}setRowHeaderWidth(t){this.cachedRowHeaderWidth=t}setScrollOffset(t,n){t==="scrollLeft"?this.cachedScrollLeft=n:this.cachedScrollTop=n}setScrollContainerClientWidth(t){this.cachedScrollContainerClientWidth=t}setScrollContainerClientHeight(t){this.cachedScrollContainerClientHeight=t}}const rqe=500,Zz=1,aqe=["enableRowHeader","loadingOptions","numFrozenColumns","numFrozenRows","numColumns","numRows","enableColumnInteractionBar","didHeadersMount","enableColumnHeader"];class Gne extends Ky{constructor(n){super(n);G(this,"quadrantRefs",{[Ut.MAIN]:{},[Ut.TOP]:{},[Ut.LEFT]:{},[Ut.TOP_LEFT]:{}});G(this,"quadrantRefHandlers",{[Ut.MAIN]:this.generateQuadrantRefHandlers(Ut.MAIN),[Ut.TOP]:this.generateQuadrantRefHandlers(Ut.TOP),[Ut.LEFT]:this.generateQuadrantRefHandlers(Ut.LEFT),[Ut.TOP_LEFT]:this.generateQuadrantRefHandlers(Ut.TOP_LEFT)});G(this,"wasMainQuadrantScrollTriggeredByWheelEvent",!1);G(this,"throttledHandleMainQuadrantScroll");G(this,"throttledHandleWheel");G(this,"cancelPendingViewSync");G(this,"cache");G(this,"renderTableOverlay",()=>{var s,i;const n=this.cache.getColumnHeaderHeight(),r=this.quadrantRefs[Ut.MAIN].scrollContainer,a=DN(r,"vertical");return(i=(s=this.props).renderScrollIndicatorOverlay)==null?void 0:i.call(s,a,n)});G(this,"renderMainQuadrantMenu",()=>{var n,r;return(r=(n=this.props).menuRenderer)==null?void 0:r.call(n,this.quadrantRefHandlers[Ut.MAIN].menu)});G(this,"renderTopQuadrantMenu",()=>{var n,r;return(r=(n=this.props).menuRenderer)==null?void 0:r.call(n,this.quadrantRefHandlers[Ut.TOP].menu)});G(this,"renderLeftQuadrantMenu",()=>{var n,r;return(r=(n=this.props).menuRenderer)==null?void 0:r.call(n,this.quadrantRefHandlers[Ut.LEFT].menu)});G(this,"renderTopLeftQuadrantMenu",()=>{var n,r;return(r=(n=this.props).menuRenderer)==null?void 0:r.call(n,this.quadrantRefHandlers[Ut.TOP_LEFT].menu)});G(this,"renderMainQuadrantColumnHeader",n=>{var i,l;const r=this.quadrantRefHandlers[Ut.MAIN].columnHeader,a=this.handleColumnResizeGuideMain,s=this.handleColumnsReordering;
1953if(r!==void 0)return(l=(i=this.props).columnHeaderRenderer)==null?void 0:l.call(i,r,a,s,n)});G(this,"renderTopQuadrantColumnHeader",n=>{var i,l;const r=this.quadrantRefHandlers[Ut.TOP].columnHeader,a=this.handleColumnResizeGuideTop,s=this.handleColumnsReordering;if(r!==void 0)return(l=(i=this.props).columnHeaderRenderer)==null?void 0:l.call(i,r,a,s,n)});G(this,"renderLeftQuadrantColumnHeader",n=>{var i,l;const r=this.quadrantRefHandlers[Ut.LEFT].columnHeader,a=this.handleColumnResizeGuideLeft,s=this.handleColumnsReordering;if(r!==void 0)return(l=(i=this.props).columnHeaderRenderer)==null?void 0:l.call(i,r,a,s,n)});G(this,"renderTopLeftQuadrantColumnHeader",n=>{var i,l;const r=this.quadrantRefHandlers[Ut.TOP_LEFT].columnHeader,a=this.handleColumnResizeGuideTopLeft,s=this.handleColumnsReordering;if(r!==void 0)return(l=(i=this.props).columnHeaderRenderer)==null?void 0:l.call(i,r,a,s,n)});G(this,"renderMainQuadrantRowHeader",n=>{var a,s;const r=this.quadrantRefHandlers[Ut.MAIN].rowHeader;if(r!==void 0)return(s=(a=this.props).rowHeaderRenderer)==null?void 0:s.call(a,r,this.handleRowResizeGuideMain,this.handleRowsReordering,n)});G(this,"renderTopQuadrantRowHeader",n=>{var a,s;const r=this.quadrantRefHandlers[Ut.TOP].rowHeader;if(r!==void 0)return(s=(a=this.props).rowHeaderRenderer)==null?void 0:s.call(a,r,this.handleRowResizeGuideTop,this.handleRowsReordering,n)});G(this,"renderLeftQuadrantRowHeader",n=>{var a,s;const r=this.quadrantRefHandlers[Ut.LEFT].rowHeader;if(r!==void 0)return(s=(a=this.props).rowHeaderRenderer)==null?void 0:s.call(a,r,this.handleRowResizeGuideLeft,this.handleRowsReordering,n)});G(this,"renderTopLeftQuadrantRowHeader",n=>{var a,s;const r=this.quadrantRefHandlers[Ut.TOP_LEFT].rowHeader;if(r!==void 0)return(s=(a=this.props).rowHeaderRenderer)==null?void 0:s.call(a,r,this.handleRowResizeGuideTopLeft,this.handleRowsReordering,n)});G(this,"handleMainQuadrantScroll",n=>{var i,l;if(this.wasMainQuadrantScrollTriggeredByWheelEvent){this.wasMainQuadrantScrollTriggeredByWheelEvent=!1;return}const r=this.quadrantRefs[Ut.MAIN].scrollContainer;if(r==null)return;(l=(i=this.props).onScroll)==null||l.call(i,n);const a=r.scrollLeft,s=r.scrollTop;this.handleScrollOffsetChange("scrollLeft",a),this.handleScrollOffsetChange("scrollTop",s),this.syncQuadrantViewsDebounced()});G(this,"handleWheel",n=>{var s,i;(i=(s=this.props).onScroll)==null||i.call(s,n);const r=this.getNextScrollOffset("horizontal",n.deltaX),a=this.getNextScrollOffset("vertical",n.deltaY);(r!=null||a!=null)&&(this.wasMainQuadrantScrollTriggeredByWheelEvent=!0),r!==void 0&&(this.quadrantRefs[Ut.MAIN].scrollContainer.scrollLeft=r,this.handleScrollOffsetChange("scrollLeft",r)),a!==void 0&&(this.quadrantRefs[Ut.MAIN].scrollContainer.scrollTop=a,this.handleScrollOffsetChange("scrollTop",a)),this.syncQuadrantViewsDebounced()});G(this,"getNextScrollOffset",(n,r)=>{const{grid:a,isHorizontalScrollDisabled:s,isVerticalScrollDisabled:i}=this.props,l=n==="horizontal",c=l?"scrollLeft":"scrollTop";if(l?s:i)return;let d=l?this.cache.getScrollContainerClientWidth():this.cache.getScrollContainerClientHeight();d==null&&(d=this.updateScrollContainerClientSize(l));const f=l?this.cache.getScrollContainerClientWidth()-this.cache.getRowHeaderWidth():this.cache.getScrollContainerClientHeight()-this.cache.getColumnHeaderHeight(),m=l?a.getWidth():a.getHeight(),h=Math.max(0,m-f),g=this.cache.getScrollOffset(c);return bg(g+r,0,h)});G(this,"handleColumnResizeGuideMain",n=>{this.invokeColumnResizeHandler(n,Ut.MAIN)});G(this,"handleColumnResizeGuideTop",n=>{this.invokeColumnResizeHandler(n,Ut.TOP)});G(this,"handleColumnResizeGuideLeft",n=>{this.invokeColumnResizeHandler(n,Ut.LEFT)});G(this,"handleColumnResizeGuideTopLeft",n=>{this.invokeColumnResizeHandler(n,Ut.TOP_LEFT)});G(this,"invokeColumnResizeHandler",(n,r)=>{var s,i;const a=this.adjustVerticalGuides(n,r);(i=(s=this.props).handleColumnResizeGuide)==null||i.call(s,a)});G(this,"handleRowResizeGuideMain",n=>{this.invokeRowResizeHandler(n,Ut.MAIN)});G(this,"handleRowResizeGuideTop",n=>{this.invokeRowResizeHandler(n,Ut.TOP)});G(this,"handleRowResizeGuideLeft",n=>{this.invokeRowResizeHandler(n,Ut.LEFT)});G(this,"handleRowResizeGuideTopLeft",n=>{this.invokeRowResizeHandler(n,Ut.TOP_LEFT)});G(this,"invokeRowResizeHandler",(n,r)=>{var s,i;const a=this.adjustHorizontalGuides(n,r);(i=(s=this.props).handleRowResizeGuide)==null||i.call(s,a)});G(this,"handleColumnsReordering",(n,r,a)=>{var d,f;const s=Fr.reorderedIndexToGuideIndex(n,r,a),i=this.props.grid.getCumulativeWidthBefore(s),{numFrozenColumns:l=0}=this.props,c=s<=l?Ut.TOP_LEFT:Ut.TOP,u=this.adjustVerticalGuides([i],c);(f=(d=this.props).handleColumnsReordering)==null||f.call(d,u)});G(this,"handleRowsReordering",(n,r,a)=>{var d,f;const s=Fr.reorderedIndexToGuideIndex(n,r,a),i=this.props.grid.getCumulativeHeightBefore(s),{numFrozenRows:l=0}=this.props,c=s<=l?Ut.TOP_LEFT:Ut.LEFT,u=this.adjustHorizontalGuides([i],c);(f=(d=this.props).handleRowsReordering)==null||f.call(d,u)});G(this,"syncQuadrantViewsDebounced",()=>{var r;const{viewSyncDelay:n}=this.props;n<0?this.syncQuadrantViews():((r=this.cancelPendingViewSync)==null||r.call(this),this.cancelPendingViewSync=this.setTimeout(this.syncQuadrantViews,n))});G(this,"syncQuadrantViews",()=>{const r=this.quadrantRefs[Ut.MAIN].scrollContainer,a=this.measureDesiredRowHeaderWidth(),s=this.measureDesiredColumnHeaderHeight(),i=this.getSecondaryQuadrantGridSize("width"),l=this.getSecondaryQuadrantGridSize("height"),c=a+i,u=s+l,d=DN(r,"vertical"),f=DN(r,"horizontal"),m=this.maybeIncreaseToMinColHeaderHeight(s),h=this.maybeIncreaseToMinColHeaderHeight(u);this.cache.setRowHeaderWidth(a),this.cache.setColumnHeaderHeight(s),this.cache.setScrollC
1953ontainerClientWidth(void 0),this.cache.setScrollContainerClientHeight(void 0),this.maybesSetQuadrantRowHeaderSizes(a),this.maybeSetQuadrantMenuElementSizes(a,m),this.maybeSetQuadrantSizes(c,h),this.maybeSetQuadrantPositionOffset(Ut.TOP,"right",d),this.maybeSetQuadrantPositionOffset(Ut.LEFT,"bottom",f),this.maybeSetQuadrantScrollOffset(Ut.LEFT,"scrollTop"),this.maybeSetQuadrantScrollOffset(Ut.TOP,"scrollLeft")});G(this,"maybeSetQuadrantSizes",(n,r)=>{const a=Fr.clamp(n,this.props.enableRowHeader?bi.MIN_ROW_HEADER_WIDTH:0),s=Fr.clamp(r,this.props.enableColumnHeader?bi.MIN_COLUMN_HEADER_HEIGHT:0);this.maybesSetQuadrantSize(Ut.LEFT,"width",a),this.maybesSetQuadrantSize(Ut.TOP,"height",s),this.maybesSetQuadrantSize(Ut.TOP_LEFT,"width",a),this.maybesSetQuadrantSize(Ut.TOP_LEFT,"height",s)});G(this,"maybesSetQuadrantSize",(n,r,a)=>{const{quadrant:s}=this.quadrantRefs[n];s!=null&&(s.style[r]=`${a}px`)});G(this,"maybeSetQuadrantPositionOffset",(n,r,a)=>{const{quadrant:s}=this.quadrantRefs[n];s!=null&&(s.style[r]=`${a}px`)});G(this,"maybesSetQuadrantRowHeaderSizes",n=>{const r=Fr.clamp(n,this.props.enableRowHeader?bi.MIN_ROW_HEADER_WIDTH:0);this.maybeSetQuadrantRowHeaderSize(Ut.MAIN,r),this.maybeSetQuadrantRowHeaderSize(Ut.TOP,r),this.maybeSetQuadrantRowHeaderSize(Ut.LEFT,r),this.maybeSetQuadrantRowHeaderSize(Ut.TOP_LEFT,r)});G(this,"maybeSetQuadrantRowHeaderSize",(n,r)=>{const{rowHeader:a}=this.quadrantRefs[n];a!=null&&(a.style.width=`${r}px`)});G(this,"maybeSetQuadrantMenuElementSizes",(n,r)=>{const a=Fr.clamp(n,this.props.enableRowHeader?bi.MIN_ROW_HEADER_WIDTH:0);this.maybeSetQuadrantMenuElementSize(Ut.MAIN,a,r),this.maybeSetQuadrantMenuElementSize(Ut.TOP,a,r),this.maybeSetQuadrantMenuElementSize(Ut.LEFT,a,r),this.maybeSetQuadrantMenuElementSize(Ut.TOP_LEFT,a,r)});G(this,"maybeSetQuadrantMenuElementSize",(n,r,a)=>{const{menu:s}=this.quadrantRefs[n];s!=null&&(s.style.width=`${r}px`,s.style.height=`${a}px`)});G(this,"maybeSetQuadrantScrollOffset",(n,r,a)=>{const{scrollContainer:s}=this.quadrantRefs[n],i=a??this.cache.getScrollOffset(r);s!=null&&(s[r]=i)});G(this,"handleScrollOffsetChange",(n,r)=>{this.cache.setScrollOffset(n,r);const a=n==="scrollLeft"?Ut.TOP:Ut.LEFT;this.maybeSetQuadrantScrollOffset(a,n)});this.throttledHandleMainQuadrantScroll=C3(this.handleMainQuadrantScroll),this.throttledHandleWheel=C3(this.handleWheel),this.cache=new nqe}scrollToPosition(n,r){const{scrollContainer:a}=this.quadrantRefs[Ut.MAIN];a!=null&&(this.wasMainQuadrantScrollTriggeredByWheelEvent=!1,a.scrollLeft=n,a.scrollTop=r,this.syncQuadrantViews())}synchronizeQuadrantViews(){this.syncQuadrantViews()}componentDidMount(){this.emitRefs(),this.syncQuadrantViews()}componentDidUpdate(n){(!oi(this.props,n,{include:aqe})||this.didFrozenColumnWidthsChange(n)||this.didFrozenRowHeightsChange(n))&&(this.emitRefs(),this.syncQuadrantViews())}render(){const{grid:n,enableRowHeader:r,bodyRenderer:a,throttleScrolling:s,enableColumnHeader:i}=this.props,l=s?this.throttledHandleMainQuadrantScroll:this.handleMainQuadrantScroll,c=s?this.throttledHandleWheel:this.handleWheel,u={bodyRenderer:a,enableColumnHeader:i,enableRowHeader:r,grid:n,onWheel:c},d=this.shouldRenderLeftQuadrants(),f=d?F.jsx(H0,{...u,quadrantRef:this.quadrantRefHandlers[Ut.LEFT].quadrant,quadrantType:Ut.LEFT,columnHeaderCellRenderer:this.renderLeftQuadrantColumnHeader,menuRenderer:this.renderLeftQuadrantMenu,rowHeaderCellRenderer:this.renderLeftQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Ut.LEFT].scrollContainer}):void 0,m=d?F.jsx(H0,{...u,quadrantRef:this.quadrantRefHandlers[Ut.TOP_LEFT].quadrant,quadrantType:Ut.TOP_LEFT,columnHeaderCellRenderer:this.renderTopLeftQuadrantColumnHeader,menuRenderer:this.renderTopLeftQuadrantMenu,rowHeaderCellRenderer:this.renderTopLeftQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Ut.TOP_LEFT].scrollContainer}):void 0;return F.jsxs("div",{className:GWe,children:[this.renderTableOverlay(),F.jsx(H0,{...u,bodyRef:this.props.bodyRef,onScroll:l,quadrantRef:this.quadrantRefHandlers[Ut.MAIN].quadrant,quadrantType:Ut.MAIN,columnHeaderCellRenderer:this.renderMainQuadrantColumnHeader,menuRenderer:this.renderMainQuadrantMenu,rowHeaderCellRenderer:this.renderMainQuadrantRowHeader,scrollC
1953ontainerRef:this.quadrantRefHandlers[Ut.MAIN].scrollContainer}),F.jsx(H0,{...u,quadrantRef:this.quadrantRefHandlers[Ut.TOP].quadrant,quadrantType:Ut.TOP,columnHeaderCellRenderer:this.renderTopQuadrantColumnHeader,menuRenderer:this.renderTopQuadrantMenu,rowHeaderCellRenderer:this.renderTopQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Ut.TOP].scrollContainer}),f,m]})}generateQuadrantRefHandlers(n){const r=(s,i)=>(s[i]=l=>this.quadrantRefs[n][i]=l,s);return["columnHeader","menu","quadrant","rowHeader","scrollContainer"].reduce(r,{})}emitRefs(){zu(this.props.quadrantRef,this.quadrantRefs[Ut.MAIN].quadrant),zu(this.props.rowHeaderRef,this.quadrantRefs[Ut.MAIN].rowHeader),zu(this.props.columnHeaderRef,this.quadrantRefs[Ut.MAIN].columnHeader),zu(this.props.scrollContainerRef,this.quadrantRefs[Ut.MAIN].scrollContainer)}updateScrollContainerClientSize(n){const r=this.quadrantRefs[Ut.MAIN].scrollContainer;return n?(this.cache.setScrollContainerClientWidth(r==null?void 0:r.clientWidth),this.cache.getScrollContainerClientWidth()):(this.cache.setScrollContainerClientHeight(r==null?void 0:r.clientHeight),this.cache.getScrollContainerClientHeight())}maybeIncreaseToMinColHeaderHeight(n){return this.props.enableColumnHeader&&n<=Zz?bi.MIN_COLUMN_HEADER_HEIGHT:n}didFrozenColumnWidthsChange(n){return this.props.numFrozenColumns>0&&this.props.grid!==n.grid&&this.props.grid.getCumulativeWidthAt(this.props.numFrozenColumns-1)!==n.grid.getCumulativeWidthAt(n.numFrozenColumns-1)}didFrozenRowHeightsChange(n){return this.props.numFrozenRows>0&&this.props.grid!==n.grid&&this.props.grid.getCumulativeHeightAt(this.props.numFrozenRows-1)!==n.grid.getCumulativeHeightAt(n.numFrozenRows-1)}getSecondaryQuadrantGridSize(n){const{grid:r,numFrozenColumns:a,numFrozenRows:s}=this.props,i=(n==="width"?a:s)??0,l=n==="width"?r.getCumulativeWidthAt:r.getCumulativeHeightAt;return i>0?l(i-1):Zz}measureDesiredRowHeaderWidth(){const n=this.quadrantRefs[Ut.MAIN].rowHeader;return n==null?0:(n.style.width="auto",Fr.clamp(n.clientWidth,bi.MIN_ROW_HEADER_WIDTH))}measureDesiredColumnHeaderHeight(){const n=this.quadrantRefs[Ut.MAIN].columnHeader;return n==null?0:Fr.clamp(n.clientHeight,bi.MIN_COLUMN_HEADER_HEIGHT)}shouldRenderLeftQuadrants(n=this.props){const{enableRowHeader:r,numFrozenColumns:a}=n;return r||a!=null&&a>0}adjustVerticalGuides(n,r){const s=r===Ut.LEFT||r===Ut.TOP_LEFT?0:this.cache.getScrollOffset("scrollLeft"),i=this.cache.getRowHeaderWidth();return(n==null?void 0:n.map(l=>l-s+i))??[]}adjustHorizontalGuides(n,r){const s=r===Ut.TOP||r===Ut.TOP_LEFT?0:this.cache.getScrollOffset("scrollTop"),i=this.cache.getColumnHeaderHeight();return(n==null?void 0:n.map(l=>l-s+i))??[]}}G(Gne,"defaultProps",{enableColumnHeader:!0,enableColumnInteractionBar:void 0,enableRowHeader:!0,isHorizontalScrollDisabled:!1,isVerticalScrollDisabled:!1,throttleScrolling:!0,viewSyncDelay:rqe});const Xz={getApproximateCharWidth:8,getApproximateLineHeight:18,getCellHorizontalPadding:2*Ty.CELL_HORIZONTAL_PADDING,getNumBufferLines:1};function sqe(e,t,n){const r=Object.keys(Xz),a=(s,i)=>{const l=e==null?void 0:e[i];return typeof l=="function"?s[i]=l(t,n):l!=null?s[i]=l:s[i]=Xz[i],s};return r.reduce(a,{})}function iqe(e,t,n,r){const a=t.length,s=[];for(let i=0;i<e;i++){let l=0;for(let c=0;c<a;c++){const{getApproximateCharWidth:u,getApproximateLineHeight:d,getCellHorizontalPadding:f,getNumBufferLines:m}=sqe(r,i,c),h=n(i,c),g=Fr.getApproxCellHeight(h,t[c],u,d,f,m);g>l&&(l=g)}s.push(l)}return s}function oqe(e,t,n,r,a){let s=0;if(a===void 0){const i=e.getColumnIndicesInRect(t);for(let l=i.columnIndexStart;l<=i.columnIndexEnd;l++)s=Math.max(s,n.getTallestVisibleCellInColumn(l))}else{const l=(Array.isArray(a)?a:[a]).map(c=>n.getTallestVisibleCellInColumn(c));s=Math.max(...l)}return Array(r).fill(s)}const qne="blueprint-table-post-message",Xf={callbacks:[],triggered:!1},lqe=e=>{if(e.source!==window||e.data!==qne)return;Xf.triggered=!1;let t=null;Xf.callbacks.length>0&&(t=Xf.callbacks.shift()),Xf.callbacks.length>0&&Yne(),t&&t()};typeof window<"u"&&window.addEventListener!=null&&window.addEventListener("message",lqe,!1);const Yne=()=>{Xf.triggered||(Xf.triggered=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{postMessage(qne,"*")})}))},cqe=e=>{Xf.callbacks.push(e),Yne()},Tc=class Tc{constructor(){G(this,"currentObjects",{});G(this,"oldObjects",{});G(this,"batchArgs",{});G(this,"done",!0);G(this,"callback");G(this,"handleIdleCallback",()=>{const t=this.callback;delete this.callback,t==null||t()});G(this,"mapCurrentObjectKey",t=>this.currentObjects[t])}reset(){this.batchArgs={},this.oldObjects=this.currentObjects,this.currentObjects={}}
1953startNewBatch(){this.batchArgs={}}addArgsToBatch(...t){this.batchArgs[this.getKey(t)]=t}removeOldAddNew(t,n=Tc.DEFAULT_ADD_LIMIT,r=Tc.DEFAULT_REMOVE_LIMIT,a=Tc.DEFAULT_UPDATE_LIMIT){this.setKeysDifference(this.currentObjects,this.batchArgs,r).forEach(d=>delete this.currentObjects[d]),this.setKeysDifference(this.oldObjects,this.batchArgs,-1).forEach(d=>delete this.oldObjects[d]),Object.keys(this.oldObjects).forEach(d=>{this.currentObjects[d]==null&&(this.currentObjects[d]=this.oldObjects[d])}),this.setKeysIntersection(this.oldObjects,this.currentObjects,a).forEach(d=>{delete this.oldObjects[d],this.currentObjects[d]=t.apply(void 0,this.batchArgs[d])}),this.setKeysDifference(this.batchArgs,this.currentObjects,n).forEach(d=>this.currentObjects[d]=t.apply(void 0,this.batchArgs[d])),this.done=this.setHasSameKeys(this.batchArgs,this.currentObjects)&&Object.keys(this.oldObjects).length===0}isDone(){return this.done}getList(){return Object.keys(this.currentObjects).map(this.mapCurrentObjectKey)}idleCallback(t){this.callback||(this.callback=t,cqe(this.handleIdleCallback))}cancelOutstandingCallback(){delete this.callback}setList(t,n){this.reset(),t.forEach((r,a)=>{this.addArgsToBatch(...r),this.currentObjects[this.getKey(r)]=n[a]}),this.done=!0}getKey(t){return t.join(Tc.ARG_DELIMITER)}setKeysDifference(t,n,r){return this.setKeysOperation(t,n,"difference",r)}setKeysIntersection(t,n,r){return this.setKeysOperation(t,n,"intersect",r)}setKeysOperation(t,n,r,a){const s=[],i=Object.keys(t);for(let l=0;l<i.length&&(a<0||s.length<a);l++){const c=i[l];(r==="difference"&&t[c]&&!n[c]||r==="intersect"&&t[c]&&n[c])&&s.push(c)}return s}setHasSameKeys(t,n){const r=Object.keys(t),a=Object.keys(n);if(r.length!==a.length)return!1;for(const s of r)if(n[s]===void 0)return!1;return!0}};G(Tc,"DEFAULT_ADD_LIMIT",20),G(Tc,"DEFAULT_UPDATE_LIMIT",20),G(Tc,"DEFAULT_REMOVE_LIMIT",20),G(Tc,"ARG_DELIMITER","|");let fM=Tc;const uqe=["viewportRect"],dqe=["columnIndexEnd","columnIndexStart","rowIndexEnd","rowIndexStart"],N_=class N_ extends Ky{constructor(){super(...arguments);G(this,"batcher",new fM);G(this,"didForceUpdate",!1);G(this,"renderNewCell",(n,r)=>{const{columnIndexEnd:a,grid:s,rowIndexEnd:i}=this.props,l=s.getExtremaClasses(n,r,i,a),c=s.isGhostIndex(n,r);return this.renderCell(n,r,l,c)});G(this,"renderCell",(n,r,a,s)=>{const{cellRenderer:i,loading:l,grid:c}=this.props;let u=s?oM():i(n,r);u=u??oM();const d=At(fqe(n,r),a,{[bWe]:s,[xWe]:n%2===1,[EWe]:n%2===0},u.props.className),f=N_.cellReactKey(n,r),m=s?c.getGhostCellRect(n,r):c.getCellRect(n,r),h=u.props.loading!=null?u.props.loading:l,g={...u.props.style,...nc.style(m)},v=this.isCellFocused(n,r);return p.cloneElement(u,{className:d,isFocused:v,key:f,loading:h,style:g})});G(this,"didViewportRectChange",(n,r)=>n==null&&r==null?!1:n==null||r==null?!0:!n.equals(r))}static cellReactKey(n,r){return`cell-${n}-${r}`}componentDidMount(){this.maybeInvokeOnCompleteRender()}shouldComponentUpdate(n){return!oi(n,this.props,{exclude:uqe})||this.didViewportRectChange(n.viewportRect,this.props.viewportRect)}componentDidUpdate(n){if(this.didForceUpdate){this.didForceUpdate=!1;return}!oi(n,this.props,{exclude:dqe})&&(this.batcher.reset(),this.didForceUpdate=!0,this.forceUpdate()),this.maybeInvokeOnCompleteRender()}componentWillUnmount(){this.batcher.cancelOutstandingCallback()}render(){const{renderMode:n}=this.props,r=n===_l.BATCH?this.renderBatchedCells():this.renderAllCells();return F.jsx("div",{className:uWe,children:r})}renderBatchedCells(){const{columnIndexEnd:n,columnIndexStart:r,rowIndexEnd:a,rowIndexStart:s}=this.props;this.batcher.startNewBatch();for(let i=s;i<=a;i++)for(let l=r;l<=n;l++)this.batcher.addArgsToBatch(i,l);return this.batcher.removeOldAddNew(this.renderNewCell),this.batcher.isDone()||this.batcher.idleCallback(()=>this.forceUpdate()),this.batcher.getList()}renderAllCells(){const{columnIndexEnd:n,columnIndexStart:r,rowIndexEnd:a,rowIndexStart:s}=this.props,i=[],l=[];for(let c=s;c<=a;c++)for(let u=r;u<=n;u++)i.push(this.renderNewCell(c,u)),l.push([c,u]);return this.batcher.setList(l,i),i}isCellFocused(n,r){const{focusedRegion:a}=this.props;switch(a==null?void 0:a.type){case na.CELL:return a.row===n&&a.col===r;case na.ROW:return a.row===n;case void 0:return!1}}maybeInvokeOnCompleteRender(){const{onCompleteRender:n,renderMode:r}=this.props;(r===_l.NONE||r===_l.BATCH&&this.batcher.isDone())&&(n==null||n())}};G(N_,"defaultProps",{renderMode:_l.BATCH});let mM=N_;function fqe(e,t){return[Tne(e),q4(t)]}const Qz=["selectedRegions"];class Kne extends Ky{constructor(){super(...arguments);G(this,"activationCell",null);G(this,"containerRef",p.createRef());G(this,"renderContextMenu",({mouseEvent:n})=>{const{grid:r,bodyContextMenuRenderer:a,selectedRegions:s=[]}=this.props,{numRows:i,numCols:l}=r;if(a===void 0||n===void 0||n.target.closest(`.${sM}`)!==null)return;const d=this.locateClick(n.nativeEvent);let f=s;Ot.findContainingRegion(s,d)<0&&(f=[d]);const h=new zGe(d,f,i,l),g=a(h);return g??void 0});G(this,"handleContextMenu",n=>{const{focusMode:r,onFocusedRegion:a,onSelection:s,selectedRegions:i=[]}=this.props;if(n.target.closest(`.${sM}`)!==null)return;const u=this.locateClick(n.nativeEvent);let d=i;if(Ot.findContainingRegion(i,u)<0){d=[u],s(d);const m=Ot.getFocusCellCoordinatesFromRegion(u),h=Lb(r,m);h!=null&&a(h)}});G(this,"handleSelectionEnd",()=>{this.activationCell=null});G(this,"locateClick",n=>(this.activationCell=this.props.locator.convertPointToCell(n.clientX,n.clientY),Ot.cell(this.activationCell.row,this.activationCell.col)));G(this,"locateDrag",(n,r,a=!1)=>
1953{if(this.activationCell===null)return;const s=this.activationCell,i=this.props.locator.convertPointToCell(r.current[0],r.current[1]);return a?Ot.cell(i.row,i.col):Ot.cell(s.row,s.col,i.row,i.col)})}shouldComponentUpdate(n){return!oi(this.props,n,{exclude:Qz})||!qo(this.props,n,Qz)}render(){const{grid:n,numFrozenColumns:r,numFrozenRows:a}=this.props,s=n.getRect().sizeStyle(),i={height:a!=null?n.getCumulativeHeightAt(a-1):s.height,width:r!=null?n.getCumulativeWidthAt(r-1):s.width};return F.jsx(d_,{enableMultipleSelection:this.props.enableMultipleSelection,focusedRegion:this.props.focusedRegion,focusMode:this.props.focusMode,locateClick:this.locateClick,locateDrag:this.locateDrag,onFocusedRegion:this.props.onFocusedRegion,onSelection:this.props.onSelection,onSelectionEnd:this.handleSelectionEnd,selectedRegions:this.props.selectedRegions,selectedRegionTransform:this.props.selectedRegionTransform,targetRef:this.containerRef,children:F.jsx(gD,{className:At(gWe,yWe),content:this.renderContextMenu,disabled:this.props.bodyContextMenuRenderer===void 0,onContextMenu:this.handleContextMenu,ref:this.containerRef,style:i,children:F.jsx(mM,{cellRenderer:this.props.cellRenderer,focusedRegion:this.props.focusedRegion,grid:n,loading:this.props.loading,onCompleteRender:this.props.onCompleteRender,renderMode:this.props.renderMode,columnIndexStart:this.props.columnIndexStart,columnIndexEnd:this.props.columnIndexEnd,rowIndexStart:this.props.rowIndexStart,rowIndexEnd:this.props.rowIndexEnd,viewportRect:this.props.viewportRect})})})}}G(Kne,"defaultProps",{loading:!1,renderMode:_l.BATCH});var Jr;(function(e){e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right"})(Jr||(Jr={}));function mqe(e){switch(e){case Jr.UP:return{cols:0,rows:-1};case Jr.DOWN:return{cols:0,rows:1};case Jr.LEFT:return{cols:-1,rows:0};case Jr.RIGHT:return{cols:1,rows:0}}}function hqe(e,t,n){if(Ot.getRegionCardinality(e)===bn.FULL_TABLE)return e;const r=Ot.copy(e);let a=0,s=0;if(n!=null){const l=Pne(r,n),c=Dne(r,n),u=Lne(r,n),d=$ne(r,n);t===Jr.UP?a=l&&!c?1:0:t===Jr.DOWN?a=c&&!l?0:1:t===Jr.LEFT?s=u&&!d?1:0:s=d&&!u?0:1}else a=t===Jr.DOWN?1:0,s=t===Jr.RIGHT?1:0;const i=mqe(t);return r.rows!=null&&(r.rows[a]+=i.rows),r.cols!=null&&(r.cols[s]+=i.cols),r}class yv{constructor(t,n,r){G(this,"props");G(this,"state");G(this,"tableHandlers");G(this,"grid");G(this,"selectAll",t=>{if(this.tableHandlers.getEnabledSelectionHandler(bn.FULL_TABLE)([Ot.table()]),t){const r=vl(this.props),a=Ot.getFocusCellCoordinatesFromRegion(Ot.table()),s=Lb(r,a);s!=null&&this.tableHandlers.handleFocus(s)}});G(this,"handleSelectAllHotkey",t=>{t.preventDefault(),t.stopPropagation(),this.selectAll(!1)});G(this,"handleSelectionResizeUp",t=>this.handleSelectionResize(t,Jr.UP));G(this,"handleSelectionResizeDown",t=>this.handleSelectionResize(t,Jr.DOWN));G(this,"handleSelectionResizeLeft",t=>this.handleSelectionResize(t,Jr.LEFT));G(this,"handleSelectionResizeRight",t=>this.handleSelectionResize(t,Jr.RIGHT));G(this,"handleSelectionResize",(t,n)=>{t.preventDefault(),t.stopPropagation();const{focusedRegion:r,selectedRegions:a}=this.state,s=One(a,r);if(s===void 0)return;const i=a[s],l=hqe(i,n,r);this.updateSelectedRegionAtIndex(l,s)});G(this,"handleFocusMoveLeft",t=>this.handleFocusMove(t,Jr.LEFT));G(this,"handleFocusMoveLeftInternal",t=>this.handleFocusMoveInternal(t,Jr.LEFT));G(this,"handleFocusMoveRight",t=>this.handleFocusMove(t,Jr.RIGHT));G(this,"handleFocusMoveRightInternal",t=>this.handleFocusMoveInternal(t,Jr.RIGHT));G(this,"handleFocusMoveUp",t=>this.handleFocusMove(t,Jr.UP));G(this,"handleFocusMoveUpInternal",t=>this.handleFocusMoveInternal(t,Jr.UP));G(this,"handleFocusMoveDown",t=>this.handleFocusMove(t,Jr.DOWN));G(this,"handleFocusMoveDownInternal",t=>this.handleFocusMoveInternal(t,Jr.DOWN));G(this,"handleFocusMove",(t,n)=>{const{focusedRegion:r}=this.state;if(r==null)return;const a=yv.moveFocusedRegionInDirection(r,n);if(this.isOutOfBounds(a))return;t.preventDefault(),t.stopPropagation();const s=[Ot.getRegionFromFocusedRegion(a)],{selectedRegionTransform:i}=this.props,l=i!=null?s.map(c=>i(c,t)):s;this.tableHandlers.handleSelection(l),this.tableHandlers.handleFocus(a),this.scrollBodyToFocusedRegion(a)});G(this,"handleFocusMoveInternal",(t,n)=>{const{focusedRegion:r,selectedRegions:a}=this.state;if((r==null?void 0:r.type)!==na.CELL)return;let s={...r};if(r.focusSelectionIndex==null&&a.length>0){const i=Ot.getCellRegionFromRegion(a[0],this.grid.numRows,this.grid.numCols);s={col:i.cols[0],focusSelectionIndex:0,row:i.rows[0],type:na.CELL}}else{if(a.length===0){this.handleFocusMove(t,n);return}const i=Ot.getCellRegionFromRegion(a[r.focusSelectionIndex],this.grid.numRows,this.grid.numCols);if(i.cols[0]===i.cols[1]&&i.rows[0]===i.rows[1]&&a.length===1){this.handleFocusMove(t,n);return}switch(n){case Jr.UP:s=this.moveFocusCell("row","col",!0,s,i);break;case Jr.LEFT:s=this.moveFocusCell("col","row",!0,s,i);break;case Jr.DOWN:s=this.moveFocusCell("row","col",!1,s,i);break;case Jr.RIGHT:s=this.moveFocusCell("col","row",!1,s,i);break}}this.isOutOfBounds(s)||(t.preventDefault(),t.stopPropagation(),this.tableHandlers.handleFocus(s),this.scrollBodyToFocusedRegion(s))});G(this,"scrollBodyToFocusedRegion",t=>{const{row:n}=t,r=cg(t),{viewportRect:a}=this.state;if(a===void 0||this.grid===void 0)return;const s=this.grid.getCumulativeHeightBefore(this.state.numFrozenRowsClamped),i=this.grid.getCumulativeWidthBefore(this.state.numFrozenColumnsClamped),l={top:a.top,right:a.left+a.width,bottom:a.top+a.height,left:a.left},{columnHeaderHeight:c,rowHeaderWidth:u}=this.tableHandlers.getHeaderDimensions(),d={top:l.top+c+s,right:l.right,bottom:l.bottom,left:l.left+u+i},f={top:this.grid.getCumulativeHeightBefore(n)+c,right:this.grid.getCumulativeWidthAt(r??0)+u,bottom:this.grid.getCumulativeHeightAt(n)+c,left:this.grid.getCumulativeWidthBefore(r??0)+u},m={},h=f.bottom-f.top,g=d.bottom-d.top,v=l.top;if(h>
1953g||f.top<d.top?m.nextScrollTop=v-(d.top-f.top)-1:d.bottom<f.bottom&&(m.nextScrollTop=v+(f.bottom-l.bottom)),r!=null){const y=f.right-f.left,b=d.right-d.left,E=l.left;y>b||f.left<d.left?m.nextScrollLeft=E-(d.left-f.left)-1:d.right<f.right&&(m.nextScrollLeft=E+(f.right-l.right))}this.tableHandlers.syncViewportPosition(m)});G(this,"handleCopy",t=>{var l;const{getCellClipboardData:n,onCopy:r}=this.props,{selectedRegions:a}=this.state;if(n==null||this.grid===void 0||(l=window.getSelection())!=null&&l.toString())return;t.preventDefault(),t.stopPropagation();const s=Ot.enumerateUniqueCells(a,this.grid.numRows,this.grid.numCols),i=Ot.sparseMapCells(s,(c,u)=>n(c,u,this.state.childrenArray[u].props.cellRenderer));i!=null&&kGe.copyCells(i).then(()=>r==null?void 0:r(!0)).catch(c=>{console.error(FGe,c),r==null||r(!1)})});this.props=t,this.state=n,this.tableHandlers=r}setGrid(t){this.grid=t}setProps(t){this.props=t}setState(t){t.focusedRegion!=null&&(this.state.focusedRegion==null||!Fne(this.state.focusedRegion,t.focusedRegion))&&this.scrollBodyToFocusedRegion(t.focusedRegion),this.state=t}updateSelectedRegionAtIndex(t,n){const{children:r,numRows:a}=this.props,{selectedRegions:s}=this.state,i=p.Children.count(r),l=Math.max(0,a-1),c=Math.max(0,i-1),u=Ot.clampRegion(t,l,c),d=Ot.update(s,u,n);this.tableHandlers.handleSelection(d)}static moveFocusedRegionInDirection(t,n){switch(t.type){case na.CELL:return yv.moveFocusedCellInDirection(t,n);case na.ROW:return yv.moveFocusedRowInDirection(t,n)}}static moveFocusedRowInDirection(t,n){switch(n){case Jr.UP:return{...t,focusSelectionIndex:0,row:t.row-1};case Jr.DOWN:return{...t,focusSelectionIndex:0,row:t.row+1};case Jr.LEFT:case Jr.RIGHT:return{...t}}}static moveFocusedCellInDirection(t,n){switch(n){case Jr.UP:return{...t,focusSelectionIndex:0,row:t.row-1};case Jr.DOWN:return{...t,focusSelectionIndex:0,row:t.row+1};case Jr.LEFT:return{...t,col:t.col-1,focusSelectionIndex:0};case Jr.RIGHT:return{...t,col:t.col+1,focusSelectionIndex:0}}}isOutOfBounds(t){const n=cg(t)??0;return t.row<0||t.row>=this.grid.numRows||n<0||n>=this.grid.numCols}moveFocusCell(t,n,r,a,s){const{selectedRegions:i}=this.state,l=t==="row"?"rows":"cols",c=n==="row"?"rows":"cols",u=r?-1:1,d=r?1:0;if(a[t]+=u,(r?a[t]<s[l][0]:a[t]>s[l][1])&&(a[t]=s[l][d],a[n]+=u,r?a[n]<s[c][0]:a[n]>s[c][1])){let h=a.focusSelectionIndex+u;(r?h<0:h>=i.length)&&(h=r?i.length-1:0);const g=Ot.getCellRegionFromRegion(i[h],this.grid.numRows,this.grid.numCols);a={col:g.cols[d],focusSelectionIndex:h,row:g.rows[d],type:na.CELL}}return a}}function Jz(e){const{numFrozenColumns:t}=e,n=p.Children.count(e.children);return Zne(t,n)}function eH(e){const{numFrozenRows:t,numRows:n}=e;return Zne(t,n)}function Zne(e,t){return e===void 0?0:Fr.clamp(e,0,t)}function Eu(e,t){return e===void 0?!1:e.indexOf(t)>=0}function Df(e,t,n=e.selectionModes){const{children:r,numRows:a}=e,s=p.Children.count(r);return n.indexOf(t)>=0&&a>0&&s>0}function tH(e,t){const{getCellClipboardData:n,enableMultipleSelection:r,selectionModes:a}=e,s=vl(e),i=[];n!=null&&i.push({combo:"mod+c",group:"Table",label:"Copy selected table cells",onKeyDown:t.handleCopy});const l=a.length>0;return r&&l&&i.push({combo:"shift+up",group:"Table",label:"Resize selection upward",onKeyDown:t.handleSelectionResizeUp},{combo:"shift+down",group:"Table",label:"Resize selection downward",onKeyDown:t.handleSelectionResizeDown},{combo:"shift+left",group:"Table",label:"Resize selection leftward",onKeyDown:t.handleSelectionResizeLeft},{combo:"shift+right",group:"Table",label:"Resize selection rightward",onKeyDown:t.handleSelectionResizeRight}),i.push(...pqe(s,t)),Df(e,bn.FULL_TABLE)&&i.push({combo:"mod+a",group:"Table",label:"Select all",onKeyDown:t.handleSelectAllHotkey}),i}function pqe(e,t){switch(e){case void 0:return[];case na.ROW:return[{combo:"up",group:"Table",label:"Move focus row up",onKeyDown:t.handleFocusMoveUp},{combo:"down",group:"Table",label:"Move focus row down",onKeyDown:t.handleFocusMoveDown}];case na.CELL:return[{combo:"left",group:"Table",label:"Move focus cell left",onKeyDown:t.handleFocusMoveLeft},{combo:"right",group:"Table",label:"Move focus cell right",onKeyDown:t.handleFocusMoveRight},{combo:"up",group:"Table",label:"Move focus cell up",onKeyDown:t.handleFocusMoveUp},{combo:"down",group:"Table",label:"Move focus cell down",onKeyDown:t.handleFocusMoveDown}
1953,{allowInInput:!0,combo:"tab",group:"Table",label:"Move focus cell tab",onKeyDown:t.handleFocusMoveRightInternal},{allowInInput:!0,combo:"shift+tab",group:"Table",label:"Move focus cell shift tab",onKeyDown:t.handleFocusMoveLeftInternal},{allowInInput:!0,combo:"enter",group:"Table",label:"Move focus cell enter",onKeyDown:t.handleFocusMoveDownInternal},{allowInInput:!0,combo:"shift+enter",group:"Table",label:"Move focus cell shift enter",onKeyDown:t.handleFocusMoveUpInternal}]}}function nH(e,t){return e.length===t.length&&e.every((n,r)=>n.key===t[r].key)}const Do=class Do extends Ky{constructor(n){super(n);G(this,"hotkeys",[]);G(this,"hotkeysImpl");G(this,"grid",null);G(this,"locator");G(this,"resizeSensorDetach");G(this,"refHandlers",{cellContainer:n=>this.cellContainerElement=n,columnHeader:n=>{n!=null&&(this.columnHeaderHeight=Math.max(n.clientHeight,bi.MIN_COLUMN_HEADER_HEIGHT))},quadrantStack:n=>this.quadrantStackInstance=n,rootTable:n=>this.rootTableElement=n,rowHeader:n=>{n!=null&&(this.rowHeaderWidth=n.clientWidth)},scrollContainer:n=>this.scrollContainerElement=n});G(this,"cellContainerElement");
1953G(this,"columnHeaderHeight",bi.MIN_COLUMN_HEADER_HEIGHT);G(this,"quadrantStackInstance");G(this,"rootTableElement");G(this,"rowHeaderWidth",bi.MIN_ROW_HEADER_WIDTH);G(this,"scrollContainerElement");G(this,"didColumnHeaderMount",!1);G(this,"didRowHeaderMount",!1);G(this,"didCompletelyMount",!1);G(this,"renderTableContents",({handleKeyDown:n,handleKeyUp:r})=>{const{children:a,className:s,enableRowHeader:i,loadingOptions:l,numRows:c,enableColumnInteractionBar:u,enableColumnHeader:d}=this.props,{horizontalGuides:f,numFrozenColumnsClamped:m,numFrozenRowsClamped:h,verticalGuides:g}=this.state;this.gridDimensionsMatchProps()||this.invalidateGrid();const v=this.validateGrid(),y=At(CWe,{[XWe]:this.state.isReordering,[FWe]:this.shouldDisableVerticalScroll(),[LWe]:this.shouldDisableHorizontalScroll(),[sw]:Df(this.props,bn.CELLS),[$We]:c===0},s);return F.jsxs("div",{className:y,ref:this.refHandlers.rootTable,onScroll:this.handleRootScroll,onKeyDown:n,onKeyUp:r,tabIndex:0,children:[F.jsx(Gne,{bodyRef:this.refHandlers.cellContainer,bodyRenderer:this.renderBody,columnHeaderRenderer:this.renderColumnHeader,columnHeaderRef:this.refHandlers.columnHeader,didHeadersMount:this.state.didHeadersMount,enableColumnInteractionBar:u,enableRowHeader:i,grid:v,handleColumnResizeGuide:this.handleColumnResizeGuide,handleColumnsReordering:this.handleColumnsReordering,handleRowResizeGuide:this.handleRowResizeGuide,handleRowsReordering:this.handleRowsReordering,isHorizontalScrollDisabled:this.shouldDisableHorizontalScroll(),isVerticalScrollDisabled:this.shouldDisableVerticalScroll(),loadingOptions:l,numColumns:p.Children.count(a),numFrozenColumns:m,numFrozenRows:h,numRows:c,onScroll:this.handleBodyScroll,ref:this.refHandlers.quadrantStack,menuRenderer:this.renderMenu,rowHeaderRenderer:this.renderRowHeader,rowHeaderRef:this.refHandlers.rowHeader,scrollContainerRef:this.refHandlers.scrollContainer,enableColumnHeader:d,renderScrollIndicatorOverlay:this.renderScrollIndicatorOverlay}),F.jsx("div",{className:At(G4,HWe)}),F.jsx(JGe,{className:QWe,verticalGuides:g,horizontalGuides:f})]})});G(this,"renderMenu",n=>{const r=At(DWe,{[sw]:Df(this.props,bn.FULL_TABLE)});return F.jsx("div",{className:r,ref:n,onMouseDown:this.handleMenuMouseDown,children:this.maybeRenderRegions(this.styleMenuRegion)})});G(this,"handleMenuMouseDown",n=>{this.selectAll(!n.shiftKey)});G(this,"selectAll",n=>{if(this.getEnabledSelectionHandler(bn.FULL_TABLE)([Ot.table()]),n){const a=vl(this.props),s=Ot.getFocusCellCoordinatesFromRegion(Ot.table()),i=Lb(a,s);i!=null&&this.handleFocus(i)}});G(this,"columnHeaderCellRenderer",n=>{const r=this.getColumnProps(n);if(r===void 0)return null;const{id:a,cellRenderer:s,columnHeaderCellRenderer:i,...l}=r,c=Eu(r.loadingOptions,c_.HEADER)||Eu(this.props.loadingOptions,Nu.COLUMN_HEADERS);if(i!=null){const d=i(n);if(d!=null)return p.cloneElement(d,{enableColumnInteractionBar:this.props.enableColumnInteractionBar,loading:d.props.loading??c})}const u={enableColumnInteractionBar:this.props.enableColumnInteractionBar,index:n,loading:c,...l};return r.name!=null?F.jsx(Lm,{...u}):F.jsx(Lm,{...u,name:Fr.toBase26Alpha(n)})});G(this,"renderColumnHeader",(n,r,a,s=!1)=>{const{focusedRegion:i,selectedRegions:l,viewportRect:c}=this.state,{defaultColumnWidth:u,enableMultipleSelection:d,enableGhostCells:f,enableColumnReordering:m,enableColumnResizing:h,loadingOptions:g,maxColumnWidth:v,minColumnWidth:y,selectedRegionTransform:b}=this.props,E=At(kWe,{[sw]:Df(this.props,bn.FULL_COLUMNS)});if(this.grid===null||this.locator===void 0||c===void 0)return F.jsx("div",{className:E,ref:n});const w=this.locator.hasHorizontalOverflowOrExactFit(this.getRowHeaderWidth(),c),x=this.grid.getColumnIndicesInRect(c,w?!1:f),S=s?0:x.columnIndexStart,N=s?this.getMaxFrozenColumnIndex():x.columnIndexEnd;return F.jsxs("div",{className:E,ref:n,children:[F.jsx(Bne,{defaultColumnWidth:u,enableMultipleSelection:d,cellRenderer:this.columnHeaderCellRenderer,focusedRegion:i,focusMode:vl(this.props),grid:this.grid,isReorderable:m,isResizable:h,loading:Eu(g,Nu.COLUMN_HEADERS),locator:this.locator,maxColumnWidth:v,minColumnWidth:y,onColumnWidthChanged:this.handleColumnWidthChanged,onFocusedRegion:this.handleFocus,onMount:this.handleHeaderMounted,onLayoutLock:this.handleLayoutLock,onReordered:this.handleColumnsReordered,onReordering:a,onResizeGuide:r,onSelection:this.getEnabledSelectionHandler(bn.FULL_COLUMNS),selectedRegions:l,selectedRegionTransform:b,columnIndexStart:S,columnIndexEnd:N,children:this.props.children}),this.maybeRenderRegions(this.styleColumnHeaderRegion)]})});G(this,"renderRowHeader",(n,r,a,s=!1)=>{const{focusedRegion:i,selectedRegions:l,viewportRect:c}=this.state,{defaultRowHeight:u,enableMultipleSelection:d,enableGhostCells:f,enableRowReordering:m,enableRowResizing:h,loadingOptions:g,maxRowHeight:v,minRowHeight:y,rowHeaderCellRenderer:b,selectedRegionTransform:E}=this.props,w=At(iGe,{[sw]:Df(this.props,bn.FULL_ROWS)});if(this.grid===null||this.locator===void 0||c===void 0)return F.jsx("div",{className:w,ref:n});const x=this.locator.hasVerticalOverflowOrExactFit(this.getColumnHeaderHeight(),c),S=this.grid.getRowIndicesInRect({includeGhostCells:x?!1:f,rect:c}),N=s?0:S.rowIndexStart,k=s?this.getMaxFrozenRowIndex():S.rowIndexEnd;return F.jsxs("div",{className:w,ref:n,children:[F.jsx(jne,{defaultRowHeight:u,enableMultipleSelection:d,focusedRegion:i,focusMode:vl(this.props),grid:this.grid,locator:this.locator,isReorderable:m,isResizable:h,loading:Eu(g,Nu.ROW_HEADERS),maxRowHeight:v,minRowHeight:y,onFocusedRegion:this.handleFocus,onLayoutLock:this.handleLayoutLock,onMount:this.handleHeaderMounted,onResizeGuide:r,onReordered:this.handleRowsReordered,onReordering:a,onRowHeightChanged:this.handleRowHeightChanged,onSelection:this.getEnabledSelectionHandler(bn.FULL_ROWS),rowHeaderCellRenderer:b,selectedRegions:l,selectedRegionTransform:E,rowIndexStart:N,rowIndexEnd:k}),this.maybeRenderRegions(this.styleRowHeaderRegion)]})});G(this,"bodyCellRenderer",(n,r)=>{const a=this.getColumnProps(r);if(a===void 0)return;const{id:s,cellRenderer:i,columnHeaderCellRenderer:l,name:c,nameRenderer:u,...d}=a,f=i(n,r);if(f===void 0)return;const m=Eu(a.loadingOptions,c_.CELLS)||Eu(this.props.loadingOptions,Nu.CELLS);return p.cloneElement(f,{...d,loading:f.props.loading??m})});G(this,"renderBody",(n,r=!1,a=!1)=>{const{focusedRegion:s,numFrozenColumnsClamped:i,numFrozenRowsClamped:l,selectedRegions:c,viewportRect:u}=this.state,{enableMultipleSelection:d,enableColumnHeader:f,enableGhostCells:m,loadingOptions:h,bodyContextMenuRenderer:g,selectedRegionTransform:v}=this.props;if(this.grid===null||this.locator===void 0||u===void 0)return;const y=this.locator.hasVerticalOverflowOrExactFit(f?this.columnHeaderHeight:0,u),b=this.locator.hasHorizontalOverflowOrExactFit(this.getRowHeaderWidth(),u),E=this.grid.getRowIndicesInRect({includeGhostCells:y?!1:m,rect:u}),w=this.grid.getColumnIndicesInRect(u,b?!1:m),x=a?0:w.columnIndexStart+i,S=r?0:E.rowIndexStart+l,N=a?i-1:w.columnIndexEnd,k=r?l-1:E.rowIndexEnd,C=n===Ut.MAIN?this.handleCompleteRender:void 0;return F.jsxs("div",{children:[F.jsx(Kne,{enableMultipleSelection:d,cellRenderer:this.bodyCellRenderer,focusedRegion:s,focusMode:vl(this.props),grid:this.grid,loading:Eu(h,Nu.CELLS),locator:this.locator,onCompleteRender:C,onFocusedRegion:this.handleFocus,onSelection:this.getEnabledSelectionHandler(bn.CELLS),bodyContextMenuRenderer:g,renderMode:this.getNormalizedRenderMode(),selectedRegions:c,selectedRegionTransform:v,viewportRect:u,columnIndexStart:x,columnIndexEnd:N,rowIndexStart:S,rowIndexEnd:k,numFrozenColumns:a?i:void 0,numFrozenRows:r?l:void 0}),this.maybeRenderRegions(this.styleBodyRegion,n)]})});G(this,"getEnabledSelectionHandler",n=>Df(this.props,n)?this.handleSelection:this.clearSelection);G(this,"renderScrollIndicatorOverlay",(n,r)=>{const{scrollDirection:a}=this.state,s=(l,c)=>({marginRight:n,marginTop:r,opacity:l===c?1:0}),i=dWe;return F.jsxs(F.Fragment,{children:[F.jsx("div",{className:At(i,fWe),style:s(a,Rc.TOP)}),F.jsx("div",{className:At(i,mWe),style:s(a,Rc.BOTTOM)}),F.jsx("div",{className:At(i,hWe),style:s(a,Rc.RIGHT)}),F.jsx("div",{className:At(i,pWe),style:s(a,Rc.LEFT)})]})});G(this,"handleHeaderMounted",n=>{const{didHeadersMount:r}=this.state;r||(n==="column"?this.didColumnHeaderMount=!0:this.didRowHeaderMount=!0,this.didColumnHeaderMount&&this.didRowHeaderMount&&this.setState({didHeadersMount:!0}))});G(this,"handleCompleteRender",()=>{var r,a;const n=this.didColumnHeaderMount&&this.didRowHeaderMount;this.state.viewportRect!=null&&n&&((a=(r=this.props).onCompleteRender)==null||a.call(r),this.didCompletelyMount=!0)});G(this,"styleBodyRegion",(n,r)=>{const{numFrozenColumns:a}=this.props;if(this.grid==null)return{};const s=Ot.getRegionCardinality(n),i=this.grid.getRegionStyle(n),l=(r===Ut.TOP_LEFT||r===Ut.LEFT)&&a!=null&&a>0,c=this.grid.getHeight(),u=this.grid.getWidth(),d=1,f=`-${d}px`;switch(s){case bn.CELLS:return i;case bn.FULL_COLUMNS:return i.top=f,i.height=c+d,i;case bn.FULL_ROWS:return i.left=f,i.width=u+d,l&&(i.right=f),i;case bn.FULL_TABLE:return i.left=f,i.top=f,i.width=u+d,i.height=c+d,l&&(i.right=f),i;default:return{display:"none"}}});G(this,"styleMenuRegion",n=>{const{viewportRect:r}=this.state;if(this.grid==null||r==null)return{};const a=Ot.getRegionCardinality(n),s=this.grid.getRegionStyle(n);switch(a){case bn.FULL_TABLE:return s.right="0px",s.bottom="0px",s.top="0px",s.left="0px",s.borderBottom="none",s.borderRight="none",s;default:return{display:"none"}}});G(this,"styleColumnHeaderRegion",n=>{const{viewportRect:r}=this.state;if(this.grid==null||r==null)return{};const a=Ot.getRegionCardinality(n),s=this.grid.getRegionStyle(n);switch(a){case bn.FULL_TABLE:return s.left="-1px",s.borderLeft="none",s.bottom="-1px",s;case bn.FULL_COLUMNS:return s.bottom="-1px",s;default:return{display:"none"}}});G(this,"styleRowHeaderRegion",n=>{const{viewportRect:r}=this.state;if(this.grid==null||r==null)return{};const a=Ot.getRegionCardinality(n),s=this.grid.getRegionStyle(n);switch(a){case bn.FULL_TABLE:return s.top="-1px",s.borderTop="none",s.right="-1px",s;case bn.FULL_ROWS:return s.right="-1px",s;default:return{display:"none"}}});G(this,"handleColumnWidthChanged",(n,r)=>{var i,l;const a=this.state.selectedRegions,s=this.state.columnWidths.slice();if(Ot.hasFullTable(a))for(let c=0;c<s.length;c++)s[c]=r;
1953Ot.hasFullColumn(a,n)?Ot.eachUniqueFullColumn(a,c=>{s[c]=r}):s[n]=r,this.validateGrid({columnWidths:s}),this.setState({columnWidths:s}),(l=(i=this.props).onColumnWidthChanged)==null||l.call(i,n,r)});G(this,"handleRowHeightChanged",(n,r)=>{var i,l;const a=this.state.selectedRegions,s=this.state.rowHeights.slice();if(Ot.hasFullTable(a))for(let c=0;c<s.length;c++)s[c]=r;Ot.hasFullRow(a,n)?Ot.eachUniqueFullRow(a,c=>{s[c]=r}):s[n]=r,this.validateGrid({rowHeights:s}),this.setState({rowHeights:s}),(l=(i=this.props).onRowHeightChanged)==null||l.call(i,n,r)});G(this,"handleRootScroll",n=>{this.rootTableElement!=null&&(this.rootTableElement.scrollLeft=0,this.rootTableElement.scrollTop=0)});G(this,"handleBodyScroll",n=>{if(n.stopPropagation(),this.locator!=null&&!this.state.isLayoutLocked){const r=this.locator.getViewportRect();this.updateViewportRect(r)}});G(this,"clearSelection",n=>{this.handleSelection([])});G(this,"syncViewportPosition",({nextScrollLeft:n,nextScrollTop:r})=>{const{viewportRect:a}=this.state;if(!(this.scrollContainerElement==null||a===void 0)&&(n!==void 0||r!==void 0)){r!==void 0&&(this.scrollContainerElement.scrollTop=r),n!==void 0&&(this.scrollContainerElement.scrollLeft=n);const s=new nc(n??a.left,r??a.top,a.width,a.height);this.updateViewportRect(s)}});G(this,"handleFocus",n=>{var r,a,s,i;if(vl(this.props)===(n==null?void 0:n.type)&&(eE(this.props)==null&&this.setState({focusedRegion:n}),n!=null)){if(n.type===na.CELL){const{type:l,...c}=n;(a=(r=this.props).onFocusedCell)==null||a.call(r,c)}(i=(s=this.props).onFocusedRegion)==null||i.call(s,n)}});G(this,"handleSelection",n=>{this.props.selectedRegions==null&&this.setState({selectedRegions:n});const{onSelection:r}=this.props;r!=null&&r(n)});G(this,"handleColumnsReordering",n=>{this.setState({isReordering:!0,verticalGuides:n})});G(this,"handleColumnsReordered",(n,r,a)=>{var s,i;this.setState({isReordering:!1,verticalGuides:[]}),(i=(s=this.props).onColumnsReordered)==null||i.call(s,n,r,a)});G(this,"handleRowsReordering",n=>{this.setState({horizontalGuides:n,isReordering:!0})});G(this,"handleRowsReordered",(n,r,a)=>{var s,i;this.setState({horizontalGuides:[],isReordering:!1}),(i=(s=this.props).onRowsReordered)==null||i.call(s,n,r,a)});G(this,"handleLayoutLock",(n=!1)=>{this.setState({isLayoutLocked:n})});G(this,"updateViewportRect",n=>{if(n===void 0)return;const{viewportRect:r}=this.state;this.setState({viewportRect:n}),(r!=null&&!r.equals(n)||r==null&&n!=null)&&this.invokeOnVisibleCellsChangeCallback(n)});G(this,"getMaxFrozenColumnIndex",()=>this.state.numFrozenColumnsClamped-1);G(this,"getMaxFrozenRowIndex",()=>this.state.numFrozenRowsClamped-1);G(this,"handleColumnResizeGuide",n=>{this.setState({verticalGuides:n})});G(this,"handleRowResizeGuide",n=>{this.setState({horizontalGuides:n})});G(this,"getHeaderDimensions",()=>({columnHeaderHeight:this.getColumnHeaderHeight(),rowHeaderWidth:this.getRowHeaderWidth()}));G(this,"getColumnHeaderHeight",()=>this.props.enableColumnHeader?this.columnHeaderHeight:0);G(this,"getRowHeaderWidth",()=>this.props.enableRowHeader?this.rowHeaderWidth:0);const{children:r,columnWidths:a,defaultRowHeight:s,defaultColumnWidth:i,enableRowHeader:l,numRows:c,rowHeights:u,selectedRegions:d=[],enableColumnHeader:f}=n,m=p.Children.toArray(r),h=Do.createColumnIdIndex(m);let g=m.map(()=>i);a!==void 0&&(g=Fr.assignSparseValues(g,a));let v=Fr.times(c,()=>s);u!==void 0&&(v=Fr.assignSparseValues(v,u));const y=cM(vl(n),eE(n),void 0,d);this.state={childrenArray:m,columnIdToIndex:h,columnWidths:g,didHeadersMount:!1,focusedRegion:y,horizontalGuides:[],isLayoutLocked:!1,isReordering:!1,numFrozenColumnsClamped:Jz(n),numFrozenRowsClamped:eH(n),rowHeights:v,selectedRegions:d,verticalGuides:[]},this.hotkeysImpl=new yv(n,this.state,{getEnabledSelectionHandler:this.getEnabledSelectionHandler,getHeaderDimensions:this.getHeaderDimensions,handleFocus:this.handleFocus,handleSelection:this.handleSelection,syncViewportPosition:this.syncViewportPosition}),this.hotkeys=tH(n,this.hotkeysImpl),l===!1&&(this.didRowHeaderMount=!0),f===!1&&(this.didColumnHeaderMount=!0)}static getDerivedStateFromProps(n,r){const{children:a,defaultColumnWidth:s,defaultRowHeight:i,numRows:l,selectedRegions:c,selectionModes:u}=n;let{columnWidths:d,rowHeights:f}=n;d==null&&(d=r.columnWidths),f==null&&(f=r.rowHeights);const m=p.Children.toArray(a),h=!nH(m,r.childrenArray),g=m.length;let v=d;if(d!==r.columnWidths||h){const x=m.map((S,N)=>{const k=S.props.id===void 0?void 0:r.columnIdToIndex[S.props.id];return r.columnWidths[k??N]});v=Array(g).fill(s),v=Fr.assignSparseValues(v,x),v=Fr.assignSparseValues(v,d)}let y=f;(f!==r.rowHeights||l!==r.rowHeights.length)&&(y=Array(l).fill(i),y=Fr.assignSparseValues(y,f));const b=c??r.selectedRegions.filter(x=>{const S=Ot.getRegionCardinality(x);return Df(n,S,u)&&Ot.isRegionValidForTable(x,l,g)}),E=cM(vl(n),eE(n),r.focusedRegion,b),w={childrenArray:m,columnIdToIndex:h?Do.createColumnIdIndex(m):r.columnIdToIndex,columnWidths:v,focu
1953sedRegion:E,numFrozenColumnsClamped:Jz(n),numFrozenRowsClamped:eH(n),rowHeights:y,selectedRegions:b};return qo(r,w,Do.SHALLOW_COMPARE_STATE_KEYS_DENYLIST)?null:w}static createColumnIdIndex(n){const r={};for(let a=0;a<n.length;a++){const s=n[a].props.id;s!=null&&(r[String(s)]=a)}return r}resizeRowsByApproximateHeight(n,r){const a=iqe(this.props.numRows,this.state.columnWidths,n,r);this.invalidateGrid(),this.setState({rowHeights:a})}resizeRowsByTallestCell(n){if(this.grid==null||this.state.viewportRect===void 0||this.locator===void 0){console.warn(LGe);return}const r=oqe(this.grid,this.state.viewportRect,this.locator,this.state.rowHeights.length,n);this.invalidateGrid(),this.setState({rowHeights:r})}scrollToRegion(n){const{numFrozenColumnsClamped:r,numFrozenRowsClamped:a,viewportRect:s}=this.state;if(s===void 0||this.grid===null||this.quadrantStackInstance===void 0)return;const{left:i,top:l}=s,{scrollLeft:c,scrollTop:u}=QGe(n,i,l,this.grid.getCumulativeWidthBefore,this.grid.getCumulativeHeightBefore,a,r),d=this.shouldDisableHorizontalScroll()?0:c,f=this.shouldDisableVerticalScroll()?0:u;this.quadrantStackInstance.scrollToPosition(d,f)}scrollByOffset(n){let r;n&&(Math.abs(n.left)>Math.abs(n.top)?n.left<0?r=Rc.LEFT:r=Rc.RIGHT:n.top<0?r=Rc.TOP:r=Rc.BOTTOM),(this.shouldRenderScrollDirection(r)||r==null)&&this.setState({scrollDirection:r});const{viewportRect:a}=this.state;if(!(a===void 0||this.grid===null||this.quadrantStackInstance===void 0)&&n!==null){const{left:s,top:i}=a,l=this.shouldDisableHorizontalScroll()?0:s+n.left,c=this.shouldDisableVerticalScroll()?0:i+n.top;this.shouldRenderScrollDirection(this.state.scrollDirection)||this.setState({scrollDirection:null}),this.quadrantStackInstance.scrollToPosition(l,c)}}shouldComponentUpdate(n,r){const a={exclude:Do.SHALLOW_COMPARE_PROP_KEYS_DENYLIST},s={exclude:Do.SHALLOW_COMPARE_STATE_KEYS_DENYLIST};return!oi(this.props,n,a)||!oi(this.state,r,s)||!qo(this.props,n,Do.SHALLOW_COMPARE_PROP_KEYS_DENYLIST)||!qo(this.state,r,Do.SHALLOW_COMPARE_STATE_KEYS_DENYLIST)}render(){return F.jsx(Mq,{hotkeys:this.hotkeys,children:this.renderTableContents})}componentDidMount(){this.validateGrid(),this.rootTableElement!=null&&this.scrollContainerElement!=null&&this.cellContainerElement!=null&&(this.locator=new Ty(this.rootTableElement,this.scrollContainerElement,this.cellContainerElement),this.updateLocator(),this.updateViewportRect(this.locator.getViewportRect()),this.resizeSensorDetach=dM.attach(this.rootTableElement,()=>{var n;this.state.isLayoutLocked||this.updateViewportRect((n=this.locator)==null?void 0:n.getViewportRect())}),this.forceUpdate())}componentWillUnmount(){this.resizeSensorDetach!=null&&(this.resizeSensorDetach(),delete this.resizeSensorDetach),this.didCompletelyMount=!1}componentDidUpdate(n,r){super.componentDidUpdate(n,r),this.hotkeysImpl.setState(this.state),this.hotkeysImpl.setProps(this.props);const a=!nH(p.Children.toArray(this.props.children),this.state.childrenArray);this.props.cellRendererDependencies!==void 0&&n.cellRendererDependencies===void 0&&console.error($Ge);const s=this.props.cellRendererDependencies!==void 0&&this.props.cellRendererDependencies.some((m,h)=>m!==(n.cellRendererDependencies??[])[h]),i=!Fr.compareSparseArrays(this.props.columnWidths??this.state.columnWidths,r.columnWidths),l=!Fr.compareSparseArrays(this.props.rowHeights??this.state.rowHeights,r.rowHeights);(a||s||i||l||this.props.numRows!==n.numRows||this.props.forceRerenderOnSelectionChange&&this.props.selectedRegions!==n.selectedRegions)&&this.invalidateGrid(),this.locator!=null&&(this.validateGrid(),this.updateLocator()),(vl(this.props)!==vl(n)||this.props.getCellClipboardData!==n.getCellClipboardData||this.props.enableMultipleSelection!==n.enableMultipleSelection||this.props.selectionModes!==n.selectionModes)&&(this.hotkeys=tH(this.props,this.hotkeysImpl)),s&&this.forceUpdate()}validateProps(n){const{children:r,columnWidths:a,numFrozenColumns:s,numFrozenRows:i,numRows:l,rowHeights:c}=n,u=p.Children.count(r);if(l!=null&&l<0)throw new Error(PGe);if(i!=null&&i<0)throw new Error(OGe);if(s!=null&&s<0)throw new Error(AGe);if(l!=null&&c!=null&&c.length!==l)throw new Error(MGe);if(u!=null&&a!=null&&a.length!==u)throw new Error(DGe);
1953p.Children.forEach(r,d=>{if(!Jd(d,co))throw new Error(RGe)}),i!=null&&l!=null&&i>l&&console.warn(IGe),s!=null&&s>u&&console.warn(TGe)}gridDimensionsMatchProps(){const{children:n,numRows:r}=this.props;return this.grid!=null&&this.grid.numCols===p.Children.count(n)&&this.grid.numRows===r}shouldDisableVerticalScroll(){const{enableGhostCells:n}=this.props,{viewportRect:r}=this.state;if(this.grid===null||r===void 0)return!1;const a=this.grid.getRowIndicesInRect({columnHeaderHeight:this.getColumnHeaderHeight(),includeGhostCells:n,rect:r}),s=r!=null&&r.top===0,i=Eu(this.props.loadingOptions,Nu.ROW_HEADERS);return n&&this.grid.isGhostIndex(a.rowIndexEnd,0)&&(s||i)}shouldDisableHorizontalScroll(){const{enableGhostCells:n}=this.props,{viewportRect:r}=this.state;if(this.grid===null||r===void 0)return!1;const a=this.grid.getColumnIndicesInRect(r,n),s=r!=null&&r.left===0,i=Eu(this.props.loadingOptions,Nu.COLUMN_HEADERS);return n&&this.grid.isGhostColumn(a.columnIndexEnd)&&(s||i)}shouldRenderScrollDirection(n){if(!this.scrollContainerElement||!this.state.viewportRect)return!1;const r=this.scrollContainerElement,{left:a,top:s}=this.state.viewportRect;switch(n){case"left":return a>0;case"right":return r.scrollWidth-r.offsetWidth!==a;case"top":return s>0;case"bottom":return r.scrollHeight-r.offsetHeight!==s;default:return!1}}getColumnProps(n){const r=this.state.childrenArray[n];return r===void 0?void 0:r.props}isGuideLayerShowing(){return this.state.verticalGuides.length>0||this.state.horizontalGuides.length>0}invalidateGrid(){this.grid=null}validateGrid({columnWidths:n,rowHeights:r}={}){if(this.grid==null||n!==void 0||r!==void 0){const{defaultRowHeight:a,defaultColumnWidth:s,numFrozenColumns:i}=this.props,l=Math.max(bi.DEFAULT_BLEED,i);this.grid=new bi(r??this.state.rowHeights,n??this.state.columnWidths,l,a,s),this.invokeOnVisibleCellsChangeCallback(this.state.viewportRect),this.hotkeysImpl.setGrid(this.grid)}return this.grid}maybeRenderRegions(n,r){return this.isGuideLayerShowing()&&!this.state.isReordering?void 0:Ot.joinStyledRegionGroups(this.state.selectedRegions,this.props.styledRegionGroups??[],this.state.focusedRegion).map((s,i)=>{const l=s.regions.map(c=>n(c,r));return F.jsx(tqe,{className:At(s.className),regions:s.regions,regionStyles:l},i)})}updateLocator(){this.locator===void 0||this.grid==null||this.locator.setGrid(this.grid).setNumFrozenRows(this.state.numFrozenRowsClamped).setNumFrozenColumns(this.state.numFrozenColumnsClamped)}invokeOnVisibleCellsChangeCallback(n){var s,i;if(this.grid==null)return;const r=this.grid.getColumnIndicesInRect(n),a=this.grid.getRowIndicesInRect({rect:n});(i=(s=this.props).onVisibleCellsChange)==null||i.call(s,a,r)}getNormalizedRenderMode(){const{renderMode:n}=this.props;return n===_l.BATCH||n===_l.BATCH_ON_UPDATE&&this.didCompletelyMount?_l.BATCH:_l.NONE}};G(Do,"displayName",`${$n}.Table`),G(Do,"defaultProps",{defaultColumnWidth:150,defaultRowHeight:20,enableColumnHeader:!0,enableColumnInteractionBar:!1,enableFocusedCell:!1,enableGhostCells:!1,enableMultipleSelection:!0,enableRowHeader:!0,forceRerenderOnSelectionChange:!1,getCellClipboardData:(n,r,a)=>XGe(a(n,r)),loadingOptions:[],maxColumnWidth:9999,maxRowHeight:9999,minColumnWidth:50,minRowHeight:20,numFrozenColumns:0,numFrozenRows:0,numRows:0,renderMode:_l.BATCH_ON_UPDATE,rowHeaderCellRenderer:Wne,selectionModes:EGe.ALL}),G(Do,"SHALLOW_COMPARE_PROP_KEYS_DENYLIST",["selectedRegions"]),G(Do,"SHALLOW_COMPARE_STATE_KEYS_DENYLIST",["selectedRegions","viewportRect"]);let hM=Do;const Xne=hM,gqe=10,vqe=({teamOptions:e,resolvePersonal:t,onCancel:n,onComplete:r})=>{const a=Wn(B=>{var U;return(U=B==null?void 0:B.FB)==null?void 0:U.auth}),[s,i]=p.useState("loading"),[l,c]=p.useState(""),[u,d]=p.useState([]),[f,m]=p.useState(null),[h,g]=p.useState(null),[v,y]=p.useState(!1),b=p.useRef(!1),[E,w]=p.useState(!0);p.useEffect(()=>{b.current=!1,y(!1),XOe().then(B=>{d(B.map(U=>({...U,teamID:zi,selected:!0}))),i("ready")}).catch(B=>{c((B==null?void 0:B.message)||String(B)),i("error")})},[]),p.useEffect(()=>{if(!(e!=null&&e.length))return;const B=e.map($=>$.id).filter($=>$&&$!==zi);let U=!1;return oX(B).then($=>{U||g($)}),()=>{U=!0}},[e]),p.useEffect(()=>{!h||u.length===0||b.current||(b.current=!0,d(B=>{const U=B.filter($=>$.url?!h.has(hL($.url)):!0);return U.length===0&&B.length>0&&y(!0),U}))},[h,u.length]);const x=(B,U)=>{d($=>{const ce=$.slice();return ce[B]={...ce[B],...U},ce})},S=p.useMemo(()=>u.reduce((B,U)=>B+(U.selected?1:0),0),[u]),N=B=>{d(U=>U.map($=>({...$,selected:B})))},k=B=>{d(U=>U.map($=>({...$,teamID:B})))},C=p.useMemo(()=>
1953{if(u.length===0)return zi;const B=u[0].teamID||zi;return u.every($=>($.teamID||zi)===B)?B:""},[u]),A=p.useMemo(()=>{const B=e.map(U=>({label:U.name,value:U.id}));return C===""?[{label:"Mixed workspaces",value:"",disabled:!0},...B]:B},[e,C]),O=B=>{w(B),d(U=>U.map($=>({...$,collectionPath:B&&$.originalCollectionPath||XI})))},T=B=>{const U=u[B];return U?o.createElement(wi,{interactive:!0},o.createElement("div",{className:"flex items-center justify-center h-full"},o.createElement(ef,{checked:!!U.selected,onChange:$=>x(B,{selected:$.currentTarget.checked}),style:{margin:0}}))):o.createElement(wi,null)},M=()=>o.createElement(Lm,null,o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},o.createElement(ef,{checked:u.length>0&&S===u.length,indeterminate:S>0&&S<u.length,onChange:B=>N(B.currentTarget.checked),disabled:u.length===0||s==="saving",style:{margin:0}}))),L=B=>U=>{const $=u[U];return $?o.createElement(Ane,{className:"flex flex-col justify-center",value:$[B]??"",onChange:ce=>x(U,{[B]:ce}),onConfirm:ce=>x(U,{[B]:ce})}):o.createElement(wi,null)},D=B=>{const U=u[B];return U?o.createElement(wi,{interactive:!0,className:"flex flex-col justify-center"},o.createElement(Ko,{fill:!0,minimal:!0,className:"max-w-[200px] p-0",value:U.teamID||zi,onChange:$=>x(B,{teamID:$.target.value}),options:e.map($=>({label:$.name,value:$.id}))})):o.createElement(wi,null)},j=async()=>{var $;i("saving"),m(null);const B=u.filter(ce=>ce.selected&&ce.url&&ce.name),U=B.length>gqe;U&&re.dispatch("interstitial-run",{status:"on",message:"Preparing importâ¦",variant:"logo"});try{const ce=await t(),be=B.map(ie=>({name:ie.name,url:ie.url,collectionPath:ie.collectionPath,teamID:ie.teamID===zi?ce:ie.teamID})).filter(ie=>!!ie.teamID),Ie=await lX(be,{onProgress:ie=>{if(m(ie),!U)return;const Ue=ie.phase==="collections"?"Preparing collectionsâ¦":`Importing ${ie.processed} of ${ie.total} bookmark${ie.total===1?"":"s"}â¦`;re.dispatch("interstitial-run",{type:"update",message:Ue})}});Jn.analyticsTrack({userId:($=a==null?void 0:a.user)==null?void 0:$.uid,event:"Import Bookmarks - Bookmark Bar - Save",codeName:"user-ui-import-bookmarks-bookmark-bar-save",properties:{imported:Ie.imported,skipped_duplicates:Ie.skippedDuplicates,errors:Ie.errors.length}}),U&&re.dispatch("interstitial-run","off");const Ae=new Map;for(const ie of be)Ae.set(ie.teamID,(Ae.get(ie.teamID)||0)+1);let he=null,_e=0;for(const[ie,Ue]of Ae.entries())Ue>_e&&(_e=Ue,he=ie);r(`Imported ${Ie.imported} bookmark${Ie.imported===1?"":"s"}. Skipped ${Ie.skippedDuplicates} duplicate${Ie.skippedDuplicates===1?"":"s"}.${Ie.errors.length?` ${Ie.errors.length} failed.`:""}`,{imported:Ie.imported,primaryTeamID:he,personalTeamID:ce})}catch(ce){U&&re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:(ce==null?void 0:ce.message)||"Something went wrong while importing.",intent:"danger"}),i("ready")}},H=50,[Y,z]=p.useState([H,240,340,260,180]),K=e.length>1,ee=K?Y:Y.slice(0,-1),oe=(B,U)=>{B!==0&&z($=>{const ce=$.slice();return ce[B]=U,ce})},J=tX(),se=nX(u.length,J);return s==="loading"?o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("div",{className:"flex flex-col items-center gap-4 py-8"},o.createElement(os,null),o.createElement("div",{className:"dark__text"},"Reading your Bookmark Barâ¦")))):s==="error"?o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement(fs,{icon:"error",title:"Couldn't read your bookmarks",description:l,action:o.createElement(De,{text:"Back",onClick:n})}))):o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full"},o.createElement("div",{className:"flex items-center justify-between gap-2 flex-wrap"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-0 md:text-2xl dark__text"},"Import Bookmark Bar items"),o.createElement("div",{className:"flex items-center gap-2 flex-wrap"},o.createElement(ds,{checked:E,onChange:B=>O(B.currentTarget.checked),label:"Convert folder names to collections",disabled:s==="saving"||u.length===0,className:"mb-0 dark__text text-sm mr-2",alignIndicator:"left"}),K?o.createElement("div",{className:"flex items-center gap-2"},o.createElement("span",{className:"dark__text text-sm whitespace-nowrap"},"Import to"),o.createElement(Ko,{className:"max-w-[200px] input-group-no-margin",value:C,onChange:B=>k(B.target.value),options:A,disabled:s==="saving"})):null,o.createElement(De,{intent:jr.PRIMARY,onClick:j,disabled:S===0||s==="saving"},s==="saving"?o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(os,{size:16,className:"!m-0"}),o.createElement("span",null,f&&f.total>0?`Importing ${f.processed} of ${f.total}`:"Importingâ¦")):`Import ${S} bookmark${S===1?"":"s"}`),o.createElement(De,{text:"Cancel",onClick:n,disabled:s==="saving"}))),o.createElement(Es,{className:"my-4 mx-0 hd"}),u.length===0?v?o.createElement(fs,{icon:"tick",title:"Nothing new to import",description:"All your Bookmark Bar items are already in your workspaces.",action:o.createElement(De,{text:"Back",onClick:n})}):o.createElement(fs,{icon:"bookmark",title:"Your Bookmark Bar is empty",description:"Nothing to import from the Bookmarks Bar right now.",action:o.createElement(De,{text:"Back",onClick:n})}):o.createElement("div",{style:{height:se}},o.createElement(Xne,{className:"import-table",numRows:u.length,enableRowHeader:!1,columnWidths:ee,onColumnWidthChanged:oe,defaultRowHeight:fL,cellRendererDepen
1953dencies:[u,K]},[o.createElement(co,{key:"select",name:"",columnHeaderCellRenderer:M,cellRenderer:T}),o.createElement(co,{key:"name",name:"Name",cellRenderer:L("name")}),o.createElement(co,{key:"url",name:"URL",cellRenderer:L("url")}),o.createElement(co,{key:"collection",name:"Folder => Collection",cellRenderer:L("collectionPath")}),K?o.createElement(co,{key:"team",name:"Workspace",cellRenderer:D}):null].filter(Boolean)))))},yqe=10,bqe=({days:e,teamOptions:t,resolvePersonal:n,onCancel:r,onComplete:a})=>{const s=Wn(se=>{var B;return(B=se==null?void 0:se.FB)==null?void 0:B.auth}),[i,l]=p.useState("loading"),[c,u]=p.useState(""),[d,f]=p.useState([]),[m,h]=p.useState(null),[g,v]=p.useState(null),[y,b]=p.useState(!1),E=p.useRef(!1);p.useEffect(()=>{l("loading"),E.current=!1,b(!1),eMe(e).then(se=>{f(se.map(B=>({...B,teamID:zi,selected:!0}))),l("ready")}).catch(se=>{u((se==null?void 0:se.message)||String(se)),l("error")})},[e]),p.useEffect(()=>{if(!(t!=null&&t.length))return;const se=t.map(U=>U.id).filter(U=>U&&U!==zi);let B=!1;return oX(se).then(U=>{B||v(U)}),()=>{B=!0}},[t]),p.useEffect(()=>{!g||d.length===0||E.current||(E.current=!0,f(se=>{const B=se.filter(U=>U.url?!g.has(hL(U.url)):!0);return B.length===0&&se.length>0&&b(!0),B}))},[g,d.length]);const w=(se,B)=>{f(U=>{const $=U.slice();return $[se]={...$[se],...B},$})},x=p.useMemo(()=>d.reduce((se,B)=>se+(B.selected?1:0),0),[d]),S=se=>{f(B=>B.map(U=>({...U,selected:se})))},N=se=>{f(B=>B.map(U=>({...U,teamID:se})))},k=p.useMemo(()=>{if(d.length===0)return zi;const se=d[0].teamID||zi;return d.every(U=>(U.teamID||zi)===se)?se:""},[d]),C=p.useMemo(()=>{const se=t.map(B=>({label:B.name,value:B.id}));return k===""?[{label:"Mixed workspaces",value:"",disabled:!0},...se]:se},[t,k]),A=se=>{const B=d[se];return B?o.createElement(wi,{interactive:!0},o.createElement("div",{className:"flex items-center justify-center h-full"},o.createElement(ef,{checked:!!B.selected,onChange:U=>w(se,{selected:U.currentTarget.checked}),style:{margin:0}}))):o.createElement(wi,null)},O=()=>o.createElement(Lm,null,o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},o.createElement(ef,{checked:d.length>0&&x===d.length,indeterminate:x>0&&x<d.length,onChange:se=>S(se.currentTarget.checked),disabled:d.length===0||i==="saving",style:{margin:0}}))),T=se=>B=>{const U=d[B];return U?o.createElement(Ane,{className:"flex flex-col justify-center",value:U[se]??"",onChange:$=>w(B,{[se]:$}),onConfirm:$=>w(B,{[se]:$})}):o.createElement(wi,null)},M=se=>{const B=d[se];return B?o.createElement(wi,{interactive:!0,className:"flex flex-col justify-center"},o.createElement(Ko,{fill:!0,minimal:!0,className:"max-w-[200px]",value:B.teamID||zi,onChange:U=>w(se,{teamID:U.target.value}),options:t.map(U=>({label:U.name,value:U.id}))})):o.createElement(wi,null)},L=se=>{const B=d[se];return B?o.createElement(wi,{className:"flex flex-col justify-center"},B.group):o.createElement(wi,null)},D=async()=>{var U;l("saving"),h(null);const se=d.filter($=>$.selected&&$.url&&$.name),B=se.length>yqe;B&&re.dispatch("interstitial-run",{status:"on",message:"Preparing importâ¦",variant:"logo"});try{const $=await n(),ce=se.map(_e=>({name:_e.name,url:_e.url,collectionPath:_e.collectionPath,teamID:_e.teamID===zi?$:_e.teamID})).filter(_e=>!!_e.teamID),ue=await lX(ce,{onProgress:_e=>{if(h(_e),!B)return;const ie=_e.phase==="collections"?"Preparing collectionsâ¦":`Importing ${_e.processed} of ${_e.total} bookmark${_e.total===1?"":"s"}â¦`;re.dispatch("interstitial-run",{type:"update",message:ie})}});Jn.analyticsTrack({userId:(U=s==null?void 0:s.user)==null?void 0:U.uid,event:"Import Bookmarks - History - Save",codeName:"user-ui-import-bookmarks-history-save",properties:{days:e,imported:ue.imported,skipped_duplicates:ue.skippedDuplicates,errors:ue.errors.length}}),B&&re.dispatch("interstitial-run","off");const Ie=new Map;for(const _e of ce)Ie.set(_e.teamID,(Ie.get(_e.teamID)||0)+1);let Ae=null,he=0;for(const[_e,ie]of Ie.entries())ie>he&&(he=ie,Ae=_e);a(`Imported ${ue.imported} bookmark${ue.imported===1?"":"s"}. Skipped ${ue.skippedDuplicates} duplicate${ue.skippedDuplicates===1?"":"s"}.${ue.errors.length?` ${ue.errors.length} failed.`:""}`,{imported:ue.imported,primaryTeamID:Ae,personalTeamID:$})}catch($){B&&re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:($==null?void 0:$.message)||"Something went wrong while importing.",intent:"danger"}),l("ready")}},j=50,[H,Y]=p.useState([j,220,340,220,160,180]),z=t.length>1,K=z?H:H.slice(0,-1),ee=(se,B)=>{se!==0&&Y(U=>{const $=U.slice();return $[se]=B,$})},oe=tX(),J=nX(d.length,oe);return i==="loading"?o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("div",{className:"flex flex-col items-center gap-4 py-8"},o.createElement(os,null),o.createElement("div",{className:"dark__text"},"Reading your browsing history (last ",e," days)â¦")))):i==="error"?o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement(fs,{icon:"error",title:"Couldn't read your history",description:c,action:o.createElement(De,{text:"Back",onClick:r})}))):o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full"},o.createElement("div",{className:"flex items-center justify-between gap-2 flex-wrap"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-0 md:text-2xl dark__text"},"Import frequently visited bookmarks"),o.createElement("div",{className:"flex items-center gap-2 flex-wrap"},i==="saving"&&m&&m.total>0?o.createElement("span",{className:"dark__text text-sm"},"Importing ",m.processed," of ",m.total,"â¦"):null,z?o.createElement("div",{className:"flex items-center gap-2"},o.createElement("span",{className:"dark__text text-sm whitespace-nowrap"},"Import to"),o.createElement(Ko,{className:"max-w-[200px] input-group-no-margin",value:k,onChange:se=>N(se.target.value),options:C,disabled:i==="saving"})):null,o.createElement(De,{intent:jr.PRIMARY,text:`Import ${x} bookmark${x===1?"":"s"}`,onClick:D,loading:i==="saving",disabled:x===0}),o.createElement(De,{text:"Cancel",onClick:r,disabled:i==="saving"}))),o.createElement(Es,{className:"my-4 mx-0 hd"}),d.length===0?y?o.createElement(fs,{icon:"tick",title:"Nothing new to import",description:"All visits in that range are already in your workspaces.",action:o.createElement(De,{text:"Back",onClick:r})}):o.createElement(fs,{icon:"history",title:"No history to import",description:`We didn't find any visits in the last ${e} days.`,action:o.createElement(De,{text:"Back",onClick:r})}):o.createElement("div",{style:{height:J}},o.createElement(Xne,{className:"import-table",numRows:d.length,enableRowHeader:!1,columnWidths:K,onColumnWidthChanged:ee,defaultRowHeight:fL,cellRendererDepen
1953dencies:[d,z]},[o.createElement(co,{key:"select",name:"",columnHeaderCellRenderer:O,cellRenderer:A}),o.createElement(co,{key:"name",name:"Name",cellRenderer:T("name")}),o.createElement(co,{key:"url",name:"URL",cellRenderer:T("url")}),o.createElement(co,{key:"collection",name:"Collection",cellRenderer:T("collectionPath")}),o.createElement(co,{key:"group",name:"Group",cellRenderer:L}),z?o.createElement(co,{key:"team",name:"Workspace",cellRenderer:M}):null].filter(Boolean)))))},rH="detecting",LN="extension",wqe="web-bridge",$N="web-no-bridge",Eqe=e=>{const t=[{id:zi,name:iS,isPersonal:!0}];return(e||[]).forEach(n=>{n!=null&&n.id&&(n.is_personal||t.push({id:n.id,name:n.name||"Untitled workspace"}))}),t},xqe=()=>typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window),FN=()=>{var y,b,E;const e=yr(),t=hs(),n=Wn(w=>{var x;return(x=w==null?void 0:w.FB)==null?void 0:x.auth}),r=xqe(),[a,s]=p.useState(()=>window.location.pathname==="/import-bookmark-bar"?"bar":window.location.pathname==="/import-bookmark-history"?"history":"landing"),[i,l]=p.useState(30),[c,u]=p.useState(null),[d,f]=p.useState(oy()?LN:rH),m=p.useMemo(()=>{var w;return Eqe((w=n==null?void 0:n.globalMeta)==null?void 0:w.teams)},[(y=n==null?void 0:n.globalMeta)==null?void 0:y.teams]);p.useEffect(()=>{if(!r)return;const w=window.location.pathname||"/import";let x=!1;return(async()=>{const S=await Wj(w,{context:"tauri-import"}),N=S.includes("?")?"&":"?",k=`${S}${N}from=tauri`;if(!x)try{const{openUrl:C}=await yn(()=>function(){return(O=>import(O))("./index.a906e697.js")}(),[]);await C(k)}catch(C){console.error("Failed to open import URL in default browser",C)}})(),e("/",{replace:!0}),()=>{x=!0}},[r,e]),p.useEffect(()=>{var w;r||Jn.analyticsTrack({userId:(w=n==null?void 0:n.user)==null?void 0:w.uid,event:"Import Bookmarks - View",codeName:"user-ui-import-bookmarks-view"})},[(b=n==null?void 0:n.user)==null?void 0:b.uid,r]),p.useEffect(()=>{var w;Gj()||n!=null&&n.isLive&&!((w=n==null?void 0:n.user)!=null&&w.uid)&&(window.location.pathname!=="/import"&&window.location.pathname.startsWith("/import")&&localStorage.setItem("pendingImportRoute",window.location.pathname),e("/login",{replace:!0}))},[n==null?void 0:n.isLive,(E=n==null?void 0:n.user)==null?void 0:E.uid,t.search,e]),p.useEffect(()=>{if(oy())return;let w=!1;return ZOe().then(x=>{w||f(x.present?wqe:$N)}).catch(()=>{w||f($N)}),()=>{w=!0}},[]);const h=async()=>{if(c)return c;const w=await sX();return u(w),w},g=(w,x={})=>{var M;re.dispatch("trigger-alert",{message:w,intent:"success"});const{imported:S,primaryTeamID:N,personalTeamID:k}=x;if(!S||!N){s("landing");return}const C=(((M=n==null?void 0:n.globalMeta)==null?void 0:M.teams)||[]).find(L=>L.id===N),A=k&&N===k||!!(C!=null&&C.is_personal)||N===c;let O="Untitled workspace";A?O=iS:C!=null&&C.name&&(O=C.name);const T=()=>{Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:N,name:O}}),e({pathname:Pn("/workspace/:teamID/bookmarks/updated",{teamID:N})}),setTimeout(()=>{re.dispatch("REFRESH_ASSETS_LIST")},0)};if(A){re.dispatch("refresh-usercontext",{callback:()=>T()});return}T()};if(r)return o.createElement("div",{className:"app-content h-full"},o.createElement("div",{className:"flex flex-col items-center justify-center gap-4 py-12"},o.createElement(os,{size:28}),o.createElement("div",{className:"text-sm text-gray-600 dark:text-gray-300"},"Opening import in your browserâ¦")));if(d===rH)return o.createElement("div",{className:"app-content h-full"},o.createElement("div",{className:"flex flex-col gap-8 md:gap-12 w-full max-w-5xl mx-auto px-2 sm:px-4"},o.createElement("div",{className:"text-center pt-0 md:pt-2"},o.createElement("h1",{className:"text-3xl sm:text-3xl md:text-4xl font-bold leading-tight tracking-tight dark__text"},"Import your bookmarks"),o.createElement("p",{className:"mt-4 text-base sm:text-lg text-gray-600 dark:text-gray-300 max-w-xl mx-auto"},"Checking for the browser extensionâ¦")),o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full max-w-md mx-auto"},o.createElement("div",{className:"flex flex-col items-center gap-4 py-6"},o.createElement(os,{size:28}),o.createElement("div",{className:"text-sm text-gray-600 dark:text-gray-300"},"One momentâ¦")))));if(d===$N)return o.createElement("div",{className:"app-content h-full"},o.createElement("div",{className:"flex flex-col gap-8 md:gap-12 w-full max-w-5xl mx-auto px-2 sm:px-4"},o.createElement("div",{className:"text-center pt-2 md:pt-4"},o.createElement("h1",{className:"text-3xl sm:text-3xl md:text-4xl font-bold leading-tight tracking-tight dark__text"},"One quick step"),o.createElement("p",{className:"mt-4 text-base sm:text-lg text-gray-600 dark:text-gray-300 max-w-xl mx-auto"},"Importing Chrome bookmarks needs the companion extension on this browser.")),o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full max-w-2xl mx-auto"},o.createElement("div",{className:"flex flex-col sm:flex-row items-start gap-4 py-2"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.fuchsia.100),theme(colors.orange.100))] dark:bg-[linear-gradient(135deg,theme(colors.fuchsia.900/40),theme(colors.orange.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300"},o.createElement(Yu,{size:22,strokeWidth:1.75})),o.createElement("div",{className:"flex-1 flex flex-col gap-3"},o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-1"},"Install the browser extension"),o.createElement("p",{className:"text-sm text-gray-600 dark:text-gray-300 leading-relaxed mb-0"},"Install it, reload this page, and the import flow will unlock automatically.")),o.createElement(BG,{intent:jr.PRIMARY,icon:"download",text:"Install from the Chrome Web Store",href:VOe,target:"_blank",rel:"noopener noreferrer",className:"self-start",onClick:()=>{var w;Jn.analyticsTrack({userId:(w=n==null?void 0:n.user)==null?void 0:w.uid,event:"Import Bookmarks - Install E
1953xtension - Click",codeName:"user-ui-import-bookmarks-install-extension-click"})}}))))));const v=o.createElement("div",{className:"app-content h-full"},o.createElement("div",{className:"flex flex-col gap-8 sm:gap-12 w-full max-w-5xl mx-auto px-2 sm:px-4"},o.createElement("div",{className:"text-center pt-0 md:pt-2"},o.createElement("h1",{className:"text-3xl sm:text-3xl md:text-4xl font-bold leading-tight tracking-tight dark__text"},"Import your bookmarks"),o.createElement("p",{className:"mt-4 text-base sm:text-lg text-gray-600 dark:text-gray-300 max-w-xl mx-auto"},"Bring your Chrome bookmarks into your library. Youâll be able to review everything before it saves.")),o.createElement("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card relative overflow-hidden group transition-transform duration-300 hover:-translate-y-0.5 h-full flex flex-col"},o.createElement("div",{className:"flex flex-col gap-4 pt-2 flex-1"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.fuchsia.100),theme(colors.orange.100))] dark:bg-[linear-gradient(135deg,theme(colors.fuchsia.900/40),theme(colors.orange.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300 group-hover:scale-105 transition-transform motion-reduce:transform-none"},o.createElement(Yu,{size:22,strokeWidth:1.75})),o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-0"},"Bookmark bar"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},"Everything youâve starred in Chrome"))),o.createElement("h5",{className:"dark__text text-sm leading-relaxed mb-0"},"Pull in your Chrome bookmark bar. Edit names, URLs, and destinations before anything saves to your personal workspace."),o.createElement("div",{className:"mt-auto pt-4"},o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-white bg-primary hover:bg-primaryHover rounded-md text-sm px-3 py-2 transition-colors",onClick:()=>{var w;if(Jn.analyticsTrack({userId:(w=n==null?void 0:n.user)==null?void 0:w.uid,event:"Import Bookmarks - Bookmark Bar - Click",codeName:"user-ui-import-bookmarks-bookmark-bar-click"}),d===LN){y3("/import-bookmark-bar",{context:"import-bookmark-bar"});return}e("/import-bookmark-bar"),s("bar")}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Yu,{size:16,strokeWidth:1.75}),"Review bookmark bar"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"}))))),o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card relative overflow-hidden group transition-transform duration-300 hover:-translate-y-0.5 h-full flex flex-col"},o.createElement("div",{className:"flex flex-col gap-4 pt-2 flex-1"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.purple.100),theme(colors.fuchsia.100))] dark:bg-[linear-gradient(135deg,theme(colors.purple.900/40),theme(colors.fuchsia.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300 group-hover:scale-105 transition-transform motion-reduce:transform-none"},o.createElement(Sx,{size:22,strokeWidth:1.75})),o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-0"},"Frequently visited"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},"Sites you actually use"))),o.createElement("h5",{className:"dark__text text-sm leading-relaxed mb-0"},"Pull in sites you visit most from your browser history. Choose how far back to look."),o.createElement("div",{className:"flex items-center flex-wrap gap-2"},o.createElement("span",{className:"text-xs text-gray-500 dark:text-gray-400 mr-1"},"Look back"),[30,60,90].map(w=>{const x=i===w;return o.createElement("button",{key:w,type:"button",onClick:()=>l(w),className:"rounded-full px-2.5 py-0.5 text-xs transition-colors "+(x?"text-white bg-primary hover:bg-primaryHover":"text-primary bg-transparent border border-primary/30 hover:border-primary hover:bg-primary/5 dark:text-fuchsia-300 dark:border-fuchsia-500/40 dark:hover:border-fuchsia-400 dark:hover:bg-fuchsia-500/10"),"aria-pressed":x},w," days")})),o.createElement("div",{className:"flex flex-col gap-4 mt-auto pt-4"},o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-white bg-primary hover:bg-primaryHover rounded-md text-sm px-3 py-2 transition-colors",onClick:()=>{var w;if(Jn.analyticsTrack({userId:(w=n==null?void 0:n.user)==null?void 0:w.uid,event:"Import Bookmarks - History - Click",codeName:"user-ui-import-bookmarks-history-click",properties:{days:i}}),d===LN){y3("/import-bookmark-history",{context:"import-bookmark-history"});return}e("/import-bookmark-history"),s("history")}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Sx,{size:16,strokeWidth:1.75}),"Review frequently visited"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"}))))))));return a==="bar"?o.createElement(vqe,{teamOptions:m,resolvePersonal:h,onCancel:()=>{e("/import"),s("landing")},onComplete:g}):a==="history"?o.createElement(bqe,{days:i,teamOptions:m,resolvePersonal:h,onCancel:()=>{e("/import"),s("landing")},onComplete:g}):v},BS=()=>{const e=yr(),n=hs().pathname;return o.createElement("div",{className:"sticky top-0 z-50 w-full backdrop-blur-3xl transition-opacity-90 duration-700 marketing-header"},o.createElement("div",{className:"max-w-[1120px] mx-auto px-6 w-full"},o.createElement("header",{className:"flex w-full flex-row justify-between items-center py-4"},o.createElement("div",{className:"flex w-full items-center text-lg"},o.createElement("span",{className:"font-bold text-slate-800 mr-2 dark__text cursor-pointer whitespace-nowrap",onClick:()=>e("/")},za.name)),o.createElement("div",{className:"flex items-center gap-2 sm:gap-8"},o.createElement("a",{onClick:()=>{e("/")},className:`hd rounded text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200 w-full py-1 text-black hover:text-primary dark:text-link border-2 border-transparent whitespace-nowrap hover:no-underline cursor-pointer active:text-primary ${n==="/"?"text-primary":""}`},"Overview"),o.createElement("a",{onClick:()=>{e("/pricing")},className:`hd rounded text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200 w-full py-1 text-black hover:text-primary dark:text-link border-2 border-transparent whitespace-nowrap hover:no-underline cursor-pointer ${n==="/pricing"?"text-primary":""}`},"Pricing & Features"),o.createElement("a",{onClick:()=>{e("/login"),Jn.analyticsTrack({event:"Homepage - Sign In - Click",codeName:"anonymous-view-homepage-action-button-signin-click"})},className:`rounded text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200 w-full py-1 text-black hover:text-primary dark:text-link border-2 border-transparent whitespace-nowrap hover:no-underline cursor-pointer ${n.startsWith("/login")?"text-primary":""}`},"Sign in"),o.createElement("a",{onClick:()=>{e("/signup"),Jn.analyticsTrack({event:"Homepage - Sign Up - Click",codeName:"anonymous-view-homepage-action-button-signup-click"})},className:`rounded text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200 w-full py-1 text-black hover:text-primary dark:text-link border-2 border-transparent whitespace-nowrap hover:no-underline cursor-pointer ${n.startsWith("/signup")?"text-primary":""}`},"Free Sign Up"),o.createElement("a",{href:za.chromeStoreUrl,target:"_blank",rel:"noopener noreferrer",className:"hd flex gap-2 items-center justify-center rounded text-center transition focus-visible:ring-2 ring-offset-2 ring-gray-200 w-full px-8 xs:px-4 py-1 !text-white hover:!text-white bg-gray-700 hover:bg-primary dark:bg-gray-800 hover:dark:bg-gray-900 border-2 border-transparent whitespace-nowrap hover:no-underline",onClick:()=>Jn.analyticsTrack({event:"Homepage - Get Extension - Click",codeName:"anonymous-view-homepage-action-button-getextension-click"})},o.createElement("svg",{viewBox:"0 0 24 24",className:"!text-white w-5 h-5"},o.createElement("path",{fill:"currentColor",d:"M18.944 11.112C18.507 7.67 15.56 5 12 5 9.244 5 6.85 6.61 5.757 9.149 3.609 9.792 2 11.82 2 14c0 2.657 2.089 4.815 4.708 4.971V19H17.99v-.003
1953L18 19c2.206 0 4-1.794 4-4a4.008 4.008 0 0 0-3.056-3.888zM8 12h3V9h2v3h3l-4 5-4-5z"})),"Get Extension")))))},_qe=()=>{const e=yr();return o.createElement("div",{className:"prose dark:prose-invert max-w-none text-gray-700 dark:text-gray-300"},Rm()?o.createElement("span",null,o.createElement("button",{type:"button",className:"text-blue-600 hover:underline bg-transparent border-0 p-0 cursor-pointer font-inherit text-left",onClick:()=>e(-1)},"Back")):null,o.createElement("h2",{className:"text-2xl font-bold mt-8 mb-4 text-black dark:text-white"},"AGREEMENT TO OUR LEGAL TERMS"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This privacy notice for ",za.legalEntityName,' ("we ," "us," or "our" ), describes how and why we might , store, use, and/or share (" process" ) your information when you use our services ( " Services" ), such as when you:'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Visit our website at"," ",o.createElement("a",{href:"https://bookmark.it.com",className:"text-blue-600 hover:underline"},"https://bookmark.it.com")," ",", or any website of ours that links to this privacy notice"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Engage with us in other related ways, including any sales, marketing, or events"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Questions or concerns? Reading this privacy notice will help you understand your privacy rights and choices. If you do not agree with our policies and practices, please do not use our Services. If you still have any questions or concerns, please contact us at [email protected] ."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4"},"SUMMARY OF KEY POINTS"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This summary provides key points from our privacy notice, but you can find out more details about any of these topics by clicking the link following each key point or by using our "," ",o.createElement("a",{href:"#toc",className:"text-blue-600 hover:underline"},"table of contents")," ","below to find the section you are looking for."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"What personal information do we process? When you visit, use, or navigate our Services, we may process personal information depending on how you interact with us and the Services, the choices you make, and the products and features you use. Learn more about "," ",o.createElement("a",{href:"#personalinfo",className:"text-blue-600 hover:underline"},"personal information you disclose to us")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Do we process any sensitive personal information? We do not process sensitive personal information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Do we receive any information from third parties? We do not receive any information from third parties."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"How do we process your information? We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent. We process your information only when we have a valid legal reason to do so. Learn more about "," ",o.createElement("a",{href:"#infouse",className:"text-blue-600 hover:underline"},"how we process your information")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"In what situations and with which parties do we share personal information? We may share information in specific situations and with specific third parties. Learn more about "," ",o.createElement("a",{href:"#whoshare",className:"text-blue-600 hover:underline"},"when and with whom we share your personal information")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"How do we keep your information safe? We have organizational and technical processes and procedures in place to protect your personal information. However, no electronic transmission over the internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorized third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Learn more about "," ",o.
1953createElement("a",{href:"#infosafe",className:"text-blue-600 hover:underline"},"how we keep your information safe")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"What are your rights? Depending on where you are located geographically, the applicable privacy law may mean you have certain rights regarding your personal information. Learn more about "," ",o.createElement("a",{href:"#privacyrights",className:"text-blue-600 hover:underline"},"your privacy rights")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"How do you exercise your rights? The easiest way to exercise your rights is by submitting a "," ",o.createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ",", or by contacting us. We will consider and act upon any request in accordance with applicable data protection laws."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Want to learn more about what we do with any information ? "," ",o.createElement("a",{href:"#toc",className:"text-blue-600 hover:underline"},"Review the privacy notice in full")," ","."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"toc"},"TABLE OF CONTENTS"),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#infocollect",className:"text-blue-600 hover:underline"},"1. WHAT INFORMATION DO WE COLLECT?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#infouse",className:"text-blue-600 hover:underline"},"2. HOW DO WE PROCESS YOUR INFORMATION?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#legalbases",className:"text-blue-600 hover:underline"},"3. WHAT LEGAL BASES DO WE RELY ON TO PROCESS YOUR PERSONAL INFORMATION?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#whoshare",className:"text-blue-600 hover:underline"},"4. WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#cookies",className:"text-blue-600 hover:underline"},"5. DO WE USE COOKIES AND OTHER TRACKING TECHNOLOGIES?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#inforetain",className:"text-blue-600 hover:underline"},"6. HOW LONG DO WE KEEP YOUR INFORMATION?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#infosafe",className:"text-blue-600 hover:underline"},"7. HOW DO WE KEEP YOUR INFORMATION SAFE?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#infominors",className:"text-blue-600 hover:underline"},"8. DO WE COLLECT INFORMATION FROM MINORS?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#privacyrights",className:"text-blue-600 hover:underline"},"9. WHAT ARE YOUR PRIVACY RIGHTS?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#DNT",className:"text-blue-600 hover:underline"},"10. CONTROLS FOR DO-NOT-TRACK FEATURES")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#uslaws",className:"text-blue-600 hover:underline"},"11. DO UNITED STATES RESIDENTS HAVE SPECIFIC PRIVACY RIGHTS?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#otherlaws",className:"text-blue-600 hover:underline"},"12. DO OTHER REGIONS HAVE SPECIFIC PRIVACY RIGHTS?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#policyupdates",className:"text-blue-600 hover:underline"},"13. DO WE MAKE UPDATES TO THIS NOTICE?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#contact",className:"text-blue-600 hover:underline"},"14. HOW CAN YOU CONTACT US ABOUT THIS NOTICE?")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#request",className:"text-blue-600 hover:underline"},"15. HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA FROM YOU?")),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"infocollect"},"1. WHAT INFORMATION DO WE COLLECT?"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300",id:"personalinfo"},"Personal information you disclose to us"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"}
1953,"In Short: "),"We collect personal information that you provide to us."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"personal information that you voluntarily provide to us when you register on the Services, express an interest in obtaining information about us or our products and Services, when you participate in activities on the Services, or otherwise when you contact us."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Personal Information Provided by You. The personal information that we collect depends on the context of your interactions with us and the Services, the choices you make, and the products and features you use. The personal information may include the following:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"names"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"phone numbers"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"email addresses"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"job titles"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"usernames"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"passwords"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"contact preferences"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"contact or authentication data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"billing addresses"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"debit/credit card numbers"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Sensitive Information. We do not process sensitive information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Payment Data. We may collect data necessary to process your payment if you make purchases, such as your payment instrument number, and the security code associated with your payment instrument. All payment data is stored by Stripe . You may find their privacy notice link(s) here:"," ",o.createElement("a",{href:"https://stripe.com/privacy",className:"text-blue-600 hover:underline"},"https://stripe.com/privacy")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"All personal information that you provide to us must be true, complete, and accurate, and you must notify us of any changes to such personal information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Information automatically collected"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"Some information â such as your Internet Protocol (IP) address and/or browser and device characteristics â is collected automatically when you visit our Services."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We automatically collect certain information when you visit, use, or navigate the Services. This information does not reveal your specific identity (like your name or contact information) but may include device and usage information, such as your IP address, browser and device characteristics, operating system, language preferences, referring URLs, device name, country, location, information about how and when you use our Services, and other technical information. This information is primarily needed to maintain the security and operation of our Services, and for our internal analytics and reporting purposes."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Like many businesses, we also collect information through cookies and similar technologies. You can find out more about this in our Cookie Notice:"," ",o.createElement("a",{href:"https://bookmark.it.com/cookie-policy",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/cookie-policy")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"The information we collect includes:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Log and Usage Data. Log and usage data is service-related, diagnostic, usage, and performance information our servers automatically collect when you access or use our Services and which we record
1953in log files. Depending on how you interact with us, this log data may include your IP address, device information, browser type, and settings and information about your activity in the Services  (such as the date/time stamps associated with your usage, pages and files viewed, searches, and other actions you take such as which features you use), device event information (such as system activity, error reports (sometimes called "crash dumps" ), and hardware settings).'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Device Data. device data such as information about your computer, phone, tablet, or other device you use to access the Services. Depending on the device used, this device data may include information such as your IP address (or proxy server), device and application identification numbers, location, browser type, hardware model, Internet service provider and/or mobile carrier, operating system, and system configuration information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Location Data. We collect location data such as information about your device's location, which can be either precise or imprecise. How much information we collect depends on the type and settings of the device you use to access the Services. For example, we may use GPS and other technologies to collect geolocation data that tells us your current location (based on your IP address). You can opt out of allowing us to collect this information either by refusing access to the information or by disabling your Location setting on your device. However, if you choose to opt out, you may not be able to use certain aspects of the Services."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"infouse"},"2. HOW DO WE PROCESS YOUR INFORMATION?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We process your information to provide, improve, and administer our Services, communicate with you, for security and fraud prevention, and to comply with law. We may also process your information for other purposes with your consent."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We process your personal information for a variety of reasons, depending on how you interact with our Services, including:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To facilitate account creation and authentication and otherwise manage user accounts. We may process your information so you can create and log in to your account, as well as keep your account in
1953working order."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To deliver and facilitate delivery of services to the user. We may process your information to provide you with the requested service."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To respond to user inquiries/offer support to users. We may process your information to respond to your inquiries and solve any potential issues you might have with the requested service."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To send administrative information to you. We may process your information to send you details about our products and services, changes to our terms and policies, and other similar information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To fulfill and manage your orders. We may process your information to fulfill and manage your orders, payments, returns, and exchanges made through the Services."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To enable user-to-user communications. We may process your information if you choose to use any of our offerings that allow for communication with another user."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To request feedback. We may process your information when necessary to request feedback and to contact you about your use of our Services."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'To send you marketing and promotional communications. We may process the personal information you send to us for our marketing purposes, if this is in accordance with your marketing preferences. You can opt out of our marketing emails at any time. For more information, see "'," ",o.createElement("a",{href:"#privacyrights",className:"text-blue-600 hover:underline"},"WHAT ARE YOUR PRIVACY RIGHTS?")," ",'" below.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To deliver targeted advertising to you. We may process your information to develop and display personalized content and advertising tailored to your interests, location, and more. For more information see our Cookie Notice:"," ",o.createElement("a",{href:"https://bookmark.it.com/cookie-policy",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/cookie-policy")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To protect our Services. We may process your information as part of our efforts to keep our Services safe and secure, including fraud monitoring and prevention."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To identify usage trends. We may process information about how you use our Services to better understand how they are being used so we can improve them."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To determine the effectiveness of our marketing and promotional campaigns. We may process your information to better understand how to provide marketing and promotional campaigns that are most relevant to you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To save or protect an individual's vital interest. We may process your information when necessary to save or protect an individualâs vital interest, such as to prevent harm."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"legalbases"},"3. WHAT LEGAL BASES DO WE RELY ON TO PROCESS YOUR INFORMATION?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We only process your personal information when we believe it is necessary and we have a valid legal reason (i.e. , legal basis) to do so under applicable law, like with your consent, to comply with laws, to provide you with services to enter into or fulfill our contractual obligations, to protect your rights, or to fulfill our legitimate business interests."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are located in the EU or UK, this section applies to you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"The General Data Protection Regulation (GDPR) and UK GDPR require us to explain the valid legal bases we rely on in order to process your personal information. As such, we may rely on the following legal bases to process your personal information:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Consent. We may process your information if you have given us permission (i.e. , consent) to use your personal information for a specific purpose. You can withdraw your consent at any time. Learn more about "," ",o.
1953createElement("a",{href:"#withdrawconsent",className:"text-blue-600 hover:underline"},"withdrawing your consent")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Performance of a Contract. We may process your personal information when we believe it is necessary to fulfill our contractual obligations to you, including providing our Services or at your request prior to entering into a contract with you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Legitimate Interests. We may process your information when we believe it is reasonably necessary to achieve our legitimate business interests and those interests do not outweigh your interests and fundamental rights and freedoms. For example, we may process your personal information for some of the purposes described in order to:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Send users information about special offers and discounts on our products and services"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Develop and display personalized and relevant advertising content for our users"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Analyze how our Services are used so we can improve them to engage and retain users"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Support our marketing activities"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Diagnose problems and/or prevent fraudulent activities"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Understand how our users use our products and services so we can improve user experience"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Legal Obligations. We may process your information where we believe it is necessary for compliance with our legal obligations, such as to cooperate with a law enforcement body or regulatory agency, exercise or defend our legal rights, or disclose your information as evidence in litigation in which we are involved."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Vital Interests. We may process your information where we believe it is necessary to protect your vital interests or the vital interests of a third party, such as situations involving potential threats to the safety of any person."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are located in Canada, this section applies to you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We may process your information if you have given us specific permission (i.e. , express consent) to use your personal information for a specific purpose, or in situations where your permission can be inferred (i.e. , implied consent). You can "," ",o.createElement("a",{href:"#withdrawconsent",className:"text-blue-600 hover:underline"},"withdraw your consent")," ","at any time."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"In some exceptional cases, we may be legally permitted under applicable law to process your information without your consent, including, for example:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If collection is clearly in the interests of an individual and consent cannot be obtained in a timely way"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"For investigations and fraud detection and prevention"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"For business transactions provided certain conditions are met"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If it is contained in a witness statement and the collection is necessary to assess, process, or settle an insurance claim"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"For identifying injured, ill, or deceased persons and communicating with next of kin"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If we have reasonable grounds to believe an individual has been, is, or may be victim of financial abuse"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If it is reasonable to expect collection and use with consent would compromise the availability or the accuracy of the information and the collection is reasonable for purposes related to investigating a breach of an agreement or a contravention of the laws of Canada or a province"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If disclosure is required to comply with a subpoena, warrant, court order, or rules of the court relating to the production of records"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If it was produced by an individual in the course of their employment, business, or profession and the collection is consistent with the purposes for which the information was produced"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If the collection is solely for journalistic, artistic, or literary purposes"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If the information is publicly available and is specified by the regulations"),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"whoshare"},"4. WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We may share information in specific situations described
1953in this section and/or with the following third parties."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We may need to share your personal information in the following situations:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Business Transfers. We may share or transfer your information in connection with, or during negotiations of, any merger, sale of company assets, financing, or acquisition of all or a portion of our business to another company."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Business Partners. We may share your information with our business partners to offer you certain products, services, or promotions."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Other Users. When you share personal information (for example, by posting comments, contributions, or other content to the Services) or otherwise interact with public areas of the Services, such personal information may be viewed by all users and may be publicly made available outside the Services in perpetuity. Similarly, other users will be able to view descriptions of your activity, communicate with you within our Services, and view your profile."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"cookies"},"5. DO WE USE COOKIES AND OTHER TRACKING TECHNOLOGIES?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We may use cookies and other tracking technologies to collect and store your information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We may use cookies and similar tracking technologies (like web beacons and pixels) to access or store information. Specific information about how we use such technologies and how you can refuse certain cookies is set out in our Cookie Notice :"," ",o.createElement("a",{href:"https://bookmark.it.com/cookie-policy",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/cookie-policy")," ","."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"inforetain"},"6. HOW LONG DO WE KEEP YOUR INFORMATION?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We keep your information for as long as necessary to fulfill the purposes outlined in this privacy notice unless otherwise required by law."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We will only keep your personal information for as long as it is necessary for the purposes set out in this privacy notice, unless a longer retention period is required or permitted by law (such as tax, accounting, or other legal requirements). No purpose in this notice will require us keeping your personal information for longer than the period of time in which users have an account with us ."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"When we have no ongoing legitimate business need to process your personal information, we will either delete or anonymize such information, or, if this is not possible (for example, because your personal information has been stored in backup archives), then we will securely store your personal information and isolate it from any further processing until deletion is possible."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"infosafe"},"7. HOW DO WE KEEP YOUR INFORMATION SAFE?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We aim to protect your personal information through a system of organizational and technical security measures."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We have implemented appropriate and reasonable technical and organizational security measures designed to protect the security of any personal information we process. However, despite our safeguards and efforts to secure your information, no electronic transmission over the Internet or information storage technology can be guaranteed to be 100% secure, so we cannot promise or guarantee that hackers, cybercriminals, or other unauthorized third parties will not be able to defeat our security and improperly collect, access, steal, or modify your information. Although we will do our best to protect your personal information, transmission of personal information to and from our Services is at your own risk. You should only access the Services within a secure environment."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"infominors"},"8. DO WE COLLECT INFORMATION FROM MINORS?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"We do not knowingly collect data from or market to children under 18 years of age ."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We do not knowingly solicit data from or market to children under 18 years of age. By using the Services, you represent that you are at least 18 or that you are the parent or guardian of such a minor and consent to such minor dependentâs use of the Services. If we learn that personal information from users less than 18 years of age has been collected, we will deactivate the account and take reasonable measures to promptly delete such data from our records. If you become aware of any data we may have collected from children under age 18, please contact us at [email protected] ."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"privacyrights"},"9. WHAT ARE YOUR PRIVACY RIGHTS?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"In some regions, such as the European Economic Area (EEA), United Kingdom (UK), Switzerland, and Canada , you have rights that allow you greater access to and control over your personal information. Â You may review, change, or terminate your account at any time."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'In some regions (like the EEA, UK, Switzerland, and Canada ), you have certain rights under applicable data protection laws. These may include the right (i) to request access and obtain a copy of your personal information, (ii) to request rectification or erasure; (iii) to restrict the processing of your personal information; (iv) if applicable, to data portability; and (v) not to be subject to automated decision-making. In certain circumstances, you may also have the right to object to the processing of your personal information. You can make such a request by contacting us by using the contact details provided in the section "'," ",o.
1953createElement("a",{href:"#contact",className:"text-blue-600 hover:underline"},"HOW CAN YOU CONTACT US ABOUT THIS NOTICE?")," ",'" below.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We will consider and act upon any request in accordance with applicable data protection laws."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"}," "),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are located in the EEA or UK and you believe we are unlawfully processing your personal information, you also have the right to complain to your"," ",o.createElement("a",{href:"https://ec.europa.eu/justice/data-protection/bodies/authorities/index_en.htm",className:"text-blue-600 hover:underline"},"Member State data protection authority")," ","or "," ",o.createElement("a",{href:"https://ico.org.uk/make-a-complaint/data-protection-complaints/data-protection-complaints/",className:"text-blue-600 hover:underline"},"UK data protection authority")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are located in Switzerland, you may contact the"," ",o.createElement("a",{href:"https://www.edoeb.admin.ch/edoeb/en/home.html",className:"text-blue-600 hover:underline"},"Federal Data Protection and Information Commissioner")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300",id:"withdrawconsent"},'Withdrawing your consent: If we are relying on your consent to process your personal information, which may be express and/or implied consent depending on the applicable law, you have the right to withdraw your consent at any time. You can withdraw your consent at any time by contacting us by using the contact details provided in the section "'," ",o.createElement("a",{href:"#contact",className:"text-blue-600 hover:underline"},"HOW CAN YOU CONTACT US ABOUT THIS NOTICE?")," ",'" below or updating your preferences .'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"However, please note that this will not affect the lawfulness of the processing before its withdrawal nor, when applicable law allows, will it affect the processing of your personal information conducted in reliance on lawful processing grounds other than consent."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Opting out of marketing and promotional communications:  You can unsubscribe from our marketing and promotional communications at any time by clicking on the unsubscribe link in the emails that we send, or by contacting us using the details provided in the section "'," ",o.createElement("a",{href:"#contact",className:"text-blue-600 hover:underline"},"HOW CAN YOU CONTACT US ABOUT THIS NOTICE?")," ",'" below. You will then be removed from the marketing lists. However, we may still communicate with you â for example, to send you service-related messages that are necessary for the administration and use of your account, to respond to service requests, or for other non-marketing purposes.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Account Information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you would at any time like to review or change the information in your account or terminate your account, you can:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Log in to your account settings and update your user account, or request deletion of your account at"," ",o.createElement("a",{href:"https://bookmark.it.com/delete-account",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/delete-account")," ","(no app installation required â you verify ownership of your email address with a one-time code)."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Upon your request to delete your account, sign-in is disabled immediately and your account and personal data are permanently deleted after a 30-day grace period, during which you may cancel the request from the same page. Content you contributed to shared workspaces remains with those workspaces with your identifying information (name/attribution) removed; your Personal Workspace, any workspace in which you are the sole member, and their contents are deleted. However, we may retain some information in our files to prevent fraud, troubleshoot problems, assist with any investigations, enforce our legal terms and/or comply with applicable legal requirements."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Cookies and similar technologies: Most Web browsers are set to accept cookies by default. If you prefer, you can usually choose to set your browser to remove cookies and to reject cookies. If you choose to remove cookies or reject cookies, this could affect certain features or services of our Services. For further information, please see our Cookie Notice:"," ",o.createElement("a",{href:"https://bookmark.it.com/cookie-policy",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/cookie-policy")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you have questions or comments about your privacy rights, you may email us at [email protected] ."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300",id:"DNT"},"10. CONTROLS FOR DO-NOT-TRACK FEATURES"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Most web browsers and some mobile operating systems and mobile applications include a Do-Not-Track ( "DNT" ) feature or setting you can activate to signal your privacy preference not to have data about your online browsing activities monitored and collected. At this stage no uniform technology standard for recognizing and implementing DNT signals has been finalized . As such, we do not currently respond to DNT browser signals or any other mechanism that automatically communicates your choice not to be tracked online. If a standard for online tracking is adopted that we must follow in the future, we will inform you about that practice in a revised version of this privacy notice.'),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"uslaws"},"11. DO UNITED STATES RESIDENTS HAVE SPECIFIC PRIVACY RIGHTS?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"If you are a resident of California , Colorado , Connecticut , Utah or Virginia , you are granted specific rights regarding access to your personal information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"What categories of personal information do we collect?"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We have collected the following categories of personal information in the past twelve (12) months:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Category Examples Collected"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"A. Identifiers"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Contact details, such as real name, alias, postal address, telephone or mobile contact number, unique personal identifier, online identifier, Internet Protocol address, email address, and account name"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"B. Personal information as defined in the California Customer Records statute"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Name, contact information, education, employment, employment history, and financial information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"C . Protected classification characteristics under state or federal law"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Gender and date of birth"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"D . Commercial information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Transaction information, purchase history, financial details, and payment information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"E . Biometric information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Fingerprints and voiceprints"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"F . Internet or other similar network activity"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Browsing history, search history, online behavior , interest data, and interactions with our and other websites, applications, systems, and advertisements"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"G . Geolocation data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Device location"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"H . Audio, electronic, visual, thermal, olfactory, or similar information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Images and audio, video or call recordings created in connection with our business activities"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"I . Professional or employment-related information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Business contact details in order to provide you our Services at a business level or job title, work history, and professional qual
1953ifications if you apply for a job with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"J . Education Information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Student records and directory information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"K . Inferences drawn from collected personal information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Inferences drawn from any of the collected personal information listed above to create a profile or summary about, for example, an individualâs preferences and characteristics"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"L . Sensitive personal Information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"NO"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We will use and retain the collected personal information as needed to provide the Services or for:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Category B - As long as the user has an account with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We may also collect other personal information outside of these categories through instances where you interact with us in person, online, or by phone or mail in the context of:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Receiving help through our customer support channels;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Participation in customer surveys or contests; and"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Facilitation in the delivery of our Services and to respond to your inquiries."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"How do we use and share your personal information?"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Learn about how we use your personal information in the section, "'," ",o.createElement("a",{href:"#infouse",className:"text-blue-600 hover:underline"},"HOW DO WE PROCESS YOUR INFORMATION?")," ",'"'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Will your information be shared with anyone else?"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'We may disclose your personal information with our service providers pursuant to a written contract between us and each service provider. Learn more about how we disclose personal information to in the section, "'," ",o.createElement("a",{href:"#whoshare",className:"text-blue-600 hover:underline"},"WHEN AND WITH WHOM DO WE SHARE YOUR PERSONAL INFORMATION?")," ",'"'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'We may use your personal information for our own business purposes, such as for undertaking internal research for technological development and demonstration. This is not considered to be "selling" of your personal information.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We have not disclosed, sold, or shared any personal information to third parties for a business or commercial purpose in the preceding twelve (12) months. We  will not sell or share personal information in the future belonging to website visitors, users, and other consumers."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"California Residents"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'California Civil Code Section 1798.83, also known as the "Shine The Light" law permits our users who are California residents to request and obtain from us, once a year and free of charge, information about categories of personal information (if any) we disclosed to third parties for direct marketing purposes and the names and addresses of all third parties with which we shared personal information in the immediately preceding calendar year. If you are a California resident and would like to make such a request, please submit your request in writing to us using the contact information provided below.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are under 18 years of age, reside in California, and have a registered account with the Services, you have the right to request removal of unwanted data that you publicly post on the Services. To request removal of such data, please contact us using the contact information provided below and include the email address associated with your account and a statement that you reside in California. We will make sure the data is not publicly displayed on the Services, but please be aware that the data may not be completely or comprehensively removed from all our systems (e.g. , backups, etc.)."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"CCPA Privacy Notice"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This section applies only to California residents. Under the California Consumer Privacy Act (CCPA), you have the rights listed below."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'The California Code of Regulations defines a "residents" as:'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"(1) every individual who is in the State of California for other than a temporary or transitory purpose and"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"(2) every individual who is domiciled in the State of California who is outside the State of California for a temporary or transitory purpose"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'All other individuals are defined as "non-residents."'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'If this definition of "resident" applies to you, we must adhere to certain rights and obligations regarding your personal information.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Your rights with respect to your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"}
1953,"Right to request deletion of the data â Request to delete"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"You can ask for the deletion of your personal information. If you ask us to delete your personal information, we will respect your request and delete your personal information, subject to certain exceptions provided by law, such as (but not limited to) the exercise by another consumer of his or her right to free speech, our compliance requirements resulting from a legal obligation, or any processing that may be required to protect against illegal activities."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to be informed â Request to know"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Depending on the circumstances, you have a right to know:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"whether we collect and use your personal information;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"the categories of personal information that we collect;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"the purposes for which the collected personal information is used;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"whether we sell or share personal information to third parties;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"the categories of personal information that we sold, shared, or disclosed for a business purpose;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"the categories of third parties to whom the personal information was sold, shared, or disclosed for a business purpose;"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"the business or commercial purpose for collecting, selling, or sharing personal information; and"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"the specific pieces of personal information we collected about you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"In accordance with applicable law, we are not obligated to provide or delete consumer information that is de-identified in response to a consumer request or to re-identify individual data to verify a consumer request."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to Non-Discrimination for the Exercise of a Consumerâs Privacy Rights"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We will not discriminate against you if you exercise your privacy rights."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to Limit Use and Disclosure of Sensitive Personal Information"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We do not process consumer's sensitive personal information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Verification process"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Upon receiving your request, we will need to verify your identity to determine you are the same person about whom we have the information in our system. These verification efforts require us to ask you to provide information so that we can match it with information you have previously provided us. For instance, depending on the type of request you submit, we may ask you to provide certain information so that we can match the information you provide with the information we already have on file, or we may contact you through a communication method (e.g. , phone or email) that you have previously provided to us. We may also use other verification methods as the circumstances dictate."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We will only use personal information provided in your request to verify your identity or authority to make the request. To the extent possible, we will avoid requesting additional information from you for the purposes of verification. However, if we cannot verify your identity from the information already maintained by us, we may request that you provide additional information for the purposes of verifying your identity and for security or fraud-prevention purposes. We will delete such additionally provided information as soon as we finish verifying you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Other privacy rights"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"You may object to the processing of your personal information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"You may request correction of your personal data if it is incorrect or no longer relevant, or ask to restrict the processing of the information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"You can designate an authorized agent to make a request under the CCPA on your behalf. We may deny a request from an authorized agent that does not submit proof that they have been validly authorized to act on your behalf in accordance with the CCPA."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"You may request to opt out from future selling or sharing of your personal information to third parties. Upon receiving an opt-out request, we will act upon the request as soon as feasibly possible, but no later than fifteen (15) days from the date of the request submission."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To exercise these rights, you can contact us by submitting a "," ",o.
1953createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ",", by email at [email protected] , or by referring to the contact details at the bottom of this document. If you have a complaint about how we handle your data, we would like to hear from you."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Colorado Residents"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This section applies only to Colorado residents. Under the Colorado Privacy Act (CPA), you have the rights listed below. However, these rights are not absolute, and in certain cases, we may decline your request as permitted by law."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to be informed whether or not we are processing your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to access your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to correct inaccuracies in your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to request deletion of your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to obtain a copy of the personal data you previously shared with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Right to opt out of the processing of your personal data if it is used for targeted advertising, the sale of personal data, or profiling in furtherance of decisions that produce legal or similarly significant effects ( "profiling" )'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To submit a request to exercise these rights described above, please email [email protected]  or submit a "," ",o.createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If we decline to take action regarding your request and you wish to appeal our decision, please email us at [email protected] . Within forty-five (45) days of receipt of an appeal, we will inform you in writing of any action taken or not taken in response to the appeal, including a written explanation of the reasons for the decisions."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Connecticut Residents"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This section applies only to Connecticut residents. Under the Connecticut Data Privacy Act (CTDPA), you have the rights listed below. However, these rights are not absolute, and in certain cases, we may decline your request as permitted by law."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to be informed whether or not we are processing your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to access your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to correct inaccuracies in your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to request deletion of your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to obtain a copy of the personal data you previously shared with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Right to opt out of the processing of your personal data if it is used for targeted advertising, the sale of personal data, or profiling in furtherance of decisions that produce legal or similarly significant effects ( "profiling" )'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To submit a request to exercise these rights described above, please email [email protected] or submit a"," ",o.createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If we decline to take action regarding your request and you wish to appeal our decision, please email us at [email protected] . Within sixty (60) days of receipt of an appeal, we will inform you in writing of any action taken or not taken in response to the appeal, including a written explanation of the reasons for the decisions."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Utah Residents"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This section applies only to Utah residents. Under the Utah Consumer Privacy Act (UCPA), you have the rights listed below. However, these rights are not absolute, and in certain cases, we may decline your request as permitted by law."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to be informed whether or not we are processing your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to access your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"}
1953,"Right to request deletion of your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to obtain a copy of the personal data you previously shared with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to opt out of the processing of your personal data if it is used for targeted advertising or the sale of personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"To submit a request to exercise these rights described above, please email [email protected] or submit a"," ",o.createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Virginia Residents"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Under the Virginia Consumer Data Protection Act (VCDPA):"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'"Consumer" means a natural person who is a resident of the Commonwealth acting only in an individual or household context. It does not include a natural person acting in a commercial or employment context.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'"Personal data" means any information that is linked or reasonably linkable to an identified or identifiable natural person. "Personal data" does not include de-identified data or publicly available information.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'"Sale of personal data" means the exchange of personal data for monetary consideration.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'If this definition of "consumer" applies to you, we must adhere to certain rights and obligations regarding your personal data.'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Your rights with respect to your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to be informed whether or not we are processing your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to access your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to correct inaccuracies in your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to request deletion of your personal data"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to obtain a copy of the personal data you previously shared with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'Right to opt out of the processing of your personal data if it is used for targeted advertising, the sale of personal data, or profiling in furtherance of decisions that produce legal or similarly significant effects ( "profiling" )'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Exercise your rights provided under the Virginia VCDPA"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"You may contact us by email at [email protected] or submit a"," ",o.createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are using an authorized agent to exercise your rights, we may deny a request if the authorized agent does not submit proof that they have been validly authorized to act on your behalf."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Verification process"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We may request that you provide additional information reasonably necessary to verify you and your consumer's request. If you submit the request through an authorized agent, we may need to collect additional information to verify your identity before processing your request."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Upon receiving your request, we will respond without undue delay, but in all cases, within forty-five (45) days of receipt. The response period may be extended once by forty-five (45) additional days when reasonably necessary. We will inform you of any such extension within the initial 45-day response period, together with the reason for the extension."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Right to appeal"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If we decline to take action regarding your request, we will inform you of our decision and reasoning behind it. If you wish to appeal our decision, please email us at [email protected] . Within sixty (60) days of receipt of an appeal, we will inform you in writing of any action taken or not taken in response to the appeal, including a written explanation of the reasons for the decisions. If your appeal is denied, you may contact the"," ",o.
1953createElement("a",{href:"https://www.oag.state.va.us/consumer-protection/index.php/file-a-complaint",className:"text-blue-600 hover:underline"},"Attorney General to submit a complaint")," ","."),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"otherlaws"},"12. DO OTHER REGIONS HAVE SPECIFIC PRIVACY RIGHTS?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"You may have additional rights based on the country you reside in."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Australia and New Zealand"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"We collect and process your personal information under the obligations and conditions set by Australia's Privacy Act 1988 and New Zealand's Privacy Act 2020 (Privacy Act)."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"This privacy notice satisfies the notice requirements defined in both Privacy Acts , in particular: what personal information we collect from you, from which sources, for which purposes, and other recipients of your personal information."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you do not wish to provide the personal information necessary to fulfill their applicable purpose, it may affect our ability to provide our services, in particular:"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"offer you the products or services that you want"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"respond to or help with your requests"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"manage your account with us"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"confirm your identity and protect your account"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'At any time, you have the right to request access to or correction of your personal information. You can make such a request by contacting us by using the contact details provided in the section "'," ",o.createElement("a",{href:"#request",className:"text-blue-600 hover:underline"},"HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU?")," ",'"'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"I f you believe we are unlawfully processing your personal information, you have the right to submit a complaint about a breach of the Australian Privacy Principles to the"," ",o.createElement("a",{href:"https://www.oaic.gov.au/privacy/privacy-complaints/lodge-a-privacy-complaint-with-us",className:"text-blue-600 hover:underline"},"Office of the Australian Information Commissioner")," ","and a breach of New Zealand's Privacy Principles to the"," ",o.createElement("a",{href:"https://www.privacy.org.nz/your-rights/making-a-complaint/",className:"text-blue-600 hover:underline"},"Office of New Zealand Privacy Commissioner")," ","."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Republic of South Africa"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'At any time, you have the right to request access to or correction of your personal information. You can make such a request by contacting us by using the contact details provided in the section "'," ",o.createElement("a",{href:"#request",className:"text-blue-600 hover:underline"},"HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU?")," ",'"'),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you are unsatisfied with the manner in which we address any complaint with regard to our processing of personal information, you can contact the office of the regulator, the details of which are:"),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"https://inforegulator.org.za/",className:"text-blue-600 hover:underline"},"The Information Regulator (South Africa)")),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"}
1953,"General enquiries: "," ",o.createElement("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:underline"},"[email protected]")),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Complaints (complete POPIA/PAIA form 5): "," ",o.createElement("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:underline"},"[email protected]")," ","& "," ",o.createElement("a",{href:"mailto:[email protected]",className:"text-blue-600 hover:underline"},"[email protected]")),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"policyupdates"},"13. DO WE MAKE UPDATES TO THIS NOTICE?"),o.createElement("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-md my-4 italic border-l-4 border-gray-300 dark:border-gray-600"},o.createElement("span",{className:"font-bold"},"In Short: "),"Yes, we will update this notice as necessary to stay compliant with relevant laws."),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},'We may update this privacy notice from time to time. The updated version will be indicated by an updated "Revised" date and the updated version will be effective as soon as it is accessible. If we make material changes to this privacy notice, we may notify you either by prominently posting a notice of such changes or by directly sending you a notification. We encourage you to review this privacy notice frequently to be informed of how we are protecting your information.'),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"contact"},"14. HOW CAN YOU CONTACT US ABOUT THIS NOTICE?"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"If you have questions or comments about this notice, you may email us at [email protected]  or contact us by post at:"),o.createElement("p",{className:"flex flex-col gap-1"},o.createElement("span",null,"Pixels & Form Inc."),o.createElement("span",null,"1907 8th Ave N"),o.createElement("span",null,"Seattle , WA 98109"),o.createElement("span",null,"United States"),o.createElement("span",null,"[email protected]")),o.createElement("h2",{className:"text-xl font-bold mt-8 mb-4",id:"request"},"15. HOW CAN YOU REVIEW, UPDATE, OR DELETE THE DATA WE COLLECT FROM YOU?"),o.createElement("p",{className:"mb-4 text-gray-700 dark:text-gray-300"},"Based on the applicable laws of your country, you may have the right to request access to the personal information we collect from you, change that information, or delete it. To request to review, update, or delete your personal information, please fill out and submit a "," ",o.createElement("a",{href:"https://app.termly.io/notify/f0a66a24-48c1-4456-9a42-4b3f043971f1",className:"text-blue-600 hover:underline"},"data subject access request")," ",". To delete your account and its associated data entirely, visit"," ",o.createElement("a",{href:"https://bookmark.it.com/delete-account",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/delete-account")," ","â this works whether or not you have the app installed."))},Qne=()=>(yr(),o.createElement("div",{className:"app-content app-marketing app-marketing__privacy dark__text legal-content"},o.createElement(BS,null),o.createElement("div",{className:""},o.createElement("div",{className:""},o.createElement("div",null,o.createElement("h1",{className:"text-center text-2xl text-gray-900 dark__text mt-4"},"Privacy Policy"),o.createElement("div",{className:"text-center mr-6"},"Last updated July 16, 2026")),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("div",null,o.createElement("div",{className:"document-previewer-wrapper-a717db bg-white dark:bg-gray-900 p-8 rounded-lg shadow-sm"},o.createElement("div",{"data-custom-class":"body"},o.createElement(_qe,null)))))))),kqe=()=>{const e=yr();return o.createElement("div",{className:"prose dark:prose-invert max-w-none text-gray-700 dark:text-gray-300"},Rm()?o.createElement("span",null,o.createElement("button",{type:"button",className:"text-blue-600 hover:underline bg-transparent border-0 p-0 cursor-pointer font-inherit text-left",onClick:()=>e(-1)},"Back")):null,o.createElement("h2",{className:"text-2xl font-bold mt-8 mb-4 text-black dark:text-white"},"AGREEMENT TO OUR LEGAL TERMS"),o.createElement("p",{className:"mb-4",id:"9d459c4e-c548-e5cb-7729-a118548965d2"},'We are Pixels & Form Inc. , doing business as Bookmark It ( " Company," "we," " us," "our" ) , a company registered in Washington, United States at 1907 8th Ave N , Seattle , WA 98109 .'),o.createElement("p",{className:"mb-4"}
1953,"We operate the website"," ",o.createElement("a",{href:"https://bookmark.it.com",target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline"},"https://bookmark.it.com")," ",'(the " Site" ) , as well as any other related products and services that refer or link to these legal terms (the " Legal Terms" ) (collectively, the " Services" ).'),o.createElement("p",{className:"mb-4"},"We provide a collaborative bookmarking solution for designers, product owners, and engineers. Share product development resources such as UX designs, requirements, and technical documentation."),o.createElement("p",{className:"mb-4"},"You can contact us by email at [email protected] or by mail to 1907 8th Ave N , Seattle , WA 98109 , United States ."),o.createElement("p",{className:"mb-4"},'These Legal Terms constitute a legally binding agreement made between you, whether personally or on behalf of an entity (" you" ), and Pixels & Form Inc., concerning your access to and use of the Services. You agree that by accessing the Services, you have read, understood, and agreed to be bound by all of these Legal Terms. IF YOU DO NOT AGREE WITH ALL OF THESE LEGAL TERMS, THEN YOU ARE EXPRESSLY PROHIBITED FROM USING THE SERVICES AND YOU MUST DISCONTINUE USE IMMEDIATELY.'),o.createElement("p",{className:"mb-4"},"We will provide you with prior notice of any scheduled changes to the Services you are using. The modified Legal Terms will become effective upon posting or notifying you by [email protected] , as stated in the email message. By continuing to use the Services after the effective date of any changes, you agree to be bound by the modified terms."),o.createElement("p",{className:"mb-4",id:"a2595956-7028-dbe5-123e-d3d3a93ed076"},"All users who are minors in the jurisdiction in which they reside (generally under the age of 18) must have the permission of, and be directly supervised by, their parent or guardian to use the Services. If you are a minor, you must have your parent or guardian read and agree to these Legal Terms prior to you using the Services."),o.createElement("p",{className:"mb-4"},"We recommend that you print a copy of these Legal Terms for your records."),o.createElement("p",{className:"mb-4"},"TABLE OF CONTENTS"),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#services",className:"text-blue-600 hover:underline"},"1. OUR SERVICES")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#ip",className:"text-blue-600 hover:underline"},"2. INTELLECTUAL PROPERTY RIGHTS")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#userreps",className:"text-blue-600 hover:underline"},"3. USER REPRESENTATIONS")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#userreg",className:"text-blue-600 hover:underline"},"4. USER REGISTRATION")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#products",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#purchases",className:"text-blue-600 hover:underline"},"5. PURCHASES AND PAYMENT")),o.createElement("p",{className:"mb-4"}," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#free",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#cancel",className:"text-blue-600 hover:underline"},"6. CANCELLATION")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#software",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#prohibited",className:"text-blue-600 hover:underline"},"7. PROHIBITED ACTIVITIES")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#ugc",className:"text-blue-600 hover:underline"},"8. USER GENERATED CONTRIBUTIONS")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#license",className:"text-blue-600 hover:underline"},"9. CONTRIBUTION LICENSE")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#reviews",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#mobile",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#socialmedia",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#thirdparty",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#advertisers",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#sitemanage",className:"text-blue-600 hover:underline"},"10. SERVICES MANAGEMENT")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#ppyes",className:"text-blue-600 hover:underline"},"11. PRIVACY POLICY")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#ppno",className:"text-blue-600 hover:underline"})," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#dmca",className:"text-blue-600 hover:underline"})),o.createElement("p",{className:"mb-4"}," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#terms",className:"text-blue-600 hover:underline"},"12. TERM AND TERMINATION")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#modifications",className:"text-blue-600 hover:underline"},"13. MODIFICATIONS AND INTERRUPTIONS")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#law",className:"text-blue-600 hover:underline"},"14. GOVERNING LAW")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#disputes",className:"text-blue-600 hover:underline"},"15. DISPUTE RESOLUTION")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#corrections",className:"text-blue-600 hover:underline"},"16. CORRECTIONS")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#disclaimer",className:"text-blue-600 hover:underline"},"17. DISCLAIMER")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#liability",className:"text-blue-600 hover:underline"},"18. LIMITATIONS OF LIABILITY")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#indemnification",className:"text-blue-600 hover:underline"},"19. INDEMNIFICATION")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#userdata",className:"text-blue-600 hover:underline"},"20. USER DATA")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#electronic",className:"text-blue-600 hover:underline"},"21. ELECTRONIC COMMUNICATIONS, TRANSACTIONS, AND SIGNATURES")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#california",className:"text-blue-600 hover:underline"},"22. CALIFORNIA USERS AND RESIDENTS")),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#misc",className:"text-blue-600 hover:underline"},"23. MISCELLANEOUS")," "),o.createElement("p",{className:"mb-4"},o.createElement("a",{href:"#contact",className:"text-blue-600 hover:underline"},"24. CONTACT US")),o.createElement("p",{className:"mb-4",id:"services"},"1. OUR SERVICES"),o.createElement("p",{className:"mb-4"},"The information provided when using the Services is not intended for distribution to or use by any person or entity in any jurisdiction or country where such distribution or use would be contrary to law or regulation or which would subject us to any registration requirement within such jurisdiction or country. Accordingly, those persons who choose to access the Services from other locations do so on their own initiative and are solely responsible for compliance with local laws, if and to the extent local laws are applicable."),o.createElement("p",{className:"mb-4"},"The Services are not tailored to comply with industry-specific regulations (Health Insurance Portability and Accountability Act (HIPAA), Federal Information Security Management Act (FISMA), etc.), so if your interactions would be subjected to such laws, you may
1953not use the Services. You may not use the Services in a way that would violate the Gramm-Leach-Bliley Act (GLBA)."),o.createElement("p",{className:"mb-4",id:"ip"},"2. INTELLECTUAL PROPERTY RIGHTS"),o.createElement("p",{className:"mb-4"},"Our intellectual property"),o.createElement("p",{className:"mb-4"},'We are the owner or the licensee of all intellectual property rights in our Services, including all source code, databases, functionality, software, website designs, audio, video, text, photographs, and graphics in the Services (collectively, the "Content" ), as well as the trademarks, service marks, and logos contained therein (the "Marks" ).'),o.createElement("p",{className:"mb-4"},"Our Content and Marks are protected by copyright and trademark laws (and various other intellectual property rights and unfair competition laws) and treaties in the United States and around the world."),o.createElement("p",{className:"mb-4"},'The Content and Marks are provided in or through the Services "AS IS" for your personal, non-commercial use or internal business purpose only.'),o.createElement("p",{className:"mb-4"},"Your use of our Services"),o.createElement("p",{className:"mb-4"},'Subject to your compliance with these Legal Terms, including the "'," ",o.createElement("a",{href:"#prohibited",className:"text-blue-600 hover:underline"},"PROHIBITED ACTIVITIES")," ",'" section below, we grant you a non-exclusive, non-transferable, revocable license to: access the Services; and download or print a copy of any portion of the Content to which you have properly gained access.'),o.createElement("p",{className:"mb-4"},"solely for your personal, non-commercial use or internal business purpose ."),o.createElement("p",{className:"mb-4"},"Except as set out in this section or elsewhere in our Legal Terms, no part of the Services and no Content or Marks may be copied, reproduced, aggregated, republished, uploaded, posted, publicly displayed, encoded, translated, transmitted, distributed, sold, licensed, or otherwise exploited for any commercial purpose whatsoever, without our express prior written permission."),o.createElement("p",{className:"mb-4"},"If you wish to make any use of the Services, Content, or Marks other than as set out in this section or elsewhere in our Legal Terms, please address your request to: [email protected]. If we ever grant you the permission to post, reproduce, or publicly display any part of our Services or Content, you must identify us as the owners or licensors of the Services, Content, or Marks and ensure that any copyright or proprietary notice appears or is visible on posting, reproducing, or displaying our Content."),o.createElement("p",{className:"mb-4"},"We reserve all rights not expressly granted to you in and to the Services, Content, and Marks."),o.createElement("p",{className:"mb-4"},"Any breach of these Intellectual Property Rights will constitute a material breach of our Legal Terms and your right to use our Services will terminate immediately."),o.createElement("p",{className:"mb-4"},"Your submissions and contributions"),o.createElement("p",{className:"mb-4"},'Please review this section and the "'," ",o.createElement("a",{href:"#prohibited",className:"text-blue-600 hover:underline"},"PROHIBITED ACTIVITIES")," ",'" section carefully prior to using our Services to understand the (a) rights you give us and (b) obligations you have when you post or upload any content through the Services.'),o.createElement("p",{className:"mb-4"},'Submissions: By directly sending us any question, comment, suggestion, idea, feedback, or other information about the Services ( "Submissions" ), you agree to assign to us all intellectual property rights in such Submission. You agree that we shall own this Submission and be entitled to its unrestricted use and dissemination for any lawful purpose, commercial or otherwise, without acknowledgment or compensation to you.'),o.createElement("p",{className:"mb-4"},'Contributions: The Services may invite you to chat, contribute to, or participate in blogs, message boards, online forums, and other functionality during which you may create, submit, post, display, transmit, publish, distribute, or broadcast content and materials to us or through the Services, including but not limited to text, writings, video, audio, photographs, music, graphics, comments, reviews, rating suggestions, personal information, or other material ( "Contributions" ). Any Submission that is publicly posted shall also be treated as a Contribution.'),o.createElement("p",{className:"mb-4"},"You understand that Contributions may be viewable by other users of the Services ."),o.createElement("p",{className:"mb-4"},"When you post Contributions, you grant us a license (including use of your name, trademarks, and logos): By posting any Contributions, you grant us an unrestricted, unlimited, irrevocable, perpetual, non-exclusive, transferable, royalty-free, fully-paid, worldwide right, and license to: use, copy, reproduce, distribute, sell, resell, publish, broadcast, retitle, store, publicly perform, publicly display, reformat, translate, excerpt (in whole or in part), and exploit your Contributions (including, without limitation, your image, name, and voice) for any purpose, commercial, advertising, or otherwise, to prepare derivative works of, or incorporate into other works, your Contributions, and to sublicense the licenses granted in this section. Our use and distribution may occur in any media formats and through any media channels."),o.createElement("p",{className:"mb-4"},"This license includes our use of your name, company name, and franchise name, as applicable, and any of the trademarks, service marks, trade names, logos, and personal and commercial images you provide."),o.createElement("p",{className:"mb-4"},'You are responsible for what you post or upload: By sending us Submissions and/or posting Contributions through any part of the Services or making Contributions accessible through the Services by linking your account through the Services to any of your social networking accounts, you: confirm that you have read and agree with our "'," ",o.
1953createElement("a",{href:"#prohibited",className:"text-blue-600 hover:underline"},"PROHIBITED ACTIVITIES")," ",'" and will not post, send, publish, upload, or transmit through the Services any Submission nor post any Contribution that is illegal, harassing, hateful, harmful, defamatory, obscene, bullying, abusive, discriminatory, threatening to any person or group, sexually explicit, false, inaccurate, deceitful, or misleading; to the extent permissible by applicable law, waive any and all moral rights to any such Submission and/or Contribution ; warrant that any such Submission and/or Contributions are original to you or that you have the necessary rights and licenses to submit such Submissions and/or Contributions and that you have full authority to grant us the above-mentioned rights in relation to your Submissions and/or Contributions ; and warrant and represent that your Submissions and/or Contributions do not constitute confidential information.'),o.createElement("p",{className:"mb-4"},"You are solely responsible for your Submissions and/or Contributions and you expressly agree to reimburse us for any and all losses that we may suffer because of your breach of (a) this section, (b) any third partyâs intellectual property rights, or (c) applicable law."),o.createElement("p",{className:"mb-4"},"We may remove or edit your Content: Although we have no obligation to monitor any Contributions, we shall have the right to remove or edit any Contributions at any time without notice if in our reasonable opinion we consider such Contributions harmful or in breach of these Legal Terms. If we remove or edit any such Contributions, we may also suspend or disable your account and report you to the authorities."),o.createElement("p",{className:"mb-4",id:"userreps"},"3. USER REPRESENTATIONS"),o.createElement("p",{className:"mb-4",id:"d2d82ca8-275f-3f86-8149-8a5ef8054af6"},"By using the Services, you represent and warrant that: ( 1 ) all registration information you submit will be true, accurate, current, and complete; ( 2 ) you will maintain the accuracy of such information and promptly update such registration information as necessary; ( 3 ) you have the legal capacity and you agree to comply with these Legal Terms; ( 4 ) you are not a minor in the jurisdiction in which you reside , or if a minor, you have received parental permission to use the Services ; ( 5 ) you will not access the Services through automated or non-human means, whether through a bot, script or otherwise; ( 6 ) you will not use the Services for any illegal or unauthorized purpose; and ( 7 ) your use of the Services will not violate any applicable law or regulation."),o.createElement("p",{className:"mb-4"},"If you provide any information that is untrue, inaccurate, not current, or incomplete, we have the right to suspend or terminate your account and refuse any and all current or future use of the Services (or any portion thereof)."),o.createElement("p",{className:"mb-4",id:"userreg"},"4. USER REGISTRATION"),o.createElement("p",{className:"mb-4"},"You may be required to register to use the Services. You agree to keep your password confidential and will be responsible for all use of your account and password. We reserve the right to remove, reclaim, or change a username you select if we determine, in our sole discretion, that such username is inappropriate, obscene, or otherwise objectionable."),o.createElement("p",{className:"mb-4",id:"purchases"},"5. PURCHASES AND PAYMENT"),o.createElement("p",{className:"mb-4"},"Subscription terms: Your account will automatically be charged on a monthly basis until you cancel. If you upgrade or downgrade to a different subscription, the price will change to the then current list price for such relevant subscription. Sales tax may be applied where applicable."),o.createElement("p",{className:"mb-4"},"We accept the following forms of payment:"),o.createElement("p",{className:"mb-4"},"- Visa"),o.createElement("p",{className:"mb-4"},"- Mastercard"),o.createElement("p",{className:"mb-4"},"- Discover"),o.createElement("p",{className:"mb-4"},"You agree to provide current, complete, and accurate purchase and account information for all purchases made via the Services. You further agree to promptly update account and payment information, including email address, payment method, and payment card expiration date, so that we can complete your transactions and contact you as needed. Sales tax will be added to the price of purchases as deemed required by us. We may change prices at any time. All payments shall be in US dollars."),o.createElement("p",{className:"mb-4",id:"9c0216a1-d094-fd73-a062-9615dc795ffc"},"You agree to pay all charges at the prices then in effect for your purchases, and you authorize us to charge your chosen payment provider for any such amounts upon placing your order. If your order is subject to recurring charges, then you consent to our charging your payment method on a recurring basis without requiring your prior approval for each recurring charge, until such time as you cancel the applicable order. We reserve the right to correct any errors or mistakes in pricing, even if we have already requested or received payment."),o.createElement("p",{className:"mb-4"},"We reserve the right to refuse any order placed through the Services. We may, in our sole discretion, limit or cancel quantities purchased per person, per household, or per order. These restrictions may include orders placed by or under the same customer account, the same payment method, and/or orders that use the same billing or shipping address. We reserve the right to limit or prohibit orders that, in our sole judgment , appear to be placed by dealers, resellers, or distributors."),o.createElement("p",{className:"mb-4",id:"cancel"},"6. CANCELLATION"),o.createElement("p",{className:"mb-4"},"To cancel your subscription at any time go to Subscriptions in Bookmark It and select the âStarterâ plan. Your cancellation will become effective at the end of the monthly billing period. You will not receive a pro-rated refund; your access and subscription benefits will continue for the remainder of the billing period."),o.createElement("p",{className:"mb-4",id:"prohibited"},"7. PROHIBITED ACTIVITIES"),o.createElement("p",{className:"mb-4"},"You may not access or use the Services for any purpose other than that for which we make the Services available. The Services may not be used in connection with any commercial endeavors except those that are specifically endorsed or approved by us."),o.createElement("p",{className:"mb-4"},`As a user of the Services, you agree not to: Systematically retrieve data or other content from the Services to create or compile, directly or indirectly, a collection, compilation, database, or directory without written permission from us. Trick, defraud, or mislead us and other users, especially in any attempt to learn sensitive account information such as user passwords. Circumvent, disable, or otherwise interfere with security-related features of the Services, including features that prevent or restrict the use or copying of any Content or enforce limitations on the use of the Services and/or the Content contained therein. Disparage, tarnish, or otherwise harm, in our opinion, us and/or the Services. Use any information obtained from the Services in order to harass, abuse, or harm another person. Make improper use of our support services or submit false reports of abuse or misconduct. Use the Services in a manner inconsistent with any applicable laws or regulations. Engage in unauthorized framing of or linking to the Services. Upload or transmit (or attempt to upload or to transmit) viruses, Trojan horses, or other material, including excessive use of capital letters and spamming (continuous posting of repetitive text), that interferes with any partyâs uninterrupted use and enjoyment of the Services or modifies, impairs, disrupts, alters, or interferes with the use, features, functions, operation, or maintenance of the Services. Engage in any automated use of the system, such as using scripts to send comments or messages, or using any data mining, robots, or similar data gathering and extraction tools. Delete the copyright or other proprietary rights notice from any Content. Attempt to impersonate another user or person or use the username of another user. Upload or transmit (or attempt to upload or to transmit) any material that acts as a passive or active information collection or transmission mechanism, including without limitation, clear graphics interchange formats ( "gifs" ), 1Ã1 pixels, web bugs, cookies, or other similar devices (sometimes referred to as "spyware" or "passive collection mechanisms" or "pcms" ). Interfere with, disrupt, or create an undue burden on the Services or the networks or services connected to the Services. Harass, annoy, intimidate, or threaten any of our employees or agents engaged in providing any portion of the Services to you. Attempt to bypass any measures of the Services designed to prevent or restrict access to the Services, or any portion of the Services. Copy or adapt the Services' software, including but not limited to Flash, PHP, HTML, JavaScript, or other code. Except as permitted by applicable law, decipher, decompile, disassemble, or reverse engineer any of the softw
1953are comprising or in any way making up a part of the Services. Except as may be the result of standard search engine or Internet browser usage, use, launch, develop, or distribute any automated system, including without limitation, any spider, robot, cheat utility, scraper, or offline reader that accesses the Services, or use or launch any unauthorized script or other software. Use a buying agent or purchasing agent to make purchases on the Services. Make any unauthorized use of the Services, including collecting usernames and/or email addresses of users by electronic or other means for the purpose of sending unsolicited email, or creating user accounts by automated means or under false pretenses . Use the Services as part of any effort to compete with us or otherwise use the Services and/or the Content for any revenue-generating endeavor or commercial enterprise.`),o.createElement("p",{className:"mb-4",id:"ugc"},"8. USER GENERATED CONTRIBUTIONS"),o.createElement("p",{className:"mb-4",id:"24327c5d-a34f-f7e7-88f1-65a2f788484f"},'The Services let you save, create, upload, and share content. Any content or material you submit to or through the Services â including bookmarks and their titles, descriptions, notes, and tags; screenshots, images, and other files you upload; boards, flows, tables, and collections you create; and comments and any other material you make available â regardless of its format or how it is submitted, is collectively referred to as "Contributions." Contributions may be viewable by other members of the workspaces you share them with, and, where you or your workspace enables public sharing, by anyone with the corresponding share link. When you create or make available any Contributions, you thereby represent and warrant that: The creation, distribution, transmission, public display, or performance, and the accessing, downloading, or copying of your Contributions do not and will not infringe the proprietary rights, including but not limited to the copyright, patent, trademark, trade secret, or moral rights of any third party. You are the creator and owner of or have the necessary licenses , rights, consents, releases, and permissions to use and to authorize us, the Services, and other users of the Services to use your Contributions in any manner contemplated by the Services and these Legal Terms. You have the written consent, release, and/or permission of each and every identifiable individual person in your Contributions to use the name or likeness of each and every such identifiable individual person to enable inclusion and use of your Contributions in any manner contemplated by the Services and these Legal Terms. Your Contributions are not false, inaccurate, or misleading. Your Contributions are not unsolicited or unauthorized advertising, promotional materials, pyramid schemes, chain letters, spam, mass mailings, or other forms of solicitation. Your Contributions are not obscene, lewd, lascivious, filthy, violent, harassing, libelous , slanderous, or otherwise objectionable (as determined by us). Your Contributions do not ridicule, mock, disparage, intimidate, or abuse anyone. Your Contributions are not used to harass or threaten (in the legal sense of those terms) any other person and to promote violence against a specific person or class of people. Your Contributions do not violate any applicable law, regulation, or rule. Your Contributions do not violate the privacy or publicity rights of any third party. Your Contributions do not violate any applicable law concerning child pornography, or otherwise intended to protect the health or well-being of minors. Your Contributions do not include any offensive comments that are connected to race, national origin, gender, sexual preference, or physical handicap. Your Contributions do not otherwise violate, or link to material that violates, any provision of these Legal Terms, or any applicable law or regulation.'),o.createElement("p",{className:"mb-4"},"Any use of the Services in violation of the foregoing violates these Legal Terms and may result in, among other things, termination or suspension of your rights to use the Services."),o.createElement("p",{className:"mb-4",id:"license"},"9. CONTRIBUTION LICENSE"),o.createElement("p",{className:"mb-4",id:"19652acc-9a2a-5ffe-6189-9474402fa6cc"},"By submitting Contributions to the Services, you grant, and you represent and warrant that you have the right to grant, to us a worldwide, non-exclusive, royalty-free license to host, store, copy, reproduce, display, transmit, adapt (for example, to generate previews, thumbnails, and search indexes), back up, and distribute your Contributions, in each case solely as necessary to operate, provide, secure, and improve the Services. This license applies to any media formats and channels through which we operate the Services, whether now known or later developed. It ends when your Contributions are deleted from the Services, except (a) as described
1953in the Workspace Contributions provision below, (b) for Contributions you have shared publicly via a share link, for as long as that link remains active, and (c) for backup copies retained for a limited period in the ordinary course of operating the Services."),o.createElement("p",{className:"mb-4"},"You also authorize us to display your name and profile information alongside your Contributions within the Services (for example, as creator attribution within a workspace). This attribution is removed upon deletion of your account, as described in the Workspace Contributions provision below and in Section 12."),o.createElement("p",{className:"mb-4"},"We do not assert any ownership over your Contributions. You retain full ownership of all of your Contributions and any intellectual property rights or other proprietary rights associated with your Contributions. We are not liable for any statements or representations in your Contributions provided by you in any area on the Services. You are solely responsible for your Contributions to the Services and you expressly agree to exonerate us from any and all responsibility and to refrain from any legal action against us regarding your Contributions."),o.createElement("p",{className:"mb-4"},"We have the right, in our sole and absolute discretion, (1) to edit, redact, or otherwise change any Contributions; (2) to re-categorize any Contributions to place them in more appropriate locations on the Services; and (3) to pre-screen or delete any Contributions at any time and for any reason, without notice. We have no obligation to monitor your Contributions."),o.createElement("p",{className:"mb-4",id:"workspacecontributions"},o.createElement("strong",null,"Workspace Contributions.")," The Services are collaborative: workspaces may be shared with other users, and Contributions you submit to a shared workspace (including bookmarks and their titles, descriptions, and tags, and any boards, flows, tables, or collections you create there) become part of that workspace's content. By submitting a Contribution to a shared workspace, you grant that workspace and its members a perpetual, irrevocable, royalty-free license to host, use, copy, display, modify, and manage that Contribution within the workspace. This license survives the end of your membership: if you leave a workspace, are removed from it, or delete your account, Contributions you made to shared workspaces remain in those workspaces. Upon deletion of your account, your identifying information (your name and attribution) is removed from such Contributions."),o.createElement("p",{className:"mb-4"},"A workspace that you alone control â your Personal Workspace, or any workspace in which you are the only member and that is not owned by an organization under organization management â is treated as yours alone, and is permanently deleted together with all of its content when your account is deleted. Worksp
1953aces owned by a managed organization belong to that organization and remain with it."),o.createElement("p",{className:"mb-4",id:"sitemanage"},"10. SERVICES MANAGEMENT"),o.createElement("p",{className:"mb-4"},"We reserve the right, but not the obligation, to: (1) monitor the Services for violations of these Legal Terms; (2) take appropriate legal action against anyone who, in our sole discretion, violates the law or these Legal Terms, including without limitation, reporting such user to law enforcement authorities; (3) in our sole discretion and without limitation, refuse, restrict access to, limit the availability of, or disable (to the extent technologically feasible) any of your Contributions or any portion thereof; (4) in our sole discretion and without limitation, notice, or liability, to remove from the Services or otherwise disable all files and content that are excessive in size or are in any way burdensome to our systems; and (5) otherwise manage the Services in a manner designed to protect our rights and property and to facilitate the proper functioning of the Services."),o.createElement("p",{className:"mb-4",id:"ppyes"},"11. PRIVACY POLICY"),o.createElement("p",{className:"mb-4",id:"d10c7fd7-0685-12ac-c717-cbc45ff916d1"},"We care about data privacy and security. Please review our Privacy Policy: bookmark.it.com/privacy . By using the Services, you agree to be bound by our Privacy Policy, which is incorporated into these Legal Terms. Please be advised the Services are hosted in the United States . If you access the Services from any other region of the world with laws or other requirements governing personal data collection, use, or disclosure that differ from applicable laws in the United States , then through your continued use of the Services, you are transferring your data to the United States , and you expressly consent to have your data transferred to and processed in the United States ."),o.createElement("p",{className:"mb-4",id:"terms"},"12. TERM AND TERMINATION"),o.createElement("p",{className:"mb-4",id:"a6e121c2-36b4-5066-bf9f-a0a33512e768"},"These Legal Terms shall remain in full force and effect while you use the Services. WITHOUT LIMITING ANY OTHER PROVISION OF THESE LEGAL TERMS, WE RESERVE THE RIGHT TO, IN OUR SOLE DISCRETION AND WITHOUT NOTICE OR LIABILITY, DENY ACCESS TO AND USE OF THE SERVICES (INCLUDING BLOCKING CERTAIN IP ADDRESSES), TO ANY PERSON FOR ANY REASON OR FOR NO REASON, INCLUDING WITHOUT LIMITATION FOR BREACH OF ANY REPRESENTATION, WARRANTY, OR COVENANT CONTAINED IN THESE LEGAL TERMS OR OF ANY APPLICABLE LAW OR REGULATION. WE MAY TERMINATE YOUR USE OR PARTICIPATION IN THE SERVICES OR DELETE YOUR ACCOUNT AND ANY CONTENT OR INFORMATION THAT YOU POSTED AT ANY TIME, WITHOUT WARNING, IN OUR SOLE DISCRETION."),o.createElement("p",{className:"mb-4"},"If we terminate or suspend your account for any reason, you are prohibited from registering and creating a new account under your name, a fake or borrowed name, or the name of any third party, even if you may be acting on behalf of the third party. In addition to terminating or suspending your account, we reserve the right to take appropriate legal action, including without limitation pursuing civil, criminal, and injunctive redress."),o.createElement("p",{className:"mb-4",id:"accountdeletion"},o.createElement("strong",null,"Deleting your account.")," You may delete your account at any time at"," ",o.createElement("a",{href:"https://bookmark.it.com/delete-account",className:"text-blue-600 hover:underline"},"https://bookmark.it.com/delete-account")," ","(also linked from your account settings), without needing to install or use any particular app. When you request deletion, sign-in to your account is disabled immediately, and your account and personal data are permanently deleted after a 30-day grace period, during which you may cancel the request from the same page. The effect of account deletion on your Contributions is described in Section 9 (Contribution License): Contributions you made to shared workspaces remain with those workspaces with your identifying information removed, and workspaces you alone control are permanently deleted with your account. If you are the sole owner of a shared workspace that has other members but no other owner or administrator, you will be asked to promote another member or delete that workspace before your deletion request can be completed; where the workspace already has another owner or administrator, ownership will be transferred to that member automatically when deletion completes."),o.createElement("p",{className:"mb-4",id:"modifications"},"13. MODIFICATIONS AND INTERRUPTIONS"),o.createElement("p",{className:"mb-4"},"We reserve the right to change, modify, or remove the contents of the Services at any time or for any reason at our sole discretion without notice. However, we have no obligation to update any information on our Services. We will not be liable to you or any third party for any modification, price change, suspension, or discontinuance of the Services."),o.createElement("p",{className:"mb-4"},"We cannot guarantee the Services will be available at all times. We may experience hardware, softw
1953are, or other problems or need to perform maintenance related to the Services, resulting in interruptions, delays, or errors. We reserve the right to change, revise, update, suspend, discontinue, or otherwise modify the Services at any time or for any reason without notice to you. You agree that we have no liability whatsoever for any loss, damage, or inconvenience caused by your inability to access or use the Services during any downtime or discontinuance of the Services. Nothing in these Legal Terms will be construed to obligate us to maintain and support the Services or to supply any corrections, updates, or releases in connection therewith."),o.createElement("p",{className:"mb-4",id:"law"},"14. GOVERNING LAW"),o.createElement("p",{className:"mb-4",id:"b86653c1-52f0-c88c-a218-e300b912dd6b"},"These Legal Terms and your use of the Services are governed by and construed in accordance with the laws of the State of Washington applicable to agreements made and to be entirely performed within the State of Washington , without regard to its conflict of law principles."),o.createElement("p",{className:"mb-4",id:"disputes"},"15. DISPUTE RESOLUTION"),o.createElement("p",{className:"mb-4"},"Informal Negotiations"),o.createElement("p",{className:"mb-4"},'To expedite resolution and control the cost of any dispute, controversy, or claim related to these Legal Terms (each a "Dispute" and collectively, the "Disputes" ) brought by either you or us (individually, a "Party" and collectively, the "Parties" ), the Parties agree to first attempt to negotiate any Dispute (except those Disputes expressly provided below) informally for at least thirty (30) days before initiating arbitration. Such informal negotiations commence upon written notice from one Party to the other Party.'),o.createElement("p",{className:"mb-4"},"Binding Arbitration"),o.createElement("p",{className:"mb-4"},'If the Parties are unable to resolve a Dispute through informal negotiations, the Dispute (except those Disputes expressly excluded below) will be finally and exclusively resolved by binding arbitration. YOU UNDERSTAND THAT WITHOUT THIS PROVISION, YOU WOULD HAVE THE RIGHT TO SUE IN COURT AND HAVE A JURY TRIAL. The arbitration shall be commenced and conducted under the Commercial Arbitration Rules of the American Arbitration Association ( "AAA" ) and, where appropriate, the AAAâs Supplementary Procedures for Consumer Related Disputes ( "AAA Consumer Rules" ), both of which are available at the'," ",o.createElement("a",{href:"http://www.adr.org",target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline"},"American Arbitration Association (AAA) website")," ",". Your arbitration fees and your share of arbitrator compensation shall be governed by the AAA Consumer Rules and, where appropriate, limited by the AAA Consumer Rules. The arbitration may be conducted in person, through the submission of documents, by phone, or online. The arbitrator will make a decision in writing, but need not provide a statement of reasons unless requested by either Party. The arbitrator must follow applicable law, and any award may be challenged if the arbitrator fails to do so. Except where otherwise required by the applicable AAA rules or applicable law, the arbitration will take place in United States, Washington . Except as otherwise provided herein, the Parties may litigate in court to compel arbitration, stay proceedings pending arbitration, or to confirm, modify, vacate, or enter judgment on the award entered by the arbitrator."),o.createElement("p",{className:"mb-4"},"If for any reason, a Dispute proceeds in court rather than arbitration, the Dispute shall be commenced or prosecuted in the state and federal courts located in United States , Washington , and the Parties hereby consent to, and waive all defenses of lack of personal jurisdiction, and forum non conveniens with respect to venue and jurisdiction in such state and federal courts . Application of the United Nations Convention on Contracts for the International Sale of Goods and the Uniform Computer Information Transaction Act (UCITA) are excluded from these Legal Terms."),o.createElement("p",{className:"mb-4"},"In no event shall any Dispute brought by either Party related in any way to the Services be c
1953ommenced more than one (1) years after the cause of action arose. If this provision is found to be illegal or unenforceable, then neither Party will elect to arbitrate any Dispute falling within that portion of this provision found to be illegal or unenforceable and such Dispute shall be decided by a court of competent jurisdiction within the courts listed for jurisdiction above, and the Parties agree to submit to the personal jurisdiction of that court."),o.createElement("p",{className:"mb-4"},"Restrictions"),o.createElement("p",{className:"mb-4"},"The Parties agree that any arbitration shall be limited to the Dispute between the Parties individually. To the full extent permitted by law, (a) no arbitration shall be joined with any other proceeding; (b) there is no right or authority for any Dispute to be arbitrated on a class-action basis or to utilize class action procedures; and (c) there is no right or authority for any Dispute to be brought in a purported representative capacity on behalf of the general public or any other persons."),o.createElement("p",{className:"mb-4"},"Exceptions to Informal Negotiations and Arbitration"),o.createElement("p",{className:"mb-4"},"The Parties agree that the following Disputes are not subject to the above provisions concerning informal negotiations binding arbitration: (a) any Disputes seeking to enforce or protect, or concerning the validity of, any of the intellectual property rights of a Party; (b) any Dispute related to, or arising from, allegations of theft, piracy, invasion of privacy, or unauthorized use; and (c) any claim for injunctive relief. If this provision is found to be illegal or unenforceable, then neither Party will elect to arbitrate any Dispute falling within that portion of this provision found to be illegal or unenforceable and such Dispute shall be decided by a court of competent jurisdiction within the courts listed for jurisdiction above, and the Parties agree to submit to the personal jurisdiction of that court."),o.createElement("p",{className:"mb-4",id:"corrections"},"16. CORRECTIONS"),o.createElement("p",{className:"mb-4"},"There may be information on the Services that contains typographical errors, inaccuracies, or omissions, including descriptions, pricing, availability, and various other information. We reserve the right to correct any errors, inaccuracies, or omissions and to change or update the information on the Services at any time, without prior notice."),o.createElement("p",{className:"mb-4",id:"disclaimer"},"17. DISCLAIMER"),o.createElement("p",{className:"mb-4"},"THE SERVICES ARE PROVIDED ON AN AS-IS AND AS-AVAILABLE BASIS. YOU AGREE THAT YOUR USE OF THE SERVICES WILL BE AT YOUR SOLE RISK. TO THE FULLEST EXTENT PERMITTED BY LAW, WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, IN CONNECTION WITH THE SERVICES AND YOUR USE THEREOF, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. WE MAKE NO WARRANTIES OR REPRESENTATIONS ABOUT THE ACCURACY OR COMPLETENESS OF THE SERVICES' CONTENT OR THE CONTENT OF ANY WEBSITES OR MOBILE APPLICATIONS LINKED TO THE SERVICES AND WE WILL ASSUME NO LIABILITY OR RESPONSIBILITY FOR ANY (1) ERRORS, MISTAKES, OR INACCURACIES OF CONTENT AND MATERIALS, (2) PERSONAL INJURY OR PROPERTY DAMAGE, OF ANY NATURE WHATSOEVER, RESULTING FROM YOUR ACCESS TO AND USE OF THE SERVICES, (3) ANY UNAUTHORIZED ACCESS TO OR USE OF OUR SECURE SERVERS AND/OR ANY AND ALL PERSONAL INFORMATION AND/OR FINANCIAL INFORMATION STORED THEREIN, (4) ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM THE SERVICES, (5) ANY BUGS, VIRUSES, TROJAN HORSES, OR THE LIKE WHICH MAY BE TRANSMITTED TO OR THROUGH THE SERVICES BY ANY THIRD PARTY, AND/OR (6) ANY ERRORS OR OMISSIONS IN ANY CONTENT AND MATERIALS OR FOR ANY LOSS OR DAMAGE OF ANY KIND INCURRED AS A RESULT OF THE USE OF ANY CONTENT POSTED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE VIA THE SERVICES. WE DO NOT WARRANT, ENDORSE, GUARANTEE, OR ASSUME RESPONSIBILITY FOR ANY PRODUCT OR SERVICE ADVERTISED OR OFFERED BY A THIRD PARTY THROUGH THE SERVICES, ANY HYPERLINKED WEBSITE, OR ANY WEBSITE OR MOBILE APPLICATION FEATURED IN ANY BANNER OR OTHER ADVERTISING, AND WE WILL NOT BE A PARTY TO OR IN ANY WAY BE RESPONSIBLE FOR MONITORING ANY TRANSACTION BETWEEN YOU AND ANY THIRD-PARTY PROVIDERS OF PRODUCTS OR SERVICES. AS WITH THE PURCHASE OF A PRODUCT OR SERVICE THROUGH ANY MEDIUM OR IN ANY ENVIRONMENT, YOU SHOULD USE YOUR BEST JUDGMENT AND EXERCISE CAUTION WHERE APPROPRIATE."),o.createElement("p",{className:"mb-4",id:"liability"},"18. LIMITATIONS OF LIABILITY"),o.createElement("p",{className:"mb-4",id:"3c3071ce-c603-4812-b8ca-ac40b9
19531b9943"},"IN NO EVENT WILL WE OR OUR DIRECTORS, EMPLOYEES, OR AGENTS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, SPECIAL, OR PUNITIVE DAMAGES, INCLUDING LOST PROFIT, LOST REVENUE, LOSS OF DATA, OR OTHER DAMAGES ARISING FROM YOUR USE OF THE SERVICES, EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED HEREIN, OUR LIABILITY TO YOU FOR ANY CAUSE WHATSOEVER AND REGARDLESS OF THE FORM OF THE ACTION, WILL AT ALL TIMES BE LIMITED TO $10,000.00 USD . CERTAIN US STATE LAWS AND INTERNATIONAL LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MAY HAVE ADDITIONAL RIGHTS."),o.createElement("p",{className:"mb-4",id:"indemnification"},"19. INDEMNIFICATION"),o.createElement("p",{className:"mb-4",id:"475fffa5-05ca-def8-ac88-f426b238903c"},"You agree to defend, indemnify, and hold us harmless, including our subsidiaries, affiliates, and all of our respective officers, agents, partners, and employees, from and against any loss, damage, liability, claim, or demand, including reasonable attorneysâ fees and expenses, made by any third party due to or arising out of: (1) your Contributions; (2) use of the Services; (3) breach of these Legal Terms; (4) any breach of your representations and warranties set forth in these Legal Terms; (5) your violation of the rights of a third party, including but not limited to intellectual property rights; or (6) any overt harmful act toward any other user of the Services with whom you connected via the Services. Notwithstanding the foregoing, we reserve the right, at your expense, to assume the exclusive defense and control of any matter for which you are required to indemnify us, and you agree to cooperate, at your expense, with our defense of such claims. We will use reasonable efforts to notify you of any such claim, action, or proceeding which is subject to this indemnification upon becoming aware of it."),o.createElement("p",{className:"mb-4",id:"userdata"},"20. USER DATA"),o.createElement("p",{className:"mb-4"},"We will maintain certain data that you transmit to the Services for the purpose of managing the performance of the Services, as well as data relating to your use of the Services. Although we perform regular routine backups of data, you are solely responsible for all data that you transmit or that relates to any activity you have undertaken using the Services. You agree that we shall have no liability to you for any loss or corruption of any such data, and you hereby waive any right of action against us arising from any such loss or corruption of such data."),o.createElement("p",{className:"mb-4",id:"electronic"},"21. ELECTRONIC COMMUNICATIONS, TRANSACTIONS, AND SIGNATURES"),o.createElement("p",{className:"mb-4"},"Visiting the Services, sending us emails, and completing online forms constitute electronic communications. You consent to receive electronic communications, and you agree that all agreements, notices, disclosures, and other communications we provide to you electronically, via email and on the Services, satisfy any legal requirement that such communication be in writing. YOU HEREBY AGREE TO THE USE OF ELECTRONIC SIGNATURES, CONTRACTS, ORDERS, AND OTHER RECORDS, AND TO ELECTRONIC DELIVERY OF NOTICES, POLICIES, AND RECORDS OF TRANSACTIONS INITIATED OR COMPLETED BY US OR VIA THE SERVICES. You hereby waive any rights or requirements under any statutes, regulations, rules, ordinances, or other laws in any jurisdiction which require an original signature or delivery or retention of non-electronic records, or to payments or the granting of credits by any means other than electronic means."),o.createElement("p",{className:"mb-4",id:"california"},"22. CALIFORNIA USERS AND RESIDENTS"),o.createElement("p",{className:"mb-4"},"If any complaint with us is not satisfactorily resolved, you can contact the Complaint Assistance Unit of the Division of Consumer Services of the California Department of Consumer Affairs in writing at 1625 North Market Blvd., Suite N 112, Sacramento, California 95834 or by telephone at (800) 952-5210 or (916) 445-1254."),o.createElement("p",{className:"mb-4",id:"misc"},"23. MISCELLANEOUS"),o.createElement("p",{className:"mb-4"},"These Legal Terms and any policies or operating rules posted by us on the Services or in respect to the Services constitute the entire agreement and understanding between you and us. Our failure to exercise or enforce any right or provision of these Legal Terms shall not operate as a waiver of such right or provision. These Legal Terms operate to the fullest extent permissible by law. We may assign any or all of our rights and obligations to others at any time. We shall not be responsible or liable for any loss, damage, delay, or failure to act caused by any cause beyond our reasonable control. If any provision or part of a provision of these Legal Terms is determined to be unlawful, void, or unenforceable, that provision or part of the provision is deemed severable from these Legal Terms and does not affect the validity and enforceability of any remaining provisions. There is no joint venture, partnership, employment or agency relationship created between you and us as a result of these Legal Terms or use of the Services. You agree that these Legal Terms will not be construed against us by virtue of having drafted them. You hereby waive any and all defenses you may have based on the electronic form of these Legal Terms and the lack of signing by the parties hereto to execute these Legal Terms."),o.createElement("p",{className:"mb-4",id:"contact"},"24. CONTACT US"),o.createElement("p",{className:"mb-4"},"In order to resolve a complaint regarding the Services or to receive further information regarding use of the Services, please contact us at:"),o.createElement("p",{className:"flex flex-col gap-1"},o.createElement("span",null,"Pixels & Form Inc."),o.createElement("span",null,"1907 8th Ave N"),o.createElement("span",null,"Seattle , WA 98109"),o.createElement("span",null,"United States"),o.createElement("span",null,"[email protected]")))},Jne=()=>o.createElement("div",{className:"app-content app-marketing app-marketing__terms dark__text legal-content"},o.createElement(BS,null),o.createElement("div",{className:""},o.createElement("div",null,o.createElement("div",null,o.createElement("h1",{className:"text-center text-2xl text-gray-900 dark__text mt-4"},"Terms & Conditions"),o.createElement("div",{className:"text-center mr-6"},"Last updated July 16, 2026")),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("div",null,o.createElement("div",{className:"document-previewer-wrapper-a717db bg-white dark:bg-gray-900 p-8 rounded-lg shadow-sm"},o.createElement("div",{"data-custom-class":"body"},o.createElement(kqe,null))))))),Sqe=[{id:"optimistic-design",title:"Optimistic design: why, and how?. I am thrilled to share with you here⦠| by Shiran Hirshberg | UX Collective",url:"https://medium.com/optimistic-design",domain:"medium.com",image:"/img/show/homepage-demo/01-Optimistic-design.jpeg",collection:"Design",tags:["design"],saved:"2d"},{id:"practical-tips",title:"7 Practical Tips for Cheating at Design | by Adam Wathan & Steve Schoger | Refactoring UI | Medium",url:"https://medium.com/practical-tips",domain:"medium.com",image:"/img/show/homepage-demo/02-7-Practical-Tips.jpeg",collection:"Design",tags:["design"],saved:"5d"},{id:"linear",title:"Linear â The system for product development",url:"https://linear.app",domain:"linear.app",image:"/img/show/homepage-demo/03-Linear.jpeg",collection:"Product",tags:["product"],saved:"3d"},{id:"tanstack",title:"TanStack | The open-source application stack for the web.",url:"https://tanstack.com",domain:"tanstack.com",image:"/img/show/homepage-demo/04-TanStack.jpeg",collection:"Engineering",tags:["eng","docs"],saved:"1w"},{id:"development-schedule",title:"Development Schedule",url:"https://docs.google.com/development-schedule",domain:"docs.google.com",image:"/img/show/homepage-demo/05-Development-Schedule.jpeg",collection:"Planning",tags:["roadmap"],saved:"3w"},{id:"dev-onboarding",title:"Dev Onboarding Epic",url:"https://notion.so/dev-onboarding",domain:"notion.so",image:"/img/show/homepage-demo/06-Dev-Onboarding.jpeg",collection:"Engineering",tags:["onboarding","eng"],saved:"1d"},{id:"account-management",title:"Account Management Flow",url:"https://figma.com/file/account-management",domain:"figma.com",image:"/img/show/homepage-demo/07-Account-Management-Flow.jpeg",collection:"Design",tags:["prototype"],saved:"4d"},{id:"task-milestones",title:"Task & Milestones Flow",url:"https://figma.com/file/task-milestones",domain:"figma.com",image:"/img/show/homepage-demo/08-Task-Milestones-Flow.jpeg",collection:"Design",tags:["prototype"],saved:"4d"},{id:"design-system",title:"Design System",url:"https://figma.com/file/design-system",domain:"figma.com",image:"/img/show/homepage-demo/09-Design-System.jpeg",collection:"Design",tags:["design-system","design"],saved:"1d"}
1953,{id:"product-discovery",title:"Product Discovery",url:"https://atlassian.com/product-discovery",domain:"atlassian.com",image:"/img/show/homepage-demo/10-Product-Discovery.jpeg",collection:"Product",tags:["product"],saved:"2d"},{id:"product-roadmap",title:"Product Roadmap",url:"https://productboard.com/roadmap",domain:"productboard.com",image:"/img/show/homepage-demo/11-Product-Roadmap.jpeg",collection:"Product",tags:["roadmap","product"],saved:"2d"},{id:"weekly-status",title:"Weekly Product Status Notes",url:"https://notion.so/weekly-status",domain:"notion.so",image:"/img/show/homepage-demo/12-Weekly-Product-Status-Notes.jpeg",collection:"Product",tags:["product"],saved:"4h"},{id:"lemon-squeezy",title:"Lemon Squeezy Payments, tax & subscriptions",url:"https://lemonsqueezy.com",domain:"lemonsqueezy.com",image:"/img/show/homepage-demo/13-Lemon-Squeezy.jpeg",collection:"Product",tags:["billing"],saved:"6d"},{id:"gcp-credentials",title:"APIs & Services â Credentials â Google Cloud console",url:"https://console.cloud.google.com/apis/credentials",domain:"console.cloud.google.com",image:"/img/show/homepage-demo/14-APIs-Services-Credentials.jpeg",collection:"Engineering",tags:["eng"],saved:"8d"},{id:"cloudflare-dns",title:"Cloudflar DNS",url:"https://dash.cloudflare.com/dns",domain:"dash.cloudflare.com",image:"/img/show/homepage-demo/15-Cloudflar-dns.jpeg",collection:"Engineering",tags:["eng"],saved:"1w"},{id:"bird-sms",title:"Bird SMS Service",url:"https://bird.com",domain:"bird.com",image:"/img/show/homepage-demo/16-Bird.jpeg",collection:"Engineering",tags:["eng"],saved:"2w"},{id:"microlink",title:"Microlink | Headless Browser API: Screenshot, PDF & Previews",url:"https://microlink.io",domain:"microlink.io",image:"/img/show/homepage-demo/17-Microlink.jpeg",collection:"Engineering",tags:["eng"],saved:"6d"},{id:"segment",title:"Segment Sources - Production",url:"https://app.segment.com/sources",domain:"app.segment.com",image:"/img/show/homepage-demo/18-segment.jpeg",collection:"Engineering",tags:["eng"],saved:"3d"},{id:"chrome-dashboard",title:"Chrome Developer Dashboard",url:"https://chrome.google.com/webstore/devconsole",domain:"chrome.google.com",image:"/img/show/homepage-demo/19-Chrome-Dev-Dashboard.jpeg",collection:"Engineering",tags:["eng"],saved:"5d"},{id:"firebase-logs",title:"Firebase Functions Logs Explorer",url:"https://console.firebase.google.com/logs",domain:"console.firebase.google.com",image:"/img/show/homepage-demo/20-Firebase-Functions-Logs.jpeg",collection:"Engineering",tags:["eng"],saved:"4h"},{id:"prod-analytics",title:"Production Analytics",url:"https://analytics.google.com",domain:"analytics.google.com",image:"/img/show/homepage-demo/21-prod-analytics.jpeg",collection:"Product",tags:["analytics","product"],saved:"3d"},{id:"plasmic",title:"Plasmic | Build powerful apps fastâ without the limits",url:"https://plasmic.app",domain:"plasmic.app",image:"/img/show/homepage-demo/22-Plasmic.jpeg",collection:"Design",tags:["design"],saved:"2d"},{id:"amazon-rag",title:"Amazon RAG solution",url:"https://aws.amazon.com/rag",domain:"aws.amazon.com",image:"/img/show/homepage-demo/23-Amazon-RAG-solution.jpeg",collection:"Engineering",tags:["eng"],saved:"1w"},{id:"stripe",title:"Stripe Dashboard",url:"https://dashboard.stripe.com",domain:"dashboard.stripe.com",image:"/img/show/homepage-demo/24-stripe-dashboard.jpeg",collection:"Product",tags:["billing"],saved:"6d"},{id:"claude-invoice",title:"Claude.ai Invoice Billing Page",url:"https://claude.ai/settings/billing",domain:"claude.ai",image:"/img/show/homepage-demo/25-Claude-Invoice.jpeg",collection:"Product",tags:["billing"],saved:"8d"}],Cqe={visualization:{title:"Your library",bookmarkIds:["design-system","product-roadmap","linear","tanstack","account-management","product-discovery","prod-analytics","stripe"]},boards:[{id:"new-hire-onboarding",title:"New Hire Onboarding",masthead:!0,cards:[{label:"Product",bookmarkIds:["product-discovery","product-roadmap","weekly-status","prod-analytics"]},{label:"Engineering",dynamic:!0,chip:"Auto · #eng",bookmarkIds:["dev-onboarding","development-schedule","tanstack"],dynamicBookmarkId:"firebase-logs"}
1953,{label:"Design",bookmarkIds:["design-system","optimistic-design","practical-tips","plasmic"]}]}],flows:[{id:"product",title:"Product",nodes:[{id:"start",label:"Start",x:24,y:188,bookmarkIds:["account-management","dev-onboarding"]},{id:"search",label:"Product",x:312,y:70,bookmarkIds:["product-discovery","product-roadmap"]},{id:"account",label:"Design",x:312,y:300,bookmarkIds:["design-system","task-milestones"]},{id:"details",label:"Build",x:600,y:24,bookmarkIds:["tanstack","plasmic"]},{id:"checkout",label:"Launch",x:600,y:208,bookmarkIds:["stripe","prod-analytics"]}],edges:[["start","search"],["start","account"],["search","details"],["search","checkout"]]}]},lw={library:Sqe,demos:Cqe},zN=["grid","list","db","flows","boards"],HN={grid:"viz",list:"viz",db:"viz",flows:"flows",boards:"boards"},Nqe={grid:3800,list:3600,db:4400},Rqe=168,Tqe={grid:o.createElement(o.Fragment,null,o.createElement("b",null,"Visualization · Grid")," â skim your whole library as visual cards."),list:o.createElement(o.Fragment,null,o.createElement("b",null,"Visualization · List")," â scan the same bookmarks as a compact list."),db:o.createElement(o.Fragment,null,o.createElement("b",null,"Visualization · Database")," â sort, filter, and edit your links in a full table."),flows:o.createElement(o.Fragment,null,o.createElement("b",null,"Flows")," â prototypes connect into a map of how the whole product fits together."),boards:o.createElement(o.Fragment,null,o.createElement("b",null,"Boards")," â watch scattered links assemble into a shareable hub, like a new-hire onboarding guide.")},Aqe={grid:"bookmark.it.com/library?view=grid",list:"bookmark.it.com/library?view=list",db:"bookmark.it.com/library?view=table",flows:"bookmark.it.com/flow/product",boards:"bookmark.it.com/board/new-hire-onboarding"},aH=["#2d72d2","#7c3aed","#c026d3","#0d9488","#ea580c","#2563eb","#db2777","#059669"];function Iqe(e){let t=0;for(let n=0;n<e.length;n+=1)t=t*31+e.charCodeAt(n)>>>0;return{background:aH[t%aH.length]}}const Oqe=e=>(e.domain||e.title||"?").replace(/^www\./,"").charAt(0).toUpperCase(),ere=()=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},o.createElement("path",{d:"M6 2h12v20l-6-4-6 4z"})),Gl={fill:"none",stroke:"currentColor",strokeWidth:2};function VN(e,t,n){return o.createElement("span",{key:e,className:`bm-link reveal${n?" "+n:""}`},o.createElement(ere,null),o.createElement("span",null,t))}const Mqe=()=>{const e=p.useRef(null),t=p.useRef([]),n=p.useRef(0),r=p.useRef(!1),a=p.useRef(!1),s=p.useRef(typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches),[i,l]=p.useState("grid"),[c,u]=p.useState(!1),d=p.useMemo(()=>{const T={};return lw.library.forEach(M=>{T[M.id]=M}),T},[]),f=T=>d[T]||{title:T,domain:"",image:"",collection:"",tags:[],saved:""},m=lw.demos.boards[0],h=lw.demos.flows[0],g=lw.demos.visualization.bookmarkIds.map(f),v=p.useRef("grid"),y=["grid","list","db"].includes(i)?i:v.current;v.current=y;const b=()=>{t.current.forEach(T=>window.clearTimeout(T)),t.current=[]},E=(T,M)=>t.current.push(window.setTimeout(T,M)),w=T=>{window.clearTimeout(n.current),!(s.current||r.current)&&(n.current=window.setTimeout(()=>{l(M=>zN[(zN.indexOf(M)+1)%zN.length])},T))};p.useEffect(()=>{const T=e.current;if(!T)return;const M=s.current;return b(),window.clearTimeout(n.current),i==="boards"?(()=>{const H=T.querySelector(".bd-title h3"),Y=T.querySelector(".pub"),z=T.querySelector(".bd-mast"),K=T.querySelector(".bd-grid"),ee=[...T.querySelectorAll(".bd-card")],oe=[...T.querySelectorAll(".bd-card .bm-link:not(.dyn)")],J=T.querySelector(".bm-link.dyn");if(!K)return;const se="cols"+Math.min(ee.length,4),B=()=>{K.classList.remove("cols2","cols3","cols4"),K.classList.add(se)};
1953if([H,Y,...ee,...oe,J].filter(Boolean).forEach($=>$.classList.remove("in")),z.classList.remove("in"),K.classList.remove("cols3","cols4"),K.classList.add("cols2"),M){[H,Y,...ee,...oe,J].filter(Boolean).forEach($=>$.classList.add("in")),z.classList.add("in"),B();return}let U=300;E(()=>H.classList.add("in"),U),U+=500,ee.forEach($=>{E(()=>$.classList.add("in"),U),U+=420}),U+=200,oe.forEach($=>{E(()=>$.classList.add("in"),U),U+=280}),U+=700,J&&E(()=>J.classList.add("in"),U),U+=900,E(B,U),U+=800,E(()=>z.classList.add("in"),U),U+=800,E(()=>Y.classList.add("in"),U),w(U+2600)})():i==="flows"?(()=>{const H=[...T.querySelectorAll(".fl-node")],Y=[...T.querySelectorAll(".fl-edge")],z=[...T.querySelectorAll(".fl-node .bm-link")];if([...H,...Y,...z].forEach(ee=>ee.classList.remove("in")),M){[...H,...Y,...z].forEach(ee=>ee.classList.add("in"));return}let K=200;H.forEach(ee=>{E(()=>ee.classList.add("in"),K),K+=480}),K+=200,Y.forEach(ee=>{E(()=>ee.classList.add("in"),K),K+=420}),K+=300,z.forEach(ee=>{E(()=>ee.classList.add("in"),K),K+=300}),w(K+2600)})():(H=>{const Y=T.querySelector(".viz-view");if(Y){if(H==="db"){const z=[...Y.querySelectorAll(".tb-row")];z.forEach(K=>K.classList.remove("show")),window.requestAnimationFrame(()=>z.forEach((K,ee)=>E(()=>K.classList.add("show"),M?0:200+ee*120)))}else{const z=[...Y.querySelectorAll(".reveal")];z.forEach(K=>K.classList.remove("in")),window.requestAnimationFrame(()=>z.forEach(K=>K.classList.add("in")))}w(Nqe[H]||3800)}})(i),()=>{b(),window.clearTimeout(n.current)}},[i]),p.useEffect(()=>{if(r.current=c,!a.current){a.current=!0;return}c?window.clearTimeout(n.current):w(2500)},[c]);const x=T=>l(T),S=T=>i===T?"true":"false",N=T=>{T.currentTarget.style.display="none"},k=T=>T.image?o.createElement("img",{src:T.image,alt:"",loading:"lazy",onError:N}):o.createElement("div",{className:"bk-thumb",style:Iqe(T.domain||T.id||"")},o.createElement("span",null,Oqe(T))),C=()=>y==="grid"?o.createElement("div",{className:"viz-grid"},g.map((T,M)=>o.createElement("div",{key:T.id,className:"viz-gcard reveal",style:{transitionDelay:`${M*45}ms`}},o.createElement("div",{className:"thumb"},k(T)),o.createElement("div",{className:"body"},o.createElement("div",{className:"t"},T.title),o.createElement("div",{className:"meta"},o.createElement("span",{className:"col-pill"},T.collection),T.tags.slice(0,1).map(L=>o.createElement("span",{key:L,className:"chip"},"#",L))))))):y==="list"?o.createElement("div",{className:"viz-list"},g.map((T,M)=>o.createElement("div",{key:T.id,className:"viz-lrow reveal",style:{transitionDelay:`${M*40}ms`}},o.createElement("div",{className:"lthumb"},k(T)),o.createElement("div",{className:"lmain"},o.createElement("div",{className:"t"},T.title),o.createElement("div",{className:"d"},T.domain)),o.createElement("div",{className:"ltags"},o.createElement("span",{className:"col-pill"},T.collection),T.tags.slice(0,1).map(L=>o.createElement("span",{key:L,className:"chip"},"#",L))),o.createElement("div",{className:"lsaved"},T.saved)))):o.createElement("div",{className:"tb"},o.createElement("div",{className:"tb-bar"},o.createElement("div",{className:"tb-search"},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("circle",{cx:"11",cy:"11",r:"7"}),o.createElement("path",{d:"M21 21l-4-4"}))," ","Search bookmarksâ¦"),o.createElement("span",{className:"tb-filter"},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("path",{d:"M3 5h18l-7 8v6l-4-2v-4z"}))," ","Filter"),o.createElement("span",{className:"tb-views"},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("path",{d:"M4 6h16M4 12h16M4 18h16"})),o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1"}),o.createElement("rect",{x:"13",y:"4",width:"7",height:"7",rx:"1"}),o.createElement("rect",{x:"4",y:"13",width:"7",height:"7",rx:"1"}),o.createElement("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1"})),o.createElement("svg",{className:"sel",viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),o.createElement("path",{d:"M3 9h18M3 14h18M9 4v16"})))),o.createElement("div",{className:"tb-head"},o.createElement("span",null),o.createElement("span",null,"Title"),o.createElement("span",null,"Collection"),o.createElement("span",null,"Tags"),o.createElement("span",{style:{textAlign:"right"}},"Saved")),o.createElement("div",{className:"tb-body"},g.map(T=>o.createElement("div",{key:T.id,className:"tb-row"},o.createElement("span",{className:"cb"}),o.createElement("span",{className:"ttl"},o.createElement(ere,null),o.createElement("span",null,T.title)),o.createElement("span",{className:"col"},T.collection),o.createElement("span",{className:"tags"},T.tags.map(M=>o.createElement("span",{key:M,className:"chip"},"#",M))),o.createElement("span",{className:"saved"},T.saved))))),A={};
1953h.nodes.forEach(T=>{A[T.id]=T});const O=h.edges.map(([T,M],L)=>{const D=A[T],j=A[M];if(!D||!j)return null;const H=D.x+Rqe,Y=D.y+36,z=j.x,K=j.y+36,ee=(H+z)/2;return{id:L,d:`M ${H} ${Y} C ${ee} ${Y}, ${ee} ${K}, ${z} ${K}`}}).filter(Boolean);return o.createElement("div",{className:"stage-shell gap-4 flex flex-col",id:"demos",ref:e},o.createElement("div",{className:"stage-bar"},o.createElement("div",{className:"stage-tabs",role:"tablist","aria-label":"Product demos"},o.createElement("div",{className:"stage-seg",role:"group","aria-label":"Visualization views"},o.createElement("span",{className:"seg-label","aria-hidden":"true"},"Visualization"),o.createElement("button",{type:"button",className:"seg-tab",role:"tab","aria-selected":S("grid"),onClick:()=>x("grid")},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1.5"}),o.createElement("rect",{x:"13",y:"4",width:"7",height:"7",rx:"1.5"}),o.createElement("rect",{x:"4",y:"13",width:"7",height:"7",rx:"1.5"}),o.createElement("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1.5"})),"Grid"),o.createElement("button",{type:"button",className:"seg-tab",role:"tab","aria-selected":S("list"),onClick:()=>x("list")},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("path",{d:"M8 6h13M8 12h13M8 18h13"}),o.createElement("circle",{cx:"3.5",cy:"6",r:"1.5"}),o.createElement("circle",{cx:"3.5",cy:"12",r:"1.5"}),o.createElement("circle",{cx:"3.5",cy:"18",r:"1.5"})),"List"),o.createElement("button",{type:"button",className:"seg-tab",role:"tab","aria-selected":S("db"),onClick:()=>x("db")},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),o.createElement("path",{d:"M3 9h18M3 14h18M9 4v16"})),"Database")),o.createElement("button",{type:"button",className:"stage-tab",role:"tab","aria-selected":S("flows"),onClick:()=>x("flows")},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("circle",{cx:"5",cy:"12",r:"2.4"}),o.createElement("circle",{cx:"19",cy:"6",r:"2.4"}),o.createElement("circle",{cx:"19",cy:"18",r:"2.4"}),o.createElement("path",{d:"M7 11l10-4M7 13l10 4"})),"Flows"),o.createElement("button",{type:"button",className:"stage-tab",role:"tab","aria-selected":S("boards"),onClick:()=>x("boards")},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("rect",{x:"3",y:"3",width:"7",height:"9",rx:"1.5"}),o.createElement("rect",{x:"14",y:"3",width:"7",height:"6",rx:"1.5"}),o.createElement("rect",{x:"14",y:"13",width:"7",height:"8",rx:"1.5"}),o.createElement("rect",{x:"3",y:"16",width:"7",height:"5",rx:"1.5"})),"Boards ",o.createElement("span",{className:"badge"},"New"))),o.createElement("label",{className:"pause-toggle",title:"Auto-play the demo tour"},o.createElement("input",{type:"checkbox",checked:!c,onChange:T=>u(!T.target.checked)}),o.createElement("span",{className:"toggle-track","aria-hidden":"true"}),o.createElement("span",null,"Auto-play"))),o.createElement("div",{className:"stage"},o.createElement("div",{className:"stage-chrome"},o.createElement("span",{className:"dots"},o.createElement("i",null),o.createElement("i",null),o.createElement("i",null)),o.createElement("span",{className:"urlbar"},o.createElement("svg",{viewBox:"0 0 24 24",...Gl,"aria-hidden":"true"},o.createElement("rect",{x:"4",y:"10",width:"16",height:"10",rx:"2"}),o.createElement("path",{d:"M8 10V7a4 4 0 0 1 8 0v3"}))," ",o.createElement("span",null,Aqe[i]))),o.createElement("div",{className:"canvas"},o.createElement("div",{className:`panel${HN[i]==="boards"?" active":""}`},o.createElement("div",{className:"bd"},o.createElement("div",{className:"bd-mast"}),o.createElement("div",{className:"bd-title"},o.createElement("h3",{className:"reveal"},m.title),o.createElement("span",{className:"pub reveal"},o.createElement("span",{className:"d"})," Shared")),o.createElement("div",{className:"bd-grid cols2"},m.cards.map(T=>o.createElement("div",{key:T.label,className:"bd-card reveal"},o.createElement("div",{className:"ch"},o.createElement("b",null,T.label),T.dynamic&&o.createElement("span",{className:"auto"},T.chip||"Auto")),o.createElement("div",{className:"lines"},(T.bookmarkIds||[]).map(M=>VN(M,f(M).title)),T.dynamicBookmarkId&&VN(T.dynamicBookmarkId,f(T.dynamicBookmarkId).title,"dyn"))))))),o.createElement("div",{className:`panel${HN[i]==="viz"?" active":""}`},o.createElement("div",{className:"viz"},o.createElement("div",{className:"viz-view",key:y},C()))),o.createElement("div",{className:`panel${HN[i]==="flows"?" active":""}`},o.createElement("div",{className:"fl"},o.createElement("svg",{className:"fl-svg",preserveAspectRatio:"none"},O.map(T=>o.createElement("path",{key:T.id,className:"fl-edge",d:T.d}))),h.nodes.map(T=>o.createElement("div",{key:T.id,className:"fl-node",style:{left:`${T.x}px`,top:`${T.y}px`}},o.createElement("b",null,T.label),o.createElement("div",{className:"lines"},(T.bookmarkIds||[]).map(M=>VN(M,f(M).title))))))))),o.createElement("p",{className:"stage-caption"},Tqe[i]))};const ql=()=>
1953o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2"},o.createElement("path",{d:"M5 13l4 4L19 7"})),sH=()=>{const[e,t]=p.useState(!1),n=Wn(d=>{var f;return(f=d==null?void 0:d.FB)==null?void 0:f.auth}),r=yr(),a=!1;localStorage.getItem("hasSignedInBefore");const s=!!localStorage.getItem("userLoader-teamsList")&&!!localStorage.getItem("userLoader-userContext"),i=a;p.useEffect(()=>{},[i,r]),p.useEffect(()=>{!s&&!i&&ea.ping(Ze("users-auth-otp-send"))},[]),p.useEffect(()=>{var m;const d=!!((m=n==null?void 0:n.user)!=null&&m.uid)||s;if(localStorage.removeItem("pendingSignupOTPEmail"),!d){if(localStorage.getItem("pendingLoginOTPEmail")){r("/login");return}const h=localStorage.getItem("pendingSignupOTP");if(h)try{const g=JSON.parse(h);if(g!=null&&g.email){r("/signup");return}}catch{localStorage.removeItem("pendingSignupOTP")}}const f=localStorage.getItem("userLoader-teamsList")&&localStorage.getItem("userLoader-userContext");if(f&&!(n!=null&&n.isLive)){setTimeout(()=>{let h=JSON.parse(localStorage.getItem("userLoader-teamsList"));h&&h.length>0?(Zn.dispatch({type:"ui/setUser_allTeam"}),re.dispatch("redirect-to",Zc.defaults.loginRedirect)):re.dispatch("redirect-to","/dashboard"),Zn.dispatch({type:"ui/setsRedirect_skip",data:{isSkipping:!0}})},0);return}if(n!=null&&n.isLoading&&!e)t(!0);else if(!(n!=null&&n.isLoading)&&e)setTimeout(()=>t(!1),2e3);else if(f){let h=JSON.parse(localStorage.getItem("userLoader-teamsList"));if(h&&h.length>0){let g=Zc.defaults.loginRedirect;Zn.dispatch({type:"ui/setUser_allTeam"}),re.dispatch("redirect-to",g)}else re.dispatch("redirect-to","/dashboard");Zn.dispatch({type:"ui/setsRedirect_skip",data:{isSkipping:!0}})}},[n==null?void 0:n.isLoading,n==null?void 0:n.isLive,e,r]);const l=()=>{r("/signup"),Jn.analyticsTrack({event:"Login - Get Started - Click",codeName:"anonymous-view-login-action-button-getstarted-click"})},c=o.createElement("div",{className:"flex items-center justify-center",style:{height:"100dvh"}},o.createElement(os,null));let u=o.createElement("div",{className:"app-content app-marketing app-marketing__home bk-home"},o.createElement(BS,null),o.createElement("div",null,o.createElement("h1",{className:"hero-title"},"The bookmark manager",o.createElement("br",null),"you'll ",o.createElement("span",{className:"grad"},"actually open every day"),"."),o.createElement("p",{className:"hero-sub"},"Save any page in one click. Find it in one second. Then turn your best links into pages you curate, share, and publish â for work, family, friends, and you."),o.createElement("div",{className:"hero-cta-row items-center"},o.createElement("button",{type:"button",className:"btn-primary",onClick:l},"Get started â it's free"),o.createElement("div",{className:"hero-meta"},o.createElement("span",{className:"pill"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("path",{d:"M5 13l4 4L19 7"}))," ","One-click save"),o.createElement("span",{className:"pill"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("circle",{cx:"11",cy:"11",r:"7"}),o.createElement("path",{d:"M21 21l-4-4"}))," ","Instant search"),o.createElement("span",{className:"pill"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1.5"}),o.createElement("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),o.createElement("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1.5"}),o.createElement("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1.5"}))," ","Works everywhere you browse"))," "),o.createElement(Mqe,null)),o.createElement("section",null,o.createElement("div",{className:"bk-wrap"},o.createElement("div",{className:"section-head"},o.createElement("span",{className:"kicker"},"One manager, every part of your life"),o.createElement("h2",null,"Reimagined to fit work, family, friends, and you"),o.createElement("p",null,"Most bookmark managers assume your links live in one box. Yours don't. Bookmark It gives every context its own space â and keeps the private ones private.")),o.createElement("div",{className:"aud-grid"},o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ð¼"),o.createElement("h3",null,"Work"),o.createElement("p",null,"Shared workspaces for designs, docs, requirements, and repos â the team always lands on the latest link.")),o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ð¡"),o.createElement("h3",null,"Family"),o.createElement("p",null,"Trip plans, recipes, school links, the wishlist â one board everyone can open and add to.")),o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ð¤"),o.createElement("h3",null,"Friends"),o.createElement("p",null,"Publish a board of your favorite spots, reads, or gear and share it with one link â no account required to view.")),o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ð"),o.createElement("h3",null,"Personal"),o.createElement("p",null,"A private workspace that can't be shared, ever. Your read-later pile lives next to the team links â separately."))))),o.createElement("section",{style:{background:"var(--bg-soft)"}},o.createElement("div",{className:"bk-wrap"},o.createElement("div",{className:"feature"},o.createElement("div",{className:"ftext"},o.createElement("span",{className:"kicker"},"Collaboration, built in"),o.createElement("h2",null,"A bookmark manager with people at the center"),o.createElement("p",null,"Bookmarks were always a lonely format â a private list nobody else could see. We flipped that. Shared workspaces and boards mean a link saved by one person is found by everyone who needs it."),o.createElement("ul",null,o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Shared workspaces")," â inv
1953ite your team or family; everyone saves into the same organized space.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Always the latest")," â shortlinks resolve to the current version, so nobody opens a stale prototype again.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Publish to anyone")," â turn a board into a public page readable with one link, no sign-up.")))),o.createElement("div",{className:"fvisual"},o.createElement("div",{className:"collab"},o.createElement("div",{className:"stack",style:{marginBottom:"2px"}},o.createElement("span",{className:"ava",style:{background:"#c026d3"}},"HA"),o.createElement("span",{className:"ava",style:{background:"#2d72d2"}},"MK"),o.createElement("span",{className:"ava",style:{background:"#f59e0b"}},"JL"),o.createElement("span",{className:"ava",style:{background:"#10b981"}},"+4")),o.createElement("div",{className:"row"},o.createElement("span",{className:"ava",style:{background:"#2d72d2"}},"MK"),o.createElement("div",{className:"meta"},o.createElement("b",null,"Maya added"),o.createElement("span",null,"Checkout redesign v3 â Design workspace")),o.createElement("span",{className:"when"},"2m")),o.createElement("div",{className:"row"},o.createElement("span",{className:"ava",style:{background:"#f59e0b"}},"JL"),o.createElement("div",{className:"meta"},o.createElement("b",null,"Jordan published"),o.createElement("span",null,'"Tokyo Eats" board â public link')),o.createElement("span",{className:"when"},"1h")),o.createElement("div",{className:"row"},o.createElement("span",{className:"ava",style:{background:"#10b981"}},"SP"),o.createElement("div",{className:"meta"},o.createElement("b",null,"Sam saved"),o.createElement("span",null,"API docs â #onboarding")),o.createElement("span",{className:"when"},"3h"))))))),o.createElement("section",null,o.createElement("div",{className:"bk-wrap"},o.createElement("div",{className:"feature flip"},o.createElement("div",{className:"ftext"},o.createElement("span",{className:"kicker"},"Fast, everywhere"),o.createElement("h2",null,"The fastest way to save a link â and to find it again"),o.createElement("p",null,"Saving should be effortless. Extension, keyboard shortcut, or drag a link onto the page. Your whole library is one keystroke away â on any device, anywhere in the world."),o.createElement("ul",null,o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"One-click capture")," â Cmd/Ctrl + I, or drag-and-drop. No friction, no modal to dismiss.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Global access")," â your bookmarks sync across platforms and devices, available the moment you open your computer.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Browser, web, desktop & mobile")," â Chrome extension, web app, and an installable app everywhere you browse.")))),o.createElement("div",{className:"fvisual"},o.createElement("div",{className:"speed"},o.createElement("div",{className:"kbd"},o.createElement("span",null,"â"),o.createElement("span",null,"I")),o.createElement("div",{className:"save-pop"},o.createElement("div",{className:"ttl"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"currentColor"},o.createElement("path",{d:"M6 2h12v20l-6-4-6 4z"}))," ","Saved to"," ",o.createElement("span",{style:{color:"var(--primary)"}},"Design")),o.createElement("div",{className:"field"},"Figma â Checkout redesign"),o.createElement("div",{className:"ok"},"Done â closingâ¦")),o.createElement("div",{className:"platforms"},o.createElement("span",{className:"plat"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("rect",{x:"3",y:"4",width:"18",height:"13",rx:"2"}),o.createElement("path",{d:"M8 20h8"}))," ","Web"),o.createElement("span",{className:"plat"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("rect",{x:"4",y:"3",width:"16",height:"14",rx:"2"}),o.createElement("path",{d:"M9 21h6"}))," ","Desktop"),o.createElement("span",{className:"plat"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("rect",{x:"7",y:"2",width:"10",height:"20",rx:"2.5"}),o.createElement("path",{d:"M11 18h2"}))," ","Mobile"))))))),o.createElement("section",{style:{background:"var(--bg-soft)"}},o.createElement("div",{className:"bk-wrap"},o.createElement("div",{className:"feature"},o.createElement("div",{className:"ftext"},o.createElement("span",{className:"kicker"},"Purpose-driven"),o.createElement("h2",null,"Information shouldn't be saved once and never seen again"),o.createElement("ul",null,o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Dynamic Board Groups")," â board cards that fill themselves from a Collection or Tag, so new saves appear where they belong, automatically.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Flows")," â map prototypes and designs into a visual diagram of how a product fits together.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Site classification")," â sites are grouped by type, so you can view related content at a glance.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Bookmark versioning")," â every link keeps a version history and always opens the latest.")),o.createElement("li",null,o.createElement(ql,null),o.createElement("span",null,o.createElement("b",null,"Snapshots")," â a captured thumbnail of each page for instant visual identification.")))),o.createElement("div",{className:"fvisual"},o.createElement("div",{className:"capviz"},o.createElement("div",{className:"cap-card"},o.createElement("div",{className:"cap-snap"},o.createElement("img",{src:"/img/show/homepage-demo/09-Design-System.jpeg",alt:""}),o.createElement("span",{className:"cap-snaptag"},"Snapshot"),o.createElement("span",{className:"cap-ver"},"v3")),o.createElement("div",{className:"cap-cardbody"},o.createElement("div",{className:"cap-title"},"Design System"),o.createElement("div",{className:"cap-sub"},"figma.com · Design"),o.createElement("div",{className:"cap-chips"},o.createElement("span",{className:"col-pill"},"Design"),o.createElement("span",{className:"chip"},"#design-system")),o.createElement("div",{className:"cap-divider"}),o.createElement("div",{className:"cap-row"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("circle",{cx:"12",cy:"12",r:"9"}),o.createElement("path",{d:"M12 8v4l3 2"})),o.createElement("span",null,o.createElement("b",null,"Versions")," v3 · v2 · v1 â opens the latest")),o.createElement("div",{className:"cap-row"},o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2"},o.createElement("path",{d:"M10 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1 1M14 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1-1"})),o.createElement("span",null,o.createElement("b",null,"Related"))," ",o.createElement("span",{className:"cap-sites"},o.createElement("span",{className:"cap-site"},"sketch.com"),o.createElement("span",{className:"cap-site"},"framer.com")))))))))),o.createElement("section",null,o.createElement("div",{className:"bk-wrap"},o.createElement("div",{className:"section-head"},o.createElement("span",{className:"kicker"},"See it, don't dig for it"),o.createElement("h2",null,"Powerful visualization, intuitive search"),o.createElement("p",null,"Switch the same library between grid, list, and a full database view. Filter, sort, and edit inline. Map prototypes as Flows. Pick the view that fits the moment â try all three demos above.")),o.createElement("div",{className:"aud-grid"},o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ðï¸"),o.createElement("h3",null,"Grid, list, or database"),o.createElement("p",null,"One set of bookmarks, three lenses. Skim visually, scan a list, or work a full table â your call.")),o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ð"),o.createElement("h3",null,"Search that keeps up"),o.createElement("p",null,"Redesigned search, sorting, and filtering â plus Collection and Tag browsing to walk your library.")),o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ðºï¸"),o.createElement("h3",null,"Flows"),o.createElement("p",null,"Arrange prototype links visually to show how a whole product or journey connects.")),o.createElement("div",{className:"aud"},o.createElement("div",{className:"ico"},"ð¤"),o.createElement("h3",null,"Smarter with AI"),o.createElement("p",null,"Sites auto-group by type. Classification reads only top-level domains and site patterns â never your personal info, page contents, or URLs.")))
1953)),o.createElement("section",null,o.createElement("div",{className:"bk-wrap"},o.createElement("div",{className:"founder"},o.createElement("p",{className:"q"},"We built Bookmark It for ourselves. We wanted a bookmark manager so useful we couldn't get through a day without it â fast to save, effortless to find, and shareable with the people we work and live with. So we made one. Now it's yours."),o.createElement("p",{className:"sig"},"â The Bookmark It team")))),o.createElement("section",{className:"final"},o.createElement("div",{className:"bk-wrap"},o.createElement("h2",null,"One home for every link that matters."),o.createElement("p",null,"Private piles, shared workspaces, and published pages. Spend less time re-finding and more time doing."),o.createElement("div",{className:"hero-cta-row"},o.createElement("button",{type:"button",className:"btn-primary",onClick:l},"Get started â it's free")))),o.createElement("div",{className:"foot"},o.createElement("div",{className:"bk-wrap foot-inner"},o.createElement("span",null,"© ",new Date().getFullYear()," ",za.name),o.createElement("span",{className:"links"},o.createElement("a",{onClick:()=>r("/terms")},"Terms"),o.createElement("a",{onClick:()=>r("/privacy")},"Privacy"),o.createElement("a",{onClick:()=>r("/pricing")},"Pricing")))));return s?c:u},iH=()=>{var i,l;const e=yr(),t=Wn(c=>{var u;return(u=c==null?void 0:c.FB)==null?void 0:u.auth}),n=Wn(c=>{var u;return(u=c==null?void 0:c.UI)==null?void 0:u.user}),[r,a]=p.useState(!1);return p.useMemo(()=>{var d,f;const c=(d=n==null?void 0:n.activeTeam)==null?void 0:d.id;if(!c)return!1;const u=(((f=t==null?void 0:t.globalMeta)==null?void 0:f.teams)||[]).find(m=>String(m.id)===String(c));return!!(u&&u.is_personal)},[(i=t==null?void 0:t.globalMeta)==null?void 0:i.teams,(l=n==null?void 0:n.activeTeam)==null?void 0:l.id])?o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto sm:pt-6 md:pt-8 lg:pt-10 w-full max-w-xl"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card relative overflow-hidden group w-full"},o.createElement("div",{className:"flex flex-col gap-4 pt-2"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("div",{className:"shrink-0 w-11 h-11 rounded-xl bg-[linear-gradient(135deg,theme(colors.fuchsia.100),theme(colors.orange.100))] dark:bg-[linear-gradient(135deg,theme(colors.fuchsia.900/40),theme(colors.orange.900/40))] flex items-center justify-center text-primary dark:text-fuchsia-300 group-hover:scale-105 transition-transform motion-reduce:transform-none"},o.createElement(Yu,{size:22,strokeWidth:1.75})),o.createElement("div",null,o.createElement("h2",{className:"text-lg font-semibold dark__text mb-0"},"Start with your bookmarks"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},"Only you can see what lands here"))),o.createElement("h5",{className:"dark__text text-sm leading-relaxed mb-0"},"Your personal workspace is empty. Bring in your Chrome bookmark bar or frequently visited sites â you can review and edit everything before it saves."),o.createElement("div",{className:"flex flex-col gap-4 mt-1"},o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-white bg-primary hover:bg-primaryHover rounded-md text-sm px-3 py-2 transition-colors",onClick:()=>{var c;Jn.analyticsTrack({userId:(c=t==null?void 0:t.user)==null?void 0:c.uid,event:"Personal Empty - Import Bookmarks (Bar) - Click",codeName:"user-ui-personal-empty-action-importbookmarks_bar-click"}),e("/import-bookmark-bar")}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Yu,{size:16,strokeWidth:1.75}),"Import bookmark bar"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"})),o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-primary bg-transparent border border-primary/30 hover:border-primary hover:bg-primary/5 rounded-md text-sm px-3 py-2 transition-colors dark:text-fuchsia-300 dark:border-fuchsia-500/40 dark:hover:border-fuchsia-400 dark:hover:bg-fuchsia-500/10",onClick:()=>{var c;Jn.analyticsTrack({userId:(c=t==null?void 0:t.user)==null?void 0:c.uid,event:"Personal Empty - Import Bookmarks (History) - Click",codeName:"user-ui-personal-empty-action-importbookmarks_history-click"}),e("/import-bookmark-history")}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Sx,{size:16,strokeWidth:1.75}),"Frequently visited sites"),o.createElement(Du,{size:14,className:"opacity-70 group-hover:translate-x-0.5 transition-transform motion-reduce:transform-none"})),o.createElement("button",{className:"w-full inline-flex items-center justify-between gap-2 text-primary bg-transparent border border-primary/30 hover:border-primary hover:bg-primary/5 rounded-md text-sm px-3 py-2 transition-colors dark:text-fuchsia-300 dark:border-fuchsia-500/40 dark:hover:border-fuchsia-400 dark:hover:bg-fuchsia-500/10",onClick:()=>{a(!0),re.dispatch("REFRESH_ASSETS_LIST"),setTimeout(()=>a(!1),1e3)}},o.createElement("span",{className:"inline-flex items-center gap-2"},o.createElement(Hd,{size:16,strokeWidth:1.75,className:r?"animate-spin":""}),"Already imported before? Sync")))))):o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto
1953sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card flex flex-col gap-4 items-center"},o.createElement("h5",{className:"dark__text"},"No bookmarks added to this workspace. Share some bookmarks."),o.createElement(De,{icon:o.createElement(Hd,{size:14}),text:"Sync",className:"btn-default",onClick:()=>{re.dispatch("REFRESH_ASSETS_LIST")}})))},oH=()=>{const e=yr(),{teamID:t}=xs();return o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card flex flex-col gap-4 items-center"},o.createElement("h5",{className:"dark__text"},"View some bookmarks."),o.createElement(De,{icon:o.createElement(Hd,{size:14}),text:"Sync",className:"btn-default",onClick:()=>{re.dispatch("REFRESH_ASSETS_LIST"),e(t&&t!=="all"?`/workspace/${t}/bookmarks/updated`:"/workspace/all/bookmarks/updated")}})))},lH=()=>o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card"},o.createElement("h5",{className:"dark__text"},"Star some bookmarks."))),tre=({url:e=null,asset:t=null,dialogOpen:n=!1,dialogCloseExternal:r=ta.noop,redirectAfterClose:a=!1,external:s})=>{var E;const[i,l]=p.useState(null),[c,u]=p.useState(null),[d,f]=p.useState(!1),[m,h]=p.useState(!1),g=yr(),v=()=>{h(!1),r(),a&&g({pathname:Pn(Zc.defaults.loginRedirect)})};let y=w=>{navigator.clipboard.writeText(`https://bookmark.it.com/go/${w.$id}`),re.dispatch("trigger-alert",{message:`Copied shortlink "${w.name}" to clipboard.`,intent:"success"})};p.useEffect(()=>{if(n){if(u(window.location.href),h(!0),t)try{window.history.replaceState(null,za.name,`https://bookmark.it.com/go/${t.$id}`)}catch{}}else try{window.history.replaceState(null,za.name,c||window.location.href)}catch{}},[n,t]),p.useEffect(()=>{let{finalizedURL:w,hasAdjustment:x}=Vc.full_process(e,{view:"prototypes_viewer",iterationDisplayFormat:"inline"});l(w),f(x)},[e]);let b=o.createElement(IT,{className:"inapp-viewer-content",portalClassName:"inapp-viewer",isOpen:m,onClose:v,canEscapeKeyClose:!0,canOutsideClickClose:!1,usePortal:!0},o.createElement("div",{className:"inapp-viewer-content__header xs:gap-0 xs:!px-0"},o.createElement("div",{className:"inapp-viewer-content__secnav xs:gap-1"},o.createElement("span",{className:"flex items-center gap-2 dark__text"},(E=t==null?void 0:t.active_iteration)!=null&&E.favicon?o.createElement(Cm,{storagePath:t.active_iteration.favicon}):o.createElement(Ft,{icon:o.createElement(bG,{size:14})}),o.createElement("span",{className:"whitespace-nowrap"},t!=null&&t.name?t.name:""))),o.createElement("div",{className:"inapp-viewer-content__actions flex gap-2 xs:gap-1"},["dev","qa"].includes("production")?o.createElement("span",null,d?o.createElement(Hr,{minimal:!0,usePortal:!1,canEscapeKeyClose:!0,placement:"bottom-start",content:o.createElement("div",{className:"p-4 dark:bg-purple-950"},o.createElement(l0e,{className:"text-xs dark__text whitespace-break-spaces dark:bg-purple-950 p-0 m-0"},"Adjusted to: ",i))},o.createElement(De,{className:"hd",minimal:!0},o.createElement("span",{className:"flex items-center gap-2 dark__text"},o.createElement(Ft,{icon:o.createElement(Gpe,{size:14})}),o.createElement("span",{className:"hd whitespace-nowrap"},"TargetURL")))):null):null,t!=null&&t.$id?o.createElement(De,{className:"hd",minimal:!0,onClick:()=>y({$id:t.$id,name:t.name})},o.createElement("span",{className:"flex items-center gap-2 dark__text"},o.createElement(Ft,{icon:o.createElement(tpe,{size:14})}),o.createElement("span",{className:"hd whitespace-nowrap"},"Copy Share Link"))):null,o.createElement(De,{minimal:!0,onClick:()=>v(),className:"xs:mr-2"},o.createElement("span",{className:"flex items-center gap-2 dark__text"},o.createElement(Ft,{icon:o.createElement(wm,{size:14})}),o.createElement("span",{className:"hd whitespace-nowrap"},"Close"))))),e?o.createElement("iframe",{className:"inapp-viewer-content__iframe",src:i}):null);return t?b:null},cH=Ir(xr()),Pqe=({assetID:e=null,teamID:t=null,activeCollectionID:n=null,external:r,meta:a={}})=>{var x,S;const s=yr(),i=Wn(N=>{var k;return(k=N==null?void 0:N.FB)==null?void 0:k.auth}),[l,c]=p.useState(0),[u,d]=p.useState(null),[f,m]=p.useState(null),[h,g]=p.useState(!1),[v,y]=p.useState(""),b=()=>{d(null),pt(cH,Ze("users-collection-view-optionsList"))({teamID:t}).then(({data:N})=>{d(N.output)}).catch(N=>{console.error("errorItem",N),re.dispatch("trigger-alert",{message:N.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),m({active:!0})})};let E=({dataItem:N,collectionName:k})=>{re.dispatch("interstitial-run","on");let C={asset:{$id:e}};k?C.collection={property_name:k}:C.asset.id_collection=N.$id,pt(cH,Ze("users-asset-manage-edit"))(C).then(({data:A})=>{re.dispatch("interstitial-run","off"),r==null||r.action({type:"selected-collection"}),re.dispatch("trigger-alert",{message:k||N.name?`You have moved this asset to the${k?" new":""} collection "${k||N.name}."`:"This asset has been removed from the collection",intent:"success"})}).catch(A=>{console.error("errorItem",A),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:A.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})};return p.useEffect(()=>{t&&b()},[t,l]),o.createElement("div",null,u?o.createElement("div",{className:"row-actions-manage-collection"},a.teamName?o.createElement("div",{className:"row-actions-manage-collection__header p-2 border-bottom dark__text flex"},o.createElement("span",{className:"container xs:max-w-[150px] sm:max-w-[300px] text-ellipsis overflow-hidden whitespace-nowrap"},a.teamName)):null,h?o.createElement("form",{onSubmit:N=>{N.preventDefault(),E({collectionName:v})},className:"new-collection"},o.createElement("label",null,"Collection name",o.createElement("input",{type:"text",placeholder:"",onChange:N=>y(N.target.value),value:v,autoFocus:!0,className:"without-ring"})),o.createElement("div",null,o.createElement("button",{type:"submit",className:`${Ho} bp6-button bp6-intent-primary bp6-minimal font-bold`,disabled:!v},"Save"),o.createElement("button",{onClick:()=>g(!1),className:"bp6-button bp6-intent-primary bp6-minimal"},"Cancel"))):o.createElement("div",null,o.createElement("div",{className:"collection-scroll border-bottom flex flex-col"},((x=u.collections)==null?void 0:x.length)>0?u.collections.map(N=>o.createElement(De,{variant:"minimal",className:"inline w-full",key:N.$id,onClick:k=>{if(N.$id===n){k.stopPropagation();return}E({dataItem:N})}},o.createElement("span",{className:"flex gap-1"},o.createElement(Ft,{icon:N.$id===n?o.createElement(Vpe,{size:16}):o.createElement(Lpe,{size:16})}),o.createElement("span",{className:"container xs:max-w-[125px] sm:max-w-[300px] text-ellipsis overflow-hidden whitespace-nowrap"},N.name)))):null),o.createElement("div",{className:"flex justify-between w-full row-actions-manage-collection__footer "},vc(i)?!sy(i,t)&&(((S=u.collections)==null?void 0:S.length)||0)>=Tr.organization.subscription.plan.free.collection_limit?o.createElement(De,{variant:"minimal",className:"inline py-2 text-xs hd",onClick:N=>{var A,O,T,M;N.stopPropagation();
1953const k=(O=(A=i==null?void 0:i.globalMeta)==null?void 0:A.teams)==null?void 0:O.find(L=>L.id===t),C=((T=k==null?void 0:k.organization)==null?void 0:T.$id)||((M=k==null?void 0:k.organization)==null?void 0:M.id);C&&s(Pn("/organization/:organizationID/subscribe",{organizationID:C}))},text:"Upgrade to add more collections",intent:"primary"}):o.createElement(De,{variant:"minimal",className:"inline py-2",onClick:N=>{N.stopPropagation(),g(!0)},icon:o.createElement(M3,{size:16}),text:"New"}):o.createElement(De,{variant:"minimal",className:"inline py-2 bp6-skeleton",icon:o.createElement(M3,{size:16}),text:"New"}),n?o.createElement(De,{variant:"minimal",className:"inline py-2",onClick:N=>{E({dataItem:{$id:null}})}},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{icon:o.createElement(wm,{size:16})}),o.createElement("span",null,"Clear"),o.createElement("span",{className:"hd"},"Collection"))):null))):f!=null&&f.active?o.createElement("div",{className:GE},o.createElement("section",{className:"m-t"},o.createElement("span",null,"Soryy, the collection options for this bookmark cannot be loaded at this time."))):o.createElement("div",null,o.createElement(Cr,{className:"bp6-menu bp6-elevation-1"},[1,2,3,4,5].map(N=>o.createElement(Bt,{key:N,icon:o.createElement(Zhe,{size:16}),text:"Lorem Ipsum Dolor",className:"bp6-skeleton"})))))},Dqe=({teamID:e,assetID:t,manualActiveIterationID:n,ListItem:r,external:a})=>{const[s,i]=p.useState(null),[l,c]=p.useState(null),[u,d]=p.useState(null),f=Wn(h=>{var g;return(g=h==null?void 0:h.FB)==null?void 0:g.auth});return o.createElement("div",{className:"iteration-list flex min-w-0 flex-col gap-4"},r&&r.length>0?r.map((h,g)=>{var v,y,b,E,w,x;return o.createElement(jn,{key:h.$id,interactive:!1,elevation:qn.ONE,className:"card flex min-w-0 flex-col gap-3 overflow-hidden p-3 sm:p-4"},o.createElement("div",{className:"flex flex-wrap items-start justify-between gap-2 gap-y-3"},o.createElement("div",{className:"flex min-w-0 flex-wrap items-center gap-2"},r.length>1?o.createElement("span",{className:"shrink-0 font-semibold dark__text"},"Version ",r.length-g):null,h.is_active?o.createElement(fr,{compact:!0,usePortal:!1,content:"This is the URL that is used when clicking on this bookmark."},o.createElement(li,{fill:!0,minimal:!0,className:"published-badge shrink-0"},h.$id===n?"Manual ":"Auto ","Publish")):null),o.createElement("div",{className:"flex min-w-0 flex-shrink-0 flex-wrap justify-end gap-2"},(y=(v=f==null?void 0:f.context)==null?void 0:v.team_projects_edit_team_map)!=null&&y[e]&&n?o.createElement(De,{className:"dark__text rounded-sm",onClick:()=>{s||h.$id===n||(i(h.$id),a.action({type:"manual-select-active",dataSet:{assetID:t,iterationItem:h},callback:()=>i(null)}))},variant:"minimal",icon:o.createElement(Rpe,{size:16}),text:h.$id===n?"Published":"Publish",style:{opacity:h.$id===s||h.$id===n?.5:1}}):null,(E=(b=f==null?void 0:f.context)==null?void 0:b.team_projects_edit_team_map)!=null&&E[e]?o.createElement(De,{className:"dark__text rounded-sm",onClick:()=>{a.action({type:"edit",dataSet:{assetID:t,iterationItem:h}})},variant:"minimal",icon:o.createElement(dG,{size:16}),text:"Edit"}):null,(x=(w=f==null?void 0:f.context)==null?void 0:w.team_projects_delete_team_map)!=null&&x[e]&&r.length>1?o.createElement(De,{className:"dark__text rounded-sm",onClick:()=>{a.action({type:"delete",dataSet:{assetID:t,iterationItem:h}})},variant:"minimal",icon:o.createElement(KP,{size:16}),text:"Delete"}):null)),(()=>{var S,N,k;return h.type==="url"?o.createElement("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:gap-4"},o.createElement("div",{onClick:()=>{h.auto_preview_thumbnail&&(c(h.auto_preview_thumbnail),d(h))},className:`h-[120px] w-[120px] max-w-full shrink-0 overflow-hidden rounded border border-gray-300 dark:border-gray-600 ${h.auto_preview_thumbnail?"cursor-pointer":""}`},h.auto_preview_thumbnail?o.createElement(nu,{storagePath:h.auto_preview_thumbnail,style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"top"},fallback:o.createElement(ky,{url:h.url})}):o.createElement(ky,{url:h.url})),o.createElement("div",{className:"flex min-w-0 flex-1 flex-col gap-3"},o.createElement("div",{className:"min-w-0 break-words"},o.createElement("a",{href:h.url,target:"_blank",rel:"noreferrer",className:"text-sm text-blue-600 underline decoration-blue-600/30 break-all dark:text-blue-400"},h.url),["dev","qa"].includes("production")?o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Base_Assets/${t}/Sub_Iterations/${h.$id}`,target:"_blank",rel:"noreferrer",className:"dark__text ml-2 inline-block text-xs whitespace-nowrap"},"[FS]"):null),o.createElement("dl",{className:"m-0 grid grid-cols-1 gap-x-6 gap-y-2 text-sm sm:grid-cols-2"},h.change_notes?o.createElement("div",{className:"min-w-0 sm:col-span-2"},o.createElement("dt",{className:"text-xs font-medium text-gray-500 dark:text-gray-400"},"Notes"),o.createElement("dd",{className:"mt-0.5 break-words dark__text"},h.change_notes)):null,o.createElement("div",{className:"min-w-0"},o.createElement("dt",{className:"text-xs font-medium text-gray-500 dark:text-gray-400"},"Created"),o.createElement("dd",{className:"mt-0.5 dark__text"},Ht(h.date_created*1e3).format("MM/DD/YYYY h:mm A"))),o.createElement("div",{className:"min-w-0"},o.createElement("dt",{className:"text-xs font-medium text-gray-500 dark:text-gray-400"},"Created by"),o.createElement("dd",{className:"mt-0.5 break-words dark__text"},((N=(S=h.from_member)==null?void 0:S.created)==null?void 0:N.name)??"â")),(k=h.from_member)!=null&&k.modified?o.createElement("div",{className:"min-w-0 sm:col-span-2"},o.createElement("dt",{className:"text-xs font-medium text-gray-500 dark:text-gray-400"},"Modified by"),o.createElement("dd",{className:"mt-0.5 break-words dark__text"},h.from_member.modified.name)):null))):"N/A"})())}):o.createElement("p",{className:"dark__text"},"No iteration detected"),o.createElement(ya,{isOpen:!!l,onClose:()=>{c(null),d(null)},title:o.createElement("div",{className:"flex justify-between items-center w-full"},o.createElement("span",null,"Snapshot"),(u==null?void 0:u.url)&&o.createElement("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"mr-2 text-sm font-bold"},"View bookmark")),style:{width:"auto",maxWidth:"90vw"}},o.createElement("div",{className:Fs},l&&o.createElement(nu,{storagePath:l,style:{width:"100%",height:"auto",display:"block"}}))))},cw=Ir(xr()),Lqe=({assetID:e=null,cancelAssetID:t=ta.noop,external:n})=>{var T,M,L,D;const[r,a]=p.useState(0),[s,i]=p.useState(null),[l,c]=p.useState(null),[u,d]=p.useState(null),[f,m]=p.useState(!1),[h,g]=p.useState(!1),[v,y]=p.useState(!1),[b,E]=p.useState(!1),[w,x]=p.useState(null),S=()=>{w&&(E(!1),pt(cw,Ze("users-asset-iteration-delete"))({iteration:{$id:w.iterationItem.$id,id_asset:w.assetID}}).then(({data:j})=>{re.dispatch("trigger-alert",{message:"Successfully deleted the iteration.",intent:"success"}),a(r+1),n.action({type:"delete",dataSet:w}),x(null)}
1953).catch(j=>{console.error("errorItem",j),re.dispatch("trigger-alert",{message:j.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),x(null)}))},N=()=>{E(!1),x(null)},k=Wn(j=>{var H;return(H=j==null?void 0:j.FB)==null?void 0:H.auth}),C=()=>{if(!e){console.warn("IterationsPanel: No assetID provided.");return}i(null),pt(cw,Ze("users-asset-iteration-list"))({assetID:typeof e=="object"&&(e!=null&&e.$id)?e.$id:e}).then(({data:j})=>{var K;let H=j.output;i(H);let Y=null;for(var z=0;z<((K=H==null?void 0:H.iterations)==null?void 0:K.length);z++){let ee=H.iterations[z];ee!=null&&ee.is_active&&(Y=ee)}c(Y)}).catch(j=>{console.error("errorItem",j),re.dispatch("trigger-alert",{message:j.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),d({active:!0})})},A=({skipRefreshTableOnClose:j=!1}={})=>{m(!1),t(),i(null),h&&!j&&(g(!1),n.action({type:"refresh-table"}))};return p.useEffect(()=>{e&&(C(),m(!0))},[e,r]),o.createElement(Bp,{className:"asset-drawer-container",portalClassName:"asset-drawer",isOpen:f,onClose:()=>A(),canOutsideClickClose:!1,autoFocus:!0,hasBackdrop:!0},o.createElement("nav",{className:"asset-drawer-navbar"},o.createElement("div",{className:"bp6-navbar-group bp6-align-left"},o.createElement("div",{className:"bp6-navbar-heading dark__text"},"Version History")),o.createElement("div",{className:"bp6-navbar-group bp6-align-right"},s!=null&&s.teamID?vc(k)?sy(k,s.teamID)&&((M=(T=Tr.organization.subscription.plan[Kp(k,s.teamID)])==null?void 0:T.has)!=null&&M.iterations)?(D=(L=k==null?void 0:k.context)==null?void 0:L.team_projects_edit_team_map)!=null&&D[s.teamID]?o.createElement(De,{variant:"minimal",onClick:()=>{n.action({type:"add",dataSet:{assetID:e}}),A({skipRefreshTableOnClose:!0})},className:"bp6-button bp6-intent-primary bp6-minimal font-bold"},"Add"):null:o.createElement("div",null,o.createElement(De,{variant:"minimal",disabled:!0,className:"bp6-button bp6-intent-primary bp6-minimal font-bold"},"Add"),o.createElement(fr,{compact:!0,usePortal:!1,content:"The selected workspace does not have a subscription plan to activate this feature."},(()=>{var Y,z,K,ee;const j=(z=(Y=k==null?void 0:k.globalMeta)==null?void 0:Y.teams)==null?void 0:z.find(oe=>oe.id===(s==null?void 0:s.teamID)),H=((K=j==null?void 0:j.organization)==null?void 0:K.$id)||((ee=j==null?void 0:j.organization)==null?void 0:ee.id);return H?o.createElement(ci,{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text !no-underline",to:Pn("/organization/:organizationID/subscribe",{organizationID:H})},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription")):o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription"))})())):o.createElement(De,{variant:"minimal",className:"bp6-button bp6-intent-primary bp6-minimal font-bold bp6-skeleton"},"Add"):null,o.createElement("button",{onClick:()=>A(),className:"bp6-button bp6-intent-primary bp6-minimal"},o.createElement(Ft,{icon:o.createElement(wm,{size:16})})))),s?o.createElement("div",{className:`${GE} iterations-panel-body`},o.createElement("div",{className:"flex min-h-0 min-w-0 flex-col pt-2"},o.createElement("div",{className:"iterations-panel-asset flex items-start gap-3 border-b border-gray-200 px-4 py-2 dark:border-gray-700"},l!=null&&l.favicon_url?o.createElement("span",{className:"favicon-container mt-0.5 shrink-0"},o.createElement("img",{src:l==null?void 0:l.favicon_url,alt:""})):l!=null&&l.favicon?o.createElement("span",{className:"favicon-container mt-0.5 shrink-0"},o.createElement(Cm,{storagePath:l==null?void 0:l.favicon})):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement("h1",{className:"break-words text-base font-semibold leading-snug dark__text sm:text-lg"},s==null?void 0:s.assetName),["dev","qa"].includes("production")&&(l!=null&&l.favicon_type)?o.createElement(fr,{compact:!0,usePortal:!1,content:"w=whitelist, d=google favicon api",className:"!mr-1"},o.createElement("span",{className:"mt-1 inline-block text-xs opacity-70"},"[",l.favicon_type,"]")):null)),o.createElement("div",{className:"autopub-setting flex gap-3 border-b border-gray-200 bg-slate-50 px-4 py-2 dark:border-gray-700 dark:bg-slate-900/50 items-center justify-between"},o.createElement("div",{className:"flex items-start gap-2"},o.createElement("p",{className:"m-0 min-w-0 flex-1 text-sm leading-snug text-gray-800 dark__text"},"Auto-publish latest version"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Publish the latest version automatically with auto-publish. Turned off to manually publish a specific version, which will be used as the bookmark and shortlink URL."},o.createElement("span",{className:"shrink-0 pt-0.5"},o.createElement(Ft,{icon:o.createElement(Pge,{size:18})})))),o.createElement("div",{className:"flex shrink-0 items-center justify-end sm:pl-4"},o.createElement(ds,{"aria-label":"Auto-publish latest version",innerLabelChecked:"On",innerLabel:"Off",checked:!(s!=null&&s.manualActiveIterationID),alignIndicator:"right",className:"autopub-toggle m-0 text-gray-800 dark__text",labelElement:null,onChange:()=>{v||!(l!=null&&l.$id)||(y(!0),pt(cw,Ze("users-asset-manage-manuallySelectActiveIteration"))({assetID:e,iterationID:l.$id}).then(({data:j})=>{re.dispatch("trigger-alert",{message:`Auto-publish has been set to ${j.output.isSettingManualActiveIteration?"off":"on"}.`,intent:"success"}),y(!1),g(!0),a(r+1)}).catch(j=>{console.error("errorItem",j),y(!1),re.dispatch("trigger-alert",{message:j.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))},style:{opacity:v?.5:1}}))),o.createElement("div",{className:"min-h-0 min-w-0 flex-1 overflow-y-auto px-4 py-2 pt-4"},o.createElement(Dqe,{teamID:s==null?void 0:s.teamID,assetID:e,manualActiveIterationID:s==null?void 0:s.manualActiveIterationID,ListItem:s==null?void 0:s.iterations,external:{action:({type:j=null,dataSet:H={},callback:Y=ta.noop})=>{j==="edit"?(n.action({type:"edit",dataSet:H,callback:Y}),A({skipRefreshTableOnClose:!0})):j==="delete"?(x(H),E(!0)):j==="manual-select-active"&&pt(cw,Ze("users-asset-manage-manuallySelectActiveIteration"))({assetID:H.assetID,iterationID:H.iterationItem.$id}).then(({data:z})=>{re.dispatch("trigger-alert",{message:H.iterationItem.$id===s.manualActiveIterationID?'Successfully removed this version as "Published".':'Successfully set this version as "Published".',intent:"success"}),a(r+1),g(!0),Y()}).catch(z=>{console.error("errorItem",z),re.dispatch("trigger-alert",{message:z.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),Y()})}}})))):u!=null&&u.active?o.createElement("div",{className:GE},"Sorry, but the iterations for this asset cannot be loaded at this time."):o.createElement(du,null),o.createElement(xg,{className:"dark:bg-[#241d33] dark:text-[#f0e9f9]",cancelButtonText:"Cancel",confirmButtonText:"Delete Version",icon:o.createElement(KP,{size:20}),intent:jr.DANGER,isOpen:b,onCancel:N,onConfirm:S},o.createElement("p",{className:"dark__text"}
1953,"Confirm deletion of this version.")))},$qe=["grid","grid-fixed-size","list","database"],uH=e=>(e||"").split(",").map(t=>t.trim()).filter(Boolean),Fqe=e=>{if(!e)return null;const t=e.indexOf(":");return t===-1?{mode:e,ascending:!1}:{mode:e.slice(0,t),ascending:e.slice(t+1)==="asc"}},zqe=e=>`${e.mode}:${e.ascending?"asc":"desc"}`,tE=e=>{const t=e.get("display"),n=t&&$qe.includes(t)?t:null;let r=Fqe(e.get("sort"));!r&&e.get("sortmode")&&(r={mode:e.get("sortmode"),ascending:e.get("sortdir")==="asc"});const a=e.has("collection")?uH(e.get("collection")):e.getAll("collection_id").filter(Boolean),s=e.has("tag")?uH(e.get("tag")):e.getAll("tag_id").filter(Boolean),i=e.get("search")||"";return{display:n,sort:r,collectionIds:a,tagIds:s,search:i}},nre=(e,t)=>{const n=new URLSearchParams(e.toString()),r=(a,s)=>{s!==void 0&&(s===null||s===""?n.delete(a):n.set(a,s))};return"display"in t&&r("display",t.display??null),"search"in t&&r("search",t.search??null),"sort"in t&&(n.delete("sortmode"),n.delete("sortdir"),r("sort",t.sort?zqe(t.sort):null)),"collectionIds"in t&&(n.delete("collection_id"),n.delete("collection_name"),r("collection",t.collectionIds&&t.collectionIds.length?t.collectionIds.join(","):null)),"tagIds"in t&&(n.delete("tag_id"),n.delete("tag_name"),r("tag",t.tagIds&&t.tagIds.length?t.tagIds.join(","):null)),n};function Hqe(){return typeof navigator>"u"||!navigator.share||typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(pointer: coarse)").matches}async function Vqe({url:e,title:t=""}){var r;if(Hqe()){const a={url:e};if(t&&(a.title=t),typeof navigator.canShare!="function"||navigator.canShare(a))try{return await navigator.share(a),{method:"share"}}catch(i){if(i&&i.name==="AbortError")return{method:"share",aborted:!0}}}if((r=navigator.clipboard)!=null&&r.writeText)return await navigator.clipboard.writeText(e),{method:"clipboard"};const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px",document.body.appendChild(n),n.select();try{document.execCommand("copy")}finally{document.body.removeChild(n)}return{method:"clipboard"}}const fh=Ir(xr());new BroadcastChannel("asset-quicktally");let uw=null;const dH=3e3,Z4=({associatedTeamID:e=null,containerItem:t=null,dataItems:n=[],childTableActions:r,refreshTable:a,parentState:s,enable:i={},hideColumns:l={},settings:c={},external:u,sortMode:d,setSortMode:f,sortIsAscending:m,setSortIsAscending:h,activeDragItemID:g,isManageMode:v,setIsManageMode:y,selectedAssetIDs:b,setSelectedAssetIDs:E,collectionFilterOptions:w=[],tagFilterOptions:x=[],selectedCollectionIds:S=[],selectedTagIds:N=[],onCollectionFilterChange:k=()=>{},onTagFilterChange:C=()=>{},siteFilterEnabled:A=!1,siteTree:O=[],selectedSiteTokens:T=[],onSiteFilterChange:M=()=>{},isMiddlebarOpen:L=!1,middlebarSide:D="left"})=>{var Nn,tn,br,ca,sa,Gn,wr,Er,Nr,Wr,Ca,Pr;const[j,H]=df(),Y=L?D==="right"?" middlebar-open middlebar-right":" middlebar-open":" middlebar-hide",[z,K]=p.useState(null),[ee,oe]=p.useState(null),[J,se]=p.useState(tE(j).display||j.get("view")||localStorage.getItem("it8-assets-view-mode")||((Nn=c==null?void 0:c.viewMode)==null?void 0:Nn.initial)||"grid");p.useEffect(()=>{localStorage.setItem("it8-assets-view-mode",J)},[J]);const B=ge=>{se(ge),H(nre(j,{display:ge}),{replace:!0})},[U,$]=p.useState(localStorage.getItem("it8-assets-hide-thumbnail")==="true");p.useEffect(()=>{localStorage.setItem("it8-assets-hide-thumbnail",String(U))},[U]);const[ce,be]=p.useState(j.get("name")||""),[ue,Ie]=p.useState(!1),Ae=p.useRef(null);p.useEffect(()=>{const ge=new IntersectionObserver(([zt])=>{Ie(!zt.isIntersecting)},{threshold:[1],rootMargin:"-1px 0px 0px 0px"}),at=Ae.current;return at&&ge.observe(at),()=>{at&&ge.unobserve(at),ge.disconnect()}},[i.refreshButton,i.sortable]);const he=p.useMemo(()=>{let ge=[...n];if(ce&&ce.length>0){const cn=ce.toLowerCase();ge=ge.filter(Mt=>Mt.name&&Mt.name.toLowerCase().includes(cn))}const at=d||"default",zt=(cn,Mt)=>{let kr,Dr;return at==="name"?(kr=cn.name?cn.name.toLowerCase():"",Dr=Mt.name?Mt.name.toLowerCase():""):at==="last-updated"||at==="updated"||at==="default"?(kr=cn.date_modified||cn.date_created||0,Dr=Mt.date_modified||Mt.date_created||0):at==="recently-viewed"?(kr=cn.date_viewed||0,Dr=Mt.date_viewed||0):at==="starred"||at==="favorited"?(kr=cn.date_modified||0,Dr=Mt.date_modified||0):at==="hot"||at==="popular"?(kr=cn.heat_level||0,Dr=Mt.heat_level||0):(kr=cn.date_created||0,Dr=Mt.date_created||0),kr<Dr?m?-1:1:kr>Dr?m?1:-1:0};return ge.sort(zt),ge},[n,ce,d,m]),[_e,ie]=p.useState(""),[Ue,ae]=o.useTransition();p.useEffect(()=>{ae(()=>{be(_e)})},[_e]);const[pe,W]=p.useState(!1),[q,te]=p.useState(0),[X,le]=p.useState("AddIteration"),[me,fe]=p.useState(null),[ke,Se]=p.useState(null),[Et,nt]=p.useState(null),[Pt,en]=p.useState(!1),[hn,rt]=p.useState({}),[et,Kt]=p.useState(null),[zn,xt]=p.useState(null),[rr,ir]=p.useState(!1),[Tn,Ct]=p.useState({}),[_r,Qn]=p.useState(!1),[Ce,ut]=p.useState(null),pn=(ge,at)=>
1953{const zt=new Set(b);at?zt.add(ge):zt.delete(ge),E(zt)},Jt=()=>{const ge=new Set(he.filter(at=>!at.is_collection).map(at=>at.$id));E(ge)},In=()=>{E(new Set)},Dn=()=>{if(v){if(b.size===0)return;Qn(!1),re.dispatch("interstitial-run","on"),pt(fh,Ze("users-asset-manage-deleteBulk"))({assets:Array.from(b).map(ge=>({$id:ge}))}).then(ge=>{b.forEach(Mt=>{Qe.action.delete({tableID:"Assets-General-All",id:Mt})}),a({forceUpdate:!0}),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`Successfully deleted ${b.size} assets.`,intent:"success"});const at=[],zt=new Set;b.forEach(Mt=>{var Dr;const kr=he.find(es=>es.$id===Mt);kr&&(at.push({id:kr.$id,name:kr.name,url:(Dr=kr.active_iteration)==null?void 0:Dr.url,teamId:kr.$team_id,teamName:kr.team_name}),kr.$team_id&&zt.add(kr.$team_id))});let cn=e&&e!=="all"?e:null;!cn&&zt.size===1&&(cn=Array.from(zt)[0]),E(new Set),y(!1)}).catch(ge=>{console.error("errorItem",ge),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:ge.message||"Hmm...something unexpected happened.",intent:"danger"})});return}Ce&&(Qn(!1),re.dispatch("interstitial-run","on"),pt(fh,Ze("users-asset-manage-delete"))({asset:{$id:Ce.$id}}).then(ge=>{ge.data,Qe.action.delete({tableID:"Assets-General-All",id:Ce.$id}),a({forceUpdate:!0}),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`Successfully deleted the asset "${Ce.name}".`,intent:"success"}),ut(null)}).catch(ge=>{console.error("errorItem",ge),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:ge.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),ut(null)}))},or=()=>{Qn(!1),ut(null)},Zt=Wn(ge=>{var at;return(at=ge==null?void 0:ge.FB)==null?void 0:at.auth}),tr=Wn(ge=>{var at;return(at=ge==null?void 0:ge.UI)==null?void 0:at.user}),Fe=aS(),gt=J==="database"&&!!0?"grid":J,ht=!v&>!=="database",We=dS()?{duration:0}:{duration:.22,ease:[.22,1,.36,1]},it={grid:"view-mode__grid","grid-fixed-size":"view-mode__grid-fixed-size",list:"view-mode__list",database:"view-mode__database"}[gt],[_t,vn]=p.useState([{id:"date_modified",desc:!0}]),[An,je]=p.useState([]),[kt,Lt]=p.useState({}),ne=p.useMemo(()=>{const ge=An.filter(at=>at.id!=="site");return T.length?[...ge,{id:"site",value:T}]:ge},[An,T]),Be=p.useRef(ne);Be.current=ne;const mt=p.useCallback(ge=>{const at=typeof ge=="function"?ge(Be.current):ge,zt=at.find(cn=>cn.id==="site");M(zt?zt.value||[]:[]),je(at.filter(cn=>cn.id!=="site"))},[M]),we=p.useRef({timer:null,toastId:null}),vt=p.useMemo(()=>gt==="database"?Object.keys(kt||{}):Array.from(b||[]),[gt,kt,b]),It=p.useMemo(()=>{if(vt.length===0)return[];const ge=new Set(vt);return(he||[]).filter(at=>ge.has(at.$id))},[vt,he]),fn=It.length>0,Ne=p.useMemo(()=>Array.from(new Set(It.map(ge=>ge.$team_id).filter(Boolean))),[It]),lt=Ne.length===1?Ne[0]:null,wt=Ne.length>1,Ke=()=>{gt==="database"?Lt({}):(E(new Set),y(!1))},St=()=>{gt==="database"?Lt({}):E(new Set)},ln=gt==="database",vr=p.useMemo(()=>Array.from(new Set((he||[]).map(ge=>ge.$team_id).filter(Boolean))),[he]),Yn=p.useMemo(()=>{if(ln||!v)return[];const ge=[{text:"Select all",onClick:Jt},{text:"Select none",onClick:In,disabled:b.size===0}];return vr.length>1&&ge.push({text:"Select all similar workspace bookmarks",divider:!0,disabled:!lt,onClick:()=>{lt&&E(new Set((he||[]).filter(at=>!at.is_collection&&at.$team_id===lt).map(at=>at.$id)))}}),ge},[ln,v,he,b.size,vr.length,lt]),[Cn,Hn]=p.useState(!1);p.useEffect(()=>{vt.length===0&&Cn&&Hn(!1)},[vt.length,Cn]);const Re=p.useMemo(()=>{if(!Cn)return he;const ge=new Set(vt);return(he||[]).filter(at=>ge.has(at.$id))},[Cn,he,vt]),ot=()=>{const ge=we.current;ge.timer&&clearTimeout(ge.timer),ge.toastId!==null&&Qr.dismiss(ge.toastId),we.current={timer:null,toastId:null}},jt=()=>{if(It.length===0)return;const ge=It.map(Mt=>({...Mt})),at=ge.map(Mt=>Mt.$id);ot(),Wte(at),St();const zt=async()=>{we.current={timer:null,toastId:null};try{const Mt=await jte(ge);Mt.fail>0&&re.dispatch("trigger-alert",{message:`Deleted ${Mt.ok} of ${ge.length}; ${Mt.fail} failed.`,intent:"warning"})}catch(Mt){re.dispatch("trigger-alert",{message:(Mt==null?void 0:Mt.message)||"Bulk delete failed.",intent:"danger"}),await n_(ge)}},cn=Qr(({closeToast:Mt})=>o.createElement("div",{className:"flex items-center justify-between gap-3"},o.createElement("span",null,"Deleted ",ge.length," ",ge.length===1?"bookmark":"bookmarks","."),o.createElement("button",{onClick:()=>{ot(),n_(ge),Mt==null||Mt()},className:"px-2 py-1 text-xs font-medium bg-white/10 hover:bg-white/20 rounded text-white"},"Undo")),{autoClose:1e4,closeOnClick:!1,draggable:!1,onClose:()=>{we.current.toastId===cn&&zt()}});we.current.toastId=cn},En=H4(),ar=EBe();p.useEffect(()=>{(r==null?void 0:r.type)==="edit-collection"?(Je.editCollection(r.dataSet),r.clear()):(r==null?void 0:r.type)==="delete-collection"&&(Je.deleteCollection(r.dataSet),r.clear())},[r]);const ye=()=>{fe(null),Se(null),W(!1)},qe=()=>{le("AddAsset"),fe(null),Se(null),W(!0),te(ge=>ge+1)},Me=e&&e!=="all"?e:((tn=tr==null?void 0:tr.activeTeam)==null?void 0:tn.id)||((sa=(ca=(br=Zt==null?void 0:Zt.globalMeta)==null?void 0:br.team
1953s)==null?void 0:ca[0])==null?void 0:sa.id)||null,Ve=Me&&((wr=(Gn=Zt==null?void 0:Zt.context)==null?void 0:Gn.team_projects_edit_team_map)==null?void 0:wr[Me]),Je={editCollection:ge=>{le("EditCollection"),fe(ge),Se(null),W(!0),te(q+1)},deleteCollection:ge=>{confirm(`Delete the collection "${ge.name}"?`)&&(re.dispatch("interstitial-run","on"),pt(fh,Ze("users-collection-manage-delete"))({collection:{$id:ge.$id}}).then(({data:at})=>{re.dispatch("redirect-to",Zc.defaults.loginRedirect),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`Successfully deleted the collection "${ge.name}".`,intent:"success"})}).catch(at=>{console.error("errorItem",at),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:at.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))}};let bt=async ge=>{const at=`https://bookmark.it.com/go/${ge.$id}`;try{const zt=await Vqe({url:at,title:ge.name});if(zt.aborted)return;re.dispatch("trigger-alert",{message:zt.method==="share"?`Shared shortlink for "${ge.name}".`:`Copied shortlink "${ge.name}" to clipboard.`,intent:"success"})}catch(zt){console.error("shareOrCopyUrl",zt),re.dispatch("trigger-alert",{message:"Could not copy or share the link.",intent:"danger"})}};const $e=({$id:ge,upcomingState:at})=>{let zt={};zt[ge]=at,Ct(cn=>({...cn,...zt}))},dt=ge=>o.createElement(De,{className:"starred_icon",variant:"minimal",icon:Tn[ge.$id]==="loading"?o.createElement(Hd,{size:10,className:"starred_interstitial"}):Tn[ge.$id]&&Tn[ge.$id]==="favorited-yes"||!Tn[ge.$id]&&ge.is_favorited?o.createElement(P3,{size:12,className:"starred_active"}):Tn[ge.$id]&&Tn[ge.$id]==="favorited-no"||!Tn[ge.$id]&&!ge.is_favorited?o.createElement(D3,{size:12,className:"starred_default"}):null,onClick:at=>{var zt;at.stopPropagation(),Tn[ge.$id]!=="loading"&&($e({$id:ge.$id,upcomingState:"loading"}),pt(fh,Ze("markfavorite-toggle"))({assetID:ge.$id}).then(({data:cn})=>{const Mt=cn.output.is_active;$e({$id:ge.$id,upcomingState:Mt?"favorited-yes":"favorited-no"}),re.dispatch("trigger-alert",{message:`Successfully ${Mt?"":"un"}starred the asset "${ge.name}".`,intent:"success"});const kr={...ge,is_favorited:Mt},Dr=["Assets-General-All"];c!=null&&c.tableID&&c.tableID!=="Assets-General-All"&&Dr.push(c.tableID),Dr.forEach(es=>{Qe.action.set({tableID:es,dataList:[kr],options:{skipClear:!0,preserveLocalDB:!0}})}),localStorage.removeItem("assetsGeneral-lastDownload"),u==null||u.action({type:"toggle-asset-favorite",dataSet:{$id:ge.$id,is_favorited:Mt}}),clearTimeout(uw),uw=setTimeout(()=>a({isSkipReload:!0}),dH)}).catch(cn=>{console.error("errorItem",cn),$e({$id:ge.$id,upcomingState:null}),re.dispatch("trigger-alert",{message:cn.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}),Jn.analyticsTrack({userId:(zt=Zt==null?void 0:Zt.user)==null?void 0:zt.uid,event:"Asset Table - Favorited - Click",codeName:"user-ui-assettable-action-button-favorited-click",properties:{team_id:ge.$team_id||e,asset_id:ge.$id,is_favorited_on_click:ge.is_favorited}}))}}),Rt=ge=>{var at,zt,cn,Mt,kr,Dr,es,cl,ko,Ti,So,Co,Bl,Ai;return o.createElement("ul",{className:"row-actions row-actions__menu"},(zt=(at=Zt==null?void 0:Zt.context)==null?void 0:at.team_projects_edit_team_map)!=null&&zt[ge.$team_id||e]?o.createElement("li",null,o.createElement(De,{icon:o.createElement(eu,{size:16}),text:"Edit bookmark",onClick:()=>{le("EditAsset"),fe(ge),Se(ge.active_iteration),W(!0),te(q+1)},className:Ho})):null,(Mt=(cn=Zt==null?void 0:Zt.context)==null?void 0:cn.team_projects_edit_team_map)!=null&&Mt[ge.$team_id||e]?sy(Zt,ge.$team_id||e)&&((Dr=(kr=Tr.organization.subscription.plan[Kp(Zt,ge.$team_id||e)])==null?void 0:kr.has)!=null&&Dr.collections)||Tr.organization.subscription.plan.free.has.collections?o.createElement("li",{className:"flex justify-between"},o.createElement(Hr,{minimal:!0,placement:"left",content:o.createElement(Pqe,{activeCollectionID:ge.$collection_id,assetID:ge.$id,teamID:ge.$team_id||e,meta:{teamName:ge.team_name?ge.team_name:(es=tr.activeTeam)!=null&&es.id?`${tr.activeTeam.name} (active)`:null},external:{action:({type:Ba=null,dataSet:Is={},callback:js=ta.noop})=>{Ba==="selected-collection"&&a({forceUpdate:!0})}}})},o.createElement(De,{icon:o.createElement(av,{size:16}),text:(t==null?void 0:t.type)==="collection"?"Change collection":ge.$collection_id?ge.collection_name:"Add to collection"}))):o.createElement("li",null,o.createElement(De,{icon:o.createElement(av,{size:16}),text:(t==null?void 0:t.type)==="collection"?"Change collection":ge.$collection_id?ge.collection_name:"Add to collection"},o.createElement(fr,{className:"!inline",compact:!1,usePortal:!1,disabled:!En,content:"Available with a subscription plan."},o.createElement("span",{className:"inline bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subcription"))))):null,!l.iterations&&((ko=(cl=Zt==null?void 0:Zt.context)==null?void 0:cl.team_projects_edit_team_map)!=null&&ko[ge.$team_id||e])?vc(Zt)?sy(Zt,ge.$team_id||e)&&((So=(Ti=Tr.organization.subscription.plan[Kp(Zt,ge.$team_id||e)])==null?void 0:Ti.has)!=null&&So.iterations)?o.
1953createElement("li",null,o.createElement(De,{icon:o.createElement(zs,{size:16}),text:"Add version",onClick:()=>{le("AddIteration"),fe(ge),Se(null),W(!0),te(q+1),en(!0)},className:Ho})):o.createElement("li",null,o.createElement(De,{icon:o.createElement(zs,{size:16}),text:"Add version"},o.createElement(fr,{className:"!inline",compact:!1,usePortal:!1,disabled:!En,content:"Available with a subscription plan."},(()=>{var js,ui,no,mr;const Ba=(ui=(js=Zt==null?void 0:Zt.globalMeta)==null?void 0:js.teams)==null?void 0:ui.find(ja=>ja.id===(ge.$team_id||e)),Is=((no=Ba==null?void 0:Ba.organization)==null?void 0:no.$id)||((mr=Ba==null?void 0:Ba.organization)==null?void 0:mr.id);return Is?o.createElement(ci,{className:"inline bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text !no-underline",to:Pn("/organization/:organizationID/subscribe",{organizationID:Is})},o.createElement("span",{className:"inline bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription")):o.createElement("span",{className:"inline bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text"},o.createElement("span",{className:"inline bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription"))})()))):o.createElement("li",null,o.createElement(De,{icon:o.createElement(zs,{size:16}),text:"Add version",className:"bp6-skeleton"})):null,o.createElement("li",null,o.createElement(De,{variant:"minimal",className:`flex ${Ho}`,onClick:()=>nt(ge.$id)},o.createElement("span",{className:"flex gap-1 items-center"},o.createElement(Ft,{icon:o.createElement(sL,{size:16,className:"mr-1"})}),o.createElement("span",null,"Version"),o.createElement("span",{className:"hd"}," History"),s!=null&&s.isMinorLoading?null:o.createElement("span",null,"(",ge.iteration_count,")")))),((Co=ge.active_iteration)==null?void 0:Co.type)==="url"?o.createElement("li",null,o.createElement(De,{onClick:()=>bt(ge),className:Ho,icon:o.createElement(Wm,{size:16}),text:"Copy share link"})):null,o.createElement("li",null,o.createElement(De,{className:"flex gap-.5",variant:"minimal",text:Tn[ge.$id]==="loading"?o.createElement(Hd,{size:10,className:"starred_interstitial"}):Tn[ge.$id]&&Tn[ge.$id]==="favorited-yes"||!Tn[ge.$id]&&ge.is_favorited?o.createElement("span",null,"Unstar bookmark"):Tn[ge.$id]&&Tn[ge.$id]==="favorited-no"||!Tn[ge.$id]&&!ge.is_favorited?o.createElement("span",null,"Star bookmark"):null,icon:Tn[ge.$id]==="loading"?o.createElement(Hd,{size:10,className:"starred_interstitial"}):Tn[ge.$id]&&Tn[ge.$id]==="favorited-yes"||!Tn[ge.$id]&&ge.is_favorited?o.createElement(P3,{size:16,className:"starred_active"}):Tn[ge.$id]&&Tn[ge.$id]==="favorited-no"||!Tn[ge.$id]&&!ge.is_favorited?o.createElement(D3,{size:16,className:"starred_default"}):null,onClick:()=>{Tn[ge.$id]!=="loading"&&($e({$id:ge.$id,upcomingState:"loading"}),pt(fh,Ze("markfavorite-toggle"))({assetID:ge.$id}).then(({data:Ba})=>{const Is=Ba.output.is_active;$e({$id:ge.$id,upcomingState:Is?"favorited-yes":"favorited-no"}),re.dispatch("trigger-alert",{message:`Successfully ${Is?"":"un"}starred the asset "${ge.name}".`,intent:"success"});const js={...ge,is_favorited:Is},ui=["Assets-General-All"];c!=null&&c.tableID&&c.tableID!=="Assets-General-All"&&ui.push(c.tableID),ui.forEach(no=>{Qe.action.set({tableID:no,dataList:[js],options:{skipClear:!0,preserveLocalDB:!0}})}),localStorage.removeItem("assetsGeneral-lastDownload"),u==null||u.action({type:"toggle-asset-favorite",dataSet:{$id:ge.$id,is_favorited:Is}}),clearTimeout(uw),uw=setTimeout(()=>a({isSkipReload:!0}),dH)}).catch(Ba=>{console.error("errorItem",Ba),$e({$id:ge.$id,upcomingState:null}),re.dispatch("trigger-alert",{message:Ba.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))}})),(Ai=(Bl=Zt==null?void 0:Zt.context)==null?void 0:Bl.team_projects_delete_team_map)!=null&&Ai[ge.$team_id||e]?o.createElement("li",null,o.createElement(De,{onClick:()=>{ea.ping(Ze("users-asset-manage-delete")),ut(ge),Qn(!0)},className:Ho,icon:o.createElement(Cx,{size:16}),text:"Delete"})):null,["dev","qa"].includes("production")?o.createElement("li",{className:"hd"},o.createElement("ul",{className:" w-full flex flex-col gap-1"},o.createElement("li",{className:"py-1"},o.createElement("hr",null)),o.createElement("li",null,o.createElement(De,{icon:o.createElement(XW,{size:16})},o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Base_Assets/${ge.$id}/Sub_Iterations/${ge.active_iteration.$id}`,target:"_blank",rel:"noreferrer"},"View Firestore Record"))),o.createElement("li",null,o.createElement(De,{icon:o.createElement(CG,{size:16}),onClick:()=>{var Is;const Ba=(Is=ge.active_iteration)==null?void 0:Is.auto_preview_thumbnail;if(Ba){const js=Ba.split("/").pop();navigator.clipboard.writeText(js)}else console.warn("No thumbnail path available to copy.")}},"Copy Image Name")),o.createElement("li",{className:"ml-2 mt-1"},o.createElement("div",null,o.createElement("p",{className:"flex gap-1"},o.createElement(Ft,{icon:o.createElement(bG,{size:16,className:"mr-1"})}),o.createElement("span",null,"Icon Type"),o.createElement(li,{variant:"minimal",className:"dark__text"},ge.active_iteration.favicon_type)),o.createElement("p",{className:"ml-6 mb
1953-2"},"w=whitelist, d=google favicon=api"))))):null)},Vt=(ge,at={})=>{var zt,cn;if(u==null||u.action({type:"open-asset-url",dataSet:{assetType:ge.type,displayFormat:(zt=ge==null?void 0:ge.active_iteration)==null?void 0:zt.display_format}}),!hn[ge.$id]){let Mt={...hn};Mt[ge.$id]=!0,rt(Mt),pt(fh,Ze("users-asset-url-go"))({assetID:ge.$id}).catch(kr=>console.error("# users-asset-url-go: Unsuccessful run #",kr))}if(!at.preventNavigation)if(((cn=ge==null?void 0:ge.active_iteration)==null?void 0:cn.display_format)==="inline")Kt(ge.active_iteration.url),xt(ge),ir(!0);else if("__TAURI_INTERNALS__"in window){const Mt=document.createElement("a");Mt.href=ge.active_iteration.url,Mt.target="_blank",document.body.appendChild(Mt),Mt.click(),document.body.removeChild(Mt)}else window.open(ge.active_iteration.url,"_blank")},Wt=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window||window.location.search.includes("tauri=true")||window.location.search.includes("tauri-menubar=true")),On=()=>o.createElement(xi.Group,{align:"left",className:"w-full flex items-center justify-between pr-4"},o.createElement("div",{className:"flex items-center gap-2"},o.createElement("div",{className:"view-toggle flex items-center gap-4 sm:gap-1"},o.createElement(De,{variant:"minimal",icon:o.createElement(wZ,{size:20,strokeWidth:1}),active:gt==="grid-fixed-size",onClick:()=>B("grid-fixed-size"),title:"Fixed Size Grid",className:Wt?"dark__text":"max-sm:hidden dark__text"}),o.createElement(De,{variant:"minimal",icon:o.createElement(bZ,{size:20,strokeWidth:1}),active:gt==="grid",onClick:()=>B("grid"),title:"Card View",className:"dark__text"}),o.createElement(De,{variant:"minimal",icon:o.createElement(xZ,{size:20,strokeWidth:1}),active:gt==="list",onClick:()=>B("list"),title:"List View",className:"dark__text"}),o.createElement(De,{variant:"minimal",icon:o.createElement(dIe,{size:20,strokeWidth:1}),active:gt==="database",onClick:()=>B("database"),title:"Table view",className:"dark__text hd"})),v?null:o.createElement("div",{className:"flex items-center min-w-0"},o.createElement(_s.div,{initial:!1,animate:{width:ht?36:0,opacity:ht?1:0},transition:We,className:"overflow-hidden shrink-0",style:{pointerEvents:ht?"auto":"none"},"aria-hidden":!ht},o.createElement("div",{className:"w-9 shrink-0 flex items-center justify-center"},o.createElement(Hr,{interactionKind:Ka.CLICK,placement:"bottom-end",content:o.createElement(Cr,null,o.createElement(Bt,{text:"Bulk edit",onClick:()=>{ea.ping(Ze("users-asset-manage-deleteBulk")),y(!0)}}),o.createElement(Zi,null),o.createElement("li",{className:""},o.createElement("div",{className:"flex items-center justify-between px-2 py-2 w-full hide-thumbnail-toggle","data-testid":"hide-thumbnail-toggle"},o.createElement("label",{htmlFor:"hide-thumbnail-switch-menu",className:"text-sm text-gray-900 dark__text cursor-pointer !mb-0 whitespace-nowrap"},"Thumbnail"),o.createElement(ds,{id:"hide-thumbnail-switch-menu",checked:U,onChange:ge=>{var at;$(ge.target.checked),Jn.analyticsTrack({userId:(at=Zt==null?void 0:Zt.user)==null?void 0:at.uid,event:"Asset Table - Hide Thumbnail Toggle - Click",codeName:"user-ui-assettable-action-toggle-hidethumbnail-click",properties:{hideThumbnail:ge.target.checked}})},innerLabel:"On",innerLabelChecked:"Off",className:"!mb-0 ml-4 shrink-0",style:{marginBottom:0,fontSize:"0.7em"}}))))},o.createElement(De,{variant:"minimal",size:"medium",className:"text-gray-700 font-light hover:text-gray-800 dark__text",icon:o.createElement(hb,{size:18,strokeWidth:1}),title:"Manage","aria-label":"Manage"})))),o.createElement(o.Fragment,null,o.createElement("div",{className:"hd w-px h-5 bg-gray-200 dark:bg-gray-700 mx-1 shrink-0 self-center"}),o.createElement("div",{className:"flex items-center gap-2 hd min-w-0"},A&&O.length>0&&o.createElement(sp,{label:"Site",icon:o.createElement(Jc,{size:16,strokeWidth:1.5}),value:T,onChange:ge=>M(ge||[]),renderMenu:(ge,at)=>o.createElement(V4,{tree:O,value:ge,onChange:at}),labelForToken:ge=>Qte(ge,O)}),o.createElement(sp,{label:"Collection",icon:o.createElement(av,{size:16,strokeWidth:1.5}),value:S,onChange:ge=>k(ge||[]),renderMenu:(ge,at)=>o.createElement(og,{options:w,value:ge,onChange:at,emptyText:"No collections"}),labelForToken:ge=>r_(ge,w)}),o.createElement(sp,{label:"Tags",icon:o.createElement(Gm,{size:16,strokeWidth:1.5}),value:N,onChange:ge=>C(ge||[]),renderMenu:(ge,at)=>o.createElement(og,{options:x,value:ge,onChange:at,emptyText:"No tags",pinnedValues:[ap]}),labelForToken:ge=>r_(ge,x)}))))));return o.createElement(qte,null,o.createElement("div",null,(t==null?void 0:t.type)==="collection"?o.createElement("div",null,o.createElement(xi,{className:"sort-filter-nav"},o.createElement(On,null)),o.createElement(xi,{className:"sort-filter-nav sort-filter-nav__active"},o.createElement(xi.Group,{align:"left",className:"mr-8"},o.createElement(li,{variant:"minimal",size:"large",className:"collection-badge"},t.data.name)))):(t==null?void 0:t.type)==="tags"?(Er=t==null?void 0:t.additionalComponents)!=null&&Er.header?o.createElement(t.additionalComponents.header,{SortableBar:On}):null:i.refreshButton||i.sortable?o.createElement(o.Fragment,null,o.createElement("div",{ref:Ae}),o.createElement("div",{className:`bookmarks-list-toolbar flex items-center justify-between sticky top-0 z-20 transition-shadow duration-200 ${ue?"shadow-sm":""}${ue&>!=="list"?" bookmarks-list-toolbar--sticky-bg":""}${Y}${gt==="list"?" view-mode__list":""}`},v||fn?o.createElement("div",{className:"ml-10 sm:ml-0 w-full h-[50px]"},o.createElement(nne,{selectedAssets:It,workspaceTeamID:lt,disableCollectionTag:wt,onClearSelection:St,onRequestDelete:jt,selectMenuItems:Yn,onDone:ln?void 0:Ke,selectedFilterActive:Cn,onToggleSelectedFilter:ln?void 0:()=>Hn(ge=>!ge)})):o.createElement("div",{className:"flex w-full ml-12 sm:ml-0 justify-between items-center"},i.sortable?o.createElement(On,null):o.createElement("div",null),i.refreshButton?o.createElement("div",{className:"flex items-center sync-button"},o.createElement("div",{className:"flex items-center"},(Nr=t==null?void 0:t.data)!=null&&Nr.lastDownloadTime||s!=null&&s.lastDownloadTime?o.createElement(o.Fragment,null,o.createElement("span",{className:"text-xs text-gray-400 mr-1 hd"},"Synced"),o.createElement("span",{className:"text-xs text-gray-500 font-medium whitespace-nowrap mr-1"},Ht.unix(((Wr=t==null?void 0:t.data)==null?void 0:Wr.lastDownloadTime)||(s==null?void 0:s.lastDownloadTime)).format("h:mm A"))):null,o.createElement(fr,{compact:!0,usePortal:!1,disabled:!En,content:"Sync now",placement:"bottom-end"},o.createElement(De,{className:"w-8 h-8",variant:"minimal","aria-busy":!!(s!=null&&s.isMinorLoading),onClick:()=>{var ge;s!=null&&s.isMinorLoading||(a({forceUpdate:!0}),Jn.analyticsTrack({userId:(ge=Zt==null?void 0:Zt.user)==null?void 0:ge.uid,event:"Asset Table - Refresh Table - Click",codeName:"user-ui-assettable-action-button-refreshtable-click"}))}},o.createElement(Ft,{icon:o.createElement(oL,{size:16,strokeWidth:1.5,className:`mr-1 text-gray-500 opacity-70 ${s!=null&&s.isMinorLoading?"animate-spin":""}`})}))))):null))):null,gt==="database"?o.createElement("div",{className:`flex-1 overflow-hidden min-h-0${it?` ${it}`:""}`,style:{height:"calc(100vh - 100px)"}},o.createElement(tne,{bookmarks:he.filter(ge=>!ge.is_collection),isLoading:!1,teamID:Me,sorting:_t,onSortingChange:vn,columnFilters:ne,onColumnFiltersChange:mt,rowSelection:kt,onRowSelectionChange:Lt,isMiddlebarOpen:L})):o.createElement(o.Fragment,null,o.createElement("div",{className:`bookmarks-display-canvas overflow-hidden${Y}${it?` ${it}`:""}`},gt==="grid"||gt==="grid-fixed-size"?o.createElement("div",{className:`asset-grid ${gt==="grid-fixed-size"?"asset-grid--fixed":""}`},Re.map(ge=>ge.is_collection?o.createElement(Uqe,{key:ge.$id,dataItem:ge,external:u,associatedTeamID:e,currentAuthData:Zt}
1953):o.createElement(Bqe,{key:ge.$id,dataItem:ge,isManageMode:v,handleToggleSelection:pn,selectedAssetIDs:b,handleOpenAsset:Vt,settings:c,renderFavoriteButton:dt,external:u,associatedTeamID:e,runCopyURL:bt,setTargetAsset_Iterations:nt,parentState:s,renderActionMenuContent:Rt,currentAuthData:Zt,activeDragItemID:g,prefersHoverInteraction:En,disableDrag:ar,hideThumbnail:U,siteFilterEnabled:A,onSiteFilterChange:M,onPreviewImage:(at,zt)=>{K(at),oe(zt)}})),Ve&&!Cn?o.createElement(jn,{className:"asset-card asset-card--add-bookmark",interactive:!0,elevation:qn.ZERO,onClick:qe},o.createElement("div",{className:"asset-card__image asset-card__image--add-bookmark"},o.createElement(zs,{size:32,strokeWidth:1.5})),o.createElement("div",{className:"asset-card__content"},o.createElement("div",{className:"asset-card__title asset-card__title--add-bookmark flex flex-col justify-center !gap-2"},o.createElement("span",null,"Add Bookmark"),o.createElement("span",{className:"text-xs text-gray-500"},"Or drag a website here.")))):null):o.createElement("table",{className:"asset-list__table w-full bp6-html-table bp6-compact it8-tablelist"},o.createElement("tbody",null,Re.map(ge=>ge.is_collection?o.createElement(jqe,{key:ge.$id,dataItem:ge,isManageMode:v}):o.createElement(Wqe,{key:ge.$id,dataItem:ge,isManageMode:v,selectedAssetIDs:b,handleToggleSelection:pn,renderFavoriteButton:dt,handleOpenAsset:Vt,external:u,associatedTeamID:e,currentAuthData:Zt,hideColumns:l,runCopyURL:bt,setTargetAsset_Iterations:nt,parentState:s,renderActionMenuContent:Rt,activeDragItemID:g,prefersHoverInteraction:En,disableDrag:ar,
1953siteFilterEnabled:A,onSiteFilterChange:M})),Ve&&!Cn?o.createElement("tr",{className:"asset-row--add-bookmark",onClick:qe,style:{cursor:"pointer"}},o.createElement("td",{colSpan:"100%"},o.createElement("div",{className:"flex items-center gap-2 py-1"},o.createElement(zs,{size:16,strokeWidth:1.5}),o.createElement("span",null,"Add Bookmark")))):null))),o.createElement("div",{className:"bounce"})),o.createElement(XZ,{targetAsset:me,targetIteration:ke,targetType:X,teamID:(me==null?void 0:me.$team_id)||Me,isDrawerOpen:pe,forceRefresh:q,handleSuccessfulSave:({actionType:ge,asset:at}={})=>{var zt;a({forceUpdate:!0,actionType:ge,asset:at}),ge==="add"&&(at!=null&&at.$team_id)&&!Fe.isAllWorkspaces&&((zt=Fe.activeTeam)!=null&&zt.id)&&at.$team_id!==Fe.activeTeam.id&&Fe.selectAllWorkspaces()},handleCloseDrawer:({targetAsset:ge,targetIteration:at,targetType:zt,teamID:cn})=>{ye(),en(!1)}}),o.createElement(Lqe,{assetID:Et,cancelAssetID:()=>{nt(null)},external:{action:({type:ge=null,dataSet:at={},callback:zt=ta.noop})=>{ge==="add"?(le("AddIteration"),fe(he.find(cn=>cn.$id===at.assetID)),Se(null),W(!0),te(q+1)):ge==="edit"?(le("EditIteration"),fe(he.find(cn=>cn.$id===at.assetID)),Se(at.iterationItem),W(!0),te(q+1),zt()):ge==="delete"?a({forceUpdate:!0}):ge==="refresh-table"&&a({forceUpdate:!0})}}}),o.createElement(tre,{url:et,asset:zn,dialogOpen:rr,dialogCloseExternal:()=>{ir(!1),Kt(null),xt(null)}}),o.createElement(xg,{className:"dark:bg-[#241d33] dark:text-[#f0e9f9]",cancelButtonText:"Cancel",confirmButtonText:"Delete",icon:o.createElement(Cx,{size:20}),intent:jr.DANGER,isOpen:_r,onCancel:or,onConfirm:Dn},o.createElement("p",null,v?o.createElement("span",{className:"dark__text"},"Confirm deletion of ",o.createElement("b",null,b.size),"."):o.createElement("span",{className:"dark__text"},'Are you sure you want to delete the asset "',o.createElement("b",null,Ce==null?void 0:Ce.name),'"?'))),o.createElement(ya,{isOpen:!!z,onClose:()=>{K(null),oe(null)},title:o.createElement("div",{className:"flex justify-between items-center w-full"},o.createElement("span",null,"Snapshot"),((Ca=ee==null?void 0:ee.active_iteration)==null?void 0:Ca.url)&&o.createElement("a",{href:ee.active_iteration.url,target:"_blank",rel:"noreferrer",className:"mr-2 text-sm font-bold"},"View bookmark")),style:{width:"auto",maxWidth:"90vw"},className:(Pr=c==null?void 0:c.featureFlags)!=null&&Pr.isDarkMode?Xr:""},o.createElement("div",{className:Fs},z&&o.createElement(nu,{storagePath:z,style:{width:"100%",height:"auto",display:"block"}})))))},rre=({iteration:e,siteFilterEnabled:t,onSiteFilterChange:n,prefersHoverInteraction:r})=>{const a=e!=null&&e.favicon_url?o.createElement("img",{src:e.favicon_url}):e!=null&&e.favicon?o.createElement(Cm,{storagePath:e.favicon}):null,s=e==null?void 0:e.site,i=t?F4(s):null;if(i&&n){const l=s.label||s.domain;return o.createElement("div",{className:"favicon-container"},o.createElement(fr,{content:`Filter to ${l}`,disabled:!r},o.createElement("button",{type:"button",onClick:c=>{c.preventDefault(),c.stopPropagation(),n([i])},"aria-label":`Filter to ${l}`,className:"inline-flex items-center justify-center p-0 m-0 bg-transparent border-0 cursor-pointer hover:opacity-60 transition-opacity"},a)))}return o.createElement("div",{className:"favicon-container"},a)},Uqe=o.memo(({dataItem:e,external:t,associatedTeamID:n,currentAuthData:r})=>{var l,c;const a=(((c=(l=r==null?void 0:r.globalMeta)==null?void 0:l.teams)==null?void 0:c.length)||0)>1,s=e.$team_id||(n!=="all"?n:null),i=a?is.getColor(s):void 0;return o.createElement(jn,{key:e.$id,className:"asset-card asset-card--collection",interactive:!0,elevation:qn.ZERO,onClick:()=>{t==null||t.action({type:"open-collection",dataSet:{$collection_id:e.$id,collection_name:e.name,$team_id:e.$team_id||n}})},style:{outline:"none"}},o.createElement("div",{className:"asset-card__image"},o.createElement(av,{size:40,className:"asset-card__image-placeholder"})),o.createElement("div",{className:"asset-card__content",style:{borderBottom:i?`1px solid ${i}`:void 0}},o.createElement("div",{className:"asset-card__title"},o.createElement("span",{className:"font-semibold text-base"},e.name)),o.createElement("div",{className:"asset-card__meta"},o.createElement(li,{variant:"minimal",className:"collection-badge"},"Collection"))))}),Bqe=o.memo(({dataItem:e,isManageMode:t,handleToggleSelection:n,selectedAssetIDs:r,handleOpenAsset:a,settings:s,renderFavoriteButton:i,external:l,associatedTeamID:c,runCopyURL:u,setTargetAsset_Iterations:d,parentState:f,renderActionMenuContent:m,currentAuthData:h,activeDragItemID:g,prefersHoverInteraction:v,disableDrag:y,hideThumbnail:b,onPreviewImage:E,siteFilterEnabled:w,onSiteFilterChange:x})=>{var L,D,j,H,Y;const{attributes:S,listeners:N,setNodeRef:k,isDragging:C}=k4({id:e.$id,data:{type:"asset",...e},disabled:y}),A={opacity:C?.4:1,outline:"none"},O=(((D=(L=h==null?void 0:h.globalMeta)==null?void 0:L.teams)==null?void 0:D.length)||0)>1,T=e.$team_id||(c!=="all"?c:null),M=O?is.getColor(T):void 0;return o.createElement(jn,{key:e.$id,ref:k,style:A,...S,...N,className:"asset-card",interactive:!0,elevation:qn.ZERO,onClick:()=>{t?n(e.$id,!r.has(e.$id)):a(e)}},!b&&o.createElement("div",{className:"asset-card__image"},Ht().diff(Ht(e.date_created*1e3),"days")<7?o.createElement("div",{className:`absolute z-10 ${t?"top-2 left-8":"top-2 left-2"}`},o.createElement(li,{variant:"minimal",className:"new-badge !bg-gray-200 !border-gray-200 !border !px-1"},o.createElement("span",{className:"capitalize text-gray-800"},"New"))):null,e.active_iteration.auto_preview_thumbnail?o.createElement("div",{className:"w-full h-full cursor-pointer",onClick:z=>{z.stopPropagation(),a(e,{preventNavigation:!0}),E&&E(e.active_iteration.auto_preview_thumbnail,e)}},o.createElement(nu,{storagePath:e.active_iteration.auto_preview_thumbnail})):o.createElement("div",{className:"asset-card__image-placeholder-wrapper"},((j=s==null?void 0:s.featureFlags)!=null&&j.screenshot_api_enabled||(H=s==null?void 0:s.featureFlags)!=null&&H.thumbnail_migration_enabled)&&Ht().diff(Ht(e.date_created*1e3),"minutes")<2&&e.date_modified===e.date_created?o.createElement("div",{className:"flex items-center justify-center w-full h-full bg-gray-50 flex gap-1 flex-col"},o.createElement("span",{className:"text-xs text-gray-400"},"Generating"),o.createElement("span",{className:"text-xs text-gray-400"},"Thumbnail")):o.createElement(Ft,{icon:"document",size:40,className:"asset-card__image-placeholder"})),t&&o.createElement("div",{className:"absolute top-2 left-2 z-10 pointer-events-auto",onClick:z=>z.stopPropagation()},o.createElement("input",{type:"checkbox",checked:r.has(e.$id),onChange:z=>n(e.$id,z.target.checked),className:"cursor-pointer w-4 h-4 m-0",style:{display:"block"}}))),o.createElement("div",{className:`asset-card__content ${b?"asset-card__content--no-thumbn
1953ail":""}`,style:{borderBottom:M?`1px solid ${M}`:void 0}},o.createElement("div",{className:"asset-card__header"},o.createElement("div",{className:"asset-card__title"},o.createElement(rre,{iteration:e.active_iteration,siteFilterEnabled:w,onSiteFilterChange:x,prefersHoverInteraction:v}),o.createElement("a",{href:e.active_iteration.url,target:"_blank",rel:"noreferrer",onClick:z=>{if(z.stopPropagation(),"__TAURI_INTERNALS__"in window){z.preventDefault();const K=document.createElement("a");K.href=e.active_iteration.url,K.target="_blank",document.body.appendChild(K),K.click(),document.body.removeChild(K),a(e,{preventNavigation:!0})}else a(e,{preventNavigation:!0})}},e.name),e.heat_level&&e.heat_level!==1?o.createElement(Ft,{icon:o.createElement(iL,{size:14,className:`fire heat-${e.heat_level}`})}):null),o.createElement("div",{className:"asset-card__badges",onClick:z=>z.stopPropagation()},i(e))),o.createElement("div",{className:"asset-card__meta"},e.collection_name&&o.createElement(li,{variant:"minimal",className:"collection-badge cursor-pointer hover:opacity-80",onClick:z=>{var K;z.stopPropagation(),(K=l==null?void 0:l.action)==null||K.call(l,{type:"open-collection",dataSet:{$collection_id:e.$collection_id,collection_name:e.collection_name,$team_id:e.$team_id}})}},e.collection_name),(Y=e.tags)==null?void 0:Y.map(z=>o.createElement(li,{key:z.$id,variant:"minimal",className:"tags-badge cursor-pointer hover:opacity-80",onClick:K=>{var ee;K.stopPropagation(),(ee=l==null?void 0:l.action)==null||ee.call(l,{type:"open-tag",dataSet:{tagItem:z}})}},z.name))),o.createElement("div",{className:"asset-card__actions",onClick:z=>z.stopPropagation()},o.createElement("div",{className:"action-group"},o.createElement(fr,{content:"Copy share link",disabled:!v},o.createElement(De,{variant:"minimal",icon:o.createElement(Wm,{size:14}),className:"dark__text",onClick:()=>u(e)})),o.createElement(fr,{content:"Version history",disabled:!v},o.createElement(De,{variant:"minimal",icon:o.createElement(sL,{size:14}),className:"dark__text",onClick:()=>d(e.$id)},f!=null&&f.isMinorLoading?null:e.iteration_count))),o.createElement(Hr,{minimal:!0,placement:"bottom-end",content:m(e)},o.createElement(De,{variant:"minimal",className:"dark__text",icon:o.createElement(Pg,{size:16,onClick:()=>{var z;return Jn.analyticsTrack({userId:(z=h==null?void 0:h.user)==null?void 0:z.uid,event:"Asset Table - Action Menu - Click",codeName:"user-ui-assettable-action-button-actionmenu-click",properties:{team_id:e.$team_id||c,asset_id:e.$id}})}})})))))}),jqe=o.memo(({dataItem:e,isManageMode:t})=>o.createElement("tr",{key:e.$id},t?o.createElement("td",{className:"cell"}):null,o.createElement("td",{className:"cell collection-parent",colSpan:3},o.createElement("div",{className:"cell-content flex gap-2 ml-.5"},o.createElement(av,{size:16,className:"text-gray-300"}),o.createElement(ci,{to:`/collection/${e.$id}`},e.name),["dev","qa"].includes("production")?o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Label_Collections/${e.$id}`,target:"_blank",rel:"noreferrer",className:"dark__text ml-2"},"[FS]"):null)))),Wqe=o.memo(({dataItem:e,isManageMode:t,selectedAssetIDs:n,handleToggleSelection:r,renderFavoriteButton:a,handleOpenAsset:s,external:i,associatedTeamID:l,currentAuthData:c,hideColumns:u,runCopyURL:d,setTargetAsset_Iterations:f,parentState:m,renderActionMenuContent:h,activeDragItemID:g,prefersHoverInteraction:v,disableDrag:y,siteFilterEnabled:b,onSiteFilterChange:E})=>{var T,M,L,D,j,H,Y,z,K,ee,oe,J,se,B,U,$,ce,be,ue,Ie,Ae;const{attributes:w,listeners:x,setNodeRef:S,isDragging:N}=k4({id:e.$id,data:{type:"asset",...e},disabled:y}),k=(((M=(T=c==null?void 0:c.globalMeta)==null?void 0:T.teams)==null?void 0:M.length)||0)>1,C=e.$team_id||(l!=="all"?l:null),A=k?is.getColor(C):void 0,O={opacity:N?.4:1,borderLeft:A?`1px solid ${A}`:void 0,outline:"none",boxShadow:"none"};return o.createElement("tr",{key:e.$id,ref:S,style:O,...w,...x},o.createElement("td",{className:"cell xs:max-w-[240px] sm:max-w-[320px] md:max-w-[480px] lg:max-w-[640px] xl:max-w-[720px]"},o.createElement("div",{className:"flex gap-1"},t?o.createElement(ef,{checked:n.has(e.$id),onChange:he=>r(e.$id,he.target.checked),className:"!mb-0 flex items-center"}):null,!t&&a(e),o.createElement("div",{className:"cell-content",onClick:()=>{t?r(e.$id,!n.has(e.$id)):s(e)}},o.createElement(rre,{iteration:e.active_iteration,siteFilterEnabled:b,onSiteFilterChange:E,prefersHoverInteraction:v}),o.createElement("div",{className:"flex dark__text cursor-pointer"},o.createElement("a",{href:e.active_iteration.url,target:"_blank",rel:"noreferrer",className:"container xs:max-w-[180px] sm:max-w-[300px] md:max-w-[480px] lg:max-w-[640px] xl:max-w-[9
195360px] text-ellipsis overflow-hidden whitespace-nowrap !text-gray-900 dark:!text-gray-100 no-underline hover:!no-underline dark:hover:!text-fuchsia-500",onClick:he=>{if(he.stopPropagation(),"__TAURI_INTERNALS__"in window){he.preventDefault();const _e=document.createElement("a");_e.href=e.active_iteration.url,_e.target="_blank",document.body.appendChild(_e),_e.click(),document.body.removeChild(_e),s(e,{preventNavigation:!0})}else s(e,{preventNavigation:!0})}},e.name)),e.heat_level?o.createElement("div",{className:`popular-container ${e.heat_level===1?"hidden":""}`},o.createElement(Ft,{icon:o.createElement(iL,{size:16,className:`fire${e.heat_level?` heat-${e.heat_level}`:null}`})})):null,Ht().diff(Ht(e.date_created*1e3),"days")<7?o.createElement(li,{minimal:!0,className:"hd new-badge !ml-1 !my-0 text-xs !px-1"},"New"):null))),o.createElement("td",{className:"cell collection-n-tags"},o.createElement("div",{className:"hd flex flex-wrap justify-end container xs:max-w-[160px] sm:max-w-[320px] md:max-w-[480px] lg:max-w-[640px] xl:max-w-[780px]"},!u.collections&&e.collection_name?o.createElement(fr,{compact:!0,usePortal:!1,disabled:!v,content:"View collection bookmarks"},o.createElement("a",{onClick:()=>{var he;i==null||i.action({type:"open-collection",dataSet:{$collection_id:e.$collection_id,collection_name:e.collection_name,$team_id:e.$team_id||l}}),Jn.analyticsTrack({userId:(he=c==null?void 0:c.user)==null?void 0:he.uid,event:"Asset Table - Collection (Label) - Click",codeName:"user-ui-assettable-action-button-collection_label-click",properties:{team_id:e.$team_id||l,asset_id:e.$id,collection_id:e.$collection_id,collection_name:e.collection_name}})}},o.createElement(li,{variant:"minimal",className:"collection-badge"},e.collection_name))):null,(L=e==null?void 0:e.tags)==null?void 0:L.map(he=>o.createElement("a",{key:he.$id,onClick:()=>{var _e;i==null||i.action({type:"open-tag",dataSet:{tagItem:he,$team_id:e.$team_id||l}}),Jn.analyticsTrack({userId:(_e=c==null?void 0:c.user)==null?void 0:_e.uid,event:"Asset Table - Tag (Label) - Click",codeName:"user-ui-assettable-action-button-tag_label-click",properties:{team_id:e.$team_id||l,asset_id:e.$id,tag_id:he.$id,tag_name:he.name}})}},o.createElement(li,{minimal:!0,className:"tags-badge"},he.name))),null,null)),o.createElement("td",{className:"cell actions"},o.createElement("div",{className:"flex justify-end"},o.createElement("div",{className:"flex justify-between w-full"},e.active_iteration.auto_preview_thumbnail?o.createElement("div",{className:"hd"},o.createElement("div",{className:"cell-content"},o.createElement(Hr,{enforceFocus:!1,placement:"top-end",interactionKind:v?Ka.HOVER:Ka.CLICK,content:o.createElement("div",null,o.createElement("p",null,o.createElement(nu,{storagePath:e.active_iteration.auto_preview_thumbnail})))},o.createElement(Ft,{icon:o.createElement(CG,{size:16,className:"FBStorageImage_icon dark__text"})})))):null,e.team_name&&((j=(D=c.globalMeta)==null?void 0:D.teams)==null?void 0:j.length)>1?o.createElement("div",{className:"asset-meta cell-content flex justify-end w-full xs:mr-2"},o.createElement(Hr,{autoFocus:!1,canEscapeKeyClose:"true",placement:"right",interactionKind:v?Ka.HOVER:Ka.CLICK,content:o.createElement("div",{className:"popover-asset-meta"},o.createElement("div",{className:"flex justify-between"},o.createElement("label",{className:"mr-2 whitespace-nowrap"},"Workspace"),o.createElement("span",null,e.team_name)),o.createElement("div",{className:"flex justify-between"},o.createElement("label",{className:"mr-2 whitespace-nowrap"},"Added by"),o.createElement("span",null,(Y=(H=e.from_member)==null?void 0:H.created)==null?void 0:Y.name)),e.date_modified?o.createElement("div",{className:"flex justify-between"},o.createElement("label",{className:"mr-2 whitespace-nowrap"},"Created"),o.createElement("span",null,Ht(e.date_modified*1e3).format("MM/DD/YY"))):null,(K=(z=e.from_member)==null?void 0:z.modified)!=null&&K.$id?o.createElement("div",{className:"flex justify-between"},o.createElement("label",{className:"mr-2 whitespace-nowrap"},"Modified"),o.createElement("span",null,(oe=(ee=e.from_member)==null?void 0:ee.modified)==null?void 0:oe.name)):null,o.createElement("div",{style:{border:"1px dashed #bbb",padding:".5em",marginTop:".5em"}},o.createElement("div",{className:"flex gap-1 justify-between"},o.createElement("label",{className:"whitespace-nowrap"},"Views (Total)"),o.createElement("span",null,(J=e.view_count)==null?void 0:J.total),["dev","qa"].includes("production")?o.createElement("span",{className:"flex gap-1"},o.createElement("span",null,"[DEV:"),o.createElement("span",{className:"text-right"},(se=e==null?void 0:e.$DEV_view_score)==null?void 0:se.total,"]")):null),o.createElement("div",null,o.createElement("ul",null,o.createElement("li",{className:"flex gap-1 justify-between"},o.createElement("label",{className:"whitespace-nowrap"},"Past 3 Months"),o.createElement("span",{className:"text-right"},(U=(B=e.view_count)==null?void 0:B.range)==null?void 0:U.past3months),["dev","qa"].includes("production")?o.createElement("span",{className:"flex gap-1"},o.createElement("span",null,"[DEV:"),o.createElement("span",null,(ce=($=e==null?void 0:e.$DEV_view_score)==null?void 0:$.range)==null?void 0:ce.past3months,"]")):null),o.createElement("li",{className:"flex gap-1 justify-between"},o.createElement("label",{className:"whitespace-nowrap"},"Past 1 Month"),o.createElement("span",{className:"text-right"},(ue=(be=e.view_count)==null?void 0:be.range)==null?void 0:ue.past1month),["dev","qa"].includes("production")?o.createElement("span",{className:"flex gap-1"},o.createElement("span",null,"[DEV:"),o.createElement("span",null,(Ae=(Ie=e==null?void 0:e.$DEV_view_score)==null?void 0:Ie.range)==null?void 0:Ae.past1month,"]")):null)))))},o.createElement("span",{className:"whitespace-nowrap"},(he=>he.split(" ").map(_e=>_e[0]).join("").substring(0,10))(e.team_name)))):null),o.createElement("div",{className:"hd flex"},o.createElement(fr,{compact:!0,usePortal:!1,disabled:!v,content:"Copy share link to send to embed into documents or send to people."},o.createElement(De,{variant:"minimal",icon:o.createElement(Wm,{size:14}),className:"whitespace-nowrap dark__text",onClick:()=>d(e)})),u.iterations?null:o.createElement(fr,{compact:!0,usePortal:!1,disabled:!v,content:"Version history"},o.createElement(De,{variant:"minimal",icon:o.createElement(sL,{size:14}
1953),className:"whitespace-nowrap px-1 text-xs dark__text",onClick:()=>f(e.$id)},m!=null&&m.isMinorLoading?null:e.iteration_count))),o.createElement(Hr,{minimal:!0,placement:"bottom-start",content:h(e)},o.createElement("div",null,o.createElement(De,{variant:"minimal",className:"dark__text",icon:o.createElement(Pg,{size:16,onClick:()=>{var he;return Jn.analyticsTrack({userId:(he=c==null?void 0:c.user)==null?void 0:he.uid,event:"Asset Table - Action Menu - Click",codeName:"user-ui-assettable-action-button-actionmenu-click",properties:{team_id:e.$team_id||l,asset_id:e.$id}})}})}))))))}),fH="text-gray-500 dark:text-gray-400",pM=(e,t,n,r=[])=>{if(n)return e.is_personal?o.createElement(jd,{size:t,strokeWidth:1.5,className:fH}):o.createElement(uc,{size:t,strokeWidth:1.5,className:fH});const a=is.getColor(e.id,r);return e.is_personal?o.createElement(jd,{size:t,color:a,strokeWidth:1.75}):o.createElement(uc,{size:t,color:a})},are=(e,t="")=>`text-xs sm:text-sm flex items-center dark:text-gray-300 text-ellipsis overflow-hidden whitespace-nowrap ${e?"dark:!text-white sidebar-item__active":""}${t?` ${t}`:""}`,Gqe=o.memo(({dataItem:e,displayName:t,labelSuffix:n,isHovered:r,isMenuOpen:a,isActive:s,iconSize:i,hasMultipleWorkspaces:l,workspaces:c,handleWorkspaceMouseEnter:u,handleWorkspaceMouseLeave:d,setMenuOpenWorkspaceId:f,setHoveredWorkspaceId:m,handleEditWorkspaceClick:h,onSelect:g})=>{const v=r||a,y=l&&s;return o.createElement("div",{onMouseEnter:()=>u(e.id),onMouseLeave:d,className:`sidebar-item ${y?"sidebar-item__active":""} ${r?"sidebar-item__hover":""}`},o.createElement(Bt,{className:are(y,v?"relative !pl-0":"relative"),icon:v?o.createElement(Hr,{interactionKind:"click",placement:"bottom-start",isOpen:a,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:b=>{b||f(null)},content:o.createElement(Cr,null,o.createElement(Bt,{icon:"cog",text:"Manage Workspace",onClick:b=>{b.stopPropagation(),h(e)}}))},o.createElement("div",{className:"sidebar-item__menu-trigger cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 min-h-[44px] min-w-[44px] sm:min-h-0 sm:min-w-0 flex items-center justify-center box-border",onClick:b=>{b.stopPropagation(),b.preventDefault(),a?f(null):(f(e.id),m(e.id))}},o.createElement(Ft,{icon:"more",size:i,className:"text-gray-500 dark:text-gray-400"}))):pM(e,i,!l,c),text:`${t}${n||""}`,active:y,onClick:()=>g(e)}))}),qqe=({showAllOption:e=!0,isMemberOfCurrentTeam:t=!0,confirmNavigation:n,onBeforeChange:r,context:a,popoverPlacement:s="bottom-start",triggerClassName:i="",iconSize:l=16,flat:c=!1})=>{const u=yr(),{selectWorkspace:d,selectAllWorkspaces:f,isAllWorksp
1953aces:m,activeTeam:h,workspaces:g}=aS({onChange:r}),[v,y]=p.useState(null),[b,E]=p.useState(null),w=p.useRef(null),x=p.useCallback(L=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{y(L)},500)},[]),S=p.useCallback(()=>{w.current&&clearTimeout(w.current),y(null)},[]);if(!g||g.length<1)return null;const N=e&&g.length>1,k=g.length>1,C=L=>{typeof n=="function"?n(L):L()},A=[...g].sort((L,D)=>L.is_personal&&!D.is_personal?-1:!L.is_personal&&D.is_personal?1:(L.name||"").localeCompare(D.name||"")),O=g.find(L=>L.id===(h==null?void 0:h.id))||h,T=L=>{E(null),C(()=>{d(L,{navigate:!1}),u({pathname:Pn("/workspace/:teamID/manage",{teamID:L.id})})})},M=L=>{var Y;const D=(Y=a==null?void 0:a.team_manage_owner_map)==null?void 0:Y[L.id],j=L.is_personal?" (Private)":D&&k?" (Owner)":"",H=k&&!m&&(h==null?void 0:h.id)===L.id;return c?o.createElement(Gqe,{key:L.id,dataItem:L,displayName:jo(L),labelSuffix:j,isHovered:v===L.id,isMenuOpen:b===L.id,isActive:H,iconSize:l,hasMultipleWorkspaces:k,workspaces:g,handleWorkspaceMouseEnter:x,handleWorkspaceMouseLeave:S,setMenuOpenWorkspaceId:E,setHoveredWorkspaceId:y,handleEditWorkspaceClick:T,onSelect:z=>C(()=>d(z))}):o.createElement(Bt,{key:L.id,onClick:()=>C(()=>d(L)),icon:pM(L,16,!k,g),active:H,className:are(H),text:`${jo(L)}${j}`})};return c?o.createElement(Cr,{className:"!bg-transparent !p-0"},N?o.createElement(Bt,{onClick:()=>C(()=>f()),icon:o.createElement(Jc,{size:l}),active:m,className:`text-xs sm:text-sm flex items-center ${m?"dark:!text-white sidebar-item__active":""}`,text:"All Workspaces"}):null,A.map(L=>M(L))):o.createElement(Hr,{minimal:!0,placement:s,className:"whitespace-nowrap",portalClassName:"z-[70]",content:o.createElement(Cr,{className:"row-actions row-actions__menu"},N?o.createElement(Bt,{onClick:()=>C(()=>f()),icon:o.createElement(Jc,{size:16}),className:m?"active":"",text:"All Workspaces"}):null,A.map(L=>{var Y;const D=(Y=a==null?void 0:a.team_manage_owner_map)==null?void 0:Y[L.id],j=L.is_personal?" (Private)":D&&k?" (Owner)":"",H=k&&!m&&(h==null?void 0:h.id)===L.id;return o.createElement(Bt,{key:L.id,onClick:()=>C(()=>d(L)),icon:pM(L,16,!k,g),className:`container xs:max-w-[300px] sm:max-w-[800px] text-ellipsis overflow-hidden whitespace-nowrap ${H?"active":""}`,text:`${jo(L)}${j}`})}))},o.createElement(De,{variant:"minimal",endIcon:o.createElement(eS,{size:16}),className:`team-carret !px-2 ${i}`},o.createElement("span",{className:"flex"},m?o.createElement("span",null,"All Workspaces"):o.createElement("span",{style:{opacity:t?1:.5},className:"xs:max-w-[115px] sm:max-w-[200px] md:max-w-[300px] lg:max-w-[400px] xl:max-w-[500px] text-ellipsis overflow-hidden whitespace-nowrap"},t?o.createElement("span",null,jo(O)):o.createElement("span",null,"Workspace not found")))))},mH=1280,hH=e=>{const t=e.currentTarget;if(t.scrollHeight<=t.clientHeight+1){e.preventDefault();return}const n=e.deltaY,r=t.scrollTop<=0,a=t.scrollTop+t.clientHeight>=t.scrollHeight-1;(r&&n<0||a&&n>0)&&e.preventDefault()},Yqe=e=>e?(e.addEventListener("wheel",hH,{passive:!1}),()=>e.removeEventListener("wheel",hH,{passive:!1})):()=>{},pH=({icon:e,label:t,active:n,onClick:r})=>o.createElement(Bt,{className:`group text-xs sm:text-sm flex items-center dark:text-gray-300 ${n?"dark:!text-white sidebar-item__active mb-[1px]":""}`,active:n,icon:e,text:t,onClick:r,shouldDismissPopover:!1,title:n?`Hide ${t}`:`Show ${t}`,labelElement:n?o.createElement(mIe,{size:14,strokeWidth:1.5,className:"text-blue-500"}):o.createElement(fIe,{size:14,strokeWidth:1.5,className:"text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity"})}),Kqe=o.memo(({col:e,index:t,isHovered:n,isMenuOpen:r,isSelected:a,iconSize:s,currentUIuserState:i,handleCollectionMouseEnter:l,handleCollectionMouseLeave:c,setMenuOpenCollectionId:u,setHoveredCollectionId:d,handleRenameClick:f,handleDeleteClick:m,onSelectCollections:h,activeDragItem:g,selectedCollections:v,hasMultipleTeams:y,prefersHoverInteraction:b})=>{const E=e.id||e.$id||`col-${t}`,w=g==null?void 0:g.$team_id,x=w&&e.teamID&&w!==e.teamID,{isOver:S,setNodeRef:N}=MS({id:e.id||e.$id,data:{type:"collection",...e},disabled:x});return o.createElement("div",{ref:N,onMouseEnter:()=>l(e.id),onMouseLeave:c,style:{opacity:x?.4:1,filter:x?"grayscale(100%)":"none",pointerEvents:x?"none":"auto"},className:`sidebar-item ${a?"sidebar-item__active":""} ${n?"sidebar-item__hover":""} ${S?"sidebar-item__focus":""}`},o.createElement(Bt,{key:E,className:`text-xs sm:text-sm flex items-center relative ${a?"dark:!text-white":""} ${n||r?"!pl-0":""}`,icon:n||r?o.createElement(Hr,{interactionKind:"click",placement:"bottom-start",isOpen:r,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:k=>{k||u(null)},content:o.createElement(Cr,null,o.createElement(Bt,{icon:"edit",text:"Rename",onClick:k=>{k.stopPropagation(),f(e)}}),o.createElement(Bt,{icon:"trash",intent:"danger",text:"Delete",onClick:k=>{k.stopPropagation(),m(e)},className:"dark__text"}))},o.createElement("div",{className:"sidebar-item__menu-trigger cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 min-h-[44px] min-w-[44px] sm:min-h-0 sm:min-w-0 flex items-center justify-center box-border",onClick:k=>{k.stopPropagation(),k.preventDefault(),r?u(null):(u(e.id),d(e.id))}},o.createElement(Ft,{icon:"more",size:s,className:"text-gray-500 dark:text-gray-400"}))):o.createElement(tS,{size:s,color:y?is.getColor(e.teamID):void 0}),text:i!=null&&i.isAllTeam&&e.teamName?o.createElement(fr,{content:e.teamName,placement:"right",compact:!0,interactionKind:"hover",disabled:!b},o.createElement("span",null,e.name)):e.name,active:a,onClick:()=>{h(a?v.filter(k=>k.id!==e.id):[...v||[],e])},labelElement:(e.count??0)>0?o.createElement("span",{className:"text-xs text-gray-400"},e.count):null}))}),Zqe=o.memo(({tag:e,index:t,isHovered:n,isMenuOpen:r,isSelected:a,iconSize:s,currentUIuserState:i,handleTagMouseEnter:l,handleTagMouseLeave:c,setMenuOpenTagId:u,setHoveredTagId:d,handleRenameTagClick:f,handleDeleteTagClick:m,handleTag
1953Click:h,activeDragItem:g,hasMultipleTeams:v,prefersHoverInteraction:y})=>{const b=e.$id||e.id||`tag-${t}`,E=g==null?void 0:g.$team_id,w=E&&e.teamID&&E!==e.teamID,{isOver:x,setNodeRef:S}=MS({id:e.$id||e.id,data:{type:"tag",...e},disabled:w});return o.createElement("div",{ref:S,onMouseEnter:()=>l(e.$id),onMouseLeave:c,style:{opacity:w?.4:1,filter:w?"grayscale(100%)":"none",pointerEvents:w?"none":"auto"},className:`sidebar-item ${a?"sidebar-item__active":""} ${n?"sidebar-item__hover":""} ${x?"sidebar-item__focus":""}`},o.createElement(Bt,{key:b,className:`text-xs sm:text-sm flex items-center relative ${a?"dark:!text-white":""} ${n||r?"!pl-0":""}`,icon:n||r?o.createElement(Hr,{interactionKind:"click",placement:"bottom-start",isOpen:r,minimal:!0,enforceFocus:!1,autoFocus:!1,onInteraction:N=>{N||u(null)},content:o.createElement(Cr,null,o.createElement(Bt,{icon:"edit",text:"Rename",onClick:N=>{N.stopPropagation(),f(e)}}),o.createElement(Bt,{icon:"trash",intent:"danger",text:"Delete",onClick:N=>{N.stopPropagation(),m(e)},className:"dark__text"}))},o.createElement("div",{className:"sidebar-item__menu-trigger cursor-pointer p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700 min-h-[44px] min-w-[44px] sm:min-h-0 sm:min-w-0 flex items-center justify-center box-border",onClick:N=>{N.stopPropagation(),N.preventDefault(),r?u(null):(u(e.$id),d(e.$id))}},o.createElement(Ft,{icon:"more",size:s,className:"text-gray-500 dark:text-gray-400"}))):o.createElement(Gm,{size:s,color:v?is.getColor(e.teamID):void 0}),text:i!=null&&i.isAllTeam&&e.teamName?o.createElement(fr,{content:e.teamName,placement:"right",compact:!0,interactionKind:"hover",disabled:!y},o.createElement("span",null,e.name)):e.name,active:a,onClick:()=>h(e),labelElement:(e.count??0)>0?o.createElement("span",{className:"text-xs text-gray-400"},e.count):null}))}),Xqe=({sortMode:e,setSortMode:t,sortIsAscending:n,setSortIsAscending:r,containerWidth:a,setContainerWidth:s,collections:i=[],tags:l=[],selectedCollections:c=[],onSelectCollections:u,selectedTags:d=[],onSelectTags:f,onCollectionUpdate:m=()=>{},onTagUpdate:h=()=>{},activeTeamID:g=null,isLoadingCollections:v=!1,isLoadingTags:y=!1,activeDragItem:b=null,isManageMode:E=!1,onMiddlebarOpenChange:w=()=>{},onMiddlebarSideChange:x=()=>{}})=>{var Mt,kr,Dr,es,cl,ko,Ti,So,Co,Bl,Ai,Ba,Is,js,ui,no,mr,ja,_c,No,Ro;const[S,N]=p.useState(!1),k=yr(),C=hs(),O=xs().teamID,T=Wn(Le=>{var $t;return($t=Le==null?void 0:Le.FB)==null?void 0:$t.auth}),M=Wn(Le=>{var $t;return($t=Le==null?void 0:Le.UI)==null?void 0:$t.user}),L=H4(),D=ll(),j=dS()?{duration:0}:{duration:.2},[H,Y]=p.useState(window.innerWidth>=780?16:12),[z,K]=p.useState(window.innerWidth<780),ee=p.useRef(null);p.useEffect(()=>Yqe(ee.current),[]);const oe=(((kr=(Mt=T==null?void 0:T.globalMeta)==null?void 0:Mt.teams)==null?void 0:kr.length)||0)>1,[J,se]=p.useState(()=>localStorage.getItem("bookmarks-mb-collections-collapsed")==="true"),[B,U]=p.useState(()=>localStorage.getItem("bookmarks-mb-tags-collapsed")==="true");p.useEffect(()=>{localStorage.setItem("bookmarks-mb-collections-collapsed",String(J))},[J]),p.useEffect(()=>{localStorage.setItem("bookmarks-mb-tags-collapsed",String(B))},[B]);const[$,ce]=p.useState(!1),[be,ue]=p.useState(""),[Ie,Ae]=p.useState(!1),[he,_e]=p.useState(""),[ie,Ue]=p.useState(()=>localStorage.getItem("bookmarks-mb-collections")==="true"),[ae,pe]=p.useState(()=>localStorage.getItem("bookmarks-mb-tags")==="true"),W=Le=>ge($t=>{if(!$t[Le])return $t;const{[Le]:mn,...nn}=$t;return nn}),q=()=>{Ue(Le=>{const $t=!Le;return localStorage.setItem("bookmarks-mb-collections",String($t)),$t&&(se(!1),ce(!1),ue("")),$t}),W("collections")},te=()=>{pe(Le=>{const $t=!Le;return localStorage.setItem("bookmarks-mb-tags",String($t)),$t&&(U(!1),Ae(!1),_e("")),$t}),W("tags")},[X,le]=p.useState(()=>window.innerWidth>=mH),[me,fe]=p.useState(()=>parseInt(localStorage.getItem("bookmarks-middlebar-width"),10)||240),[ke,Se]=p.useState(!1),Et=Le=>{Se(!0),Le.preventDefault()},[nt,Pt]=p.useState(()=>localStorage.getItem("bookmarks-middlebar-side")==="right"?"right":"left"),[en,hn]=p.useState(null);p.useEffect(()=>{hn(document.getElementById("bookmarks-middlebar-rightdock"))},[]);const rt=()=>{Pt(Le=>
1953{const $t=Le==="right"?"left":"right";return localStorage.setItem("bookmarks-middlebar-side",$t),$t})},et=X&&(ie||ae);p.useEffect(()=>{w(et)},[et,w]),p.useEffect(()=>{x(nt)},[nt,x]),p.useEffect(()=>{const Le=()=>{Y(window.innerWidth>=780?16:12),K(window.innerWidth<780),le(window.innerWidth>=mH)};return window.addEventListener("resize",Le),()=>window.removeEventListener("resize",Le)},[]);const Kt=Le=>{N(!0),Le.preventDefault()},zn=Le=>{const $t=d.some(mn=>mn.$id===Le.$id);f($t?d.filter(mn=>mn.$id!==Le.$id):[...d,Le])},xt=o.useCallback(Le=>{Cn.current&&clearTimeout(Cn.current),Cn.current=setTimeout(()=>{lt(Le)},500)},[]),rr=o.useCallback(()=>{Cn.current&&clearTimeout(Cn.current),lt(null)},[]);p.useEffect(()=>{const Le=mn=>{if(!S)return;const nn=mn.clientX;nn>=120&&nn<=600&&s(nn)},$t=()=>{N(!1)};return S&&(document.addEventListener("mousemove",Le),document.addEventListener("mouseup",$t)),()=>{document.removeEventListener("mousemove",Le),document.removeEventListener("mouseup",$t)}},[S,s]),p.useEffect(()=>{const Le=mn=>{if(!ke)return;const nn=nt==="right"?window.innerWidth-mn.clientX:mn.clientX-a;nn>=180&&nn<=600&&(fe(nn),localStorage.setItem("bookmarks-middlebar-width",String(nn)))},$t=()=>Se(!1);return ke&&(document.addEventListener("mousemove",Le),document.addEventListener("mouseup",$t)),()=>{document.removeEventListener("mousemove",Le),document.removeEventListener("mouseup",$t)}},[ke,a,nt]);const ir=[{key:"last-updated",label:"Updated",icon:o.createElement(Ft,{icon:o.createElement(ry,{size:H})})},{key:"name",label:"Name",icon:o.createElement(Ft,{icon:o.createElement(vZ,{size:H})})},{key:"hot",label:"Popular",icon:o.createElement(Ft,{icon:o.createElement(iL,{size:H})})}],Tn=[{key:"all-bookmarks",label:"All Bookmarks",icon:o.createElement(Ft,{icon:o.createElement(tf,{size:H})}),path:O?`/workspace/${O}/bookmarks/updated`:"/workspace/all/bookmarks/updated",isActive:C.pathname.includes("updated")},{key:"recently-viewed",label:"Recently Viewed",icon:o.createElement(Ft,{icon:o.createElement(ry,{size:H})}),path:O?`/workspace/${O}/bookmarks/recently-viewed`:"/workspace/all/bookmarks/recently-viewed",isActive:C.pathname.includes("recently-viewed")},{key:"starred",label:"Favorites",icon:o.createElement(Ft,{icon:o.createElement(lL,{size:H})}),path:O?`/workspace/${O}/bookmarks/starred`:"/workspace/all/bookmarks/starred",isActive:C.pathname.includes("starred")}],[Ct,_r]=p.useState(!1),[Qn,Ce]=p.useState(null),[ut,pn]=p.useState(""),[Jt,In]=p.useState(!1),[Dn,or]=p.useState(null),[Zt,tr]=p.useState(!1),[Fe,st]=p.useState(""),[gt,ht]=p.useState(""),[Ee,We]=p.useState(!1),[it,_t]=p.useState(""),[vn,An]=p.useState(""),[je,kt]=p.useState(!1),[Lt,ne]=p.useState(null),[Be,mt]=p.useState(""),[we,vt]=p.useState(!1),[It,fn]=p.useState(null),[Ne,lt]=p.useState(null),[wt,Ke]=p.useState(null),[St,ln]=p.useState(null),[vr,Yn]=p.useState(null),Cn=o.useRef(null),Hn=o.useCallback(Le=>{Cn.current&&clearTimeout(Cn.current),Cn.current=setTimeout(()=>{ln(Le)},500)},[]),Re=o.useCallback(()=>{Cn.current&&clearTimeout(Cn.current),ln(null)},[]),ot=Le=>{Ce(Le),pn(Le.name),_r(!0),Yn(null)},jt=Le=>{or(Le),In(!0),Yn(null)},En=()=>{var nn,Sn;const Le=((nn=T.globalMeta)==null?void 0:nn.teams)||[];if(Le.length===1)return Le[0].id;const $t=(M==null?void 0:M.isAllTeam)||g==="all"||O==="all",mn=g||O||((Sn=M==null?void 0:M.activeTeam)==null?void 0:Sn.id);return!$t&&mn&&mn!=="all"?mn:""},ar=()=>{st(""),ht(En()),tr(!0)},ye=()=>{_t(""),An(En()),We(!0)},qe=Le=>{ne(Le),mt(Le.name),kt(!0),Ke(null)},Me=Le=>{fn(Le),vt(!0),Ke(null)},Ve=()=>{var nn;if(!it.trim())return;const Le=it.trim(),$t=vn||g||O||((nn=M==null?void 0:M.activeTeam)==null?void 0:nn.id);if(!$t)return;const mn=`__optimistic__tag_${Date.now()}_${Math.random().toString(36).slice(2)}`;h("add",{$id:mn,id:mn,name:Le,teamID:$t,$team_id:$t,count:0}),We(!1),_t(""),yn(()=>function(){return(Lr=>import(Lr))("./index.esm.52e5c072.js")}(),[]).then(({getFunctions:Sn,httpsCallable:Lr,connectFunctionsEmulator:hr})=>{Promise.all([yn(()=>function(){return(Vr=>import(Vr))("./brand.924cec70.js")}().then(Bn=>Bn.a8),[]),yn(()=>function(){return(Vr=>import(Vr))("./brand.924cec70.js")}().then(Bn=>Bn.a9),[])]).then(([{getApp:Bn},{$FF_trigger:Vr}])=>{const Wa=Sn(Bn());
1953Lr(Wa,Vr("users-tag-manage-add"))({tag:{property_name:Le,id_team:$t}}).then(Sr=>{var ro,jl,Or,Ga,ao,mf,Ym,kc;const ga=((Or=(jl=(ro=Sr.data)==null?void 0:ro.output)==null?void 0:jl.tag)==null?void 0:Or.$id)||((mf=(ao=(Ga=Sr.data)==null?void 0:Ga.output)==null?void 0:ao.tag)==null?void 0:mf.id)||((kc=(Ym=Sr.data)==null?void 0:Ym.output)==null?void 0:kc.tagID);if(!ga)throw new Error("Missing Tag ID in response");h("add-reconcile",{tempID:mn,tag:{$id:ga,id:ga,name:Le,teamID:$t,$team_id:$t,count:0}})}).catch(Sr=>{console.error("Add Tag failed",Sr),h("add-rollback",{id:mn}),yn(()=>Promise.resolve().then(()=>ah),void 0).then(({default:ga})=>{ga.dispatch("trigger-alert",{message:"Failed to add tag",intent:"danger"})})})})})},Je=()=>{if(!Be.trim()||!Lt)return;const Le=Lt.id||Lt.$id,$t=Be.trim(),mn=Lt.name;h("rename",{id:Le,name:$t}),kt(!1),yn(()=>function(){return(Sn=>import(Sn))("./index.esm.52e5c072.js")}(),[]).then(({getFunctions:nn,httpsCallable:Sn,connectFunctionsEmulator:Lr})=>{Promise.all([yn(()=>function(){return(Bn=>import(Bn))("./brand.924cec70.js")}().then(hr=>hr.a8),[]),yn(()=>function(){return(Bn=>import(Bn))("./brand.924cec70.js")}().then(hr=>hr.a9),[])]).then(([{getApp:hr},{$FF_trigger:Bn}])=>{const Vr=nn(hr());Sn(Vr,Bn("users-tag-manage-edit"))({tag:{$id:Le,property_name:$t}}).catch(ls=>{console.error("Rename Tag failed",ls),h("rename",{id:Le,name:mn}),yn(()=>Promise.resolve().then(()=>ah),void 0).then(({default:Sr})=>{Sr.dispatch("trigger-alert",{message:"Failed to rename tag",intent:"danger"})})})})})},bt=()=>{if(!It)return;const Le=It.id||It.$id,$t=It,mn=d,nn=d==null?void 0:d.some(Sn=>Sn.$id===Le);h("delete",{id:Le,snapshot:$t}),nn&&f(d.filter(Sn=>Sn.$id!==Le)),vt(!1),yn(()=>function(){return(Lr=>import(Lr))("./index.esm.52e5c072.js")}(),[]).then(({getFunctions:Sn,httpsCallable:Lr,connectFunctionsEmulator:hr})=>{Promise.all([yn(()=>function(){return(Vr=>import(Vr))("./brand.924cec70.js")}().then(Bn=>Bn.a8),[]),yn(()=>function(){return(Vr=>import(Vr))("./brand.924cec70.js")}().then(Bn=>Bn.a9),[])]).then(([{getApp:Bn},{$FF_trigger:Vr}])=>{const Wa=Sn(Bn());Lr(Wa,Vr("users-tag-manage-delete"))({tag:{$id:Le}}).then(()=>{h("delete-commit",{id:Le})}).catch(Sr=>{console.error("Delete tag failed",Sr),h("delete-rollback",{id:Le}),nn&&f(mn),yn(()=>Promise.resolve().then(()=>ah),void 0).then(({default:ga})=>{ga.dispatch("trigger-alert",{message:"Failed to delete tag",intent:"danger"})})})})})},$e=()=>{if(!ut.trim()||!Qn)return;const Le=Qn.id,$t=ut.trim(),mn=Qn.name;m("rename",{id:Le,name:$t}),_r(!1),yn(()=>function(){return(Sn=>import(Sn))("./index.esm.52e5c072.js")}(),[]).then(({getFunctions:nn,httpsCallable:Sn,connectFunctionsEmulator:Lr})=>{Promise.all([yn(()=>function(){return(Bn=>import(Bn))("./brand.924cec70.js")}().then(hr=>hr.a8),[]),yn(()=>function(){return(Bn=>import(Bn))("./brand.924cec70.js")}().then(hr=>hr.a9),[])]).then(([{getApp:hr},{$FF_trigger:Bn}])=>{const Vr=nn(hr());Sn(Vr,Bn("users-collection-manage-edit"))({collection:{$id:Le,property_name:$t}}).catch(ls=>{console.error("Rename failed",ls),m("rename",{id:Le,name:mn}),yn(()=>Promise.resolve().then(()=>ah),void 0).then(({default:Sr})=>{Sr.dispatch("trigger-alert",{message:"Failed to rename collection",intent:"danger"})})})})})},dt=()=>{if(!Dn)return;const Le=Dn.id,$t=Dn,mn=c,nn=c==null?void 0:c.some(Sn=>Sn.id===Le);m("delete",{id:Le,snapshot:$t}),nn&&u(c.filter(Sn=>Sn.id!==Le)),In(!1),yn(()=>function(){return(Lr=>import(Lr))("./index.esm.52e5c072.js")}(),[]).then(({getFunctions:Sn,httpsCallable:Lr,connectFunctionsEmulator:hr})=>{Promise.all([yn(()=>function(){return(Vr=>import(Vr))("./brand.924cec70.js")}().then(Bn=>Bn.a8),[]),yn(()=>function(){return(Vr=>import(Vr))("./brand.924cec70.js")}().then(Bn=>Bn.a9),[])]).then(([{getApp:Bn},{$FF_trigger:Vr}])=>{const Wa=Sn(Bn());Lr(Wa,Vr("users-collection-manage-delete"))({collection:{$id:Le}}).then(()=>{m("delete-commit",{id:Le})}).catch(Sr=>{console.error("Delete failed",Sr),m("delete-rollback",{id:Le}),nn&&u(mn),yn(()=>Promise.resolve().then(()=>ah),void 0).then(({default:ga})=>{ga.dispatch("trigger-alert",{message:"Failed to delete collection",intent:"danger"})})})})})},Rt=()=>{var Sn,Lr,hr,Bn;if(!Fe.trim())return;const Le=Fe.trim(),$t=gt||g||O||((Sn=M==null?void 0:M.activeTeam)==null?void 0:Sn.id
1953);if(!$t)return;const mn=(Bn=(hr=(Lr=T==null?void 0:T.globalMeta)==null?void 0:Lr.teams)==null?void 0:hr.find(Vr=>Vr.id===$t))==null?void 0:Bn.name,nn=`__optimistic__collection_${Date.now()}_${Math.random().toString(36).slice(2)}`;m("add",{id:nn,name:Le,teamID:$t,$team_id:$t,teamName:mn}),tr(!1),st(""),yn(()=>function(){return(Wa=>import(Wa))("./index.esm.52e5c072.js")}(),[]).then(({getFunctions:Vr,httpsCallable:Wa,connectFunctionsEmulator:ls})=>{Promise.all([yn(()=>function(){return(ga=>import(ga))("./brand.924cec70.js")}().then(Sr=>Sr.a8),[]),yn(()=>function(){return(ga=>import(ga))("./brand.924cec70.js")}().then(Sr=>Sr.a9),[])]).then(([{getApp:Sr},{$FF_trigger:ga}])=>{const ro=Vr(Sr());Wa(ro,ga("users-collection-manage-add"))({collection:{property_name:Le,id_team:$t}}).then(({data:Or})=>{var ao;const Ga=(ao=Or==null?void 0:Or.output)==null?void 0:ao.collectionID;if(!Ga)throw new Error("Missing Collection ID in response");m("add-reconcile",{tempID:nn,collection:{$id:Ga,id:Ga,name:Le,teamID:$t,$team_id:$t,teamName:mn}})}).catch(Or=>{console.error("Add collection failed",Or),m("add-rollback",{id:nn}),yn(()=>Promise.resolve().then(()=>ah),void 0).then(({default:Ga})=>{Ga.dispatch("trigger-alert",{message:"Failed to add collection",intent:"danger"})})})})})},Vt=g||O||((Dr=M==null?void 0:M.activeTeam)==null?void 0:Dr.id),Wt=(M==null?void 0:M.isAllTeam)||Vt==="all",On=Tr.organization.subscription.plan.free.collection_limit,Nn=(cl=(es=T==null?void 0:T.parsedMeta)==null?void 0:es.subscriptionStates)==null?void 0:cl.teams,tn=((ko=T==null?void 0:T.globalMeta)==null?void 0:ko.teams)||[],br=(()=>!vc(T)||!(T!=null&&T.isLive)||!Nn?!1:Wt?tn.length?tn.every(Le=>Object.prototype.hasOwnProperty.call(Nn,Le.id)):!1:!Vt||Vt==="all"?!1:Object.prototype.hasOwnProperty.call(Nn,Vt))(),ca=Wt?tn.some(Le=>{var $t;return($t=Nn==null?void 0:Nn[Le.id])==null?void 0:$t.active}):!!((Ti=Nn==null?void 0:Nn[Vt])!=null&&Ti.active),sa=i.length>=On,Gn=ca||!sa||!br,wr=br&&!ca&&sa&&!E,Er=Le=>{var Lr;Le.stopPropagation();const $t=hr=>{var Vr,Wa;const Bn=tn.find(ls=>ls.id===hr);return((Vr=Bn==null?void 0:Bn.organization)==null?void 0:Vr.$id)||((Wa=Bn==null?void 0:Bn.organization)==null?void 0:Wa.id)},mn=$t(Wt?(Lr=tn[0])==null?void 0:Lr.id:Vt);if(!mn)return;const nn=Pn("/organization/:organizationID/subscribe",{organizationID:mn});document.body.classList.contains("tauri-menubar")||document.body.classList.contains("tauri-desktop")?yn(()=>function(){return(Bn=>import(Bn))("./index.a906e697.js")}(),[]).then(({openUrl:hr})=>{hr(`https://bookmark.it.com${nn}`)}).catch(console.error):k(nn)},Nr=p.useRef(null),Wr=p.useRef(null),Ca=p.useRef(null),[Pr,ge]=p.useState({});p.useLayoutEffect(()=>{const Le=Nr.current;if(!Le)return;const $t=[ie&&{id:"collections",ref:Wr,collapsed:J},ae&&{id:"tags",ref:Ca,collapsed:B}].filter(Boolean),mn=()=>{const Sn=$t.filter(Or=>Or.ref.current);if(Sn.length===0){ge(Or=>Object.keys(Or).length?{}:Or);return}const Lr=window.getComputedStyle(Le),hr=Lr.rowGap||Lr.gap||"0",Bn=parseFloat(hr)||0,Vr=Le.clientHeight-parseFloat(Lr.paddingTop||"0")-parseFloat(Lr.paddingBottom||"0")-Bn*Math.max(Sn.length-1,0);if(!Vr||Vr<=0)return;const Wa={};Sn.forEach(Or=>{Wa[Or.id]=Or.ref.current.offsetHeight});let ls=Sn.map(Or=>Or.id),Sr=Vr;const ga={};let ro=!1;for(;!ro&&ls.length;){ro=!0;const Or=Sr/ls.length;ls.forEach(Ga=>{ga[Ga]===void 0&&Wa[Ga]<=Or&&(ga[Ga]=Wa[Ga],Sr-=Wa[Ga],ro=!1)}),ls=ls.filter(Ga=>ga[Ga]===void 0)}if(ls.length){const Or=Sr/ls.length;ls.forEach(Ga=>{ga[Ga]=Or})}else if(Sr>.5){const Or=Sn.filter(Ga=>!Ga.collapsed);Or.length&&(ga[Or[Or.length-1].id]+=Sr)}const jl={};Sn.forEach(Or=>{jl[Or.id]={height:ga[Or.id],scrollable:ga[Or.id]<Wa[Or.id]-.5}}),ge(Or=>Object.keys(Or).length===Sn.length&&Sn.every(ao=>Or[ao.id]&&Math.abs(Or[ao.id].height-jl[ao.id].height)<.5&&Or[ao.id].scrollable===jl[ao.id].scrollable)?Or:jl)};mn();const nn=new ResizeObserver(mn);return nn.observe(Le),$t.forEach(Sn=>Sn.ref.current&&nn.observe(Sn.ref.current)),()=>nn.disconnect()},[ie,ae,J,B,be,he,i.length,l.length,v,y,me,nt]);const at=v?null:o.createElement(o.Fragment,null,o.createElement("div",{className:"middlebar-group__sticky"},o.createElement("div",{className:"middlebar-group__heading flex items-center justify-between rounded transition-colors select-none group",onClick:()=>se(!J)},o.createElement("div",{className:"ml-2 flex items-center gap-1.5 overflow-hidden"},o.createElement("span",{className:"dark__text text-gray-500 uppercase text-xs truncate"},"Collections"),o.createElement(Ft,{icon:J?"chevron-right":"chevron-down",size:12,className:"text-gray-400"})),o.createElement("div",{className:"flex items-center gap-1"},o.createElement("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:Le=>{Le.stopPropagation(),J&&se(!1);const $t=!$;ce($t),$t||ue("")}},o.createElement(Ft,{icon:"search",size:14,className:"text-gray-500 dark:text-gray-400 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 p-1 rounded"})),Gn&&!E?o.createElement("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:Le=>{Le.stopPropagation(),ar()}},o.createElement(Ft,{icon:"plus",size:H,className:"text-gray-500 dark:text-gray-400 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 p-1 rounded"})):null)),o.createElement($i,{initial:!1},!J&&$&&o.createElement(_s.div,{initial:{height:0,opacity:0,marginBottom:0},animate:{height:"auto",opacity:1,marginBottom:8},exit:{height:0,opacity:0,marginBottom:0},transition:j,style:{overflow:"hidden"}},o.createElement("div",{className:"px-1.5 flex items-center justify-between pointer-events-auto"},o.createElement(Cs,{autoFocus:!0,placeholder:"Find",value:be,onChange:Le=>ue(Le.target.value),className:`flex-grow mr-2 ${D?Xr:""}`}),o.createElement(Ft,{icon:"cross",size:14,className:"text-gray-500 cursor-pointer hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 font-bold",onClick:Le=>{Le.stopPropagation(),ue(""),ce(!1)}}))))),o.createElement($i,{initial:!1},!J&&o.createElement(_s.div,{initial:{height:0,opacity:0}
1953,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:j,style:{overflow:"hidden"}},i.length===0&&!be&&(Gn&&!E?o.createElement(De,{variant:"minimal",size:"small",icon:"plus",text:"Create collection",className:"dark__text text-xs text-gray-500 !ml-1 !justify-start mb-2",onClick:Le=>{Le.stopPropagation(),ar()}}):o.createElement("div",{className:"dark__text text-gray-400 text-xs py-1 pl-2"},"Create collections to organise bookmarks.")),o.createElement(Cr,{className:"!bg-transparent !p-0"},o.createElement($i,{initial:!1},i.filter(Le=>(!(b!=null&&b.$team_id)||Le.teamID===b.$team_id)&&(!be||Le.name.toLowerCase().includes(be.toLowerCase()))).map((Le,$t)=>o.createElement(_s.div,{key:Le.id||Le.$id||`col-${$t}`,initial:{opacity:0,height:0,overflow:"hidden"},animate:{opacity:1,height:"auto",overflow:"visible"},exit:{opacity:0,height:0,overflow:"hidden"},transition:j},o.createElement(Kqe,{col:Le,index:$t,isHovered:St===Le.id,isMenuOpen:vr===Le.id,isSelected:c==null?void 0:c.some(mn=>mn.id===Le.id),iconSize:H,currentUIuserState:M,handleCollectionMouseEnter:Hn,handleCollectionMouseLeave:Re,setMenuOpenCollectionId:Yn,setHoveredCollectionId:ln,handleRenameClick:ot,handleDeleteClick:jt,onSelectCollections:mn=>{be&&ue(""),u(mn)},activeDragItem:b,selectedCollections:c,hasMultipleTeams:oe,prefersHoverInteraction:L}))))),wr?o.createElement("div",{className:"py-2 pl-2"},o.createElement("span",{className:"cursor-pointer text-xs text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 text-decoration-none",onClick:Er},"Upgrade for unlimited collections")):null))),zt=y?null:o.createElement(o.Fragment,null,o.createElement("div",{className:"middlebar-group__sticky"},o.createElement("div",{className:"middlebar-group__heading flex items-center justify-between rounded transition-colors select-none group",onClick:()=>U(!B)},o.createElement("div",{className:"ml-2 flex items-center gap-1.5 overflow-hidden"},o.createElement("span",{className:"dark__text text-gray-500 uppercase text-xs outline-none focus:outline-none truncate"},"Tags"),o.createElement(Ft,{icon:B?"chevron-right":"chevron-down",size:12,className:"text-gray-400"})),o.createElement("div",{className:"flex items-center gap-1"},o.createElement("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:Le=>{Le.stopPropagation(),B&&U(!1);const $t=!Ie;Ae($t),$t||_e("")}},o.createElement(Ft,{icon:"search",size:14,className:"text-gray-500 dark:text-gray-400 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 p-1 rounded"})),!E&&o.createElement("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:Le=>{Le.stopPropagation(),ye()}},o.createElement(Ft,{icon:"plus",size:H,className:"text-gray-500 dark:text-gray-400 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 p-1 rounded"})))),o.createElement($i,{initial:!1},!B&&Ie&&o.createElement(_s.div,{initial:{height:0,opacity:0,marginBottom:0},animate:{height:"auto",opacity:1,marginBottom:8},exit:{height:0,opacity:0,marginBottom:0},transition:j,style:{overflow:"hidden"}},o.createElement("div",{className:"px-1.5 flex items-center justify-between pointer-events-auto"},o.createElement(Cs,{autoFocus:!0,placeholder:"Find",value:he,onChange:Le=>_e(Le.target.value),className:`flex-grow mr-2 ${D?Xr:""}`}),o.createElement(Ft,{icon:"cross",size:14,className:"text-gray-500 cursor-pointer hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 font-bold",onClick:Le=>{Le.stopPropagation(),_e(""),Ae(!1)}})))),o.createElement($i,{initial:!1},!B&&o.createElement(_s.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:j,style:{overflow:"hidden"}},l.length===0&&!he&&(E?o.createElement("div",{className:"dark__text text-gray-400 text-xs py-1 pl-2"},"Assign multiple tags to items"):o.createElement(De,{variant:"minimal",size:"small",icon:"plus",text:"Create tag",className:"dark__text text-xs text-gray-500 !ml-1 !justify-start mb-2",onClick:Le=>{Le.stopPropagation(),ye()}})),o.createElement(Cr,{className:"!bg-transparent !p-0"},o.createElement($i,{initial:!1},l.filter(Le=>(!(b!=null&&b.$team_id)||Le.teamID===b.$team_id)&&(!he||Le.name.toLowerCase().includes(he.toLowerCase()))).map((Le,$t)=>o.createElement(_s.div,{key:Le.$id||Le.id||`tag-${$t}`,initial:{opacity:0,height:0,overflow:"hidden"}
1953,animate:{opacity:1,height:"auto",overflow:"visible"},exit:{opacity:0,height:0,overflow:"hidden"},transition:j},o.createElement(Zqe,{tag:Le,index:$t,isHovered:Ne===Le.$id,isMenuOpen:wt===Le.$id,isSelected:d.some(mn=>mn.$id===Le.$id),iconSize:H,currentUIuserState:M,handleTagMouseEnter:xt,handleTagMouseLeave:rr,setMenuOpenTagId:Ke,setHoveredTagId:lt,handleRenameTagClick:qe,handleDeleteTagClick:Me,handleTagClick:mn=>{he&&_e(""),zn(mn)},activeDragItem:b,hasMultipleTeams:oe,prefersHoverInteraction:L}))))))))),cn=o.createElement($i,{initial:!1},X&&(ie||ae)&&o.createElement(_s.div,{key:"bookmarks-middlebar",className:"middlebar-container group/mb h-full flex flex-col relative border-l border-gray-200 dark:border-gray-800 overflow-hidden",initial:{width:0},animate:{width:me},exit:{width:0},transition:ke?{duration:0}:j},o.createElement("div",{className:`absolute bottom-2 z-20 opacity-0 group-hover/mb:opacity-100 transition-opacity ${nt==="right"?"left-2":"right-2"}`},o.createElement("button",{type:"button",onClick:rt,title:nt==="right"?"Move panel back to the left":"Move panel to the right",className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-800"},nt==="right"?o.createElement(o.Fragment,null,o.createElement(nIe,{size:13,strokeWidth:1.5}),o.createElement("span",null,"Align panel left")):o.createElement(o.Fragment,null,o.createElement("span",null,"Align panel right"),o.createElement(rIe,{size:13,strokeWidth:1.5})))),o.createElement("div",{ref:Nr,className:"middlebar-container__content pl-2 pt-4 pb-8 flex-grow flex flex-col gap-1.5 min-h-0 overflow-hidden",style:{width:me}},o.createElement($i,{initial:!1},ie&&o.createElement(_s.div,{key:"middlebar-collections",initial:{height:0,opacity:0},animate:{height:((So=Pr.collections)==null?void 0:So.height)??"auto",opacity:1},exit:{height:0,opacity:0},transition:j,style:{overflow:"hidden",flexShrink:0,minHeight:0}},o.createElement("div",{className:`middlebar-group h-full min-h-0 overflow-y-auto overscroll-y-contain no-scrollbar${(Co=Pr.collections)!=null&&Co.scrollable?" is-scrollable":""}`},o.createElement("div",{ref:Wr},at)))),o.createElement($i,{initial:!1},ae&&o.createElement(_s.div,{key:"middlebar-tags",initial:{height:0,opacity:0},animate:{height:((Bl=Pr.tags)==null?void 0:Bl.height)??"auto",opacity:1},exit:{height:0,opacity:0},transition:j,style:{overflow:"hidden",flexShrink:0,minHeight:0}},o.createElement("div",{className:`middlebar-group h-full min-h-0 overflow-y-auto overscroll-y-contain no-scrollbar${(Ai=Pr.tags)!=null&&Ai.scrollable?" is-scrollable":""}`},o.createElement("div",{ref:Ca},zt))))),o.createElement("div",{className:`absolute top-0 ${nt==="right"?"-left-[7px]":"-right-[7px]"} w-4 h-full cursor-col-resize z-50 flex justify-center hover:bg-transparent group`,onMouseDown:Et},o.createElement("div",{className:"w-[1px] h-full transition-colors group-hover:bg-blue-500 delay-75 group-active:bg-blue-600 bg-transparent"}))));return o.createElement(o.Fragment,null,o.createElement("div",{className:"bookmarks-list-shell flex h-full min-h-0 overflow-hidden relative"},o.createElement("div",{className:"sidebar-container h-full min-h-0 overflow-hidden flex flex-col relative",style:{width:z?280:a,minWidth:200}},o.createElement("div",{ref:ee,className:"sidebar-container__content px-2 pt-2 flex-grow overflow-y-auto no-scrollbar"},(((Is=(Ba=T==null?void 0:T.globalMeta)==null?void 0:Ba.teams)==null?void 0:Is.length)||0)>0?o.createElement("div",{className:"mt-1 mb-4"},o.createElement("div",{className:"flex items-center justify-between rounded transition-colors select-none group"},o.createElement("span",{className:"ml-2 dark__text text-gray-500 uppercase text-xs truncate"},"Workspace"),o.createElement("div",{className:"flex items-center gap-1"},o.createElement("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>k("/workspace/add"),title:"Add workspace"},o.createElement(Ft,{icon:"plus",size:H,className:"text-gray-500 dark:text-gray-400 cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 p-1 rounded"}
1953)))),o.createElement(qqe,{flat:!0,showAllOption:!0,iconSize:H,context:T==null?void 0:T.context})):null,o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"ml-2 mb-2 dark__text text-gray-500 uppercase text-xs truncate"},"List"),o.createElement(Cr,{className:"!bg-transparent !p-0"},Tn.map(Le=>o.createElement(Bt,{className:`text-xs sm:text-sm flex items-center dark:text-gray-300 ${Le.isActive?"dark:!text-white sidebar-item__active":""}`,key:Le.key,active:Le.isActive,icon:Le.icon,text:Le.label,onClick:()=>{var mn,nn;const $t=((mn=T==null?void 0:T.user)==null?void 0:mn.uid)||((nn=T==null?void 0:T.currentUser)==null?void 0:nn.uid);$t&&localStorage.setItem(`user-nav-bookmarks-default-${$t}`,Le.path),k(Le.path)}})))),o.createElement("div",{className:"mb-4"},o.createElement("div",{className:"ml-2 mb-2 dark__text text-gray-500 uppercase text-xs truncate"},"Sort"),o.createElement(Cr,{className:"!bg-transparent !p-0"},ir.map(Le=>o.createElement(Bt,{className:`text-xs sm:text-sm flex items-center dark:text-gray-300 ${e===Le.key?"dark:!text-white sidebar-item__active":""}`,key:Le.key,active:e===Le.key,icon:Le.icon,text:Le.label,onClick:()=>{e===Le.key?r(!n):(t(Le.key),r(!1))},labelElement:e===Le.key?n?"â":"â":null})))),o.createElement("div",{className:"mt-1 mb-3"},o.createElement("div",{className:"ml-2 mb-2 dark__text text-gray-500 uppercase text-xs truncate"},"Browse"),o.createElement(Cr,{className:"!bg-transparent !p-0"},o.createElement(pH,{icon:o.createElement(tS,{size:H,strokeWidth:1.5}),label:"Collections",active:ie,onClick:q}),o.createElement(pH,{icon:o.createElement(Gm,{size:H,strokeWidth:1.5}),label:"Tags",active:ae,onClick:te}))),!X&&o.createElement($i,{initial:!1},ie&&o.createElement(_s.div,{key:"sidebar-collections",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:j,style:{overflow:"hidden"}},at)),!X&&o.createElement($i,{initial:!1},ae&&o.createElement(_s.div,{key:"sidebar-tags",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:j,style:{overflow:"hidden"}},zt))),!z&&o.createElement("div",{className:"absolute top-0 -right-[7px] w-4 h-full cursor-col-resize z-50 flex justify-center hover:bg-transparent group",onMouseDown:Kt},o.createElement("div",{className:"w-[1px] h-full transition-colors group-hover:bg-blue-500 delay-75 group-active:bg-blue-600 bg-transparent"}))),nt==="left"&&cn),nt==="right"&&en&&kl.createPortal(cn,en),o.createElement(ya,{isOpen:Ct,onClose:()=>_r(!1),title:"Rename Collection",style:{width:"400px"},className:D?Xr:void 0},o.createElement("div",{className:Fs},o.createElement(Cs,{value:ut,onChange:Le=>pn(Le.target.value),placeholder:"Collection Name",autoFocus:!0})),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi,style:{justifyContent:"space-between"}},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:Le=>{Le.preventDefault();const $t=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],mn=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],nn=mn[Math.floor(Math.random()*mn.length)],Sn=$t[Math.floor(Math.random()*$t.length)],Lr=Math.floor(10+Math.random()*90),hr=`${Sn} ${nn} ${Lr}`;pn(hr)}},"Generate collection"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>_r(!1)}),o.createElement(De,{text:"Save",intent:jr.PRIMARY,onClick:$e,disabled:!ut.trim()}))))),o.createElement(ya,{isOpen:Jt,onClose:()=>In(!1),title:"Delete Collection",icon:"trash",style:{width:"400px"},className:D?Xr:void 0},o.createElement("div",{className:Fs},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Deleting the collection ",o.createElement("strong",null,Dn==null?void 0:Dn.name)," ","will remove it from"," ",o.createElement("strong",null,(Dn==null?void 0:Dn.count)||0)," bookmark",((Dn==null?void 0:Dn.count)||0)!==1?"s":"",".")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>In(!1)}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:dt})))),o.createElement(ya,{isOpen:Zt,onClose:()=>tr(!1),canOutsideClickClose:!1,title:"Add Collection",style:{width:"400px"},className:`dialog-modal ${D?Xr:""}`},o.createElement("div",{className:Fs},((ui=(js=T.globalMeta)==null?void 0:js.teams)==null?void 0:ui.length)>
19531&&o.createElement(Ra,{label:"Select Workspace",labelInfo:"(Required)"},o.createElement(Ko,{fill:!0,value:gt,onChange:Le=>ht(Le.target.value)},o.createElement("option",{value:""},"Select a workspace"),(mr=(no=T.globalMeta)==null?void 0:no.teams)==null?void 0:mr.map(Le=>{const $t=sy(T,Le.id),mn=i.filter(Sn=>Sn.id_team===Le.id||Sn.teamID===Le.id).length,nn=!vc(T)||$t||mn<Tr.organization.subscription.plan.free.collection_limit;return o.createElement("option",{key:Le.id,value:Le.id,disabled:!nn},Le.name," ",nn?"":$t?"(Limit reached)":"(Upgrade to add more)")}))),o.createElement(Ra,{label:"Name",labelInfo:"(Required)"},o.createElement(Cs,{value:Fe,onChange:Le=>st(Le.target.value),placeholder:"Collection Name",autoFocus:!0,onKeyDown:Le=>{Le.key==="Enter"&&!(!Fe.trim()||!gt)&&Rt()}}))),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi,style:{justifyContent:"space-between"}},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:Le=>{Le.preventDefault();const $t=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],mn=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],nn=mn[Math.floor(Math.random()*mn.length)],Sn=$t[Math.floor(Math.random()*$t.length)],Lr=Math.floor(10+Math.random()*90),hr=`${Sn} ${nn} ${Lr}`;st(hr)}},"Generate collection"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>tr(!1)}),o.createElement(De,{text:"Add",intent:jr.PRIMARY,onClick:Rt,disabled:!Fe.trim()||!gt}))))),o.createElement(ya,{isOpen:Ee,onClose:()=>We(!1),canOutsideClickClose:!1,title:"Add Tag",style:{width:"400px"},className:`dialog-modal ${D?Xr:""}`},o.createElement("div",{className:Fs},((_c=(ja=T.globalMeta)==null?void 0:ja.teams)==null?void 0:_c.length)>1&&o.createElement(Ra,{label:"Select Workspace",labelInfo:"(Required)"},o.createElement(Ko,{fill:!0,value:vn,onChange:Le=>An(Le.target.value)},o.createElement("option",{value:""},"Select a workspace"),(Ro=(No=T.globalMeta)==null?void 0:No.teams)==null?void 0:Ro.map(Le=>o.createElement("option",{key:Le.id,value:Le.id},Le.name)))),o.createElement(Ra,{label:"Tag Name",labelInfo:"(Required)"},o.createElement(Cs,{value:it,onChange:Le=>_t(Le.target.value),placeholder:"Tag Name",autoFocus:!0,onKeyDown:Le=>{Le.key==="Enter"&&!(!it.trim()||!vn)&&Ve()}}))),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi,style:{justifyContent:"space-between"}},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:Le=>{Le.preventDefault();const $t=["January","February","March","April","May","June","July","August","September","October","November","December"],mn=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],nn=mn[Math.floor(Math.random()*mn.length)],Sn=$t[Math.floor(Math.random()*$t.length)],Lr=Math.floor(10+Math.random()*90),hr=`${Sn} ${nn} ${Lr}`;_t(hr)}},"Generate tag"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>We(!1)}),o.createElement(De,{text:"Add",intent:jr.PRIMARY,onClick:Ve,disabled:!it.trim()||!vn}))))),o.createElement(ya,{isOpen:je,onClose:()=>kt(!1),title:"Rename Tag",style:{width:"400px"},className:D?Xr:void 0},o.createElement("div",{className:Fs},o.createElement(Cs,{value:Be,onChange:Le=>mt(Le.target.value),placeholder:"Tag Name",autoFocus:!0})),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi,style:{justifyContent:"space-between"}},["dev","qa"].includes("production")?o.createElement("a",{href:"#",className:"generate-content-button",onClick:Le=>{Le.preventDefault();const $t=["January","February","March","April","May","June","July","August","September","October","November","December"],mn=["Rhino","Elephant","Tiger","Lion","Bear","Wolf","Eagle","Hawk","Falcon","Panther","Leopard","Cheetah","Dolphin","Whale","Shark","Octopus","Penguin","Owl","Fox","Deer","Moose","Bison","Cobra","Dragon","Platypus"],nn=mn[Math.floor(Math.random()*mn.length)],Sn=$t[Math.floor(Math.random()*$t.length)],Lr=Math.floor(10+Math.random()*90),hr=`${Sn} ${nn} ${Lr}`;mt(hr)}},"Generate tag"):null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement(De,{text:"Cancel",onClick:()=>kt(!1)}),o.createElement(De,{text:"Save",intent:jr.PRIMARY,onClick:Je,disabled:!Be.trim()}))))),o.createElement(ya,{isOpen:we,onClose:()=>vt(!1),title:"Delete Tag",icon:"trash",style:{width:"400px"},className:`dialog-modal ${D?Xr:""}`},o.createElement("div",{className:Fs},o.createElement("div",{className:"bp6-callout bp6-intent-danger"},"Deleting the tag ",o.createElement("strong",null,It==null?void 0:It.name)," will remove it from ",o.
1953createElement("strong",null,(It==null?void 0:It.count)||0)," bookmark",((It==null?void 0:It.count)||0)!==1?"s":"",".")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{text:"Cancel",onClick:()=>vt(!1)}),o.createElement(De,{text:"Delete",intent:jr.DANGER,onClick:bt})))))},Qqe=(e,t)=>{if(!t||!t.type)return!0;switch(t.type){case"boolean":return!!e[t.key];case"existence":return e[t.key]!==void 0&&e[t.key]!==null;case"array-containment":return Array.isArray(t.value)&&t.value.includes(e[t.key]);case"array-intersection":{const n=Array.isArray(e[t.key])?e[t.key]:[],r=Array.isArray(t.value)?t.value:[];return n.filter(s=>r.some(i=>i.$id===s.$id)).length>=r.length}case"empty-array":{const n=e[t.key];return!Array.isArray(n)||n.length===0}case"match":return e[t.key]===t.value;default:return!0}},Jqe=(e,t)=>Array.isArray(e)?!t||t.length===0?e:e.filter(n=>t.every(r=>Qqe(n,r))):[],eYe=(e,t)=>{if(!Array.isArray(e))return[];const n=(t||"").trim().toLowerCase();return n?e.filter(r=>{var a;return(a=r.name)==null?void 0:a.toLowerCase().includes(n)}):e},tYe=(e,{filterSet:t,search:n}={})=>eYe(Jqe(e,t),n),nYe=(e,t,n)=>{const[r,a]=p.useState(!1),[s,i]=p.useState({}),[l,c]=p.useState(new Set),u=p.useRef([]),d=p.useRef(!1),f=Ir(),m=Ts(),h=pt(f,"v2-migrateThumbnails");p.useEffect(()=>{(async()=>{try{const y=await Ep(xp(m,"General_Settings","feature_flags"));if(y.exists()){const b=y.data();i(b),(b.thumbnail_migration_enabled||b.screenshot_api_enabled)&&a(!0)}}catch(y){console.error("Failed to fetch migration feature flag",y)}})()},[]),p.useEffect(()=>{if(!r||!e||!t)return;const v=s.thumbnail_migration_enabled,y=e.filter(E=>{const w=E.active_iteration;if(!w||w.type!=="url"||w.auto_preview_thumbnail||E.$optimistic||l.has(w.$id))return!1;const x=Date.now()/1e3-86400;return!(!v&&E.date_created&&E.date_created<x)});y.length>0;let b=0;y.forEach(E=>{u.current.find(x=>x.iterationID===E.active_iteration.$id)||(u.current.push({assetID:E.$id,iterationID:E.active_iteration.$id}),c(x=>{const S=new Set(x);return S.add(E.active_iteration.$id),S}),b++)}),b>0&&g()},[e,r,t,s]);const g=async()=>{if(d.current||u.current.length===0)return;d.current=!0;const v=u.current.splice(0,5);try{const y=await h({teamID:t,items:v});if(n&&y.data&&y.data.output){const b=[];(Array.isArray(y.data.output)?y.data.output:y.data.output.results||[]).forEach(w=>{w.status==="success"&&w.thumbnail?b.push({iterationID:w.id,thumbnail:w.thumbnail}):w.status==="exists_and_synced"&&w.thumbnail&&b.push({iterationID:w.id,thumbnail:w.thumbnail})}),b.length>0&&n(b)}}catch(y){console.error("[ThumbnailMigration] Batch failed",y)}finally{d.current=!1,u.current.length>0&&setTimeout(g,1e3)}};return{featureFlags:s}},rYe="Canonical starter content seeded into a new user's auto-created workspace. Single source of truth for BOTH the server batched seed (functions) and the client optimistic render (web + mobile, imported via @applicationConfig). Each item has a stable `seed_key` so optimistic client rows reconcile deterministically with the synced server rows. `screenshot` is an absolute https URL used verbatim by both clients (no per-env bucket resolution) and stored on the seeded iteration's auto_preview_thumbnail â one object, same ref across dev/qa/prod. These are Firebase Storage download URLs carrying a token (objects live in prod bucket gs://iteratingly.appspot.com/feature/auto_preview/ and are NOT public â the token authorizes read); they break only if an object is deleted/re-uploaded (token rotates). The iOS and Android STORE urls (the bookmark destinations) are still TEMPORARY placeholders pending real listings.",aYe=3,sYe={seed_key:"resources",name:"Resources"},iYe=[{seed_key:"chrome-extension",title:"Chrome Extension for Bookmark It",url:"https://chromewebstore.google.com/detail/team-bookmarks/nnkccijjkjplbeidbpchalgdahjajeim",tags:["resources"],screenshot:"https://firebasestorage.googleapis.com/v0/b/iteratingly.appspot.com/o/feature%2Fauto_preview%2F%2Bseed-extension-image.png?alt=media&token=ee3f9034-efa1-484b-b47b-6fd0299083b7"}],oYe="Temporarily commented out (not seeded). JSON has no comments, so these live here instead of `bookmarks`. Move an item back into `bookmarks` to re-enable. Pending real App Store / Play Store listings.",lYe=[{seed_key:"ios-app",title:"Iphone app",url:"https://apps.apple.com/us/app/bookmark-it/id1234567890",tags:["resources"],screenshot:"https://firebasestorage.googleapis.com/v0/b/iteratingly.appspot.com/o/feature%2Fauto_preview%2F%2Bseed-ios-image.png?alt=media&token=27d3ab72-b8e1-4b17-90e1-c57bc198b68d"},{seed_key:"android-app",title:"Android app",url:"https://play.google.com/store/apps/details?id=com.it.bookmark.bookmarkit&hl=en_US",tags:["resources"],screenshot:"https://firebasestorage.googleapis.com/v0/b/iteratingly.appspot.com/o/feature%2Fauto_preview%2F%2Bseed-android-image.png?alt=media&token=46a3191d-dab7-4c28-bde5-e72d3d854872"}],UN={_note:rYe,version:aYe,tag:sYe,bookmarks:iYe,_disabled_note:oYe,_disabled_bookmarks:lYe};Ts();const x0=Ir(xr()),BN=new Set,dm={TeamAll:{LastUpdated:{type:{list:"last-updated",teamCount:"all"},isSpecific:!1,listName:"Last Updated (Team, All)",tableID:"Assets-LastUpdated-All",triggerPath:"users-asset-view-lastupdated_team_all",CSSclasses:{container:"asset-list-updated asset-list-teamall"},message:{noAssetsFound:o.createElement(iH,null)},initialSort:"updated"},RecentlyViewed:{type:{list:"recently-viewed",teamCount:"all"},isSpecific:!1,listName:"Recently Viewed (Team, All)",tableID:"Assets-RecentlyViewed-All",triggerPath:"users-asset-view-recentlyviewed_team_all",CSSclasses:{container:"asset-list-recent asset-list-teamall"},message:{noAssetsFound:o.createElement(oH,null)},filterSet:[{type:"existence",key:"date_viewed"}],initialSort:"recently-viewed"},Favorited:{type:{list:"favorited",teamCount:"all"},isSpecific:!1,listName:"Favorited (Team, All)",tableID:"Assets-Favorited-All",triggerPath:"users-asset-view-favorited_team_all",CSSclasses:{container:"asset-list-favorited asset-list-teamall"},message:{noAssetsFound:o.createElement(lH,null)},filterSet:[{type:"boolean",key:"is_favorited"}],initialSort:"recently-viewed"}},TeamSpecific:{LastUpdated:{type:{list:"last-updated",teamCount:"specific"},isSpecific:!0,listName:"Last Updated (Team, Specific)",tableID:"Assets-LastUpdated-Team",triggerPath:"users-asset-view-lastupdated_team",CSSclasses:{container:"asset-list-updated asset-list-teamspecific"},message:{noAssetsFound:o.createElement(iH,null)},initialSort:"updated"},RecentlyViewed:{type:{list:"recently-viewed",teamCount:"specific"},isSpecific:!0,listName:"Recently Viewed (Team, Specific)",tableID:"Assets-RecentlyViewed-Team",triggerPath:"users-asset-view-recentlyviewed_team",CSSclasses:{container:"asset-list-recent asset-list-teamspecific"},message:{noAssetsFound:o.createElement(oH,null)},filterSet:[{type:"existence",key:"date_viewed"}],initialSort:"recently-viewed"},Favorited:{type:{list:"favorited",teamCount:"specific"},isSpecific:!0,listName:"Favorited (Team, Specific)",tableID:"Assets-Favorited-Team",triggerPath:"users-asset-view-favorited_team",CSSclasses:{container:"asset-list-favorited asset-list-teamspecific"},message:{noAssetsFound:o.createElement(lH,null)},filterSet:[{type:"boolean",key:"is_favorited"}],initialSort:"recently-viewed"}}},cYe=({type:e={}})=>{if(e.list&&e.teamCount){let t=JSON.parse(localStorage.getItem("assetList-lastDownload"))||{};delete t[`${e.list}@${e.teamCount}`],localStorage.setItem("assetList-lastDownload",JSON.stringify(t))}else console.warn("# Invalid `type` properties #",e);Object.keys(localStorage).filter(t=>
1953t.startsWith("assetsGeneral-lastDownload-")).forEach(t=>localStorage.removeItem(t)),localStorage.removeItem("assetsGeneral-lastDownload")},lp=({type:e,isSpecific:t,listName:n,tableID:r,triggerPath:a,CSSclasses:s,message:i,filterSet:l,initialSort:c})=>({external:u,sibling_meta_action:d={},sibling_meta_reset:f})=>{var Yn,Cn,Hn,Re,ot,jt,En,ar;let m=null;t&&(m=xs().teamID);const[h,g]=df(),[v,y]=p.useState(0),[b,E]=p.useState(!1),[w,x]=p.useState(()=>{const ye=localStorage.getItem("assetsGeneral-lastDownload");return ye?JSON.parse(ye):null}),[S,N]=p.useState(!1),[k,C]=p.useState(h.get("sync")==="true"),A=o.useRef(!1);p.useEffect(()=>{if(h.get("sync")==="true"){C(!0);const ye=new URLSearchParams(h);ye.delete("sync"),g(ye,{replace:!0})}},[h,g]);const[O,T]=p.useState(!1),[M,L]=p.useState(null),[D,j]=p.useState(0);p.useEffect(()=>{let ye;if((M==null?void 0:M.state)==="fetching"){j(0);const qe=1e4,Me=200,Ve=.9/(qe/Me);ye=setInterval(()=>{j(Je=>Je>=.9?(clearInterval(ye),.9):Je+Ve)},Me)}else ye&&clearInterval(ye);return()=>{ye&&clearInterval(ye)}},[M==null?void 0:M.state]);const[H,Y]=p.useState(!1),[z,K]=p.useState(null),[ee,oe]=p.useState(null),[J,se]=p.useState([]),[B,U]=p.useState([]),[$,ce]=p.useState(null),[be,ue]=p.useState(!0),[Ie,Ae]=p.useState(!0),[he,_e]=p.useState(!1),[ie,Ue]=p.useState(new Set);p.useEffect(()=>{u.action({type:"sibling-header",subType:"bulk-selection-count",dataSet:{count:ie.size,isManageMode:he}})},[ie.size,he]),p.useEffect(()=>{(d==null?void 0:d.type)==="body"&&(d==null?void 0:d.subType)==="bulk-clear-selections"&&(Ue(new Set),_e(!1),f())},[d]);const[ae,pe]=p.useState(null),[W,q]=p.useState(!1),[te,X]=p.useState(null),[le,me]=p.useState(!1),[fe,ke]=p.useState(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);p.useEffect(()=>{const ye=window.matchMedia("(prefers-color-scheme: dark)"),qe=Me=>ke(Me.matches);return ye.addEventListener?ye.addEventListener("change",qe):ye.addListener(qe),()=>{ye.removeEventListener?ye.removeEventListener("change",qe):ye.removeListener(qe)}},[]),p.useEffect(()=>(ae?document.body.style.cursor="grabbing":document.body.style.cursor="",()=>{document.body.style.cursor=""}),[ae]);const Se=Ab(Pm(qm,{activationConstraint:{distance:8}}),Pm(AS)),Et=yr(),nt=Wn(ye=>{var qe;return(qe=ye==null?void 0:ye.FB)==null?void 0:qe.auth}),Pt=Wn(ye=>{var qe;return(qe=ye==null?void 0:ye.UI)==null?void 0:qe.user}),en=ye=>{if(!z)return;const qe=new Map;ye.forEach(Ve=>qe.set(Ve.iterationID,Ve.thumbnail));const Me=z.map(Ve=>{var bt;const Je=(bt=Ve.active_iteration)==null?void 0:bt.$id;return qe.has(Je)?{...Ve,active_iteration:{...Ve.active_iteration,auto_preview_thumbnail:qe.get(Je)}}:Ve});K(Me)},{featureFlags:hn}=nYe(z,ee||((Yn=Pt==null?void 0:Pt.activeTeam)==null?void 0:Yn.id),en),rt=o.useRef(m),et=L4(m,{includeTeamless:!0,allWorkspaces:!m})||[],Kt=$4(m,{includeTeamless:!0,allWorkspaces:!m})||[],{bookmarks:zn}=dL(m,{allWorkspaces:!m}),xt=o.useMemo(()=>{const ye=ta.clone(l??[]),qe=(J||[]).filter(Me=>Me&&Me.id);if(qe.length>0&&ye.push({type:"array-containment",key:"$collection_id",value:qe.map(Me=>Me.id)}),B&&B.length>0){const Me=B.filter(Ve=>Ve.$id!==ap);Me.length>0&&ye.push({type:"array-intersection",key:"tags",value:Me}),B.some(Ve=>Ve.$id===ap)&&ye.push({type:"empty-array",key:"tags"})}return ye},[l,J,B]);o.useEffect(()=>{!et||et.length===0||se(ye=>{if(!ye||ye.length===0)return ye;let qe=!1;const Me=ye.map(Ve=>{const Je=et.find(bt=>bt.id===Ve.id||bt.$id===Ve.id);return Je&&Je.name&&Je.name!==Ve.name?(qe=!0,{...Ve,name:Je.name}):Ve});return qe?Me:ye})},[et]),o.useEffect(()=>{!Kt||Kt.length===0||U(ye=>{if(!ye||ye.length===0)return ye;let qe=!1;const Me=ye.map(Ve=>{const Je=Kt.find(bt=>bt.$id===Ve.$id||bt.id===Ve.$id);return Je&&Je.name&&Je.name!==Ve.name?(qe=!0,{...Ve,name:Je.name}):Ve});return qe?Me:ye})},[Kt]);const rr=o.useMemo(()=>(et||[]).map(ye=>({value:ye.id||ye.$id,label:ye.name,count:ye.count??0})).filter(ye=>ye.count>0),[et]),ir=o.useMemo(()=>(zn||[]).filter(ye=>!Array.isArray(ye.tags)||ye.tags.length===0).length,[zn]),Tn=o.useMemo(()=>{const ye=(Kt||[]).map(qe=>({value:qe.$id||qe.id,label:qe.name,count:qe.count??0})).filter(qe=>qe.count>0);return ir>0&&ye.push({value:ap,label:"Untagged",count:ir}),ye},[Kt,ir]),Ct=o.useMemo(()=>(J||[]).map(ye=>ye.id),[J]),_r=o.useMemo(()=>(B||[]).map(ye=>ye.$id),[B]),Qn=ye=>{if(he)return;const qe=(ye||[]).map(Me=>{const Ve=rr.find(Je=>Je.value===Me);return{id:Me,name:Ve?Ve.label:Me}});se(qe),y(Me=>Me+1)},Ce=ye=>{if(he)return;const qe=(ye||[]).map(Me=>{const Ve=Tn.find(Je=>Je.value===Me);return{$id:Me,name:Ve?Ve.label:null}});U(qe),y(Me=>Me+1)},ut=rS(),[pn,Jt]=p.useState([]),In=o.useMemo(()=>ut?z4((zn||[]).map(ye=>{var qe;return(qe=ye.active_iteration)==null?void 0:qe.site})):[],[ut,zn]),Dn=ye=>{he||Jt(ye||[])},or=o.useCallback((ye,qe)=>{if(!qe)return ye||[];let Me=ye?[...ye]:[],Ve=[];const Je=qe.filter(dt=>dt.$optimistic),bt=dt=>{if(!dt)return"";try{const Rt=new URL(dt);let Vt=Rt.host+Rt.pathname;return Vt.endsWith("/")&&(Vt=Vt.slice(0,-1)),Vt.toLowerCase()}catch{let Vt=dt.replace(/^https?:\/\//i,"").split("?")[0].split("#")[0];return Vt.endsWith("/")&&(Vt=Vt.slice(0,-1)),Vt.toLowerCase()}},$e=[];return Je.forEach(dt=>{var Vt,Wt,On,Nn,tn;const Rt=Me.findIndex(br=>br.$id===dt.$id);
1953if(Rt!==-1){const br=Me[Rt],ca=br.name===dt.name,sa=br.active_iteration.url===dt.active_iteration.url,Gn=((Vt=br.active_iteration)==null?void 0:Vt.auto_preview_thumbnail)===((Wt=dt.active_iteration)==null?void 0:Wt.auto_preview_thumbnail),wr=dt.iteration_count||0,Er=br.iteration_count||0,Nr=wr>Er;(!ca||!sa||!Gn||Nr||dt.$optimistic_favorite!==void 0&&dt.is_favorited!==br.is_favorited)&&(Me[Rt]=dt,Ve.push(dt))}else{const br=bt((On=dt.active_iteration)==null?void 0:On.url);if((br==null?void 0:br.length)<3)return!1;const ca=Me.findIndex(sa=>{var Er;const Gn=sa.$client_request_id&&dt.$client_request_id&&sa.$client_request_id===dt.$client_request_id,wr=bt((Er=sa.active_iteration)==null?void 0:Er.url)===br;return Gn||wr});if(ca===-1)$e.push(dt);else{const sa=Me[ca];if(!((Nn=sa.active_iteration)!=null&&Nn.auto_preview_thumbnail)&&((tn=dt.active_iteration)!=null&&tn.auto_preview_thumbnail)){const Gn={...sa,active_iteration:{...sa.active_iteration,auto_preview_thumbnail:dt.active_iteration.auto_preview_thumbnail}};Me[ca]=Gn,Ve.push(Gn)}Qe.action.delete({tableID:"Assets-General-All",id:dt.$id})}}}),$e.length>0&&(Me=[...$e,...Me]),Ve.length>0&&Qe.action.set({tableID:r,dataList:Ve,options:{includeIndex:!1,skipClear:!0,preserveLocalDB:!0}}),Me},[r]);o.useEffect(()=>{if(zn===void 0)return;let ye=tYe(zn,{filterSet:xt,search:h.get("search")});pn.length>0&&(ye=ye.filter(qe=>{var Me;return Xte((Me=qe.active_iteration)==null?void 0:Me.site,pn)})),K(qe=>or(ye,qe))},[zn,xt,h,or,pn]),p.useEffect(()=>{const ye=rt.current!==m;(et.length===0&&Kt.length===0||ye)&&(ue(!0),Ae(!0)),rt.current=m;const qe=async()=>{var $e;const Ve=m?[{id:m,name:""}]:(($e=nt==null?void 0:nt.globalMeta)==null?void 0:$e.teams)||[],Je=async()=>{try{let dt=[],Rt=new Set;return Ve.length>0&&(await Promise.allSettled(Ve.map(Wt=>ec.getCollections({teamID:Wt.id}).then(On=>(Rt.add(Wt.id),On.map(Nn=>({...Nn,teamName:Wt.name,teamID:Wt.id,$team_id:Wt.id}))))))).forEach(Wt=>{Wt.status==="fulfilled"&&(dt=dt.concat(Wt.value))}),{explicitCollections:dt,successfulTeamIDs:Rt}}catch(dt){return console.error(dt),{explicitCollections:[],successfulTeamIDs:new Set}}},bt=async()=>{try{let dt=[],Rt=new Set;return Ve.length>0&&(await Promise.allSettled(Ve.map(Wt=>ec.getTags({teamID:Wt.id}).then(On=>(Rt.add(Wt.id),On.map(Nn=>({...Nn,teamName:Wt.name,teamID:Wt.id,$team_id:Wt.id}))))))).forEach(Wt=>{Wt.status==="fulfilled"&&(dt=dt.concat(Wt.value))}),{explicitTags:dt,successfulTeamIDs:Rt}}catch(dt){return console.error(dt),{explicitTags:[],successfulTeamIDs:new Set}}};try{const dt=new Promise((Nn,tn)=>{const br=setTimeout(()=>{clearTimeout(br),tn(new Error("Sidebar refresh timed out"))},1e4)}),[Rt,Vt,Wt]=await Promise.race([Promise.all([ec.getAllAssets({teamID:void 0,forceUpdate:!1,filterSet:[],optionsItem:{ignoreStale:!0}}),Je(),bt()]),dt]),On=async(Nn,tn,br)=>{const ca=tn.explicitCollections||[],sa=tn.successfulTeamIDs||new Set,Gn=br.explicitTags||[],wr=br.successfulTeamIDs||new Set,Er=Nn||[],Nr=at=>{var zt,cn,Mt;return(Mt=(cn=(zt=nt==null?void 0:nt.globalMeta)==null?void 0:zt.teams)==null?void 0:cn.find(kr=>kr.id===at))==null?void 0:Mt.name},Wr=new Map;ca.forEach(at=>{Wr.set(at.$id,{id:at.$id,$id:at.$id,name:at.name,teamName:at.teamName,teamID:at.teamID,$team_id:at.teamID,count:0})}),Er.forEach(at=>{if(at.collection_name&&at.$collection_id){if(m&&at.$team_id!==m)return;const zt=Wr.get(at.$collection_id);zt?(zt.count=(zt.count||0)+1,Wr.set(at.$collection_id,zt)):Wr.set(at.$collection_id,{id:at.$collection_id,$id:at.$collection_id,name:at.collection_name,teamID:at.$team_id,$team_id:at.$team_id,teamName:Nr(at.$team_id),count:1})}});const Ca=Array.from(Wr.values());try{const at=await Qe.base.table("Collections").toArray(),zt=new Map,cn=new Set;Ca.forEach(Mt=>{if(Mt.name&&Mt.$team_id){const kr=`${Mt.$team_id}|${Mt.name}`;zt.set(kr,Mt)}Mt.$id&&cn.add(Mt.$id)});for(const Mt of at){const kr=Mt.$team_id||Mt.teamID||Mt.id_team;if(kr&&sa.has(kr)&&!cn.has(Mt.$id)&&!Mt.$optimistic){await Qe.action.delete({tableID:"Collections",id:Mt.$id});continue}if(Mt.name&&Mt.$team_id){const Dr=`${Mt.$team_id}|${Mt.name}
1953`,es=zt.get(Dr);es&&Mt.$id!==es.$id&&await Qe.action.delete({tableID:"Collections",id:Mt.$id})}}}catch(at){console.warn("Dedupe collections failed",at)}Qe.action.set({tableID:"Collections",dataList:Ca,options:{skipClear:!0}});const Pr=new Map;Gn.forEach(at=>{Pr.set(at.$id,{id:at.$id,$id:at.$id,name:at.name,teamName:at.teamName,teamID:at.teamID,$team_id:at.teamID,count:0})}),Er.forEach(at=>{at.tags&&Array.isArray(at.tags)&&at.tags.forEach(zt=>{if(zt.$id&&zt.name){if(m&&at.$team_id!==m)return;const cn=Pr.get(zt.$id);cn?(cn.count=(cn.count||0)+1,Pr.set(zt.$id,cn)):Pr.set(zt.$id,{id:zt.$id,$id:zt.$id,name:zt.name,teamID:at.$team_id,$team_id:at.$team_id,teamName:Nr(at.$team_id),count:1})}})});const ge=Array.from(Pr.values());try{const at=await Qe.base.table("Tags").toArray(),zt=new Map,cn=new Set;ge.forEach(Mt=>{if(Mt.name&&Mt.$team_id){const kr=`${Mt.$team_id}|${Mt.name}`;zt.set(kr,Mt)}Mt.$id&&cn.add(Mt.$id)});for(const Mt of at){const kr=Mt.$team_id||Mt.teamID||Mt.id_team;if(kr&&wr.has(kr)&&!cn.has(Mt.$id)&&!Mt.$optimistic){await Qe.action.delete({tableID:"Tags",id:Mt.$id});continue}if(Mt.name&&Mt.$team_id){const Dr=`${Mt.$team_id}|${Mt.name}`,es=zt.get(Dr);es&&Mt.$id!==es.$id&&await Qe.action.delete({tableID:"Tags",id:Mt.$id})}}}catch(at){console.warn("Dedupe tags failed",at)}Qe.action.set({tableID:"Tags",dataList:ge,options:{skipClear:!0}})};On(Rt==null?void 0:Rt.list,Vt,Wt),Rt!=null&&Rt.$get_upcoming_list&&Rt.$get_upcoming_list.then(Nn=>{Nn!=null&&Nn.list&&On(Nn.list,Vt,Wt)}).catch(console.error)}catch(dt){console.error("Sidebar refresh failed",dt)}finally{ue(!1),Ae(!1)}};qe();const Me=()=>{qe()};return re.on("REFRESH_SIDEBAR_COUNTS",Me),()=>{re.remove("REFRESH_SIDEBAR_COUNTS")}},[t,m,ee,v,nt]),p.useEffect(()=>{var ye,qe;if(t&&m&&((ye=nt==null?void 0:nt.globalMeta)!=null&&ye.teams)&&String((qe=Pt==null?void 0:Pt.activeTeam)==null?void 0:qe.id)!==String(m)){const Me=nt.globalMeta.teams.find(Ve=>Ve.id===m);Me&&Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:Me.id,name:Me.name}})}},[m,t,nt,Pt]),p.useEffect(()=>{var Ve;if(!t||!m||!((Ve=nt==null?void 0:nt.globalMeta)!=null&&Ve.teams))return;const ye=nt.globalMeta.teams.find(Je=>Je.id===m);if(!(ye!=null&&ye.pending_seed)||BN.has(m))return;BN.add(m),Zn.dispatch({type:"auth/updateTeamField",data:{teamID:m,field:"pending_seed",value:!1}});const qe=Math.floor(Date.now()/1e3),Me=(UN.bookmarks||[]).map((Je,bt)=>{let $e=Je.url;try{$e=new URL(Je.url).hostname.replace(/^www\./,"")}catch{}return{$id:`temp-seed-${m}-${Je.seed_key}`,$client_request_id:`seed-${m}-${Je.seed_key}`,name:Je.title,type:"bookmark",$team_id:m,active_iteration:{url:Je.url,favicon_url:`https://www.google.com/s2/favicons?domain=${$e}`,auto_preview_thumbnail:Je.screenshot||null},$localDB:{$index:-1},$optimistic:!0,from_member:{created:{name:"You"},modified:{name:"You"}},tags:[{$id:`seed-tag-${UN.tag.seed_key}`,name:UN.tag.name}],$collection_id:null,collection_name:null,iteration_count:1,date_created:qe-bt,date_modified:qe-bt}});Promise.resolve(Qe.action.set({tableID:"Assets-General-All",dataList:Me,options:{includeIndex:!1,skipClear:!0,preserveLocalDB:!0}})).catch(()=>{}),pt(x0,Ze("users-team-create-seedStarter"))({teamID:m}).catch(()=>{BN.delete(m),Zn.dispatch({type:"auth/updateTeamField",data:{teamID:m,field:"pending_seed",value:!0}})})},[m,t,nt]);const Zt=o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card"},o.createElement("h5",{className:"dark__text"},"No bookmarks found within the selected"," ",J.length>0&&B.length>0?"Collections and Tags":J.length>0?"Collections":"Tags",t&&((Cn=Pt==null?void 0:Pt.activeTeam)!=null&&Cn.name)?o.createElement(o.Fragment,null," for ",o.createElement("strong",null,Pt.activeTeam.name)):"","."),o.createElement("div",{className:"flex flex-col sm:flex-row gap-2"},t?o.createElement(De,{className:"mt-4",icon:o.createElement(Gge,{size:14}),text:"Show the Bookmarks from All Workspaces",onClick:()=>{Zn.dispatch({type:"ui/setUser_allTeam"});let ye="/workspace/all/bookmarks/updated";e.list==="recently-viewed"?ye="/workspace/all/bookmarks/recently-viewed":e.list==="favorited"&&(ye="/workspace/all/bookmarks/starred"),Et({pathname:ye,search:h.toString()})}}):null,o.createElement(De,{className:"mt-4",icon:o.createElement(wm,{size:14}),text:"Clear Filters",onClick:()=>{se([]),U([]),y(v+1)}})))),tr=(ye,qe={collection:[],tags:[],forceUpdateOverride:null})=>{let Me=ta.clone(l??[]);const Ve=(qe.collection||[]).filter(Rt=>Rt&&Rt.id).map(Rt=>Rt.id);Ve.length>0&&Me.push({type:"array-containment",key:"$collection_id",value:Ve}),qe.tags&&qe.tags.length>0&&Me.push({type:"array-intersection",key:"tags",value:qe.tags});const Je=(qe.tags||[]).map(Rt=>
1953Rt.$id).filter(Boolean),bt=[];Ve.length>0&&bt.push({type:"set",key:"collection",value:Ve.join(",")}),Je.length>0&&bt.push({type:"set",key:"tag",value:Je.join(",")}),Fe(bt,{method:"streamlined",reset:["collection","tag","collection_id","collection_name","tag_id","tag_name"]});const $e=h.get("search");let dt;$e?dt=ec.searchAssets({query:$e,teamID:t?ye:void 0,onProgress:L,filterSet:Me}):dt=ec.getAllAssets({teamID:t?ye:void 0,triggerPath:a,forceUpdate:qe.forceUpdateOverride!==null?qe.forceUpdateOverride:k,filterSet:Me,onProgress:L}),dt.then(({is_syncing:Rt,last_download_time:Vt,$get_upcoming_list:Wt})=>{if(x(Vt),C(!1),Rt){T(!0);const On=2e4,Nn=new Promise((tn,br)=>{setTimeout(()=>br({error:new Error("The server took too long to respond. Please try again.")}),On)});Promise.race([Wt,Nn]).then(()=>{T(!1),L(null),N(!1),x(Math.floor(Date.now()/1e3)),re.dispatch("REFRESH_SIDEBAR_COUNTS"),Y(!0)}).catch(({error:tn})=>{console.error("error",tn),T(!1),L(null),Y(!0),(tn==null?void 0:tn.code)!=="functions/unauthenticated"&&re.dispatch("trigger-alert",{message:(tn==null?void 0:tn.message)||"Hmm...something unexpected happened. Try again.",intent:"danger"})})}else L(null),Y(!0)}).catch(Rt=>{console.error("Error fetching assets:",Rt),T(!1),L(null),Y(!0)})},Fe=(ye,qe={})=>{var Ve;const Me=new URLSearchParams(h);if((Ve=qe.reset)==null||Ve.forEach(Je=>Me.delete(Je)),qe.method==="streamlined")ye.forEach(Je=>{Je.type==="array"?Je.value.forEach(bt=>Me.append(Je.key,bt)):Me.set(Je.key,Je.value)});else for(let[Je,bt]of Object.entries(ye))Me.set(Je,bt);Me.toString()!==h.toString()&&g(Me)};p.useEffect(()=>{var ye;localStorage.setItem("userLoader-listType",e.list),Jn.analyticsPage({userId:(ye=nt==null?void 0:nt.user)==null?void 0:ye.uid,name:"Asset Lists - Main",properties:{listType:e.list}})},[]),p.useEffect(()=>{var qe,Me;let ye=!!((Me=(qe=nt==null?void 0:nt.globalMeta)==null?void 0:qe.teams)!=null&&Me.find(Ve=>String(Ve.id)===String(ee)))||!t;E(ye),u.action({type:"sibling-header",subType:"currentteam-set-match-assetslist-ismemberofcurrentteam",dataSet:{isMemberOfCurrentTeam:ye,isSpecific:t}})},[nt,ee]),p.useEffect(()=>{let ye=J,qe=B;const Me=tE(h),Ve=Me.collectionIds,Je=Me.tagIds;if(v===0&&(Ve.length>0||Je.length>0)){if(Ve.length>0){const Rt=Ve.map(On=>{const Nn=(et||[]).find(tn=>tn.id===On||tn.$id===On);return{id:On,name:Nn?Nn.name:On}}),Vt=(J||[]).map(On=>On.id).sort().join(","),Wt=Rt.map(On=>On.id).sort().join(",");Vt!==Wt&&(se(Rt),ye=Rt)}if(Je.length>0){const Rt=Je.map(On=>{const Nn=(Kt||[]).find(tn=>tn.$id===On||tn.id===On);return{$id:On,name:Nn?Nn.name:null}}),Vt=B.map(On=>On.$id).sort().join(","),Wt=Rt.map(On=>On.$id).sort().join(",");Vt!==Wt&&(U(Rt),qe=Rt)}}else m!==ee&&(se([]),U([]),ye=[],qe=[]);oe(m||null);const bt=A.current;A.current=!1;const $e=e.list==="recently-viewed";tr(m,{collection:ye,tags:qe,forceUpdateOverride:bt||$e&&v===0?!0:null})},t?[m,v,h,J,B]:[v,h,J,B]),p.useEffect(()=>{const ye=()=>{C(!0),A.current=!0,y(qe=>qe+1)};return re.on("REFRESH_ASSETS_LIST",ye),()=>{re.remove("REFRESH_ASSETS_LIST")}},[]),p.useEffect(()=>{const ye=Me=>{const{type:Ve,data:Je}=Me;let bt=Je;Ve==="add"?Qe.action.set({tableID:"Collections",dataList:[{$id:bt.id,id:bt.id,name:bt.name,teamID:bt.teamID,count:0,$optimistic:!0}],options:{skipClear:!0}}):Ve==="delete"?Qe.action.delete({tableID:"Collections",id:bt.id}):Ve==="rename"&&Qe.Collections.update(bt.id,{name:bt.name})},qe=Me=>{const{type:Ve,data:Je}=Me,bt=Je.id||Je.$id;Ve==="add"?Qe.action.set({tableID:"Tags",dataList:[{$id:bt,id:bt,name:Je.name,teamID:Je.teamID||Je.$team_id,count:0,$optimistic:!0}],options:{skipClear:!0}}):Ve==="delete"&&Qe.action.delete({tableID:"Tags",id:bt})};return re.on("MANAGE_COLLECTION_UPDATE",ye),re.on("MANAGE_TAG_UPDATE",qe),()=>{re.remove("MANAGE_COLLECTION_UPDATE",ye),re.remove("MANAGE_TAG_UPDATE",qe)}},[]),p.useEffect(()=>{var ye,qe,Me,Ve,Je,bt,$e,dt,Rt,Vt,Wt,On,Nn,tn,br,ca,sa;if((d==null?void 0:d.type)==="body"&&(d==null?void 0:d.subType)==="assetlist-refreshtable"){if((ye=d==null?void 0:d.settings)!=null&&ye.isOptimistic){const{asset:Gn,actionType:wr}=d.settings;if(wr==="add"){if(Gn!=null&&Gn.$team_id){const Er=Gn.$team_id,Nr=`/workspace/${Er}/bookmarks/updated`;if(String(Er)!==String(m)||!t||!window.location.pathname.match(/\/workspace\/([^/]+)\/bookmarks\/updated/)){const Wr=(Me=(qe=nt==null?void 0:nt.globalMeta)==null?void 0:qe.teams)==null?void 0:Me.find(Ca=>String(Ca.id)===String(Er));Wr&&Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:Wr.id,name:Wr.name}}),Et(`${Nr}?sort=default:desc&sync=true`)}}(!t||t&&String(Gn.$team_id)===String(m))&&K(Er=>{const Nr=Er?[...Er]:[];return Nr.some(Wr=>Wr.$id===Gn.$id)?Nr:[Gn,...Nr]})}else wr==="edit"&&K(Er=>{const Nr=Er?[...Er]:[],Wr=Nr.findIndex(Ca=>Ca.$id===Gn.$id);return Wr!==-1?(Nr[Wr]=Gn,Nr):Er});C(!0),A.current=!0,y(v+1)}else C(((Ve=d==null?void 0:d.settings)==null?void 0:Ve.forceUpdate)||!1),y(v+1);f()}else if((d==null?void 0:d.type)==="body"&&(d==null?void 0:d.subType)==="assetlist-fullReset")y(0),N(!1),C(!1),T(!1),se([]),U([]),f();else if((d==null?void 0:d.type)==="body"&&(d==null?void 0:d.subType)==="assetlist-clearCollectionsTags"&&((Je=d==null?void 0:d.settings)!=null&&Je.clearTarget))d.settings.clearTarget==="collection"?se([]):d.settings.clearTarget==="tag"?U(B.filter(Gn=>{var wr;return Gn.$id!==((wr=d==null?void 0:d.settings)==null?void 0:wr.targetTag)})):d.settings.clearTarget==="all"&&(se([]),U([])),C(!0),y(v+1),f();else if((d==null?void 0:d.type)==="body"&&(d==null?void 0:d.subType)==="assetlist-adjustselectedcollectiontags"){if(((dt=($e=(bt=d==null?void 0:d.settings)==null?void 0:bt.actionMeta)==null?void 0:$e.external)==null?void 0:dt.targetType)==="EditCollection"&&((Wt=(Vt=(Rt=d==null?void 0:d.settings)==null?void 0:Rt.actionMeta)==null?void 0:Vt.internal)!=null&&Wt.assetName)&&(J!=null&&J.some(Gn=>{var wr,Er,Nr,Wr;return Gn.id===((Wr=(Nr=(Er=(wr=d==null?void 0:d.settings)==null?void 0:wr.actionMeta)==null?void 0:Er.external)==null?void 0:Nr.targetAsset)==null?void 0:Wr.$id)}))){const Gn=J.map(wr=>{var Er,Nr,Wr,Ca;return wr.id===((Ca=(Wr=(Nr=(Er=d==null?void 0:d.settings)==null?void 0:Er.actionMeta)==null?void 0:Nr.external)==null?void 0:Wr.targetAsset)==null?void 0:Ca.$id)?{...wr,name:d.settings.actionMeta.internal.assetName}:wr});se(Gn)}else if(((tn=(Nn=(On=d==null?void 0:d.settings)==null?void 0:On.actionMeta)==null?void 0:Nn.external)==null?void 0:tn.targetType)==="EditTag"&&((sa=(ca=(br=d==null?void 0:d.settings)==null?void 0:br.actionMeta)==null?void 0:ca.internal)!=null&&sa.assetName)&&(B==null?void 0:B.length)>0&&B.find(Gn=>{var wr,Er,Nr,Wr;return Gn.$id===((Wr=(Nr=(Er=(wr=d==null?void 0:d.settings)==null?void 0:wr.actionMeta)==null?void 0:Er.external)==null?void 0:Nr.targetAsset)==null?void 0:Wr.$id)})){let Gn=B;Gn[B==null?void 0:B.findIndex(wr=>wr.$id===d.settings.actionMeta.external.targetAsset.$id)].name=d.settings.actionMeta.internal.assetName,U(Gn)}f()}},[d,t,ee,v]);const[st,gt]=p.useState(((Hn=tE(h).sort)==null?void 0:Hn.mode)||c||"default"),[ht,Ee]=p.useState(((Re=tE(h).sort)==null?void 0:Re.ascending)??!1),We=o.useRef(!1);o.useEffect(()=>{if(!We.current){We.current=!0;return}g(ye=>nre(ye,{sort:{mode:st,ascending:ht}}),{replace:!0})},[st,ht,g]);const it=200,[_t,vn]=p.useState(()=>{const ye=localStorage.getItem("sidebarWidth");return ye?parseInt(ye,10):it}),An=ye=>{vn(ye),localStorage.setItem("sidebarWidth",ye)},[je,kt]=p.useState(!1),[Lt,ne]=p.useState(()=>typeof window>"u"||window.innerWidth<1280?!1:localStorage.getItem("bookmarks-mb-collections")==="true"||localStorage.getItem("bookmarks-mb-tags")==="true"),[Be,mt]=p.useState(()=>localStorage.getItem("bookmarks-middlebar-side")==="right"?"right":"left"),we=o.useRef({}),vt=(ye,qe)=>{if(ye==="rename"){const{id:Me,name:Ve}=qe;if(Qe.base.Collections.update(Me,{name:Ve}),z){const Je=z.map($e=>$e.$collection_id===Me?{...$e,collection_name:Ve}:$e);K(Je);const bt=Je.filter($e=>$e.$collection_id===Me);bt.length>0&&(Qe.action.set({tableID:"Assets-General-All",dataList:bt,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&Qe.action.set({tableID:r,dataList:bt,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}))}}else if(ye==="delete"){const{id:Me,snapshot:Ve}=qe;if(we.current[Me]={entity:Ve,assets:(z||[]).filter(Je=>Je.$collection_id===Me)},Qe.action.delete({tableID:"Collections",id:Me}),z){const Je=z.filter($e=>$e.$collection_id===Me).map($e=>({...$e,collection_name:null,$collection_id:null})),bt=z.map($e=>$e.$collection_id===Me?{...$e,collection_name:null,$collection_id:null}:$e);K(bt),Je.length>0&&(Qe.action.set({tableID:"Assets-General-All",dataList:Je,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&Qe.action.set({tableID:r,dataList:Je,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}))}}else if(ye==="add"){const{id:Me,name:Ve,teamID:Je,teamName:bt}=qe;Qe.action.set({tableID:"Collections",dataList:[{$id:Me,id:Me,name:Ve,teamID:Je,$team_id:qe.$team_id||Je,teamName:bt,count:0,$optimistic:!0}],options:{skipClear:!0}})}else if(ye==="add-reconcile"){const{tempID:Me,collection:Ve}
1953=qe,Je=Ve.id||Ve.$id;Qe.base.transaction("rw","Collections",async()=>{const bt=Qe.base.Collections;await bt.delete(Me),await bt.put({$id:Je,id:Je,name:Ve.name,teamID:Ve.teamID||Ve.$team_id,$team_id:Ve.$team_id||Ve.teamID,teamName:Ve.teamName,count:0,$optimistic:!0})}).catch(bt=>{console.error("Collection add-reconcile failed",bt)})}else if(ye==="add-rollback"){const{id:Me}=qe;Qe.action.delete({tableID:"Collections",id:Me})}else if(ye==="delete-rollback"){const{id:Me}=qe,Ve=we.current[Me];if(!Ve)return;if(delete we.current[Me],Ve.entity){const Je=Ve.entity;Qe.action.set({tableID:"Collections",dataList:[{$id:Je.id||Je.$id,id:Je.id||Je.$id,name:Je.name,teamID:Je.teamID||Je.$team_id,$team_id:Je.$team_id||Je.teamID,teamName:Je.teamName,count:Je.count||0,$optimistic:!0}],options:{skipClear:!0}})}if(Ve.assets&&Ve.assets.length>0){const Je=new Map(Ve.assets.map(bt=>[bt.$id,bt]));K(bt=>(bt||[]).map($e=>Je.get($e.$id)||$e)),Qe.action.set({tableID:"Assets-General-All",dataList:Ve.assets,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&Qe.action.set({tableID:r,dataList:Ve.assets,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}})}}else ye==="delete-commit"&&delete we.current[qe.id]},It=(ye,qe)=>{if(ye==="add")Qe.action.set({tableID:"Tags",dataList:[{$id:qe.id||qe.$id,id:qe.id||qe.$id,name:qe.name,teamID:qe.teamID||qe.$team_id,$team_id:qe.$team_id||qe.teamID,count:0,$optimistic:!0}],options:{skipClear:!0}});else if(ye==="add-reconcile"){const{tempID:Me,tag:Ve}=qe,Je=Ve.id||Ve.$id;Qe.base.transaction("rw","Tags",async()=>{const bt=Qe.base.Tags;await bt.delete(Me),await bt.put({$id:Je,id:Je,name:Ve.name,teamID:Ve.teamID||Ve.$team_id,$team_id:Ve.$team_id||Ve.teamID,count:0,$optimistic:!0})}).catch(bt=>{console.error("Tag add-reconcile failed",bt)})}else if(ye==="add-rollback"){const{id:Me}=qe;Qe.action.delete({tableID:"Tags",id:Me})}else if(ye==="rename"){const{id:Me,name:Ve}=qe;if(Qe.base.Tags.update(Me,{name:Ve}),z){const Je=z.map($e=>$e.tags&&$e.tags.some(dt=>dt.$id===Me)?{...$e,tags:$e.tags.map(dt=>dt.$id===Me?{...dt,name:Ve}:dt)}:$e);K(Je);const bt=Je.filter($e=>$e.tags&&$e.tags.some(dt=>dt.$id===Me));bt.length>0&&Qe.action.set({tableID:"Assets-General-All",dataList:bt,options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}})}}else if(ye==="delete"){const{id:Me,snapshot:Ve}=qe;if(we.current[Me]={entity:Ve,assets:(z||[]).filter(Je=>Je.tags&&Je.tags.some(bt=>bt.$id===Me||bt.id===Me))},Qe.action.delete({tableID:"Tags",id:Me}),z){const Je=z.map(bt=>bt.tags&&bt.tags.some($e=>$e.$id===Me||$e.id===Me)?{...bt,tags:bt.tags.filter($e=>$e.$id!==Me&&$e.id!==Me)}:bt);K(Je)}}else if(ye==="delete-rollback"){const{id:Me}=qe,Ve=we.current[Me];if(!Ve)return;if(delete we.current[Me],Ve.entity){const Je=Ve.entity;Qe.action.set({tableID:"Tags",dataList:[{$id:Je.id||Je.$id,id:Je.id||Je.$id,name:Je.name,teamID:Je.teamID||Je.$team_id,$team_id:Je.$team_id||Je.teamID,count:Je.count||0,$optimistic:!0}],options:{skipClear:!0}})}if(Ve.assets&&Ve.assets.length>0){const Je=new Map(Ve.assets.map(bt=>[bt.$id,bt]));K(bt=>(bt||[]).map($e=>Je.get($e.$id)||$e))}}else ye==="delete-commit"&&delete we.current[qe.id]},fn=ye=>{pe(ye.active.data.current)},Ne=async(ye,qe)=>{me(!0);try{const Me=pt(x0,Ze("users-asset-manage-edit"));K(Je=>Je.map(bt=>bt.$id===ye.$id?{...bt,$collection_id:qe.id,collection_name:qe.name}:bt)),await Me({asset:{$id:ye.$id,id_collection:qe.id},silent_log:!0});const Ve={...ye,$collection_id:qe.id,collection_name:qe.name};await Qe.action.set({tableID:"Assets-General-All",dataList:[Ve],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&Qe.action.set({tableID:r,dataList:[Ve],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),re.dispatch("trigger-alert",{message:"Bookmark moved to collection.",intent:"success"}),re.dispatch("REFRESH_SIDEBAR_COUNTS")}catch(Me){console.error(Me),re.dispatch("trigger-alert",{message:"Failed to move bookmark.",intent:"danger"}),C(!0),y(Ve=>Ve+1)}finally{me(!1)}},lt=async ye=>{me(!0);try{const qe=pt(x0,Ze("users-asset-manage-edit"));K(Ve=>Ve.map(Je=>Je.$id===ye.$id?{...Je,$collection_id:null,collection_name:null}:Je)),await qe({asset:{$id:ye.$id,id_collection:null},silent_log:!0});const Me={...ye,$collection_id:null,collection_name:null};await Qe.action.set({tableID:"Assets-General-All",dataList:[Me],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&Qe.action.set({tableID:r,dataList:[Me],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),re.dispatch("trigger-alert",{message:"Bookmark removed from collection.",intent:"success"}),re.dispatch("REFRESH_SIDEBAR_COUNTS")}catch(qe){console.error(qe),re.dispatch("trigger-alert",{message:"Failed to remove bookmark from collection.",intent:"danger"}),C(!0),y(Me=>Me+1)}finally{me(!1)}},wt=ye=>{var bt;const{active:qe,over:Me}=ye;if(pe(null),!Me||qe.id===Me.id)return;const Ve=qe.data.current,Je=Me.data.current;if(Je.type==="collection"){if(Ve.$collection_id===Je.id){lt(Ve);return}if(!Ve.$collection_id){Ne(Ve,Je);return}X({asset:Ve,targetCollection:Je}),q(!0)}else Je.type==="tag"&&(((bt=Ve.tags)==null?void 0:bt.some(dt=>dt.$id===(Je.id||Je.$id)))?vr(Ve,Je):ln(Ve,Je))},Ke=()=>{pe(null)},St=async()=>{te&&(await Ne(te.asset,te.targetCollection),q(!1),X(null))},ln=async(ye,qe)=>{var Me;K(Ve=>Ve.map(Je=>{if(Je.$id===ye.$id){const bt=Je.tags?[...Je.tags,qe]:[qe];return{...Je,tags:bt}}return Je}));try{const Ve=pt(x0,Ze("users-asset-manage-edit")),Je=((Me=ye.tags)==null?void 0:Me.map($e=>$e.$id))||[];await Ve({asset:{$id:ye.$id,id_collection:ye.$collection_id||null,id_tags:[...Je,qe.id||qe.$id]},silent_log:!0});const bt={...ye,tags:ye.tags?[...ye.tags,qe]:[qe]};Qe.action.set({tableID:"Assets-General-All",dataList:[bt],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&Qe.action.set({tableID:r,dataList:[bt],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),re.dispatch("trigger-alert",{message:"Tag added to bookmark.",intent:"success"}),re.dispatch("REFRESH_SIDEBAR_COUNTS")}catch(Ve){console.error(Ve),re.dispatch("trigger-alert",{message:"Failed to add tag.",intent:"danger"}),C(!0),y(Je=>Je+1)}},vr=async(ye,qe)=>{var Ve,Je;
1953const Me=qe.id||qe.$id;K(bt=>bt.map($e=>{var dt;if($e.$id===ye.$id){const Rt=((dt=$e.tags)==null?void 0:dt.filter(Vt=>Vt.$id!==Me))||[];return{...$e,tags:Rt}}return $e}));try{const bt=pt(x0,Ze("users-asset-manage-edit")),$e=((Ve=ye.tags)==null?void 0:Ve.filter(Rt=>Rt.$id!==Me).map(Rt=>Rt.$id))||[];await bt({asset:{$id:ye.$id,id_collection:ye.$collection_id||null,id_tags:$e},silent_log:!0});const dt={...ye,tags:((Je=ye.tags)==null?void 0:Je.filter(Rt=>Rt.$id!==Me))||[]};await Qe.action.set({tableID:"Assets-General-All",dataList:[dt],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),r&&await Qe.action.set({tableID:r,dataList:[dt],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),re.dispatch("trigger-alert",{message:"Tag removed from bookmark.",intent:"success"}),re.dispatch("REFRESH_SIDEBAR_COUNTS")}catch(bt){console.error(bt),re.dispatch("trigger-alert",{message:"Failed to remove tag.",intent:"danger"}),C(!0),y($e=>$e+1)}};return!(nt!=null&&nt.isLive)&&!((ot=nt==null?void 0:nt.user)!=null&&ot.uid)?null:o.createElement(Ob,{sensors:Se,collisionDetection:qze,onDragStart:fn,onDragEnd:wt,onDragCancel:Ke},o.createElement("div",{className:`asset-list ${s.container} flex h-full min-h-0 overflow-hidden relative`},je&&o.createElement("div",{className:"fixed inset-0 bg-black/50 z-40 sm:hidden animate-fade-in",onClick:()=>kt(!1)}),o.createElement("div",{className:` 1954 fixed inset-y-0 left-0 z-50 h-full bg-white dark:bg-gray-800 transition-transform duration-300 ease-in-out shadow-2xl sm:shadow-none 1955 pt-[env(safe-area-inset-top,0px)] pb-[env(safe-area-inset-bottom,0px)] pl-[env(safe-area-inset-left,0px)] 1956 ${je?"translate-x-0":"-translate-x-full"} 1957 sm:relative sm:translate-x-0 sm:z-0 sm:flex-shrink-0 sm:min-h-0 sm:overflow-hidden sm:h-full sm:p-0 1958 transition-opacity duration-300 1959 `},he&&o.createElement("div",{className:"absolute inset-0 z-[60] bg-white/30 dark:bg-gray-800/30 backdrop-blur-[1px] cursor-not-allowed",onClick:ye=>{ye.preventDefault(),ye.stopPropagation()},title:"Sidebar is disabled during bulk management"}),o.createElement("div",{className:"h-full min-h-0 overflow-hidden transition-opacity duration-300",style:{opacity:he?.5:1}},o.createElement(Xqe,{sortMode:st,setSortMode:gt,sortIsAscending:ht,setSortIsAscending:Ee,containerWidth:_t,setContainerWidth:An,collections:et,tags:Kt,selectedCollections:J,onSelectCollections:ye=>{he||(se(ye),y(qe=>qe+1))},selectedTags:B,onSelectTags:ye=>{he||(U(ye),y(qe=>qe+1))},onCollectionUpdate:vt,onTagUpdate:It,activeTeamID:ee,isLoadingCollections:be,isLoadingTags:Ie,activeDragItem:ae,isManageMode:he,onMiddlebarOpenChange:ne,onMiddlebarSideChange:mt}))),o.createElement("div",{className:"sm:hidden absolute z-30 left-2 top-[calc(3px+env(safe-area-inset-top,0px))]"},o.createElement(De,{icon:o.createElement(dge,{size:16}),variant:"minimal",className:"bg-white/90 dark:bg-gray-800/90 backdrop-blur shadow-sm border border-gray-200 dark:border-gray-700 !rounded-md min-h-[44px] min-w-[44px]",onClick:()=>kt(!0)}),(J.length>0||B.length>0)&&o.createElement("span",{className:"absolute -top-0 -right-0 flex h-2 w-2 z-40 pointer-events-none"},o.createElement("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-yellow-400 opacity-75"}),o.createElement("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-yellow-500 border border-white dark:border-gray-900"}))),o.createElement("div",{className:"flex-grow min-h-0 overflow-y-auto overscroll-y-contain no-scrollbar relative"},nt!=null&&nt.isLive||(jt=nt==null?void 0:nt.user)!=null&&jt.uid?b?(z==null?void 0:z.length)>0?o.createElement(Z4,{dataItems:z||[],refreshTable:ye=>{var Je,bt;const{forceUpdate:qe,actionType:Me,asset:Ve}=ye||{};if(qe&&(A.current=!0),Me==="add"&&Ve){const $e=Ve.$team_id;(!t||ee&&String($e)===String(ee))&&K(Rt=>{const Vt=Rt||[];return Vt.some(Wt=>Wt.$id===Ve.$id)?Vt:[Ve,...Vt]}),C(!0)}if(Me==="add"&&(Ve!=null&&Ve.$team_id)){const $e=Ve.$team_id,dt=`/workspace/${$e}/bookmarks/updated`;if(String($e)!==String(ee)||!t||!window.location.pathname.match(/\/workspace\/([^/]+)\/bookmarks\/updated/)){const Rt=(bt=(Je=nt==null?void 0:nt.globalMeta)==null?void 0:Je.teams)==null?void 0:bt.find(Vt=>String(Vt.id)===String($e));Rt&&Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:Rt.id,name:Rt.name}}),Et({pathname:dt,search:h.toString()})}}N((ye==null?void 0:ye.isSkipReload)||!1),y($e=>$e+1)},associatedTeamID:t?ee:"all",childTableActions:$,parentState:{setUpdateCount:y,isMinorLoading:O,lastDownloadTime:w},settings:{...dm[t?"TeamSpecific":"TeamAll"][e.list],featureFlags:hn},enable:{sortable:!0,refreshButton:!0},external:{...u,action:ye=>{var qe;if(ye.type==="open-collection"){if(he)return;const Me=et.find(Ve=>Ve.id===ye.dataSet.$collection_id);Me&&(se([Me]),y(Ve=>Ve+1),U([]))}else if(ye.type==="open-tag"){if(he)return;const Me=Kt.find(Ve=>Ve.$id===ye.dataSet.tagItem.$id||Ve.id===ye.dataSet.tagItem.$id);Me&&(U([Me]),y(Ve=>Ve+1),se([]))}else(qe=u==null?void 0:u.action)==null||qe.call(u,ye)}},sortMode:st,setSortMode:gt,sortIsAscending:ht,setSortIsAscending:Ee,activeDragItemID:ae==null?void 0:ae.$id,isManageMode:he,setIsManageMode:_e,selectedAssetIDs:ie,setSelectedAssetIDs:Ue,collectionFilterOptions:rr,tagFilterOptions:Tn,selectedCollectionIds:Ct,selectedTagIds:_r,onCollectionFilterChange:Qn,onTagFilterChange:Ce,siteFilterEnabled:ut,siteTree:In,selectedSiteTokens:pn,onSiteFilterChange:Dn,isMiddlebarOpen:Lt,middlebarSide:Be}):(z==null?void 0:z.length)>0||H?J.length>0||B.length>0?Zt:h.get("search")?o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto
1959sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card"},o.createElement("h5",{className:"dark__text"},'No results found for "',h.get("search"),'"'))):o.createElement("div",null,i.noAssetsFound):(J.length>0||B.length>0)&&(v===0&&!O||v!==0)?Zt:o.createElement("div",{className:"pl-10 py-4 sm:p-4 flex flex-row items-center justify-right whitespace-nowrap gap-3 dark__text"},o.createElement("span",{className:"text-xs text-gray-500 font-medium tracking-wide shadow-sm"},(M==null?void 0:M.message)||"Fetching from the cloud"),o.createElement(Vq,{className:"w-32",value:(M==null?void 0:M.state)==="fetching"?D:(M==null?void 0:M.value)!==void 0?M.value:null,intent:(M==null?void 0:M.value)!==void 0?"primary":"none",animate:!0,stripes:!0})):o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card"},o.createElement("h5",{className:"dark__text"},"You are not a member of this workspace. If you have the workspace invitation code,",o.createElement(ci,{to:"/workspace/join",className:"ml-1"},o.createElement("span",null,"join the workspace."))))):null),o.createElement("div",{id:"bookmarks-middlebar-rightdock",className:"h-full flex flex-shrink-0"})),o.createElement(tVe,{modifiers:[({transform:ye})=>({...ye,x:ye.x+150,y:ye.y+100})]},ae?(()=>{var Me,Ve;const qe=(((Ve=(Me=nt==null?void 0:nt.globalMeta)==null?void 0:Me.teams)==null?void 0:Ve.length)||0)>1&&ae.$team_id?is.getColor(ae.$team_id):void 0;return o.createElement(jn,{elevation:qn.TWO,className:fe?Xr:"",style:{padding:"8px 12px",width:"auto",maxWidth:"250px",cursor:"grabbing",zIndex:9999,backgroundColor:fe?"#292143":"#fff",border:qe?`1px solid ${qe}`:fe?"1px solid #4a3b7d":"1px solid #eee",borderLeft:qe?`4px solid ${qe}`:void 0}},o.createElement("div",{className:"flex items-center gap-2"},ae.favicon?o.createElement("img",{src:ae.favicon,width:"16",height:"16",alt:"",className:"rounded-sm"}):o.createElement(Ft,{icon:"document",size:16,className:fe?"text-gray-400":""}),o.createElement("span",{className:`font-semibold text-sm truncate ${fe?"text-white":"text-gray-800"}`},ae.name)))})():null),o.createElement(ya,{isOpen:W,onClose:()=>q(!1),title:"Move Bookmark",className:fe?Xr:"",canOutsideClickClose:!1},o.createElement("div",{className:Fs},o.createElement("p",null,"Are you sure you want to move"," ",o.
1959createElement("strong",null,(En=te==null?void 0:te.asset)==null?void 0:En.name)," to collection"," ",o.createElement("strong",null,(ar=te==null?void 0:te.targetCollection)==null?void 0:ar.name),"?")),o.createElement("div",{className:Hi},o.createElement("div",{className:Vi},o.createElement(De,{onClick:()=>q(!1)},"Cancel"),o.createElement(De,{intent:jr.PRIMARY,onClick:St,loading:le},"Move")))))},jN={LastUpdated:lp(dm.TeamAll.LastUpdated),RecentlyViewed:lp(dm.TeamAll.RecentlyViewed),Favorited:lp(dm.TeamAll.Favorited)},WN={LastUpdated:lp(dm.TeamSpecific.LastUpdated),RecentlyViewed:lp(dm.TeamSpecific.RecentlyViewed),Favorited:lp(dm.TeamSpecific.Favorited)},f_=cYe;Ts();const uYe=Ir(xr()),dYe=()=>{var g;const{collectionID:e}=xs(),[t,n]=p.useState(0),[r,a]=p.useState(""),[s,i]=p.useState(null),[l,c]=p.useState([]),[u,d]=p.useState(null),f=yr(),m=Wn(v=>{var y;return(y=v==null?void 0:v.FB)==null?void 0:y.auth}),h=v=>{re.dispatch("interstitial-run","on"),a(""),i(null),c([]),d(null),pt(uYe,Ze("users-collection-view-content"))({collectionID:v}).then(({data:y})=>{a(y.output.name),i(y.output.team),c(y.output.ancestry),d(y.output.$content),re.dispatch("select-current-team",{teamID:y.output.team.$id}),re.dispatch("interstitial-run","off")}).catch(y=>{console.error("errorItem",y),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:y.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})};return p.useEffect(()=>{h(e)},[t,e]),o.createElement("div",{className:"asset-list asset-list-updated"},u&&(m!=null&&m.isLive)?(u==null?void 0:u.length)>0?o.createElement("div",null,o.createElement(Z4,{associatedTeamID:s==null?void 0:s.$id,containerItem:{type:"collection",data:{$id:e,name:r,$team_id:s==null?void 0:s.$id,team_name:s==null?void 0:s.name,$collection_id:(g=l==null?void 0:l[l.length-1])!=null&&g.$id?l[l.length-1].$id:null,ancestry:l}},dataItems:u,hideColumns:{collections:!1},refreshTable:()=>{n(t+1)},enable:{filterable:!0,sortable:!0},external:{action:({type:v=null,dataSet:y={},callback:b=ta.noop})=>{v==="open-asset-url"?(f_({type:{list:"recently-viewed",teamCount:"all"}}),f_({type:{list:"recently-viewed",teamCount:"specific"}})):v==="toggle-asset-favorite"?(localStorage.removeItem("assetList-lastDownload"),localStorage.removeItem("assetsGeneral-lastDownload")):v==="open-tag"&&f({pathname:`${Pn("/workspace/:teamID/search",{teamID:y.$team_id})}`,search:`?${Gp({tag:[y.tagItem.$id]})}`})}}})):o.createElement("div",{className:"flex min-h-full flex-col justify-center px-10 mt-4 dark__text"},"There are no shared bookmarks in this collection."):null)};Ts();const gH=Ir(xr()),fYe=({external:e,sibling_meta_action:t={},sibling_meta_reset:n})=>{var C;const{organizationID:r}=xs(),[a,s]=p.useState(""),[i,l]=p.useState({}),[c,u]=p.useState([]),[d,f]=p.useState(!1),[m,h]=p.useState(0),g=yr(),v=Wn(A=>{var O;return(O=A==null?void 0:A.FB)==null?void 0:O.auth}),{handleSubmit:y,register:b,setValue:E,watch:w,formState:{errors:x}}=fc({defaultValues:{organizationName:a}});fc({});const S=A=>{re.dispatch("interstitial-run","on"),pt(gH,Ze("users-organization-view-manage"))({organizationID:A}).then(({data:O})=>{s(O.output.name),l(O.output.active_subscription),E("organizationName",O.output.name),u(O.output.teams),re.dispatch("interstitial-run","off")}).catch(O=>{console.error("errorItem",O),re.dispatch("interstitial-run","off")})};p.useEffect(()=>{var A;Jn.analyticsPage({userId:(A=v==null?void 0:v.user)==null?void 0:A.uid,name:"Organization - Manage Organization",properties:{organization_id:r}})},[]),p.useEffect(()=>{S(r)},[r,m]),p.useEffect(()=>{ea.ping(Ze("users-organization-manage-standard"))},[]);let N=o.createElement(du,null),k=o.createElement(sf,{className:"app-content h-full"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg group"},o.createElement("div",{className:"flex items-center gap-2 justify-center"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-2 md:mb-0 md:text-2xl dark__text"},"Manage Organization"),["dev","qa"].includes("production")?o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Base_Organizations/${r}`,target:"_blank",rel:"noreferrer",className:"dark__text text-xs opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},"[FS]"):null),o.createElement(Es,{className:"my-4 mx-0 hd"}),o.createElement("form",{className:"space-y-4",onSubmit:y(A=>{const O=A.organizationName;re.dispatch("interstitial-run","on"),pt(gH,Ze("users-organization-manage-standard"))({organizationID:r,organizationName:O}).then(({data:T})=>{re.dispatch("trigger-alert",{message:`You have successfully updated the organization name from ${a} to ${O}!`,intent:"success"}),re.dispatch("refresh-usercontext",{responseItem:T.output}),re.dispatch("interstitial-run","off"),h(m+1)}).catch(T=>{console.error("errorItem",T),re.dispatch("interstitial-run","off")})})},o.createElement("div",{className:"sm:flex sm:gap-2 sm:items-center"},o.createElement("input",{className:"w-full",type:"text",maxLength:50,...b("organizationName",{required:"Please enter a organization name.",maxLength:{value:50,message:"Organization name must be at most 50 characters."}})}),o.createElement("button",{type:"submit",disabled:w("organizationName")===a,className:"w-full mt-4 sm:mt-2 sm:w-auto flex justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed"},"Change name")),x.organizationName&&o.createElement("span",{className:"error text-left"},x.organizationName.message)))),o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("label",{className:"dark__text"},"Subscription Info"),o.createElement("div",{className:"mt-2 flex gap-1 items-center"},o.createElement("label",null,"Current plan:"),o.createElement("a",{className:"capitalize",onClick:()=>{var A;g({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:r})}),Jn.analyticsTrack({userId:(A=v==null?void 0:v.user)==null?void 0:A.uid,event:"Organization (Manage) - Free Upgrade Subscription - Click",codeName:"user-view-organization_manageorganization-action-link-freeupgradesubscription-click",properties:{organization_id:r}})}},i.active?`${i.plan}`:"Free - upgrade subscription")))),o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},c.length>0&&o.createElement("label",{className:"dark__text"},"Organization Workspaces"),c.length===0?o.createElement("div",{className:"flex items-center justify-between text-center"},o.createElement("p",{className:"text-gray-500 text-sm"},"No workspaces have been created yet."),(C=v.context)!=null&&C.organization_manage_edit?o.createElement("button",{intent:jr.PRIMARY,onClick:()=>{var A;g("/workspace/add"),Jn.analyticsTrack({userId:(A=v==null?void 0:v.user)==null?void 0:A.uid,event:"Organization (Manage) - Create team - Click",codeName:"user-view-organization_manageorganization-action-button-createteam-click",properties:{organization_id:r}})},className:"w-full mt-4 sm:mt-2 sm:w-auto flex justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed"},"Create workspace"):null):o.createElement("ul",{className:"flex flex-col gap-2 py-2"},c.map(A=>{var O,T,M;return o.createElement("li",{className:"flex gap-2 items-center justify-between group",key:A.$id},o.createElement("div",{className:"flex gap-2 items-center"},o.createElement(Ft,{icon:o.createElement(IG,{size:16}),color:"#BABABA"}),o.createElement("a",{onClick:()=>e.action({type:"sibling-header",subType:"team-select-current",dataSet:{targetTeam:{id:A.$id,name:A.name}}}),className:"container xs:max-w-[200px] sm:max-w-[300px] text-ellipsis overflow-hidden whitespace-nowrap"},A.name)),(O=v.context)!=null&&O.team_manage_edit&&((M=(T=v.context)==null?void 0:T.team_manage_edit_team_map)!=null&&M[A.$id])?o.createElement("a",{onClick:()=>e.action({type:"sibling-header",subType:"team-select-current",dataSet:{targetTeam:{id:A.$id,name:A.name},viewType:"manage"}}),className:"opacity-100 sm:opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},o.createElement(Ft,{icon:o.createElement(YP,{size:16}),color:"#BABABA"})," "):null)})))));return d?N:k};var nE={linear:function(e,t,n,r){var a=n-t;return a*e/r+t},easeInQuad:function(e,t,n,r){var a=n-t;return a*(e/=r)*e+t},easeOutQuad:function(e,t,n,r){var a=n-t;return-a*(e/=r)*(e-2)+t},easeInOutQuad:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e+t:-a/2*(--e*(e-2)-1)+t},easeInCubic:function(e,t,n,r){var a=n-t;return a*(e/=r)*e*e+t},easeOutCubic:function(e,t,n,r){var a=n-t;return a*((e=e/r-1)*e*e+1)+t},easeInOutCubic:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t},easeInQuart:function(e,t,n,r){var a=n-t;return a*(e/=r)*e*e*e+t},easeOutQuart:function(e,t,n,r){var a=n-t;return-a*((e=e/r-1)*e*e*e-1)+t},easeInOutQuart:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e*e*e+t:-a/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(e,t,n,r){var a=n-t;return a*(e/=r)*e*e*e*e+t},easeOutQuint:function(e,t,n,r){var a=n-t;return a*((e=e/r-1)*e*e*e*e+1)+t},easeInOutQuint:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?a/2*e*e*e*e*e+t:a/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(e,t,n,r){var a=n-t;
1959return-a*Math.cos(e/r*(Math.PI/2))+a+t},easeOutSine:function(e,t,n,r){var a=n-t;return a*Math.sin(e/r*(Math.PI/2))+t},easeInOutSine:function(e,t,n,r){var a=n-t;return-a/2*(Math.cos(Math.PI*e/r)-1)+t},easeInExpo:function(e,t,n,r){var a=n-t;return e==0?t:a*Math.pow(2,10*(e/r-1))+t},easeOutExpo:function(e,t,n,r){var a=n-t;return e==r?t+a:a*(-Math.pow(2,-10*e/r)+1)+t},easeInOutExpo:function(e,t,n,r){var a=n-t;return e===0?t:e===r?t+a:(e/=r/2)<1?a/2*Math.pow(2,10*(e-1))+t:a/2*(-Math.pow(2,-10*--e)+2)+t},easeInCirc:function(e,t,n,r){var a=n-t;return-a*(Math.sqrt(1-(e/=r)*e)-1)+t},easeOutCirc:function(e,t,n,r){var a=n-t;return a*Math.sqrt(1-(e=e/r-1)*e)+t},easeInOutCirc:function(e,t,n,r){var a=n-t;return(e/=r/2)<1?-a/2*(Math.sqrt(1-e*e)-1)+t:a/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(e,t,n,r){var a=n-t,s,i,l;return l=1.70158,i=0,s=a,e===0?t:(e/=r)===1?t+a:(i||(i=r*.3),s<Math.abs(a)?(s=a,l=i/4):l=i/(2*Math.PI)*Math.asin(a/s),-(s*Math.pow(2,10*(e-=1))*Math.sin((e*r-l)*(2*Math.PI)/i))+t)},easeOutElastic:function(e,t,n,r){var a=n-t,s,i,l;return l=1.70158,i=0,s=a,e===0?t:(e/=r)===1?t+a:(i||(i=r*.3),s<Math.abs(a)?(s=a,l=i/4):l=i/(2*Math.PI)*Math.asin(a/s),s*Math.pow(2,-10*e)*Math.sin((e*r-l)*(2*Math.PI)/i)+a+t)},easeInOutElastic:function(e,t,n,r){var a=n-t,s,i,l;return l=1.70158,i=0,s=a,e===0?t:(e/=r/2)===2?t+a:(i||(i=r*(.3*1.5)),s<Math.abs(a)?(s=a,l=i/4):l=i/(2*Math.PI)*Math.asin(a/s),e<1?-.5*(s*Math.pow(2,10*(e-=1))*Math.sin((e*r-l)*(2*Math.PI)/i))+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-l)*(2*Math.PI)/i)*.5+a+t)},easeInBack:function(e,t,n,r,a){var s=n-t;return a===void 0&&(a=1.70158),s*(e/=r)*e*((a+1)*e-a)+t},easeOutBack:function(e,t,n,r,a){var s=n-t;return a===void 0&&(a=1.70158),s*((e=e/r-1)*e*((a+1)*e+a)+1)+t},easeInOutBack:function(e,t,n,r,a){var s=n-t;return a===void 0&&(a=1.70158),(e/=r/2)<1?s/2*(e*e*(((a*=1.525)+1)*e-a))+t:s/2*((e-=2)*e*(((a*=1.525)+1)*e+a)+2)+t},easeInBounce:function(e,t,n,r){var a=n-t,s;return s=nE.easeOutBounce(r-e,0,a,r),a-s+t},easeOutBounce:function(e,t,n,r){var a=n-t;return(e/=r)<1/2.75?a*(7.5625*e*e)+t:e<2/2.75?a*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?a*(7.5625*(e-=2.25/2.75)*e+.9375)+t:a*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(e,t,n,r){var a=n-t,s;return e<r/2?(s=nE.easeInBounce(e*2,0,a,r),s*.5+t):(s=nE.easeOutBounce(e*2-r,0,a,r),s*.5+a*.5+t)}},mYe=nE;function hYe(e){return e*Math.PI/180}function Mo(e,t){return e+Math.random()*(t-e)}function pYe(e,t){return Math.floor(e+Math.random()*(t-e+1))}var bv;(function(e){e[e.Circle=0]="Circle",e[e.Square=1]="Square",e[e.Strip=2]="Strip"})(bv||(bv={}));var Cd;(function(e){e[e.Positive=1]="Positive",e[e.Negative=-1]="Negative"})(Cd||(Cd={}));const gYe=1e3/60;class vYe{constructor(t,n,r,a){this.getOptions=n;const{colors:s,initialVelocityX:i,initialVelocityY:l}=this.getOptions();this.context=t,this.x=r,this.y=a,this.w=Mo(5,20),this.h=Mo(5,20),this.radius=Mo(5,10),this.vx=typeof i=="number"?Mo(-i,i):Mo(i.min,i.max),this.vy=typeof l=="number"?Mo(-l,0):Mo(l.min,l.max),this.shape=pYe(0,2),this.angle=hYe(Mo(0,360)),this.angularSpin=Mo(-.2,.2),this.color=s[Math.floor(Math.random()*s.length)],this.rotateY=Mo(0,1),this.rotationDirection=Mo(0,1)?Cd.Positive:Cd.Negative}update(t){const{gravity:n,wind:r,friction:a,opacity:s,drawShape:i}=this.getOptions(),l=t/gYe;this.x+=this.vx*l,this.y+=this.vy*l,this.vy+=n*l,this.vx+=r*l,this.vx*=a**l,this.vy*=a**l,this.rotateY>=1&&this.rotationDirection===Cd.Positive?this.rotationDirection=Cd.Negative:this.rotateY<=-1&&this.rotationDirection===Cd.Negative&&(this.rotationDirection=Cd.Positive);const c=.1*this.rotationDirection*l;if(this.rotateY+=c,this.angle+=this.angularSpin,this.context.save(),this.context.translate(this.x,this.y),this.context.rotate(this.angle),this.context.scale(1,this.rotateY),this.context.rotate(this.angle),this.context.beginPath(),this.context.fillStyle=this.color,this.context.strokeStyle=this.color,this.context.globalAlpha=s,this.context.lineCap="round",this.context.lineWidth=2,i&&typeof i=="function")i.call(this,this.context);
1959else switch(this.shape){case bv.Circle:{this.context.beginPath(),this.context.arc(0,0,this.radius,0,2*Math.PI),this.context.fill();break}case bv.Square:{this.context.fillRect(-this.w/2,-this.h/2,this.w,this.h);break}case bv.Strip:{this.context.fillRect(-this.w/6,-this.h/2,this.w/3,this.h);break}}this.context.closePath(),this.context.restore()}}class yYe{constructor(t,n){this.x=0,this.y=0,this.w=0,this.h=0,this.lastNumberOfPieces=0,this.tweenProgress=0,this.tweenFrom=0,this.particles=[],this.particlesGenerated=0,this.removeParticleAt=a=>{this.particles.splice(a,1)},this.getParticle=()=>{const a=Mo(this.x,this.w+this.x),s=Mo(this.y,this.h+this.y);return new vYe(this.context,this.getOptions,a,s)},this.animate=a=>{const{canvas:s,context:i,particlesGenerated:l,lastNumberOfPieces:c}=this,{run:u,recycle:d,numberOfPieces:f,debug:m,tweenFunction:h,tweenDuration:g}=this.getOptions();if(!u)return!1;const v=this.particles.length,y=d?v:l;if(y<f){c!==f&&(this.tweenProgress=0,this.tweenFrom=y,this.lastNumberOfPieces=f),this.tweenProgress=Math.min(g,Math.max(0,this.tweenProgress+a));const b=h(this.tweenProgress,this.tweenFrom,f,g),E=Math.round(b-y);for(let w=0;w<E;w++)this.particles.push(this.getParticle());this.particlesGenerated+=E}m&&(i.font="12px sans-serif",i.fillStyle="#333",i.textAlign="right",i.fillText(`Particles: ${v}`,s.width-10,s.height-20));for(let b=this.particles.length-1;b>=0;b--){const E=this.particles[b];E.update(a),(E.y>s.height||E.y<-100||E.x>s.width+100||E.x<-100)&&(d&&y<=f?this.particles[b]=this.getParticle():this.removeParticleAt(b))}return v>0||y<f},this.canvas=t;const r=this.canvas.getContext("2d");if(!r)throw new Error("Could not get canvas context");this.context=r,this.getOptions=n}}const X4={width:typeof window<"u"?window.innerWidth:300,height:typeof window<"u"?window.innerHeight:200,numberOfPieces:200,friction:.99,wind:0,gravity:.1,initialVelocityX:4,initialVelocityY:10,colors:["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548"],opacity:1,debug:!1,tweenFunction:mYe.easeInOutQuad,tweenDuration:5e3,recycle:!0,run:!0};class bYe{constructor(t,n){this.lastFrameTime=0,this.setOptionsWithDefaults=a=>{const s={confettiSource:{x:0,y:0,w:this.canvas.width,h:0}};this._options={...s,...X4,...a},Object.assign(this,a.confettiSource)},this.update=(a=0)=>{const{options:{run:s,onConfettiComplete:i,frameRate:l},canvas:c,context:u}=this,d=Math.min(a-this.lastFrameTime,50);if(l&&d<1e3/l){this.rafId=requestAnimationFrame(this.update);return}this.lastFrameTime=a-(l?d%l:0),s&&(u.fillStyle="white",u.clearRect(0,0,c.width,c.height)),this.generator.animate(d)?this.rafId=requestAnimationFrame(this.update):(i&&typeof i=="function"&&this.generator.particlesGenerated>0&&i.call(this,this),this._options.run=!1)},this.reset=()=>{this.generator&&this.generator.particlesGenerated>0&&(this.generator.particlesGenerated=0,this.generator.particles=[],this.generator.lastNumberOfPieces=0)},this.stop=()=>{this.options={run:!1},this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)},this.canvas=t;const r=this.canvas.getContext("2d");if(!r)throw new Error("Could not get canvas context");this.context=r,this.generator=new yYe(this.canvas,()=>this.options),this.options=n,this.update()}get options(){return this._options}set options(t){var a,s;const n=(a=this._options)==null?void 0:a.run,r=(s=this._options)==null?void 0:s.recycle;this.setOptionsWithDefaults(t),this.generator&&(Object.assign(this.generator,this.options.confettiSource),typeof t.recycle=="boolean"&&t.recycle&&r===!1&&(this.generator.lastNumberOfPieces=this.generator.particles.length)),typeof t.run=="boolean"&&t.run&&n===!1&&this.update()}}const wYe=o.createRef();class Q4 extends o.Component{constructor(t){super(t),this.canvas=o.createRef(),this.canvas=t.canvasRef||wYe}componentDidMount(){if(this.canvas.current){const t=GN(this.props)[0];this.confetti=new bYe(this.canvas.current,t)}}componentDidUpdate(){const t=GN(this.props)[0];this.confetti&&(this.confetti.options=t)}componentWillUnmount(){this.confetti&&this.confetti.stop(),this.confetti=void 0}render(){const[t,n]=GN(this.props),r={zIndex:2,position:"absolute",pointerEvents:"none",top:0,left:0,bottom:0,right:0,...n.style};return F.jsx("canvas",{width:t.width,height:t.height,ref:this.canvas,...n,style:r})}}Q4.defaultProps={...X4};Q4.displayName="ReactConfetti";function GN(e){const t={},n={},r={},a=[...Object.keys(X4),"confettiSource","drawShape","onConfettiComplete","frameRate"],s=["canvasRef"];for(const i in e){const l=e[i];a.includes(i)?t[i]=l:s.includes(i)?s[i]=l:r[i]=l}return[t,r,n]}const sre=o.forwardRef((e,t)=>
1959F.jsx(Q4,{canvasRef:t,...e})),EYe=({dialogOpen:e=!1,questionText:t="Confirm?",dialogBody:n=null,acceptAction:r=ta.noop,dialogCloseExternal:a=ta.noop,external:s})=>{p.useState(0);const[i,l]=p.useState(!1),c=()=>{l(!1),a()};return p.useEffect(()=>{e&&l(!0)},[e]),o.createElement(ya,{isOpen:i,onClose:c,canOutsideClickClose:!0,enforceFocus:!0,autoFocus:!0,usePortal:!0,lazy:!0,className:"dark:bg-gray-800 dark:text-white"},o.createElement(Pk,{className:"flex flex-col gap-4"},o.createElement("div",{className:"text-xl text-gray-900 dark__text capitalize"},t),n?o.createElement("div",null,n):null,o.createElement("div",{className:"flex gap-4"},o.createElement(De,{onClick:()=>{r(),c()}},"Continue"),o.createElement(De,{onClick:()=>c()},"Cancel"))))};function xYe({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const _Ye=p.forwardRef(xYe),kYe=_Ye;function SYe({title:e,titleId:t,...n},r){return p.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?p.createElement("title",{id:t},e):null,p.createElement("path",{fillRule:"evenodd",d:"M4 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H4.75A.75.75 0 0 1 4 10Z",clipRule:"evenodd"}))}const CYe=p.forwardRef(SYe),NYe=CYe,RYe=Ir(xr()),TYe=e=>{if(typeof e!="number")return null;const t=e/100;return`$${t%1===0?t.toFixed(0):t.toFixed(2)}`},AYe=(e,t)=>{if(typeof e!="number")return null;const n=e/100*(1-t/100);return`$${n%1===0?n.toFixed(0):n.toFixed(2)}`},IYe=e=>{if(!e)return null;const t=typeof e.percent_off=="number"?`${e.percent_off}% off`:typeof e.amount_off=="number"?`$${(e.amount_off/100).toFixed(2)} off`:"discount";return e.duration==="repeating"&&e.duration_in_months?`${t} first ${e.duration_in_months} ${e.duration_in_months===1?"month":"months"}`:e.duration==="once"?`${t} on first payment`:t},m_=[{name:"Starter",displayName:"Free",id:"free",priceMonthly:"$0",priceAfterDiscountLabel:{percent75offFirst3months:"$0"},description:"Try it out for free. Experience a comprehensive set of features.",mostPopular:!1},{name:"Personal",displayName:"Personal",id:"personal",priceMonthly:`$${Tr.organization.subscription.plan.personal.price_amount/100}`,description:"Powerful cross-platform bookmark manager",mostPopular:!1},{name:"Professional",displayName:"Professional",id:"professional",priceMonthly:`$${Tr.organization.subscription.plan.professional.price_amount/100}`,priceAfterDiscountLabel:{percent75offFirst3months:`$${Tr.organization.subscription.plan.professional.price_amount/100*(1-75/100)}`},description:"Advanced asset management and collaboration features",mostPopular:!1},{name:"Organization",displayName:"Organization",id:"organization",priceMonthly:`$${Tr.organization.subscription.plan.organization.price_amount/100}`,priceAfterDiscountLabel:{percent75offFirst3months:`$${Tr.organization.subscription.plan.organization.price_amount/100*(1-75/100)}`},description:"Unlimited workspaces with advanced security and user management",mostPopular:!1}],vH=[{name:"Members",features:[{name:"Workspaces",tiers:{Starter:"1 Workspace",Personal:"1 Workspace",Professional:`${Tr.organization.subscription.plan.professional.team_count_limit} Workspaces`,Organization:"Unlimited Workspaces"}},{name:"Users",tiers:{Starter:"5 / Workspace",Personal:"10 / Workspace",Professional:`${Tr.organization.subscription.plan.professional.users_per_team_limit} / Workspace`,Organization:"Unlimited Users"}}]},{name:"Sharing",features:[{name:"Bookmarks",tiers:{Starter:!0,Personal:!0,Professional:!0,Organization:!0}},{name:"Versioning",tiers:{Starter:!1,Personal:!0,Professional:!0,Organization:!0}},{name:"Notifications",tiers:{Starter:!1,Personal:!0,Professional:!0,Organization:!0}}]},{name:"Organization",features:[{name:"Tags",tiers:{Starter:!0,Personal:!0,Professional:!0,Organization:!0}},{name:"Collections",tiers:{Starter:"3",Personal:Tr.organization.subscription.plan.personal.has.collections,Professional:Tr.organization.subscription.plan.professional.has.collections,Organization:Tr.organization.subscription.plan.organization.has.collections}},{name:"Flows",tiers:{Starter:"1",Personal:"Unlimited",Professional:"Unlimited",Organization:"Unlimited"}},{name:"Boards",tiers:{Starter:"1",Personal:"Unlimited",Professional:"Unlimited",Organization:"Unlimited"}}
1959,{name:"Flow Linking",tiers:{Starter:Tr.organization.subscription.plan.free.has.flow_linking,Personal:Tr.organization.subscription.plan.personal.has.flow_linking,Professional:Tr.organization.subscription.plan.professional.has.flow_linking,Organization:Tr.organization.subscription.plan.organization.has.flow_linking}}]},{name:"Security",features:[{name:"Workspace Sharing",tiers:{Starter:!0,Personal:!0,Professional:!0,Organization:!0}},{name:"User Roles",tooltip:"All members of the Free Plan will join as Admin Role, allowing these users the same ability as the account owner. Members joining workspaces with a subscription plan will default to the Editor Role, and can be granted Admin Role in the workspace management page.",tiers:{Personal:Tr.organization.subscription.plan.personal.has.user_roles,Professional:Tr.organization.subscription.plan.professional.has.user_roles,Organization:Tr.organization.subscription.plan.organization.has.user_roles}},{name:"Board Public Control",tooltip:"Board public sharing workspace-level control. Prevent users from sharing bookmarks outside of Workspace.",tiers:{Starter:Tr.organization.subscription.plan.free.has.public_sharing_policy,Personal:Tr.organization.subscription.plan.personal.has.public_sharing_policy,Professional:Tr.organization.subscription.plan.professional.has.public_sharing_policy,Organization:Tr.organization.subscription.plan.organization.has.public_sharing_policy}},{name:"Domain Restriction",tooltip:"Restrict workspace members to account emails from domains you allow.",tiers:{Organization:!0}}]}];function Io(...e){return e.filter(Boolean).join(" ")}const ire=({isPublic:e=!1,organizationSubscription:t={},activeOrganizationName:n="",organizationID:r="",discountActions:a={},onSelectPlan:s,livePricing:i=null})=>{var m;const[l,c]=p.useState(null);p.useEffect(()=>{if(i)return;let h=!1;return pt(RYe,Ze("users-organization-subscription-getPlanPricing"))().then(({data:g})=>{h||g&&g.status==="success"&&c(g.output)}).catch(g=>{console.warn("getPlanPricing failed, using static fallback:",g)}
1959),()=>{h=!0}},[i]);const u=i||l,d=p.useMemo(()=>u?m_.map(h=>{const g=u[h.id];if(!g||typeof g.unit_amount!="number")return h;const v={...h,priceMonthly:TYe(g.unit_amount),discount:g.discount||null};return g.discount&&typeof g.discount.percent_off=="number"?v.priceAfterDiscountLabel={...h.priceAfterDiscountLabel||{},percent75offFirst3months:AYe(g.unit_amount,g.discount.percent_off)}:v.priceAfterDiscountLabel=null,v}):m_,[u]),f=d.find(h=>h.id==="free")||{displayName:"Free"};return o.createElement(o.Fragment,null,o.createElement("div",{className:"mb-[150px]"},d.some(h=>h.mostPopular)?o.createElement("div",{className:"absolute inset-x-4 inset-y-0 -z-10 flex"},o.createElement("div",{className:"flex w-1/4 px-4","aria-hidden":"true",style:{marginLeft:`${(d.findIndex(h=>h.mostPopular)+1)*25}%`}},o.createElement("div",{className:"w-full rounded-t-xl border-x border-t border-gray-900/10 bg-gray-400/5"}))):null,o.createElement("div",{className:"flex flex-col items-center"},!e&&t.active&&t.upcoming_cancel?o.createElement("div",{className:"w-full text-left bg-yellow-50 dark:bg-gray-900 px-8 py-4 rounded-md mb-12 border border-red-200"},o.createElement("div",{className:"text-lg font-semibold mb-2"},"Your account has been changed to the"," ",o.createElement("b",null,f.displayName)," plan."),o.createElement("div",{className:"text-sm"},o.createElement("span",{className:"pr-1"},"You will have access to the ",o.createElement("b",null,"Current Plan")," until the end of your billing period on"),o.createElement("span",{className:"pr-1 font-semibold whitespace-nowrap"},Ht(t.upcoming_cancel.date*1e3).format("MMM DD, YYYY"),"."),o.createElement("span",null,"Your card will no longer be charged after this billing period is over."))):null,o.createElement("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6 w-full mb-10"},d.filter(h=>h.id!=="free").map((h,g)=>{var y;const v=d.findIndex(b=>b.id===h.id);return o.createElement("div",{key:`card-${h.id}`,className:"bg-white rounded-[4px] shadow-[0_2px_4px_rgba(130,140,150,0.1),_0_5px_15px_rgba(30,40,50,0.2)] flex flex-col items-center pb-8 overflow-hidden relative"},o.createElement("div",{className:"px-8 mt-8 w-full flex flex-col items-center"},o.createElement("h3",{className:"text-3xl font-display font-semibold text-gray-900"},h.displayName||h.name),o.createElement("p",{className:"text-sm text-gray-500 text-center mt-3 mb-6 h-10 flex items-center justify-center"},h.description),o.createElement("div",{className:"flex flex-col items-center mb-10 h-[100px] justify-center"},a.has75percentOffFirst3months&&h.id!=="personal"&&((y=h.priceAfterDiscountLabel)!=null&&y.percent75offFirst3months)?o.createElement(o.Fragment,null,o.createElement("div",{className:"text-2xl text-gray-400 line-through"},h.priceMonthly),o.createElement("div",{className:"flex items-start gap-1 mt-1"},o.createElement("span",{className:"text-2xl font-bold text-gray-900 mt-2"},"$"),o.createElement("span",{className:"text-6xl font-extrabold text-gray-900 tracking-tight leading-none"},h.priceAfterDiscountLabel.percent75offFirst3months.replace("$","")),o.createElement("div",{className:"flex flex-col items-start ml-1 mt-5 text-gray-500 text-sm font-medium"},o.createElement("span",null,"/ month"))),o.createElement(Hr,{enforceFocus:!1,interactionKind:"hover",content:o.createElement("div",{className:"max-w-md p-4 flex flex-col gap-3 text-xs dark:bg-gray-900"},o.createElement("b",null,"Discount terms apply"),o.createElement("p",null,"Discount is for the first 3 months of service starting from the date of enrollment, followed by the then-current monthly list price."))},o.createElement("span",{className:"text-sm font-semibold text-[#30c592] mt-2 cursor-pointer border-b border-dashed border-[#30c592]"},IYe(h.discount)||"Discount","*"))):o.createElement("div",{className:"flex items-start gap-1"},o.createElement("span",{className:"text-2xl font-bold text-gray-900 mt-2"},"$"),o.createElement("span",{className:"text-6xl font-extrabold text-gray-900 tracking-tight leading-none"},h.priceMonthly.replace("$","")),o.createElement("div",{className:"flex flex-col items-start ml-1 mt-5 text-gray-500 text-sm font-medium"},o.createElement("span",null,"/ month")))),o.createElement("a",{onClick:()=>{!e&&t.active&&t.plan!==h.id&&t.upcoming_cancel||s&&s(h.id)},className:Io("w-full text-center py-3 rounded border-2 transition-colors duration-200 font-bold",!e&&t.active&&t.plan===h.id?"border-gray-300 text-gray-500 bg-gray-50 cursor-default pointer-events-none select-none":!e&&t.active&&t.plan!==h.id&&t.upcoming_cancel?"border-gray-300 text-gray-500 bg-gray-50 cursor-not-allowed pointer-events-none select-none":"cursor-pointer border-[#2b6bf3] text-[#2b6bf3] hover:bg-[#2b6bf3] hover:text-white hover:no-underline")},!e&&t.active?t.plan===h.id?"Current Plan":v>d.findIndex(b=>b.id===t.plan)?"Upgrade":"Subscribe":"Subscribe")))})),(()=>{var g;const h=d.find(v=>v.id==="free");return h?o.createElement("div",{className:"w-full bg-white rounded-[4px] shadow-[0_2px_4px_rgba(130,140,150,0.1),_0_5px_15px_rgba(30,40,50,0.2)] flex flex-col sm:flex-row items-center justify-between p-8 mb-16"},o.createElement("div",{className:"flex flex-col sm:flex-row items-center gap-6 sm:gap-12 w-full text-center sm:text-left"},o.createElement("h3",{className:"text-3xl font-display font-semibold text-gray-900 shrink-0"},h.name),o.createElement("p",{className:"text-sm text-gray-500 max-w-md"},h.description)),o.createElement("div",{className:"mt-6 sm:mt-0 shrink-0 w-full sm:w-auto"},o.createElement("a",{onClick:()=>{!e&&t.active&&t.plan!==h.id&&t.upcoming_cancel||s&&s(h.id)},className:Io("w-full sm:w-[200px] flex justify-center py-3 rounded border-2 transition-colors duration-200 font-bold px-6",!e&&(t.active&&t.plan===h.id||!t.active&&h.id==="free")?"border-gray-300 text-gray-500 bg-gray-50 cursor-default pointer-events-none select-none":!e&&t.active&&t.plan!==h.id&&t.upcoming_cancel?"border-gray-300 text-gray-500 bg-gray-50 cursor-not-allowed pointer-events-none select-none":"cursor-pointer border-[#2b6bf3] text-[#2b6bf3] hover:bg-[#2b6bf3] hover:text-white hover:no-underline")},!e&&t.active?t.plan===h.id?"Current Plan":(g=t.upcoming_cancel)!=null&&g.date?`Effective ${Ht(t.upcoming_cancel.date*1e3).format("MM/DD/YY")}`:d.findIndex(v=>v.id===h.id)>d.findIndex(v=>v.id===t.plan)?"Upgrade":"Subscribe":!e&&!t.active&&h.id==="free"||h.id==="free"?"Current Plan":"Subscribe"))):null})()),o.createElement("table",{className:Io("w-full text-left","border-collapse border-[1px] border-solid border-gray-200 dark:border-gray-700")},o.createElement("thead",null,o.createElement("tr",null,o.createElement("td",{className:Io("py-4 align-bottom border-[1px] border-solid border-gray-200 dark:border-gray-700")},o.createElement("div",{className:"px-6 text-2xl font-semibold font-display text-slate-900 dark:text-white"},"Plans")),d.map((h,g)=>o.createElement("th",{key:h.id,scope:"col",className:Io("py-4 px-6 align-bottom border-[1px] border-solid border-gray-200 dark:border-gray-700 text-center font-bold text-gray-900 dark:text-white")},o.createElement("div",{className:Io("font-semibold text-gray-900 dark__text text-center text-lg")},e?o.createElement("div",null,h.displayName||h.name):o.createElement("div",{className:"w-full text-center dark__text"},h.displayName||h.name,null)))))),o.createElement("tbody",null,vH.map((h,g)=>o.createElement(p.Fragment,{key:h.name},o.createElement("tr",null,o.createElement("th",{scope:"colgroup",colSpan:5,className:Io("py-4 px-6","text-lg font-bold bg-gray-50 dark:bg-gray-800/50 border-[1px] border-solid border-gray-200 dark:border-gray-700","text-gray-900 dark__text text-left")},h.name)),h.features.map((v,y)=>(g===vH.length-1&&h.features.length-1,o.createElement("tr",{key:v.name,className:Io("hover:bg-gray-50/50 dark:hover:bg-gray-800/50")},o.createElement("th",{scope:"row",className:Io("py-4 px-6 text-sm font-normal border-[1px] border-solid border-gray-200 dark:border-gray-700 bg-white dark:bg-transparent","text-gray-900 dark__text text-left")},o.createElement("span",{className:"flex items-center gap-2 justify-between"},o.createElement("span",null,v.name),v.tooltip?o.createElement(fr,{compact:!0,usePortal:!1,content:v.tooltip},o.createElement(Ft,{icon:o.createElement(T0,{size:14,className:"text-gray-700 dark:text-gray-300"})})):null)),d.map((b,E)=>o.createElement("td",{key:b.id,className:Io("py-4 px-6 text-center border-[1px] border-solid border-gray-200 dark:border-gray-700 bg-white dark:bg-transparent")}
1959,typeof v.tiers[b.name]=="string"?o.createElement("div",{className:Io("text-sm text-gray-900","dark__text text-center")},v.tiers[b.name]):o.createElement(o.Fragment,null,v.tiers[b.name]===!0?o.createElement(kYe,{className:Io("mx-auto h-5 w-5","text-gray-900 dark:text-gray-100"),"aria-hidden":"true"}):o.createElement(NYe,{className:Io("mx-auto h-5 w-5","text-gray-300 dark:text-gray-600"),"aria-hidden":"true"}),o.createElement("span",{className:"sr-only"},v.tiers[b.name]===!0?"Included":"Not included"," ","in ",b.name))))))))))),!e&&["dev","qa"].includes("production")?o.createElement("div",{className:"flex text-xs gap-4 justify-center fixed bottom-0 left-0 right-0 z-50 py-2 bg-gray-200 dark:bg-gray-900"},o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Base_Organizations/${r}`,target:"_blank",rel:"noreferrer",className:"dark__text ml-2"},"Firestore organization ",n),((m=t==null?void 0:t.meta)==null?void 0:m.stripe_subscription_id)&&o.createElement("a",{href:`https://dashboard.stripe.com//test/subscriptions/${t.meta.stripe_subscription_id}`,target:"_blank",rel:"noreferrer",className:"dark__text ml-2"},"Stripe subscription"," ",t.meta.stripe_subscription_id)):null))};Ts();const Ed=Ir(xr()),yH=of(),bH={questionText:"Thanks for giving us a shot",dialogBody:o.createElement("div",{className:"flex flex-col gap-4 text-xs dark:bg-gray-900"},o.createElement("p",null,"Your cancellation will become effective at the end of the monthly billing period. You will not receive a pro-rated refund; your access and subscription benefits will continue for the remainder of the billing period."))},OYe=({external:e,sibling_meta_action:t={},sibling_meta_reset:n})=>{var Ue,ae,pe,W,q,te;const{organizationID:r}=xs(),[a,s]=p.useState(""),[i,l]=p.useState({}),[c,u]=p.useState(!1),[d,f]=p.useState(!1),[m,h]=p.useState({open:!1,questionText:"",dialogBody:null,acceptAction:null}),[g,v]=p.useState(0),[y,b]=p.useState(!1),[E,w]=p.useState(!1),[x,S]=p.useState(()=>({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0})),[N,k]=p.useState(null);p.useEffect(()=>{let X=!1;return pt(Ed,Ze("users-organization-subscription-getPlanPricing"))().then(({data:le})=>{X||le&&le.status==="success"&&k(le.output)}).catch(le=>{console.warn("getPlanPricing failed in subscription view:",le)}),()=>{X=!0}},[]);const C=Wn(X=>{var le;return(le=X==null?void 0:X.FB)==null?void 0:le.auth}),[A,O]=df();let T=A.get("success")==="yes",M=A.get("targetplan"),L=A.get("session_id");const[D,j]=p.useState(!1),[H,Y]=p.useState(!1);p.useEffect(()=>{var X;D||L&&((X=C==null?void 0:C.user)!=null&&X.uid||C!=null&&C.isLive&&(j(!0),pt(Ed,Ze("users-organization-subscription-exchangeCheckoutSessionForToken"))({sessionId:L}).then(({data:le})=>{var me;if(!le||le.status!=="success"||!((me=le.output)!=null&&me.customToken))throw new Error("No custom token returned.");return T_(yH,le.output.customToken)}).catch(le=>{console.warn("Auto-signin via checkout session_id failed:",le),Y(!0)})))},[D,L,C]);const z=!!L&&!((Ue=C==null?void 0:C.user)!=null&&Ue.uid)&&!H;let K={enableUseCouponCode:!1,has75percentOffFirst3months:!1},ee=null;A.get("coupon")&&A.get("discount")&&A.get("reason")?(ee={coupon:A.get("coupon"),discount:A.get("discount"),reason:A.get("reason")},K.enableUseCouponCode=!0):A.get("use_coupon_code")==="yes"||A.get("promo")==="coupon"?K.enableUseCouponCode=!0:K.has75percentOffFirst3months=!0;const oe=yr(),J=X=>{re.dispatch("interstitial-run","on"),pt(Ed,Ze("users-organization-subscription-stripeGetAssociatedOrganizationData"))({organizationID:X}).then(({data:le})=>{le.output.cause==="not-permitted"?f(!0):(s(le.output.name),l(le.output.active_subscription)),re.dispatch("interstitial-run","off")}).catch(le=>{console.error("errorItem",le),re.dispatch("interstitial-run","off")})},se=()=>{var X,le;re.dispatch("interstitial-run","on"),Jn.analyticsTrack({userId:(X=C==null?void 0:C.user)==null?void 0:X.uid,event:"Organization (Subscription) - Open Stripe Billing Portal",codeName:"user-view-organization_subscription-action-function-openbillingportal",properties:{organization_id:r,subscription_status:((le=i==null?void 0:i.meta)==null?void 0:le.status)||null}}),pt(Ed,Ze("users-organization-subscription-stripeBillingPortalSession"))({organizationID:r,successHostBase:"https://bookmark.it.com"}).then(({data:me})=>{const fe=me.output.stripe_billing_portal_session_url,ke=typeof window<"u"&&(window.__TAURI_INTERNALS__||window.__TAURI__),Se=typeof chrome<"u"&&chrome.tabs&&typeof chrome.tabs.create=="function";ke?yn(()=>function(){return(nt=>import(nt))("./index.a906e697.js")}(),[]).then(({openUrl:Et})=>Et(fe)).catch(()=>window.open(fe,"_blank","noopener,noreferrer")):Se?chrome.tabs.create({url:fe}):window.location.href=fe,re.dispatch("interstitial-run","off")}).catch(me=>{console.error("errorItem",me),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:me.message||"Sorry, something went wrong.",intent:"danger"})})},B=X=>{var fe,ke,Se,Et,nt;if(X==="free"){i.active&&!i.change_subscription_process_initiated&&!i.cancel_subscription_process_initiated&&!i.upcoming_cancel?(h({open:!0,questionText:bH.questionText,dialogBody:bH.dialogBody,acceptAction:()=>{re.dispatch("interstitial-run","on"),pt(Ed,Ze("users-organization-subscription-stripeCancel"))({organizationID:r}).then(({data:Pt})=>{v(g+1),re.dispatch("interstitial-run","off")}).catch(Pt=>{console.error("errorItem",Pt),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:Pt.message||"Sorry, something went wrong.",intent:"danger"})})}}),Jn.analyticsTrack({userId:(fe=C==null?void 0:C.user)==null?void 0:fe.uid,event:"Organization (Sub
1959scription) - Select Subscription Plan - Cancel Subscription",codeName:"user-view-organization_subscription-action-function-selectsubscriptionplan-free-cancelsubscription",properties:{organization_id:r}})):Jn.analyticsTrack({userId:(ke=C==null?void 0:C.user)==null?void 0:ke.uid,event:"Organization (Subscription) - Select Subscription Plan - Free (Nothing)",codeName:"user-view-organization_subscription-action-function-selectsubscriptionplan-free-nothing",properties:{organization_id:r}});return}else if(i.active){X!==(i==null?void 0:i.plan)&&!i.change_subscription_process_initiated&&!i.cancel_subscription_process_initiated&&!i.upcoming_cancel?(h({open:!0,questionText:`Switch to the "${X}" plan`,dialogBody:o.createElement("div",{className:"flex flex-col gap-4 text-xs dark:bg-gray-900 p-2"},o.createElement("p",{className:"dark:text-gray-200"},o.createElement("b",null,"Terms:")," Your account will automatically be charged on a monthly basis until you cancel. If you upgrade or downgrade to a different subscription, the price will change to the then current list price for such relevant subscription. Sales tax may be applied where applicable.")),acceptAction:()=>{re.dispatch("interstitial-run","on"),pt(Ed,Ze("users-organization-subscription-stripeChangePlan"))({organizationID:r,targetPlan:X}).then(({data:Pt})=>{v(g+1),re.dispatch("interstitial-run","off")}).catch(Pt=>{console.error("errorItem",Pt),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:Pt.message||"Sorry, something went wrong.",intent:"danger"})})}}),Jn.analyticsTrack({userId:(Se=C==null?void 0:C.user)==null?void 0:Se.uid,event:"Organization (Subscription) - Select Subscription Plan - Switch Subscription",codeName:"user-view-organization_subscription-action-function-selectsubscriptionplan-nonfree-switchsubscription",properties:{organization_id:r,target_plan:X}})):Jn.analyticsTrack({userId:(Et=C==null?void 0:C.user)==null?void 0:Et.uid,event:"Organization (Subscription) - Select Subscription Plan - Non-Free (Nothing)",codeName:"user-view-organization_subscription-action-function-selectsubscriptionplan-nonfree-nothing",properties:{organization_id:r,target_plan:X}});return}re.dispatch("interstitial-run","on");let le={organizationID:r,targetPlan:X,successHostBase:"https://bookmark.it.com"};const me=!!(N&&N[X]&&N[X].discount);K.has75percentOffFirst3months&&me?le.discount_75percentOffFirst3months=!0:K.enableUseCouponCode&&(le.useCouponCode=!0),Jn.analyticsTrack({userId:(nt=C==null?void 0:C.user)==null?void 0:nt.uid,event:"Organization (Subscription) - Select Subscription Plan - Stripe Checkout Session",codeName:"user-view-organization_subscription-action-function-selectsubscriptionplan-stripecheckoutsession",properties:{organization_id:r,target_plan:X}}),pt(Ed,Ze("users-organization-subscription-stripeCheckoutSession"))(le).then(({data:Pt})=>{const en=Pt.output.stripe_checkout_session_url,hn=typeof window<"u"&&(window.__TAURI_INTERNALS__||window.__TAURI__),rt=typeof chrome<"u"&&chrome.tabs&&typeof chrome.tabs.create=="function";hn?yn(()=>function(){return(Kt=>import(Kt))("./index.a906e697.js")}(),[]).then(({openUrl:et})=>et(en)).catch(()=>window.open(en,"_blank","noopener,noreferrer")):rt?chrome.tabs.create({url:en}):window.location.href=en,re.dispatch("interstitial-run","off")}).catch(Pt=>{console.error("errorItem",Pt),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:Pt.message||"Sorry, something went wrong.",intent:"danger"})})};p.useEffect(()=>{var X;Jn.analyticsPage({userId:(X=C==null?void 0:C.user)==null?void 0:X.uid,name:"Organization - Subscription",properties:{organization_id:r}})},[]),p.useEffect(()=>{J(r)},[r,g]),p.useEffect(()=>{T&&M&&pt(Ed,Ze("users-organization-subscription-setProcessingFlag"))({organizationID:r})},[T,M]),p.useEffect(()=>{var le;if(E||!T||!(C!=null&&C.isLive)||!((le=C==null?void 0:C.user)!=null&&le.uid))return;w(!0),b(!0),re.dispatch("trigger-alert",{message:"Thank you for subscribing!",intent:"success",timeout:6e3});const X=setTimeout(()=>b(!1),8e3);return()=>clearTimeout(X)},[E,T,C==null?void 0:C.isLive,(ae=C==null?void 0:C.user)==null?void 0:ae.uid]),p.useEffect(()=>{if(!y)return;const X=()=>S({width:window.innerWidth,height:window.innerHeight});return X(),window.addEventListener("resize",X),()=>window.removeEventListener("resize",X)},[y]);let U=o.createElement(du,null),$=o.createElement("div",{className:"app-content"},o.createElement("div",{className:"flex flex-col text-center gap-.5"},o.createElement("span",{className:"py-4"},"You are not logged in."),o.createElement("a",{onClick:()=>{oe({pathname:Pn("/organization/:organizationID/subscribe/login",{organizationID:r})})},className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Sign in and try again."))),ce=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card max-w-md flex flex-col text-center"},o.createElement("div",{className:"py-4"},"Hmmm, it looks like you do not have access to this organization."),o.createElement("div",{className:"flex flex-col text-center gap-.5"},o.createElement("a",{onClick:()=>{Dy(yH),re.dispatch("login-freeup"),oe({pathname:Pn("/organization/:organizationID/subscribe/login",{organizationID:r})})},className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Sign in to another account"),o.createElement("a",{onClick:()=>oe(Zc.defaults.loginRedirect),className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Return to your account"))));const be=((pe=i==null?void 0:i.meta)==null?void 0:pe.status)==="past_due"||((W=i==null?void 0:i.meta)==null?void 0:W.status)==="unpaid",ue=!!((q=i==null?void 0:i.meta)!=null&&q.has_stripe_customer);let Ie=be?o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card mb-8 border border-red-300 dark:border-red-700"},o.createElement("div",{className:"flex flex-col gap-3 dark__text"},o.createElement("div",{className:"text-lg font-bold"},"There's a problem with your payment method"),o.createElement("div",{className:"text-sm"},"Your most recent charge for this subscription didn't go through â this usually means the card on file has expired or was declined. Please update your payment method to keep your subscription active."),o.createElement("div",null,o.createElement("a",{onClick:se,className:"leading-6 text-indigo-600 hover:text-indigo-500 cursor-pointer font-semibold"},"Update payment method â")))):null,Ae=ue?o.createElement("div",{className:"mt-8 text-center"},o.createElement("a",{onClick:se,className:"leading-6 text-indigo-600 hover:text-indigo-500 cursor-pointer text-sm"},"Update billing"),o.createElement("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1"},"Update your card, billing email, or download invoices.")):null,he=o.createElement("div",null,Ie,o.createElement("div",{className:"mb-[300px]"},m_.some(X=>X.mostPopular)?o.createElement("div",{className:"absolute inset-x-4 inset-y-0 -z-10 flex"},o.createElement("div",{className:"flex w-1/4 px-4","aria-hidden":"true",style:{marginLeft:`${(m_.findIndex(X=>X.mostPopular)+1)*25}%`}},o.createElement("div",{className:"w-full rounded-t-xl border-x border-t border-gray-900/10 bg-gray-400/5"}))):null,ee?o.createElement(jn,{minimal:"true",className:"card mb-16"},o.createElement("div",{className:"flex justify-center gap-1"},o.createElement("span",{className:"capitalize"},ee.reason,"."),o.createElement("span",null,"Use promo code ",o.createElement("b",null,ee.coupon)),o.createElement("span",null,"for ",ee.discount," off your subscription."))):null,K.enableUseCouponCode?o.createElement(jn,{minimal:"true",className:"card mb-16"},o.createElement("div",{className:"flex justify-center gap-1"}
1959,o.createElement("span",null,"Use ",o.createElement("b",null,"75OFF3MONTHS")," at check out to get 75% off the first three months."))):null,o.createElement(ire,{isPublic:!1,organizationSubscription:i,activeOrganizationName:a,organizationID:r,discountActions:K,onSelectPlan:B,livePricing:N}),Ae),o.createElement(EYe,{dialogOpen:m==null?void 0:m.open,questionText:m==null?void 0:m.questionText,dialogBody:m==null?void 0:m.dialogBody,acceptAction:m==null?void 0:m.acceptAction,dialogCloseExternal:()=>h(null)})),_e=o.createElement("div",{className:"mx-auto mt-6 max-w-2xl text-center leading-8 text-gray-600 dark:text-gray-400"},o.createElement("p",{className:"text-xl"},"Your subscription has been canceled. Your account is set to the Starter Plan."),o.createElement("p",{className:"text-md mt-2"},"Email us if you would like to reactivate your subscription: ",o.createElement("b",null,za.supportEmail)),Ae),ie=o.createElement("div",{className:"app-content subscriptions"},y?o.createElement(sre,{width:x.width,height:x.height,numberOfPieces:400,recycle:!1,tweenDuration:8e3,style:{position:"fixed",top:0,left:0,zIndex:9999,pointerEvents:"none"}}):null,o.createElement("div",{className:"max-w-full"},(T&&M||i.processing)&&!i.active?o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"w-full mt-8 dark:bg-gray-800 dark:border-gray-700 dark:border"},o.createElement("h1",{className:"mb-1 text-center text-xl font-bold leading-tight tracking-tight text-gray-900 dark__text md:text-2xl dark__text content-center"},o.createElement("span",null,"We're processing your subscription")),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("div",{className:"dark__text flex gap-1"},M?o.createElement("div",{className:"flex items-center justify-center w-full"},o.createElement("span",null,"Thank you for signing up for the "),o.createElement("span",{className:"capitalize font-bold"},M),o.createElement("span",null," plan.")):o.createElement("div",null,o.createElement("span",null,"Thank you for signing up.")))):i.canceled?_e:i.change_subscription_process_initiated||i.cancel_subscription_process_initiated?o.createElement("p",{className:"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600 dark:text-gray-400"},"We are processing your ",i.change_subscription_process_initiated?"subscription change":i.cancel_subscription_process_initiated?"cancellation":"",". ",o.createElement("a",{onClick:()=>window.location.reload()},"Reload this page.")):he));return C!=null&&C.isLive?z?U:(te=C==null?void 0:C.user)!=null&&te.uid?c?U:d?ce:ie:$:U};Ts();const MYe=Ir(xr()),PYe=()=>{const{organizationID:e}=xs(),t=yr(),[n,r]=p.useState([]),[a,s]=p.useState(0),i=c=>{re.dispatch("interstitial-run","on"),pt(MYe,Ze("users-organization-subscription-retrieveInvoiceList"))({organizationID:c}).then(({data:u})=>{var d;r((d=u.output)==null?void 0:d.invoices),re.dispatch("interstitial-run","off")}).catch(u=>{console.error("errorItem",u),re.dispatch("interstitial-run","off")})};return p.useEffect(()=>{i(e)},[e,a]),o.createElement("div",{className:"app-content h-full"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full !p-0 md:max-w-xl lg:max-w-2xl"},o.createElement("div",{className:"flex items-center gap-2 justify-center"},o.createElement("h1",{className:"my-4 text-xl font-bold leading-tight tracking-tight text-gray-900 sm:text-2xl dark__text"},"Invoices")),(n==null?void 0:n.length)>0?o.createElement("table",{className:"table-members w-full text-sm text-left text-gray-500 border dark:text-gray-400"},o.createElement("thead",{className:"text-xs"},o.createElement("tr",null,o.createElement("th",{scope:"col"},"Invoice"),o.createElement("th",{scope:"col"},"Period"),o.createElement("th",{scope:"col"},"Status"),o.createElement("th",{scope:"col"}," "))),o.createElement("tbody",null,n.map(c=>o.createElement("tr",{key:c.$id},o.createElement("td",null,o.createElement("a",{href:c.hosted_invoice_url,target:"_blank",rel:"noreferrer"},c.$id)),o.createElement("td",{className:"flex gap-2 w-64"},o.createElement("span",null,Ht(c.period_start*1e3).format("DD-MMM-YYYY")),o.createElement("span",null,"to"),o.createElement("span",null,Ht(c.period_end*1e3).format("DD-MMM-YYYY"))),o.createElement("td",null,c.status))))):o.createElement("div",{className:"mt-4"},o.createElement(Es,null),o.createElement("p",{className:"text-center my-4 gap-2"},o.createElement("span",null,"Learn more about our "),o.createElement("a",{onClick:()=>t({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:e})})},"subscription plans"),"."))))};Ts();const Yl=Ir(xr()),wH=[{value:"base-team-admin"},{value:"base-team-editor"},{value:"base-team-suspended"}],dw={"base-team-owner":"Owner","base-team-admin":"Admin","base-team-editor":"Editor","base-team-viewer":"Viewer","base-team-suspended":"Suspended"},DYe=()=>{var Fe,st,gt,ht,Ee,We,vn,An;const{teamID:e}=xs(),[t,n]=p.useState(""),[r,a]=p.useState(""),[s,i]=p.useState([]),[l,c]=p.useState([]),[u,d]=p.useState(null),[f,m]=p.useState(null),[h,g]=p.useState(!1),[v,y]=p.useState({}),[b,E]=p.useState(!0),[w,x]=p.useState(null),[S,N]=p.useState(!1),[k,C]=p.useState(!1),[A,O]=p.useState(!1),[T,M]=p.useState({boards:[],maps:[],counts:{boards:0,maps:0}}),[L,D]=p.useState(!1),[j,H]=p.useState(0),[Y,z]=p.useState(!1),[K,ee]=p.useState(!1),[oe,J]=p.useState(!1),se=yr(),B=Iae(),U=Wn(je=>{var kt;return(kt=je==null?void 0:je.FB)==null?void 0:kt.auth}),$=((st=(((Fe=U==null?void 0:U.globalMeta)==null?void 0:Fe.teams)||[]).find(je=>String(je.id)===String(e)))==null?void 0:st.is_personal)===!0,ce=((ht=(((gt=U==null?void 0:U.globalMeta)==null?void 0:gt.teams)||[]).find(je=>String(je.id)===String(e)))==null?void 0:ht.is_vault)===!0,be=!!(U!=null&&U.isLive)&&!(U!=null&&U.isLoading),ue=!!((We=(Ee=U==null?void 0:U.context)==null?void 0:Ee.team_manage_edit_team_map)!=null&&We[e]),Ie=s.find(je=>je.is_you),Ae=(Ie==null?void 0:Ie.type_role)==="base-team-owner"||!!(Ie!=null&&Ie.is_creator),he=!!(Ie!=null&&Ie.is_creator),_e=!!(Ie!=null&&Ie.is_founder),ie=he||_e,Ue=s.filter(je=>je.type_role==="base-team-owner").length,ae=(je,kt=!1)=>{z(!0);const Lt={teamID:e,privacy:"private"};je&&(Lt.confirm=!0),kt&&(Lt.revokePublicDocs=!0),pt(Yl,Ze("users-team-set-privacy-set"))(Lt).then(ne=>{var mt,we;re.dispatch("refresh-usercontext",{}),H(vt=>vt+1);const Be=((we=(mt=ne==null?void 0:ne.data)==null?void 0:mt.output)==null?void 0:we.revokedPublicCount)||0;re.dispatch("trigger-alert",{message:Be>0?`Workspace set to private. ${Be} public link${Be===1?"":"s"} revoked.`:"Workspace set to private.",intent:"success"}),z(!1)}).catch(ne=>{if(z(!1),String((ne==null?void 0:ne.message)||"").includes("set-privacy-has-members")&&!je){ee(!0);return}re.dispatch("trigger-alert",{message:"Could not update workspace privacy. Please try again.",intent:"danger"})})},pe=je=>{if(je){if(s.some(Lt=>!Lt.is_you)){ee(!0);return}ae(!1);return}z(!0),pt(Yl,Ze("users-team-invitation-code-generate"))({teamID:e}).then(()=>{re.dispatch("refresh-usercontext",{}),H(kt=>kt+1),re.dispatch("trigger-alert",{message:"Sharing enabled â an invite link is ready in the Invite menu.",intent:"success"})}).catch(()=>{re.dispatch("trigger-alert",{message:"Could not enable sharing. Please try again.",intent:"danger"})}).finally(()=>z(!1))},W=je=>{m(je)},q=()=>{const je=f;if(!je)return;const kt=`${je.name_first||""} ${je.name_last||""}`.trim()||je.email_address||"this member",Lt=je.is_you;m(null),re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-remove-member-remove"))(Lt?{teamID:e}:{teamID:e,memberID:je.memberID}).then(()=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:Lt?"You left the workspace.":`Removed ${kt}.`,intent:"success"}),Lt?(re.dispatch("refresh-usercontext",{}),se("/dashboard")):H(ne=>ne+1)}).catch(ne=>{re.dispatch("interstitial-run","off");const Be=String((ne==null?void 0:ne.message)||"").includes("remove-member-is-owner");re.dispatch("trigger-alert",{message:Be?"The workspace owner can't be removed. Transfer ownership or delete the workspace instead.":ne.message||"Could not remove the member. Please try again.",intent:"danger"})})},te=je=>{const kt=`${je.name_first||""} ${je.name_last||""}`.trim()||je.email_address||je.email||"this person";confirm(`Unban ${kt}? They'll be re-added as a Suspended member (no access until you set a role) and will be able to rejoin.`)&&(re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-unban-member-unban"))({teamID:e,email:je.email}).then(()=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`${kt} was unbanned and re-added as Suspended.`,intent:"success"}),H(Lt=>Lt+1)}).catch(Lt=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:Lt.message||"Could not unban this person. Please try again.",intent:"danger"})}))},X=je=>{d(je)},le=()=>{const je=u;if(!je)return;const kt=`${je.name_first||""} ${je.name_last||""}`.trim()||je.email_address||"this member";d(null),re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-transfer-ownership-transfer"))({teamID:e,memberID:je.memberID}).then(()=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`${kt} is now the primary owner.`,intent:"success"}),re.dispatch("refresh-usercontext",{}),H(Lt=>Lt+1)}).catch(Lt=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:Lt.message||"Could not transfer ownership. Please try again.",intent:"danger"})})}
1959,{handleSubmit:me,register:fe,setValue:ke,watch:Se,formState:{errors:Et}}=fc({defaultValues:{teamName:t}}),{handleSubmit:nt}=fc({}),{handleSubmit:Pt,control:en,register:hn,setValue:rt,getValues:et,watch:Kt,formState:{isValid:zn}}=fc({defaultValues:{is_enabled:!1,permitted:[]}}),{fields:xt,append:rr,remove:ir}=xje({name:"permitted",control:en}),Tn=je=>{re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-view-manage"))({teamID:je,includeSuspendedMembers:!0}).then(({data:kt})=>{var Lt,ne,Be,mt;n(kt.output.name),ke("teamName",kt.output.name),a(kt.output.inviteCode),rt("is_enabled",((ne=(Lt=kt.output.inviteRequirements)==null?void 0:Lt.email_domains)==null?void 0:ne.is_enabled)||!1),rt("permitted",((mt=(Be=kt.output.inviteRequirements)==null?void 0:Be.email_domains)==null?void 0:mt.permitted)||[]),E(kt.output.allow_public_sharing!==!1),x(kt.output.public_sharing_disabled_mode||null),i(kt.output.members),c(kt.output.bannedMembers||[]),re.dispatch("interstitial-run","off")}).catch(kt=>{console.error("errorItem",kt),re.dispatch("interstitial-run","off")})},Ct=je=>{re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-invitations-updateDefaultOpenInvitation"))({teamID:e,email_domains:je}).then(({data:kt})=>{re.dispatch("trigger-alert",{message:"Domain Restriction settings updated successfully.",intent:"success"}),re.dispatch("interstitial-run","off"),H(Lt=>Lt+1)}).catch(kt=>{console.error("errorItem",kt),re.dispatch("interstitial-run","off")})},_r=(je,kt)=>{const Lt=b,ne=w;E(je),x(je===!1?kt||"pause":null),N(!0),re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-share-policy-set"))({teamID:e,allow:je,...je===!1&&kt?{mode:kt}:{}}).then(({data:Be})=>{var It;const mt=(It=Be==null?void 0:Be.output)==null?void 0:It.revoked,we=(mt==null?void 0:mt.revokedCount)||0;let vt;je?vt="Public sharing of bookmarks is now allowed for this workspace.":kt==="revoke"&&we>0?vt=`Public sharing disabled. ${we} existing public link${we===1?"":"s"} revoked.`:vt="Public sharing of bookmarks has been disabled for this workspace.",B({type:"auth/updateTeamField",data:{teamID:e,field:"allow_public_sharing",value:je}}),re.dispatch("trigger-alert",{message:vt,intent:"success"}),re.dispatch("interstitial-run","off"),N(!1),H(fn=>fn+1)}).catch(Be=>{console.error("savePublicSharingPolicy errorItem",Be),E(Lt),x(ne),re.dispatch("trigger-alert",{message:(Be==null?void 0:Be.message)||"Couldn't update the sharing policy. Try again.",intent:"danger"}),re.dispatch("interstitial-run","off"),N(!1)})},Qn=()=>{O(!0),C(!0),pt(Yl,Ze("users-team-share-policy-listPublic"))({teamID:e}).then(({data:je})=>{const kt=(je==null?void 0:je.output)||{boards:[],maps:[],counts:{boards:0,maps:0}};M(kt),O(!1)}).catch(je=>{console.error("listPublic errorItem",je),O(!1),C(!1),re.dispatch("trigger-alert",{message:"Couldn't check what's currently shared. Try again in a moment.",intent:"danger"})})},Ce=je=>{if(je){_r(!0);return}Qn()},ut=()=>{Qn()},pn=je=>{C(!1),_r(!1,je)};let Jt=({roleID:je,dataItem:kt})=>{let Lt=je;re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-manage-changeMemberRole"))({teamID:e,memberID:kt.memberID,roleID:Lt}).then(({data:ne})=>{re.dispatch("trigger-alert",{message:`Changed ${kt.name_first} ${kt.name_last}'s role to ${dw[Lt]}.`,intent:"success"}),H(j+1),re.dispatch("interstitial-run","off")}).catch(ne=>{console.error("errorItem",ne),re.dispatch("trigger-alert",{message:ne.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),re.dispatch("interstitial-run","off")})};const In=({teamID:je})=>
1959{var Be,mt,we,vt,It,fn,Ne,lt,wt,Ke,St,ln,vr,Yn,Cn;let kt={organizationID:null,user_roles:!1,users_per_team_limit:5,domain_specific_invitations:!1,public_sharing_policy:!1},Lt=ta.find(U.globalMeta.teams,Hn=>Hn.id===je),ne=ta.find(U.globalMeta.organizations,Hn=>{var Re;return Hn.id===((Re=Lt==null?void 0:Lt.organization)==null?void 0:Re.$id)});kt.organizationID=ne==null?void 0:ne.id,kt.user_roles=((Be=ne==null?void 0:ne.subscription)==null?void 0:Be.active)&&((vt=(we=Tr.organization.subscription.plan[(mt=ne==null?void 0:ne.subscription)==null?void 0:mt.plan])==null?void 0:we.has)==null?void 0:vt.user_roles)||!1,kt.users_per_team_limit=((It=ne==null?void 0:ne.subscription)==null?void 0:It.active)&&((Ne=Tr.organization.subscription.plan[(fn=ne==null?void 0:ne.subscription)==null?void 0:fn.plan])==null?void 0:Ne.users_per_team_limit)||5,kt.domain_specific_invitations=((lt=ne==null?void 0:ne.subscription)==null?void 0:lt.active)&&((St=(Ke=Tr.organization.subscription.plan[(wt=ne==null?void 0:ne.subscription)==null?void 0:wt.plan])==null?void 0:Ke.has)==null?void 0:St.domain_specific_invitations)||!1,kt.public_sharing_policy=((ln=ne==null?void 0:ne.subscription)==null?void 0:ln.active)&&((Cn=(Yn=Tr.organization.subscription.plan[(vr=ne==null?void 0:ne.subscription)==null?void 0:vr.plan])==null?void 0:Yn.has)==null?void 0:Cn.public_sharing_policy)||!1,y(kt)};p.useEffect(()=>{be&&ue&&Tn(e)},[e,j,be,ue]),p.useEffect(()=>{In({teamID:e})},[U]),p.useEffect(()=>{ea.ping(Ze("users-team-manage-standard"))},[]);let Dn=o.createElement(du,null),or=o.createElement(sf,{className:"app-content"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("div",{className:"flex items-center gap-2 justify-center"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-2 md:mb-0 md:text-2xl dark__text"},"Manage Workspace"),["dev","qa"].includes("production")?o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Base_Teams/${e}`,target:"_blank",rel:"noreferrer",className:"dark__text text-xs opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},"[FS]"):null),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("form",{className:"space-y-4",onSubmit:me(je=>{const kt=je.teamName;re.dispatch("interstitial-run","on"),pt(Yl,Ze("users-team-manage-standard"))({teamID:e,teamName:kt}).then(({data:Lt})=>{re.dispatch("trigger-alert",{message:`You have successfully updated the workspace name from ${t} to ${kt}!`,intent:"success"}),re.dispatch("refresh-usercontext",{responseItem:Lt.output}),re.dispatch("interstitial-run","off"),H(j+1)}).catch(Lt=>{console.error("errorItem",Lt),re.dispatch("interstitial-run","off")})})},o.createElement("div",{className:"sm:flex sm:gap-4 sm:items-center"},o.createElement("input",{className:"w-full disabled:opacity-70 disabled:cursor-not-allowed",type:"text",maxLength:50,disabled:!Ae,...fe("teamName",{required:"Please enter a workspace name.",maxLength:{value:50,message:"Workspace name must be at most 50 characters."}})}),Ae?o.createElement("button",{type:"submit",disabled:Se("teamName")===t,className:"w-full mt-4 sm:mt-2 sm:w-auto flex justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap disabled:opacity-50 disabled:cursor-not-allowed"},"Save"):null),Et.teamName&&o.createElement("span",{className:"error text-left"},Et.teamName.message)),Ae&&ce?o.createElement(yi,null,o.createElement("div",{className:"flex flex-col gap-2 mt-4"},o.createElement("span",{className:"flex gap-1 items-center text-nowrap dark__text"},o.createElement("span",null,"Private workspace â only visible to you"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Your Personal Workspace is always private and can't be shared or deleted. It doesn't count toward your plan's workspace limit."},o.createElement(Ft,{icon:o.createElement(Au,{size:14,className:"text-gray-500"})}))),o.createElement("span",{className:"text-sm text-gray-500 dark__text"}
1959,"Want to share bookmarks with others?"," ",o.createElement("button",{type:"button",onClick:()=>se("/workspace/add"),className:"text-primary underline hover:no-underline dark:text-primary-400"},"Create a shareable workspace")))):null,Ae&&!ce?o.createElement(yi,null,o.createElement("div",{className:"flex items-center mt-4"},o.createElement(ds,{large:!0,innerLabelChecked:"On",innerLabel:"Off",className:"dark__text m-0",checked:$,disabled:Y,onChange:je=>pe(je.currentTarget.checked)}),o.createElement("span",{className:"flex gap-1 text-nowrap dark__text"},o.createElement("span",null,"Private workspace"),o.createElement(fr,{compact:!0,usePortal:!1,content:"Private workspaces are just for you. Turn this off to share and invite others to join."},o.createElement(Ft,{icon:o.createElement(Au,{size:14,className:"text-gray-500"})}))))):null)),null,r&&(U!=null&&U.isLive)&&!(U!=null&&U.isLoading)?o.createElement(o.Fragment,null,Ae?o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},v.domain_specific_invitations?o.createElement("form",{onSubmit:Pt(Ct),className:"space-y-4"},Kt("is_enabled")?o.createElement("div",null,o.createElement("div",{className:"flex items-center justify-between"},o.createElement("span",null,"Approved Domains"),o.createElement("button",{type:"button",onClick:()=>rr({target:"",is_enabled:!0}),className:"rounded-sm flex gap-2 items-center whitespace-nowrap"},o.createElement(MG,{size:16}),"Add domain")),o.createElement(Es,{className:"m-4 mx-0"}),xt==null?void 0:xt.map((je,kt)=>o.createElement("div",{key:kt,className:"flex gap-4"},o.createElement("input",{...hn(`permitted.${kt}.target`,{required:!0,pattern:{value:/^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,message:"invalid domain format"}}),placeholder:"your-company.com",type:"text"}),o.createElement("div",{className:"flex items-center"},o.createElement("button",{type:"button",onClick:()=>{ir(kt),kt===0&&xt.length===1&&rt("is_enabled",!1)},className:"rounded-sm flex flex-col sm:flex-row gap-1 sm:gap-2 items-center"},o.createElement(KE,{size:16}),o.createElement("span",null,"Remove"))))),o.createElement(Es,{className:"pt-2 mx-0"})):null,o.createElement("div",{className:"flex flex-col sm:flex-row gap-4 justify-between"},o.createElement("div",{className:"flex items-center gap-1"},o.createElement(ds,{...hn("is_enabled"),large:!0,innerLabelChecked:"On",innerLabel:"Off",className:"dark__text m-0",onChange:je=>{if(rt("is_enabled",je.target.checked),je.target.checked&&xt.length===0&&rr({target:"",is_enabled:!0}),!je.target.checked){const kt=et();Ct({...kt,is_enabled:!1})}}}),o.createElement("span",{className:"flex gap-1 text-nowrap dark__text"},o.createElement("span",null,"Enable Domain Restriction"),o.createElement("span",{className:"hd"},"for new members.")),o.createElement(fr,{compact:!0,usePortal:!1,content:"Restrict new members to account emails from domains you allow."},o.createElement(Ft,{icon:o.createElement(Au,{size:16})}))),Kt("is_enabled")?o.createElement("button",{type:"submit",className:"submit-button w-full sm:w-auto flex justify-center text-white bg-primary rounded-sm text-sm px-4 py-2 dark:bg-primary-600 dark:hover:bg-primary-700 whitespace-nowrap",disabled:!zn},"Save"):null)):o.createElement("div",{className:"space-y-4"},o.createElement("div",{className:"flex flex-col sm:flex-row gap-4 justify-between"},o.createElement("div",{className:"flex items-center gap-1"},o.createElement(ds,{large:!0,innerLabelChecked:"On",innerLabel:"Off",disabled:!0,className:"dark__text m-0"}),o.createElement("span",{className:"flex gap-1 text-nowrap dark__text"},o.createElement("span",null,"Enable Domain Restriction"),o.createElement("span",{className:"hd"},"for new members.")),o.createElement(fr,{compact:!0,usePortal:!1,content:"Restrict new members to account emails from domains you allow."},o.createElement(Ft,{icon:o.createElement(Au,{size:14,className:"text-gray-500"})})),o.createElement(fr,{compact:!0,usePortal:!1,content:"The selected workspace does not have a subscription plan to activate this feature."},o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>{v!=null&&v.organizationID&&se({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:v.organizationID})})}},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription")))))),$?null:v.public_sharing_policy?o.createElement("div",{className:"flex flex-col gap-4 justify-between mt-3"},o.createElement("div",{className:"flex gap-1"},o.createElement(ds,{large:!0,innerLabelChecked:"On",innerLabel:"Off",className:"dark__text m-0",checked:!b,disabled:S||A,onChange:je=>{Ce(!je.target.checked)}}),o.createElement("span",{className:"flex flex-col gap-2"},o.createElement("span",{className:"flex gap-2 items-center"},o.createElement("span",{className:"text-nowrap dark__text"},"Do not allow public boards and flows."),o.createElement(fr,{compact:!0,usePortal:!1,content:`When enabled, no board or flow on this workspace can be set to "Anyone with the link", and bookmarks from this workspace will not appear on other workspaces' public links.`},o.createElement(Ft,{icon:o.createElement(Au,{size:14,className:"text-gray-500"})}))),b?null:o.createElement("span",{className:"flex gap-2 text-gray-600 dark:text-gray-400"},o.createElement("span",{className:"text-nowrap"},"Policy:"),o.createElement("strong",{className:"dark__text"},w==="revoke"?"Revoke permanently":"Pause public access")," ",o.createElement("button",{type:"button",className:"ml-1 text-blue-600 dar
1959k:text-blue-400 hover:underline bg-transparent border-0 p-0 cursor-pointer",onClick:ut,disabled:S||A},"Edit"))))):o.createElement("div",{className:"flex flex-col sm:flex-row gap-4 justify-between mt-3"},o.createElement("div",{className:"flex items-center gap-1"},o.createElement(ds,{large:!0,innerLabelChecked:"On",innerLabel:"Off",disabled:!0,className:"dark__text m-0"}),o.createElement("span",{className:"flex gap-1 text-nowrap dark__text"},o.createElement("span",null,"Do not allow public sharing of bookmarks.")),o.createElement(fr,{compact:!0,usePortal:!1,content:"Block any board or flow on this workspace from being shared via a public link, and prevent this workspace's bookmarks from appearing on other workspaces' public links."},o.createElement(Ft,{icon:o.createElement(Au,{size:16})})),o.createElement(fr,{compact:!0,usePortal:!1,content:"The selected workspace does not have a subscription plan to activate this feature."},o.createElement("span",{className:"bp6-tag bp6-minimal tags mx-1 dark:bg-gray-700 dark:border-gray-600 dark__text cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>{v!=null&&v.organizationID&&se({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:v.organizationID})})}},o.createElement("span",{className:"bp6-text-overflow-ellipsis bp6-fill dark__text"},"Subscription"))))))):null,o.createElement(yi,{fullWidth:!0},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full !p-0 overflow-x-auto"},!v.user_roles&&s.length>0?o.createElement("div",{className:"flex flex-col py-5 xs:py-3 xs:px-2 gap-1"},s.length>=v.users_per_team_limit?o.createElement("div",{className:"flex-inline text-center dark__text text-sm"},o.createElement("span",null,"You have reached the maximum limit of"),o.createElement(li,{minimal:!0,className:"mx-2 dark__text"},v.users_per_team_limit),o.createElement("span",null,"members in this workspace. Upgrade your organization's subscription to allow more members.")):null,o.createElement("div",{className:"flex-inline text-center dark__text text-sm"},o.createElement("a",{className:"mr-1",onClick:()=>se({pathname:Pn("/organization/:organizationID/subscribe",{organizationID:v.organizationID})})},"Add a subscription"),o.createElement("span",null,"to enable management of user roles."))):null,o.createElement("table",{className:"table-members w-full text-sm text-left text-gray-500 border dark:text-gray-400"},o.createElement("thead",{className:"text-xs"},o.createElement("tr",null,o.createElement("th",{scope:"col"},"Members"),o.createElement("th",{scope:"col",className:"hd"},"Joined"),o.createElement("th",{scope:"col",className:"member-rol !pl-6"},"Role"))),o.createElement("tbody",null,s.map(je=>o.createElement("tr",{key:je.memberID,className:"group",style:{opacity:je.type_role==="base-team-suspended"?.5:1}},o.createElement("td",null,o.createElement("div",{className:"flex items-center gap-2"},o.createElement("span",null,je.name_first,"Â ",je.name_last),["dev","qa"].includes("production")?o.createElement("a",{href:`https://console.firebase.google.com/u/0/project/iteratingly/firestore/data/Base_Teams/${e}/Sub_Team_Members/${je.memberID}`,target:"_blank",rel:"noreferrer",className:"opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},"[FS]"):null),o.createElement("div",{className:"text-xs"},je.email_address),je.is_creator?null:o.createElement("a",{onClick:()=>W(je),className:"text-xs text-red-500 cursor-pointer opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},je.is_you?"Leave workspace":"Remove"),he&&!je.is_you&&!je.is_creator?o.createElement("a",{onClick:()=>X(je),className:"text-xs text-primary cursor-pointer ml-2 opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},"Transfer ownership"):null),o.createElement("td",{className:"hd"},Ht(je.date_created*1e3).format("MM/DD/YYYY")),o.createElement("td",{className:"whitespace-nowrap"},o.createElement("div",{className:"bp6-html-select bp6-fill bp6-minimal"},je.is_you||je.is_creator||!v.user_roles||je.type_role==="base-team-owner"&&!Ae||je.is_founder&&!ie?o.createElement("div",{className:"pl-2 flex gap-1"},je.type_role!=="base-team-suspended"?o.createElement("span",null,dw[je.type_role]):null,!je.is_you&&je.is_creator&&Ue>1?o.createElement("span",{className:"ml-1 text-gray-500 dark:text-gray-400"},"(Primary)"):null,je.is_you?o.createElement("span",{className:"ml-1"},"(You)"):je.type_role==="base-team-suspended"?o.createElement("span",{className:"flex gap-1 items-center"},o.createElement("span",null,"Suspended"),o.createElement("a",{onClick:()=>{confirm("Reactivate this user?")&&Jt({roleID:"base-team-editor",dataItem:je})},className:"opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},"Enable")):!je.is_creator&&!je.is_founder&&je.type_role!=="base-team-owner"?o.createElement("span",{className:"opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},o.createElement("a",{onClick:()=>{confirm("Suspend this user?")&&Jt({roleID:"base-team-suspended",dataItem:je})}},"Suspend")):null):o.createElement("div",null,o.createElement("select",{value:je.type_role,onChange:kt=>{let Lt=kt.target.value;Jt({roleID:Lt,dataItem:je})}},(Ae?[{value:"base-team-owner"},...wH]:wH).map(kt=>o.createElement("option",{key:kt.value,value:kt.value},dw[kt.value]))),o.createElement("span",{className:"bp6-icon bp6-icon-caret-down"}
1959))))))))))):o.createElement("div",{className:"dev-info dev-info--middle"},["dev","qa"].includes("production")?o.createElement("span",null,"TeamID (test info only): ",e):null),l.length>0?o.createElement(yi,{fullWidth:!0},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full !p-0 overflow-x-auto"},o.createElement("button",{type:"button",onClick:()=>g(je=>!je),"aria-expanded":h,className:"w-full px-4 py-4 text-left flex items-start gap-2 cursor-pointer bg-transparent border-0"},o.createElement(Ft,{icon:h?"chevron-down":"chevron-right",className:"text-gray-500 dark:text-gray-400 mt-0.5 flex-shrink-0"}),o.createElement("div",null,o.createElement("h2",{className:"text-sm font-bold dark__text"},"Deleted members (",l.length,")"),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1"},"Removed people can't rejoin via the invite link. Unban to re-add someone as a Suspended member."))),h?o.createElement("table",{className:"table-members w-full text-sm text-left text-gray-500 border dark:text-gray-400"},o.createElement("thead",{className:"text-xs"},o.createElement("tr",null,o.createElement("th",{scope:"col"},"Members"),o.createElement("th",{scope:"col",className:"hd"},"Removed"),o.createElement("th",{scope:"col",className:"member-rol !pl-6"},"Last role"))),o.createElement("tbody",null,l.map(je=>o.createElement("tr",{key:je.email,className:"group"},o.createElement("td",null,o.createElement("div",{className:"dark__text"},`${je.name_first||""} ${je.name_last||""}`.trim()||je.email_address||je.email),o.createElement("div",{className:"text-xs"},je.email_address||je.email)),o.createElement("td",{className:"hd"},je.banned_at?Ht(je.banned_at*1e3).format("MM/DD/YYYY"):"â"),o.createElement("td",{className:"whitespace-nowrap !pl-6"},o.createElement("div",{className:"flex items-center gap-3"},o.createElement("span",{className:"dark__text"},dw[je.last_role]||"â"),o.createElement("a",{onClick:()=>te(je),className:"text-xs text-primary cursor-pointer opacity-0 group-hover:opacity-100 ease-in-out transition duration-300"},"Unban"))))))):null)):null,o.createElement(ya,{isOpen:k,onClose:()=>{C(!1)},title:"Disable public sharing for this workspace?",className:"dark__text policy-dialog"},o.createElement("div",{className:"bp6-dialog-body"},A?o.createElement("div",{className:"py-2"},"Checking what's currently shared..."):o.createElement(o.Fragment,null,o.createElement("p",{className:"mb-3"},"This workspace currently has"," ",o.createElement("strong",null,T.counts.boards)," public board",T.counts.boards===1?"":"s"," and"," ",o.createElement("strong",null,T.counts.maps)," public flow",T.counts.maps===1?"":"s",". Choose how to handle them:"),(T.boards.length>0||T.maps.length>0)&&o.createElement("div",{className:"mb-4 p-3 rounded border border-gray-200 dark:border-gray-700 max-h-48 overflow-y-auto"},o.createElement("ul",{className:"text-sm text-gray-700 dark:text-gray-300 space-y-1 m-0 list-disc list-inside"},T.boards.map(je=>o.createElement("li",{key:`b-${je.$id}`},"Board: ",je.name||"(untitled)")),T.maps.map(je=>o.createElement("li",{key:`m-${je.$id}`},"Flow: ",je.name||"(untitled)")))),o.createElement("div",{className:"space-y-3"},o.createElement("div",{className:"p-3 rounded border border-gray-200 dark:border-gray-700"},o.createElement("div",{className:"flex items-start gap-2"},o.createElement(Ft,{icon:"pause",className:"mt-1 text-gray-600"}),o.createElement("div",null,o.createElement("div",{className:"font-medium"},"Pause public access (recommended)"),o.createElement("div",{className:"text-sm text-gray-600 dark:text-gray-400"},"Existing share links stop working for the public, but are restored automatically if you re-enable public sharing later. The links themselves are not deleted.")))),o.createElement("div",{className:"p-3 rounded border border-gray-200 dark:border-gray-700"},o.createElement("div",{className:"flex items-start gap-2"},o.createElement(Ft,{icon:"trash",className:"mt-1 text-gray-600"}),o.createElement("div",null,o.createElement("div",{className:"font-medium"},"Revoke permanently"),o.createElement("div",{className:"text-sm text-gray-600 dark:text-gray-400"},"Flip every public board and flow back to team-only and delete their share tokens. Existing URLs stop working forever â re-enabling public sharing later won't bring them back."))))))),o.createElement("div",{className:"bp6-dialog-footer"},o.createElement("div",{className:"bp6-dialog-footer-actions"},o.createElement(De,{text:"Cancel",onClick:()=>C(!1),disabled:A}),o.createElement(De,{text:"Pause public access",intent:"primary",onClick:()=>pn("pause"),disabled:A}),o.createElement(De,{text:"Revoke permanently",intent:"danger",onClick:()=>pn("revoke"),disabled:A})))),o.createElement(ya,{isOpen:!!u,onClose:()=>d(null),title:"Transfer ownership?",className:"dark__text"},o.createElement("div",{className:"bp6-dialog-body"},o.createElement("p",{className:"mb-2 dark__text"}
1959,"Make"," ",o.createElement("strong",null,u?`${u.name_first||""} ${u.name_last||""}`.trim()||u.email_address||"this member":"")," ","the primary owner of this workspace?"),o.createElement("p",{className:"text-sm text-gray-600 dark:text-gray-400 m-0"},u&&u.type_role!=="base-team-owner"?"They'll be promoted to Owner. ":"","You'll stay a member (an owner) and can leave afterwards.")),o.createElement("div",{className:"bp6-dialog-footer"},o.createElement("div",{className:"bp6-dialog-footer-actions"},o.createElement(De,{text:"Cancel",onClick:()=>d(null)}),o.createElement(De,{text:"Transfer ownership",intent:"primary",onClick:le})))),o.createElement(ya,{isOpen:K,onClose:()=>{ee(!1),J(!1)},title:"Make this workspace private?",className:"dark__text"},o.createElement("div",{className:"bp6-dialog-body"},o.createElement("p",{className:"mb-2 dark__text"},"Turning off sharing removes ",o.createElement("strong",null,"every other member")," from this workspace and disables the invite link."),o.createElement("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3"},"This can't be undone â removed members would need a new invite to rejoin."),o.createElement(ef,{checked:oe,disabled:Y,onChange:je=>J(je.target.checked),label:"Also make all shared boards & flows private (revokes their public links)"})),o.createElement("div",{className:"bp6-dialog-footer"},o.createElement("div",{className:"bp6-dialog-footer-actions"},o.createElement(De,{text:"Cancel",onClick:()=>{ee(!1),J(!1)},disabled:Y}),o.createElement(De,{text:oe?"Make private, remove members & revoke links":"Make private & remove members",intent:"danger",onClick:()=>{ee(!1),ae(!0,oe),J(!1)},disabled:Y})))),o.createElement(ya,{isOpen:!!f,onClose:()=>m(null),title:f!=null&&f.is_you?"Leave this workspace?":"Remove member?",className:"dark__text"},o.createElement("div",{className:"bp6-dialog-body"},f!=null&&f.is_you?o.createElement("p",{className:"m-0 dark__text"},"You'll immediately lose access to this workspace and its bookmarks."):o.createElement(o.Fragment,null,o.createElement("p",{className:"mb-2 dark__text"}
1959,"Remove"," ",o.createElement("strong",null,f?`${f.name_first||""} ${f.name_last||""}`.trim()||f.email_address||"this member":"")," ","from this workspace? They'll lose access immediately."),o.createElement("p",{className:"text-sm text-gray-600 dark:text-gray-400 m-0"},"Their email is blocked from rejoining via the invite link until you unban them."))),o.createElement("div",{className:"bp6-dialog-footer"},o.createElement("div",{className:"bp6-dialog-footer-actions"},o.createElement(De,{text:"Cancel",onClick:()=>m(null)}),o.createElement(De,{text:f!=null&&f.is_you?"Leave workspace":"Remove member",intent:"danger",onClick:q})))));const Zt=((An=(((vn=U==null?void 0:U.globalMeta)==null?void 0:vn.teams)||[]).find(je=>String(je.id)===String(e)))==null?void 0:An.name)||t||"",tr=o.createElement(sf,{className:"app-content"},o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg"},o.createElement("h1",{className:"text-xl font-bold leading-tight tracking-tight text-gray-900 mb-2 md:mb-0 md:text-2xl dark__text"},"Manage Workspace"),o.createElement(Es,{className:"my-4 mx-0"}),o.createElement("div",{className:"space-y-2"},o.createElement("label",{className:"block text-sm font-medium dark__text"},"Workspace name"),o.createElement("input",{type:"text",value:Zt,disabled:!0,readOnly:!0,className:"bp6-input w-full opacity-70"}),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1"},"You don't have permission to manage this workspace.")))),o.createElement(yi,null,o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg mt-4"},o.createElement("h2",{className:"text-base font-semibold dark__text"},"Leave workspace"),o.createElement("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 mb-3"},"Leaving removes your access to this workspace and its bookmarks. You can rejoin if you're invited again."),o.createElement(De,{text:"Leave workspace",intent:"danger",icon:o.createElement(KE,null),onClick:()=>m({is_you:!0})}))),o.createElement(ya,{isOpen:!!f,onClose:()=>m(null),title:"Leave this workspace?",className:"dark__text"},o.createElement("div",{className:"bp6-dialog-body"},o.createElement("p",{className:"m-0 dark__text"},"You'll immediately lose access to this workspace and its bookmarks. You can rejoin if you're invited again.")),o.createElement("div",{className:"bp6-dialog-footer"},o.createElement("div",{className:"bp6-dialog-footer-actions"},o.createElement(De,{text:"Cancel",onClick:()=>m(null)}),o.createElement(De,{text:"Leave workspace",intent:"danger",onClick:q})))));return be?ue?L?Dn:or:tr:Dn};Ts();const qN=Ir(xr()),LYe=({external:e,sibling_meta_action:t={},sibling_meta_reset:n})=>{const{teamID:r}=xs(),[a,s]=df(),[i,l]=p.useState(0),[c,u]=p.useState(null),[d,f]=p.useState(!1),[m,h]=p.useState([]),[g,v]=p.useState([]),[y,b]=p.useState(!1),E=yr(),w=Wn(C=>{var A;return(A=C==null?void 0:C.FB)==null?void 0:A.auth}),x=({tagOptions:C})=>h((()=>{let A=a.getAll("tag"),O=[];for(var T=0;T<(A==null?void 0:A.length);T++){let M=C.find(L=>A[T]===L.value);M&&O.push(M)}return O})()),S=({teamID:C,tagIDs:A})=>{u(null),f(!1),A.length>0?(re.dispatch("interstitial-run","on"),pt(qN,Ze("users-asset-view-search_team_filter"))({teamID:C,tagIDs:A}).then(({data:O})=>{u(O.output.assets),re.dispatch("select-current-team",{teamID:C}),re.dispatch("interstitial-run","off")}).catch(O=>{console.error("errorItem",O),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:O.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})})):f(!0)},N=({teamID:C})=>{b(!0),pt(qN,Ze("users-tag-view-optionsList"))({teamID:C}).then(({data:A})=>{let O=[];for(var T=0;T<A.output.tags.length;T++)O.push({label:A.output.tags[T].name,value:A.output.tags[T].$id});v(O),x({tagOptions:O}),b(!1)}).catch(A=>{console.error("errorItem",A),re.dispatch("trigger-alert",{message:A.message||"Hmm...something unexpected happened. Try again.",intent:"danger"}),b(!1)})};let k=({SortableBar:C})=>o.createElement("div",null,o.createElement(xi,{className:"sort-filter-nav"},o.createElement(C,null)),o.createElement(xi,{className:"sort-filter-nav sort-filter-nav__active"},o.createElement(xi.Group,{align:"right"},o.createElement(ci,{to:Zc.defaults.loginRedirect,className:"ml-1"},o.createElement("button",{className:"bp6-button bp6-intent-primary bp6-minimal"},o.createElement(Ft,{icon:o.createElement(wm,{size:16})})))),o.createElement(xi.Group,{align:"left"},o.createElement("div",{className:"dark__text flex gap-1 items-center ml-1 mr-2 select-tag-container select-tag-container__sortbar"},o.createElement(Ft,{icon:o.createElement(Bge,{size:16,className:"text-gray-300"})}),o.createElement(km,{value:m,onChange:A=>{h(A);let O=[];for(var T=0;T<A.length;T++)O.push(A[T].value);E({pathname:`${Pn("/workspace/:teamID/search",{teamID:r})}`,search:`?${Gp({tag:O})}`})},options:g,isMulti:!0,className:`${y?Q0:null}`,classNames:{control:A=>A.isFocused?"select-tag focused":"select-tag"},classNamePrefix:"select-tag"}))),m.length===1?o.createElement(xi.Group,{align:"right"},o.createElement(fr,{compact:!0,usePortal:!1,content:"Edit tag"},o.createElement("button",{onClick:()=>{e.action({type:"sibling-header",subType:"sidepanel-open-edittag",dataSet:{targetTag:m[0]}})},className:"bp6-button bp6-intent-primary bp6-minimal"},o.createElement(Ft,{icon:o.createElement(dG,{size:16})}))),o.createElement(fr,{compact:!0,usePortal:!1,content:"Delete tag"},o.createElement("button",{onClick:()=>{confirm(`Delete the tag "${m[0].label}"?`)&&(re.dispatch("interstitial-run","on"),pt(qN,Ze("users-tag-manage-delete"))({tag:{$id:m[0].value}}).then(({data:A})=>{re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:`Successfully deleted the tag "${m[0].label}".`,intent:"success"}),l(i+1)}).catch(A=>{console.error("errorItem",A),re.dispatch("interstitial-run","off"),re.dispatch("trigger-alert",{message:A.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))},className:"bp6-button bp6-intent-primary bp6-minimal"},o.createElement(Ft,{icon:o.createElement(KP,{size:16})})))):null));return p.useEffect(()=>{N({teamID:r})},[i,r]),p.useEffect(()=>{let C=a.getAll("tag");x({tagOptions:g}),S({teamID:r,tagIDs:C})},[i,r,a]),p.useEffect(()=>{(t==null?void 0:t.type)==="body"&&(t==null?void 0:t.subType)==="assetlist-refreshtable"&&(l(i+1),n())},[t]),o.createElement("div",{className:"asset-list asset-list-updated"},w!=null&&w.isLive?o.createElement("div",null,d?o.createElement("div",{className:"flex min-h-full flex-col justify-center px-6 py-6 lg:px-8 dark__text border-top"},"Apply filters to narrow your list."):(c==null?void 0:c.length)>0?o.createElement("div",null,o.createElement(Z4,{associatedTeamID:r,containerItem:{type:"tags",additionalComponents:{header:k}},dataItems:c,refreshTable:()=>l(i+1),enable:{filterable:!0,sortable:!0},external:{action:({type:C=null,dataSet:A={},callback:O=ta.noop})=>{C==="open-asset-url"?(f_({type:{list:"recently-viewed",teamCount:"all"}}),f_({type:{list:"recently-viewed",teamCount:"specific"}})):C==="toggle-asset-favorite"?(localStorage.removeItem("assetList-lastDownload"),localStorage.removeItem("assetsGeneral-lastDownload")):C==="open-collection"&&E({pathname:Pn("/collection/:collectionID",{collectionID:A.$collection_id})})}}})):o.createElement("div",{className:"flex flex-col items-center justify-center px-6 py-8 mx-auto
1959sm:pt-6 md:pt-8 lg:pt-10"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"dark:border dark:bg-gray-800 dark:border-gray-700"},o.createElement("h5",{className:"dark__text"},"Adjust your filters to view bookmarks.")))):null)},$Ye=of();Ts();const FYe=Ir(xr()),zYe=()=>{var S,N;const{assetID:e}=xs(),[t,n]=p.useState(null),[r,a]=p.useState(!1),[s,i]=p.useState(!1),[l,c]=p.useState(null),[u,d]=p.useState(null),[f,m]=p.useState(!1),h=yr(),g=Wn(k=>{var C;return(C=k==null?void 0:k.FB)==null?void 0:C.auth}),v=k=>{k.display_format==="inline"?(c(k.url),d(k.asset),m(!0)):window.location.replace(k.url)},y=()=>{var k;(k=g==null?void 0:g.user)!=null&&k.uid&&(a(!0),pt(FYe,Ze("users-asset-url-go"))({assetID:e}).then(({data:C})=>{C.output.is_applicable?(n(C.output),v(C.output)):C.output.cause==="not-permitted"&&i(!0),setTimeout(()=>{a(!1)},2e3)}).catch(C=>{console.error("errorItem",C),a(!1),re.dispatch("trigger-alert",{message:C.message||"Hmm...something unexpected happened. Try again.",intent:"danger"})}))};p.useEffect(()=>{y()},[(S=g==null?void 0:g.user)==null?void 0:S.uid]);let b=o.createElement(du,null),E=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg flex flex-col gap-4 text-center"},o.createElement("span",null,"You have opened your bookmark"),o.createElement("span",{className:"flex flex-col gap-1"},o.createElement("a",{onClick:()=>v(t),className:"leading-6 text-indigo-600 hover:text-indigo-500"},(t==null?void 0:t.display_format)==="inline"?"Reopen":"Reload","Â the bookmark again"),o.createElement("a",{onClick:()=>h(Zc.defaults.loginRedirect),className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Return to your account"))),o.createElement(tre,{url:l,asset:u,dialogOpen:f,dialogCloseExternal:()=>{m(!1),c(null),d(null)},redirectAfterClose:!0})),w=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg flex flex-col gap-4 text-center"},o.createElement("span",null,"You are not logged in."),o.createElement("span",{className:"flex flex-col gap-1"},o.createElement("a",{onClick:()=>{h({pathname:Pn("/go/:assetID/login",{assetID:e})})},className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Sign in and try again.")))),x=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card w-full sm:max-w-lg flex flex-col gap-4 text-center"},o.createElement("span",null,"You do not have access to this bookmark. Contact the workspace's admin to get access."),o.createElement("span",{className:"flex flex-col gap-1"},o.createElement("a",{onClick:()=>{Dy($Ye),re.dispatch("login-freeup"),h({pathname:Pn("/go/:assetID/login",{assetID:e})})},className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Sign in to another account."),o.createElement("a",{onClick:()=>h(Zc.defaults.loginRedirect),className:"leading-6 text-indigo-600 hover:text-indigo-500"},"Return to your account"))));return g!=null&&g.isLive?(N=g==null?void 0:g.user)!=null&&N.uid?r?b:s?x:E:w:b},HYe=of(),VYe=()=>{var h;const[e,t]=p.useState(!1),[n,r]=p.useState(!1),a=Wn(g=>{var v;return(v=g==null?void 0:g.FB)==null?void 0:v.auth}),[s,i]=df();let l=s.get("mode"),c=s.get("oobCode");const u=()=>{let g=a.user;g.emailVerified=!0,Zn.dispatch({type:"auth/setLoginState",data:{currentUser:g,isLoggedIn:!0,isLoading:!1,userContext:a.context,globalMeta:a.globalMeta}})},d=()=>{var g,v,y;(g=a==null?void 0:a.user)!=null&&g.email?((y=(v=a.globalMeta)==null?void 0:v.teams)==null?void 0:y.length)>0?re.dispatch("redirect-to",Zc.defaults.loginRedirect):re.dispatch("redirect-to","/dashboard"):re.dispatch("redirect-to","/login")};let f=()=>{t(!0),Fre(HYe,c).then(()=>{r(!0),u(),d(),t(!1),re.dispatch("trigger-alert",{message:"You have successfully verified your email address.",timeout:6e4,intent:"success"})}).catch(g=>{console.error("errorItem",g);let v="Hmm...something unexpected happened. Try again.";g.code==="auth/invalid-action-code"&&(v="Sorry, but this is an invalid email link. Please try again."),t(!1),re.dispatch("trigger-alert",{message:v,timeout:6e4,intent:"danger"}),d()})};p.useEffect(()=>{var g;a!=null&&a.isLive&&(l&&c?l==="verifyEmail"&&((g=a==null?void 0:a.user)!=null&&g.email?a.user.emailVerified?d():f():d()):d())},[a==null?void 0:a.isLive]);let m=o.createElement("div",{className:"app-content"},o.createElement(jn,{interactive:!1,elevation:qn.ONE,className:"card"},o.createElement("h5",{className:"dark__text"},"Verifying...")));return l==="verifyEmail"&&(h=a==null?void 0:a.user)!=null&&h.email&&!a.user.emailVerified?n?null:m:null},UYe={"base-team-owner":"Owner","base-team-admin":"Admin","base-team-editor":"Editor","base-team-viewer":"Viewer","base-team-suspended":"Suspended"},BYe=["MEMBER-JOINED","MEMBER-LEFT","MEMBER-REMOVED","MEMBER-UNBANNED","MEMBER-ROLE-CHANGED","OWNERSHIP-TRANSFERRED","PRIVACY-SET-PRIVATE","PRIVACY-SET-SHARED"],EH=e=>BYe.includes((e||"").toUpperCase()),ore=({external:e,isSpecific:t=!1,sibling_meta_action:n,sibling_meta_reset:r})=>{var Y,z,K,ee,oe,J,se;const{teamID:a}=xs(),s=yr(),i=ll(),[l,c]=p.useState([]),[u,d]=p.useState(!0),[f,m]=p.useState(null),[h,g]=p.useState(t&&a?a:null),v=B=>{g(B),t&&B!==a&&s("/workspace/all/activity/all")},[y,b]=p.useState(50),[E,w]=p.useState(null),x=Wn(B=>{var U;return(U=B==null?void 0:B.FB)==null?void 0:U.auth}),S=((Y=x==null?void 0:x.globalMeta)==null?void 0:Y.teams)||[],N=((z=x==null?void 0:x.context)==null?void 0:z.team_manage_edit_team_map)||{},k=!!((K=x==null?void 0:x.context)!=null&&K.team_manage_edit),C=B=>!!(B&&N[B]),A=t?C(a):h?C(h):k;p.useEffect(()=>{var U;if(!((U=x==null?void 0:x.user)!=null&&U.uid)){w(null);return}const B=Ki.currentUser;if(!B){w(null);return}B.getIdTokenResult(!0).then($=>{w({claims:$.claims,email:B.email})})},[(ee=x==null?void 0:x.user)==null?void 0:ee.uid]),p.useEffect(()=>{var B;Jn.analyticsPage({userId:(B=x==null?void 0:x.user)==null?void 0:B.uid,name:"Activities View",properties:{teamId:a,isSpecific:t}})},[a,t,(oe=x==null?void 0:x.user)==null?void 0:oe.uid]),p.useEffect(()=>{var B;if(e&&e.action){let U=!0;
1959t&&((B=x==null?void 0:x.globalMeta)!=null&&B.teams)&&(U=!!x.globalMeta.teams.find($=>$.id===a)),e.action({type:"sibling-header",subType:"currentteam-set-match-assetslist-ismemberofcurrentteam",dataSet:{isMemberOfCurrentTeam:U,isSpecific:t}})}},[a,x,t,e]),p.useEffect(()=>{var ce,be;d(!0);const B=yM(fk,"Activity_Logs");let U;if(t&&a)U=Bb(B,Gb("details.teamId","==",a),Wb("timestamp","desc"),jb(y));else{const ue=S.map(Ae=>Ae.id).filter(Ae=>!!Ae);gOe(E==null?void 0:E.claims)?U=Bb(B,Wb("timestamp","desc"),jb(y)):ue.length>0?U=Bb(B,zre(Gb("details.teamId","in",ue.slice(0,30)),Gb("userId","==",(ce=x==null?void 0:x.user)==null?void 0:ce.uid)),Wb("timestamp","desc"),jb(y)):U=Bb(B,Gb("userId","==",((be=x==null?void 0:x.user)==null?void 0:be.uid)||"none"),Wb("timestamp","desc"),jb(y))}const $=KH(U,ue=>{const Ie=[];ue.forEach(Ae=>{Ie.push({$id:Ae.id,...Ae.data()})}),Ie.sort((Ae,he)=>{const _e=Ae.timestamp?Ae.timestamp.seconds:Number.MAX_SAFE_INTEGER;return(he.timestamp?he.timestamp.seconds:Number.MAX_SAFE_INTEGER)-_e}),c(Ie),d(!1)},ue=>{console.error("Error fetching activity logs:",ue),d(!1)});return()=>$()},[a,t,y,E,S,(J=x==null?void 0:x.user)==null?void 0:J.uid]);const O=B=>{switch(B==null?void 0:B.toUpperCase()){case"DELETE":case"DELETED":case"REMOVE":case"REMOVED":case"DELETE_BULK":return o.createElement(tu,{size:14,color:"#D141E3"});case"ADD":case"CREATED":case"CREATE":return o.createElement(zs,{size:14,color:"#1F4B99"});case"EDIT":case"MODIFIED":case"UPDATE":case"EDIT_BULK":case"EDIT-MAP":return o.createElement(eu,{size:14,color:"#F55656"});case"ADD_VERSION":return o.createElement(ry,{size:14,color:"#1F4B99"});case"CHECK":case"CHECKED":return o.createElement(RIe,{size:14,color:"#0F9960"});case"UNCHECK":case"UNCHECKED":return o.createElement(TIe,{size:14,color:"#5C7080"});case"TOGGLE_ON":return o.createElement(IIe,{size:14,color:"#1F4B99"});case"TOGGLE_OFF":return o.createElement(AIe,{size:14,color:"#5C7080"});case"MEMBER-JOINED":return o.createElement(NZ,{size:14,color:"#0F9960"});case"MEMBER-LEFT":return o.createElement(MIe,{size:14,color:"#5C7080"});case"MEMBER-REMOVED":return o.createElement(iIe,{size:14,color:"#D141E3"});case"MEMBER-UNBANNED":return o.createElement(NIe,{size:14,color:"#0F9960"});case"MEMBER-ROLE-CHANGED":return o.createElement(OIe,{size:14,color:"#1F4B99"});case"OWNERSHIP-TRANSFERRED":return o.createElement(uIe,{size:14,color:"#D9822B"});case"PRIVACY-SET-PRIVATE":return o.createElement(BI,{size:14,color:"#5C7080"});case"PRIVACY-SET-SHARED":return o.createElement(_Z,{size:14,color:"#1F4B99"});default:return o.createElement($6,{size:14})}},[T,M]=p.useState(new Set),L=B=>{const U=new Set(T);U.has(B)?U.delete(B):U.add(B),M(U)},D=l.filter(B=>{var $,ce;if(h&&(($=B.details)==null?void 0:$.teamId)!==h)return!1;const U=EH(B.action);return U&&!C((ce=B.details)==null?void 0:ce.teamId)?!1:f?f==="ADMINISTRATIVE"?U:f==="DELETE"?B.action==="DELETE"||B.action==="DELETE_BULK":B.action===f:!0}),j=B=>{const U=B.timestamp?Ht(B.timestamp.toDate()).fromNow():"Just now",$=B.details||{},ce=(B.action||"").toUpperCase(),be=_e=>UYe[_e]||_e||"â",ue=(_e,ie)=>_e&&ie?`${_e} (${ie})`:_e||ie||"Someone",Ae=!t&&S.length>1&&$.teamName&&$.teamId?o.createElement("span",{className:"text-blue-600 hover:underline cursor-pointer",onClick:()=>v(h===$.teamId?null:$.teamId)},$.teamName):null;let he;switch(ce){case"MEMBER-JOINED":{const _e=ue($.member_name||B.userName,$.member_email||B.userEmail);he=o.createElement("span",null,_e," joined",Ae?o.createElement(o.Fragment,null," ",Ae):null);break}case"MEMBER-LEFT":{const _e=ue($.member_name||B.userName,$.member_email||B.userEmail);he=o.createElement("span",null,_e," unjoined",Ae?o.createElement(o.Fragment,null," ",Ae):null);break}case"MEMBER-REMOVED":{const _e=ue($.member_name,$.member_email);he=o.createElement("span",null,_e," banned",Ae?o.createElement(o.Fragment,null," from ",Ae):null);break}case"MEMBER-UNBANNED":{const _e=ue($.member_name,$.member_email||$.email);he=o.createElement("span",null,_e," unbanned",Ae?o.createElement(o.Fragment,null," from ",Ae):null);break}case"MEMBER-ROLE-CHANGED":{const _e=ue(B.userName,B.userEmail),ie=ue($.member_name,$.member_email),Ue=$.actor_role?` [${be($.actor_role)}]`:"";he=o.createElement("span",null,_e,Ue," set ",ie," from [",be($.before_role),"] to [",be($.after_role),"]",Ae?o.createElement(o.Fragment,null," in ",Ae):null);break}case"OWNERSHIP-TRANSFERRED":he=o.createElement("span",null,ue(B.userName,B.userEmail)," transferred workspace ownership",Ae?o.createElement(o.Fragment,null," in ",Ae):null);break;case"PRIVACY-SET-PRIVATE":he=o.createElement("span",null,ue(B.userName,B.userEmail)," set the workspace to private",Ae?o.createElement(o.Fragment,null," in ",Ae):null);break;case"PRIVACY-SET-SHARED":he=o.createElement("span",null,ue(B.userName,B.userEmail)," set the workspace to shared",Ae?o.createElement(o.Fragment,null," in ",Ae):null);break;default:he=o.createElement("span",null,B.action)}return o.createElement(jn,{key:B.$id,elevation:qn.ZERO,className:"mb-2 p-3 card"},o.createElement("div",{className:"flex items-center gap-3 justify-between"},o.createElement("div",{className:"flex items-center gap-2 w-full"},o.createElement("div",{className:`flex items-center rounded-full cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors ${f===B.action?"bg-gray-200 dark:bg-gray-700":""}`,title:`Filter by ${B.action}`,onClick:()=>m(f===B.action?null:B.action)},O(B.action)),o.createElement("div",{className:"flex gap-2 justify-between items-center w-full"},o.createElement("div",{className:"flex flex-wrap space-x-1 items-center text-gray-800 dark:text-gray-100"},he)),o.createElement("div",{className:"text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap"},U))))},H=B=>{var be,ue,Ie,Ae,he,_e;if(EH(B.action))return j(B);const U=B.timestamp?Ht(B.timestamp.toDate()).fromNow():"Just now",$=B.action==="DELETE_BULK",ce=T.has(B.$id);return o.createElement(jn,{key:B.$id,elevation:qn.ZERO,className:"mb-2 p-3 card"},o.createElement("div",{className:"flex items-center gap-3 justify-between"},o.createElement("div",{className:"flex items-center gap-2 w-full"},o.createElement("div",{className:`flex items-center rounded-full cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors ${f===B.action?"bg-gray-200 dark:bg-gray-700":""}`,title:`Filter by ${B.action}`,onClick:()=>m(f===B.action?null:B.action)},O(B.action)),o.createElement("div",{className:"flex gap-2 justify-between items-center w-full"},o.createElement("div",{className:"flex flex-wrap space-x-1 items-center text-gray-800 dark:text-gray-100"},o.createElement("span",{title:B.userEmail},(()=>{const ie=B.userName||B.userEmail||"Unknown User";return ie.length>32?`${ie.substring(0,32)}...`:ie})()),!t&&S.length>1&&((be=B.details)!=null&&be.teamName)&&((ue=B.details)!=null&&ue.teamId)?o.createElement("span",{className:"flex space-x-1 text-gray-500"},o.createElement("span",null,"in"),o.createElement("span",{className:"text-blue-600 hover:underline cursor-pointer",onClick:()=>v(h===B.details.teamId?null:B.details.teamId)},B.details.teamName)):null,o.createElement("span",null,B.action==="ADD_VERSION"?o.createElement(o.Fragment,null,o.createElement("span",null,"added a version to"),(Ie=B.details)!=null&&Ie.url?(()=>{var W;const ie=B.details.url,Ue=ie.startsWith("/")||((W=B.targetType)==null?void 0:W.toUpperCase())==="MAP"||ie.includes("/map/"),ae=Ue?ie.replace(/\/app\/workspace\/([^/]+)\/map\/([^/]+)/,"/workspace/$1/map/$2").replace(/\/maps\/([^/]+)/,"/workspace/all/map/$1").replace(/^\/updated$/,"/workspace/all/bookmarks/updated").replace(/^\/recently-viewed$/,"/workspace/all/bookmarks/recently-viewed").replace(/^\/starred$/,"/workspace/all/bookmarks/starred"):ie,pe=`"${B.targetName&&B.targetName.length>32?`${B.targetName.substring(0,32)}...`:B.targetName}"`;return Ue?o.createElement(ci,{to:ae,className:"text-blue-600 hover:underline ml-1",title:B.targetName},pe):o.createElement("a",{href:ae,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",title:B.targetName},pe)})():o.createElement("span",{title:B.targetName,className:"ml-1"},'"',B.targetName&&B.targetName.length>32?`${B.targetName.substring(0,32)}...`:B.targetName,'"')):o.createElement(o.Fragment,null,o.createElement("span",{className:"mr-1"},(()=>{var W,q;const ie=((W=B.action)==null?void 0:W.toLowerCase())||"",ae=(((q=B.targetType)==null?void 0:q.toUpperCase())||"")==="MAP"?" flow":"";let pe=ie+"ed";return ie==="add"||ie==="create"||ie==="created"?pe="added":ie==="edit"||ie==="update"||ie==="edit_bulk"||ie==="edit-map"?pe="edited":ie==="delete"||ie==="delete_bulk"||ie==="deleted"||ie==="remove"?pe="removed":ie==="accepted"?pe="joined":ie==="toggle_on"?pe="turned on":ie==="toggle_off"?pe="turned off":ie.endsWith("ed")?pe=ie:ie.endsWith("e")&&(pe=ie+"d"),pe+ae})()),(Ae=B.details)!=null&&Ae.url?(()=>{var W;const ie=B.details.url,Ue=ie.startsWith("/")||((W=B.targetType)==null?void 0:W.toUpperCase())==="MAP"||ie.includes("/map/"),ae=Ue?ie.replace(/\/app\/workspace\/([^/]+)\/map\/([^/]+)/,"/workspace/$1/map/$2").replace(/\/maps\/([^/]+)/,"/workspace/all/map/$1").replace(/^\/updated$/,"/workspace/all/bookmarks/updated").replace(/^\/recently-viewed$/,"/workspace/all/bookmarks/recently-viewed").replace(/^\/starred$/,"/workspace/all/bookmarks/starred"):ie,pe=`"${B.targetName&&B.targetName.length>32?`${B.targetName.substring(0,32)}...`:B.targetName}"`;return Ue?o.createElement(ci,{to:ae,className:"text-blue-600 hover:underline",title:B.targetName},pe):o.createElement("a",{href:ae,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",title:B.targetName},pe)})():B.targetName?o.createElement("span",{title:B.targetName}," ",'"',B.targetName.length>32?`${B.targetName.substring(0,32)}...`:B.targetName,'"'):"")),$&&o.createElement(De,{variant:"minimal",size:"small",icon:ce?"chevron-up":"chevron-down",onClick:()=>L(B.$id)}))),o.createElement("div",{className:"text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap"},U)),o.createElement("div",{className:"flex items-center gap-2"})),B.action==="EDIT"&&((he=B.details)==null?void 0:he.changes)&&o.createElement("div",{className:"ml-7 text-sm text-gray-600 dark:text-gray-300"},o.createElement("ul",{className:"list-disc pl-4"},Object.entries(B.details.changes).map(([ie,Ue])=>o.createElement("li",{key:ie}
1959,"Changed ",o.createElement("strong",null,ie)," from"," ",o.createElement("span",{className:"line-through text-gray-400",title:Ue.old},Ue.old&&Ue.old.length>32?`${Ue.old.substring(0,32)}...`:Ue.old)," ","to"," ",o.createElement("span",{className:"font-semibold",title:Ue.new},Ue.new&&Ue.new.length>32?`${Ue.new.substring(0,32)}...`:Ue.new))))),$&&ce&&((_e=B.details)==null?void 0:_e.items)&&o.createElement("div",{className:"pt-2 ml-7 border-t"},o.createElement("p",{className:"text-xs font-semibold text-gray-500 mb-1"},"Deleted Item",B.details.items.length!==1?"s":"",":"),o.createElement("ul",{className:"space-y-1"},B.details.items.map((ie,Ue)=>o.createElement("li",{key:Ue,className:"text-sm flex items-center gap-2"},o.createElement("span",{className:"w-1 h-1 bg-gray-400 rounded-full"}),ie.url?(()=>{var te;const ae=ie.url,pe=ae.startsWith("/")||((te=B.targetType)==null?void 0:te.toUpperCase())==="MAP"||ae.includes("/map/"),W=pe?ae.replace(/\/app\/workspace\/([^/]+)\/map\/([^/]+)/,"/workspace/$1/map/$2").replace(/\/maps\/([^/]+)/,"/workspace/all/map/$1").replace(/^\/updated$/,"/workspace/all/bookmarks/updated").replace(/^\/recently-viewed$/,"/workspace/all/bookmarks/recently-viewed").replace(/^\/starred$/,"/workspace/all/bookmarks/starred"):ae,q=ie.name&&ie.name.length>32?`${ie.name.substring(0,32)}...`:ie.name;return pe?o.createElement(ci,{to:W,className:"hover:underline text-blue-600",title:ie.name},q):o.createElement("a",{href:W,target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-blue-600",title:ie.name},q)})():o.createElement("span",{title:ie.name},ie.name&&ie.name.length>32?`${ie.name.substring(0,32)}...`:ie.name))))))};return o.createElement("div",{className:"flex flex-1 h-full flex-col min-w-0 asset-list"},o.createElement("div",{className:"flex-1 overflow-y-auto p-4 md:p-8"},o.createElement("div",{className:"max-w-4xl mx-auto w-full"},l.length>0?o.createElement("div",{className:"flex items-center justify-between mb-5"},o.createElement("h2",{className:"text-xl text-gray-800 dark:text-gray-100 flex items-center gap-2 mb-0"},o.createElement($6,{size:20,className:"hd"}),o.createElement("span",null,"Activity"),o.createElement("span",{className:"hd"},"Log")),o.createElement("div",{className:`flex gap-2 ${i?Xr:""}`},S.length>1&&o.createElement(Hr,{position:va.BOTTOM_RIGHT,popoverClassName:i?Xr:void 0,content:o.createElement(Cr,{className:"row-actions row-actions__menu"},o.createElement(Bt,{text:"All Workspaces",onClick:()=>v(null),active:h===null}),o.createElement(Zi,null),S.map(B=>o.createElement(Bt,{key:B.id,text:B.name,onClick:()=>v(B.id),active:h===B.id})))},o.createElement(De,{text:h?((se=S.find(B=>B.id===h))==null?void 0:se.name)||"Unknown Workspace":"All Workspaces",rightIcon:"caret-down"})),o.createElement(Hr,{position:va.BOTTOM_RIGHT,popoverClassName:i?Xr:void 0,content:o.createElement(Cr,{className:"row-actions row-actions__menu"},o.createElement(Bt,{icon:"build",text:"All Activities",onClick:()=>m(null),active:f===null}),o.createElement(Zi,null),o.createElement(Bt,{icon:o.createElement(zs,{size:16}),text:"Add",onClick:()=>m("ADD"),active:f==="ADD"}),o.createElement(Bt,{icon:o.createElement(eu,{size:16}),text:"Edit",onClick:()=>m("EDIT"),active:f==="EDIT"}),o.createElement(Bt,{icon:o.createElement(ry,{size:16}),text:"Version",onClick:()=>m("ADD_VERSION"),active:f==="ADD_VERSION"}),o.createElement(Bt,{icon:o.createElement(tu,{size:16}),text:"Delete",onClick:()=>m("DELETE"),active:f==="DELETE"}),A&&o.createElement(o.Fragment,null,o.createElement(Zi,null),o.createElement(Bt,{icon:o.createElement(uc,{size:16}),text:"Administrative",onClick:()=>m("ADMINISTRATIVE"),active:f==="ADMINISTRATIVE"})))},o.createElement(De,{text:f?`Activity: ${f==="ADD_VERSION"?"Versions":f==="ADMINISTRATIVE"?"Administrative":f}`:"Activity",rightIcon:"caret-down"})))):null,u?o.createElement("div",{className:"flex justify-center p-12"},o.createElement(os,null)):l.length>0?o.createElement("div",{className:"flex flex-col gap-2"},D.length>0?o.createElement(o.Fragment,null,D.map(H),l.length>=y&&o.createElement("div",{className:"flex justify-center mt-4 mb-8"},o.createElement(De,{onClick:()=>b(B=>B+50),text:"Load More",icon:"refresh"}))):o.createElement("div",{className:"text-center text-gray-500 py-8"},"No activities match the selected filter.")):o.createElement(fs,{title:"No activity recorded",description:"Recent activities from people in your workspace will appear here."}))))},xH=e=>o.createElement(ore,{...e,isSpecific:!1}),_H=e=>o.createElement(ore,{...e,isSpecific:!0});function jYe({asset:e,t,selected:n,relTime:r,onHover:a,onOpen:s,onEdit:i}){var N,k,C,A,O;const[l,c]=p.useState(!!e.is_favorited),[u,d]=p.useState(!1),[f,m]=p.useState(!1);p.useEffect(()=>{c(!!e.is_favorited)},[e.$id,e.is_favorited]);const h=!!e.$optimistic,g=((N=e.active_iteration)==null?void 0:N.url)||e.url||"",v=(k=e.active_iteration)==null?void 0:k.auto_preview_thumbnail,y=pb(g),b=e.name||((C=e.active_iteration)==null?void 0:C.name)||((O=(A=e.active_iteration)==null?void 0:A.metadata)==null?void 0:O.title)||g||"Untitled",E=r?r(e.date_modified||e.date_created||e.date_viewed):"",w=n||f,x=p.useCallback(async T=>{var M;if(T.preventDefault(),T.stopPropagation(),!(u||h||!e.$id)){d(!0);try{const{data:L}
1959=await pt(Cl,Ze("markfavorite-toggle"))({assetID:e.$id}),D=!!((M=L.output)!=null&&M.is_active);c(D);const j={...e,is_favorited:D};await Qe.action.set({tableID:"Assets-General-All",dataList:[j],options:{skipClear:!0,preserveLocalDB:!0}}),localStorage.removeItem("assetsGeneral-lastDownload")}catch(L){console.error("Toggle favorite failed:",L),re.dispatch("trigger-alert",{message:(L==null?void 0:L.message)||"Could not update favorite. Please try again.",intent:"danger"})}finally{d(!1)}}},[e,u,h]),S={width:"28px",height:"28px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",flex:"none",transition:"transform .1s, opacity .12s"};return o.createElement("div",{onMouseEnter:()=>{m(!0),a&&a()},onMouseLeave:()=>m(!1),onClick:h?void 0:s,style:{display:"flex",alignItems:"center",gap:"10px",padding:"9px 8px",borderRadius:"11px",cursor:h?"default":"pointer",opacity:h?.6:1,background:n&&!h?t.soft:"transparent",transition:"background .1s, opacity .15s"}},o.createElement("div",{style:{position:"relative",width:"34px",height:"34px",borderRadius:"9px",overflow:"hidden",flex:"none",boxShadow:"0 2px 6px rgba(20,8,40,.14)"}},v?o.createElement(nu,{storagePath:v,alt:"",className:"absolute inset-0 h-full w-full object-cover",fallback:o.createElement(ky,{url:g,name:e.name})}):o.createElement(ky,{url:g,name:e.name})),o.createElement("div",{style:{flex:"1 1 auto",minWidth:0}},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px",minWidth:0}},o.createElement("span",{style:{fontSize:"13.5px",fontWeight:600,color:t.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",letterSpacing:"-.1px"}},b),h&&o.createElement("span",{style:{display:"flex",alignItems:"center",gap:"4px",flex:"none",fontSize:"10px",fontWeight:600,color:t.accent}},o.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",style:{animation:"mbSpin .7s linear infinite"}},o.createElement("path",{d:"M20 11a8 8 0 10-.6 4M20 5v6h-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),"Savingâ¦")),o.createElement("div",{style:{fontSize:"11.5px",color:t.dim,marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},y,y&&E?" · ":"",E)),!h&&o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"3px",flex:"none"}},o.createElement("button",{type:"button",onClick:T=>{T.stopPropagation(),i&&i()},"aria-label":"Edit bookmark",title:"Edit bookmark",style:{...S,color:t.faint,opacity:w?1:0}},o.createElement("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M4 20h4l10.5-10.5a2 2 0 000-2.8l-1.2-1.2a2 2 0 00-2.8 0L4 16v4z",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}))),o.createElement("button",{type:"button",onClick:x,disabled:u,"aria-label":l?"Remove from favorites":"Add to favorites",style:{...S,color:l?"#fbbf24":t.faint}},u?o.createElement("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",style:{animation:"mbSpin .7s linear infinite"}},o.createElement("path",{d:"M20 11a8 8 0 10-.6 4M20 5v6h-6",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"})):l?o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#fbbf24"},o.createElement("path",{d:"M12 2l2.9 6.3 6.9.8-5.1 4.7 1.4 6.8L12 17.8 5.9 20.6l1.4-6.8L2.2 9.1l6.9-.8L12 2z"})):o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M12 3.5l2.5 5.4 5.9.7-4.4 4 1.2 5.8L12 16.5 6.8 19.4 8 13.6 3.6 9.6l5.9-.7L12 3.5z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})))))}const ug="Assets-General-All",WYe="v2",mh=e=>`${WYe}-${e}`,dg={assetAdd:mh("addAsset"),assetEdit:mh("editAsset"),iterationEdit:mh("editIteration"),assetDeleteBulk:mh("deleteAssetBulk"),assetEnrichTitle:mh("enrichAssetTitle"),collectionAdd:mh("addCollection")};function GYe(){return`tauri-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}function J4(e){return/^https?:\/\//.test(e)?e:"https://"+e}function qYe(e,t,n,r,a){const s=J4((t||"").trim()),i=(n||"").trim()||pb(s)||s,l=Math.floor(Date.now()/1e3),c=r.collection??null,u=r.tags??[];return{$id:`temp-${a}`,$team_id:e,name:i,active_iteration:{url:s},is_favorited:!1,date_modified:l,date_created:l,view_count:{total:0},collection_name:(c==null?void 0:c.name)??null,$collection_id:(c==null?void 0:c.id)??null,tags:u.map(d=>({$id:d.$id,name:d.name})),$client_request_id:a,$optimistic:!0}}async function YYe(e){if(!Qe.base)return null;const t=Qe.base[ug];if(!t)return null;try{return await t.get(e)??null}catch{return null}}async function KYe(e){if(!(!Qe.base||!Qe.base[ug]))try{await Qe.action.set({tableID:ug,dataList:[e],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!0}})}catch{}}async function ZYe(e){try{await Qe.action.delete({tableID:ug,id:e})}catch{}}async function h_(e){if(!e)return;const t=await ec.getAllAssets({teamID:e,forceUpdate:!1,ignoreStale:!0,triggerPath:"users-asset-view-lastupdated_team"});if(t!=null&&t.$get_upcoming_list)try{await t.$get_upcoming_list}catch{}}async function lre(e){if(!e)return;const[t,n]=await Promise.all([ec.getCollections({teamID:e}).catch(()=>[]),ec.getTags({teamID:e}).catch(()=>[])]);Qe.base&&(Qe.base.Collections&&t.length&&await Qe.action.set({tableID:"Collections",dataList:t.map(r=>({...r,id:r.$id,$team_id:e,teamID:e})),options:{skipClear:!0}}),Qe.base.Tags&&n.length&&await Qe.action.set({tableID:"Tags",dataList:n.map(r=>({...r,id:r.$id,$team_id:e,teamID:e})),options:{skipClear:!0}}))}async function XYe(e,t){var s,i;const n=(t||"").trim();if(!e||!n)throw new Error("Missing workspace or collection name.");const r=await pt(Cl,dg.collectionAdd)({collection:{property_name:n,id_team:e}}),a=(i=(s=r==null?void 0:r.data)==null?void 0:s.output)==null?void 0:i.collectionID;if(!a)throw new Error("Collection was not created.");return await lre(e),{id:a,name:n}}async function QYe(e,t,n,r={}){var h,g;const a=J4((t||"").trim()),s=(n||"").trim()||pb(a)||a,i=r.reqId??GYe(),l=`temp-${i}`,c=r.tags??[],u=c.map(v=>v.$id).filter(v=>v&&!v.startsWith("__pending__")),d=c.filter(v=>v.$id.startsWith("__pending__")).map(v=>
1959v.name);await KYe(qYe(e,t,n,r,i));const f=r.collection??null;let m=null;try{const v=await pt(Cl,dg.assetAdd)({asset:{id_team:e,id_project:null,id_collection:(f==null?void 0:f.id)??null,id_tags:u,ids_notifications_team_members:[],property_name:s,property_description:"",property_type:"bookmark",$new_tags:d.map(y=>({name:y}))},iteration:{property_url:a,property_url_original:a,property_display_format:"",property_change_notes:"",property_screenshot_strategy:"auto",property_auto_preview_thumbnail:null},source:"tauri",collection:{property_name:null},client_request_id:i});m=((g=(h=v==null?void 0:v.data)==null?void 0:h.output)==null?void 0:g.assetID)||null}catch(v){throw await ZYe(l),v}if(!(n||"").trim()&&m)try{await pt(Cl,dg.assetEnrichTitle)({assetID:m,url:a})}catch{}await h_(e)}async function JYe(e,t){try{await Qe.action.delete({tableID:ug,id:t})}catch{}try{await pt(Cl,dg.assetDeleteBulk)({assets:[{$id:t}]})}catch(n){throw await h_(e),n}await h_(e)}async function eKe(e,t,n){const r=n.tags.map(d=>d.$id).filter(d=>d&&!d.startsWith("__pending__")),a=n.tags.filter(d=>d.$id.startsWith("__pending__")).map(d=>d.name),s=await YYe(t),i=(s==null?void 0:s.active_iteration)||void 0,l=(i==null?void 0:i.url)||"",c=n.url!=null?J4(n.url.trim()):"",u=!!n.url&&!!n.iterationId&&c!==l;s&&await Qe.action.set({tableID:ug,dataList:[{...s,name:n.name,$collection_id:n.collectionId,collection_name:n.collectionName,tags:n.tags,...u?{active_iteration:{...i,url:c}}:{},date_modified:Math.floor(Date.now()/1e3)}],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!1}}),await pt(Cl,dg.assetEdit)({asset:{$id:t,property_name:n.name,id_collection:n.collectionId,id_tags:r,$new_tags:a.map(d=>({name:d}))},silent_log:!0}),u&&await pt(Cl,dg.iterationEdit)({iteration:{$id:n.iterationId,id_asset:t,property_url:c},silent_log:!0}),await h_(e)}const tKe=/^(https?:\/\/)?([a-z0-9-]+\.)+[a-z]{2,}(\/\S*)?$/i,nKe=()=>typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window),kH=(e,t)=>(e||[]).filter(n=>!t||n.$team_id===t||n.teamID===t);function rKe({mode:e,t,teams:n=[],defaultTeamId:r,asset:a=null,initialUrl:s="",onClose:i,onSaved:l,showToast:c}){const u=e==="edit",d=n.filter(fe=>fe&&fe.id),f=()=>{var fe;return u&&(a!=null&&a.$team_id)?a.$team_id:r&&r!=="all"?r:((fe=d[0])==null?void 0:fe.id)||""},[m,h]=p.useState(f),[g,v]=p.useState(()=>{var fe;return u?((fe=a==null?void 0:a.active_iteration)==null?void 0:fe.url)||(a==null?void 0:a.url)||"":s||""}),[y,b]=p.useState(()=>u&&(a==null?void 0:a.name)||""),[E,w]=p.useState(()=>u&&(a==null?void 0:a.$collection_id)||null),[x,S]=p.useState(()=>u&&(a==null?void 0:a.collection_name)||null),[N,k]=p.useState(()=>u&&Array.isArray(a==null?void 0:a.tags)?a.tags.map(fe=>({$id:fe.$id,name:fe.name})):[]),[C,A]=p.useState(()=>u&&!!(a!=null&&a.collection_name||((a==null?void 0:a.tags)||[]).length)),[O,T]=p.useState(null),[M,L]=p.useState(""),[D,j]=p.useState(!1),[H,Y]=p.useState(""),[z,K]=p.useState(!1),[ee]=p.useState(!1),oe=p.useRef(null);p.useEffect(()=>{m&&lre(m).catch(()=>{})},[m]);const J=kH(Xo(async()=>{if(!Qe.base)return[];const fe=Qe.base.Collections;return fe?await fe.toArray():[]},[]),m),se=kH(Xo(async()=>{if(!Qe.base)return[];const fe=Qe.base.Tags;return fe?await fe.toArray():[]},[]),m);p.useEffect(()=>{if(u||g||!nKe())return;let fe=!1;return yn(()=>function(){return(Se=>import(Se))("./index.12a6c0d9.js")}(),[]).then(async({readText:ke})=>{const Se=(await ke()||"").trim();!fe&&/^https?:\/\/\S+$/i.test(Se)&&v(Se)}).catch(()=>{}),()=>{fe=!0}},[]),p.useEffect(()=>()=>clearTimeout(oe.current),[]);const B=p.useMemo(()=>{const fe=d.findIndex(Se=>Se.id===m),ke=d[fe]||d[0];return{name:(ke==null?void 0:ke.name)||"Workspace",initial:Gf((ke==null?void 0:ke.name)||"W"),grad:KI(fe<0?0:fe)}},[m,d]),U=tKe.test((g||"").trim()),$=u?!ee:U&&!ee&&!!m,ce=p.useMemo(()=>{const fe=M.trim().toLowerCase(),ke=new Set(N.map(Se=>Se.name.toLowerCase()));return se.filter(Se=>Se.name&&!ke.has(Se.name.toLowerCase())&&(!fe||Se.name.toLowerCase().includes(fe))).slice(0,6)},[se,N,M]),be=M.trim().length>0&&!se.some(fe=>{var ke;return((ke=fe.name)==null?void 0:ke.toLowerCase())===M.trim().toLowerCase()})&&!N.some(fe=>fe.name.toLowerCase()===M.trim().toLowerCase()),ue=fe=>{k(ke=>ke.some(Se=>Se.name.toLowerCase()===fe.name.toLowerCase())?ke:[...ke,fe]),L("")},Ie=fe=>k(ke=>ke.filter(Se=>Se.name!==fe)),Ae=fe=>{fe?(w(fe.$id),S(fe.name)):(w(null),S(null)),Y(""),T(null)},he=p.useMemo(()=>{const fe=H.trim().toLowerCase();return J.filter(ke=>ke.name&&(!fe||ke.name.toLowerCase().includes(fe)))},[J,H]),_e=H.trim().length>0&&!J.some(fe=>{var ke;return((ke=fe.name)==null?void 0:ke.toLowerCase())===H.trim().toLowerCase()}),ie=async()=>{const fe=H.trim();if(!(!fe||z)){K(!0);try{const ke=await XYe(m,fe);w(ke.id),S(ke.name),Y(""),T(null)}catch(ke){console.error("createCollection failed:",ke),c&&c("Couldn't create collection. Please try again.")}finally{K(!1)}}},Ue=()=>{var Et;if(!$)return;const fe=y.trim(),ke=E?{id:E,name:x||""}:null,Se=N.map(nt=>
1959({$id:nt.$id,name:nt.name}));if(u){l&&l({mode:"edit"}),i(),eKe(m,a.$id,{name:fe||(a==null?void 0:a.name)||"",collectionId:E,collectionName:x,tags:Se,url:(g||"").trim(),iterationId:(Et=a==null?void 0:a.active_iteration)==null?void 0:Et.$id}).catch(nt=>{console.error("editBookmark failed:",nt),c&&c("Couldn't save changes. Please try again.")});return}l&&l({mode:"add"}),i(),QYe(m,(g||"").trim(),fe,{collection:ke,tags:Se}).catch(nt=>{console.error("addBookmark failed:",nt),c&&c("Couldn't save bookmark. Please try again.")})},ae=()=>{if(!u||ee)return;const fe=((a==null?void 0:a.name)||"bookmark").split(" â ")[0];i(),JYe(m,a.$id).catch(ke=>{console.error("deleteBookmark failed:",ke),c&&c("Couldn't delete. Please try again.")}),c&&c(`Deleted â${fe}â`)},pe="blur(30px) saturate(1.7)",W={fontSize:"12px",fontWeight:600,color:t.dim,letterSpacing:".2px",paddingLeft:"2px"},q={background:t.field,color:t.text,borderRadius:"12px",padding:"12px 13px",fontSize:"14px",fontWeight:500,width:"100%",boxSizing:"border-box",border:"1px solid "+t.border},te=fe=>({display:"flex",alignItems:"center",gap:"10px",width:"100%",padding:"12px 13px",borderRadius:"12px",background:t.field,border:"1px solid "+(fe?t.accent:t.border),color:t.text,transition:"border-color .12s"}),X={position:"absolute",top:"100%",left:0,right:0,marginTop:"6px",zIndex:40,maxHeight:"196px",overflowY:"auto",background:t.surface,border:"1px solid "+t.border,borderRadius:"13px",boxShadow:t.menuShadow,padding:"5px"},le=fe=>({display:"flex",alignItems:"center",gap:"10px",width:"100%",padding:"9px 10px",borderRadius:"9px",color:t.text,textAlign:"left",background:fe?t.soft:"transparent"}),me=fe=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",style:{flex:"none",color:t.dim,transform:fe?"rotate(180deg)":"none",transition:"transform .15s"}},o.createElement("path",{d:"M7 10l5 5 5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));return o.createElement("div",{style:{position:"absolute",inset:0,background:t.popover,backdropFilter:pe,WebkitBackdropFilter:pe,zIndex:40,display:"flex",flexDirection:"column",borderRadius:"18px"}},o.createElement("div",{style:{width:"34px",height:"4px",borderRadius:"3px",background:t.borderSt,margin:"9px auto 2px",flex:"none"}}),o.createElement("div",{className:"mb-scroll",style:{flex:"1 1 auto",minHeight:0,overflowY:"auto",padding:"6px 16px 76px"}},o.createElement("div",{style:{fontFamily:"Domine, Georgia, serif",fontSize:"20px",fontWeight:600,color:t.text,margin:"8px 2px 16px",letterSpacing:"-.3px"}},u?"Edit bookmark":"Add bookmark"),o.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"8px",marginBottom:"14px"}},o.createElement("div",{style:W},"Save to"),o.createElement("button",{onClick:()=>T(fe=>fe==="ws"?null:"ws"),style:te(O==="ws")},o.createElement("span",{style:{width:"26px",height:"26px",borderRadius:"8px",background:B.grad,color:"#fff",fontSize:"12px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flex:"none"}},B.initial),o.createElement("span",{style:{flex:"1 1 auto",minWidth:0,textAlign:"left",fontSize:"14px",fontWeight:500,color:t.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},B.name),me(O==="ws")),O==="ws"&&o.createElement("div",{className:"mb-scroll",style:X},d.map((fe,ke)=>o.createElement("button",{key:fe.id,onClick:()=>{h(fe.id),T(null)},style:le(fe.id===m)},o.createElement("span",{style:{width:"26px",height:"26px",borderRadius:"8px",background:KI(ke),color:"#fff",fontSize:"12px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flex:"none"}},Gf(fe.name)),o.createElement("span",{style:{flex:"1 1 auto",minWidth:0,fontSize:"13.5px",fontWeight:fe.id===m?700:500,color:t.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},fe.name),fe.id===m&&o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M5 12l4 4 10-10",stroke:"#c026d3",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})))))),o.createElement("div",{style:{marginBottom:"14px"}},o.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"12px"}},o.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"7px"}},o.createElement("div",{style:W},"Link"),o.createElement("input",{style:q,type:"url",inputMode:"url",autoCapitalize:"none",autoCorrect:"off",placeholder:"Paste a link",value:g,onChange:fe=>v(fe.target.value)})),o.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"7px"}},o.createElement("div",{style:W},"Title"),o.createElement("input",{style:q,type:"text",placeholder:"Title",value:y,onChange:fe=>b(fe.target.value)})))),!u&&o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px 13px",borderRadius:"14px",background:t.isDark?"rgba(192,38,211,.12)":"rgba(192,38,211,.06)",border:"1px dashed "+t.accent,marginBottom:"16
1959px"}},o.createElement("svg",{width:"21",height:"21",viewBox:"0 0 24 24",fill:"none",style:{flex:"none",color:t.accent}},o.createElement("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),o.createElement("circle",{cx:"8.5",cy:"10",r:"1.6",stroke:"currentColor",strokeWidth:"1.5"}),o.createElement("path",{d:"M4 17l4.5-4.5a2 2 0 012.8 0L16 17M14 15l1.8-1.8a2 2 0 012.8 0L21 16",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})),o.createElement("span",{style:{fontSize:"13.5px",fontWeight:500,color:t.text}},"Screenshot will be generated.")),o.createElement("div",{style:{position:"relative",marginBottom:"14px"}},o.createElement("button",{onClick:()=>A(fe=>!fe),style:{display:"flex",alignItems:"center",gap:"6px",color:t.accent,fontSize:"13.5px",fontWeight:700,padding:"2px",marginBottom:C?"10px":0,background:"none"}},o.createElement("span",null,C?"â":"+"),o.createElement("span",null,C?"Hide collection & tags":"Add collection & tags")),C&&o.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"14px"}},o.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"8px"}},o.createElement("div",{style:W},"Collection"),o.createElement("button",{onClick:()=>T(fe=>fe==="coll"?null:"coll"),style:te(O==="coll")},o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",style:{flex:"none",color:E?t.accent:t.faint}},o.createElement("path",{d:"M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V7z",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"})),o.createElement("span",{style:{flex:"1 1 auto",minWidth:0,textAlign:"left",fontSize:"14px",fontWeight:500,color:E?t.text:t.faint,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},x||"None"),me(O==="coll")),O==="coll"&&o.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"8px"}},o.createElement("input",{style:q,type:"text",autoCapitalize:"none",placeholder:"Search or create a collectionâ¦",value:H,onChange:fe=>Y(fe.target.value),onKeyDown:fe=>{fe.key==="Enter"&&_e&&(fe.preventDefault(),ie())}}),o.createElement("div",{className:"mb-scroll",style:{maxHeight:"184px",overflowY:"auto",background:t.surface,border:"1px solid "+t.border,borderRadius:"13px",boxShadow:t.menuShadow,padding:"5px"}},_e&&o.createElement("button",{onClick:ie,disabled:z,style:{display:"flex",alignItems:"center",gap:"9px",width:"100%",padding:"10px 11px",borderRadius:"9px",color:t.accent,textAlign:"left",fontSize:"13.5px",fontWeight:600,background:"none",opacity:z?.6:1}},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",style:z?{animation:"mbSpin .7s linear infinite"}:void 0},z?o.createElement("path",{d:"M20 11a8 8 0 10-.6 4M20 5v6h-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}):o.createElement("path",{d:"M12 5v14M5 12h14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})),o.createElement("span",null,z?"Creatingâ¦":`Create â${H.trim()}â`)),!H.trim()&&o.createElement("button",{onClick:()=>Ae(null),style:le(!E)},o.createElement("span",{style:{flex:"1 1 auto",fontSize:"13.5px",fontWeight:E?500:700,color:t.dim}},"None"),!E&&o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M5 12l4 4 10-10",stroke:"#c026d3",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}))),he.map(fe=>o.createElement("button",{key:fe.$id,onClick:()=>Ae(fe),style:le(E===fe.$id)},o.createElement("span",{style:{flex:"1 1 auto",minWidth:0,fontSize:"13.5px",fontWeight:E===fe.$id?700:500,color:t.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},fe.name),E===fe.$id&&o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M5 12l4 4 10-10",stroke:"#c026d3",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})))),H.trim()&&he.length===0&&!_e&&o.createElement("div",{style:{padding:"10px 11px",fontSize:"13px",color:t.faint}},"No collections")))),o.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"8px"}},o.createElement("div",{style:W},"Tags"),N.length>0&&o.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"}},N.map(fe=>o.createElement("span",{key:fe.$id||fe.name,style:{display:"inline-flex",alignItems:"center",gap:"6px",padding:"6px 6px 6px 11px",borderRadius:"999px",background:t.chip,color:t.accent,fontSize:"13px",fontWeight:600}},fe.name,o.createElement("button",{onClick:()=>Ie(fe.name),"aria-label":"Remove "+fe.name,style:{width:"17px",height:"17px",borderRadius:"999px",display:"flex",alignItems:"center",justifyContent:"center",background:t.softStrong,color:t.accent,flex:"none"}},o.createElement("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round"})))))),o.createElement("input",{style:q,type:"text",autoCapitalize:"none",placeholder:"Add a tagâ¦",value:M,onChange:fe=>{L(fe.target.value),j(!0)},onFocus:()=>j(!0),onBlur:()=>{clearTimeout(oe.current),oe.current=setTimeout(()=>j(!1),170)},onKeyDown:fe=>{fe.key==="Enter"&&be&&(fe.preventDefault(),ue({$id:`__pending__${M.trim()}`,name:M.trim()}))}}),D&&(ce.length>0||be)&&o.createElement("div",{className:"mb-scroll",style:X},be&&o.createElement("button",{onMouseDown:fe=>{fe.preventDefault(),ue({$id:`__pending__${M.trim()}`,name:M.trim()})},style:{display:"flex",alignItems:"center",gap:"9px",width:"100%",padding:"10px 11px",borderRadius:"9px",color:t.accent,textAlign:"left",fontSize:"13.5px",fontWeight:600,background:"none"}},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M12 5v14M5 12h14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})),o.createElement("span",null,"Create â",M.trim(),"â")),ce.map(fe=>o.createElement("button",{key:fe.$id,onMouseDown:ke=>{ke.preventDefault(),ue({$id:fe.$id,name:fe.name})},style:{display:"flex",alignItems:"center",width:"100%",padding:"10px 11px",borderRadius:"9px",color:t.text,textAlign:"left",fontSize:"13.5px",fontWeight:500,background:"none"}},fe.name)))))),u&&o.createElement("button",{onClick:ae,style:{display:"flex",alignItems:"center",gap:"9px",color:t.danger,fontSize:"13.5px",fontWeight:600,padding:"12px 2px",marginTop:"2px",background:"none"}},o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M5 7h14M10 11v6M14 11v6M6 7l1 12a2 2 0 002 2h6a2 2 0 002-2l1-12M9 7V5a2 2 0 012-2h2a2 2 0 012 2v2",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})),o.createElement("span",null,"Delete bookmark"))),u?o.createElement("div",{style:{flex:"none",padding:"12px 16px 14px",borderTop:"1px solid "+t.border,display:"flex",gap:"10px"}},o.createElement("button",{onClick:i,style:{flex:"0 0 auto",background:t.field,color:t.text,borderRadius:"12px",padding:"12px 20px",fontSize:"14px",fontWeight:600}},"Cancel"),o.createElement("button",{onClick:Ue,disabled:!$,style:{flex:"1 1 auto",background:"linear-gradient(180deg,#cf30e0,#a512c4)",color:"#fff",borderRadius:"12px",padding:"12px",fontSize:"14px",fontWeight:700,boxShadow:"0 8px 20px rgba(192,38,211,.34)",opacity:$?1:.5}},"Save changes")):o.createElement("div",{style:{position:"absolute",right:"16px",bottom:"16
1959px",display:"flex",alignItems:"center",gap:"8px",zIndex:5}},o.createElement("button",{onClick:i,"aria-label":"Cancel",style:{width:"40px",height:"40px",flex:"none",borderRadius:"999px",background:t.field,color:t.dim,display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid "+t.border,boxShadow:"0 6px 16px rgba(20,8,40,.14)"}},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}))),o.createElement("button",{onClick:Ue,disabled:!$,style:{flex:"none",background:"linear-gradient(180deg,#cf30e0,#a512c4)",color:"#fff",borderRadius:"999px",padding:"12px 26px",fontSize:"14px",fontWeight:700,boxShadow:"0 6px 16px rgba(192,38,211,.28)",opacity:$?1:.5,cursor:$?"pointer":"default"}},"Save")))}const SH=()=>typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window),aKe=/^https?:\/\/[^\s]+$/i;function sKe(e){const t=(e||"").trim();if(!t||/\s/.test(t)||!aKe.test(t))return!1;try{const n=new URL(t);return!!n.hostname&&n.hostname.includes(".")}catch{return!1}}function iKe(e){const t="#c026d3",n="#ee62ff";return e?{isDark:e,accent:t,accent2:n,danger:"#ff6b6b",popoverSolid:"#1e1036",popover:"rgba(30,16,54,.94)",popBorder:"rgba(255,255,255,.1)",surface:"#1e1036",surface2:"#281651",field:"#221038",text:"#f1eafb",dim:"#a48fc5",faint:"#6f5b8e",border:"rgba(255,255,255,.08)",borderSt:"rgba(255,255,255,.16)",soft:"rgba(238,98,255,.14)",softStrong:"rgba(238,98,255,.2)",menu:"rgba(37,20,66,.98)",menuBorder:"rgba(255,255,255,.1)",scrim:"rgba(0,0,0,.28)",popShadow:"0 26px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06)",menuShadow:"0 16px 40px rgba(0,0,0,.55)",chip:"#2a1746"}:{isDark:e,accent:t,accent2:n,danger:"#e23b3b",popoverSolid:"#ffffff",popover:"rgba(255,255,255,.95)",popBorder:"rgba(31,6,65,.09)",surface:"#ffffff",surface2:"#faf6fe",field:"#f3edfa",text:"#1c1230",dim:"#6f6286",faint:"#a99cbb",border:"rgba(31,6,65,.09)",borderSt:"rgba(31,6,65,.16)",soft:"rgba(192,38,211,.07)",softStrong:"rgba(192,38,211,.12)",menu:"rgba(255,255,255,.99)",menuBorder:"rgba(31,6,65,.08)",scrim:"rgba(22,8,40,.06)",popShadow:"0 26px 60px rgba(31,6,65,.28), 0 0 0 1px rgba(31,6,65,.06)",menuShadow:"0 16px 40px rgba(31,6,65,.22)",chip:"#f1e9f9"}}const YN="ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace",CH="Domine, Georgia, serif",hi={chevDown:e=>o.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M7 10l5 5 5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),refresh:e=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M20 11a8 8 0 10-.6 4M20 5v6h-6",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"})),bookmarkPlus:e=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M6 3.5h12a1.5 1.5 0 011.5 1.5v15.2c0 .8-.9 1.2-1.5.7L12 17.4l-6 3.5c-.6.4-1.5 0-1.5-.7V5A1.5 1.5 0 016 3.5z",stroke:"currentColor",strokeWidth:"1.7",strokeLinejoin:"round"}),o.createElement("path",{d:"M12 8v6M9 11h6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})),openExternal:e=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M14 4h6v6M20 4l-8 8",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M18 13v3.5A2.5 2.5 0 0115.5 19h-8A2.5 2.5 0 015 16.5v-8A2.5 2.5 0 017.5 6H11",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"})),search:e=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor",strokeWidth:"2"}),o.createElement("path",{d:"M16.5 16.5L21 21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})),close:e=>o.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round"})),sort:e=>o.createElement("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M7 5v14M7 19l-3-3M7 5l3 3M17 19V5M17 5l3 3M17 19l-3-3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})),check:e=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M5 12l4 4 10-10",stroke:"#c026d3",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})),logout:e=>o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M15 17l5-5-5-5M20 12H9M9 20H6a2 2 0 01-2-2V6a2 2 0 012-2h3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})),bookmark:e=>o.createElement("svg",{width:"26",height:"26",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M6 3.5h12a1.5 1.5 0 011.5 1.5v15.2c0 .8-.9 1.2-1.5.7L12 17.4l-6 3.5c-.6.4-1.5 0-1.5-.7V5A1.5 1.5 0 016 3.5z",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})),link:e=>o.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M10 13a5 5 0 007 0l2-2a5 5 0 00-7-7l-1 1M14 11a5 5 0 00-7 0l-2 2a5 5 0 007 7l1-1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})),chevExpand:e=>o.createElement("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",...e},o.createElement("path",{d:"M8 10l4-4 4 4M8 14l4 4 4-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},NH={all:{getTriggerPath:e=>e!=="all"?"users-asset-view-lastupdated_team":"users-asset-view-lastupdated_team_all"},recent:{getTriggerPath:e=>e!=="all"?"users-asset-view-recentlyviewed_team":"users-asset-view-recentlyviewed_team_all",filterSet:[{type:"existence",key:"date_viewed"}]}
1959,starred:{getTriggerPath:e=>e!=="all"?"users-asset-view-favorited_team":"users-asset-view-favorited_team_all",filterSet:[{type:"boolean",key:"is_favorited"}]}},oKe=[{key:"all",label:"All"},{key:"recent",label:"Recent"},{key:"starred",label:"Starred"}],KN=[{key:"updated",label:"Recently updated",short:"Updated"},{key:"name",label:"Name (AâZ)",short:"Name"},{key:"viewed",label:"Recently viewed",short:"Viewed"}];function lKe(e){return e==null?"â":new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}function cKe(e){if(!e)return"";const t=(Date.now()-e)/864e5;return t<1?"today":t<7?Math.max(1,Math.round(t))+"d":t<365?Math.round(t/7)+"w":Math.round(t/365)+"y"}function RH(e){var t;return((t=e==null?void 0:e.active_iteration)==null?void 0:t.url)||(e==null?void 0:e.url)||""}function cre(){var Qn;const e=Wn(Ce=>{var ut;return(ut=Ce==null?void 0:Ce.FB)==null?void 0:ut.auth}),t=e==null?void 0:e.user,[,n]=p.useState(0);p.useEffect(()=>fg(Ki,()=>n(ut=>ut+1)),[]);const r=Ki.currentUser,a=(r==null?void 0:r.email)||(t==null?void 0:t.email)||(r==null?void 0:r.phoneNumber)||(t==null?void 0:t.phoneNumber)||(r==null?void 0:r.displayName)||(t==null?void 0:t.displayName)||(r==null?void 0:r.uid)||(t==null?void 0:t.uid)||"",[s,i]=p.useState(()=>typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)").matches:!1);p.useEffect(()=>{if(!window.matchMedia)return;const Ce=window.matchMedia("(prefers-color-scheme: dark)"),ut=pn=>i(pn.matches);return Ce.addEventListener?Ce.addEventListener("change",ut):Ce.addListener(ut),()=>Ce.removeEventListener?Ce.removeEventListener("change",ut):Ce.removeListener(ut)},[]);const l=p.useMemo(()=>iKe(s),[s]);p.useEffect(()=>{const Ce=document.getElementById("app-container");if(!Ce)return;const ut={background:Ce.style.background,borderRadius:Ce.style.borderRadius,clipPath:Ce.style.clipPath};return Ce.style.background=l.popoverSolid,Ce.style.borderRadius="18px",Ce.style.clipPath="inset(0 round 18px)",()=>{Ce.style.background=ut.background,Ce.style.borderRadius=ut.borderRadius,Ce.style.clipPath=ut.clipPath}},[l.popoverSolid]),p.useEffect(()=>{if(document.getElementById("mb-popover-style"))return;const Ce=document.createElement("style");Ce.id="mb-popover-style",Ce.textContent=` 1960 @keyframes mbSpin { to { transform: rotate(360deg); } } 1961 @keyframes mbToast { from { opacity:0; transform: translate(-50%, 10px); } to { opacity:1; transform: translate(-50%,0); } } 1962 @keyframes mbMenuIn { from { opacity:0; transform: translateY(-6px) scale(.98); } to { opacity:1; transform:none; } } 1963 .mb-scroll { -ms-overflow-style:none; scrollbar-width:none; } 1964 .mb-scroll::-webkit-scrollbar { display:none; width:0; height:0; } 1965 .mb-app *, .mb-app *::before, .mb-app *::after { box-sizing:border-box; } 1966 .mb-app input { outline:none; border:none; font-family:inherit; background:transparent; } 1967 .mb-app button { font-family:inherit; cursor:pointer; } 1968 `,document.head.appendChild(Ce)},[]);const[c,u]=p.useState("recent"),[d,f]=p.useState("updated"),[m,h]=p.useState(""),[g,v]=p.useState("all"),[y,b]=p.useState(!0),[E,w]=p.useState(null),[x,S]=p.useState(null),[N,k]=p.useState(0),[C,A]=p.useState(null),[O,T]=p.useState(null),[M,L]=p.useState(null),[D,j]=p.useState(""),H=p.useRef(""),Y=p.useRef(!1),z=p.useRef(null),[K,ee]=p.useState(null),oe=p.useRef(new Set),J=p.useRef(null),se=p.useRef(null),B=p.useRef(null),U=p.useRef(null),$=p.useCallback(Ce=>{Ce&&(A(Ce),clearTimeout(B.current),B.current=setTimeout(()=>A(null),2200))},[]);p.useEffect(()=>()=>{clearTimeout(B.current),clearTimeout(U.current)},[]),p.useEffect(()=>{const Ce=ut=>$(ut==null?void 0:ut.message);return re.on("trigger-alert",Ce,"tauri-menubar-alert"),()=>re.remove("trigger-alert")},[$]);const ce=((Qn=e==null?void 0:e.globalMeta)==null?void 0:Qn.teams)||[],be=Xo(()=>Qe.base["Assets-General-All"].toArray(),[])||[],ue=p.useCallback(Ce=>{S(null),ee(Ce)},[]),Ie=p.useCallback(()=>{ee(null),Y.current&&(Y.current=!1,T(Ce=>Ce==="expanded"||Ce==="slim"?"slim":Ce))},[]);p.useEffect(()=>{if(!(ce!=null&&ce.length)){re.remove("open-side-panel");return}const Ce=()=>ue({mode:"add"});return re.on("open-side-panel",Ce),()=>re.remove("open-side-panel")},[ce==null?void 0:ce.length,ue]);const Ae=p.useCallback((Ce,ut,pn=!1)=>
1968{if(!t)return;const Jt=NH[Ce]||NH.all,In=Jt.getTriggerPath(ut),Dn=ut!=="all"?ut:null;b(!0),ec.getAllAssets({forceUpdate:pn||!oe.current.has(`${Ce}-${ut}`),triggerPath:In,teamID:Dn,filterSet:Jt.filterSet}).then(or=>(oe.current.add(`${Ce}-${ut}`),w(Date.now()),(or==null?void 0:or.$get_upcoming_list)||null)).finally(()=>b(!1))},[t]);p.useEffect(()=>{t&&Ae(c,g)},[t]);const he=p.useCallback(Ce=>{u(Ce),k(0),Ae(Ce,g)},[g,Ae]),_e=p.useCallback(Ce=>{var pn;v(Ce),S(null),k(0),oe.current.clear(),Ae(c,Ce,!0);const ut=Ce==="all"?"All Workspaces":((pn=ce.find(Jt=>Jt.id===Ce))==null?void 0:pn.name)||"workspace";$("Switched to "+ut)},[c,Ae,ce,$]),ie=p.useCallback(()=>{y||(Ae(c,g,!0),S(null),$("Syncingâ¦"))},[c,g,Ae,y,$]),Ue=p.useCallback(async()=>{if(S(null),!!SH())try{const{invoke:Ce}=await yn(()=>function(){return(Jt=>import(Jt))("./core.7c2ac0d6.js")}(),[]);await Ce("open_desktop_app");const{getCurrentWindow:ut}=await yn(()=>function(){return(Jt=>import(Jt))("./window.4cc8c851.js")}(),[]);await ut().hide()}catch(Ce){console.error("Failed to open desktop app window:",Ce)}},[]),ae=p.useCallback(async()=>{var Ce;S(null);try{re.dispatch("asset-content-processing-queue",{isResetQueue:!0}),(Ce=Qe==null?void 0:Qe.action)!=null&&Ce.selfDestruct&&await Qe.action.selfDestruct();try{Object.keys(localStorage).filter(ut=>ut.endsWith("-lastDownload")||ut.startsWith("map_temp_resolve_")).forEach(ut=>localStorage.removeItem(ut))}catch{}}catch(ut){console.error("Clear cache failed:",ut)}finally{window.location.reload()}},[]),pe=p.useCallback(()=>{if(S(null),!(ce!=null&&ce.length)){$("You need a workspace to add bookmarks.");return}ue({mode:"add"})},[ce==null?void 0:ce.length,ue,$]),W=p.useCallback(Ce=>{S(null),ue({mode:"edit",asset:Ce})},[ue]),q=p.useCallback(({mode:Ce})=>{Ce==="add"&&(u("all"),k(0)),Y.current&&(Y.current=!1,H.current=(M==null?void 0:M.url)||H.current,T("saved"),clearTimeout(U.current),U.current=setTimeout(()=>T(null),1800))},[M]),te=p.useCallback(async Ce=>{if(Ce!=null&&Ce.$optimistic)return;const ut=RH(Ce);if(ut)try{const{openUrl:pn}=await yn(()=>function(){return(In=>import(In))("./index.a906e697.js")}(),[]);await pn(ut)}catch{window.open(ut,"_blank")}},[]),X=p.useCallback(async()=>{if(!SH())return;let Ce="";try{const{readText:In}=await yn(()=>function(){return(or=>import(or))("./index.12a6c0d9.js")}(),[]);Ce=await In()||""}catch{return}const ut=Ce.trim(),pn=z.current;if(pn==="saved")return;if(!sKe(ut)||ut===H.current){pn&&(T(null),L(null));return}const Jt=pb(ut)||"link";L({url:ut,domain:Jt,letter:Gf(Jt)}),j(Jt),pn!=="expanded"&&T("slim")},[]);p.useEffect(()=>{z.current=O},[O]),p.useEffect(()=>{X();const Ce=()=>{document.visibilityState==="visible"&&X()};return document.addEventListener("visibilitychange",Ce),()=>document.removeEventListener("visibilitychange",Ce)},[X]);const le=p.useCallback(()=>{if(!M){pe();return}if(!(ce!=null&&ce.length)){$("You need a workspace to add bookmarks.");return}Y.current=!0,ue({mode:"add",initialUrl:M.url})},[M,ce==null?void 0:ce.length,ue,pe,$]),me=p.useCallback(()=>{H.current=(M==null?void 0:M.url)||H.current,T(null)},[M]),fe=p.useMemo(()=>g==="all"?be:be.filter(Ce=>Ce.$team_id===g),[be,g]),ke=p.useMemo(()=>({all:fe.length,recent:fe.filter(Ce=>!!Ce.date_viewed).length,starred:fe.filter(Ce=>!!Ce.is_favorited).length}),[fe]),Se=p.useMemo(()=>{let Ce=fe;c==="recent"?Ce=Ce.filter(Jt=>!!Jt.date_viewed||Jt.$optimistic):c==="starred"&&(Ce=Ce.filter(Jt=>!!Jt.is_favorited||Jt.$optimistic));const ut=m.trim().toLowerCase();ut&&(Ce=Ce.filter(Jt=>(Jt.name||"").toLowerCase().includes(ut)||RH(Jt).toLowerCase().includes(ut)));const pn=[...Ce];return d==="name"?pn.sort((Jt,In)=>(Jt.name||"").localeCompare(In.name||"")):d==="viewed"?pn.sort((Jt,In)=>(In.date_viewed||0)-(Jt.date_viewed||0)):pn.sort((Jt,In)=>(In.date_modified||In.date_created||0)-(Jt.date_modified||Jt.date_created||0)),pn.sort((Jt,In)=>(In.$optimistic?1:0)-(Jt.$optimistic?1:0)),pn},[fe,c,m,d]);if(p.useEffect(()=>{N>Se.length-1&&k(0)},[Se.length,N]),p.useEffect(()=>{const Ce=ut=>{const pn=ut.target&&(ut.target.tagName==="INPUT"||ut.target.tagName==="TEXTAREA");
1968if((ut.metaKey||ut.ctrlKey)&&(ut.key==="i"||ut.key==="I")){ut.preventDefault(),O!=="saved"&&le();return}if((ut.metaKey||ut.ctrlKey)&&(ut.key==="k"||ut.key==="K")||ut.key==="/"&&!pn){ut.preventDefault(),se.current&&se.current.focus();return}if(ut.key==="Escape"){K?Ie():x&&S(null);return}if(!pn){if(ut.key==="ArrowDown")ut.preventDefault(),k(Jt=>Math.min(Se.length-1,Jt+1));else if(ut.key==="ArrowUp")ut.preventDefault(),k(Jt=>Math.max(0,Jt-1));else if(ut.key==="Enter"){const Jt=Se[N];Jt&&te(Jt)}}};return window.addEventListener("keydown",Ce),()=>window.removeEventListener("keydown",Ce)},[O,le,K,Ie,x,Se,N,te]),p.useEffect(()=>{const Ce=J.current;if(!Ce)return;const ut=58,pn=N*ut;pn<Ce.scrollTop?Ce.scrollTop=pn:pn+ut>Ce.scrollTop+Ce.clientHeight&&(Ce.scrollTop=pn+ut-Ce.clientHeight)},[N]),!(t!=null&&t.uid)&&r)return o.createElement(du,null);if(!(t!=null&&t.uid))return o.createElement(zh,null);const Et=[{id:"all",name:"All Workspaces",initial:"â³",grad:YI("workspace")},...ce.map((Ce,ut)=>({id:Ce.id,name:Ce.name,initial:Gf(Ce.name),grad:KI(ut)}))],nt=Et.find(Ce=>Ce.id===g)||Et[0],Pt=(KN.find(Ce=>Ce.key===d)||KN[0]).short,en={position:"absolute",zIndex:21,minWidth:"216px",background:l.menu,backdropFilter:"blur(30px) saturate(1.7)",WebkitBackdropFilter:"blur(30px) saturate(1.7)",border:"1px solid "+l.menuBorder,borderRadius:"15px",boxShadow:l.menuShadow,padding:"6px"},hn={display:"flex",alignItems:"center",gap:"10px",width:"100%",padding:"8px 9px",borderRadius:"9px",color:l.text,fontSize:"13.5px",fontWeight:500,textAlign:"left",background:"transparent",transition:"background .1s"},rt={fontSize:"10.5px",fontWeight:700,letterSpacing:".5px",textTransform:"uppercase",color:l.faint,padding:"6px 9px 5px"},et={flex:"1 1 auto",minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Kt={fontFamily:YN,fontSize:"11px",fontWeight:600,color:l.faint,background:l.isDark?"rgba(255,255,255,.06)":"rgba(31,6,65,.05)",borderRadius:"5px",padding:"2px 5px",flex:"none"},zn={width:"32px",height:"32px",borderRadius:"10px",display:"flex",alignItems:"center",justifyContent:"center",color:l.dim,background:"transparent",transition:"transform .1s, background .12s"},xt={fontFamily:YN,fontSize:"11px",fontWeight:600,color:"rgba(255,255,255,.82)",background:"rgba(255,255,255,.18)",borderRadius:"5px",padding:"2px 5px"},rr=Se.length===0;let ir="No bookmarks",Tn="Nothing to show here yet.";const Ct=m.trim();Ct?(ir="No matches",Tn=`No bookmarks match â${Ct}â.`):c==="starred"?(ir="Nothing starred yet",Tn="Star a bookmark to keep it close."):c==="recent"&&(ir="Nothing recent",Tn="Recently viewed bookmarks land here.");const _r=M?YI(M.domain||M.url):l.field;return o.createElement("div",{className:"mb-app",style:{position:"relative",width:"100%",height:"100vh",display:"flex",flexDirection:"column",overflow:"hidden",fontFamily:"Inter, system-ui, -apple-system, sans-serif",color:l.text,background:l.popoverSolid,userSelect:"none"}},o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 13px 8px",flex:"none"}},o.createElement("div",{style:{position:"relative"}},o.createElement("button",{onClick:()=>S(Ce=>Ce==="ws"?null:"ws"),style:{display:"flex",alignItems:"center",gap:"8px",padding:"6px 10px 6px 7px",borderRadius:"999px",background:l.surface2,border:"1px solid "+l.border,color:l.text,maxWidth:"210px"}},o.createElement("span",{style:{width:"22px",height:"22px",borderRadius:"7px",background:nt.grad,color:"#fff",fontSize:"11px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flex:"none"}},nt.initial),o.createElement("span",{style:{fontSize:"13.5px",fontWeight:600,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},nt.name),o.createElement(hi.chevDown,{style:{color:l.faint,flex:"none"}})),x==="ws"&&o.createElement("div",{className:"mb-scroll",style:{...en,top:"40px",left:0,maxHeight:"300px",overflowY:"auto",animation:"mbMenuIn .16s ease"}},o.createElement("div",{style:rt},"Workspace"),Et.map(Ce=>o.createElement("button",{key:Ce.id,onClick:()=>_e(Ce.id),style:{...hn,fontWeight:g===Ce.id?700:500,background:g===Ce.id?l.soft:"transparent"}},o.createElement("span",{style:{width:"24px",height:"24px",borderRadius:"7px",background:Ce.grad,color:"#fff",fontSize:"11px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flex:"none"}},Ce.initial),o.createElement("span",{style:et},Ce.name),g===Ce.id&&o.createElement(hi.check,null))))),o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},o.createElement("button",{onClick:ie,title:"Sync now","aria-label":"Sync now","aria-busy":y,style:zn},o.createElement(hi.refresh,{style:{color:l.dim,animation:y?"mbSpin .7s linear infinite":"none"}})),o.createElement("button",{onClick:pe,title:"Add bookmark","aria-label":"Add bookmark",style:zn},o.createElement(hi.bookmarkPlus,{style:{color:l.dim}})),o.createElement("button",{onClick:Ue,title:za.desktopOpenLabel,"aria-label":za.desktopOpenLabel,style:zn},o.createElement(hi.openExternal,{style:{color:l.dim}})),o.createElement("div",{style:{position:"relative"}}
1968,o.createElement("button",{onClick:()=>S(Ce=>Ce==="settings"?null:"settings"),"aria-label":"Account",style:{display:"flex"}},o.createElement("span",{style:{width:"30px",height:"30px",borderRadius:"50%",background:"linear-gradient(150deg,#7c8af0,#5e6ad2)",color:"#fff",fontSize:"11px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center"}},Gf(a))),x==="settings"&&o.createElement("div",{style:{...en,top:"38px",right:0,animation:"mbMenuIn .16s ease"}},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"7px 9px 10px",marginBottom:"3px",borderBottom:"1px solid "+l.border}},o.createElement("span",{style:{width:"34px",height:"34px",borderRadius:"50%",background:"linear-gradient(150deg,#7c8af0,#5e6ad2)",color:"#fff",fontSize:"12px",fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",flex:"none"}},Gf(a)),o.createElement("div",{style:{minWidth:0}},o.createElement("div",{style:{fontSize:"13px",fontWeight:700,color:l.text,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"150px"}},a||"â"),!1)),o.createElement("button",{onClick:Ue,style:hn},o.createElement(hi.openExternal,{width:"16",height:"16",style:{color:l.dim,flex:"none"}}),o.createElement("span",{style:et},za.desktopOpenLabel)),o.createElement("button",{onClick:ae,title:"Wipe the local Dexie cache and re-sync from the server",style:hn},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",style:{color:l.dim,flex:"none"}},o.createElement("ellipse",{cx:"12",cy:"6",rx:"7",ry:"3",stroke:"currentColor",strokeWidth:"1.7"}),o.createElement("path",{d:"M5 6v6c0 1.7 3.1 3 7 3s7-1.3 7-3",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"}),o.createElement("path",{d:"M5 12v6c0 1.7 3.1 3 7 3s7-1.3 7-3v-6",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round"})),o.createElement("span",{style:et},"Clear cache"),o.createElement("span",{style:{fontSize:"10px",fontWeight:700,letterSpacing:".4px",textTransform:"uppercase",color:l.faint,flex:"none"}},"Debug")),o.createElement("div",{style:{height:"1px",background:l.border,margin:"5px 4px"}}),o.createElement("button",{onClick:()=>{S(null),Dy(Ki)},style:{...hn,color:l.danger}},o.createElement(hi.logout,{style:{color:l.danger,flex:"none"}}),o.createElement("span",{style:et},"Log out")))))),M&&O==="expanded"&&o.createElement("div",{style:{margin:"4px 13px 10px",padding:"11px 12px 12px",borderRadius:"16px",background:l.surface2,border:"1px solid "+l.border,flex:"none"}},o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"}},o.createElement("span",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"10.5px",fontWeight:700,letterSpacing:".7px",color:l.dim}},o.createElement("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:"#22c55e",boxShadow:"0 0 0 3px rgba(34,197,94,.18)"}}),"FROM CLIPBOARD"),o.createElement("button",{onClick:()=>T("slim"),"aria-label":"Collapse",style:{width:"22px",height:"22px",borderRadius:"7px",display:"flex",alignItems:"center",justifyContent:"center",color:l.faint,background:"transparent"}},o.createElement(hi.close,{width:"13",height:"13"}))),o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"11px"}},o.createElement("div",{style:{position:"relative",width:"68px",height:"50px",borderRadius:"10px",background:_r,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flex:"none",boxShadow:"0 3px 10px rgba(20,8,40,.2)"}},o.createElement("span",{style:{fontFamily:CH,fontSize:"30px",fontWeight:700,color:"rgba(255,255,255,.92)",textShadow:"0 2px 8px rgba(0,0,0,.2)"}},M.letter)),o.createElement("div",{style:{flex:"1 1 auto",minWidth:0}},o.createElement("input",{type:"text",value:D,onChange:Ce=>j(Ce.target.value),placeholder:"Title",style:{width:"100%",fontSize:"14px",fontWeight:700,color:l.text,letterSpacing:"-.2px",padding:"0 0 2px"}}),o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"5px",color:l.dim,marginTop:"2px"}},o.createElement(hi.link,{style:{color:l.dim,flex:"none"}}),o.createElement("span",{style:{fontSize:"12px",fontWeight:500,color:l.dim,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},M.domain)))),o.createElement("button",{onClick:le,style:{width:"100%",marginTop:"12px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"11px",borderRadius:"12px",background:"linear-gradient(180deg,#cf30e0,#a512c4)",color:"#fff",fontSize:"14px",fontWeight:700,boxShadow:"0 8px 20px rgba(192,38,211,.4)"}},o.createElement("span",null,"Save bookmark"),o.createElement("span",{style:xt},"âI"))),M&&O==="slim"&&o.createElement("div",{onClick:()=>T("expanded"),style:{display:"flex",alignItems:"center",gap:"9px",margin:"4px 13px 10px",padding:"10px 11px",borderRadius:"12px",background:l.surface2,border:"1px solid "+l.border,curs
1968or:"pointer",flex:"none"}},o.createElement("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:"#22c55e",boxShadow:"0 0 0 3px rgba(34,197,94,.18)",flex:"none"}}),o.createElement("div",{style:{flex:"1 1 auto",minWidth:0,fontSize:"12.5px",color:l.dim,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},o.createElement("b",{style:{color:l.text,fontWeight:700}},"Clipboard")," ·"," ",M.domain),o.createElement(hi.chevExpand,{style:{color:l.faint,flex:"none"}}),o.createElement("button",{onClick:Ce=>{Ce.stopPropagation(),le()},style:{display:"flex",alignItems:"center",gap:"6px",padding:"7px 11px",borderRadius:"9px",background:"linear-gradient(180deg,#cf30e0,#a512c4)",color:"#fff",fontSize:"12.5px",fontWeight:700,flex:"none"}},"Save ",o.createElement("span",{style:xt},"âI")),o.createElement("button",{onClick:Ce=>{Ce.stopPropagation(),me()},"aria-label":"Dismiss",style:{width:"20px",height:"20px",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",color:l.faint,flex:"none"}},o.createElement(hi.close,{width:"11",height:"11"}))),O==="saved"&&o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"11px",margin:"4px 13px 10px",padding:"13px 14px",borderRadius:"16px",background:l.isDark?"rgba(34,197,94,.14)":"rgba(34,197,94,.09)",border:"1px solid "+(l.isDark?"rgba(34,197,94,.3)":"rgba(34,197,94,.24)"),flex:"none"}},o.createElement("span",{style:{width:"30px",height:"30px",borderRadius:"50%",background:"#22c55e",display:"flex",alignItems:"center",justifyContent:"center",flex:"none"}},o.createElement("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none"},o.createElement("path",{d:"M5 12l4 4 10-10",stroke:"#fff",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round"}))),o.createElement("div",{style:{flex:"1 1 auto",fontSize:"13.5px",fontWeight:500,color:l.text}},"Bookmark saved")),o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"9px",margin:"0 13px 10px",padding:"0 12px",height:"40px",borderRadius:"12px",background:l.field,border:"1px solid "+l.border,flex:"none"}},o.createElement(hi.search,{style:{color:l.faint,flex:"none"}}),o.createElement("input",{ref:se,type:"text",placeholder:"Search bookmarks",value:m,onChange:Ce=>{h(Ce.target.value),k(0)},style:{flex:"1 1 auto",minWidth:0,fontSize:"14px",fontWeight:500,color:l.text}}),Ct?o.createElement("button",{onClick:()=>{h(""),k(0),se.current&&se.current.focus()},"aria-label":"Clear search",style:{width:"20px",height:"20px",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",color:l.faint,background:l.isDark?"rgba(255,255,255,.08)":"rgba(31,6,65,.06)",flex:"none"}},o.createElement(hi.close,null)):o.createElement("span",{style:{fontFamily:YN,fontSize:"11px",fontWeight:600,color:l.faint,background:l.isDark?"rgba(255,255,255,.06)":"rgba(31,6,65,.05)",borderRadius:"6px",padding:"3px 6px",flex:"none"}},"âK")),o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",padding:"0 13px 10px",flex:"none"}},o.createElement("div",{style:{display:"flex",gap:"2px",padding:"3px",borderRadius:"11px",background:l.field}},oKe.map(Ce=>{const ut=c===Ce.key;return o.createElement("button",{key:Ce.key,onClick:()=>he(Ce.key),style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px",padding:"6px 11px",borderRadius:"8px",fontSize:"12.5px",fontWeight:ut?700:600,background:ut?l.isDark?l.surface2:"#fff":"transparent",color:ut?l.accent:l.dim,boxShadow:ut?"0 1px 3px rgba(20,8,40,.12)":"none"}},o.createElement("span",null,Ce.label),o.createElement("span",{style:{fontSize:"10.5px",fontWeight:700,color:ut?l.accent:l.faint,opacity:ut?.85:.8}},ke[Ce.key]))})),o.createElement("div",{style:{position:"relative",flex:"none"}},o.createElement("button",{onClick:()=>S(Ce=>Ce==="sort"?null:"sort"),style:{display:"flex",alignItems:"center",gap:"6px",padding:"7px 10px",borderRadius:"10px",background:l.surface2,border:"1px solid "+l.border,color:l.text,fontSize:"12.5px",fontWeight:600}},o.createElement(hi.sort,{style:{color:l.dim}}),o.createElement("span",null,Pt)),x==="sort"&&o.createElement("div",{style:{...en,top:"38px",right:0,minWidth:"196px",animation:"mbMenuIn .16s ease"}},o.createElement("div",{style:rt},"Sort by"),KN.map(Ce=>o.createElement("button",{key:Ce.key,onClick:()=>{f(Ce.key),S(null)},style:{...hn,justifyContent:"space-between",fontWeight:d===Ce.key?700:500}},o.createElement("span",{style:et},Ce.label),d===Ce.key&&o.createElement(hi.check,null)))))),o.createElement("div",{ref:J,className:"mb-scroll",style:{flex:"1 1 auto",minHeight:0,overflowY:"auto",padding:"0 9px 8px"}},y&&be.length===0?o.createElement("div",{style:{padding:"40px 20px",textAlign:"center",fontSize:"13px",color:l.dim}},"Syncing bookmarksâ¦"):rr?o.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",padding:"48px 30px"}},o.createElement("div",{style:{width:"58px",height:"58px",borderRadius:"18px",background:l.surface2,border:"1px solid "+l.border,color:l.accent,display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"16
1968px"}},o.createElement(hi.bookmark,null)),o.createElement("div",{style:{fontFamily:CH,fontSize:"18px",fontWeight:600,color:l.text}},ir),o.createElement("div",{style:{fontSize:"13px",color:l.dim,marginTop:"6px",lineHeight:1.5,maxWidth:"220px"}},Tn)):Se.map((Ce,ut)=>o.createElement(jYe,{key:Ce.$id,asset:Ce,t:l,selected:ut===N,relTime:cKe,onHover:()=>k(ut),onOpen:()=>te(Ce),onEdit:()=>W(Ce)}))),o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"9px 14px",borderTop:"1px solid "+l.border,background:l.isDark?"rgba(255,255,255,.02)":"rgba(31,6,65,.015)",flex:"none"}},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"11px",fontWeight:600,color:l.faint}},o.createElement("span",{style:{width:"6px",height:"6px",borderRadius:"50%",background:"#22c55e"}}),E?"Synced "+lKe(E):"Not synced yet"),o.createElement("div",{style:{display:"flex",alignItems:"center",gap:"11px"}},o.createElement("span",{style:{display:"flex",alignItems:"center",gap:"5px",fontSize:"11px",fontWeight:500,color:l.faint}},o.createElement("span",{style:Kt},"ââ"),"Navigate"),o.createElement("span",{style:{display:"flex",alignItems:"center",gap:"5px",fontSize:"11px",fontWeight:500,color:l.faint}},o.createElement("span",{style:Kt},"âµ"),"Open"),o.createElement("span",{style:{display:"flex",alignItems:"center",gap:"5px",fontSize:"11px",fontWeight:500,color:l.faint}},o.createElement("span",{style:Kt},"âI"),"Save"))),x&&o.createElement("div",{onClick:()=>S(null),style:{position:"absolute",inset:0,background:l.scrim,zIndex:20}}),C&&o.createElement("div",{role:"status",style:{position:"absolute",bottom:"52px",left:"50%",transform:"translateX(-50%)",background:l.isDark?"#f1eafb":"#1c1230",color:l.isDark?"#1c1230":"#fff",padding:"10px 18px",borderRadius:"12px",fontSize:"13px",fontWeight:600,zIndex:30,boxShadow:"0 10px 28px rgba(20,8,40,.42)",animation:"mbToast .3s cubic-bezier(.2,1,.3,1)",whiteSpace:"nowrap",maxWidth:"84%",overflow:"hidden",textOverflow:"ellipsis"}},C),K&&o.createElement(rKe,{mode:K.mode,t:l,teams:ce,defaultTeamId:g,asset:K.asset||null,initialUrl:K.initialUrl||"",onClose:Ie,onSaved:q,showToast:$}))}function uKe(){const e=yr(),t=n=>{e("/signup")};return o.createElement("div",{className:"app-content app-marketing app-marketing__pricing bg-[#f1f4f9] min-h-screen"},o.createElement(BS,null),o.createElement("div",{className:"sm:max-w-6xl sm:mx-auto pb-4 sm:pb-1 px-4"},o.createElement("main",null,o.createElement("div",{className:"text-center pb-16 sm:pb-8 "},o.createElement("h1",{className:"mx-auto max-w-3xl sm-text-2xl font-display text-4xl font-medium tracking-tight text-slate-900 dark:text-white"},"Choose the plan that's right for your workspace")),o.createElement("div",{className:"overflow-x-auto"},o.createElement(ire,{isPublic:!0,onSelectPlan:t,discountActions:{has75percentOffFirst3months:!0,enableUseCouponCode:!0}}))),o.createElement("footer",{className:"py-6 mt-10"},o.createElement("div",{className:"container mx-auto px-5 flex items-center justify-between"},o.createElement("p",{className:"text-gray-600 dark:text-gray-200"},"© ",new Date().getFullYear()," ",za.name),o.createElement("div",{className:"flex space-x-4"},o.createElement("a",{className:"text-gray-500 hover:text-primary hover:no-underline cursor-pointer",onClick:()=>{e("/terms")}},"Terms"),o.createElement("a",{onClick:()=>{e("/privacy")},className:"text-gray-500 hover:text-primary hover:no-underline cursor-pointer"},"Privacy"))))))}const dKe=p.lazy(()=>yn(()=>function(){return(t=>import(t))("./AdminApp.cec978a6.js")}(),[]));function fKe(e){return o.createElement(p.Suspense,{fallback:o.createElement("div",{className:"flex justify-center p-12"},o.createElement(os,null))},o.createElement(dKe,{...e}))}const mKe=[{element:zh,path:"/login"},{element:J6,path:"/prototypes/:teamID"},{element:J6,path:"/prototypes"},{element:G1,path:"/workspace/:teamID/map/:mapID"},{element:G1,path:"/workspace/:teamID/map"},{element:G1,path:"/workspace/all/map/:mapID"},{element:G1,path:"/workspace/all/map"},{element:X1,path:"/workspace/:teamID/board/:boardID"},{element:X1,path:"/workspace/:teamID/board"},{element:X1,path:"/workspace/all/board/:boardID"},{element:X1,path:"/workspace/all/board"},{element:ZBe,path:"/workspace/:teamID/tables"},{element:aje,path:"/share/board/:shareToken"},{element:oje,path:"/share/flow/:shareToken"},{element:zh,path:"/login"},{element:hne,path:"/signup"},{element:Ije,path:"/dashboard"},{element:Mje,path:"/add-organization"},{element:fYe,path:"/organization/:organizationID/manage"},{element:OYe,path:"/organization/:organizationID/subscribe"},{element:PYe,path:"/organization/:organizationID/invoices"},{element:Lje,path:"/workspace/add"},{element:Fje,path:"/workspace/join"},{element:Cz,path:"/workspace/join/:code"},{element:Cz,path:"/join/:code"},{element:DYe,path:"/workspace/:teamID/manage"},{element:LYe,path:"/workspace/:teamID/search"},{element:WN.LastUpdated,path:"/workspace/:teamID/bookmarks/updated"},{element:jN.LastUpdated,path:"/workspace/all/bookmarks/updated"},{element:WN.RecentlyViewed,path:"/workspace/:teamID/bookmarks/recently-viewed"},{element:jN.RecentlyViewed,path:"/workspace/all/bookmarks/recently-viewed"},{element:WN.Favorited,path:"/workspace/:teamID/bookmarks/starred"},{element:_H,path:"/workspace/:teamID/activity/:filterAction"},{element:_H,path:"/workspace/:teamID/activity"},{element:xH,path:"/workspace/all/activity/:filterAction"},{element:xH,path:"/workspace/all/activity"},{element:jN.Favorited,path:"/workspace/all/bookmarks/starred"},{element:dYe,path:"/collection/:collectionID"},{element:zh,path:"/go/:assetID/login"},{element:zh,path:"/organization/:organizationID/subscribe/login"},{element:zYe,path:"/go/:assetID"},{element:oWe,path:"/account/profile"},{element:cWe,path:"/account/support"},{element:FN,path:"/import"},{element:FN,path:"/import-bookmark-bar"},{element:FN,path:"/import-bookmark-history"},{element:Qne,path:"/privacy"},{element:Jne,path:"/terms"},{element:VYe,path:"/verify"},{element:uKe,path:"/pricing"},{element:fKe,path:"/admin/*"},{element:cre,path:"/tauri"},{element:lje,path:"/team/*"},{element:sH,path:"/"},{element:sH,path:"*"}],hKe={list:mKe},TH="it8-pwa-install-dismissed",AH="(max-width: 767px)";function IH(){return typeof window>"u"?!1:window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0}function pKe(){const[e,t]=p.useState(null),[n,r]=p.useState(()=>{try{return localStorage.getItem(TH)==="1"}catch{return!1}}),[a,s]=p.useState(()=>typeof window<"u"&&window.matchMedia(AH).matches);p.useEffect(()=>{const c=window.matchMedia(AH),u=()=>s(c.matches);return c.addEventListener("change",u),()=>c.removeEventListener("change",u)},[]),p.useEffect(()=>{if(IH())return;const c=d=>{d.preventDefault(),t(d)};window.addEventListener("beforeinstallprompt",c);const u=()=>{t(null)};return window.addEventListener("appinstalled",u),()=>{window.removeEventListener("beforeinstallprompt",c),window.removeEventListener("appinstalled",u)}},[]);const i=p.useCallback(()=>{t(null);try{localStorage.setItem(TH,"1")}catch{}r(!0)},[]),l=p.useCallback(async()=>
1968{if(!e)return;e.prompt();const{outcome:c}=await e.userChoice;t(null)},[e]);return IH()||n||!e||!a?null:o.createElement("div",{className:"fixed z-[500] left-[max(12px,env(safe-area-inset-left,0px))] right-[max(12px,env(safe-area-inset-right,0px))] bottom-[max(12px,env(safe-area-inset-bottom,0px))] max-w-sm rounded-md shadow-lg border border-gray-200 dark:border-gray-600 bg-white dark:bg-[#241d33] p-3 flex gap-3 items-center",role:"status"},o.createElement("div",{className:"flex-1 text-sm dark__text"},za.pwaInstallText),o.createElement(De,{intent:"primary",small:!0,onClick:l,className:"shrink-0"},"Install"),o.createElement(De,{variant:"minimal",icon:o.createElement(nG,{size:14}),"aria-label":"Dismiss",onClick:i,className:"shrink-0 min-h-[44px] min-w-[44px]"}))}const ure=[{icon:Mpe,title:"Flows",description:"Organize bookmarks into linked sequences your workspace can follow end-to-end."},{icon:Qpe,title:"Import",description:"Bring bookmarks in from your browser, other tools, and bulk files in seconds."},{icon:Kpe,title:"Activities",description:"See what your workspace members have added, updated, and viewed in one feed."},{icon:vge,title:"Improved workspace invitation",description:"A faster, clearer invite flow so new members land in the right place."},{icon:Sge,title:"Personal Bookmark Workspace",description:"A personal workspace just for you â not shared with anyone in your workspace."},{icon:fpe,title:"Personal Plan",description:"A new plan tier built for individuals who want more without going workspace-wide."}],dre=[{icon:vpe,title:"Desktop app",description:"A native window so your bookmarks live alongside your work."},{icon:XW,title:"Menubar app",description:"One-click access from your menubar â capture and search instantly."}],p_=({features:e,variant:t="filled"})=>{const n=t==="dashed"?"flex items-start gap-3 p-3 rounded-md border border-dashed border-gray-300 dark:border-gray-600":"flex items-start gap-3 p-3 rounded-md bg-gray-50 dark:bg-gray-700",r=t==="dashed"?"text-gray-500 dark:text-gray-300 flex-shrink-0 pt-0.5":"text-blue-600 dark:text-blue-300 flex-shrink-0 pt-0.5";return o.createElement("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3"},e.map(a=>{const s=a.icon;return o.createElement("div",{key:a.title,className:n},o.createElement("div",{className:r},o.createElement(s,{size:18})),o.createElement("div",{className:"flex flex-col gap-0.5 min-w-0"},o.createElement("div",{className:"text-sm font-semibold text-gray-900 dark__text"},a.title),o.createElement("div",{className:"text-xs text-gray-600 dark__text leading-snug"},a.description)))}))},gKe="Iteratingly",vKe="iteratingly.com",OH="Bookmark It",MH="bookmark.it.com",yKe="https://bookmark.it.com",bKe=({dialogOpen:e=!1,onClose:t=ta.noop})=>{const[n,r]=p.useState(!1);p.useEffect(()=>{r(!!e)},[e]);const a=()=>{r(!1),t()};return o.createElement(ya,{isOpen:n,onClose:a,canOutsideClickClose:!1,canEscapeKeyClose:!1,enforceFocus:!0,autoFocus:!0,usePortal:!0,lazy:!0,style:{width:"min(600px, calc(100vw - 32px))",maxWidth:"100vw"},className:"dark:bg-gray-800 dark:text-white rebrand-announcement-dialog"},o.createElement(Pk,{useOverflowScrollContainer:!1,className:"flex flex-col gap-4 p-4"},o.createElement("div",{className:"flex flex-col items-center text-center gap-3"},o.createElement("div",{className:"flex items-center gap-3 text-base text-gray-500 dark__text"},o.createElement("span",{className:"line-through opacity-70"},vKe),o.createElement(Ft,{icon:"arrow-right",size:16}),o.createElement("span",{className:"font-semibold text-gray-900 dark__text"},MH)),o.createElement("h2",{className:"text-2xl sm:text-3xl font-semibold text-gray-900 dark__text m-0"},"Weâre now ",OH),o.createElement("p",{className:"text-sm sm:text-base text-gray-600 dark__text m-0 max-w-md"},"Same makers, same product, clearer name. ",gKe," is now"," ",o.createElement("span",{className:"font-semibold"},OH)," at"," ",o.createElement("a",{href:yKe,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline"},MH),". Your account, bookmarks, and workspaces carried over â nothing for you to migrate.")),o.createElement("div",{className:"flex flex-col gap-3"},o.createElement("div",{className:"text-xs uppercase tracking-wide text-gray-500 dark__text font-semibold"},"Whatâs new"),o.createElement(p_,{features:ure,variant:"filled"})),o.createElement("div",{className:"flex flex-col gap-3"},o.createElement("div",{className:"text-xs uppercase tracking-wide text-gray-500 dark__text font-semibold"},"Coming soon"),o.createElement(p_,{features:dre,variant:"dashed"})),o.createElement("div",{className:"flex justify-end pt-2"},o.createElement(De,{intent:"primary",large:!0,onClick:a,text:"Got it"}))))},wKe=({dialogOpen:e=!1,onClose:t=ta.noop})=>{const[n,r]=p.useState(!1);p.useEffect(()=>{r(!!e)},[e]);const a=()=>{r(!1),t()};return o.createElement(ya,{isOpen:n,onClose:a,enforceFocus:!0,autoFocus:!0,usePortal:!0,lazy:!0,style:{width:"min(600px, calc(100vw - 32px))",maxWidth:"100vw",maxHeight:"calc(100vh - 32px)"},className:"dark:bg-gray-800 dark:text-white welcome-dialog"}
1968,o.createElement(Pk,{className:"flex flex-col gap-5 p-5 sm:p-6"},o.createElement("div",{className:"flex flex-col items-center text-center gap-3"},o.createElement("div",{className:"text-xs uppercase tracking-widest text-blue-600 dark:text-blue-300 font-semibold"},"Welcome"),o.createElement("h2",{className:"text-2xl sm:text-3xl font-semibold text-gray-900 dark__text m-0"},"Welcome to ",za.name),o.createElement("p",{className:"text-sm sm:text-base text-gray-600 dark__text m-0 max-w-md"},"Glad youâre here. ",za.name," is a collaborative bookmark manager â save links, organize them, and share them with your workspace. Hereâs a quick tour of what you can do.")),o.createElement("div",{className:"flex flex-col gap-3"},o.createElement("div",{className:"text-xs uppercase tracking-wide text-gray-500 dark__text font-semibold"},"What you can do"),o.createElement(p_,{features:ure,variant:"filled"})),o.createElement("div",{className:"flex flex-col gap-3"},o.createElement("div",{className:"text-xs uppercase tracking-wide text-gray-500 dark__text font-semibold"},"Coming soon"),o.createElement(p_,{features:dre,variant:"dashed"})),o.createElement("div",{className:"flex justify-center pt-2 pb-2"},o.createElement(De,{intent:"primary",large:!0,onClick:a,text:"Get started"}))))};Ir(xr());const PH="https://us-central1-iteratingly.cloudfunctions.net";new Date("2026-05-21T00:00:00Z").getTime();const EKe="bookmark.it.com",hh="rebrand-seen-bookmarkit",ZN="dev-preview-rebrand-announcement",xKe=new Date("2026-05-21T00:00:00Z").getTime(),_Ke="bookmark.it.com",ph="welcome-seen-bookmarkit",XN="dev-preview-welcome-onboarding",QN="dev-preview-interstitial",JN="dev-preview-global-interstitial",kKe={primary:"info",success:"success",danger:"error"},SKe=["public_card_layout_","public_share_confirmed_"],CKe=()=>{try{const e=[];for(let t=0;t<localStorage.length;t+=1){const n=localStorage.key(t);n&&SKe.some(r=>n.startsWith(r))&&e.push(n)}e.forEach(t=>localStorage.removeItem(t))}catch{}},NKe=({external:e})=>{var $,ce,be,ue,Ie,Ae,he,_e;const t=Wn(ie=>{var Ue;return(Ue=ie==null?void 0:ie.FB)==null?void 0:Ue.auth}),n=Wn(ie=>{var Ue;return(Ue=ie==null?void 0:ie.UI)==null?void 0:Ue.user}),[r,a]=p.useState(0),[s,i]=p.useState(null),[l,c]=p.useState(null),[u,d]=p.useState(!1),[f,m]=p.useState(()=>({width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0})),[h,g]=p.useState(()=>{try{return localStorage.getItem(QN)==="1"}catch{return!1}}),v=ie=>{g(ie);try{ie?localStorage.setItem(QN,"1"):localStorage.removeItem(QN)}catch{}},[y,b]=p.useState(()=>{try{return localStorage.getItem(JN)==="1"}catch{return!1}}),E=ie=>{b(ie);try{ie?localStorage.setItem(JN,"1"):localStorage.removeItem(JN)}catch{}},w=["dev","qa"].includes("production"),x=hs(),S=(x==null?void 0:x.pathname)||"",N=S==="/login"||S==="/signup"||S.startsWith("/verify")||S.startsWith("/join/")||S.startsWith("/workspace/join"),[k]=p.useState(()=>{try{if(typeof window>"u")return!1;const ie=new URLSearchParams(window.location.search),Ue=(window.location.hash||"").replace(/^#/,""),ae=new URLSearchParams(Ue);return ie.get("via")==="iteratingly"||ae.get("via")==="iteratingly"}catch{return!1}}),[C,A]=p.useState(()=>{try{return localStorage.getItem(ZN)==="1"}catch{return!1}}),O=ie=>{A(ie);try{ie?(localStorage.setItem(ZN,"1"),localStorage.removeItem(hh)):localStorage.removeItem(ZN)}catch{}},[T,M]=p.useState(!1);p.useEffect(()=>{if(C&&w){M(!0);return}if(za.domain!==EKe||!k)return;let ie=!1;try{ie=localStorage.getItem(hh)==="1"||localStorage.getItem(ph)==="1"}catch{ie=!0}if(!ie){try{localStorage.setItem(hh,"1")}catch{}M(!0)}},[k,C,w,t==null?void 0:t.isLive,t==null?void 0:t.isLoggedIn,(ce=($=t==null?void 0:t.user)==null?void 0:$.metadata)==null?void 0:ce.creationTime]);const L=()=>
1968{if(M(!1),!(C&&w))try{localStorage.setItem(hh,"1")}catch{}},[D,j]=p.useState(()=>{try{return localStorage.getItem(XN)==="1"}catch{return!1}}),H=ie=>{j(ie);try{ie?(localStorage.setItem(XN,"1"),localStorage.removeItem(ph)):localStorage.removeItem(XN)}catch{}},[Y,z]=p.useState(!1);p.useEffect(()=>{var pe,W;if(D&&w){z(!0);return}if(za.domain!==_Ke||!(t!=null&&t.isLive)||!(t!=null&&t.isLoggedIn)||N||k)return;const ie=(W=(pe=t==null?void 0:t.user)==null?void 0:pe.metadata)==null?void 0:W.creationTime;if(!ie)return;const Ue=new Date(ie).getTime();if(Number.isNaN(Ue)||Ue<xKe)return;let ae=!1;try{ae=localStorage.getItem(ph)==="1"||localStorage.getItem(hh)==="1"}catch{ae=!0}if(!ae){try{localStorage.setItem(ph,"1")}catch{}z(!0)}},[k,t==null?void 0:t.isLive,t==null?void 0:t.isLoggedIn,(ue=(be=t==null?void 0:t.user)==null?void 0:be.metadata)==null?void 0:ue.creationTime,D,w,N,S]);const K=()=>{if(z(!1),!(D&&w))try{localStorage.setItem(ph,"1")}catch{}},ee=()=>{var Ue,ae,pe,W,q,te,X;if(!(t!=null&&t.isLoggedIn))return"N/A";if(n!=null&&n.isAllTeam)return"All Teams";const ie=(Ue=n==null?void 0:n.activeTeam)==null?void 0:Ue.id;return ie?(pe=(ae=t==null?void 0:t.context)==null?void 0:ae.team_manage_edit_team_map)!=null&&pe[ie]?"Admin":(q=(W=t==null?void 0:t.context)==null?void 0:W.team_invitations_create_team_map)!=null&&q[ie]||(X=(te=t==null?void 0:t.context)==null?void 0:te.team_projects_edit_team_map)!=null&&X[ie]?"Editor":"Member":"N/A"},[oe,J]=df(),se=hs(),B=yr(),U={default:Ea("/"),login:Ea("/login"),privacy:Ea("/privacy"),terms:Ea("/terms"),assetGO:Ea("/go/:assetID"),verify:Ea("/verify"),joinCode:Ea("/join/:code"),teamJoinCode:Ea("/workspace/join/:code"),teamJoin:Ea("/workspace/join"),signup:Ea("/signup"),lastUpdated:Ea("/workspace/all/bookmarks/updated"),lastUpdated_teamSpecific:Ea("/workspace/:teamID/bookmarks/updated"),recentlyViewed:Ea("/workspace/all/bookmarks/recently-viewed"),recentlyViewed_teamSpecific:Ea("/workspace/:teamID/bookmarks/recently-viewed"),starred:Ea("/workspace/all/bookmarks/starred"),starred_teamSpecific:Ea("/workspace/:teamID/bookmarks/starred"),prototypes:Ea("/prototypes"),maps:Ea("/workspace/all/map"),maps_mapSpecific:Ea("/workspace/all/map/:mapID"),maps_teamSpecific:Ea("/workspace/:teamID/map"),maps_teamSpecific_mapSpecific:Ea("/workspace/:teamID/map/:mapID"),organizationSubscription:Ea("/organization/:organizationID/subscribe"),importBookmarks:Ea("/import"),importBookmarkBar:Ea("/import-bookmark-bar"),importBookmarkHistory:Ea("/import-bookmark-history"),shareBoard:Ea("/share/board/:shareToken"),shareFlow:Ea("/share/flow/:shareToken")};return p.useEffect(()=>{re.on("redirect-to",ie=>{var W,q,te;if(Xu(ie)||(ie={path:ie}),ie.params=ie.params||[],ie.search=ie.search||[],ie.path==="app-reload"){window.location.href=ie.url;return}let Ue=null;if(ie.params.length>0){Ue={};for(var ae=0;ae<ie.params.length;ae++){const X=ie.params[ae];Ue[X.key]=X.value}}let pe="";if(ie.search.length>0){let X=[];for(ae=0;ae<ie.search.length;ae++){const le=ie.search[ae];X.push([le.key,le.value])}pe=`?${Gp(X)}`}if((W=ie.retainPreviousURLforLogin)!=null&&W.active){let X=[];for(let[le,me]of new URLSearchParams(oe).entries())X.push({key:le,value:me});Zn.dispatch({type:"ui/setsRedirect_retainedURL",data:{UID:(q=ie.retainPreviousURLforLogin)==null?void 0:q.lastUID,isApplicableView:(te=ie.retainPreviousURLforLogin)==null?void 0:te.isApplicableView,pathname:se.pathname,params:X}})}B({pathname:Pn(ie.path,Ue),search:pe})},"Reset-NewURLmeta-RedirectTo"),re.on("check-matchurl",ie=>{ie.callback({resultsStatus:{"/":!!U.default,"/login":!!U.login,"/privacy":!!U.privacy,"/terms":!!U.terms,"/go/:assetID":!!U.assetGO,"/verify":!!U.verify,"/join/:code":!!U.joinCode,"/workspace/join/:code":!!U.teamJoinCode,"/workspace/join":!!U.teamJoin,"/signup":!!U.signup,"/workspace/all/bookmarks/updated":!!U.lastUpdated,"/workspace/:teamID/bookmarks/updated":!!U.lastUpdated_teamSpecific,"/workspace/all/bookmarks/recently-viewed":!!U.recentlyViewed,"/workspace/:teamID/bookmarks/recently-viewed":!!U.recentlyViewed_teamSpecific,"/workspace/all/bookmarks/starred":!!U.starred,"/workspace/:teamID/bookmarks/starred":!!U.starred_teamSpecific,"/prototypes":!!U.prototypes,"/workspace/all/map":!!U.maps,"/workspace/all/map/:mapID":!!U.maps_mapSpecific,"/workspace/:teamID/map":!!U.maps_teamSpecific,"/workspace/:teamID/map/:mapID":!!U.maps_teamSpecific_mapSpecific,"/organization/:organizationID/subscribe":!!U.organizationSubscription,"/import":!!U.importBookmarks,"/import-bookmark-bar":!!U.importBookmarkBar,"/import-bookmark-history":!!U.importBookmarkHistory,"/share/board/:shareToken":!!U.shareBoard,"/share/flow/:shareToken":!!U.shareFlow},details:{"/":U.default,"/login":U.login,"/privacy":U.privacy,"/terms":U.terms,"/go/:assetID":U.assetGO,"/verify":U.verify,"/join/:code":U.joinCode,"/workspace/join/:code":U.teamJoinCode,"/workspace/join":U.teamJoin,"/signup":U.signup,"/workspace/all/bookmarks/updated":U.lastUpdated,"/workspace/:teamID/bookmarks/updated":U.lastUpdated_teamSpecific,"/workspace/all/bookmarks/recently-viewed":U.recentlyViewed,"/workspace/:teamID/bookmarks/recently-viewed":U.recentlyViewed_teamSpecific,"/workspace/all/bookmarks/starred":U.starred,"/workspace/:teamID/bookmarks/starred":U.starred_teamSpecific,"/prototypes":U.prototypes,"/workspace/all/map":U.maps,"/workspace/all/map/:mapID":U.maps_mapSpecific,"/workspace/:teamID/map":U.maps_teamSpecific,"/workspace/:teamID/map/:mapID":U.maps_teamSpecific_mapSpecific,"/organization/:organizationID/subscribe":U.organizationSubscription,"/import":U.importBookmarks,"/import-bookmark-bar":U.importBookmarkBar,"/import-bookmark-history":U.importBookmarkHistory,"/share/board/:shareToken":U.shareBoard,"/share/flow/:shareToken":U.shareFlow},pathname:se.pathname})},"Reset-NewURLmeta-CheckMatchURL")},[se,oe]),p.useEffect(()=>{document.body.classList.remove("is-popupweb-mode")},[se.pathname]),p.useEffect(()=>{var Ue;
1968const ie=(Ue=t==null?void 0:t.globalMeta)==null?void 0:Ue.teams;(ie==null?void 0:ie.length)===1&&se.pathname.startsWith("/workspace/all/")&&B(se.pathname.replace("/workspace/all/",`/workspace/${ie[0].id}/`),{replace:!0})},[se.pathname,(Ie=t==null?void 0:t.globalMeta)==null?void 0:Ie.teams]),p.useEffect(()=>{var W,q;const ie=(W=t==null?void 0:t.globalMeta)==null?void 0:W.teams;if(!ie)return;const Ue=se.pathname.match(/^\/workspace\/([^/]+)\//),ae=Ue&&Ue[1]!=="all"?Ue[1]:null;if(!ae)return;if(String((q=n==null?void 0:n.activeTeam)==null?void 0:q.id)!==String(ae)||(n==null?void 0:n.isAllTeam)){const te=ie.find(X=>X.id===ae);te&&Zn.dispatch({type:"ui/setUser_currentTeam",data:{id:te.id,name:te.name}})}},[se.pathname,(Ae=t==null?void 0:t.globalMeta)==null?void 0:Ae.teams]),p.useEffect(()=>{re.on("interstitial-run",ie=>{Xu(ie)||(ie={type:ie}),ie.status&&!ie.type&&(ie.type=ie.status),ie.type==="on"?(a(Ue=>++Ue),ie.message&&i(ie.message),c(ie.variant||"spinner")):ie.type==="off"?(a(Ue=>Math.max(0,--Ue)),r<=1&&(i(null),c(null))):ie.type==="update"&&(ie.message&&i(ie.message),ie.variant&&c(ie.variant))},"GlobalDisplays-InterstitialRun"),re.on("trigger-confetti",()=>{d(!0),setTimeout(()=>d(!1),8e3)},"GlobalDisplays-TriggerConfetti"),re.on("trigger-alert",({message:ie="",intent:Ue="primary",position:ae="bottom-left",timeout:pe=3e3,hideProgressBar:W=!0,closeOnClick:q=!0,pauseOnHover:te=!0,draggable:X=!0,transition:le=QVe})=>Qr[kKe[Ue]](ie,{position:ae,autoClose:pe,hideProgressBar:W,closeOnClick:q,pauseOnHover:te,draggable:X,transition:le}),"GlobalDisplays-TriggerAlert"),re.on("asset-content-processing-queue-errorrestoreform",({queueItem:ie})=>e.action({type:"sibling-header",subType:"sidepanel-open-restoreform",dataSet:{contingency:ie.contingency}}),"GlobalDisplays-AssetProcessingErrorRestoreForm")},[]),p.useEffect(()=>{const ie=()=>{Qr.dismiss("offline-toast")},Ue=()=>{Qr.warn("You are currently offline.",{toastId:"offline-toast",autoClose:!1,closeOnClick:!1,draggable:!1,hideProgressBar:!0,closeButton:!1,position:"bottom-center"})};return window.addEventListener("online",ie),window.addEventListener("offline",Ue),navigator.onLine||Ue(),()=>{window.removeEventListener("online",ie),window.removeEventListener("offline",Ue)}},[]),p.useEffect(()=>{if(!u)return;const ie=()=>m({width:window.innerWidth,height:window.innerHeight});return ie(),window.addEventListener("resize",ie),()=>window.removeEventListener("resize",ie)},[u]),o.createElement("div",null,u?o.createElement(sre,{width:f.width,height:f.height,numberOfPieces:400,recycle:!1,tweenDuration:8e3,style:{position:"fixed",top:0,left:0,zIndex:9999,pointerEvents:"none"}}):null,w?o.createElement("div",{className:"dev-info dev-info--left !p-0"},o.createElement(hD,{minimal:!0},o.createElement(Hr,{minimal:!0,placement:"bottom-start",content:o.createElement(Cr,{className:"bp6-menu bp6-elevation-1 pt-4"},o.createElement(Bt,{icon:o.createElement(nG,{size:16}),text:"Clear local cache",onClick:()=>{localStorage.removeItem("assetsGeneral-lastDownload"),localStorage.removeItem("assetList-lastDownload"),localStorage.removeItem("tables_column_widths"),localStorage.removeItem("tables_sidebar_width"),localStorage.removeItem("tables_last_opened"),CKe(),Qe.action.selfDestruct().then(()=>{window.location.reload()})}}),o.createElement("div",{className:"px-3 py-2 border-t border-gray-100 dark:border-gray-800 flex items-center gap-2"},o.createElement(ds,{checked:y,onChange:ie=>E(ie.target.checked),labelElement:"Preview global interstitial (Spinner)",alignIndicator:"right",className:"m-0 dark__text"})),o.createElement("div",{className:"px-3 py-2 border-t border-gray-100 dark:border-gray-800 flex items-center gap-2"},o.createElement(ds,{checked:h,onChange:ie=>v(ie.target.checked),labelElement:"Preview Interstitial component (GIF)",alignIndicator:"right",className:"m-0 dark__text"})),o.createElement("div",{className:"px-3 py-2 border-t border-gray-100 dark:border-gray-800 flex items-center gap-2"},o.createElement(ds,{checked:C,onChange:ie=>O(ie.target.checked),labelElement:"Preview Rebrand Announcement",alignIndicator:"right",className:"m-0 dark__text flex-1"}),o.createElement("a",{href:"#",className:"text-xs text-blue-600 dar
1968k:text-blue-300 hover:underline",onClick:ie=>{ie.preventDefault();try{localStorage.removeItem(hh)}catch{}se.reload()}},"Reset")),o.createElement("div",{className:"px-3 py-2 border-t border-gray-100 dark:border-gray-800 flex items-center gap-2"},o.createElement(ds,{checked:D,onChange:ie=>H(ie.target.checked),labelElement:"Preview Welcome Onboarding",alignIndicator:"right",className:"m-0 dark__text flex-1"}),o.createElement("a",{href:"#",className:"text-xs text-blue-600 dark:text-blue-300 hover:underline",onClick:ie=>{ie.preventDefault();try{localStorage.removeItem(ph)}catch{}se.reload()}},"Reset")),o.createElement("div",{className:"px-4 py-2 border-t border-gray-100 dark:border-gray-800 gap-2 flex flex-col"},o.createElement("span",{className:"text-[10px] opacity-50 uppercase tracking-widest font-semibold block mb-1"},"Last Build"),o.createElement("span",{className:"text-[10px] font-mono max-w-full flex items-center gap-1",title:"release/ITR-403-release-4.3.0"},o.createElement("span",{className:"opacity-40"},"BRANCH:"),o.createElement("span",{className:"truncate max-w-full"},"release/ITR-403-release-4.3.0",!0))," ",o.createElement("span",{className:"text-[10px] opacity-40 font-mono block"},(he=t==null?void 0:t.user)==null?void 0:he.email),o.createElement("span",{className:"text-[10px] opacity-40 font-mono block"},(_e=t==null?void 0:t.user)==null?void 0:_e.uid),o.createElement("span",{className:"text-[10px] opacity-40 font-mono block"},ee()),o.createElement("span",{className:"text-[10px] opacity-40 font-mono block uppercase"},"ENV: ","production"),o.createElement("span",{className:"text-[10px] opacity-40 font-mono block"},"10/1/2026, 3:58:44 PM"),o.createElement("span",{className:"text-[10px] opacity-40 font-mono block"},"ID:"," ","17908953730"),o.createElement("span",{className:"text-[10px] opacity-40 font-mono block",title:PH},"API: ",PH)))},o.createElement(De,{icon:o.createElement(YP,{size:16})})))):null,!U.assetGO&&(r>0||y&&w)?o.createElement("div",{className:"global-interstitial"},r>0?l==="logo"?o.createElement("div",{className:"global-interstitial-logo"}):o.createElement(os,{size:50,className:"global-interstitial-spinner"}):o.createElement(os,{size:50,className:"global-interstitial-spinner"}),r>0&&s?o.createElement("div",{className:"interstitial-message"},s):null):null,h&&!U.assetGO&&w?o.createElement("div",{className:"global-interstitial !z-[201]"},o.createElement(du,null)):null,o.createElement(eUe,{className:"toast"}),o.createElement(pKe,null),o.createElement(bKe,{dialogOpen:T,onClose:L}),o.createElement(wKe,{dialogOpen:Y,onClose:K}))};function RKe(){const e=hs(),t=Wn(i=>{var l;return(l=i==null?void 0:i.FB)==null?void 0:l.auth}),[n,r]=p.useState(!1),a=e.pathname.startsWith("/admin"),s=!!(t!=null&&t.isLoggedIn);return a||!s?null:o.createElement(o.Fragment,null,o.createElement("button",{type:"button",className:"fixed z-[300] flex items-center justify-center min-h-[44px] min-w-[44px] rounded-full shadow-lg bg-blue-300 dark:bg-gray-900 hover:bg-blue-700 text-white border-0 cursor-pointer bottom-[max(1rem,env(safe-area-inset-bottom,0px))] right-[max(1rem,env(safe-area-inset-right,0px))]","aria-label":"Contact support",title:"Contact support",onClick:()=>r(!0)},o.createElement(Ft,{icon:"comment",size:16,color:"white"})),o.createElement(ya,{isOpen:n,onClose:()=>r(!1),title:"Contact support",className:"w-[min(28rem,100vw)]"},o.createElement("div",{className:Fs},o.createElement(bne,{showIntro:!0,onSuccess:()=>r(!1)}))))}const TKe=()=>{var s,i;const e=hs(),t=yr(),n=Wn(l=>{var c;return(c=l==null?void 0:l.FB)==null?void 0:c.auth}),r=p.useRef(new Set),a=p.useRef(!1);return p.useEffect(()=>{var u;if(!a.current||!((u=n==null?void 0:n.user)!=null&&u.uid))return;const l=new URLSearchParams(e.search);if(!l.has(o1))return;l.delete(o1);const c=l.toString();t(`${e.pathname}${c?`?${c}`:""}${e.hash||""}`,{replace:!0})},[(s=n==null?void 0:n.user)==null?void 0:s.uid,e.search,e.pathname,e.hash,t]),p.useEffect(()=>{if(!(n!=null&&n.isLive))return;const l=new URLSearchParams(e.search),c=l.get(o1);if(!c||r.current.has(c))return;r.current.add(c);const u=()=>{l.delete(o1);const f=l.toString();t(`${e.pathname}${f?`?${f}`:""}${e.hash||""}`,{replace:!0})},d=of();(async()=>{var f,m,h;try{const g=await pt(Ir(xr()),Ze("users-auth-handoff-redeem"))({handoffID:c}),v=(m=(f=g==null?void 0:g.data)==null?void 0:f.output)==null?void 0:m.customToken;if(!v)throw new Error("No custom token returned.");if((h=n==null?void 0:n.user)!=null&&h.uid)try{await Dy(d)}catch(y){console.warn("auth handoff: signOut before redeem failed.",y)}await T_(d,v),a.current=!0}catch(g){console.warn("auth handoff: redeem failed.",g),u()}})()},[n==null?void 0:n.isLive,(i=n==null?void 0:n.user)==null?void 0:i.uid,e.search,e.pathname,e.hash,t]),null},AKe=Ir(xr()),eR=/^https?:\/\/\S+$/i,Sf=e=>{if(!e)return!1;const t=Array.from(e.types||[]);
1968return t.includes("text/uri-list")||t.includes("text/x-moz-url")||t.includes("text/plain")},DH=e=>{var s;if(!e)return null;const t=i=>{try{return e.getData(i)||""}catch{return""}},n=t("text/uri-list");if(n){const i=n.split(` 1969`).map(l=>l.trim()).find(l=>l&&!l.startsWith("#"));if(i&&eR.test(i))return i}const r=t("text/x-moz-url");if(r){const i=(s=r.split(` 1970`)[0])==null?void 0:s.trim();if(i&&eR.test(i))return i}const a=t("text/plain").trim();return a&&eR.test(a)?a:null},LH=e=>jo(e),IKe=e=>`${jo(e)}${e!=null&&e.is_personal?" (Personal)":""}`,$H=e=>{try{if(!e)return null;const t=new URL(e);let n=(t.host+t.pathname).toLowerCase();return n.endsWith("/")&&(n=n.slice(0,-1)),n}catch{return null}},OKe=async(e,t)=>{var n,r;try{if(!((r=(n=Qe==null?void 0:Qe.base)==null?void 0:n.isOpen)!=null&&r.call(n)))return null;const a=$H(t);return a&&(await Qe.base.table("Assets-General-All").where("$team_id").equals(e).toArray()).find(i=>{var c;if(i._is_deleted)return!1;const l=$H(((c=i.active_iteration)==null?void 0:c.url)||i.url);return l&&l===a})||null}catch{return null}},MKe=()=>{var b,E;const e=Wn(w=>{var x;return(x=w==null?void 0:w.FB)==null?void 0:x.auth}),t=!!((b=e==null?void 0:e.user)!=null&&b.uid),n=p.useMemo(()=>{var w;return((w=e==null?void 0:e.globalMeta)==null?void 0:w.teams)||[]},[(E=e==null?void 0:e.globalMeta)==null?void 0:E.teams]),r=n.length>1,a=aS(),[s,i]=p.useState(!1),[l,c]=p.useState(null),[u,d]=p.useState(null),f=p.useRef(0),m=p.useRef(n);p.useEffect(()=>{m.current=n},[n]);const h=async(w,x)=>{var S,N;if(!(!(w!=null&&w.id)||!x)){c(w.id);try{const k=await OKe(w.id,x);if(k){const T=k.name||x;re.dispatch("trigger-alert",{message:`"${T}" is already saved in ${LH(w)}.`,intent:"danger"});return}const C=await pt(AKe,Ze("users-asset-manage-add"))({asset:{id_team:w.id,id_project:null,id_collection:null,id_tags:[],ids_notifications_team_members:[],property_name:x,property_description:"",property_type:"bookmark",$new_tags:[]},iteration:{property_url:x,property_url_original:x,property_display_format:"",property_change_notes:"",property_screenshot_strategy:"auto",property_auto_preview_thumbnail:null},source:"webapp",collection:{property_name:null},client_request_id:null}),A=((S=C==null?void 0:C.data)==null?void 0:S.output)||{},O=A.assetID;if(O)try{await Qe.action.set({tableID:"Assets-General-All",dataList:[{$id:O,id:O,$team_id:w.id,name:x,$collection_id:null,tags:[],active_iteration:{url:x,auto_preview_thumbnail:A.iterationThumbnailStoragePath||null},is_favorited:!1,$optimistic:!0,date_created:Date.now(),date_modified:Date.now()}],options:{skipClear:!0,preserveLocalDB:!0,includeIndex:!0}}),re.dispatch("REFRESH_ASSETS_LIST")}catch(T){console.warn("Failed to seed dropped bookmark into Dexie:",T)}re.dispatch("trigger-alert",{message:`Added bookmark to ${LH(w)}.`,intent:"success"}),!a.isAllWorkspaces&&((N=a.activeTeam)!=null&&N.id)&&w.id!==a.activeTeam.id&&a.selectAllWorkspaces()}catch(k){console.error("Drop-to-bookmark failed:",k),re.dispatch("trigger-alert",{message:"Couldn't add bookmark. Try again.",intent:"danger"})}finally{c(null)}}};p.useEffect(()=>{if(!t)return;const w=()=>m.current.length>1,x=C=>{Sf(C.dataTransfer)&&(C.preventDefault(),f.current+=1,w()&&i(!0))},S=C=>{Sf(C.dataTransfer)&&(C.preventDefault(),C.dataTransfer&&(C.dataTransfer.dropEffect="copy"))},N=C=>{Sf(C.dataTransfer)&&(f.current=Math.max(0,f.current-1),f.current===0&&(i(!1),d(null)))},k=C=>{if(Sf(C.dataTransfer)){if(C.preventDefault(),f.current=0,!w()){const A=DH(C.dataTransfer),O=m.current[0];A&&O?h(O,A):A||re.dispatch("trigger-alert",{message:"Couldn't read a URL from that drop.",intent:"danger"})}i(!1)}};return window.addEventListener("dragenter",x),window.addEventListener("dragover",S),window.addEventListener("dragleave",N),window.addEventListener("drop",k),()=>{window.removeEventListener("dragenter",x),window.removeEventListener("dragover",S),window.removeEventListener("dragleave",N),window.removeEventListener("drop",k)}},[t]),p.useEffect(()=>{if(!s)return;const w=x=>{x.key==="Escape"&&(f.current=0,i(!1))};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[s]);const g=w=>{Sf(w.dataTransfer)&&(w.preventDefault(),w.stopPropagation(),w.dataTransfer&&(w.dataTransfer.dropEffect="copy"))},v=(w,x)=>{Sf(w.dataTransfer)&&(w.preventDefault(),d(S=>S===x?S:x))},y=(w,x)=>
1970{if(!Sf(w.dataTransfer))return;w.preventDefault(),w.stopPropagation();const S=DH(w.dataTransfer);if(f.current=0,d(null),i(!1),!S){re.dispatch("trigger-alert",{message:"Couldn't read a URL from that drop.",intent:"danger"});return}h(x,S)};return!t||!r?null:o.createElement("div",{className:`fixed inset-0 z-[10000] transition-opacity duration-150 ${s?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,"aria-hidden":!s},o.createElement("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>{f.current=0,i(!1)}}),o.createElement("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[480px] max-w-[92vw] bg-white dark:bg-gray-900 rounded-lg shadow-2xl p-5",onClick:w=>w.stopPropagation()},o.createElement("div",{className:"flex items-start justify-between mb-3"},o.createElement("div",{className:"flex items-center gap-2"},o.createElement(tf,{size:18,className:"text-blue-500"}),o.createElement("h2",{className:"text-base font-semibold text-gray-900 dark:text-gray-100 m-0"},"Drop URL into a workspace")),o.createElement("button",{type:"button",onClick:()=>{f.current=0,i(!1)},className:"p-1 rounded hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-500","aria-label":"Close"},o.createElement(Nm,{size:14}))),o.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3"},"Release on a workspace below to save the link."),o.createElement("div",{className:"flex flex-col gap-2 max-h-[60vh] overflow-y-auto"},[...n].sort((w,x)=>w.is_personal&&!x.is_personal?-1:!w.is_personal&&x.is_personal?1:(w.name||"").localeCompare(x.name||"")).map(w=>{const x=l===w.id,S=u===w.id,N=IKe(w),k=w.is_personal?jd:uc,C=is.getColor(w.id),A=S?"border-solid border-blue-500":x?"border-dashed border-blue-500":"border-dashed border-gray-300 dark:border-gray-700 hover:border-blue-400";return o.createElement("div",{key:w.id,onDragEnter:O=>v(O,w.id),onDragOver:g,onDrop:O=>y(O,w),className:`drop-zone flex items-center gap-3 p-3 rounded border-2 cursor-copy ${A}`},o.createElement(k,{size:20,color:C||void 0}),o.createElement("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 flex-1 truncate"},N),x?o.createElement("span",{className:"text-xs text-gray-500 dark:text-gray-400"},"Savingâ¦"):null)}))))},PKe=[{path:"/tauri",element:cre},{path:"/login",element:zh},{path:"/signup",element:hne},{path:"/terms",element:Jne},{path:"/privacy",element:Qne}],Iy="__TAURI_INTERNALS__"in window&&window.__TAURI_WINDOW_TYPE__!=="app"||new URLSearchParams(window.location.search).get("tauri")==="true",DKe=Iy?xwe:Rwe;function LKe(){const e=hs(),t=yr(),n=e.pathname==="/admin"||e.pathname.startsWith("/admin/")||e.pathname==="/tauri"||e.pathname.startsWith("/share/"),[r,a]=p.useState(null);return p.useEffect(()=>(document.body.classList.toggle("admin-portal",n),()=>{document.body.classList.remove("admin-portal")}),[n]),p.useEffect(()=>{Iy&&(e.pathname==="/"||e.pathname.includes("index.html"))&&t("/tauri",{replace:!0})},[e.pathname,t,Iy]),o.createElement(o.Fragment,null,o.createElement(TKe,null),n?null:o.createElement(sMe,{external:{action:({type:s=null,subType:i=null,dataSet:l={},callback:c=ta.noop})=>{s==="sibling-body"&&a({type:"body",subType:i,settings:l})}},sibling_meta_action:r,sibling_meta_reset:()=>a(null)}),o.createElement(NKe,{external:{action:({type:s=null,subType:i=null,dataSet:l={},callback:c=ta.noop})=>{s==="sibling-header"&&a({type:"header",subType:i,settings:l})}}}),n?null:o.createElement(RKe,null),n?null:o.createElement(MKe,null),o.createElement(nY,null,hKe.list.map((s,i)=>o.createElement(lx,{key:i,path:s.path,element:o.createElement(s.element,{external:{action:({type:l=null,subType:c=null,dataSet:u={},callback:d=ta.noop})=>{l==="sibling-header"&&a({type:"header",subType:c,settings:u})}},sibling_meta_action:r,sibling_meta_reset:()=>a(null)})}))))}function $Ke(){return o.createElement(nY,null,PKe.map(({path:e,element:t})=>o.createElement(lx,{key:e,path:e,element:o.createElement(t,null)})),o.createElement(lx,{path:"*",element:o.createElement(jf,{to:"/tauri",replace:!0})}))}const FKe=()=>{const e=Iy?{initialEntries:["/tauri"]}:{};return o.createElement(DKe,{...e},Iy?o.createElement($Ke,null):o.createElement(LKe,null))};window.__TAURI_WINDOW_TYPE__==="app"&&yn(()=>function(){return(t=>import(t))("./index.a906e697.js")}(),[]).then(({openUrl:e})=>{document.addEventListener("click",t=>{const n=t.target.closest("a");n!=null&&n.href&&!n.href.startsWith(window.location.origin)&&(t.preventDefault(),e(n.href))},!0)});const jS=new URLSearchParams(window.location.search),e5="__TAURI_INTERNALS__"in window||"__TAURI__"in window;(e5||jS.get("tauri")==="true")&&document.body.classList.add("tauri-mode");!e5&&jS.get("tauri")==="true"&&document.body.classList.add("tauri-browser-development");jS.get("tauri-desktop")==="true"&&document.body.classList.add("tauri-desktop");(jS.get("tauri-menubar")==="true"||e5&&window.__TAURI_WINDOW_TYPE__!=="app")&&(document.body.classList.add("tauri-menubar"),document.body.classList.add("is-popupweb-mode"));const mZe=()=>(o.useEffect(()=>{if("__TAURI_INTERNALS__"in window||"__TAURI__"in window){let e=()=>{};return yn(()=>function(){return(n=>import(n))("./event.9bfe3839.js")}(),[]).then(({listen:t})=>{t("tray_add_bookmark",()=>{re.dispatch("open-side-panel",{targetType:"AddAsset",triggerSource:"tray"})}).then(n=>e=n).catch(console.error)}).catch(console.error),()=>e()}},[]),o.createElement(Rae,{store:Zn},o.createElement(S0e,null,o.createElement(FKe,null))));export{tu as $,mZe as A,De as B,mk as C,$n as D,qn as E,Cs as F,Ko as G,nW as H,Nt as I,fr as J,Ft as K,ci as L,T0 as M,fs as N,Wv as O,va as P,Es as Q,fk as R,os as S,Xj as T,Lp as U,RT as V,ya as W,Fs as X,Hi as Y,jf as Z,yn as _,o1 as a,xi as a0,eZe as a1,Vf as a2,nY as a3,lx as a4,iZe as a5,tZe as b,At as c,nZe as d,Kj as e,wn as f,Wn as g,Ki as h,uL as i,F as
1970j,cZe as k,rZe as l,jn as m,Cl as n,li as o,zhe as p,jr as q,KZ as r,GG as s,hOe as t,yr as u,Qr as v,ds as w,Bp as x,xs as y,pOe as z};
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.